@tomorrowos/sdk 0.8.0 → 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
@@ -35,16 +35,15 @@ 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) |
39
- | 3b | **Question 3b** — Cloudinary credentials (Secrets) | **Mandatory** if Q3 answer is Cloudinary / yes — **before Q4** |
38
+ | 3 | **Question 3** — Media storage (+ Cloudinary Secrets if chosen) | Always (after Q1 or Q2) |
40
39
  | 4 | **Question 4** — Brand / TomorrowOS app look | Always last, before execution |
41
40
 
42
- **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.
43
42
 
44
- **Critical:** Question 3 is **not complete** when the user says “Cloudinary” or “yes”. You **must** run **Question 3b** and collect `CLOUDINARY_CLOUD_NAME`, `CLOUDINARY_API_KEY`, and `CLOUDINARY_API_SECRET` (as Replit Secrets) **before** asking Question 4. Do **not** skip to branding with placeholder or invented credentials.
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.
45
44
 
46
45
 
47
- 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, Q3b, Q4 if ≤5 screens and Cloudinary) are complete.
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).
48
47
 
49
48
  If the user says “just set it up, don’t ask questions,” respond:
50
49
 
@@ -56,8 +55,8 @@ Then ask **Question 1** — do not switch to `LLM_PROMPT.md`.
56
55
 
57
56
  ## Hard rules
58
57
 
59
- 1. **Ask only REPLIT_SETUP.md questions 1–4 and 3b when required** (see **Questionnaire scope**). Never use `LLM_PROMPT.md` on Replit.
60
- 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:** Question 3b may ask for all three Cloudinary Secrets in one messagestill **stop and wait** for the user’s values before Question 4.
58
+ 1. **Ask only REPLIT_SETUP.md questions 1–4** (see **Questionnaire scope**). Never use `LLM_PROMPT.md` on Replit.
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 formdo **not** open a separate “3b” step or announce a new question number.
61
60
  3. **Do not invent** screen counts, Cloudinary credentials, Supabase URLs, or brand colours.
62
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.
63
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,10 +66,10 @@ Then ask **Question 1** — do not switch to `LLM_PROMPT.md`.
67
66
 
68
67
  **Question order after Q1:**
69
68
 
70
- - If **≤ 5 screens:** Q1 → Q3 → (Q3b if Cloudinary) → Q4 → execution checklist
71
- - If **> 5 screens:** Q1 → Q2 → Q3 → (Q3b if Cloudinary) → Q4 → execution checklist
69
+ - If **≤ 5 screens:** Q1 → Q3 → Q4 → execution checklist
70
+ - If **> 5 screens:** Q1 → Q2 → Q3 → Q4 → execution checklist
72
71
 
73
- Never insert extra questions between these steps. **Never skip Question 3b** when the user chose Cloudinary.
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.
74
73
 
75
74
  ---
76
75
 
@@ -201,7 +200,7 @@ Allowed extras (optional): `"build-player": "tomorrowos build --platform tizen"`
201
200
  "node": ">=20"
202
201
  },
203
202
  "dependencies": {
204
- "@tomorrowos/sdk": "^0.8.0",
203
+ "@tomorrowos/sdk": "^0.8.1",
205
204
  "dotenv": "^17.2.3",
206
205
  "tsx": "^4.19.0"
207
206
  },
@@ -410,6 +409,8 @@ If the user refuses Supabase but chose > 5 screens, warn them SQLite on Replit i
410
409
 
411
410
  ## Question 3 — Media storage (uploads / thumbnails)
412
411
 
412
+ ### Step A — Ask storage choice
413
+
413
414
  **Ask exactly:**
414
415
 
415
416
  > How should playlist media (images/videos) be stored?
@@ -422,47 +423,38 @@ If the user refuses Supabase but chose > 5 screens, warn them SQLite on Replit i
422
423
  >
423
424
  > Do you want me to set up **Cloudinary**? (yes / no)
424
425
 
425
- ### If YES Cloudinary go to Question 3b (do not ask Question 4 yet)
426
-
427
- Choosing Cloudinary **does not finish** Question 3. Immediately continue to **Question 3b** below.
426
+ ### Step B — If YES / Cloudinary (same Question 3 no “3b”, no extra question)
428
427
 
429
- ---
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.**
430
429
 
431
- ## Question 3b Cloudinary credentials (mandatory if Q3 = Cloudinary)
430
+ **Preferred on Replit:** open the **Replit Secrets** UI with fields for:
432
431
 
433
- > **Ask this before Question 4.** Do not jump to `brand.json` until the user has provided credentials or confirmed they are saved as Replit Secrets.
432
+ - `CLOUDINARY_CLOUD_NAME`
433
+ - `CLOUDINARY_API_KEY`
434
+ - `CLOUDINARY_API_SECRET`
435
+ - Optional: `CLOUDINARY_FOLDER` (e.g. `tomorrowos`)
434
436
 
435
- **Ask exactly (copy wording):**
437
+ **If Secrets UI is unavailable, ask exactly (one message with all fields):**
436
438
 
437
- > Great I’ll use **Cloudinary** for media uploads.
438
- >
439
- > Please paste your Cloudinary credentials (from [cloudinary.com/console](https://cloudinary.com/console) → Dashboard → **API Keys**). I will store them as Replit **Secrets** — never in committed files:
439
+ > Paste your Cloudinary credentials (from [cloudinary.com/console](https://cloudinary.com/console) → Dashboard → **API Keys**). I will store them as Replit **Secrets**:
440
440
  >
441
- > 1. **`CLOUDINARY_CLOUD_NAME`** — your cloud name (e.g. `dxyz123abc`)
442
- > 2. **`CLOUDINARY_API_KEY`** — API Key
443
- > 3. **`CLOUDINARY_API_SECRET`** — API Secret
441
+ > 1. **`CLOUDINARY_CLOUD_NAME`**
442
+ > 2. **`CLOUDINARY_API_KEY`**
443
+ > 3. **`CLOUDINARY_API_SECRET`**
444
444
  >
445
- > Optional: **`CLOUDINARY_FOLDER`** (e.g. `tomorrowos`) — say if you want a folder prefix.
446
- >
447
- > You can paste all three in one reply, or use Replit’s Secrets panel and tell me when each Secret is set.
445
+ > Optional: **`CLOUDINARY_FOLDER`**
448
446
 
449
447
  **You must then:**
450
448
 
451
- 1. Create / update Replit Secrets:
452
- - `CLOUDINARY_CLOUD_NAME=<user value>`
453
- - `CLOUDINARY_API_KEY=<user value>`
454
- - `CLOUDINARY_API_SECRET=<user value>`
455
- - Optional: `CLOUDINARY_FOLDER=<user value>`
456
- 2. **Do not** write real secrets into `.env` files that are committed to git. Replit Secrets only (or `.env` that is gitignored and references env vars).
457
- 3. **Do not** invent or placeholder Cloudinary credentials.
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.
458
452
  4. **Do not** proceed to Question 4 until all three required Secrets exist.
459
453
  5. **Do not** run a Cloudinary upload test — configuration only.
460
454
 
461
- Tell the user:
462
-
463
- > After Cloudinary Secrets are set, we’ll finish branding and start the CMS. New uploads will return `https://res.cloudinary.com/...` URLs.
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.
464
456
 
465
- **If the user does not have a Cloudinary account yet:** tell them to sign up at cloudinary.com, create API keys, then return with the three values. **Wait** — do not skip to Question 4.
457
+ The SDK auto-detects these env vars and uploads media to Cloudinary. New uploads will return `https://res.cloudinary.com/...` URLs.
466
458
 
467
459
  ### If NO — Replit Object Storage (or local)
468
460
 
@@ -641,7 +633,8 @@ Do **not**:
641
633
  - Change the production start command away from `tsx server.ts` / `npm run start`
642
634
  - Point Supabase at Replit’s reserved `DATABASE_URL` when `SUPABASE_URL` should be used
643
635
  - Skip Cloudinary recommendation without stating the persistence tradeoff
644
- - **Skip Question 3b** after the user chooses Cloudinary — always collect `CLOUDINARY_*` Secrets before Question 4
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
645
638
  - Claim uploads are “permanent” on Replit local disk without Object Storage or Cloudinary
646
639
  - Leave `tsx` only in `devDependencies` if the Deploy pipeline installs production deps only
647
640
  - Use Canvas preview as the primary CMS verification surface
@@ -689,8 +682,10 @@ TOMORROWOS_STORE=sqlite
689
682
 
690
683
  ## Protocol version
691
684
 
692
- `replit-setup/1.4` — 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.
693
688
 
694
- **Changelog 1.4:** **Question 3b** — mandatory Cloudinary credential collection (Replit Secrets) before Question 4; fixes agents skipping secrets after “yes” to Cloudinary.
689
+ **Changelog 1.4:** mandatory Cloudinary credential collection before Question 4 (superseded by 1.5 flow).
695
690
 
696
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.8.0",
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.8.0",
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.8.0",
16
+ "@tomorrowos/sdk": "^0.8.1",
17
17
  "dotenv": "^17.2.3",
18
18
  "tsx": "^4.19.0"
19
19
  },