Skip to content

Commit 1c03b3a

Browse files
committed
Merge remote-tracking branch 'origin/staging' into feat/permission-aware-knowledge
2 parents b520971 + d6e083e commit 1c03b3a

8 files changed

Lines changed: 96 additions & 94 deletions

File tree

apps/docs/content/docs/tables/index.mdx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,13 @@ Every column has a type, which decides how its values are stored and validated.
2424
| **Currency** | An amount in a currency you pick per column | `$1,234.56` |
2525
| **Boolean** | `true` or `false` | `true` |
2626
| **Date** | A date | `2026-03-16` |
27-
| **Expiration** | An absolute row expiration time, stored as Unix epoch seconds (seconds since January 1, 1970 UTC) | `1773671400` |
2827
| **JSON** | An object or array | `{ "tier": "pro" }` |
2928
| **Select** | One of a fixed set of options, or several | `Pro` |
3029

3130
Types are enforced as you enter values, so a Number column only takes numbers.
3231

3332
A Currency column stores a plain number and renders it in the currency you choose for that column, so filters, sorts, and exports all see the amount itself. Changing a column's currency relabels it — it does not convert the amounts.
3433

35-
A table can have one Expiration column. Adding it enables row expiration; rows with a non-empty expiration value become eligible for deletion after that time passes. Cleanup runs periodically, so actual row removal may happen after the expiration timestamp rather than exactly at it. Deleting the Expiration column disables expiration for the table. Expiration cells use the date editor, while APIs and workflows read and write integer Unix epoch seconds.
36-
3734
## Editing a table
3835

3936
Open the **Tables** section in the sidebar and click **New table** to create one. Add columns from the column header, type into a cell to edit it, and paste rows from a spreadsheet to bulk-load. Filter and sort from the toolbar without changing the underlying data. The editor has full keyboard support; see [keyboard shortcuts](/keyboard-shortcuts).

apps/docs/content/docs/workflows/blocks/agent.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Live tool-call chips stream for **OpenAI, Anthropic, Azure Anthropic, Google, Ve
112112
| Anthropic | Summaries only — These generations omit full thinking; Sim requests summarized thinking on streaming runs. | `claude-fable-5-1`, `claude-fable-5`, `claude-sonnet-5`, `claude-opus-5`, `claude-opus-4-8`, `claude-opus-4-7`, `claude-opus-4-6`, `claude-sonnet-4-6`, `claude-opus-4-5`, `claude-opus-4-1`, `claude-sonnet-4-5`, `claude-haiku-4-5` |
113113
| Azure OpenAI | Summaries only — Requires OpenAI organization verification; falls back to no summaries. | `azure/gpt-5.4`, `azure/gpt-5.4-mini`, `azure/gpt-5.4-nano`, `azure/gpt-5.2`, `azure/gpt-5.1`, `azure/gpt-5.1-codex`, `azure/gpt-5`, `azure/gpt-5-mini`, `azure/gpt-5-nano`, `azure/o3`, `azure/o4-mini` |
114114
| Azure Anthropic | Summaries only — These generations omit full thinking; Sim requests summarized thinking on streaming runs. | `azure-anthropic/claude-opus-4-6`, `azure-anthropic/claude-opus-4-5`, `azure-anthropic/claude-sonnet-4-5`, `azure-anthropic/claude-opus-4-1`, `azure-anthropic/claude-haiku-4-5` |
115-
| Google | Summaries only | `gemini-3.6-flash`, `gemini-3.5-flash-lite`, `gemini-3.5-flash`, `gemini-3.1-pro-preview`, `gemini-3.1-flash-lite`, `gemini-3-flash-preview`, `gemini-2.5-pro`, `gemini-2.5-flash`, `gemini-2.5-flash-lite` |
115+
| Google | Summaries only | `gemini-3.8-flash`, `gemini-3.6-flash`, `gemini-3.5-flash-lite`, `gemini-3.5-flash`, `gemini-3.1-pro-preview`, `gemini-3.1-flash-lite`, `gemini-3-flash-preview`, `gemini-2.5-pro`, `gemini-2.5-flash`, `gemini-2.5-flash-lite` |
116116
| Vertex AI | Summaries only | `vertex/gemini-3.5-flash`, `vertex/gemini-3.1-pro-preview`, `vertex/gemini-3.1-flash-lite`, `vertex/gemini-3-flash-preview`, `vertex/gemini-2.5-pro`, `vertex/gemini-2.5-flash`, `vertex/gemini-2.5-flash-lite` |
117117
| DeepSeek | Full thinking deltas | `deepseek-v4-pro`, `deepseek-v4-flash`, `deepseek-reasoner` |
118118
| xAI | Full thinking deltas | `grok-4.6`, `grok-4.5`, `grok-4.3`, `grok-4.20-multi-agent-0309` |

apps/docs/openapi-v2-tables.json

Lines changed: 9 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -4979,16 +4979,7 @@
49794979
},
49804980
"type": {
49814981
"type": "string",
4982-
"enum": [
4983-
"string",
4984-
"number",
4985-
"currency",
4986-
"boolean",
4987-
"date",
4988-
"ttl",
4989-
"json",
4990-
"select"
4991-
],
4982+
"enum": ["string", "number", "currency", "boolean", "date", "json", "select"],
49924983
"description": "Data type of values stored in the column."
49934984
},
49944985
"required": {
@@ -5266,16 +5257,7 @@
52665257
},
52675258
"type": {
52685259
"type": "string",
5269-
"enum": [
5270-
"string",
5271-
"number",
5272-
"currency",
5273-
"boolean",
5274-
"date",
5275-
"ttl",
5276-
"json",
5277-
"select"
5278-
],
5260+
"enum": ["string", "number", "currency", "boolean", "date", "json", "select"],
52795261
"description": "Column data type."
52805262
},
52815263
"required": {
@@ -5454,16 +5436,7 @@
54545436
},
54555437
"type": {
54565438
"type": "string",
5457-
"enum": [
5458-
"string",
5459-
"number",
5460-
"currency",
5461-
"boolean",
5462-
"date",
5463-
"ttl",
5464-
"json",
5465-
"select"
5466-
],
5439+
"enum": ["string", "number", "currency", "boolean", "date", "json", "select"],
54675440
"description": "Data type of values stored in the column."
54685441
},
54695442
"required": {
@@ -5563,16 +5536,7 @@
55635536
},
55645537
"type": {
55655538
"type": "string",
5566-
"enum": [
5567-
"string",
5568-
"number",
5569-
"currency",
5570-
"boolean",
5571-
"date",
5572-
"ttl",
5573-
"json",
5574-
"select"
5575-
],
5539+
"enum": ["string", "number", "currency", "boolean", "date", "json", "select"],
55765540
"description": "Column data type."
55775541
},
55785542
"required": {
@@ -5669,7 +5633,7 @@
56695633
"type": {
56705634
"description": "Replacement column data type.",
56715635
"type": "string",
5672-
"enum": ["string", "number", "currency", "boolean", "date", "ttl", "json", "select"]
5636+
"enum": ["string", "number", "currency", "boolean", "date", "json", "select"]
56735637
},
56745638
"required": {
56755639
"description": "Whether inserts must supply a value for this column.",
@@ -7433,16 +7397,7 @@
74337397
},
74347398
"type": {
74357399
"type": "string",
7436-
"enum": [
7437-
"string",
7438-
"number",
7439-
"currency",
7440-
"boolean",
7441-
"date",
7442-
"ttl",
7443-
"json",
7444-
"select"
7445-
],
7400+
"enum": ["string", "number", "currency", "boolean", "date", "json", "select"],
74467401
"description": "Data type of values stored in the column."
74477402
},
74487403
"required": {
@@ -7642,16 +7597,7 @@
76427597
},
76437598
"type": {
76447599
"type": "string",
7645-
"enum": [
7646-
"string",
7647-
"number",
7648-
"currency",
7649-
"boolean",
7650-
"date",
7651-
"ttl",
7652-
"json",
7653-
"select"
7654-
],
7600+
"enum": ["string", "number", "currency", "boolean", "date", "json", "select"],
76557601
"description": "Output column data type."
76567602
},
76577603
"required": {
@@ -7792,16 +7738,7 @@
77927738
},
77937739
"type": {
77947740
"type": "string",
7795-
"enum": [
7796-
"string",
7797-
"number",
7798-
"currency",
7799-
"boolean",
7800-
"date",
7801-
"ttl",
7802-
"json",
7803-
"select"
7804-
],
7741+
"enum": ["string", "number", "currency", "boolean", "date", "json", "select"],
78057742
"description": "Output column data type."
78067743
},
78077744
"required": {
@@ -7919,16 +7856,7 @@
79197856
},
79207857
"type": {
79217858
"type": "string",
7922-
"enum": [
7923-
"string",
7924-
"number",
7925-
"currency",
7926-
"boolean",
7927-
"date",
7928-
"ttl",
7929-
"json",
7930-
"select"
7931-
],
7859+
"enum": ["string", "number", "currency", "boolean", "date", "json", "select"],
79327860
"description": "Data type of values stored in the column."
79337861
},
79347862
"required": {

apps/sim/lib/api/contracts/tables.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ export const domainObjectSchema = <T>() => z.custom<T>(isRecordLike)
5353
* Column types are a fixed enum derived from `COLUMN_TYPES` so callers cannot
5454
* send arbitrary strings the server would reject downstream.
5555
*/
56-
export const columnTypeSchema = z.enum(COLUMN_TYPES)
56+
export const columnTypeSchema = z
57+
.enum(COLUMN_TYPES)
58+
.meta({ omitEnumValuesFromOpenApi: ['ttl'] as const })
5759

5860
/** One choice in a `select` column. `id` is the stable cell key. */
5961
export const selectOptionSchema = z.object({

apps/sim/providers/models.ts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1594,6 +1594,26 @@ export const PROVIDER_DEFINITIONS: Record<string, ProviderDefinition> = {
15941594
icon: GeminiIcon,
15951595
color: '#4285F4',
15961596
models: [
1597+
{
1598+
id: 'gemini-3.8-flash',
1599+
pricing: {
1600+
input: 0.75,
1601+
cachedInput: 0.075,
1602+
output: 3.75,
1603+
updatedAt: '2026-09-02',
1604+
},
1605+
capabilities: {
1606+
temperature: { min: 0, max: 2 },
1607+
thinking: {
1608+
levels: ['low', 'medium', 'high'],
1609+
default: 'medium',
1610+
},
1611+
maxOutputTokens: 65536,
1612+
},
1613+
contextWindow: 1048576,
1614+
releaseDate: '2026-09-02',
1615+
recommended: true,
1616+
},
15971617
{
15981618
id: 'gemini-3.6-flash',
15991619
pricing: {
@@ -1612,7 +1632,6 @@ export const PROVIDER_DEFINITIONS: Record<string, ProviderDefinition> = {
16121632
},
16131633
contextWindow: 1048576,
16141634
releaseDate: '2026-07-21',
1615-
recommended: true,
16161635
},
16171636
{
16181637
id: 'gemini-3.5-flash-lite',

scripts/openapi/documents.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,10 @@ describe('generated OpenAPI documents', () => {
279279
expect(tableProperties.ownerEmail).toMatchObject({ type: 'string', format: 'email' })
280280
})
281281

282+
it('omits feature-flagged table column types', () => {
283+
expect(JSON.stringify(generatedDocument(tablesOpenApiDocument))).not.toContain('"ttl"')
284+
})
285+
282286
it('keeps billing as its own API reference group', () => {
283287
const spec = generatedDocument(billingOpenApiDocument)
284288
expect((spec.tags as JsonObject[]).map((tag) => tag.name)).toEqual(['Billing'])

scripts/openapi/generator.test.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,35 @@ describe('OpenAPI generator', () => {
194194
})
195195
})
196196

197+
it('omits feature-flagged enum values from generated schemas', () => {
198+
const columnType = z.enum(['string', 'ttl']).meta({ omitEnumValuesFromOpenApi: ['ttl'] })
199+
const body = z
200+
.object({ type: columnType.describe('Column data type.') })
201+
.meta({ id: 'HiddenEnumRequest', title: 'Hidden enum request', description: 'Request body.' })
202+
const response = z
203+
.object({ ok: z.boolean().describe('Whether the request succeeded.') })
204+
.meta({ id: 'HiddenEnumResponse', title: 'Hidden enum response', description: 'Response.' })
205+
const contract = defineRouteContract({
206+
method: 'POST',
207+
path: '/hidden-enum',
208+
body,
209+
response: { mode: 'json', schema: response },
210+
})
211+
const route = defineOpenApiRoute(
212+
contract,
213+
operation('hiddenEnum', { description: 'Response.' }),
214+
{ body, response }
215+
)
216+
const spec = generateOpenApiDocument(document([route]))
217+
const schemas = (spec.components as JsonObject).schemas as JsonObject
218+
const requestProperties = (schemas.HiddenEnumRequest as JsonObject).properties as JsonObject
219+
const documentedColumnType = requestProperties.type as JsonObject
220+
221+
expect(columnType.safeParse('ttl').success).toBe(true)
222+
expect(documentedColumnType.enum).toEqual(['string'])
223+
expect(documentedColumnType).not.toHaveProperty('omitEnumValuesFromOpenApi')
224+
})
225+
197226
it('handles every route response mode and media type', () => {
198227
const emptyContract = defineRouteContract({
199228
method: 'DELETE',

scripts/openapi/generator.ts

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,31 @@ function stripLegacySchemaIds(value: unknown): unknown {
105105
)
106106
}
107107

108+
function omitEnumValuesFromOpenApi(
109+
metadata: z.core.GlobalMeta | undefined,
110+
schema: JsonObject,
111+
label: string
112+
): void {
113+
const omittedValues = metadata?.omitEnumValuesFromOpenApi
114+
if (omittedValues === undefined) return
115+
116+
invariant(
117+
Array.isArray(omittedValues) && omittedValues.length > 0,
118+
`${label} omitEnumValuesFromOpenApi must be a non-empty array`
119+
)
120+
invariant(
121+
Array.isArray(schema.enum),
122+
`${label} omitEnumValuesFromOpenApi requires an enum schema`
123+
)
124+
for (const value of omittedValues) {
125+
invariant(schema.enum.includes(value), `${label} omits an enum value that does not exist`)
126+
}
127+
128+
schema.enum = schema.enum.filter((value) => !omittedValues.includes(value))
129+
invariant(schema.enum.length > 0, `${label} cannot omit every enum value`)
130+
Reflect.deleteProperty(schema, 'omitEnumValuesFromOpenApi')
131+
}
132+
108133
function comparableSchema(schema: ApiSchema, io: SchemaIo): unknown {
109134
const cached = comparableSchemaCache.get(schema)?.get(io)
110135
if (cached) return cached
@@ -206,14 +231,12 @@ function generateSchema(
206231
unrepresentable: 'any',
207232
cycles: 'ref',
208233
reused: 'inline',
209-
override: ({ zodSchema, path }) => {
234+
override: ({ zodSchema, jsonSchema, path }) => {
210235
const current = zodSchema as ApiSchema
211-
validateExamples(
212-
current,
213-
z.globalRegistry.get(current)?.examples,
214-
io,
215-
`${label} at ${path.join('.') || '<root>'}`
216-
)
236+
const metadata = z.globalRegistry.get(current)
237+
const schemaLabel = `${label} at ${path.join('.') || '<root>'}`
238+
validateExamples(current, metadata?.examples, io, schemaLabel)
239+
omitEnumValuesFromOpenApi(metadata, jsonSchema as JsonObject, schemaLabel)
217240
},
218241
}) as JsonObject
219242
const byIo = generatedSchemaCache.get(schema) ?? new Map<SchemaIo, JsonObject>()

0 commit comments

Comments
 (0)