@lotics/cli 0.205.1 → 0.206.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
@@ -14,6 +14,7 @@ conventions are, and where the traps are.
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. |
16
16
  | [docs/knowledge_docs.md](./docs/knowledge_docs.md) | Authoring the workspace facts an agent can't guess; access-vs-activation; catalog-then-stage retrieval. |
17
+ | [docs/migration.md](./docs/migration.md) | What to DO when a release changes the shape of a project this CLI owns. Read once, when something already on disk no longer matches what the CLI writes — currently: an app built from a plan is `app.json` rendered by `@lotics/app-runtime`, not a tree of TSX. |
17
18
  | [README.md](./README.md) | Install, auth, and worked examples. |
18
19
 
19
20
  ## Two surfaces, and the trap between them
@@ -95,12 +96,15 @@ response there is *not* evidence the subcommand is absent. To find out whether s
95
96
  findings. An unrecognized status exits 0 — the list is an allowlist of failure, so a status added
96
97
  later never turns a working script red — and a parked run (`awaiting_input`) is not a failure.
97
98
  - **An app that PUBLISHES an API turns every later manifest write into a release.** `lotics app api
98
- publish` snapshots what the app's queries and workflows promise to callers outside it — a
99
+ publish` snapshots what the app's queries, workflows and agents promise to callers outside it — a
99
100
  customer's own site or server, which nobody here can redeploy. From then on an additive change
100
101
  re-snapshots silently and a breaking one is REFUSED, naming each change;
101
- `--acknowledge-breaking-api` (on `app deploy`, `app query set`, `app workflow set`, `app upgrade`)
102
- is the answer that carries it out and snapshots the break as a new contract version. An app that
103
- publishes nothing is untouched by any of it.
102
+ `--acknowledge-breaking-api` (on `app deploy`, `app query set`, `app workflow set`,
103
+ `app agent set`, `app upgrade`) is the answer that carries it out and snapshots the break as a new
104
+ contract version. An app that publishes nothing is untouched by any of it.
105
+ - **Exposure is per app, all or nothing** — a public share or a key reaches every alias an app
106
+ declares, so what outsiders may call is a second app over the same tables, scaffolded with
107
+ `lotics app create "<name>" --api` ([docs/building_an_app.md](./docs/building_an_app.md) § 9).
104
108
  - **`--print-created` / `--cleanup` on any call that reports `side_effects`.** The first prints the
105
109
  records created plus a paste-ready cleanup plan and what cannot be auto-undone; the second runs
106
110
  those deletes (records only — never files, integrations or notifications). Neither is a rollback.
package/README.md CHANGED
@@ -34,6 +34,8 @@ package (reachable at `node_modules/@lotics/cli/docs/*.md` once installed):
34
34
  - [`docs/document_templates.md`](docs/document_templates.md) — generate finished documents
35
35
  (PDF, Excel, Word, email) by filling reusable templates: the five template types, the
36
36
  create → generate → chain lifecycle, and the marker capabilities.
37
+ - [`docs/migration.md`](docs/migration.md) — what to do when a release changes the shape of a
38
+ project this CLI owns; read once, when something on disk no longer matches what the CLI writes.
37
39
  - [`docs/knowledge_docs.md`](docs/knowledge_docs.md) — the AI's rulebook layer: authoring the
38
40
  workspace facts an agent can't guess, the access-vs-activation model, and the
39
41
  catalog-then-stage retrieval model agents use to pull only the lines they need.
@@ -90,6 +92,10 @@ lotics setup model.json --email you@company.com
90
92
  It creates no apps of its own: build one in the workspace afterwards
91
93
  (`lotics docs building_an_app`), or name a published package in the file's `apply` list and it is
92
94
  copied in — bound onto the tables the model just made — as part of the same run.
95
+ For a model that declares apps, `lotics workspace build model.json` is the whole path in one
96
+ command — check, apply where the workspace differs, then create or regenerate each app beside the
97
+ model file and check it, deploying each under `--deploy`. An app that conflicts or checks red is
98
+ named and the rest still run; `--dry-run` writes nothing anywhere.
93
99
  `setup` refuses a table name your workspace already has; `lotics scaffold apply model.json` is the
94
100
  additive verb — it adopts that table, adds what the model declares beyond it, and deletes nothing.
95
101
  Because it never renames, the file and the workspace drift: `lotics scaffold diff model.json`
@@ -341,6 +347,8 @@ lotics knowledge rm kdc_... # archive
341
347
  ```bash
342
348
  # Scaffold / pull / deploy a Vite+React+TS app project
343
349
  lotics app create "Sales Desk" # scaffold + deploy v1
350
+ lotics app create "Orders API" --api # no screens: its declarations are the whole surface,
351
+ # so nothing is built and nothing is deployed
344
352
  lotics app pull app_... # bootstrap an existing app locally (incl. .lotics/*)
345
353
  lotics app deploy -m "Add quote drawer" # typecheck + build + upload a new version
346
354
  lotics app versions # deploy history: version, when, who, -m message (* = live)
@@ -353,13 +361,14 @@ lotics app versions app_... # ...for any app, without pulling it
353
361
  lotics app upgrade # the app this directory's manifest names
354
362
  lotics app upgrade app_... # ...for any app, without pulling it first
355
363
 
356
- # The app's API: what its declared queries and workflows promise to a caller
357
- # OUTSIDE the app — a customer's own site or server. Publishing snapshots that
358
- # promise as a numbered contract; from then on a manifest write that would break
359
- # it is refused and every breaking change is named, unless the write carries
364
+ # The app's API: what its declared queries, workflows and agents promise to a
365
+ # caller OUTSIDE the app — a customer's own site or server. Publishing snapshots
366
+ # that promise as a numbered contract; from then on a manifest write that would
367
+ # break it is refused and every breaking change is named, unless the write carries
360
368
  # --acknowledge-breaking-api (app deploy / app query set / app workflow set /
361
- # app upgrade). A query that does not name the columns it returns is refused at
362
- # publish: those field names are the table's, not the app's to promise.
369
+ # app agent set / app upgrade). A query that does not name the columns it returns
370
+ # is refused at publish: those field names are the table's, not the app's to
371
+ # promise.
363
372
  lotics app api publish # snapshot the contract; prints the version + warnings
364
373
  lotics app api status # is one published, and which version callers hold
365
374
  lotics app api spec -o api.openapi.json # the OpenAPI 3.1 document, for the consumer's generator
@@ -372,6 +381,15 @@ lotics app api unpublish # end the promise
372
381
  # use this after a rename, or when a pull ran offline.
373
382
  lotics app codegen # import { F, OPT } from "../.lotics/app_fields"
374
383
 
384
+ # Install @lotics/ui or @lotics/app-sdk from your CHECKOUT, to prove a kit change
385
+ # on a real app before it is published: build, pack into .lotics/kit/, install by
386
+ # file specifier, then hash one built file on both sides — a repack under the same
387
+ # name is otherwise served from the lockfile's first tarball. `app check` warns and
388
+ # `app deploy` refuses (--allow-local-kit ships it anyway), because that tarball is
389
+ # not in the source archive. --published puts the registry version back.
390
+ lotics app kit ../lotics/packages/ui
391
+ lotics app kit ../lotics/packages/ui --published
392
+
375
393
  # Every deploy pre-flight, WITHOUT the build or the version row: the app's own
376
394
  # typecheck over regenerated .lotics types, agent schemas vs the live app, aliases
377
395
  # the code calls that nothing bound, undeclared capabilities, query drift. Exits 1 on what a deploy refuses, so CI can gate on it.
@@ -410,6 +428,14 @@ lotics app workflow set issueInvoice # push the edited src/workflows/issu
410
428
  # authoritative, so the next `app deploy` re-syncs it — keep the manifest current.
411
429
  lotics app query set openInvoices # push package.json#lotics.queries.openInvoices
412
430
 
431
+ # Move one alias out of this app and into another of the same workspace — the
432
+ # declaration (and a workflow's body) land in the target project, the target is
433
+ # bound to its OWN row, and the source is unbound and undeclared here. No release
434
+ # either side. Run it in the source project; refused while anything here still
435
+ # calls the alias, unless you say --even-if-invoked.
436
+ lotics app query move openInvoices --to ../ke-toan
437
+ lotics app workflow move issueInvoice --to ../ke-toan
438
+
413
439
  # Run a bound app agent end-to-end (no deployed UI needed — app row + declaration
414
440
  # + member auth). Streams progress to stderr; reports the SETTLED run (structured
415
441
  # output / final text) to stdout; exits 0 only when the run completed.