@lowdefy/docs-content 7.0.0 → 7.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 (37) hide show
  1. package/content/actions/resetvalidation.md +2 -0
  2. package/content/actions/setstate.md +0 -2
  3. package/content/actions/validate.md +1 -1
  4. package/content/adapter-reference/mongodbauthadapter.md +2 -2
  5. package/content/agents/agents-introduction.md +1 -1
  6. package/content/callback-reference/auth0logoutcallback.md +1 -1
  7. package/content/concepts/ai-agent-docs.md +2 -2
  8. package/content/concepts/blocks.md +1 -1
  9. package/content/concepts/connections-and-requests.md +8 -8
  10. package/content/concepts/custom-html.md +1 -1
  11. package/content/concepts/logger.md +1 -1
  12. package/content/concepts/lowdefy-api.md +3 -3
  13. package/content/concepts/page-and-app-state.md +2 -2
  14. package/content/concepts/theming.md +1 -1
  15. package/content/connections/axioshttp.md +1 -1
  16. package/content/display-blocks/aggrid.md +3 -3
  17. package/content/migration/v3-to-v4.md +2 -2
  18. package/content/operators/_ref.md +6 -6
  19. package/content/provider-reference/auth-js-providers.md +2 -2
  20. package/content/provider-reference/openidconnectprovider.md +1 -1
  21. package/content/testing/config-tests.md +2 -2
  22. package/content/testing/journey-data-sets.md +21 -21
  23. package/content/tutorial/tutorial-create-page.md +1 -1
  24. package/content/tutorial/tutorial-requests-api.md +1 -1
  25. package/content/tutorial/tutorial-requests-sql.md +1 -1
  26. package/content/tutorial/tutorial-start.md +1 -1
  27. package/content/user-authentication/auth-configuration.md +9 -9
  28. package/content/user-authentication/protected-pages-apis.md +4 -4
  29. package/content/user-authentication/roles.md +2 -2
  30. package/content/websockets/websocket-publish.md +1 -1
  31. package/content/websockets/websockets-introduction.md +1 -1
  32. package/hazards.json +0 -12
  33. package/index.json +326 -93
  34. package/package.json +3 -2
  35. package/scripts/collectImportedFiles.js +80 -0
  36. package/scripts/recordSourceHashes.js +9 -6
  37. package/content/learn/showcase.md +0 -8
@@ -16,6 +16,8 @@ By default when a page is opened, no validation flags are set on any input field
16
16
 
17
17
  The `ResetValidation` action `blockIds` or `regex` params are used to limit which blocks validation errors and warnings should be reset.
18
18
 
19
+ A container's blockId matches the container and every block inside it, so `params: contact_card` lowers the validation flags of the inputs in the `contact_card` card. A blockId that matches no block logs a warning in the browser console.
20
+
19
21
  When the action runs in a list row, `$` in a blockId is replaced with the row index, as in `SetState` and `CallMethod`, so `list.$.name` matches the `name` input in the same row. `$` in a `regex` pattern keeps its regex meaning.
20
22
 
21
23
  #### Parameters
@@ -8,8 +8,6 @@ The `SetState` action sets values in `state`. It takes an object as parameters,
8
8
  This is useful if you want to initialize `state`, set a flag after an action has executed (eg. to disable a button), or to set the result
9
9
  of a request to state.
10
10
 
11
- Setting a parent object to `{}` or `null` does not clear an input that is hidden at that moment. A hidden input's value is removed from `state` but kept by the input, so the input writes its old value back when it shows again. To clear a form that has hidden inputs, set each input's own key, for example `contact.name: null`.
12
-
13
11
  #### Parameters
14
12
 
15
13
  ###### object
@@ -17,7 +17,7 @@ The first time a `Validate` action is called, validation errors and warnings are
17
17
 
18
18
  The `Validate` action `blockIds` or `regex` params are used to limit which blocks are validated. Only the matched blocks will be validated, and validation results are shown for only those matched blocks.
19
19
 
20
- Matching does not cascade to child blocks. A container's blockId matches only the container, which has no validation of its own, so the action validates nothing and succeeds. A blockId that matches no block also succeeds. To validate the inputs inside a container, match their blockIds, for example with `regex: ^contact\.` for inputs under `contact`.
20
+ A container's blockId matches the container and every block inside it, so `params: contact_card` validates the inputs in the `contact_card` card. Matching follows the blocks on the page, not id prefixes, so it reaches `contact.name` inside `contact_card`. A blockId that matches no block logs a warning in the browser console and the action succeeds.
21
21
 
22
22
  When the action runs in a list row, `$` in a blockId is replaced with the row index, as in `SetState` and `CallMethod`, so `list.$.name` matches the `name` input in the same row. `$` in a `regex` pattern keeps its regex meaning.
23
23
 
@@ -18,7 +18,7 @@ If you are upgrading from the old `MongoDBAdapter`: the type is renamed, `databa
18
18
  ###### Minimum configuration.
19
19
 
20
20
  ```yaml
21
- lowdefy: 6.1.0
21
+ lowdefy: 7.0.0
22
22
  auth:
23
23
  database:
24
24
  id: auth_db
@@ -31,7 +31,7 @@ auth:
31
31
  ###### Full configuration.
32
32
 
33
33
  ```yaml
34
- lowdefy: 6.1.0
34
+ lowdefy: 7.0.0
35
35
  auth:
36
36
  database:
37
37
  id: auth_db
@@ -9,7 +9,7 @@ Agents are defined at the root of your Lowdefy configuration, alongside `connect
9
9
  A connection, an agent, and a chat block — that's all you need:
10
10
 
11
11
  ```yaml
12
- lowdefy: 6.1.0
12
+ lowdefy: 7.0.0
13
13
 
14
14
  connections:
15
15
  - id: anthropic
@@ -16,7 +16,7 @@ To trigger the Auth0 logout, the `Logout` action `callbackUrl.url` param should
16
16
  ###### Configuring Auth0LogoutCallback.
17
17
 
18
18
  ```yaml
19
- lowdefy: 6.1.0
19
+ lowdefy: 7.0.0
20
20
  providers:
21
21
  - id: auth0
22
22
  type: Auth0Provider
@@ -154,7 +154,7 @@ The dev server rebuilds automatically when config changes, so an agent works in
154
154
 
155
155
  1. Discover types and schemas, write or edit YAML.
156
156
  2. Call `lowdefy_build_status` with `wait: true` (`GET /lowdefy-docs/build-status?wait=true`) — it answers once the dev server has processed your edit, rather than with the build before it. That includes a server restart or plugin install the edit needs (a new connection type, a new plugin package, a `.env` change), so the next call reaches a ready server. Did the build succeed? Errors come back with the exact source file and location. A build that fails with an internal error carries its message, stack and the config file it was resolving.
157
- 3. Pages are built when they are first requested, so the config build's status says nothing about page content. With `wait: true`, build status also builds every page your edit touched (a page whose files changed since its last build, a page built before the latest config build, or a page file changed since the dev server started) and reports under `pages`: `checked` lists the pages it built, `failed` the pages whose last build failed with their errors, `changedSinceBuild` pages changed on disk that the dev server has not rebuilt yet, and `unbuilt` how many pages nothing has built since the dev server started. `lowdefy_check` validates every page.
157
+ 3. Pages are built when they are first requested, after the config build. `build.status` covers both: it is `ok` when the config builds and no page failed its latest build, `pages_failed` when the config builds but a page failed its latest build and has not changed since (`build.failedPages` names those pages), and `error` when the config build fails. A failed page changed since its last build is not counted until it is rebuilt, since its failure may already be fixed: it is listed under `pages.changedSinceBuild`, and `wait: true` rebuilds it. `build.configStatus` is the config build's own status, whatever the pages do. With `wait: true`, build status also builds every page your edit touched (a page whose files changed since its last build, a page built before the latest config build, or a page file changed since the dev server started) and reports under `pages`: `checked` lists the pages it built, `failed` the errors of each page whose last build failed, `changedSinceBuild` pages changed on disk that the dev server has not rebuilt yet, and `unbuilt` how many pages nothing has built since the dev server started. `lowdefy_check` validates every page.
158
158
  4. Call `lowdefy_get_page_config` to confirm the page builds, and `lowdefy_screenshot_page` to see it rendered.
159
159
  5. Runtime errors from the browser (operator errors, block render errors) also appear in `lowdefy_build_status` under `clientErrors`, so problems that only show at runtime still reach the agent.
160
160
  6. Server-side failures appear beside them under `serverErrors` — a request whose database filter is malformed, an endpoint step that throws, an MCP tool call or an agent tool call that fails — each with the yaml `source` (`file:line`) and `config` path that produced it, plus the `endpointId`, `requestId` and `pageId` where known. The store holds the last 50 errors and is cleared on dev server restart.
@@ -176,7 +176,7 @@ Every event carries `type` and an ISO `timestamp`. The four types:
176
176
  | `client_error` | A browser reports a runtime error | The same entry `lowdefy_build_status` lists under `clientErrors` |
177
177
  | `server_error` | A request, endpoint, MCP tool or agent tool fails on the server | The same entry `lowdefy_build_status` lists under `serverErrors` |
178
178
 
179
- Events are not buffered: a client that connects after an event missed it, and should call `lowdefy_build_status` — which is derived from the same `build/buildStatus.json` — for the current picture. Act on a `build` event with `status: "error"` immediately; `lowdefy_build_status` remains the full report.
179
+ Events are not buffered: a client that connects after an event missed it, and should call `lowdefy_build_status` — which is derived from the same `build/buildStatus.json`, plus the page builds — for the current picture. A `build` event reports the config build only, so its `status` is never `pages_failed`. Act on a `build` event with `status: "error"` immediately; `lowdefy_build_status` remains the full report.
180
180
 
181
181
  ### When a build fails, answers are marked stale
182
182
 
@@ -35,7 +35,7 @@ Lowdefy has a set of default block types as defined in the Lowdefy docs. Most of
35
35
 
36
36
  ###### Default block type config example:
37
37
  ```yaml
38
- lowdefy: 6.1.0
38
+ lowdefy: 7.0.0
39
39
  pages:
40
40
  - id: example_dashboard
41
41
  type: PageHeaderMenu
@@ -22,7 +22,7 @@ The schema for a Lowdefy connection is:
22
22
 
23
23
  ###### Connections definition example:
24
24
  ```yaml
25
- lowdefy: 6.1.0
25
+ lowdefy: 7.0.0
26
26
  connections:
27
27
  - id: connection1
28
28
  type: ConnectionType1
@@ -100,7 +100,7 @@ _request: my_request
100
100
 
101
101
  ###### lowdefy.yaml
102
102
  ```yaml
103
- lowdefy: 6.1.0
103
+ lowdefy: 7.0.0
104
104
 
105
105
  connections:
106
106
  - id: connection1
@@ -142,7 +142,7 @@ To create this `connection`, define the connection as follows in the `lowdefy.ya
142
142
 
143
143
  ###### lowdefy.yaml
144
144
  ```yaml
145
- lowdefy: 6.1.0
145
+ lowdefy: 7.0.0
146
146
 
147
147
  connections:
148
148
  - id: my_api
@@ -159,7 +159,7 @@ To use this connection, a `request` must be defined, which references the corres
159
159
 
160
160
  ###### lowdefy.yaml
161
161
  ```yaml
162
- lowdefy: 6.1.0
162
+ lowdefy: 7.0.0
163
163
 
164
164
  connections:
165
165
  - id: my_api
@@ -183,7 +183,7 @@ This request should be called when the page is mounted. To do this, the [`Reques
183
183
 
184
184
  ###### lowdefy.yaml
185
185
  ```yaml
186
- lowdefy: 6.1.0
186
+ lowdefy: 7.0.0
187
187
 
188
188
  connections:
189
189
  - id: my_api
@@ -214,7 +214,7 @@ In this example, a [`Selector`](/Selector) block will be added. The [`_array.map
214
214
 
215
215
  ###### lowdefy.yaml
216
216
  ```yaml
217
- lowdefy: 6.1.0
217
+ lowdefy: 7.0.0
218
218
 
219
219
  connections:
220
220
  - id: my_api
@@ -259,7 +259,7 @@ To do this, create a new request that will make use of a `payload` to get the po
259
259
 
260
260
  ###### lowdefy.yaml
261
261
  ```yaml
262
- lowdefy: 6.1.0
262
+ lowdefy: 7.0.0
263
263
 
264
264
  connections:
265
265
  - id: my_api
@@ -321,7 +321,7 @@ This is done as follows:
321
321
 
322
322
  ###### lowdefy.yaml
323
323
  ```yaml
324
- lowdefy: 6.1.0
324
+ lowdefy: 7.0.0
325
325
 
326
326
  connections:
327
327
  - id: my_api
@@ -25,7 +25,7 @@ To add [Google Analytics](/https://developers.google.com/analytics/devguides/col
25
25
 
26
26
  ```yaml
27
27
  name: google-analytics-example
28
- lowdefy: 6.1.0
28
+ lowdefy: 7.0.0
29
29
  # ...
30
30
  app:
31
31
  html:
@@ -28,7 +28,7 @@ For client-side error capture, you also need to expose the DSN to the browser:
28
28
  You can customize Sentry behavior using the `logger` configuration in your `lowdefy.yaml`:
29
29
 
30
30
  ```yaml
31
- lowdefy: 6.1.0
31
+ lowdefy: 7.0.0
32
32
 
33
33
  logger:
34
34
  sentry:
@@ -40,7 +40,7 @@ The schema for a Lowdefy API is:
40
40
  ###### API definition example:
41
41
 
42
42
  ```yaml
43
- lowdefy: '6.1.0'
43
+ lowdefy: '7.0.0'
44
44
 
45
45
  connections:
46
46
  - id: users
@@ -75,7 +75,7 @@ Lowdefy APIs use the same [authorization configuration](/protected-pages-apis) a
75
75
  Unlike requests which are defined on a specific page and inherit the authorization of the page they are defined on, API endpoints can be called from any page in the app. Thus they do not inherit the authorization of the page they are called from, and authorization should be configured separately.
76
76
 
77
77
  ```yaml
78
- lowdefy: '6.1.0'
78
+ lowdefy: '7.0.0'
79
79
 
80
80
  auth:
81
81
  # Configure which APIs require authentication
@@ -1168,7 +1168,7 @@ blocks:
1168
1168
  Here's a comprehensive example showing various features:
1169
1169
 
1170
1170
  ```yaml
1171
- lowdefy: '6.1.0'
1171
+ lowdefy: '7.0.0'
1172
1172
  auth:
1173
1173
  api:
1174
1174
  protected: true
@@ -83,7 +83,7 @@ This example shows how you can create and read from `global`:
83
83
 
84
84
  `lowdefy.yaml`
85
85
  ```yaml
86
- lowdefy: 6.1.0
86
+ lowdefy: 7.0.0
87
87
  global:
88
88
  key: value
89
89
  pages:
@@ -101,7 +101,7 @@ The following examples shows how to modify the `global` object:
101
101
 
102
102
  `lowdefy.yaml`
103
103
  ```yaml
104
- lowdefy: 6.1.0
104
+ lowdefy: 7.0.0
105
105
  global:
106
106
  key: value
107
107
  pages:
@@ -7,7 +7,7 @@ Lowdefy uses the [Ant Design](https://ant.design/) design token system for themi
7
7
  Configure your app's theme in `lowdefy.yaml` under `theme.antd`:
8
8
 
9
9
  ```yaml
10
- lowdefy: 6.1.0
10
+ lowdefy: 7.0.0
11
11
  theme:
12
12
  antd:
13
13
  token:
@@ -64,7 +64,7 @@ Properties for a AxiosHttp can be set on either the connection, the request, or
64
64
  ###### A basic full example requesting data from https://jsonplaceholder.typicode.com
65
65
 
66
66
  ```yaml
67
- lowdefy: 6.1.0
67
+ lowdefy: 7.0.0
68
68
  name: Lowdefy starter
69
69
  connections:
70
70
  - id: my_api
@@ -1330,16 +1330,16 @@ Migrate the column-level checkbox flags in the same edit — `checkboxSelection`
1330
1330
  | `columnDefs` | array | - | A list of properties for each column. |
1331
1331
  | `columnDefs.$.field` | string | - | The field of the row object to get the cell's data from. Deep references into a row object is supported via dot notation, i.e 'address.firstLine'. |
1332
1332
  | `columnDefs.$.headerName` | string | - | The name to render in the column header. If not specified and field is specified, the field name will be used as the header name. |
1333
- | `columnDefs.$.filter` | boolean | `false` | Filter component to use for this column. Set to true to use the default filter. |
1333
+ | `columnDefs.$.filter` | boolean \| string | `false` | Filter to use for this column. Set to `true` to use the default filter, or name a provided filter: `agTextColumnFilter`, `agNumberColumnFilter` or `agDateColumnFilter`. `agSetColumnFilter` and `agMultiColumnFilter` need AG Grid Enterprise, which this block does not include. Enum: `true`, `false`, `agTextColumnFilter`, `agNumberColumnFilter`, `agDateColumnFilter`. |
1334
1334
  | `columnDefs.$.sortable` | boolean | `false` | Set to true to allow sorting on this column. |
1335
1335
  | `columnDefs.$.resizable` | boolean | `false` | Set to true to allow this column should be resized. |
1336
1336
  | `columnDefs.$.width` | number | - | Initial width in pixels for the cell. |
1337
1337
  | `columnDefs.$.cellStyle` | object | - | An object of css values returning an object of css values for a particular cell. |
1338
- | `columnDefs.$.cellRenderer` | object | - | Provide your own cell Renderer function (using the `_function` operator) for this column's cells. |
1338
+ | `columnDefs.$.cellRenderer` | object \| string | - | Provide your own cell Renderer function (using the `_function` operator) for this column's cells, or name a registered cell renderer such as `agAnimateShowChangeCellRenderer`. |
1339
1339
  | `columnDefs.$.valueFormatter` | object \| string | - | A function (using the `_function` operator) or expression to format a value, should return a string. Not used for CSV export or copy to clipboard, only for UI cell rendering. |
1340
1340
  | `columnDefs.$.tooltipField` | string | - | The field of the row object to read the tooltip value from. When set, hovering a cell shows a tooltip with that value using the grid's default tooltip component. |
1341
1341
  | `columnDefs.$.tooltipValueGetter` | object | - | Provide a function (using the `_function` operator) that returns the tooltip value for a cell. Overrides `tooltipField`. |
1342
- | `columnDefs.$.tooltipComponent` | object | - | Provide a custom tooltip component. See AG Grid tooltip component docs (https://www.ag-grid.com/react-data-grid/component-tooltip/). |
1342
+ | `columnDefs.$.tooltipComponent` | object \| string | - | Provide a custom tooltip component, or the name of a component registered with the AG Grid `components` grid option. See AG Grid tooltip component docs (https://www.ag-grid.com/react-data-grid/component-tooltip/). |
1343
1343
  | `columnDefs.$.ellipsis` | number | - | Line-clamp count for long text. Automatically enables `wrapText` and `autoHeight` and applies the `.lf-ellipsis-N` class (1–6). |
1344
1344
  | `columnDefs.$.cell` | object | - | Built-in cell renderer. Takes precedence over `cellRenderer` when `type` is set. Field-valued keys (e.g. `nameField`, `srcField`, `urlQuery.*`, `pathParams.*`) are row-data paths. |
1345
1345
  | `columnDefs.$.cell.type` | string | - | The built-in renderer to use. Enum: `tag`, `avatar`, `link`, `date`, `boolean`, `progress`, `number`, `buttons`, `menu`, `selector`, `multipleSelector`, `switch`, `textInput`, `paragraphInput`. |
@@ -363,7 +363,7 @@ blocks:
363
363
  The `LOWDEFY_SERVER_BASE_PATH` environment variable configuration option has been removed. To configure a base path, use the `config.basePath` configuration option.
364
364
 
365
365
  ``yaml
366
- lowdefy: 6.1.0
366
+ lowdefy: 7.0.0
367
367
 
368
368
  config:
369
369
  basePath: /foo
@@ -371,7 +371,7 @@ config:
371
371
 
372
372
  The `_build.env` operator can be used to set the base path using an environment variable:
373
373
  ```yaml
374
- lowdefy: 6.1.0
374
+ lowdefy: 7.0.0
375
375
 
376
376
  config:
377
377
  basePath:
@@ -82,7 +82,7 @@ The file path to the referenced file, from the root of the project directory.
82
82
  ###### Reference pages:
83
83
  ```yaml
84
84
  # lowdefy.yaml
85
- lowdefy: 6.1.0
85
+ lowdefy: 7.0.0
86
86
  pages:
87
87
  - _ref: pages/page1.yaml
88
88
  - _ref: pages/page2.yaml
@@ -103,7 +103,7 @@ blocks:
103
103
  ```
104
104
  Returns:
105
105
  ```
106
- lowdefy: 6.1.0
106
+ lowdefy: 7.0.0
107
107
  pages:
108
108
  - id: page1
109
109
  type: PageHeaderMenu
@@ -176,7 +176,7 @@ blocks:
176
176
  ###### Use key:
177
177
  ```yaml
178
178
  # lowdefy.yaml
179
- lowdefy: 6.1.0
179
+ lowdefy: 7.0.0
180
180
  version:
181
181
  _ref:
182
182
  path: package.json
@@ -190,7 +190,7 @@ version:
190
190
  ```
191
191
  Returns:
192
192
  ```
193
- lowdefy: 6.1.0
193
+ lowdefy: 7.0.0
194
194
  version: 1.0.0
195
195
  ```
196
196
 
@@ -227,7 +227,7 @@ module.exports = useLocalOrSharedConfig;
227
227
 
228
228
  ```yaml
229
229
  // lowdefy.yaml
230
- lowdefy: 6.1.0
230
+ lowdefy: 7.0.0
231
231
 
232
232
  cli:
233
233
  refResolver: resolvers/useLocalOrSharedConfig.js
@@ -253,7 +253,7 @@ module.exports = addFooter;
253
253
  ```
254
254
  ```yaml
255
255
  // lowdefy.yaml
256
- lowdefy: 6.1.0
256
+ lowdefy: 7.0.0
257
257
 
258
258
  pages:
259
259
  - _ref:
@@ -75,7 +75,7 @@ The providers that can be used are:
75
75
  ###### Auth0 configuration:
76
76
 
77
77
  ```yaml
78
- lowdefy: 6.1.0
78
+ lowdefy: 7.0.0
79
79
  auth:
80
80
  providers:
81
81
  - id: auth0
@@ -94,7 +94,7 @@ In Auth0, the callback URL should be configured to `https://example.com/api/auth
94
94
  ###### GitHub configuration:
95
95
 
96
96
  ```yaml
97
- lowdefy: 6.1.0
97
+ lowdefy: 7.0.0
98
98
  auth:
99
99
  providers:
100
100
  - id: github
@@ -28,7 +28,7 @@ The OpenIDConnectProvider can be used to authenticate with a OpenID Connect comp
28
28
  Usually only the `wellKnown`, `clientId` and `clientSecret` properties need to be configured:
29
29
 
30
30
  ```yaml
31
- lowdefy: 6.1.0
31
+ lowdefy: 7.0.0
32
32
  providers:
33
33
  - id: my_provider
34
34
  type: OpenIDConnectProvider
@@ -273,7 +273,7 @@ A one-time code is typed, not clicked. `fill` with `fromEmail: { to, subject, ma
273
273
 
274
274
  `as: invitee` switches the journey to another person with their own browser and cookies: an owner and the person they invite, or a member whose session stays open while the owner removes them. The journey starts as `main`. The first `as` for a name opens the journey's page in a new browser, as the journey's `user`, or as the data set user of that name on a journey with `data` (see [Journey data sets](/journey-data-sets)); switching back returns to that person's tab as they left it.
275
275
 
276
- **Seeing what a second person sees.** On a journey with `data`, every person reads and writes the run's one database, so act as one user and then check, in the same run, what another user sees. The second user is a user of the data set, so no sign-in is needed:
276
+ **Seeing what a second person sees.** On a journey with `data`, every person reads and writes the run's databases, so act as one user and then check, in the same run, what another user sees. The second user is a user of the data set, so no sign-in is needed:
277
277
 
278
278
  ```yaml
279
279
  name: overriding a decision tells its owner
@@ -288,7 +288,7 @@ steps:
288
288
  - expect: { text: { blockId: inbox, contains: Kirsty changed your decision } }
289
289
  ```
290
290
 
291
- What `officer` wrote is in the database `owner` reads, and nothing of `officer`'s session (the signed-in user, cached requests, page state) reaches `owner`, who has their own browser. `as: main` returns to `officer`'s tab as it was left. Because the run still has one database, a dropped `CallApi` that sends the notification fails the journey, and a [config mutant](#mutants-lowdefy-journeys-harden) that drops it is killed. What the journey exercised is the union over everyone it acted as: the requests, events and blocks `officer` and `owner` each touched are recorded for the journey, so coverage, lint and `journeys harden` need no per-person bookkeeping. An `as` that names the person already acting is a lint warning ([L7](#lint)).
291
+ What `officer` wrote is in the database `owner` reads, and nothing of `officer`'s session (the signed-in user, cached requests, page state) reaches `owner`, who has their own browser. `as: main` returns to `officer`'s tab as it was left. Because everyone in the run shares its databases, a dropped `CallApi` that sends the notification fails the journey, and a [config mutant](#mutants-lowdefy-journeys-harden) that drops it is killed. What the journey exercised is the union over everyone it acted as: the requests, events and blocks `officer` and `owner` each touched are recorded for the journey, so coverage, lint and `journeys harden` need no per-person bookkeeping. An `as` that names the person already acting is a lint warning ([L7](#lint)).
292
292
 
293
293
  Each person also sends requests from their own client address, so auth rate limits (a few sign-in attempts per address every few seconds) count each person's attempts apart, as they would for people on different devices, instead of one budget for the whole run.
294
294
 
@@ -1,6 +1,6 @@
1
1
  # Journey Data Sets
2
2
 
3
- A **data set** gives [config test journeys](/config-tests) a database of their own. You declare test data, and the people journeys act as, in `tests/data/<name>.yaml`. Everything a data set loads is committed, so every machine runs a journey on the same data. A journey that names the data set with `data:` runs against a fresh in-memory MongoDB database loaded with that data. Journeys on a data set may write freely: every run starts from the same data, and the developer's own database is never touched.
3
+ A **data set** gives [config test journeys](/config-tests) a database of their own. You declare test data, and the people journeys act as, in `tests/data/<name>.yaml`. Everything a data set loads is committed, so every machine runs a journey on the same data. A journey that names the data set with `data:` runs against fresh in-memory MongoDB databases loaded with that data, one for each database your connections name. Journeys on a data set may write freely: every run starts from the same data, and the developer's own database is never touched.
4
4
 
5
5
  ```yaml
6
6
  - name: member assigns an open ticket to a teammate
@@ -55,13 +55,13 @@ users:
55
55
  owner: { id: u_new, roles: [admin], organizationId: org_new }
56
56
  ```
57
57
 
58
- | Key | Description |
59
- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
60
- | `extends` | Data sets to load first, by name, e.g. `[base]`. See [Extending a data set](#extending-a-data-set). |
61
- | `fixtures` | Documents to load, keyed by connection id. Dates use the serializer's `{ "~d": "2026-01-02T00:00:00.000Z" }` marker and ObjectIds use `{ _oid: '<hex>' }`. A fixture with an `_id` replaces any earlier document with that `_id`; one without is inserted. |
62
- | `generate` | Documents made from a small spec with a fixed seed, keyed by connection id like `fixtures`. See [Generated documents](#generated-documents). |
63
- | `users` | The people journeys act as, keyed by name. Each is an inline user object, the shape a journey's inline `user:` takes. They are injected callers and carry no credentials: `password` is refused. |
64
- | `indexes` | Indexes to create, keyed by connection id, in the shape MongoDB's `listIndexes()` returns: `key`, an optional `name`, and any other option (`unique`, `sparse`, `partialFilterExpression`, `collation`, `weights`, …), passed to `createIndexes` as given. `v` and `ns` are refused. Two connections that load one collection merge their indexes. |
58
+ | Key | Description |
59
+ | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
60
+ | `extends` | Data sets to load first, by name, e.g. `[base]`. See [Extending a data set](#extending-a-data-set). |
61
+ | `fixtures` | Documents to load, keyed by connection id. Dates use the serializer's `{ "~d": "2026-01-02T00:00:00.000Z" }` marker and ObjectIds use `{ _oid: '<hex>' }`. A fixture with an `_id` replaces any earlier document with that `_id`; one without is inserted. |
62
+ | `generate` | Documents made from a small spec with a fixed seed, keyed by connection id like `fixtures`. See [Generated documents](#generated-documents). |
63
+ | `users` | The people journeys act as, keyed by name. Each is an inline user object, the shape a journey's inline `user:` takes. They are injected callers and carry no credentials: `password` is refused. |
64
+ | `indexes` | Indexes to create, keyed by connection id, in the shape MongoDB's `listIndexes()` returns: `key`, an optional `name`, and any other option (`unique`, `sparse`, `partialFilterExpression`, `collation`, `weights`, …), passed to `createIndexes` as given. `v` and `ns` are refused. Two connections that load one collection in one database merge their indexes. |
65
65
 
66
66
  ## Extending a data set
67
67
 
@@ -131,8 +131,8 @@ Each key under `generate` other than `seed` is a connection id, with `count` (ho
131
131
  Rules, checked before any browser opens:
132
132
 
133
133
  - **Plain YAML.** No `_ref` and no operators: a data set is test input, not app config. Share rows between data sets with `extends`.
134
- - **Connections.** Every connection id in `fixtures`, `generate` and `indexes` must be a `MongoDBCollection` connection whose `collection` is a literal string, and whose `databaseName` is a literal string or not set. Two connections that name one collection load into it together.
135
- - **One database.** Under a data set every redirected connection reads one database. Two connections that name the same collection in different databases (a different `databaseName` or `databaseUri` secret) would share one collection. When the data set names either of them, the journey is refused. When it names neither, the result carries a warning. A connection whose `collection` is computed per request cannot be checked.
134
+ - **Connections.** Every connection id in `fixtures`, `generate` and `indexes` must be a `MongoDBCollection` connection whose `collection` is a literal string, and whose `databaseName` is a literal string or not set. Two connections that name one collection in one database load into it together.
135
+ - **One database per target.** A run gives each database your connections name its own database: connections with the same `databaseUri` secret (or literal) and `databaseName` share one, and connections that differ in either read different ones, as they do outside the run. So an app that reads several databases can seed a collection name in each, such as `users` in its own database and in an auth database. The run compares the secret names, not their values, so two secrets that hold the same URI get separate run databases. A connection whose `databaseUri` or `databaseName` is computed per request reads the run's first database.
136
136
  - **Indexes first.** Each collection's indexes are created before any document is loaded, so a fixture or generated document that breaks a unique index fails the load and names the document, the index and the duplicate key. A TTL index is loaded as a plain index, so old fixture dates are never deleted mid-run.
137
137
 
138
138
  ## Named users and `as`
@@ -165,7 +165,7 @@ steps:
165
165
  # ...
166
166
  ```
167
167
 
168
- `lowdefy test` and `lowdefy_run_tests` run the journey once as each user, each in a fresh database of its own, and report each run on its own line as `<name> [<user>]`:
168
+ `lowdefy test` and `lowdefy_run_tests` run the journey once as each user, each on fresh databases of its own, and report each run on its own line as `<name> [<user>]`:
169
169
 
170
170
  ```
171
171
  PASS edits a ticket [admin] (6 steps, 2310ms)
@@ -190,21 +190,21 @@ Fixture records are test data written for the journey: never rows copied with cr
190
190
 
191
191
  ## What `lowdefy test` prints
192
192
 
193
- `lowdefy test` prints each data set once per run, as `data tickets: 203 documents`, and the warnings its load returned (size advice, connections that share a collection). `lowdefy data list` prints each data set in `tests/data/` with the documents it loads and the users it names.
193
+ `lowdefy test` prints each data set once per run, as `data tickets: 203 documents`, and the warnings its load returned (size advice). `lowdefy data list` prints each data set in `tests/data/` with the documents it loads and the users it names.
194
194
 
195
195
  ## How a journey reaches its database
196
196
 
197
197
  A data set journey runs on the running dev server, beside your own browser tabs:
198
198
 
199
199
  1. The dev server starts one in-memory MongoDB replica set the first time a data set journey runs, on a free port from 49152 up so it never holds a port one of your apps needs. It stops, and its files are removed, when the dev server stops; if it dies, the journey that finds it fails and the next one starts a new store. The first run downloads the MongoDB binary once (`Downloading MongoDB <version> for journey data sets (once).`). Set `MONGOMS_VERSION` to match your cluster's MongoDB version.
200
- 2. Each journey run gets a fresh database on it, loaded with the indexes, then the generated documents, then the fixtures. Runs never see each other's writes, so an agent's journey can run alongside `lowdefy test`.
201
- 3. Every browser the journey opens carries a cookie that only the dev server's own headless browser can produce. Requests with it read the run's database. Your own tabs carry no such cookie and keep using your real database on the same server.
202
- 4. When the journey ends, its browsers close, the dev server waits up to 30 seconds for background work the journey started (detached `CallApi` calls, background endpoint work), and then drops the database.
200
+ 2. Each journey run gets fresh databases on it, one per database target (see **One database per target** above), each loaded with its connections' indexes, then generated documents, then fixtures. Runs never see each other's writes, so an agent's journey can run alongside `lowdefy test`.
201
+ 3. Every browser the journey opens carries a cookie that only the dev server's own headless browser can produce. Requests with it read the run's databases. Your own tabs carry no such cookie and keep using your real database on the same server.
202
+ 4. When the journey ends, its browsers close, the dev server waits up to 30 seconds for background work the journey started (detached `CallApi` calls, background endpoint work), and then drops the run's databases.
203
203
 
204
204
  **What is redirected:** every connection read under a data set journey goes through one check, for requests, endpoint routines, background and detached endpoint calls, websocket change stream sources, and module connections alike. The check reads the connection type's `meta.dataSet` declaration:
205
205
 
206
- - `redirect`: the run's database URI and name are merged over the connection's `properties`, whether or not the data set lists the connection. Core `MongoDBCollection` declares it.
207
- - `walled`: the type holds no database address and reaches MongoDB only through the walled client, by naming walled `MongoDBCollection` connections. Its connection passes unchanged, and each walled connection it names is read through the same check, so it takes the run's database as any `redirect` connection does. Plugin types declare it; no core type does.
206
+ - `redirect`: the run's database URI, and the name of the run's database for the connection's own target, are merged over the connection's `properties`, whether or not the data set lists the connection. Core `MongoDBCollection` declares it.
207
+ - `walled`: the type holds no database address and reaches MongoDB only through the walled client, by naming walled `MongoDBCollection` connections. Its connection passes unchanged, and each walled connection it names is read through the same check, so it takes the run's database for its target as any `redirect` connection does. Plugin types declare it; no core type does.
208
208
  - `external`: the type reaches an outside service, not your app's data. Under a data set journey every request of the type is sunk: it is recorded and answers `null`, and nothing is sent (see [Requests to outside services are sunk](#requests-to-outside-services-are-sunk)). Core `AxiosHttp`, `SendGridMail`, `SMTP`, `Stripe`, `AIGateway`, `Anthropic`, `OpenAI`, `Google`, `Mcp`, `TregConnection`, `AwsS3Bucket`, `AzureBlobContainer` and `GoogleCloudStorageBucket` declare it.
209
209
  - No declaration: the journey fails with `Connection "<id>" (type <type>) cannot run under data set "<name>": its type does not say how to redirect it.` Core `Knex`, `Redis`, `Elasticsearch`, `GoogleSheet` and `TestConnection` refuse, and so does any plugin type that has not declared.
210
210
 
@@ -214,7 +214,7 @@ The browsers a data set journey opens stay on one host of the dev server. A requ
214
214
 
215
215
  **What is not redirected:**
216
216
 
217
- - Connection types declared `external` (HTTP APIs, email, payments, AI providers, MCP, object storage) are never given the run's database. Their requests are sunk, as described below. What does not go through a request resolver still reaches the real service: an agent calling its model provider through its connection is not sunk, and an `external` type with no request resolvers (such as `Mcp`) is refused by the click rails.
217
+ - Connection types declared `external` (HTTP APIs, email, payments, AI providers, MCP, object storage) are never given the run's databases. Their requests are sunk, as described below. What does not go through a request resolver still reaches the real service: an agent calling its model provider through its connection is not sunk, and an `external` type with no request resolvers (such as `Mcp`) is refused by the click rails.
218
218
  - Code that reads a database URI from anywhere but its connection's `properties`, such as a secret or environment variable read directly. A plugin type that declares `redirect` and does this breaks its declaration.
219
219
  - The auth engine. Data set journeys never reach it: their requests carry injected users, and `/api/auth/*` answers 404 for them.
220
220
  - Atlas Search (`$search`, `$vectorSearch`): pages whose requests use it fail on the in-memory database, which has no search engine.
@@ -233,7 +233,7 @@ export default {
233
233
 
234
234
  Declare `redirect` only when the type takes its database from `properties.databaseUri` and `properties.databaseName` and nothing else. It must honour `databaseName`, as `MongoDBCollection` does, and key any client it keeps between requests by the URI it is given, never by connection id alone: a client cached by connection id keeps the database it first opened, which can be your real one.
235
235
 
236
- Declare `walled` when the type holds no database URI and reaches MongoDB only through the walled client: its requests call the resolver's `walled(connectionId)` argument and pass what it returns to `getWalledCollection` from `@lowdefy/connection-mongodb/walled`. The walled connections it names follow the data set on their own, so its writes land in the run's database:
236
+ Declare `walled` when the type holds no database URI and reaches MongoDB only through the walled client: its requests call the resolver's `walled(connectionId)` argument and pass what it returns to `getWalledCollection` from `@lowdefy/connection-mongodb/walled`. The walled connections it names follow the data set on their own, so its writes land in the run's databases:
237
237
 
238
238
  ```js
239
239
  // connection export
@@ -254,7 +254,7 @@ async function AcceptMatch({ connection, request, walled }) {
254
254
 
255
255
  A type that also calls an outside service declares `external` instead, and its requests are sunk under a data set journey. Declare `external` only for a type that reaches an outside service and holds none of your app's data. Leave it undeclared for any other data store: data set journeys that use it are refused rather than run against your real data.
256
256
 
257
- A `walled` type can have some request types that reach an outside service, such as one that downloads files or calls an AI provider. Declare `meta.dataSet: 'external'` on those request resolvers. Under a data set journey only those requests are sunk; the type's other requests run for real against the run's database:
257
+ A `walled` type can have some request types that reach an outside service, such as one that downloads files or calls an AI provider. Declare `meta.dataSet: 'external'` on those request resolvers. Under a data set journey only those requests are sunk; the type's other requests run for real against the run's databases:
258
258
 
259
259
  ```js
260
260
  // request resolver
@@ -279,7 +279,7 @@ The dev server cannot check a `walled` or `external` declaration, since a connec
279
279
 
280
280
  A data set journey fails two kinds of click, so that it never reaches a real service and never fails for a reason that is not the app's. A click on a connection the data set cannot run is refused before it acts, naming the block and why; a click that runs an auth action fails once it has run:
281
281
 
282
- - A click on a block whose events reach a connection, through a `Request` action or a `CallAPI` into an endpoint routine, whose type declares nothing, declares `external` but has no request resolvers, or that has no connection artifact. Connections whose type declares `redirect` or `walled` (such as `MongoDBCollection`) run against the run's database, and connections whose type declares `external` have their requests sunk, so both can be clicked. The message names the declaration, so you know what to change:
282
+ - A click on a block whose events reach a connection, through a `Request` action or a `CallAPI` into an endpoint routine, whose type declares nothing, declares `external` but has no request resolvers, or that has no connection artifact. Connections whose type declares `redirect` or `walled` (such as `MongoDBCollection`) run against the run's databases, and connections whose type declares `external` have their requests sunk, so both can be clicked. The message names the declaration, so you know what to change:
283
283
 
284
284
  - No declaration: `Block "export_rows" reaches connection "warehouse" (Knex, no dataSet declaration), which a data set cannot redirect, so a data-set journey cannot click it.`
285
285
  - No artifact: `Block "sync" reaches connection "legacy" (no connection artifact), which a data set cannot redirect, so a data-set journey cannot click it.`
@@ -33,7 +33,7 @@ Change the `lowdefy.yaml` to look like this:
33
33
 
34
34
  ```yaml
35
35
  name: lowdefy-project-template
36
- lowdefy: 6.1.0
36
+ lowdefy: 7.0.0
37
37
 
38
38
  pages:
39
39
  ################ -------- Copy from here -------- ################
@@ -18,7 +18,7 @@ In your `lowdefy.yaml` file, add the following:
18
18
 
19
19
  ```yaml
20
20
  name: lowdefy-project-template
21
- version: 6.1.0
21
+ version: 7.0.0
22
22
 
23
23
  ################ -------- Copy from here -------- ################
24
24
  connections:
@@ -51,7 +51,7 @@ In your `lowdefy.yaml` file, add the following:
51
51
 
52
52
  ```yaml
53
53
  name: lowdefy-project-template
54
- version: 6.1.0
54
+ version: 7.0.0
55
55
 
56
56
  connections:
57
57
  # ...
@@ -63,7 +63,7 @@ Made by a Lowdefy 🤖
63
63
  Open the `lowdefy.yaml` file using a text editor like [VS Code](https://code.visualstudio.com/download). The content of the file should look like this:
64
64
 
65
65
  ```yaml
66
- lowdefy: 6.1.0
66
+ lowdefy: 7.0.0
67
67
  name: Lowdefy starter
68
68
 
69
69
  pages: