@odla-ai/cli 0.34.0 → 0.34.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 +130 -119
- package/REQUIREMENTS.md +6 -0
- package/dist/bin.cjs +50 -37
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +1 -1
- package/dist/{chunk-LGNNX6AP.js → chunk-RUEM7ZTA.js} +51 -38
- package/dist/chunk-RUEM7ZTA.js.map +1 -0
- package/dist/{cli-IN6WGMSY.js → cli-NKNQLWOM.js} +2 -2
- package/dist/index.cjs +50 -37
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/skills/odla/SKILL.md +55 -35
- package/skills/odla/references/agent-identity.md +5 -5
- package/skills/odla/references/build.md +16 -15
- package/skills/odla/references/co-owners.md +1 -1
- package/skills/odla/references/pm-work-intake.md +12 -12
- package/skills/odla/references/pm.md +17 -17
- package/skills/odla/references/sdks.md +2 -2
- package/skills/odla-migrate/SKILL.md +23 -5
- package/skills/odla-migrate/references/phase-2-chapter.md +1 -1
- package/skills/odla-migrate/references/phase-2-db.md +11 -10
- package/skills/odla-migrate/references/phase-3-auth.md +2 -2
- package/skills/odla-migrate/references/phase-3b-user-sync.md +2 -2
- package/skills/odla-migrate/references/phase-4-ai.md +3 -3
- package/skills/odla-migrate/references/phase-5-cutover.md +5 -5
- package/skills/odla-migrate/references/project-state.md +4 -4
- package/skills/odla-migrate/references/secrets-map.md +6 -6
- package/skills/odla-migrate/references/troubleshooting.md +23 -23
- package/skills/odla-o11y-debug/SKILL.md +3 -3
- package/dist/chunk-LGNNX6AP.js.map +0 -1
- /package/dist/{cli-IN6WGMSY.js.map → cli-NKNQLWOM.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
runCli
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RUEM7ZTA.js";
|
|
5
5
|
import {
|
|
6
6
|
exitCodeFor
|
|
7
7
|
} from "./chunk-UKLSRQ5J.js";
|
|
@@ -9,4 +9,4 @@ export {
|
|
|
9
9
|
exitCodeFor,
|
|
10
10
|
runCli
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=cli-
|
|
12
|
+
//# sourceMappingURL=cli-NKNQLWOM.js.map
|
package/dist/index.cjs
CHANGED
|
@@ -127,9 +127,10 @@ function approvalLines(prompt) {
|
|
|
127
127
|
lines.push(` No browser was opened (${prompt.browserSkipped}).`);
|
|
128
128
|
}
|
|
129
129
|
lines.push("");
|
|
130
|
-
lines.push(" AGENTS:
|
|
131
|
-
lines.push("
|
|
132
|
-
lines.push("
|
|
130
|
+
lines.push(" AGENTS: immediately give the human this URL as a clickable approval action and repeat the code.");
|
|
131
|
+
lines.push(" Keep this CLI process running and wait on this same process; the CLI owns protocol polling.");
|
|
132
|
+
lines.push(" Do not use OS open, browser control, curl, a shell wait loop, detached execution, or a substitute handshake.");
|
|
133
|
+
lines.push(" You cannot approve it yourself. If this process exits, a later invocation creates a new code.");
|
|
133
134
|
lines.push("");
|
|
134
135
|
return lines;
|
|
135
136
|
}
|
|
@@ -4910,18 +4911,29 @@ For work that creates an odla app or adds odla services, read and follow
|
|
|
4910
4911
|
\`.agents/skills/odla-o11y-debug/SKILL.md\`.
|
|
4911
4912
|
|
|
4912
4913
|
Track the work in odla's PM as you go. Before project-mutating work, run
|
|
4913
|
-
\`npx @odla-ai/cli pm next --app <appId>\`, confirm alignment to an open goal,
|
|
4914
|
+
\`npx --yes @odla-ai/cli@latest pm next --app <appId>\`, confirm alignment to an open goal,
|
|
4914
4915
|
and atomically claim a refined Ready task. Record decisions when you make them
|
|
4915
4916
|
and file bugs when you notice them. The conventions and the full command set are
|
|
4916
4917
|
in \`.agents/skills/odla/references/pm.md\`.
|
|
4917
4918
|
|
|
4918
|
-
Use the human's signed-in odla account email for device authorization;
|
|
4919
|
-
infer it from git config, commit metadata, or GitHub. If authorization is
|
|
4920
|
-
already active, run
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4919
|
+
Use the human's known signed-in odla account email for device authorization;
|
|
4920
|
+
never infer it from git config, commit metadata, or GitHub. If authorization is
|
|
4921
|
+
not already active, run this exact command as one foreground process:
|
|
4922
|
+
|
|
4923
|
+
\`npx --yes @odla-ai/cli@latest auth login --app <appId> --email <odla-account> --no-open --wait 600\`
|
|
4924
|
+
|
|
4925
|
+
When it prints the approval URL and code, immediately give the human a clickable
|
|
4926
|
+
link, name the code they must verify, and tell them to click **Approve**. Keep
|
|
4927
|
+
that CLI process running and wait on the same tool process for its result. The
|
|
4928
|
+
CLI owns protocol polling: never call the OS \`open\` command, use browser
|
|
4929
|
+
control, curl a handshake endpoint, build a shell wait/poll loop, detach the
|
|
4930
|
+
process, or start another handshake while it is alive. The device code exists
|
|
4931
|
+
only in that process. If it exits 75 before approval, the old code cannot be
|
|
4932
|
+
collected; start one fresh foreground command and surface its new URL.
|
|
4933
|
+
|
|
4934
|
+
Never file an odla project or product defect in GitHub Issues: run
|
|
4935
|
+
\`npx --yes @odla-ai/cli@latest bug report --app <appId> ...\` so the bug lands
|
|
4936
|
+
in odla PM with the rest of the project's goals, tasks, and decisions.
|
|
4925
4937
|
|
|
4926
4938
|
The setup runbooks and their references are installed in this repository, pinned
|
|
4927
4939
|
to this CLI version. Use them as your setup context.
|
|
@@ -4933,9 +4945,9 @@ When this repository has an \`appId\`, pass it: app-scoped discovery includes
|
|
|
4933
4945
|
that project's instructions plus the shared platform procedures.
|
|
4934
4946
|
|
|
4935
4947
|
\`\`\`
|
|
4936
|
-
npx odla-ai runbook ask "<what you are about to do>" --app <appId>
|
|
4937
|
-
npx odla-ai runbook list
|
|
4938
|
-
npx odla-ai runbook get <slug>
|
|
4948
|
+
npx --yes @odla-ai/cli@latest runbook ask "<what you are about to do>" --app <appId>
|
|
4949
|
+
npx --yes @odla-ai/cli@latest runbook list
|
|
4950
|
+
npx --yes @odla-ai/cli@latest runbook get <slug>
|
|
4939
4951
|
\`\`\`
|
|
4940
4952
|
|
|
4941
4953
|
Never scrape odla.ai HTML for any of this. The CLI reads the same content
|
|
@@ -10087,8 +10099,8 @@ Usage:
|
|
|
10087
10099
|
odla-ai runbook revert <slug> --version <n> [--app <id>]
|
|
10088
10100
|
odla-ai runbook rm <slug> [--app <id>]
|
|
10089
10101
|
odla-ai capabilities [--json]
|
|
10090
|
-
odla-ai code connect [--env dev|prod] [--email <odla-account>] [--engine auto|container|podman|docker] [--slots <1-64>] [--once]
|
|
10091
|
-
odla-ai admin ai show [--context <name>] [--platform https://odla.ai] [--email <odla-account>] [--json]
|
|
10102
|
+
odla-ai code connect [--env dev|prod] [--email <odla-account>] [--no-open] [--engine auto|container|podman|docker] [--slots <1-64>] [--once]
|
|
10103
|
+
odla-ai admin ai show [--context <name>] [--platform https://odla.ai] [--email <odla-account>] [--no-open] [--json]
|
|
10092
10104
|
odla-ai admin ai models [--context <name>] [--provider <id>] [--json]
|
|
10093
10105
|
odla-ai admin ai set <purpose> [--context <name>] [--provider <id>] [--model <id>] [--enabled|--no-enabled]
|
|
10094
10106
|
[--max-input-bytes <n>] [--max-output-tokens <n>] [--max-calls-per-run <n>] [--json]
|
|
@@ -10107,7 +10119,7 @@ Usage:
|
|
|
10107
10119
|
odla-ai security report <job-id> [--json]
|
|
10108
10120
|
odla-ai security run [target] --ack-redacted-source [--env dev] [--profile odla] [--fail-on high]
|
|
10109
10121
|
odla-ai security run [target] --self --ack-redacted-source
|
|
10110
|
-
odla-ai provision [--live] [--config odla.config.mjs] [--email <odla-account>] [--request-grant] [--wait <seconds>] [--dry-run] [--push-secrets] [--rotate-o11y-token] [--write-dev-vars[=path]] [--yes]
|
|
10122
|
+
odla-ai provision [--live] [--config odla.config.mjs] [--email <odla-account>] [--request-grant] [--no-open] [--wait <seconds>] [--dry-run] [--push-secrets] [--rotate-o11y-token] [--write-dev-vars[=path]] [--yes]
|
|
10111
10123
|
odla-ai credentials list [--config odla.config.mjs] [--env dev] [--all] [--json]
|
|
10112
10124
|
odla-ai credentials revoke <receipt-id> [--config odla.config.mjs] [--json]
|
|
10113
10125
|
odla-ai smoke [--config odla.config.mjs] [--env dev] [--runtime] [--email <odla-account>] [--no-open]
|
|
@@ -10122,7 +10134,7 @@ function printHelp(output = console) {
|
|
|
10122
10134
|
output.log(`odla-ai
|
|
10123
10135
|
${USAGE_SECTION}
|
|
10124
10136
|
Commands:
|
|
10125
|
-
auth Start a fresh, exact-project agent authorization
|
|
10137
|
+
auth Start a fresh, exact-project agent authorization for human review.
|
|
10126
10138
|
The email is the signed-in odla account, never git or GitHub
|
|
10127
10139
|
identity. The approval screen confirms the agent name first.
|
|
10128
10140
|
agent Inspect durable agent wakeups and explicitly requeue a
|
|
@@ -10252,23 +10264,25 @@ Safety:
|
|
|
10252
10264
|
the metadata file. Flags and specific ODLA_* scope variables beat a selected
|
|
10253
10265
|
context, which beats project config. There is no ambient current context.
|
|
10254
10266
|
"context show" reports only provenance and cache state and never authenticates.
|
|
10255
|
-
Every real CLI handshake prints one canonical /studio?code= approval URL
|
|
10256
|
-
|
|
10257
|
-
|
|
10258
|
-
|
|
10259
|
-
|
|
10260
|
-
|
|
10261
|
-
|
|
10262
|
-
|
|
10263
|
-
|
|
10267
|
+
Every real CLI handshake prints one canonical /studio?code= approval URL.
|
|
10268
|
+
Interactive humans may let the CLI attempt its best-effort browser launch.
|
|
10269
|
+
Agent-driven commands must pass --no-open --wait 600, immediately surface the
|
|
10270
|
+
exact URL and code as a clickable human approval action, and keep that CLI
|
|
10271
|
+
process alive. Wait only on that same process: the CLI owns protocol polling.
|
|
10272
|
+
Do not call OS open, use browser control, curl handshake endpoints, build a
|
|
10273
|
+
shell wait loop, detach the command, or start a substitute handshake. The
|
|
10274
|
+
device code remains only in the running process. If the process exits 75, its
|
|
10275
|
+
old code cannot be collected; a later invocation requests a new code. Older
|
|
10276
|
+
clients' persisted pending state is discarded.
|
|
10264
10277
|
A fresh device handshake requires --email <odla-account> or ODLA_USER_EMAIL.
|
|
10265
10278
|
The email is a non-secret identity hint: never provide a password or session
|
|
10266
10279
|
token. It is the email shown by the signed-in odla account \u2014 never infer it
|
|
10267
10280
|
from git config, a commit author, or GitHub. The matching account must already exist, be signed in, explicitly
|
|
10268
10281
|
review the exact code, and finish any current request before claiming another.
|
|
10269
|
-
Use "auth login --app <id> --email <odla-account>
|
|
10270
|
-
a deliberate fresh request; it ignores cached
|
|
10271
|
-
focused authorization sequence
|
|
10282
|
+
Use "auth login --app <id> --email <odla-account> --no-open --wait 600" when
|
|
10283
|
+
an outside agent needs a deliberate fresh request; it ignores cached
|
|
10284
|
+
credentials and uses the same focused authorization sequence as every
|
|
10285
|
+
first-time command.
|
|
10272
10286
|
If provision reports that the current agent principal has no live app.manage
|
|
10273
10287
|
grant, run it once with --request-grant. That flag ignores ODLA_DEV_TOKEN and
|
|
10274
10288
|
the local cache, prints and opens a fresh exact-project owner-review URL, then
|
|
@@ -13684,7 +13698,7 @@ async function runbookImpact(ctx, options, deps = {}) {
|
|
|
13684
13698
|
|
|
13685
13699
|
// src/runbook-lint.ts
|
|
13686
13700
|
function invocationsIn(body) {
|
|
13687
|
-
const re = /(`|npx[^\S\n]+)?(?:@odla-ai\/cli(?:@[\w.-]+)?|odla-ai)((?:[^\S\n]+[a-z][\w-]*)+)/g;
|
|
13701
|
+
const re = /(`|npx[^\S\n]+(?:--yes[^\S\n]+)?)?(?:@odla-ai\/cli(?:@[\w.-]+)?|odla-ai)((?:[^\S\n]+[a-z][\w-]*)+)/g;
|
|
13688
13702
|
const found = [];
|
|
13689
13703
|
for (const match of body.matchAll(re)) {
|
|
13690
13704
|
if (!match[1]) continue;
|
|
@@ -13880,7 +13894,8 @@ var ALLOWED2 = [
|
|
|
13880
13894
|
"base",
|
|
13881
13895
|
"requires",
|
|
13882
13896
|
"platform",
|
|
13883
|
-
"context"
|
|
13897
|
+
"context",
|
|
13898
|
+
"open"
|
|
13884
13899
|
];
|
|
13885
13900
|
function requireSlug(slug, action2) {
|
|
13886
13901
|
if (!slug) throw new Error(`"runbook ${action2}" needs a slug, e.g. "odla-ai runbook ${action2} release"`);
|
|
@@ -13908,6 +13923,7 @@ async function buildContext3(parsed, deps, action2) {
|
|
|
13908
13923
|
};
|
|
13909
13924
|
}
|
|
13910
13925
|
const needsCapability = WRITES2.has(action2) && !dryRun && appId === PLATFORM_SCOPE && !stringOpt(parsed.options.token);
|
|
13926
|
+
const open = parsed.options.open === false ? false : parsed.options.open === true ? true : void 0;
|
|
13911
13927
|
const token = needsCapability ? await getScopedPlatformToken({
|
|
13912
13928
|
platform: cfg.platformUrl,
|
|
13913
13929
|
scope: "platform:runbook:write",
|
|
@@ -13915,6 +13931,7 @@ async function buildContext3(parsed, deps, action2) {
|
|
|
13915
13931
|
label: `odla CLI (runbook ${action2})`,
|
|
13916
13932
|
fetch: doFetch,
|
|
13917
13933
|
stdout: out,
|
|
13934
|
+
open,
|
|
13918
13935
|
openApprovalUrl: deps.openUrl,
|
|
13919
13936
|
// A project, named context, or the global operator context owns the
|
|
13920
13937
|
// exact-scope cache; it never follows an arbitrary shell directory.
|
|
@@ -13926,11 +13943,7 @@ async function buildContext3(parsed, deps, action2) {
|
|
|
13926
13943
|
configPath: cfg.configPath,
|
|
13927
13944
|
token: stringOpt(parsed.options.token),
|
|
13928
13945
|
email: stringOpt(parsed.options.email),
|
|
13929
|
-
|
|
13930
|
-
// CI and SSH). Hardcoding `false` meant a first-time handshake printed
|
|
13931
|
-
// a link and opened nothing — the one moment a browser is the whole
|
|
13932
|
-
// point.
|
|
13933
|
-
open: void 0
|
|
13946
|
+
open
|
|
13934
13947
|
},
|
|
13935
13948
|
doFetch,
|
|
13936
13949
|
out
|