@lotics/cli 0.321.29 → 0.321.31
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/src/cli.js +4 -4
- package/docs/cli_reference.md +1 -1
- package/docs/data_model.md +4 -0
- package/docs/workflows.md +4 -0
- package/package.json +1 -1
package/docs/cli_reference.md
CHANGED
|
@@ -13,7 +13,7 @@ Per-command syntax, flags, contracts, and gotchas for the public `lotics` CLI. S
|
|
|
13
13
|
| `lotics auth web` | Send a magic link email to access the web app (requires auth) |
|
|
14
14
|
| `lotics auth whoami` | Print active account name, email, org, resolved workspace, the instance the credential belongs to, which **kind** of credential this machine holds (a sign-in from `auth login`, or an API key — read from the saved profile, and from the server when the profile does not say, which covers `--api-key`/`LOTICS_API_KEY` and a profile saved before the field existed; unknown only when neither can say), and the resolution **source** (flag/env/local/app-manifest/global). `--json` adds `workspace_id`, `api_url`, `credential_kind` + `source`. |
|
|
15
15
|
| `lotics auth logout [<name\|id>]` | In a pinned dir: delete the local pin. Else: remove the profile (default the active org), `--all` for every one. What happens server-side depends on which KIND of credential it is. A **sign-in** (`auth login` / `auth signup`) is revoked — logging that terminal out ends its credential rather than leaving a live one behind; a server that cannot be reached, or a credential already dead, never blocks the local forget, and one line names the org and Settings → Security → *Keys and terminals*. An **API key** (`auth api-key`) is only forgotten here — an admin issued it and it is routinely on a server and on other machines, so one terminal signing out must not kill it for everyone; the line says it is still active and names both pages, because Settings → API keys is admin-only and the credential may well be the holder's own sign-in, which they revoke themselves at Settings → Security → *Keys and terminals*. A profile saved before the kind was recorded states nothing, so the SERVER is asked (`auth whoami`) and it is revoked only if the answer is a sign-in: an older server, a credential minted before the column, and a request that fails all leave it alone. |
|
|
16
|
-
| — | **A refused credential says which way it is dead, and names the remedy that ends its kind.** `This credential expired.` / `was revoked.` / `belongs to a member who is no longer active in this organization.`
|
|
16
|
+
| — | **A refused credential says which way it is dead, and names the remedy that ends its kind.** `This credential expired.` / `was revoked.` / `belongs to a member who is no longer active in this organization.` carries `Run \`lotics auth login <email>\` to sign in again.` for a sign-in and `Ask an admin for a new API key (Settings → API keys).` for an issued key. A credential minted before that was recorded still gets BOTH in one sentence, because nothing on the row tells them apart — so a headless box is never sent looking for a browser alone. A key the server does not recognize at all gets one flat `Invalid or disabled API key.` — deliberately, so a guessed key learns nothing, not even that it named a row. The body carries `reason` for a script to branch on, since the code stays `unauthorized` for every 401. Changing or resetting the account's password revokes its sign-ins, never an issued key. |
|
|
17
17
|
| `lotics org` | List saved orgs (profiles) from the global store with the instance each belongs to, marks active for this directory (a local pin wins over the global default). |
|
|
18
18
|
| `LOTICS_ORG=<name\|id>` | Scope every command in this shell to one saved org. **Resolved once, before any command dispatches**, so a value matching no saved credential refuses every verb with one sentence — a read, a write, and a local check that needs no credential alike — and refuses it before the first byte is written. It refuses even when a credential arrives another way, because `--api-key` / `LOTICS_API_KEY` outrank it in the precedence chain and a write must never fall through to whatever THOSE name while the variable says otherwise; when the variable resolves and a key is also given, the key decides and the command says so. The refusal lists the orgs this machine holds, so it is answerable without another command (`lotics org` is refused by the same rule). A name is whatever the credential was SAVED under — a server-side rename never moves it, and the new name resolves too, so both keep working and `lotics org` prints the pair. |
|
|
19
19
|
| `lotics org use <name\|id> [--local]` | Switch the active org by org name (case-insensitive, ambiguous → error) or id. No flag → global `active_org`; `--local` → a `.lotics/config.json` pointer in the current dir. |
|
package/docs/data_model.md
CHANGED
|
@@ -31,6 +31,10 @@ it runs.
|
|
|
31
31
|
- **A stored field becomes required only once every row holds a value**, so it always holds one: state its `default`,
|
|
32
32
|
which the same write fills into every row holding it empty (a draft takes it when submitted), or fill the empty cells
|
|
33
33
|
first; without either, the write is refused while a row holds it empty. A computed field's flag is checked as each row is written.
|
|
34
|
+
Making a field required rebuilds the JSON apps that create its rows, so their creates set it; a workflow its author
|
|
35
|
+
wrote, or a custom-code app's, that creates rows of the table without it refuses the change, naming each — a `default`
|
|
36
|
+
lifts that, as does setting the field in each create; an autonumber, a derived date and a computed field fill
|
|
37
|
+
themselves, and a copied field (`default_from`) fills only when the row sets its link.
|
|
34
38
|
|
|
35
39
|
## One entity, one table — and the test is measurable
|
|
36
40
|
|
package/docs/workflows.md
CHANGED
|
@@ -384,6 +384,10 @@ In `update_records`' `set`, `create_records`' `records` and the workflow step `s
|
|
|
384
384
|
So passing a read that may be null (`record["x"]`) keeps a value when there is one and clears the
|
|
385
385
|
field when there is none. Use `coalesce(x, fallback)` only for a real fallback value.
|
|
386
386
|
|
|
387
|
+
A body is refused at save when a `create_records` whose table and rows are written out leaves a required field of that
|
|
388
|
+
table unset in a row. The platform fills a `default`, an autonumber, a derived date and a computed field; a copied field
|
|
389
|
+
(`default_from`) fills only when the row sets its link.
|
|
390
|
+
|
|
387
391
|
## Examples
|
|
388
392
|
|
|
389
393
|
Compare a link by id. Display text is not unique, and a link reads as a list of ids — `==` against a
|