@datarails-ai/dr-cli 1.6.117 → 1.6.119
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/dist/cli.js +61 -19
- package/dist/scopes-map.json +1 -1
- package/dist/skills/dr-cli/reference/workflows.md +7 -0
- package/package.json +1 -1
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.
|
|
11
|
+
version: "1.6.119",
|
|
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-10-
|
|
72
|
+
var BUILD_TIME = "2026-10-12T09:44:27.404Z";
|
|
73
73
|
function formatBuildTime(iso) {
|
|
74
74
|
if (iso === "") return "";
|
|
75
75
|
const d = new Date(iso);
|
|
@@ -49692,11 +49692,60 @@ var WORKFLOW_TYPES_NON_MEC = [
|
|
|
49692
49692
|
];
|
|
49693
49693
|
var RECURRENCE_TYPES = [
|
|
49694
49694
|
"One Time",
|
|
49695
|
-
"
|
|
49696
|
-
"
|
|
49697
|
-
"
|
|
49698
|
-
"
|
|
49695
|
+
"Week",
|
|
49696
|
+
"Month",
|
|
49697
|
+
"Quarter",
|
|
49698
|
+
"Year"
|
|
49699
49699
|
];
|
|
49700
|
+
var RECURRENCE_ADJECTIVES = {
|
|
49701
|
+
Weekly: "Week",
|
|
49702
|
+
Monthly: "Month",
|
|
49703
|
+
Quarterly: "Quarter",
|
|
49704
|
+
Yearly: "Year"
|
|
49705
|
+
};
|
|
49706
|
+
function absentStartTimeLabel(recurrence) {
|
|
49707
|
+
return recurrence === "One Time" ? "(none; set when the workflow is activated)" : "(from the recurrence settings)";
|
|
49708
|
+
}
|
|
49709
|
+
function asRecurrencePeriodType(value, where) {
|
|
49710
|
+
const v = asString(value, where);
|
|
49711
|
+
if (RECURRENCE_TYPES.includes(v)) return v;
|
|
49712
|
+
const hint = RECURRENCE_ADJECTIVES[v];
|
|
49713
|
+
throw new Error(
|
|
49714
|
+
`--file ${where}: expected one of ${RECURRENCE_TYPES.join(" | ")}, got "${v}"` + (hint !== void 0 ? ` (use "${hint}")` : "")
|
|
49715
|
+
);
|
|
49716
|
+
}
|
|
49717
|
+
function checkTemplatePayload(out, requireAll) {
|
|
49718
|
+
if (out.process_start_time !== void 0 && out.config?.recurrency_period_type !== void 0 && out.config.recurrency_period_type !== "One Time") {
|
|
49719
|
+
throw new Error(
|
|
49720
|
+
`--file template.process_start_time: only allowed with config.recurrency_period_type "One Time" (got "${out.config.recurrency_period_type}"); drop it for a recurring workflow`
|
|
49721
|
+
);
|
|
49722
|
+
}
|
|
49723
|
+
if (!requireAll || out.config === void 0 || out.tags === void 0) return;
|
|
49724
|
+
if (out.tags.length === 0) {
|
|
49725
|
+
throw new Error(
|
|
49726
|
+
"--file template.tags: must not be empty; give the date tag of config.tags_config with its Unix-seconds value"
|
|
49727
|
+
);
|
|
49728
|
+
}
|
|
49729
|
+
const dateTags = out.config.tags_config.filter(
|
|
49730
|
+
(t) => t !== null && typeof t === "object" && t.type === "DATE"
|
|
49731
|
+
);
|
|
49732
|
+
if (dateTags.length !== 1) {
|
|
49733
|
+
throw new Error(
|
|
49734
|
+
`--file template.config.tags_config: needs exactly one entry with type "DATE" (found ${dateTags.length}); copy it from \`dr workflow get <id> --json\` of a working template (\`dr mec workflow get\` for MEC)`
|
|
49735
|
+
);
|
|
49736
|
+
}
|
|
49737
|
+
const dateTag = dateTags[0];
|
|
49738
|
+
if (typeof dateTag.id !== "number" || !Number.isInteger(dateTag.id) || dateTag.id <= 0) {
|
|
49739
|
+
throw new Error(
|
|
49740
|
+
`--file template.config.tags_config: the DATE entry needs a positive integer "id" (got ${JSON.stringify(dateTag.id)})`
|
|
49741
|
+
);
|
|
49742
|
+
}
|
|
49743
|
+
if (!out.tags.some((t) => t.id === dateTag.id)) {
|
|
49744
|
+
throw new Error(
|
|
49745
|
+
`--file template.tags: needs the date tag of config.tags_config (id ${String(dateTag.id)}, ${String(dateTag.name)}) with its Unix-seconds value`
|
|
49746
|
+
);
|
|
49747
|
+
}
|
|
49748
|
+
}
|
|
49700
49749
|
var STEP_TYPES = [
|
|
49701
49750
|
"Input",
|
|
49702
49751
|
"Output",
|
|
@@ -49805,14 +49854,13 @@ function validateTemplatePayload(raw, requireAll) {
|
|
|
49805
49854
|
);
|
|
49806
49855
|
}
|
|
49807
49856
|
out.process_start_time = v;
|
|
49808
|
-
} else if (requireAll) {
|
|
49809
|
-
throw new Error("--file template.process_start_time: required");
|
|
49810
49857
|
}
|
|
49811
49858
|
if (obj["tags"] !== void 0) {
|
|
49812
49859
|
out.tags = validateTagsArray(obj["tags"]);
|
|
49813
49860
|
} else if (requireAll) {
|
|
49814
49861
|
throw new Error("--file template.tags: required");
|
|
49815
49862
|
}
|
|
49863
|
+
checkTemplatePayload(out, requireAll);
|
|
49816
49864
|
return out;
|
|
49817
49865
|
}
|
|
49818
49866
|
function validateConfig(raw) {
|
|
@@ -49834,15 +49882,10 @@ function validateConfig(raw) {
|
|
|
49834
49882
|
`--file template.config.type: expected one of ${WORKFLOW_TYPES_NON_MEC.join(" | ")}, got "${type}"`
|
|
49835
49883
|
);
|
|
49836
49884
|
}
|
|
49837
|
-
const recurrency_period_type =
|
|
49885
|
+
const recurrency_period_type = asRecurrencePeriodType(
|
|
49838
49886
|
obj["recurrency_period_type"],
|
|
49839
49887
|
"template.config.recurrency_period_type"
|
|
49840
49888
|
);
|
|
49841
|
-
if (!RECURRENCE_TYPES.includes(recurrency_period_type)) {
|
|
49842
|
-
throw new Error(
|
|
49843
|
-
`--file template.config.recurrency_period_type: expected one of ${RECURRENCE_TYPES.join(" | ")}, got "${recurrency_period_type}"`
|
|
49844
|
-
);
|
|
49845
|
-
}
|
|
49846
49889
|
const tagsConfig = asArray2(obj["tags_config"], "template.config.tags_config");
|
|
49847
49890
|
return {
|
|
49848
49891
|
...obj,
|
|
@@ -50345,14 +50388,13 @@ function validateMecTemplatePayload(raw, requireAll) {
|
|
|
50345
50388
|
);
|
|
50346
50389
|
}
|
|
50347
50390
|
out.process_start_time = v;
|
|
50348
|
-
} else if (requireAll) {
|
|
50349
|
-
throw new Error("--file template.process_start_time: required");
|
|
50350
50391
|
}
|
|
50351
50392
|
if (obj["tags"] !== void 0) {
|
|
50352
50393
|
out.tags = validateTagsArray2(obj["tags"]);
|
|
50353
50394
|
} else if (requireAll) {
|
|
50354
50395
|
throw new Error("--file template.tags: required");
|
|
50355
50396
|
}
|
|
50397
|
+
checkTemplatePayload(out, requireAll);
|
|
50356
50398
|
return out;
|
|
50357
50399
|
}
|
|
50358
50400
|
function validateMecConfig(raw, requireAll) {
|
|
@@ -50392,7 +50434,7 @@ function validateMecConfig(raw, requireAll) {
|
|
|
50392
50434
|
name,
|
|
50393
50435
|
type: MEC_WORKFLOW_TYPE,
|
|
50394
50436
|
process_timezone: tz,
|
|
50395
|
-
recurrency_period_type: recur,
|
|
50437
|
+
recurrency_period_type: recur === void 0 ? void 0 : asRecurrencePeriodType(recur, "template.config.recurrency_period_type"),
|
|
50396
50438
|
recurrency_start_day: obj["recurrency_start_day"] === null ? null : obj["recurrency_start_day"] === void 0 && !requireAll ? void 0 : asNonNegativeInt2(obj["recurrency_start_day"], "template.config.recurrency_start_day"),
|
|
50397
50439
|
recurrency_start_hour: obj["recurrency_start_hour"] === void 0 && !requireAll ? void 0 : asNonNegativeInt2(obj["recurrency_start_hour"], "template.config.recurrency_start_hour"),
|
|
50398
50440
|
recurrency_start_minute: obj["recurrency_start_minute"] === void 0 && !requireAll ? void 0 : asNonNegativeInt2(
|
|
@@ -51017,7 +51059,7 @@ async function runMecWorkflowCreate(cfg) {
|
|
|
51017
51059
|
`type: ${cfg.payload.config.type}`,
|
|
51018
51060
|
`recurrence: ${cfg.payload.config.recurrency_period_type}`,
|
|
51019
51061
|
`timezone: ${timezoneLabel(cfg.payload.config.process_timezone)}`,
|
|
51020
|
-
`process_start_time: ${cfg.payload.process_start_time}`,
|
|
51062
|
+
`process_start_time: ${cfg.payload.process_start_time ?? absentStartTimeLabel(cfg.payload.config.recurrency_period_type)}`,
|
|
51021
51063
|
`tags: ${cfg.payload.tags.length}`,
|
|
51022
51064
|
"NOTE: created MEC template starts INACTIVE \u2014 activate separately."
|
|
51023
51065
|
],
|
|
@@ -53870,7 +53912,7 @@ async function runWorkflowCreate(cfg) {
|
|
|
53870
53912
|
`type: ${cfg.payload.config.type}`,
|
|
53871
53913
|
`recurrence: ${cfg.payload.config.recurrency_period_type}`,
|
|
53872
53914
|
`timezone: ${timezoneLabel2(cfg.payload.config.process_timezone)}`,
|
|
53873
|
-
`process_start_time: ${cfg.payload.process_start_time}`,
|
|
53915
|
+
`process_start_time: ${cfg.payload.process_start_time ?? absentStartTimeLabel(cfg.payload.config.recurrency_period_type)}`,
|
|
53874
53916
|
`tags: ${cfg.payload.tags.length}`,
|
|
53875
53917
|
"NOTE: created template starts INACTIVE \u2014 activate separately."
|
|
53876
53918
|
],
|
package/dist/scopes-map.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
|
-
"cliVersion": "1.6.
|
|
3
|
+
"cliVersion": "1.6.119",
|
|
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": {
|
|
@@ -102,6 +102,13 @@ everything else is identical. Confirm tokens are scoped per family
|
|
|
102
102
|
`recurrence_*` with a hint.
|
|
103
103
|
- `process_start_time` and `tag.value` are 10-digit **Unix-seconds** epochs;
|
|
104
104
|
small ints are rejected with a "did you pass day-of-month?" hint.
|
|
105
|
+
- `recurrency_period_type` is one of `One Time | Week | Month | Quarter | Year`.
|
|
106
|
+
`process_start_time` is only allowed with `One Time`; leave it out for a
|
|
107
|
+
recurring workflow.
|
|
108
|
+
- On `create`, `tags` dates the first process. `config.tags_config` needs
|
|
109
|
+
exactly one `type: "DATE"` entry, and `tags` needs a row with that entry's
|
|
110
|
+
`id` and a Unix-seconds `value`. Copy both from `workflow get <id> --json` of a
|
|
111
|
+
working template. The CLI rejects a payload that breaks this.
|
|
105
112
|
|
|
106
113
|
## Collection processes
|
|
107
114
|
|