@lotics/cli 0.283.0 → 0.284.1

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.
@@ -0,0 +1,33 @@
1
+ # Field values — what a write takes for each field type
2
+
3
+ The value `create_records` and `update_records` take for a field.
4
+
5
+ ## Values by type
6
+
7
+ | Type | Value |
8
+ |---|---|
9
+ | `text` | `"hello"` |
10
+ | `number` | `42` |
11
+ | `boolean` | `true` |
12
+ | `date` | `"2025-03-14"`, or a month `"2025-03"` or a year `"2025"`, stored as written and compared as its first day |
13
+ | `datetime` | a `date` of this format: `"2025-03-14T09:00"`, never a month or a year |
14
+ | `date_range` | a `date` of this format: `"2025-03-01/2025-03-15"`, both halves full dates |
15
+ | `datetime_range` | a `date` of this format: `"2025-03-01T09:00/2025-03-15T17:00"`, both halves full |
16
+ | `select` | `["opt_…"]` |
17
+ | `select_member` | `["mbr_…"]` |
18
+ | `select_record_link` | `["rec_…"]` |
19
+ | `files` | `["fil_…"]`, ids of uploaded files |
20
+ | `formula`, `rollup`, `lookup`, `autonumber`, a `date` with `derive_from` | none — the platform writes them, and a write naming one is refused |
21
+
22
+ ## Lists
23
+
24
+ `select`, `select_member`, `select_record_link` and `files` store an ARRAY, even where the field holds
25
+ one value.
26
+
27
+ - A single-select is a ONE-element array; a bare `"opt_…"` is accepted and wrapped. A single
28
+ `select_member` takes a bare `"mbr_…"` the same way.
29
+ - `select_record_link` and `files` take an array only.
30
+ - Two options on a single-select, or two members on a single `select_member`, are refused.
31
+ - `update_records`' `add_to`, `remove_from` and `replace` take arrays of the same items: `opt_` keys
32
+ for a select, member ids for a `select_member`, record ids for a `select_record_link`, file ids for
33
+ `files`.
@@ -52,7 +52,7 @@ surface, not this tool.
52
52
  ## Access
53
53
 
54
54
  A knowledge doc reaches an agent only when the member can `use` the doc. New docs are private
55
- to the owner; share them with other members or groups using the IAM tool `share_resource`
55
+ to the owner; share them with other members or groups using the IAM tool `share_resource` on the CLI or in chat
56
56
  (category **Admin**; `unshare_resource` to revoke). An organization admin who is a person is no
57
57
  exception: they read a doc only once it is shared with them, or once they share it with
58
58
  themselves, which the audit log records. An API key acting as itself keeps the access set on the
@@ -117,7 +117,7 @@ pattern that was never too broad.
117
117
  with the reason.
118
118
 
119
119
  Where an expression cannot express the question at all — a value that must be computed, a
120
- layout matching cannot address — stage the doc into a code run instead (`code_exec` with
120
+ layout matching cannot address — stage the doc into a code run instead (`code_exec`, in chat or an app agent, with
121
121
  `knowledge_doc_ids` puts it at `inputs/knowledge/<id>.md` as a real file).
122
122
 
123
123
  ### What a result is bounded by
@@ -224,8 +224,8 @@ lotics tools update_knowledge # full input schema for any knowledge to
224
224
 
225
225
  The Knowledge category covers `list_knowledge`, `create_knowledge`, `update_knowledge`, and
226
226
  `delete_knowledge` — fronted by the `lotics knowledge list | create | get | update | tag | hide |
227
- unhide | rm` commands, and reachable over MCP as well, so a corpus can be authored from whichever
228
- surface you already work in. `list`, `tag`, `hide` and `unhide` go over REST rather than a tool, because
227
+ unhide | rm` commands, and all but `delete_knowledge` reachable over MCP as well, so a corpus can be
228
+ authored from whichever surface you already work in. `list`, `tag`, `hide` and `unhide` go over REST rather than a tool, because
229
229
  they are a person's view of the corpus: the tools answer what the ASSISTANT may browse, and a
230
- hidden doc is out of that set by definition. Sharing a doc to other members is `share_resource` / `unshare_resource` (category
231
- **Admin**).
230
+ hidden doc is out of that set by definition. Sharing a doc to other members is `share_resource` / `unshare_resource` on the
231
+ CLI or in chat (category **Admin**).
package/docs/migration.md CHANGED
@@ -21,7 +21,7 @@ templates and roles are the workspace's own.
21
21
  | `lotics scaffold diff` | `lotics model apply <model.json> --plan` — what the apply would change, writing nothing |
22
22
  | `lotics scaffold export` | `lotics model pull [-o <model.json>]` — the workspace's model, rebuilt from what owns each part |
23
23
  | `lotics app pull`, `app codegen`, `app check`, `app dev`, `app preview` | nothing local: read an app with `lotics run get_app`, and change it through its tools |
24
- | `lotics app workflow set` / `app query set` / `app agent set` | `lotics run set_app_workflow` / `set_app_query` / `set_app_agent` — each mints a version |
24
+ | `lotics app workflow set` / `app query set` / `app agent set` | `lotics run set_app_workflow` / `set_app_queries` / `set_app_agent` — each mints a version |
25
25
  | `lotics app versions` + a redeploy of an old tree | `lotics run query_app_versions`, then `lotics run rollback_app` — restores the app's earlier version; table changes and data writes stay |
26
26
  | `lotics app rename`, `app subdomain`, `package.json#lotics.capabilities` | `lotics run update_app` (`name`, `public_subdomain`, `capabilities`) |
27
27
  | `lotics app api publish` / `unpublish` | `lotics run publish_app_api` / `unpublish_app_api` |
package/docs/workflows.md CHANGED
@@ -231,7 +231,7 @@ Called as `size(arr)`. The method form works only where the name is also a JavaS
231
231
  `replaceAll`, `substring`, `length`, `split`, `join`, `padStart(str, length, char)`,
232
232
  `padEnd(str, length, char)`, `formatNumber(x, decimals)` (ungrouped, as `x.toFixed`),
233
233
  `formatDecimal(x, decimals, locale)` (grouped: `formatDecimal(151000, 0, "vi-VN")` is `151.000`),
234
- `numberToWords` (an integer in Vietnamese words)
234
+ `numberToWords(x, lang?)` (an integer in words: Vietnamese, or English with `"en"`)
235
235
  - **Objects**: `keys`, `values`, `entries`, `nonNullKeys`, `pick`, `omit`, `merge`
236
236
  - **Dates**, in the workspace's timezone: `now`, `formatDate`, `parseDate`, `addDays`, `subDays`,
237
237
  `addHours`, `subHours`, `addMinutes`, `subMinutes`, `startOfDay`, `endOfDay`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lotics/cli",
3
- "version": "0.283.0",
3
+ "version": "0.284.1",
4
4
  "description": "Lotics SDK and CLI for AI agents",
5
5
  "type": "module",
6
6
  "bin": {
@@ -20,6 +20,7 @@
20
20
  "build:binaries": "node scripts/build_binaries.mjs",
21
21
  "publish:binaries": "node scripts/build_binaries.mjs && node scripts/publish_binaries.mjs",
22
22
  "generate:model-reference": "node --import tsx dev/model_reference_gen.ts",
23
+ "generate:examples": "node --import tsx dev/examples_gen.ts",
23
24
  "generate:snapshots": "node --import tsx dev/factory_snapshots.ts",
24
25
  "typecheck": "tsgo --noEmit",
25
26
  "lint": "oxlint",