@tomorrowos/sdk 0.7.10 → 0.8.1

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/REPLIT_SETUP.md CHANGED
@@ -12,7 +12,7 @@ When a human pastes a prompt like this, **read this file and start Question 1 im
12
12
  ```text
13
13
  Follow @tomorrowos/sdk REPLIT_SETUP.md and set up my TomorrowOS CMS.
14
14
  Ask only the questions listed in REPLIT_SETUP.md, in order. Do not use LLM_PROMPT.md.
15
- After the four answers, configure and start — minimal verification only (Web app type + Preview at /). No Supabase or WebSocket tests.
15
+ After all setup questions are answered (including Cloudinary Secrets if you chose Cloudinary), configure and start — minimal verification only (Web app type + Preview at /). No Supabase or WebSocket tests.
16
16
  Do not skip steps.
17
17
  ```
18
18
 
@@ -35,17 +35,19 @@ Replit Agent must ask **only** the questions defined in **this file**, in **this
35
35
  |------|---------|------|
36
36
  | 1 | **Question 1** — How many screens / devices? | Always |
37
37
  | 2 | **Question 2** — Supabase connection | Only if answer to Q1 is **> 5** |
38
- | 3 | **Question 3** — Media storage (Cloudinary vs Object Storage) | Always (after Q1 or Q2) |
38
+ | 3 | **Question 3** — Media storage (+ Cloudinary Secrets if chosen) | Always (after Q1 or Q2) |
39
39
  | 4 | **Question 4** — Brand / TomorrowOS app look | Always last, before execution |
40
40
 
41
- **That is the complete list.** There are no other setup questions.
41
+ **That is the complete list.** There are no other setup questions. There is **no** “Question 3b” — Cloudinary credentials are collected **inside Question 3**, immediately after the user chooses Cloudinary.
42
42
 
43
+ **Critical:** Question 3 is **not complete** when the user says “Cloudinary” or “yes”. You **must** immediately show the Cloudinary Secrets input (same step — do **not** label a new question) and collect `CLOUDINARY_CLOUD_NAME`, `CLOUDINARY_API_KEY`, and `CLOUDINARY_API_SECRET` **before** Question 4. Do **not** skip to branding with placeholder or invented credentials.
43
44
 
44
- If the user volunteers extra info early (e.g. brand name before Q4), **record it** and still ask the current question’s required fields you do not yet have. Do not skip ahead to execution until Q1–Q4 (or Q1, Q3, Q4 if ≤5 screens) are complete.
45
+
46
+ If the user volunteers extra info early (e.g. brand name before Q4), **record it** and still ask the current question’s required fields you do not yet have. Do not skip ahead to execution until Q1–Q4 are complete (Question 3 includes Cloudinary Secrets when applicable).
45
47
 
46
48
  If the user says “just set it up, don’t ask questions,” respond:
47
49
 
48
- > I need four quick answers from REPLIT_SETUP.md (screen count, media storage, and branding). It takes about a minute and ensures the CMS deploys correctly on Replit.
50
+ > I need a few quick answers from REPLIT_SETUP.md (screen count, media storage — plus Cloudinary credentials if you choose Cloudinary — and branding). It takes about a minute and ensures the CMS deploys correctly on Replit.
49
51
 
50
52
  Then ask **Question 1** — do not switch to `LLM_PROMPT.md`.
51
53
 
@@ -54,7 +56,7 @@ Then ask **Question 1** — do not switch to `LLM_PROMPT.md`.
54
56
  ## Hard rules
55
57
 
56
58
  1. **Ask only REPLIT_SETUP.md questions 1–4** (see **Questionnaire scope**). Never use `LLM_PROMPT.md` on Replit.
57
- 2. **One question at a time.** Wait for the user’s answer before asking the next question (unless they already answered several in one message).
59
+ 2. **One question at a time.** Wait for the user’s answer before asking the next question (unless they already answered several in one message). **Exception:** If the user chooses Cloudinary in Question 3, **stay on Question 3** and immediately show the Secrets form — do **not** open a separate “3b” step or announce a new question number.
58
60
  3. **Do not invent** screen counts, Cloudinary credentials, Supabase URLs, or brand colours.
59
61
  4. **Do not use Replit’s reserved `DATABASE_URL` Secret for Supabase.** On Replit, `DATABASE_URL` is often pre-claimed. Always use **`SUPABASE_URL`** for TomorrowOS ↔ Supabase.
60
62
  5. **Prefer `npx @tomorrowos/sdk init`** (or the package’s `templates/cms-starter`) as the project seed. Do not rebuild pairing, WebSocket, or playlist APIs from scratch.
@@ -67,7 +69,7 @@ Then ask **Question 1** — do not switch to `LLM_PROMPT.md`.
67
69
  - If **≤ 5 screens:** Q1 → Q3 → Q4 → execution checklist
68
70
  - If **> 5 screens:** Q1 → Q2 → Q3 → Q4 → execution checklist
69
71
 
70
- Never insert extra questions between these steps.
72
+ Never insert extra questions between these steps. When the user chooses Cloudinary, **Question 3 continues** with the Secrets form immediately — then proceed to Q4 only after secrets are saved.
71
73
 
72
74
  ---
73
75
 
@@ -198,7 +200,7 @@ Allowed extras (optional): `"build-player": "tomorrowos build --platform tizen"`
198
200
  "node": ">=20"
199
201
  },
200
202
  "dependencies": {
201
- "@tomorrowos/sdk": "^0.7.10",
203
+ "@tomorrowos/sdk": "^0.8.1",
202
204
  "dotenv": "^17.2.3",
203
205
  "tsx": "^4.19.0"
204
206
  },
@@ -407,6 +409,8 @@ If the user refuses Supabase but chose > 5 screens, warn them SQLite on Replit i
407
409
 
408
410
  ## Question 3 — Media storage (uploads / thumbnails)
409
411
 
412
+ ### Step A — Ask storage choice
413
+
410
414
  **Ask exactly:**
411
415
 
412
416
  > How should playlist media (images/videos) be stored?
@@ -419,20 +423,38 @@ If the user refuses Supabase but chose > 5 screens, warn them SQLite on Replit i
419
423
  >
420
424
  > Do you want me to set up **Cloudinary**? (yes / no)
421
425
 
422
- ### If YES — Cloudinary
426
+ ### Step B — If YES / Cloudinary (same Question 3 no “3b”, no extra question)
427
+
428
+ **Do this immediately** when the user chooses Cloudinary. **Do not** say “Question 3b”, “next step”, or “Great — I’ll use Cloudinary” as a separate message before the form. **Go straight to the Secrets input.**
423
429
 
424
- **Ask for (or open a Secrets form for):**
430
+ **Preferred on Replit:** open the **Replit Secrets** UI with fields for:
425
431
 
426
432
  - `CLOUDINARY_CLOUD_NAME`
427
433
  - `CLOUDINARY_API_KEY`
428
434
  - `CLOUDINARY_API_SECRET`
429
435
  - Optional: `CLOUDINARY_FOLDER` (e.g. `tomorrowos`)
430
436
 
431
- Store these as Replit Secrets. The SDK auto-detects them and uploads media to Cloudinary instead of local disk.
437
+ **If Secrets UI is unavailable, ask exactly (one message with all fields):**
432
438
 
433
- Tell the user:
439
+ > Paste your Cloudinary credentials (from [cloudinary.com/console](https://cloudinary.com/console) → Dashboard → **API Keys**). I will store them as Replit **Secrets**:
440
+ >
441
+ > 1. **`CLOUDINARY_CLOUD_NAME`**
442
+ > 2. **`CLOUDINARY_API_KEY`**
443
+ > 3. **`CLOUDINARY_API_SECRET`**
444
+ >
445
+ > Optional: **`CLOUDINARY_FOLDER`**
434
446
 
435
- > After Cloudinary Secrets are set, restart the Repl. New uploads should return `https://res.cloudinary.com/...` URLs.
447
+ **You must then:**
448
+
449
+ 1. Save Replit Secrets: `CLOUDINARY_CLOUD_NAME`, `CLOUDINARY_API_KEY`, `CLOUDINARY_API_SECRET` (and optional `CLOUDINARY_FOLDER`).
450
+ 2. **Do not** write real secrets into committed files.
451
+ 3. **Do not** invent or placeholder credentials.
452
+ 4. **Do not** proceed to Question 4 until all three required Secrets exist.
453
+ 5. **Do not** run a Cloudinary upload test — configuration only.
454
+
455
+ **If the user does not have a Cloudinary account yet:** tell them to sign up at cloudinary.com and return with API keys. **Wait** on Question 3 — do not skip to Question 4.
456
+
457
+ The SDK auto-detects these env vars and uploads media to Cloudinary. New uploads will return `https://res.cloudinary.com/...` URLs.
436
458
 
437
459
  ### If NO — Replit Object Storage (or local)
438
460
 
@@ -611,6 +633,8 @@ Do **not**:
611
633
  - Change the production start command away from `tsx server.ts` / `npm run start`
612
634
  - Point Supabase at Replit’s reserved `DATABASE_URL` when `SUPABASE_URL` should be used
613
635
  - Skip Cloudinary recommendation without stating the persistence tradeoff
636
+ - **Skip Cloudinary Secrets** after the user chooses Cloudinary — always collect `CLOUDINARY_*` inside Question 3 before Question 4
637
+ - **Announce “Question 3b”** or a separate follow-up question — show the Secrets form immediately instead
614
638
  - Claim uploads are “permanent” on Replit local disk without Object Storage or Cloudinary
615
639
  - Leave `tsx` only in `devDependencies` if the Deploy pipeline installs production deps only
616
640
  - Use Canvas preview as the primary CMS verification surface
@@ -658,6 +682,10 @@ TOMORROWOS_STORE=sqlite
658
682
 
659
683
  ## Protocol version
660
684
 
661
- `replit-setup/1.3` — aligned with TomorrowOS protocol `1.0` and `@tomorrowos/sdk` store drivers `sqlite` | `supabase` | `postgres` | `memory`.
685
+ `replit-setup/1.5` — aligned with TomorrowOS protocol `1.0` and `@tomorrowos/sdk` store drivers `sqlite` | `supabase` | `postgres` | `memory`.
686
+
687
+ **Changelog 1.5:** Cloudinary Secrets collected **inside Question 3** — no separate “3b” step; show Secrets form immediately when user picks Cloudinary.
688
+
689
+ **Changelog 1.4:** mandatory Cloudinary credential collection before Question 4 (superseded by 1.5 flow).
662
690
 
663
691
  **Changelog 1.3:** minimal post-Q&A verification — no Supabase/WS smoke tests; prioritize **Web app vs API** only.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomorrowos/sdk",
3
- "version": "0.7.10",
3
+ "version": "0.8.1",
4
4
  "description": "TomorrowOS CMS server SDK - WebSocket transport, pairing, device commands, optional static CMS UI. Includes CLI (tomorrowos init / build) and starter templates.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "my-cms",
3
- "version": "0.7.10",
3
+ "version": "0.8.1",
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",
@@ -13,7 +13,7 @@
13
13
  "build-player": "tomorrowos build --platform tizen"
14
14
  },
15
15
  "dependencies": {
16
- "@tomorrowos/sdk": "^0.7.10",
16
+ "@tomorrowos/sdk": "^0.8.1",
17
17
  "dotenv": "^17.2.3",
18
18
  "tsx": "^4.19.0"
19
19
  },