@lotics/app-sdk 0.74.0 → 0.75.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.
Files changed (2) hide show
  1. package/docs/ai.md +11 -0
  2. package/package.json +2 -2
package/docs/ai.md CHANGED
@@ -216,6 +216,17 @@ Sessions are scoped to the authenticated member who ran them: two members using
216
216
 
217
217
  Every file in a `multi` input is materialized — nothing is collapsed to the first. Get the ids from [`useFileUpload` / `useAttachments`](./files.md).
218
218
 
219
+ **So do not dispatch on the file type.** Every tier above reads, which means the format tells you
220
+ nothing about what a document IS — the same claim form arrives as `.xlsx` from a laptop, as a PDF
221
+ through a chat app, and as a photo of a printout; an invoice arrives as PDF, as the XML beside it,
222
+ or as a screenshot. An intake that routes on the extension is reading the envelope, and it fails
223
+ SILENTLY: the wrong extractor runs, returns something correctly shaped, and the user is handed a
224
+ confident wrong answer. Let one agent read the drop and say what each document is, keyed on what
225
+ only the content carries. Prefer separate output slots (`don_hang`, `hoa_don`, plus a named
226
+ `bo_qua` for what fits neither) over a `loai` discriminator beside a payload — which slot a
227
+ document lands in IS the classification, so there is no second field free to disagree with it, and
228
+ nothing disappears quietly.
229
+
219
230
  **Why no tool:** the content ends up in the agent's context either way, so making it fetch what the server already holds costs a model round-trip and buys nothing. It also keeps the capability boundary tight — an agent that reads its own input never gains the ability to read *other* files in the workspace.
220
231
 
221
232
  **When to add a tool anyway.** Only to reach *past* what was inlined. A spreadsheet is materialized at 100 rows × 50 columns per sheet and a Word file at 1,000 elements; overflow is reported, never silent. If the agent must read row 4,000 of a large sheet, add `excel_get_range` / `excel_find_cells` (or `view_files` for an ad-hoc second look at a different file).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lotics/app-sdk",
3
- "version": "0.74.0",
3
+ "version": "0.75.1",
4
4
  "description": "Runtime SDK for Lotics custom-code apps — typed hooks, postMessage bridge, mount entry point",
5
5
  "type": "module",
6
6
  "exports": {
@@ -45,7 +45,7 @@
45
45
  "@types/react-dom": "^19.0.0",
46
46
  "react": "19.2.3",
47
47
  "react-dom": "19.2.3",
48
- "react-router": "7.18.1"
48
+ "react-router": "7.18.2"
49
49
  },
50
50
  "keywords": [
51
51
  "lotics",