Skip to content

Commit d889f32

Browse files
authored
v0.6.26: ui improvements, multiple response blocks, docx previews, ollama fix
2 parents 28af223 + 7f1efcc commit d889f32

File tree

445 files changed

+5267
-3242
lines changed

Some content is hidden

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

445 files changed

+5267
-3242
lines changed

.claude/rules/global.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,26 @@ Use TSDoc for documentation. No `====` separators. No non-TSDoc comments.
99
## Styling
1010
Never update global styles. Keep all styling local to components.
1111

12+
## ID Generation
13+
Never use `crypto.randomUUID()`, `nanoid`, or the `uuid` package directly. Use the utilities from `@/lib/core/utils/uuid`:
14+
15+
- `generateId()` — UUID v4, use by default
16+
- `generateShortId(size?)` — short URL-safe ID (default 21 chars), for compact identifiers
17+
18+
Both use `crypto.getRandomValues()` under the hood and work in all contexts including non-secure (HTTP) browsers.
19+
20+
```typescript
21+
// ✗ Bad
22+
import { nanoid } from 'nanoid'
23+
import { v4 as uuidv4 } from 'uuid'
24+
const id = crypto.randomUUID()
25+
26+
// ✓ Good
27+
import { generateId, generateShortId } from '@/lib/core/utils/uuid'
28+
const uuid = generateId()
29+
const shortId = generateShortId()
30+
const tiny = generateShortId(8)
31+
```
32+
1233
## Package Manager
1334
Use `bun` and `bunx`, not `npm` and `npx`.

.cursor/rules/global.mdc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,26 @@ Use TSDoc for documentation. No `====` separators. No non-TSDoc comments.
1616
## Styling
1717
Never update global styles. Keep all styling local to components.
1818

19+
## ID Generation
20+
Never use `crypto.randomUUID()`, `nanoid`, or the `uuid` package directly. Use the utilities from `@/lib/core/utils/uuid`:
21+
22+
- `generateId()` — UUID v4, use by default
23+
- `generateShortId(size?)` — short URL-safe ID (default 21 chars), for compact identifiers
24+
25+
Both use `crypto.getRandomValues()` under the hood and work in all contexts including non-secure (HTTP) browsers.
26+
27+
```typescript
28+
// ✗ Bad
29+
import { nanoid } from 'nanoid'
30+
import { v4 as uuidv4 } from 'uuid'
31+
const id = crypto.randomUUID()
32+
33+
// ✓ Good
34+
import { generateId, generateShortId } from '@/lib/core/utils/uuid'
35+
const uuid = generateId()
36+
const shortId = generateShortId()
37+
const tiny = generateShortId(8)
38+
```
39+
1940
## Package Manager
2041
Use `bun` and `bunx`, not `npm` and `npx`.

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ You are a professional software engineer. All code must follow best practices: a
77
- **Logging**: Import `createLogger` from `@sim/logger`. Use `logger.info`, `logger.warn`, `logger.error` instead of `console.log`
88
- **Comments**: Use TSDoc for documentation. No `====` separators. No non-TSDoc comments
99
- **Styling**: Never update global styles. Keep all styling local to components
10+
- **ID Generation**: Never use `crypto.randomUUID()`, `nanoid`, or `uuid` package. Use `generateId()` (UUID v4) or `generateShortId()` (compact) from `@/lib/core/utils/uuid`
1011
- **Package Manager**: Use `bun` and `bunx`, not `npm` and `npx`
1112

1213
## Architecture

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ You are a professional software engineer. All code must follow best practices: a
77
- **Logging**: Import `createLogger` from `@sim/logger`. Use `logger.info`, `logger.warn`, `logger.error` instead of `console.log`
88
- **Comments**: Use TSDoc for documentation. No `====` separators. No non-TSDoc comments
99
- **Styling**: Never update global styles. Keep all styling local to components
10+
- **ID Generation**: Never use `crypto.randomUUID()`, `nanoid`, or `uuid` package. Use `generateId()` (UUID v4) or `generateShortId()` (compact) from `@/lib/core/utils/uuid`
1011
- **Package Manager**: Use `bun` and `bunx`, not `npm` and `npx`
1112

1213
## Architecture

apps/docs/content/docs/en/blocks/response.mdx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The Response block formats and sends structured HTTP responses back to API calle
2020
</div>
2121

2222
<Callout type="info">
23-
Response blocks are terminal blocks - they end workflow execution and cannot connect to other blocks.
23+
Response blocks are exit points — when a Response block executes, it ends the workflow and sends the HTTP response immediately. Multiple Response blocks can be placed on different branches (e.g. after a Router or Condition), but only the first one to execute determines the API response.
2424
</Callout>
2525

2626
## Configuration Options
@@ -77,7 +77,11 @@ Condition (Error Detected) → Router → Response (400/500, Error Details)
7777

7878
## Outputs
7979

80-
Response blocks are terminal — no downstream blocks execute after them. However, the block does define outputs (`data`, `status`, `headers`) which are used to construct the HTTP response sent back to the API caller.
80+
Response blocks are exit points — when one executes, no further blocks run. The block defines outputs (`data`, `status`, `headers`) which are used to construct the HTTP response sent back to the API caller.
81+
82+
<Callout type="warning">
83+
If a Response block is placed on a parallel branch, there are no guarantees about whether other parallel blocks will run or not. Execution order across parallel branches is non-deterministic, so a parallel block may execute before or after the Response block on any given run. Avoid placing Response blocks in parallel with blocks that have important side effects.
84+
</Callout>
8185

8286
## Variable References
8387

@@ -110,10 +114,10 @@ Use the `<variable.name>` syntax to dynamically insert workflow variables into y
110114
- **Validate variable references**: Ensure all referenced variables exist and contain the expected data types before the Response block executes
111115

112116
<FAQ items={[
113-
{ question: "Can I have multiple Response blocks in a workflow?", answer: "No. The Response block is a single-instance block — only one is allowed per workflow. If you need different responses for different conditions, use a Condition or Router block upstream to determine what data reaches the single Response block." },
117+
{ question: "Can I have multiple Response blocks in a workflow?", answer: "Yes. You can place multiple Response blocks on different branches (e.g. after a Router or Condition block). The first Response block to execute determines the API response and ends the workflow. This is useful for returning different responses based on conditions — for example, a 200 on the success branch and a 500 on the error branch." },
114118
{ question: "What triggers require a Response block?", answer: "The Response block is designed for use with the API Trigger. When your workflow is invoked via the API, the Response block sends the structured HTTP response back to the caller. Other trigger types (like webhooks or schedules) do not require a Response block." },
115119
{ question: "What is the difference between Builder and Editor mode?", answer: "Builder mode provides a visual interface for constructing your response structure with fields and types. Editor mode gives you a raw JSON code editor where you can write the response body directly. Builder mode is recommended for most use cases." },
116120
{ question: "What is the default status code?", answer: "If you do not specify a status code, the Response block defaults to 200 (OK). You can set any valid HTTP status code including error codes like 400, 404, or 500." },
117-
{ question: "Can the Response block connect to downstream blocks?", answer: "No. Response blocks are terminal — they end workflow execution and send the HTTP response. No further blocks can be connected after a Response block." },
121+
{ question: "Can the Response block connect to downstream blocks?", answer: "No. Response blocks are exit points — they end workflow execution and send the HTTP response. No further blocks can execute after a Response block." },
118122
]} />
119123

apps/docs/content/docs/en/execution/basics.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,9 @@ Understanding these core principles will help you build better workflows:
9696
2. **Automatic Parallelization**: Independent blocks run concurrently without configuration
9797
3. **Smart Data Flow**: Outputs flow automatically to connected blocks
9898
4. **Error Handling**: Failed blocks stop their execution path but don't affect independent paths
99-
5. **State Persistence**: All block outputs and execution details are preserved for debugging
100-
6. **Cycle Protection**: Workflows that call other workflows (via Workflow blocks, MCP tools, or API blocks) are tracked with a call chain. If the chain exceeds 25 hops, execution is stopped to prevent infinite loops
99+
5. **Response Blocks as Exit Points**: When a Response block executes, the entire workflow stops and the API response is sent immediately. Multiple Response blocks can exist on different branches — the first one to execute wins
100+
6. **State Persistence**: All block outputs and execution details are preserved for debugging
101+
7. **Cycle Protection**: Workflows that call other workflows (via Workflow blocks, MCP tools, or API blocks) are tracked with a call chain. If the chain exceeds 25 hops, execution is stopped to prevent infinite loops
101102

102103
## Next Steps
103104

apps/docs/content/docs/en/tools/cursor.mdx

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ List all cloud agents for the authenticated user with optional pagination. Retur
4545
| `apiKey` | string | Yes | Cursor API key |
4646
| `limit` | number | No | Number of agents to return \(default: 20, max: 100\) |
4747
| `cursor` | string | No | Pagination cursor from previous response |
48+
| `prUrl` | string | No | Filter agents by pull request URL |
4849

4950
#### Output
5051

@@ -173,4 +174,41 @@ Permanently delete a cloud agent. Returns API-aligned fields only.
173174
| --------- | ---- | ----------- |
174175
| `id` | string | Agent ID |
175176

177+
### `cursor_list_artifacts`
178+
179+
List generated artifact files for a cloud agent. Returns API-aligned fields only.
180+
181+
#### Input
182+
183+
| Parameter | Type | Required | Description |
184+
| --------- | ---- | -------- | ----------- |
185+
| `apiKey` | string | Yes | Cursor API key |
186+
| `agentId` | string | Yes | Unique identifier for the cloud agent \(e.g., bc_abc123\) |
187+
188+
#### Output
189+
190+
| Parameter | Type | Description |
191+
| --------- | ---- | ----------- |
192+
| `artifacts` | array | List of artifact files |
193+
|`path` | string | Artifact file path |
194+
|`size` | number | File size in bytes |
195+
196+
### `cursor_download_artifact`
197+
198+
Download a generated artifact file from a cloud agent. Returns the file for execution storage.
199+
200+
#### Input
201+
202+
| Parameter | Type | Required | Description |
203+
| --------- | ---- | -------- | ----------- |
204+
| `apiKey` | string | Yes | Cursor API key |
205+
| `agentId` | string | Yes | Unique identifier for the cloud agent \(e.g., bc_abc123\) |
206+
| `path` | string | Yes | Absolute path of the artifact to download \(e.g., /src/index.ts\) |
207+
208+
#### Output
209+
210+
| Parameter | Type | Description |
211+
| --------- | ---- | ----------- |
212+
| `file` | file | Downloaded artifact file stored in execution files |
213+
176214

apps/sim/app/(auth)/auth-layout-client.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { useEffect } from 'react'
44
import AuthBackground from '@/app/(auth)/components/auth-background'
5-
import Navbar from '@/app/(home)/components/navbar/navbar'
5+
import Navbar from '@/app/(landing)/components/navbar/navbar'
66

77
export default function AuthLayoutClient({ children }: { children: React.ReactNode }) {
88
useEffect(() => {

apps/sim/app/(auth)/components/social-login-buttons.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export function SocialLoginButtons({
8181
const githubButton = (
8282
<Button
8383
variant='outline'
84-
className='w-full rounded-[10px]'
84+
className='w-full rounded-sm border-[var(--landing-border-strong)] py-1.5 text-sm'
8585
disabled={!githubAvailable || isGithubLoading}
8686
onClick={signInWithGithub}
8787
>
@@ -93,7 +93,7 @@ export function SocialLoginButtons({
9393
const googleButton = (
9494
<Button
9595
variant='outline'
96-
className='w-full rounded-[10px]'
96+
className='w-full rounded-sm border-[var(--landing-border-strong)] py-1.5 text-sm'
9797
disabled={!googleAvailable || isGoogleLoading}
9898
onClick={signInWithGoogle}
9999
>

apps/sim/app/(auth)/components/sso-login-button.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ export function SSOLoginButton({
2828
router.push(ssoUrl)
2929
}
3030

31-
const outlineBtnClasses = cn('w-full rounded-[10px]')
31+
const outlineBtnClasses = cn(
32+
'w-full rounded-sm border-[var(--landing-border-strong)] py-1.5 text-sm'
33+
)
3234

3335
return (
3436
<Button

0 commit comments

Comments
 (0)