@odla-ai/cli 0.12.0 → 0.13.1
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 +43 -7
- package/REQUIREMENTS.md +11 -3
- package/dist/bin.cjs +318 -60
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +1 -1
- package/dist/{chunk-Y4HWUEFF.js → chunk-I7XDJZB6.js} +314 -56
- package/dist/chunk-I7XDJZB6.js.map +1 -0
- package/dist/index.cjs +318 -60
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +66 -13
- package/dist/index.d.ts +66 -13
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/skills/odla/SKILL.md +5 -3
- package/skills/odla/references/build.md +9 -2
- package/skills/odla/references/sdks.md +25 -0
- package/skills/odla-migrate/references/phase-2-db.md +2 -2
- package/dist/chunk-Y4HWUEFF.js.map +0 -1
package/README.md
CHANGED
|
@@ -8,13 +8,13 @@
|
|
|
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
10
|
push odla-db schema/rules, configure per-app BYOK AI, configure Clerk auth, record
|
|
11
|
-
deployment links, connect
|
|
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
|
It does not know about any specific app. App identity, environments, services,
|
|
17
|
-
schema, rules, auth, AI provider, and links all come from config.
|
|
17
|
+
schema, rules, integrations, auth, AI provider, and links all come from config.
|
|
18
18
|
|
|
19
19
|
## Install
|
|
20
20
|
|
|
@@ -29,8 +29,8 @@ For a project you keep working in, install it as a dev dependency so the
|
|
|
29
29
|
shorter `npx odla-ai` form works and the version is pinned by your lockfile:
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
|
-
npm view @odla-ai/cli@0.
|
|
33
|
-
npm i -D --save-exact @odla-ai/cli@0.
|
|
32
|
+
npm view @odla-ai/cli@0.13.0 version
|
|
33
|
+
npm i -D --save-exact @odla-ai/cli@0.13.0
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
## Prerequisites
|
|
@@ -125,7 +125,9 @@ shown-once credential.
|
|
|
125
125
|
config is normalized per env and fixed to Google read-only access.
|
|
126
126
|
4. Mints or reuses each env's configured service credentials: an odla-db app
|
|
127
127
|
key for `db` and an ingest token for `o11y`.
|
|
128
|
-
5.
|
|
128
|
+
5. Collision-checks and merges declared integration schema/rule fragments,
|
|
129
|
+
pushes the composed database contract, and creates integration seeds only
|
|
130
|
+
when their natural-key rows are absent.
|
|
129
131
|
6. Configures platform AI and stores provider keys in the tenant vault when the
|
|
130
132
|
configured key env var is set.
|
|
131
133
|
7. For calendar, reads owner-visible connection status and, when needed, asks
|
|
@@ -151,6 +153,39 @@ The CLI preflights Wrangler first and persists the replacement before pushing;
|
|
|
151
153
|
if that final push still fails, follow the printed `secrets push --env ...`
|
|
152
154
|
retry. Do not run the rotation flag again.
|
|
153
155
|
|
|
156
|
+
### Application capability integrations
|
|
157
|
+
|
|
158
|
+
An integration is an npm capability composed into an app, not a hosted
|
|
159
|
+
platform service. Put data-only descriptors under `integrations` in
|
|
160
|
+
`odla.config.mjs`; do not add their ids to `services`.
|
|
161
|
+
|
|
162
|
+
```js
|
|
163
|
+
import { createCrmIntegration } from "@odla-ai/crm";
|
|
164
|
+
import { crm } from "./src/crm.js";
|
|
165
|
+
|
|
166
|
+
export default {
|
|
167
|
+
app: { id: "my-app", name: "My App" },
|
|
168
|
+
services: ["db"],
|
|
169
|
+
integrations: [createCrmIntegration(crm, { basePath: "/api/crm" })],
|
|
170
|
+
links: { dev: "https://dev.example.com" },
|
|
171
|
+
};
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Descriptors are consumed structurally, so capability packages do not depend
|
|
175
|
+
on the CLI. `provision --dry-run` names every integration and its namespace,
|
|
176
|
+
seed, and probe counts. Provision accepts an app-authored namespace/rule that
|
|
177
|
+
is byte-for-byte structurally identical to an integration fragment, which
|
|
178
|
+
makes existing manually merged apps migratable; conflicting definitions fail
|
|
179
|
+
before credentials or network mutations. A guarded seed requires a
|
|
180
|
+
declared-unique natural key, is queried first, and is created only when absent.
|
|
181
|
+
A concurrent create fails uniqueness instead of overwriting runtime owner edits.
|
|
182
|
+
|
|
183
|
+
`doctor` remains offline: it checks the composed schema, complete rule coverage,
|
|
184
|
+
and seed targets. `smoke` remains read-only: after the normal db checks it runs
|
|
185
|
+
each descriptor's anonymous route probe against `links.<env>`. Installing the
|
|
186
|
+
package, mounting its routes in the Worker, and supplying app authorization are
|
|
187
|
+
source-code responsibilities for the agent/developer.
|
|
188
|
+
|
|
154
189
|
### Device-grant security and recovery
|
|
155
190
|
|
|
156
191
|
The account email sent during a fresh handshake is a non-secret identity hint,
|
|
@@ -173,8 +208,9 @@ when compromise or accidental approval is possible.
|
|
|
173
208
|
|
|
174
209
|
`smoke` verifies a provisioned environment from local credentials. It fetches
|
|
175
210
|
the platform public config, checks the configured AI provider, fetches the live
|
|
176
|
-
odla-db schema with the tenant key, compares
|
|
177
|
-
a count aggregate against the first entity
|
|
211
|
+
odla-db schema with the tenant key, compares the fully composed schema entities,
|
|
212
|
+
runs a count aggregate against the first entity, and executes declared
|
|
213
|
+
integration route probes without credentials. It fails early with a clear message
|
|
178
214
|
when provisioning has not written `.odla/credentials.local.json`.
|
|
179
215
|
|
|
180
216
|
### Read-only Google Calendar
|
package/REQUIREMENTS.md
CHANGED
|
@@ -6,7 +6,8 @@ Agnacl, but none should mention or special-case Agnacl.
|
|
|
6
6
|
## Core Contract
|
|
7
7
|
|
|
8
8
|
- A project must declare intent in a checked-in config file:
|
|
9
|
-
app id/name, envs, platform URL, db endpoint, services,
|
|
9
|
+
app id/name, envs, platform URL, db endpoint, services, app-capability
|
|
10
|
+
integrations, schema, rules, auth,
|
|
10
11
|
AI provider/model, deployment links, and local credential paths.
|
|
11
12
|
- The CLI must validate that contract without network calls.
|
|
12
13
|
- The CLI must show a dry-run plan before creating platform state or writing
|
|
@@ -14,7 +15,8 @@ Agnacl, but none should mention or special-case Agnacl.
|
|
|
14
15
|
- The CLI must treat platform registry and odla-db as separate endpoints. They
|
|
15
16
|
may be the same in some deployments, but generated configs must not imply it.
|
|
16
17
|
- If a platform or credential change is deterministic from `odla.config.mjs`,
|
|
17
|
-
the CLI owns it. That includes service enablement,
|
|
18
|
+
the CLI owns it. That includes service enablement, integration schema/rule
|
|
19
|
+
composition and guarded seeds, service-specific credential
|
|
18
20
|
issuance/persistence, local runtime values, and deployed Worker secret
|
|
19
21
|
transfer. `odla-ai capabilities --json` must expose this boundary to agents.
|
|
20
22
|
- Source semantics remain with the coding agent: package installation, Worker
|
|
@@ -76,6 +78,11 @@ Agnacl, but none should mention or special-case Agnacl.
|
|
|
76
78
|
credential in browser code.
|
|
77
79
|
- Schema pushes must be explicit and visible in dry-run.
|
|
78
80
|
- If rules are omitted, schema-derived deny-all rules are the safe default.
|
|
81
|
+
- App-capability descriptors are structural config data, not hosted services:
|
|
82
|
+
merge their schema/rules with collision checks, accept identical pre-merged
|
|
83
|
+
definitions, require declared-unique natural keys, and create seeds only
|
|
84
|
+
when absent so owner edits survive every rerun and concurrent creates fail
|
|
85
|
+
instead of overwriting them.
|
|
79
86
|
|
|
80
87
|
## App Scaffolding Gaps
|
|
81
88
|
|
|
@@ -85,7 +92,8 @@ Agnacl, but none should mention or special-case Agnacl.
|
|
|
85
92
|
`@odla-ai/db` initialization, `@odla-ai/ai initFromPlatform`, and
|
|
86
93
|
`@odla-ai/kg writeFragment` seed/ingest helpers.
|
|
87
94
|
- `smoke` should verify:
|
|
88
|
-
public-config fetch, db schema presence, a simple db aggregate/query,
|
|
95
|
+
public-config fetch, composed db schema presence, a simple db aggregate/query,
|
|
96
|
+
anonymous integration route probes against the configured deployment link, and AI
|
|
89
97
|
config resolution. Tenant-vault key availability is still a follow-up because
|
|
90
98
|
checking it requires knowing the provider secret name and deliberately
|
|
91
99
|
touching the secret read path.
|