@odla-ai/cli 0.27.13 → 0.27.15

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.
@@ -0,0 +1,129 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/version.ts
4
+ import { readFileSync } from "fs";
5
+ function cliVersion() {
6
+ const pkg = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
7
+ return pkg.version ?? "unknown";
8
+ }
9
+
10
+ // src/exit-code.ts
11
+ function exitCodeFor(err) {
12
+ const code = err?.code;
13
+ if (code === "handshake_pending" || code === "watch_timeout" || code === "operation_pending") return 75;
14
+ if (code === "checkpoint_required") return 3;
15
+ if (code === "remote_unavailable") return 6;
16
+ if (code === "auth_failed") return 5;
17
+ if (code === "invalid_cursor" || code === "invalid_plan" || code === "invalid_operation_id") return 2;
18
+ return 1;
19
+ }
20
+
21
+ // src/redact.ts
22
+ var REPLACEMENTS = [
23
+ [/odla_(sk|dev)_[A-Za-z0-9._-]+/g, "odla_$1_[redacted]"],
24
+ [/\bsk_(live|test)_[A-Za-z0-9]+/g, "sk_$1_[redacted]"],
25
+ [/\bsk-[A-Za-z0-9._-]+/g, "sk-[redacted]"],
26
+ [/\bwhsec_[A-Za-z0-9+/=]+/g, "whsec_[redacted]"],
27
+ [/\bo11y_[A-Za-z0-9]+/g, "o11y_[redacted]"],
28
+ [/\b(ghp|gho|github_pat)_[A-Za-z0-9_]+/g, "$1_[redacted]"],
29
+ [/\bAKIA[A-Z0-9]{12,}/g, "AKIA[redacted]"]
30
+ ];
31
+ function redactSecrets(value) {
32
+ let result = value;
33
+ for (const [pattern, replacement] of REPLACEMENTS) result = result.replace(pattern, replacement);
34
+ return result;
35
+ }
36
+ function redactingOutput(output) {
37
+ const redactArgs = (args) => args.map((value) => redactOutputValue(value, /* @__PURE__ */ new WeakMap()));
38
+ return {
39
+ log: (...args) => output.log(...redactArgs(args)),
40
+ error: (...args) => output.error(...redactArgs(args))
41
+ };
42
+ }
43
+ function redactOutputValue(value, seen) {
44
+ if (typeof value === "string") return redactSecrets(value);
45
+ if (value instanceof Error) {
46
+ const redacted = new Error(redactSecrets(value.message));
47
+ redacted.name = value.name;
48
+ if (value.stack) redacted.stack = redactSecrets(value.stack);
49
+ return redacted;
50
+ }
51
+ if (!value || typeof value !== "object") return value;
52
+ const prior = seen.get(value);
53
+ if (prior) return prior;
54
+ if (Array.isArray(value)) {
55
+ const next2 = [];
56
+ seen.set(value, next2);
57
+ for (const item of value) next2.push(redactOutputValue(item, seen));
58
+ return next2;
59
+ }
60
+ const prototype = Object.getPrototypeOf(value);
61
+ if (prototype !== Object.prototype && prototype !== null) return value;
62
+ const next = {};
63
+ seen.set(value, next);
64
+ for (const [key, item] of Object.entries(value)) next[key] = redactOutputValue(item, seen);
65
+ return next;
66
+ }
67
+ function looksSecret(value) {
68
+ return redactSecrets(value) !== value || value.includes("-----BEGIN");
69
+ }
70
+
71
+ // src/runbook-requires.ts
72
+ var SPEC = /^(@?[\w./-]+?)@(\d+\.\d+\.\d+(?:[\w.-]*)?)$/;
73
+ function parseRequires(value) {
74
+ if (!value) return [];
75
+ const out = [];
76
+ for (const token of value.split(/[\s,]+/).filter(Boolean)) {
77
+ const match = SPEC.exec(token);
78
+ if (match?.[1] && match[2]) out.push({ name: match[1], min: match[2] });
79
+ }
80
+ return out;
81
+ }
82
+ function compareVersions(a, b) {
83
+ const parts = (v) => {
84
+ const [core = "", pre = ""] = v.split("-", 2);
85
+ return { nums: core.split(".").map((n) => Number.parseInt(n, 10) || 0), pre };
86
+ };
87
+ const left = parts(a);
88
+ const right = parts(b);
89
+ for (let i = 0; i < Math.max(left.nums.length, right.nums.length); i++) {
90
+ const diff = (left.nums[i] ?? 0) - (right.nums[i] ?? 0);
91
+ if (diff) return diff < 0 ? -1 : 1;
92
+ }
93
+ if (left.pre === right.pre) return 0;
94
+ if (!left.pre) return 1;
95
+ if (!right.pre) return -1;
96
+ return left.pre < right.pre ? -1 : 1;
97
+ }
98
+ function satisfies(installed, min) {
99
+ return compareVersions(installed, min) >= 0;
100
+ }
101
+ function unmetRequirements(requires, installedVersions) {
102
+ const unmet = [];
103
+ for (const requirement of parseRequires(requires)) {
104
+ const installed = installedVersions[requirement.name];
105
+ if (installed === void 0) {
106
+ unmet.push({ ...requirement, installed: null });
107
+ } else if (!satisfies(installed, requirement.min)) {
108
+ unmet.push({ ...requirement, installed });
109
+ }
110
+ }
111
+ return unmet;
112
+ }
113
+ function describeUnmet(slug, unmet) {
114
+ const detail = unmet.map((u) => `${u.name}@${u.min}${u.installed ? ` (you have ${u.installed})` : " (not installed here)"}`).join(", ");
115
+ return `note: runbook "${slug}" expects ${detail} \u2014 some steps may name commands your version does not have.`;
116
+ }
117
+
118
+ export {
119
+ parseRequires,
120
+ compareVersions,
121
+ unmetRequirements,
122
+ describeUnmet,
123
+ cliVersion,
124
+ exitCodeFor,
125
+ redactSecrets,
126
+ redactingOutput,
127
+ looksSecret
128
+ };
129
+ //# sourceMappingURL=chunk-UKLSRQ5J.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/version.ts","../src/exit-code.ts","../src/redact.ts","../src/runbook-requires.ts"],"sourcesContent":["import { readFileSync } from \"node:fs\";\n\nexport function cliVersion(): string {\n const pkg = JSON.parse(readFileSync(new URL(\"../package.json\", import.meta.url), \"utf8\")) as { version?: string };\n return pkg.version ?? \"unknown\";\n}\n","/** Map a CLI failure to its documented process exit code without importing the\n * command graph. The binary needs this tiny module before it verifies that its\n * external runtime dependencies are coherent. */\nexport function exitCodeFor(err: unknown): number {\n const code = (err as { code?: unknown } | null)?.code;\n if (code === \"handshake_pending\" || code === \"watch_timeout\" || code === \"operation_pending\") return 75;\n if (code === \"checkpoint_required\") return 3;\n if (code === \"remote_unavailable\") return 6;\n if (code === \"auth_failed\") return 5;\n if (code === \"invalid_cursor\" || code === \"invalid_plan\" || code === \"invalid_operation_id\") return 2;\n return 1;\n}\n","/**\n * Secret redaction shared by every command's output path and by doctor's\n * \"does this value look like a secret\" checks. Clerk publishable keys\n * (pk_test_/pk_live_) are public by design and are deliberately not matched.\n */\nconst REPLACEMENTS: Array<[RegExp, string]> = [\n [/odla_(sk|dev)_[A-Za-z0-9._-]+/g, \"odla_$1_[redacted]\"],\n [/\\bsk_(live|test)_[A-Za-z0-9]+/g, \"sk_$1_[redacted]\"],\n [/\\bsk-[A-Za-z0-9._-]+/g, \"sk-[redacted]\"],\n [/\\bwhsec_[A-Za-z0-9+/=]+/g, \"whsec_[redacted]\"],\n [/\\bo11y_[A-Za-z0-9]+/g, \"o11y_[redacted]\"],\n [/\\b(ghp|gho|github_pat)_[A-Za-z0-9_]+/g, \"$1_[redacted]\"],\n [/\\bAKIA[A-Z0-9]{12,}/g, \"AKIA[redacted]\"],\n];\n\n/**\n * Return `value` with every secret-shaped substring replaced by a `[redacted]`\n * placeholder that keeps the identifying prefix (e.g. `sk_live_[redacted]`).\n * Matches odla db keys (`odla_sk_`/`odla_dev_`), Clerk secret keys\n * (`sk_live_`/`sk_test_`), OpenAI keys (`sk-`), webhook signing secrets\n * (`whsec_`), o11y tokens (`o11y_`), GitHub tokens (`ghp_`/`gho_`/`github_pat_`),\n * and AWS access-key ids (`AKIA…`). Clerk publishable keys (`pk_test_`/\n * `pk_live_`) are public by design and intentionally left untouched. Used to\n * sanitize anything the CLI echoes (notably network error bodies) before it\n * reaches stdout/stderr. Non-matching input is returned unchanged.\n */\nexport function redactSecrets(value: string): string {\n let result = value;\n for (const [pattern, replacement] of REPLACEMENTS) result = result.replace(pattern, replacement);\n return result;\n}\n\n/**\n * Wrap the CLI's line-oriented output boundary so command implementations\n * cannot accidentally bypass redaction when they print a backend message.\n * Objects and arrays retain their shape for console/test sinks while every\n * nested string is sanitized.\n */\nexport function redactingOutput(\n output: Pick<typeof console, \"log\" | \"error\">,\n): Pick<typeof console, \"log\" | \"error\"> {\n const redactArgs = (args: unknown[]) => args.map((value) => redactOutputValue(value, new WeakMap<object, unknown>()));\n return {\n log: (...args: unknown[]) => output.log(...redactArgs(args)),\n error: (...args: unknown[]) => output.error(...redactArgs(args)),\n };\n}\n\nfunction redactOutputValue(value: unknown, seen: WeakMap<object, unknown>): unknown {\n if (typeof value === \"string\") return redactSecrets(value);\n if (value instanceof Error) {\n const redacted = new Error(redactSecrets(value.message));\n redacted.name = value.name;\n if (value.stack) redacted.stack = redactSecrets(value.stack);\n return redacted;\n }\n if (!value || typeof value !== \"object\") return value;\n const prior = seen.get(value);\n if (prior) return prior;\n if (Array.isArray(value)) {\n const next: unknown[] = [];\n seen.set(value, next);\n for (const item of value) next.push(redactOutputValue(item, seen));\n return next;\n }\n const prototype = Object.getPrototypeOf(value);\n if (prototype !== Object.prototype && prototype !== null) return value;\n const next: Record<string, unknown> = {};\n seen.set(value, next);\n for (const [key, item] of Object.entries(value)) next[key] = redactOutputValue(item, seen);\n return next;\n}\n\n/** True when a value matches any known secret shape (used for detection, never display). */\nexport function looksSecret(value: string): boolean {\n return redactSecrets(value) !== value || value.includes(\"-----BEGIN\");\n}\n","// A runbook can be corrected the moment a step is wrong, which means its text\n// routinely runs ahead of the packages a reader has installed: the step is right,\n// and the command it names simply does not exist in their copy yet. `requires`\n// is how a runbook says which version it assumes, so the reader learns that from\n// the runbook instead of from a confusing \"unknown action\" error.\n//\n// Specs are `name@version`, space- or comma-separated, and read as MINIMUMS.\n// Deliberately not semver ranges: the only question worth answering here is\n// \"is what I have new enough\", and a range grammar invites `<` bounds that a\n// runbook has no way to be right about.\n\n/** One package version a runbook assumes. */\nexport interface Requirement {\n name: string;\n /** The lowest version whose steps are known to work. */\n min: string;\n}\n\n/** A requirement the caller does not meet. */\nexport interface UnmetRequirement extends Requirement {\n /** What is installed, or null when nothing local claims to be this package. */\n installed: string | null;\n}\n\nconst SPEC = /^(@?[\\w./-]+?)@(\\d+\\.\\d+\\.\\d+(?:[\\w.-]*)?)$/;\n\n/** Parse a `requires` string. Unparseable entries are dropped rather than\n * throwing: a malformed spec must not make a runbook unreadable. */\nexport function parseRequires(value: string | undefined | null): Requirement[] {\n if (!value) return [];\n const out: Requirement[] = [];\n for (const token of value.split(/[\\s,]+/).filter(Boolean)) {\n const match = SPEC.exec(token);\n if (match?.[1] && match[2]) out.push({ name: match[1], min: match[2] });\n }\n return out;\n}\n\n/** Compare two dotted versions numerically. Pre-release suffixes sort BELOW the\n * release they precede, so `0.18.0-rc.1` does not satisfy `0.18.0`. */\nexport function compareVersions(a: string, b: string): number {\n const parts = (v: string) => {\n const [core = \"\", pre = \"\"] = v.split(\"-\", 2);\n return { nums: core.split(\".\").map((n) => Number.parseInt(n, 10) || 0), pre };\n };\n const left = parts(a);\n const right = parts(b);\n for (let i = 0; i < Math.max(left.nums.length, right.nums.length); i++) {\n const diff = (left.nums[i] ?? 0) - (right.nums[i] ?? 0);\n if (diff) return diff < 0 ? -1 : 1;\n }\n if (left.pre === right.pre) return 0;\n if (!left.pre) return 1;\n if (!right.pre) return -1;\n return left.pre < right.pre ? -1 : 1;\n}\n\n/** True when `installed` is at least `min`. */\nexport function satisfies(installed: string, min: string): boolean {\n return compareVersions(installed, min) >= 0;\n}\n\n/**\n * Which of a runbook's requirements the caller does not meet.\n *\n * `installedVersions` maps a package name to what the caller has. A package the\n * caller knows nothing about is reported with `installed: null` rather than\n * assumed satisfied — silence about an unknown dependency is the failure mode\n * this exists to prevent.\n */\nexport function unmetRequirements(\n requires: string | undefined | null,\n installedVersions: Readonly<Record<string, string | undefined>>,\n): UnmetRequirement[] {\n const unmet: UnmetRequirement[] = [];\n for (const requirement of parseRequires(requires)) {\n const installed = installedVersions[requirement.name];\n if (installed === undefined) {\n unmet.push({ ...requirement, installed: null });\n } else if (!satisfies(installed, requirement.min)) {\n unmet.push({ ...requirement, installed });\n }\n }\n return unmet;\n}\n\n/** The one-line warning shown when a runbook expects more than the caller has. */\nexport function describeUnmet(slug: string, unmet: readonly UnmetRequirement[]): string {\n const detail = unmet\n .map((u) => `${u.name}@${u.min}${u.installed ? ` (you have ${u.installed})` : \" (not installed here)\"}`)\n .join(\", \");\n return `note: runbook \"${slug}\" expects ${detail} — some steps may name commands your version does not have.`;\n}\n"],"mappings":";;;AAAA,SAAS,oBAAoB;AAEtB,SAAS,aAAqB;AACnC,QAAM,MAAM,KAAK,MAAM,aAAa,IAAI,IAAI,mBAAmB,YAAY,GAAG,GAAG,MAAM,CAAC;AACxF,SAAO,IAAI,WAAW;AACxB;;;ACFO,SAAS,YAAY,KAAsB;AAChD,QAAM,OAAQ,KAAmC;AACjD,MAAI,SAAS,uBAAuB,SAAS,mBAAmB,SAAS,oBAAqB,QAAO;AACrG,MAAI,SAAS,sBAAuB,QAAO;AAC3C,MAAI,SAAS,qBAAsB,QAAO;AAC1C,MAAI,SAAS,cAAe,QAAO;AACnC,MAAI,SAAS,oBAAoB,SAAS,kBAAkB,SAAS,uBAAwB,QAAO;AACpG,SAAO;AACT;;;ACNA,IAAM,eAAwC;AAAA,EAC5C,CAAC,kCAAkC,oBAAoB;AAAA,EACvD,CAAC,kCAAkC,kBAAkB;AAAA,EACrD,CAAC,yBAAyB,eAAe;AAAA,EACzC,CAAC,4BAA4B,kBAAkB;AAAA,EAC/C,CAAC,wBAAwB,iBAAiB;AAAA,EAC1C,CAAC,yCAAyC,eAAe;AAAA,EACzD,CAAC,wBAAwB,gBAAgB;AAC3C;AAaO,SAAS,cAAc,OAAuB;AACnD,MAAI,SAAS;AACb,aAAW,CAAC,SAAS,WAAW,KAAK,aAAc,UAAS,OAAO,QAAQ,SAAS,WAAW;AAC/F,SAAO;AACT;AAQO,SAAS,gBACd,QACuC;AACvC,QAAM,aAAa,CAAC,SAAoB,KAAK,IAAI,CAAC,UAAU,kBAAkB,OAAO,oBAAI,QAAyB,CAAC,CAAC;AACpH,SAAO;AAAA,IACL,KAAK,IAAI,SAAoB,OAAO,IAAI,GAAG,WAAW,IAAI,CAAC;AAAA,IAC3D,OAAO,IAAI,SAAoB,OAAO,MAAM,GAAG,WAAW,IAAI,CAAC;AAAA,EACjE;AACF;AAEA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I,CAAC,MAAM,GAAG,EAAE,IAAI,IAAI,EAAE,GAAG,GAAG,EAAE,YAAY,cAAc,EAAE,SAAS,MAAM,uBAAuB,EAAE,EACtG,KAAK,IAAI;AACZ,SAAO,kBAAkB,IAAI,aAAa,MAAM;AAClD;","names":["next"]}
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ runCli
4
+ } from "./chunk-MR5QXX3B.js";
5
+ import {
6
+ exitCodeFor
7
+ } from "./chunk-UKLSRQ5J.js";
8
+ export {
9
+ exitCodeFor,
10
+ runCli
11
+ };
12
+ //# sourceMappingURL=cli-2RZFZRRT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/dist/index.cjs CHANGED
@@ -8768,6 +8768,10 @@ Safety:
8768
8768
  production odla.ai \u2014 there is no separate odla to point at. New projects get
8769
8769
  the sandbox only. Add "prod" explicitly to odla.config.mjs and pass --yes to
8770
8770
  provision the live database; use --dry-run first to inspect the resolved plan.
8771
+ A real provision first verifies both the released CLI version and the exact
8772
+ pinned versions of every external @odla-ai runtime module before importing
8773
+ the command graph. A stale workspace module blocks with its resolved path and
8774
+ tells the agent to update/rebase, npm ci, and rebuild.
8771
8775
  Provision caches the approved developer token and service credentials under
8772
8776
  .odla/ with mode 0600, and init adds those paths to .gitignore. Secret push
8773
8777
  preflights Wrangler before any shown-once issuance or destructive rotation.
@@ -8798,6 +8802,9 @@ Safety:
8798
8802
  grant, run it once with --request-grant. That flag ignores ODLA_DEV_TOKEN and
8799
8803
  the local cache, prints and opens a fresh exact-project owner-review URL, then
8800
8804
  continues provisioning with the approved replacement credential.
8805
+ Before a non-dry-run provision, the executable checks npm's current CLI
8806
+ release. A confirmed stale client stops with a safe npx rerun command; a
8807
+ workspace-linked client also identifies the worktree that must be updated.
8801
8808
  Run Code from a GitHub checkout already connected to an app in Studio; an
8802
8809
  odla.config.mjs may select the app explicitly but is not required. Code host
8803
8810
  approval and credential hashes live in odla-ai/db. The host
@@ -12799,7 +12806,7 @@ async function securityStatus(parsed, dependencies) {
12799
12806
  }
12800
12807
  }
12801
12808
 
12802
- // src/cli.ts
12809
+ // src/exit-code.ts
12803
12810
  function exitCodeFor(err) {
12804
12811
  const code = err?.code;
12805
12812
  if (code === "handshake_pending" || code === "watch_timeout" || code === "operation_pending") return 75;
@@ -12809,6 +12816,8 @@ function exitCodeFor(err) {
12809
12816
  if (code === "invalid_cursor" || code === "invalid_plan" || code === "invalid_operation_id") return 2;
12810
12817
  return 1;
12811
12818
  }
12819
+
12820
+ // src/cli.ts
12812
12821
  async function runCli(argv = process.argv.slice(2), dependencies = {}) {
12813
12822
  const runtime = {
12814
12823
  ...dependencies,