@tomorrowos/sdk 1.1.2 → 1.1.3
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/VERCEL_QUESTIONS.md +11 -6
- package/VERCEL_SETUP.md +79 -29
- package/package.json +1 -1
- package/templates/cms-starter/package-lock.json +3 -3
- package/templates/cms-starter/package.json +2 -2
- package/templates/cms-starter-v0/README.md +2 -0
- package/templates/cms-starter-v0/package-lock.json +3 -3
- package/templates/cms-starter-v0/package.json +2 -2
package/VERCEL_QUESTIONS.md
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
# Vercel / v0 - Verbatim question bank
|
|
2
2
|
|
|
3
|
-
> **Protocol:** `vercel-questions/1.
|
|
3
|
+
> **Protocol:** `vercel-questions/1.7` (pairs with `VERCEL_SETUP.md` 1.18+ / `@tomorrowos/sdk` 0.9.70+)
|
|
4
4
|
> **For Agents:** When asking the user a setup question, **copy-paste the block below for that step EXACTLY**.
|
|
5
5
|
> Do **not** paraphrase, reorder, rename options, or invent alternatives (no S3, no Supabase Storage, no "Blob recommended", no "disable media").
|
|
6
6
|
> After each answer, configure per `VERCEL_SETUP.md`, then paste the **next** block.
|
|
7
|
-
> **Q1 and Q2 are choice questions
|
|
7
|
+
> **Q1 and Q2 are choice questions — present them as a clickable choice UI** (buttons / radio / option cards) using the exact option labels below. Do **not** ask the user to type `1` or `2` in chat when a choice UI is available (chat typing is fallback only).
|
|
8
|
+
> **Q3 is a form only - never a multiple-choice question. Q4 is optional CMS password (`CMS_PASSWORD`).**
|
|
8
9
|
> **HARD STOP on Q3:** show the form, then **wait** for the user's reply. Optional fields do **not** mean you may auto-skip.
|
|
9
10
|
> **Q4 is optional:** blank/skip is valid; they can set `CMS_PASSWORD` later.
|
|
10
11
|
> **After Q4 (or after Q3 if you deferred Q4):** run `VERCEL_SETUP.md` **IRON GATE — v0 Preview hygiene** before debugging Neon/Postgres or Blob.
|
|
11
12
|
|
|
12
13
|
---
|
|
13
14
|
|
|
14
|
-
## Q1 - Database (paste
|
|
15
|
+
## Q1 - Database (clickable choice UI — paste option text exactly)
|
|
16
|
+
|
|
17
|
+
**UX:** Open a **clickable choice UI** (two option buttons / radio cards). Labels must match the bold titles below.
|
|
15
18
|
|
|
16
19
|
Which database should TomorrowOS use on Vercel?
|
|
17
20
|
|
|
@@ -19,7 +22,7 @@ Which database should TomorrowOS use on Vercel?
|
|
|
19
22
|
|
|
20
23
|
**2. Neon Postgres** - serverless Postgres native to Vercel; use Neon's **pooled** connection string from the Neon dashboard (not the direct un-pooled host for serverless).
|
|
21
24
|
|
|
22
|
-
Reply with **1** or **2** (or "Supabase" / "Neon").
|
|
25
|
+
**Fallback only** (no choice UI available): Reply with **1** or **2** (or "Supabase" / "Neon").
|
|
23
26
|
|
|
24
27
|
---
|
|
25
28
|
|
|
@@ -34,7 +37,9 @@ Never show blank Env fields for `TOMORROWOS_STORE` or `DATABASE_SSL`.
|
|
|
34
37
|
|
|
35
38
|
---
|
|
36
39
|
|
|
37
|
-
## Q2 - Media (
|
|
40
|
+
## Q2 - Media (clickable choice UI — same pattern as Q1)
|
|
41
|
+
|
|
42
|
+
**UX:** Open a **clickable choice UI** (two option buttons / radio cards). **Forbidden when UI exists:** chat-only “Reply with **1** or **2**”.
|
|
38
43
|
|
|
39
44
|
How should playlist media (images/videos) be stored?
|
|
40
45
|
|
|
@@ -42,7 +47,7 @@ How should playlist media (images/videos) be stored?
|
|
|
42
47
|
|
|
43
48
|
**2. Vercel Blob** - Vercel-native object storage; durable `https://*.public.blob.vercel-storage.com/...` URLs. Use when you want media on the same Vercel project without a Cloudinary account.
|
|
44
49
|
|
|
45
|
-
Reply with **1** or **2** (or "Cloudinary" / "Vercel Blob").
|
|
50
|
+
**Fallback only** (no choice UI available): Reply with **1** or **2** (or "Cloudinary" / "Vercel Blob").
|
|
46
51
|
|
|
47
52
|
**Forbidden replacements (never ask these):** Vercel Blob as recommended #1; Supabase Storage; S3 / R2 / B2 / `MEDIA_S3_*`; "no media storage" / disable uploads; local disk only.
|
|
48
53
|
|
package/VERCEL_SETUP.md
CHANGED
|
@@ -5,12 +5,14 @@
|
|
|
5
5
|
>
|
|
6
6
|
> **On Vercel, this file is the setup questionnaire** (not `REPLIT_SETUP.md`).
|
|
7
7
|
>
|
|
8
|
-
> Protocol id: `vercel-setup/1.
|
|
8
|
+
> Protocol id: `vercel-setup/1.18` - pairs with `@tomorrowos/sdk` **0.9.70+** (`templates/cms-starter-v0`, Fluid Functions WebSockets).
|
|
9
9
|
>
|
|
10
10
|
> **Questions source of truth:** `VERCEL_QUESTIONS.md` - Agents must **open that file and paste each Q block verbatim**. Do not paraphrase.
|
|
11
|
-
> **Q1/Q2 = choice
|
|
11
|
+
> **Q1/Q2 = clickable choice UI (same pattern):** open a **button / radio / option-card UI** with the two fixed choices. Do **not** ask the user to type `1` or `2` in chat when a choice UI is available. Chat “reply 1 or 2” is fallback only.
|
|
12
|
+
> **Q3 = form only:** open **all seven optional inputs at once**, then **HARD STOP and WAIT** for submit or "skip". Never auto-skip because fields are optional. Never ask a branding choice first. Never show only Name + Primary colour. Logo = **Upload** above **Logo URL**.
|
|
12
13
|
> **Q4 = optional `CMS_PASSWORD`:** blank/skip is valid; can set later. Control Panel auth only — never Vercel Deployment Protection / whole-site password.
|
|
13
14
|
> **After Q&A (before debugging DB):** run **IRON GATE — v0 Preview hygiene** (clear root Next leftovers, restart supervised `dev`, prove `GET /status` is TomorrowOS JSON). Do **not** spend turns “fixing Neon/Blob” while port 3000 is still a stale Next/Turbopack process.
|
|
15
|
+
> **Publish Output Directory:** must stay **empty / unset**. Build error `Output Directory "public" is empty` means the dashboard still points at `public/` — **clear it**; do **not** “fix” by stuffing `public/robots.txt` while leaving Output = `public`.
|
|
14
16
|
> **Copy questions verbatim from `VERCEL_QUESTIONS.md`.** Do not invent alternate Q2 options (no "Supabase Storage", no S3, no "disable media", no making Blob the recommended option).
|
|
15
17
|
> **`TOMORROWOS_STORE` and `DATABASE_SSL` are agent-only** - set them automatically after Q1; never put them in a user-facing Env form for the customer to type.
|
|
16
18
|
|
|
@@ -20,6 +22,7 @@ The following rules are **mandatory acceptance criteria**, not suggestions. The
|
|
|
20
22
|
|
|
21
23
|
1. **One TomorrowOS instance only.** Use the shared instance exported through `api/index.ts`. **Never create a second `TomorrowOS` instance in `api/ws.ts`** or any other route.
|
|
22
24
|
2. **Never use `public/` as the Vercel Output Directory.** The dashboard Output Directory must be **empty / unset**. Serve the Control Panel at runtime from `cms-panel/` through TomorrowOS `staticRoot`.
|
|
25
|
+
2a. **Build error `The Output Directory "public" is empty`:** This is **not** fixed by adding `public/robots.txt` as the primary solution. It means Project Settings still has Output Directory = `public`. **Clear/unset Output Directory**, confirm Framework = Other, Fluid Function `api/index.ts` + rewrites, then redeploy. Filling `public/` only papers over a wrong static-output setting.
|
|
23
26
|
3. **Preview may use Next only as an isolated reverse-proxy shell under `preview/`.** Preview must not replace TomorrowOS or determine the Production runtime.
|
|
24
27
|
4. **Publish must use the Fluid Function.** Production must run `api/index.ts` ??the shared exported `http.Server`, with Fluid compute enabled. It must not use `next start`, a static export, or a bare `(req, res)` handler.
|
|
25
28
|
5. **After every Production deployment, verify all three gates before saying setup is complete:**
|
|
@@ -39,12 +42,14 @@ When a human pastes a prompt like this, **read this file and start Question 1 im
|
|
|
39
42
|
Follow @tomorrowos/sdk (an NPM package) VERCEL_SETUP.md and set up my TomorrowOS CMS from scratch.
|
|
40
43
|
|
|
41
44
|
Open VERCEL_QUESTIONS.md first.
|
|
42
|
-
For Q1
|
|
45
|
+
For Q1 and Q2: open a **clickable choice UI** (buttons / radio / option cards) using the verbatim options from VERCEL_QUESTIONS.md. Do not ask me to type 1 or 2 in chat when UI is available.
|
|
46
|
+
For Q1, Q2, Q3: use exact option wording from VERCEL_QUESTIONS.md. Do not rephrase options.
|
|
43
47
|
For Q3: DO NOT ask a branding choice. Open one form with ALL SEVEN optional inputs at once, then HARD STOP and WAIT for my submit or "skip". Never auto-continue with defaults without my reply. Never only Name + Primary colour. Logo = Upload above Logo URL.
|
|
44
48
|
After Q3, paste Q4 (optional CMS password). Blank/skip is valid.
|
|
45
49
|
After Q1 database choice, YOU set TOMORROWOS_STORE and DATABASE_SSL. Do not ask me to fill those.
|
|
46
50
|
After Q2 media storage choice, YOU set TOMORROWOS_MEDIA. Do not ask me to fill those.
|
|
47
51
|
After answers: run IRON GATE v0 Preview hygiene BEFORE debugging Postgres/media — clear root Next leftovers, restart supervised dev, prove GET /status is TomorrowOS JSON.
|
|
52
|
+
Before Publish: Output Directory must be empty/unset (NOT public). If build says Output Directory public is empty, CLEAR Output Directory — do not stuff public/robots.txt as the fix.
|
|
48
53
|
Run: npx @tomorrowos/sdk@latest init . --hosting v0 --force
|
|
49
54
|
Keep cms-starter-v0 layout.
|
|
50
55
|
Apply the NON-NEGOTIABLE VERCEL RUNTIME CONTRACT exactly:
|
|
@@ -117,18 +122,37 @@ almost always means **Vercel still thinks this is a Next.js / static deploy**, n
|
|
|
117
122
|
|
|
118
123
|
**Setup is NOT complete** while Production `GET /` returns `404: NOT_FOUND` or WebSocket upgrade returns 200 HTML.
|
|
119
124
|
|
|
120
|
-
### Publish static trap
|
|
125
|
+
### Publish static trap — `public/` served without Node (read this)
|
|
121
126
|
|
|
122
|
-
A common
|
|
123
|
-
|
|
124
|
-
- `GET /` loads the Control Panel HTML (from static `public/index.html`)
|
|
127
|
+
**Symptom A — wrong runtime (common worse failure than `404: NOT_FOUND`):**
|
|
128
|
+
- `GET /` loads the Control Panel HTML (from static files)
|
|
125
129
|
- `GET /status`, `/devices`, etc. return **HTML** (Vercel 404 page)
|
|
126
130
|
- The panel shows **CMS unreachable** and console:
|
|
127
131
|
`Unexpected token 'T', "The page c"... is not valid JSON`
|
|
128
132
|
|
|
129
|
-
**Root cause:** Vercel deployed `public/` as a **static site** (Output Directory = `public` or Framework=Other default
|
|
133
|
+
**Root cause A:** Vercel deployed `public/` as a **static site** (Output Directory = `public` or Framework=Other default “public if it exists”). **No Function** is running TomorrowOS.
|
|
134
|
+
|
|
135
|
+
**Symptom B — build fails before deploy:**
|
|
136
|
+
```text
|
|
137
|
+
Error: The Output Directory "public" is empty.
|
|
138
|
+
```
|
|
139
|
+
**Root cause B:** Project Settings **Output Directory is still `public`**, but this CMS has **no** (or empty) static export folder — UI lives in `cms-panel/` and is served by the Fluid Function.
|
|
140
|
+
|
|
141
|
+
**Correct fix (mandatory for A and B):**
|
|
142
|
+
|
|
143
|
+
1. Set **Output Directory** = **empty / unset** (dashboard and/or project settings API).
|
|
144
|
+
2. Framework Preset = **Other** / null; Fluid on; `api/index.ts` + rewrites per Scheme A.
|
|
145
|
+
3. Redeploy. Verify `GET /status` is **JSON** and WebSocket is **101**.
|
|
130
146
|
|
|
131
|
-
**
|
|
147
|
+
**Forbidden “fixes”:**
|
|
148
|
+
|
|
149
|
+
- Adding `public/robots.txt` / `.gitkeep` **so a static Output Directory = `public` build passes** — that leaves Production on the static trap path.
|
|
150
|
+
- Setting Output Directory to `cms-panel`, `.`, or `public`.
|
|
151
|
+
- Claiming Publish succeeded because the build log turned green while Output is still `public`.
|
|
152
|
+
|
|
153
|
+
**Optional:** If some tooling creates an empty `public/` folder, delete it or ignore it — **never** point Output Directory at it.
|
|
154
|
+
|
|
155
|
+
**Scheme A reminder:** use `cms-panel/` (not `public/`), Fluid Function `api/index.ts` + rewrites, Output Directory empty. Static UI is served **at runtime** via `staticRoot` in `listen()`.
|
|
132
156
|
|
|
133
157
|
**Publish gate (mandatory):** after deploy, `GET /status` must return **JSON** starting with `{`, not HTML starting with `<` or `The page`. **And** WebSocket upgrade on `/` or `/api` must return **101**.
|
|
134
158
|
|
|
@@ -206,7 +230,8 @@ Then ask **Question 1**.
|
|
|
206
230
|
|
|
207
231
|
## Hard rules
|
|
208
232
|
|
|
209
|
-
1. **Open `VERCEL_QUESTIONS.md` first.**
|
|
233
|
+
1. **Open `VERCEL_QUESTIONS.md` first.** Ask Q1 → configure → Q2 → configure → Q3 → Q4. Never paraphrase question options. Never use `REPLIT_SETUP.md` as the questionnaire. **Never** ask for OpenAI or other LLM API keys.
|
|
234
|
+
1a. **Q1 and Q2 UX:** Prefer a **clickable choice UI** (same pattern for both): two option buttons/cards matching the verbatim labels. **Forbidden when UI exists:** chat-only “Reply with 1 or 2”. Chat typing is fallback only if the platform cannot render choices.
|
|
210
235
|
2. **Question 2 options are fixed:** (1) Cloudinary **(recommended)**, (2) Vercel Blob. Do not reorder; do not invent Supabase Storage, local disk, or disable-uploads.
|
|
211
236
|
3. **Cloudinary:** open **one** Vercel Env popup with **all** Cloudinary fields together. Do **not** quiz one credential at a time.
|
|
212
237
|
4. **`TOMORROWOS_STORE` + `DATABASE_SSL` = agent-owned.** After Q1 choice (and URL if needed), set them yourself in Vercel Env Vars. **Never** include them as blank fields for the customer. Mapping: Supabase ? `TOMORROWOS_STORE=supabase` + `DATABASE_SSL=true`; Neon ? `TOMORROWOS_STORE=postgres` + `DATABASE_SSL=true`. **Do not offer SQLite as a questionnaire choice** ? it is ephemeral on Vercel and unsuitable for production.
|
|
@@ -417,16 +442,20 @@ SDK behaviour (0.9.32+):
|
|
|
417
442
|
- `"buildCommand"` = no-op ??**never** `next build` for Production
|
|
418
443
|
- Dashboard Output Directory must stay **empty**
|
|
419
444
|
|
|
420
|
-
### A4
|
|
445
|
+
### A4 — Vercel Project Settings (dashboard — mandatory)
|
|
421
446
|
|
|
422
447
|
| Setting | Required value |
|
|
423
448
|
|---------|----------------|
|
|
424
|
-
| Framework Preset | **Other** / null
|
|
449
|
+
| Framework Preset | **Other** / null — **not Next.js** |
|
|
425
450
|
| Install Command | `npm install` |
|
|
426
451
|
| Build Command | `npm run build` (no-op) |
|
|
427
|
-
| **Output Directory** | **empty** |
|
|
452
|
+
| **Output Directory** | **empty / unset** — **never `public`** |
|
|
428
453
|
| Fluid compute | **On** |
|
|
429
|
-
| WebSockets | Account must allow Functions WebSockets (see docs
|
|
454
|
+
| WebSockets | Account must allow Functions WebSockets (see docs — Permissions Required) |
|
|
455
|
+
|
|
456
|
+
**If Publish build fails with `The Output Directory "public" is empty`:** the dashboard still has Output = `public`. **Clear/unset it** via Project Settings (or settings API), then redeploy. Do **not** add `public/robots.txt` (or any static filler) as the primary fix while Output stays `public`.
|
|
457
|
+
|
|
458
|
+
**`vercel.json` must not set `outputDirectory`.** Leaving it out is correct; dashboard Output must still be forced empty because Framework=Other may default to “public if it exists”.
|
|
430
459
|
|
|
431
460
|
### A5 ??Publish acceptance (all must pass)
|
|
432
461
|
|
|
@@ -680,17 +709,26 @@ If Vercel?s UI and this file disagree on bundling, **prefer whatever keeps a sin
|
|
|
680
709
|
|
|
681
710
|
If you open an Env configuration UI for Q1, fields visible to the user may include **only** `SUPABASE_URL` or `DATABASE_URL`. **Do not** show blank `TOMORROWOS_STORE` / `DATABASE_SSL` inputs ? write those yourself in the same step.
|
|
682
711
|
|
|
683
|
-
### Step A
|
|
712
|
+
### Step A — Ask database choice (**clickable UI required**)
|
|
684
713
|
|
|
685
|
-
**
|
|
714
|
+
**UX:** Open a **choice UI** the user can **click** — two option buttons / radio cards / select list. Labels must match the verbatim options below. Same clickable pattern as Q2.
|
|
715
|
+
|
|
716
|
+
| # | Exact option label (UI) |
|
|
717
|
+
|---|-------------------------|
|
|
718
|
+
| 1 | **Supabase Postgres (recommended)** |
|
|
719
|
+
| 2 | **Neon Postgres** |
|
|
720
|
+
|
|
721
|
+
Supporting copy under each option may match `VERCEL_QUESTIONS.md`. **Do not** default to a chat message that only says “Reply with 1 or 2” when the platform can render choices.
|
|
722
|
+
|
|
723
|
+
**Ask exactly (wording / option text must match):**
|
|
686
724
|
|
|
687
725
|
> Which database should TomorrowOS use on Vercel?
|
|
688
726
|
>
|
|
689
|
-
> **1. Supabase Postgres (recommended)**
|
|
690
|
-
>
|
|
691
|
-
> **2. Neon Postgres** ? serverless Postgres native to Vercel; use Neon's **pooled** connection string from the Neon dashboard (not the direct un-pooled host for serverless).
|
|
727
|
+
> **1. Supabase Postgres (recommended)** — durable pairing/playlists; use the **Session pooler** URL (`*.pooler.supabase.com:6543`).
|
|
692
728
|
>
|
|
693
|
-
>
|
|
729
|
+
> **2. Neon Postgres** — serverless Postgres native to Vercel; use Neon's **pooled** connection string from the Neon dashboard (not the direct un-pooled host for serverless).
|
|
730
|
+
|
|
731
|
+
**Fallback only** (no choice UI available): allow chat reply **1** / **2** / "Supabase" / "Neon".
|
|
694
732
|
|
|
695
733
|
### Step B ??If **1 / Supabase**
|
|
696
734
|
|
|
@@ -746,19 +784,26 @@ If you open an Env configuration UI for Q1, fields visible to the user may inclu
|
|
|
746
784
|
> It is **not** about OpenAI, AI pairing, or LLM keys. If you are about to ask for an `sk-` key, **stop** ??you are off-protocol.
|
|
747
785
|
> **Copy the two options below verbatim.** Wrong examples that must **never** appear: "Vercel Blob (recommended)", "Supabase Storage", "No media storage / disable uploads", "local disk only".
|
|
748
786
|
|
|
749
|
-
### Step A
|
|
787
|
+
### Step A — Ask storage choice (**clickable UI required — same as Q1**)
|
|
750
788
|
|
|
751
|
-
**
|
|
789
|
+
**UX:** Open a **choice UI** the user can **click** — two option buttons / radio cards. **Forbidden when UI exists:** chat-only “Reply with **1** or **2**”.
|
|
790
|
+
|
|
791
|
+
| # | Exact option label (UI) |
|
|
792
|
+
|---|-------------------------|
|
|
793
|
+
| 1 | **Cloudinary (recommended)** |
|
|
794
|
+
| 2 | **Vercel Blob** |
|
|
795
|
+
|
|
796
|
+
**Ask exactly (wording must match — Cloudinary is recommended):**
|
|
752
797
|
|
|
753
798
|
> How should playlist media (images/videos) be stored?
|
|
754
799
|
>
|
|
755
|
-
> **1. Cloudinary (recommended)**
|
|
756
|
-
>
|
|
757
|
-
> **2. Vercel Blob** ? Vercel-native object storage; durable `https://*.public.blob.vercel-storage.com/...` URLs. Use when you want media on the same Vercel project without a Cloudinary account.
|
|
800
|
+
> **1. Cloudinary (recommended)** — durable public HTTPS URLs (`https://res.cloudinary.com/...`). Works out of the box with `@tomorrowos/sdk` auto-detection. **Prefer this on Vercel.**
|
|
758
801
|
>
|
|
759
|
-
>
|
|
802
|
+
> **2. Vercel Blob** — Vercel-native object storage; durable `https://*.public.blob.vercel-storage.com/...` URLs. Use when you want media on the same Vercel project without a Cloudinary account.
|
|
760
803
|
|
|
761
|
-
|
|
804
|
+
**Fallback only** (no choice UI): chat reply **1** / **2** / "Cloudinary" / "Vercel Blob".
|
|
805
|
+
|
|
806
|
+
If you catch yourself about to offer Blob-as-recommended, Supabase Storage, local disk, or "no media" — **stop and use the block above instead**.
|
|
762
807
|
|
|
763
808
|
### Step B ??If **1 / Cloudinary** (same Question 2 ??**one Env popup**)
|
|
764
809
|
|
|
@@ -966,7 +1011,8 @@ Then (**Scheme A — mandatory for Publish**):
|
|
|
966
1011
|
1. Keep **`server.ts`** at **project root** with top-level `listen()` + `export default server`.
|
|
967
1012
|
2. **Immediately** move leftover v0 Next from root into **`preview/`** or delete root Next files (`next.config.*`, `app/`, Next `tsconfig` / `postcss` / `next-env.d.ts`, starter `components/`). Production must not see root Next.
|
|
968
1013
|
3. Write `vercel.json` per **Scheme A3** (`fluid`, `framework: null`, no-op `buildCommand` — **no** `startCommand`).
|
|
969
|
-
4. **Force Project Settings** per **Scheme A4** (Framework = Other, Output Directory empty
|
|
1014
|
+
4. **Force Project Settings** per **Scheme A4** (Framework = Other, Output Directory **empty/unset**, Start = `npm run start`, Fluid on). Patch dashboard via API if it still says Next.js **or** Output = `public`.
|
|
1015
|
+
4a. **Pre-Publish Output check:** If settings show Output Directory = `public` (or build fails with `Output Directory "public" is empty`), **clear Output Directory** and redeploy. Do **not** add `public/robots.txt` to satisfy a static output path.
|
|
970
1016
|
5. Do **not** add root `api/` catch-all for raw `http.Server`.
|
|
971
1017
|
6. Do **not** add `.replit*`.
|
|
972
1018
|
7. If Q2 = Vercel Blob: set `BLOB_READ_WRITE_TOKEN` + `TOMORROWOS_MEDIA=vercel-blob` (SDK-native; no custom bridge).
|
|
@@ -1073,6 +1119,8 @@ More detail: https://docs.tomorrowos.org/docs/os/tizen and https://docs.tomorrow
|
|
|
1073
1119
|
|
|
1074
1120
|
| Symptom | Likely cause | Fix |
|
|
1075
1121
|
|---------|--------------|-----|
|
|
1122
|
+
| Build: `Output Directory "public" is empty` | Dashboard Output Directory still = `public` on a Function/CMS app | **Unset Output Directory**; Framework Other; Fluid `api/index.ts`; redeploy. Do **not** primary-fix with `public/robots.txt` |
|
|
1123
|
+
| Agent asked Q2 as chat “type 1 or 2” while choice UI available | Off-protocol Q2 UX | Re-ask Q2 with **clickable** Cloudinary / Vercel Blob options (same pattern as Q1) |
|
|
1076
1124
|
| Preview 500 / Turbopack / `ENOENT .../app` after Q1–Q3 | Leftover **root** Next from v0 starter; not Neon/Blob | **IRON GATE:** delete/move root `app/` + `next.config.*`; keep `preview/`; restart supervised `dev`; prove `/status` JSON |
|
|
1077
1125
|
| `Internal Server Error` + logs blame missing `DATABASE_URL` in a **manual** Bash server | `dotenv` loaded `.env` only; secret is in `.env.development.local` / supervised env | Restart **supervised** Preview process; or load both env files — do **not** immediately change Neon URL |
|
|
1078
1126
|
| `EADDRINUSE :3000` while debugging | Second `pnpm dev` / stale `next-server` after script rewrite | Kill stale Next/tsx; one process; let supervisor re-exec new `"dev"` |
|
|
@@ -1154,7 +1202,9 @@ Protocol complete when:
|
|
|
1154
1202
|
|
|
1155
1203
|
## Protocol version
|
|
1156
1204
|
|
|
1157
|
-
`vercel-setup/1.
|
|
1205
|
+
`vercel-setup/1.18` - pairs with `@tomorrowos/sdk` 0.9.70+ and `VERCEL_QUESTIONS.md` 1.7.
|
|
1206
|
+
|
|
1207
|
+
**Changelog 1.18:** Q1/Q2 must use **clickable choice UI** (not chat “type 1 or 2” when UI exists). Publish build error `Output Directory "public" is empty` → **clear Output Directory** (forbidden primary fix: stuff `public/robots.txt` while Output stays `public`). Strengthens static-output trap docs.
|
|
1158
1208
|
|
|
1159
1209
|
**Changelog 1.17:** After Q&A, agents **must** run **IRON GATE — v0 Preview hygiene** before DB rabbit holes: clear root Next leftovers, restart supervised `dev`, prove `GET /status` is TomorrowOS JSON. Documents `.env` vs `.env.development.local` / supervised-env trap. Preview decision tree + cheat-sheet rows for Turbopack/`ENOENT`, missing `DATABASE_URL` in manual Bash, `EADDRINUSE`, stale `next-server`. Neon/Blob choices are not the usual Preview failure cause.
|
|
1160
1210
|
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "my-cms",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "my-cms",
|
|
9
|
-
"version": "1.1.
|
|
9
|
+
"version": "1.1.3",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@tomorrowos/sdk": "^1.1.
|
|
11
|
+
"@tomorrowos/sdk": "^1.1.3",
|
|
12
12
|
"dotenv": "^17.2.3",
|
|
13
13
|
"tsx": "^4.19.0"
|
|
14
14
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "my-cms",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "CMS server on @tomorrowos/sdk. Add your UI (React, static files, etc.) alongside this server.",
|
|
5
5
|
"private": true,
|
|
6
6
|
"type": "module",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"start": "tsx server.ts"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@tomorrowos/sdk": "^1.1.
|
|
15
|
+
"@tomorrowos/sdk": "^1.1.3",
|
|
16
16
|
"dotenv": "^17.2.3",
|
|
17
17
|
"tsx": "^4.19.0"
|
|
18
18
|
},
|
|
@@ -10,6 +10,8 @@ This starter is for **Vercel Publish** and **v0**. It follows
|
|
|
10
10
|
- **`preview/`** — Next.js shell for v0 Preview only
|
|
11
11
|
- **`vercel.json`** — `fluid`, rewrites → `/api`, `maxDuration`
|
|
12
12
|
|
|
13
|
+
**Publish setting (critical):** Vercel **Output Directory** must stay **empty / unset**. If the build fails with `The Output Directory "public" is empty`, clear Output Directory in Project Settings — do **not** add filler files under `public/` while Output is still set to `public`.
|
|
14
|
+
|
|
13
15
|
## Scaffold
|
|
14
16
|
|
|
15
17
|
```bash
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "my-cms",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "my-cms",
|
|
9
|
-
"version": "1.1.
|
|
9
|
+
"version": "1.1.3",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@tomorrowos/sdk": "^1.1.
|
|
11
|
+
"@tomorrowos/sdk": "^1.1.3",
|
|
12
12
|
"dotenv": "^17.2.3",
|
|
13
13
|
"tsx": "^4.19.0"
|
|
14
14
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "my-cms",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "TomorrowOS CMS for Vercel / v0 Publish (Fluid Function + WebSockets + optional Next Preview).",
|
|
5
5
|
"private": true,
|
|
6
6
|
"type": "module",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"build": "node -e \"process.exit(0)\""
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@tomorrowos/sdk": "^1.1.
|
|
19
|
+
"@tomorrowos/sdk": "^1.1.3",
|
|
20
20
|
"dotenv": "^17.2.3",
|
|
21
21
|
"tsx": "^4.19.0"
|
|
22
22
|
},
|