@tomorrowos/sdk 0.7.10 → 0.8.0

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
 
@@ -36,16 +36,19 @@ Replit Agent must ask **only** the questions defined in **this file**, in **this
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
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** |
39
40
  | 4 | **Question 4** — Brand / TomorrowOS app look | Always last, before execution |
40
41
 
41
42
  **That is the complete list.** There are no other setup questions.
42
43
 
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
45
 
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.
46
+
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.
45
48
 
46
49
  If the user says “just set it up, don’t ask questions,” respond:
47
50
 
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.
51
+ > 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
52
 
50
53
  Then ask **Question 1** — do not switch to `LLM_PROMPT.md`.
51
54
 
@@ -53,8 +56,8 @@ Then ask **Question 1** — do not switch to `LLM_PROMPT.md`.
53
56
 
54
57
  ## Hard rules
55
58
 
56
- 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
+ 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 message — still **stop and wait** for the user’s values before Question 4.
58
61
  3. **Do not invent** screen counts, Cloudinary credentials, Supabase URLs, or brand colours.
59
62
  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
63
  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.
@@ -64,10 +67,10 @@ Then ask **Question 1** — do not switch to `LLM_PROMPT.md`.
64
67
 
65
68
  **Question order after Q1:**
66
69
 
67
- - If **≤ 5 screens:** Q1 → Q3 → Q4 → execution checklist
68
- - If **> 5 screens:** Q1 → Q2 → Q3 → Q4 → execution checklist
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
72
 
70
- Never insert extra questions between these steps.
73
+ Never insert extra questions between these steps. **Never skip Question 3b** when the user chose Cloudinary.
71
74
 
72
75
  ---
73
76
 
@@ -198,7 +201,7 @@ Allowed extras (optional): `"build-player": "tomorrowos build --platform tizen"`
198
201
  "node": ">=20"
199
202
  },
200
203
  "dependencies": {
201
- "@tomorrowos/sdk": "^0.7.10",
204
+ "@tomorrowos/sdk": "^0.8.0",
202
205
  "dotenv": "^17.2.3",
203
206
  "tsx": "^4.19.0"
204
207
  },
@@ -419,20 +422,47 @@ If the user refuses Supabase but chose > 5 screens, warn them SQLite on Replit i
419
422
  >
420
423
  > Do you want me to set up **Cloudinary**? (yes / no)
421
424
 
422
- ### If YES — Cloudinary
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.
428
+
429
+ ---
430
+
431
+ ## Question 3b — Cloudinary credentials (mandatory if Q3 = Cloudinary)
432
+
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.
434
+
435
+ **Ask exactly (copy wording):**
423
436
 
424
- **Ask for (or open a Secrets form for):**
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:
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
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.
425
448
 
426
- - `CLOUDINARY_CLOUD_NAME`
427
- - `CLOUDINARY_API_KEY`
428
- - `CLOUDINARY_API_SECRET`
429
- - Optional: `CLOUDINARY_FOLDER` (e.g. `tomorrowos`)
449
+ **You must then:**
430
450
 
431
- Store these as Replit Secrets. The SDK auto-detects them and uploads media to Cloudinary instead of local disk.
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.
458
+ 4. **Do not** proceed to Question 4 until all three required Secrets exist.
459
+ 5. **Do not** run a Cloudinary upload test — configuration only.
432
460
 
433
461
  Tell the user:
434
462
 
435
- > After Cloudinary Secrets are set, restart the Repl. New uploads should return `https://res.cloudinary.com/...` URLs.
463
+ > After Cloudinary Secrets are set, we’ll finish branding and start the CMS. New uploads will return `https://res.cloudinary.com/...` URLs.
464
+
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.
436
466
 
437
467
  ### If NO — Replit Object Storage (or local)
438
468
 
@@ -611,6 +641,7 @@ Do **not**:
611
641
  - Change the production start command away from `tsx server.ts` / `npm run start`
612
642
  - Point Supabase at Replit’s reserved `DATABASE_URL` when `SUPABASE_URL` should be used
613
643
  - Skip Cloudinary recommendation without stating the persistence tradeoff
644
+ - **Skip Question 3b** after the user chooses Cloudinary — always collect `CLOUDINARY_*` Secrets before Question 4
614
645
  - Claim uploads are “permanent” on Replit local disk without Object Storage or Cloudinary
615
646
  - Leave `tsx` only in `devDependencies` if the Deploy pipeline installs production deps only
616
647
  - Use Canvas preview as the primary CMS verification surface
@@ -658,6 +689,8 @@ TOMORROWOS_STORE=sqlite
658
689
 
659
690
  ## Protocol version
660
691
 
661
- `replit-setup/1.3` — aligned with TomorrowOS protocol `1.0` and `@tomorrowos/sdk` store drivers `sqlite` | `supabase` | `postgres` | `memory`.
692
+ `replit-setup/1.4` — aligned with TomorrowOS protocol `1.0` and `@tomorrowos/sdk` store drivers `sqlite` | `supabase` | `postgres` | `memory`.
693
+
694
+ **Changelog 1.4:** **Question 3b** — mandatory Cloudinary credential collection (Replit Secrets) before Question 4; fixes agents skipping secrets after “yes” to Cloudinary.
662
695
 
663
696
  **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.0",
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.0",
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.0",
17
17
  "dotenv": "^17.2.3",
18
18
  "tsx": "^4.19.0"
19
19
  },