@lotics/cli 0.191.0 → 0.192.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
@@ -7,7 +7,7 @@ conventions are, and where the traps are.
7
7
  |---|---|
8
8
  | `lotics --help` | The verb inventory (§ COMMANDS) and global flags. The verb LIST is generated and never stale; the prose beside each verb is hand-written, so where it disagrees with `docs/cli_reference.md`, the reference wins. |
9
9
  | `lotics tools` · `lotics tools <name>` | The agent tool registry and one tool's full JSON Schema. |
10
- | `lotics docs` · `lotics docs <area>` | Every reference the packages installed beside the project actually ship — `@lotics/app-sdk`, `@lotics/ui` and the document engines each carry their own, and this index only covers THIS package. Discovered by looking, not by a list, so it reports the installed VERSION of each: a doc always describes the code that is really there. |
10
+ | `lotics docs` · `lotics docs <area>[/<section>]` | Every reference the packages installed beside the project actually ship — `@lotics/app-sdk`, `@lotics/ui` and the document engines each carry their own, and this index only covers THIS package. Discovered by looking, not by a list, so it reports the installed VERSION of each: a doc always describes the code that is really there. 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. |
11
11
  | `lotics scaffold docs` | How to write a `model.json` — the file a workspace is built from. Two forms: `{"from": "<preset-slug>", "variants", "rename", "entities", "rows", "apply"}`, which names a preset by slug and carries only what this business differs by, and the full one, spelled out, for when no preset is the trade: every top-level key, every field type with the config it needs, the row format, the rules, and a worked example. Offline, and not part of `lotics docs`. It also covers the `apply` list — published packages copied in after the model's own tables, each with an optional `bind` onto them — and the `preset` block a published model carries. `lotics scaffold check` then proves the file — offline, except for the one read a `from` file's preset needs — including every branch of a preset merged onto its base; `lotics setup` applies it and refuses a table name the workspace already has, `lotics scaffold apply` adopts that table and adds what is missing. `lotics scaffold export` goes the other way — a workspace printed as one of these files, to edit into another business's model; a starting point, never a source of truth. |
12
12
  | [docs/building_an_app.md](./docs/building_an_app.md) | The SEQUENCE — scaffold, model, types, queries, workflows, screens, ship — and the deploy-free inner loop. The other references describe contracts; this one is the order they go in and why. Read it once before starting an app. |
13
13
  | [docs/cli_reference.md](./docs/cli_reference.md) | Per-command contracts, flags, exit codes, and gotchas — the detail `--help` compresses. Read it before hand-building a `set_app_*` payload: several tools REPLACE rather than patch, and a CLI verb already owns the safe assembly. |
package/README.md CHANGED
@@ -15,6 +15,8 @@ Lotics is an AI-powered operations platform. Through this CLI you can:
15
15
  **`lotics docs`** lists every reference the packages installed beside your project ship — each
16
16
  `@lotics/*` package carries its own, so a doc always describes the version you actually have.
17
17
  `lotics docs <area>` prints one (`lotics docs ai`); `lotics docs ui` prints a package's index.
18
+ Every answer is capped at a page, so a long doc hands back its section list and
19
+ `lotics docs <area>/<section>` — or, for a doc that is one table, `lotics docs ui/catalog/Button`.
18
20
  Nothing is copied here — the packages, the areas, the titles and the versions are all read at run
19
21
  time, so a doc or a whole package added upstream shows up without upgrading this CLI.
20
22
 
@@ -252,16 +252,37 @@ var __loticsProbe = (() => {
252
252
  }
253
253
  function scanRowMarks() {
254
254
  const marks = [];
255
- for (const el of Array.from(document.querySelectorAll("div"))) {
255
+ const seen = [];
256
+ const record = (el, text) => {
257
+ if (seen.some((other) => other.contains(el) || el.contains(other))) return;
258
+ seen.push(el);
259
+ const r = el.getBoundingClientRect();
260
+ marks.push({ text, w: Math.round(r.width), y: Math.round(r.y), x: Math.round(r.x) });
261
+ };
262
+ const inContent = (el) => el.closest('[role="banner"]') === null;
263
+ for (const el of Array.from(document.querySelectorAll('[data-mark="identity"]'))) {
264
+ const r = el.getBoundingClientRect();
265
+ if (r.height === 0 || !inContent(el)) continue;
266
+ record(el, (el.textContent || "").trim() || "\u25A3");
267
+ }
268
+ const initials = /^\p{L}{1,2}$/u;
269
+ const grounded = (el, depth = 2) => {
256
270
  const cs = getComputedStyle(el);
271
+ if (cs.backgroundColor !== "rgba(0, 0, 0, 0)" || cs.backgroundImage !== "none") return true;
272
+ if (depth === 0) return false;
273
+ return Array.from(el.children).some((child) => grounded(child, depth - 1));
274
+ };
275
+ for (const el of Array.from(document.querySelectorAll("*"))) {
257
276
  const r = el.getBoundingClientRect();
258
277
  if (r.width < 12 || r.width > 56) continue;
259
278
  if (Math.abs(r.width - r.height) > 1) continue;
279
+ const cs = getComputedStyle(el);
260
280
  if ((parseFloat(cs.borderTopLeftRadius) || 0) < 3) continue;
261
- if (cs.backgroundColor === "rgba(0, 0, 0, 0)") continue;
262
281
  const text = (el.textContent || "").trim();
263
- if (text.length === 0 || text.length > 2) continue;
264
- marks.push({ text, w: Math.round(r.width), y: Math.round(r.y), x: Math.round(r.x) });
282
+ if (!initials.test(text)) continue;
283
+ if (!inContent(el)) continue;
284
+ if (!grounded(el)) continue;
285
+ record(el, text);
265
286
  }
266
287
  const byRow = /* @__PURE__ */ new Map();
267
288
  for (const m of marks) {