@mindstudio-ai/remy 0.1.243 → 0.1.244
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/headless.js
CHANGED
|
@@ -557,24 +557,31 @@ function getOrgContext() {
|
|
|
557
557
|
function renderOrgContextBlock() {
|
|
558
558
|
const ctx = cached;
|
|
559
559
|
const auth = ctx?.auth;
|
|
560
|
-
|
|
560
|
+
const hasAuth = !!auth && (auth.delegatedAvailable || !!auth.requireDelegatedOnly);
|
|
561
|
+
const hasDesignSystem = !!ctx?.designSystem;
|
|
562
|
+
if (!hasAuth && !hasDesignSystem) {
|
|
561
563
|
return "";
|
|
562
564
|
}
|
|
563
|
-
const lines = ["<
|
|
565
|
+
const lines = ["<org_context>"];
|
|
564
566
|
if (ctx?.org?.name && ctx?.org?.name !== "Personal Workspace") {
|
|
565
567
|
lines.push(`This app is owned by the organization "${ctx.org.name}".`);
|
|
566
568
|
}
|
|
567
|
-
if (auth
|
|
569
|
+
if (auth?.delegatedAvailable) {
|
|
568
570
|
lines.push(
|
|
569
571
|
'"Sign in with Remy" (platform-delegated sign-in) is an available auth type for this app: organization members can sign in without a verification code.'
|
|
570
572
|
);
|
|
571
573
|
}
|
|
572
|
-
if (auth
|
|
574
|
+
if (auth?.requireDelegatedOnly) {
|
|
573
575
|
lines.push(
|
|
574
576
|
"This organization requires delegated sign-in: non-delegated human auth methods (email-code, sms-code) are blocked at the platform edge for its apps."
|
|
575
577
|
);
|
|
576
578
|
}
|
|
577
|
-
|
|
579
|
+
if (hasDesignSystem) {
|
|
580
|
+
lines.push(
|
|
581
|
+
"This organization maintains shared brand/design foundations. The design expert has access to these and applies them automatically. You don't need to gather foundational visual style or branding requirements from the user."
|
|
582
|
+
);
|
|
583
|
+
}
|
|
584
|
+
lines.push("</org_context>");
|
|
578
585
|
return lines.join("\n");
|
|
579
586
|
}
|
|
580
587
|
|
package/dist/index.js
CHANGED
|
@@ -5718,24 +5718,31 @@ function getOrgContext() {
|
|
|
5718
5718
|
function renderOrgContextBlock() {
|
|
5719
5719
|
const ctx = cached;
|
|
5720
5720
|
const auth = ctx?.auth;
|
|
5721
|
-
|
|
5721
|
+
const hasAuth = !!auth && (auth.delegatedAvailable || !!auth.requireDelegatedOnly);
|
|
5722
|
+
const hasDesignSystem = !!ctx?.designSystem;
|
|
5723
|
+
if (!hasAuth && !hasDesignSystem) {
|
|
5722
5724
|
return "";
|
|
5723
5725
|
}
|
|
5724
|
-
const lines = ["<
|
|
5726
|
+
const lines = ["<org_context>"];
|
|
5725
5727
|
if (ctx?.org?.name && ctx?.org?.name !== "Personal Workspace") {
|
|
5726
5728
|
lines.push(`This app is owned by the organization "${ctx.org.name}".`);
|
|
5727
5729
|
}
|
|
5728
|
-
if (auth
|
|
5730
|
+
if (auth?.delegatedAvailable) {
|
|
5729
5731
|
lines.push(
|
|
5730
5732
|
'"Sign in with Remy" (platform-delegated sign-in) is an available auth type for this app: organization members can sign in without a verification code.'
|
|
5731
5733
|
);
|
|
5732
5734
|
}
|
|
5733
|
-
if (auth
|
|
5735
|
+
if (auth?.requireDelegatedOnly) {
|
|
5734
5736
|
lines.push(
|
|
5735
5737
|
"This organization requires delegated sign-in: non-delegated human auth methods (email-code, sms-code) are blocked at the platform edge for its apps."
|
|
5736
5738
|
);
|
|
5737
5739
|
}
|
|
5738
|
-
|
|
5740
|
+
if (hasDesignSystem) {
|
|
5741
|
+
lines.push(
|
|
5742
|
+
"This organization maintains shared brand/design foundations. The design expert has access to these and applies them automatically. You don't need to gather foundational visual style or branding requirements from the user."
|
|
5743
|
+
);
|
|
5744
|
+
}
|
|
5745
|
+
lines.push("</org_context>");
|
|
5739
5746
|
return lines.join("\n");
|
|
5740
5747
|
}
|
|
5741
5748
|
var log9, cached;
|
|
@@ -34,7 +34,7 @@ Remy apps can have and manage their own users. Auth is opt-in: configure it in t
|
|
|
34
34
|
- `email-code` — 6-digit code sent via email
|
|
35
35
|
- `sms-code` — 6-digit code sent via SMS
|
|
36
36
|
- `api-key` — programmatic access via `Authorization: Bearer sk_...` header. Resolves to a user with full RBAC.
|
|
37
|
-
- `remy` — platform-delegated sign-in ("Sign in with Remy"). The platform resolves who the user is; roles and verification are platform-managed. Only usable when the app's owning organization has it enabled — the `<
|
|
37
|
+
- `remy` — platform-delegated sign-in ("Sign in with Remy"). The platform resolves who the user is; roles and verification are platform-managed. Only usable when the app's owning organization has it enabled — the `<org_context>` block signals availability. See *Organization-Managed Sign-In* above.
|
|
38
38
|
- **`auth.table.name`** — name of the `defineTable` table that holds user records.
|
|
39
39
|
- **`auth.table.columns`** — maps platform-managed fields to column names in the developer's table.
|
|
40
40
|
- `email` — required if `email-code` is in methods
|
|
@@ -135,12 +135,12 @@ const user = await auth.verifySmsCode(verificationId, '123456');
|
|
|
135
135
|
|
|
136
136
|
## Organization-Managed Sign-In ("Sign in with Remy")
|
|
137
137
|
|
|
138
|
-
Some apps are owned by an organization that centralizes sign-in. When that applies to the current app, the system prompt includes an `<
|
|
138
|
+
Some apps are owned by an organization that centralizes sign-in. When that applies to the current app, the system prompt includes an `<org_context>` block (near the end); for org-managed sign-in it states the organization name and whether delegated sign-in is available. Sign in with Remy is a way to make authentication seamless for internal apps - it should not be used for public-facing applications. The app owner will need to add users to their workspace's team on the Remy platform and those users will need Remy accounts for it to work.
|
|
139
139
|
|
|
140
140
|
- **When it says "Sign in with Remy" is available** — offer delegated sign-in: a **"Continue with {Org}"** button wired to the `remy` method (see *Sign in with Remy (delegated)* below). Use the exact organization name from the block for the label. For an org-owned app this is usually the primary sign-in — the members already have platform identities, so a verification-code form is redundant.
|
|
141
141
|
- **When it says the organization requires delegated sign-in** — `remy` is the *only* human method: do not add `email-code` or `sms-code`. Those are blocked at the platform edge for the org's apps, so building them yields a login that can't work.
|
|
142
142
|
|
|
143
|
-
When
|
|
143
|
+
When the `<org_context>` block is absent, or present without a delegated-sign-in line — the common case — do not build it or offer to build it. This is an auth scheme for enterprises building internal apps only, and it requires a Remy enterprise plan to use. When enabled, the platform decides who the user is (like "Sign in with Google"); the app just starts the flow and reads the result.
|
|
144
144
|
|
|
145
145
|
```typescript
|
|
146
146
|
// "Continue with {Org}" button — must be triggered by a user gesture (click).
|
|
@@ -399,7 +399,7 @@ Consult the `visualDesignExpert` to help you work through authentication at a hi
|
|
|
399
399
|
### Rules for Building Auth Screens
|
|
400
400
|
**Auth modes:** Think about which mode(s) makes the most sense for the type of app you are building. Consumer apps likely to be used on mobile should probably tend toward SMS auth as the default - business apps used on desktop make more sense to use email verification - or allow both, there's no harm in giving the user choice!
|
|
401
401
|
|
|
402
|
-
**"Continue with {Org}" (delegated):** When `<
|
|
402
|
+
**"Continue with {Org}" (delegated):** When the `<org_context>` block says delegated sign-in is available, a single "Continue with {Org}" button is the primary path — often the *only* one — and there's no verification-code step to design at all (the platform handles it). Give the button real weight in the branded login moment rather than treating it as a secondary option, and use the exact organization name. If the org also allows code methods, delegated goes first with the code form beneath. On return from the handshake (and on dashboard launch), render a brief "Completing sign-in…" state driven by `auth.authStatus === 'authenticating'` — never the login form — so a successful sign-in doesn't flash the logged-out screen.
|
|
403
403
|
|
|
404
404
|
**Verification code input:** The 6-digit code entry is the critical moment. Prefer to design it as individual digit boxes (not a single text input), with auto-advance between digits, a beautiful animation and auto-submit on paste, and clear visual feedback. The boxes should be large enough to tap easily on mobile. Show a subtle animation on successful verification. Error states should be inline and immediate, not a separate alert. Make sure there is no layout shift when loading in the success/error states - loading spinners must never pop in below the input and shift the content, for example.
|
|
405
405
|
|
|
@@ -20,7 +20,7 @@ Login and signup screens set the tone for the user's entire experience with the
|
|
|
20
20
|
|
|
21
21
|
Authentication moments must feel natural and intuitive - they should not feel jarring or surprising. Take care to integrate them into the entire experience when building. Remy apps support SMS code verification, email verification, delegated "Sign in with Remy", or a combination, depending on how the app is configured.
|
|
22
22
|
|
|
23
|
-
**"Continue with {Org}" (delegated sign-in):** Some apps are internal business tools that are owned by an organization and sign members in through the platform — a single "Continue with {Org}" button, no verification-code step at all. For these apps this button is often the primary (sometimes only) path, so give it real presence in the branded login moment rather than tucking it away, and label it with the organization's actual name. If the app also offers code methods, lead with the delegated button and place the code form beneath. This scheme should ONLY be used for internal apps AND when it is explicitly enabled in <
|
|
23
|
+
**"Continue with {Org}" (delegated sign-in):** Some apps are internal business tools that are owned by an organization and sign members in through the platform — a single "Continue with {Org}" button, no verification-code step at all. For these apps this button is often the primary (sometimes only) path, so give it real presence in the branded login moment rather than tucking it away, and label it with the organization's actual name. If the app also offers code methods, lead with the delegated button and place the code form beneath. This scheme should ONLY be used for internal apps AND when it is explicitly enabled in <org_context> - it should not be used for public-facing apps.
|
|
24
24
|
|
|
25
25
|
**Verification code input:** The 6-digit code entry is the critical moment. Prefer to design it as individual digit boxes (not a single text input), with auto-advance between digits, auto-submit on paste, and clear visual feedback. The boxes should be large enough to tap easily on mobile. Show a subtle animation on successful verification. Error states should be inline and immediate, not a separate alert.
|
|
26
26
|
|