@yottagraph-app/aether-instructions 1.1.27 → 1.1.28
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/commands/build_my_app.md +3 -3
- package/commands/update_instructions.md +23 -0
- package/package.json +3 -2
- package/rules/aether.mdc +2 -2
- package/rules/agents-data.mdc +72 -0
- package/rules/agents.mdc +2 -54
- package/rules/architecture.mdc +9 -10
- package/rules/cookbook-data.mdc +405 -0
- package/rules/cookbook.mdc +2 -397
- package/rules/{api.mdc → data.mdc} +4 -4
- package/rules/instructions_warning.mdc +2 -2
- package/rules/server-data.mdc +54 -0
- package/rules/server.mdc +2 -48
- package/rules/something-broke.mdc +1 -1
- package/variants/mcp-only/commands/build_my_app.md +146 -0
- package/variants/mcp-only/rules/agents-data.mdc +45 -0
- package/variants/mcp-only/rules/cookbook-data.mdc +50 -0
- package/variants/mcp-only/rules/data.mdc +55 -0
- package/variants/mcp-only/rules/server-data.mdc +41 -0
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# Build My App (MCP-only data mode)
|
|
2
|
+
|
|
3
|
+
Read the project brief and build the described application.
|
|
4
|
+
|
|
5
|
+
**MCP-only** means the SPA does **not** use `useElementalClient()` for primary platform data — **ADK agents** use **Elemental MCP** to reach the graph.
|
|
6
|
+
|
|
7
|
+
**Valid product shapes include:**
|
|
8
|
+
|
|
9
|
+
- **Materialized data** — Agents sync or aggregate graph data into **Postgres** (or similar); the Nuxt app reads via your own APIs and composables.
|
|
10
|
+
- **Research / investigation / aggregation** — Agents use MCP tools inside multi-step workflows; outputs may be answers, reports, or partial writes — with or without a large local mirror of the graph.
|
|
11
|
+
- **Channeling** — Agents invoke MCP tools and return **natural-language** answers to the user (often chat-first; minimal or no Postgres for graph data).
|
|
12
|
+
- **Mixes** — e.g. a sync job for dashboards plus a research agent plus a channel agent for Q&A.
|
|
13
|
+
|
|
14
|
+
Read the **`data`** and **`agents-data`** cursor rules for detail.
|
|
15
|
+
|
|
16
|
+
**This is meant to be the first thing a user runs after opening their project in Cursor.**
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Step 1: Read the Brief and Design References
|
|
21
|
+
|
|
22
|
+
Read `DESIGN.md` from the project root.
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
cat DESIGN.md
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Look for a `## Vision` section — this contains the project creator's description of what they want to build.
|
|
29
|
+
|
|
30
|
+
**If the file doesn't exist or has no Vision section:**
|
|
31
|
+
|
|
32
|
+
> No project brief found. That's fine — tell me what you'd like to build and I'll help you get started!
|
|
33
|
+
|
|
34
|
+
Stop here and wait for the user to describe what they want.
|
|
35
|
+
|
|
36
|
+
### Long-form briefs
|
|
37
|
+
|
|
38
|
+
If the Vision section is long (roughly 500+ words — a full PRD, spec, or design doc), don't try to hold it all in your head at once. Instead:
|
|
39
|
+
|
|
40
|
+
1. Read the full Vision section carefully.
|
|
41
|
+
2. Extract the **core purpose** (one sentence: what is this app for?).
|
|
42
|
+
3. Identify the **MVP feature set** — the minimum set of features that delivers the core value. Look for explicit priority indicators (P0/P1, "must have" vs "nice to have", numbered phases). If none exist, use your judgment: what's the smallest thing that works end-to-end?
|
|
43
|
+
4. Create `design/requirements.md` with your extracted requirements, grouped by priority. This becomes your working checklist.
|
|
44
|
+
5. Build the MVP first, then iterate. Don't try to implement every detail from a long brief in one pass.
|
|
45
|
+
|
|
46
|
+
### Design references
|
|
47
|
+
|
|
48
|
+
Check for a `## Design References` section in DESIGN.md and for files in `design/references/`:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
ls design/references/ 2>/dev/null
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
If design reference images exist (screenshots from Figma or other design tools):
|
|
55
|
+
|
|
56
|
+
1. **Examine each image** — these are design mockups from the project creator showing what the app should look like.
|
|
57
|
+
2. Describe what you see in each image: layout structure, navigation patterns, component types, color usage, typography.
|
|
58
|
+
3. Map visual elements to **Vuetify components** (cards = `v-card`, data tables = `v-data-table`, navigation drawers = `v-navigation-drawer`, app bars = `v-app-bar`, etc.). If a `vuetify-figma` skill is available in `.cursor/skills/`, read it for detailed component mapping guidance.
|
|
59
|
+
4. Use the design references alongside the Vision text to plan the UX. The images show _what it should look like_; the Vision text explains _what it should do_.
|
|
60
|
+
|
|
61
|
+
If a Figma URL is referenced in DESIGN.md, note it for the user but don't attempt to fetch it — work from the uploaded screenshots and the text brief.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Step 2: MCP for development
|
|
66
|
+
|
|
67
|
+
Check if Lovelace MCP tools are available (e.g. `elemental_get_schema`, `elemental_get_entity`). Use them while **authoring agents** and validating graph behavior.
|
|
68
|
+
|
|
69
|
+
**If MCP tools are NOT available**, check `.cursor/mcp.json`:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
cat .cursor/mcp.json 2>/dev/null
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
If the file exists but tools aren't active yet:
|
|
76
|
+
|
|
77
|
+
> Your project has Lovelace MCP servers configured (`.cursor/mcp.json`), but they don't appear to be active yet. Cursor disables new MCP servers by default.
|
|
78
|
+
>
|
|
79
|
+
> Open **Cursor Settings** (Cmd+Shift+J on macOS) → **Tools & MCP** and enable the `lovelace-*` servers listed there. They should show green toggles when active. Let me know when they're enabled (or if you'd like to skip this).
|
|
80
|
+
|
|
81
|
+
Wait for confirmation before proceeding if you asked the user to enable servers. If the user skips or the panel isn't available (e.g. Cursor Cloud), proceed — you can still follow the **`data`** rule and ship agents that use MCP at **runtime**.
|
|
82
|
+
|
|
83
|
+
The **Nuxt** layer may combine **your APIs** (often Postgres-backed), **chat** via **`useAgentChat`**, or both — not Elemental REST from Vue for graph data.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Step 3: Understand the Environment
|
|
88
|
+
|
|
89
|
+
Run `npm install` / `node init-project.js` as needed so `.cursor/skills/` includes **`data-model`** (no `elemental-api` skill in this mode).
|
|
90
|
+
|
|
91
|
+
Read:
|
|
92
|
+
|
|
93
|
+
1. `DESIGN.md` — which of the valid shapes above (or a mix) the brief implies
|
|
94
|
+
2. `broadchurch.yaml`
|
|
95
|
+
3. **`data` rule** — MCP-only patterns
|
|
96
|
+
4. **`agents-data` rule** — wiring MCP into ADK
|
|
97
|
+
5. **`cookbook-data` / `server` / `server-data`** — when the UI lists data from **your** APIs / Postgres
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Step 4: Verify assumptions
|
|
102
|
+
|
|
103
|
+
- **Postgres-backed UIs:** confirm **`DATABASE_URL`** where needed; plan tables and **`data-model`** semantics for agents that materialize data.
|
|
104
|
+
- **Chat-first:** confirm **`useAgentChat`** + gateway; agents registered; MCP available in the agent runtime.
|
|
105
|
+
- Explore schema with MCP tools in Cursor as needed for any shape.
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Step 5: Design the UX
|
|
110
|
+
|
|
111
|
+
Match the brief: dashboards from `/api/...`, **chat** as primary, or both. No Elemental client calls in components for graph data.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Step 6: Build
|
|
116
|
+
|
|
117
|
+
1. **`agents/`** — one or more agents per `agents-data` (sync, research, channeling, or mixed).
|
|
118
|
+
2. **`server/api/` + composables + `pages/`** — when the brief needs materialized lists or detail.
|
|
119
|
+
3. **`pages/chat` or custom** — when the brief is agent-forward.
|
|
120
|
+
4. **`DESIGN.md`** — document what you shipped.
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Step 7: Verify
|
|
125
|
+
|
|
126
|
+
After building, ensure dependencies are installed and run a production build:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
test -d node_modules || npm install
|
|
130
|
+
npm run build
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Fix any build errors. Then suggest the user run `npm run dev` to preview locally.
|
|
134
|
+
|
|
135
|
+
Deploy agents as needed; if the brief relies on **materialized** data, run or schedule the relevant agents before expecting full UI data.
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Step 8: Next steps
|
|
140
|
+
|
|
141
|
+
> Your app is taking shape. Suggested follow-ups:
|
|
142
|
+
>
|
|
143
|
+
> - **Preview locally** with `npm run dev`
|
|
144
|
+
> - **Push to deploy** — Vercel auto-deploys on push to main
|
|
145
|
+
> - **Agents** — run `/deploy_agent` when an agent is ready; ensure MCP is configured for the agent runtime per `agents-data`
|
|
146
|
+
> - **MCP servers** — run `/deploy_mcp` if you add custom tool servers
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "MCP-only: ADK agents use Elemental MCP for sync, research, investigation, aggregation, or channeling — Postgres optional."
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
globs: agents/**
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Agents: Elemental MCP (MCP-only)
|
|
8
|
+
|
|
9
|
+
In **mcp-only** mode, **Elemental MCP** is the primary way agents reach the knowledge graph. **`broadchurch_auth` HTTP** to the Query Server is the **api-mcp** path; here you wire **MCP tools** into ADK (e.g. **McpToolset** + `SseConnectionParams` to your Elemental MCP URL — from env or `broadchurch.yaml` / gateway).
|
|
10
|
+
|
|
11
|
+
## Primary agent patterns (all first-class)
|
|
12
|
+
|
|
13
|
+
**A. Sync / materialization** — Agent runs on a schedule or event, calls MCP tools (`elemental_get_schema`, `elemental_get_entity`, …), maps results into **Neon** (or another store) with **`psycopg2-binary`** (or your driver). Idempotent **UPSERT**s. Use **`data-model`** skill when designing columns.
|
|
14
|
+
|
|
15
|
+
**B. Investigation / research / aggregation** — Agent uses MCP tools **during multi-step reasoning**: compare entities, trace relationships, pull events or filings, summarize. Typical outputs: a **final answer**, a **report artifact**, or **partial writes** to a store; a full graph replica is optional. Postgres is optional.
|
|
16
|
+
|
|
17
|
+
**C. Channel / concierge** — Agent is the **user’s interface** to the graph: user message → agent selects and invokes MCP tools → **natural-language reply** (with optional structured blocks). Often pairs with **`useAgentChat`** in Nuxt; **no local DB** required for the graph if answers are computed on the fly.
|
|
18
|
+
|
|
19
|
+
You can deploy **multiple agents** with different mixes of A–C.
|
|
20
|
+
|
|
21
|
+
## Python stack (typical)
|
|
22
|
+
|
|
23
|
+
- `google-adk` — agent framework
|
|
24
|
+
- MCP client or ADK **McpToolset** — `ELEMENTAL_MCP_URL` or gateway-proxied MCP URL
|
|
25
|
+
- **`psycopg2-binary`** — only when an agent **persists** to `DATABASE_URL`
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
export ELEMENTAL_MCP_URL="https://.../elemental/mcp" # or gateway URL from provisioning
|
|
29
|
+
# Optional, for sync agents:
|
|
30
|
+
export DATABASE_URL="postgresql://..."
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Tool surface
|
|
34
|
+
|
|
35
|
+
MCP tools handle schema, entity resolution, related entities, events, sentiment, etc. Use them for **discovery** in research agents and for **batch extraction** in sync agents. Match tool choice to the pattern (A/B/C) in each agent’s `instruction`.
|
|
36
|
+
|
|
37
|
+
## When HTTP `elemental_client` still appears
|
|
38
|
+
|
|
39
|
+
**api-mcp** agents often use **`broadchurch_auth`** + REST. In **mcp-only**, prefer **MCP** for graph access unless you have a concrete reason to call REST from Python (e.g. legacy batch job). Do not route **Vue** through REST for the primary architecture — that contradicts mcp-only.
|
|
40
|
+
|
|
41
|
+
## Instructions template
|
|
42
|
+
|
|
43
|
+
- **Sync agent:** Instruct: which MCP calls, how rows map to tables, UPSERT behavior, logging, failure handling.
|
|
44
|
+
- **Research agent:** Instruct: hypothesis → tool calls → synthesis; cite NEIDs or entity names; when to stop.
|
|
45
|
+
- **Channel agent:** Instruct: clarify user intent → call tools → answer directly; optional follow-up questions.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "MCP-only: UI recipes when data is exposed via your own APIs (often Postgres). Chat-first or agent-only flows may skip these."
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Data-fetching cookbook (MCP-only)
|
|
7
|
+
|
|
8
|
+
**Valid UIs for mcp-only include:** (a) **Chat-first** surfaces where the user talks to an agent that calls MCP tools (`useAgentChat`, agent design — see `data` / `agents-data`). (b) **List/detail/table** screens fed by **your** Nitro APIs, often backed by **Postgres** rows populated by agents that used Elemental MCP upstream.
|
|
9
|
+
|
|
10
|
+
**These recipes** cover (b): tabular or list data through Nitro APIs.
|
|
11
|
+
|
|
12
|
+
When you build Postgres-backed screens:
|
|
13
|
+
|
|
14
|
+
Assume composables like `useEntities()` wrap `$fetch('/api/entities')` — adjust paths to match your project.
|
|
15
|
+
|
|
16
|
+
## 1. Entity list page
|
|
17
|
+
|
|
18
|
+
```vue
|
|
19
|
+
<template>
|
|
20
|
+
<div class="d-flex flex-column fill-height pa-4">
|
|
21
|
+
<h1 class="text-h5 mb-4">Entities</h1>
|
|
22
|
+
<v-alert v-if="error" type="error" variant="tonal" class="mb-4" closable>{{ error }}</v-alert>
|
|
23
|
+
<v-data-table :items="items" :loading="loading" />
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script setup lang="ts">
|
|
28
|
+
const { items, loading, error, refresh } = useEntities();
|
|
29
|
+
|
|
30
|
+
onMounted(() => refresh());
|
|
31
|
+
</script>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Implement `useEntities()` to call `GET /api/entities` (or paginated variant). The server route runs SQL against **your** tables (populated by agents via MCP), not Elemental REST from this handler.
|
|
35
|
+
|
|
36
|
+
## 2. Search / filter
|
|
37
|
+
|
|
38
|
+
Use query params on the same API: `GET /api/entities?q=apple`. Server uses `ILIKE` or a `tsvector` if you add search indexes.
|
|
39
|
+
|
|
40
|
+
## 3. News or events feed
|
|
41
|
+
|
|
42
|
+
`GET /api/events?limit=20` returning rows your pipeline populated (agent + MCP → storage). Display from columns — no `useElementalSchema()` in Vue.
|
|
43
|
+
|
|
44
|
+
## 4. Master-detail with relationships
|
|
45
|
+
|
|
46
|
+
Foreign keys in Postgres that mirror relationships your agents synced or derived. Detail via `GET /api/entities/:id` and related rows.
|
|
47
|
+
|
|
48
|
+
## 5. Filings or documents
|
|
49
|
+
|
|
50
|
+
Metadata in a table keyed by org or symbol; ingestion happened in an agent using MCP — the UI reads your API only.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "MCP-only data mode: no Elemental REST client in Nuxt; Elemental MCP is used by ADK agents — sync, research, or direct channeling."
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Data — MCP-only (agents + Elemental MCP, not the Elemental API in the SPA)
|
|
7
|
+
|
|
8
|
+
In **mcp-only** mode the Nuxt app does **not** call the Elemental API via `useElementalClient()` or gateway REST from the browser. **Elemental MCP** is how custom **ADK agents** reach the Lovelace knowledge graph.
|
|
9
|
+
|
|
10
|
+
**Valid applications include:**
|
|
11
|
+
|
|
12
|
+
1. **Sync / local store** — Agents call Elemental MCP tools, normalize results, and **persist** into **Neon Postgres** (or another store you own). The **web app reads that store** via Nitro routes and composables. Suited to dashboards, feeds, and CRUD UIs backed by materialized graph data.
|
|
13
|
+
|
|
14
|
+
2. **Investigation / research / aggregation** — Agents use Elemental MCP tools **inside their reasoning loop** (schema discovery, entity resolution, related entities, events, sentiment) to **investigate**, **research**, or **aggregate** answers. Summaries or structured outputs may go to Postgres, KV, or nowhere persistent — emphasis is on the **agent workflow** and the delivered answer.
|
|
15
|
+
|
|
16
|
+
3. **Direct channeling** — An agent **channels** Elemental MCP to the user: the user talks to the agent (e.g. via `useAgentChat`), and the agent invokes MCP tools and **responds in natural language** with citations or structured excerpts. **Chat-first** SPAs; Postgres may be absent or limited to prefs/KV.
|
|
17
|
+
|
|
18
|
+
**Combining patterns:** One project can run a sync job for hot data, a research agent for deep dives, and a channel agent for Q&A.
|
|
19
|
+
|
|
20
|
+
## What does not exist in this mode (SPA / Nitro conventions)
|
|
21
|
+
|
|
22
|
+
- Do **not** use `useElementalClient()` from `@yottagraph-app/elemental-api/client` for the **standard data path** of the UI described in api-mcp docs.
|
|
23
|
+
- Do **not** assume `~/utils/elementalHelpers` for **primary** user-facing data fetch in Vue — graph access for agents is via **MCP in Python**, not from Vue calling REST.
|
|
24
|
+
- The **`skills/elemental-api/`** skill directory is not installed for mcp-only projects. Use **`skills/data-model/`** for entity/property/relationship semantics when designing agent instructions, tables, or prompts.
|
|
25
|
+
|
|
26
|
+
## When the product surfaces data via Postgres
|
|
27
|
+
|
|
28
|
+
If you **do** use the sync pattern, treat Neon as the **read model** for those pages:
|
|
29
|
+
|
|
30
|
+
1. **`DATABASE_URL`** — Use `getDb()` from `~/server/utils/neon.ts` in server routes.
|
|
31
|
+
2. **Schema** — `CREATE TABLE IF NOT EXISTS` / `ensureTables()` (see `server` rule). Align columns with the **data-model** skill where relevant.
|
|
32
|
+
3. **Composables** — Thin wrappers around `$fetch('/api/...')` to your own APIs (`useEntities`, etc.).
|
|
33
|
+
4. **Agents that populate tables** — Call Elemental MCP tools, map to rows, **UPSERT** idempotently. Document env (`DATABASE_URL`, MCP URL) in `DESIGN.md` or the agent README.
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
Elemental MCP → ADK agent → Postgres ← Nitro ← Vue (sync / dashboard pattern)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## When the product is agent-first (no Postgres read path)
|
|
40
|
+
|
|
41
|
+
Chat UI + deployed agents that call MCP tools and return answers **without** mirroring the full graph locally. The **gateway** and **`useAgentChat`** are the integration surface; Postgres may be unused for graph data.
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
User → Nuxt chat → Portal Gateway → ADK agent → Elemental MCP tools → answer to user (channeling / research)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Local development
|
|
48
|
+
|
|
49
|
+
- **Postgres-backed UIs:** Without `DATABASE_URL`, `getDb()` returns `null` — empty states or 503; do not fall back to Elemental REST from the client.
|
|
50
|
+
- **Cursor:** Elemental MCP in your **tool list** helps you author and test agent behavior; tenant users still rely on **deployed agents** and MCP configured for the agent runtime, not the Vue bundle.
|
|
51
|
+
|
|
52
|
+
## Error handling
|
|
53
|
+
|
|
54
|
+
- Empty tables after deploy are normal until a **sync** agent runs — only applies if you use the Postgres pattern.
|
|
55
|
+
- If Vue code imports Elemental client packages for primary data, you are mixing modes — move graph access to **agents + MCP** or switch data architecture in `DESIGN.md` / provisioning.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "MCP-only: Nitro routes that read your own store (often Neon). Not used for proxying Elemental REST to the SPA."
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
globs: server/**
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Server routes: your data store (MCP-only)
|
|
8
|
+
|
|
9
|
+
In mcp-only mode, **server routes do not** implement the **Elemental REST** proxy pattern from api-mcp for the **primary** SPA data path. Graph access lives in **agents + Elemental MCP**.
|
|
10
|
+
|
|
11
|
+
This rule applies when your architecture includes a **local read model** (usually **Neon Postgres**) filled by agents that called MCP upstream. **Chat-only** or **agent-only** products may have **few or no** such routes — that is fine.
|
|
12
|
+
|
|
13
|
+
## Pattern (Postgres-backed lists / detail)
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { getDb } from '~/server/utils/neon';
|
|
17
|
+
|
|
18
|
+
export default defineEventHandler(async (event) => {
|
|
19
|
+
const sql = getDb();
|
|
20
|
+
if (!sql) throw createError({ statusCode: 503, statusMessage: 'Database not configured' });
|
|
21
|
+
|
|
22
|
+
const q = getQuery(event).q as string | undefined;
|
|
23
|
+
if (q) {
|
|
24
|
+
return await sql`
|
|
25
|
+
SELECT neid, name, updated_at FROM entities
|
|
26
|
+
WHERE name ILIKE ${'%' + q + '%'}
|
|
27
|
+
ORDER BY updated_at DESC LIMIT 50
|
|
28
|
+
`;
|
|
29
|
+
}
|
|
30
|
+
return await sql`SELECT neid, name, updated_at FROM entities ORDER BY updated_at DESC LIMIT 50`;
|
|
31
|
+
});
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## `ensureTables`
|
|
35
|
+
|
|
36
|
+
Call a shared `ensureTables()` before reads if tables might be missing on cold start (see `server` rule).
|
|
37
|
+
|
|
38
|
+
## Secrets
|
|
39
|
+
|
|
40
|
+
- **`DATABASE_URL`** — for your app’s relational store when you use one.
|
|
41
|
+
- Do not treat **Nitro** as the place to **call Elemental MCP** for end-user traffic — MCP runs in **agent** runtimes. (Cursor MCP in dev is for authoring.)
|