Skip to content

Commit af63079

Browse files
committed
Merge remote-tracking branch 'origin/staging' into staging-v11
# Conflicts: # scripts/check-api-validation-contracts.ts
2 parents 2994141 + edef789 commit af63079

81 files changed

Lines changed: 6771 additions & 3166 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/test-build.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,9 @@ jobs:
177177
- name: Install ripgrep
178178
run: command -v rg || (sudo apt-get update && sudo apt-get install -y ripgrep)
179179

180-
- name: Run tests with coverage
180+
# Named for what it does: `bun run test` is `vitest run`, with no
181+
# `--coverage`. See the Codecov note below.
182+
- name: Run tests
181183
env:
182184
NODE_OPTIONS: '--no-warnings --max-old-space-size=8192'
183185
NEXT_PUBLIC_APP_URL: 'https://www.sim.ai'
@@ -199,6 +201,14 @@ jobs:
199201
fi
200202
echo "✅ Schema and migrations are in sync"
201203
204+
# DEAD PATH: nothing generates `apps/sim/coverage`. The test step runs
205+
# `vitest run` without `--coverage`, and vitest.config.ts declares no
206+
# coverage provider, so this uploads nothing and still reports success in
207+
# ~1s (`fail_ci_if_error: false` hides it). `@vitest/coverage-v8` IS
208+
# installed, so wiring it up is possible — but coverage instrumentation
209+
# costs test time and nothing gates on the result today. Left in place
210+
# pending a decision to either enable coverage or drop this step; do not
211+
# read its green tick as "coverage was published".
202212
- name: Upload coverage to Codecov
203213
uses: codecov/codecov-action@0fb7174895f61a3b6b78fc075e0cd60383518dac # v5
204214
with:

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,14 @@ i18n.cache
102102
# Python (apps/pii tests/tooling)
103103
__pycache__/
104104
.pytest_cache/
105+
106+
# Local file-upload spill directory. `UPLOAD_DIR_SERVER` is
107+
# `join(process.cwd(), 'uploads')`, so it follows the cwd rather than a fixed
108+
# root: under `turbo run test` the cwd is apps/sim and `apps/sim/.gitignore`'s
109+
# `/uploads` catches it, but running vitest from the repo root drops ~40
110+
# `uploads/execution/**/large-value-*.json` files here instead.
111+
#
112+
# Anchored deliberately. An unanchored `uploads/` would also match
113+
# `apps/sim/lib/uploads/` — 61 files of tracked source — and silently ignore
114+
# anything added there later.
115+
/uploads

apps/docs/app/[lang]/[[...slug]]/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export default async function Page(props: { params: Promise<{ slug?: string[]; l
121121
const urlParts = page.url.split('/').filter(Boolean)
122122
let currentPath = ''
123123

124-
urlParts.forEach((part, index) => {
124+
urlParts.forEach((part: string, index: number) => {
125125
if (index === 0 && SUPPORTED_LANGUAGES.has(part)) {
126126
currentPath = `/${part}`
127127
return
@@ -131,7 +131,7 @@ export default async function Page(props: { params: Promise<{ slug?: string[]; l
131131

132132
const name = part
133133
.split('-')
134-
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
134+
.map((word: string) => word.charAt(0).toUpperCase() + word.slice(1))
135135
.join(' ')
136136

137137
if (index === urlParts.length - 1) {

apps/docs/app/api/chat/route.ts

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
import { openai } from '@ai-sdk/openai'
2-
import { convertToModelMessages, stepCountIs, streamText, tool, type UIMessage } from 'ai'
2+
import {
3+
convertToModelMessages,
4+
jsonSchema,
5+
stepCountIs,
6+
streamText,
7+
tool,
8+
type UIMessage,
9+
} from 'ai'
310
import { sql } from 'drizzle-orm'
4-
import { z } from 'zod'
511
import { db, docsEmbeddings } from '@/lib/db'
612
import { generateSearchEmbedding } from '@/lib/embeddings'
713

@@ -332,8 +338,21 @@ export async function POST(req: Request) {
332338
searchDocs: tool({
333339
description:
334340
'Search the Sim documentation for relevant content. Use this before answering any question about Sim.',
335-
inputSchema: z.object({
336-
query: z.string().describe('A focused natural-language search query.'),
341+
/**
342+
* The SDK's own schema helper instead of a zod schema: the `ai`
343+
* package's zod-v4 typings lag the workspace zod version, so a zod
344+
* object here fails the tool() overloads whenever the two drift.
345+
*/
346+
inputSchema: jsonSchema<{ query: string }>({
347+
type: 'object',
348+
properties: {
349+
query: {
350+
type: 'string',
351+
description: 'A focused natural-language search query.',
352+
},
353+
},
354+
required: ['query'],
355+
additionalProperties: false,
337356
}),
338357
execute: async ({ query }) => searchDocs(query, locale),
339358
}),

apps/docs/content/docs/en/platform/costs.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ By default, your usage is capped at the credits included in your plan. To allow
321321
| **Max** | Up to 10 ||
322322
| **Team / Enterprise** || Unlimited (Owners and Admins) |
323323

324-
Team and Enterprise plans unlock shared workspaces that belong to your organization. Every workspace created under a Team or Enterprise plan is organization-owned: Owners and Admins can create unlimited shared workspaces, while organization Members cannot create workspaces (personal workspaces created before joining the organization remain accessible). Internal members invited to a shared workspace join the organization and count toward your seat total — Enterprise invites require an available seat at invite time, while Team plans add a seat automatically when the invitee accepts. Existing Sim users who already belong to another organization can be added as external workspace members; they get workspace access without joining your organization or using one of your seats. When a Team or Enterprise subscription is cancelled or downgraded, existing shared workspaces remain accessible to current members but new invites are disabled until the organization is upgraded again.
324+
Team and Enterprise plans unlock shared workspaces that belong to your organization. Every workspace created under a Team or Enterprise plan is organization-owned: Owners and Admins can create unlimited shared workspaces, while organization Members cannot create workspaces. When someone joins the organization as an internal member, personal workspaces they own move into the organization and their usage is billed to it from then on. Internal members count toward your seat total — Enterprise invites require an available seat at invite time, while Team plans add a seat automatically when the invitee accepts. External workspace members get access to specific workspaces without joining your organization or using one of your seats; they must already be on a paid Sim plan (their own Pro or Max subscription, or another organization that seats them), and invitees who already belong to another organization always join this way. When a Team or Enterprise subscription is cancelled or downgraded, existing shared workspaces remain accessible to current members but new invites are disabled until the organization is upgraded again.
325325

326326
### Rate Limits
327327

0 commit comments

Comments
 (0)