@datarails-ai/dr-cli 1.6.82 → 1.6.84
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 +14 -4
- package/dist/scopes-map.json +9 -1
- package/package.json +2 -2
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.84",
|
|
12
12
|
description: "Datarails CLI",
|
|
13
13
|
type: "module",
|
|
14
14
|
engines: {
|
|
@@ -38,7 +38,7 @@ var package_default = {
|
|
|
38
38
|
postinstall: "node scripts/postinstall.mjs"
|
|
39
39
|
},
|
|
40
40
|
dependencies: {
|
|
41
|
-
"@datarails-ai/dr-appspace-cli": "0.10.
|
|
41
|
+
"@datarails-ai/dr-appspace-cli": "0.10.9",
|
|
42
42
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
43
43
|
"@napi-rs/keyring": "^1.3.0",
|
|
44
44
|
commander: "^12.1.0",
|
|
@@ -67,7 +67,7 @@ var package_default = {
|
|
|
67
67
|
};
|
|
68
68
|
|
|
69
69
|
// src/buildInfo.ts
|
|
70
|
-
var BUILD_TIME = "2026-
|
|
70
|
+
var BUILD_TIME = "2026-10-01T05:04:40.480Z";
|
|
71
71
|
function formatBuildTime(iso) {
|
|
72
72
|
if (iso === "") return "";
|
|
73
73
|
const d = new Date(iso);
|
|
@@ -4412,6 +4412,16 @@ async function setupCall(serverFlag, accountFlag, options = {}) {
|
|
|
4412
4412
|
|
|
4413
4413
|
// src/scopes/matcher.ts
|
|
4414
4414
|
var SCOPE_RE = /^(\*|[a-z][a-z0-9-]*):(\*|read|write|destructive)$/;
|
|
4415
|
+
var ACTION_RANK = new Map(
|
|
4416
|
+
["read", "write", "destructive"].map((action, rank) => [action, rank])
|
|
4417
|
+
);
|
|
4418
|
+
function actionSatisfies(granted, wanted) {
|
|
4419
|
+
if (granted === "*" || granted === wanted) return true;
|
|
4420
|
+
const g = ACTION_RANK.get(granted);
|
|
4421
|
+
const w = ACTION_RANK.get(wanted);
|
|
4422
|
+
if (g === void 0 || w === void 0) return false;
|
|
4423
|
+
return g > w;
|
|
4424
|
+
}
|
|
4415
4425
|
var WHITESPACE = "\\t\\n\\v\\f\\r \\x1c-\\x1f\\x85\\xa0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff";
|
|
4416
4426
|
var TRIM_RE = new RegExp(`^[${WHITESPACE}]+|[${WHITESPACE}]+$`, "g");
|
|
4417
4427
|
var SPLIT_RE = new RegExp(`[${WHITESPACE}]+`);
|
|
@@ -4442,7 +4452,7 @@ function isAllowed(scopes, resource, action) {
|
|
|
4442
4452
|
if (entries.length === 0) return true;
|
|
4443
4453
|
const res = trimShared(resource).toLowerCase();
|
|
4444
4454
|
const act = trimShared(action).toLowerCase();
|
|
4445
|
-
return entries.some(([r, a]) => (r === "*" || r === res) && (a
|
|
4455
|
+
return entries.some(([r, a]) => (r === "*" || r === res) && actionSatisfies(a, act));
|
|
4446
4456
|
}
|
|
4447
4457
|
function isEntryAllowed(scopes, entry) {
|
|
4448
4458
|
return entry.requires.every((r) => isAllowed(scopes, r.resource, r.action));
|
package/dist/scopes-map.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
|
-
"cliVersion": "1.6.
|
|
3
|
+
"cliVersion": "1.6.84",
|
|
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": {
|
|
@@ -4257,6 +4257,14 @@
|
|
|
4257
4257
|
}
|
|
4258
4258
|
]
|
|
4259
4259
|
},
|
|
4260
|
+
"app-space tables": {
|
|
4261
|
+
"requires": [
|
|
4262
|
+
{
|
|
4263
|
+
"resource": "app-space",
|
|
4264
|
+
"action": "read"
|
|
4265
|
+
}
|
|
4266
|
+
]
|
|
4267
|
+
},
|
|
4260
4268
|
"app-space scaffold": {
|
|
4261
4269
|
"requires": []
|
|
4262
4270
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datarails-ai/dr-cli",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.84",
|
|
4
4
|
"description": "Datarails CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"access": "public"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@datarails-ai/dr-appspace-cli": "0.10.
|
|
20
|
+
"@datarails-ai/dr-appspace-cli": "0.10.9",
|
|
21
21
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
22
22
|
"@napi-rs/keyring": "^1.3.0",
|
|
23
23
|
"commander": "^12.1.0",
|