@lotics/cli 0.318.32 → 0.318.34
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 +247 -264
- package/dist/src/client.d.ts +4 -2
- package/docs/agent_surface.md +6 -7
- package/docs/app_architecture.md +2 -2
- package/docs/app_bindings.md +1 -1
- package/docs/building_an_app.md +1 -1
- package/docs/data_model.md +1 -1
- package/docs/design.md +194 -28
- package/docs/examples.md +39 -33
- package/docs/filters.md +3 -3
- package/docs/first_build.md +10 -20
- package/docs/getting_started.md +2 -2
- package/docs/workflow_steps.md +3 -76
- package/docs/workflows.md +137 -128
- package/package.json +1 -1
package/docs/examples.md
CHANGED
|
@@ -80,7 +80,6 @@ among them: the `design` reference. Every key: `reference`, at the pages each se
|
|
|
80
80
|
"order": {"any": [{"member_of": "sales"}, {"member_of": "stores"}]},
|
|
81
81
|
"order_line": {"any": [{"member_of": "sales"}, {"member_of": "stores"}]},
|
|
82
82
|
"payment": {"any": [{"member_of": "sales"}, {"member_of": "stores"}]},
|
|
83
|
-
"order_stage": {"any": [{"member_of": "sales"}, {"member_of": "stores"}]},
|
|
84
83
|
"service_visit": {"any": [{"member_of": "sales"}, {"member_of": "stores"}, {"member_of": "field"}]}
|
|
85
84
|
},
|
|
86
85
|
"children": [
|
|
@@ -267,7 +266,6 @@ among them: the `design` reference. Every key: `reference`, at the pages each se
|
|
|
267
266
|
"order": {"any": [{"member_of": "sales"}, {"member_of": "stores"}]},
|
|
268
267
|
"order_line": {"any": [{"member_of": "sales"}, {"member_of": "stores"}]},
|
|
269
268
|
"payment": {"any": [{"member_of": "sales"}, {"member_of": "stores"}]},
|
|
270
|
-
"order_stage": {"any": [{"member_of": "sales"}, {"member_of": "stores"}]},
|
|
271
269
|
"service_visit": {"any": [{"member_of": "sales"}, {"member_of": "stores"}, {"member_of": "field"}]}
|
|
272
270
|
},
|
|
273
271
|
"children": [
|
|
@@ -284,7 +282,6 @@ among them: the `design` reference. Every key: `reference`, at the pages each se
|
|
|
284
282
|
{
|
|
285
283
|
"type": "Record",
|
|
286
284
|
"entity": "service_visit",
|
|
287
|
-
"door": "drawer",
|
|
288
285
|
"children": [
|
|
289
286
|
{
|
|
290
287
|
"type": "Section",
|
|
@@ -468,8 +465,7 @@ among them: the `design` reference. Every key: `reference`, at the pages each se
|
|
|
468
465
|
]
|
|
469
466
|
}
|
|
470
467
|
]
|
|
471
|
-
}
|
|
472
|
-
{"type": "Record", "entity": "khach_hang", "add": true}
|
|
468
|
+
}
|
|
473
469
|
]
|
|
474
470
|
}
|
|
475
471
|
}
|
|
@@ -542,10 +538,7 @@ among them: the `design` reference. Every key: `reference`, at the pages each se
|
|
|
542
538
|
"children": [{"type": "List", "entity": "lich_truc", "create": true, "remove": true}]
|
|
543
539
|
}
|
|
544
540
|
],
|
|
545
|
-
"pages": [
|
|
546
|
-
{"type": "Record", "entity": "lich_truc", "row": {"subtitle": ["ngay", "ghe"]}},
|
|
547
|
-
{"type": "Record", "entity": "ghe", "add": ["ten", "phong"]}
|
|
548
|
-
]
|
|
541
|
+
"pages": [{"type": "Record", "entity": "lich_truc"}, {"type": "Record", "entity": "ghe", "add": ["ten", "phong"]}]
|
|
549
542
|
}
|
|
550
543
|
}
|
|
551
544
|
```
|
|
@@ -627,8 +620,7 @@ among them: the `design` reference. Every key: `reference`, at the pages each se
|
|
|
627
620
|
"customer": {"any": [{"member_of": "sales"}]},
|
|
628
621
|
"order": {"any": [{"member_of": "sales"}, {"member_of": "stores"}]},
|
|
629
622
|
"order_line": {"any": [{"member_of": "sales"}, {"member_of": "stores"}]},
|
|
630
|
-
"payment": {"any": [{"member_of": "sales"}, {"member_of": "stores"}]}
|
|
631
|
-
"order_stage": {"any": [{"member_of": "sales"}, {"member_of": "stores"}]}
|
|
623
|
+
"payment": {"any": [{"member_of": "sales"}, {"member_of": "stores"}]}
|
|
632
624
|
},
|
|
633
625
|
"scope": "warehouse",
|
|
634
626
|
"children": [
|
|
@@ -685,18 +677,16 @@ among them: the `design` reference. Every key: `reference`, at the pages each se
|
|
|
685
677
|
"type": "Section",
|
|
686
678
|
"key": "on_order",
|
|
687
679
|
"title": "On order",
|
|
688
|
-
"children": [{"type": "List", "entity": "order_line"
|
|
680
|
+
"children": [{"type": "List", "entity": "order_line"}]
|
|
689
681
|
}
|
|
690
682
|
]
|
|
691
683
|
},
|
|
692
684
|
{
|
|
693
685
|
"type": "Record",
|
|
694
686
|
"entity": "order_line",
|
|
695
|
-
"children": ["quantity", "shipped", {"type": "Check", "field": "settled", "on": ["update"]}]
|
|
696
|
-
"row": {"subtitle": ["order", "unit_price"]}
|
|
687
|
+
"children": ["quantity", "shipped", {"type": "Check", "field": "settled", "on": ["update"]}]
|
|
697
688
|
},
|
|
698
|
-
{"type": "Record", "entity": "customer", "add": ["name", "credit_limit"]}
|
|
699
|
-
{"type": "Record", "entity": "order", "add": ["customer", "reference"]}
|
|
689
|
+
{"type": "Record", "entity": "customer", "add": ["name", "credit_limit"]}
|
|
700
690
|
]
|
|
701
691
|
}
|
|
702
692
|
}
|
|
@@ -850,7 +840,6 @@ among them: the `design` reference. Every key: `reference`, at the pages each se
|
|
|
850
840
|
"order": {"any": [{"member_of": "sales"}, {"member_of": "stores"}]},
|
|
851
841
|
"order_line": {"any": [{"member_of": "sales"}, {"member_of": "stores"}]},
|
|
852
842
|
"payment": {"any": [{"member_of": "sales"}, {"member_of": "stores"}]},
|
|
853
|
-
"order_stage": {"any": [{"member_of": "sales"}, {"member_of": "stores"}]},
|
|
854
843
|
"touch": {"any": [{"member_of": "sales"}]},
|
|
855
844
|
"customer_paper": {"any": [{"member_of": "sales"}]},
|
|
856
845
|
"service_visit": {"any": [{"member_of": "sales"}, {"member_of": "stores"}, {"member_of": "field"}]}
|
|
@@ -911,7 +900,12 @@ among them: the `design` reference. Every key: `reference`, at the pages each se
|
|
|
911
900
|
"label": "Back to",
|
|
912
901
|
"type": "select",
|
|
913
902
|
"options": [
|
|
914
|
-
{
|
|
903
|
+
{
|
|
904
|
+
"alias": "key",
|
|
905
|
+
"label": "Key account",
|
|
906
|
+
"color": "violet",
|
|
907
|
+
"mark": {"kind": "icon", "name": "building-2"}
|
|
908
|
+
},
|
|
915
909
|
{"alias": "standard", "label": "Standard", "color": "sky"}
|
|
916
910
|
],
|
|
917
911
|
"required": true
|
|
@@ -956,7 +950,6 @@ among them: the `design` reference. Every key: `reference`, at the pages each se
|
|
|
956
950
|
"type": "List",
|
|
957
951
|
"key": "block_reading_3",
|
|
958
952
|
"entity": "service_visit",
|
|
959
|
-
"label": "Service visits",
|
|
960
953
|
"columns": ["engineer", "job"],
|
|
961
954
|
"edit": false
|
|
962
955
|
}
|
|
@@ -1010,8 +1003,7 @@ among them: the `design` reference. Every key: `reference`, at the pages each se
|
|
|
1010
1003
|
},
|
|
1011
1004
|
{"type": "Record", "entity": "warehouse", "add": ["name", "city"]},
|
|
1012
1005
|
{"type": "Record", "entity": "stock_item", "add": ["name", "warehouse", "sku", "category"]},
|
|
1013
|
-
{"type": "Record", "entity": "order_line", "add": ["item", "quantity"]}
|
|
1014
|
-
{"type": "Record", "entity": "payment", "add": true}
|
|
1006
|
+
{"type": "Record", "entity": "order_line", "add": ["item", "quantity"]}
|
|
1015
1007
|
]
|
|
1016
1008
|
}
|
|
1017
1009
|
}
|
|
@@ -1222,11 +1214,12 @@ among them: the `design` reference. Every key: `reference`, at the pages each se
|
|
|
1222
1214
|
"icon": "folder-open",
|
|
1223
1215
|
"color": "blue",
|
|
1224
1216
|
"scope": "du_an",
|
|
1217
|
+
"folders": "cac_du_an",
|
|
1225
1218
|
"children": [
|
|
1226
1219
|
{
|
|
1227
1220
|
"type": "List",
|
|
1228
1221
|
"entity": "ho_so",
|
|
1229
|
-
"columns": ["
|
|
1222
|
+
"columns": ["doi_tuong", "xu_ly", "can_bo_sung"],
|
|
1230
1223
|
"filters": ["xu_ly", "can_bo_sung"],
|
|
1231
1224
|
"search": ["khach_hang", "ma_ho_so", "dien_thoai"],
|
|
1232
1225
|
"create": ["khach_hang", "dich_vu", "doi_tuong", "tinh_trang_nha_o", "loai_can", "phi_dich_vu", "sale"],
|
|
@@ -1254,6 +1247,15 @@ among them: the `design` reference. Every key: `reference`, at the pages each se
|
|
|
1254
1247
|
"template": "danh_sach_nop"
|
|
1255
1248
|
}
|
|
1256
1249
|
]
|
|
1250
|
+
},
|
|
1251
|
+
{
|
|
1252
|
+
"type": "List",
|
|
1253
|
+
"entity": "du_an",
|
|
1254
|
+
"key": "cac_du_an",
|
|
1255
|
+
"columns": ["han_nop"],
|
|
1256
|
+
"create": false,
|
|
1257
|
+
"sort": {"field": "han_nop"},
|
|
1258
|
+
"children": [{"type": "Reading", "key": "du_an_theo_trang_thai", "by": "trang_thai"}]
|
|
1257
1259
|
}
|
|
1258
1260
|
],
|
|
1259
1261
|
"pages": [
|
|
@@ -1357,8 +1359,7 @@ among them: the `design` reference. Every key: `reference`, at the pages each se
|
|
|
1357
1359
|
"templates": [
|
|
1358
1360
|
{"template": "don_dang_ky"},
|
|
1359
1361
|
{"template": "mau_02_chua_co_nha", "when": {"tinh_trang_nha_o": ["chua_co_nha"]}},
|
|
1360
|
-
{"template": "mau_03_nha_chat", "when": {"tinh_trang_nha_o": ["nha_chat"]}}
|
|
1361
|
-
{"template": "mau_05_thu_nhap", "when": {"doi_tuong": ["thu_nhap_thap"]}}
|
|
1362
|
+
{"template": "mau_03_nha_chat", "when": {"tinh_trang_nha_o": ["nha_chat"]}}
|
|
1362
1363
|
],
|
|
1363
1364
|
"into": "bo_ho_so",
|
|
1364
1365
|
"when": {"giai_doan": ["ngay_nhan_giay_to", "ngay_lap_ho_so"]}
|
|
@@ -1399,6 +1400,14 @@ among them: the `design` reference. Every key: `reference`, at the pages each se
|
|
|
1399
1400
|
}
|
|
1400
1401
|
]
|
|
1401
1402
|
},
|
|
1403
|
+
{
|
|
1404
|
+
"type": "Act",
|
|
1405
|
+
"key": "lap_mau_05",
|
|
1406
|
+
"label": "Lập mẫu 05",
|
|
1407
|
+
"when": {"doi_tuong": ["thu_nhap_thap"]},
|
|
1408
|
+
"template": "mau_05_thu_nhap",
|
|
1409
|
+
"paper": "giay_to.xac_nhan_thu_nhap"
|
|
1410
|
+
},
|
|
1402
1411
|
{"type": "Check", "field": "chua_thu_phi", "on": ["nop_cdt"]},
|
|
1403
1412
|
{"type": "Check", "field": "con_no_phi"},
|
|
1404
1413
|
{"type": "Check", "field": "vuot_thu_nhap"},
|
|
@@ -1608,6 +1617,7 @@ among them: the `design` reference. Every key: `reference`, at the pages each se
|
|
|
1608
1617
|
]
|
|
1609
1618
|
},
|
|
1610
1619
|
"ghi_am": {"type": "files"},
|
|
1620
|
+
"man_hinh": {"type": "files"},
|
|
1611
1621
|
"nguyen_van": {"type": "text", "format": "markdown"},
|
|
1612
1622
|
"hen_lai": {"type": "date", "timezone": "Asia/Ho_Chi_Minh"},
|
|
1613
1623
|
"nguoi_thuc_hien": {"type": "member"}
|
|
@@ -1658,7 +1668,6 @@ among them: the `design` reference. Every key: `reference`, at the pages each se
|
|
|
1658
1668
|
{
|
|
1659
1669
|
"type": "List",
|
|
1660
1670
|
"entity": "tin_hieu",
|
|
1661
|
-
"label": "Tín hiệu",
|
|
1662
1671
|
"columns": ["loai", "noi_dung"],
|
|
1663
1672
|
"create": ["tom_tat", "anh_chup", "loai", "noi_dung", "kenh", "lien_ket", "ngay_dang"]
|
|
1664
1673
|
},
|
|
@@ -1687,14 +1696,12 @@ among them: the `design` reference. Every key: `reference`, at the pages each se
|
|
|
1687
1696
|
{
|
|
1688
1697
|
"type": "List",
|
|
1689
1698
|
"entity": "buoc_tiep",
|
|
1690
|
-
"label": "Bước tiếp theo",
|
|
1691
1699
|
"columns": ["ban_nhap"],
|
|
1692
1700
|
"create": ["vi_sao_luc_nay", "viec", "han", "ban_nhap"]
|
|
1693
1701
|
},
|
|
1694
1702
|
{
|
|
1695
1703
|
"type": "List",
|
|
1696
1704
|
"entity": "tuong_tac",
|
|
1697
|
-
"label": "Tương tác",
|
|
1698
1705
|
"layout": "timeline",
|
|
1699
1706
|
"create": ["tom_tat", "qua", "phan_hoi", "thoi_diem", "hen_lai"]
|
|
1700
1707
|
},
|
|
@@ -1709,7 +1716,8 @@ among them: the `design` reference. Every key: `reference`, at the pages each se
|
|
|
1709
1716
|
"audio": "ghi_am",
|
|
1710
1717
|
"transcript": "nguyen_van",
|
|
1711
1718
|
"at": "thoi_diem",
|
|
1712
|
-
"by": "nguoi_thuc_hien"
|
|
1719
|
+
"by": "nguoi_thuc_hien",
|
|
1720
|
+
"video": "man_hinh"
|
|
1713
1721
|
}
|
|
1714
1722
|
},
|
|
1715
1723
|
{
|
|
@@ -1921,7 +1929,7 @@ among them: the `design` reference. Every key: `reference`, at the pages each se
|
|
|
1921
1929
|
"nha_cung_cap",
|
|
1922
1930
|
"han_thanh_toan",
|
|
1923
1931
|
"nguoi_de_nghi",
|
|
1924
|
-
{"field": "chung_tu"
|
|
1932
|
+
{"field": "chung_tu"},
|
|
1925
1933
|
{
|
|
1926
1934
|
"type": "Act",
|
|
1927
1935
|
"key": "gui_duyet",
|
|
@@ -1956,15 +1964,13 @@ among them: the `design` reference. Every key: `reference`, at the pages each se
|
|
|
1956
1964
|
"key": "da_chi",
|
|
1957
1965
|
"title": "Đã chi",
|
|
1958
1966
|
"at": ["da_chi"],
|
|
1959
|
-
"children": [{"field": "phieu_chi", "
|
|
1967
|
+
"children": [{"field": "phieu_chi", "edit": false}]
|
|
1960
1968
|
},
|
|
1961
1969
|
{"type": "Check", "field": "da_gui", "on": ["update"]},
|
|
1962
1970
|
{"type": "Check", "field": "vuot_ngan_sach"},
|
|
1963
1971
|
{"type": "Check", "field": "sat_ngan_sach"}
|
|
1964
|
-
]
|
|
1965
|
-
"row": {"subtitle": ["du_an"]}
|
|
1972
|
+
]
|
|
1966
1973
|
},
|
|
1967
|
-
{"type": "Record", "entity": "nha_cung_cap", "add": true},
|
|
1968
1974
|
{"type": "Record", "entity": "du_an", "add": ["ten", "ma_du_an", "chu_dau_tu", "ngan_sach"]}
|
|
1969
1975
|
]
|
|
1970
1976
|
}
|
package/docs/filters.md
CHANGED
|
@@ -25,7 +25,7 @@ Groups nest up to 4 levels. AND(OR(status = A, status = B), age > 40):
|
|
|
25
25
|
Every `field_key` resolves against the table being filtered — read each table's fields (`get_table`)
|
|
26
26
|
and carry no name across tables: sibling tables holding the same concept routinely name it
|
|
27
27
|
differently. A field is named by its alias (`"status"`), as `get_table` shows it, and a select option the same way
|
|
28
|
-
(`"done"`). A traversal's `path` and the field of its condition are named the same way, each on the table the
|
|
28
|
+
(`"done"`); its label or key is taken too, on a select, a formula that yields one or a lookup of one, and a value none of them holds is refused naming the options. A traversal's `path` and the field of its condition are named the same way, each on the table the
|
|
29
29
|
path has reached.
|
|
30
30
|
|
|
31
31
|
## One family of operators
|
|
@@ -165,6 +165,6 @@ table spells its fields its own way; it combines with no top-level `table_id`, `
|
|
|
165
165
|
matched, so a total that misses part of what you asked for says so; pass `tables` to count them across the tables
|
|
166
166
|
that hold them.
|
|
167
167
|
- **By id.** `record_ids` reads those records whole, deleted ones included, with their `display`, `links`, `archived_at`,
|
|
168
|
-
`created_at` and `updated_at`; `table_id` may be left out. It takes at most
|
|
169
|
-
step, an app) and combines with `field_keys` and `comments` only. `update_records` takes
|
|
168
|
+
`created_at` and `updated_at`; `table_id` may be left out. It takes at most 200 ids on every origin (an agent, a workflow
|
|
169
|
+
step, an app) and combines with `field_keys` and `comments` only. `update_records` takes up to 1,000 ids, and with
|
|
170
170
|
`restore: true` brings deleted records back.
|
package/docs/first_build.md
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
# First build — a whole workspace, call by call
|
|
2
2
|
|
|
3
|
-
The worked business: a bakery takes cake orders at the counter, a customer and one line per cake from the menu, moving taken, baking, ready, collected, with a slip printed when ready.
|
|
3
|
+
Build from this page and `design`, which lists the words most builds state; a node's `reference` page holds the rest, and a write's answer names the `reference/<id>` page for anything it refuses. The worked business: a bakery takes cake orders at the counter, a customer and one line per cake from the menu, moving taken, baking, ready, collected, with a slip printed when ready.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
`get_workspace` shows what already exists. Before the first write, ask the owner once, in one message, only what you cannot settle yourself: their papers and lists (a photo, a spreadsheet, a file), anything written about how it should work, what each person needs to see first, and what no paper tells you that would change the tables or who does which step. One sentence per question, nothing else in the message. The owner answers by hand, so every question costs them time: ask nothing they gave or a paper settles. Never ask about stages or design: take a default and list it in your report. Wait for the answer. What no one could guess from the data goes into a knowledge doc with `set_knowledge` (`knowledge_docs`).
|
|
5
|
+
`get_workspace` shows what already exists. The person who asked is there if you want to ask them something. A short request names a business, not everything it runs on: they still expect the workspace to hold what that kind of business can't run without, such as what must never happen, what people are paid for and the papers it sends. Your report names what you assumed, for them to change. What no one could guess from the data goes into a knowledge doc with `set_knowledge` (`knowledge_docs`).
|
|
8
6
|
|
|
9
7
|
## 1. Tables and their checks: `set_tables`
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
Linked tables go in one call, since they name each other by `ref`; `records` and checks may follow in the next call, so a refusal costs a patch rather than the whole document. A new table is named by its `ref`, which becomes its alias. One table per kind of thing, one column per fact, a link wherever one record points at another. A status is the stage of the work; a touch ("called") is a log row, a money fact ("paid in full") a formula, a quantity a number with its unit in `notation`. Read `design` before stating `records`, since a row's face, picture and mark are stated there. A table people work states `title` (who or what a row is; a code only where nothing else names it), `records` (an app over a table without it is refused) and `singular` (so is an Add over a table lacking it).
|
|
12
10
|
|
|
13
11
|
```json
|
|
14
12
|
{
|
|
@@ -64,7 +62,7 @@ One call, linked tables together. A new table is named by its `ref`, which becom
|
|
|
64
62
|
}
|
|
65
63
|
```
|
|
66
64
|
|
|
67
|
-
`default_from` copies the menu's price when a line is made, so a later change leaves taken orders alone. `min`, `unique` and a check hold on every write; a check's language is `workflows/table-checks`, an effect after a write a table workflow (`workflows/table-workflows`).
|
|
65
|
+
`default_from` copies the menu's price when a line is made, so a later change leaves taken orders alone. `min`, `unique` and a check hold on every write; a check's language is `workflows/table-checks`, an effect after a write a table workflow (`workflows/table-workflows`).
|
|
68
66
|
|
|
69
67
|
## 2. The paper: `set_template`
|
|
70
68
|
|
|
@@ -80,9 +78,9 @@ One template per paper the owner sends. A slot is named after a field of the rec
|
|
|
80
78
|
|
|
81
79
|
## 3. The app and its acts: `set_app`
|
|
82
80
|
|
|
83
|
-
**Which apps.** One app per main entity, a thing
|
|
81
|
+
**Which apps.** One app per main entity, a thing the owner's words give its own list. A row that makes sense only under one parent (an employee's contracts, an order's lines) is a child List on the parent's page, never another app or a Tab. A second root List is rare: one job working two unrelated entities side by side. A related row's value on the list is a lookup column; work over many rows (a month's payroll) an Act on the list's rows.
|
|
84
82
|
|
|
85
|
-
**
|
|
83
|
+
**How each row reads** comes before the first List: `design/treatments` names the view per kind of row.
|
|
86
84
|
|
|
87
85
|
**Start from one root List.** `{"type": "List", "entity": "cake_order"}` in the App's `children` is a whole app: the platform draws the page every row opens, the add and the Delete. `set_app` answers with what it drew and what it placed or folded; state only the difference.
|
|
88
86
|
|
|
@@ -92,7 +90,7 @@ One template per paper the owner sends. A slot is named after a field of the rec
|
|
|
92
90
|
"type": "App", "key": "counter", "name": "Counter",
|
|
93
91
|
"children": [
|
|
94
92
|
{"type": "List", "entity": "cake_order", "filters": ["customer"], "create": ["customer", "due_on", "pay_by"], "children": [
|
|
95
|
-
{"type": "Reading", "
|
|
93
|
+
{"type": "Reading", "label": "By pickup day", "value": "total", "by": "due_on"}
|
|
96
94
|
]}
|
|
97
95
|
],
|
|
98
96
|
"pages": [
|
|
@@ -116,17 +114,9 @@ One template per paper the owner sends. A slot is named after a field of the rec
|
|
|
116
114
|
|
|
117
115
|
**Give each main List a band** of what its person watches, a figure or a chart in its `children`, never a bare count.
|
|
118
116
|
|
|
119
|
-
**A press can be a mistake.** An Act also moves a row back (`when` the later stage, `set` the earlier), at the foot of the Section of the stage it leaves. **Someone with no seat** who signs or approves one record, a customer or a supplier, gets a Record's `Outside`: a link a member makes of that record
|
|
120
|
-
|
|
121
|
-
**What the check refuses**, each with its page at `reference/<id>`:
|
|
122
|
-
|
|
123
|
-
- `record.placed-once`: a Field, child List, Reading, Statement or Act stands once in a Record. The head draws the title, subtitle, image and figure; the status is a control in the first Section that runs the moves.
|
|
124
|
-
- `list.filter-unshown`: a `filters` entry (at most 3), or the field a Reading's `by` or `where` narrows by, is drawn on the row; never text, and the status is the chips already.
|
|
125
|
-
- `list.columns-budget`: `columns` fit the room a desk leaves beside the name, status, deadline and figure.
|
|
126
|
-
- `act.requires-drawn`: an Act's `requires` field is drawn in its Section or asked by it.
|
|
127
|
-
- A workflow writes a link as ids, `[x.id]`; a whole record or bare value is refused.
|
|
117
|
+
**A press can be a mistake.** An Act also moves a row back (`when` the later stage, `set` the earlier), at the foot of the Section of the stage it leaves. **Someone with no seat** who signs or approves one record, a customer or a supplier, gets a Record's `Outside`: a link a member makes of that record.
|
|
128
118
|
|
|
129
|
-
Then `set_access` gives each app to
|
|
119
|
+
`dry_run` checks a body and writes nothing. Then `set_access` gives each app to everyone who works its rows (ids from `get_workspace`); none loses access. They need no table access, and with no `rows` on the App they read every row. An Act's or stage's `owner` decides who presses. A person's part of the work doesn't make an app; a different job may.
|
|
130
120
|
|
|
131
121
|
## 4. What the owner will ask an agent: Query and Workflow nodes
|
|
132
122
|
|
|
@@ -134,7 +124,7 @@ What the business asks its assistant again and again (orders waiting for pickup)
|
|
|
134
124
|
|
|
135
125
|
## 5. The owner's rows: `create_records`
|
|
136
126
|
|
|
137
|
-
Batch the owner's rows: the customers and menu, then the orders, linked by the ids those calls return, then each order's cakes (`field_values` has the value each type takes). Load as an admin: a row past the first stage
|
|
127
|
+
Batch the owner's rows: the customers and menu, then the orders, linked by the ids those calls return, then each order's cakes (`field_values` has the value each type takes). Load as an admin: a row past the first stage is refused unless that stage's owner or an admin makes it, and a row loaded at a later stage states each earlier stage's date field (`<option>_at`). Example rows the papers ask for and do not list come from the owner's lists, each at the stage it should show, written like the owner's own rows (no flag field, no "Example" in a name) and listed in your report for the owner to keep or delete. An owner who sent no lists opens what you leave, so a few example rows, listed the same way, show them the app working.
|
|
138
128
|
|
|
139
129
|
```
|
|
140
130
|
create_records {"table_id": "cake_line", "field_keys": ["order", "item", "quantity"],
|
package/docs/getting_started.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Getting started
|
|
2
2
|
|
|
3
|
-
A workspace is where one business keeps what it knows and does its daily work. **Records** are what it tracks, one table per kind of thing and one row per entry. **Apps** are the screens a team works in, one per main kind of record, each
|
|
3
|
+
A workspace is where one business keeps what it knows and does its daily work. **Records** are what it tracks, one table per kind of thing and one row per entry. **Apps** are the screens a team works in, one per main kind of record, each given to everyone who works its rows. **Documents** are the quotes, invoices and slips it sends, each a template filled from a record, or from the many rows of a period or a statement. A paper is the workspace's once it is made from a template or uploaded and filed on its record; a file left on the host's own disk, the user's included, reaches no one in the workspace. A procedure or policy no table holds is a **knowledge doc**; a price list, a customer list or the open orders are rows.
|
|
4
4
|
|
|
5
5
|
Open the one page for the job. Pages are read with the `docs` tool (`docs path="design"`; `lotics docs design` on the CLI).
|
|
6
6
|
|
|
7
|
-
- **Build a workspace from a description:** `docs path="first_build"`.
|
|
7
|
+
- **Build a workspace from a description:** `docs path="first_build"`. A whole bakery built call by call: tables with a check, the paper, the app (which apps, a treatment per kind of row, what the check refuses, who gets it), the owner's rows, then pressing it.
|
|
8
8
|
- **An app starts as one root List:** `{"type": "List", "entity": "order"}` in the App's `children` draws the page, the add and the Delete. The write's answer shows what it drew, placed or folded; change only the difference (`first_build`, § 3).
|
|
9
9
|
- **Change an app:** `docs path="reference/changing-an-app"`. `get_app`, then `set_app` with `nodes` and `base_version_id`. A table is changed with `get_table`, then `set_tables` with its `table_id` (`data_model`).
|
|
10
10
|
- **Enforce a rule on a table:** `docs path="workflows/table-checks"`. A condition no create, update or delete may meet, whoever makes it, and the language it is written in.
|
package/docs/workflow_steps.md
CHANGED
|
@@ -80,6 +80,7 @@ above. A provider's refusal carries the provider's own words.
|
|
|
80
80
|
| `_value_coverage.per_value` | object | | |
|
|
81
81
|
| `_value_coverage.per_value.matched` | number | yes | |
|
|
82
82
|
| `_value_coverage.per_value.missing` | string[] | yes | |
|
|
83
|
+
| `_narrowed_hops` | string[] | | The tables a filter looked through whose rows this reader's access limits. |
|
|
83
84
|
|
|
84
85
|
## bkav
|
|
85
86
|
|
|
@@ -945,7 +946,7 @@ above. A provider's refusal carries the provider's own words.
|
|
|
945
946
|
|
|
946
947
|
| Name | Type | Required | What it is |
|
|
947
948
|
| --- | --- | --- | --- |
|
|
948
|
-
| `file_id` | string | yes |
|
|
949
|
+
| `file_id` | string | yes | A stored file's id. A files field read in a workflow holds file objects: first(record.file).id |
|
|
949
950
|
| `worksheet` | string \\| number | | Sheet name, or 0-based index. |
|
|
950
951
|
| `header_row` | number | | 1-based row holding the headers. |
|
|
951
952
|
| `columns` | string[] | | Keys to keep, as headers lists them. |
|
|
@@ -1429,7 +1430,7 @@ above. A provider's refusal carries the provider's own words.
|
|
|
1429
1430
|
- Returns data (raw values) and display (human-readable labels).
|
|
1430
1431
|
- A workspace admin's `as_member` fetches it as that member would see it.
|
|
1431
1432
|
- Cell shapes in `data`, keyed by field alias: select / member / link, and a formula with options, read back as arrays — a single-select as ["open"], the option's alias; one member as ["mbr_x"].
|
|
1432
|
-
- A workflow body reads the same single-select, single-member or option-formula cell as the bare value.
|
|
1433
|
+
- A workflow body reads the same single-select, single-member or option-formula cell as the bare value, and a files cell as a list of file objects, each with id, filename and mime_type: `first(record.file).id` is the id a file tool takes.
|
|
1433
1434
|
|
|
1434
1435
|
**Inputs**
|
|
1435
1436
|
|
|
@@ -1650,80 +1651,6 @@ above. A provider's refusal carries the provider's own words.
|
|
|
1650
1651
|
| `markdown` | string | | The body as written in markdown; absent when a template rendered it |
|
|
1651
1652
|
| `to` | string | yes | The recipients as sent, comma-separated |
|
|
1652
1653
|
|
|
1653
|
-
## import
|
|
1654
|
-
|
|
1655
|
-
### import_rows (workflow step)
|
|
1656
|
-
|
|
1657
|
-
- Match a source's rows to a table by a key and write what differs: a row whose match fields equal no live row's is added, one equalling a row's changes the cells that differ, one that changes nothing is counted and not written.
|
|
1658
|
-
- It keeps nothing of its own: what it wrote and what it held are its answer, read under the run's own reach of the table — a workflow hands its caller only what it returns. match names the fields that identify a row: text, number or date fields a row is written with, compared as trimmed text, case ignored, and link fields holding one row, compared by the row linked. values holds a row's cells by field key, as create_records takes them; a link cell also takes { "lookup": "<text>" }, the linked row found by that text in its table's unique or autonumber field, else its title, among the rows the run reads of that table, and a link holding many rows a list of them. (workflow step, chat, MCP, CLI)
|
|
1659
|
-
- A row is held, never written, when: it carries hold (its text is the message); several live rows or an earlier row of the call carry its key; a link's text names no row, or several; the table refuses it or its row is locked; create is false and no row carries its key; or, under conflicts "hold", a live cell holds another value — the row's empty cells are still written. conflicts "overwrite" writes over a differing cell, "fill_empty" leaves it. conflicts.fields sets one field's own.
|
|
1660
|
-
- A number and the field its unit or currency is read from are one cell, under the number's policy: both written, or both held.
|
|
1661
|
-
- A row whose key names a row outside the rows the run may write is held "refused" with nothing of that row: no record_id, no changes.
|
|
1662
|
-
- A row carrying remove: true proposes moving the row its key names to the trash: always held, whatever create and conflicts say, and counted unchanged where no row carries its key.
|
|
1663
|
-
- A row the source leaves out is never touched.
|
|
1664
|
-
- One call takes at most 10000 rows; more is refused with the count, never cut short.
|
|
1665
|
-
- Returns { read, created, changed, unchanged, held, written, written_omitted, held_rows, held_omitted }: the rows the call took, the rows it added, the rows it changed a cell of, the rows that changed nothing, and the rows held — a row can be both changed and held. written lists each record written: record_id, kind ("created" or "changed"), line, and changes — each field changed, with its field_key, its label and its before and after as text, as a read of the table shows them (an option's label, a linked row's display, a member's name; null where empty).
|
|
1666
|
-
- A created row lists no changes: its values are the row's own. held_rows lists each row held: kind ("create", "update", "remove", or "unmatched" where no row carries its key and create is false), reason, message, record_id where one row carries its key, key (each match field as text), the changes it would make, links (each link text naming no one row, with the rows it could be as candidates { id, display }), and values — its key and the cells it would write, as the call gave them.
|
|
1667
|
-
- A later call given those values under conflicts { "default": "overwrite" } writes it.
|
|
1668
|
-
- The two lists hold at most 10000 entries and 8388608 characters of JSON between them, each in the rows' order, what was written before what was held; written_omitted and held_omitted count what was left out.
|
|
1669
|
-
- A row gives each list at most one entry. dry_run: true runs the whole import, judged as a real one, and rolls it back: the answer says what it would write and hold, with dry_run true, and no row, number, event or workflow run is left behind.
|
|
1670
|
-
|
|
1671
|
-
**Inputs**
|
|
1672
|
-
|
|
1673
|
-
| Name | Type | Required | What it is |
|
|
1674
|
-
| --- | --- | --- | --- |
|
|
1675
|
-
| `table_id` | string | yes | |
|
|
1676
|
-
| `match` | string[] | yes | |
|
|
1677
|
-
| `rows` | object[] | yes | |
|
|
1678
|
-
| `rows[].values` | object | yes | |
|
|
1679
|
-
| `rows[].hold` | string \\| null | | |
|
|
1680
|
-
| `rows[].remove` | boolean \\| null | | |
|
|
1681
|
-
| `rows[].line` | number \\| null | | Its line in the source, 1-based. |
|
|
1682
|
-
| `create` | boolean \\| null | | |
|
|
1683
|
-
| `conflicts` | object \\| null | | |
|
|
1684
|
-
| `dry_run` | boolean \\| null | | |
|
|
1685
|
-
|
|
1686
|
-
**Answer**
|
|
1687
|
-
|
|
1688
|
-
| Name | Type | Required | What it is |
|
|
1689
|
-
| --- | --- | --- | --- |
|
|
1690
|
-
| `dry_run` | true | | The import was judged and rolled back: the lists name what it would write, and no record_id in them exists. |
|
|
1691
|
-
| `read` | number | yes | |
|
|
1692
|
-
| `created` | number | yes | |
|
|
1693
|
-
| `changed` | number | yes | |
|
|
1694
|
-
| `unchanged` | number | yes | |
|
|
1695
|
-
| `held` | number | yes | |
|
|
1696
|
-
| `written` | object[] | yes | |
|
|
1697
|
-
| `written[].record_id` | string | yes | |
|
|
1698
|
-
| `written[].kind` | "created" \\| "changed" | yes | |
|
|
1699
|
-
| `written[].line` | number | | |
|
|
1700
|
-
| `written[].changes` | object[] | yes | |
|
|
1701
|
-
| `written[].changes[].field_key` | string | yes | |
|
|
1702
|
-
| `written[].changes[].label` | string | yes | |
|
|
1703
|
-
| `written[].changes[].before` | string \\| null | yes | |
|
|
1704
|
-
| `written[].changes[].after` | string \\| null | yes | |
|
|
1705
|
-
| `written_omitted` | number | yes | |
|
|
1706
|
-
| `held_rows` | object[] | yes | |
|
|
1707
|
-
| `held_rows[].line` | number | | |
|
|
1708
|
-
| `held_rows[].kind` | "create" \\| "update" \\| "remove" \\| "unmatched" | yes | |
|
|
1709
|
-
| `held_rows[].reason` | "stated" \\| "removal" \\| "conflict" \\| "no_match" \\| "ambiguous_key" \\| "unresolved_link" \\| "ambiguous_link" \\| "locked" \\| "refused" | yes | |
|
|
1710
|
-
| `held_rows[].message` | string | yes | |
|
|
1711
|
-
| `held_rows[].record_id` | string | | |
|
|
1712
|
-
| `held_rows[].key` | object | yes | |
|
|
1713
|
-
| `held_rows[].values` | object | yes | |
|
|
1714
|
-
| `held_rows[].changes` | object[] | yes | |
|
|
1715
|
-
| `held_rows[].changes[].field_key` | string | yes | |
|
|
1716
|
-
| `held_rows[].changes[].label` | string | yes | |
|
|
1717
|
-
| `held_rows[].changes[].before` | string \\| null | yes | |
|
|
1718
|
-
| `held_rows[].changes[].after` | string \\| null | yes | |
|
|
1719
|
-
| `held_rows[].links` | object[] | yes | |
|
|
1720
|
-
| `held_rows[].links[].field_key` | string | yes | |
|
|
1721
|
-
| `held_rows[].links[].text` | string | yes | |
|
|
1722
|
-
| `held_rows[].links[].candidates` | object[] | yes | |
|
|
1723
|
-
| `held_rows[].links[].candidates[].id` | string | yes | |
|
|
1724
|
-
| `held_rows[].links[].candidates[].display` | string | yes | |
|
|
1725
|
-
| `held_omitted` | number | yes | |
|
|
1726
|
-
|
|
1727
1654
|
## instagram
|
|
1728
1655
|
|
|
1729
1656
|
### instagram_create_post (workflow step)
|