@odla-ai/cli 0.27.7 → 0.27.9

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.js CHANGED
@@ -57,7 +57,7 @@ import {
57
57
  startHostedSecurityJob,
58
58
  surfacePaths,
59
59
  validateInvocation
60
- } from "./chunk-MZSU4YQL.js";
60
+ } from "./chunk-LT56MKDK.js";
61
61
  export {
62
62
  AGENT_HARNESSES,
63
63
  CAPABILITIES,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odla-ai/cli",
3
- "version": "0.27.7",
3
+ "version": "0.27.9",
4
4
  "description": "Agent-operable CLI for odla provisioning, calendar consent and connection lifecycle, System AI administration, Worker secrets, security jobs, and smoke checks.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://odla.ai/docs/packages/cli",
@@ -115,6 +115,7 @@ guessing which platform/credential steps need manual work. Then:
115
115
  `--wait <seconds>`); exit code 75 means still pending: the handshake is
116
116
  persisted, so once the human approves, re-run the same command and it
117
117
  resumes the same code and collects the token. It creates the app,
118
+ consuming a one-time exact-id reservation when the approved app is new,
118
119
  enables services, issues or reuses configured credentials (db key + o11y
119
120
  ingest token when enabled), composes declared integration schema/rules and
120
121
  guarded seeds, writes `.dev.vars`, and
@@ -314,5 +315,5 @@ code, paste a publishable key, run a command) — and wait for a nod.
314
315
  across credential expiry, linked worktrees, and non-odla-ai projects without
315
316
  copying a token or widening project authority.
316
317
  - `references/co-owners.md` — sharing one app's db and tooling across a team:
317
- `app owners add/list/remove`, and how each co-owner self-provisions their own
318
+ signed-in Studio ownership changes, and how each co-owner self-provisions their own
318
319
  credentials (dev and the shared prod database) without any secret handoff.
@@ -112,8 +112,15 @@ permanent authority.
112
112
  - Wrong handle requested: decline it and correct the project/SDK request before
113
113
  starting a fresh handshake. If already approved, revoke the new credential in
114
114
  Studio; do not rename or merge principals by editing local metadata.
115
- - Missing project after reconnect: start a new reviewed handshake and select the
116
- exact project; never widen to all projects.
115
+ - Missing project on first provision: approve the exact id. Collection records
116
+ a one-time reservation plus the explicit `app.manage` provision capability;
117
+ the credential creates only that app, Registry binds the grant to its new
118
+ incarnation, and provision may continue through non-lifecycle configuration.
119
+ Never pre-create a substitute or widen to all projects. Ownership and
120
+ lifecycle operations still require the direct human session.
121
+ - Approval returns 404: treat it as a Registry routing regression, not a missing
122
+ project outcome. Preserve the code and pending state, report the incident,
123
+ and retry the same request after Registry is healthy.
117
124
  - Project ownership/lifecycle changed after approval: collection expires the
118
125
  unusable replacement while preserving the current credential and grant set.
119
126
  Restore the intended project state, then start and review a fresh handshake.
@@ -55,7 +55,8 @@ The email is an account identifier, never a password or session credential.
55
55
  Prints a short device code and a link. ⏸ That same account opens the link, signs
56
56
  in, explicitly reviews the exact code, and approves it — loading the URL alone
57
57
  does not claim access, and no secret passes through the chat. Provision then:
58
- creates the app, enables its services, issues or reuses the db key (and the
58
+ creates the app (consuming the approved one-time exact-id reservation when it
59
+ is new), enables its services, issues or reuses the db key (and the
59
60
  o11y ingest token when o11y is enabled), pushes the composed app + integration
60
61
  schema/rules, creates missing guarded seeds, writes
61
62
  `.dev.vars`, and transfers configured Worker secrets through Wrangler stdin.
@@ -64,6 +65,15 @@ Local credential files are `0600` and gitignored. Verify with
64
65
  anything unset. `--push-secrets` preflights the Wrangler config and login before
65
66
  issuing or rotating a shown-once credential.
66
67
 
68
+ If Studio shows an unknown exact app id, that is a valid first provision: the
69
+ human approves the id and explicit `app.manage` provision capability, the
70
+ collected credential creates only that app, and the grant becomes bound to its
71
+ new incarnation. It may then finish non-lifecycle service configuration and
72
+ tenant administration. Do not pre-create a substitute app or broaden the
73
+ request. A 404 from **Approve** is a platform regression; capture the code and
74
+ retry only after Registry is healthy. Ownership, rename/category, and lifecycle
75
+ mutations remain direct-human operations.
76
+
67
77
  Calendar adds a second ⏸ checkpoint after the odla device approval: provision
68
78
  prints/opens a state-bound Google URL issued by the platform and waits while
69
79
  the human grants the booking scopes in a browser. The CLI never receives the
@@ -13,16 +13,11 @@ records who co-owns an app; the db honors any co-owner when they provision.
13
13
 
14
14
  ## Onboarding a co-owner
15
15
 
16
- 1. **The primary owner adds them** (they must already be a signed-up odla
17
- member — an admin invites them first if not):
18
-
19
- ```cmd
20
- npx @odla-ai/cli app owners add teammate@example.com
21
- npx @odla-ai/cli app owners list
22
- ```
23
-
24
- (`npx @odla-ai/cli app owners remove teammate@example.com` revokes it. The
25
- primary owner can't be removed. Studio's app **Settings** does the same.)
16
+ 1. **The primary owner adds them in signed-in Studio app Settings** (they must
17
+ already be a signed-up odla member — an admin invites them first if not).
18
+ Ownership mutation requires a direct human session. Do not tell an agent to
19
+ run `app owners add`: a device-handshake token intentionally receives
20
+ `human_session_required` on that route. The primary owner cannot be removed.
26
21
 
27
22
  2. **The co-owner provisions as themselves.** They clone the repo (which carries
28
23
  `odla.config.mjs` but not the gitignored credentials) and run provision with
@@ -47,12 +42,15 @@ own key. Treat first-prod provision/deploy as the usual human checkpoint
47
42
  (`provision --dry-run` review, then `provision --yes --push-secrets`), and never
48
43
  rotate another owner's credentials on their behalf.
49
44
 
50
- ## If provision says "you are not an owner"
45
+ ## If provision says the credential lacks `app.manage`
51
46
 
52
47
  provision checks tenant admin access up front and aborts **before** anything is
53
48
  minted or written — no credential lands on disk, in the vault, or in a Worker.
54
- It means the registry doesn't list you as an owner yet: ask an existing owner
55
- to run `npx @odla-ai/cli app owners add <your-email>`, then re-run provision.
49
+ First rerun provision and approve its fresh exact-project `app.manage` request;
50
+ the CLI does not reuse a baseline cached or pending handshake for this. If the
51
+ human account itself is not an owner, ask an existing owner to add it in
52
+ signed-in Studio app Settings, then rerun provision. An agent token cannot fix
53
+ ownership and the CLI must not suggest that it can.
56
54
 
57
55
  ## If a co-owner loses their local key
58
56