@odla-ai/cli 0.29.0 → 0.30.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/README.md CHANGED
@@ -482,8 +482,8 @@ commands continue to default to the sandbox.
482
482
  `provision` performs the standard safe setup flow:
483
483
 
484
484
  When using `--push-secrets`, create the Worker and its Wrangler config first.
485
- The CLI checks that config and `wrangler whoami` before it issues or rotates a
486
- shown-once credential.
485
+ The CLI checks that config and `wrangler whoami` before it issues a shown-once
486
+ credential set.
487
487
 
488
488
  1. Gets an `odla_dev_...` token by email-bound device handshake, or reuses
489
489
  `ODLA_DEV_TOKEN` / `.odla/dev-token.json`. A fresh handshake requires
@@ -511,18 +511,19 @@ shown-once credential.
511
511
  and attempts to open it — including from CI, SSH, display-less, scripted,
512
512
  and agent-driven shells. Only `--no-open` suppresses the attempt. Browser
513
513
  launch is best-effort: an agent with browser control must open that exact URL
514
- immediately; otherwise it gives the URL to the human verbatim. The started
515
- handshake is persisted privately under `.odla/`, so a
516
- run killed before approval loses nothing: rerunning resumes the same code.
517
- Outside an interactive terminal the approval wait is capped (90 seconds by
518
- default; `--wait <seconds>` overrides), and a still-pending handshake exits
519
- with code 75 — approve at the URL, then re-run to collect the token.
514
+ immediately; otherwise it gives the URL to the human verbatim. The device
515
+ code stays only in the running process. Outside an interactive terminal the
516
+ approval wait is capped (90 seconds by default; `--wait <seconds>`
517
+ overrides), and a still-pending handshake exits with code 75. Rerunning
518
+ always requests and opens a new code; it never resumes an older request from
519
+ `.odla/`.
520
520
  2. Creates the platform app if needed. For a new id, this consumes the exact-id
521
521
  reservation approved in step 1; it is not ambient project-creation authority.
522
522
  3. Enables configured services in every configured environment. Calendar
523
523
  config is normalized per env and fixed to Google read-only access.
524
- 4. Mints or reuses each env's configured service credentials: an odla-db app
525
- key for `db` and an ingest token for `o11y`.
524
+ 4. For local development, mints or reuses that developer's configured service
525
+ credentials. Multiple developers may hold independent DB/o11y credentials
526
+ for the same shared sandbox tenant.
526
527
  5. Collision-checks and merges declared integration schema/rule fragments,
527
528
  pushes the composed database contract, and creates integration seeds only
528
529
  when their natural-key rows are absent.
@@ -533,23 +534,53 @@ shown-once credential.
533
534
  exact Google OAuth endpoint (or a same-platform interstitial). The human completes consent there;
534
535
  provision follows the exact attempt through initial sync. OAuth codes and
535
536
  refresh tokens never enter the CLI, repo, chat, or app.
536
- 8. Writes `.odla/credentials.local.json` with mode `0600`.
537
+ 8. Local-only provisioning writes `.odla/credentials.local.json` with mode
538
+ `0600`. A deployment run with `--push-secrets` does not write runtime
539
+ credential plaintext there.
537
540
  9. With `--write-dev-vars`, writes the local Worker values to `.dev.vars`; with
538
- `--push-secrets`, transfers the configured service secrets to the matching
539
- deployed Worker environment over Wrangler stdin.
540
-
541
- Plain reruns are idempotent. Pass `--rotate-o11y-token` only when deliberately
542
- invalidating and replacing the o11y token; combine it with `--push-secrets` so
543
- the replacement reaches the Worker in the same run. `--rotate-keys` remains the
544
- broader credential rotation. Production mutation or secret transfer requires
545
- `--yes`. Pass `--no-write-credentials` to skip writing the local credentials
546
- file; it cannot be combined with an operation that would issue a shown-once
547
- credential.
548
-
549
- Rotation and Wrangler secret replacement are not a distributed transaction.
550
- The CLI preflights Wrangler first and persists the replacement before pushing;
551
- if that final push still fails, follow the printed `secrets push --env ...`
552
- retry. Do not run the rotation flag again.
541
+ `--push-secrets`, binds a fresh additive credential set to the exact
542
+ Cloudflare account/script/environment, transfers both values in one
543
+ `wrangler secret bulk` stdin payload, and commits a receipt. A failed push
544
+ aborts the session and revokes partial issuance.
545
+
546
+ Plain reruns are idempotent at the tenant/configuration layer. Each deployment
547
+ receives new, independently revocable runtime credentials; it never rotates a
548
+ sibling developer or Worker. `--rotate-o11y-token` remains a destructive legacy
549
+ recovery operation for locally cached credentials, and `--rotate-keys` remains
550
+ the broader local rotation. Neither rotation flag may be combined with
551
+ `--push-secrets`. Production mutation or secret transfer requires
552
+ `--yes`. `--no-write-credentials` is valid with `--push-secrets` because the
553
+ deployment path is memory-only by design.
554
+
555
+ Registry staging and Wrangler installation use a short-lived receipt protocol.
556
+ The CLI preflights the exact target, issues additive credentials, sends one
557
+ bulk payload, and commits only after Wrangler succeeds. Failure revokes staged
558
+ credentials; retrying creates a new bounded session and never invalidates a
559
+ working sibling runtime.
560
+
561
+ Inventory and retire one successful deployment without disturbing any sibling:
562
+
563
+ ```sh
564
+ npx @odla-ai/cli credentials list --env dev
565
+ npx @odla-ai/cli credentials revoke <receipt-id>
566
+ ```
567
+
568
+ The inventory contains only receipt, target, state, and timestamp metadata.
569
+ Revocation uses the receipt's exact DB and o11y credential ids; no value is
570
+ retrieved or rotated.
571
+
572
+ Verify a deployment that intentionally keeps db/o11y credentials only on the
573
+ Worker:
574
+
575
+ ```sh
576
+ npx @odla-ai/cli smoke --env dev --runtime
577
+ ```
578
+
579
+ Runtime smoke never reads `.odla/credentials.local.json`. It checks Registry
580
+ public config, the configured Worker link, anonymous integration probes, and
581
+ owner-visible calendar health. Direct schema and aggregate reads remain part
582
+ of ordinary local-credential smoke because a runtime credential is deliberately
583
+ not retrievable from the Worker.
553
584
 
554
585
  ### Application capability integrations
555
586
 
@@ -797,9 +828,10 @@ in an agent's transcript. It preflights `wrangler whoami` and the presence of a
797
828
  wrangler config file. The env `prod`/`production` targets the top-level
798
829
  wrangler environment (no `--env` flag is passed to Wrangler) and requires
799
830
  `--yes`; every other env maps to `wrangler --env <name>`. `--dry-run` prints a
800
- redacted plan without spawning anything. For the normal path, use
801
- `provision --write-dev-vars --push-secrets` so service enablement, credential
802
- issuance, local config, and deployed secret transfer stay one composition.
831
+ redacted plan without spawning anything. It is only for an already-saved local
832
+ credential. For a new Worker or a lost local plaintext, use
833
+ `provision --push-secrets`: the handshake authorizes new target-bound
834
+ credentials and no local production cache is required.
803
835
 
804
836
  `secrets set <name> --env <env>` stores one named secret in that env's tenant
805
837
  vault — the same write-only slot Studio's Secrets panel fills (for example