@lotics/cli 0.320.1 → 0.320.2

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.
@@ -148,7 +148,9 @@ the one `get_app` lists for it, it replaces the body. On an app written as a tre
148
148
  `key` or an Act's `workflow` — and the node states `inputs`, `outputs` and `description`
149
149
  (`reference/workflow-node`, whose value shapes differ from the **Inputs** below): a call stating any of
150
150
  them for it is refused, and outputs the node leaves out are derived from the body. An alias the tree
151
- names nowhere is archived by the next `set_app`. A Workflow node runs only for someone who holds the
151
+ names nowhere is archived by the next `set_app`. `set_app`'s `workflows` takes the same sources and saves them in the
152
+ same write as the tree: a change to what a workflow takes or hands back that its saved body no longer meets is refused
153
+ unless the write carries the new body. A Workflow node runs only for someone who holds the
152
154
  app: on an app shared by a public link, a visitor's call of it is refused as an alias the app does
153
155
  not have. This page's `inputs` and `outputs` are for a custom-code app.
154
156
 
@@ -188,7 +188,7 @@ A table is named by its alias wherever a call names one (`table_id`, a link's `t
188
188
  - **`force` consents to losing values:** deleting a field rows hold, removing an option rows hold, and a change of type
189
189
  or format that does not convert every value (a date made a month cuts a day other than the 1st, a text made a time
190
190
  clears a cell holding none). Unforced, the call is refused naming the cells; the API's table and field routes take
191
- `force` in the body and refuse with `error_code` `ConversionNeedsForce`, its `findings` counting the `cells` per field.
191
+ `force` in the body and refuse with `error_code` `ConversionNeedsForce`, its `findings` counting the `cells` per field. A formula, lookup or rollup holds what it computes, so it is deleted without it.
192
192
  - A field the call makes required with a `default` answers how many rows took it: `defaulted` per field alias on
193
193
  `set_tables`, `rows_defaulted` on the API's table and field routes.
194
194
  - A money formula is proven by its numbers. `query_records` with `aggregate` the affected totals before the change and after, and
@@ -15,7 +15,7 @@ This is a **capability + usage** guide. A tool's exact input schema is in its ow
15
15
  |---|---|---|---|
16
16
  | `pdf-form` | fields overlaid on an **uploaded PDF** at fixed positions | PDF | `"pdf-form"` |
17
17
  | `html` (a PDF) | an **HTML + Handlebars** layout you write from scratch | PDF | `"html"` |
18
- | `excel` | an **uploaded `.xlsx`** with `{{marker}}` cells | `.xlsx` | `"excel"` |
18
+ | `excel` | an **uploaded `.xlsx` or `.xlsm`** with `{{marker}}` cells | `.xlsx` | `"excel"` |
19
19
  | `word` | an **uploaded `.docx`** with `{{marker}}`s | `.docx` | `"word"` |
20
20
  | `email` | an **inline HTML + Handlebars** body, rendered when the email is sent | email | `"email"` |
21
21
 
@@ -79,7 +79,9 @@ this host, give the person the file and a `person` drop link.
79
79
  count the rest, and `pages_unavailable` says why a template's pages could not be read.
80
80
  A positioned text field prints in Arimo, which covers Vietnamese; a PDF's own field keeps its font while its value is
81
81
  ASCII and switches to Arimo past it.
82
- - **`excel`** — a `.xlsx` with `{{marker}}`s in the cells to fill, and a `variables` map. Markers are validated at create
82
+ - **`excel`** — a `.xlsx` or `.xlsm` with `{{marker}}`s in the cells to fill, and a `variables` map. `sheet` names the sheet
83
+ that is the paper in a workbook holding others, and the template leaves the rest out; a formula reading a sheet left out
84
+ is refused. A macro workbook is kept without its macros and the buttons that run them. Markers are validated at create
83
85
  time: a structural error blocks the save, and a declared variable with no marker comes back in `unmarked_variables`
84
86
  (skipped). `set_template` with `dry_run: true` runs every check and stores nothing; a refusal lists every error with its code and cell, and `warnings[]` (`severity`, `code`, `message`, `sheet_name?`, `cell?`) comes back with the answer. Pass
85
87
  raw numbers, ISO dates and booleans at generate time; the cell's number format shows them. A cell's format also decides
@@ -105,8 +107,10 @@ the `set_template` description for the reference; here is the capability:
105
107
  invoice lines, order rows, tables. Excel and the HTML/email engines use a Handlebars-style
106
108
  `{{#each items}}…{{/each}}`; Word uses `{{FOR item IN items}}…{{$item.field}}…{{END-FOR item}}`. The HTML and email types
107
109
  also offer an auto-rendered `table` variable — declare its columns and pass an array, no
108
- hand-written loop. (Excel always uses the `{{#each}}` marker rows — it has no auto-rendered
109
- `table` type; its variable types are string/number/date/boolean/array.) Inside a loop the row's number counted from 1
110
+ hand-written loop. Excel marks the rows that repeat with `{{#each items}}` and `{{/each}}`, each alone in a row above and
111
+ below them, or inline in the paper's own rows: `{{#each items}}` opens the first repeated row's first cell holding text
112
+ and `{{/each}}` closes the last one's last (a formula cell is passed over), so a one-row body reads `{{#each lines}}{{@ordinal}}` … `{{amount}}{{/each}}`.
113
+ (Excel has no auto-rendered `table` type; its variable types are string/number/date/boolean/array.) Inside a loop the row's number counted from 1
110
114
  is `{{@ordinal}}` (Excel, HTML, email) or `{{$ordinal}}` (Word), the innermost loop's: an STT column is a cell holding
111
115
  `{{@ordinal}}` beside the row's other markers. `{{@index}}` counts from 0.
112
116
  - **Columns across** — a column per item of a list, for a grid of rows by days or by kinds. HTML/email nest a
package/docs/workflows.md CHANGED
@@ -778,6 +778,9 @@ return({ status: "success", message: "Invoiced", data: { invoice_code: made.invo
778
778
 
779
779
  4. `run_app_workflow` with `dry_run: true`, then the same call without it.
780
780
 
781
+ To change later what it takes or hands back, send the node's change and the new body in one `set_app`, the body under
782
+ `workflows`.
783
+
781
784
  A step wants the provider's own ids (`branch_id`, `sold_by_id`, `product_id`) and no tool lists them: declare a Workflow
782
785
  whose body calls the provider's `list_*` workflow step (`kiotviet_list_branches`), run it, and read the ids from its answer.
783
786
  No step lists KiotViet's users: read `sold_by_id` off a row `kiotviet_list_invoices` returns (KiotViet's `soldById`), or ask the owner.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lotics/cli",
3
- "version": "0.320.1",
3
+ "version": "0.320.2",
4
4
  "description": "Lotics SDK and CLI for AI agents",
5
5
  "type": "module",
6
6
  "bin": {