@erdoai/cli 0.101.0 → 0.101.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.
Files changed (2) hide show
  1. package/dist/index.js +11 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1087,10 +1087,12 @@ var ErdoClient = class {
1087
1087
  return this.request("POST", "/v1/datasets-ensure", input);
1088
1088
  }
1089
1089
  // Correct which dataset carries a purpose. Pass `purpose` to set one,
1090
- // `clear_purpose` to remove it; moving a purpose is clearing it from the old
1091
- // dataset and setting it on the right one. Setting a purpose the org already
1092
- // uses elsewhere succeeds and answers with a warning naming what it shadows,
1093
- // since one purpose is meant to map to one dataset.
1090
+ // `clear_purpose` to remove it. Setting a purpose another dataset carries is
1091
+ // an atomic MOVE — the old carrier is cleared in the same transaction — and
1092
+ // the response warns naming the dataset it moved from. Pass
1093
+ // `purpose_sibling: true` only to declare a deliberate parallel carrier (a
1094
+ // separate program a human chose to run), which leaves the other carriers
1095
+ // alone.
1094
1096
  setDatasetPurpose(slug, input) {
1095
1097
  return this.request("POST", `/v1/datasets/${encodeURIComponent(slug)}/schema`, input);
1096
1098
  }
@@ -6152,8 +6154,11 @@ datasetsCmd.command("ensure <purpose>").description(
6152
6154
  }
6153
6155
  });
6154
6156
  datasetsCmd.command("set-purpose <slug> [purpose]").description(
6155
- "Set (or with --clear, remove) the dataset's purpose \u2014 the org-vocabulary role `datasets purposes` reports. Use it to CORRECT a purpose that names the wrong dataset: one purpose maps to one dataset per org, so a purpose left on the wrong one points everything that resolves through the vocabulary at the wrong rows. Moving a purpose is two calls \u2014 clear it from the old dataset, set it on the right one. Setting a purpose the org already uses elsewhere succeeds and prints a warning naming what it now shadows."
6157
+ "Set (or with --clear, remove) the dataset's purpose \u2014 the org-vocabulary role `datasets purposes` reports. Use it to CORRECT a purpose that names the wrong dataset: one purpose maps to one dataset per org, so a purpose left on the wrong one points everything that resolves through the vocabulary at the wrong rows. Setting a purpose another dataset carries is an atomic MOVE: the old carrier is cleared in the same transaction, so one call on the right dataset lands it (the response says which dataset it moved from). Use --sibling only when deliberately running a parallel table for the same purpose."
6156
6158
  ).option("--clear", "remove the dataset's purpose instead of setting one").option(
6159
+ "--sibling",
6160
+ "declare this dataset a deliberate parallel carrier of the purpose (a separate program a human chose to run) instead of moving the purpose off other datasets"
6161
+ ).option(
6157
6162
  "--description <text>",
6158
6163
  "description for a purpose new to this org; ignored when the org already has an entry for it"
6159
6164
  ).action(async (slug, purpose, opts) => {
@@ -6169,6 +6174,7 @@ datasetsCmd.command("set-purpose <slug> [purpose]").description(
6169
6174
  const res = await new ErdoClient().setDatasetPurpose(slug, {
6170
6175
  ...purpose ? { purpose } : {},
6171
6176
  ...opts.clear ? { clear_purpose: true } : {},
6177
+ ...opts.sibling ? { purpose_sibling: true } : {},
6172
6178
  ...opts.description ? { purpose_description: opts.description } : {}
6173
6179
  });
6174
6180
  for (const w of res.warnings ?? []) console.error(`warning: ${w}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@erdoai/cli",
3
- "version": "0.101.0",
3
+ "version": "0.101.1",
4
4
  "description": "Erdo CLI — drive datasets, pages, and evals from the terminal or CI",
5
5
  "type": "module",
6
6
  "bin": {