@datarails-ai/dr-cli 1.6.181 → 1.6.182

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
@@ -70,26 +70,27 @@ capabilities via the shell route: `dr kb search "<query>"`,
70
70
  > just terser.
71
71
 
72
72
  Requires **Node.js 18+** (npm ships with Node — no extra tools needed).
73
- The package is published to the Datarails JFrog registry; no auth setup
73
+ The package is published to the public npm registry; no auth setup
74
74
  required.
75
75
 
76
76
  ```
77
- npm install -g @datarails-ai/dr-cli --registry https://datarails.jfrog.io/artifactory/api/npm/dr-cli-virtual
77
+ npm install -g @datarails-ai/dr-cli
78
78
  ```
79
79
 
80
80
  That puts `dr` on PATH globally. To update later, re-run the same
81
81
  command — it will pick up the latest version.
82
82
 
83
- If you'd prefer not to type the registry every time, set it once:
83
+ To update later:
84
84
 
85
85
  ```
86
- npm config set registry https://datarails.jfrog.io/artifactory/api/npm/dr-cli-virtual
87
- npm install -g @datarails-ai/dr-cli
88
- npm update -g @datarails-ai/dr-cli # later, to update
86
+ npm update -g @datarails-ai/dr-cli
89
87
  ```
90
88
 
91
- (That sets your _default_ registry. To scope it only to the next
92
- install, drop `npm config set` and pass `--registry` inline as above.)
89
+ No registry configuration is needed: `@datarails-ai/dr-cli` is published
90
+ to the public npm registry, which npm already uses by default. Releases
91
+ also go to the Datarails JFrog repo, but installing from there is no
92
+ longer the documented path. See
93
+ `plugins/dr-cli/hooks/auto-update.js` for why.
93
94
 
94
95
  ### One-shot installer scripts
95
96
 
package/dist/cli.js CHANGED
@@ -8,7 +8,7 @@ import { fileURLToPath as fileURLToPath3 } from "url";
8
8
  // package.json
9
9
  var package_default = {
10
10
  name: "@datarails-ai/dr-cli",
11
- version: "1.6.181",
11
+ version: "1.6.182",
12
12
  description: "Datarails CLI",
13
13
  type: "module",
14
14
  engines: {
@@ -69,7 +69,7 @@ var package_default = {
69
69
  };
70
70
 
71
71
  // src/buildInfo.ts
72
- var BUILD_TIME = "2026-11-01T14:08:05.005Z";
72
+ var BUILD_TIME = "2026-11-01T16:01:03.304Z";
73
73
  function formatBuildTime(iso) {
74
74
  if (iso === "") return "";
75
75
  const d = new Date(iso);
@@ -64834,7 +64834,7 @@ function registerCashCommand(root) {
64834
64834
 
64835
64835
  // src/commands/update.ts
64836
64836
  import { spawn as spawn2 } from "child_process";
64837
- var REGISTRY = "https://datarails.jfrog.io/artifactory/api/npm/dr-cli-virtual";
64837
+ var REGISTRY = "https://registry.npmjs.org";
64838
64838
  var PACKAGE = "@datarails-ai/dr-cli";
64839
64839
  function spawnInherit(command, args) {
64840
64840
  return new Promise((resolve3) => {
@@ -65830,10 +65830,13 @@ function previewLine(result) {
65830
65830
  }
65831
65831
  return `preview: ${parts.join(" \xB7 ")}`;
65832
65832
  }
65833
- function previewCmd(operationId, serverFlag) {
65834
- return `dr calcmodels agent preview ${operationId} --server ${serverFlag}`;
65833
+ function targetFlags(serverFlag, accountFlag) {
65834
+ return accountFlag === void 0 ? `--server ${serverFlag}` : `--server ${serverFlag} --account ${shellQuote(accountFlag)}`;
65835
65835
  }
65836
- function renderPreview(out, p, operationId, serverFlag) {
65836
+ function previewCmd(operationId, target) {
65837
+ return `dr calcmodels agent preview ${operationId} ${target}`;
65838
+ }
65839
+ function renderPreview(out, p, operationId, target) {
65837
65840
  out.write(`status: ${p.status}
65838
65841
  `);
65839
65842
  if (p.conversation_id) out.write(`conversation: ${escapeControlChars(p.conversation_id)}
@@ -65842,7 +65845,7 @@ function renderPreview(out, p, operationId, serverFlag) {
65842
65845
  out.write(
65843
65846
  `
65844
65847
  The turn is still running. Check again with:
65845
- ${previewCmd(operationId, serverFlag)}
65848
+ ${previewCmd(operationId, target)}
65846
65849
  `
65847
65850
  );
65848
65851
  return;
@@ -65882,11 +65885,11 @@ proposal: ${escapeControlChars(JSON.stringify(d.name ?? ""))} (${escapeControlCh
65882
65885
  }
65883
65886
  const next = [];
65884
65887
  if (savable) {
65885
- next.push(`save the draft: dr calcmodels agent save ${operationId} --server ${serverFlag}`);
65888
+ next.push(`save the draft: dr calcmodels agent save ${operationId} ${target}`);
65886
65889
  }
65887
65890
  if (p.conversation_id) {
65888
65891
  next.push(
65889
- `reply: dr calcmodels agent ask '<reply>' --conversation ${shellQuote(p.conversation_id)} --server ${serverFlag}`
65892
+ `reply: dr calcmodels agent ask '<reply>' --conversation ${shellQuote(p.conversation_id)} ${target}`
65890
65893
  );
65891
65894
  }
65892
65895
  if (next.length > 0) out.write(`
@@ -65894,9 +65897,9 @@ next:
65894
65897
  ${next.map((l) => ` ${l}
65895
65898
  `).join("")}`);
65896
65899
  }
65897
- function writeOutcome(out, p, operationId, serverFlag, asJson) {
65900
+ function writeOutcome(out, p, operationId, target, asJson) {
65898
65901
  if (asJson) writeJSONIndented(out, { operation_id: operationId, ...p });
65899
- else renderPreview(out, p, operationId, serverFlag);
65902
+ else renderPreview(out, p, operationId, target);
65900
65903
  if (p.status === "FAILED") {
65901
65904
  const why = p.error ? escapeControlChars(describeServerError(p.error)) : "the server gave no error detail";
65902
65905
  throw new Error(`turn ${operationId} failed: ${why}`);
@@ -65927,6 +65930,7 @@ async function runAgentAsk(cfg) {
65927
65930
  );
65928
65931
  const op = accepted.operation_id;
65929
65932
  const conv = accepted.conversation_id;
65933
+ const target = targetFlags(cfg.serverFlag, cfg.accountFlag);
65930
65934
  cfg.err.write(
65931
65935
  `turn started: operation ${op}${conv ? `, conversation ${escapeControlChars(conv)}` : ""}
65932
65936
  `
@@ -65938,17 +65942,17 @@ async function runAgentAsk(cfg) {
65938
65942
  }
65939
65943
  cfg.out.write(`operation: ${op}
65940
65944
  Read it with:
65941
- ${previewCmd(op, cfg.serverFlag)}
65945
+ ${previewCmd(op, target)}
65942
65946
  `);
65943
65947
  return;
65944
65948
  }
65945
65949
  cfg.err.write(
65946
65950
  `Waiting for the agent. Ctrl-C stops the wait, not the turn; resume with:
65947
- ${previewCmd(op, cfg.serverFlag)}
65951
+ ${previewCmd(op, target)}
65948
65952
  `
65949
65953
  );
65950
65954
  const preview2 = await pollPreview(cfg, op);
65951
- writeOutcome(cfg.out, preview2, op, cfg.serverFlag, cfg.asJson);
65955
+ writeOutcome(cfg.out, preview2, op, target, cfg.asJson);
65952
65956
  }
65953
65957
  async function pollPreview(cfg, operationId) {
65954
65958
  const interval = cfg.pollIntervalMs ?? AGENT_POLL_INTERVAL_MS;
@@ -65972,7 +65976,7 @@ async function pollPreview(cfg, operationId) {
65972
65976
  }
65973
65977
  if (now() >= deadline) {
65974
65978
  throw new Error(
65975
- `turn ${operationId} is still running after ${Math.round(cfg.timeoutMs / 1e3)}s. It keeps running on the server; read it with: ${previewCmd(operationId, cfg.serverFlag)}`
65979
+ `turn ${operationId} is still running after ${Math.round(cfg.timeoutMs / 1e3)}s. It keeps running on the server; read it with: ${previewCmd(operationId, targetFlags(cfg.serverFlag, cfg.accountFlag))}`
65976
65980
  );
65977
65981
  }
65978
65982
  }
@@ -65996,7 +66000,13 @@ async function readWithin(cfg, operationId, budgetMs) {
65996
66000
  }
65997
66001
  async function runAgentPreview(cfg) {
65998
66002
  const p = await getPreview2(cfg.client, cfg.operationId, { signal: cfg.signal });
65999
- writeOutcome(cfg.out, p, cfg.operationId, cfg.serverFlag, cfg.asJson);
66003
+ writeOutcome(
66004
+ cfg.out,
66005
+ p,
66006
+ cfg.operationId,
66007
+ targetFlags(cfg.serverFlag, cfg.accountFlag),
66008
+ cfg.asJson
66009
+ );
66000
66010
  }
66001
66011
  var PREVIEW_ALREADY_SAVED = "CALC_PREVIEW_ALREADY_SAVED";
66002
66012
  var VERSION_CHANGED = "CALC_APPROVAL_VERSION_CHANGED";
@@ -66028,7 +66038,7 @@ async function runAgentSave(cfg) {
66028
66038
  const modelId = err.numberField("calc_model_id");
66029
66039
  if (modelId !== void 0) {
66030
66040
  throw new Error(
66031
- `${err.message}. To add this turn as a new version of model ${modelId}: dr calcmodels agent save ${cfg.operationId} --model ${modelId} --server ${cfg.serverFlag}`,
66041
+ `${err.message}. To add this turn as a new version of model ${modelId}: dr calcmodels agent save ${cfg.operationId} --model ${modelId} ${targetFlags(cfg.serverFlag, cfg.accountFlag)}`,
66032
66042
  { cause: err }
66033
66043
  );
66034
66044
  }
@@ -66043,7 +66053,7 @@ async function runAgentSave(cfg) {
66043
66053
  `Saved draft calc model ${saved.id} ${escapeControlChars(JSON.stringify(saved.name))} (version ${saved.version_id}). This version does not run until it is approved.
66044
66054
 
66045
66055
  next:
66046
- dr calcmodels agent approve ${saved.id} --server ${cfg.serverFlag}
66056
+ dr calcmodels agent approve ${saved.id} ${targetFlags(cfg.serverFlag, cfg.accountFlag)}
66047
66057
  `
66048
66058
  );
66049
66059
  }
@@ -66081,12 +66091,13 @@ async function runAgentApprove(cfg) {
66081
66091
  throw versionChanged(cfg.id, cfg.versionId, plan.version_id);
66082
66092
  }
66083
66093
  const versionId = executing ? cfg.versionId : plan.version_id;
66094
+ const target = targetFlags(cfg.serverFlag, cfg.accountFlag);
66084
66095
  await twoStepConfirm({
66085
66096
  out: cfg.out,
66086
66097
  action: approveAction(cfg.id, versionId),
66087
66098
  token: cfg.token,
66088
66099
  server: cfg.serverFlag,
66089
- confirmCmd: `dr calcmodels agent approve ${cfg.id} --version-id ${versionId} --server ${cfg.serverFlag}${cfg.asJson ? " --json" : ""}`,
66100
+ confirmCmd: `dr calcmodels agent approve ${cfg.id} --version-id ${versionId} ${target}${cfg.asJson ? " --json" : ""}`,
66090
66101
  describe: () => Promise.resolve(impactLines(cfg.id, plan)),
66091
66102
  execute: async () => {
66092
66103
  let result;
@@ -66104,7 +66115,7 @@ async function runAgentApprove(cfg) {
66104
66115
  writeJSONIndented(cfg.out, result);
66105
66116
  return;
66106
66117
  }
66107
- const run2 = result.run_id ? `First run: ${escapeControlChars(result.run_id)}.` : `No run was started: the model is not runnable now. Check it with dr calcmodels get ${cfg.id} --server ${cfg.serverFlag}.`;
66118
+ const run2 = result.run_id ? `First run: ${escapeControlChars(result.run_id)}.` : `No run was started: the model is not runnable now. Check it with dr calcmodels get ${cfg.id} ${target}.`;
66108
66119
  cfg.out.write(`Activated calc model ${cfg.id} (version ${versionId}). ${run2}
66109
66120
  `);
66110
66121
  }
@@ -66141,6 +66152,7 @@ function registerCalcmodelsAgentCommand(cm) {
66141
66152
  timeoutMs,
66142
66153
  asJson: opts.json === true,
66143
66154
  serverFlag: serverKey,
66155
+ accountFlag: normaliseAccount(opts.account),
66144
66156
  signal: setup.signal,
66145
66157
  out: process.stdout,
66146
66158
  err: process.stderr
@@ -66162,6 +66174,7 @@ function registerCalcmodelsAgentCommand(cm) {
66162
66174
  operationId,
66163
66175
  asJson: opts.json === true,
66164
66176
  serverFlag: serverKey,
66177
+ accountFlag: normaliseAccount(opts.account),
66165
66178
  signal: setup.signal,
66166
66179
  out: process.stdout
66167
66180
  });
@@ -66184,6 +66197,7 @@ function registerCalcmodelsAgentCommand(cm) {
66184
66197
  ...calcModelId !== void 0 && { calcModelId },
66185
66198
  asJson: opts.json === true,
66186
66199
  serverFlag: serverKey,
66200
+ accountFlag: normaliseAccount(opts.account),
66187
66201
  signal: setup.signal,
66188
66202
  out: process.stdout
66189
66203
  });
@@ -66218,6 +66232,7 @@ function registerCalcmodelsAgentCommand(cm) {
66218
66232
  token,
66219
66233
  asJson: opts.json === true,
66220
66234
  serverFlag: serverKey,
66235
+ accountFlag: normaliseAccount(opts.account),
66221
66236
  signal: setup.signal,
66222
66237
  out: process.stdout
66223
66238
  });
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 1,
3
- "cliVersion": "1.6.181",
3
+ "cliVersion": "1.6.182",
4
4
  "_contract": "Resolve a command path through `aliases` (canonical prefix + alias segment -> canonical path) before any lookup. A path listed in `pendingCommands`, or whose first segment is a key of `pending`, is UNDECIDED, not unrestricted: fail closed or skip it, and never read a path's absence from `commands` as 'no requirement'. An entry carrying `denied` is UNAVAILABLE to any AGENT-SCOPED credential — one whose `scopes` claim carries at least one `resource:action` entry; a claim that is absent, empty, capability-only or wholly unparseable is UNRESTRICTED, and this mark does not apply to it — whatever else that entry says: it is not a ceiling and it is not always-available, its `denied.reason` says why and `denied.until` names the ticket that lifts it, and the absence of `requires` on it must NEVER be read as 'no requirement'. Only an entry in `commands` with an empty `requires` means always-available.",
5
5
  "commands": {
6
6
  "login": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datarails-ai/dr-cli",
3
- "version": "1.6.181",
3
+ "version": "1.6.182",
4
4
  "description": "Datarails CLI",
5
5
  "type": "module",
6
6
  "engines": {