@lotics/app-sdk 0.54.0 → 0.54.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.
- package/docs/ai.md +2 -2
- package/docs/files.md +8 -3
- package/package.json +1 -1
package/docs/ai.md
CHANGED
|
@@ -65,7 +65,7 @@ await recognize.run({ image_file_id: fileId }, { sessionId });
|
|
|
65
65
|
| Part `type` | Carries | Rendering intent |
|
|
66
66
|
|---|---|---|
|
|
67
67
|
| `"text"` | `text`, `state` | Answer prose, grows as it streams |
|
|
68
|
-
| `"reasoning"` | `text`, `state` | The agent's thinking — a **distinct part**, kept out of `text`, so `AgentRun` shows it collapsed / revealed on demand. Only produced when the agent's declared model supports thinking (**Sonnet
|
|
68
|
+
| `"reasoning"` | `text`, `state` | The agent's thinking — a **distinct part**, kept out of `text`, so `AgentRun` shows it collapsed / revealed on demand. Only produced when the agent's declared model supports thinking (**Sonnet / Opus**, not Haiku) — a Haiku agent never emits reasoning |
|
|
69
69
|
| `"dynamic-tool"` | `toolName`, `toolCallId`, `state` (ai's tool lifecycle — `input-available` → `output-available` / `output-error`), `input`, `output`, `errorText` | One tool call — opens running the moment it fires, settles when its result arrives. `input`/`output` ride along for `AgentRun`'s on-demand reveal, not for the feed row |
|
|
70
70
|
|
|
71
71
|
The terminal `submit_result` call is captured into `output`, **not** rendered as a tool part (structured agents therefore have no visible final step). Source/file parts aren't emitted by app agents. `parts` is exactly what `@lotics/ui` `AgentRun` renders, so the pairing needs **no adapter and no hand-assembly**:
|
|
@@ -79,7 +79,7 @@ The terminal `submit_result` call is captured into `output`, **not** rendered as
|
|
|
79
79
|
/>
|
|
80
80
|
```
|
|
81
81
|
|
|
82
|
-
`AgentRun` renders thinking collapsed, groups consecutive tool calls, and expands each tool's input/output in place on press — all for free. **Errors surface two ways:** a per-tool failure is an `output-error` part (amber dot, reason in the expanded Error panel — the feed flows on, exactly like a run that retried and recovered); a **breaking** error that killed the run lives in `run.error` (not in `parts`) — pass it as `error` and it renders as a terminal danger row. Never rebuild this feed by hand.
|
|
82
|
+
`AgentRun` renders thinking collapsed, groups consecutive tool calls, and expands each tool's input/output in place on press — all for free. Running it in a bounded container (a dialog, a panel)? Wrap it in `@lotics/ui`'s `FollowScroll` so the container follows the stream instead of letting new content grow below the fold. **Errors surface two ways:** a per-tool failure is an `output-error` part (amber dot, reason in the expanded Error panel — the feed flows on, exactly like a run that retried and recovered); a **breaking** error that killed the run lives in `run.error` (not in `parts`) — pass it as `error` and it renders as a terminal danger row. Never rebuild this feed by hand.
|
|
83
83
|
|
|
84
84
|
### `output` typing and the inner-field caveat
|
|
85
85
|
|
package/docs/files.md
CHANGED
|
@@ -52,13 +52,18 @@ use-access to the app itself.
|
|
|
52
52
|
The pipeline is: optimize (images only) → mint a presigned upload URL → `PUT` the bytes straight
|
|
53
53
|
to object storage → finalize. The API server never proxies the bytes.
|
|
54
54
|
|
|
55
|
-
- **Image optimization.** JPEG/PNG/WebP
|
|
55
|
+
- **Image optimization.** JPEG/PNG/WebP images larger than 1280 px on the long edge are
|
|
56
56
|
resized to ≤1280 px and re-encoded as JPEG at quality 0.75 before upload — phone photos
|
|
57
57
|
typically shrink 10–20×. Non-image files pass through unchanged, and any optimization failure
|
|
58
58
|
falls back to uploading the original bytes (never an upload error).
|
|
59
|
-
**Warning:** PNG/WebP
|
|
59
|
+
**Warning:** PNG/WebP larger than 1280 px on the long edge are *converted to JPEG* —
|
|
60
60
|
transparency is lost and the stored filename's extension becomes `.jpg`. If you need lossless
|
|
61
|
-
originals, keep
|
|
61
|
+
originals, keep PNG/WebP ≤1280 px or upload them as non-image MIME types.
|
|
62
|
+
- **HEIC/HEIF always becomes JPEG, regardless of size.** Most browsers cannot decode HEIC
|
|
63
|
+
(the Samsung/iPhone camera default), so where the browser can't convert it client-side the
|
|
64
|
+
server converts it at finalize under the same ≤1280 px / q0.75 policy (conversion failure
|
|
65
|
+
stores the original bytes — never an upload error). Either way the stored file — and the
|
|
66
|
+
file identity your app gets back — is `name.jpg` with `mime_type: "image/jpeg"`.
|
|
62
67
|
- **Transport resilience.** The storage `PUT` has a 5-minute per-request timeout and retries
|
|
63
68
|
network errors / timeouts / 5xx up to 3 attempts with 1 s → 2 s backoff between attempts. 4xx
|
|
64
69
|
responses are terminal (no retry). The presigned upload URL itself is valid for 10 minutes.
|