datagrok-tools 6.5.6 → 6.5.8
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/.devcontainer/docker-compose.yaml +68 -24
- package/CHANGELOG.md +41 -6
- package/CLAUDE.md +35 -10
- package/Core.json +1027 -0
- package/GROK_S.md +563 -27
- package/bin/commands/api.js +121 -70
- package/bin/commands/help.js +3 -65
- package/bin/commands/server-domains.js +468 -0
- package/bin/commands/server-migrate.js +392 -0
- package/bin/commands/server.js +455 -92
- package/bin/grok.js +16 -5
- package/bin/utils/migrate/bundle.js +223 -0
- package/bin/utils/migrate/bundle.ts +222 -0
- package/bin/utils/migrate/parts.js +83 -0
- package/bin/utils/migrate/parts.ts +72 -0
- package/bin/utils/migrate/pool.js +17 -0
- package/bin/utils/migrate/pool.ts +13 -0
- package/bin/utils/migrate/pusher.js +980 -0
- package/bin/utils/migrate/pusher.ts +829 -0
- package/bin/utils/migrate/registry.js +349 -0
- package/bin/utils/migrate/registry.ts +255 -0
- package/bin/utils/migrate/rewriter.js +59 -0
- package/bin/utils/migrate/rewriter.ts +59 -0
- package/bin/utils/migrate/walker.js +571 -0
- package/bin/utils/migrate/walker.ts +509 -0
- package/bin/utils/node-dapi.js +787 -141
- package/bin/utils/playwright-runner.js +55 -39
- package/bin/utils/server-client.js +15 -2
- package/bin/utils/server-output.js +65 -4
- package/bin/utils/test-utils.js +1 -1
- package/domain-schema.schema.json +57 -6
- package/package.json +6 -1
- /package/{vitest.config.ts → vitest.config.mts} +0 -0
|
@@ -8,6 +8,29 @@
|
|
|
8
8
|
# On Windows, use `grok claude` instead — it handles path conversion
|
|
9
9
|
# and Docker socket mapping automatically.
|
|
10
10
|
|
|
11
|
+
# Shared by every jkg_* gateway below. They differ only in image and network alias.
|
|
12
|
+
x-jkg: &jkg
|
|
13
|
+
platform: linux/amd64
|
|
14
|
+
environment:
|
|
15
|
+
GROK_PARAMETERS: |
|
|
16
|
+
{
|
|
17
|
+
"queueSettings": {
|
|
18
|
+
"useQueue": true,
|
|
19
|
+
"amqpHost": "rabbitmq",
|
|
20
|
+
"amqpUser": "guest",
|
|
21
|
+
"amqpPassword": "guest",
|
|
22
|
+
"amqpPort": 5672,
|
|
23
|
+
"pipeHost": "grok_pipe",
|
|
24
|
+
"pipePort": 3000,
|
|
25
|
+
"pipeKey": "test-key",
|
|
26
|
+
"maxConcurrentCalls": 16
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
restart: unless-stopped
|
|
30
|
+
depends_on:
|
|
31
|
+
rabbitmq:
|
|
32
|
+
condition: service_started
|
|
33
|
+
|
|
11
34
|
services:
|
|
12
35
|
postgres:
|
|
13
36
|
image: pgvector/pgvector:pg17
|
|
@@ -118,33 +141,54 @@ services:
|
|
|
118
141
|
restart: unless-stopped
|
|
119
142
|
profiles: ["full"]
|
|
120
143
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
GROK_PARAMETERS: |
|
|
129
|
-
{
|
|
130
|
-
"queueSettings": {
|
|
131
|
-
"useQueue": true,
|
|
132
|
-
"amqpHost": "rabbitmq",
|
|
133
|
-
"amqpUser": "guest",
|
|
134
|
-
"amqpPassword": "guest",
|
|
135
|
-
"amqpPort": 5672,
|
|
136
|
-
"pipeHost": "grok_pipe",
|
|
137
|
-
"pipePort": 3000,
|
|
138
|
-
"pipeKey": "test-key",
|
|
139
|
-
"maxConcurrentCalls": 16
|
|
140
|
-
}
|
|
141
|
-
}
|
|
144
|
+
# Per-language kernel gateways, which replaced the single all-languages
|
|
145
|
+
# datagrok/jupyter_kernel_gateway image. They version with the Scripting package, not with
|
|
146
|
+
# the platform, so they take their own JKG_VERSION. `scripting`/`full` starts Python and R;
|
|
147
|
+
# add `jkg_octave`, `jkg_julia` or `jkg_nodejs` when a package needs those languages.
|
|
148
|
+
jkg_python:
|
|
149
|
+
<<: *jkg
|
|
150
|
+
image: datagrok/jkg_python:${JKG_VERSION:-latest}
|
|
142
151
|
networks:
|
|
143
152
|
dg:
|
|
144
153
|
aliases:
|
|
145
|
-
-
|
|
146
|
-
|
|
147
|
-
|
|
154
|
+
- jkg_python
|
|
155
|
+
profiles: ["scripting", "full", "jkg_python"]
|
|
156
|
+
|
|
157
|
+
jkg_r:
|
|
158
|
+
<<: *jkg
|
|
159
|
+
image: datagrok/jkg_r:${JKG_VERSION:-latest}
|
|
160
|
+
networks:
|
|
161
|
+
dg:
|
|
162
|
+
aliases:
|
|
163
|
+
- jkg_r
|
|
164
|
+
profiles: ["scripting", "full", "jkg_r"]
|
|
165
|
+
|
|
166
|
+
jkg_octave:
|
|
167
|
+
<<: *jkg
|
|
168
|
+
image: datagrok/jkg_octave:${JKG_VERSION:-latest}
|
|
169
|
+
networks:
|
|
170
|
+
dg:
|
|
171
|
+
aliases:
|
|
172
|
+
- jkg_octave
|
|
173
|
+
profiles: ["jkg_octave"]
|
|
174
|
+
|
|
175
|
+
jkg_julia:
|
|
176
|
+
<<: *jkg
|
|
177
|
+
image: datagrok/jkg_julia:${JKG_VERSION:-latest}
|
|
178
|
+
networks:
|
|
179
|
+
dg:
|
|
180
|
+
aliases:
|
|
181
|
+
- jkg_julia
|
|
182
|
+
profiles: ["jkg_julia"]
|
|
183
|
+
|
|
184
|
+
jkg_nodejs:
|
|
185
|
+
<<: *jkg
|
|
186
|
+
image: datagrok/jkg_nodejs:${JKG_VERSION:-latest}
|
|
187
|
+
networks:
|
|
188
|
+
dg:
|
|
189
|
+
aliases:
|
|
190
|
+
- jkg_nodejs
|
|
191
|
+
profiles: ["jkg_nodejs"]
|
|
148
192
|
|
|
149
193
|
world:
|
|
150
194
|
image: datagrok/demo_db_postgres:12-1.1.0
|
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,50 @@
|
|
|
1
1
|
# Datagrok-tools changelog
|
|
2
2
|
|
|
3
|
-
## 6.5.
|
|
3
|
+
## 6.5.8 (2026-09-10)
|
|
4
|
+
|
|
5
|
+
* `grok s` — correctness pass from the CLI audit: every server failure now exits 1 with one line on stderr (a 200 carrying an `ApiError` — missing entity, duplicate login or group name, unknown function — used to print as data with exit 0); `--limit`/`--offset` are honoured for users, groups, connections and functions (their public routes ignore paging, so `list` and the new `count` verb go through the internal routers); `files list` works (the public files route only downloads; listing goes through the connection's file route) and prints `path, kind, size`; `tables list|get|delete` no longer throw, and `tables download|get|delete` accept the bare table name, the full `Project:Table` name or the id; `describe <entity|type>` works (registry record plus the fields of a live sample; it called a nonexistent endpoint before); positional `functions run 'F(1, 2)'` maps the values onto the function's inputs instead of silently sending `{"0": 1}` (which ran the function with nulls); `raw` takes API-relative paths (a leading `/api` is accepted), sends a body from `--json <file>` or `--data '<json>'`, and fails on non-2xx — so it, and `healthcheck`, now work against a bare-Datlas `--host` too; `shares list` accepts a name and shows the grants inherited through project links; `groups` name resolution prefers an exact match (`admin` no longer collides with `Administrators`) and `--user` works on `list-members`/`list-memberships`; `connections delete` of an unknown id fails instead of reporting success; a bad `--host` URL or alias reports the reason without the help dump. `users delete` refuses with a pointer at `users block`: the platform has no user deletion, and removing the entity record leaves the login unusable. `functions delete` covers scripts and queries.
|
|
6
|
+
|
|
7
|
+
* GROK-20298: `grok s domains` — entity-mapped domain schemas and their rows from the CLI, addressed as `<schema>` or `<schema>.<table>`: `list`, `get` (manifest, a table's columns, or one row), `query` (`--filter`, `--columns`, `--sort`, `--expand`, `--limit`, `--offset`), `count`, `aggregate` (`--measures 'count,sum(x) as t' --group-by a`), `insert` / `update` (from `--json` or inline `col=value`, `--version` for optimistic concurrency), `delete` (one row, `--filter` bulk, or a whole user schema with `--force`), `upload` (csv, d42, json; `--upsert`, `--no-all-or-nothing`), `download` (csv to stdout or `-O out.csv|out.d42`), `transaction`, `audit`, `capabilities`, `grants` / `grant` / `revoke` (groups by name), `create`, and `apply` (`--dry-run`, `--confirm-destructive`, `--if-version`). Validation errors print per row; a destructive plan awaiting confirmation is printed with the error.
|
|
8
|
+
* GROK-20298: `grok api` — the `autoNumber` column key (`true`, or `{"scope": "<ref column>", "start": N}`; int columns only, implies `immutable`): the engine assigns the number on insert when the payload leaves it blank and keeps a supplied one, so `<Table>Row` emits the column without `?` while `<Table>Insert` keeps it optional. `domain-schema.schema.json` validates the key.
|
|
9
|
+
* GROK-20298: `grok api` — a domain column may reference any registered table with `"ref": "<Schema>.<table>"` (`Core.queries`, `Core.users`, another plugin's `grit.issue`); the target is resolved at build time — Core tables from the sealed `Core.json` shipped with the CLI, other schemas from a dependency's `databases/<schema>/schema.json` in `node_modules` — and the referrer's `<Table>Expand` entry lists the target's columns with the same types a same-schema ref gets. An unresolvable target fails the run naming the missing package. `domain-schema.schema.json` accepts the qualified form.
|
|
10
|
+
* `grok s pull/push/migrate/diff` + `grok s bundle ls`: move UI-built entities between Datagrok instances through a git-friendly bundle directory — connections (never their secrets), queries, scripts, dashboards and spaces with their tables, views, layouts, files, jobs, notebooks and models, plus the groups, memberships, grants and tags they need. Consecutive pulls merge into one bundle; a push is idempotent (an unchanged bundle writes nothing), merges project relations instead of replacing them, and resolves name clashes per `--on-conflict fail|skip|duplicate|adopt`. `grok s migrate <selection> --from dev --to prod` does both ends in one command, and `--creds creds.yaml` (with `${ENV}` substitution) supplies the target-side connection secrets that never travel in a bundle.
|
|
11
|
+
* `grok s --admin` — asks the server for an admin session for the duration of one command, so a stand-wide pull sees entities the key's own account cannot: other people's team spaces, and personal spaces addressed by the user's project id. The server authorises it (`START_ADMIN_SESSION`) and signs the flag into the token; a dev key mints a fresh session per invocation, so it cannot outlive the command.
|
|
12
|
+
* `grok s` — a session the server rejects mid-run is replaced rather than losing the run: the developer key takes a fresh one and the request is replayed once, restoring admin mode if the run asked for it. A stand serving several isolates can reject a session one of them does not know, which killed a full pull of release after 11 minutes with a bare "Invalid session" and an empty bundle.
|
|
13
|
+
* `grok s pull` — a table whose data file is missing on the source answers 200 with an ApiError body as `text/plain`, which used to be written into the bundle as the table's `.d42` and only fail on the far stand at push time. It is now `warn(no_data)` at pull time, and absent bytes no longer count as an incomplete pull: the entity travels, and a datasync table that was never materialised refreshes on the target.
|
|
14
|
+
* `grok s pull/push` — a project the platform keeps for itself never travels: the namespace an installed package occupies (which collides by name on any target with the same packages) and the wrapper it maintains around a saved entity (which the target accepts and then does not have). On a real 1.27.9 → 1.27.9 push these were 84 name conflicts and 113 failed saves.
|
|
15
|
+
* `grok s pull/migrate` — a request now has a 60s deadline and retries a dropped socket (`GROK_HTTP_TIMEOUT` / `GROK_HTTP_RETRIES`), and an entity the server will not answer for is a `warn(fetch_failed)` row naming the route instead of a `fetch failed` that discards the whole run.
|
|
16
|
+
* `grok s migrate` — refuses to push a bundle whose pull dropped entities, instead of promoting less than was asked for, and byte transfers get their own 10-minute deadline (`GROK_HTTP_BYTES_TIMEOUT`) so a large table is not cut off by the request one.
|
|
17
|
+
* `grok s push/migrate` — an id the bundle points at but does not carry is now resolved against the target: `info(orphan_ref)` when the target holds that id itself, and `warn(dependency_missing)` naming the entity that needs it when neither side has it. A reference left dangling on the source used to plan as a clean `create` and then fail the save with the server's own opaque error.
|
|
18
|
+
* `grok s push/migrate` — `warn(namespace_not_preserved)` when an entity lands outside the namespace it was pulled from, which happens when its owning space is not in the bundle.
|
|
19
|
+
* `grok s migrate --by-namespace` — moves a whole instance one space at a time instead of in a single bundle. Placement is exclusive on the server, so one bundle holding every space has its projects taking entities from each other; scoped to a space that contention stays inside it. Checks the instance-level prerequisites once up front (users and packages the target lacks) and refuses a whole-instance run until they are fixed, keeps going when a space fails, and records what finished so a re-run resumes. Three spaces, 1,946 entities, 4m44s; the same content inside a 15,778-entity bundle did not finish.
|
|
20
|
+
* `grok s migrate --by-namespace` — a full run ends with a sweep for the leaf entities no space owns (a layout under no namespace would otherwise never travel), refuses a name in `--only`/`--skip` that matches no space rather than migrating nothing, needs `--admin` so it cannot enumerate a subset of the instance and call it whole, and leaves the platform's own `System` space alone. A part whose pull dropped entities is not pushed and stays re-runnable; `--dry-run` records nothing.
|
|
21
|
+
* `grok s push` — a share file now answers to `--on-conflict` instead of overwriting whatever the target has, and reports `update` rather than `create` when it replaces one. `skip(dead_on_source)` is no longer applied to a timeout or a dropped connection, which said nothing about the entity. Placement falls back to the project's own relations when `/projects/relations` fails on a project linking domain-table rows, instead of reading it as holding nothing.
|
|
22
|
+
* `grok s push/migrate` — relation placement is idempotent. Containment is exclusive on the server (a non-link relation deletes the entity's other non-link rows), so a project the plan called `identical` was skipped for relation writing while the projects that did write took its entities away, and a stale `isLink` flag carried over from the target was deleted by the real owner and never re-examined. Pushing the same bundle twice used to cut a stand from 273 placed relation rows to 90; three consecutive pushes now leave the same state, and a run repairs what an earlier one stripped.
|
|
23
|
+
* `grok s pull/push` — a reference the source itself can no longer resolve is recorded in the bundle (`warn(source_dangling_refs)`) and whatever depends on it is reported as `skip(dead_on_source)` rather than `failed`, so a stand full of saved views whose tables were deleted no longer fails the run. A reference the source keeps and the target lacks stays a real failure.
|
|
24
|
+
* `grok s pull` — outside references are resolved against the entity as the bundle stores it, not as the server returns it: embedded copies used to look like rows the bundle carried, which both hid dead references and left package entities pointing at ids the target has never seen.
|
|
25
|
+
* `grok s pull` — selection, dependency expansion and reference resolution overlap their requests instead of one round trip at a time; a 90-day slice of a large stand went from tens of minutes to minutes, and a whole-instance pull is now bounded by the server rather than by latency.
|
|
26
|
+
* `grok s pull/push/migrate` — progress on stderr for the long walks, so a stand-sized run is distinguishable from a hang; `--output json` keeps one parseable document.
|
|
27
|
+
* `grok s pull` — a datasync table's share file travels with it, and `--namespace X` selects `X` itself as well as its contents, so what is pulled has somewhere to be placed.
|
|
28
|
+
* `grok s pull` — the default selection now lists root spaces, which only the `--type space` alias asked for before.
|
|
29
|
+
* `grok s pull` — a datasync table backed by a query or script (`Ns:Name(...)`) brings it along, as file-backed ones already did.
|
|
30
|
+
* `grok s pull` — `AllUsers`, `Administrators` and `Developers` stay on the instance that owns them (their ids differ across stands, so pushing one was a name conflict); grants on them still travel by name.
|
|
31
|
+
* `grok s <entity> <verb>` — a usage error under `--output json` no longer prints the help block on stdout (it goes to stderr for the other formats), so the JSON error on stderr is all a caller has to parse.
|
|
32
|
+
* `grok s` — errors are one plain-text line on stderr (the Dart stack only with `--verbose`), and a JSON object only under `--output json`.
|
|
33
|
+
|
|
34
|
+
## 6.5.7 (2026-08-28)
|
|
35
|
+
|
|
36
|
+
* GROK-20789: `grok s packages` — full package lifecycle from the CLI: `install <name>... [--version <v>]` (server pulls released versions from the configured package repository / npm, `latest` by default), `uninstall`, `update <name>... | --all` (preserves `latest` auto-update tracking; pins pinned packages to the concrete registry-latest), `outdated`, `versions`, `set-version`, and `share`. Multi-package install/update runs sequentially with a per-package status table; a nonexistent package or version is a per-package `error` and exit code 1. Also fixed the generic `packages delete`, which was hitting a nonexistent `/public/v1` endpoint.
|
|
37
|
+
* `grok s` — handler errors now print a clean `{"error": ...}` and exit 1 instead of a raw stack trace with exit 255 (handler dispatch was not awaited, so rejections escaped the error boundary).
|
|
38
|
+
* `--version` values are no longer numerically coerced (`--version 1.10` used to arrive as `1.1`; affected `grok claude` too).
|
|
39
|
+
* `grok test` — a Playwright pass that fails before running specs now reports a failing test instead of nothing. It returned an empty CSV, and the caller drops an empty Playwright result whenever the Puppeteer pass produced rows, so a suite whose config would not load (or that collected zero specs) was indistinguishable from a clean run — Build-Deploy #1277 printed "Playwright: no JSON report produced" and then "Tests passed", exit 0, for six packages. Every early exit now writes one failing row to `test-report-playwright.csv` and the merged report, and a report containing no specs is treated as a failure rather than a pass.
|
|
40
|
+
|
|
41
|
+
## 6.5.6 (2026-08-20)
|
|
4
42
|
|
|
5
43
|
* `grok report` (`ticket`, `comment`, `label`, `attach`) — support Atlassian **service-account** tokens alongside user API tokens, chosen by the token itself. A user token (`ATATT...`) keeps HTTP Basic with `JIRA_USER` + `JIRA_TOKEN` against the site. A service-account token (`ATSTT...`, minted at admin.atlassian.com) is a scoped token that the site host will not accept — Basic returns 401 and Bearer returns 403 `"Failed to parse Connect Session Auth Token"` — so it is sent as Bearer to the API gateway at `api.atlassian.com/ex/jira/<cloudId>`, with the cloud id read once from the site's public `/_edge/tenant_info` (override with `$JIRA_CLOUD_ID`). `$JIRA_URL` and `--jira-url` still mean the SITE; the gateway address is derived from it, never substituted for it. A service token needs no `JIRA_USER`, so the credential checks no longer demand one.
|
|
6
44
|
|
|
7
|
-
## 6.5.5 (
|
|
45
|
+
## 6.5.5 (2026-08-12)
|
|
8
46
|
|
|
47
|
+
* `grok test` — added a Node (browserless) pass: tests annotated `{node: true}` run headless under the js-api Node runtime before the browser launches; the browser pass excludes them and is skipped entirely when nothing browser-only matches. New flags: `--skip-node`, `--node-only`. Packages opt in by exporting `testNode()` from `package-test.ts`; others keep the previous behavior.
|
|
9
48
|
* GROK-20298: `grok api --ui` — a relation-bearing table's `<Table>Ui` handle carries `<Table>Update` as its fifth generic too (`<Table>Ui.client`, `.table()` and the `<Schema>UiDb` property), so `<table>Ui.client.update(id, {labels: [...]})` compiles instead of failing the excess-property check.
|
|
10
49
|
* GROK-20298: `grok api` — typed many-to-many relations: a table's `relations` block is validated with the server's rules (via/target declared in the same manifest, junction distinct from both sides, self-referential relations explicit, FK sides unique-or-explicit, junction `businessKey` covering both) and emitted as an expand-map entry `'<name>': {<name>?: {id: string; name: string}[]}`, a `<name>?: string[]` link set on `<Table>Insert`, and a new `<Table>Update` type (`Partial<<Table>Row>` plus the link sets) used by the transaction op union and passed as the client's fifth generic, so `update()` takes the link sets directly. Manifests without relations generate byte-identically.
|
|
11
50
|
* GROK-20298: `grok api --ui` — also emits the typed SCHEMA handle: `export function <schema>UiDb(): Promise<<Schema>UiDb>` (a typed `domains.db(...)`), and the `<Schema>UiDb` interface types each table property (`const db = await gritUiDb(); db.issues.form({values: {...}})` is compile-checked).
|
|
@@ -32,10 +71,6 @@
|
|
|
32
71
|
|
|
33
72
|
* `grok test` — the Node-pass report now merges into the browser report by column name. The line-wise merge assumed identical column order, so node rows landed misaligned (string values in the integer `ms` column) and the CI test-report upload failed with `invalid input syntax for type integer`.
|
|
34
73
|
|
|
35
|
-
## 6.5.5 (WIP)
|
|
36
|
-
|
|
37
|
-
* `grok test` — added a Node (browserless) pass: tests annotated `{node: true}` run headless under the js-api Node runtime before the browser launches; the browser pass excludes them and is skipped entirely when nothing browser-only matches. New flags: `--skip-node`, `--node-only`. Packages opt in by exporting `testNode()` from `package-test.ts`; others keep the previous behavior.
|
|
38
|
-
|
|
39
74
|
## 6.4.8 (2026-07-22)
|
|
40
75
|
|
|
41
76
|
* GROK-20452: `grok publish` — always `docker build` the tools-generated worker dirs (`dockerfiles/queue`, `dockerfiles/celery`, `dockerfiles/<app>-celery`) instead of reusing a cached local tag. The "found local image" shortcut froze the worker at whatever stock base the daemon had when the tag was first built (CI ran day-old worker code with a fresh base available); the layer cache keeps an unchanged rebuild near-instant.
|
package/CLAUDE.md
CHANGED
|
@@ -234,15 +234,17 @@ grok s groups save --json group.json --save-relations
|
|
|
234
234
|
|
|
235
235
|
# Share entities
|
|
236
236
|
grok s shares add "JohnDoe:MyConnection" Chemists,Admins --access Edit
|
|
237
|
-
grok s shares list
|
|
237
|
+
grok s shares list "JohnDoe:MyConnection" # by name or UUID; includes inherited grants
|
|
238
238
|
|
|
239
|
-
# List / inspect entities
|
|
239
|
+
# List / count / inspect entities (--limit / --offset page, --filter is a smart filter)
|
|
240
240
|
grok s users list
|
|
241
|
+
grok s users count --filter 'status = "active"'
|
|
241
242
|
grok s packages list --filter "MyPlugin" # check if a plugin is published
|
|
242
243
|
grok s connections list --output json
|
|
243
244
|
grok s functions list --filter "Chem" # find registered functions
|
|
244
|
-
grok s connections get <id>
|
|
245
|
-
grok s connections delete <id>
|
|
245
|
+
grok s connections get <id-or-name>
|
|
246
|
+
grok s connections delete <id-or-name>
|
|
247
|
+
# users cannot be deleted (no server API) — `grok s users block <login>` instead
|
|
246
248
|
grok s connections save --json conn.json --save-credentials # create or update
|
|
247
249
|
grok s connections test "JohnDoe:MyConnection" # test by id or name
|
|
248
250
|
grok s connections test --json conn.json # test a connection defined in JSON
|
|
@@ -251,6 +253,16 @@ grok s connections test --json conn.json # test a connectio
|
|
|
251
253
|
grok s functions run 'Chem:smilesToMw("ccc")'
|
|
252
254
|
grok s functions run 'Pkg:fn({a:5,b:22})'
|
|
253
255
|
|
|
256
|
+
# Manage packages (server pulls released versions from the package repository / npm)
|
|
257
|
+
grok s packages install Chem Bio PowerGrid # install latest of each
|
|
258
|
+
grok s packages install Chem --version 1.14.0 # pin a version
|
|
259
|
+
grok s packages outdated # installed vs registry-latest
|
|
260
|
+
grok s packages update --all # upgrade everything outdated
|
|
261
|
+
grok s packages versions Chem # published versions + current/latest flags
|
|
262
|
+
grok s packages set-version Chem 1.13.0 # activate a specific version
|
|
263
|
+
grok s packages uninstall Chem # repo entry stays installable
|
|
264
|
+
grok s packages share Chem Chemists --access View
|
|
265
|
+
|
|
254
266
|
# Browse file storage
|
|
255
267
|
grok s files list "System:AppData" -r # list files recursively
|
|
256
268
|
grok s files list "System:AppData/MyPlugin"
|
|
@@ -265,11 +277,21 @@ grok s groups list-members Admins --admin # admin members only
|
|
|
265
277
|
grok s groups list-members Admins --no-admin # non-admin members only
|
|
266
278
|
grok s groups list-memberships alice # groups alice belongs to
|
|
267
279
|
|
|
268
|
-
#
|
|
269
|
-
grok s
|
|
270
|
-
grok s
|
|
271
|
-
|
|
272
|
-
|
|
280
|
+
# Domain schemas and their rows (entity-mapped domain tables)
|
|
281
|
+
grok s domains list # registered schemas; `list grit` lists its tables
|
|
282
|
+
grok s domains get grit.issue # a table's columns (`get grit` = manifest, `get grit.issue <id>` = one row)
|
|
283
|
+
grok s domains query grit.issue --filter 'status = "open"' --sort '!created_on' --limit 20
|
|
284
|
+
grok s domains insert grit.issue title="Crash" status=open
|
|
285
|
+
grok s domains upload grit.issue ./issues.csv --upsert
|
|
286
|
+
grok s domains grant grit.issue Chemists --access Edit
|
|
287
|
+
grok s domains apply myschema --json schema.json --dry-run # user-managed schema DDL
|
|
288
|
+
|
|
289
|
+
# Hit any API endpoint directly (API-relative path; a leading /api is accepted; exit 1 on failure)
|
|
290
|
+
grok s raw GET /users/current
|
|
291
|
+
grok s raw GET /packages/dev/MyPlugin
|
|
292
|
+
grok s raw POST /public/v1/functions/Sin/call --data '{"x": 1}'
|
|
293
|
+
|
|
294
|
+
# Fields of an entity type (registry record + a live sample)
|
|
273
295
|
grok s describe connections
|
|
274
296
|
|
|
275
297
|
# Target a specific server
|
|
@@ -282,7 +304,10 @@ grok s users list --output quiet | xargs ... # pipe IDs
|
|
|
282
304
|
```
|
|
283
305
|
|
|
284
306
|
**Windows Git Bash:** prefix raw paths with `MSYS_NO_PATHCONV=1` to prevent POSIX→Windows
|
|
285
|
-
path conversion: `MSYS_NO_PATHCONV=1 grok s raw GET /
|
|
307
|
+
path conversion: `MSYS_NO_PATHCONV=1 grok s raw GET /users/current`
|
|
308
|
+
|
|
309
|
+
**Tests:** `npm run test:server` (unit, mocked client) and `HOST=<alias> npm run test:integration`
|
|
310
|
+
(a live server; read-only apart from a `files.put` round trip).
|
|
286
311
|
|
|
287
312
|
**Implementation:** `bin/commands/server.ts`, `bin/utils/node-dapi.ts` (Node.js REST client),
|
|
288
313
|
`bin/utils/server-output.ts` (formatters). The Node.js dapi bypasses the Dart interop layer
|