@odla-ai/cli 0.5.0 → 0.7.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
@@ -7,9 +7,11 @@
7
7
 
8
8
  Project-neutral provisioning CLI for odla apps. It creates and validates an
9
9
  `odla.config.mjs`, then uses that config to register an app, enable services,
10
- push odla-db schema/rules, configure platform AI, configure Clerk auth, record
10
+ push odla-db schema/rules, configure per-app BYOK AI, configure Clerk auth, record
11
11
  deployment links, provision o11y ingest credentials, and transfer local or
12
- deployed Worker secrets without printing them.
12
+ deployed Worker secrets without printing them. It also gives platform admins a
13
+ scoped System AI control surface and gives app owners a provider-key-free
14
+ hosted security command.
13
15
 
14
16
  It does not know about any specific app. App identity, environments, services,
15
17
  schema, rules, auth, AI provider, and links all come from config.
@@ -27,8 +29,8 @@ For a project you keep working in, install it as a dev dependency so the
27
29
  shorter `npx odla-ai` form works and the version is pinned by your lockfile:
28
30
 
29
31
  ```bash
30
- npm view @odla-ai/cli@0.5.0 version
31
- npm i -D --save-exact @odla-ai/cli@0.5.0
32
+ npm view @odla-ai/cli@0.7.0 version
33
+ npm i -D --save-exact @odla-ai/cli@0.7.0
32
34
  ```
33
35
 
34
36
  ## Prerequisites
@@ -57,6 +59,14 @@ npx odla-ai provision --dry-run
57
59
  npx odla-ai provision --write-dev-vars --push-secrets
58
60
  npx odla-ai smoke --env dev
59
61
  npx odla-ai secrets push --env dev
62
+ npx odla-ai security run . --env dev --ack-redacted-source
63
+ npx odla-ai admin ai show
64
+ npx odla-ai admin ai models
65
+ npx odla-ai admin ai set security --discovery-provider anthropic --discovery-model claude-opus-4-8 --validation-provider openai --validation-model gpt-5.5 --enabled
66
+ npx odla-ai admin ai credentials
67
+ npx odla-ai admin ai credential set anthropic --from-env ANTHROPIC_API_KEY
68
+ npx odla-ai admin ai usage --app-id my-app --env prod --limit 50
69
+ npx odla-ai admin ai audit --limit 25
60
70
  npx odla-ai skill install
61
71
  npx odla-ai version
62
72
  ```
@@ -117,17 +127,56 @@ when provisioning has not written `.odla/credentials.local.json`.
117
127
 
118
128
  The bundled build/migration skills add a passive pre-ship gate with
119
129
  `@odla-ai/security`: after the exact-version availability check, run
120
- `npm i -D --save-exact @odla-ai/security@0.1.0`, then
130
+ `npm i -D --save-exact @odla-ai/security@0.2.0`, then
121
131
  `npx odla-security scan . --profile odla --out .odla/security/pre-ship --fail-on high --fail-on-candidates critical`.
122
- This is a separate binary, not a hidden `odla-ai` subcommand; it makes no model
123
- calls and does not execute target code.
132
+ The passive scan remains a separate binary: it makes no model calls and does
133
+ not execute target code. After explicit redacted-source approval,
134
+ `odla-ai security run . --env dev --ack-redacted-source` adds hosted discovery
135
+ and independent validation. The CLI obtains/reuses app-owner auth and the
136
+ platform supplies bounded role grants; it never requests provider keys.
137
+ The hosted run accounts for both immutable role ceilings: discovery reserves
138
+ one call for recon, caps first-pass hunts to what remains, and uses only
139
+ residual calls for retries; validation reviews the highest-risk candidates
140
+ first. The console and artifacts show used/skipped calls, and a budget-limited
141
+ run is `incomplete` unless explicitly reviewed with `--allow-incomplete`.
142
+ All hosted-security network calls target the configured odla platform origin
143
+ (`/registry/security/runs`, `/registry/ai/extract`, and completion). The CLI
144
+ never contacts a model-provider host; the odla.ai broker alone owns the typed
145
+ security prompts/schemas and resolves the admin-selected route and vaulted
146
+ credential. A cached or environment token is audience-bound and is never sent
147
+ to a different `--platform` origin.
148
+ Early-access run ceilings are rolling; a `429` includes the platform's safe
149
+ retry hint, which the CLI surfaces without echoing arbitrary response text.
124
150
  Before installing the exact release, require
125
- `npm view @odla-ai/security@0.1.0 version` to succeed before installation. An
151
+ `npm view @odla-ai/security@0.2.0 version` to succeed before installation. An
126
152
  exact-version `E404` means the release is unavailable, not that the security
127
153
  preflight passed, and does not prove the package name is absent. odla's own
128
154
  engineering environment uses an equivalent internal gate; customer projects
129
155
  should use the published `odla-security` command above.
130
156
 
157
+ `admin ai show|models|set|credentials|credential set|usage|audit` manages platform-funded System
158
+ AI (`o11y.triage`, `security.discovery`, `security.validation`). It uses a
159
+ separate, mode-`0600` `.odla/admin-token.local.json` cache. Studio displays the
160
+ exact scope, only an admin can approve it, and it expires after ~15 minutes;
161
+ policy, credential, and usage capabilities are separate and cannot act as the
162
+ approver on ordinary app/db/o11y routes. `admin ai models` reads the server
163
+ catalog. `admin ai set security` updates discovery and independent validation
164
+ together with expected revisions; a concurrent edit returns 409 and reloads
165
+ instead of being overwritten. `admin ai usage` requests its own read-only
166
+ capability and lists metadata-only events and status aggregates; narrow it with
167
+ `--app-id`, `--env`, `--run-id`, and `--limit`, or use `--json` for automation.
168
+ `admin ai audit` separately reads immutable metadata-only policy and credential
169
+ change events with actor attribution; credential values never enter that trail.
170
+ It never returns prompts, repository source, model output, reports, or provider
171
+ credentials. Credential writes accept only
172
+ `--from-env <NAME>` or `--stdin` and never place the value in argv, output, or
173
+ the cache. System AI and each app's BYOK AI are separate vault/funding paths.
174
+ Discovery and validation provider/model settings are authoritative server
175
+ policy: a security command has no field that can override either route. Admin
176
+ bounds can only narrow the hard ceilings of 64 calls per role/run and, for each
177
+ call, 512 KiB input and 32,768 output tokens. For a non-default platform, environment credentials
178
+ must also declare the matching `ODLA_ADMIN_TOKEN_AUDIENCE`.
179
+
131
180
  `secrets push --env <env>` is the narrower recovery/retry command. It moves the
132
181
  configured env's odla-db key and/or o11y ingest token from
133
182
  `.odla/credentials.local.json` into the deployed Worker by piping each value
@@ -149,7 +198,8 @@ agent owns application semantics: installing `@odla-ai/o11y`, wrapping the
149
198
  Worker with `withObservability`, and choosing useful spans, metrics, errors, and
150
199
  LLM-usage records. The human owns the device approval, production consent, and
151
200
  explicit destructive rotation. Studio is where people view telemetry and
152
- perform manual recovery; its token control is not the normal setup path.
201
+ perform manual recovery, configure System AI, and inspect app/run-attributed
202
+ platform usage; its o11y token control is not the normal setup path.
153
203
  Run `npx odla-ai capabilities` for the human-readable contract or add `--json`
154
204
  when an agent or tool needs to branch on it without scraping prose.
155
205