@odla-ai/cli 0.25.11 → 0.25.17

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
@@ -13,8 +13,10 @@ deployed Worker secrets without printing them. It also gives platform admins a
13
13
  scoped System AI control surface and gives app owners a provider-key-free
14
14
  hosted security command.
15
15
 
16
- It does not know about any specific app. App identity, environments, services,
17
- schema, rules, integrations, auth, AI provider, and links all come from config.
16
+ Provisioning does not know about any specific app. App identity, environments,
17
+ services, schema, rules, integrations, auth, AI provider, and links all come
18
+ from config. Operator commands can also receive explicit platform/app/env
19
+ context so remote agents are not forced to manufacture a project checkout.
18
20
 
19
21
  ## Start with the runbooks, not this file
20
22
 
@@ -37,6 +39,50 @@ npx @odla-ai/cli runbook list # what exists
37
39
  Reading works for any signed-in developer and needs no `odla.config.mjs` — the
38
40
  advice is most useful before there is a project.
39
41
 
42
+ ## Operator context from any directory
43
+
44
+ Before an agent reads PM, Discussions, o11y, runbooks, or identity from a fresh
45
+ workspace, it can explain the selected context without authenticating:
46
+
47
+ ```bash
48
+ npx @odla-ai/cli context show --platform https://odla.ai --app <appId> --env prod --json
49
+ npx @odla-ai/cli context save production --platform https://odla.ai --app <appId> --env prod
50
+ npx @odla-ai/cli context show --context production --json
51
+ ```
52
+
53
+ For each value, an explicit flag wins over the matching
54
+ `ODLA_PLATFORM_URL`, `ODLA_APP_ID`, or `ODLA_ENV` variable. An explicitly
55
+ selected `--context` (or `ODLA_CONTEXT`) comes next, followed by a present
56
+ `odla.config.mjs`; the platform defaults to `https://odla.ai`, and environment
57
+ defaults remain command-specific. There is deliberately no ambient “current”
58
+ context: a saved profile cannot silently retarget commands. A missing named
59
+ context or explicitly named missing `--config` is always an error.
60
+ `context list` inventories profiles, and `context remove <name> --yes` removes
61
+ metadata without deleting caches or revoking grants. Revoke a grant in Studio
62
+ when its authority must end. Set `ODLA_CONTEXT_FILE` to relocate the default
63
+ private `~/.odla/contexts.json` file.
64
+
65
+ For unattended reads, supply the ordinary revocable owner grant through
66
+ `ODLA_DEV_TOKEN`. Without a project config or explicit token, the normal device
67
+ flow uses the private `~/.odla/dev-token.json` cache. Every named context instead
68
+ uses isolated developer and scoped-token caches beneath
69
+ `~/.odla/profiles/<name>/`; set `ODLA_DEV_TOKEN_FILE` or
70
+ `ODLA_ADMIN_TOKEN_FILE` to override them. Profiles store scope metadata only
71
+ and reject unknown fields, so credentials cannot be added to
72
+ `contexts.json`. A checked-in project continues to use its configured cache
73
+ when no profile is selected. Each cache records its platform audience, and a
74
+ token for another origin is never reused. `context show` reports provenance and
75
+ cache state only; it never returns a credential or starts a device handshake.
76
+
77
+ ```bash
78
+ ODLA_DEV_TOKEN=... npx @odla-ai/cli pm handoff --app <appId>
79
+ ODLA_DEV_TOKEN=... npx @odla-ai/cli discuss list --app <appId> --json
80
+ ODLA_DEV_TOKEN=... npx @odla-ai/cli o11y status --app <appId> --env prod --json
81
+ ODLA_DEV_TOKEN=... npx @odla-ai/cli whoami --json
82
+ npx @odla-ai/cli pm handoff --context production --json
83
+ npx @odla-ai/cli runbook new deploy --context production --title Deploy --file deploy.md
84
+ ```
85
+
40
86
  Runbooks tell an agent how to operate; PM tells every agent what this project is
41
87
  trying to prove, what is active, what was decided, and what is broken. Once the
42
88
  app is registered, start each session by reading its doing tasks, open bugs and
@@ -72,13 +118,22 @@ snapshot instead of scraping Studio or composing collector routes themselves:
72
118
  npx odla-ai o11y status --app <appId> --env prod --minutes 60 --json
73
119
  ```
74
120
 
75
- Schema v5 keeps application RED, reconciled live-sync load/freshness and
121
+ Schema v9 keeps application RED, an `applicationVersions` breakdown of
122
+ request/error/latency evidence by exact Cloudflare Worker version, reconciled
123
+ live-sync load/freshness and
76
124
  subscription recompute/fanout/payload/commit-to-send performance, the exact
77
125
  latest protected commit-to-visible canary, collector ingest/scheduler trust,
78
- the live Cloudflare Worker read, and 30-day-retained provider snapshot history
79
- with a seven-day maximum per read separate. Scheduled collection failures,
80
- source age, expected cadence, collection lag, and history truncation remain
81
- machine-readable. It derives one
126
+ the live Cloudflare Worker read with per-isolate memory headroom, same-window
127
+ request-total reconciliation, and
128
+ 30-day-retained provider snapshot history with a seven-day maximum per read
129
+ separate. For `odla-db`, `providerCapacity` adds redacted account-scoped
130
+ Durable Object, D1, and R2 evidence: storage, query/operation/row volume,
131
+ worst database-hour latency, socket/message load, objects/uploads, source
132
+ ages, and per-dataset truncation. Other app scopes return an explicit
133
+ not-applicable envelope without reading account data. The reconciliation ends five minutes behind real time and grades
134
+ monitoring completeness without treating a coverage gap as application
135
+ failure. Scheduled collection failures, source age, expected cadence,
136
+ collection lag, and history truncation remain machine-readable. It derives one
82
137
  `healthy`, `degraded`, or `unhealthy` verdict with stable reason codes while
83
138
  retaining every source response for diagnosis. Provider unavailability,
84
139
  adaptive sampling, publication delay, collector loss, quota rejection, stale
@@ -181,6 +236,7 @@ npx odla-ai runbook impact --base origin/main
181
236
  npx odla-ai runbook lint
182
237
  npx odla-ai runbook edit db --note "what changed"
183
238
  npx odla-ai runbook comment release --body "step 4 no longer applies"
239
+ npx odla-ai context show --app my-app --env prod --json
184
240
  npx odla-ai whoami
185
241
  npx odla-ai setup
186
242
  npx odla-ai init --app-id my-app --name "My App"