@lowdefy/docs-content 0.0.0-experimental-20260928120643 → 6.1.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.
Files changed (226) hide show
  1. package/README.md +0 -1
  2. package/content/actions/link.md +0 -17
  3. package/content/actions/login.md +5 -23
  4. package/content/actions/logout.md +5 -5
  5. package/content/actions/pdfmake.md +2 -2
  6. package/content/actions/setdarkmode.md +2 -2
  7. package/content/agents/agent-properties.md +2 -4
  8. package/content/agents/agentchat.md +6 -21
  9. package/content/agents/agentconversations.md +2 -2
  10. package/content/concepts/ai-agent-docs.md +101 -313
  11. package/content/concepts/cli.md +3 -34
  12. package/content/concepts/connections-and-requests.md +0 -402
  13. package/content/concepts/custom-html.md +0 -40
  14. package/content/concepts/custom-styling.md +5 -50
  15. package/content/concepts/events-and-actions.md +2 -64
  16. package/content/concepts/i18n.md +2 -7
  17. package/content/concepts/keyboard-shortcuts.md +2 -2
  18. package/content/concepts/layout-overview.md +1 -1
  19. package/content/concepts/logger.md +0 -81
  20. package/content/concepts/lowdefy-schema.md +1 -4
  21. package/content/concepts/menus.md +7 -7
  22. package/content/concepts/module-authoring.md +2 -2
  23. package/content/connections/anthropic.md +2 -162
  24. package/content/connections/awss3.md +0 -54
  25. package/content/connections/google.md +2 -162
  26. package/content/connections/mongodb.md +3 -121
  27. package/content/connections/openai-connection.md +2 -162
  28. package/content/container-blocks/affix.md +7 -47
  29. package/content/container-blocks/alert.md +24 -76
  30. package/content/container-blocks/badge.md +24 -100
  31. package/content/container-blocks/box.md +9 -9
  32. package/content/container-blocks/card.md +25 -80
  33. package/content/container-blocks/carousel.md +7 -60
  34. package/content/container-blocks/collapse.md +9 -87
  35. package/content/container-blocks/configprovider.md +13 -35
  36. package/content/container-blocks/confirmmodal.md +23 -69
  37. package/content/container-blocks/content.md +98 -62
  38. package/content/container-blocks/descriptions.md +4 -45
  39. package/content/container-blocks/drawer.md +28 -92
  40. package/content/container-blocks/dropdownmenu.md +31 -119
  41. package/content/container-blocks/flex.md +62 -40
  42. package/content/container-blocks/footer.md +11 -15
  43. package/content/container-blocks/googlemapsheatmap.md +1 -1
  44. package/content/container-blocks/googlemapsscript.md +2 -2
  45. package/content/container-blocks/header.md +36 -71
  46. package/content/container-blocks/label.md +7 -34
  47. package/content/container-blocks/layout.md +34 -52
  48. package/content/container-blocks/masonry.md +71 -17
  49. package/content/container-blocks/mobilemenu.md +88 -131
  50. package/content/container-blocks/modal.md +26 -114
  51. package/content/container-blocks/pageheadermenu.md +31 -81
  52. package/content/container-blocks/pagesidebarlayout.md +26 -169
  53. package/content/container-blocks/pagesidermenu.md +42 -95
  54. package/content/container-blocks/popover.md +31 -34
  55. package/content/container-blocks/result.md +21 -32
  56. package/content/container-blocks/sider.md +122 -85
  57. package/content/container-blocks/span.md +7 -7
  58. package/content/container-blocks/spinner.md +3 -3
  59. package/content/container-blocks/splitter.md +68 -150
  60. package/content/container-blocks/tabs.md +12 -64
  61. package/content/container-blocks/tooltip.md +46 -22
  62. package/content/container-blocks/watermark.md +4 -22
  63. package/content/controls/reject.md +2 -4
  64. package/content/controls/throw.md +0 -1
  65. package/content/controls/try.md +2 -3
  66. package/content/deployment/deployment-environments.md +6 -8
  67. package/content/deployment/docker.md +7 -22
  68. package/content/deployment/node-server.md +0 -4
  69. package/content/deployment/vercel.md +6 -13
  70. package/content/display-blocks/aggrid.md +11 -26
  71. package/content/display-blocks/anchor.md +15 -15
  72. package/content/display-blocks/avatar.md +37 -57
  73. package/content/display-blocks/breadcrumb.md +21 -70
  74. package/content/display-blocks/button.md +18 -92
  75. package/content/display-blocks/calendar.md +0 -12
  76. package/content/display-blocks/dangeroushtml.md +1 -1
  77. package/content/display-blocks/difflist.md +1 -1
  78. package/content/display-blocks/difftimeline.md +1 -1
  79. package/content/display-blocks/divider.md +3 -64
  80. package/content/display-blocks/dropdownbutton.md +28 -79
  81. package/content/display-blocks/echart.md +1 -35
  82. package/content/display-blocks/floatbutton.md +42 -129
  83. package/content/display-blocks/html.md +1 -61
  84. package/content/display-blocks/icon.md +67 -250
  85. package/content/display-blocks/menu.md +73 -145
  86. package/content/display-blocks/message.md +124 -38
  87. package/content/display-blocks/notification.md +222 -94
  88. package/content/display-blocks/paragraph.md +9 -59
  89. package/content/display-blocks/progress.md +17 -96
  90. package/content/display-blocks/qrcode.md +4 -19
  91. package/content/display-blocks/s3download.md +1 -1
  92. package/content/display-blocks/search.md +7 -17
  93. package/content/display-blocks/skeletonbutton.md +0 -1
  94. package/content/display-blocks/skeletoninput.md +0 -1
  95. package/content/display-blocks/statistic.md +17 -75
  96. package/content/display-blocks/steps.md +25 -58
  97. package/content/display-blocks/tag.md +17 -102
  98. package/content/display-blocks/title.md +11 -50
  99. package/content/display-blocks/tour.md +23 -33
  100. package/content/input-blocks/autocomplete.md +9 -81
  101. package/content/input-blocks/buttonselector.md +8 -45
  102. package/content/input-blocks/checkboxselector.md +7 -97
  103. package/content/input-blocks/checkboxswitch.md +3 -33
  104. package/content/input-blocks/colorselector.md +14 -63
  105. package/content/input-blocks/daterangeselector.md +45 -165
  106. package/content/input-blocks/dateselector.md +41 -139
  107. package/content/input-blocks/datetimeselector.md +49 -158
  108. package/content/input-blocks/inputgallery.md +3 -3
  109. package/content/input-blocks/monthselector.md +52 -120
  110. package/content/input-blocks/multipleselector.md +39 -150
  111. package/content/input-blocks/numberinput.md +12 -98
  112. package/content/input-blocks/pagination.md +14 -70
  113. package/content/input-blocks/paragraphinput.md +37 -51
  114. package/content/input-blocks/passwordinput.md +6 -60
  115. package/content/input-blocks/phonenumberinput.md +26 -59
  116. package/content/input-blocks/radioselector.md +7 -83
  117. package/content/input-blocks/ratingslider.md +26 -57
  118. package/content/input-blocks/s3uploadbutton.md +24 -24
  119. package/content/input-blocks/s3uploaddragger.md +3 -3
  120. package/content/input-blocks/s3uploadphoto.md +5 -5
  121. package/content/input-blocks/segmentedselector.md +32 -72
  122. package/content/input-blocks/selector.md +21 -109
  123. package/content/input-blocks/switch.md +17 -65
  124. package/content/input-blocks/textarea.md +3 -32
  125. package/content/input-blocks/textinput.md +28 -69
  126. package/content/input-blocks/tiptapmentioninput.md +1 -1
  127. package/content/input-blocks/titleinput.md +12 -39
  128. package/content/input-blocks/treeinput.md +25 -49
  129. package/content/input-blocks/treemultipleselector.md +10 -127
  130. package/content/input-blocks/treeselector.md +9 -97
  131. package/content/input-blocks/upload.md +15 -64
  132. package/content/input-blocks/uploaddragger.md +1 -17
  133. package/content/input-blocks/uploadphoto.md +1 -18
  134. package/content/input-blocks/weekselector.md +55 -120
  135. package/content/list-blocks/controlledlist.md +15 -24
  136. package/content/list-blocks/list.md +11 -11
  137. package/content/list-blocks/masonrylist.md +34 -7
  138. package/content/migration/upgrade-guide.md +0 -1
  139. package/content/operators/_app.md +1 -2
  140. package/content/operators/_error.md +1 -23
  141. package/content/operators/_get.md +6 -6
  142. package/content/operators/_operator.md +3 -17
  143. package/content/operators/_ref.md +0 -258
  144. package/content/operators/_type.md +3 -14
  145. package/content/operators/_user.md +3 -3
  146. package/content/other/introduction.md +1 -1
  147. package/content/plugins/plugins-dev.md +0 -66
  148. package/content/plugins/plugins-introduction.md +1 -27
  149. package/content/testing/e2e-configuration.md +1 -8
  150. package/content/testing/e2e-getting-started.md +1 -1
  151. package/content/testing/e2e-introduction.md +1 -1
  152. package/content/tutorial/tutorial-actions-operators.md +2 -2
  153. package/content/tutorial/tutorial-add-blocks.md +2 -2
  154. package/content/tutorial/tutorial-create-page.md +2 -48
  155. package/content/tutorial/tutorial-display-data-page.md +3 -3
  156. package/content/tutorial/tutorial-requests-sql.md +0 -153
  157. package/content/tutorial/tutorial-start.md +1 -66
  158. package/content/user-authentication/login-and-logout.md +8 -158
  159. package/content/user-authentication/users-introduction.md +0 -8
  160. package/index.json +2 -6065
  161. package/package.json +1 -7
  162. package/scripts/extractAgentDocs.js +4 -36
  163. package/content/actions/emailotpsend.md +0 -58
  164. package/content/actions/emailotpverify.md +0 -77
  165. package/content/actions/getlocalstorage.md +0 -41
  166. package/content/actions/magiclinkverify.md +0 -113
  167. package/content/actions/posthogalias.md +0 -29
  168. package/content/actions/posthogcapture.md +0 -49
  169. package/content/actions/posthogcapturepageleave.md +0 -38
  170. package/content/actions/posthogfeatureflag.md +0 -50
  171. package/content/actions/posthoggroup.md +0 -37
  172. package/content/actions/posthogidentify.md +0 -54
  173. package/content/actions/posthoginit.md +0 -66
  174. package/content/actions/posthogoptin.md +0 -29
  175. package/content/actions/posthogoptout.md +0 -29
  176. package/content/actions/posthogpageview.md +0 -37
  177. package/content/actions/posthogreloadfeatureflags.md +0 -47
  178. package/content/actions/posthogreset.md +0 -28
  179. package/content/actions/posthogsetpersonproperties.md +0 -36
  180. package/content/actions/removelocalstorage.md +0 -26
  181. package/content/actions/setlocalstorage.md +0 -32
  182. package/content/adapter-reference/mongodbauthadapter.md +0 -46
  183. package/content/agents/agents-introduction.md +0 -107
  184. package/content/callback-reference/auth0logoutcallback.md +0 -54
  185. package/content/concepts/blocks.md +0 -150
  186. package/content/concepts/dynamic-page-content.md +0 -304
  187. package/content/concepts/html-attributes.md +0 -285
  188. package/content/concepts/lowdefy-api.md +0 -1110
  189. package/content/concepts/notifications.md +0 -155
  190. package/content/concepts/page-and-app-state.md +0 -244
  191. package/content/concepts/theming.md +0 -582
  192. package/content/connections/aigateway.md +0 -368
  193. package/content/connections/axioshttp.md +0 -181
  194. package/content/controls/while.md +0 -46
  195. package/content/display-blocks/clickablehtml.md +0 -239
  196. package/content/display-blocks/eventlog.md +0 -363
  197. package/content/display-blocks/pollingtimer.md +0 -263
  198. package/content/input-blocks/captcha.md +0 -40
  199. package/content/input-blocks/placesautocomplete.md +0 -319
  200. package/content/input-blocks/tagmultipleselector.md +0 -114
  201. package/content/input-blocks/tagselector.md +0 -114
  202. package/content/migration/auth-upgrade.md +0 -327
  203. package/content/migration/v3-to-v4.md +0 -417
  204. package/content/migration/v6-to-v7.md +0 -222
  205. package/content/operators/_cron.md +0 -292
  206. package/content/other/mongodbadapter.md +0 -3
  207. package/content/plugins/plugins-icon-sets.md +0 -267
  208. package/content/plugins/posthog.md +0 -275
  209. package/content/provider-reference/auth-js-providers.md +0 -107
  210. package/content/provider-reference/openidconnectprovider.md +0 -44
  211. package/content/testing/config-tests.md +0 -278
  212. package/content/tutorial/tutorial-requests-api.md +0 -155
  213. package/content/user-authentication/auth-configuration.md +0 -266
  214. package/content/user-authentication/auth-steps.md +0 -138
  215. package/content/user-authentication/mcp-oauth.md +0 -292
  216. package/content/user-authentication/organizations.md +0 -221
  217. package/content/user-authentication/protected-pages-apis.md +0 -97
  218. package/content/user-authentication/roles.md +0 -49
  219. package/content/user-authentication/two-factor.md +0 -229
  220. package/content/user-authentication/user-object.md +0 -58
  221. package/content/websockets/websocket-publish.md +0 -108
  222. package/content/websockets/websocket-subscriptions.md +0 -100
  223. package/content/websockets/websockets-introduction.md +0 -97
  224. package/hazards.json +0 -44
  225. package/scripts/hashDocSources.js +0 -38
  226. package/scripts/recordSourceHashes.js +0 -88
@@ -256,11 +256,9 @@ events:
256
256
  searchOpen: true
257
257
  ```
258
258
 
259
- ## Page lifecycle events
259
+ ## Page initialization events
260
260
 
261
- The first blocks on a page, usually a [`container`](/container) type block, can define page lifecycle events. The page initialization events `onInit` and `onInitAsync` are triggered when the page is first loaded, and the browser lifecycle events `onVisible`, `onHidden`, `onOnline`, `onOffline` and `onResize` are triggered while the page stays open. All blocks have `onMount` and `onMountAsync` events, that can be used to initialize the page or blocks.
262
-
263
- ### Page initialization events
261
+ The first blocks on a page, usually a [`container`](/container) type block, can define `onInit` and `onInitAsync` events. All blocks have `onMount` and `onMountAsync` events, that can be used to initialize the page or blocks.
264
262
 
265
263
  The `onInit` event is triggered the first time a page is loaded. This event blocks page render, in other words, the page __will__ remain in a loading state, rendering only the progress bar, until all the actions have completed execution. It can be used to set up [`state`](/page-and-app-state). Actions that take a long time to execute, like `Request`, should be used sparingly here for a better user experience.
266
264
 
@@ -270,62 +268,6 @@ The `onMount` event is triggered every time a block is rendered on a page. This
270
268
 
271
269
  The `onMountAsync` event is triggered every time a block is mounted, but does not render the block in loading.
272
270
 
273
- ### Browser lifecycle events
274
-
275
- The first blocks on a page can also define events that react to the browser: `onVisible`, `onHidden`, `onOnline`, `onOffline` and `onResize`. These are useful to refresh data that went stale while the user was away, instead of polling the server on a timer.
276
-
277
- These events are only attached while the page is mounted, and are removed again when the user navigates away, so they never trigger for a page the user has left. They never trigger on the initial page load either — only a change after the page has loaded triggers them. Their action chains run like `onMountAsync`: they do not keep the page or block in a loading state.
278
-
279
- The `onVisible` event is triggered when the browser tab becomes visible again, or when the window regains focus. Rapid pairs of these signals — a tab switch usually produces both — are coalesced over 300ms, so the event is only triggered once. The [`_event`](/_event) object contains `visible: true` and `reason`, which is `visibility` when the browser reported the tab becoming visible, or `focus` when the window regained focus.
280
-
281
- ```yaml
282
- events:
283
- onVisible:
284
- - id: refresh_tasks
285
- type: Request
286
- params: get_tasks
287
- ```
288
-
289
- The `onHidden` event is triggered when the browser tab is hidden, or when the window loses focus, coalesced in the same way. The `_event` object contains `visible: false` and the same `reason` field.
290
-
291
- ```yaml
292
- events:
293
- onHidden:
294
- - id: stop_refreshing
295
- type: SetState
296
- params:
297
- live: false
298
- ```
299
-
300
- The `onOnline` and `onOffline` events are triggered when the browser reports that the network connection was regained or lost. The `_event` object contains `online: true` or `online: false`.
301
-
302
- ```yaml
303
- events:
304
- onOnline:
305
- - id: back_online
306
- type: Message
307
- params:
308
- content: You are back online.
309
- onOffline:
310
- - id: went_offline
311
- type: Message
312
- params:
313
- status: warning
314
- content: You are offline, changes will not be saved.
315
- ```
316
-
317
- The `onResize` event is triggered when the window is resized, debounced by 200ms so that the actions only run once the user stops resizing. The `_event` object contains the `width` and `height` of the window.
318
-
319
- ```yaml
320
- events:
321
- onResize:
322
- - id: set_width
323
- type: SetState
324
- params:
325
- window_width:
326
- _event: width
327
- ```
328
-
329
271
  ## Action types
330
272
 
331
273
  The following actions can be used:
@@ -358,7 +300,3 @@ See additional action type available under the Actions tab in the menu.
358
300
  - The `onInitAsync` event is triggered the first time a page is mounted and does not keep the page in loading.
359
301
  - The `onMount` events is triggered the every time a block is mounted and keeps the block in loading until all actions have finished.
360
302
  - The `onMountAsync` event is triggered the every time a block is mounted, after `onMount` has completed, and does not keep the block in loading.
361
- - The `onVisible` and `onHidden` events are triggered when the browser tab is shown or hidden, or when the window gains or loses focus, coalesced over 300ms.
362
- - The `onOnline` and `onOffline` events are triggered when the browser reports that the network connection was regained or lost.
363
- - The `onResize` event is triggered when the window is resized, debounced by 200ms.
364
- - Browser lifecycle events are never triggered on the initial page load, and are removed when the user navigates away from the page.
@@ -162,17 +162,12 @@ config:
162
162
  | `client.requestError` | `Request error` | Fallback when an API response has no message |
163
163
  | `client.backAriaLabel` | `back` | Aria label on browser-back links |
164
164
  | `client.shortcutThen` | `then` | Sequence shortcut badge separator |
165
- | `client.copy` | `Copy` | Label of a `data-copy` button in HTML |
166
- | `client.copyValue` | `Copy: {value}` | Label of a `data-copy` button whose value differs from its text |
167
- | `client.copied` | `Copied` | Announced after a `data-copy` copy |
168
- | `client.copyFailed` | `Copy failed` | Announced when a `data-copy` copy fails |
169
- | `client.confirm` | `Are you sure?` | Message of a `data-confirm` with no value |
170
165
  | `errorPage.name` | `Error` | Full-page error fallback heading |
171
166
  | `errorPage.message` | `An error has occurred.` | Full-page error fallback body |
172
167
  | `errorPage.homeLink` | `Return to home page` | Full-page error fallback link |
173
168
  | `server.genericError` | `Something went wrong.` | Message of any server error that is not an author error or an auth refusal |
174
169
 
175
- `server.genericError` is the message users see for any server error that is not an author error (`:throw`, `:reject`, a failed `ValidateSchema` step, a plugin's `UserError`) or an authentication or authorization refusal. The server translates it for the request's locale, the same way in development and production, and it is the message that `_actions`, `_request_details` and [`_error`](/_error) read in page config. To show something else for one action, set `messages.error` on the action to override its error toast. To show the real message, read it with [`_error`](/_error) inside the endpoint's `:catch` and send it on, for example `:throw: { _error: message }`.
170
+ `server.genericError` is the message users see for any server error that is not an author error (`:throw`, `:reject`, a failed `ValidateSchema` step, a plugin's `UserError`) or an authentication refusal. The server translates it for the request's locale, the same way in development and production, and it is the message that `_actions`, `_request_details` and [`_error`](/_error) read in page config. To show something else for one action, set `messages.error` on the action to override its error toast. To show the real message, read it with [`_error`](/_error) inside the endpoint's `:catch` and send it on, for example `:throw: { _error: message }`.
176
171
 
177
172
  ## Localizing block defaults
178
173
 
@@ -223,7 +218,7 @@ config:
223
218
  agent.antdx.actions.feedbackDislike: 'Gefällt mir nicht'
224
219
  ```
225
220
 
226
- **Agent runtime errors.** HTTP error responses from the agent endpoint (a 405 for a wrong method, a 400 for a malformed request, and so on: `Only POST requests are supported.`, `Invalid agent path`, `Agent "X" does not exist.`, etc.) translate via `agent.runtime.*` keys against the request's `Accept-Language`. Server-side validation errors and stack traces stay in English (developer diagnostics).
221
+ **Agent runtime errors.** HTTP 400/500 errors from the agent endpoint (`Only POST requests are supported.`, `Invalid agent path`, `Agent "X" does not exist.`, etc.) translate via `agent.runtime.*` keys against the request's `Accept-Language`. Server-side validation errors and stack traces stay in English (developer diagnostics).
227
222
 
228
223
  **Agent config translation.** `agent.properties.instructions` passes through the operator parser at request time, so `_t:` works:
229
224
 
@@ -139,7 +139,7 @@ When a shortcut matches, the browser's default action for that key combination i
139
139
  type: Button
140
140
  properties:
141
141
  title: Search
142
- icon: search
142
+ icon: AiOutlineSearch
143
143
  events:
144
144
  onClick:
145
145
  shortcut: mod+K
@@ -157,7 +157,7 @@ When a shortcut matches, the browser's default action for that key combination i
157
157
  type: Button
158
158
  properties:
159
159
  title: Save
160
- icon: save
160
+ icon: AiOutlineSave
161
161
  events:
162
162
  onClick:
163
163
  shortcut: mod+S
@@ -103,7 +103,7 @@ Blocks can also be laid out using [CSS flexbox](https://developer.mozilla.org/en
103
103
  The `layout` object on blocks can be used to control how a block is placed in the layout. The `layout` properties that can be defined are:
104
104
 
105
105
  - `selfAlign`: _Enum_ - Align block vertically in the area. Options are `top`, `middle`, and `bottom`. Default `top.`
106
- - `align`: _Enum_ - Align content area children vertically. Options are `top`, `middle`, and `bottom`. Default `top.` This value flows to the content area as a default. In Lowdefy v4 `layout.align` aligned the block itself within its parent — that is now `layout.selfAlign`. Setting `layout.align` on a block aligns the block's own content, never the block itself.
106
+ - `align`: _Enum_ - Align content area children vertically. Options are `top`, `middle`, and `bottom`. Default `top.` This value flows to the content area as a default.
107
107
  - `flex`: _String_ - Set the [`flex`](https://developer.mozilla.org/en-US/docs/Web/CSS/flex) CSS property. This overwrites the `grow`, `shrink`, and `size` properties.
108
108
  - `gap`: _Number_ | _Array_ - Set the gap (space) between blocks in the content area. If an array, the first element is the horizontal gap, and the second is the vertical gap. This value flows to the content area as a default.
109
109
  - `grow`: _Number_ - Set the [`flex-grow`](https://developer.mozilla.org/en-US/docs/Web/CSS/flex-grow) CSS property. Default 0.
@@ -1,86 +1,5 @@
1
1
  # Logger
2
2
 
3
- Lowdefy provides built-in error logging and monitoring capabilities. When properly configured, errors from both client and server are captured and sent to external logging services.
4
-
5
- ## Sentry Integration
6
-
7
- [Sentry](https://sentry.io) is a popular error tracking and performance monitoring platform. Lowdefy has built-in Sentry integration that captures errors with rich context including page IDs, block IDs, and config file locations.
8
-
9
- ### Quick Start
10
-
11
- To enable Sentry, set the `SENTRY_DSN` environment variable:
12
-
13
- ```
14
- SENTRY_DSN=https://your-dsn@sentry.io/project
15
- ```
16
-
17
- With this environment variable set, Sentry will capture errors from both client and server with sensible defaults.
18
-
19
- ### Client-Side Configuration
20
-
21
- For client-side error capture, you also need to expose the DSN to the browser:
22
-
23
- ```
24
- ```
25
-
26
- ### Configuration Options
27
-
28
- You can customize Sentry behavior using the `logger` configuration in your `lowdefy.yaml`:
29
-
30
- ```yaml
31
- lowdefy: 6.0.0
32
-
33
- logger:
34
- sentry:
35
- # Enable/disable client-side logging (default: true)
36
- client: true
37
- # Enable/disable server-side logging (default: true)
38
- server: true
39
- # Sample rate for performance traces (default: 0.1)
40
- tracesSampleRate: 0.1
41
- # Sample rate for session replay (default: 0)
42
- replaysSessionSampleRate: 0
43
- # Sample rate for replay on errors (default: 0.1)
44
- replaysOnErrorSampleRate: 0.1
45
- # Enable user feedback widget (default: false)
46
- feedback: false
47
- # Override environment detection (default: auto from NODE_ENV)
48
- environment: production
49
- # User fields to include in error reports (default: ['id', '_id'])
50
- userFields:
51
- - id
52
- - _id
53
- ```
54
-
55
- ### Default Configuration
56
-
57
- If you only set `SENTRY_DSN` without any `logger.sentry` configuration, these defaults are used:
58
-
59
- | Option | Default | Description |
60
- |--------|---------|-------------|
61
- | `client` | `true` | Client-side error capture enabled |
62
- | `server` | `true` | Server-side error capture enabled |
63
- | `tracesSampleRate` | `0.1` | 10% of transactions traced |
64
- | `replaysSessionSampleRate` | `0` | Session replay disabled by default |
65
- | `replaysOnErrorSampleRate` | `0.1` | 10% of error sessions replayed |
66
- | `feedback` | `false` | User feedback widget disabled |
67
- | `userFields` | `['id', '_id']` | Only user ID fields logged |
68
-
69
- ### User Context
70
-
71
- For authenticated users, Sentry automatically captures user context based on the `userFields` configuration. By default, only `id` and `_id` fields from the user session are included to avoid logging PII (personally identifiable information).
72
-
73
- To include additional fields:
74
-
75
- ```yaml
76
- logger:
77
- sentry:
78
- userFields:
79
- - id
80
- - _id
81
- - organization_id
82
- ```
83
-
84
3
  ### Source Maps
85
4
 
86
5
  To enable readable stack traces in Sentry, set the `SENTRY_AUTH_TOKEN` environment variable during build:
@@ -42,20 +42,17 @@ Find the more detailed block schema [here](/blocks).
42
42
  The config object has the following properties:
43
43
 
44
44
  - `environments: object`: The deployment environments of the app, keyed by name (for example `prod`, `staging`, `local`). Each build is for one of them, named by the `LOWDEFY_ENVIRONMENT` environment variable, and the current environment supplies the defaults for everything environment-specific. See [Deployment environments](/deployment-environments). Each environment has:
45
- - `url: string`: The deployment origin, for example `https://staging.example.com`. Default for the auth canonical URL (`BETTER_AUTH_URL`) and the MCP resource URIs, notification links and logos (`RenderNotification` `serverUrl`), and where crons are forwarded to.
45
+ - `url: string`: The deployment origin, for example `https://staging.example.com`. Default for the auth base URL (`AUTH_URL`), notification links and logos (`RenderNotification` `serverUrl`), and where crons are forwarded to.
46
46
  - `cron.secret: string`: The **name** of the Lowdefy secret holding this environment's `CRON_SECRET` — a plain string, not a `_secret` operator (environment settings are resolved at build time, where `_secret` is not evaluated). The value is read at runtime from `LOWDEFY_SECRET_<name>` on the deployment that forwards. An environment with a `cron.secret` has its schedules forwarded to it from the environment Vercel fires crons on.
47
47
  - `cron.enabled: boolean`: Set `false` to register no cron jobs for this environment. Defaults to `true`.
48
48
  - `email.filter: object`: The delivery filter (`replaceAddress`, `allowlist`, `regex`) applied to every `SMTPMailSend` and `SendGridMailSend` request in this environment, unless the connection sets its own `filter` (`filter: false` on a connection turns filtering off).
49
49
  - `email.enabled: boolean`: Set `false` to send no email from `SMTPMailSend` and `SendGridMailSend` requests in this environment (auth emails still send). Defaults to `true`.
50
50
  - `sentry.enabled: boolean`: Set `false` to turn Sentry off, server and client, in this environment. Defaults to `true`.
51
51
  - `guards: object`: Pin secrets and environment variables to a pattern kept in config. `guards.secrets` maps a Lowdefy secret name (`LOWDEFY_SECRET_<name>`) and `guards.env` an environment variable name to a regular expression; in this environment the build fails unless each value matches (a missing value fails too), so changing a guarded value also takes a config change. See [Guards](/deployment-environments).
52
- - `posthog.enabled: boolean`: Set `false` to turn PostHog off in this environment: `PostHogInit` behaves as `enabled: false` (no key needed) and every PostHog action is a no-op. Defaults to `true`.
53
52
  - `environment: string`: The name of the environment this build is for, used when the `LOWDEFY_ENVIRONMENT` environment variable is not set; the variable always wins. When `environments` is declared it must be one of its names. Server log lines carry it as `environment`, `_app: environment` reads it, and Sentry reports under it unless `logger.sentry.environment` is set.
54
53
  - `basePath: string`: Set the base path to serve the Lowdefy application from. This will route all pages under `https://example.com/<base-path>/<page-id>` instead of the default `https://example.com/<page-id>`. The basePath value must start with "/".
55
54
  - `homePageId: string`: The id of the page that will load when a visitor navigates to the home route, in other words, when the visitor navigates to `yourdomain.com` or `yourdomain.com/`.
56
- - `dependencyTracking: boolean`: Defaults to `true`. The browser re-evaluates only the blocks whose inputs changed (the state paths, requests and globals their operators read) instead of every block on the page after each change. Set to `false` to evaluate every block on every update, as earlier versions did.
57
55
  - `requestTimeout: number`: Maximum time in milliseconds a request may run before the server returns a timeout. This protects against requests that hang on an upstream call (database, SMTP, an external API) running all the way to the host's function limit — important on serverless platforms that bill by execution duration. Defaults to `30000` (30 seconds). Set to `0` to disable. Agent streaming routes are exempt, since they are long-lived by design.
58
- - `trustedProxies: string[]`: IP addresses and CIDR ranges (for example `10.0.0.0/8`) of the reverse proxies and load balancers in front of a self-hosted server. The server takes each request's client address from its connection, and reads `X-Forwarded-For` only when that connection comes from a trusted proxy, skipping trusted hops from the right. Auth rate limits, sessions and request logs use this address. Defaults to none, so a client cannot choose its own address. Not used on Vercel, where the platform supplies the client address. See [Behind a reverse proxy](/docker#behind-a-reverse-proxy).
59
56
 
60
57
  ## Auth
61
58
 
@@ -24,7 +24,7 @@ The schema for a `MenuLink` is:
24
24
  - `style: object`: CSS styles for the item. Flat applies to the wrapper; use dot-prefixed slot keys (`.element`, `.icon`, `.label`) to target specific parts.
25
25
  - `properties: object`: The properties of the menu link. These are:
26
26
  - `title: string`: The title to display for the link.
27
- - `icon: string | object`: An icon name, such as the semantic name `home` or the [Lucide](https://lucide.dev/icons) name `House`, or properties of an [Icon](/Icon) block to use as the icon for the link.
27
+ - `icon: string | object`: The name of a [React Icon](https://react-icons.github.io/react-icons/search) or properties of an Icon block to use as the icon for the link.
28
28
  - `danger: boolean`: Apply danger style (switches the item onto antd's `dangerItem*` token set).
29
29
  - `disabled: boolean`: Disable the item — blocks clicks and applies a greyed style.
30
30
  - `tooltip: string`: Tooltip text shown when the menu is collapsed.
@@ -38,7 +38,7 @@ The schema for a `MenuGroup` is:
38
38
  - `style: object`: CSS styles for the group's title row. Use dot-prefixed slot keys to target specific parts.
39
39
  - `properties: object`: The properties of the menu group. These are:
40
40
  - `title: string`: The title to display for the group.
41
- - `icon: string | object`: An icon name, such as the semantic name `home` or the [Lucide](https://lucide.dev/icons) name `House`, or properties of an [Icon](/Icon) block to use as the icon for the group.
41
+ - `icon: string | object`: The name of a [React Icon](https://react-icons.github.io/react-icons/search) or properties of an Icon block to use as the icon for the group.
42
42
  - `disabled: boolean`: Disable the group — blocks expansion and applies a greyed style.
43
43
  - `tooltip: string`: Tooltip text shown when the menu is collapsed.
44
44
  - `links: object[]`: An array of `MenuLink` or `MenuGroup` objects that should be grouped together in the group.
@@ -62,11 +62,11 @@ menus:
62
62
  pageId: page1
63
63
  properties:
64
64
  title: Page 1
65
- icon: file
65
+ icon: AiOutlineFile
66
66
  - id: top-group
67
67
  properties:
68
68
  title: Group
69
- icon: Group
69
+ icon: AiOutlineGroup
70
70
  links:
71
71
  - id: page2
72
72
  type: MenuLink
@@ -93,13 +93,13 @@ menus:
93
93
  pageId: page1
94
94
  properties:
95
95
  title: Page 1
96
- icon: file
96
+ icon: AiOutlineFile
97
97
  - id: page3
98
98
  type: MenuLink
99
99
  pageId: page3
100
100
  properties:
101
101
  title: Page 3
102
- icon: SlidersHorizontal
102
+ icon: AiOutlineControl
103
103
  ```
104
104
 
105
105
  We can make use of [protected pages and APIs](/protected-pages-apis) and [roles](/roles) to filter the menu items according to the pages that the user has access to.
@@ -130,7 +130,7 @@ menus:
130
130
  pageId: page1
131
131
  properties:
132
132
  title: Page 1
133
- icon: file
133
+ icon: AiOutlineFile
134
134
  - id: page2
135
135
  type: MenuLink
136
136
  pageId: page2 # pageId will be used as link title
@@ -416,14 +416,14 @@ links:
416
416
  _module.pageId: users-list
417
417
  properties:
418
418
  title: Users
419
- icon: user
419
+ icon: AiOutlineUser
420
420
  - id: invite
421
421
  type: MenuLink
422
422
  pageId:
423
423
  _module.pageId: user-invite
424
424
  properties:
425
425
  title: Invite User
426
- icon: UserPlus
426
+ icon: AiOutlineUserAdd
427
427
  ```
428
428
 
429
429
  The app wraps these in a MenuGroup:
@@ -11,8 +11,6 @@ The Anthropic connection connects to the [Anthropic API](https://docs.anthropic.
11
11
  #### Properties
12
12
  - `apiKey: string`: __Required__ - Anthropic API key. Use [`_secret`](/_secret) to reference this securely.
13
13
  - `baseURL: string`: Optional base URL for the Anthropic API. Use this to connect to a proxy or compatible endpoint.
14
- - `maxOutputTokens: number`: Default maximum number of tokens a model call generates, for the requests and agents on this connection that do not set their own.
15
- - `timeout: number`: Default milliseconds a model call may take, retries included, before it is cancelled, for the requests and agents on this connection that do not set their own. See _Limits and cancellation_ below.
16
14
 
17
15
  ###### Connection example:
18
16
  ```yaml
@@ -93,28 +91,11 @@ Request types:
93
91
 
94
92
  - GenerateText
95
93
  - GenerateObject
96
- - Decide
97
94
 
98
- All AI provider connections (`Anthropic`, `OpenAI`, `Google`, `AIGateway`) provide the same `GenerateText`, `GenerateObject` and `Decide` request types — the `connectionId` selects the provider. These make a single, one-shot model call and return the result. They can be used as page requests, or as steps in [API endpoint routines](/api) — useful for classify, extract, summarize, or decide steps where the surrounding logic stays in your routine. For a closed-vocabulary decision — pick one of these options, yes or no, rate on this scale — use `Decide`.
95
+ All AI provider connections (`Anthropic`, `OpenAI`, `Google`, `AIGateway`) provide the same `GenerateText` and `GenerateObject` request types — the `connectionId` selects the provider. These make a single, one-shot model call and return the result. They can be used as page requests, or as steps in [API endpoint routines](/api) — useful for classify, extract, summarize, or decide steps where the surrounding logic stays in your routine.
99
96
 
100
97
  For multi-step tool use, see [agents](/agents-introduction) instead.
101
98
 
102
- ### Limits and cancellation
103
-
104
- Two limits bound every AI request. Set them on the request, or on the connection as the default for every request and agent that uses it:
105
-
106
- - `maxOutputTokens` caps the tokens one call generates. Without it, the provider's default applies.
107
- - `timeout` cancels a call, retries included, that runs longer than this many milliseconds. The request fails with a `ServiceError`.
108
-
109
- A call is also cancelled when the request that started it closes, so a provider call that nobody is waiting for stops instead of running, and billing, to its end:
110
-
111
- - A page request, or an API endpoint called over HTTP, is cancelled when the server's request timeout (`config.requestTimeout`, default 30 seconds) answers first, which fails it with a `ServiceError`. On the Node server it is also cancelled when the client disconnects; that is logged as a warning, not an error.
112
- - On [Vercel](/vercel), only the request timeout cancels a call: a client disconnect does not, and the call runs until it finishes, times out, or the function reaches `config.vercel.maxDuration`. Keep `config.requestTimeout` below `maxDuration`, or Vercel stops the function before the timeout can cancel anything (the build warns when it is not).
113
- - Endpoints with `async: true`, `detached: true` calls, and scheduled runs answer at once and then run to their end: the closing request does not cancel them.
114
- - An agent chat turn runs to its end after the client disconnects, so its `onFinish` hooks still save the conversation. Bound it with the agent's `timeout` and `maxSteps`. A `CallAgent` step is cancelled with the routine that runs it.
115
-
116
- When a provider rate-limits a call (HTTP 429), the model client retries it (`maxRetries`), waiting as long as the provider's `Retry-After` asks, up to a minute. If the retries run out, the request fails with a `ServiceError`, as a 429 does on every connection, and the server log records the `Retry-After` value.
117
-
118
99
  ### GenerateText
119
100
 
120
101
  Generates text from a prompt.
@@ -125,9 +106,7 @@ Generates text from a prompt.
125
106
  - `prompt: string`: Text prompt. Use either `prompt` or `messages`, not both.
126
107
  - `messages: object[]`: Model messages (`{ role, content }`). Use either `prompt` or `messages`, not both.
127
108
  - `system: string`: System prompt.
128
- - `allowSystemInMessages: boolean`: Default: `false` - Allow `system` role messages in `messages`. A system message instructs the model as the app itself, so without this a request whose `messages` include one fails. Only set it when the messages come from the app, never from a user (for example a message list built from `_payload`). Use `system` for the system prompt.
129
- - `maxOutputTokens: number`: Maximum number of tokens to generate. Defaults to the connection's `maxOutputTokens`.
130
- - `timeout: number`: Milliseconds the model call may take, retries included, before it is cancelled. Defaults to the connection's `timeout`.
109
+ - `maxOutputTokens: number`: Maximum number of tokens to generate.
131
110
  - `temperature: number`: Sampling temperature (0 to 2).
132
111
  - `topP: number`: Nucleus sampling.
133
112
  - `topK: number`: Only sample from the top K options for each subsequent token.
@@ -251,142 +230,3 @@ api:
251
230
  category:
252
231
  _step: classify.object.category
253
232
  ```
254
-
255
- ### Decide
256
-
257
- Makes typed decisions about a piece of state: pick one of a set of options, judge a statement true or false, or place something on an ordered scale. Every answer comes back in the shape you declared, with a confidence, so a routine can branch on it — and send a low-confidence answer to a person instead.
258
-
259
- The build knows every option, so a routine branch that compares an answer with a name that is not one of its options — `_eq: [{ _step: triage.team.choice }, bil-ling]` — fails the build rather than silently never matching. A `_step` reference to a question the step does not ask, or to a field its answer does not have, fails the build the same way.
260
-
261
- `Decide` has two backends behind the same interface:
262
-
263
- - `evaluation` — an evaluation model, such as TypeSafe's Jev (`typesafe-ai/jev`) on the [AI Gateway](/AIGateway). It returns a probability for every option in one pass, in under a second, and bills input tokens only. The default, and only available, on the `AIGateway` connection.
264
- - `structured-output` — any language model, asked for the answers as structured output that follows a schema of the questions. Providers do not all enforce the schema, so Lowdefy checks each answer against its question (see `null` answers below). Available on every AI connection, and the default on `Anthropic`, `OpenAI` and `Google`. Its confidence is the model's own estimate, not a calibrated probability.
265
-
266
- Keep the state to what the questions need: an evaluation model reads the state literally, and accuracy drops as it grows. A `Decide` is never a security boundary — text in the state can argue for its own answer.
267
-
268
- #### Properties
269
-
270
- - `model: string`: **Required** - Model id to decide with, e.g. `typesafe-ai/jev`. Pin a version wherever a confidence threshold is tuned — a `latest` alias changes answers on release.
271
- - `state: string | object | array`: **Required** - What the questions are about.
272
- - `questions: object`: **Required** - Named questions, answered together against the state. Each question id becomes a key of the response (`usage` is reserved). A question is one of:
273
- - `{ choice: string, options: object }` - Pick exactly one option. `options` maps option names (2 to 255) to what each one means (`null` for no description).
274
- - `{ yesno: string, criteria?: { yes: string, no: string } }` - Judge a statement true or false. `criteria` optionally says what counts as yes and as no.
275
- - `{ score: string, levels: string[] }` - Place the state on 2 to 10 ordered levels, lowest first.
276
- - `backend: enum`: `evaluation` or `structured-output`. Defaults to `evaluation` on `AIGateway` and `structured-output` elsewhere.
277
- - `maxOutputTokens: number`: Maximum number of tokens to generate, on the `structured-output` backend (an evaluation model generates no text). Defaults to the connection's `maxOutputTokens`.
278
- - `timeout: number`: Milliseconds the model call may take, retries included, before it is cancelled. Defaults to the connection's `timeout`.
279
- - `maxRetries: number`: Maximum number of retries. Defaults to 2.
280
- - `providerOptions: object`: Provider-specific options, keyed by provider (e.g. `gateway: { zeroDataRetention: true }`).
281
-
282
- #### Response
283
-
284
- One key per question, plus `usage`:
285
-
286
- ```yaml
287
- <choice question>:
288
- choice: string # The chosen option.
289
- confidence: number # 0 to 1.
290
- probabilities: object # Probability per option (evaluation backend), else null.
291
- <yesno question>:
292
- answer: boolean # true when the statement holds.
293
- probability: number # Probability that it holds.
294
- confidence: number # Probability of the given answer.
295
- <score question>:
296
- level: string # The most likely level.
297
- index: number # Its position, from 0.
298
- score: number # Fractional position on the scale (evaluation backend).
299
- confidence: number # 0 to 1.
300
- probabilities: object # Probability per level (evaluation backend), else null.
301
- usage: object # Token usage ({ inputTokens, outputTokens, totalTokens }).
302
- ```
303
-
304
- An answer outside its question's terms (an option or level the question does not have, a yes/no that is not true or false, or no answer at all) comes back with every field `null`, its confidence included. `_lt` compares `null` below any number, so a confidence gate such as `_lt: [{ _step: triage.team.confidence }, 0.7]` holds it back like a low-confidence answer, and a branch on the choice matches none of the options.
305
-
306
- #### Examples
307
-
308
- ###### Route a support ticket, and queue uncertain ones for a person:
309
-
310
- ```yaml
311
- api:
312
- - id: triage-ticket
313
- type: Api
314
- routine:
315
- - id: triage
316
- type: Decide
317
- connectionId: gateway
318
- properties:
319
- model: typesafe-ai/jev
320
- state:
321
- subject:
322
- _payload: subject
323
- body:
324
- _payload: body
325
- questions:
326
- team:
327
- choice: Which team handles this ticket
328
- options:
329
- billing: Invoices, charges and refunds
330
- tech: Outages and bugs
331
- sales: Plans and quotes
332
- down:
333
- yesno: The customer says the service is down
334
- providerOptions:
335
- gateway:
336
- zeroDataRetention: true
337
- - ':if':
338
- _lt:
339
- - _step: triage.team.confidence
340
- - 0.7
341
- ':then':
342
- - id: queue_review
343
- type: MongoDBInsertOne
344
- connectionId: review_queue
345
- properties:
346
- doc:
347
- subject:
348
- _payload: subject
349
- suggested_team:
350
- _step: triage.team.choice
351
- - ':return':
352
- status: review
353
- - ':if':
354
- _eq:
355
- - _step: triage.team.choice
356
- - billing
357
- ':then':
358
- - id: open_billing_case
359
- type: CallApi
360
- properties:
361
- endpointId: open-billing-case
362
- - ':return':
363
- team:
364
- _step: triage.team.choice
365
- urgent:
366
- _step: triage.down.answer
367
- ```
368
-
369
- ###### The same decision with any language model:
370
-
371
- ```yaml
372
- requests:
373
- - id: rate_review
374
- type: Decide
375
- connectionId: claude
376
- payload:
377
- review:
378
- _state: review_text
379
- properties:
380
- model: claude-haiku-4-5
381
- state:
382
- _payload: review
383
- questions:
384
- sentiment:
385
- score: How positive is this review
386
- levels:
387
- - Very negative
388
- - Negative
389
- - Neutral
390
- - Positive
391
- - Very positive
392
- ```
@@ -70,7 +70,6 @@ The same connection and requests work against any S3-compatible service — set
70
70
 
71
71
  Request types:
72
72
  - AwsS3GetObject
73
- - AwsS3HeadObject
74
73
  - AwsS3PresignedGetObject
75
74
  - AwsS3PresignedPostPolicy
76
75
  - AwsS3PutObject
@@ -197,59 +196,6 @@ api:
197
196
  _step: put_copy.key
198
197
  ```
199
198
 
200
- ### AwsS3HeadObject
201
-
202
- The `AwsS3HeadObject` request checks on the server whether an object exists in the bucket and
203
- returns its metadata without reading its content. Use it in an [API endpoint](/lowdefy-api) routine
204
- to confirm a file uploaded from the browser with an `AwsS3PresignedPostPolicy` actually arrived, and
205
- to take its size and content type from S3 rather than from the caller. The connection must allow
206
- reads (`read` is `true` by default).
207
-
208
- #### Properties
209
- - `key: string`: __Required__ - Key under which the object is stored.
210
- - `versionId: string`: VersionId used to reference a specific version of the object.
211
-
212
- Returns `{ exists: true, bucket, key, size, contentType, etag, lastModified, versionId }` for an
213
- object that exists (`size` in bytes, `lastModified` a date, `contentType` and `versionId` only when
214
- S3 returns them), and `{ exists: false, bucket, key }` when S3 answers not found. Any other S3 error
215
- throws. S3 answers not found only when the credentials may list the bucket (`s3:ListBucket`);
216
- without that permission a missing object is a 403 error, which throws.
217
-
218
- #### Examples
219
-
220
- ###### Record an upload only once it is in the bucket:
221
- ```yaml
222
- api:
223
- - id: record_upload
224
- type: Api
225
- routine:
226
- - id: head_object
227
- type: AwsS3HeadObject
228
- connectionId: my_bucket
229
- properties:
230
- key:
231
- _payload: key
232
- - :if:
233
- _not:
234
- _step: head_object.exists
235
- :then:
236
- - :reject: The upload did not arrive.
237
- - id: insert_file
238
- type: MongoDBInsertOne
239
- connectionId: files
240
- properties:
241
- doc:
242
- key:
243
- _step: head_object.key
244
- size:
245
- _step: head_object.size
246
- contentType:
247
- _step: head_object.contentType
248
- - ':return':
249
- size:
250
- _step: head_object.size
251
- ```
252
-
253
199
  ### AwsS3PutObject
254
200
 
255
201
  The `AwsS3PutObject` request writes an object to the bucket from the server. It accepts base64 encoded