@lepsto/sdk-app 89.6.0 → 89.7.1

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
@@ -115,36 +115,8 @@ before this point lives in that package.
115
115
  The publish pipeline appends its machine-rendered block for the release being
116
116
  built below this line. It is not committed back to the repo, so in a git
117
117
  checkout this section is empty — see the note at the top.
118
- ## 89.6.0 (minor)
119
-
120
- ### deployment
121
- - `deployment_canvas_get`: new optional field `services.publicDomain (output)`
122
- - `deployment_domain_add`: new optional field `redirectStatus (output)`
123
- - `deployment_domain_add`: new optional field `redirectToDomainId (output)`
124
- - `deployment_domain_get`: new optional field `redirectStatus (output)`
125
- - `deployment_domain_get`: new optional field `redirectToDomainId (output)`
126
- - `deployment_domain_list`: new optional field `redirectStatus (output)`
127
- - `deployment_domain_list`: new optional field `redirectToDomainId (output)`
128
- - `deployment_domain_list_by_service`: new optional field `redirectStatus (output)`
129
- - `deployment_domain_list_by_service`: new optional field `redirectToDomainId (output)`
130
- - added `deployment_domain_redirect_set`
131
- - `deployment_domain_redirect_www`: new optional field `redirectStatus (output)`
132
- - `deployment_domain_redirect_www`: new optional field `redirectToDomainId (output)`
133
- - `deployment_domain_verify`: new optional field `redirectStatus (output)`
134
- - `deployment_domain_verify`: new optional field `redirectToDomainId (output)`
135
- - `deployment_events_list_by_environment`: new accepted value on `type`
136
- - `deployment_events_list_by_environment`: new accepted value on `type (output)`
137
- - `deployment_events_list_by_service`: new accepted value on `type`
138
- - `deployment_events_list_by_service`: new accepted value on `type (output)`
139
- - `deployment_service_create`: new optional field `publicDomain`
140
- - `deployment_service_create`: new optional field `publicDomain (output)`
141
- - `deployment_service_create`: description updated
142
- - `deployment_service_get`: new optional field `publicDomain (output)`
143
- - `deployment_service_get`: description updated
144
- - `deployment_service_list`: new optional field `publicDomain (output)`
145
- - `deployment_service_list`: description updated
146
- - `deployment_service_scale`: new optional field `publicDomain (output)`
147
- - `deployment_service_update`: new optional field `publicDomain`
148
- - `deployment_service_update`: new optional field `publicDomain (output)`
149
- - `deployment_service_update`: description updated
118
+ ## 89.7.1 (patch)
119
+
120
+ ### *
121
+ - documentation update
150
122
 
package/README.md CHANGED
@@ -4,35 +4,35 @@ The Lepsto SDK for App is a TypeScript SDK that provides runtime bindings and ty
4
4
 
5
5
  **Note:** The `src/gen` directory contains generated SDK code and should not be edited by hand. Generated files are produced by running `npm run generate` with an API catalog.
6
6
 
7
- The committed `src/gen` is a **convenience snapshot** — it lets the repo type-check, test, and build offline. It is **not** the source of truth: canonical generation happens **at publish time**, when Cloud Build regenerates `src/gen` from the live catalog before publishing. The catalog is **mid-migration**, so the committed snapshot's namespaces (currently `organization` and `playground`) will **grow as platform extensions migrate to `@lessly-platform/tools`** — a namespace only appears once its tools carry a REST binding (tools without one are excluded until migrated). Regenerate the snapshot with `npx tsx scripts/generate.ts <catalog.json> src/gen && npm run sync-exports` against the live catalog (`https://api.lessly.dev/catalog/tools`).
7
+ The committed `src/gen` is a **convenience snapshot** — it lets the repo type-check, test, and build offline. It is **not** the source of truth: canonical generation happens **at publish time**, when Cloud Build regenerates `src/gen` from the live catalog before publishing. The catalog is **mid-migration**, so the committed snapshot's namespaces (currently `organization` and `playground`) will **grow as platform extensions migrate to `@lepsto-platform/tools`** — a namespace only appears once its tools carry a REST binding (tools without one are excluded until migrated). Regenerate the snapshot with `npx tsx scripts/generate.ts <catalog.json> src/gen && npm run sync-exports` against the live catalog (`https://api.lepsto.dev/catalog/tools`).
8
8
 
9
- ## Package name: `@lepsto/sdk-app` (and legacy `@lessly/sdk-app`)
9
+ ## Package name: `@lepsto/sdk-app`
10
10
 
11
11
  ```sh
12
12
  npm i @lepsto/sdk-app
13
13
  ```
14
14
 
15
- The package is published on public npmjs as **`@lepsto/sdk-app`** and, during the transition,
16
- **also** as `@lessly/sdk-app` — same build, same version, identical `exports` map. The old name is
17
- not deprecated.
15
+ `@lepsto/sdk-app` is the name to install. One build is published on public npmjs under two
16
+ names `@lepsto/sdk-app` and `@lessly/sdk-app` — at the same version, with an identical
17
+ `exports` map. Both are supported.
18
18
 
19
- `package.json` keeps `name: @lessly/sdk-app` on purpose: the dev-console SDK-rebuild Cloud Build
20
- job derives `PKG` from it (`require('./package.json').name`) for its `npm view` probe and runs
21
- `npm run publish:npmjs -- --tag <channel>`. The new name is the **derived** tarball.
19
+ `package.json` carries `name: @lessly/sdk-app`, and the dev-console SDK-rebuild Cloud Build job
20
+ derives `PKG` from it (`require('./package.json').name`) for its `npm view` probe before running
21
+ `npm run publish:npmjs -- --tag <channel>`. `@lepsto/sdk-app` is the **derived** tarball.
22
22
 
23
23
  | Script | Publishes | Contract |
24
24
  | --- | --- | --- |
25
- | `npm run publish:npmjs -- --tag <channel>` | `@lessly/sdk-app` | unchanged; token with write on `@lessly` |
25
+ | `npm run publish:npmjs -- --tag <channel>` | `@lessly/sdk-app` | token with write on `@lessly` |
26
26
  | `npm run publish:npmjs:lepsto -- --tag <channel>` | `@lepsto/sdk-app` | same args as `publish:npmjs`; token with write on `@lepsto` |
27
27
 
28
28
  `publish:npmjs:lepsto` (`scripts/publish-alias.ts`) builds once, `npm pack`s, rewrites `name` and `description`
29
- (the Lepsto text; `package.json` keeps the legacy description for `@lessly/sdk-app`),
29
+ (the Lepsto text; `package.json` carries its own description for `@lessly/sdk-app`),
30
30
  checks every `exports` target is in the tarball, and publishes with `--registry` and
31
31
  `--@lepsto:registry` pinned. Run it after `publish:npmjs` against the same checkout so both names
32
32
  carry the same version.
33
33
 
34
- **Bootstrap** (`.github/workflows/publish-lepsto.yml`, manual): mirrors already-published legacy
35
- tarballs instead of rebuilding — `npm pack @lessly/sdk-app@<v>`, rewrite `name` and `description`, drop
34
+ **Bootstrap** (`.github/workflows/publish-lepsto.yml`, manual): mirrors already-published
35
+ `@lessly/sdk-app` tarballs instead of rebuilding — `npm pack @lessly/sdk-app@<v>`, rewrite `name` and `description`, drop
36
36
  `publishConfig.registry`, publish as `@lepsto/sdk-app@<v>` (`tsx scripts/publish-alias.ts --mirror
37
37
  84.0.0:latest,85.0.0:next`). Versions that already exist are skipped. It uses `NPM_BOOTSTRAP_TOKEN`
38
38
  and is ready for npm Trusted Publishing (`id-token: write`, npm >= 11.5.1, token only in the publish
@@ -46,9 +46,10 @@ Create a client with `createLesslyApp`, then call operations through the Proxy n
46
46
  import { createLesslyApp } from '@lepsto/sdk-app';
47
47
 
48
48
  const sdk = createLesslyApp({
49
- baseUrl: 'https://api.lessly.dev', // or a page-relative '/api' in the browser
49
+ baseUrl: 'https://api.lepsto.dev', // or a page-relative '/api' in the browser
50
50
  productId: 'prod_123',
51
- // getCsrfToken defaults to reading the `lessly_csrf` cookie; override for SSR/tests.
51
+ // getCsrfToken defaults to reading the `lepsto_csrf` cookie, then `lessly_csrf`;
52
+ // override for SSR/tests.
52
53
  });
53
54
 
54
55
  const connectors = await sdk.organization.connectors.list({ productId: 'prod_123' });
@@ -113,7 +114,7 @@ Streaming (`<tool>Connect`) factories carry neither field: a socket is neither a
113
114
  and the catalog declares no level for a ws-only tool.
114
115
 
115
116
  Errors are surfaced as a typed `LesslyApiError` (`status`, `code`, `body`). Mutating calls
116
- without the `lessly_csrf` cookie fail before the network with `status: 0` and
117
+ without the `lepsto_csrf` cookie (or `lessly_csrf`) fail before the network with `status: 0` and
117
118
  `code: 'csrf_cookie_missing'` — no retry, no hidden refresh.
118
119
 
119
120
  ### TanStack Query
@@ -156,13 +157,13 @@ npm run ci -- --channel <next|latest> --catalog-url <URL> [--baseline <path>]
156
157
 
157
158
  - `--channel` — the npm dist-tag to publish under (`next` for staging, `latest` for production).
158
159
  - `--catalog-url` — the public catalog endpoint, fetched with an anonymous GET
159
- (staging `https://api.lessly.dev/catalog/tools`, production `https://api.lessly.com/catalog/tools`).
160
+ (staging `https://api.lepsto.dev/catalog/tools`, production `https://api.lepsto.com/catalog/tools`).
160
161
  - `--baseline` — path to the previous catalog snapshot (downloaded from GCS) used for the
161
162
  content-hash gate and the semver diff-classifier. **Omit it for the first publish.**
162
163
 
163
164
  The very first publish on the (empty) npmjs registry is floored at **`0.2.0`**, not `0.1.0`,
164
165
  so it lands strictly above the legacy GAR `0.1.x` line that existing consumers pinned (e.g.
165
- `^0.1.1`). This mirrors the `@lessly/ui` migration (GAR `0.1.0` → npmjs `0.2.0`). Once a version
166
+ `^0.1.1`). Once a version
166
167
  exists on a channel's dist-tag, normal semver bumping (and the recovery patch-bump) takes over.
167
168
  The floor is keyed off the **registry**, not the flag: if the channel's dist-tag resolves to
168
169
  nothing (empty npmjs), the run takes the first-publish path even when Cloud Build passes a stored
package/docs/README.md CHANGED
@@ -1,20 +1,20 @@
1
- # Building a Lessly App
1
+ # Building a Lepsto App
2
2
 
3
- This is the entry point for building a Lessly **App** with `@lepsto/sdk-app`.
3
+ This is the entry point for building a Lepsto **App** with `@lepsto/sdk-app`.
4
4
  Read this file first, then `rules.md`, then whichever recipe under `recipes/`
5
5
  matches the task in front of you.
6
6
 
7
7
  This path is stable: every scaffolded app's `AGENTS.md` points agents at
8
- `node_modules/@lepsto/sdk-app/docs/README.md` (or `node_modules/@lessly/sdk-app/docs/README.md` under the legacy name). It will not move or be renamed.
8
+ `node_modules/@lepsto/sdk-app/docs/README.md`. It will not move or be renamed.
9
9
 
10
10
  ## What an App is
11
11
 
12
- A Lessly **App** is a pure-frontend Module Federation remote built on
12
+ A Lepsto **App** is a pure-frontend Module Federation remote built on
13
13
  `@lepsto/sdk-app`. It ships no backend, no database, and no MCP endpoint — all
14
14
  platform data access goes through the SDK, and all identity/session state is
15
15
  handed to it by the shell that hosts it.
16
16
 
17
- Contrast this with a Lessly **extension**: an extension owns a backend
17
+ Contrast this with a Lepsto **extension**: an extension owns a backend
18
18
  service, a database, and typically an MCP endpoint, and is built against the
19
19
  toolkit-guide contracts (`MFST-*`, `PRD-*`, `MCP-*`, etc.). An App has none
20
20
  of that surface. If your task involves a database migration, a service-to-service
@@ -32,7 +32,7 @@ does not apply.
32
32
  product switching. An App reads the active product from props or the
33
33
  `X-Product-Id` header — never from a token — and must not implement its own
34
34
  auth.
35
- - **Manifest is `lessly.app.yaml`, schema v1.** Exactly five top-level fields:
35
+ - **Manifest is `lepsto.app.yaml`, schema v1.** Exactly five top-level fields:
36
36
  `app_schema_version: 1`, `id`, `title`, `version`, `nav` (`nav.icon`, plus an
37
37
  optional `nav.sections` rail menu). No backend or extension manifest field
38
38
  (`s2s`, `webhooks`, `billing`, `analytics`, `routing`, ...) is valid here.
@@ -43,12 +43,12 @@ does not apply.
43
43
  ## Quickstart
44
44
 
45
45
  ```sh
46
- npm create lessly-app@latest my-app
46
+ npm create lepsto-app@latest my-app
47
47
  cd my-app
48
48
  pnpm dev
49
49
  ```
50
50
 
51
- The generated manifest (`lessly.app.yaml`) is the full v1 surface:
51
+ The generated manifest (`lepsto.app.yaml`) is the full v1 surface:
52
52
 
53
53
  ```yaml
54
54
  app_schema_version: 1
@@ -81,7 +81,7 @@ drift from the method it is meant to describe; the method cannot.
81
81
  // src/App.tsx
82
82
  import { useEffect } from 'react';
83
83
  import { createLesslyApp } from '@lepsto/sdk-app';
84
- import { TooltipProvider } from '@lessly/ui';
84
+ import { TooltipProvider } from '@lepsto/ui';
85
85
 
86
86
  export default function App({ productId }: { productId: string }) {
87
87
  const app = useMemo(() => createLesslyApp({ baseUrl: '/api', productId }), [productId]);
@@ -119,7 +119,7 @@ refetched on a timer.
119
119
  ```tsx
120
120
  import { accessReason } from '@lepsto/sdk-app';
121
121
  import { useAccess, useCan } from '@lepsto/sdk-app/react';
122
- import { Button, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@lessly/ui';
122
+ import { Button, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@lepsto/ui';
123
123
 
124
124
  function AddDomainButton({ app, onClick }: { app: App; onClick: () => void }) {
125
125
  const { state } = useAccess(app);
@@ -164,7 +164,7 @@ by keyboard and by touch even on an enabled control. That class sits in the **ba
164
164
  `buttonVariants`, not in an icon-only branch — so the wrapper pattern applies to
165
165
  *every* Button, not just the icon-only shape. The wrapping trigger carries
166
166
  `tabIndex={0}` for the same reason: a keyboard user has to be able to reach the hint.
167
- This mirrors what `@lessly/ui` documents above `ButtonIconOnlyProps` in `button.tsx`
167
+ This mirrors what `@lepsto/ui` documents above `ButtonIconOnlyProps` in `button.tsx`
168
168
  (`Button --disabled-with-tooltip` shows both halves).
169
169
 
170
170
  Controls that take no `title` at all — the kit's `Switch`, for one — have no other
@@ -543,7 +543,7 @@ Prefer **one line in the card's footer**, stating the constraint before anyone
543
543
  starts editing:
544
544
 
545
545
  ```tsx
546
- import { Card, CardNote } from '@lessly/ui';
546
+ import { Card, CardNote } from '@lepsto/ui';
547
547
 
548
548
  <Card title="Domain settings">
549
549
  {fields}
@@ -28,7 +28,7 @@ There is no `./navigation` module. FED-011 — the shell's extension-menu
28
28
  contract — is **RETIRED (2026-08)**: the shell never registers, preloads or
29
29
  calls it, there is no `subscribeNavItems` (v1 or v2) and no
30
30
  `navContractVersion` negotiation, and the menu the shell renders while your app
31
- is open comes from **your own** `lessly.app.yaml` — the `nav.sections` block
31
+ is open comes from **your own** `lepsto.app.yaml` — the `nav.sections` block
32
32
  (APP-011) — not from your App code, and not from a toolkit manifest.
33
33
 
34
34
  Still mapping the expose is inert, not an error — you just ship a chunk nobody
@@ -46,7 +46,7 @@ router.
46
46
  The rows the module used to publish are now data in your App's manifest:
47
47
 
48
48
  ```yaml
49
- # lessly.app.yaml
49
+ # lepsto.app.yaml
50
50
  nav:
51
51
  icon: flask-conical
52
52
  sections:
@@ -68,7 +68,7 @@ how a change reaches production are in APP-011.
68
68
 
69
69
  ## Shared singletons: `>=` floors, not carets, on 0.x packages
70
70
 
71
- `react`, `react-dom`, `react-router`, and `@lessly/ui` MUST be declared as
71
+ `react`, `react-dom`, `react-router`, and `@lepsto/ui` MUST be declared as
72
72
  shared singletons, never bundled (FED-005), pinned via `@module-federation/vite`
73
73
  at exactly `1.16.12` (FED-006):
74
74
 
@@ -77,18 +77,25 @@ const SHARED = {
77
77
  react: { singleton: true, strictVersion: false, requiredVersion: '^19' },
78
78
  'react-dom': { singleton: true, strictVersion: false, requiredVersion: '^19' },
79
79
  'react-router': { singleton: true, strictVersion: false, requiredVersion: '^7.18' },
80
- // 0.x singletons use a `>=` floor, NOT a caret: `^0.x` resolves to `<0.(x+1).0`,
81
- // so a routine shell ui/icon bump would fail Module Federation version negotiation.
82
- '@lessly/ui': { singleton: true, strictVersion: false, requiredVersion: '>=0.1.0' },
80
+ // The kit is shared on a `>=` floor, NOT a caret: a caret pins the share to one
81
+ // major (or, on a 0.x package, one minor), so a routine shell kit bump would fail
82
+ // Module Federation version negotiation.
83
+ '@lepsto/ui': { singleton: true, strictVersion: false, requiredVersion: '>=0.1.0' },
83
84
  };
84
85
  ```
85
86
 
86
- `@lessly/ui` is pre-1.0. A caret range on a 0.x package (`^0.1.0`) resolves to
87
- `<0.2.0`, so the next time the shell bumps `@lessly/ui`'s minor version, MF
88
- version negotiation fails and your remote won't load under the shell. Use a
89
- `>=` floor for every 0.x shared singleton insteadit only guarantees a
90
- minimum, so it survives minor bumps upstream. Any other 0.x singleton you add
91
- (e.g. an icon package) follows the same rule.
87
+ Two different ranges describe two different things here, and they are meant to
88
+ disagree:
89
+
90
+ - the **share range** (`requiredVersion` above) is deliberately open `>=0.1.0`,
91
+ the same shape the shell declares. It only has to guarantee a floor, so it
92
+ survives every upstream bump of the kit without breaking MF negotiation.
93
+ - the **dependency range** in your `package.json` is `^9.0.0`, the major the
94
+ shell actually runs (see "Three things that are easy to get wrong" below).
95
+
96
+ Pin the share with a caret and the next kit bump in the shell fails version
97
+ negotiation and your remote won't load. Any other shared singleton you add
98
+ (e.g. an icon package) uses the same `>=` floor.
92
99
 
93
100
  ## Dual build: standalone + federation, merged into one `dist/`
94
101
 
@@ -153,16 +160,16 @@ Four files, ready to copy.
153
160
  tailwindcss/theme.css at all. */
154
161
 
155
162
  /* Layer order first, so positions are fixed before Tailwind emits its own.
156
- Mirrors the shell's declaration in lessly-workspace:apps/web/src/index.css. */
163
+ Mirrors the shell's declaration in lepsto-workspace:apps/web/src/index.css. */
157
164
  @layer theme, base, components, remote-utilities, utilities;
158
165
 
159
166
  @config '../tailwind.config.ts';
160
167
  @import 'tailwindcss/utilities.css' layer(remote-utilities);
161
- @import '@lessly/ui/styles-federated.css';
168
+ @import '@lepsto/ui/styles-federated.css';
162
169
 
163
- /* Tailwind must scan the kit's compiled output, or the classes @lessly/ui
170
+ /* Tailwind must scan the kit's compiled output, or the classes @lepsto/ui
164
171
  components use are never generated. */
165
- @source '../node_modules/@lessly/ui/dist/index.js';
172
+ @source '../node_modules/@lepsto/ui/dist/index.js';
166
173
 
167
174
  /* ...and must NOT scan your tests: a utility class named as a test fixture is
168
175
  just a string to Tailwind, and would be compiled into the shipped sheet. */
@@ -178,12 +185,12 @@ Four files, ready to copy.
178
185
  @config '../tailwind.config.ts';
179
186
  @import 'tailwindcss';
180
187
  @import url('https://fonts.googleapis.com/css2?family=Inter');
181
- @import '@lessly/ui/styles.css';
188
+ @import '@lepsto/ui/styles.css';
182
189
  @import './base.css';
183
190
 
184
191
  /* Same reason as in the federation entry: Tailwind generates utilities per
185
192
  entry, and neither entry's scan reaches node_modules on its own. */
186
- @source '../node_modules/@lessly/ui/dist/index.js';
193
+ @source '../node_modules/@lepsto/ui/dist/index.js';
187
194
  ```
188
195
 
189
196
  ```css
@@ -197,10 +204,10 @@ Four files, ready to copy.
197
204
 
198
205
  ```ts
199
206
  // tailwind.config.ts — the single source of scale vocabulary, for both entries
200
- import { lesslyPreset } from '@lessly/ui/tailwind-preset';
207
+ import { lepstoPreset } from '@lepsto/ui/tailwind-preset';
201
208
 
202
209
  export default {
203
- presets: [lesslyPreset],
210
+ presets: [lepstoPreset],
204
211
  content: ['./index.html', './src/**/*.{ts,tsx}'],
205
212
  };
206
213
  ```
@@ -221,8 +228,8 @@ import './index.css';
221
228
 
222
229
  **`theme.css` is optional, and it is not a token bridge.** There is no
223
230
  `src/theme.css` in the layout above, and an app with no tokens of its own does
224
- not need one. The kit's tokens come from `@lessly/ui/styles-federated.css` in
225
- federation and `@lessly/ui/styles.css` in standalone; re-declaring them locally
231
+ not need one. The kit's tokens come from `@lepsto/ui/styles-federated.css` in
232
+ federation and `@lepsto/ui/styles.css` in standalone; re-declaring them locally
226
233
  is a hand-copied set that drifts from the kit silently, and an `@theme` block
227
234
  restating the kit's scales is exactly what APP-009 forbids.
228
235
 
@@ -234,16 +241,16 @@ first paint. That exact block is what shipped the production font jump; it
234
241
  belongs in `src/base.css`, standalone-only.
235
242
 
236
243
  **The sanctioned federated export, not a hand-rolled filter.**
237
- `@lessly/ui/styles-federated.css` is `styles.css` minus the `@font-face` blocks
244
+ `@lepsto/ui/styles-federated.css` is `styles.css` minus the `@font-face` blocks
238
245
  and the `@layer base` — tokens, `--color-*` aliases, `.link`, the `.motion-*`
239
246
  helpers and the compiled tw-animate-css layer are all still there. A prebuild
240
247
  script that reads the kit's stylesheet out of `node_modules` and strips the
241
248
  forbidden blocks itself breaks on any restructure of a file you don't own.
242
- Depend on `@lessly/ui` at `^4.0.0`, the range the shell runs.
249
+ Depend on `@lepsto/ui` at `^9.0.0`, the range the shell runs.
243
250
 
244
251
  **`layer(remote-utilities)` only after the shell declares the order.** The
245
252
  shell already ships `@layer theme, base, components, remote-utilities,
246
- utilities;` (`lessly-workspace:apps/web/src/index.css`). Adopt the layer
253
+ utilities;` (`lepsto-workspace:apps/web/src/index.css`). Adopt the layer
247
254
  against a shell that hasn't, and `remote-utilities` becomes the last-declared —
248
255
  and therefore highest-priority — layer, so every one of your utilities beats
249
256
  every shell utility. Verify the shell first; adopting early is a regression,
@@ -11,29 +11,29 @@ pnpm dev
11
11
  ```
12
12
 
13
13
  This starts the app on its own, outside any shell, proxied through
14
- `@lessly/app-dev`'s local dev server. Platform API calls made through your
14
+ `@lepsto/app-dev`'s local dev server. Platform API calls made through your
15
15
  `sdk` (created with `createLesslyApp`, see `recipes/sdk-usage.md`) are
16
16
  forwarded through a bearer proxy at exactly this path:
17
17
 
18
18
  ```
19
- /lessly-api
19
+ /lepsto-api
20
20
  ```
21
21
 
22
- `@lessly/app-dev` attaches your locally stored bearer token to everything it
23
- proxies through `/lessly-api`, so your SDK client just talks to that path in
22
+ `@lepsto/app-dev` attaches your locally stored bearer token to everything it
23
+ proxies through `/lepsto-api`, so your SDK client just talks to that path in
24
24
  dev — it never sees or handles the token itself.
25
25
 
26
- So in dev you pass `baseUrl: '/lessly-api'` — a page-relative `baseUrl` is
26
+ So in dev you pass `baseUrl: '/lepsto-api'` — a page-relative `baseUrl` is
27
27
  supported and resolved against the current document (browser-only); see
28
28
  `recipes/sdk-usage.md`.
29
29
 
30
30
  ### Device-code login
31
31
 
32
32
  The first time you run `pnpm dev` (or once your local session expires),
33
- `@lessly/app-dev` walks you through a device-code login: it prints a
33
+ `@lepsto/app-dev` walks you through a device-code login: it prints a
34
34
  verification URL and a short code, opens your browser, and polls until you
35
35
  approve. Once approved, it stores the resulting bearer token locally and the
36
- `/lessly-api` proxy starts attaching it automatically. You don't write any of
36
+ `/lepsto-api` proxy starts attaching it automatically. You don't write any of
37
37
  this — it's ambient, per APP-005: an App MUST NOT implement its own login,
38
38
  token handling, or refresh.
39
39
 
@@ -97,15 +97,15 @@ go back to the deployed remote.
97
97
 
98
98
  ## Keeping your local setup current
99
99
 
100
- Update the SDK and `@lessly/app-dev` with the `@latest` form, never `npm
100
+ Update the SDK and `@lepsto/app-dev` with the `@latest` form, never `npm
101
101
  update`:
102
102
 
103
103
  ```sh
104
104
  npm i @lepsto/sdk-app@latest
105
- npm i @lessly/app-dev@latest
105
+ npm i @lepsto/app-dev@latest
106
106
  ```
107
107
 
108
- `@lepsto/sdk-app` and `@lessly/app-dev` are pre-1.0 and pinned with caret
109
- ranges, so `npm update` never crosses a minor version and since the SDK
110
- bumps its minor version whenever the platform ships a new tool, `npm update`
111
- would never actually deliver those updates (see APP-007).
108
+ Both are pinned with caret ranges, and a caret range stops `npm update` at the
109
+ next major or, for a pre-1.0 package like `@lepsto/app-dev`, at the next
110
+ minor. The SDK cuts majors routinely as the platform catalog changes, so
111
+ `npm update` would never actually deliver those updates (see APP-007).
@@ -1,6 +1,6 @@
1
1
  # Recipe: calling the platform API
2
2
 
3
- How to reach Lessly platform data from an App. The normative rule is APP-001
3
+ How to reach Lepsto platform data from an App. The normative rule is APP-001
4
4
  (all platform data access goes through `@lepsto/sdk-app`) and APP-006 (prefer
5
5
  the generated option factories) — this page shows the *how*.
6
6
 
@@ -13,10 +13,10 @@ Proxy namespace tree:
13
13
  import { createLesslyApp } from '@lepsto/sdk-app';
14
14
 
15
15
  const sdk = createLesslyApp({
16
- baseUrl: 'https://api.lessly.dev',
16
+ baseUrl: 'https://api.lepsto.dev',
17
17
  productId: 'prod_123',
18
- // getCsrfToken defaults to reading the `lepsto_csrf` cookie (falling back to
19
- // the legacy `lessly_csrf`); override for SSR/tests.
18
+ // getCsrfToken defaults to reading the `lepsto_csrf` cookie, then
19
+ // `lessly_csrf`; override for SSR/tests.
20
20
  });
21
21
 
22
22
  const connectors = await sdk.organization.connectors.list({ productId: 'prod_123' });
@@ -31,18 +31,18 @@ await sdk.organization.product.create({ name: 'Acme' });
31
31
 
32
32
  `baseUrl` may be either form:
33
33
 
34
- - **Absolute** — `'https://api.lessly.dev'`. Works anywhere, including SSR and
34
+ - **Absolute** — `'https://api.lepsto.dev'`. Works anywhere, including SSR and
35
35
  tests.
36
- - **Page-relative** — `'/lessly-api'`, the path `pnpm dev` proxies through
36
+ - **Page-relative** — `'/lepsto-api'`, the path `pnpm dev` proxies through
37
37
  (see `recipes/local-dev.md`). It is resolved against the current document via
38
38
  `globalThis.location`, so it is **browser-only**: outside a browser the SDK
39
- throws a named error (`@lepsto/sdk-app: relative baseUrl "/lessly-api" cannot
39
+ throws a named error (`@lepsto/sdk-app: relative baseUrl "/lepsto-api" cannot
40
40
  be resolved outside a browser`) instead of an opaque `Invalid URL`. Tests and
41
41
  SSR must pass an absolute base.
42
42
 
43
43
  ```ts
44
44
  const sdk = createLesslyApp({
45
- baseUrl: import.meta.env.DEV ? '/lessly-api' : 'https://api.lessly.dev',
45
+ baseUrl: import.meta.env.DEV ? '/lepsto-api' : 'https://api.lepsto.dev',
46
46
  productId: 'prod_123',
47
47
  });
48
48
  ```
@@ -74,7 +74,7 @@ try {
74
74
  ### Missing CSRF cookie
75
75
 
76
76
  Mutating calls (`POST`, `PUT`, `PATCH`, `DELETE`) require the `lepsto_csrf`
77
- cookie, or the legacy `lessly_csrf` one as a fallback. If both are absent, the SDK throws before any network call:
77
+ cookie, or `lessly_csrf` as a fallback. If both are absent, the SDK throws before any network call:
78
78
  `LesslyApiError` with `status: 0` and `code: 'csrf_cookie_missing'`. There is no
79
79
  retry and no hidden token refresh — re-establish the session, or supply
80
80
  `getCsrfToken` for SSR/tests. Read-only calls are unaffected.
@@ -130,7 +130,7 @@ generated from the live catalog; check `client.gen.ts` (or your editor's
130
130
  autocomplete) for which shape a given operation takes.
131
131
 
132
132
  The available namespaces track the live catalog and **grow as platform
133
- extensions migrate to `@lessly-platform/tools`** — a namespace appears here only once its
133
+ extensions migrate to `@lepsto-platform/tools`** — a namespace appears here only once its
134
134
  tools carry a REST binding. Run `npm i @lepsto/sdk-app@latest` to pick up newly
135
135
  migrated namespaces. To see exactly what a given version exposes, check its
136
136
  subpaths in `package.json` `exports`, or the `manifest.gen.ts` namespace list.
@@ -147,7 +147,7 @@ the socket, and hands back a small handle:
147
147
  import { createLesslyApp } from '@lepsto/sdk-app';
148
148
  import { playgroundWsEchoConnect } from '@lepsto/sdk-app/playground';
149
149
 
150
- const sdk = createLesslyApp({ baseUrl: 'https://api.lessly.dev', productId: 'prod_123' });
150
+ const sdk = createLesslyApp({ baseUrl: 'https://api.lepsto.dev', productId: 'prod_123' });
151
151
 
152
152
  const stream = playgroundWsEchoConnect(sdk, { room: 'lobby' });
153
153
  const off = stream.onMessage((frame) => console.log(frame));
package/docs/rules.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # App Rules
2
2
 
3
- Normative rules for building a Lessly App on `@lepsto/sdk-app`. Read this
3
+ Normative rules for building a Lepsto App on `@lepsto/sdk-app`. Read this
4
4
  before writing code; see `README.md` for the map of the rest of the guide.
5
5
 
6
6
  Severity (RFC 2119): **MUST** blocks merge, **SHOULD** is a strong
@@ -17,7 +17,7 @@ rationale, and examples.
17
17
 
18
18
  ### APP-001 (MUST) — All platform data access goes through `@lepsto/sdk-app`
19
19
 
20
- Every read or write to a Lessly platform API MUST go through a
20
+ Every read or write to a Lepsto platform API MUST go through a
21
21
  `@lepsto/sdk-app` client created with `createLesslyApp`, or through the
22
22
  generated `*QueryOptions`/`*MutationOptions` factories built on top of it. An
23
23
  App MUST NOT `fetch` a platform host directly, and MUST NOT use any other HTTP
@@ -43,9 +43,9 @@ of its logic runs in the browser, built on `@lepsto/sdk-app` and the Module
43
43
  Federation contract below. If a feature needs server-side state or a
44
44
  service-to-service call, it belongs in an extension, not an App.
45
45
 
46
- ### APP-003 (MUST) — Manifest is `lessly.app.yaml`, schema v1
46
+ ### APP-003 (MUST) — Manifest is `lepsto.app.yaml`, schema v1
47
47
 
48
- The manifest file is `lessly.app.yaml`, and its top-level surface is exactly:
48
+ The manifest file is `lepsto.app.yaml`, and its top-level surface is exactly:
49
49
  `app_schema_version: 1`, `id`, `title`, `version`, `nav`. No other top-level
50
50
  field is valid — in particular, no extension/backend manifest field (`s2s`,
51
51
  `webhooks`, `billing`, `analytics`, `routing`, `public`, ...) belongs in an App
@@ -61,7 +61,7 @@ being stripped.
61
61
 
62
62
  An App exposes `./App` as its Module Federation remote entry, implementing
63
63
  the shell's remote contract (FED-001). The Module Federation `name` MUST equal
64
- the manifest `id` (FED-004). React, React DOM, React Router, and `@lessly/ui`
64
+ the manifest `id` (FED-004). React, React DOM, React Router, and `@lepsto/ui`
65
65
  MUST be declared as shared singletons, never bundled (FED-005), using
66
66
  `@module-federation/vite` pinned at exactly `1.16.12` (FED-006). The asset
67
67
  base in federation mode is the absolute path `/~/<id>/`. The build MUST
@@ -71,7 +71,7 @@ artifacts (FED-007).
71
71
  `./App` is the **only** module an App exposes. There is no `./navigation`
72
72
  contract: the shell no longer loads such a module, there is no
73
73
  `subscribeNavItems` and no `navContractVersion` negotiation, and the menu the
74
- shell renders comes from **your own** `lessly.app.yaml` — the `nav.sections`
74
+ shell renders comes from **your own** `lepsto.app.yaml` — the `nav.sections`
75
75
  block (APP-011) — not from your App code, and not from a toolkit manifest.
76
76
  FED-011 is **RETIRED (2026-08)**. Still mapping the expose is inert rather than
77
77
  an error — it just ships a chunk nobody fetches — but a new App MUST NOT add
@@ -115,10 +115,12 @@ current with:
115
115
  npm i @lepsto/sdk-app@latest
116
116
  ```
117
117
 
118
- Use this exact `@latest` form — not `npm update`. `@lepsto/sdk-app` is
119
- pre-1.0 and pinned with a caret range, so `npm update` never crosses a minor
120
- version; since this SDK also bumps its minor version whenever the platform
121
- ships a new tool, `npm update` would never actually deliver those updates.
118
+ Use this exact `@latest` form — not `npm update`. A caret range never lets
119
+ `npm update` cross a major version, and this SDK cuts majors routinely: the
120
+ publish pipeline classifies a removed field, a narrowed enum or a newly
121
+ required input as a major, and the platform catalog produces those regularly.
122
+ So `npm update` would leave you behind on the SDK no matter which version you
123
+ are pinned at.
122
124
 
123
125
  ### APP-008 (MUST) — The federation CSS entry is slim and global-free
124
126
 
@@ -134,14 +136,14 @@ NOT contain:
134
136
  `font-size`, `line-height`, `color`, `background`, `margin`, `padding`,
135
137
  `border-*`, `box-sizing`, `-webkit-text-size-adjust` — on `html`, `body`,
136
138
  `:root` or `*`;
137
- - an `@import` of a web font, of `@lessly/ui/styles.css`, or of the full
139
+ - an `@import` of a web font, of `@lepsto/ui/styles.css`, or of the full
138
140
  `tailwindcss` entry (which bundles **preflight**).
139
141
 
140
142
  The prohibition holds wherever the rule comes from, `@apply` included:
141
143
  `body { @apply bg-bg-primary … }` in the App's own base layer is exactly as
142
144
  forbidden as an imported reset. The App's base layer belongs in a separate
143
145
  `src/base.css` that only the **standalone** entry imports. The standalone entry
144
- is unconstrained by this rule: it keeps the fonts, `@lessly/ui/styles.css`, the
146
+ is unconstrained by this rule: it keeps the fonts, `@lepsto/ui/styles.css`, the
145
147
  full `tailwindcss` import and the base layer, because there the App owns the
146
148
  page.
147
149
 
@@ -150,25 +152,25 @@ page.
150
152
  App's own subtree reads them. Inherited and visual properties are what is
151
153
  forbidden, because the App is composed inside the shell's already-painted page
152
154
  and a `body` or `*` rule addresses the whole live document, shell chrome
153
- included. This line is load-bearing: `@lessly/ui/styles-federated.css`
155
+ included. This line is load-bearing: `@lepsto/ui/styles-federated.css`
154
156
  legitimately ships a `*, ::before, ::after, ::backdrop { --tw-*: … }` block
155
157
  (Tailwind v4's internal variable shim), and a guard written against selectors
156
158
  instead of declarations fails on the very import this rule prescribes.
157
159
 
158
160
  **Kit tokens.** An App that needs the design-system variables MUST import
159
- `@lessly/ui/styles-federated.css` — `styles.css` minus the `@font-face` blocks
161
+ `@lepsto/ui/styles-federated.css` — `styles.css` minus the `@font-face` blocks
160
162
  and the `@layer base`, keeping the token variables, the `--color-*` aliases,
161
163
  `.link`, the `.motion-*` helpers and the compiled tw-animate-css layer. Depend
162
- on `@lessly/ui` at `^4.0.0`, the range the shell itself runs. An App MUST NOT
164
+ on `@lepsto/ui` at `^9.0.0`, the range the shell itself runs. An App MUST NOT
163
165
  hand-copy the kit's tokens into a local `theme.css` (it silently drifts from
164
- the kit), and MUST NOT hand-filter `@lessly/ui/styles.css` with a prebuild
166
+ the kit), and MUST NOT hand-filter `@lepsto/ui/styles.css` with a prebuild
165
167
  script (it breaks on any restructure of a file the App does not own).
166
168
 
167
169
  **Scanning.** Tailwind generates only the classes it finds, and it scans the
168
170
  project, not `node_modules`. The federation entry MUST therefore
169
171
  `@source` the kit's compiled output
170
- (`@source '../node_modules/@lessly/ui/dist/index.js';`) or the classes
171
- `@lessly/ui` components use are never emitted — and it SHOULD exclude test
172
+ (`@source '../node_modules/@lepsto/ui/dist/index.js';`) or the classes
173
+ `@lepsto/ui` components use are never emitted — and it SHOULD exclude test
172
174
  files (`@source not '../src/**/*.test.tsx';`), since a utility class named as a
173
175
  test fixture is just a string to Tailwind and would otherwise be compiled into
174
176
  the shipped stylesheet.
@@ -185,13 +187,13 @@ For the production defect this comes from — a remote's late-loading `body`
185
187
  rule re-fonting the shell's chrome — see FED-008 in the toolkit-guide.
186
188
  `recipes/federation.md` has the canonical stylesheets.
187
189
 
188
- ### APP-009 (MUST) — One source of scale vocabulary: `lesslyPreset`
190
+ ### APP-009 (MUST) — One source of scale vocabulary: `lepstoPreset`
189
191
 
190
192
  An App takes its **scale vocabulary** — type, spacing, radii, font weight,
191
193
  line height, letter spacing — from the design-system preset the shell is built
192
- on: `lesslyPreset`, exported by `@lessly/ui/tailwind-preset`. Concretely:
194
+ on: `lepstoPreset`, exported by `@lepsto/ui/tailwind-preset`. Concretely:
193
195
 
194
- - `tailwind.config.ts` sets `presets: [lesslyPreset]`;
196
+ - `tailwind.config.ts` sets `presets: [lepstoPreset]`;
195
197
  - **both** CSS entries carry `@config '../tailwind.config.ts'`;
196
198
  - the App declares no scales of its own and keeps no `@theme` block bridging
197
199
  to them;
@@ -231,7 +233,7 @@ full `tailwindcss` import (APP-008), where the App owns the page and there is
231
233
  nothing to rank against.
232
234
 
233
235
  This works because the shell pre-declares the layer order in
234
- `lessly-workspace:apps/web/src/index.css`:
236
+ `lepsto-workspace:apps/web/src/index.css`:
235
237
 
236
238
  ```css
237
239
  @layer theme, base, components, remote-utilities, utilities;
@@ -257,7 +259,7 @@ the App's own nodes.
257
259
  ### APP-011 (SHOULD) — Declare the rail menu in your own manifest
258
260
 
259
261
  The rail menu the shell draws while your App is open comes from your App's own
260
- `lessly.app.yaml`, in an optional `nav.sections` block. An App with more than
262
+ `lepsto.app.yaml`, in an optional `nav.sections` block. An App with more than
261
263
  one page SHOULD declare it; without it the shell has nothing of yours to draw
262
264
  (see *No block* below).
263
265
 
@@ -326,7 +328,7 @@ table rather than drawing a partial disclosure.
326
328
  so adding, editing and removing sections all land without a `version` bump.
327
329
  Bumping `version` on release remains APP-007.
328
330
 
329
- **The scaffold's linter does not check this block.** `create-lessly-app lint`
331
+ **The scaffold's linter does not check this block.** `create-lepsto-app lint`
330
332
  validates the top-level surface and `nav.icon` only; it neither rejects nor
331
333
  warns on `nav.sections`, and it will not catch a malformed one. The platform's
332
334
  registration validation is the authority — a menu that lints clean locally can
@@ -499,7 +501,7 @@ Pass the generated method rather than a hand-written tool id
499
501
  (`app.access.can(app.mail.domain.create)`): the accessor path is a lossy view
500
502
  of the tool id, so a literal string can silently drift from the call it gates.
501
503
 
502
- One gap is known and accepted: `@lessly/ui`'s `ConfirmDialog` takes an `onError`
504
+ One gap is known and accepted: `@lepsto/ui`'s `ConfirmDialog` takes an `onError`
503
505
  that returns a string, so the kit picks the tone and a refusal raised inside the
504
506
  dialog cannot be painted neutrally yet. An App SHOULD still route that error
505
507
  through `isAccessDenied()` for the *words*, and MUST NOT reimplement the confirm
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lepsto/sdk-app",
3
3
  "description": "The Lepsto SDK for App is a TypeScript SDK that provides runtime bindings and type-safe generated code for interacting with Lepsto Platform APIs and services. This package generates type definitions and client bindings from API catalogs, enabling developers to build applications that consume Lepsto platform services with full type safety and autocompletion.",
4
- "version": "89.6.0",
4
+ "version": "89.7.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/lepsto/lepsto-sdk-app.git"