@lotics/cli 0.321.112 → 0.321.114

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/docs/design.md CHANGED
@@ -417,8 +417,17 @@ to a service, a letter by mail — runs its `workflow`, and what the workflow ke
417
417
  its link) is named in the Act's `set`. Work sent back for changes moves back to the earlier
418
418
  step; a hold is a yes/no field (and its reason) the step's Acts wait on in their `when`; work only some rows take is a
419
419
  stage's `when` (below); an issue to resolve is a row of its own. An Act also moves a row back (`when` the later
420
- stage, `set` the earlier): the row draws it beside the way on, and without one a row moved on by mistake stays until an
421
- admin edits the table. What a `workflow` or a paper did stands, so a way back there is a correction of its own.
420
+ stage, `set` the earlier), and without one a row moved on by mistake stays until an admin edits the table. What a
421
+ `workflow` or a paper did stands, so a way back there is a correction of its own.
422
+
423
+ #### Buttons
424
+
425
+ An Act is offered everywhere — agents run it, and a row's and a section's ⋯ list it — and draws as a button only where
426
+ the tree says a person presses it there. `button: true` on an Act stands it at the foot of its Section: the step a
427
+ person takes on the record, typically one or two per stage. A List's `button` names the Act its rows draw, quiet,
428
+ where people work row after row from the list (an approval queue, ticking off a pick list) — a list where the row's
429
+ next step differs by row, each row drawing the first it offers; most Lists name none. An
430
+ Act agents run — an invoice made from delivered orders, a payment matched from a statement — states neither.
422
431
 
423
432
  #### Stages
424
433
 
@@ -482,7 +491,7 @@ an app (`app_architecture`).
482
491
 
483
492
  #### Sections
484
493
 
485
- A record is a head, its parts and at most one Side. From three parts it shows one part at a time; fewer stack. A part is one area of the record's data a person comes to for its own job, like the tabs of a settings page; its related lists and field groups sit inside it under their headings. A status's stages are not areas: their acts stand at the foot of the rows they move, and a stage that holds something of its own — fields, blocks, acts, a note — is a Section inside `Steps`, one `Steps` to a record. State each
494
+ A record is a head, its parts and at most one Side. Its parts stack, one scroll with each headed; state `parts: "tabs"`, or a `tab` on a Section, to show one part at a time, and Sections stating one `tab` share a tab. A part is one area of the record's data a person comes to for its own job, like the tabs of a settings page; its related lists and field groups sit inside it under their headings. A status's stages are not areas: their acts stand at the foot of the rows they move, and a stage that holds something of its own — fields, blocks, acts, a note — is a Section inside `Steps`, one `Steps` to a record. State each
486
495
  part whole for the work there: a field may stand in any number of parts, and a field an Act requires draws beside it
487
496
  unstated. A stage that holds nothing needs no Section: the path draws it by its name. What a person needs in view at every part (who it is for, how to reach
488
497
  them) goes in a Side: it leaves the head and stays on the rows; what only a stage's Act writes (an invoice's number,
package/docs/examples.md CHANGED
@@ -121,8 +121,9 @@ each section says which its record takes under **Its stages**, so the form is co
121
121
  "type": "Act",
122
122
  "key": "reschedule",
123
123
  "label": "Reschedule",
124
+ "when": {"stage": ["booked_on", "parts_ready_on"]},
124
125
  "asks": ["scheduled_for", "ends_at"],
125
- "when": {"stage": ["booked_on", "parts_ready_on"]}
126
+ "button": true
126
127
  },
127
128
  {
128
129
  "type": "Act",
@@ -130,7 +131,8 @@ each section says which its record takes under **Its stages**, so the form is co
130
131
  "label": "Booked",
131
132
  "when": {"stage": {"empty": true}},
132
133
  "asks": [{"field": "booked_on", "starts": "today"}],
133
- "set": {"stage": "booked_on"}
134
+ "set": {"stage": "booked_on"},
135
+ "button": true
134
136
  },
135
137
  {
136
138
  "type": "Act",
@@ -138,7 +140,8 @@ each section says which its record takes under **Its stages**, so the form is co
138
140
  "label": "Parts ready",
139
141
  "when": {"stage": ["booked_on"], "job": ["repair"]},
140
142
  "asks": [{"field": "parts_ready_on", "starts": "today"}],
141
- "set": {"stage": "parts_ready_on"}
143
+ "set": {"stage": "parts_ready_on"},
144
+ "button": true
142
145
  },
143
146
  {
144
147
  "type": "Act",
@@ -146,7 +149,8 @@ each section says which its record takes under **Its stages**, so the form is co
146
149
  "label": "On site",
147
150
  "when": {"stage": ["booked_on"], "job": ["inspection"]},
148
151
  "asks": [{"field": "arrived_on", "starts": "today"}],
149
- "set": {"stage": "arrived_on"}
152
+ "set": {"stage": "arrived_on"},
153
+ "button": true
150
154
  },
151
155
  {
152
156
  "type": "Act",
@@ -154,7 +158,8 @@ each section says which its record takes under **Its stages**, so the form is co
154
158
  "label": "On site",
155
159
  "when": {"stage": ["parts_ready_on"]},
156
160
  "asks": [{"field": "arrived_on", "starts": "today"}],
157
- "set": {"stage": "arrived_on"}
161
+ "set": {"stage": "arrived_on"},
162
+ "button": true
158
163
  }
159
164
  ]
160
165
  },
@@ -171,20 +176,22 @@ each section says which its record takes under **Its stages**, so the form is co
171
176
  "type": "Act",
172
177
  "key": "complete",
173
178
  "label": "Complete visit",
179
+ "when": {"stage": ["arrived_on"]},
174
180
  "requires": ["engineer"],
175
181
  "asks": [
176
182
  "hours",
177
183
  {"input": "summary", "label": "What was done", "type": "long_text", "required": true}
178
184
  ],
179
185
  "set": {"report": {"input": "summary"}, "stage": "completed_on"},
180
- "when": {"stage": ["arrived_on"]}
186
+ "button": true
181
187
  },
182
188
  {
183
189
  "type": "Act",
184
190
  "key": "clear_visit_hours",
185
191
  "label": "Clear hours",
186
192
  "set": {"hours": null},
187
- "confirm": true
193
+ "confirm": true,
194
+ "button": true
188
195
  }
189
196
  ]
190
197
  }
@@ -312,7 +319,8 @@ each section says which its record takes under **Its stages**, so the form is co
312
319
  "label": "Booked",
313
320
  "when": {"stage": {"empty": true}},
314
321
  "asks": [{"field": "booked_on", "starts": "today"}],
315
- "set": {"stage": "booked_on"}
322
+ "set": {"stage": "booked_on"},
323
+ "button": true
316
324
  },
317
325
  {
318
326
  "type": "Act",
@@ -320,7 +328,8 @@ each section says which its record takes under **Its stages**, so the form is co
320
328
  "label": "Parts ready",
321
329
  "when": {"stage": ["booked_on"], "job": ["repair"]},
322
330
  "asks": [{"field": "parts_ready_on", "starts": "today"}],
323
- "set": {"stage": "parts_ready_on"}
331
+ "set": {"stage": "parts_ready_on"},
332
+ "button": true
324
333
  },
325
334
  {
326
335
  "type": "Act",
@@ -328,7 +337,8 @@ each section says which its record takes under **Its stages**, so the form is co
328
337
  "label": "On site",
329
338
  "when": {"stage": ["booked_on"], "job": ["inspection"]},
330
339
  "asks": [{"field": "arrived_on", "starts": "today"}],
331
- "set": {"stage": "arrived_on"}
340
+ "set": {"stage": "arrived_on"},
341
+ "button": true
332
342
  },
333
343
  {
334
344
  "type": "Act",
@@ -336,7 +346,8 @@ each section says which its record takes under **Its stages**, so the form is co
336
346
  "label": "On site",
337
347
  "when": {"stage": ["parts_ready_on"]},
338
348
  "asks": [{"field": "arrived_on", "starts": "today"}],
339
- "set": {"stage": "arrived_on"}
349
+ "set": {"stage": "arrived_on"},
350
+ "button": true
340
351
  },
341
352
  {
342
353
  "type": "Act",
@@ -344,7 +355,8 @@ each section says which its record takes under **Its stages**, so the form is co
344
355
  "label": "Completed",
345
356
  "when": {"stage": ["arrived_on"]},
346
357
  "asks": [{"field": "completed_on", "starts": "today"}],
347
- "set": {"stage": "completed_on"}
358
+ "set": {"stage": "completed_on"},
359
+ "button": true
348
360
  }
349
361
  ]
350
362
  }
@@ -461,7 +473,8 @@ each section says which its record takes under **Its stages**, so the form is co
461
473
  "when": {"trang_thai": ["dang_thue"]},
462
474
  "asks": ["tinh_trang_tra"],
463
475
  "set": {"trang_thai": "da_tra"},
464
- "confirm": true
476
+ "confirm": true,
477
+ "button": true
465
478
  },
466
479
  {
467
480
  "type": "Act",
@@ -469,7 +482,8 @@ each section says which its record takes under **Its stages**, so the form is co
469
482
  "label": "Mở lại",
470
483
  "when": {"trang_thai": ["da_tra"]},
471
484
  "set": {"trang_thai": "dang_thue"},
472
- "confirm": true
485
+ "confirm": true,
486
+ "button": true
473
487
  }
474
488
  ]
475
489
  }
@@ -584,7 +598,13 @@ each section says which its record takes under **Its stages**, so the form is co
584
598
  "children": [
585
599
  "ngay_lam",
586
600
  "tu_ngay",
587
- {"type": "Act", "key": "tao_ca_truc", "label": "Tạo ca trực", "makes": "lich_truc"}
601
+ {
602
+ "type": "Act",
603
+ "key": "tao_ca_truc",
604
+ "label": "Tạo ca trực",
605
+ "makes": "lich_truc",
606
+ "button": true
607
+ }
588
608
  ]
589
609
  }
590
610
  ]
@@ -719,7 +739,8 @@ each section says which its record takes under **Its stages**, so the form is co
719
739
  "last_counted": {"now": true},
720
740
  "counted_by": {"me": true},
721
741
  "count_note": {"input": "remark"}
722
- }
742
+ },
743
+ "button": true
723
744
  }
724
745
  ]
725
746
  },
@@ -926,7 +947,8 @@ each section says which its record takes under **Its stages**, so the form is co
926
947
  "key": "reassign",
927
948
  "label": "Reassign",
928
949
  "asks": [{"input": "to", "label": "Account manager", "type": "member", "required": true}],
929
- "set": {"account_manager": {"input": "to"}}
950
+ "set": {"account_manager": {"input": "to"}},
951
+ "button": true
930
952
  },
931
953
  {
932
954
  "type": "Act",
@@ -934,7 +956,8 @@ each section says which its record takes under **Its stages**, so the form is co
934
956
  "label": "Mark lapsed",
935
957
  "when": {"tier": ["key", "standard"]},
936
958
  "set": {"tier": "lapsed"},
937
- "confirm": true
959
+ "confirm": true,
960
+ "button": true
938
961
  },
939
962
  {
940
963
  "type": "Act",
@@ -958,7 +981,8 @@ each section says which its record takes under **Its stages**, so the form is co
958
981
  "required": true
959
982
  }
960
983
  ],
961
- "set": {"tier": {"input": "back_to"}}
984
+ "set": {"tier": {"input": "back_to"}},
985
+ "button": true
962
986
  }
963
987
  ]
964
988
  },
@@ -1356,14 +1380,16 @@ each section says which its record takes under **Its stages**, so the form is co
1356
1380
  "khach_hang.ngay_sinh",
1357
1381
  "khach_hang.dia_chi",
1358
1382
  "thanh_vien"
1359
- ]
1383
+ ],
1384
+ "button": true
1360
1385
  },
1361
1386
  {
1362
1387
  "type": "Act",
1363
1388
  "key": "giao_xu_ly",
1364
1389
  "label": "Giao người xử lý",
1365
1390
  "asks": [{"input": "nguoi", "label": "Người xử lý", "type": "member", "required": true}],
1366
- "set": {"xu_ly": {"input": "nguoi"}}
1391
+ "set": {"xu_ly": {"input": "nguoi"}},
1392
+ "button": true
1367
1393
  },
1368
1394
  {
1369
1395
  "type": "Act",
@@ -1379,7 +1405,8 @@ each section says which its record takes under **Its stages**, so the form is co
1379
1405
  }
1380
1406
  ],
1381
1407
  "set": {"du_an": {"input": "du_an_moi"}},
1382
- "confirm": true
1408
+ "confirm": true,
1409
+ "button": true
1383
1410
  }
1384
1411
  ]
1385
1412
  },
@@ -1398,13 +1425,14 @@ each section says which its record takes under **Its stages**, so the form is co
1398
1425
  "type": "Act",
1399
1426
  "key": "tao_giay_to",
1400
1427
  "label": "Tạo giấy tờ",
1428
+ "when": {"giai_doan": ["ngay_nhan_giay_to", "ngay_lap_ho_so"]},
1401
1429
  "templates": [
1402
1430
  {"template": "don_dang_ky"},
1403
1431
  {"template": "mau_02_chua_co_nha", "when": {"tinh_trang_nha_o": ["chua_co_nha"]}},
1404
1432
  {"template": "mau_03_nha_chat", "when": {"tinh_trang_nha_o": ["nha_chat"]}}
1405
1433
  ],
1406
1434
  "into": "bo_ho_so",
1407
- "when": {"giai_doan": ["ngay_nhan_giay_to", "ngay_lap_ho_so"]}
1435
+ "button": true
1408
1436
  },
1409
1437
  {
1410
1438
  "type": "Act",
@@ -1414,7 +1442,8 @@ each section says which its record takes under **Its stages**, so the form is co
1414
1442
  "requires": ["bo_ho_so", "loai_can"],
1415
1443
  "asks": ["loai_can"],
1416
1444
  "set": {"giai_doan": "ngay_nop_cdt"},
1417
- "confirm": true
1445
+ "confirm": true,
1446
+ "button": true
1418
1447
  },
1419
1448
  {
1420
1449
  "type": "Act",
@@ -1422,7 +1451,8 @@ each section says which its record takes under **Its stages**, so the form is co
1422
1451
  "label": "Đã nhận giấy tờ",
1423
1452
  "when": {"giai_doan": {"empty": true}, "dich_vu": ["tron_goi"]},
1424
1453
  "asks": [{"field": "ngay_nhan_giay_to", "starts": "today"}],
1425
- "set": {"giai_doan": "ngay_nhan_giay_to"}
1454
+ "set": {"giai_doan": "ngay_nhan_giay_to"},
1455
+ "button": true
1426
1456
  },
1427
1457
  {
1428
1458
  "type": "Act",
@@ -1430,7 +1460,8 @@ each section says which its record takes under **Its stages**, so the form is co
1430
1460
  "label": "Đã lập hồ sơ",
1431
1461
  "when": {"giai_doan": ["ngay_nhan_giay_to"], "dich_vu": ["tron_goi"]},
1432
1462
  "asks": [{"field": "ngay_lap_ho_so", "starts": "today"}],
1433
- "set": {"giai_doan": "ngay_lap_ho_so"}
1463
+ "set": {"giai_doan": "ngay_lap_ho_so"},
1464
+ "button": true
1434
1465
  },
1435
1466
  {
1436
1467
  "type": "Act",
@@ -1438,7 +1469,8 @@ each section says which its record takes under **Its stages**, so the form is co
1438
1469
  "label": "Đã bàn giao hồ sơ",
1439
1470
  "when": {"giai_doan": ["ngay_nhan_giay_to"], "dich_vu": ["lam_ho_so"]},
1440
1471
  "asks": [{"field": "ngay_ban_giao", "starts": "today"}],
1441
- "set": {"giai_doan": "ngay_ban_giao"}
1472
+ "set": {"giai_doan": "ngay_ban_giao"},
1473
+ "button": true
1442
1474
  }
1443
1475
  ]
1444
1476
  }
@@ -1450,7 +1482,8 @@ each section says which its record takes under **Its stages**, so the form is co
1450
1482
  "label": "Lập mẫu 05",
1451
1483
  "when": {"doi_tuong": ["thu_nhap_thap"]},
1452
1484
  "template": "mau_05_thu_nhap",
1453
- "paper": "giay_to.xac_nhan_thu_nhap"
1485
+ "paper": "giay_to.xac_nhan_thu_nhap",
1486
+ "button": true
1454
1487
  },
1455
1488
  {"type": "Check", "field": "chua_thu_phi", "on": ["nop_cdt"]},
1456
1489
  {"type": "Check", "field": "da_hoan_tat", "on": ["doc_giay_to"]}
@@ -1725,7 +1758,8 @@ each section says which its record takes under **Its stages**, so the form is co
1725
1758
  "label": "Đủ điều kiện",
1726
1759
  "when": {"trang_thai": ["moi"]},
1727
1760
  "requires": ["vi_sao_du_dieu_kien"],
1728
- "set": {"trang_thai": "du_dieu_kien"}
1761
+ "set": {"trang_thai": "du_dieu_kien"},
1762
+ "button": true
1729
1763
  }
1730
1764
  ]
1731
1765
  },
@@ -1766,14 +1800,16 @@ each section says which its record takes under **Its stages**, so the form is co
1766
1800
  "at": "thoi_diem",
1767
1801
  "by": "nguoi_thuc_hien",
1768
1802
  "video": "man_hinh"
1769
- }
1803
+ },
1804
+ "button": true
1770
1805
  },
1771
1806
  {
1772
1807
  "type": "Act",
1773
1808
  "key": "da_lien_he",
1774
1809
  "label": "Đánh dấu đã liên hệ",
1775
1810
  "when": {"trang_thai": ["du_dieu_kien"]},
1776
- "set": {"trang_thai": "da_lien_he"}
1811
+ "set": {"trang_thai": "da_lien_he"},
1812
+ "button": true
1777
1813
  }
1778
1814
  ]
1779
1815
  },
@@ -1792,7 +1828,8 @@ each section says which its record takes under **Its stages**, so the form is co
1792
1828
  "label": "Chuyển đổi",
1793
1829
  "when": {"trang_thai": ["da_lien_he"]},
1794
1830
  "workflow": "chuyen_doi_khach",
1795
- "confirm": true
1831
+ "confirm": true,
1832
+ "button": true
1796
1833
  }
1797
1834
  ]
1798
1835
  },
@@ -1810,14 +1847,16 @@ each section says which its record takes under **Its stages**, so the form is co
1810
1847
  "when": {"trang_thai": ["moi", "du_dieu_kien", "da_lien_he"]},
1811
1848
  "asks": ["ly_do_loai"],
1812
1849
  "set": {"trang_thai": "loai"},
1813
- "danger": true
1850
+ "danger": true,
1851
+ "button": true
1814
1852
  },
1815
1853
  {
1816
1854
  "type": "Act",
1817
1855
  "key": "mo_lai",
1818
1856
  "label": "Mở lại",
1819
1857
  "when": {"trang_thai": ["loai"]},
1820
- "set": {"trang_thai": "moi"}
1858
+ "set": {"trang_thai": "moi"},
1859
+ "button": true
1821
1860
  }
1822
1861
  ]
1823
1862
  }
@@ -1836,7 +1875,8 @@ each section says which its record takes under **Its stages**, so the form is co
1836
1875
  "key": "lam_xong",
1837
1876
  "label": "Đã làm",
1838
1877
  "when": {"tinh_trang": ["cho"]},
1839
- "set": {"tinh_trang": "xong"}
1878
+ "set": {"tinh_trang": "xong"},
1879
+ "button": true
1840
1880
  }
1841
1881
  ]
1842
1882
  }
@@ -1988,7 +2028,8 @@ each section says which its record takes under **Its stages**, so the form is co
1988
2028
  "label": "Gửi duyệt",
1989
2029
  "when": {"trang_thai": ["nhap"]},
1990
2030
  "requires": ["chung_tu", "nguoi_de_nghi"],
1991
- "set": {"trang_thai": "cho_duyet"}
2031
+ "set": {"trang_thai": "cho_duyet"},
2032
+ "button": true
1992
2033
  }
1993
2034
  ]
1994
2035
  },
@@ -2007,7 +2048,8 @@ each section says which its record takes under **Its stages**, so the form is co
2007
2048
  "label": "Rút lại",
2008
2049
  "when": {"trang_thai": ["cho_duyet", "cho_chu_tich"]},
2009
2050
  "set": {"trang_thai": "nhap"},
2010
- "confirm": true
2051
+ "confirm": true,
2052
+ "button": true
2011
2053
  }
2012
2054
  ]
2013
2055
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lotics/cli",
3
- "version": "0.321.112",
3
+ "version": "0.321.114",
4
4
  "description": "Lotics SDK and CLI for AI agents",
5
5
  "type": "module",
6
6
  "bin": {