@odla-ai/cli 0.28.2 → 0.30.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/README.md CHANGED
@@ -461,15 +461,29 @@ the previous bearer.
461
461
  - `src/odla/rules.mjs`
462
462
  - `.gitignore` entries for local credentials
463
463
 
464
- New configs contain only the `dev` environment. Add `prod` explicitly after
465
- the development flow is healthy; `provision` refuses to mutate `prod` or
466
- `production` without `--yes` and supports `--dry-run` for review.
464
+ New configs contain only the `dev` environment. After the development flow is
465
+ healthy, initialize the existing app's live instance without editing the config:
466
+
467
+ ```sh
468
+ npx @odla-ai/cli provision --live --dry-run
469
+ npx @odla-ai/cli provision --live --yes --push-secrets
470
+ ```
471
+
472
+ `--live` targets only `prod`, enables every configured service, provisions its
473
+ credentials/schema/integrations, and refuses to create an app when the sandbox
474
+ does not exist yet. Add `prod` to `envs` only when normal provision runs should
475
+ manage both environments. Calendar apps may predeclare
476
+ `calendar.google.availabilityCalendars.prod` while `envs` remains dev-only;
477
+ live still uses its own Google consent. Every production mutation requires
478
+ `--yes`. Afterwards, explicit live operations such as `smoke --env prod`,
479
+ `secrets push --env prod --yes`, and `app go-live` work while unqualified
480
+ commands continue to default to the sandbox.
467
481
 
468
482
  `provision` performs the standard safe setup flow:
469
483
 
470
484
  When using `--push-secrets`, create the Worker and its Wrangler config first.
471
- The CLI checks that config and `wrangler whoami` before it issues or rotates a
472
- shown-once credential.
485
+ The CLI checks that config and `wrangler whoami` before it issues a shown-once
486
+ credential set.
473
487
 
474
488
  1. Gets an `odla_dev_...` token by email-bound device handshake, or reuses
475
489
  `ODLA_DEV_TOKEN` / `.odla/dev-token.json`. A fresh handshake requires
@@ -507,8 +521,9 @@ shown-once credential.
507
521
  reservation approved in step 1; it is not ambient project-creation authority.
508
522
  3. Enables configured services in every configured environment. Calendar
509
523
  config is normalized per env and fixed to Google read-only access.
510
- 4. Mints or reuses each env's configured service credentials: an odla-db app
511
- 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.
512
527
  5. Collision-checks and merges declared integration schema/rule fragments,
513
528
  pushes the composed database contract, and creates integration seeds only
514
529
  when their natural-key rows are absent.
@@ -519,23 +534,40 @@ shown-once credential.
519
534
  exact Google OAuth endpoint (or a same-platform interstitial). The human completes consent there;
520
535
  provision follows the exact attempt through initial sync. OAuth codes and
521
536
  refresh tokens never enter the CLI, repo, chat, or app.
522
- 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.
523
540
  9. With `--write-dev-vars`, writes the local Worker values to `.dev.vars`; with
524
- `--push-secrets`, transfers the configured service secrets to the matching
525
- deployed Worker environment over Wrangler stdin.
526
-
527
- Plain reruns are idempotent. Pass `--rotate-o11y-token` only when deliberately
528
- invalidating and replacing the o11y token; combine it with `--push-secrets` so
529
- the replacement reaches the Worker in the same run. `--rotate-keys` remains the
530
- broader credential rotation. Production mutation or secret transfer requires
531
- `--yes`. Pass `--no-write-credentials` to skip writing the local credentials
532
- file; it cannot be combined with an operation that would issue a shown-once
533
- credential.
534
-
535
- Rotation and Wrangler secret replacement are not a distributed transaction.
536
- The CLI preflights Wrangler first and persists the replacement before pushing;
537
- if that final push still fails, follow the printed `secrets push --env ...`
538
- 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.
539
571
 
540
572
  ### Application capability integrations
541
573
 
@@ -783,9 +815,10 @@ in an agent's transcript. It preflights `wrangler whoami` and the presence of a
783
815
  wrangler config file. The env `prod`/`production` targets the top-level
784
816
  wrangler environment (no `--env` flag is passed to Wrangler) and requires
785
817
  `--yes`; every other env maps to `wrangler --env <name>`. `--dry-run` prints a
786
- redacted plan without spawning anything. For the normal path, use
787
- `provision --write-dev-vars --push-secrets` so service enablement, credential
788
- issuance, local config, and deployed secret transfer stay one composition.
818
+ redacted plan without spawning anything. It is only for an already-saved local
819
+ credential. For a new Worker or a lost local plaintext, use
820
+ `provision --push-secrets`: the handshake authorizes new target-bound
821
+ credentials and no local production cache is required.
789
822
 
790
823
  `secrets set <name> --env <env>` stores one named secret in that env's tenant
791
824
  vault — the same write-only slot Studio's Secrets panel fills (for example
package/REQUIREMENTS.md CHANGED
@@ -28,6 +28,10 @@ Agnacl, but none should mention or special-case Agnacl.
28
28
  - Source semantics remain with the coding agent: package installation, Worker
29
29
  instrumentation, and application-specific signals/rules. Humans approve
30
30
  identity, production mutation, and explicit destructive rotation.
31
+ - An existing dev-first sandbox app must be able to initialize only its live
32
+ environment with one explicit CLI mode. That mode enables the complete
33
+ configured service set, requires production consent, refuses to create a new
34
+ app, and must not make live part of later unqualified provision runs.
31
35
 
32
36
  ## Human Approval
33
37