@odla-ai/cli 0.17.1 → 0.19.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 +88 -14
- package/dist/bin.cjs +6616 -5127
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +1 -1
- package/dist/{chunk-2UKO2NED.js → chunk-QMA5OGKQ.js} +6508 -5005
- package/dist/chunk-QMA5OGKQ.js.map +1 -0
- package/dist/index.cjs +6641 -5133
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +55 -3
- package/dist/index.d.ts +55 -3
- package/dist/index.js +13 -3
- package/dist/runtime/pi-agent.js +22417 -38138
- package/package.json +1 -1
- package/skills/odla/SKILL.md +114 -0
- package/skills/odla/references/pm.md +109 -0
- package/skills/odla/references/sdks.md +8 -5
- package/skills/odla-migrate/SKILL.md +4 -1
- package/skills/odla-migrate/references/phase-2-chapter.md +17 -6
- package/skills/odla-migrate/references/phase-2b-calendar.md +4 -4
- package/skills/odla-migrate/references/phase-3-auth.md +2 -2
- package/skills/odla-migrate/references/troubleshooting.md +23 -0
- package/skills/odla-o11y-debug/SKILL.md +14 -0
- package/dist/chunk-2UKO2NED.js.map +0 -1
package/README.md
CHANGED
|
@@ -16,6 +16,73 @@ hosted security command.
|
|
|
16
16
|
It does not know about any specific app. App identity, environments, services,
|
|
17
17
|
schema, rules, integrations, auth, AI provider, and links all come from config.
|
|
18
18
|
|
|
19
|
+
## Start with the runbooks, not this file
|
|
20
|
+
|
|
21
|
+
odla's operational procedures — releasing, backups, database work, security
|
|
22
|
+
setup — are **rows in a database**, not documents in a package. They are edited
|
|
23
|
+
the moment a step turns out to be wrong, with no release in between. So the
|
|
24
|
+
answer this CLI fetches is current, and every written copy of it (including
|
|
25
|
+
this README, and including your training data) is a snapshot of some earlier
|
|
26
|
+
day.
|
|
27
|
+
|
|
28
|
+
Ask before you search the web or work from memory:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npx @odla-ai/cli runbook ask "how do I roll back a bad publish?" # written, cited answer
|
|
32
|
+
npx @odla-ai/cli runbook search "restore a tenant" # the passages behind it
|
|
33
|
+
npx @odla-ai/cli runbook get release # the whole procedure
|
|
34
|
+
npx @odla-ai/cli runbook list # what exists
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Reading works for any signed-in developer and needs no `odla.config.mjs` — the
|
|
38
|
+
advice is most useful before there is a project.
|
|
39
|
+
|
|
40
|
+
**Runbooks are procedure; JSDoc is API.** What a function takes, returns, and
|
|
41
|
+
guarantees is documented on the export itself, ships in the installed
|
|
42
|
+
`.d.ts`, and renders per package at <https://odla.ai/docs>. A runbook will tell
|
|
43
|
+
you *when* to call something and never invents a signature. Most real questions
|
|
44
|
+
need both halves — take the steps from the runbook and the arguments from the
|
|
45
|
+
JSDoc, and neither from memory.
|
|
46
|
+
|
|
47
|
+
**After you change something, ask which runbooks you invalidated:**
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npx @odla-ai/cli runbook impact # vs origin/main, uncommitted work included
|
|
51
|
+
npx @odla-ai/cli runbook impact --base HEAD~1
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
It diffs the working tree, works out which surfaces moved — a package, its
|
|
55
|
+
exported API, a JSDoc block, a console area — and names the runbooks whose steps
|
|
56
|
+
describe them, with the command to read each one. Changing an exported API or
|
|
57
|
+
its JSDoc is exactly when a procedure quoting that API goes stale, so run it
|
|
58
|
+
before you call the change finished. Fixing what it finds is one command and
|
|
59
|
+
takes effect immediately:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
npx @odla-ai/cli runbook edit db --note "retract replaced the null write"
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Platform runbook edits need admin or the `platform:runbook:write` capability,
|
|
66
|
+
which the CLI requests for you; a plain handshake token is never admin by
|
|
67
|
+
design, and `odla-ai whoami` reports what this terminal actually holds.
|
|
68
|
+
|
|
69
|
+
**Is the corpus itself still true?**
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
npx odla-ai runbook lint
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Because a runbook is edited without a release, its text can name a command that
|
|
76
|
+
only a newer CLI has — and no gate in any repository can see that, since the
|
|
77
|
+
text is a row in a database rather than a file. `lint` closes that: it holds
|
|
78
|
+
every `odla-ai …` command the runbooks name against this CLI's actual command
|
|
79
|
+
surface, and against the minimum versions each runbook declares in `requires`.
|
|
80
|
+
|
|
81
|
+
A runbook may record the versions its steps assume, as `name@version` specs read
|
|
82
|
+
as minimums (`@odla-ai/cli@0.18.0`). When yours is older, `runbook get` says so
|
|
83
|
+
on **stderr** — never stdout, so piping the procedure into an agent still yields
|
|
84
|
+
the procedure and nothing else.
|
|
85
|
+
|
|
19
86
|
## Install
|
|
20
87
|
|
|
21
88
|
No install needed — the package ships a single `odla-ai` binary, so npx can run
|
|
@@ -54,13 +121,21 @@ npm i -D --save-exact @odla-ai/cli@0.16.6
|
|
|
54
121
|
## Commands
|
|
55
122
|
|
|
56
123
|
```bash
|
|
124
|
+
npx odla-ai runbook ask "how do I roll back a bad publish?"
|
|
125
|
+
npx odla-ai runbook search "restore a tenant" --limit 5
|
|
126
|
+
npx odla-ai runbook get release
|
|
127
|
+
npx odla-ai runbook list
|
|
128
|
+
npx odla-ai runbook impact --base origin/main
|
|
129
|
+
npx odla-ai runbook lint
|
|
130
|
+
npx odla-ai runbook edit db --note "what changed"
|
|
131
|
+
npx odla-ai runbook comment release --body "step 4 no longer applies"
|
|
132
|
+
npx odla-ai whoami
|
|
57
133
|
npx odla-ai setup
|
|
58
134
|
npx odla-ai init --app-id my-app --name "My App"
|
|
59
135
|
npx odla-ai doctor
|
|
60
136
|
npx odla-ai calendar status --env dev
|
|
61
137
|
npx odla-ai calendar calendars --env dev
|
|
62
138
|
npx odla-ai calendar connect --env dev
|
|
63
|
-
npx odla-ai calendar resync --env dev
|
|
64
139
|
npx odla-ai calendar disconnect --env dev --yes
|
|
65
140
|
npx odla-ai capabilities --json
|
|
66
141
|
npx odla-ai code connect --platform https://odla.ai --app-id my-app --env dev --email owner@example.com
|
|
@@ -260,19 +335,18 @@ agent automation. Once connected, `calendar calendars` lists ids visible to the
|
|
|
260
335
|
Google identity so the checked-in selection can be refined. `calendar connect`
|
|
261
336
|
applies the checked-in booking-page setting and starts consent when the
|
|
262
337
|
connection is absent, failed, disconnected, or degraded (so an agent can
|
|
263
|
-
repair revoked credentials); a healthy connection is reused. A
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
Google authorization code, client secret, access token, or refresh token.
|
|
338
|
+
repair revoked credentials); a healthy connection is reused. A connection that
|
|
339
|
+
already holds provider credentials is reused without requesting Google consent
|
|
340
|
+
again, and an in-flight authorization is awaited rather than duplicated.
|
|
341
|
+
|
|
342
|
+
Nothing syncs: Google Calendar is the source of truth and odla stores no events
|
|
343
|
+
and no attendees, so there is no resync to ask for. `calendar disconnect --yes`
|
|
344
|
+
deletes this app/environment connection's encrypted platform token. It does not
|
|
345
|
+
revoke the shared user-to-Google-OAuth-project grant, because that could
|
|
346
|
+
invalidate other odla connections for the same user. A future explicitly global
|
|
347
|
+
revoke command would need cross-connection accounting and warning. A direct
|
|
348
|
+
production connect requires `--yes`. None of these commands accepts a Google
|
|
349
|
+
authorization code, client secret, access token, or refresh token.
|
|
276
350
|
|
|
277
351
|
The SDK uses the existing server-side db values (`ODLA_ENDPOINT`,
|
|
278
352
|
`ODLA_TENANT`, `ODLA_API_KEY`), so calendar adds no Worker secret. Never expose
|