You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .agents/skills/add-block-preview/SKILL.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ A revealed block that is not globally GA (`enabled !== true`, or env-revealed) r
41
41
- GA via config (code cleanup pending): `{ "enabled": true }` — suffix disappears everywhere within ~30s (AppConfig TTL) + client refetch.
42
42
43
43
Same runbook as `feature-flags`: edit the hosted document, `aws appconfig start-deployment` with the `sim-<env>-fast` strategy (see the infra README).
44
-
5.**GA cleanup:** delete `preview: true` from the block (now visible to self-hosters on their next upgrade), add its `BlockMeta` + regen docs, and drop the AppConfig entry. For a v2 upgrade, this is also when v1 gets `hideFromToolbar: true` (the superseded-version paradigm).
44
+
5.**GA cleanup:** delete `preview: true` from the block (now visible to self-hosters on their next upgrade), add its `BlockMeta` + regen docs, and drop the AppConfig entry. For a v2 upgrade, this is also when v1 gets `hideFromToolbar: true`**and**`sunset: { status: 'legacy', replacedBy: '<v2-type>' }`(the superseded-version paradigm). Both edits must land in the **same commit** as the `preview: true` removal — `check-block-registry` fails a sunset block whose `replacedBy` is still `preview`, so splitting them breaks the build in between. Also move the block's `BLOCK_DISPLAY_WORKFLOWS` entry (`apps/docs/components/workflow-preview/block-display-workflows.ts`) to the new type, or `BlockPreview` silently renders nothing on the docs page.
@@ -17,7 +17,7 @@ Tables allow you to create and manage custom data tables directly within Sim. St
17
17
-**No external setup**: Create tables instantly without configuring external databases
18
18
-**Workflow-native**: Data persists across workflow executions and is accessible from any workflow in your workspace
19
19
-**Flexible schema**: Define columns with types (string, number, currency, boolean, date, json, select) and constraints (required, unique)
20
-
-**Powerful querying**: Filter, sort, and paginate data using MongoDB-style operators
20
+
-**Powerful querying**: Filter, sort, and paginate data using a typed predicate grammar
21
21
-**Agent-friendly**: Tables can be used as tools by AI agents for dynamic data storage and retrieval
22
22
23
23
**Key Features:**
@@ -54,7 +54,7 @@ Tables are created from the **Tables** section in the sidebar. Each table requir
54
54
55
55
## Usage Instructions
56
56
57
-
Create and manage custom data tables. Store, query, and manipulate structured data within workflows. Query Rows returns every matching row when Limit is omitted and fails if the result exceeds 5MB.
57
+
Create and manage custom data tables. Store, query, and manipulate structured data within workflows. Query Rows accepts a plain predicate — `{"field":"wins","op":"gte","value":10}` — for one condition. Use `all` (AND) or `any` (OR) groups for multiple or nested conditions. Operators: eq, ne, gt, gte, lt, lte, in, nin, like, ilike, nlike, nilike, contains, ncontains, startsWith, endsWith, isNull, isNotNull, isEmpty, isNotEmpty. Order is a sort spec `[{"field":"wins","direction":"desc"}]`. Query Rows returns every matching row when Limit is omitted (fails if the result exceeds 5MB — add a filter or a Limit). With a Limit, responses page: a non-null nextCursor means more rows exist — pass it back as the cursor. Columns to Return narrows each row to the selected columns (by stable id or name; one that no longer exists is skipped); leave it empty for every column.
58
58
59
59
60
60
@@ -204,29 +204,29 @@ Delete multiple rows that match filter criteria. Use with caution - supports opt
204
204
205
205
### Query Rows
206
206
207
-
Query rows from a table with filtering, sorting, and pagination
207
+
Query rows with a typed predicate filter and cursor pagination. A single filter can be a plain condition: `\{"field":"wins","op":"gte","value":10\}`. Use `all` (AND) or `any` (OR) groups for multiple or nested conditions. Operators: eq, ne, gt, gte, lt, lte, in, nin, like, ilike, nlike, nilike, contains, ncontains, startsWith, endsWith, isNull, isNotNull, isEmpty, isNotEmpty. Order is a sort spec, e.g. `[\{"field":"wins","direction":"desc"\}]`. Omit limit to return the entire result — the query fails if it exceeds the 5MB budget (narrow with a filter or set a limit). With a limit, a page can end early at the byte budget: a non-null nextCursor means more rows exist — pass it back as cursor to continue; never infer completion from page size.
|`sort`| object | No | Sort order as \{field: "asc"\|"desc"\}|
216
-
|`limit`| number | No | Maximum rows to return. Omit to return every matching row; the query fails if the result exceeds the 5MB response budget. |
217
-
|`offset`| number | No | Number of rows to skip \(default: 0\)|
214
+
|`filter`| json | No | Predicate condition, e.g. `\{"field":"wins","op":"gte","value":10\}`. Use `all` or `any` for multiple conditions; omit to match all rows. |
215
+
|`columns`| array | No | Stable column IDs or table column names to include in each row data object. Omit or pass an empty array to return all columns. A reference that matches no column is ignored. |
216
+
|`order`| json | No | Sort spec, e.g. `\[\{"field":"wins","direction":"desc"\}\]`. |
217
+
|`limit`| number | No | Maximum rows per page. Omit to return the entire matching result — fails if it exceeds the 5MB budget. With a limit, pages may byte-cut early and set nextCursor when more remain. |
218
+
|`cursor`| string | No | Opaque pagination cursor returned by a prior query. Omit for the first page. |
218
219
219
220
#### Output
220
221
221
222
| Parameter | Type | Description |
222
223
| --------- | ---- | ----------- |
223
-
|`success`| boolean | Whether query succeeded |
224
+
|`success`| boolean | Whether the query succeeded |
224
225
|`rows`| array | Query result rows |
225
226
|`rowCount`| number | Number of rows returned |
226
-
|`totalCount`| number | Total rows matching filter |
227
-
|`limit`| number | Limit used in query |
228
-
|`offset`| number | Offset used in query |
229
-
|`nextCursor`| string | Non-null when more rows match past this page. A page can end early at the byte budget, so this — not a short rowCount — is what says whether more remain. To page, advance offset by rowCount and stop when this is null. |
227
+
|`totalCount`| number | Total rows matching the predicate \(computed on the first page only\)|
228
+
|`limit`| number | Limit used in the query |
229
+
|`nextCursor`| string | Cursor to fetch the next page, or null on the last page |
230
230
231
231
### Get Row
232
232
@@ -272,65 +272,104 @@ Get the schema configuration of a table
272
272
{/* MANUAL-CONTENT-START:notes */}
273
273
## Filter Operators
274
274
275
-
Filters use MongoDB-style operators for flexible querying:
275
+
A filter is a predicate. One condition is an object naming a column, an operator, and a value:
Order is a list of column/direction pairs, applied in order:
353
+
354
+
```json
355
+
[{"field": "createdAt", "direction": "desc"}]
356
+
```
357
+
325
358
Multi-column sorting:
326
359
327
360
```json
328
-
{
329
-
"priority": "desc",
330
-
"name": "asc"
331
-
}
361
+
[
362
+
{"field": "priority", "direction": "desc"},
363
+
{"field": "name", "direction": "asc"}
364
+
]
332
365
```
333
366
367
+
## Pagination
368
+
369
+
Omit **Limit** to return every matching row in one response; the query fails if the result exceeds 5MB, so narrow with a filter rather than guessing a limit.
370
+
371
+
With a **Limit**, results page. A page can end at the limit *or* at the 5MB byte budget, whichever comes first, so a short page does not mean the end. Pass the returned `nextCursor` back as **Cursor** to fetch the next page and stop only when `nextCursor` is null — never infer completion from the row count.
0 commit comments