@odla-ai/cli 0.9.0 → 0.10.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.
@@ -2,13 +2,14 @@
2
2
  name: odla-migrate
3
3
  description: >
4
4
  Migrate a static site (e.g. GitHub Pages) to odla on Cloudflare in safe
5
- phases, then add a database, Clerk login, and AI. Use when the user wants to
5
+ phases, then add a database, optional read-only calendar mirror, Clerk login, and AI. Use when the user wants to
6
6
  move a static or GitHub Pages site to Cloudflare/odla, or to add a backend,
7
7
  database, login/auth, or AI features to a static site via odla.
8
8
  runbookOrder:
9
9
  - references/phase-0-preflight.md
10
10
  - references/phase-1-static.md
11
11
  - references/phase-2-db.md
12
+ - references/phase-2b-calendar.md
12
13
  - references/phase-3-auth.md
13
14
  - references/phase-3b-user-sync.md
14
15
  - references/phase-4-ai.md
@@ -45,12 +46,16 @@ installed skill at `../odla/SKILL.md` instead.
45
46
  approved o11y rotation with `--push-secrets` so the Worker is updated in the
46
47
  same run. If the final Wrangler transfer fails, use the CLI's printed
47
48
  non-rotating `secrets push` retry; never rotate again just to retry delivery.
49
+ 7. Existing calendar embeds are public links, not proof of a booking. Preserve
50
+ them via `bookingPageUrl`; never claim reconciliation until the read-only
51
+ mirror is connected and the app correlates `$bookings` deliberately. Google
52
+ OAuth tokens never enter the repo, CLI, or chat.
48
53
 
49
54
  ## Phase state machine
50
55
 
51
56
  Phases run strictly in order; each has a verification gate:
52
57
 
53
- P0 preflight -> P1 static-on-cloudflare -> P2 database -> P3 login
58
+ P0 preflight -> P1 static-on-cloudflare -> P2 database -> P2b calendar (optional) -> P3 login
54
59
  -> P4 ai (optional) -> P5 prod + DNS cutover
55
60
 
56
61
  `MIGRATION.md` at the user's repo root is the durable state: create it in
@@ -100,6 +105,7 @@ Read the current phase's file when you enter it — not before:
100
105
  - references/phase-0-preflight.md
101
106
  - references/phase-1-static.md
102
107
  - references/phase-2-db.md
108
+ - references/phase-2b-calendar.md (optional: preserve an embed and add authoritative read-only reconciliation)
103
109
  - references/phase-3-auth.md
104
110
  - references/phase-3b-user-sync.md (optional: mirror Clerk users into $users)
105
111
  - references/phase-4-ai.md
@@ -10,8 +10,8 @@ in the browser in interactive terminals).
10
10
 
11
11
  ## Steps
12
12
 
13
- 1. Require `npm view @odla-ai/cli@0.8.0 version` to succeed, then run
14
- `npm i -D --save-exact @odla-ai/cli@0.8.0` and `npm i @odla-ai/db`.
13
+ 1. Require `npm view @odla-ai/cli@0.10.0 version` to succeed, then run
14
+ `npm i -D --save-exact @odla-ai/cli@0.10.0` and `npm i @odla-ai/db`.
15
15
  2. `npx @odla-ai/cli init --app-id <id> --name "<Name>" --env dev --services db`
16
16
  Review `odla.config.mjs`. Keep `envs: ["dev"]` — prod is Phase 5. Set
17
17
  `links.dev` to the URL the Phase 1 `wrangler deploy` **actually printed** —
@@ -0,0 +1,42 @@
1
+ # Phase 2b — Google Calendar (optional, read-only)
2
+
3
+ Use this phase only when the existing site has a Google Appointment Schedule
4
+ link/embed or locally reported meeting state. Keep the old booking experience
5
+ working while adding an authoritative read-only mirror.
6
+
7
+ Human obligations: review attendee-data retention and complete the second,
8
+ server-issued Google consent page. They never paste an OAuth code or token.
9
+
10
+ 1. Inventory the old behavior. Distinguish a public appointment-page link from
11
+ actual event create/reschedule/cancel APIs. Do not promise more than exists.
12
+ 2. Require `npm view @odla-ai/calendar@0.1.0 version` to succeed, then install
13
+ `npm i --save-exact @odla-ai/calendar@0.1.0` as a runtime dependency. An
14
+ exact-version `E404` blocks this phase; do not substitute a git checkout or
15
+ another version. Add `"calendar"` beside
16
+ `"db"` in services and configure:
17
+ - `calendar.google.calendars.dev` (start with `"primary"`);
18
+ - optional summary/organizer/attendee match filters;
19
+ - deliberate `attendeePolicy: "full" | "hashed"`;
20
+ - the old public Appointment Schedule URL as `bookingPageUrl.dev` when
21
+ preserving the embed/link. It is public configuration, not a secret.
22
+ 3. Run `doctor`, then `provision --dry-run`. Show the human the calendars,
23
+ attendee policy, public booking page, and read-only scope.
24
+ 4. Run normal dev provision. After odla device approval, pause again while the
25
+ human grants Google `calendar.events.readonly`; the CLI follows initial sync.
26
+ 5. Run `calendar calendars --env dev --json`, refine the checked-in ids, and
27
+ re-provision. Verify `calendar status --env dev --json` and `smoke --env dev`.
28
+ 6. Put `initCalendar` only in trusted Worker code. Browser code may keep using
29
+ the public `bookingPageUrl`, query `$bookings` through explicit db rules, or
30
+ import pure helpers from `@odla-ai/calendar/client`. Never expose
31
+ `ODLA_API_KEY`.
32
+ 7. Replace self-reported meeting state only after an explicit, tested
33
+ application-to-booking correlation exists. A matching attendee email may be
34
+ sufficient for some apps; do not silently regress later workflow statuses.
35
+
36
+ This slice cannot create, reschedule, or cancel Google events. A static picker
37
+ continues to be Google's sealed UI; odla supplies configuration, mirror reads,
38
+ and reconciliation.
39
+
40
+ Gate: the old embed/link still works, status is healthy, the selected calendars
41
+ match config, `$bookings` smoke succeeds, no Google credential exists in local
42
+ files, and `MIGRATION.md` records the disclosure/correlation decision.