@lotics/cli 0.307.1 → 0.309.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.
@@ -229,7 +229,7 @@ a reading's `alias` take no name the app generates (`lotics docs model/app.gener
229
229
  ```
230
230
 
231
231
  `lotics run set_app_workflow` sets its body (`lotics docs workflows`). A query set on a model's app outside
232
- the model (`set_app_queries`) is removed by the next apply, whose plan and answer note it; declared under
232
+ the model (`set_app_queries`, on the CLI or in chat) is removed by the next apply, whose plan and answer note it; declared under
233
233
  its alias in `queries`, it is the model's. A caller sees the description and
234
234
  each input's `description` and nothing else, so each says what the value is and what leaving it out means;
235
235
  `check_model` notes one that says nothing.
@@ -5,15 +5,15 @@ under an alias — a JS identifier (`/^[a-zA-Z_$][a-zA-Z0-9_$]*$/`):
5
5
 
6
6
  | Binding | Declared with | The app calls it with | An agent calls it with |
7
7
  |---|---|---|---|
8
- | Query | `set_app_queries` | `useQuery("<alias>", params?)` | `run_app_query` |
8
+ | Query | `set_app_queries` (CLI, chat) | `useQuery("<alias>", params?)` | `run_app_query` |
9
9
  | Workflow | `set_app_workflow` | `useWorkflow("<alias>")({ ...inputs })` | `run_app_workflow` |
10
- | Agent | `set_app_agent` | `useAgentRun("<alias>")({ ...inputs })` | — |
10
+ | Agent | `set_app_agent` (CLI, chat) | `useAgentRun("<alias>")({ ...inputs })` | — |
11
11
 
12
12
  Each runs under the app's authority (`{ type: "app", app_id }`), the app owner's reach — never the
13
13
  calling member's. Declaring one needs the app's owner or an admin. A write is live: the app's next
14
14
  call uses it. `get_app_capabilities` lists an app's aliases with their params and inputs.
15
15
 
16
- Each reader returns a fingerprint of what it read — `get_app_query`'s `sha`, `get_app_workflow`'s
16
+ On the CLI and in chat, each reader returns a fingerprint of what it read — `get_app_query`'s `sha`, `get_app_workflow`'s
17
17
  `body_sha`, `get_app_agent`'s `instructions_sha` — and a write built on that read passes it back:
18
18
  `set_app_queries`' `expected_shas` (alias → `sha`), `set_app_workflow`'s `expected_body_sha`,
19
19
  `set_app_agent`'s `expected_instructions_sha`, `remove_app_binding`'s `expected_sha`. The write is
@@ -38,7 +38,7 @@ A save checks what a deploy checks: every table is in this workspace and within
38
38
  every projected, filtered and sorted field resolves, every param token is declared, and a key a
39
39
  node's kind does not take (a stray `sort`, `limit`, `filter`, `search`) is refused by name.
40
40
 
41
- `set_app_queries` takes `{ <alias>: <declaration> }`, one alias or several, and merges each: send
41
+ On the CLI and in chat, `set_app_queries` takes `{ <alias>: <declaration> }`, one alias or several, and merges each: send
42
42
  only the fields you change, `null` clears `params`, `description` or `templates` (never `ast`), and a
43
43
  new alias needs an `ast`. Any other field is refused by name. An alias it omits is kept.
44
44
  `remove_app_binding` with `kind: "query"` deletes one; `get_app_query` reads one back.
@@ -146,13 +146,15 @@ refused as an alias the app does not have.
146
146
  - A call whose payload does not match `inputs` is refused before the body runs.
147
147
 
148
148
  `get_app_workflow` reads the body back; `dry_run_workflow` with `trigger_type: "app_workflow"`
149
- runs it against sample inputs before binding; `remove_app_binding` with `kind: "workflow"` unbinds
150
- it.
149
+ runs it against sample inputs before binding; on the CLI and in chat, `remove_app_binding` with
150
+ `kind: "workflow"` unbinds it.
151
151
 
152
152
  ## Agents
153
153
 
154
- `set_app_agent` binds a streaming tool-loop agent to an alias. A run streams its work to the app,
155
- returns a typed result and keeps a run history per session. The declaration:
154
+ On the CLI and in chat, `set_app_agent` binds a streaming tool-loop agent to an alias. A run streams its work to the app,
155
+ returns a typed result and keeps a run history per session.
156
+
157
+ The declaration:
156
158
 
157
159
  - `instructions` — the task, every run. A new alias needs it.
158
160
  - `tool_names` — the tools it may call, from these and no other: `analyze_pdf_template`,
@@ -189,4 +191,4 @@ returns a typed result and keeps a run history per session. The declaration:
189
191
  table. A result that validates is written to that row under the app's authority.
190
192
 
191
193
  Send only what you change: an omitted field keeps its stored value, `null` clears an optional one.
192
- `get_app_agent` reads one back; `remove_app_binding` with `kind: "agent"` deletes it.
194
+ On the CLI and in chat, `get_app_agent` reads one back; `remove_app_binding` with `kind: "agent"` deletes it.
@@ -47,7 +47,7 @@ above. A provider's refusal carries the provider's own words.
47
47
  ### bkav_cancel_invoices (workflow step)
48
48
 
49
49
  - Cancel issued invoices.
50
- - A cancelled invoice still reports to the tax authority; correcting one instead is a replacement or adjustment through bkav_submit_invoices. (workflow step)
50
+ - A cancelled invoice still reports to the tax authority; correcting one instead is a replacement or adjustment through bkav_submit_invoices. (workflow step, chat)
51
51
 
52
52
  **Inputs**
53
53
 
@@ -1069,7 +1069,7 @@ above. A provider's refusal carries the provider's own words.
1069
1069
  ### facebook_list_comments (workflow step)
1070
1070
 
1071
1071
  - Read the most recent comments left on a Facebook Page's posts.
1072
- - Reply with facebook_reply_to_comment, passing the comment_id. (workflow step)
1072
+ - Reply with facebook_reply_to_comment, passing the comment_id. (workflow step, chat)
1073
1073
 
1074
1074
  **Inputs**
1075
1075
 
@@ -1094,7 +1094,7 @@ above. A provider's refusal carries the provider's own words.
1094
1094
  ### facebook_list_conversations (workflow step)
1095
1095
 
1096
1096
  - Read a Facebook Page's Messenger conversations with their recent messages.
1097
- - Answer someone with facebook_send_message, passing the person_id. (workflow step)
1097
+ - Answer someone with facebook_send_message, passing the person_id. (workflow step, chat)
1098
1098
 
1099
1099
  **Inputs**
1100
1100
 
@@ -1129,7 +1129,7 @@ above. A provider's refusal carries the provider's own words.
1129
1129
  | --- | --- | --- | --- |
1130
1130
  | `connected_account_id` | string | yes | |
1131
1131
  | `page_id` | string | yes | The page that owns the post the comment is on. |
1132
- | `comment_id` | string | yes | From facebook_list_comments. (workflow step) |
1132
+ | `comment_id` | string | yes | From facebook_list_comments. (workflow step, chat) |
1133
1133
  | `message` | string | yes | |
1134
1134
 
1135
1135
  **Answer**
@@ -1149,7 +1149,7 @@ above. A provider's refusal carries the provider's own words.
1149
1149
  | --- | --- | --- | --- |
1150
1150
  | `connected_account_id` | string | yes | |
1151
1151
  | `page_id` | string | yes | The page the person wrote to. |
1152
- | `person_id` | string | yes | From facebook_list_conversations. Page-scoped to this page. (workflow step) |
1152
+ | `person_id` | string | yes | From facebook_list_conversations. Page-scoped to this page. (workflow step, chat) |
1153
1153
  | `message` | string | yes | |
1154
1154
 
1155
1155
  **Answer**
@@ -1187,8 +1187,8 @@ above. A provider's refusal carries the provider's own words.
1187
1187
  | Name | Type | Required | What it is |
1188
1188
  | --- | --- | --- | --- |
1189
1189
  | `connected_account_id` | string | yes | FedEx connected account |
1190
- | `reference` | string | yes | The draft's reference (Open Ship index) from fedex_create_draft_shipment (workflow step) |
1191
- | `master_tracking_number` | string | | The master_tracking_number returned by fedex_create_draft_shipment — required to finalize the label (workflow step) |
1190
+ | `reference` | string | yes | The draft's reference (Open Ship index) from fedex_create_draft_shipment (workflow step, chat) |
1191
+ | `master_tracking_number` | string | | The master_tracking_number returned by fedex_create_draft_shipment — required to finalize the label (workflow step, chat) |
1192
1192
 
1193
1193
  **Answer**
1194
1194
 
@@ -1201,7 +1201,7 @@ above. A provider's refusal carries the provider's own words.
1201
1201
  ### fedex_create_draft_shipment (workflow step)
1202
1202
 
1203
1203
  - Create a FedEx draft (Open Ship) booking — no label yet.
1204
- - Confirm later with fedex_confirm_shipment. reference is a unique key you choose (e.g. the shipment order number) used to confirm or cancel. (workflow step)
1204
+ - Confirm later with fedex_confirm_shipment. reference is a unique key you choose (e.g. the shipment order number) used to confirm or cancel. (workflow step, chat)
1205
1205
  - Supports multiple packages, special services, and (international) customs commodities.
1206
1206
 
1207
1207
  **Inputs**
@@ -1261,7 +1261,7 @@ above. A provider's refusal carries the provider's own words.
1261
1261
  | --- | --- | --- | --- |
1262
1262
  | `reference` | string | yes | |
1263
1263
  | `status` | "draft" | yes | |
1264
- | `master_tracking_number` | string | | Pass this to fedex_confirm_shipment to finalize the draft (workflow step) |
1264
+ | `master_tracking_number` | string | | Pass this to fedex_confirm_shipment to finalize the draft (workflow step, chat) |
1265
1265
 
1266
1266
  ### fedex_create_shipment (workflow step)
1267
1267
 
@@ -2701,7 +2701,7 @@ above. A provider's refusal carries the provider's own words.
2701
2701
 
2702
2702
  ### misa_save_bank_voucher (workflow step)
2703
2703
 
2704
- - Push a bank voucher (deposit / withdrawal / transfer) into MISA AMIS. voucher_type: 1 deposit (báo có), 3 withdrawal/debit-advice (báo nợ), 2 internal transfer. bank_account_id is the company-side bank account GUID — look it up with misa_get_dictionary (data_type 8). (workflow step)
2704
+ - Push a bank voucher (deposit / withdrawal / transfer) into MISA AMIS. voucher_type: 1 deposit (báo có), 3 withdrawal/debit-advice (báo nợ), 2 internal transfer. bank_account_id is the company-side bank account GUID — look it up with misa_get_dictionary (data_type 8). (workflow step, chat)
2705
2705
 
2706
2706
  **Inputs**
2707
2707
 
@@ -2722,7 +2722,7 @@ above. A provider's refusal carries the provider's own words.
2722
2722
  | `custom_field3` | string | | |
2723
2723
  | `custom_field4` | string | | |
2724
2724
  | `custom_field5` | string | | |
2725
- | `bank_account_id` | string | yes | Bank account GUID in MISA — look up via misa_get_dictionary (workflow step) |
2725
+ | `bank_account_id` | string | yes | Bank account GUID in MISA — look up via misa_get_dictionary (workflow step, chat) |
2726
2726
  | `account_object_code` | string | | |
2727
2727
  | `account_object_name` | string | | |
2728
2728
  | `total_amount_oc` | number | yes | |
@@ -2885,7 +2885,7 @@ above. A provider's refusal carries the provider's own words.
2885
2885
 
2886
2886
  ### misa_save_sales_voucher (workflow step)
2887
2887
 
2888
- - Push a sales voucher (invoice / sales return / discount-credit-note / sales order) into MISA AMIS. voucher_type: 11 invoice, 13 sales voucher, 12 return, 10 discount/credit note, 20 sales order. reftype refines the sub-type (e.g. 3530 unpaid sale, 3560 sales invoice, 3571 service cash). account_object_code identifies the customer in MISA — must already exist (use misa_save_dictionary first if not). (workflow step)
2888
+ - Push a sales voucher (invoice / sales return / discount-credit-note / sales order) into MISA AMIS. voucher_type: 11 invoice, 13 sales voucher, 12 return, 10 discount/credit note, 20 sales order. reftype refines the sub-type (e.g. 3530 unpaid sale, 3560 sales invoice, 3571 service cash). account_object_code identifies the customer in MISA — must already exist (use misa_save_dictionary first if not). (workflow step, chat)
2889
2889
  - MISA sync ack only confirms queueing; final accept/reject arrives async on the registered callback URL.
2890
2890
 
2891
2891
  **Inputs**
package/docs/workflows.md CHANGED
@@ -62,8 +62,8 @@ await send_email({
62
62
  | validate | `validate({ checks: [{ fail_when: <expr>, field_key: "...", message: <expr> }, ...] });` |
63
63
 
64
64
  Every step's inputs, the values each takes and its answer: `lotics tools <name>` prints them; the steps only a body
65
- runs — a connection's, a mail's — are all in `workflow_steps`. `query_integration_tools` lists the workspace's
66
- connections and the steps each opens.
65
+ runs — a connection's, a mail's — are all in `workflow_steps`. A person connects a service in Lotics under
66
+ Settings → Connections; a step names that connection by its `connected_account_id`.
67
67
 
68
68
  `return` is a call, not a JavaScript `return` statement. `validate` ends the workflow with an error
69
69
  when a check's `fail_when` is truthy; the check's `field_key` names the control its message lands on —
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lotics/cli",
3
- "version": "0.307.1",
3
+ "version": "0.309.0",
4
4
  "description": "Lotics SDK and CLI for AI agents",
5
5
  "type": "module",
6
6
  "bin": {