Skip to content

Commit 6e8f49a

Browse files
authored
Merge pull request #296 from objectstack-ai/copilot/add-query-ast-extensions
2 parents f7fd008 + a2a1b37 commit 6e8f49a

File tree

13 files changed

+454
-11
lines changed

13 files changed

+454
-11
lines changed

content/docs/references/data/field/Field.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description: Field Schema Reference
99
| :--- | :--- | :--- | :--- |
1010
| **name** | `string` | optional | Machine name (snake_case) |
1111
| **label** | `string` | optional | Human readable label |
12-
| **type** | `Enum<'text' \| 'textarea' \| 'email' \| 'url' \| 'phone' \| 'password' \| 'markdown' \| 'html' \| 'richtext' \| 'number' \| 'currency' \| 'percent' \| 'date' \| 'datetime' \| 'time' \| 'boolean' \| 'toggle' \| 'select' \| 'multiselect' \| 'radio' \| 'checkboxes' \| 'lookup' \| 'master_detail' \| 'tree' \| 'image' \| 'file' \| 'avatar' \| 'video' \| 'audio' \| 'formula' \| 'summary' \| 'autonumber' \| 'location' \| 'address' \| 'code' \| 'json' \| 'color' \| 'rating' \| 'slider' \| 'signature' \| 'qrcode' \| 'progress' \| 'tags'>` || Field Data Type |
12+
| **type** | `Enum<'text' \| 'textarea' \| 'email' \| 'url' \| 'phone' \| 'password' \| 'markdown' \| 'html' \| 'richtext' \| 'number' \| 'currency' \| 'percent' \| 'date' \| 'datetime' \| 'time' \| 'boolean' \| 'toggle' \| 'select' \| 'multiselect' \| 'radio' \| 'checkboxes' \| 'lookup' \| 'master_detail' \| 'tree' \| 'image' \| 'file' \| 'avatar' \| 'video' \| 'audio' \| 'formula' \| 'summary' \| 'autonumber' \| 'location' \| 'address' \| 'code' \| 'json' \| 'color' \| 'rating' \| 'slider' \| 'signature' \| 'qrcode' \| 'progress' \| 'tags' \| 'vector'>` || Field Data Type |
1313
| **description** | `string` | optional | Tooltip/Help text |
1414
| **format** | `string` | optional | Format string (e.g. email, phone) |
1515
| **required** | `boolean` | optional | Is required |
@@ -50,6 +50,7 @@ description: Field Schema Reference
5050
| **displayValue** | `boolean` | optional | Display human-readable value below barcode/QR code |
5151
| **allowScanning** | `boolean` | optional | Enable camera scanning for barcode/QR code input |
5252
| **currencyConfig** | `object` | optional | Configuration for currency field type |
53+
| **vectorConfig** | `object` | optional | Configuration for vector field type (AI/ML embeddings) |
5354
| **hidden** | `boolean` | optional | Hidden from default UI |
5455
| **readonly** | `boolean` | optional | Read-only in UI |
5556
| **encryption** | `boolean` | optional | Encrypt at rest |

content/docs/references/data/field/FieldType.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,5 @@ description: FieldType Schema Reference
4747
* `signature`
4848
* `qrcode`
4949
* `progress`
50-
* `tags`
50+
* `tags`
51+
* `vector`
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: VectorConfig
3+
description: VectorConfig Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **dimensions** | `integer` || Vector dimensionality (e.g., 1536 for OpenAI embeddings) |
11+
| **distanceMetric** | `Enum<'cosine' \| 'euclidean' \| 'dotProduct' \| 'manhattan'>` | optional | Distance/similarity metric for vector search |
12+
| **normalized** | `boolean` | optional | Whether vectors are normalized (unit length) |
13+
| **indexed** | `boolean` | optional | Whether to create a vector index for fast similarity search |
14+
| **indexType** | `Enum<'hnsw' \| 'ivfflat' \| 'flat'>` | optional | Vector index algorithm (HNSW for high accuracy, IVFFlat for large datasets) |

content/docs/references/ui/action/ActionParam.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ description: ActionParam Schema Reference
99
| :--- | :--- | :--- | :--- |
1010
| **name** | `string` || |
1111
| **label** | `string` || |
12-
| **type** | `Enum<'text' \| 'textarea' \| 'email' \| 'url' \| 'phone' \| 'password' \| 'markdown' \| 'html' \| 'richtext' \| 'number' \| 'currency' \| 'percent' \| 'date' \| 'datetime' \| 'time' \| 'boolean' \| 'toggle' \| 'select' \| 'multiselect' \| 'radio' \| 'checkboxes' \| 'lookup' \| 'master_detail' \| 'tree' \| 'image' \| 'file' \| 'avatar' \| 'video' \| 'audio' \| 'formula' \| 'summary' \| 'autonumber' \| 'location' \| 'address' \| 'code' \| 'json' \| 'color' \| 'rating' \| 'slider' \| 'signature' \| 'qrcode' \| 'progress' \| 'tags'>` || |
12+
| **type** | `Enum<'text' \| 'textarea' \| 'email' \| 'url' \| 'phone' \| 'password' \| 'markdown' \| 'html' \| 'richtext' \| 'number' \| 'currency' \| 'percent' \| 'date' \| 'datetime' \| 'time' \| 'boolean' \| 'toggle' \| 'select' \| 'multiselect' \| 'radio' \| 'checkboxes' \| 'lookup' \| 'master_detail' \| 'tree' \| 'image' \| 'file' \| 'avatar' \| 'video' \| 'audio' \| 'formula' \| 'summary' \| 'autonumber' \| 'location' \| 'address' \| 'code' \| 'json' \| 'color' \| 'rating' \| 'slider' \| 'signature' \| 'qrcode' \| 'progress' \| 'tags' \| 'vector'>` || |
1313
| **required** | `boolean` | optional | |
1414
| **options** | `object[]` | optional | |

packages/spec/json-schema/data/Field.json

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@
5858
"signature",
5959
"qrcode",
6060
"progress",
61-
"tags"
61+
"tags",
62+
"vector"
6263
],
6364
"description": "Field Data Type"
6465
},
@@ -344,6 +345,52 @@
344345
"additionalProperties": false,
345346
"description": "Configuration for currency field type"
346347
},
348+
"vectorConfig": {
349+
"type": "object",
350+
"properties": {
351+
"dimensions": {
352+
"type": "integer",
353+
"minimum": 1,
354+
"maximum": 10000,
355+
"description": "Vector dimensionality (e.g., 1536 for OpenAI embeddings)"
356+
},
357+
"distanceMetric": {
358+
"type": "string",
359+
"enum": [
360+
"cosine",
361+
"euclidean",
362+
"dotProduct",
363+
"manhattan"
364+
],
365+
"default": "cosine",
366+
"description": "Distance/similarity metric for vector search"
367+
},
368+
"normalized": {
369+
"type": "boolean",
370+
"default": false,
371+
"description": "Whether vectors are normalized (unit length)"
372+
},
373+
"indexed": {
374+
"type": "boolean",
375+
"default": true,
376+
"description": "Whether to create a vector index for fast similarity search"
377+
},
378+
"indexType": {
379+
"type": "string",
380+
"enum": [
381+
"hnsw",
382+
"ivfflat",
383+
"flat"
384+
],
385+
"description": "Vector index algorithm (HNSW for high accuracy, IVFFlat for large datasets)"
386+
}
387+
},
388+
"required": [
389+
"dimensions"
390+
],
391+
"additionalProperties": false,
392+
"description": "Configuration for vector field type (AI/ML embeddings)"
393+
},
347394
"hidden": {
348395
"type": "boolean",
349396
"default": false,

packages/spec/json-schema/data/FieldType.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@
4646
"signature",
4747
"qrcode",
4848
"progress",
49-
"tags"
49+
"tags",
50+
"vector"
5051
]
5152
}
5253
},

packages/spec/json-schema/data/Object.json

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@
115115
"signature",
116116
"qrcode",
117117
"progress",
118-
"tags"
118+
"tags",
119+
"vector"
119120
],
120121
"description": "Field Data Type"
121122
},
@@ -401,6 +402,52 @@
401402
"additionalProperties": false,
402403
"description": "Configuration for currency field type"
403404
},
405+
"vectorConfig": {
406+
"type": "object",
407+
"properties": {
408+
"dimensions": {
409+
"type": "integer",
410+
"minimum": 1,
411+
"maximum": 10000,
412+
"description": "Vector dimensionality (e.g., 1536 for OpenAI embeddings)"
413+
},
414+
"distanceMetric": {
415+
"type": "string",
416+
"enum": [
417+
"cosine",
418+
"euclidean",
419+
"dotProduct",
420+
"manhattan"
421+
],
422+
"default": "cosine",
423+
"description": "Distance/similarity metric for vector search"
424+
},
425+
"normalized": {
426+
"type": "boolean",
427+
"default": false,
428+
"description": "Whether vectors are normalized (unit length)"
429+
},
430+
"indexed": {
431+
"type": "boolean",
432+
"default": true,
433+
"description": "Whether to create a vector index for fast similarity search"
434+
},
435+
"indexType": {
436+
"type": "string",
437+
"enum": [
438+
"hnsw",
439+
"ivfflat",
440+
"flat"
441+
],
442+
"description": "Vector index algorithm (HNSW for high accuracy, IVFFlat for large datasets)"
443+
}
444+
},
445+
"required": [
446+
"dimensions"
447+
],
448+
"additionalProperties": false,
449+
"description": "Configuration for vector field type (AI/ML embeddings)"
450+
},
404451
"hidden": {
405452
"type": "boolean",
406453
"default": false,
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"$ref": "#/definitions/VectorConfig",
3+
"definitions": {
4+
"VectorConfig": {
5+
"type": "object",
6+
"properties": {
7+
"dimensions": {
8+
"type": "integer",
9+
"minimum": 1,
10+
"maximum": 10000,
11+
"description": "Vector dimensionality (e.g., 1536 for OpenAI embeddings)"
12+
},
13+
"distanceMetric": {
14+
"type": "string",
15+
"enum": [
16+
"cosine",
17+
"euclidean",
18+
"dotProduct",
19+
"manhattan"
20+
],
21+
"default": "cosine",
22+
"description": "Distance/similarity metric for vector search"
23+
},
24+
"normalized": {
25+
"type": "boolean",
26+
"default": false,
27+
"description": "Whether vectors are normalized (unit length)"
28+
},
29+
"indexed": {
30+
"type": "boolean",
31+
"default": true,
32+
"description": "Whether to create a vector index for fast similarity search"
33+
},
34+
"indexType": {
35+
"type": "string",
36+
"enum": [
37+
"hnsw",
38+
"ivfflat",
39+
"flat"
40+
],
41+
"description": "Vector index algorithm (HNSW for high accuracy, IVFFlat for large datasets)"
42+
}
43+
},
44+
"required": [
45+
"dimensions"
46+
],
47+
"additionalProperties": false
48+
}
49+
},
50+
"$schema": "http://json-schema.org/draft-07/schema#"
51+
}

packages/spec/json-schema/ui/Action.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@
120120
"signature",
121121
"qrcode",
122122
"progress",
123-
"tags"
123+
"tags",
124+
"vector"
124125
]
125126
},
126127
"required": {

packages/spec/json-schema/ui/ActionParam.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@
5555
"signature",
5656
"qrcode",
5757
"progress",
58-
"tags"
58+
"tags",
59+
"vector"
5960
]
6061
},
6162
"required": {

0 commit comments

Comments
 (0)