@lotics/cli 0.264.0 → 0.267.0

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/AGENTS.md CHANGED
@@ -9,7 +9,7 @@ conventions are, and where the traps are.
9
9
  | `lotics tools` · `lotics tools <name>` | The agent tool registry and one tool's full JSON Schema. |
10
10
  | `lotics docs` · `lotics docs <area>[/<section>]` | This CLI's references, carried inside it so each describes the binary answering. Capped at a page: a doc that does not fit hands back its opening and the addresses into it, so the next call is smaller than the last. A custom-code app's SDK reference is `node_modules/@lotics/app-sdk/AGENTS.md` inside the app. |
11
11
  | `lotics docs model` · `lotics docs model/<section>` | How to write a `model.json` — the file a workspace is built from: its tables, how a row of each is recognised (`records`), and the apps stated over them. Every top-level key, every field type with the config it needs, the row format, the rules, and a worked example; complete example models of several trades are listed at `https://lotics.ai/presets/index.json`. `lotics model apply` checks the file (every problem in one run), applies its tables and mints a version of each app; the WORKSPACE remembers what each alias became, so every later apply binds by id and a relabel on either side is a rename it reports rather than a second table it adds. `lotics model pull` goes the other way — the workspace's model, rebuilt from what owns each part. |
12
- | [docs/building_an_app.md](./docs/building_an_app.md) | The SEQUENCE — clarify, model, apply or build, prove, look — for an app stated in a model and for a custom-code app. Read it once before starting an app. |
12
+ | [docs/building_an_app.md](./docs/building_an_app.md) | The SEQUENCE — clarify, model, apply or build, prove, look — for an app stated in a model and for a custom-code app. Read it once before starting an app. Looking is `lotics run screenshot_app`, then `lotics download` for each PNG. |
13
13
  | [docs/cli_reference.md](./docs/cli_reference.md) | Per-command contracts, flags, exit codes, and gotchas — the detail `--help` compresses. |
14
14
  | [docs/data_model.md](./docs/data_model.md) | How tables RELATE — one entity per table and the NAME-OVERLAP probe that says when a split has broken, one vocabulary wherever values are copied between tables, a copy boundary that accounts for every source field, provenance as a link rather than a flag, a declared natural key so find-or-create never compares rendered text, and why derived DEPTH costs more than row count. Separate from building_an_app because every workspace starts with tables and many never get an app. The within-table half (one fact, one column) is stated at `create_table` / `update_table`, where you meet it while deciding. |
15
15
  | [docs/document_templates.md](./docs/document_templates.md) | Generating PDF/Excel/Word/email from reusable templates. |
@@ -31,10 +31,9 @@ Several capabilities exist **only** as commands and appear nowhere in `lotics to
31
31
  file is the one most often mistaken for missing. Concluding "the platform can't do X" from the tool
32
32
  list alone is a mistake; check both.
33
33
 
34
- ⚠️ **`lotics <subcommand> --help` prints the generic top-level help**, except `lotics report --help`
35
- and a bare `lotics auth`, which print their own. It does not describe the subcommand, so an unhelpful
36
- response there is *not* evidence the subcommand is absent. To find out whether something exists, read
37
- `lotics --help` § COMMANDS — the whole section, not a narrow grep.
34
+ **`lotics <verb> --help` prints that verb's entries from § COMMANDS** (`lotics model --help`,
35
+ `lotics file download --help`); `lotics report --help` prints the report frame. To find out whether
36
+ something exists, read `lotics --help` § COMMANDS — the whole section, not a narrow grep.
38
37
 
39
38
  ## Conventions that hold across every command
40
39
 
@@ -65,10 +64,11 @@ response there is *not* evidence the subcommand is absent. To find out whether s
65
64
  profile to remove at all. Nothing is ever revoked on a guess — between two, the destructive one is
66
65
  wrong. `lotics auth whoami` prints the kind, asking the server when the store cannot say.
67
66
  - **A key created in Settings never administers the organization, whatever its access.** The verbs
68
- `docs/cli_reference.md` marks *admin only* split in two under a key: the ones that BUILD inside a workspace
69
- the key reaches — `model apply`, `model pull`, `workspace doctor` — run as before, while managing people, sharing or ownership, creating or
70
- deleting a workspace, changing workspace settings, setting credit limits, reading the access log
71
- and publishing an app's API answer `403` and name the remedy: an admin signed in, so
67
+ `docs/cli_reference.md` marks *admin only* split in two under a key: `workspace doctor`, which only
68
+ reads inside a workspace the key reaches, runs as before, while applying or pulling a model
69
+ (`model apply`, `model pull`, `setup`), managing people, sharing or
70
+ ownership, creating or deleting a workspace, changing workspace settings, setting credit limits,
71
+ reading the access log and publishing an app's API answer `403` and name the remedy: an admin signed in, so
72
72
  `lotics auth login <email>` and run it again. A sign-in acts as that person and is refused none of
73
73
  them. Do not retry a `403` with the same credential and do not ask for a wider key — no answer on
74
74
  the key's own screen grants this.
@@ -80,7 +80,7 @@ response there is *not* evidence the subcommand is absent. To find out whether s
80
80
  the generic "Invalid or disabled API key", and that one is generic on purpose, so re-sending it
81
81
  teaches nothing. A `reason` rides on the body for a script to branch on, since the code stays
82
82
  `unauthorized` for every 401.
83
- - **Large payloads bypass `ARG_MAX`** — `lotics run <tool> @args.json` or piped stdin. A leading `@` is
83
+ - **Large payloads bypass `ARG_MAX`** — `lotics run <tool> @args.json`, or piped stdin behind `-`. A leading `@` is
84
84
  unambiguously a file path (JSON args start with `{`).
85
85
  - **stdout is the payload, stderr is the narration.** Progress, status lines, and the target echo go to
86
86
  stderr; the result goes to stdout, so piping stays clean. `--json` switches stdout from the
package/README.md CHANGED
@@ -69,8 +69,8 @@ lotics model apply model.json # an account you already have: the tables,
69
69
  ```
70
70
 
71
71
  `model apply` checks the whole file first — every problem at once — then adopts or creates each
72
- table (an existing table of the same label is adopted and given what it lacks; no stored value
73
- changes), writes the first rows only where every bound table is empty, and mints a new version of
72
+ table (the table this workspace bound it to, else one of the same label, is adopted and given
73
+ what it lacks; no stored value changes), writes the first rows only where every bound table is empty, and mints a new version of
74
74
  each app the model declares. Change the file and apply it again; `--app <alias>` applies only the
75
75
  apps named. Rolling an app back (`lotics run rollback_app`) restores its earlier version — table
76
76
  changes and data writes stay.
@@ -176,6 +176,8 @@ Every command that resolves a workspace names its target before it acts — `lot
176
176
 
177
177
  **`LOTICS_ORG` is resolved once, before any command runs.** A value matching no saved credential refuses every verb with one sentence — a read, a write, and a check that needs no credential alike — and the refusal lists the orgs this machine does hold, so it is answerable without another command. It refuses even when a key arrives another way: a variable that scopes the command must not go unread while `LOTICS_API_KEY` sends the write somewhere else. When the variable resolves AND a key is supplied, the key decides the org and the command says so. An org keeps the name it was saved under: a server-side rename never moves it, the new name resolves as well, and `lotics org` prints both when they differ.
178
178
 
179
+ In a custom-code app's directory, `lotics app deploy` derives the credential from the directory when nothing explicit chose one: the manifest names the app's workspace, and when exactly one saved profile owns that workspace, that profile is used — the machine-wide default is never consulted. An explicit flag, env var, or directory pin still wins, and an org whose profile remembers a different workspace simply falls through to the announced default.
180
+
179
181
  ### Diagnostics
180
182
 
181
183
  Every request identifies the CLI (`user-agent: lotics-cli/<version> node/<v> <platform>`) and names the command that made it (`x-lotics-cli-command: model.apply`), so a failure in the server's logs can be traced to the verb and version that produced it. Neither header carries arguments: the command chain stops before any id, path, `@file`, or JSON payload.
@@ -226,8 +228,6 @@ needs an opt-in for), posts immediately, and tells you if it did not land.
226
228
 
227
229
  Do not paste records, file contents, or credentials.
228
230
 
229
- In a custom-code app's directory, `lotics app deploy` derives the credential from the directory when nothing explicit chose one: the manifest names the app's workspace, and when exactly one saved profile owns that workspace, that profile is used — the machine-wide default is never consulted. An explicit flag, env var, or directory pin still wins, and an org whose profile remembers a different workspace simply falls through to the announced default.
230
-
231
231
  ## Workspaces
232
232
 
233
233
  Workspaces live inside the active org. If the org has more than one, select before running tools: