@mindstudio-ai/remy 0.1.283 → 0.1.285
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/buildFromInitialSpec.md +1 -1
- package/dist/headless.js +5 -5
- package/dist/index.js +5 -5
- package/dist/prompt/compiled/manifest.md +1 -1
- package/dist/prompt/skills/auth.md +1 -1
- package/dist/prompt/skills/jewels.md +16 -1
- package/dist/prompt/skills/scenarios.md +5 -3
- package/dist/prompt/static/coding.md +1 -1
- package/dist/subagents/browserAutomation/prompt.md +2 -2
- package/package.json +1 -1
|
@@ -19,7 +19,7 @@ Then, build everything in one turn: tables, methods, interfaces, manifest update
|
|
|
19
19
|
- First, run use `runScenario` to seed test data, then use `runMethod` to confirm important methods work.
|
|
20
20
|
- If the app has a web frontend, check the browser logs to make sure there are no errors rendering it.
|
|
21
21
|
- Use `runAutomatedBrowserTest` to smoke-test the main UI flow. The dev database is a disposable snapshot, so don't worry about being destructive. Fix any errors before finishing.
|
|
22
|
-
- If there is a scenario that seeds the app with mock data, use it to present the app to the user with initial data seeded, so they can see and play with the real app. Let the user know they can reset the app using a scenario to empty it if they wish. Showing the user something they can play with immediately is important when it comes to landing a strong first impression.
|
|
22
|
+
- If there is a scenario that seeds the app with mock data, use it to present the app to the user with initial data seeded, so they can see and play with the real app. Let the user know they can reset the app using a scenario to empty it if they wish. Showing the user something they can play with immediately is important when it comes to landing a strong first impression. For apps with auth, the preview opens on the app's sign-in screen by design — that's the front door working, not a bug. Don't try to pre-authenticate the user or route around it; tell them the sign-in helper auto-fills the test account (`remy@mindstudio.ai`, code `123456`), so they're in with one tap.
|
|
23
23
|
|
|
24
24
|
## When you are done
|
|
25
25
|
|
package/dist/headless.js
CHANGED
|
@@ -2936,7 +2936,7 @@ var restartProcessTool = {
|
|
|
2936
2936
|
var runScenarioTool = {
|
|
2937
2937
|
definition: {
|
|
2938
2938
|
name: "runScenario",
|
|
2939
|
-
description: "Run a scenario to seed the dev database with test data. By default truncates all tables first, then executes the seed function and
|
|
2939
|
+
description: "Run a scenario to seed the dev database with test data. By default truncates all tables first, then executes the seed function and assigns the scenario's roles to the dev test user (a real user row; the roles persist on it until changed). Nobody gets signed in: the preview still shows the app's own sign-in, where the dev helper auto-fills the test account. Use skipTruncate to run the seed function against existing data without resetting. Blocks until complete. Scenario IDs are defined in mindstudio.json. If it fails, check .logs/tunnel.log or .logs/requests.ndjson for details. Returns synchronously - no need to sleep before checking results.",
|
|
2940
2940
|
inputSchema: {
|
|
2941
2941
|
type: "object",
|
|
2942
2942
|
properties: {
|
|
@@ -2975,12 +2975,12 @@ var runMethodTool = {
|
|
|
2975
2975
|
},
|
|
2976
2976
|
userId: {
|
|
2977
2977
|
type: "string",
|
|
2978
|
-
description: `Optional. Run the method as a specific user. Pass "testUser" to auto-auth as the default test user (the sandbox handles user creation/lookup \u2014 no scenario setup needed); works for email-code, sms-code, and "Sign in with Remy" apps (for sign-in-with-remy apps it resolves to the developer's own delegated identity rather than the test user). Or pass a real user ID from scenario-seeded data for a specific user
|
|
2978
|
+
description: `Optional. Run the method as a specific user. Pass "testUser" to auto-auth as the default test user (the sandbox handles user creation/lookup \u2014 no scenario setup needed); works for email-code, sms-code, and "Sign in with Remy" apps (for sign-in-with-remy apps it resolves to the developer's own delegated identity rather than the test user). Or pass a real user ID from scenario-seeded data for a specific user.`
|
|
2979
2979
|
},
|
|
2980
2980
|
roles: {
|
|
2981
2981
|
type: "array",
|
|
2982
2982
|
items: { type: "string" },
|
|
2983
|
-
description: 'Optional. Role names for this request (e.g. ["admin"]).
|
|
2983
|
+
description: 'Optional. Role names for this request (e.g. ["admin"]). For auth-enabled apps, roles without a userId run as the dev test user holding exactly these roles \u2014 a real user row, so `auth.userId` and `requireRole` behave like production. For apps without auth, roles attach to an anonymous call. Applies to this call only.'
|
|
2984
2984
|
}
|
|
2985
2985
|
},
|
|
2986
2986
|
required: ["method"]
|
|
@@ -4505,7 +4505,7 @@ async function runBrowserAutomation(task, context, opts) {
|
|
|
4505
4505
|
await sidecarRequest(
|
|
4506
4506
|
"/set-viewport",
|
|
4507
4507
|
{ mode: "default" },
|
|
4508
|
-
{ timeout:
|
|
4508
|
+
{ timeout: 25e3 }
|
|
4509
4509
|
);
|
|
4510
4510
|
} catch {
|
|
4511
4511
|
}
|
|
@@ -4524,7 +4524,7 @@ async function runBrowserAutomation(task, context, opts) {
|
|
|
4524
4524
|
auth: _input.auth,
|
|
4525
4525
|
path: _input.path
|
|
4526
4526
|
},
|
|
4527
|
-
{ timeout:
|
|
4527
|
+
{ timeout: 2e4 }
|
|
4528
4528
|
);
|
|
4529
4529
|
return JSON.stringify(result2);
|
|
4530
4530
|
} catch (err) {
|
package/dist/index.js
CHANGED
|
@@ -4089,7 +4089,7 @@ var init_runScenario = __esm({
|
|
|
4089
4089
|
runScenarioTool = {
|
|
4090
4090
|
definition: {
|
|
4091
4091
|
name: "runScenario",
|
|
4092
|
-
description: "Run a scenario to seed the dev database with test data. By default truncates all tables first, then executes the seed function and
|
|
4092
|
+
description: "Run a scenario to seed the dev database with test data. By default truncates all tables first, then executes the seed function and assigns the scenario's roles to the dev test user (a real user row; the roles persist on it until changed). Nobody gets signed in: the preview still shows the app's own sign-in, where the dev helper auto-fills the test account. Use skipTruncate to run the seed function against existing data without resetting. Blocks until complete. Scenario IDs are defined in mindstudio.json. If it fails, check .logs/tunnel.log or .logs/requests.ndjson for details. Returns synchronously - no need to sleep before checking results.",
|
|
4093
4093
|
inputSchema: {
|
|
4094
4094
|
type: "object",
|
|
4095
4095
|
properties: {
|
|
@@ -4134,12 +4134,12 @@ var init_runMethod = __esm({
|
|
|
4134
4134
|
},
|
|
4135
4135
|
userId: {
|
|
4136
4136
|
type: "string",
|
|
4137
|
-
description: `Optional. Run the method as a specific user. Pass "testUser" to auto-auth as the default test user (the sandbox handles user creation/lookup \u2014 no scenario setup needed); works for email-code, sms-code, and "Sign in with Remy" apps (for sign-in-with-remy apps it resolves to the developer's own delegated identity rather than the test user). Or pass a real user ID from scenario-seeded data for a specific user
|
|
4137
|
+
description: `Optional. Run the method as a specific user. Pass "testUser" to auto-auth as the default test user (the sandbox handles user creation/lookup \u2014 no scenario setup needed); works for email-code, sms-code, and "Sign in with Remy" apps (for sign-in-with-remy apps it resolves to the developer's own delegated identity rather than the test user). Or pass a real user ID from scenario-seeded data for a specific user.`
|
|
4138
4138
|
},
|
|
4139
4139
|
roles: {
|
|
4140
4140
|
type: "array",
|
|
4141
4141
|
items: { type: "string" },
|
|
4142
|
-
description: 'Optional. Role names for this request (e.g. ["admin"]).
|
|
4142
|
+
description: 'Optional. Role names for this request (e.g. ["admin"]). For auth-enabled apps, roles without a userId run as the dev test user holding exactly these roles \u2014 a real user row, so `auth.userId` and `requireRole` behave like production. For apps without auth, roles attach to an anonymous call. Applies to this call only.'
|
|
4143
4143
|
}
|
|
4144
4144
|
},
|
|
4145
4145
|
required: ["method"]
|
|
@@ -5542,7 +5542,7 @@ async function runBrowserAutomation(task, context, opts) {
|
|
|
5542
5542
|
await sidecarRequest(
|
|
5543
5543
|
"/set-viewport",
|
|
5544
5544
|
{ mode: "default" },
|
|
5545
|
-
{ timeout:
|
|
5545
|
+
{ timeout: 25e3 }
|
|
5546
5546
|
);
|
|
5547
5547
|
} catch {
|
|
5548
5548
|
}
|
|
@@ -5561,7 +5561,7 @@ async function runBrowserAutomation(task, context, opts) {
|
|
|
5561
5561
|
auth: _input.auth,
|
|
5562
5562
|
path: _input.path
|
|
5563
5563
|
},
|
|
5564
|
-
{ timeout:
|
|
5564
|
+
{ timeout: 2e4 }
|
|
5565
5565
|
);
|
|
5566
5566
|
return JSON.stringify(result2);
|
|
5567
5567
|
} catch (err) {
|
|
@@ -126,4 +126,4 @@
|
|
|
126
126
|
| `description` | `string` | No | What state this scenario creates |
|
|
127
127
|
| `path` | `string` | Yes | Path to the TypeScript file |
|
|
128
128
|
| `export` | `string` | Yes | Named export (the async function) |
|
|
129
|
-
| `roles` | `string[]` | Yes | Roles to
|
|
129
|
+
| `roles` | `string[]` | Yes | Roles assigned to the dev test user after seeding |
|
|
@@ -430,7 +430,7 @@ Auth works the same in dev/preview as in production — real verification codes
|
|
|
430
430
|
|
|
431
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.
|
|
432
432
|
|
|
433
|
-
The `runMethod` tool's `userId: "testUser"` shortcut resolves to this same dev-bypass identity. 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).
|
|
433
|
+
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
434
|
|
|
435
435
|
For **"Sign in with Remy"** apps (`auth.methods` is `["remy"]`, with no `email-code`/`sms-code`), `testUser` — and `setupBrowser` — 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
436
|
|
|
@@ -218,10 +218,25 @@ The wiring itself is two manifest lines on the method's entry:
|
|
|
218
218
|
"path": "dist/methods/src/categorizeRecord.ts",
|
|
219
219
|
"export": "categorizeRecord",
|
|
220
220
|
"autonomy": "shadow",
|
|
221
|
-
"jewel": { "path": "dist/methods/src/categorizeRecord.jewel.ts", "export": "default" }
|
|
221
|
+
"jewel": { "path": "dist/methods/src/categorizeRecord.jewel.ts", "export": "default" },
|
|
222
|
+
"tuning": {}
|
|
222
223
|
}
|
|
223
224
|
```
|
|
224
225
|
|
|
226
|
+
`tuning` (optional) is the training recipe for the jewel's own model. Every knob has a
|
|
227
|
+
platform default and most jewels never set any: `windowDays` (how many days of ledger
|
|
228
|
+
history to train on; default all history), `epochs` (1-10, default 3), `rank` (LoRA
|
|
229
|
+
rank, 4-64, default 16), `learningRate` (default 5e-5). It requires `jewel`, and it
|
|
230
|
+
rides the release: changing a knob is a commit + deploy before the next training run.
|
|
231
|
+
|
|
232
|
+
Once a method has accumulated graded pairs, train from the prod CLI:
|
|
233
|
+
`mindstudio-prod jewels train <methodId>` (see `--help`). The dataset report says
|
|
234
|
+
whether the ledger is trainable (pairs without an attached `trace` don't count), and a
|
|
235
|
+
run produces a downloadable LoRA adapter plus a held-out agreement report: how often
|
|
236
|
+
the trained model matched your team's decisions on pairs it never saw. The trained
|
|
237
|
+
model is an artifact and a report for now; serving it inside the app is a later
|
|
238
|
+
platform phase, so set that expectation honestly when a user asks.
|
|
239
|
+
|
|
225
240
|
## Arrival Triggers (`mindstudio.jewels.propose`)
|
|
226
241
|
|
|
227
242
|
Invocation shadowing fires when a human acts. For decision moments the app detects itself (an ingest branch that lands a row in its pending state), hand the moment to the jewels from backend code:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: Scenarios
|
|
3
|
-
what: Seed scripts that reset the dev database to a specific state — the platform truncates all tables, runs an async function of plain `db.push()` calls, then
|
|
3
|
+
what: Seed scripts that reset the dev database to a specific state — the platform truncates all tables, runs an async function of plain `db.push()` calls, then assigns the scenario's roles to the dev test user, so the same scenario always produces the same state. They're how the user tests the app from each role's perspective (by signing in as the test account) and how a freshly built app makes its first impression already populated with data that fits its vibe. Declared in the manifest, written at `dist/methods/.scenarios/`.
|
|
4
4
|
when: Before writing or editing a scenario — including the initial build, where scenarios are required. Covers file placement and imports, truncate semantics, what scenarios must not touch (file stores, data sources), and seeding realistic data and bespoke images.
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -42,7 +42,7 @@ In `mindstudio.json`:
|
|
|
42
42
|
| `description` | What state this scenario creates |
|
|
43
43
|
| `path` | Path to the TypeScript file |
|
|
44
44
|
| `export` | Named export (the async function) |
|
|
45
|
-
| `roles` | Roles to
|
|
45
|
+
| `roles` | Roles assigned to the dev test user after seeding (requires app auth) |
|
|
46
46
|
|
|
47
47
|
## Writing a Scenario
|
|
48
48
|
|
|
@@ -104,10 +104,12 @@ Shared setup code can go in `dist/methods/.scenarios/_helpers/`.
|
|
|
104
104
|
When a scenario runs, the platform:
|
|
105
105
|
1. **Truncates** all tables (deletes all rows, preserves schema - unless skipTruncate is true)
|
|
106
106
|
2. **Executes** the seed function (your `db.push()` calls populate the clean database)
|
|
107
|
-
3. **
|
|
107
|
+
3. **Assigns** the roles from the scenario's `roles` field to the dev test user — a real write to that user's row, so it requires app auth to be enabled
|
|
108
108
|
|
|
109
109
|
This is deterministic — same scenario always produces the same state.
|
|
110
110
|
|
|
111
|
+
Nobody gets signed in by a scenario. The preview shows the app's own sign-in screen, where the dev helper auto-fills the test account (`remy@mindstudio.ai`, code `123456`) — one tap and the user is in as the test user, seeing the app from the scenario's role's perspective. The roles persist on the test user until another scenario or the Roles column changes them.
|
|
112
|
+
|
|
111
113
|
Scenarios are useful for seeding initial app state after build for testing, as well as to give the user a first impression of an app that is already filled with data and looks and feels usable. The user can choose to run further scenarios after initial build by clicking the Scenarios tab and selecting a scenario to run.
|
|
112
114
|
|
|
113
115
|
## What scenarios don't touch
|
|
@@ -45,7 +45,7 @@ The SDK also includes a `reportIssue` method that can file bug reports on the ap
|
|
|
45
45
|
- For signup and login, verification code inputs must feel polished — clear feedback on send, auto-send on paste, a "resend" option, and error messages for wrong/expired codes.
|
|
46
46
|
- The auth table is the user profile. Add custom fields (displayName, avatar, plan, etc.) alongside the platform-managed columns. Don't create a separate profile table.
|
|
47
47
|
- When delegated sign-in ("Sign in with Remy") is available for the org, prefer a "Continue with {Org}" button (`auth.signInWithRemy()`) and call `auth.handleRemyRedirect()` once on app load. Drive UI off `onAuthStateChanged`, not the sign-in return value (top-level sign-in redirects away and never returns). Load the `auth` skill for the full flow reference.
|
|
48
|
-
- For apps with roles, create
|
|
48
|
+
- For apps with roles, create one scenario per role so the developer can test each perspective: the scenario's `roles` field assigns those roles to the dev test user, and signing in as that account (the preview's sign-in helper auto-fills it) shows the app from that role's perspective.
|
|
49
49
|
|
|
50
50
|
### CSS & Layout
|
|
51
51
|
- Prefer CSS grid for page-level layout, flex for component-level alignment.
|
|
@@ -11,13 +11,13 @@ The user is watching the automation happen on their screen in real-time. When ty
|
|
|
11
11
|
### Auth Testing
|
|
12
12
|
When the content you need to test is behind authentication, use the `setupBrowser` tool to automatically pre-authenticate instead of manually navigating login flows. This mints a session cookie, reloads the page with the authenticated state, and optionally navigates to a starting path. Use `remy@mindstudio.ai` as the email. If the test requires a specific role, pass it in the `roles` array. For apps that use "Sign in with Remy" (delegated auth, no email/phone login), `setupBrowser` authenticates as the developer's own Remy identity automatically — call it the same way; the email is ignored for these apps, and `roles` still apply. Do not try to click through the "Sign in with Remy" button manually.
|
|
13
13
|
|
|
14
|
-
If you need to test the login/signup flow itself (e.g., verifying the UI, error states, or the verification code input), navigate it manually: use `remy@mindstudio.ai` for email and `+15551234567` for phone. In the dev environment, verification
|
|
14
|
+
If you need to test the login/signup flow itself (e.g., verifying the UI, error states, or the verification code input), navigate it manually: use `remy@mindstudio.ai` for email and `+15551234567` for phone. In the dev environment, verification for this email and any 555-prefixed phone number accepts the code `123456`.
|
|
15
15
|
|
|
16
16
|
To test as a **signed-out visitor** (public pages, landing/join links), call `setupBrowser` with NO `auth` — it clears the auth cookie and reloads at the given path, giving you a clean unauthenticated session. Combine with `navigate` + `fresh: true` when you need a fresh-document view of an entry page mid-run.
|
|
17
17
|
|
|
18
18
|
## Browser Commands
|
|
19
19
|
|
|
20
|
-
Your session always starts on the app root / in a logged out/unauthenticated state, on a freshly reloaded page running the current code — any changes made since the last run are already picked up. Never restart the dev server (or reload manually) to clear a "stale bundle"; that staleness cannot survive the start-of-run refresh. Use `setupBrowser` to authenticate before testing protected pages.
|
|
20
|
+
Your session always starts on the app root / in a logged out/unauthenticated state, on a freshly reloaded page running the current code (scenarios seed data and set the test user's roles but never create browser sessions) — any changes made since the last run are already picked up. Never restart the dev server (or reload manually) to clear a "stale bundle"; that staleness cannot survive the start-of-run refresh. Use `setupBrowser` to authenticate before testing protected pages.
|
|
21
21
|
|
|
22
22
|
### Snapshot format
|
|
23
23
|
|