@docyrus/docyrus 0.0.19 → 0.0.20

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 (52) hide show
  1. package/agent-loader.js +5 -2
  2. package/agent-loader.js.map +2 -2
  3. package/main.js +185 -31
  4. package/main.js.map +2 -2
  5. package/package.json +3 -3
  6. package/resources/pi-agent/prompts/coder-system.md +106 -0
  7. package/resources/pi-agent/skills/docyrus-platform/SKILL.md +71 -0
  8. package/resources/pi-agent/skills/docyrus-platform/references/ai-capabilities.md +43 -0
  9. package/resources/pi-agent/skills/docyrus-platform/references/auth-and-multi-tenancy.md +35 -0
  10. package/resources/pi-agent/skills/docyrus-platform/references/automation-and-workflows.md +30 -0
  11. package/resources/pi-agent/skills/docyrus-platform/references/core-building-blocks.md +53 -0
  12. package/resources/pi-agent/skills/{docyrus-api-dev → docyrus-platform}/references/data-source-query-guide.md +32 -28
  13. package/resources/pi-agent/skills/docyrus-platform/references/developer-tools.md +28 -0
  14. package/resources/pi-agent/skills/docyrus-platform/references/docyrus-cli-usage.md +503 -0
  15. package/resources/pi-agent/skills/{docyrus-api-dev → docyrus-platform}/references/formula-design-guide-llm.md +15 -23
  16. package/resources/pi-agent/skills/docyrus-platform/references/integrations-and-events.md +60 -0
  17. package/resources/pi-agent/skills/docyrus-platform/references/platform-services.md +58 -0
  18. package/resources/pi-agent/skills/docyrus-platform/references/querying-and-data-operations.md +27 -0
  19. package/resources/pi-agent/prompts/coder-append-system.md +0 -19
  20. package/resources/pi-agent/skills/docyrus-ai/SKILL.md +0 -28
  21. package/resources/pi-agent/skills/docyrus-api-dev/SKILL.md +0 -161
  22. package/resources/pi-agent/skills/docyrus-api-dev/references/api-client.md +0 -349
  23. package/resources/pi-agent/skills/docyrus-api-dev/references/authentication.md +0 -238
  24. package/resources/pi-agent/skills/docyrus-api-dev/references/query-and-formulas.md +0 -592
  25. package/resources/pi-agent/skills/docyrus-api-doctor/SKILL.md +0 -70
  26. package/resources/pi-agent/skills/docyrus-api-doctor/references/checklist-details.md +0 -588
  27. package/resources/pi-agent/skills/docyrus-app-dev/SKILL.md +0 -159
  28. package/resources/pi-agent/skills/docyrus-app-dev/references/api-client-and-auth.md +0 -275
  29. package/resources/pi-agent/skills/docyrus-app-dev/references/collections-and-patterns.md +0 -352
  30. package/resources/pi-agent/skills/docyrus-app-dev/references/data-source-query-guide.md +0 -2059
  31. package/resources/pi-agent/skills/docyrus-app-dev/references/formula-design-guide-llm.md +0 -320
  32. package/resources/pi-agent/skills/docyrus-app-dev/references/query-guide.md +0 -525
  33. package/resources/pi-agent/skills/docyrus-app-ui-design/SKILL.md +0 -466
  34. package/resources/pi-agent/skills/docyrus-app-ui-design/references/component-selection-guide.md +0 -602
  35. package/resources/pi-agent/skills/docyrus-app-ui-design/references/icon-usage-guide.md +0 -463
  36. package/resources/pi-agent/skills/docyrus-app-ui-design/references/preferred-components-catalog.md +0 -242
  37. package/resources/pi-agent/skills/docyrus-apps/SKILL.md +0 -54
  38. package/resources/pi-agent/skills/docyrus-architect/SKILL.md +0 -174
  39. package/resources/pi-agent/skills/docyrus-architect/references/custom-query-guide.md +0 -410
  40. package/resources/pi-agent/skills/docyrus-architect/references/data-source-query-guide.md +0 -2059
  41. package/resources/pi-agent/skills/docyrus-architect/references/formula-design-guide-llm.md +0 -320
  42. package/resources/pi-agent/skills/docyrus-architect/references/formula-reference.md +0 -145
  43. package/resources/pi-agent/skills/docyrus-auth/SKILL.md +0 -100
  44. package/resources/pi-agent/skills/docyrus-cli-app/SKILL.md +0 -279
  45. package/resources/pi-agent/skills/docyrus-cli-app/references/cli-manifest.md +0 -532
  46. package/resources/pi-agent/skills/docyrus-cli-app/references/list-query-examples.md +0 -248
  47. package/resources/pi-agent/skills/docyrus-curl/SKILL.md +0 -32
  48. package/resources/pi-agent/skills/docyrus-discover/SKILL.md +0 -63
  49. package/resources/pi-agent/skills/docyrus-ds/SKILL.md +0 -95
  50. package/resources/pi-agent/skills/docyrus-env/SKILL.md +0 -21
  51. package/resources/pi-agent/skills/docyrus-studio/SKILL.md +0 -369
  52. package/resources/pi-agent/skills/docyrus-tui/SKILL.md +0 -15
@@ -0,0 +1,503 @@
1
+ # Docyrus CLI Usage
2
+
3
+ Complete command reference for the Docyrus CLI (`@docyrus/docyrus`).
4
+
5
+ ## Global Flags
6
+
7
+ - `-g, --global` — Use global `~/.docyrus` settings instead of local project settings
8
+
9
+ ---
10
+
11
+ ## auth — Authentication
12
+
13
+ ### `docyrus auth login`
14
+
15
+ Authorize CLI using OAuth2 device flow or manual token entry.
16
+
17
+ | Option | Type | Default | Description |
18
+ |---|---|---|---|
19
+ | `--clientId` | string | auto-resolved | OAuth2 client id |
20
+ | `--scope` | string | default scopes | OAuth2 scopes |
21
+ | `--accessToken` | string | — | Manual access token; skips device flow |
22
+ | `--refreshToken` | string | — | Manual refresh token (requires `--accessToken`) |
23
+
24
+ **Client ID resolution order:** explicit `--clientId` > `DOCYRUS_API_CLIENT_ID` env var > local config > global config > `manual-token` fallback.
25
+
26
+ **Default scopes:** `openid email profile offline_access ReadWrite.All User.ReadWrite Users.ReadWrite.All Tenant.Read Teams.Read.All DS.ReadWrite.All Docs.ReadWrite.All Architect.ReadWrite.All AI.ReadWrite.All`
27
+
28
+ ### `docyrus auth set-tokens`
29
+
30
+ Set custom access and refresh tokens for the active environment.
31
+
32
+ | Option | Type | Required | Description |
33
+ |---|---|---|---|
34
+ | `--clientId` | string | no | OAuth2 client id |
35
+ | `--scope` | string | no | OAuth2 scopes |
36
+ | `--accessToken` | string | yes | Custom access token |
37
+ | `--refreshToken` | string | no | Custom refresh token |
38
+
39
+ ### `docyrus auth accounts list`
40
+
41
+ List saved user accounts for the current API base URL.
42
+
43
+ ### `docyrus auth accounts use`
44
+
45
+ Switch active account by user ID.
46
+
47
+ | Option | Type | Required | Description |
48
+ |---|---|---|---|
49
+ | `--userId` | string | yes | User ID to activate |
50
+
51
+ ### `docyrus auth tenants list`
52
+
53
+ List available tenants for an account.
54
+
55
+ | Option | Type | Required | Description |
56
+ |---|---|---|---|
57
+ | `--userId` | string | no | User ID; defaults to active account |
58
+
59
+ ### `docyrus auth tenants use <tenantSelector>`
60
+
61
+ Switch active tenant for an account.
62
+
63
+ | Argument | Type | Required | Description |
64
+ |---|---|---|---|
65
+ | `tenantSelector` | string | yes | Tenant number (numeric) or tenant UUID |
66
+
67
+ | Option | Type | Required | Description |
68
+ |---|---|---|---|
69
+ | `--userId` | string | no | User ID; defaults to active account |
70
+ | `--scope` | string | no | Scope for tenant bootstrap login if required |
71
+
72
+ **Note:** Numeric selector = tenant number, non-numeric = UUID.
73
+
74
+ ### `docyrus auth logout`
75
+
76
+ Revoke and clear all tenant sessions for the active account.
77
+
78
+ | Option | Type | Required | Description |
79
+ |---|---|---|---|
80
+ | `--clientId` | string | no | OAuth2 client id override |
81
+
82
+ ### `docyrus auth who`
83
+
84
+ Return current authenticated user (`/v1/users/me`).
85
+
86
+ ---
87
+
88
+ ## ai — AI Agent Chat
89
+
90
+ ### `docyrus ai "<prompt>"`
91
+
92
+ Send a prompt to a Docyrus AI agent.
93
+
94
+ | Argument | Type | Required | Description |
95
+ |---|---|---|---|
96
+ | `prompt` | string | yes | Prompt string (quote when it contains spaces) |
97
+
98
+ | Option | Type | Default | Description |
99
+ |---|---|---|---|
100
+ | `--agentId` | string | default agent | Agent ID to use |
101
+ | `--deploymentId` | string | — | Agent deployment ID |
102
+
103
+ **Output behavior:**
104
+ - TTY mode: renders markdown for human readability
105
+ - `--json`, `--verbose`, or `--format`: preserves structured output
106
+
107
+ **Response fields:** `agentId`, `deploymentId`, `prompt`, `text`, `reasoning` (optional), `data` (optional).
108
+
109
+ ---
110
+
111
+ ## ds — Data Source Item Operations
112
+
113
+ ### `docyrus ds get <appSlug> <dataSourceSlug>`
114
+
115
+ Get data source metadata, including its `fields`.
116
+
117
+ | Argument | Type | Required | Description |
118
+ |---|---|---|---|
119
+ | `appSlug` | string | yes | App slug |
120
+ | `dataSourceSlug` | string | yes | Data source slug |
121
+
122
+ ### `docyrus ds list <appSlug> <dataSourceSlug>`
123
+
124
+ List data source items with the supported query parameters.
125
+
126
+ | Argument | Type | Required | Description |
127
+ |---|---|---|---|
128
+ | `appSlug` | string | yes | App slug |
129
+ | `dataSourceSlug` | string | yes | Data source slug |
130
+
131
+ Most frequently used options:
132
+
133
+ | Option | Type | Description |
134
+ |---|---|---|
135
+ | `--columns` | string | Column selection |
136
+ | `--filters` | string | JSON filter object |
137
+ | `--filterKeyword` | string | Keyword filter |
138
+ | `--orderBy` | string | Sort order |
139
+ | `--limit` | number | Result limit |
140
+ | `--offset` | number | Result offset |
141
+
142
+ Advanced options:
143
+
144
+ | Option | Type | Description |
145
+ |---|---|---|
146
+ | `--collapseRows` | boolean | Collapse rows into a single aggregated array |
147
+ | `--distinctColumns` | string | Distinct columns; comma-separated or JSON array |
148
+ | `--formulas` | string | JSON formulas object |
149
+ | `--calculations` | string | JSON calculations array |
150
+ | `--groupSummaries` | boolean | Return per-group summaries when calculations are used |
151
+ | `--fullCount` | boolean | Include total count |
152
+ | `--expand` | string | Expand columns; comma-separated or JSON array |
153
+ | `--pivot` | string | JSON pivot configuration |
154
+ | `--childQueries` | string | JSON child query array |
155
+
156
+ ### `docyrus ds create <appSlug> <dataSourceSlug>`
157
+
158
+ Create data source item(s).
159
+
160
+ | Argument | Type | Required | Description |
161
+ |---|---|---|---|
162
+ | `appSlug` | string | yes | App slug |
163
+ | `dataSourceSlug` | string | yes | Data source slug |
164
+
165
+ | Option | Type | Description |
166
+ |---|---|---|
167
+ | `--data` | string | JSON payload for record fields |
168
+ | `--fromFile` | string | Path to JSON or CSV file |
169
+
170
+ **Notes:**
171
+ - Array payloads trigger bulk create (max 50 items per batch)
172
+ - Supports JSON and CSV input files
173
+
174
+ ### `docyrus ds update <appSlug> <dataSourceSlug> [recordId]`
175
+
176
+ Update data source item(s).
177
+
178
+ | Argument | Type | Required | Description |
179
+ |---|---|---|---|
180
+ | `appSlug` | string | yes | App slug |
181
+ | `dataSourceSlug` | string | yes | Data source slug |
182
+ | `recordId` | string | for single updates | Record ID |
183
+
184
+ | Option | Type | Description |
185
+ |---|---|---|
186
+ | `--data` | string | JSON payload for record fields |
187
+ | `--fromFile` | string | Path to JSON or CSV file |
188
+
189
+ **Notes:**
190
+ - Batch update requires `id` in every item
191
+ - Cannot provide both `recordId` and batch payload
192
+
193
+ ### `docyrus ds delete <appSlug> <dataSourceSlug> <recordId>`
194
+
195
+ Delete a data source item.
196
+
197
+ | Argument | Type | Required | Description |
198
+ |---|---|---|---|
199
+ | `appSlug` | string | yes | App slug |
200
+ | `dataSourceSlug` | string | yes | Data source slug |
201
+ | `recordId` | string | yes | Record ID |
202
+
203
+ ---
204
+
205
+ ## discover — OpenAPI Discovery
206
+
207
+ ### `docyrus discover api`
208
+
209
+ Download tenant OpenAPI spec for the active tenant. Caches locally for subsequent use.
210
+
211
+ ### `docyrus discover namespaces`
212
+
213
+ List API namespaces from the active tenant's OpenAPI spec.
214
+
215
+ ### `docyrus discover path <prefix>`
216
+
217
+ List endpoints matching a path prefix.
218
+
219
+ | Argument | Type | Required | Description |
220
+ |---|---|---|---|
221
+ | `prefix` | string | yes | Path prefix (e.g., `/v1/users`) |
222
+
223
+ **Note:** Auto-normalizes paths with or without `/v1` prefix.
224
+
225
+ ### `docyrus discover endpoint <selector>`
226
+
227
+ Return full endpoint details for a path and HTTP method.
228
+
229
+ | Argument | Type | Required | Description |
230
+ |---|---|---|---|
231
+ | `selector` | string | yes | Path (defaults to GET) or `[METHOD]/path` |
232
+
233
+ **Examples:**
234
+ - `/v1/users/me` — defaults to GET
235
+ - `[PUT]/v1/users/me/photo` — explicit PUT method
236
+
237
+ ### `docyrus discover entity <name>`
238
+
239
+ Return full entity schema by name.
240
+
241
+ | Argument | Type | Required | Description |
242
+ |---|---|---|---|
243
+ | `name` | string | yes | Entity name (e.g., `UserEntity`) |
244
+
245
+ ### `docyrus discover search <query>`
246
+
247
+ Search endpoint paths and entity names.
248
+
249
+ | Argument | Type | Required | Description |
250
+ |---|---|---|---|
251
+ | `query` | string | yes | Comma-separated search terms |
252
+
253
+ ---
254
+
255
+ ## apps — App Management
256
+
257
+ ### `docyrus apps list`
258
+
259
+ List apps.
260
+
261
+ | Option | Type | Description |
262
+ |---|---|---|
263
+ | `--appType` | string | Filter by app type |
264
+
265
+ ### `docyrus apps delete`
266
+
267
+ Archive an app (soft delete).
268
+
269
+ | Option | Type | Description |
270
+ |---|---|---|
271
+ | `--appId` | string | App ID |
272
+ | `--appSlug` | string | App slug |
273
+
274
+ **Note:** Exactly one of `--appId` or `--appSlug` required.
275
+
276
+ ### `docyrus apps restore`
277
+
278
+ Restore an archived app.
279
+
280
+ | Option | Type | Description |
281
+ |---|---|---|
282
+ | `--appId` | string | App ID |
283
+ | `--appSlug` | string | App slug |
284
+
285
+ ### `docyrus apps permanent-delete`
286
+
287
+ Permanently delete an app.
288
+
289
+ | Option | Type | Description |
290
+ |---|---|---|
291
+ | `--appId` | string | App ID |
292
+ | `--appSlug` | string | App slug |
293
+
294
+ ---
295
+
296
+ ## studio — Schema Management
297
+
298
+ Manage data source schemas, fields, and enumerations via the development API.
299
+
300
+ **Common selector rules:**
301
+ - App: exactly one of `--appId` or `--appSlug`
302
+ - Data source: exactly one of `--dataSourceId` or `--dataSourceSlug` (where supported)
303
+ - Field: exactly one of `--fieldId` or `--fieldSlug` (where supported)
304
+
305
+ ### Data Source Commands
306
+
307
+ #### `docyrus studio list-data-sources`
308
+
309
+ | Option | Type | Description |
310
+ |---|---|---|
311
+ | `--appId / --appSlug` | string | App selector |
312
+ | `--expand` | string | Comma-separated expansions (e.g., `fields`) |
313
+
314
+ #### `docyrus studio get-data-source`
315
+
316
+ | Option | Type | Description |
317
+ |---|---|---|
318
+ | `--dataSourceId` | string | Data source ID |
319
+
320
+ Returns the data source metadata together with its `fields`.
321
+
322
+ #### `docyrus studio create-data-source`
323
+
324
+ | Option | Type | Description |
325
+ |---|---|---|
326
+ | `--appId / --appSlug` | string | App selector |
327
+ | `--data` | string | JSON payload |
328
+ | `--fromFile` | string | Path to JSON file |
329
+ | `--title` | string | Data source title |
330
+ | `--name` | string | Data source name |
331
+ | `--slug` | string | Data source slug |
332
+ | `--type` | string | Data source type |
333
+ | `--icon` | string | Icon |
334
+ | `--dataSharing` | string | Data sharing mode |
335
+ | `--meta` | string | JSON meta payload |
336
+
337
+ #### `docyrus studio update-data-source`
338
+
339
+ Same options as `create-data-source` plus data source selector (`--dataSourceId / --dataSourceSlug`).
340
+
341
+ #### `docyrus studio delete-data-source`
342
+
343
+ Archive a data source.
344
+
345
+ | Option | Type | Description |
346
+ |---|---|---|
347
+ | `--appId / --appSlug` | string | App selector |
348
+ | `--dataSourceId / --dataSourceSlug` | string | Data source selector |
349
+
350
+ #### `docyrus studio restore-data-source`
351
+
352
+ Restore an archived data source. Requires `--dataSourceId` (slug resolution not available for archived data sources).
353
+
354
+ #### `docyrus studio permanent-delete-data-source`
355
+
356
+ Permanently delete a data source. Requires `--dataSourceId`.
357
+
358
+ #### `docyrus studio bulk-create-data-sources`
359
+
360
+ | Option | Type | Description |
361
+ |---|---|---|
362
+ | `--appId / --appSlug` | string | App selector |
363
+ | `--data` | string | JSON payload |
364
+ | `--fromFile` | string | Path to JSON file |
365
+
366
+ ### Field Commands
367
+
368
+ #### `docyrus studio list-fields`
369
+
370
+ | Option | Type | Description |
371
+ |---|---|---|
372
+ | `--appId / --appSlug` | string | App selector |
373
+ | `--dataSourceId / --dataSourceSlug` | string | Data source selector |
374
+
375
+ #### `docyrus studio get-field`
376
+
377
+ | Option | Type | Description |
378
+ |---|---|---|
379
+ | `--appId / --appSlug` | string | App selector |
380
+ | `--dataSourceId / --dataSourceSlug` | string | Data source selector |
381
+ | `--fieldId / --fieldSlug` | string | Field selector |
382
+
383
+ #### `docyrus studio create-field`
384
+
385
+ | Option | Type | Description |
386
+ |---|---|---|
387
+ | `--appId / --appSlug` | string | App selector |
388
+ | `--dataSourceId / --dataSourceSlug` | string | Data source selector |
389
+ | `--data` | string | JSON payload |
390
+ | `--fromFile` | string | Path to JSON file |
391
+ | `--name` | string | Field name |
392
+ | `--slug` | string | Field slug |
393
+ | `--type` | string | Field type |
394
+ | `--readOnly` | boolean | Read only |
395
+ | `--status` | number | Field status |
396
+ | `--defaultValue` | string | Default value |
397
+ | `--relationDataSourceId` | string | Relation target data source ID |
398
+ | `--sortOrder` | number | Sort order |
399
+ | `--tenantEnumSetId` | string | Shared enum set ID |
400
+ | `--options` | string | JSON editor options |
401
+ | `--validations` | string | JSON validations |
402
+
403
+ #### `docyrus studio update-field`
404
+
405
+ Same options as `create-field` plus field selector (`--fieldId / --fieldSlug`).
406
+
407
+ #### `docyrus studio delete-field`
408
+
409
+ | Option | Type | Description |
410
+ |---|---|---|
411
+ | App, data source, and field selectors | string | See above |
412
+
413
+ #### `docyrus studio create-fields-batch`
414
+
415
+ | Option | Type | Description |
416
+ |---|---|---|
417
+ | `--appId / --appSlug` | string | App selector |
418
+ | `--dataSourceId / --dataSourceSlug` | string | Data source selector |
419
+ | `--data` | string | JSON payload |
420
+ | `--fromFile` | string | Path to JSON file |
421
+
422
+ #### `docyrus studio update-fields-batch`
423
+
424
+ Same options as `create-fields-batch`.
425
+
426
+ **Note:** The CLI auto-normalizes payloads: `id → fieldId`, `read_only → readOnly`, `default_value → defaultValue`, `relation_data_source_id → relationDataSourceId`, `options → editorOptions`.
427
+
428
+ #### `docyrus studio delete-fields-batch`
429
+
430
+ Same options. Payload key: `fieldIds`.
431
+
432
+ ### Enum Commands
433
+
434
+ #### `docyrus studio list-enums`
435
+
436
+ | Option | Type | Description |
437
+ |---|---|---|
438
+ | App, data source, and field selectors | string | See above |
439
+
440
+ #### `docyrus studio create-enums`
441
+
442
+ | Option | Type | Description |
443
+ |---|---|---|
444
+ | App, data source, and field selectors | string | See above |
445
+ | `--data` | string | JSON payload |
446
+ | `--fromFile` | string | Path to JSON file |
447
+ | `--enumSetId` | string | Enum set ID |
448
+
449
+ #### `docyrus studio update-enums`
450
+
451
+ Same options as `create-enums` (without `--enumSetId`).
452
+
453
+ **Note:** The CLI auto-normalizes `id → enumId`.
454
+
455
+ #### `docyrus studio delete-enums`
456
+
457
+ Same options. Payload key: `enumIds`.
458
+
459
+ ---
460
+
461
+ ## curl — Direct API Requests
462
+
463
+ ### `docyrus curl <path>`
464
+
465
+ Send arbitrary requests to the Docyrus API.
466
+
467
+ | Argument | Type | Required | Description |
468
+ |---|---|---|---|
469
+ | `path` | string | yes | API path (no absolute URLs) |
470
+
471
+ | Option | Type | Description |
472
+ |---|---|---|
473
+ | `-X, --request` | string | HTTP method (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS) |
474
+ | `-H, --header` | string[] | Request headers (`Key:Value`, repeatable) |
475
+ | `-d, --data` | string | Request payload |
476
+ | `-G, --get` | boolean | Send data as query string |
477
+ | `-i, --include` | boolean | Include status and response headers |
478
+ | `--noAuth` | boolean | Skip Authorization header |
479
+
480
+ **Notes:**
481
+ - Default method: GET (POST if `-d` provided)
482
+ - Path auto-normalizes `/v1` prefix
483
+ - JSON payloads auto-detect `Content-Type: application/json`
484
+
485
+ ---
486
+
487
+ ## Settings & Persistence
488
+
489
+ ### Storage Locations
490
+
491
+ | File | Path | Description |
492
+ |---|---|---|
493
+ | Auth state | `<settings>/auth.json` | Multi-account, multi-tenant sessions |
494
+ | Environment config | `<settings>/config.json` | Active environment and client config |
495
+ | OpenAPI cache | `<settings>/tenans/<tenantId>/openapi.json` | Cached tenant OpenAPI specs |
496
+
497
+ **Default settings root:** `./.docyrus/` (local) or `~/.docyrus/` (global with `-g`).
498
+
499
+ ### Environment Variables
500
+
501
+ | Variable | Description |
502
+ |---|---|
503
+ | `DOCYRUS_API_CLIENT_ID` | OAuth2 client ID fallback |
@@ -8,8 +8,6 @@ Two block formula formats:
8
8
 
9
9
  **Block Subquery** — correlated subquery on child table: `{ alias?, inputs, from: string, with: string | Record<string,string>, filters?: IQueryFilterGroup }`. Detected by `from`+`with`.
10
10
 
11
- Compat wrapper: `{ expression: { from, with, inputs } }` is also accepted.
12
-
13
11
  ## Block Schema
14
12
 
15
13
  Top-level requires exactly 1 element in `inputs[]`. Optional `alias` becomes SQL alias.
@@ -273,20 +271,16 @@ Allowed: int, int2, int4, int8, bigint, real, float, float4, float8, numeric, do
273
271
  {
274
272
  "key": "total_tasks",
275
273
  "expression": {
276
- "expression": {
277
- "from": "base_task", "with": "project",
278
- "inputs": [{ "kind": "aggregate", "name": "count", "inputs": [{ "kind": "column", "name": "id" }] }]
279
- }
274
+ "from": "base_task", "with": "project",
275
+ "inputs": [{ "kind": "aggregate", "name": "count", "inputs": [{ "kind": "column", "name": "id" }] }]
280
276
  }
281
277
  },
282
278
  {
283
279
  "key": "open_tasks",
284
280
  "expression": {
285
- "expression": {
286
- "from": "base_task", "with": "project",
287
- "inputs": [{ "kind": "aggregate", "name": "count", "inputs": [{ "kind": "column", "name": "id" }] }],
288
- "filters": { "rules": [{ "field": "status", "operator": "not_in", "value": ["<completed_uuid>", "<cancelled_uuid>"] }], "combinator": "and" }
289
- }
281
+ "from": "base_task", "with": "project",
282
+ "inputs": [{ "kind": "aggregate", "name": "count", "inputs": [{ "kind": "column", "name": "id" }] }],
283
+ "filters": { "rules": [{ "field": "status", "operator": "not_in", "value": ["<completed_uuid>", "<cancelled_uuid>"] }], "combinator": "and" }
290
284
  }
291
285
  }
292
286
  ]
@@ -301,18 +295,16 @@ Allowed: int, int2, int4, int8, bigint, real, float, float4, float8, numeric, do
301
295
  {
302
296
  "key": "task_stats",
303
297
  "expression": {
304
- "expression": {
305
- "from": "base_task", "with": "project",
306
- "inputs": [{
307
- "kind": "function", "name": "jsonb_build_object",
308
- "inputs": [
309
- { "kind": "literal", "literal": "total", "cast": "text" },
310
- { "kind": "aggregate", "name": "count", "inputs": [{ "kind": "column", "name": "id" }] },
311
- { "kind": "literal", "literal": "open", "cast": "text" },
312
- { "kind": "aggregate", "name": "count", "inputs": [{ "kind": "case", "cases": [{ "when": { "kind": "compare", "op": "not in", "left": { "kind": "column", "name": "status" }, "right": { "kind": "literal", "literal": ["<completed_uuid>", "<cancelled_uuid>"] } }, "then": { "kind": "column", "name": "id" } }] }] }
313
- ]
314
- }]
315
- }
298
+ "from": "base_task", "with": "project",
299
+ "inputs": [{
300
+ "kind": "function", "name": "jsonb_build_object",
301
+ "inputs": [
302
+ { "kind": "literal", "literal": "total", "cast": "text" },
303
+ { "kind": "aggregate", "name": "count", "inputs": [{ "kind": "column", "name": "id" }] },
304
+ { "kind": "literal", "literal": "open", "cast": "text" },
305
+ { "kind": "aggregate", "name": "count", "inputs": [{ "kind": "case", "cases": [{ "when": { "kind": "compare", "op": "not in", "left": { "kind": "column", "name": "status" }, "right": { "kind": "literal", "literal": ["<completed_uuid>", "<cancelled_uuid>"] } }, "then": { "kind": "column", "name": "id" } }] }] }
306
+ ]
307
+ }]
316
308
  }
317
309
  }
318
310
  ```
@@ -0,0 +1,60 @@
1
+ # Integrations & Events
2
+
3
+ ## Connector Framework
4
+
5
+ - **HTTP providers** — OAuth2-enabled external API integrations (Stripe, Slack, Microsoft, etc.) with custom transformers for request/response mapping
6
+ - **SQL providers** — Direct database connections to external databases
7
+ - **Microsoft integrations** — SharePoint and MS Graph connectors
8
+
9
+ ## Provider Features
10
+
11
+ - OAuth2 credential management with automatic token refresh
12
+ - Webhook subscription management
13
+ - Configurable pagination
14
+ - Per-tenant and per-user credential isolation
15
+
16
+ ## Webhooks & Events
17
+
18
+ - Create and manage webhooks with signed verification
19
+ - Event types: data operations, chat platform messages, collaboration events
20
+ - Public webhook keys for external service integration (AI agent, bot, email, portal, webform)
21
+ - File upload support via webhooks
22
+ - Delivery tracking with retry logic
23
+
24
+ ## Content & Document Management
25
+
26
+ ### Collaborative Document Editor
27
+
28
+ - Real-time collaborative editing
29
+ - Document versioning and history
30
+ - Fragment-based document access
31
+ - Batch document import and version management
32
+
33
+ ### File Management
34
+
35
+ - File uploads with type validation and size limits
36
+ - Organized folder structures
37
+ - File metadata and association with records
38
+
39
+ ## Messaging & Notifications
40
+
41
+ ### In-App Messaging
42
+
43
+ - Thread-based conversations
44
+ - Message history with user mentions
45
+ - File sharing in messages
46
+ - Conversation channels embedded in data sources
47
+
48
+ ### Notifications
49
+
50
+ - Notification center with read/unread tracking
51
+ - Per-type notification preferences
52
+ - Device-based push notifications
53
+ - Email notification delivery
54
+
55
+ ### Email
56
+
57
+ - Transactional email templates (signup, password reset, invitations, magic links)
58
+ - Custom HTML email templates with dynamic content
59
+ - Email configuration management
60
+ - Delivery tracking and webhook integration
@@ -0,0 +1,58 @@
1
+ # Platform Services
2
+
3
+ ## Templates & Import/Export
4
+
5
+ ### App Templates
6
+
7
+ - Pre-built, searchable app templates with categories
8
+ - One-click app creation from templates
9
+
10
+ ### Data Import
11
+
12
+ - Bulk import via file upload (CSV, JSON)
13
+ - Template-based field mapping
14
+ - Web page import and scraping
15
+ - Migration support from external platforms (Airtable, Monday.com, Notion) with user mapping, field mapping, and batch processing
16
+
17
+ ### Webforms (Public Data Collection)
18
+
19
+ - Public-facing forms (no authentication required)
20
+ - Form field mapping to data sources
21
+ - Submission webhooks, CAPTCHA support, and response tracking
22
+
23
+ ## Reporting & Analytics
24
+
25
+ - Custom query templates with variable interpolation
26
+ - Runtime filter application and result pagination
27
+ - Aggregation calculations (count, sum, avg, min, max)
28
+ - Pivot tables and cross-tab matrices
29
+ - Report definitions with widget-based visualizations
30
+
31
+ ## Deployment & Versioning
32
+
33
+ - Application deployment with streaming logs and status monitoring
34
+ - Deployment history tracking
35
+ - Worker scripts with custom endpoint configuration
36
+ - Git repository integration for version control
37
+
38
+ ## Localization & Navigation
39
+
40
+ - Multi-language translation management per app
41
+ - Language-specific field labels and locale-aware formatting
42
+ - Custom navigation structures with nested menus, pinning, and favorites
43
+
44
+ ## Platform Administration
45
+
46
+ - Audit logging with row-level change tracking and user activity history
47
+ - Resource usage tracking and quota management
48
+ - Billing accounts with subscription management
49
+ - System configuration and super admin capabilities
50
+
51
+ ## Security
52
+
53
+ - Tenant data isolation
54
+ - Encrypted environment variables and secure credential storage
55
+ - Signed webhook verification
56
+ - OAuth2 with PKCE for all authentication flows
57
+ - File validation (type checking, size limits)
58
+ - Input validation at all API boundaries