Skip to content

Commit 2fa8a9e

Browse files
committed
Merge remote-tracking branch 'origin/staging' into feat/admin-org-to-org-workspace-move
2 parents 83d1c9b + e4c0a9f commit 2fa8a9e

47 files changed

Lines changed: 1814 additions & 160 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.

.agents/skills/add-integration/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,8 +606,8 @@ If creating V2 versions (API-aligned outputs):
606606
- [ ] Created tool file for each operation
607607
- [ ] Chose exactly one boundary per tool: registered `InternalToolConfig.operation` or absolute
608608
external HTTP(S) `ToolConfig.request`
609-
- [ ] No tool points to `/api/...`, constructs a URL back to Sim, declares `request.internal`, or
610-
`directExecution`, or has an HTTP fallback for an in-process operation
609+
- [ ] No tool points to `/api/...`, constructs a URL back to Sim, declares `request.internal` or the
610+
retired `directExecution` property, or has an HTTP fallback for an in-process operation
611611
- [ ] All params have correct visibility
612612
- [ ] All nullable fields use `?? null`
613613
- [ ] All optional outputs have `optional: true`

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,3 @@ __pycache__/
111111
# `apps/sim/lib/uploads/` — 61 files of tracked source — and silently ignore
112112
# anything added there later.
113113
/uploads
114-
.gstack/

apps/docs/content/docs/de/introduction/index.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ Sim ist ein Open-Source-Tool zur visuellen Workflow-Erstellung für die Entwickl
1212
<div className="flex justify-center">
1313
<Image
1414
src="/static/introduction.png"
15-
alt="Sim visuelle Workflow-Leinwand"
16-
width={700}
17-
height={372}
15+
alt="Sim-Workflow-Editor mit leerer Leinwand, Editor-Bereich und Navigation"
16+
width={2304}
17+
height={1600}
1818
className="my-6"
1919
/>
2020
</div>

apps/docs/content/docs/en/introduction/index.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ Sim is the open-source AI workspace where teams build, deploy, and manage AI age
1414
<div className="mx-auto w-full overflow-hidden rounded-lg my-6">
1515
<Image
1616
src="/static/introduction.png"
17-
alt="A focused Sim workflow builder view with connected blocks, the Editor panel, and run output"
18-
width={1695}
19-
height={900}
17+
alt="Sim workflow editor with an empty canvas, Editor panel, and workspace navigation"
18+
width={2304}
19+
height={1600}
2020
className="w-full"
2121
/>
2222
</div>

apps/docs/content/docs/es/introduction/index.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ Sim es un constructor de flujos de trabajo visuales de código abierto para crea
1212
<div className="flex justify-center">
1313
<Image
1414
src="/static/introduction.png"
15-
alt="Lienzo visual de flujos de trabajo de Sim"
16-
width={700}
17-
height={372}
15+
alt="Editor de flujos de Sim con lienzo vacío, panel Editor y navegación"
16+
width={2304}
17+
height={1600}
1818
className="my-6"
1919
/>
2020
</div>
@@ -114,4 +114,4 @@ Implementa en tu propia infraestructura usando Docker Compose o Kubernetes. Mant
114114
<Card title="Permisos de equipo" href="/permissions/roles-and-permissions">
115115
Configura roles y permisos del espacio de trabajo
116116
</Card>
117-
</Cards>
117+
</Cards>

apps/docs/content/docs/fr/introduction/index.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ Sim est un constructeur de flux de travail visuel open-source pour créer et dé
1212
<div className="flex justify-center">
1313
<Image
1414
src="/static/introduction.png"
15-
alt="Canevas de flux de travail visuel Sim"
16-
width={700}
17-
height={372}
15+
alt="Éditeur de flux Sim avec canevas vide, panneau Editor et navigation"
16+
width={2304}
17+
height={1600}
1818
className="my-6"
1919
/>
2020
</div>

apps/docs/content/docs/ja/introduction/index.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ Simはオープンソースのビジュアルワークフロービルダーで
1212
<div className="flex justify-center">
1313
<Image
1414
src="/static/introduction.png"
15-
alt="Simビジュアルワークフローキャンバス"
16-
width={700}
17-
height={372}
15+
alt="空のキャンバス、Editorパネル、ナビゲーションを表示したSimワークフローエディター"
16+
width={2304}
17+
height={1600}
1818
className="my-6"
1919
/>
2020
</div>

apps/docs/content/docs/zh/introduction/index.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ Sim 是一个开源的可视化工作流构建器,用于构建和部署 AI 代
1212
<div className="flex justify-center">
1313
<Image
1414
src="/static/introduction.png"
15-
alt="Sim 可视化工作流画布"
16-
width={700}
17-
height={372}
15+
alt="包含空白画布、Editor 面板和导航的 Sim 工作流编辑器"
16+
width={2304}
17+
height={1600}
1818
className="my-6"
1919
/>
2020
</div>
136 KB
Loading

apps/sim/app/api/auth/oauth2/authorize/route.test.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const mocks = vi.hoisted(() => ({
1414
getBaseUrl: vi.fn(),
1515
requireClient: vi.fn(),
1616
createConnection: vi.fn(),
17+
getPerRequestScopes: vi.fn(),
1718
launchConnection: vi.fn(),
1819
}))
1920

@@ -46,6 +47,9 @@ vi.mock('@/lib/credentials/application/launch-credential-connection', () => ({
4647
execute: mocks.launchConnection,
4748
},
4849
}))
50+
vi.mock('@/lib/oauth/utils', () => ({
51+
getPerRequestOAuthLinkScopes: mocks.getPerRequestScopes,
52+
}))
4953

5054
import { GET } from '@/app/api/auth/oauth2/authorize/route'
5155

@@ -89,6 +93,7 @@ describe('OAuth2 authorize route', () => {
8993
},
9094
})
9195
mocks.linkAccount.mockResolvedValue(linkResponse())
96+
mocks.getPerRequestScopes.mockReturnValue(undefined)
9297
})
9398

9499
it('creates a canonical application draft for a legacy connect URL', async () => {
@@ -123,6 +128,29 @@ describe('OAuth2 authorize route', () => {
123128
expect(mocks.createConnection).not.toHaveBeenCalled()
124129
})
125130

131+
it('passes per-request scopes to providers that cannot inherit static connector scopes', async () => {
132+
const scopes = ['openid', 'https://dynamics.microsoft.com/user_impersonation']
133+
mocks.getPerRequestScopes.mockReturnValue(scopes)
134+
mocks.createConnection.mockResolvedValue({
135+
providerId: 'microsoft-dataverse',
136+
workspaceId: WORKSPACE_ID,
137+
draftId: 'draft-1',
138+
expiresAt: new Date(),
139+
authorizationUrl: '',
140+
})
141+
142+
await GET(request({ providerId: 'microsoft-dataverse', workspaceId: WORKSPACE_ID }))
143+
144+
expect(mocks.linkAccount).toHaveBeenCalledWith(
145+
expect.objectContaining({
146+
body: expect.objectContaining({
147+
providerId: 'microsoft-dataverse',
148+
scopes,
149+
}),
150+
})
151+
)
152+
})
153+
126154
it('launches an exact draft without creating another one', async () => {
127155
const response = await GET(request({ draftId: 'draft-1' }))
128156

0 commit comments

Comments
 (0)