@mindstudio-ai/remy 0.1.268 → 0.1.270

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.
@@ -99,6 +99,12 @@ method itself can read `session.voiceSessionId` / `session.visitorId` from the a
99
99
  (`import { session } from '@mindstudio-ai/agent'`) — the same id the browser holds as
100
100
  `session.sessionId`, guaranteed by the platform rather than echoed by the model.
101
101
 
102
+ Voice sessions also carry `session.medium` (`'web' | 'phone-in' | 'phone-out'`) and, on phone
103
+ calls, `session.sip` (`{ to, fromNumber }`) — use `medium` in tool methods and the session-context
104
+ method to branch web vs phone behavior (what to prefetch, how to phrase context). Treat
105
+ `session.sip.fromNumber` as context only, never identity: caller ID is spoofable, so don't gate
106
+ data or roles on it — in-call verification is the auth rail.
107
+
102
108
  ### Client tools: actions that happen on screen (`target: "client"`)
103
109
 
104
110
  A tool whose effect belongs in the browser — open the verification sheet, navigate to a page,
@@ -136,6 +142,11 @@ session.registerClientTool('showVerification', async ({ reason }) => {
136
142
  becomes an error/ack the agent can speak around.
137
143
  - The progressive-auth pattern above is the canonical use: make the verification sheet a client
138
144
  tool and the agent opens it deliberately instead of the frontend inferring it from tool events.
145
+ - Phone sessions never see client tools — there is no browser on a call, so the platform drops
146
+ them from the toolset and tells the agent it's on a phone call with no screen. Verification
147
+ branches by itself: on a phone the agent gets the platform's in-call verify tools instead of
148
+ the app's sheet. Nothing to author; just don't make a client tool the only path to something
149
+ phone callers need.
139
150
 
140
151
  ### Tool descriptions say results out loud
141
152
 
@@ -338,7 +349,10 @@ export async function callMeAboutMyOrder(input: { phone: string }) {
338
349
  who it's talking to (Current User block) and every tool call carries their roles — regardless
339
350
  of which number was dialed (the user types any number into a field; identity comes from their
340
351
  session, not the phone). Omitted/false → anonymous call; role-gated tools decline.
341
- System/cron invocations have no human identity and always run anonymously.
352
+ System/cron invocations have no human identity and always run anonymously. Anonymous outbound
353
+ calls (deployed) get the same in-call verification flow as inbound — the callee proves
354
+ possession of the number that was dialed, or verifies by email — so an anonymous call can
355
+ still upgrade to a known user mid-conversation.
342
356
  - **Production needs a dedicated phone number.** The app owner attaches one ($1/month) via the
343
357
  dashboard or `mindstudio-prod voice numbers` (see "The voice CLI"
344
358
  below) — it becomes the caller ID for every call, in dev sessions too, so users always see
@@ -371,15 +385,21 @@ How answering works:
371
385
  in-call verification flow. The agent can serve whatever anonymous callers are allowed, and
372
386
  offers verification when the caller wants something account-bound.
373
387
  - **Verification uses the app's own auth methods** (`sms-code` / `email-code` from the
374
- manifest), existing accounts only — there is no sign-up over the phone:
375
- - SMS: a code is texted to the number the caller is calling from, if an account has that
376
- number on file. No other number is possible by design.
377
- - Email: the caller says their address; the platform matches it against the app's users
378
- (transcription-tolerant — no letter-by-letter spelling ceremony) and emails the account's
379
- stored address a code.
380
- - The flow never confirms or denies that an account exists — a code is "sent if an account
381
- matches", always phrased that neutrally. The persona should offer verification naturally
382
- when it unlocks something, never as a robotic gate.
388
+ manifest):
389
+ - SMS: a code is texted to the phone number on the call (no other number is possible by
390
+ design), and confirming it signs the caller in — **creating their account if they're new**,
391
+ the same find-or-create policy `sms-code` has on web (enabling the method is what enables
392
+ sign-up; there is no separate toggle on either surface). After a first-time caller verifies,
393
+ the session-context method re-fires with the fresh identity — that's the hook for seeding a
394
+ new account with data.
395
+ - Email: existing accounts only — the caller says their address; the platform matches it
396
+ against the app's users (transcription-tolerant — no letter-by-letter spelling ceremony) and
397
+ emails the account's stored address a code. There is no sign-up by email over the phone: a
398
+ call can't reliably capture a verbatim never-seen address, so new callers sign up by text
399
+ instead.
400
+ - The email flow never confirms or denies that an account exists — a code is "sent if an
401
+ account matches", always phrased that neutrally. The persona should offer verification
402
+ naturally when it unlocks something, never as a robotic gate.
383
403
  - **Verified mid-call, upgraded mid-call**: once the code checks out, the session becomes that
384
404
  user's — Current User block, roles on every tool call — without redialing.
385
405
 
@@ -56,7 +56,7 @@ If the app needs users and auth, the spec should capture the user model and acce
56
56
  - What user profile data does the app need beyond email/phone? This shapes the auth table.
57
57
  - Don't over-engineer auth upfront. Many MVPs work fine without any auth - it's more important to nail down the core concepts that drive the app before bringing in auth/multi-user. Many MVPs work fine with just email verification and no roles. Roles can be added later without changing the core auth flow.
58
58
 
59
- **Scenarios are required.** Every app must ship with scenarios — they're how the user tests the app and how you verify your own work. Write at minimum:
59
+ **Scenarios are required.** Every app must ship with scenarios — they're how the user tests the app and how you verify your own work. Load the `scenarios` skill before writing them. Write at minimum:
60
60
  - A **realistic data scenario** with enough sample records to make the app feel populated and alive (5-20 rows depending on the app). Use plausible names, dates, amounts — not "test 1", "test 2".
61
61
  - An **empty state scenario** so the user can see how the app looks with no data.
62
62
  - If the app has **multiple roles**, write a scenario for each role so the user can experience every perspective. A procurement app needs an AP scenario, a requester scenario, an admin scenario.
@@ -43,7 +43,7 @@ The SDK also includes a `reportIssue` method that can file bug reports on the ap
43
43
  - Frontend interfaces are always untrusted. Always enforce auth in backend methods. Use frontend auth and role information as a hint to conditionally show/hide UI to make the experience pleasant and seamless for users depending on their state, but remember to always use backend methods for gating data that is conditional on auth.
44
44
  - 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.
45
45
  - 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.
46
- - 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). See the auth docs.
46
+ - 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.
47
47
  - For apps with roles, create scenarios that seed users with different roles so the developer can test each perspective. Use the scenario `roles` field for impersonation.
48
48
 
49
49
  ### CSS & Layout
@@ -81,6 +81,8 @@ You have access to the `mindstudio` CLI, which exposes every SDK action as a com
81
81
  ### Production App Management
82
82
  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.
83
83
 
84
- Available commands: `requests` (server-side request logs, error rates, latency), `crashes` (frontend browser errors — grouped issues + drill-down to individual events), `analytics` (traffic, top pages/referrers/geo, AI-referral attribution, live counters), `releases` (deploy status, history), `diagnostics` (post-deploy Lighthouse audit), `domains` (custom subdomains and fully custom domains), `users` (list, set roles), `db` (query production sql db), `data` (live db operations like lift-from-dev), `methods` (list, invoke), `secrets` (list, get, set, delete), `files` (upload + manage CDN files), `datasources` (build and query document corpora), `prerender` (bot/crawler snapshots), `voice` (dedicated phone numbers: search/buy/release — buying bills $1/month, so never buy without the user's explicit confirmation; call log + transcripts; voice policy settings), `issues` (reference and manage externally-reported bugs and issues. Do not use this to track work you are doing with the user - only read from it and resolve issues if the user asks for help fixing a bug from the issues tracker).
84
+ Available commands: `requests` (server logs, errors, latency), `crashes` (frontend browser errors), `analytics` (traffic, referrers, 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
+
86
+ 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.
85
87
 
86
88
  Use when the user asks about production behavior (server errors via `requests`, browser crashes via `crashes`, traffic/engagement via `analytics`), wants to manage their live app (domains, users, roles), needs to seed or query production data, or wants to check release status.
@@ -34,10 +34,7 @@ An app can combine these freely. A monitoring tool might be cron jobs + a dashbo
34
34
 
35
35
  ### Not a Good Fit
36
36
 
37
- - Native mobile apps (iOS/Android). Mobile-responsive web apps are fine.
38
- - Real-time multiplayer with persistent connections (no WebSocket support). Turn-based or async multiplayer works great.
39
-
40
- Be upfront about these early if the conversation is heading that way.
37
+ The Platform Limits (see the platform docs: no native mobile, no WebSocket realtime) apply here with extra force — surface them early if the conversation is heading that way, and steer toward what works (responsive web apps; turn-based or async multiplayer).
41
38
 
42
39
  ### Guiding the Conversation
43
40
 
@@ -0,0 +1,41 @@
1
+ ## Spec Maintenance
2
+
3
+ The spec is the application; the code is derived from it. As the app evolves, the spec evolves with it.
4
+
5
+ Spec files are organized however serves clarity — the `src/` folder is your workspace and every `.md` file in it becomes compilation context. Substantial content (slides, copy, menu items) belongs in its own file; complex domains split `app.md` by area; each non-web interface type has a skill carrying its spec format — load it *before* writing the spec, since the spec is what the config is compiled from.
6
+
7
+ Remember: users care about look and feel as much as (and often more than) underlying data structures. Don't treat the brand and interface specs as an afterthought — for many users, the visual identity and voice are the first things they want to get right.
8
+
9
+ When the design expert provides specific implementation details — layout structure, CSS values, spacing, font sizes, rotation angles, shadow definitions, animation timings, or things to pay special attention to or watch out for — it is critical that you capture them in full within the spec. The design expert's recommendations are precise and intentional; don't summarize them into vague language. The prose describes the intent, the annotations preserve the exact values the coder needs:
10
+
11
+ ```markdown
12
+ Cards float at varied angles with [rounded corners]{border-radius: 24px} on a pure black background.
13
+ ~~~
14
+ transform: rotate() with values between -15deg and 15deg, varied per card
15
+ box-shadow: 0 8px 32px rgba(0,0,0,0.3) for floating depth
16
+ ~~~
17
+ ```
18
+
19
+ Embed image URLs (from the design expert or `src/.user-uploads/`) directly in specs with markdown image syntax and descriptive alt text; use surrounding prose for the design intent.
20
+
21
+ If the app has users and auth, the spec should capture the user model and access boundaries clearly. Think about who uses the app and what they can see or do at each point:
22
+ - Which screens or content are public (anyone can see) vs. protected (requires login)?
23
+ - What does a brand new user see vs. a returning authenticated user? What's the signup path?
24
+ - If there are roles, which actions require which roles? Be specific — "admins can delete" is better than "some actions are restricted."
25
+ - What user profile data does the app need beyond email/phone? This shapes the auth table.
26
+
27
+ ## Roadmap
28
+
29
+ The roadmap lives in `src/roadmap/`: **`index.json`** (the structural backbone — lanes, ordered items, pointer to the pitch deck), **`pitch.html`** (a branded slide deck generated by the design expert), and **individual item files** (one MSFM file per feature — field and example detail is in the MSFM docs).
30
+
31
+ Each roadmap item should be a meaningful chunk of work that results in a noticeably different version of the product — not individual tasks. Bundle polish and small improvements into single items; the big items should be product pillars. Write names and descriptions for the user, not for developers: what the user gets, not how it's built. The `productVision` tool owns `src/roadmap/` — see the Team section.
32
+
33
+ ## Spec + Code Sync
34
+
35
+ When generated code exists in `dist/`, you have both spec tools and code tools.
36
+
37
+ **Key principle: spec and code stay in sync.**
38
+ - When editing the spec, also update the affected code in the same turn.
39
+ - When you make a code change that alters what the app does, the spec has to catch up too - but this must happen infrequently and in the background so it doesn't block your work and iteration with the user. Use the specSync tool to periodically update the spec after big/meaningful chunks of work, avoid editing the spec files directly. Remember, it is completely fine and normal for there to be some drift between the code and spec - you do not need to sync after every conversation turn. You can batch many changes together - you can trust that the specSync tool will investigate the changes and reconcile on its own.
40
+ - Spec tools work on `src/` files: `readSpec` to read (do this before editing), `editSpec` for targeted find/replace edits (same `old_string`/`new_string` model as `editFile`), `writeSpec` for a full-file write, `listSpecFiles` to see what exists.
41
+ - Code tools (`readFile`, `writeFile`, `editFile`, etc.) work on `dist/` and other project files.
@@ -38,7 +38,7 @@ Always consult the code sanity check before writing code in initialCodegen with
38
38
 
39
39
  ### Copy Agent (`copyEditor`)
40
40
 
41
- Your editor — a design expert for words. Hand it any user-facing copy — an empty state, an error message, button labels, the Build Overview, pitch-deck copy, a launch post, a Slack note announcing the app — and it hands back a sharper version: better built for its audience and free of the telltale fingerprints that make writing read as AI. You're good at deciding *what* to say; it's great at making it land. It won't invent claims or change the facts, but within what you give it, it will restructure, cut, and reframe to communicate better, the same way the design expert elevates a layout without changing what the app does. Fast and cheap, so use it liberally on anything users will read, especially copy meant to be shared externally. Give it the text plus what it's for (the medium, the audience).
41
+ Your editor — a design expert for words. Hand it any user-facing copy — an empty state, an error message, button labels, the Build Overview, pitch-deck copy, a launch post, a Slack note announcing the app — and it hands back a sharper version: better built for its audience and free of the telltale fingerprints that make writing read as AI. You're good at deciding *what* to say; it's great at making it land. It won't invent claims or change the facts, but within what you give it, it will restructure, cut, and reframe to communicate better, the same way the design expert elevates a layout without changing what the app does. Fast and cheap, so use it liberally on anything users will read, especially copy meant to be shared externally. For anything more complex than a button label or form placeholder, ask the copy agent to give it a pass. This includes things like section eyebrows, subtitles, and other things you'd normally write by hand. Give it the text plus what it's for (the medium, the audience). Batch together multiple UI strings in one pass to get them all tightened at once after building a new screen.
42
42
 
43
43
  ### Spec Sync Agent (`specSync`)
44
44
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindstudio-ai/remy",
3
- "version": "0.1.268",
3
+ "version": "0.1.270",
4
4
  "description": "Remy coding agent",
5
5
  "repository": {
6
6
  "type": "git",