@mindstudio-ai/remy 0.1.201 → 0.1.202
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 +5 -3
- package/dist/index.js +5 -3
- package/dist/prompt/compiled/auth.md +1 -1
- package/dist/prompt/compiled/dev-and-deploy.md +1 -1
- package/dist/prompt/compiled/interfaces.md +142 -53
- package/dist/prompt/compiled/manifest.md +1 -1
- package/dist/prompt/compiled/mcp-interfaces.md +34 -0
- package/dist/prompt/compiled/methods.md +1 -1
- package/dist/prompt/compiled/platform.md +6 -4
- package/dist/prompt/static/intake.md +2 -2
- package/package.json +1 -1
package/dist/headless.js
CHANGED
|
@@ -313,6 +313,10 @@ Current date: ${now}
|
|
|
313
313
|
{{compiled/agent-interfaces.md}}
|
|
314
314
|
</building_agent_interfaces>
|
|
315
315
|
|
|
316
|
+
<building_mcp_interfaces>
|
|
317
|
+
{{compiled/mcp-interfaces.md}}
|
|
318
|
+
</building_mcp_interfaces>
|
|
319
|
+
|
|
316
320
|
<media_cdn>
|
|
317
321
|
{{compiled/media-cdn.md}}
|
|
318
322
|
</media_cdn>
|
|
@@ -4693,7 +4697,7 @@ This is a capable, stable platform used in production by 100k+ users. Build with
|
|
|
4693
4697
|
- Full-stack web apps \u2014 social platforms, membership sites, marketplaces, booking systems, community hubs \u2014 multi-user apps with auth, data, UI
|
|
4694
4698
|
- Automations with no UI \u2014 cron jobs, webhook handlers, email processors, data sync pipelines
|
|
4695
4699
|
- Marketing & launch pages \u2014 landing pages, waitlist pages with referral mechanics, product sites with scroll animations
|
|
4696
|
-
-
|
|
4700
|
+
- Agent tools \u2014 MCP tool servers for AI assistants
|
|
4697
4701
|
- Creative/interactive projects \u2014 browser games with p5.js or Three.js, interactive visualizations, generative art, portfolio sites
|
|
4698
4702
|
- API services \u2014 backend logic exposed as REST endpoints
|
|
4699
4703
|
- Simple static sites \u2014 no backend needed, just a web interface with a build step
|
|
@@ -4708,8 +4712,6 @@ Each interface type invokes the same backend methods. Methods don't know which i
|
|
|
4708
4712
|
- API \u2014 auto-generated REST endpoints for every method
|
|
4709
4713
|
- Cron \u2014 scheduled jobs on a configurable interval
|
|
4710
4714
|
- Webhook \u2014 HTTP endpoints that trigger methods
|
|
4711
|
-
- Discord \u2014 slash-command bots
|
|
4712
|
-
- Telegram \u2014 message-handling bots
|
|
4713
4715
|
- Email \u2014 inbound email processing
|
|
4714
4716
|
- MCP \u2014 tool servers for AI assistants
|
|
4715
4717
|
- Agent \u2014 conversational LLM interface with tool access to backend methods
|
package/dist/index.js
CHANGED
|
@@ -1967,6 +1967,10 @@ Current date: ${now}
|
|
|
1967
1967
|
{{compiled/agent-interfaces.md}}
|
|
1968
1968
|
</building_agent_interfaces>
|
|
1969
1969
|
|
|
1970
|
+
<building_mcp_interfaces>
|
|
1971
|
+
{{compiled/mcp-interfaces.md}}
|
|
1972
|
+
</building_mcp_interfaces>
|
|
1973
|
+
|
|
1970
1974
|
<media_cdn>
|
|
1971
1975
|
{{compiled/media-cdn.md}}
|
|
1972
1976
|
</media_cdn>
|
|
@@ -5474,7 +5478,7 @@ This is a capable, stable platform used in production by 100k+ users. Build with
|
|
|
5474
5478
|
- Full-stack web apps \u2014 social platforms, membership sites, marketplaces, booking systems, community hubs \u2014 multi-user apps with auth, data, UI
|
|
5475
5479
|
- Automations with no UI \u2014 cron jobs, webhook handlers, email processors, data sync pipelines
|
|
5476
5480
|
- Marketing & launch pages \u2014 landing pages, waitlist pages with referral mechanics, product sites with scroll animations
|
|
5477
|
-
-
|
|
5481
|
+
- Agent tools \u2014 MCP tool servers for AI assistants
|
|
5478
5482
|
- Creative/interactive projects \u2014 browser games with p5.js or Three.js, interactive visualizations, generative art, portfolio sites
|
|
5479
5483
|
- API services \u2014 backend logic exposed as REST endpoints
|
|
5480
5484
|
- Simple static sites \u2014 no backend needed, just a web interface with a build step
|
|
@@ -5489,8 +5493,6 @@ Each interface type invokes the same backend methods. Methods don't know which i
|
|
|
5489
5493
|
- API \u2014 auto-generated REST endpoints for every method
|
|
5490
5494
|
- Cron \u2014 scheduled jobs on a configurable interval
|
|
5491
5495
|
- Webhook \u2014 HTTP endpoints that trigger methods
|
|
5492
|
-
- Discord \u2014 slash-command bots
|
|
5493
|
-
- Telegram \u2014 message-handling bots
|
|
5494
5496
|
- Email \u2014 inbound email processing
|
|
5495
5497
|
- MCP \u2014 tool servers for AI assistants
|
|
5496
5498
|
- Agent \u2014 conversational LLM interface with tool access to backend methods
|
|
@@ -228,7 +228,7 @@ Returns an array of user IDs with the specified role.
|
|
|
228
228
|
|
|
229
229
|
### System Role (Platform Triggers)
|
|
230
230
|
|
|
231
|
-
When the platform invokes a method on behalf of the app (cron, webhook, email
|
|
231
|
+
When the platform invokes a method on behalf of the app (cron, webhook, email), the execution runs as a system user with `auth.roles: ['system']`. Use `auth.requireRole('system')` to restrict methods to platform triggers only:
|
|
232
232
|
|
|
233
233
|
```typescript
|
|
234
234
|
export async function regenerateCache(input: {}) {
|
|
@@ -35,7 +35,7 @@ The platform builds and deploys automatically:
|
|
|
35
35
|
|
|
36
36
|
1. **Parse manifest** — read `mindstudio.json` from the commit
|
|
37
37
|
2. **Compile methods** — esbuild bundles each method into a single JS file
|
|
38
|
-
3. **Compile interfaces** — build web SPA (`npm install && npm run build`), generate configs for API/
|
|
38
|
+
3. **Compile interfaces** — build web SPA (`npm install && npm run build`), generate configs for API/cron/webhook/etc.
|
|
39
39
|
4. **Parse table schemas** — TypeScript AST to column definitions, diff against live database
|
|
40
40
|
5. **Compute effects** — roles diff, cron diff, bot command diffs, table DDL
|
|
41
41
|
6. **Apply** — create/update roles, sync bot commands, apply DDL to a staging database copy, swap the live pointer
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Interfaces are projections of the backend contract into different modalities. The same methods power all of them. An interface can be as complex and polished as you want, but it's always safe — the backend contract is where anything real happens. The interface can't break business logic or corrupt data.
|
|
4
4
|
|
|
5
|
-
All external service connections (
|
|
5
|
+
All external service connections (webhook secrets, email addresses) are configured at the project level by the user through the Remy platform. The agent's job is to write the config files and the methods that handle the requests — not to manage API keys, OAuth flows, or service registration.
|
|
6
6
|
|
|
7
7
|
## Web Interface
|
|
8
8
|
|
|
@@ -243,53 +243,7 @@ Routes are mounted at `/_/api{path}` (e.g. `DELETE /_/api/vendors/abc123`).
|
|
|
243
243
|
|
|
244
244
|
## Platform-Triggered Interfaces
|
|
245
245
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
## Discord Bot
|
|
249
|
-
|
|
250
|
-
Slash commands that invoke methods.
|
|
251
|
-
|
|
252
|
-
### Config (`interface.json`)
|
|
253
|
-
|
|
254
|
-
```json
|
|
255
|
-
{
|
|
256
|
-
"discord": {
|
|
257
|
-
"commands": [
|
|
258
|
-
{
|
|
259
|
-
"name": "submit-vendor",
|
|
260
|
-
"description": "Request a new vendor",
|
|
261
|
-
"method": "submit-vendor-request"
|
|
262
|
-
}
|
|
263
|
-
],
|
|
264
|
-
"loadingMessage": "Processing your request..."
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
Commands are synced to Discord on deploy.
|
|
270
|
-
|
|
271
|
-
## Telegram Bot
|
|
272
|
-
|
|
273
|
-
Bot commands and message handling.
|
|
274
|
-
|
|
275
|
-
### Config (`interface.json`)
|
|
276
|
-
|
|
277
|
-
```json
|
|
278
|
-
{
|
|
279
|
-
"telegram": {
|
|
280
|
-
"commands": [
|
|
281
|
-
{
|
|
282
|
-
"command": "/submit",
|
|
283
|
-
"description": "Submit a vendor request",
|
|
284
|
-
"method": "submit-vendor-request"
|
|
285
|
-
}
|
|
286
|
-
],
|
|
287
|
-
"defaultMethod": "handle-message"
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
```
|
|
291
|
-
|
|
292
|
-
`defaultMethod` handles free-text messages that don't match a command.
|
|
246
|
+
Cron, Webhook, and Email interfaces are invoked by the platform, not by a user session. Methods called through these interfaces run with `auth.roles: ['system']`. Use `auth.requireRole('system')` to restrict a method to platform triggers only.
|
|
293
247
|
|
|
294
248
|
## Cron
|
|
295
249
|
|
|
@@ -422,19 +376,156 @@ Methods invoked through this interface run with `auth.roles: ['system']` (see th
|
|
|
422
376
|
|
|
423
377
|
## MCP (Model Context Protocol)
|
|
424
378
|
|
|
425
|
-
Expose
|
|
379
|
+
Expose the app to *external* AI agents — Claude Desktop, Cursor, other people's agents, anything that speaks MCP. Unlike the agent interface (which *is* an agent — its own LLM, personality, and chat UI), MCP has no model of its own; it's the app projected as an MCP server for an outside AI to drive.
|
|
380
|
+
|
|
381
|
+
It supports the full MCP surface:
|
|
382
|
+
- **Tools** — methods the agent can call (rich descriptions + machine-readable annotations).
|
|
383
|
+
- **Resources** — read-only app data the agent can pull into context, addressable by URI.
|
|
384
|
+
- **Prompts** — reusable, parameterized prompt templates the server offers.
|
|
385
|
+
- **Instructions** — server-level guidance shown to the calling agent (the toolset's "system prompt").
|
|
386
|
+
|
|
387
|
+
The platform hosts the server, handles auth like the API interface (optional — keyed or anonymous), and derives every tool's input schema from the method contract. Because the consumer is an external agent with no knowledge of your app, **the descriptions are the product** — see "Building MCP Interfaces" for how to write them.
|
|
388
|
+
|
|
389
|
+
### Spec: `src/interfaces/mcp.md`
|
|
390
|
+
|
|
391
|
+
Frontmatter declares the server. The body's intro prose becomes the server `instructions`; `## Tools`, `## Resources`, and `## Prompts` sections declare the rest.
|
|
392
|
+
|
|
393
|
+
```yaml
|
|
394
|
+
---
|
|
395
|
+
name: Vendor Management
|
|
396
|
+
description: Tools and data for managing vendors and purchase orders.
|
|
397
|
+
type: interface/mcp
|
|
398
|
+
---
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
```markdown
|
|
402
|
+
This server manages vendors and purchase orders. Read a vendor before updating it; submitted
|
|
403
|
+
requests go through approval before they become active.
|
|
404
|
+
|
|
405
|
+
## Tools
|
|
406
|
+
|
|
407
|
+
### Submit a vendor request
|
|
408
|
+
method: submit-vendor-request
|
|
409
|
+
~~~
|
|
410
|
+
Submit a new vendor for approval. Use when the caller wants to add a vendor.
|
|
411
|
+
Do NOT use to modify an existing vendor — that's update-vendor.
|
|
412
|
+
- name: the vendor's legal name
|
|
413
|
+
- contactEmail: billing contact; required for approval routing
|
|
414
|
+
Returns the created vendor's id and its initial "pending" status.
|
|
415
|
+
~~~
|
|
416
|
+
|
|
417
|
+
### List vendors
|
|
418
|
+
method: list-vendors
|
|
419
|
+
annotations: readOnly
|
|
420
|
+
~~~
|
|
421
|
+
List all vendors, newest first. Read-only.
|
|
422
|
+
~~~
|
|
423
|
+
|
|
424
|
+
## Resources
|
|
425
|
+
|
|
426
|
+
- list-vendors → app://vendors — "Vendors" — all vendors (application/json)
|
|
427
|
+
- get-vendor → app://vendors/{id} — "Vendor" — a single vendor by id (application/json)
|
|
428
|
+
|
|
429
|
+
## Prompts
|
|
430
|
+
|
|
431
|
+
### draft_vendor_email
|
|
432
|
+
description: Draft an outreach email to a vendor.
|
|
433
|
+
arguments: vendorId (required) — the vendor to contact
|
|
434
|
+
~~~
|
|
435
|
+
Write a warm outreach email to vendor {{vendorId}} introducing our procurement process.
|
|
436
|
+
~~~
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
Don't hand-author input schemas — the platform derives them. For a resource template, `{param}` in the URI maps to the backing method's input.
|
|
440
|
+
|
|
441
|
+
### Compiled Output: `dist/interfaces/mcp/`
|
|
442
|
+
|
|
443
|
+
```
|
|
444
|
+
dist/interfaces/mcp/
|
|
445
|
+
├── interface.json ← config the platform reads
|
|
446
|
+
├── instructions.md ← server-level guidance (returned in `initialize`)
|
|
447
|
+
├── tools/
|
|
448
|
+
│ ├── submitVendorRequest.md ← rich description, one per tool
|
|
449
|
+
│ └── listVendors.md
|
|
450
|
+
└── prompts/
|
|
451
|
+
└── draftVendorEmail.md ← prompt template body, one per prompt
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
Resources carry inline metadata only — no per-resource file.
|
|
426
455
|
|
|
427
456
|
### Config (`interface.json`)
|
|
428
457
|
|
|
429
458
|
```json
|
|
430
459
|
{
|
|
431
460
|
"mcp": {
|
|
432
|
-
"
|
|
461
|
+
"name": "Vendor Management",
|
|
462
|
+
"description": "Tools and data for managing vendors and purchase orders.",
|
|
463
|
+
"instructions": "instructions.md",
|
|
464
|
+
"tools": [
|
|
465
|
+
{
|
|
466
|
+
"method": "submit-vendor-request",
|
|
467
|
+
"name": "submit_vendor_request",
|
|
468
|
+
"title": "Submit Vendor Request",
|
|
469
|
+
"description": "tools/submitVendorRequest.md",
|
|
470
|
+
"annotations": { "readOnly": false, "destructive": false, "idempotent": false, "openWorld": false }
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
"method": "list-vendors",
|
|
474
|
+
"title": "List Vendors",
|
|
475
|
+
"description": "tools/listVendors.md",
|
|
476
|
+
"annotations": { "readOnly": true }
|
|
477
|
+
}
|
|
478
|
+
],
|
|
479
|
+
"resources": [
|
|
480
|
+
{ "method": "list-vendors", "uri": "app://vendors", "name": "Vendors", "description": "All vendors.", "mimeType": "application/json" },
|
|
481
|
+
{ "method": "get-vendor", "uriTemplate": "app://vendors/{id}", "name": "Vendor", "description": "A single vendor by id.", "mimeType": "application/json" }
|
|
482
|
+
],
|
|
483
|
+
"prompts": [
|
|
484
|
+
{
|
|
485
|
+
"name": "draft_vendor_email",
|
|
486
|
+
"title": "Draft vendor email",
|
|
487
|
+
"description": "Draft an outreach email to a vendor.",
|
|
488
|
+
"arguments": [ { "name": "vendorId", "description": "The vendor to contact", "required": true } ],
|
|
489
|
+
"template": "prompts/draftVendorEmail.md"
|
|
490
|
+
}
|
|
491
|
+
]
|
|
433
492
|
}
|
|
434
493
|
}
|
|
435
494
|
```
|
|
436
495
|
|
|
437
|
-
|
|
496
|
+
| Field | Description |
|
|
497
|
+
|-------|-------------|
|
|
498
|
+
| `name`, `description` | Server display name + registry metadata (not shown to the calling agent) |
|
|
499
|
+
| `instructions` | Relative path to the server-level guidance returned in `initialize` |
|
|
500
|
+
| `tools[].method` | Method `id` from the manifest (kebab-case) |
|
|
501
|
+
| `tools[].name` | Tool name exposed to clients. Optional — defaults to the method `id`. Must match `[a-zA-Z0-9_-]` and be unique within the server |
|
|
502
|
+
| `tools[].title` | Optional human-friendly display name |
|
|
503
|
+
| `tools[].description` | Relative path to the tool's markdown description |
|
|
504
|
+
| `tools[].annotations` | Optional client hints (auto-call vs. confirm): `readOnly`, `destructive`, `idempotent`, `openWorld` — map to MCP's `readOnlyHint` etc. |
|
|
505
|
+
| `resources[].method` | The read method invoked when the resource is read |
|
|
506
|
+
| `resources[].uri` / `uriTemplate` | A static URI, or a template whose `{param}` maps to the method's input |
|
|
507
|
+
| `resources[].name`, `description`, `mimeType` | Resource metadata |
|
|
508
|
+
| `prompts[].name`, `title`, `description` | Prompt identity + metadata |
|
|
509
|
+
| `prompts[].arguments` | `[{ name, description?, required? }]` |
|
|
510
|
+
| `prompts[].template` | Relative path to the template body (`{{arg}}` placeholders) |
|
|
511
|
+
|
|
512
|
+
There is no `inputSchema` field — the platform derives each tool's schema from the method's input contract.
|
|
513
|
+
|
|
514
|
+
### Platform Behavior
|
|
515
|
+
|
|
516
|
+
- The platform hosts the MCP server and exposes it to external clients. Clients connect at `POST https://{app-host}/_/mcp`.
|
|
517
|
+
- **Auth is optional**, identical to the API interface: a `Bearer` key resolves to a user with full RBAC; with no key, calls run anonymously (no user, no roles). The method is the boundary — gate sensitive tools with `auth.requireRole`/`requireUser`; a public (keyless) server exposes only the un-gated tools.
|
|
518
|
+
- Input schemas are derived automatically from each method's input contract.
|
|
519
|
+
- `tools/list` is static; access is enforced per-method at call time (a gated tool is listed but rejects an unauthorized call).
|
|
520
|
+
- A resource read invokes the backing method (template `{param}`s come from the URI) and returns its output as the resource contents.
|
|
521
|
+
- `prompts/get` fills the template with the provided arguments.
|
|
522
|
+
- `instructions` is returned in the `initialize` response.
|
|
523
|
+
|
|
524
|
+
### Manifest
|
|
525
|
+
|
|
526
|
+
```json
|
|
527
|
+
{ "type": "mcp", "path": "dist/interfaces/mcp/interface.json" }
|
|
528
|
+
```
|
|
438
529
|
|
|
439
530
|
## Agent (Conversational Interface)
|
|
440
531
|
|
|
@@ -514,8 +605,6 @@ Each interface is declared in `mindstudio.json`:
|
|
|
514
605
|
{ "type": "web", "path": "dist/interfaces/web/web.json" },
|
|
515
606
|
{ "type": "api" },
|
|
516
607
|
{ "type": "cron", "path": "dist/interfaces/cron/interface.json" },
|
|
517
|
-
{ "type": "discord", "path": "dist/interfaces/discord/interface.json" },
|
|
518
|
-
{ "type": "telegram", "path": "dist/interfaces/telegram/interface.json" },
|
|
519
608
|
{ "type": "webhook", "path": "dist/interfaces/webhook/interface.json" },
|
|
520
609
|
{ "type": "email", "path": "dist/interfaces/email/interface.json" },
|
|
521
610
|
{ "type": "mcp", "path": "dist/interfaces/mcp/interface.json" },
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
|
|
112
112
|
| Field | Type | Required | Description |
|
|
113
113
|
|-------|------|----------|-------------|
|
|
114
|
-
| `type` | `string` | Yes | One of: `web`, `api`, `
|
|
114
|
+
| `type` | `string` | Yes | One of: `web`, `api`, `cron`, `webhook`, `email`, `mcp`, `agent` |
|
|
115
115
|
| `path` | `string` | No | Path to the interface config file |
|
|
116
116
|
| `config` | `object` | No | Inline config (alternative to a file) |
|
|
117
117
|
| `enabled` | `boolean` | No | Default `true`. Set `false` to skip during build. |
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Building MCP Interfaces
|
|
2
|
+
|
|
3
|
+
Guidance for exposing an app as an MCP server — a tool / resource / prompt surface for *external* AI agents (Claude Desktop, Cursor, anyone's agent). The contract (spec format, compiled output, `interface.json`) is in the Interfaces doc; this is how to author one well. Unlike the agent interface, there's no LLM, personality, or UI to design — the entire product is the descriptions and the shape of what you expose.
|
|
4
|
+
|
|
5
|
+
## The descriptions are the product
|
|
6
|
+
|
|
7
|
+
The calling agent is a stranger with no knowledge of your app. It decides what to invoke entirely from the names, descriptions, and annotations you ship. Follow the same principles as the agent interface's tool descriptions (see "Building Agent Interfaces" — when to use and when not, parameter guidance beyond the schema, what the tool returns) — but write them **self-contained**. An in-app agent tool can lean on the app's framing; an MCP tool can't, because the caller has no context. Spell out what an outsider wouldn't know.
|
|
8
|
+
|
|
9
|
+
## Curate — not every method is a tool
|
|
10
|
+
|
|
11
|
+
Expose what an outside agent would actually use. Skip internal helpers, admin-only methods, and batch operations. A focused set of well-described tools beats a large set of thin ones. Note role restrictions in the description — gated tools are listed but reject unauthorized calls at runtime, so set expectations rather than surfacing a raw error.
|
|
12
|
+
|
|
13
|
+
## Annotations
|
|
14
|
+
|
|
15
|
+
Annotations are machine-readable hints clients use to decide whether to auto-call a tool or ask the user first. Set them honestly:
|
|
16
|
+
|
|
17
|
+
- `readOnly` — the tool only reads, never mutates. The highest-value hint: clients auto-call reads without prompting, so set it on every pure read.
|
|
18
|
+
- `destructive` — the tool can delete or overwrite. Clients gate these behind confirmation.
|
|
19
|
+
- `idempotent` — calling twice with the same arguments has the same effect as calling once.
|
|
20
|
+
- `openWorld` — the tool reaches outside the app (external web/services) rather than operating only on app data.
|
|
21
|
+
|
|
22
|
+
## Tools vs. resources
|
|
23
|
+
|
|
24
|
+
A **tool** is an action the agent *invokes*; a **resource** is data the agent *reads into context*. A read-only method can be either — expose it as a tool if the agent will call it as a step, as a resource if it's reference data the agent should pull in, and as both when both fit.
|
|
25
|
+
|
|
26
|
+
Resources are method-backed: a read invokes the method. Use a static `uri` for a fixed collection (`app://vendors`) and a `uriTemplate` when the read takes parameters (`app://vendors/{id}`, where `{id}` maps to the method's input). Keep URIs stable and human-legible.
|
|
27
|
+
|
|
28
|
+
## Prompts
|
|
29
|
+
|
|
30
|
+
Prompts are reusable, parameterized templates the server offers to clients — e.g. a "draft a vendor email" starter. Author the template body with `{{arg}}` placeholders and declare its arguments. Offer a prompt when there's a recurring task worth packaging; skip it if a tool already covers the need.
|
|
31
|
+
|
|
32
|
+
## Server instructions
|
|
33
|
+
|
|
34
|
+
The spec's intro prose becomes the server `instructions` — toolset-level guidance returned to the calling agent at connect time (its "system prompt"). Put *cross-cutting* guidance here: how the tools fit together, ordering or prerequisites ("read a vendor before updating it"), and norms that apply across the whole toolset. Keep per-tool specifics in the tool descriptions; instructions are for the toolset as a whole.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Methods
|
|
2
2
|
|
|
3
|
-
A method is a named async function that runs on the platform. It's the universal unit of backend logic — every interface (web, API,
|
|
3
|
+
A method is a named async function that runs on the platform. It's the universal unit of backend logic — every interface (web, API, cron, webhook) invokes methods. One file per method, one named export.
|
|
4
4
|
|
|
5
5
|
## Writing a Method
|
|
6
6
|
|
|
@@ -41,12 +41,14 @@ my-app/
|
|
|
41
41
|
package.json
|
|
42
42
|
src/
|
|
43
43
|
api/api.json REST API config
|
|
44
|
-
discord/interface.json Discord bot config
|
|
45
|
-
telegram/interface.json Telegram bot config
|
|
46
44
|
cron/interface.json cron config
|
|
47
45
|
webhook/interface.json webhook config
|
|
48
46
|
email/interface.json email config
|
|
49
|
-
mcp/
|
|
47
|
+
mcp/ MCP interface
|
|
48
|
+
interface.json MCP config
|
|
49
|
+
instructions.md server instructions
|
|
50
|
+
tools/ tool descriptions (one .md per method)
|
|
51
|
+
prompts/ prompt templates (one .md per prompt)
|
|
50
52
|
agent/ agent interface
|
|
51
53
|
agent.json agent config
|
|
52
54
|
system.md compiled system prompt
|
|
@@ -93,7 +95,7 @@ const { vendor } = await api.approveVendor({ vendorId: '...' });
|
|
|
93
95
|
|
|
94
96
|
- **Managed databases.** SQLite with typed schemas. Push a schema change and the platform diffs, migrates, and promotes atomically.
|
|
95
97
|
- **Built-in auth.** Opt-in via manifest. Developer builds login UI, platform handles verification codes (email/SMS), cookie sessions, and role enforcement. Backend methods use `auth.requireRole('admin')` for access control.
|
|
96
|
-
- **Multiple interfaces, one codebase.** Web, API,
|
|
98
|
+
- **Multiple interfaces, one codebase.** Web, API, Cron, Webhook, Email, MCP — all invoke the same methods. Methods don't know which interface called them.
|
|
97
99
|
- **Sandboxed execution.** Each method invocation runs in its own isolated execution context with npm packages pre-installed.
|
|
98
100
|
- **Git-native deployment.** Push to default branch to deploy. Push to feature branch for preview. Rollback is a git revert.
|
|
99
101
|
- **Secrets.** Encrypted environment variables with separate dev/prod values. Injected as `process.env` in methods. For third-party service credentials not covered by the SDK.
|
|
@@ -11,7 +11,7 @@ Remy apps are full-stack TypeScript projects. You have a lot to work with:
|
|
|
11
11
|
- **Backend (Methods):** TypeScript in a sandboxed runtime. Any npm package. Managed SQLite database with typed schemas and automatic migrations. Built-in app-managed auth with email/SMS verification, cookie sessions, and role enforcement. None of these are required — use what the app needs.
|
|
12
12
|
- **Frontend (Web Interface):** Starts as Vite + React, but any TypeScript project with a build command works. Any framework, any library, or no framework at all.
|
|
13
13
|
- **AI & integrations:** The `@mindstudio-ai/agent` SDK gives access to 200+ AI models (OpenAI, Anthropic, Google, Meta, Mistral, and more) and 1000+ integrations (email, SMS, Slack, HubSpot, Google Workspace, web scraping, image/video generation, media processing) with zero configuration — credentials are handled automatically. No API keys needed. Beyond individual actions, `runTask()` lets you spin up lightweight autonomous task agents that chain these actions together with judgment — e.g., a user types a restaurant name and the backend autonomously researches it in the background, finds the address, and generates a custom illustration. Think about where this kind of enrichment would make a feature go from functional to magical.
|
|
14
|
-
- **Interfaces:** Web UI, REST API, cron jobs, webhooks,
|
|
14
|
+
- **Interfaces:** Web UI, REST API, cron jobs, webhooks, MCP tool servers, email processors, conversational AI agents — all backed by the same methods. An app can use any combination.
|
|
15
15
|
|
|
16
16
|
This is a capable, stable platform. Build with confidence; you're building production-grade apps, not fragile prototypes.
|
|
17
17
|
|
|
@@ -24,7 +24,7 @@ Don't recite this list to users. Use it to calibrate your sense of what's possib
|
|
|
24
24
|
- **Full-stack web apps** — social platforms, membership sites, marketplaces, booking systems, community hubs — multi-user apps with auth, data, UI
|
|
25
25
|
- **Automations** — cron jobs that monitor competitors and send alerts, webhook handlers that sync data between services, email processors that triage support requests — no UI needed
|
|
26
26
|
- **Conversational AI agents** — custom chat UIs backed by any model, with tool access to the app's methods. Full control over what the agent can do and who can use it
|
|
27
|
-
- **
|
|
27
|
+
- **Agent tools** — MCP tool servers for AI assistants
|
|
28
28
|
- **Creative projects** — browser games with p5.js or Three.js, interactive visualizations, 3D things, generative art, portfolio sites with dynamic backends
|
|
29
29
|
- **Marketing & launch pages** — landing pages, waitlist pages with referral mechanics, product sites with scroll animations — visual polish is a strength here
|
|
30
30
|
- **API services** — backend logic exposed as REST endpoints
|