@elevasis/sdk 1.42.0 → 1.43.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elevasis/sdk",
3
- "version": "1.42.0",
3
+ "version": "1.43.0",
4
4
  "description": "SDK for building Elevasis organization resources",
5
5
  "type": "module",
6
6
  "bin": {
@@ -58,9 +58,9 @@
58
58
  "tsup": "^8.0.0",
59
59
  "typescript": "5.9.2",
60
60
  "zod": "^4.1.0",
61
- "@repo/core": "0.57.0",
62
- "@repo/eslint-config": "0.0.0",
63
- "@repo/typescript-config": "0.0.0"
61
+ "@repo/core": "0.58.0",
62
+ "@repo/typescript-config": "0.0.0",
63
+ "@repo/eslint-config": "0.0.0"
64
64
  },
65
65
  "scripts": {
66
66
  "lint": "eslint src --max-warnings 0",
@@ -0,0 +1,114 @@
1
+ # Your login route is now a stub, and pre-provisioned members become visible
2
+
3
+ ## Why this note exists
4
+
5
+ Two independent defects in this train, plus one change to what your `package.json` is required to
6
+ provide. All three reach you through the `@elevasis/ui` and `@elevasis/core` baseline bump.
7
+
8
+ **1. The login route's authentication logic moved into the package.** It used to exist five times —
9
+ once in Command Center and once in each of the four template-family projects — and all four tenant
10
+ copies were byte-identical, same 5,729 bytes, same hash. That duplication had a real cost: an
11
+ invited user who did not yet have an account was sent to the **sign-in** screen instead of the
12
+ **sign-up** screen and could never complete registration, and fixing it meant editing the same line
13
+ in five files. Any project that missed the propagation stayed broken silently.
14
+
15
+ `login.tsx` is now a thin route stub. It registers the path and passes your branding; everything
16
+ else — the invitation-token branch, the sign-up versus sign-in decision, the WorkOS `context`
17
+ branch, `returnTo` handling, and the authenticated-user redirect — lives in `LoginScreen`, exported
18
+ from `@elevasis/ui/features/auth` alongside `validateLoginSearch`.
19
+
20
+ The fix itself already reached you in a previous cycle. This train removes the duplication that
21
+ caused it, verified in a browser before shipping: an invitation token now lands on the WorkOS
22
+ `/invite` accept-invitation screen rather than the sign-in screen.
23
+
24
+ **The standing consequence, stated plainly: every future login change is now a package release.**
25
+ Auth-entry bugs are exactly the class you most want to hotfix quickly, and you can no longer do that
26
+ by editing your own file. The trade was made deliberately — five-way silent divergence was judged
27
+ the worse risk, since your updates already gate on sync regardless.
28
+
29
+ **2. Members who were invited but have not yet signed up were invisible on your settings page.**
30
+ The members list read WorkOS as the primary source, so a member who exists in the platform database
31
+ but has no WorkOS identity yet did not appear at all — your member count was wrong, not just your
32
+ detail view. `MembershipService.listMemberships` now reads the platform database as the primary set
33
+ and enriches from WorkOS where a link exists, and `MembershipWithDetails` gains an optional
34
+ `provisioningState` of `'linked' | 'pre_provisioned' | 'workos_only'`.
35
+
36
+ Correct counts reached you the moment the API deployed — that half was additive and server-side.
37
+ The published `OrgMembersList` renders the new distinction, so the column only appears after this
38
+ baseline bump.
39
+
40
+ **3. `@elevasis/ui` now declares two peer dependencies it previously required but did not name:**
41
+ `@workos-inc/authkit-react` and `@supabase/supabase-js`. This is a published-contract change, not a
42
+ new requirement — the package always needed both at runtime. `@supabase/supabase-js` in particular
43
+ had been shipping undeclared for a long time: it is reachable from roughly twenty published entry
44
+ points through a shared bundle chunk, including entry points whose own subpath never mentions
45
+ Supabase.
46
+
47
+ You almost certainly already have both installed, since the template has depended on them directly
48
+ for as long as it has had auth. Practical risk is low. What changes is that a project missing either
49
+ one now gets an honest peer warning at install time instead of a runtime failure with no
50
+ explanation.
51
+
52
+ ## Applies to
53
+
54
+ - **Every template-family project.** All four `login.tsx` copies are affected and all four are
55
+ currently identical, so this propagates cleanly unless you have edited yours.
56
+ - **Any project whose settings page renders `OrgMembersList`** — that is the published component,
57
+ not a local copy, so the new column arrives with the baseline bump.
58
+ - **Any project that invites members.** The invisible-member defect affected your own settings page,
59
+ not only platform admin.
60
+ - **Not applicable to your agents or operations bundle.** Nothing here touches the worker runtime,
61
+ and no redeploy of `operations/` is required.
62
+
63
+ ## Required actions
64
+
65
+ 1. **Take the `@elevasis/ui` and `@elevasis/core` baseline bump** this train propagates, then
66
+ reinstall in `ui/`.
67
+
68
+ 2. **Clear the Vite cache and restart your dev server.** This is not optional hygiene — a stale
69
+ `.vite` cache serves the _old_ bundle while every gate reports green, which is the specific way
70
+ this failure hides:
71
+
72
+ ```bash
73
+ rm -rf ui/node_modules/.vite
74
+ pnpm -C ui dev
75
+ ```
76
+
77
+ 3. **If you customized `login.tsx`, merge rather than accept.** The sync engine preserves a diverged
78
+ copy instead of overwriting it, which means a customized login route will silently keep its own
79
+ duplicated auth logic and miss future fixes. Port your customization onto the stub shape: the
80
+ branding values are props, and `appConfig={{ workosOrganizationId: __ELEVASIS_WORKOS_ORG_ID__ }}`
81
+ carries the org binding.
82
+
83
+ 4. **You may now drop the local `signUp` override in `ui/src/routes/__tests__/auth-routes.test.tsx`.**
84
+ The shared `mockUseAuth` in `@elevasis/ui/test-utils` gained `signUp`, so the local layer is
85
+ redundant. Leaving it in place is harmless — it just shadows an identical value.
86
+
87
+ ## Verification
88
+
89
+ - **Sign in normally.** This is the check that matters most, because the login route is the only
90
+ entry point to your application and it was rewritten. Confirm the logo and the Sign In button
91
+ render for a signed-out visitor, and that signing in lands you where you expect.
92
+ - **Visit `/login` while already signed in.** You should be redirected to `/`, and `/login?returnTo=/some-path`
93
+ should redirect to that path.
94
+ - **Open your settings members page** and confirm invited-but-not-yet-registered members appear.
95
+ Compare the count against the invitations you have actually sent — a member who has not signed up
96
+ yet should now be listed rather than missing.
97
+ - **Read the installed bundle, not the version number.** A bumped pin and a green sync report are
98
+ claims about intent; the installed file is the only ground truth:
99
+
100
+ ```bash
101
+ grep -rl "LoginScreen" ui/node_modules/@elevasis/ui/dist/features/auth/
102
+ ```
103
+
104
+ No match means the install did not actually land, regardless of what `package.json` says.
105
+
106
+ ## Not handled by /git-sync
107
+
108
+ - **The Vite cache clear and dev-server restart.** `/git-sync` propagates and commits the dependency
109
+ baseline. Your running dev server keeps serving the previously cached bundle until you do step 2
110
+ yourself, and it will look like the sync did nothing.
111
+ - **Merging a customized `login.tsx`.** If your copy has diverged, the engine deliberately preserves
112
+ it and does not merge for you. That file will keep its old duplicated auth logic until you port it
113
+ by hand.
114
+ - **Removing the redundant `signUp` test override.** Cosmetic, and left to you.
@@ -130,12 +130,11 @@ Call any supported LLM from your workflow with no API keys required. Keys are re
130
130
 
131
131
  **Supported models:**
132
132
 
133
- | Provider | Models |
134
- | ------------ | --------------------------------------------------------- |
135
- | `google` | `gemini-3-flash-preview`, `gemini-3.1-flash-lite-preview` |
136
- | `openai` | `gpt-5`, `gpt-5.4-mini`, `gpt-5.4-nano` |
137
- | `anthropic` | `claude-sonnet-5` |
138
- | `openrouter` | `openrouter/z-ai/glm-5` |
133
+ | Provider | Models |
134
+ | ------------ | --------------------------------------- |
135
+ | `openai` | `gpt-5`, `gpt-5.4-mini`, `gpt-5.4-nano` |
136
+ | `anthropic` | `claude-sonnet-5` |
137
+ | `openrouter` | `openrouter/z-ai/glm-5` |
139
138
 
140
139
  **Key params:** `provider`, `model`, `messages` (`{ role, content }[]`), `responseSchema` (optional JSON Schema), `temperature` (optional).
141
140