@odla-ai/cli 0.6.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/dist/index.d.cts CHANGED
@@ -10,8 +10,9 @@ import { SecurityReport, PlatformSecurityRun } from '@odla-ai/security';
10
10
  * Recognized commands: `version`/`-v`/`--version` and `help`/`-h`/`--help` print
11
11
  * and return; `init` scaffolds a project (requires `--app-id` and `--name`);
12
12
  * `doctor` validates config offline; `capabilities` prints the responsibility
13
- * boundary; `admin ai` reads/updates purpose-specific platform AI policies and
14
- * write-only credentials through a short-lived exact-scope device grant;
13
+ * boundary; `admin ai` reads/updates purpose-specific platform AI policies,
14
+ * transfers write-only credentials, and reads metadata-only attributed usage
15
+ * through separate short-lived exact-scope device grants;
15
16
  * `security run` performs an explicitly acknowledged, app-attributed hosted
16
17
  * reasoning pass; `provision` runs the full provision (including optional secret
17
18
  * rotation, local vars, and deployed secret push); `smoke` checks a live env;
@@ -26,15 +27,32 @@ import { SecurityReport, PlatformSecurityRun } from '@odla-ai/security';
26
27
  */
27
28
  declare function runCli(argv?: string[]): Promise<void>;
28
29
 
30
+ /** One exact platform scope obtainable through the admin device flow. */
31
+ type ScopedPlatformScope = "platform:ai:policy:read" | "platform:ai:policy:write" | "platform:ai:credential:read" | "platform:ai:credential:write" | "platform:ai:usage:read" | "platform:ai:audit:read" | "platform:security:self";
32
+ /** Inputs for obtaining one short-lived, exact-scope platform device grant. */
33
+ interface ScopedPlatformTokenOptions {
34
+ platform: string;
35
+ scope: ScopedPlatformScope;
36
+ open?: boolean;
37
+ fetch?: typeof fetch;
38
+ stdout?: Pick<typeof console, "log">;
39
+ openApprovalUrl?: (url: string) => Promise<void>;
40
+ tokenFile?: string;
41
+ }
42
+ /** Obtain/cache one exact platform scope without granting ambient admin. */
43
+ declare function getScopedPlatformToken(options: ScopedPlatformTokenOptions): Promise<string>;
44
+
29
45
  /** Hosted platform purposes whose provider, model, and budgets an admin may route. */
30
46
  declare const SYSTEM_AI_PURPOSES: readonly ["o11y.triage", "security.discovery", "security.validation"];
31
47
  /** One catalog-validated, platform-funded System AI purpose. */
32
48
  type SystemAiPurpose = (typeof SYSTEM_AI_PURPOSES)[number];
33
- /** Inputs for one System AI read, policy update, credential-status read, or
34
- * write-only credential transfer. Provider values may come only from a named
35
- * environment variable or stdin. */
49
+
50
+ /** Inputs for one System AI policy/catalog read, policy update,
51
+ * credential-status read, write-only credential transfer, or metadata-only
52
+ * usage or admin-audit read. Provider values may come only from a named environment variable
53
+ * or stdin. */
36
54
  interface AdminAiOptions {
37
- action: "show" | "set" | "credentials" | "credential-set";
55
+ action: "show" | "models" | "set" | "credentials" | "credential-set" | "usage" | "audit";
38
56
  purpose?: string;
39
57
  provider?: string;
40
58
  model?: string;
@@ -53,22 +71,20 @@ interface AdminAiOptions {
53
71
  fromEnv?: string;
54
72
  stdin?: boolean;
55
73
  readStdin?: () => Promise<string>;
74
+ discoveryProvider?: string;
75
+ discoveryModel?: string;
76
+ validationProvider?: string;
77
+ validationModel?: string;
78
+ /** Optional metadata-only usage filters. */
79
+ appId?: string;
80
+ env?: string;
81
+ runId?: string;
82
+ limit?: number;
56
83
  /** Separate short-lived admin-token cache; never reuses the app developer-token file. */
57
84
  tokenFile?: string;
58
85
  }
59
- /** Inputs for obtaining one short-lived, exact-scope platform device grant. */
60
- interface ScopedPlatformTokenOptions {
61
- platform: string;
62
- scope: "platform:ai:read" | "platform:ai:write" | "platform:security:self";
63
- open?: boolean;
64
- fetch?: typeof fetch;
65
- stdout?: Pick<typeof console, "log">;
66
- openApprovalUrl?: (url: string) => Promise<void>;
67
- tokenFile?: string;
68
- }
69
- /** Obtain/cache one exact platform scope without granting ambient admin. */
70
- declare function getScopedPlatformToken(options: ScopedPlatformTokenOptions): Promise<string>;
71
- /** Read or update platform-funded AI routing. Authentication is a short-lived,
86
+ /** Read or update platform-funded AI routing and inspect attributed usage.
87
+ * Authentication is a short-lived,
72
88
  * explicitly scoped device grant; ordinary app developer tokens never become
73
89
  * platform admins. Credential writes accept values only from a named env var
74
90
  * or stdin, transfer them once, and never place them in argv, output, or the
@@ -78,7 +94,7 @@ declare function adminAi(options: AdminAiOptions): Promise<void>;
78
94
  /** Stable, machine-readable division of work between the CLI, coding agent,
79
95
  * human operator, and Studio. Printed by `odla-ai capabilities --json`. */
80
96
  declare const CAPABILITIES: {
81
- readonly cli: readonly ["register the app and enable configured services per environment", "issue, persist, and explicitly rotate configured service credentials", "write local Worker values and push deployed Worker secrets through Wrangler stdin", "push db schema/rules and configure platform AI, auth, and deployment links", "validate config offline and smoke-test a provisioned db environment", "run app-attributed hosted security discovery and independent validation without provider keys", "let admins manage system AI routes/credentials through short-lived exact-scope approval"];
97
+ readonly cli: readonly ["register the app and enable configured services per environment", "issue, persist, and explicitly rotate configured service credentials", "write local Worker values and push deployed Worker secrets through Wrangler stdin", "push db schema/rules and configure platform AI, auth, and deployment links", "validate config offline and smoke-test a provisioned db environment", "run app-attributed hosted security discovery and independent validation without 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"];
82
98
  readonly agent: readonly ["install and import the selected odla SDKs", "wrap the Worker with withObservability and choose useful telemetry", "make application-specific schema, rules, auth, UI, and migration decisions"];
83
99
  readonly human: readonly ["approve the odla device code and one-off third-party logins", "consent to production changes with --yes", "request destructive credential rotation explicitly", "review application semantics, security findings, releases, and merges", "approve redacted-source disclosure before hosted security reasoning"];
84
100
  readonly studio: readonly ["view telemetry and environment state", "perform manual credential recovery when the CLI's local shown-once copy is unavailable", "configure system AI purposes and view app/environment/run-attributed usage"];
package/dist/index.d.ts CHANGED
@@ -10,8 +10,9 @@ import { SecurityReport, PlatformSecurityRun } from '@odla-ai/security';
10
10
  * Recognized commands: `version`/`-v`/`--version` and `help`/`-h`/`--help` print
11
11
  * and return; `init` scaffolds a project (requires `--app-id` and `--name`);
12
12
  * `doctor` validates config offline; `capabilities` prints the responsibility
13
- * boundary; `admin ai` reads/updates purpose-specific platform AI policies and
14
- * write-only credentials through a short-lived exact-scope device grant;
13
+ * boundary; `admin ai` reads/updates purpose-specific platform AI policies,
14
+ * transfers write-only credentials, and reads metadata-only attributed usage
15
+ * through separate short-lived exact-scope device grants;
15
16
  * `security run` performs an explicitly acknowledged, app-attributed hosted
16
17
  * reasoning pass; `provision` runs the full provision (including optional secret
17
18
  * rotation, local vars, and deployed secret push); `smoke` checks a live env;
@@ -26,15 +27,32 @@ import { SecurityReport, PlatformSecurityRun } from '@odla-ai/security';
26
27
  */
27
28
  declare function runCli(argv?: string[]): Promise<void>;
28
29
 
30
+ /** One exact platform scope obtainable through the admin device flow. */
31
+ type ScopedPlatformScope = "platform:ai:policy:read" | "platform:ai:policy:write" | "platform:ai:credential:read" | "platform:ai:credential:write" | "platform:ai:usage:read" | "platform:ai:audit:read" | "platform:security:self";
32
+ /** Inputs for obtaining one short-lived, exact-scope platform device grant. */
33
+ interface ScopedPlatformTokenOptions {
34
+ platform: string;
35
+ scope: ScopedPlatformScope;
36
+ open?: boolean;
37
+ fetch?: typeof fetch;
38
+ stdout?: Pick<typeof console, "log">;
39
+ openApprovalUrl?: (url: string) => Promise<void>;
40
+ tokenFile?: string;
41
+ }
42
+ /** Obtain/cache one exact platform scope without granting ambient admin. */
43
+ declare function getScopedPlatformToken(options: ScopedPlatformTokenOptions): Promise<string>;
44
+
29
45
  /** Hosted platform purposes whose provider, model, and budgets an admin may route. */
30
46
  declare const SYSTEM_AI_PURPOSES: readonly ["o11y.triage", "security.discovery", "security.validation"];
31
47
  /** One catalog-validated, platform-funded System AI purpose. */
32
48
  type SystemAiPurpose = (typeof SYSTEM_AI_PURPOSES)[number];
33
- /** Inputs for one System AI read, policy update, credential-status read, or
34
- * write-only credential transfer. Provider values may come only from a named
35
- * environment variable or stdin. */
49
+
50
+ /** Inputs for one System AI policy/catalog read, policy update,
51
+ * credential-status read, write-only credential transfer, or metadata-only
52
+ * usage or admin-audit read. Provider values may come only from a named environment variable
53
+ * or stdin. */
36
54
  interface AdminAiOptions {
37
- action: "show" | "set" | "credentials" | "credential-set";
55
+ action: "show" | "models" | "set" | "credentials" | "credential-set" | "usage" | "audit";
38
56
  purpose?: string;
39
57
  provider?: string;
40
58
  model?: string;
@@ -53,22 +71,20 @@ interface AdminAiOptions {
53
71
  fromEnv?: string;
54
72
  stdin?: boolean;
55
73
  readStdin?: () => Promise<string>;
74
+ discoveryProvider?: string;
75
+ discoveryModel?: string;
76
+ validationProvider?: string;
77
+ validationModel?: string;
78
+ /** Optional metadata-only usage filters. */
79
+ appId?: string;
80
+ env?: string;
81
+ runId?: string;
82
+ limit?: number;
56
83
  /** Separate short-lived admin-token cache; never reuses the app developer-token file. */
57
84
  tokenFile?: string;
58
85
  }
59
- /** Inputs for obtaining one short-lived, exact-scope platform device grant. */
60
- interface ScopedPlatformTokenOptions {
61
- platform: string;
62
- scope: "platform:ai:read" | "platform:ai:write" | "platform:security:self";
63
- open?: boolean;
64
- fetch?: typeof fetch;
65
- stdout?: Pick<typeof console, "log">;
66
- openApprovalUrl?: (url: string) => Promise<void>;
67
- tokenFile?: string;
68
- }
69
- /** Obtain/cache one exact platform scope without granting ambient admin. */
70
- declare function getScopedPlatformToken(options: ScopedPlatformTokenOptions): Promise<string>;
71
- /** Read or update platform-funded AI routing. Authentication is a short-lived,
86
+ /** Read or update platform-funded AI routing and inspect attributed usage.
87
+ * Authentication is a short-lived,
72
88
  * explicitly scoped device grant; ordinary app developer tokens never become
73
89
  * platform admins. Credential writes accept values only from a named env var
74
90
  * or stdin, transfer them once, and never place them in argv, output, or the
@@ -78,7 +94,7 @@ declare function adminAi(options: AdminAiOptions): Promise<void>;
78
94
  /** Stable, machine-readable division of work between the CLI, coding agent,
79
95
  * human operator, and Studio. Printed by `odla-ai capabilities --json`. */
80
96
  declare const CAPABILITIES: {
81
- readonly cli: readonly ["register the app and enable configured services per environment", "issue, persist, and explicitly rotate configured service credentials", "write local Worker values and push deployed Worker secrets through Wrangler stdin", "push db schema/rules and configure platform AI, auth, and deployment links", "validate config offline and smoke-test a provisioned db environment", "run app-attributed hosted security discovery and independent validation without provider keys", "let admins manage system AI routes/credentials through short-lived exact-scope approval"];
97
+ readonly cli: readonly ["register the app and enable configured services per environment", "issue, persist, and explicitly rotate configured service credentials", "write local Worker values and push deployed Worker secrets through Wrangler stdin", "push db schema/rules and configure platform AI, auth, and deployment links", "validate config offline and smoke-test a provisioned db environment", "run app-attributed hosted security discovery and independent validation without 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"];
82
98
  readonly agent: readonly ["install and import the selected odla SDKs", "wrap the Worker with withObservability and choose useful telemetry", "make application-specific schema, rules, auth, UI, and migration decisions"];
83
99
  readonly human: readonly ["approve the odla device code and one-off third-party logins", "consent to production changes with --yes", "request destructive credential rotation explicitly", "review application semantics, security findings, releases, and merges", "approve redacted-source disclosure before hosted security reasoning"];
84
100
  readonly studio: readonly ["view telemetry and environment state", "perform manual credential recovery when the CLI's local shown-once copy is unavailable", "configure system AI purposes and view app/environment/run-attributed usage"];
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@ import {
15
15
  runHostedSecurity,
16
16
  secretsPush,
17
17
  smoke
18
- } from "./chunk-OERLHVLH.js";
18
+ } from "./chunk-643B2AKG.js";
19
19
  export {
20
20
  AGENT_HARNESSES,
21
21
  CAPABILITIES,
package/llms.txt CHANGED
@@ -31,8 +31,8 @@ For a project you keep working in, install it as a dev dependency so the
31
31
  shorter `npx odla-ai` form works and the version is pinned by your lockfile:
32
32
 
33
33
  ```bash
34
- npm view @odla-ai/cli@0.6.0 version
35
- npm i -D --save-exact @odla-ai/cli@0.6.0
34
+ npm view @odla-ai/cli@0.7.0 version
35
+ npm i -D --save-exact @odla-ai/cli@0.7.0
36
36
  ```
37
37
 
38
38
  ## Prerequisites
@@ -63,9 +63,12 @@ npx odla-ai smoke --env dev
63
63
  npx odla-ai secrets push --env dev
64
64
  npx odla-ai security run . --env dev --ack-redacted-source
65
65
  npx odla-ai admin ai show
66
- npx odla-ai admin ai set security.discovery --provider anthropic --model claude-opus-4-8 --enabled
66
+ npx odla-ai admin ai models
67
+ 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
67
68
  npx odla-ai admin ai credentials
68
69
  npx odla-ai admin ai credential set anthropic --from-env ANTHROPIC_API_KEY
70
+ npx odla-ai admin ai usage --app-id my-app --env prod --limit 50
71
+ npx odla-ai admin ai audit --limit 25
69
72
  npx odla-ai skill install
70
73
  npx odla-ai version
71
74
  ```
@@ -133,6 +136,18 @@ not execute target code. After explicit redacted-source approval,
133
136
  `odla-ai security run . --env dev --ack-redacted-source` adds hosted discovery
134
137
  and independent validation. The CLI obtains/reuses app-owner auth and the
135
138
  platform supplies bounded role grants; it never requests provider keys.
139
+ The CLI schedules within those grants: recon consumes one discovery call,
140
+ first-pass hunts are capped before retries, and validation handles the
141
+ highest-risk candidates first. Used/skipped role calls appear in the summary
142
+ and report. Budget-limited coverage is explicitly incomplete and still fails
143
+ the default gate unless `--allow-incomplete` is supplied after review.
144
+ All hosted-security network calls target the configured odla platform origin.
145
+ The CLI transmits typed redacted security operations only and never contacts a
146
+ model-provider host; odla.ai owns the prompts/schemas, route, credential,
147
+ provider call, attribution, and receipt. Cached/environment tokens are bound to
148
+ their canonical platform audience and are rejected before disclosure on a
149
+ different origin. For a non-default platform, set the matching
150
+ `ODLA_DEV_TOKEN_AUDIENCE` with `ODLA_DEV_TOKEN`.
136
151
  Early-access run ceilings are rolling; a `429` includes the platform's safe
137
152
  retry hint, which the CLI surfaces without echoing arbitrary response text.
138
153
  Before installing the exact release, require
@@ -142,13 +157,27 @@ preflight passed, and does not prove the package name is absent. odla's own
142
157
  engineering environment uses an equivalent internal gate; customer projects
143
158
  should use the published `odla-security` command above.
144
159
 
145
- `admin ai show|set|credentials|credential set` manages platform-funded System
160
+ `admin ai show|models|set|credentials|credential set|usage|audit` manages platform-funded System
146
161
  AI (`o11y.triage`, `security.discovery`, `security.validation`). It uses a
147
162
  separate, mode-`0600` `.odla/admin-token.local.json` cache. Studio displays the
148
163
  exact scope, only an admin can approve it, and it expires after ~15 minutes;
149
- the token never becomes ambient admin. Credential writes accept only
164
+ policy, credential, and usage capabilities are separate and cannot act as the
165
+ approver on ordinary app/db/o11y routes. `admin ai models` reads the server
166
+ catalog. `admin ai set security` updates discovery and independent validation
167
+ together with expected revisions; a concurrent edit returns 409 and reloads
168
+ instead of being overwritten. `admin ai usage` requests its own read-only
169
+ capability and lists metadata-only events and status aggregates; filter by
170
+ `--app-id`, `--env`, `--run-id`, and `--limit`, or emit `--json`. Prompts,
171
+ repository source, model output, reports, and provider credentials are never in
172
+ that response.
173
+ `admin ai audit` uses its own read capability for immutable, metadata-only
174
+ policy and credential change events with actor attribution; credential values
175
+ never enter that trail. Credential writes accept only
150
176
  `--from-env <NAME>` or `--stdin` and never place the value in argv, output, or
151
177
  the cache. System AI and each app's BYOK AI are separate vault/funding paths.
178
+ Admin bounds can only narrow hard ceilings of 64 calls per role/run and, for
179
+ each call, 512 KiB input and 32,768 output tokens. A non-default platform environment token
180
+ must declare the matching `ODLA_ADMIN_TOKEN_AUDIENCE`.
152
181
 
153
182
  `secrets push --env <env>` is the narrower recovery/retry command. It moves the
154
183
  configured env's odla-db key and/or o11y ingest token from
@@ -251,7 +280,7 @@ If schema is present and rules are omitted, `defaultRules: "deny"` generates
251
280
  deny-all rules for every schema entity. That is the safe default for Workers
252
281
  that mediate reads and writes with an app key.
253
282
 
254
- ## API reference (generated from dist/index.d.ts, v0.6.0)
283
+ ## API reference (generated from dist/index.d.ts, v0.7.0)
255
284
 
256
285
  ```ts
257
286
  import { SecurityReport, PlatformSecurityRun } from '@odla-ai/security';
@@ -266,8 +295,9 @@ import { SecurityReport, PlatformSecurityRun } from '@odla-ai/security';
266
295
  * Recognized commands: `version`/`-v`/`--version` and `help`/`-h`/`--help` print
267
296
  * and return; `init` scaffolds a project (requires `--app-id` and `--name`);
268
297
  * `doctor` validates config offline; `capabilities` prints the responsibility
269
- * boundary; `admin ai` reads/updates purpose-specific platform AI policies and
270
- * write-only credentials through a short-lived exact-scope device grant;
298
+ * boundary; `admin ai` reads/updates purpose-specific platform AI policies,
299
+ * transfers write-only credentials, and reads metadata-only attributed usage
300
+ * through separate short-lived exact-scope device grants;
271
301
  * `security run` performs an explicitly acknowledged, app-attributed hosted
272
302
  * reasoning pass; `provision` runs the full provision (including optional secret
273
303
  * rotation, local vars, and deployed secret push); `smoke` checks a live env;
@@ -282,15 +312,32 @@ import { SecurityReport, PlatformSecurityRun } from '@odla-ai/security';
282
312
  */
283
313
  declare function runCli(argv?: string[]): Promise<void>;
284
314
 
315
+ /** One exact platform scope obtainable through the admin device flow. */
316
+ type ScopedPlatformScope = "platform:ai:policy:read" | "platform:ai:policy:write" | "platform:ai:credential:read" | "platform:ai:credential:write" | "platform:ai:usage:read" | "platform:ai:audit:read" | "platform:security:self";
317
+ /** Inputs for obtaining one short-lived, exact-scope platform device grant. */
318
+ interface ScopedPlatformTokenOptions {
319
+ platform: string;
320
+ scope: ScopedPlatformScope;
321
+ open?: boolean;
322
+ fetch?: typeof fetch;
323
+ stdout?: Pick<typeof console, "log">;
324
+ openApprovalUrl?: (url: string) => Promise<void>;
325
+ tokenFile?: string;
326
+ }
327
+ /** Obtain/cache one exact platform scope without granting ambient admin. */
328
+ declare function getScopedPlatformToken(options: ScopedPlatformTokenOptions): Promise<string>;
329
+
285
330
  /** Hosted platform purposes whose provider, model, and budgets an admin may route. */
286
331
  declare const SYSTEM_AI_PURPOSES: readonly ["o11y.triage", "security.discovery", "security.validation"];
287
332
  /** One catalog-validated, platform-funded System AI purpose. */
288
333
  type SystemAiPurpose = (typeof SYSTEM_AI_PURPOSES)[number];
289
- /** Inputs for one System AI read, policy update, credential-status read, or
290
- * write-only credential transfer. Provider values may come only from a named
291
- * environment variable or stdin. */
334
+
335
+ /** Inputs for one System AI policy/catalog read, policy update,
336
+ * credential-status read, write-only credential transfer, or metadata-only
337
+ * usage or admin-audit read. Provider values may come only from a named environment variable
338
+ * or stdin. */
292
339
  interface AdminAiOptions {
293
- action: "show" | "set" | "credentials" | "credential-set";
340
+ action: "show" | "models" | "set" | "credentials" | "credential-set" | "usage" | "audit";
294
341
  purpose?: string;
295
342
  provider?: string;
296
343
  model?: string;
@@ -309,22 +356,20 @@ interface AdminAiOptions {
309
356
  fromEnv?: string;
310
357
  stdin?: boolean;
311
358
  readStdin?: () => Promise<string>;
359
+ discoveryProvider?: string;
360
+ discoveryModel?: string;
361
+ validationProvider?: string;
362
+ validationModel?: string;
363
+ /** Optional metadata-only usage filters. */
364
+ appId?: string;
365
+ env?: string;
366
+ runId?: string;
367
+ limit?: number;
312
368
  /** Separate short-lived admin-token cache; never reuses the app developer-token file. */
313
369
  tokenFile?: string;
314
370
  }
315
- /** Inputs for obtaining one short-lived, exact-scope platform device grant. */
316
- interface ScopedPlatformTokenOptions {
317
- platform: string;
318
- scope: "platform:ai:read" | "platform:ai:write" | "platform:security:self";
319
- open?: boolean;
320
- fetch?: typeof fetch;
321
- stdout?: Pick<typeof console, "log">;
322
- openApprovalUrl?: (url: string) => Promise<void>;
323
- tokenFile?: string;
324
- }
325
- /** Obtain/cache one exact platform scope without granting ambient admin. */
326
- declare function getScopedPlatformToken(options: ScopedPlatformTokenOptions): Promise<string>;
327
- /** Read or update platform-funded AI routing. Authentication is a short-lived,
371
+ /** Read or update platform-funded AI routing and inspect attributed usage.
372
+ * Authentication is a short-lived,
328
373
  * explicitly scoped device grant; ordinary app developer tokens never become
329
374
  * platform admins. Credential writes accept values only from a named env var
330
375
  * or stdin, transfer them once, and never place them in argv, output, or the
@@ -334,7 +379,7 @@ declare function adminAi(options: AdminAiOptions): Promise<void>;
334
379
  /** Stable, machine-readable division of work between the CLI, coding agent,
335
380
  * human operator, and Studio. Printed by `odla-ai capabilities --json`. */
336
381
  declare const CAPABILITIES: {
337
- readonly cli: readonly ["register the app and enable configured services per environment", "issue, persist, and explicitly rotate configured service credentials", "write local Worker values and push deployed Worker secrets through Wrangler stdin", "push db schema/rules and configure platform AI, auth, and deployment links", "validate config offline and smoke-test a provisioned db environment", "run app-attributed hosted security discovery and independent validation without provider keys", "let admins manage system AI routes/credentials through short-lived exact-scope approval"];
382
+ readonly cli: readonly ["register the app and enable configured services per environment", "issue, persist, and explicitly rotate configured service credentials", "write local Worker values and push deployed Worker secrets through Wrangler stdin", "push db schema/rules and configure platform AI, auth, and deployment links", "validate config offline and smoke-test a provisioned db environment", "run app-attributed hosted security discovery and independent validation without 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"];
338
383
  readonly agent: readonly ["install and import the selected odla SDKs", "wrap the Worker with withObservability and choose useful telemetry", "make application-specific schema, rules, auth, UI, and migration decisions"];
339
384
  readonly human: readonly ["approve the odla device code and one-off third-party logins", "consent to production changes with --yes", "request destructive credential rotation explicitly", "review application semantics, security findings, releases, and merges", "approve redacted-source disclosure before hosted security reasoning"];
340
385
  readonly studio: readonly ["view telemetry and environment state", "perform manual credential recovery when the CLI's local shown-once copy is unavailable", "configure system AI purposes and view app/environment/run-attributed usage"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odla-ai/cli",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Agent-operable CLI for odla provisioning, scoped System AI administration, hosted security runs, Worker secrets, and smoke checks.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://odla.ai/docs/packages/cli",
@@ -59,9 +59,9 @@
59
59
  "prepublishOnly": "npm run build && npm run gen:llms"
60
60
  },
61
61
  "dependencies": {
62
- "@odla-ai/ai": "^0.3.1",
62
+ "@odla-ai/ai": "^0.3.2",
63
63
  "@odla-ai/apps": "^0.7.1",
64
- "@odla-ai/db": "^0.6.1",
64
+ "@odla-ai/db": "^0.6.2",
65
65
  "@odla-ai/security": "^0.2.0"
66
66
  },
67
67
  "devDependencies": {
@@ -10,8 +10,8 @@ in the browser in interactive terminals).
10
10
 
11
11
  ## Steps
12
12
 
13
- 1. Require `npm view @odla-ai/cli@0.6.0 version` to succeed, then run
14
- `npm i -D --save-exact @odla-ai/cli@0.6.0` and `npm i @odla-ai/db`.
13
+ 1. Require `npm view @odla-ai/cli@0.7.0 version` to succeed, then run
14
+ `npm i -D --save-exact @odla-ai/cli@0.7.0` and `npm i @odla-ai/db`.
15
15
  2. `npx @odla-ai/cli init --app-id <id> --name "<Name>" --env dev --services db`
16
16
  Review `odla.config.mjs`. Keep `envs: ["dev"]` — prod is Phase 5. Set
17
17
  `links.dev` to the URL the Phase 1 `wrangler deploy` **actually printed** —
@@ -10,7 +10,7 @@
10
10
  | LLM provider key | tenant vault | env var in the HUMAN's shell for one provision run; never wrangler vars, never git, never chat |
11
11
  | `odla_sk_…` (tenant db key) | wrangler secret `ODLA_API_KEY` + `.odla/credentials.local.json` (0600) + `.dev.vars` | present when db is enabled; move it only with the pipeline below |
12
12
  | `odla_dev_…` (developer token) | `.odla/dev-token.json` (0600) | ~24h lifetime, provision-time only; never deployed |
13
- | scoped `odla_dev_…` (admin-approved platform action) | `.odla/admin-token.local.json` (0600) | exact visible scope, ~15m lifetime, never ambient admin or deployed |
13
+ | scoped `odla_dev_…` (admin-approved platform capability) | `.odla/admin-token.local.json` (0600) | separate policy/credential/usage/self-audit scope, ~15m lifetime, denied on owner routes, never deployed |
14
14
  | `o11y_…` (o11y ingest token) | wrangler secret `ODLA_O11Y_TOKEN` + `.odla/credentials.local.json` (0600) + `.dev.vars` | only if the app enables o11y; provision issues/reuses it and moves it alongside the db key; never a var, never chat |
15
15
  | `ODLA_ENDPOINT` / `ODLA_TENANT` / `ODLA_PLATFORM` / `ODLA_APP_ID` / `ODLA_ENV` | wrangler `vars` | not secrets; keep them set in every env block |
16
16
  | `ODLA_O11Y_ENDPOINT` / `ODLA_O11Y_SERVICE` | `.dev.vars` from provision or optional wrangler `vars` overrides | not secrets; public ingest defaults to `https://o11y.odla.ai` and `ODLA_APP_ID` when the token is present |