@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/dist/index.d.cts CHANGED
@@ -247,10 +247,10 @@ declare function adminAi(options: AdminAiOptions): Promise<void>;
247
247
  /** Stable, machine-readable division of work between the CLI, coding agent,
248
248
  * human operator, and Studio. Printed by `odla-ai capabilities --json`. */
249
249
  declare const CAPABILITIES: {
250
- readonly cli: readonly ["start an email-bound device request without accepting a password or user session token", "register the app and enable configured services per environment", "issue, persist, and explicitly rotate configured service credentials", "add or remove app co-owners, each of whom self-provisions their own credentials for the shared db without any secret handoff", "write local Worker values and push deployed Worker secrets through Wrangler stdin", "store tenant-vault secrets (including the Clerk webhook secret and reserved Clerk secret key) write-only from stdin or an env var", "compose declared app-capability schema/rules, create guarded seeds when absent, and configure platform AI, auth, and deployment links", "apply Google Calendar booking config, then drive state-bound consent, status, discovery, and disconnect flows (bookings run live through the platform proxy)", "validate integration contracts offline and smoke-test a provisioned db environment plus anonymous capability routes", "read one versioned o11y status envelope spanning application RED, current live-sync freshness/load, the protected commit-to-visible canary, collector ingest/scheduler trust, provider-owned runtime metrics, and a bounded machine verdict", "inspect durable agent wakeups as a versioned JSON envelope and explicitly requeue one dead-lettered job with a scoped environment credential", "run app-attributed hosted security discovery and independent validation without provider keys", "connect/revoke source-read-only GitHub sources and drive commit-pinned hosted security jobs without PATs or provider keys", "let admins manage system AI policy and credentials, inspect attributed usage, and read immutable admin changes through separate short-lived capability-only approvals"];
250
+ readonly cli: readonly ["start an email-bound device request without accepting a password or user session token", "register the app and enable configured services per environment", "issue, persist, and explicitly rotate configured service credentials", "add or remove app co-owners, each of whom self-provisions their own credentials for the shared db without any secret handoff", "write local Worker values and push deployed Worker secrets through Wrangler stdin", "store tenant-vault secrets (including the Clerk webhook secret and reserved Clerk secret key) write-only from stdin or an env var", "compose declared app-capability schema/rules, create guarded seeds when absent, and configure platform AI, auth, and deployment links", "apply Google Calendar booking config, then drive state-bound consent, status, discovery, and disconnect flows (bookings run live through the platform proxy)", "validate integration contracts offline and smoke-test a provisioned db environment plus anonymous capability routes", "save and explicitly select non-secret named operator contexts with isolated credential caches; resolve and explain platform, app, environment, and credential provenance without authenticating; then run PM, Discussions, o11y, runbook, and identity operations outside a project checkout", "read one versioned o11y status envelope spanning application RED, exact Worker versions and Cloudflare colos observed in traffic, current live-sync freshness/load, the protected commit-to-visible canary, collector ingest/scheduler trust, provider-owned runtime metrics, account-scoped Durable Object, D1, and R2 evidence under odla-db, and a bounded machine verdict", "inspect durable agent wakeups as a versioned JSON envelope and explicitly requeue one dead-lettered job with a scoped environment credential", "run app-attributed hosted security discovery and independent validation without provider keys", "connect/revoke source-read-only GitHub sources and drive commit-pinned hosted security jobs without PATs or provider keys", "let admins manage system AI policy and credentials, inspect attributed usage, and read immutable admin changes through separate short-lived capability-only approvals"];
251
251
  readonly agent: readonly ["install and import the selected odla SDKs", "wrap the Worker with withObservability and choose useful telemetry", "install capability packages, mount their runtime routes, and make application-specific schema, rules, auth, UI, and migration decisions", "wire @odla-ai/calendar into trusted Worker code and keep the app admin key out of browsers"];
252
252
  readonly human: readonly ["provide the existing odla account email, then sign in and explicitly review/approve the exact device code", "review mirrored calendar/attendee disclosure and complete the server-issued Google consent flow", "consent to changes against an app's live database with --yes", "request destructive credential rotation explicitly", "review application semantics, security findings, releases, and merges", "approve redacted-source disclosure before hosted security reasoning", "approve GitHub App repository access separately from redacted-snippet disclosure"];
253
- readonly studio: readonly ["view application telemetry, reconciled live-sync load/freshness, commit-to-visible canary health, provider-owned Worker runtime metrics, and environment state", "let signed-in users inventory/revoke their own agent grants and admins audit/global-revoke them", "review calendar connection, granted read scope, selected calendars, and sync health without exposing provider tokens", "perform manual credential recovery — for the primary owner or any co-owner — when the CLI's local shown-once copy is unavailable", "configure system AI purposes and view app/environment/run-attributed usage", "connect/revoke GitHub security sources and inspect ref-to-SHA jobs, routes, retention, coverage, and normalized reports"];
253
+ readonly studio: readonly ["view application telemetry grouped by exact Worker version, reconciled live-sync load/freshness, commit-to-visible canary health, provider-owned Worker runtime metrics, and environment state", "let signed-in users inventory/revoke their own agent grants and admins audit/global-revoke them", "review calendar connection, granted read scope, selected calendars, and sync health without exposing provider tokens", "perform manual credential recovery — for the primary owner or any co-owner — when the CLI's local shown-once copy is unavailable", "configure system AI purposes and view app/environment/run-attributed usage", "connect/revoke GitHub security sources and inspect ref-to-SHA jobs, routes, retention, coverage, and normalized reports"];
254
254
  };
255
255
  type Output = Pick<typeof console, "log">;
256
256
  /** Print the stable responsibility boundary for humans or agent tooling. */
package/dist/index.d.ts CHANGED
@@ -247,10 +247,10 @@ declare function adminAi(options: AdminAiOptions): Promise<void>;
247
247
  /** Stable, machine-readable division of work between the CLI, coding agent,
248
248
  * human operator, and Studio. Printed by `odla-ai capabilities --json`. */
249
249
  declare const CAPABILITIES: {
250
- readonly cli: readonly ["start an email-bound device request without accepting a password or user session token", "register the app and enable configured services per environment", "issue, persist, and explicitly rotate configured service credentials", "add or remove app co-owners, each of whom self-provisions their own credentials for the shared db without any secret handoff", "write local Worker values and push deployed Worker secrets through Wrangler stdin", "store tenant-vault secrets (including the Clerk webhook secret and reserved Clerk secret key) write-only from stdin or an env var", "compose declared app-capability schema/rules, create guarded seeds when absent, and configure platform AI, auth, and deployment links", "apply Google Calendar booking config, then drive state-bound consent, status, discovery, and disconnect flows (bookings run live through the platform proxy)", "validate integration contracts offline and smoke-test a provisioned db environment plus anonymous capability routes", "read one versioned o11y status envelope spanning application RED, current live-sync freshness/load, the protected commit-to-visible canary, collector ingest/scheduler trust, provider-owned runtime metrics, and a bounded machine verdict", "inspect durable agent wakeups as a versioned JSON envelope and explicitly requeue one dead-lettered job with a scoped environment credential", "run app-attributed hosted security discovery and independent validation without provider keys", "connect/revoke source-read-only GitHub sources and drive commit-pinned hosted security jobs without PATs or provider keys", "let admins manage system AI policy and credentials, inspect attributed usage, and read immutable admin changes through separate short-lived capability-only approvals"];
250
+ readonly cli: readonly ["start an email-bound device request without accepting a password or user session token", "register the app and enable configured services per environment", "issue, persist, and explicitly rotate configured service credentials", "add or remove app co-owners, each of whom self-provisions their own credentials for the shared db without any secret handoff", "write local Worker values and push deployed Worker secrets through Wrangler stdin", "store tenant-vault secrets (including the Clerk webhook secret and reserved Clerk secret key) write-only from stdin or an env var", "compose declared app-capability schema/rules, create guarded seeds when absent, and configure platform AI, auth, and deployment links", "apply Google Calendar booking config, then drive state-bound consent, status, discovery, and disconnect flows (bookings run live through the platform proxy)", "validate integration contracts offline and smoke-test a provisioned db environment plus anonymous capability routes", "save and explicitly select non-secret named operator contexts with isolated credential caches; resolve and explain platform, app, environment, and credential provenance without authenticating; then run PM, Discussions, o11y, runbook, and identity operations outside a project checkout", "read one versioned o11y status envelope spanning application RED, exact Worker versions and Cloudflare colos observed in traffic, current live-sync freshness/load, the protected commit-to-visible canary, collector ingest/scheduler trust, provider-owned runtime metrics, account-scoped Durable Object, D1, and R2 evidence under odla-db, and a bounded machine verdict", "inspect durable agent wakeups as a versioned JSON envelope and explicitly requeue one dead-lettered job with a scoped environment credential", "run app-attributed hosted security discovery and independent validation without provider keys", "connect/revoke source-read-only GitHub sources and drive commit-pinned hosted security jobs without PATs or provider keys", "let admins manage system AI policy and credentials, inspect attributed usage, and read immutable admin changes through separate short-lived capability-only approvals"];
251
251
  readonly agent: readonly ["install and import the selected odla SDKs", "wrap the Worker with withObservability and choose useful telemetry", "install capability packages, mount their runtime routes, and make application-specific schema, rules, auth, UI, and migration decisions", "wire @odla-ai/calendar into trusted Worker code and keep the app admin key out of browsers"];
252
252
  readonly human: readonly ["provide the existing odla account email, then sign in and explicitly review/approve the exact device code", "review mirrored calendar/attendee disclosure and complete the server-issued Google consent flow", "consent to changes against an app's live database with --yes", "request destructive credential rotation explicitly", "review application semantics, security findings, releases, and merges", "approve redacted-source disclosure before hosted security reasoning", "approve GitHub App repository access separately from redacted-snippet disclosure"];
253
- readonly studio: readonly ["view application telemetry, reconciled live-sync load/freshness, commit-to-visible canary health, provider-owned Worker runtime metrics, and environment state", "let signed-in users inventory/revoke their own agent grants and admins audit/global-revoke them", "review calendar connection, granted read scope, selected calendars, and sync health without exposing provider tokens", "perform manual credential recovery — for the primary owner or any co-owner — when the CLI's local shown-once copy is unavailable", "configure system AI purposes and view app/environment/run-attributed usage", "connect/revoke GitHub security sources and inspect ref-to-SHA jobs, routes, retention, coverage, and normalized reports"];
253
+ readonly studio: readonly ["view application telemetry grouped by exact Worker version, reconciled live-sync load/freshness, commit-to-visible canary health, provider-owned Worker runtime metrics, and environment state", "let signed-in users inventory/revoke their own agent grants and admins audit/global-revoke them", "review calendar connection, granted read scope, selected calendars, and sync health without exposing provider tokens", "perform manual credential recovery — for the primary owner or any co-owner — when the CLI's local shown-once copy is unavailable", "configure system AI purposes and view app/environment/run-attributed usage", "connect/revoke GitHub security sources and inspect ref-to-SHA jobs, routes, retention, coverage, and normalized reports"];
254
254
  };
255
255
  type Output = Pick<typeof console, "log">;
256
256
  /** Print the stable responsibility boundary for humans or agent tooling. */
package/dist/index.js CHANGED
@@ -49,7 +49,7 @@ import {
49
49
  startHostedSecurityJob,
50
50
  surfacePaths,
51
51
  validateInvocation
52
- } from "./chunk-FYSV7POZ.js";
52
+ } from "./chunk-5MRY3V2K.js";
53
53
  export {
54
54
  AGENT_HARNESSES,
55
55
  CAPABILITIES,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odla-ai/cli",
3
- "version": "0.25.11",
3
+ "version": "0.25.17",
4
4
  "description": "Agent-operable CLI for odla provisioning, calendar consent and sync lifecycle, System AI administration, Worker secrets, security jobs, and smoke checks.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://odla.ai/docs/packages/cli",
@@ -19,6 +19,24 @@ The core move is **cutting high-dimensional data to isolate the bad slice** —
19
19
  "is p95 high" but "*which* route / status / model / user is dragging it, and what
20
20
  do those requests share."
21
21
 
22
+ Start with the stable aggregate envelope before composing individual routes:
23
+
24
+ ```cmd
25
+ npx @odla-ai/cli context show --app <appId> --env prod --json
26
+ npx @odla-ai/cli o11y status --app <appId> --env prod --minutes 60 --json
27
+ ```
28
+
29
+ Both commands work outside a project checkout. `context show` reports where
30
+ platform, app, environment, and developer-token context came from without
31
+ printing a credential or starting a handshake. Prefer `ODLA_DEV_TOKEN` for an
32
+ unattended agent; it is an ordinary revocable owner grant, not the collector's
33
+ machine token.
34
+
35
+ Schema v9 includes `applicationVersions`, which attributes request, error, and
36
+ latency evidence to exact Worker version ids. Multiple values can be a rollout;
37
+ an older id receiving traffic after the rollout is evidence, not a timestamp
38
+ guess.
39
+
22
40
  ## Access
23
41
 
24
42
  All reads go through the platform shell, operator-authed, so the collector's token
@@ -29,13 +47,12 @@ GET https://odla.ai/o11y/<appId>/<endpoint>?env=prod
29
47
  Authorization: Bearer <developer-token>
30
48
  ```
31
49
 
32
- Get `<developer-token>` from `@odla-ai/cli` or the device handshake: start with
33
- `POST https://odla.ai/handshake` and
34
- `{"email":"<existing-odla-account>","label":"o11y debugger"}`, show the returned
35
- verification URL, then poll `POST /handshake/poll`. Email is a non-secret
36
- identifier; never ask for a password or session token. The matching account
37
- must sign in and explicitly review and approve the exact code. `env` is `prod`
38
- (default) or `dev`. If a read returns `{"error":"ae_not_configured"}` (501), the app's metrics
50
+ Get `<developer-token>` through `@odla-ai/cli`: reuse `ODLA_DEV_TOKEN`, its
51
+ private cache, or let the CLI start the email-bound device handshake. Email is
52
+ a non-secret identifier; never ask for a password or session token. The
53
+ matching account must sign in and explicitly review and approve the exact
54
+ code. `env` is `prod` (default) or `dev`. If a read returns
55
+ `{"error":"ae_not_configured"}` (501), the app's metrics
39
56
  reads aren't turned on yet — errors/traces still work; say so and fall back to them.
40
57
 
41
58
  ## Endpoints
@@ -49,12 +66,13 @@ reads aren't turned on yet — errors/traces still work; say so and fall back to
49
66
  | `GET /o11y/<app>/metrics/red?minutes=60` | request/error/latency by route |
50
67
  | `GET /o11y/<app>/metrics/timeseries?minutes=60` | RED over time (spot the spike) |
51
68
  | `GET /o11y/<app>/explore?dimension=&metric=` | **RED grouped by ANY dimension** |
69
+ | `GET /o11y/odla-db/provider/cloudflare/capacity` | redacted account-scoped DO, D1, and R2 storage/load/latency evidence plus truncation |
52
70
  | `GET /o11y/<app>/llm/cost?minutes=1440` | spend by provider/model |
53
71
  | `GET /o11y/<app>/llm/cost/timeseries` | spend over time |
54
72
  | `GET /o11y/<app>/alerts` | configured triggers + firing history |
55
73
 
56
74
  `explore` dimensions: `route`, `status`, `name`, `kind`, `http_status`,
57
- `http_method`, `env`. `metric` (what to rank by): `p95_ms`, `avg_ms`, `requests`,
75
+ `http_method`, `env`, `version`, `colo`. `metric` (what to rank by): `p95_ms`, `avg_ms`, `requests`,
58
76
  `errors`.
59
77
 
60
78
  ## Triage loops
@@ -69,11 +87,13 @@ downstream call (db, LLM, fetch) failed or was slow. Name the failing line.
69
87
  loop:
70
88
  1. `GET /metrics/timeseries?minutes=<window>` — confirm the spike and its window.
71
89
  2. `GET /explore?dimension=route&metric=p95_ms` — which route owns the p95? Then
72
- pivot the dimension: `status`, `http_status`, `http_method`, `env` — keep
90
+ pivot the dimension: `status`, `http_status`, `http_method`, `env`, `version`,
91
+ `colo` — keep
73
92
  slicing until one value dominates the metric.
74
93
  3. Pull a couple of the offending traces (`/events` filtered to that route, then
75
94
  `/traces/<id>`) and read their spans + attributes. State **what the bad
76
- requests share** (a route, a status code, a slow db/LLM span, a deploy env).
95
+ requests share** (a route, a status code, a slow db/LLM span, a deploy env,
96
+ or an exact Worker version).
77
97
 
78
98
  **Cost is climbing.** `GET /llm/cost/timeseries` (when) + `GET /llm/cost` (which
79
99
  model). A single expensive model or a runaway call count is usually the story.