@yottagraph-app/aether-instructions 1.1.39 → 1.1.40

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/rules/server.mdc +19 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yottagraph-app/aether-instructions",
3
- "version": "1.1.39",
3
+ "version": "1.1.40",
4
4
  "description": "Cursor rules, commands, and skills for Aether development",
5
5
  "files": [
6
6
  "rules",
package/rules/server.mdc CHANGED
@@ -20,7 +20,7 @@ server/
20
20
  │ └── avatar/[url].ts # Avatar image proxy
21
21
  └── utils/
22
22
  ├── redis.ts # Upstash Redis client (lazy-init from KV_REST_API_URL)
23
- ├── neon.ts # Neon Postgres client (lazy-init from DATABASE_URL) — present if Neon provisioned
23
+ ├── neon.ts # Neon Postgres client (lazy-init from DATABASE_URL) — create if missing when Neon is provisioned
24
24
  └── cookies.ts # Cookie handling (@hapi/iron)
25
25
  ```
26
26
 
@@ -73,16 +73,27 @@ calling KV routes directly — see the `pref` rule.
73
73
 
74
74
  ## Neon Postgres
75
75
 
76
- If `DATABASE_URL` is in `.env`, Postgres is ready to use. The project init
77
- scaffolds `server/utils/neon.ts` and installs `@neondatabase/serverless`
78
- automatically when a Neon database is detected.
76
+ Neon provisioning is decided by the portal, not by what is in `.env`.
77
+ `DATABASE_URL` and `DATABASE_URL_UNPOOLED` are intentionally left commented
78
+ out locally Neon does not work in local dev. On deploy, Vercel
79
+ auto-injects `DATABASE_URL` at runtime.
79
80
 
80
81
  ### How to check
81
82
 
82
- - `DATABASE_URL` present in `.env` Postgres is connected
83
- - `server/utils/neon.ts` exists → utility is scaffolded
84
- - If either is missing, the project wasn't provisioned with Neon (add it
85
- from the Broadchurch Portal, then re-run `node init-project.js`)
83
+ Pull `gateway.url` and `tenant.org_id` out of `broadchurch.yaml` and ask the
84
+ portal:
85
+
86
+ ```bash
87
+ curl <gateway.url>/api/tenants/<tenant.org_id>
88
+ ```
89
+
90
+ - Provisioned: `vercel.postgres_store_id` is set in the response. The
91
+ `DATABASE_URL` is also findable under `agent_secrets`, but you usually
92
+ don't need to read it.
93
+ - `server/utils/neon.ts` present → ready to use. If missing, create it
94
+ (mirror the `getDb()` lazy-init pattern in `server/utils/redis.ts`).
95
+ - `@neondatabase/serverless` in `package.json` → ready. If missing, run
96
+ `npm install @neondatabase/serverless`.
86
97
 
87
98
  **Local dev:** `DATABASE_URL` is not yet available for local development.
88
99
  `getDb()` returns `null` when the credential is missing or invalid. Write