@datarails-ai/dr-cli 1.6.92 → 1.6.94
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
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.94",
|
|
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.19",
|
|
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-10-
|
|
70
|
+
var BUILD_TIME = "2026-10-02T10:34:15.709Z";
|
|
71
71
|
function formatBuildTime(iso) {
|
|
72
72
|
if (iso === "") return "";
|
|
73
73
|
const d = new Date(iso);
|
package/dist/scopes-map.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
|
-
"cliVersion": "1.6.
|
|
3
|
+
"cliVersion": "1.6.94",
|
|
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": {
|
|
@@ -63,9 +63,13 @@ parameter fails in `connect()` before the vendor is called.
|
|
|
63
63
|
vars, HTTP client, CSV writer, paging, auth, dates), then `_core` helpers and an existing connection
|
|
64
64
|
that fits; never a second copy. Name modules after what they do, never after who uses them. Hand the
|
|
65
65
|
user a list of lib improvements you noticed (duplicated helpers, code that belongs in `_core`, a
|
|
66
|
-
hand-written copy of a kit helper), done in their own PR.
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
hand-written copy of a kit helper), done in their own PR.
|
|
67
|
+
- **Every new lib is built on the kit.** A new `lib/<vendor>/` module or thin file that defines its own
|
|
68
|
+
logger, query-vars merge, redaction, CSV block helper, date parser or retry loop is wrong; use the
|
|
69
|
+
kit call. The kit is live in every production ring, so that is never a reason to copy one. It comes
|
|
70
|
+
from the runner image at runtime, not from `.sdk-ref`: on a dev or test environment, check that each
|
|
71
|
+
hook's first log line reads `INFO:dr.sdk: hook=… kit=<version>` before publishing there, and if it
|
|
72
|
+
does not, get that environment's runner image updated rather than dropping the kit.
|
|
69
73
|
- **Never change what another org lands.** A change to a module other orgs import must be proven
|
|
70
74
|
output-neutral: their tests pass, and for text-only edits, each module's AST with docstrings stripped
|
|
71
75
|
equals `origin/main`'s. A lib merge cuts new versions of every connector that bundles it; none moves
|
|
@@ -187,8 +187,12 @@ Those carry org-specific config, may lag the current SDK/runtime contract, and c
|
|
|
187
187
|
drift — the samples are the single maintained source of truth. At most read an existing one to sanity-check
|
|
188
188
|
one behavior; never use it as the starting point to copy from.
|
|
189
189
|
|
|
190
|
-
**
|
|
191
|
-
|
|
190
|
+
**Every new connector is built on the SDK's connector kit. Shared helpers come from the kit — never
|
|
191
|
+
copy them, from a sample or anywhere else.** This is required, not a preference: a new connection or
|
|
192
|
+
dataquery that defines its own `_get_logger`, `_query_vars`, `_safe_snippet`, `_csv_bytes` /
|
|
193
|
+
`_csv_block`, `_parse_date` or a `for attempt in range` retry loop is wrong; replace it with the kit
|
|
194
|
+
call below before it is reviewed. A template gives you the structure; the logger, config, retry, CSV
|
|
195
|
+
and paging code comes from
|
|
192
196
|
`from dr_integrations_sdk import kit` (import the package, not `kit.csv`/`kit.logging` by name — they
|
|
193
197
|
would shadow the stdlib). `sample_http_vendor` uses it; `sample_streaming_fanout` and `lib/sample_vendor`
|
|
194
198
|
still carry hand-written `_get_logger` / `_query_vars` / retry helpers, so swap those for the kit when you
|
|
@@ -205,10 +209,13 @@ copy them. Reference: dr-connectors-runner `docs/connector-kit.md`.
|
|
|
205
209
|
| credentials and tokens | `kit.auth.credential(creds, *keys, vendor=)`, `client_credentials` / `password_grant` → `Token.header()`, `basic_header`, `bearer_header` |
|
|
206
210
|
| a date window | `kit.dates.date_window(vars, start_keys=, end_keys=, required=)`, `DateWindow.chunks(days)`, `parse_date` |
|
|
207
211
|
|
|
208
|
-
**
|
|
209
|
-
image**, not from `.sdk-ref` (that pins only what CI tests
|
|
210
|
-
|
|
211
|
-
|
|
212
|
+
**The kit is live in every production ring**, so it is never a reason to fall back to copied helpers.
|
|
213
|
+
At runtime the kit comes from the **runner image**, not from `.sdk-ref` (that pins only what CI tests
|
|
214
|
+
against). An image with the kit prints
|
|
215
|
+
`INFO:dr.sdk: hook=… correlation_id=… kit=<version>` as each hook's first log line. On a dev or test
|
|
216
|
+
environment, check for that line before publishing there; if it is missing, a connector that imports
|
|
217
|
+
`kit` fails at import, so get that environment's runner image updated — do not rewrite the connector
|
|
218
|
+
without the kit.
|
|
212
219
|
|
|
213
220
|
**Batching & output — the non-negotiable pattern (get this right FIRST, before writing fetch).**
|
|
214
221
|
|
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.94",
|
|
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.19",
|
|
21
21
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
22
22
|
"@napi-rs/keyring": "^1.3.0",
|
|
23
23
|
"commander": "^12.1.0",
|