@odla-ai/cli 0.25.12 → 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 +61 -7
- package/dist/bin.cjs +637 -104
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +1 -1
- package/dist/{chunk-MFC4TX6W.js → chunk-5MRY3V2K.js} +620 -87
- package/dist/chunk-5MRY3V2K.js.map +1 -0
- package/dist/index.cjs +637 -104
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/skills/odla-o11y-debug/SKILL.md +18 -10
- package/dist/chunk-MFC4TX6W.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -247,7 +247,7 @@ 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, exact Worker versions observed in traffic, 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
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"];
|
package/dist/index.d.ts
CHANGED
|
@@ -247,7 +247,7 @@ 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, exact Worker versions observed in traffic, 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
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"];
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odla-ai/cli",
|
|
3
|
-
"version": "0.25.
|
|
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",
|
|
@@ -22,10 +22,17 @@ do those requests share."
|
|
|
22
22
|
Start with the stable aggregate envelope before composing individual routes:
|
|
23
23
|
|
|
24
24
|
```cmd
|
|
25
|
+
npx @odla-ai/cli context show --app <appId> --env prod --json
|
|
25
26
|
npx @odla-ai/cli o11y status --app <appId> --env prod --minutes 60 --json
|
|
26
27
|
```
|
|
27
28
|
|
|
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
|
|
29
36
|
latency evidence to exact Worker version ids. Multiple values can be a rollout;
|
|
30
37
|
an older id receiving traffic after the rollout is evidence, not a timestamp
|
|
31
38
|
guess.
|
|
@@ -40,13 +47,12 @@ GET https://odla.ai/o11y/<appId>/<endpoint>?env=prod
|
|
|
40
47
|
Authorization: Bearer <developer-token>
|
|
41
48
|
```
|
|
42
49
|
|
|
43
|
-
Get `<developer-token>`
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
(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
|
|
50
56
|
reads aren't turned on yet — errors/traces still work; say so and fall back to them.
|
|
51
57
|
|
|
52
58
|
## Endpoints
|
|
@@ -60,12 +66,13 @@ reads aren't turned on yet — errors/traces still work; say so and fall back to
|
|
|
60
66
|
| `GET /o11y/<app>/metrics/red?minutes=60` | request/error/latency by route |
|
|
61
67
|
| `GET /o11y/<app>/metrics/timeseries?minutes=60` | RED over time (spot the spike) |
|
|
62
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 |
|
|
63
70
|
| `GET /o11y/<app>/llm/cost?minutes=1440` | spend by provider/model |
|
|
64
71
|
| `GET /o11y/<app>/llm/cost/timeseries` | spend over time |
|
|
65
72
|
| `GET /o11y/<app>/alerts` | configured triggers + firing history |
|
|
66
73
|
|
|
67
74
|
`explore` dimensions: `route`, `status`, `name`, `kind`, `http_status`,
|
|
68
|
-
`http_method`, `env`, `version`. `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`,
|
|
69
76
|
`errors`.
|
|
70
77
|
|
|
71
78
|
## Triage loops
|
|
@@ -80,7 +87,8 @@ downstream call (db, LLM, fetch) failed or was slow. Name the failing line.
|
|
|
80
87
|
loop:
|
|
81
88
|
1. `GET /metrics/timeseries?minutes=<window>` — confirm the spike and its window.
|
|
82
89
|
2. `GET /explore?dimension=route&metric=p95_ms` — which route owns the p95? Then
|
|
83
|
-
pivot the dimension: `status`, `http_status`, `http_method`, `env`, `version
|
|
90
|
+
pivot the dimension: `status`, `http_status`, `http_method`, `env`, `version`,
|
|
91
|
+
`colo` — keep
|
|
84
92
|
slicing until one value dominates the metric.
|
|
85
93
|
3. Pull a couple of the offending traces (`/events` filtered to that route, then
|
|
86
94
|
`/traces/<id>`) and read their spans + attributes. State **what the bad
|