@mindstudio-ai/remy 0.1.291 → 0.1.293
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/automatedActions/publish.md +1 -14
- package/dist/headless.js +1 -1
- package/dist/index.js +1 -1
- package/dist/prompt/compiled/auth.md +2 -0
- package/dist/prompt/compiled/dev-and-deploy.md +2 -0
- package/dist/prompt/skills/auth.md +34 -3
- package/dist/prompt/skills/publishing.md +36 -0
- package/dist/prompt/static/coding.md +1 -1
- package/dist/prompt/static/instructions.md +2 -1
- package/package.json +1 -1
|
@@ -4,17 +4,4 @@
|
|
|
4
4
|
|
|
5
5
|
This is an automated action triggered by the user pressing "Publish" in the editor.
|
|
6
6
|
|
|
7
|
-
Pressing Publish is the user's decision to ship
|
|
8
|
-
|
|
9
|
-
Read what's changed since the last push — the diffs and commits — and turn it into a user-friendly changelog with `presentPublishPlan`: a plain-language summary of what's new ("added vendor approval workflow", "fixed invoice totals", "updated the dashboard layout"). Reference specific code or file paths only when it helps clarity. This is what the user sees before deploying.
|
|
10
|
-
|
|
11
|
-
If approved:
|
|
12
|
-
- Stage and commit any uncommitted changes with a clean, descriptive commit message. If the committed work resolves any open issues (`mindstudio-prod issues`), reference them in the commit message with a closing keyword — `fixes #42`, `closes #7` — so the deploy closes them automatically once it goes live.
|
|
13
|
-
- Push to main
|
|
14
|
-
- Use `mindstudio-prod releases wait` to poll the build until it completes. Let the user know it's deploying, then report back when it's live.
|
|
15
|
-
- Once the deploy is live, scale the close-out to what shipped — the changelog you just wrote is the measure. For a meaningful release (new features, interfaces, real behavior changes): dispatch `specSync` with a brief batching everything that changed this session and `refreshBuildOverview: true` (it reconciles the spec, then re-authors the Build Overview from it), and notify `productVision` about what shipped so the roadmap and pitch deck stay current — both run in the background, so hand off and move on without waiting. For a hotfix or small tweak, skip the ceremony: a plain `specSync` (no flag) only if documented behavior actually changed.
|
|
16
|
-
- Once deployed, offer to help with next steps. This includes technical steps likesetting up a custom domain (`mindstudio-prod domains`), checking for errors (`mindstudio-prod requests stats`), seeding production data (`mindstudio-prod db`), managing env vars/secrets, or anything else they need for launch. It also includes going above and beyond and helping holistically. If it's the initial deploy, offer to help create collateral to announce the launch (e.g., an image for sharing on social media, text copy for a post, etc); if it's a meaningful incremental update, an annoucement post or something similar - go above and beyond here to help the user see that you care about the product from end-to-end, not just writing code! They will be appreciative, grateful, and pleased with your creativity here. Refer to the design guidance in the spec for how to talk about the product, and consider consulting the design expert to generate images or other marketing collateral.
|
|
17
|
-
|
|
18
|
-
After everything is done, if this was a meaningful release, call `compactConversation` to summarize the session and free up context for the next phase of work. After a hotfix, don't bother.
|
|
19
|
-
|
|
20
|
-
If dismissed, acknowledge and do nothing.
|
|
7
|
+
Pressing Publish is the user's decision to ship what they've watched come together in the preview. Load the `publishing` skill with loadSkill and run the release it describes — changelog approval first, then ship.
|
package/dist/headless.js
CHANGED
|
@@ -1387,7 +1387,7 @@ async function listRecursive(dir) {
|
|
|
1387
1387
|
var presentPublishPlanTool = {
|
|
1388
1388
|
definition: {
|
|
1389
1389
|
name: "presentPublishPlan",
|
|
1390
|
-
description: "Present a publish changelog to the user for approval. Write a clear markdown summary of what changed since the last deploy. The user will see this in a full-screen view and can approve or dismiss. Call this BEFORE committing or pushing.",
|
|
1390
|
+
description: "Present a publish changelog to the user for approval \u2014 the consent gate of the release flow, used when the user has asked to publish (the Publish button or an explicit chat request; the `publishing` skill covers the full sequence). Write a clear markdown summary of what changed since the last deploy. The user will see this in a full-screen view and can approve or dismiss. Call this BEFORE committing or pushing.",
|
|
1391
1391
|
inputSchema: {
|
|
1392
1392
|
type: "object",
|
|
1393
1393
|
properties: {
|
package/dist/index.js
CHANGED
|
@@ -867,7 +867,7 @@ var init_presentPublishPlan = __esm({
|
|
|
867
867
|
presentPublishPlanTool = {
|
|
868
868
|
definition: {
|
|
869
869
|
name: "presentPublishPlan",
|
|
870
|
-
description: "Present a publish changelog to the user for approval. Write a clear markdown summary of what changed since the last deploy. The user will see this in a full-screen view and can approve or dismiss. Call this BEFORE committing or pushing.",
|
|
870
|
+
description: "Present a publish changelog to the user for approval \u2014 the consent gate of the release flow, used when the user has asked to publish (the Publish button or an explicit chat request; the `publishing` skill covers the full sequence). Write a clear markdown summary of what changed since the last deploy. The user will see this in a full-screen view and can approve or dismiss. Call this BEFORE committing or pushing.",
|
|
871
871
|
inputSchema: {
|
|
872
872
|
type: "object",
|
|
873
873
|
properties: {
|
|
@@ -13,6 +13,8 @@ Four auth methods, combinable per app in the manifest:
|
|
|
13
13
|
|
|
14
14
|
**Before writing any auth code — the manifest `auth` config, the user table, login/signup UI, frontend `auth.*` calls, API keys — load the `auth` skill.** It has the full contract: config schema, platform-managed columns, the frontend SDK (flows, auth state, error codes, phone/email helpers), delegated sign-in implementation, worked examples, and the auth-screen design rules.
|
|
15
15
|
|
|
16
|
+
**Restricting who can sign up is a platform setting, not app code.** Limiting sign-ups to specific domains or addresses ("only @acme.com emails"), blocking disposable emails, and fixed-code test accounts for app-store reviewers are all enforced platform-side before any verification code is sent, and managed via `mindstudio-prod settings`. Never build an app-level equivalent (a client-side email check, a backend gate) — it's weaker than the real thing. Load the `auth` skill before acting on any of these requests.
|
|
17
|
+
|
|
16
18
|
## Backend Enforcement
|
|
17
19
|
|
|
18
20
|
```typescript
|
|
@@ -42,6 +42,8 @@ The platform builds and deploys automatically:
|
|
|
42
42
|
|
|
43
43
|
All deployed apps are available on `<uuid>.madewithremy.com` where uuid is their app ID. Apps can also be served on a custom platform subdomain (`<subdomain>.madewithremy.com`) or on a fully custom domain the user owns (pointed at the platform via CNAME or A records). Configure either via the `mindstudio-prod` CLI.
|
|
44
44
|
|
|
45
|
+
An app meant to be embedded in an iframe on a customer's own site needs that site's origin added to the app's frame-ancestors setting (`mindstudio-prod settings frame-ancestors add`) — without it the platform's CSP blocks the embed on the deployed app. Don't debug a blocked embed in app code; it's this setting.
|
|
46
|
+
|
|
45
47
|
### Post-Deploy Diagnostics
|
|
46
48
|
|
|
47
49
|
Every live deploy runs an automated Lighthouse audit of the app. Pull it via `mindstudio-prod diagnostics get` CLI when the user wants to evaluate frontend performance. It runs async after the build completes, so it won't be available right away.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: Auth & User Accounts
|
|
3
|
-
what: Apps manage their own users — opt-in via manifest config over a developer-owned user table, with the platform handling verification codes, cookie sessions, and role sync. Covers email/SMS code login (the platform sends real 6-digit codes; the developer builds the UI), per-user API keys that resolve to full RBAC over Bearer auth, org-delegated "Sign in with Remy" for internal apps (redirect/popup handshake, platform-managed identity), the full frontend SDK (auth state and onAuthStateChanged, flows, email/phone changes, phone and email helpers, error codes), backend enforcement (requireRole/hasRole/userId, the system role), auth-screen design rules, and the dev test bypasses.
|
|
3
|
+
what: Apps manage their own users — opt-in via manifest config over a developer-owned user table, with the platform handling verification codes, cookie sessions, and role sync. Covers email/SMS code login (the platform sends real 6-digit codes; the developer builds the UI), per-user API keys that resolve to full RBAC over Bearer auth, org-delegated "Sign in with Remy" for internal apps (redirect/popup handshake, platform-managed identity), the platform signup-restriction settings (domain/email allowlist, disposable-email blocking, fixed-code test accounts for app-store review — all platform settings via `mindstudio-prod settings`, never app code), the full frontend SDK (auth state and onAuthStateChanged, flows, email/phone changes, phone and email helpers, error codes), backend enforcement (requireRole/hasRole/userId, the system role), auth-screen design rules, and the dev test bypasses.
|
|
4
4
|
when: Before writing ANY auth code — the manifest `auth` config, the user table, login/signup UI, frontend `auth.*` calls, API keys, delegated sign-in — and before testing or debugging auth flows.
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -49,6 +49,35 @@ Remy apps can have and manage their own users. Auth is opt-in: configure it in t
|
|
|
49
49
|
- `apiKey` — optional. Required if `api-key` is in methods. Platform stores masked value (`sk_...xxxx`) for display; one key per user.
|
|
50
50
|
- **`roles`** — declares valid roles for the app. Same as before: `id`, `name`, optional `description`.
|
|
51
51
|
|
|
52
|
+
## Restricting Who Can Sign Up (Platform Settings)
|
|
53
|
+
|
|
54
|
+
When the user wants to limit who can register — "only allow sign-ins from our domain", "block throwaway emails", "give the app-store reviewer a working login" — these are **platform settings, enforced at code-send time before any email goes out, not app code**. An app-level equivalent (a client-side email check, a backend gate) is both redundant and weaker: the platform sends the verification code, so app code can't actually stop a signup. Manage them with the `mindstudio-prod settings` CLI (run `mindstudio-prod settings --help` for the full surface).
|
|
55
|
+
|
|
56
|
+
**Signup allowlist ("only @acme.com emails"):**
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
mindstudio-prod settings allowlist add '*@acme.com' # whole domain
|
|
60
|
+
mindstudio-prod settings allowlist add 'cfo@other.com' # one address
|
|
61
|
+
mindstudio-prod settings allowlist enable # start enforcing
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
- Entries are explicit globs: `*@domain.com` (any address at that exact domain — no subdomains; add `*@sub.domain.com` separately) or `user@domain.com` (one address).
|
|
65
|
+
- Enforcement needs both the enable toggle AND a non-empty list — an enabled-but-empty list allows everyone, never a lockout.
|
|
66
|
+
- **Email-code only.** It does not apply to `sms-code`, `api-key`, or delegated "Sign in with Remy". If the user wants domain restriction on an SMS-auth app, say so plainly and suggest email-code — do not build an app-level imitation.
|
|
67
|
+
- Blocked signups fail at `auth.sendEmailCode` with error code `email_not_allowed` — handle it in the login UI with a clear "this app is restricted" message.
|
|
68
|
+
- The dev test login (`remy@mindstudio.ai`) bypasses the allowlist in dev sessions, so you can still smoke-test auth in the preview after enabling it. Don't add it to the allowlist.
|
|
69
|
+
|
|
70
|
+
**Disposable-email blocking:** on by default — email-code signups from known burner domains are rejected at code-send with error code `disposable_email_blocked`. Per-app opt-out: `mindstudio-prod settings set blockDisposableEmails false`.
|
|
71
|
+
|
|
72
|
+
**Test accounts (fixed-code login):** the mechanism for handing app-store reviewers working credentials for a wrapped app — never hand-roll a fake-auth backdoor for this. A listed email or E.164 phone signs in with a pre-set 6-digit code instead of a delivered one, bypassing the disposable and allowlist gates. Works in production; max 5; disable after review.
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
mindstudio-prod settings test-accounts add reviewer@example.com 246810
|
|
76
|
+
mindstudio-prod settings test-accounts enable
|
|
77
|
+
# after review:
|
|
78
|
+
mindstudio-prod settings test-accounts disable
|
|
79
|
+
```
|
|
80
|
+
|
|
52
81
|
## Auth Table
|
|
53
82
|
|
|
54
83
|
The user table is a regular `defineTable` table. The platform manages the auth-mapped columns; all other columns are the developer's domain.
|
|
@@ -211,6 +240,8 @@ All auth methods throw on failure with a `code` property:
|
|
|
211
240
|
| Code | HTTP | Meaning |
|
|
212
241
|
|------|------|---------|
|
|
213
242
|
| `rate_limited` | 429 | Too many requests |
|
|
243
|
+
| `email_not_allowed` | 400 | Signup allowlist is enforced and this email doesn't match — show a clear "this app is restricted" message |
|
|
244
|
+
| `disposable_email_blocked` | 400 | Disposable/burner email domain rejected at code send — ask for a personal or work email |
|
|
214
245
|
| `invalid_code` | 400 | Wrong verification code |
|
|
215
246
|
| `verification_expired` | 400 | Code has expired |
|
|
216
247
|
| `max_attempts_exceeded` | 400 | Too many failed attempts |
|
|
@@ -428,10 +459,10 @@ Auth works the same in dev/preview as in production — real verification codes
|
|
|
428
459
|
- **Email:** `remy@mindstudio.ai` — verification code is always `123456`
|
|
429
460
|
- **Phone:** any `555` number (e.g. `+15551234567`) — verification code is always `123456`
|
|
430
461
|
|
|
431
|
-
All other emails and phone numbers receive real codes. There is no dev-mode bypass, no fake code, and no way to skip verification. When testing auth flows in the preview, use one of the test bypasses above or a real email/phone.
|
|
462
|
+
All other emails and phone numbers receive real codes. There is no dev-mode bypass, no fake code, and no way to skip verification. When testing auth flows in the preview, use one of the test bypasses above or a real email/phone. (These dev bypasses work in dev sessions only and exist for you — they're distinct from *test accounts*, the platform setting for giving external reviewers a fixed-code login that works in production; see *Restricting Who Can Sign Up*.)
|
|
432
463
|
|
|
433
464
|
This test account is the dev's standing identity: the preview's sign-in helper auto-fills it, the editor's Roles column edits its roles, and a scenario's `roles` field assigns roles to it after seeding. The `runMethod` tool's `userId: "testUser"` shortcut resolves to this same dev-bypass identity (as does `roles` without a `userId`). The platform find-or-creates a real users-table row for it on first call and caches the row's UUID for the rest of the dev session. **`auth.userId` inside the method is that UUID — not the literal string `"testUser"`.** The user row already exists, so don't try to insert it. If you need the UUID to seed app-specific rows that reference it (profiles, preferences, foreign keys), read it from any method response or query the users table directly: `SELECT id FROM users WHERE email = 'remy@mindstudio.ai'` (or `phone = '+15555555555'` for SMS-auth apps).
|
|
434
465
|
|
|
435
|
-
For **"Sign in with Remy"** apps (`auth.methods` is `["remy"]`, with no `email-code`/`sms-code`), `testUser` — and `setupBrowser
|
|
466
|
+
For **"Sign in with Remy"** apps (`auth.methods` is `["remy"]`, with no `email-code`/`sms-code`), `testUser` — and `setupBrowser`, and the editor's Roles column — resolve to **the developer's own delegated Remy identity**, not the `remy@mindstudio.ai` code-bypass user. `auth.userId` is still that user's real UUID, but the `remy@mindstudio.ai` email lookup above does not apply — read the UUID from a method response instead.
|
|
436
467
|
|
|
437
468
|
Browser automation tools (screenshots, automated browser tests) handle their own auth sessions. Scenarios seed database data but do not create browser auth sessions.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Publishing & Releases
|
|
3
|
+
what: Shipping to production is a release moment, not just a git push — a user-approved changelog (`presentPublishPlan`) gates the deploy, then commit → push to main → watch the build go live, then a close-out scaled to what shipped (spec sync, roadmap/pitch updates, launch collateral, next steps). Publishing happens at the user's ask, either the Publish button or an explicit request in chat.
|
|
4
|
+
when: The user wants to ship — the Publish automated action fired, or they asked in chat ("publish", "deploy", "ship it", "push it live"). Load BEFORE presenting a changelog, committing, or pushing to main.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Publishing
|
|
8
|
+
|
|
9
|
+
Publishing deploys the app to `main`, which triggers a production build. It is the user's decision to ship — it happens when they press Publish in the editor (which arrives as an automated action) or ask you directly in chat. The steps are the same either way, and they run in order: the changelog is the consent moment, so nothing is committed or pushed until it's approved.
|
|
10
|
+
|
|
11
|
+
If the user wants to see the work before it goes live, push a feature branch instead: that builds a preview at its own URL (`previewUrl` in the `releases wait` result) against a copy of the data, and publishing later is the same flow from `main`.
|
|
12
|
+
|
|
13
|
+
## 1. Present the changelog
|
|
14
|
+
|
|
15
|
+
Read what's changed since the last push — the diffs and commits — and turn it into a user-friendly changelog with `presentPublishPlan`: a plain-language summary of what's new ("added vendor approval workflow", "fixed invoice totals", "updated the dashboard layout"). Reference specific code or file paths only when it helps clarity. This is what the user sees, full-screen, before anything deploys.
|
|
16
|
+
|
|
17
|
+
If dismissed, acknowledge and do nothing — no commit, no push.
|
|
18
|
+
|
|
19
|
+
## 2. Ship (on approval)
|
|
20
|
+
|
|
21
|
+
- Stage and commit any uncommitted changes with a clean, descriptive commit message. If the committed work resolves any open issues (`mindstudio-prod issues`), reference them in the commit message with a closing keyword — `fixes #42`, `closes #7` — so the deploy closes them automatically once it goes live.
|
|
22
|
+
- Push to main.
|
|
23
|
+
- Use `mindstudio-prod releases wait` to poll the build until it completes. Let the user know it's deploying, then report back when it's live.
|
|
24
|
+
|
|
25
|
+
## 3. Close out — scaled to what shipped
|
|
26
|
+
|
|
27
|
+
The changelog you just wrote is the measure.
|
|
28
|
+
|
|
29
|
+
- **Meaningful release** (new features, interfaces, real behavior changes): dispatch `specSync` with a brief batching everything that changed this session and `refreshBuildOverview: true` (it reconciles the spec, then re-authors the Build Overview from it), and notify `productVision` about what shipped so the roadmap and pitch deck stay current — both run in the background, so hand off and move on without waiting.
|
|
30
|
+
- **Hotfix or small tweak**: skip the ceremony — a plain `specSync` (no flag), and only if documented behavior actually changed.
|
|
31
|
+
|
|
32
|
+
## 4. Offer next steps
|
|
33
|
+
|
|
34
|
+
Once deployed, offer to help with what comes next. This includes technical steps like setting up a custom domain (`mindstudio-prod domains`), checking for errors (`mindstudio-prod requests stats`), seeding production data (`mindstudio-prod db`), managing env vars/secrets, or anything else they need for launch. It also includes going above and beyond and helping holistically: if it's the initial deploy, offer to help create collateral to announce the launch (e.g., an image for sharing on social media, text copy for a post); if it's a meaningful incremental update, an announcement post or something similar. Refer to the design guidance in the spec for how to talk about the product, and consider consulting the design expert to generate images or other marketing collateral — help the user see that you care about the product from end-to-end, not just the code.
|
|
35
|
+
|
|
36
|
+
After everything is done, if this was a meaningful release, call `compactConversation` to summarize the session and free up context for the next phase of work. After a hotfix, don't bother.
|
|
@@ -82,7 +82,7 @@ You have access to the `mindstudio` CLI, which exposes every SDK action as a com
|
|
|
82
82
|
### Production App Management
|
|
83
83
|
You have access to `mindstudio-prod`, a CLI for managing the user's production app. Use it via your bash tool. All output is JSON. Run `mindstudio-prod --help` or `mindstudio-prod <command> --help` to discover usage and available options.
|
|
84
84
|
|
|
85
|
-
Available commands: `requests` (server logs, errors, latency), `crashes` (frontend browser errors), `analytics` (traffic queries — lifetime metrics, sources, live counters), `releases`, `diagnostics` (Lighthouse audit), `domains`, `users` (list, set roles), `db` (query production sql), `data` (live db operations like lift-from-dev), `methods` (list, invoke), `secrets`, `files` (CDN files), `datasources` (document corpora), `prerender` (crawler snapshots), `voice` (phone numbers, call logs, voice policy), `issues` (externally-reported bugs).
|
|
85
|
+
Available commands: `requests` (server logs, errors, latency), `crashes` (frontend browser errors), `analytics` (traffic queries — lifetime metrics, sources, live counters), `releases`, `diagnostics` (Lighthouse audit), `domains`, `users` (list, set roles), `db` (query production sql), `data` (live db operations like lift-from-dev), `methods` (list, invoke), `secrets`, `files` (CDN files), `datasources` (document corpora), `prerender` (crawler snapshots), `voice` (phone numbers, call logs, voice policy), `issues` (externally-reported bugs), `settings` (app settings: signup restrictions, app-store-reviewer test accounts, embedding origins, toggles).
|
|
86
86
|
|
|
87
87
|
Two rules: buying a `voice` phone number bills $1/month — never buy without the user's explicit confirmation. `issues` is for externally-reported bugs only — read from it and resolve items when the user asks; never use it to track work you are doing with the user.
|
|
88
88
|
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
- When multiple tool calls are independent, make them all in a single turn. Reading three files, writing two methods, or running a scenario while taking a screenshot: batch them instead of doing one per turn.
|
|
15
15
|
- After two failed attempts at the same approach, tell the user what's going wrong.
|
|
16
16
|
- Never estimate how long something will take or how much it will cost. Just do it. If the user asks, politely refuse — any number would be a guess. Never quote concrete time units for work you're about to do. You can describe scope qualitatively (small change, large refactor, etc.), but never estimate the time it will take you to do work.
|
|
17
|
-
- Pushing to main branch will trigger a deploy.
|
|
17
|
+
- Pushing to main branch will trigger a production deploy. Publishing happens at the user's ask — the Publish button or an explicit request in chat — and the release has its own playbook: load the `publishing` skill before presenting a changelog or pushing to main.
|
|
18
|
+
- Pushing any OTHER branch builds a preview instead of deploying: a private copy of the app at its own URL, with its own copy of the data, that anyone who can open the app in Remy can visit. `mindstudio-prod releases wait` returns its `previewUrl`. Use this to show the user working software before it goes live — a branch push plus the link is often a better answer than describing what you built.
|
|
18
19
|
|
|
19
20
|
### Build Notes
|
|
20
21
|
For complex tasks — especially an initial buildout from a spec or making multiple changes in a single turn — write a `.remy-notes.md` scratchpad in the project root. Use it to track progress: a checklist of what's been built and what's remaining. Do not include implementation details or other decisions in the notes - it is solely for keeping track of tasks. Read the spec files directly when you need design details, implementation decisions, or other reference materials - never write them to the notes file. Delete the notes file when your work is done. When implementing an approved plan, `.remy-plan.md` serves as your reference. Delete it when all planned work is complete.
|