@odla-ai/cli 0.25.21 → 0.25.23

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
@@ -150,8 +150,55 @@ catalog, probes private services over bindings, and joins observed release
150
150
  identity with retained Cloudflare request/error/CPU/wall-time/memory evidence.
151
151
  Unavailable health, credentials, versions, or provider snapshots remain
152
152
  explicit rather than becoming zero; the document includes stable reason codes
153
- and exact next actions. Expected release and drift stay `unknown` until durable
154
- deployment receipt reads are added.
153
+ and exact next actions. The latest successful main deployment persists its
154
+ normalized receipt in Registry D1 after exact-version probes pass. Fleet status
155
+ therefore compares that verified expectation with the Worker answering now and
156
+ reports `matched`, `drifted`, or `unknown`; an empty or unavailable receipt
157
+ ledger degrades instead of silently treating observed health as intended state.
158
+
159
+ For repository-managed settings, compare checked-in intent with the live
160
+ owner-visible Registry projection before provisioning:
161
+
162
+ ```bash
163
+ npx odla-ai config diff --json
164
+ npx odla-ai config plan --json > .odla/config-plan.json
165
+ npx odla-ai config apply --plan .odla/config-plan.json --json
166
+ npx odla-ai operations wait <operation-id> --json
167
+ ```
168
+
169
+ `diff` and `plan` are read-only and request only a short-lived,
170
+ owner-approvable `app:config:read` capability. It opens only exact-id
171
+ `GET /registry/apps/<appId>` reads for apps the approver owns; app listing,
172
+ writes, PM, Discussions, directory access, data-plane delegation, and every
173
+ other Registry route remain closed. `diff` emits separate SHA-256 revisions for
174
+ desired and observed state, explicit `in_sync`, `different`, or `unmanaged`
175
+ status, field provenance, and a bounded coverage declaration. Runtime auth or
176
+ links omitted from project config stay visible as `unmanaged` rather than
177
+ being silently overwritten.
178
+
179
+ `plan` v2 freezes those content revisions, the monotonic Registry
180
+ `registry:<number>` revision, and ordered actions into a stable digest.
181
+ Enable/configure actions are dependency-first; proposed disablements are
182
+ dependent-first, high-risk, approval-required, and Studio-only.
183
+
184
+ `config apply` accepts only that saved JSON plan. Before requesting authority it
185
+ recomputes the digest, verifies the selected app/platform, confirms checked-in
186
+ intent has not changed, and rejects every production, destructive,
187
+ approval-marked, high-risk, Studio, auth, creation, or disable action. The
188
+ short-lived `app:config:write` grant reaches only this app's operation
189
+ reserve/resume/read routes; it cannot enumerate apps or call direct mutation
190
+ routes. A deterministic default idempotency key makes retrying the same plan
191
+ resume the same durable journal entry, while the Registry CAS revision rejects
192
+ stale state.
193
+
194
+ Apply prints the operation receipt, including ordered step attempts and its
195
+ Studio recovery URL. `operations get` reads one exact id without replaying it;
196
+ `operations wait` polls that id for 60 seconds by default (`--timeout` and
197
+ `--interval` are explicit seconds). A still-running bounded wait exits 75 after
198
+ printing its last receipt. Every terminal receipt is independently
199
+ digest-verified by the CLI before success. Schema, rules, integration seeds,
200
+ credentials, vault or Worker secrets, OAuth connection state, and opaque
201
+ controller-assigned service fields remain outside this boundary.
155
202
 
156
203
  **Runbooks are procedure; JSDoc is API.** What a function takes, returns, and
157
204
  guarantees is documented on the export itself, ships in the installed
@@ -253,6 +300,11 @@ npx odla-ai whoami
253
300
  npx odla-ai setup
254
301
  npx odla-ai init --app-id my-app --name "My App"
255
302
  npx odla-ai doctor
303
+ npx odla-ai config diff --json
304
+ npx odla-ai config plan --json > .odla/config-plan.json
305
+ npx odla-ai config apply --plan .odla/config-plan.json --json
306
+ npx odla-ai operations get <operation-id> --json
307
+ npx odla-ai operations wait <operation-id> --timeout 60 --json
256
308
  npx odla-ai calendar status --env dev
257
309
  npx odla-ai calendar calendars --env dev
258
310
  npx odla-ai calendar connect --env dev
package/REQUIREMENTS.md CHANGED
@@ -12,6 +12,12 @@ Agnacl, but none should mention or special-case Agnacl.
12
12
  - The CLI must validate that contract without network calls.
13
13
  - The CLI must show a dry-run plan before creating platform state or writing
14
14
  credentials.
15
+ - The CLI must compare checked-in Registry intent with live owner-visible
16
+ state through a short-lived exact read capability, emit separate stable
17
+ desired/observed revisions and provenance, distinguish unmanaged runtime
18
+ settings from drift, and freeze ordered secret-free actions into a plan
19
+ digest. It must disclose data-plane and secret coverage gaps and must not
20
+ expose apply until writes are conditional and resumable.
15
21
  - The CLI must treat platform registry and odla-db as separate endpoints. They
16
22
  may be the same in some deployments, but generated configs must not imply it.
17
23
  - If a platform or credential change is deterministic from `odla.config.mjs`,