@datarails-ai/dr-cli 1.6.147 → 1.6.149

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 1,
3
- "cliVersion": "1.6.147",
3
+ "cliVersion": "1.6.149",
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": {
@@ -1724,6 +1724,10 @@
1724
1724
  {
1725
1725
  "resource": "fileboxes",
1726
1726
  "action": "write"
1727
+ },
1728
+ {
1729
+ "resource": "tables",
1730
+ "action": "read"
1727
1731
  }
1728
1732
  ]
1729
1733
  },
@@ -1732,6 +1736,10 @@
1732
1736
  {
1733
1737
  "resource": "fileboxes",
1734
1738
  "action": "write"
1739
+ },
1740
+ {
1741
+ "resource": "tables",
1742
+ "action": "read"
1735
1743
  }
1736
1744
  ]
1737
1745
  },
@@ -1740,6 +1748,10 @@
1740
1748
  {
1741
1749
  "resource": "fileboxes",
1742
1750
  "action": "write"
1751
+ },
1752
+ {
1753
+ "resource": "tables",
1754
+ "action": "read"
1743
1755
  }
1744
1756
  ]
1745
1757
  },
@@ -1971,190 +1983,198 @@
1971
1983
  }
1972
1984
  ]
1973
1985
  },
1986
+ "integrations escalation-report": {
1987
+ "requires": [
1988
+ {
1989
+ "resource": "integrations",
1990
+ "action": "read"
1991
+ }
1992
+ ]
1993
+ },
1974
1994
  "connectors publish": {
1975
1995
  "denied": {
1976
1996
  "reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
1977
- "until": "DR-53511"
1997
+ "until": "DR-56164"
1978
1998
  }
1979
1999
  },
1980
2000
  "connectors query repoint": {
1981
2001
  "denied": {
1982
2002
  "reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
1983
- "until": "DR-53511"
2003
+ "until": "DR-56164"
1984
2004
  }
1985
2005
  },
1986
2006
  "connectors query create": {
1987
2007
  "denied": {
1988
2008
  "reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
1989
- "until": "DR-53511"
2009
+ "until": "DR-56164"
1990
2010
  }
1991
2011
  },
1992
2012
  "connectors query list": {
1993
2013
  "denied": {
1994
2014
  "reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
1995
- "until": "DR-53511"
2015
+ "until": "DR-56164"
1996
2016
  }
1997
2017
  },
1998
2018
  "connectors query delete": {
1999
2019
  "denied": {
2000
2020
  "reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
2001
- "until": "DR-53511"
2021
+ "until": "DR-56164"
2002
2022
  }
2003
2023
  },
2004
2024
  "connectors connector create": {
2005
2025
  "denied": {
2006
2026
  "reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
2007
- "until": "DR-53511"
2027
+ "until": "DR-56164"
2008
2028
  }
2009
2029
  },
2010
2030
  "connectors artifact deregister": {
2011
2031
  "denied": {
2012
2032
  "reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
2013
- "until": "DR-53511"
2033
+ "until": "DR-56164"
2014
2034
  }
2015
2035
  },
2016
2036
  "connectors promote": {
2017
2037
  "denied": {
2018
2038
  "reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
2019
- "until": "DR-53511"
2039
+ "until": "DR-56164"
2020
2040
  }
2021
2041
  },
2022
2042
  "connectors binding get": {
2023
2043
  "denied": {
2024
2044
  "reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
2025
- "until": "DR-53511"
2045
+ "until": "DR-56164"
2026
2046
  }
2027
2047
  },
2028
2048
  "connectors sync cancel": {
2029
2049
  "denied": {
2030
2050
  "reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
2031
- "until": "DR-53511"
2051
+ "until": "DR-56164"
2032
2052
  }
2033
2053
  },
2034
2054
  "connectors active get": {
2035
2055
  "denied": {
2036
2056
  "reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
2037
- "until": "DR-53511"
2057
+ "until": "DR-56164"
2038
2058
  }
2039
2059
  },
2040
2060
  "connectors dev-fetch": {
2041
2061
  "denied": {
2042
2062
  "reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
2043
- "until": "DR-53511"
2063
+ "until": "DR-56164"
2044
2064
  }
2045
2065
  },
2046
2066
  "connectors poll enable": {
2047
2067
  "denied": {
2048
2068
  "reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
2049
- "until": "DR-53511"
2069
+ "until": "DR-56164"
2050
2070
  }
2051
2071
  },
2052
2072
  "connectors poll set": {
2053
2073
  "denied": {
2054
2074
  "reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
2055
- "until": "DR-53511"
2075
+ "until": "DR-56164"
2056
2076
  }
2057
2077
  },
2058
2078
  "connectors poll disable": {
2059
2079
  "denied": {
2060
2080
  "reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
2061
- "until": "DR-53511"
2081
+ "until": "DR-56164"
2062
2082
  }
2063
2083
  },
2064
2084
  "connectors poll get": {
2065
2085
  "denied": {
2066
2086
  "reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
2067
- "until": "DR-53511"
2087
+ "until": "DR-56164"
2068
2088
  }
2069
2089
  },
2070
2090
  "connectors poll run": {
2071
2091
  "denied": {
2072
2092
  "reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
2073
- "until": "DR-53511"
2093
+ "until": "DR-56164"
2074
2094
  }
2075
2095
  },
2076
2096
  "connectors poll resume": {
2077
2097
  "denied": {
2078
2098
  "reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
2079
- "until": "DR-53511"
2099
+ "until": "DR-56164"
2080
2100
  }
2081
2101
  },
2082
2102
  "connectors poll items": {
2083
2103
  "denied": {
2084
2104
  "reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
2085
- "until": "DR-53511"
2105
+ "until": "DR-56164"
2086
2106
  }
2087
2107
  },
2088
2108
  "connectors poll retry": {
2089
2109
  "denied": {
2090
2110
  "reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
2091
- "until": "DR-53511"
2111
+ "until": "DR-56164"
2092
2112
  }
2093
2113
  },
2094
2114
  "connectors poll skip": {
2095
2115
  "denied": {
2096
2116
  "reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
2097
- "until": "DR-53511"
2117
+ "until": "DR-56164"
2098
2118
  }
2099
2119
  },
2100
2120
  "connectors poll seed": {
2101
2121
  "denied": {
2102
2122
  "reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
2103
- "until": "DR-53511"
2123
+ "until": "DR-56164"
2104
2124
  }
2105
2125
  },
2106
2126
  "connectors tasks create": {
2107
2127
  "denied": {
2108
2128
  "reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
2109
- "until": "DR-53511"
2129
+ "until": "DR-56164"
2110
2130
  }
2111
2131
  },
2112
2132
  "connectors tasks list": {
2113
2133
  "denied": {
2114
2134
  "reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
2115
- "until": "DR-53511"
2135
+ "until": "DR-56164"
2116
2136
  }
2117
2137
  },
2118
2138
  "connectors tasks get": {
2119
2139
  "denied": {
2120
2140
  "reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
2121
- "until": "DR-53511"
2141
+ "until": "DR-56164"
2122
2142
  }
2123
2143
  },
2124
2144
  "connectors tasks update": {
2125
2145
  "denied": {
2126
2146
  "reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
2127
- "until": "DR-53511"
2147
+ "until": "DR-56164"
2128
2148
  }
2129
2149
  },
2130
2150
  "connectors tasks delete": {
2131
2151
  "denied": {
2132
2152
  "reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
2133
- "until": "DR-53511"
2153
+ "until": "DR-56164"
2134
2154
  }
2135
2155
  },
2136
2156
  "connectors tasks run": {
2137
2157
  "denied": {
2138
2158
  "reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
2139
- "until": "DR-53511"
2159
+ "until": "DR-56164"
2140
2160
  }
2141
2161
  },
2142
2162
  "connectors tasks pause": {
2143
2163
  "denied": {
2144
2164
  "reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
2145
- "until": "DR-53511"
2165
+ "until": "DR-56164"
2146
2166
  }
2147
2167
  },
2148
2168
  "connectors tasks resume": {
2149
2169
  "denied": {
2150
2170
  "reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
2151
- "until": "DR-53511"
2171
+ "until": "DR-56164"
2152
2172
  }
2153
2173
  },
2154
2174
  "connectors tasks runs": {
2155
2175
  "denied": {
2156
2176
  "reason": "The connectors control plane runs no dr-auth-sdk guard and checks no scope, so the `integrations` ceiling this command declares would be enforced by nobody. Closed to scoped credentials until that control plane adopts the SDK.",
2157
- "until": "DR-53511"
2177
+ "until": "DR-56164"
2158
2178
  }
2159
2179
  },
2160
2180
  "filebox list": {
@@ -3845,10 +3865,6 @@
3845
3865
  },
3846
3866
  "entities mark-completed": {
3847
3867
  "requires": [
3848
- {
3849
- "resource": "integrations",
3850
- "action": "write"
3851
- },
3852
3868
  {
3853
3869
  "resource": "fileboxes",
3854
3870
  "action": "write"
@@ -326,6 +326,7 @@ area's gotchas.
326
326
  - `integrations it list|get|add|update|delete|resync` (IT-admin file-sync; redacts secrets by default)
327
327
  - `integrations sftp create|provision` — self-serve SFTP fileboxes: `create --name <n>` makes a filebox and its SFTP folder `/<name>_<id>` in one step; `provision <filebox_id>` does it for an existing filebox
328
328
  - `integrations netsuite readiness|saved-search-sql` — NetSuite 3.0 -> SuiteQL migration: `readiness <id> [--dry-run]` probes the bundle and, on CONFIRMED, stamps `bundle_version` 3 (two-step confirm); `saved-search-sql <id> --saved-search <ssid> [--out <file>]` prints a saved search's SQL and its library match
329
+ - `integrations escalation-report [--server <key> | --servers A,B | --all-servers] [--out <file.html>] [--json]` — staff only: paused data sources and fileboxes, auth-error email funnel and recovery as one HTML page
329
330
  - `entities list|qbd-availability|netsuite-connections|rename|rename-group|delete|mark-completed` (alias `companies`)
330
331
  - `entities create qbo|xero|qbd|netsuite` (connected accounting systems)
331
332
  - `error-enrichments list|stats|get|create|update|delete|test-regex|export|import|types list|types create` — the
@@ -600,6 +601,11 @@ network traffic or hand-edits JSON. Full recipes in the relevant reference file.
600
601
  `[M].SHIFT(...)` / `[M].AS_OF(...)` — SHIFT unit `consumption_period`
601
602
  follows the query grain; `PERIODS_IN_YEAR` metrics reject day-grain
602
603
  queries. See reference/metrics.md.
604
+ - **Metric `--format`** (`metrics create base|calc`, `metrics update`) accepts
605
+ only what the web app's Format editor produces: `[$ € £ ₪]` + `#,###`|`####`
606
+ + `[.# … .####]` + `[[kilo]k|[mega]M]` + `[%]` (no currency with `%`).
607
+ Single-quote it (`'$#,###.##'`); there is no empty format — reset with
608
+ `'#,###'`. See reference/metrics.md.
603
609
  - **`metrics data --agg`** is `DEFAULT|MTD|QTD|YTD|MTG|QTG|YTG`. The `*TG` "to
604
610
  go" values accumulate **forward** from the current bucket (inclusive) to the
605
611
  period end — the mirror of `*TD`. See reference/metrics.md.
@@ -136,6 +136,25 @@ is the NetSuite connection (data integration) id, not a filebox id.
136
136
  call failed, or the translated SQL is over the 100,000-character custom-report cap;
137
137
  the detail says which.
138
138
 
139
+ ## Auth-error escalation report (`integrations escalation-report`)
140
+
141
+ Staff only (Datarails admins and the Integrations Team); anyone else gets a 403.
142
+
143
+ - `integrations escalation-report --server <key> --out <file.html>` writes one
144
+ self-contained HTML page: KPI cards and a By region table (one row per server plus a
145
+ total that matches the cards) at the top, then data sources paused now (by vendor,
146
+ server and age, plus the ones paused over 30 days for Customer Success), paused
147
+ fileboxes and filebox-days paused (a proxy for syncs not run), the auth-error email
148
+ funnel with recovery between emails, and recovery after a pause (per ISO week, by
149
+ trigger, time paused, repeat pausers). Without `--out` the page goes to stdout.
150
+ - `--servers A,B` or `--all-servers` (production servers; `--include-test` adds the
151
+ rest) merge every server into one page. A server without a stored login is skipped. A
152
+ server that fails, e.g. `Audit events are unavailable on <key>` (a 502), is listed on
153
+ the page; the page is still written and the command then exits non-zero.
154
+ - `--json` prints the merged raw data (every row tagged with its `server`) instead.
155
+ - Event history covers the audit retention window (~90 days). Refused sync attempts are
156
+ on the Groundcover board.
157
+
139
158
  ## Entities — company data sources (`entities`, alias `companies`)
140
159
 
141
160
  The connected accounting systems (QuickBooks Online/Desktop, Xero, NetSuite) —
@@ -150,7 +169,7 @@ i.e. integration data sources at the company level.
150
169
  - `entities rename <doc_ids> --alias <s>` (CSV doc ids),
151
170
  `entities rename-group <doc_ids> --group <s>` (move into a group).
152
171
  - `entities delete <doc_ids>` — two-step confirm.
153
- - `entities mark-completed <doc_id>` — IT-support override for a stuck state.
172
+ - `entities mark-completed <doc_id>` — clears the document's stale export-error badge; it marks nothing completed and does not touch sync state.
154
173
 
155
174
  ## Customer-facing docs (KB)
156
175
 
@@ -92,13 +92,41 @@ Required: `--name`, `--template <id>`, `--value-field <id>`, `--date-field <id>`
92
92
  - No `--time-aggregation` — a CALC rollup inherits time-aggregation from each
93
93
  referenced BASE, so a single CALC-level value would be meaningless.
94
94
 
95
+ ## Display format (`--format`)
96
+
97
+ `metrics create base`, `metrics create calc` and `metrics update <id>` take
98
+ `--format '<f>'`, stored at `configuration.format` (the FORMAT column of
99
+ `metrics list`). Only the strings the web app's metric Format editor can
100
+ produce are accepted; anything else is rejected before any request. Build it
101
+ from these parts, in this order:
102
+
103
+ | Part | Values |
104
+ |------|--------|
105
+ | currency prefix (optional) | `$` `€` `£` `₪` |
106
+ | digits | `#,###` (thousands separator) or `####` |
107
+ | decimals (optional) | `.#` `.##` `.###` `.####` |
108
+ | scale (optional) | `[kilo]k` (thousands) or `[mega]M` (millions) |
109
+ | percent suffix (optional) | `%` — never together with a currency |
110
+
111
+ - Examples: `'#,###'`, `'$#,###.##'`, `'€####[mega]M'`, `'####.#%'`.
112
+ - Always single-quote the value: an unquoted `#` starts a shell comment.
113
+ - `$` is stored quoted, as the editor stores it: `$#,###` is saved (and shown
114
+ in FORMAT) as `"$"#,###`. Both spellings are accepted on input.
115
+ - Excel-style `0` placeholders (`#,##0.00`) and anything else outside the
116
+ table are rejected; the error suggests the `#` spelling when there is one.
117
+ - There is no empty format. The editor's default is `#,###`; to reset a
118
+ metric, pass `--format '#,###'`.
119
+ - On `update`, the CLI reads the metric first and sends its configuration back
120
+ with only `format` changed, so a CALC formula is left exactly as stored.
121
+
95
122
  ## Update / delete
96
123
 
97
124
  - `metrics update <id>` — partial PATCH. Flags: `--name`, `--description`,
98
125
  `--category`, `--dimensions`, `--hide`/`--unhide`, `--time-aggregation`,
99
126
  `--aggregator`, `--template`, `--value-field`, `--date-field`, `--filter`,
100
- `--exclude-filter`, `--clear-filters`. `--description ""` clears to `null` on
101
- the wire (matching how `get` round-trips an untouched field).
127
+ `--exclude-filter`, `--clear-filters`, `--format` (see above).
128
+ `--description ""` clears to `null` on the wire (matching how `get`
129
+ round-trips an untouched field).
102
130
  - **No `--formula`** — CALC formulas and other create-time fields (kind,
103
131
  template, value/date field, aggregator) are intentionally not editable in
104
132
  place; changing them yields a different metric. To fix a formula:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datarails-ai/dr-cli",
3
- "version": "1.6.147",
3
+ "version": "1.6.149",
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.12.19",
20
+ "@datarails-ai/dr-appspace-cli": "0.12.20",
21
21
  "@modelcontextprotocol/sdk": "^1.29.0",
22
22
  "@napi-rs/keyring": "^1.3.0",
23
23
  "commander": "^12.1.0",