@odla-ai/cli 0.27.3 → 0.27.5

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,14 +7,14 @@
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 per-app BYOK AI, configure Clerk auth, record
10
+ push odla-db schema/rules, configure hosted app AI (or explicit BYOK), configure Clerk auth, record
11
11
  deployment links, compose declared npm capability integrations, connect Google Calendar booking, provision o11y ingest credentials, and transfer local or
12
12
  deployed Worker secrets without printing them. It also gives platform admins a
13
13
  scoped System AI control surface and gives app owners a provider-key-free
14
14
  hosted security command.
15
15
 
16
16
  Provisioning does not know about any specific app. App identity, environments,
17
- services, schema, rules, integrations, auth, AI provider, and links all come
17
+ services, schema, rules, integrations, auth, AI mode/model, and links all come
18
18
  from config. Operator commands can also receive explicit platform/app/env
19
19
  context so remote agents are not forced to manufacture a project checkout.
20
20
 
@@ -73,6 +73,12 @@ and reject unknown fields, so credentials cannot be added to
73
73
  when no profile is selected. Each cache records its platform audience, and a
74
74
  token for another origin is never reused. `context show` reports provenance and
75
75
  cache state only; it never returns a credential or starts a device handshake.
76
+ When a cached credential expires, the approving human can reuse the agent's
77
+ exact handle suffix to bind the replacement credential to the same durable
78
+ principal. The approval appends new revisions for the exact projects selected;
79
+ it does not automatically revoke the older credential or renew an omitted
80
+ project. The installed `references/agent-identity.md` runbook gives the full
81
+ cross-worktree recovery procedure.
76
82
 
77
83
  ```bash
78
84
  ODLA_DEV_TOKEN=... npx @odla-ai/cli pm handoff --app <appId>
@@ -86,12 +92,13 @@ npx @odla-ai/cli runbook new deploy --context production --title Deploy --file d
86
92
 
87
93
  Runbooks tell an agent how to operate; PM tells every agent what this project is
88
94
  trying to prove, what is active, what was decided, and what is broken. Once the
89
- app is registered, start each session by reading its doing tasks, open bugs and
90
- goals, and recent decisions:
95
+ app is registered, start each session with the read-only aligned-work intake,
96
+ then read open bugs and recent decisions:
91
97
 
92
98
  ```bash
99
+ npx odla-ai pm next --app <appId>
93
100
  npx odla-ai pm handoff --app <appId>
94
- npx odla-ai pm task list --app <appId> --column doing
101
+ npx odla-ai pm watch --app <appId> --entity task --jsonl
95
102
  npx odla-ai pm bug list --app <appId> --status open
96
103
  npx odla-ai pm goal list --app <appId> --status open
97
104
  npx odla-ai pm decision list --app <appId> --limit 20
@@ -112,6 +119,36 @@ the first provision, use a focused commit/checkpoint, then initialize PM and
112
119
  backfill that evidence immediately after registration. Never use a parallel
113
120
  status diary or put a secret in PM.
114
121
 
122
+ Before project-mutating work, match the request to an open goal. If it is not
123
+ aligned, discuss that with the user before creating an outcome or implementing.
124
+ Refine a Backlog task with `--goal` (or an accepted
125
+ `--alignment-decision`), `--description`, and `--acceptance`, then mark it Ready
126
+ and claim the reviewed revision:
127
+
128
+ ```bash
129
+ npx odla-ai pm task ready <id> --expected-revision <n>
130
+ npx odla-ai pm task claim <id> --expected-revision <n>
131
+ ```
132
+
133
+ Ready is stored as `todo` for API compatibility. Claims are atomic and assign
134
+ the authenticated principal; stale or concurrent claims fail. Use `pm task
135
+ release` for an explicit recovery handoff instead of leaving Doing as a vague
136
+ status. The complete runbook is installed as
137
+ `references/pm-work-intake.md` by `odla-ai skill install`.
138
+
139
+ `pm watch` is the durable wake-up path for goal/task/decision/bug changes and
140
+ comments attached to those work items. Its first request creates an opaque
141
+ checkpoint; persist later `checkpoint` JSONL records and deduplicate
142
+ at-least-once events by `eventId`. Use `--action comment.created` for comment
143
+ traffic. A Ready event or comment is not a claim: reload the task and goal, then
144
+ claim the current revision. General Discussion topics and mentions remain on
145
+ `discuss watch` until PM topics gain context-aware capability enforcement.
146
+ Use `pm task ref <id>` (or the equivalent goal/decision/bug command) to print
147
+ copy-ready structured markup for Discussion. The same markup may be pasted into
148
+ `pm <entity> comment <id> --body "…"`; PM stores it as a structured reference,
149
+ and `pm <entity> comments <id>` prints copy-ready markup instead of flattening
150
+ the link back to a title.
151
+
115
152
  When diagnosing a deployed app, agents can request one parseable observability
116
153
  snapshot instead of scraping Studio or composing collector routes themselves:
117
154
 
@@ -426,10 +463,10 @@ shown-once credential.
426
463
  `--email <account>` or `ODLA_USER_EMAIL`; the matching existing account must
427
464
  sign in, review the exact code, and approve it. Opening the URL alone does
428
465
  not claim the request.
429
- Studio shows the immutable project and capability request without grant
430
- checkboxes. The owner approves that exact request or declines it with an
431
- explanation which the CLI returns to the calling agent; different access
432
- requires a new request.
466
+ Studio shows the immutable project-derived agent handle, project, and
467
+ capability request without mutation controls. The owner approves that exact
468
+ request or declines it with an explanation which the CLI returns to the
469
+ calling agent; a different identity or access set requires a new request.
433
470
  Every real CLI handshake prints exactly one canonical `/studio?code=…` URL
434
471
  and attempts to open it — including from CI, SSH, display-less, scripted,
435
472
  and agent-driven shells. Only `--no-open` suppresses the attempt. Browser
@@ -448,8 +485,8 @@ shown-once credential.
448
485
  5. Collision-checks and merges declared integration schema/rule fragments,
449
486
  pushes the composed database contract, and creates integration seeds only
450
487
  when their natural-key rows are absent.
451
- 6. Configures platform AI and stores provider keys in the tenant vault when the
452
- configured key env var is set.
488
+ 6. Configures hosted app AI by default. An explicit BYOK config stores its
489
+ provider key in the tenant vault when the configured key env var is set.
453
490
  7. For calendar, reads owner-visible connection status and, when needed, asks
454
491
  the platform for a state-bound Google authorization URL and opens only the
455
492
  exact Google OAuth endpoint (or a same-platform interstitial). The human completes consent there;
@@ -693,7 +730,8 @@ change events with actor attribution; credential values never enter that trail.
693
730
  It never returns prompts, repository source, model output, reports, or provider
694
731
  credentials. Credential writes accept only
695
732
  `--from-env <NAME>` or `--stdin` and never place the value in argv, output, or
696
- the cache. System AI and each app's BYOK AI are separate vault/funding paths.
733
+ the cache. System AI and hosted app AI have separate routes and accounting;
734
+ explicit BYOK has its own app-tenant vault path.
697
735
  Discovery and validation provider/model settings are authoritative server
698
736
  policy: a security command has no field that can override either route. Admin
699
737
  bounds can only narrow the hard ceilings of 64 calls per role/run and, for each
@@ -792,10 +830,9 @@ export default {
792
830
  defaultRules: "deny",
793
831
  publicRead: [], // namespaces where a `view: "true"` rule is intentional
794
832
  },
795
- ai: {
796
- provider: process.env.ODLA_AI_PROVIDER ?? "anthropic",
797
- keyEnv: "ANTHROPIC_API_KEY",
798
- },
833
+ ai: { mode: "hosted" },
834
+ // BYOK compatibility instead:
835
+ // ai: { mode: "byok", provider: "anthropic", keyEnv: "ANTHROPIC_API_KEY" },
799
836
  calendar: {
800
837
  google: {
801
838
  availabilityCalendars: { dev: ["primary"] },