Compare commits

...

1203 Commits

Author SHA1 Message Date
Waleed
54ab82c8dd v0.5.47: deploy workflow as mcp, kb chunks tokenizer, UI improvements, jira service management tools 2025-12-30 23:18:58 -08:00
Waleed
b90cc5b874 fix(build): resolve failing build due to symlink issue in main app dockerfile (#2650) 2025-12-30 22:48:55 -08:00
Waleed
4787909851 improvement(kb): removed zustand cache syncing in kb, added chunk text tokenizer (#2647)
* improvement(kb): removed zustand cache syncing in kb, added chunk text tokenizer

* removed dead code

* removed redundant hook

* remove unused hook

* remove alert notification and use simple error

* added more popover actions

* removed debug instrumentation

* remove extraneous comments

* removed unused handler
2025-12-30 20:15:08 -08:00
Waleed
776f82c0a6 feat(i18n): update translations (#2645)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-30 19:50:11 -08:00
Vikhyath Mondreti
2cfd75a422 fix(tool-input): code subblock should be emptyable (#2646) 2025-12-30 17:45:56 -08:00
Priyanshu Solanki
c77268c13d feat(workflow-as-mcp): added ability to deploy workflows as mcp servers and mcp tools (#2415)
* added a workflow as mcp

* fixed the issue of UI rendering for deleted mcp servers

* fixing lint issues

* using mcn components

* fixing merge conflicts

* fix

* fix lint errors

* refactored code to use hasstartblock from the tirgger utils

* removing unecessary auth

* using official mcp sdk and added description fields

* using normalised input schema function

* ui fixes part 1

* remove migration before merge

* fix merge conflicts

* remove migration to prep merge

* re-add migration

* cleanup code to use mcp sdk types

* fix discovery calls

* add migration

* ui improvements

* fix lint

* fix types

* fix lint

* fix spacing

* remove migration to prep merge

* add migration back

* fix imports

* fix tool refresh ux

* fix test failures

* fix tests

* cleanup code

* styling improvements, ability to edit mcp server description, etc

* fixed ui in light mode api keys modal

* update docs

* deprecated unused input components, shifted to emcn

* updated playground, simplified components

* move images and videos

* updated more docs images

---------

Co-authored-by: priyanshu.solanki <priyanshu.solanki@saviynt.com>
Co-authored-by: Siddharth Ganesan <siddharthganesan@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
Co-authored-by: waleed <walif6@gmail.com>
2025-12-30 16:52:50 -08:00
Waleed
34bc115468 feat(i18n): update translations (#2643)
Co-authored-by: icecrasher321 <icecrasher321@users.noreply.github.com>
2025-12-30 16:27:37 -08:00
Adam Gough
2697da5d9c fix(jsm): combined jira providers for jsm (#2644) 2025-12-30 16:01:35 -08:00
Waleed
eca91232bf improvement(tools): added input validation to jira service management routes (#2642) 2025-12-30 14:55:08 -08:00
Adam Gough
7356edccbb added jsm (#2641)
Co-authored-by: aadamgough <adam@sim.ai>
2025-12-30 14:46:31 -08:00
Waleed
9208375523 feat(cursorrules): updated cursorrules and claude md file (#2640)
* feat(cursorrules): updated cursorrules and claude md file

* added rules for adding new integrations
2025-12-30 10:58:33 -08:00
Waleed
df099e9485 feat(filtering): added the ability to filter logs by date and date range (#2639) 2025-12-30 10:42:44 -08:00
ppippi-dev
f8b1880575 fix(docker): resolve @sim/logger module not found in realtime container (#2637) 2025-12-29 23:06:28 -08:00
Emir Karabeg
a7a7c8601c improvement(copilot): ui/ux; refactor: store dimensions (#2636) 2025-12-29 20:42:42 -08:00
Waleed
97a9295230 feat(kb): added permissions to workspace popover, added kb popover to view tags, edit description and kb name (#2634) 2025-12-29 18:56:50 -08:00
Emir Karabeg
e9e5721610 improvement: HITL, subblocks, general (#2633)
* improvement: knowledge tags subblock, start subblock

* improvement: terminal height, subblocks

* improvement: general settings, HITL
2025-12-29 17:51:07 -08:00
Emir Karabeg
a08d86d42b fix(note): light mode (#2631) 2025-12-29 15:39:47 -08:00
Vikhyath Mondreti
400178a3b0 fix(templates): only change updatedAt for actual updates to workflow or metadata (#2630) 2025-12-29 12:11:32 -08:00
Waleed
da1f668272 improvement(sidebar): fix workspace name truncation on sidebar preview (#2628) 2025-12-29 11:11:00 -08:00
Waleed
f895bf469b v0.5.46: build improvements, greptile, light mode improvements 2025-12-29 02:17:52 -08:00
Waleed
88065088bf fix(deploy): fix workflow change detection to handle old variable reference format (#2623) 2025-12-29 02:09:38 -08:00
Emir Karabeg
1c626dfcae improvement(globals): light colors (#2620)
* improvement(globals): light colors

* improvement(ui): logs, templates, kb, light globals

* improvement(subflows): start node and ui/ux
2025-12-28 13:28:36 -08:00
Waleed
132aae1615 feat(i18n): update translations (#2619)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-28 12:37:20 -08:00
Waleed
f44fc18041 fix(build): add tsconfig to db dockerfile (#2617)
* fix(build): add tsconfig to db dockerfile

* ack pr comment
2025-12-28 12:29:34 -08:00
Waleed
7761b16b87 feat(tools): added greptile tools/block, updated copilot panel styling (#2618) 2025-12-28 12:12:22 -08:00
Waleed
71130c8b0a improvement(monorepo): added tsconfig package, resolved type errors in testing package (#2613) 2025-12-28 00:36:48 -08:00
Waleed
dd3209af06 v0.5.45: light mode fixes, realtime usage indicator, docker build improvements 2025-12-27 19:57:42 -08:00
Waleed
7c0a3c15ac improvement(build): migrate to blacksmith sticky disks for faster builds, other build improvements (#2611) 2025-12-27 18:09:29 -08:00
Waleed
cdc1a832d7 fix(docker): add logger package to realtime dockerfile (#2610) 2025-12-27 17:55:16 -08:00
Waleed
aa9cc5604a improvement(usage-indicator): update query invalidation for usage to update in realtime (#2607)
* improvement(usage-indicator): update query invalidation for usage to update in realtime

* ack PR comments
2025-12-27 15:23:02 -08:00
Emir Karabeg
fdba1cfac2 improvement: required permissions, oauth modal badge (#2609) 2025-12-27 15:18:03 -08:00
Waleed
2e1ccb16f5 improvement(ui): hide divider when following subblock value is null (#2608)
* improvement(ui): hide divider when following subblock value is null

* closed gap in mcp dynamic args subblock
2025-12-27 15:15:43 -08:00
Waleed
b6ba3b50a7 v0.5.44: keyboard shortcuts, autolayout, light mode, byok, testing improvements 2025-12-26 21:25:19 -08:00
Waleed
8651896277 feat(i18n): update translations (#2604)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-26 21:11:01 -08:00
Emir Karabeg
3054d6c1ed fix: bg styling outside workspace (#2605) 2025-12-26 21:08:13 -08:00
Waleed
3d75445459 feat(tools): added new firecrawl agent endpoint (#2603) 2025-12-26 20:34:39 -08:00
Waleed
5add2613ff improvement(easyconnect): use native reactflow getIntersectingNodes instead of custom impl for easy connect (#2601) 2025-12-26 18:29:03 -08:00
Waleed
bd0eca04d7 fix(tag-dropdown): fix the way variables are displayed in the tag dropdown (#2597) 2025-12-26 17:17:01 -08:00
Adam Gough
a60a1fc49a improvement(edges): drag edge over block (#2596)
* drag edge over block

* fix minor stale closure

---------

Co-authored-by: aadamgough <adam@sim.ai>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-12-26 17:05:15 -08:00
Vikhyath Mondreti
298546daf1 fix(parallel): add parallel sentinel to make parallel-parallel and parallel-loop work correctly (#2593)
* fix(parallel): add parallel sentinel to make parallel-parallel and parallel-loop work correctly

* fix regular -> parallel + copilot nested subflows

* add tests

* consolidate to always explode parallel dag at runtime
2025-12-26 16:51:54 -08:00
Waleed
b60b98e42c improvement(tag-dropdown): added option to select block in tag dropdown, custom tools modal improvements, light mode fixes (#2594)
* improvement(tag-dropdown): added option to select block in tag dropdown, custom tools modal improvements, light mode fixes

* fix UI bugs

* remove unused components

* tag drop ordering fix
2025-12-26 16:24:38 -08:00
Waleed
7793a6d597 feat(kb): added tags information to kb docs table (#2589)
* feat(kb): added tags information to kb docs table

* improvement(base): table and tags styling

---------

Co-authored-by: Emir Karabeg <emirkarabeg@berkeley.edu>
2025-12-26 13:54:33 -08:00
Vikhyath Mondreti
66b8434861 fix(block-name): updating block name should update downstream var refs (#2592)
* fix(block-name): updating block name should update downstream var refs

* remove random comments
2025-12-26 12:56:02 -08:00
Adam Gough
27ec4120bc fix(tools): fixed tool outputs (#2534)
* fixed typeform

* fixed supabase tools

* salesforce fix

* removed comments

* pinecone fix

* fixed intercom

* regex constant

* removed fallback logic
2025-12-26 12:46:39 -08:00
Emir Karabeg
1f0e3f2be6 feat: light mode (#2457)
* feat(light): restored light theme

* feat: styling consolidation, note block upgrades

* improvement(zoom-prevention): moved downstream

* fix(notifications): mismatching workflow ID

* feat(light): button variant updates and controls consolidation

* improvement: UI consolidation

* feat: badges, usage limit; fix(note): iframe security; improvement(s-modal): sizing

* improvement: oauth modal, subscription

* improvement(team): ui/ux

* feat: emcn, subscription, tool input

* improvement(copilot): styling consolidation

* feat: colors consolidation

* improvement(ui): light styling

* fix(build): unused billing component

* improvement: addressed comments
2025-12-26 12:45:06 -08:00
Waleed
88cda3a9ce improvement(billing): migrate to decimaljs from number.parseFloat (#2588)
* improvement(billing): migrate to decimaljs from number.parseFloat

* ack PR comments

* ack pr comment

* consistency
2025-12-26 12:35:49 -08:00
Waleed
d707d18ee6 fix(build): update dockerfile to contain testing package deps (#2591)
* fix(build): update dockerfile to contain testing package deps

* added logger package
2025-12-26 12:20:38 -08:00
Waleed
b7f6bab282 feat(tests): added testing package, overhauled tests (#2586)
* feat(tests): added testing package, overhauled tests

* fix build
2025-12-25 16:06:47 -08:00
Waleed
61e7213425 feat(i18n): update translations (#2585)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-25 13:33:14 -08:00
Waleed
3201abab56 improvement(schedules): use tanstack query to fetch schedule data, cleanup ui on schedule info component (#2584)
* improvement(schedules): use tanstack query to fetch schedule data, cleanup ui on schedule info component

* update trigger-save UI, increase auto disable to 100 consecutive from 10

* updated docs

* consolidate consts
2025-12-25 12:09:58 -08:00
Waleed
d79696beae feat(docs): added vector search (#2583)
* feat(docs): added vector search

* ack comments
2025-12-25 11:00:57 -08:00
Waleed
f604ca39a5 feat(chat-otp): added db fallback for chat otp (#2582)
* feat(chat-otp): added db fallback for chat otp

* ack PR comments
2025-12-25 09:37:20 -08:00
Waleed
26ec12599f improvement(byok): updated styling for byok page (#2581) 2025-12-25 08:36:55 -08:00
Waleed
97372533ec feat(i18n): update translations (#2578) 2025-12-24 23:37:35 -08:00
Vikhyath Mondreti
66766a9d81 improvement(byok): remove web search block exa (#2579)
* remove exa from byok

* improvement(byok): remove web search block exa

* fix autolayout

* fix type
2025-12-24 19:26:48 -08:00
Vikhyath Mondreti
47a259b428 feat(byok): byok for hosted model capabilities (#2574)
* feat(byok): byok for hosted model capabilities

* fix type

* add ignore lint

* accidentally added feature flags

* centralize byok fetch for LLM calls

* remove feature flags ts

* fix tests

* update docs
2025-12-24 18:20:54 -08:00
Waleed
40a6bf5c8c improvement(variables): update workflows to use deployed variables, not local ones to align with the rest of the canvas components (#2577)
* improvement(variables): update workflows to use deployed variables, not local ones to align with the rest of the canvas components

* update change detection to ignore trigger id since it is runtime metadata and not actually required to be redeployed
2025-12-24 17:40:23 -08:00
Waleed
da7eca9590 fix(change-detection): move change detection logic to client-side to prevent unnecessary API calls, consolidate utils (#2576)
* fix(change-detection): move change detection logic to client-side to prevent unnecessary API calls, consolidate utils

* added tests

* ack PR comments

* added isPublished to API response
2025-12-24 17:16:35 -08:00
Waleed
92b2e34d25 feat(autolayout): add fitToView on autolayout and reduce horizontal spacing between blocks (#2575)
* feat(autolayout): add fitToView on autolayout and reduce horizontal spacing between blocks

* remove additional yaml code
2025-12-24 16:19:29 -08:00
Vikhyath Mondreti
77521a3a57 fix(cancel-workflow-exec): move cancellation tracking for multi-task envs to redis (#2573)
* fix(cancel-workflow-exec): move cancellation tracking for multi-task envs to redis

* cleanup cancellation keys after execution
2025-12-24 11:51:09 -08:00
Waleed
cb8b9c547a fix(router): update router to handle azure creds the same way the agent block does (#2572)
* fix(router): update router to handle azure creds the same way the agent block does

* cleanup
2025-12-24 10:22:47 -08:00
Vikhyath Mondreti
b1cd8d151d fix(executor): workflow abort has to send abort signal to route for correct state update (#2571) 2025-12-24 02:50:58 -08:00
Waleed
1145f5c043 fix(shortcut): fixed global keyboard commands provider to follow latest ref pattern (#2569)
* fix(shortcut): fixed global commands provider to follow best practices

* cleanup

* ack PR comment
2025-12-24 00:25:15 -08:00
Waleed
b304233062 v0.5.43: export logs, circleback, grain, vertex, code hygiene, schedule improvements 2025-12-23 19:19:18 -08:00
Waleed
3a50ce4d99 feat(i18n): update translations (#2568)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-23 19:03:43 -08:00
Waleed
810d2089cf feat(schedules): remove save button for schedules, couple schedule deployment with workflow deployment (#2566)
* feat(schedules): remove save button for schedules, couple schedule deployment with workflow deployment

* added tests

* ack PR comments

* update turborepo

* cleanup, edge cases

* ack PR comment
2025-12-23 18:53:40 -08:00
Vikhyath Mondreti
8c89507247 improvement(logs): state machine of workflow execution (#2560)
* improvement(logs): state machine of workflow execution

* cleanup more code

* fallback consistency

* fix labels

* backfill in migration correctly

* make streaming stop in chat window correctly
2025-12-23 18:27:19 -08:00
Vikhyath Mondreti
169dd4a503 fix(grafana): tool outputs (#2565)
* fix(grafana): list annotations outputs

* fix more grafana tools
2025-12-23 17:23:12 -08:00
Vikhyath Mondreti
dc4e5d3bdc fix(dropbox): access type param pass through to get refresh token (#2564) 2025-12-23 16:32:58 -08:00
Emir Karabeg
31de55cbdf feat(ux): add expandFolder to auto expand folders on nested folder creation (#2562)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-12-23 16:27:00 -08:00
Waleed
eaca49037d fix(ui): remove css transition on popover and dropdown items to avoid flicker (#2563) 2025-12-23 15:46:27 -08:00
Waleed
2d26c0cb32 feat(i18n): update translations (#2561)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-23 15:42:54 -08:00
Waleed
cdf3d759b9 fix(jina): removed conditionally included outputs from jina (#2559)
* fix(jina): removed conditionally included outputs from jina

* ack PR comments
2025-12-23 15:20:10 -08:00
Vikhyath Mondreti
bf8fbebe22 improvement(code-quality): centralize regex checks, normalization (#2554)
* improvement(code-quality): centralize regex checks, normalization

* simplify resolution

* fix(copilot): don't allow duplicate name blocks

* centralize uuid check
2025-12-23 15:12:04 -08:00
Waleed
b23299dae4 feat(i18n): update translations (#2558)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-23 14:54:44 -08:00
Waleed
6c8f1a81c1 feat(tools): added grain and circleback (#2557)
* feat(tools): added grain and circleback

* oauth to pat and tool fix

* updated docs

* remove remaining oauth references

* cleanup

---------

Co-authored-by: aadamgough <adam@sim.ai>
2025-12-23 14:34:12 -08:00
Waleed
2c36926a4e fix(perplexity): remove deprecated perplexity sonar reasoning model (#2556) 2025-12-23 13:24:18 -08:00
Waleed
89c1085950 improvement(vertex): added vertex to all LLM-based blocks, fixed refresh (#2555)
* improvement(vertex): added vertex to all LLM-based blocks, fixed refresh

* fix build
2025-12-23 13:11:56 -08:00
Waleed
4e09c389e8 improvement(usage): update usage limit in realtime, standardize token output object across providers (#2553)
* improvement(usage-limit): update usage in real time, fix token output object

* updated tokenBreakdown to tokens, standardized input/output/total token object type across providers

* update remaining references

* ack PR comment

* remove singleton query client instance from hooks, leave only in zustand
2025-12-23 13:04:47 -08:00
Vikhyath Mondreti
641ac58017 fix(frozen-canvas): need to fetch the deployment version correctly (#2552) 2025-12-23 11:37:07 -08:00
Waleed
6c1e4ff7d6 improvement(oauth): remove unused scope hints (#2551)
* improvement(oauth): remove unused scope hints

* improvement(oauth): remove scopeHints and extraneous oauth provider data

* cleanup
2025-12-23 11:26:49 -08:00
Waleed
40e30a11e9 improvement(logs): update logs export route to respect filters (#2550) 2025-12-23 10:23:27 -08:00
Vikhyath Mondreti
57e4b49bd6 v0.5.42: fix memory migration 2025-12-23 01:24:54 -08:00
Vikhyath Mondreti
d1ebad912e fix memory migration (#2548) 2025-12-23 01:19:29 -08:00
Vikhyath Mondreti
e12dd204ed v0.5.41: memory fixes, copilot improvements, knowledgebase improvements, LLM providers standardization 2025-12-23 00:15:18 -08:00
Vikhyath Mondreti
621f9a40c7 improvement(landing): free usage limit (#2547) 2025-12-23 00:07:13 -08:00
Siddharth Ganesan
3100daa346 feat(copilot): add tools to access block outputs and upstream references (#2546)
* Add copilot references tools

* Minor fixes

* Omit vars field in block outputs when id is provided
2025-12-23 00:06:24 -08:00
Priyanshu Solanki
c252e885af improvement(logs): fixed logs for parallel and loop execution flow (#2468)
* fixed logs for parallel and loop execution flow

* Fix array check for collection

* fixed for empty loop and paralle blocks and showing input on dashboard

* extracted utility functions

* fixed the refrencing errors and making sure it propogates to the console

* fix parallel

* fix tests'

---------

Co-authored-by: priyanshu.solanki <priyanshu.solanki@saviynt.com>
Co-authored-by: Siddharth Ganesan <siddharthganesan@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-12-23 00:02:02 -08:00
Waleed
b0748c82f9 fix(search): removed full text param from built-in search, anthropic provider streaming fix (#2542)
* fix(search): removed full text param from built-in search, anthropic provider streaming fix

* rewrite gemini provider with official sdk + add thinking capability

* vertex gemini consolidation

* never silently use different model

* pass oauth client through the googleAuthOptions param directly

* make server side provider registry

* remove comments

* take oauth selector below model selector

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-12-22 23:57:11 -08:00
Waleed
f5245f3eca fix(billing): add line items for wand (#2543)
* fix(billing): add line items for wand

* ack pr comment
2025-12-22 23:06:14 -08:00
Waleed
f2ef5f0811 feat(i18n): update translations (#2541)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-22 21:17:01 -08:00
Waleed
37443a7b77 improvement(kb): improve chunkers, respect user-specified chunk configurations, added tests (#2539)
* improvement(kb): improve chunkers, respect user-specified chunk configurations, added tests

* ack PR commnets

* updated docs

* cleanup
2025-12-22 20:47:29 -08:00
lif
e0d96e2126 fix(oauth): add User-Agent header to Reddit token refresh (#2517)
Reddit API requires User-Agent header for all requests including OAuth
token refresh. Without it, requests fail with 403 error after the
initial token expires.

Fixes #1822
2025-12-22 20:09:38 -08:00
Waleed
827dd0466f feat(i18n): update translations (#2538)
Co-authored-by: icecrasher321 <icecrasher321@users.noreply.github.com>
2025-12-22 20:09:03 -08:00
Vikhyath Mondreti
ccd92b9054 improvement(block-metadata): remove references to yaml syntax in best practices (#2537) 2025-12-22 20:07:29 -08:00
Vikhyath Mondreti
6af291ca9f improvement(pricing): increase free user limit to 20 usd (#2536)
* improvement(pricing): increase free user limit to 20 usd

* make gemini pricing accurate

* generate migration for db constant

* update docs

* test notif data
2025-12-22 19:51:22 -08:00
Vikhyath Mondreti
be9ab4c833 fix(dashboard): flash based on loading check (#2535) 2025-12-22 18:49:41 -08:00
Emir Karabeg
ab3a3d12fe improvement(logs): dashboard/logs optimizations and improvements (#2414)
* improvement(logs): dashboard/logs optimizations and improvements

* improvement: addressed comments

* improvement: loading

* cleanup

* ack PR comments

* cleanup more

---------

Co-authored-by: waleed <walif6@gmail.com>
2025-12-22 16:44:10 -08:00
Waleed
e01d4cb990 feat(i18n): update translations (#2530)
Co-authored-by: icecrasher321 <icecrasher321@users.noreply.github.com>
2025-12-22 16:11:59 -08:00
Vikhyath Mondreti
8c2c49eb14 fix(models): memory fixes, provider code typing, cost calculation cleanup (#2515)
* improvement(memory): should not be block scoped

* cleanup provider code

* update other providers

* cleanup fallback code

* remove flaky test

* fix memory

* move streaming fix to right level

* cleanup streaming server

* make memories workspace scoped

* update docs

* fix dedup logic

* fix streaming parsing issue for multiple onStream calls for same block

* fix(provieders): support parallel agent tool calls, consolidate utils

* address greptile comments

* remove all comments

* fixed openrouter response format handling, groq & cerebras response formats

* removed duplicate type

---------

Co-authored-by: waleed <walif6@gmail.com>
2025-12-22 15:59:53 -08:00
Waleed
086982c7a3 improvement(docs): update og image (#2529) 2025-12-22 13:16:39 -08:00
Waleed
2b7807a7de feat(i18n): update translations (#2526)
* feat(i18n): update translations

* fixed build

---------

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-22 11:20:42 -08:00
Waleed
2d4a660246 feat(intercom): added additional params to intercom tools (#2523) 2025-12-22 10:24:49 -08:00
Siddharth Ganesan
e981b1dc1b improvement(copilot): improve copilot metadata processing and tool output memory (#2516) 2025-12-21 23:24:55 -08:00
Vikhyath Mondreti
3d9d9cbc54 v0.5.40: supabase ops to allow non-public schemas, jira uuid 2025-12-21 22:28:05 -08:00
Adam Gough
58fcb4ed80 fix(jira): added uuid (#2513)
* added uuid param

* revmoed comment

* fixed naming
2025-12-21 22:04:05 -08:00
Vikhyath Mondreti
e4d211c2f0 improvement(supabase): allow non-public schemas (#2511) 2025-12-21 21:20:36 -08:00
Waleed
0f4ec962ad v0.5.39: notion, workflow variables fixes 2025-12-20 20:44:00 -08:00
Waleed
f21eaf1f10 fix(vars): add socket persistence when variable names are changed, update variable name normalization to match block name normalization, added space constraint on envvar names (#2508)
* fix(vars): add socket persistence when variable names are changed, update variable name normalization to match block name normalization, added space constraint on envvar names

* removed redundant queueing, removed unused immediate flag from sockets ops

* ack PR comments
2025-12-20 20:35:28 -08:00
Waleed
942da8815d fix(notion): remove hyphenation of incoming page ID's (#2507) 2025-12-20 19:35:44 -08:00
Waleed
4827866f9a v0.5.38: snap to grid, copilot ux improvements, billing line items 2025-12-20 17:24:38 -08:00
Waleed
214632604d feat(settings): added snap to grid slider to settings (#2504)
* feat(settings): added snap to grid slider to settings

* ack PR comments

* ack PR comment
2025-12-20 16:54:40 -08:00
Vikhyath Mondreti
1ddbac1d2e fix(code): cmd-z after refocus should not clear subblock (#2503) 2025-12-20 16:26:30 -08:00
Waleed
35a57bfad4 feat(audit): added audit log for billing line items (#2500)
* feat(audit): added audit log for billing line items

* remove migration

* reran migrations after resolving merge conflict

* ack PR comment
2025-12-20 14:10:01 -08:00
Waleed
f8678b179a fix(migrations): remove duplicate indexes (#2501) 2025-12-20 13:55:26 -08:00
Siddharth Ganesan
0ebb45b2db feat(copilot): show inline prompt to increase usage limit or upgrade plan (#2465)
* Add limit v1

* fix ui for copilot upgrade limit inline

* open settings modal

* Upgrade plan button

* Remove comments

* Ishosted check

* Fix hardcoded bumps

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-12-20 13:46:06 -08:00
Waleed
6247f421bc improvement(queries): add workspaceId to execution logs, added missing indexes based on query insights (#2471)
* improvement(queries): added missing indexes

* add workspaceId to execution logs

* remove migration to prep merge

* regen migration

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-12-20 13:33:10 -08:00
Waleed
3e697d9ed9 v0.5.37: redaction utils consolidation, logs updates, autoconnect improvements, additional kb tag types 2025-12-19 22:31:55 -08:00
Waleed
6385d82b85 improvement(ui): updated kb tag component to match existing table (#2498)
* improvement(ui): updated kb tag component to match existing table

* fix selection

* fix more ui

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-12-19 22:26:24 -08:00
Waleed
f91beb324e fix(condition): fixed deactivated edges when if and else if conditions connected to same destination block, added 100+ unit tests (#2497) 2025-12-19 21:12:49 -08:00
Priyanshu Solanki
4f69b171f2 feat(kb): Adding support for more tags to the KB (#2433)
* creating boolean, number and date tags with different equality matchings

* feat: add UI for tag field types with filter operators

- Update base-tags-modal with field type selector dropdown
- Update document-tags-modal with different input types per fieldType
- Update knowledge-tag-filters with operator dropdown and type-specific inputs
- Update search routes to support all tag slot types
- Update hook to use AllTagSlot type

* feat: add field type support to document-tag-entry component

- Add dropdown with all field types (Text, Number, Date, Boolean)
- Render different value inputs based on field type
- Update slot counting to include all field types (28 total)

* fix: resolve MAX_TAG_SLOTS error and z-index dropdown issue

- Replace MAX_TAG_SLOTS with totalSlots in document-tag-entry
- Add z-index to SelectContent in base-tags-modal for proper layering

* fix: handle non-text columns in getTagUsage query

- Only apply empty string check for text columns (tag1-tag7)
- Numeric/date/boolean columns only check IS NOT NULL
- Cast values to text for consistent output

* refactor: use EMCN components for KB UI

- Replace @/components/ui imports with @/components/emcn
- Use Combobox instead of Select for dropdowns
- Use EMCN Switch, Button, Input, Label components
- Remove unsupported 'size' prop from EMCN Button

* fix: layout for delete button next to date picker

- Change delete button from absolute to inline positioning
- Add proper column width (w-10) for delete button
- Add empty header cell for delete column
- Apply fix to both document-tag-entry and knowledge-tag-filters

* fix: clear value when switching tag field type

- Reset value to empty when changing type (e.g., boolean to text)
- Reset value when tag name changes and type differs
- Prevents 'true'/'false' from sticking in text inputs

* feat: add full support for number/date/boolean tag filtering in KB search

- Copy all tag types (number, date, boolean) from document to embedding records
- Update processDocumentTags to handle all field types with proper type conversion
- Add number/date/boolean columns to document queries in checkDocumentWriteAccess
- Update chunk creation to inherit all tag types from parent document
- Add getSearchResultFields helper for consistent query result selection
- Support structured filters with operators (eq, gt, lt, between, etc.)
- Fix search queries to include all 28 tag fields in results

* fixing tags import issue

* fix rm file

* reduced number to 3 and date to 2

* fixing lint

* fixed the prop size issue

* increased number from 3 to 5 and boolean from 7 to 2

* fixed number the sql stuff

* progress

* fix document tag and kb tag modals

* update datepicker emcn component

* fix ui

* progress on KB block tags UI

* fix issues with date filters

* fix execution parsing of types for KB tags

* remove migration before merge

* regen migrations

* fix tests and types

* address greptile comments

* fix more greptile comments

* fix filtering logic for multiple of same row

* fix tests

---------

Co-authored-by: priyanshu.solanki <priyanshu.solanki@saviynt.com>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-12-19 21:00:35 -08:00
Waleed
a1a189f328 fix(condition): remove dead code from condition handler, defer resolution to function execute tool like the function block (#2496) 2025-12-19 20:18:42 -08:00
Waleed
7dc48510dc fix(tool-input): allow multiple instances of workflow block or kb tools as agent tools (#2495)
* fix(tool-input): allow multiple instances of workflow block or kb tools as agent tools

* ack PR comments
2025-12-19 19:19:42 -08:00
Martin Yankov
4431a1a484 fix(helm): add custom egress rules to realtime network policy (#2481)
The realtime service network policy was missing the custom egress rules section
that allows configuration of additional egress rules via values.yaml. This caused
the realtime pods to be unable to connect to external databases (e.g., PostgreSQL
on port 5432) when using external database configurations.

The app network policy already had this section, but the realtime network policy
was missing it, creating an inconsistency and preventing the realtime service
from accessing external databases configured via networkPolicy.egress values.

This fix adds the same custom egress rules template section to the realtime
network policy, matching the app network policy behavior and allowing users to
configure database connectivity via values.yaml.
2025-12-19 18:59:08 -08:00
Waleed
93fe68785e fix(subflow): prevent auto-connect across subflow edges with keyboard shortcut block additions, make positioning for auto-drop smarter (#2489)
* fix(subflow): prevent auto-connect across subflow edges with keyboard shortcut block additions, make positioning for auto-drop smarter

* stronger typing
2025-12-19 18:31:29 -08:00
Vikhyath Mondreti
50c1c6775b fix(logs): always capture cost, logging size failures (#2487)
* fix(logs): truncate strings in tracespans crashing insertion

* add depth check to not crash

* custom serialization to not break tracepsans

* log costs even in log creation failure

* code cleanup?

* fix typing

* remove null bytes

* increase char limit

* reduce char limit
2025-12-19 17:39:18 -08:00
Waleed
df5f823d1c fix(autofill): add dummy inputs to prevent browser autofill for various fields, prevent having 0 workflows in workspace (#2482)
* fix(autofill): add dummy inputs to prevent browser autofill for various fields, prevent having 0 workflows in workspace

* cleanup

* ack PR comments

* fix failing test
2025-12-19 15:29:01 -08:00
Waleed
094f87fa1f fix(edges): prevent autoconnect outgoing edges from response block (#2479) 2025-12-19 13:19:53 -08:00
Waleed
65efa039da fix(redaction): consolidate redaction utils, apply them to inputs and outputs before persisting logs (#2478)
* fix(redaction): consolidate redaction utils, apply them to inputs and outputs before persisting logs

* added testing utils
2025-12-19 13:17:51 -08:00
Waleed
6b15a50311 improvement(ui): updated subscription and team settings modals to emcn (#2477) 2025-12-19 11:41:47 -08:00
Waleed
65787d7cc3 fix(api-keys): remove billed account check during api key generation (#2476) 2025-12-19 11:33:00 -08:00
Waleed
4d1a9a3f22 v0.5.36: hitl improvements, opengraph, slack fixes, one-click unsubscribe, auth checks, new db indexes 2025-12-19 01:27:49 -08:00
Waleed
656a6b8abd fix(sanitization): added more input sanitization to tool routes (#2475)
* fix(sanitization): added more input sanitization to tool routes

* ack PR comments
2025-12-19 01:27:20 -08:00
Waleed
889b44c90a improvement(db): added missing indexes for common access patterns (#2473) 2025-12-19 00:46:10 -08:00
Waleed
3a33ec929f fix(authentication): added auth checks for various routes, mysql and postgres query validation, csp improvements (#2472) 2025-12-19 00:44:52 -08:00
Waleed
24356d99ec fix(unsubscribe): add one-click unsubscribe (#2467)
* fix(unsubscribe): add one-click unsubscribe

* ack Pr comments
2025-12-18 21:16:24 -08:00
Waleed
6de1c04517 feat(i18n): update translations (#2470) 2025-12-18 21:01:51 -08:00
Adam Gough
38be2b76c4 fix(slack): respect message limit, remove duplicate canonical representations (#2469)
* fix(slack): respect message limit, remove duplicate canonical representations

* removed comment

* updated docs script

---------

Co-authored-by: aadamgough <adam@sim.ai>
2025-12-18 20:37:14 -08:00
Waleed
a2f14cab54 feat(og): add opengraph images for templates, blogs, and updated existing opengraph image for all other pages (#2466)
* feat(og): add opengraph images for templates, blogs, and updated existing opengraph image for all other pages

* added to workspace templates page as well

* ack PR comments
2025-12-18 19:15:06 -08:00
Priyanshu Solanki
474762d6fb improvement(hitl): show resume url in tag dropdown within hitl block (#2464)
* fixed the human in the loop url resolution:

* greptilecomments

* greptilecomments

---------

Co-authored-by: Pbonmars-20031006@users.noreply.github.com
2025-12-18 19:43:37 -07:00
Waleed
0005c3e465 feat(i18n): update translations (#2463)
Co-authored-by: aadamgough <aadamgough@users.noreply.github.com>
2025-12-18 18:18:31 -08:00
Adam Gough
fc40b4f7af fix(tools): improved slack output ux and jira params (#2462)
* fixed slack output

* updated jira

* removed comment

* change team uuid
2025-12-18 17:56:10 -08:00
Vikhyath Mondreti
eb07a080fb v0.5.35: helm updates, copilot improvements, 404 for docs, salesforce fixes, subflow resize clamping 2025-12-18 16:23:19 -08:00
Priyanshu Solanki
2a7f51a2f6 adding clamps for subflow drag and drops of blocks (#2460)
Co-authored-by: priyanshu.solanki <priyanshu.solanki@saviynt.com>
2025-12-18 16:57:58 -07:00
Waleed
90c3c43607 fix(blog): add back unoptimized tag, fix styling (#2461) 2025-12-18 15:55:47 -08:00
Siddharth Ganesan
83d813a7cc improvement(copilot): add edge handle validation to copilot edit workflow (#2448)
* Add edge handle validation

* Clean

* Fix lint

* Fix empty target handle
2025-12-18 15:40:00 -08:00
Vikhyath Mondreti
811c736705 fix failing lint from os contributor (#2459) 2025-12-18 15:03:31 -08:00
Vikhyath Mondreti
c6757311af Merge branch 'main' into staging 2025-12-18 14:58:48 -08:00
div
b5b12ba2d1 fix(teams): webhook notifications crash (#2426)
* fix(docs): clarify working directory for drizzle migration (#2375)

* fix(landing): prevent url encoding for spaces for footer links (#2376)

* fix: handle empty body.value in Teams webhook notification parser (#2425)

* Update directory path for migration command

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
Co-authored-by: icecrasher321 <icecrasher321@users.noreply.github.com>
Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>
Co-authored-by: mosa <mosaxiv@gmail.com>
Co-authored-by: Emir Karabeg <78010029+emir-karabeg@users.noreply.github.com>
Co-authored-by: Adam Gough <77861281+aadamgough@users.noreply.github.com>
Co-authored-by: Shivam <shivamprajapati035@gmail.com>
Co-authored-by: Gaurav Chadha <65453826+Chadha93@users.noreply.github.com>
Co-authored-by: root <root@Delta.localdomain>
2025-12-18 14:57:27 -08:00
Waleed
0d30676e34 fix(blog): revert back to using next image tags in blog (#2458) 2025-12-18 13:51:58 -08:00
Waleed
36bdccb449 fix(ui): fixed visibility issue on reset passowrd page (#2456) 2025-12-18 13:24:32 -08:00
Waleed
f45730a89e improvement(helm): added SSO and cloud storage variables to helm charts (#2454)
* improvement(helm): added SSO and cloud storage variables to helm charts

* consolidated sf types
2025-12-18 13:12:21 -08:00
Vikhyath Mondreti
04cd837e9c fix(notifs): inactivity polling filters, consolidate trigger types, minor consistency issue with filter parsing (#2452)
* fix(notifs-slac): display name for account

* fix inactivity polling check

* consolidate trigger types

* remove redundant defaults

* fix
2025-12-18 12:49:58 -08:00
Waleed
c23130a26e Revert "fix(salesforce): updated to more flexible oauth that allows production, developer, and custom domain salesforce orgs (#2441) (#2444)" (#2453)
This reverts commit 9da19e84b7.
2025-12-18 12:46:24 -08:00
Priyanshu Solanki
7575cd6f27 Merge pull request #2451 from simstudioai/improvement/SIM-514-useWebhookUrl-conditioning
improvement(useWebhookUrl): GET api/webhook is called when useWebhookUrl:true
2025-12-18 13:31:06 -07:00
priyanshu.solanki
fbde64f0b0 fixing lint errors 2025-12-18 13:04:25 -07:00
Waleed
25f7ed20f6 feat(docs): added 404 page for the docs (#2450)
* feat(docs): added 404 page for the docs

* added metadata
2025-12-18 11:46:42 -08:00
priyanshu.solanki
261aa3d72d fixing a react component: 2025-12-18 12:39:47 -07:00
Waleed
9da19e84b7 fix(salesforce): updated to more flexible oauth that allows production, developer, and custom domain salesforce orgs (#2441) (#2444)
* fix(oauth): updated oauth providers that had unstable reference IDs leading to duplicate oauth records (#2441)

* fix(oauth): updated oauth providers that had unstable reference IDs leading to duplicate oauth records

* ack PR comments

* ack PR comments

* cleanup salesforce refresh logic

* ack more PR comments
2025-12-18 11:39:28 -08:00
priyanshu.solanki
e83afc0a62 fixing the useWbehookManangement call to only call the loadwebhookorgenerateurl function when the useWebhookurl flag is true 2025-12-18 12:31:18 -07:00
Vikhyath Mondreti
1720fa8749 feat(compare-schema): ci check to make sure schema.ts never goes out of sync with migrations (#2449)
* feat(compare-schema): ci check to make sure schema.ts never goes out of sync with migrations

* test out of sync [do not merge]

* Revert "test out of sync [do not merge]"

This reverts commit 9771f66b84.
2025-12-18 11:25:19 -08:00
Waleed
f3ad7750af fix(auth): added same-origin validation to forget password route, added confirmation for disable auth FF (#2447)
* fix(auth): added same-origin validation to forget password route, added confirmation for disable auth FF

* ack PR comments
2025-12-18 11:07:25 -08:00
Vikhyath Mondreti
78b7643e65 fix(condition): async execution isolated vm error (#2446)
* fix(condition): async execution isolated vm error

* fix tests
2025-12-18 11:02:01 -08:00
Siddharth Ganesan
7ef1150383 fix(workflow-state, copilot): prevent copilot from setting undefined state, fix order of operations for copilot edit workflow, add sleep tool (#2440)
* Fix copilot ooo

* Add copilot sleep tool

* Fix lint
2025-12-18 09:57:01 -08:00
Waleed
67cfb21d08 v0.5.34: servicenow, code cleanup, prevent cyclic edge connections, custom tool fixes 2025-12-17 23:39:10 -08:00
Waleed
a337af92bc fix(custom-tools): added missing _toolSchema to internal param set for agents calling custom tools (#2445) 2025-12-17 23:38:36 -08:00
Waleed
b4a99779eb feat(i18n): update translations (#2443)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-17 20:55:06 -08:00
Waleed
471cb4747c fix(oauth): updated oauth providers that had unstable reference IDs leading to duplicate oauth records (#2441)
* fix(oauth): updated oauth providers that had unstable reference IDs leading to duplicate oauth records

* ack PR comments
2025-12-17 20:45:38 -08:00
Priyanshu Solanki
491bd783b5 fix(servicenow): update servicenow block to use basic auth instead of oauth (#2435)
* fix adding client ID and secret fields to supprot ouath

* revert servicenow to use basic auth instead of oauth

* fix failing tests

---------

Co-authored-by: priyanshu.solanki <priyanshu.solanki@saviynt.com>
Co-authored-by: waleed <walif6@gmail.com>
2025-12-17 20:41:46 -08:00
Waleed
5516fa39c3 fix(graph): prevent cyclic dependencies in graph following ReactFlow examples (#2439)
* fix(graph): prevent cyclic dependencies in graph following ReactFlow examples

* ack PR comment
2025-12-17 19:13:39 -08:00
Waleed
21fa92bc41 feat(i18n): update translations (#2438)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-17 18:01:43 -08:00
Vikhyath Mondreti
26ca37328a fix(conditions): make outputs correct (#2437) 2025-12-17 17:15:16 -08:00
Waleed
731997f768 fix(envvars): cleanup unused envvars (#2436)
* fix(envvars): cleanup unused envvars

* removed unused react-google-drive-picker dep
2025-12-17 17:13:01 -08:00
Waleed
1d6975db49 v0.5.33: loops, chat fixes, subflow resizing refactor, terminal updates 2025-12-17 15:45:39 -08:00
Waleed
c4a6d11cc0 fix(condition): used isolated vms for condition block RCE (#2432)
* fix(condition): used isolated vms for condition block RCE

* ack PR comment

* one more

* remove inputForm from sched, update loop condition to also use isolated vm

* hide servicenow
2025-12-17 15:29:25 -08:00
Waleed
7b5405e968 feat(vertex): added vertex to list of supported providers (#2430)
* feat(vertex): added vertex to list of supported providers

* added utils files for each provider, consolidated gemini utils, added dynamic verbosity and reasoning fetcher
2025-12-17 14:57:58 -08:00
Vikhyath Mondreti
1ae3b47f5c fix(inactivity-poll): need to respect level and trigger filters (#2431) 2025-12-17 14:50:33 -08:00
Waleed
3120a785df fix(terminal): fix text wrap for errors and messages with long strings (#2429) 2025-12-17 13:42:43 -08:00
Vikhyath Mondreti
8775e76c32 improvement(subflow): resize vertical height estimate (#2428)
* improvement(node-dims): share constants for node padding

* fix vertical height estimation
2025-12-17 12:07:57 -08:00
Vikhyath Mondreti
9a6c68789d fix(subflow): resizing live update 2025-12-17 11:49:24 -08:00
Waleed
08bc1125bd fix(cmd-k): when navigating to current workspace/workflow, close modal instead of navigating (#2420)
* fix(cmd-k): when navigating to current workspace, close modal instead of navigating

* ack PR comment
2025-12-17 10:21:35 -08:00
Waleed
f4f74da1dc feat(i18n): update translations (#2421)
Co-authored-by: icecrasher321 <icecrasher321@users.noreply.github.com>
2025-12-17 10:21:15 -08:00
Vikhyath Mondreti
de330d80f5 improvement(mcp): restructure mcp tools caching/fetching info to improve UX (#2416)
* feat(mcp): improve cache practice

* restructure mcps fetching, caching, UX indicators

* fix schema

* styling improvements

* fix tooltips and render issue

* fix loading sequence + add redis

---------

Co-authored-by: waleed <walif6@gmail.com>
2025-12-16 21:23:18 -08:00
Emir Karabeg
b7228d57f7 feat(service-now): added service now block (#2404)
* feat(service-now): added service now block

* fix: bun lock

* improvement: fixed @trigger.dev/sdk imports and removal of sentry blocks

* improvement: fixed @trigger.dev/sdk import

* improvement: fixed @trigger.dev/sdk import

* fix(servicenow): save accessTokenExpiresAt on initial OAuth account creation

* docs(servicenow): add ServiceNow tool documentation and icon mapping

* fixing bun lint issues

* fixing username/password fields

* fixing test file for refreshaccesstoken to support instance uri

* removing basic auth and fixing undo-redo/store.ts

* removed import set api code, changed CRUD operations to CRUD_record and added wand configuration to help users to generate JSON Arrays

---------

Co-authored-by: priyanshu.solanki <priyanshu.solanki@saviynt.com>
2025-12-16 21:16:09 -08:00
Waleed
dcbeca1abe fix(subflow): fix json stringification in subflow collections (#2419)
* fix(subflow): fix json stringification in subflow collections

* cleanup
2025-12-16 20:47:58 -08:00
Waleed
27ea333974 fix(chat): fix stale closure in workflow runner for chat (#2418) 2025-12-16 19:59:02 -08:00
Waleed
9861d3a0ac improvement(helm): added more to helm charts, remove instance selector for various cloud providers (#2412)
* improvement(helm): added more to helm charts, remove instance selector for various cloud providers

* ack PR comment
2025-12-16 18:24:00 -08:00
Waleed
fdbf8be79b fix(logs-search): restored support for log search queries (#2417) 2025-12-16 18:18:46 -08:00
Adam Gough
6f4f4e22f0 fix(loop): increased max loop iterations to 1000 (#2413) 2025-12-16 16:08:56 -08:00
Waleed
837aabca5e v0.5.32: google sheets fix, schedule input format 2025-12-16 15:41:04 -08:00
Vikhyath Mondreti
f7d2c9667f fix(serializer): condition check should check if any condition are met (#2410)
* fix(serializer): condition check should check if any condition are met

* remove comments

* remove more comments
2025-12-16 14:36:40 -08:00
Waleed
29befbc5f6 feat(schedule): add input form to schedule (#2405)
* feat(schedule): add input form to schedule

* change placeholder
2025-12-16 11:23:57 -08:00
Vikhyath Mondreti
f9cfca92bf v0.5.31: add zod as direct dep 2025-12-15 20:40:02 -08:00
Vikhyath Mondreti
9cf8aaee1b fix(sockets): add zod as direct sockets server dep (#2397)
* fix(sockets): add zod as direct sockets server dep

* fix bun lock
2025-12-15 20:25:40 -08:00
Waleed
25afacb25e v0.5.30: vllm fixes, permissions fixes, isolated vms for code execution, tool fixes 2025-12-15 19:38:01 -08:00
Emir Karabeg
0e6a1315d0 improvement: workflow loading, sidebar scrolling (#2322)
* improvement: workflow loading, sidebar scrolling

* further optimizations

* remove redundant perms calls

* remove redundant api calls

* use displayNodes local state to make dragging smooth even in larger workflows

* improvement(logs): trace span output styling

* fix(s-modal): sidebar overflow scrolling

* fix(footer): guardrails link

* improvement(loading): spinner

* refactor(training-modal): changed file name

* improvement(spinner): optimize spinner in background

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-12-15 19:21:21 -08:00
Waleed
f0dc8e81d9 fix(build): downgrade nextjs from canary to 16.0.9 (#2394) 2025-12-15 19:00:52 -08:00
Waleed
ab30d37020 feat(i18n): update translations (#2395)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-15 18:45:19 -08:00
Waleed
12d42e29ac fix(docs): regen docs (#2393) 2025-12-15 18:30:48 -08:00
Waleed
a5b7148375 fix(node): use node subprocess explicitly (#2391)
* fix(node): use node subprocess explicitly

* add explicit documentation

* fixed build
2025-12-15 18:18:26 -08:00
Adam Gough
57e6a0b621 fixed jira output (#2392) 2025-12-15 18:16:50 -08:00
Waleed
b72e111e22 fix(vm): use node child process for RCE (#2389)
* fix(vm): use node child process for RCE

* ack PR comments

* cleanup oprhaned processes

* cleaned up

* ack pr comment

* fix path

* use spawn instead of fork

* acked PR comments
2025-12-15 17:52:19 -08:00
Vikhyath Mondreti
300aaa5368 feat(slack): ability to have DM channels as destination for slack tools (#2388)
* feat(slack): tool to allow dms

* don't make new tool but separate out destination

* add log for message limit

* consolidate slack selector code

* add scopes correctly

* fix zod validation

* update message logs

* add console logs

* fix

* remove from tools where feature not needed

* add correct condition

* fix type

* fix cond eval logic
2025-12-15 17:39:53 -08:00
Waleed
bdcc42e566 fix(permissions): add client-side hints to prevent read-only users from creating workflows or folders (#2390) 2025-12-15 17:14:33 -08:00
Waleed
a45bb1bf3b fix(rce): add 'isolate' to list of trusted deps, fixed custom tools environment resolution (#2387)
* fix(rce): add isolate to list of trusted deps

* updated error enchancer in RCE

* fixed

* fix build

* fix failing test

* fix build

* fix build

* remove extraneous comment
2025-12-15 15:24:11 -08:00
Waleed
3a5363ac54 feat(i18n): update translations (#2386)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-15 14:23:29 -08:00
Waleed
17b2e58c32 improvement(rce): updated rce to use isolate pkg for RCE (#2385)
* improvement(rce): updated rce to use isolate pkg for RCE

* lazy load isolate instance

* update zoom docs
2025-12-15 13:26:39 -08:00
Vikhyath Mondreti
8d38c2f15e fix(wand): should not be able to use wand ui without write/admin perms (#2384) 2025-12-15 13:17:05 -08:00
Waleed
9762bbc451 fix(wand): validate session before allowing access to wand generation (#2383)
* fix(wand): validate session before allowing access to wand generation

* ack PR comment

* ack PR comments
2025-12-15 12:20:45 -08:00
Vikhyath Mondreti
e43afc8b6c fix(subscription): incomplete team subscription race condition (#2381) 2025-12-15 11:36:08 -08:00
Gaurav Chadha
fcf52ac4d5 fix(landing): prevent url encoding for spaces for footer links (#2376) 2025-12-15 10:59:12 -08:00
Shivam
842200bcf2 fix(docs): clarify working directory for drizzle migration (#2375) 2025-12-15 10:58:27 -08:00
Waleed
6009a7359f fix(vllm): remove requirement for api key for vllm (#2380) 2025-12-15 10:48:48 -08:00
Waleed
0acd86023c fix(blog): use unoptimized tag for image assets (#2374) 2025-12-14 23:16:09 -08:00
Waleed
a0fb889644 v0.5.29: chat voice mode, opengraph for docs, option to disable auth 2025-12-13 19:50:06 -08:00
Waleed
431f206930 fix(tools): add validation for ids in tool routes (#2371) 2025-12-13 19:40:33 -08:00
Waleed
7443e28054 feat(i18n): update translations (#2370)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-13 19:26:31 -08:00
Waleed
c962e3b398 feat(webflow): added collection, item, & site selectors for webflow (#2368)
* feat(webflow): added collection, item, & site selectors for webflow

* ack PR comments

* ack PR comments
2025-12-13 19:14:33 -08:00
Waleed
d5b95cbd33 fix(organizations): move organization better-auth client to conditionally be included based on FF (#2367)
* fix(organizations): move organization better-auth client to conditionally be included based on FF

* ack PR comment
2025-12-13 19:06:12 -08:00
Waleed
0fb084b9e4 fix(subflows): prevent cross-boundary connections on autoconnect drop between subflow blocks and regular blocks (#2366) 2025-12-13 17:38:59 -08:00
Waleed
95b9ca4670 feat(registration): allow self-hosted users to disable registration altogether (#2365)
* feat(registration): allow self-hosted users to disable registration altogether

* updated tests

* fix build
2025-12-13 17:34:53 -08:00
Vikhyath Mondreti
746ff68a2e fix(sub-deletion): subscription deletion handling for pro vs team/enterprise (#2364)
* fix(subscription): deletion should sync pro limits back to free

* consolidate duplicate code
2025-12-13 16:10:47 -08:00
Waleed
75a5b43252 feat(og): update og image (#2362) 2025-12-13 15:52:13 -08:00
Vikhyath Mondreti
8d0e50fd0d improvement(admin-routes): cleanup code that could accidentally desync stripe and DB (#2363)
* remove non-functional admin route

* stripe updates cleanup
2025-12-13 15:11:14 -08:00
Waleed
f7d1b06d75 feat(docs): add opengraph to docs for dynamic link preview (#2360) 2025-12-13 13:51:43 -08:00
Vikhyath Mondreti
73940ab390 fix(deployed-chat): voice mode (#2358)
* fix(deployed-chat): voice mode

* remove redundant check

* consolidate query

* invalidate session on password change + race condition fix
2025-12-13 12:31:03 -08:00
Vikhyath Mondreti
f111dac020 improvement(autolayout): reduce horizontal spacing (#2357) 2025-12-13 11:06:42 -08:00
Waleed
690be530c8 chore(icons): update spotify icon (#2356) 2025-12-13 02:11:42 -08:00
Waleed
4edb3be52d fix(spotify): added missing human readable scopes to oauth required modal (#2355) 2025-12-12 21:09:12 -08:00
Waleed
f526c36fc0 v0.5.28: tool fixes, sqs, spotify, nextjs update, component playground 2025-12-12 21:05:57 -08:00
Waleed
9c8d845ba4 feat(ui): added component playground & fixed training modal (#2354) 2025-12-12 21:05:26 -08:00
Waleed
65ac64c2cf feat(i18n): update translations (#2351)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-12 20:15:06 -08:00
Waleed
9e3e18601c fix(next): externalize playwright and ws (#2352) 2025-12-12 20:14:53 -08:00
Waleed
821d127c00 fix(build): explicitly install shims module from anthropic and openai in stagehand route (#2350) 2025-12-12 19:24:47 -08:00
Siddharth Ganesan
ecf5209e6f feat(integration): add spotify (#2347)
* Add spotify

* Finish spotify integration

* Fix logo

* fix build

* Rename tools

* Fix docs

* Fix lint

* Fix imports

* ran lint

---------

Co-authored-by: waleed <walif6@gmail.com>
2025-12-12 19:22:17 -08:00
Vikhyath Mondreti
132f4bca38 fix(validation): don't validate disabled blocks (#2348) 2025-12-12 19:02:08 -08:00
Waleed
d27f7c232b fix(next): remove openai and anthropic sdk's from serverExternalPackages (#2349) 2025-12-12 18:09:17 -08:00
Siddharth Ganesan
d06d2b01e3 fix(copilot): fix incorrectly sanitizing json state (#2346)
* Fix

* Fix

* Remove dead code

* Fix lint
2025-12-12 17:55:29 -08:00
Waleed
92db054c53 feat(i18n): update translations (#2345)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-12 17:50:34 -08:00
Waleed
cd7fa688c9 fix(build): fix DB dockerfile (#2344) 2025-12-12 17:11:01 -08:00
Waleed
e359dc2946 fix(cron): reject CRON requests when CRON secret is not set (#2343) 2025-12-12 17:08:48 -08:00
Vikhyath Mondreti
0415eb47fe fix(minor-bugs): grafana, zep, video generation, templates fixes (#2336)
* make creator profile required

* fix grafana tag dropdown / outputs mismatch

* fix grafana annotations to make dashboard id required

* fix fal ai

* fix fal ai

* fix zep
2025-12-12 17:02:36 -08:00
Waleed
49d31c80f5 feat(i18n): update translations (#2339)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-12 16:59:04 -08:00
Waleed
0ea600d0e8 fix(browserbase): consoldiated stagehand agent and extract, updated wand UI to resize based on panel size (#2340) 2025-12-12 16:58:51 -08:00
Waleed
deb085881f chore(db): remove unused table and unused route (#2342) 2025-12-12 16:58:38 -08:00
Waleed
dda44f7382 fix(build): remove incompatible --frozen-lockfile and --omit dev from docker (#2341)
* fix(build): remove incompatible --frozen-lockfile and --omit dev from docker

* ack PR comments
2025-12-12 16:58:23 -08:00
Waleed
668118b19b fix(tools): remove pylon (#2338) 2025-12-12 16:00:52 -08:00
Waleed
323e03520d feat(releases): tag releases to main with version numbers, speed up docker builds (#2337)
* feat(releases): tag releases to main with version numbers, speed up docker builds

* resize runners
2025-12-12 15:57:10 -08:00
Waleed
ffcaa65590 feat(mcp): added the ability to refresh servers to grab new tools (#2335)
* feat(mcp): added the ability to refresh servers to grab new tools

* added tests
2025-12-12 11:22:57 -08:00
Adam Gough
cd66fa84d1 fix(tools): fixed trello and telegram operations (#2332)
* fixed trello output

* fixed telegram

---------

Co-authored-by: aadamgough <adam@sim.ai>
2025-12-11 23:42:10 -08:00
Waleed
045475b9fe feat(i18n): update translations (#2334)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-11 23:39:48 -08:00
Waleed
3334dfeefa fix(firecrawl): updated output for firecrawl extract (#2333)
* fix(firecrawl): fixed optional params for firecrawl

* fix(build): fixed firecrawl tools

* ack PR comments
2025-12-11 23:06:34 -08:00
Waleed
cb9b88127f fix(envvars): added industry standard dotenv parsing regex for adding envvars in settings (#2327)
* fix(envvars): added industry standard dotenv parsing regex for adding envvars in settings

* ack PR comments

* added more edge cases
2025-12-11 22:58:01 -08:00
Waleed
3c8478405c feat(i18n): update translations (#2331) 2025-12-11 21:12:23 -08:00
Waleed
c4fd39df54 fix(firecrawl): fixed optional params for firecrawl (#2329)
* fix(firecrawl): fixed optional params for firecrawl

* fix(typeform): fixed optional params and outputs for typeform

* ack PR comments
2025-12-11 20:39:15 -08:00
Emir Karabeg
06d2db78ff improvement(kb): modals, page layouts (#2330) 2025-12-11 20:35:26 -08:00
Waleed
516dee14b7 feat(i18n): update translations (#2328)
Co-authored-by: aadamgough <aadamgough@users.noreply.github.com>
2025-12-11 18:55:53 -08:00
Adam Gough
030ae5cc0a fix(tools): fixed tool outputs (#2325)
* fix for asana and apify

* fixed onedrive

* fixed confluence error throwing and added upload file

* fixed google vault tag dropdown and output

* fix google group tag dropdown, var reference

* fixed hubspot output

* fixed pipedrive output

* removed comments

* removed more comments

* consolidated file utils

* fixed hubspot json schema

* fix hubspot search tools

* minor change
2025-12-11 18:24:56 -08:00
Waleed
855e2c418c fix(kb): handle larger files in the kb (#2324)
* fix(kb): handle larger files in the kb

* fixed images on login page
2025-12-11 18:22:16 -08:00
Waleed
3bde9e853f fix(mistral): remove wrapped output from mistral parse for kb parsing pdfs (#2326) 2025-12-11 18:15:37 -08:00
Waleed
31b795f8b1 fix(tools): fixed webflow limit and offset params (#2323) 2025-12-11 17:07:25 -08:00
Waleed
57b6bc3684 feat(i18n): update translations (#2321)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-11 15:28:31 -08:00
Esteban Canela
8d4f2e0233 feat(tools): added sqs integration (#2310)
* feat(tools): added sqs integration

* remove console log

* fix linter issues
2025-12-11 15:14:39 -08:00
Waleed
4da5dd7f74 fix(nextjs): upgrade nextjs to patch security vuln (#2320) 2025-12-11 14:58:31 -08:00
Waleed
e24f31cbce v0.5.27: sidebar updates, ssrf patches, gpt-5.2, stagehand fixes 2025-12-11 14:45:25 -08:00
Waleed
3b9cbeaa49 fix(tools): updated browser use and stagehand to use the latest models (#2319)
* fix(stagehand): incl stagehand in the standalone build

* fix(stagehand): updated browser use and stagehand to use the latest models
2025-12-11 14:39:25 -08:00
Waleed
c592e54118 fix(pg): for pg tools, use count isntead of length for number of rows impacted (#2317) 2025-12-11 14:03:00 -08:00
Waleed
d02499a915 fix(ollama): fixed messages array for ollama, added gpt-5.2 (#2315)
* fix(ollama): fixed messages array for ollama, added gpt-5.2

* ack PR comments
2025-12-11 13:51:51 -08:00
Siddharth Ganesan
c0bb85479d fix(parallel): variable resolution in collection (#2314)
* Fix var resolution in parallel

* Fix parallel

* Clean logs

* FIx loop error port
2025-12-11 13:51:22 -08:00
Waleed
b595273c3f fix(vuln): fix dns rebinding/ssrf vulnerability (#2316) 2025-12-11 13:42:28 -08:00
Emir Karabeg
193a15aca4 improvement(sidebar): auto-scroll (#2312)
* fix(sidebar): re-render auto-scroll

* improvement: sidebar-scrolling listener
2025-12-11 12:54:14 -08:00
Vikhyath Mondreti
39d5d797ec fix(workflow-changes): changes detected in autolayout (#2313) 2025-12-11 12:45:48 -08:00
Waleed
3fbd57caf1 v0.5.26: tool fixes, templates and knowledgebase fixes, deployment versions in logs 2025-12-11 00:52:13 -08:00
Waleed
3db8f82449 feat(deployment-version): capture deployment version in log (#2304)
* feat(deployment-version): capture deployment version in log

* improvement: terminal store, logs version, toolbar

---------

Co-authored-by: Emir Karabeg <emirkarabeg@berkeley.edu>
2025-12-11 00:34:08 -08:00
Waleed
207a14970b fix(dbs): remove harness from validation on user-provided db creds (#2308) 2025-12-11 00:25:48 -08:00
Waleed
0997989f36 fix(x): fix x optional tool params (#2307)
* fix(x): fix x optional tool params

* ack pr comments
2025-12-11 00:09:35 -08:00
Waleed
7fd912d8a9 fix(stagehand): upgraded stagehand sdk to remove deps incomptaible with bun runtime (#2305)
* fix(stagehand): upgraded stagehand sdk to remove deps incomptaible with bun runtime

* ack PR comments
2025-12-10 23:42:33 -08:00
Siddharth Ganesan
c550e4591c fix(condition): fix condition block for no outgoing edge (#2306)
* Fix condition block evaluation

* Lint
2025-12-10 23:24:27 -08:00
Emir Karabeg
a881dc1877 feat(sidebar): scroll to workflow/folder (#2302)
* feat(sidebar): scroll to workflow/folder

* improvement: sidebar scrolling optimizations
2025-12-10 22:08:10 -08:00
Waleed
da36c453b5 feat(i18n): update translations (#2303)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-10 22:07:18 -08:00
Waleed
635823664c fix(tools): fix perplexity & parallel ai tag dropdown inaccuracies (#2300)
* fix(tools): fix perplexity & parallel ai tag dropdown inaccuracies

* fixed stt, tts and added output conditions to conditionally display tag dropdown values based on other subblock values

* updated exa to match latest API
2025-12-10 21:46:31 -08:00
Waleed
14846ab05c feat(i18n): update translations (#2299)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-10 21:16:32 -08:00
Waleed
6c99c841f4 fix(tools): fixed zendesk tools, kb upload failure for md files, stronger typing (#2297)
* fix(tools): fixed zendesk tools, kb upload failure for md files, stronger typing

* ack PR comments
2025-12-10 20:42:16 -08:00
Waleed
37d7902fcd fix(dashboard): prevent dashboard from getting unmounted when on the logs page (#2298) 2025-12-10 20:41:26 -08:00
Emir Karabeg
1e563b1e0a fix(ui/ux): templates and knowledge pages (#2296) 2025-12-10 19:56:23 -08:00
Vikhyath Mondreti
b5da61377c v0.5.25: minor ui improvements, copilot billing fix 2025-12-10 18:32:27 -08:00
Vikhyath Mondreti
1d62ece915 fix(billing): copilot should directly deduct credit balance (#2294) 2025-12-10 18:25:36 -08:00
Emir Karabeg
bbab2ff732 improvement(ui/ux): small styling improvements (#2293)
* improvement: action-bar duplicate, copilot header name truncating, dashboard table scrolling

* improvement: workflow block handle positioning

* improvement: copilot notification fix message

* improvement: dashboard layout, popover hovering

* fix: filtering table into row, workflow name truncating
2025-12-10 17:20:59 -08:00
Waleed
18b7032494 v0.5.24: agent tool and UX improvements, redis service overhaul (#2291)
* feat(folders): add the ability to create a folder within a folder in popover (#2287)

* fix(agent): filter out empty params to ensure LLM can set tool params at runtime (#2288)

* fix(mcp): added backfill effect to add missing descriptions for mcp tools (#2290)

* fix(redis): cleanup access pattern across callsites (#2289)

* fix(redis): cleanup access pattern across callsites

* swap redis command to be non blocking

* improvement(log-details): polling, trace spans (#2292)

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Emir Karabeg <78010029+emir-karabeg@users.noreply.github.com>
2025-12-10 13:09:21 -08:00
Emir Karabeg
76bc2fae83 improvement(log-details): polling, trace spans (#2292) 2025-12-10 13:08:24 -08:00
Vikhyath Mondreti
1cfe229056 fix(redis): cleanup access pattern across callsites (#2289)
* fix(redis): cleanup access pattern across callsites

* swap redis command to be non blocking
2025-12-10 12:37:33 -08:00
Waleed
6791d968b8 fix(mcp): added backfill effect to add missing descriptions for mcp tools (#2290) 2025-12-10 11:57:18 -08:00
Waleed
163db5cf50 fix(agent): filter out empty params to ensure LLM can set tool params at runtime (#2288) 2025-12-10 11:38:54 -08:00
Waleed
bbbb13af7e feat(folders): add the ability to create a folder within a folder in popover (#2287) 2025-12-10 11:19:57 -08:00
Waleed
b7bbef8620 v0.5.23: kb, logs, general ui improvements, token bucket rate limits, docs, mcp, autolayout improvements (#2286)
* fix(mcp): prevent redundant MCP server discovery calls at runtime, use cached tool schema instead (#2273)

* fix(mcp): prevent redundant MCP server discovery calls at runtime, use cached tool schema instead

* added backfill, added loading state for tools in settings > mcp

* fix tool inp

* feat(rate-limiter): token bucket algorithm  (#2270)

* fix(ratelimit): make deployed chat rate limited

* improvement(rate-limiter): use token bucket algo

* update docs

* fix

* fix type

* fix db rate limiter

* address greptile comments

* feat(i18n): update translations (#2275)

Co-authored-by: icecrasher321 <icecrasher321@users.noreply.github.com>

* fix(tools): updated kalshi and polymarket tools to accurately reflect outputs (#2274)

* feat(i18n): update translations (#2276)

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>

* fix(autolayout): align by handle (#2277)

* fix(autolayout): align by handle

* use shared constants everywhere

* cleanup

* fix(copilot): fix custom tools (#2278)

* Fix title custom tool

* Checkpoitn (broken)

* Fix custom tool flash

* Edit workflow returns null fix

* Works

* Fix lint

* fix(ime): prevent form submission during IME composition steps (#2279)

* fix(ui): prevent form submission during IME composition steps

* chore(gitignore): add IntelliJ IDE files to .gitignore

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>

* feat(ui): logs, kb, emcn (#2207)

* feat(kb): emcn alignment; sidebar: popover primary; settings-modal: expand

* feat: EMCN breadcrumb; improvement(KB): UI

* fix: hydration error

* improvement(KB): UI

* feat: emcn modal sizing, KB tags; refactor: deleted old sidebar

* feat(logs): UI

* fix: add documents modal name

* feat: logs, emcn, cursorrules; refactor: logs

* feat: dashboard

* feat: notifications; improvement: logs details

* fixed random rectangle on canvas

* fixed the name of the file to align

* fix build

---------

Co-authored-by: waleed <walif6@gmail.com>

* fix(creds): glitch allowing multiple credentials in an integration (#2282)

* improvement: custom tools modal, logs-details (#2283)

* fix(docs): fix copy page button and header hook (#2284)

* improvement(chat): add the ability to download files from the deployed chat (#2280)

* added teams download and chat download file

* Removed comments

* removed comments

* component structure and download all

* removed comments

* cleanup code

* fix empty files case

* small fix

* fix(container): resize heuristic improvement (#2285)

* estimate block height for resize based on subblocks

* fix hydration error

* make more conservative

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: icecrasher321 <icecrasher321@users.noreply.github.com>
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>
Co-authored-by: mosa <mosaxiv@gmail.com>
Co-authored-by: Emir Karabeg <78010029+emir-karabeg@users.noreply.github.com>
Co-authored-by: Adam Gough <77861281+aadamgough@users.noreply.github.com>
2025-12-10 00:57:58 -08:00
Vikhyath Mondreti
6fd4087a79 fix(container): resize heuristic improvement (#2285)
* estimate block height for resize based on subblocks

* fix hydration error

* make more conservative
2025-12-10 00:20:03 -08:00
Adam Gough
cb6e763714 improvement(chat): add the ability to download files from the deployed chat (#2280)
* added teams download and chat download file

* Removed comments

* removed comments

* component structure and download all

* removed comments

* cleanup code

* fix empty files case

* small fix
2025-12-09 22:08:03 -08:00
Waleed
d06b360b1d fix(docs): fix copy page button and header hook (#2284) 2025-12-09 21:58:54 -08:00
Emir Karabeg
0713580862 improvement: custom tools modal, logs-details (#2283) 2025-12-09 21:50:09 -08:00
Vikhyath Mondreti
f421f27d3f fix(creds): glitch allowing multiple credentials in an integration (#2282) 2025-12-09 21:07:14 -08:00
Emir Karabeg
0083c89fa5 feat(ui): logs, kb, emcn (#2207)
* feat(kb): emcn alignment; sidebar: popover primary; settings-modal: expand

* feat: EMCN breadcrumb; improvement(KB): UI

* fix: hydration error

* improvement(KB): UI

* feat: emcn modal sizing, KB tags; refactor: deleted old sidebar

* feat(logs): UI

* fix: add documents modal name

* feat: logs, emcn, cursorrules; refactor: logs

* feat: dashboard

* feat: notifications; improvement: logs details

* fixed random rectangle on canvas

* fixed the name of the file to align

* fix build

---------

Co-authored-by: waleed <walif6@gmail.com>
2025-12-09 20:50:28 -08:00
mosa
3cec449402 fix(ime): prevent form submission during IME composition steps (#2279)
* fix(ui): prevent form submission during IME composition steps

* chore(gitignore): add IntelliJ IDE files to .gitignore

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-09 19:58:33 -08:00
Siddharth Ganesan
c5b3fcb181 fix(copilot): fix custom tools (#2278)
* Fix title custom tool

* Checkpoitn (broken)

* Fix custom tool flash

* Edit workflow returns null fix

* Works

* Fix lint
2025-12-09 17:42:17 -08:00
Vikhyath Mondreti
dd7db6e144 fix(autolayout): align by handle (#2277)
* fix(autolayout): align by handle

* use shared constants everywhere

* cleanup
2025-12-09 16:28:25 -08:00
Waleed
306043eedb feat(i18n): update translations (#2276)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-09 16:20:43 -08:00
Waleed
569598b39e fix(tools): updated kalshi and polymarket tools to accurately reflect outputs (#2274) 2025-12-09 15:35:36 -08:00
Waleed
cc66aa5a3e feat(i18n): update translations (#2275)
Co-authored-by: icecrasher321 <icecrasher321@users.noreply.github.com>
2025-12-09 15:25:03 -08:00
Vikhyath Mondreti
aea32d423f feat(rate-limiter): token bucket algorithm (#2270)
* fix(ratelimit): make deployed chat rate limited

* improvement(rate-limiter): use token bucket algo

* update docs

* fix

* fix type

* fix db rate limiter

* address greptile comments
2025-12-09 14:57:17 -08:00
Waleed
22abf98835 fix(mcp): prevent redundant MCP server discovery calls at runtime, use cached tool schema instead (#2273)
* fix(mcp): prevent redundant MCP server discovery calls at runtime, use cached tool schema instead

* added backfill, added loading state for tools in settings > mcp

* fix tool inp
2025-12-09 12:44:53 -08:00
Waleed
52edbea659 v0.5.22: rss feed trigger, sftp tool, billing fixes, 413 surfacing, copilot improvements 2025-12-09 10:27:36 -08:00
Waleed
aa1d896b38 feat(i18n): update translations (#2268)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-09 00:46:09 -08:00
Waleed
2fcd07e82d feat(triggers): added rss feed trigger & poller (#2267) 2025-12-08 23:07:07 -08:00
Vikhyath Mondreti
0db5ba1b27 fix(org-limits): remove fallbacks for enterprise plan (#2255)
* fix(org-limits): remove fallbacks for enterprise plan

* remove comment

* remove comments

* make logger use new helper
2025-12-08 21:43:43 -08:00
Waleed
e390ba0491 feat(dropdowns): added searchbox to the operation dropdown for all blocks (#2266) 2025-12-08 20:54:59 -08:00
Vikhyath Mondreti
2f0509adaf fix(nextjs-size-limit): surface 413s accurately (#2265)
* fix(api-call-size-limit): cannot exceed nextjs size limits

* fix

* Convert to buffer

---------

Co-authored-by: Siddharth Ganesan <siddharthganesan@gmail.com>
2025-12-08 20:54:25 -08:00
Waleed
9f0584a818 feat(redis): added redis option for rate limiter, 10x speed improvement in rate limit checks & reduction of DB load (#2263)
* feat(redis): added redis option for rate limiter, 10x speed improvement in rate limit checks & reduction of DB load

* ack PR comments

* improvements
2025-12-08 20:39:29 -08:00
Siddharth Ganesan
6b4d76298f fix(custom-tools, copilot): custom tools state + copilot fixes (#2264)
* Workspace env vars

* Fix execution animation on copilot run

* Custom tools toolg

* Custom tools

* Fix custom tool

* remove extra fallback

* Fix lint
2025-12-08 20:14:49 -08:00
Vikhyath Mondreti
b7a1e8f5cf fix(pre-proc-checks): deployed checks should precede cost/ratelimit increments" (#2250) 2025-12-08 20:04:21 -08:00
Waleed
3ce2788562 feat(i18n): update translations (#2262)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-08 19:40:42 -08:00
Waleed
17a084cd61 feat(copilot): updated copilot keys to have names, full parity with API keys page (#2260) 2025-12-08 19:28:40 -08:00
Waleed
dafd2f5ce8 feat(tools): added sftp tool to accompany smtp and ssh tools (#2261) 2025-12-08 19:21:10 -08:00
Waleed
5af67d08ba feat(i18n): update translations (#2259)
* feat(i18n): update translations

* fix chinese page

---------

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-08 17:58:49 -08:00
Waleed
209b0f1906 feat(tools): added duckduckgo (#2258) 2025-12-08 17:34:18 -08:00
Waleed
e067b584ee feat(admin): updated admin routes to consolidate duplicate behavior (#2257)
* feat(admin): updated admin routes to consolidate duplicate behavior

* ack PR comments
2025-12-08 17:29:55 -08:00
Waleed
87084edbe6 fix(timeouts): increased timeouts for function execution & agent (#2256) 2025-12-08 16:25:58 -08:00
Vikhyath Mondreti
99e0b81233 improvement(org): remove dead seats get endpoint (#2247)
* improvement(org): remove dead seats get endpoint

* remove more dead code

* remove fallback limit
2025-12-08 15:38:08 -08:00
Vikhyath Mondreti
d480057fd3 fix(migration): migration got removed by force push (#2253) 2025-12-08 14:08:12 -08:00
Vikhyath Mondreti
c197b04bcc fix(migration): migration got removed by force push (#2253) 2025-12-08 14:07:03 -08:00
Waleed
c27c233da0 v0.5.21: google groups, virtualized code viewer, ui, autolayout, docs improvements 2025-12-08 13:10:50 -08:00
Waleed
4fb039f3e8 feat(i18n): update translations (#2249)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-08 12:44:37 -08:00
Waleed
feb591867e fix(docs): fix salesforce docs & update styling (#2248) 2025-12-08 12:08:53 -08:00
Waleed
598c3bc684 feat(i18n): update translations (#2246)
Co-authored-by: icecrasher321 <icecrasher321@users.noreply.github.com>
2025-12-08 10:45:48 -08:00
Vikhyath Mondreti
01b2f809d1 feat(cursor): add cursor block and tools (#2245)
* fix(autolayout): reduce horizontal spacing in autolayout

* feat(cursor): add cursor cloud agents tools

* address greptile prompt
2025-12-08 09:49:28 -08:00
Waleed
d200f664e8 feat(i18n): update translations (#2244)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-08 00:26:39 -08:00
Waleed
e2b077f582 fix(conditional): don't error in condition blocks when no conditions are satisfied (#2243)
* fix(conditional): don't error in condition blocks when no conditions are satisfied

* updated docs
2025-12-08 00:15:51 -08:00
Waleed
d09fd6cf92 fix(import): fixed trigger save on export/import flow (#2239)
* fix(import): fixed trigger save on export/import flow

* optimized test runners

* ack PR comments
2025-12-07 23:00:28 -08:00
Vikhyath Mondreti
434d12956e fix(autolayout): reduce horizontal spacing in autolayout (#2240) 2025-12-07 22:36:10 -08:00
Waleed
b49b8eeb9d feat(i18n): update translations (#2238)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-07 19:43:12 -08:00
Waleed
5b9f3d3d02 feat(docs): added additional self-hosting documentation (#2237)
* feat(docs): added additional self-hosting documentation

* added more
2025-12-07 19:25:44 -08:00
Vikhyath Mondreti
05022e3468 fix(copilot-autolayout): more subflow cases and deal with resizing (#2236)
* fix sidebar hydration issue accurately

* improve autolayout subflow cases

* fix DOM structure to prevent HMR hydration issues
2025-12-07 19:14:18 -08:00
Vikhyath Mondreti
9f884c151c feat(credits): prepurchase credits (#2174)
* add credit balances

* add migrations

* remove handling for disputes

* fix idempotency key

* prep merge into staging

* code cleanup

* add back migration + prevent enterprise from purchasing credits

* remove circular import

* add dispute blocking

* fix lint

* fix: hydration error

* remove migration before merge staging
'

* moved credits addition to invoice payment success

---------

Co-authored-by: Emir Karabeg <emirkarabeg@berkeley.edu>
2025-12-06 19:11:58 -08:00
Adam Gough
92c03b825b improvement(salesforce): fixed refresh and added endpoints (#2177)
* added salesforce other tools

* modified scope and change salesforce refresh

* fixed refresh

* remove dup code
2025-12-06 19:03:25 -08:00
Vikhyath Mondreti
e9d53042f6 fix(inactivity-notif): add cron to helm (#2235) 2025-12-06 18:54:58 -08:00
Waleed
22c9384f19 improvement(code): removed dedicated code-optimized virtualized viewer, baked it into the code component (#2234)
* improvement(code): removed dedicated code-optimized virtualized viewer, baked it into the code component

* ack PR comments
2025-12-06 18:12:51 -08:00
Waleed
6e02a73259 feat(i18n): update translations (#2233)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-06 17:57:46 -08:00
Adam Gough
683b4476fa fix(google-drive): added support for shared drive (#2232)
* added param for shared drive

* removed comments

---------

Co-authored-by: aadamgough <adam@sim.ai>
2025-12-06 17:37:02 -08:00
Adam Gough
ae7937280e feat(google-groups): added google groups (#2229)
* added google-groups

* added a few more endpoints

* removed comments

* removed named imports, fixed comments

* fixed google groups tool names

---------

Co-authored-by: aadamgough <adam@sim.ai>
Co-authored-by: waleed <walif6@gmail.com>
2025-12-06 17:32:30 -08:00
Waleed
ebef5f3a27 v0.5.20: google slides, ui fixes, subflow resizing improvements 2025-12-06 15:36:09 -08:00
Waleed
7bfc6ebe48 fix(copilot): fixed copilot code component overflowing gutter (#2230) 2025-12-06 15:20:41 -08:00
Vikhyath Mondreti
23ef39de72 improvement(ui): revert settings > envvar ui (#2227) 2025-12-06 14:26:39 -08:00
Waleed
507fc112be feat(admin): added more billing, subscriptions, and organization admin API routes (#2225)
* feat(admin): added more billing, subscriptions, and organization admin API routes

* cleanup

* ack PR comments

* cleanup

* ack PR comment
2025-12-06 14:13:50 -08:00
Waleed
26670e289d fix(hosted): fixed hosted providers to exact string match model names rather than check provider names (#2228) 2025-12-06 13:33:34 -08:00
Waleed
e52bd575e7 feat(i18n): update translations (#2226)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-06 13:33:00 -08:00
Emir Karabeg
0b28128f25 feat(tools): google slides tool, terminal console virtualization, tool fixes (#2209)
* feat: google slides tool

* fix oauth for slides, add remaining endpoints, update docs

* optimize json dump viewer using react window

* change slides to use google drive credentials

* fix some tools

* ack PR comments

---------

Co-authored-by: waleed <walif6@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-12-06 12:16:21 -08:00
Vikhyath Mondreti
a50edf8131 fix(autolayout): subflow calculation (#2223)
* fix(autolayout): subflow calculation

* cleanup code

* fix missing import

* add back missing import
2025-12-05 16:31:10 -08:00
Vikhyath Mondreti
12c4c2d44f v0.5.19: copilot fix 2025-12-05 15:27:31 -08:00
Siddharth Ganesan
656dfafb8f fix(copilot): fix function execute tool (#2222) 2025-12-05 15:19:39 -08:00
Siddharth Ganesan
9f604f379e fix(copilot): fix tool call flash (#2221)
* Fix copilot tool call flash

* Fix lint
2025-12-05 15:12:35 -08:00
Siddharth Ganesan
75da06adf8 fix(copilot): fix hanging tool calls (#2218) 2025-12-05 14:59:38 -08:00
Vikhyath Mondreti
929a352edb fix(build): added trigger.dev sdk mock to tests (#2216) 2025-12-05 14:26:50 -08:00
Vikhyath Mondreti
c7b473f55f fix(build): added trigger.dev sdk mock to tests (#2216) 2025-12-05 14:24:52 -08:00
Vikhyath Mondreti
6cd078b0fe v0.5.18: ui fixes, nextjs16, workspace notifications, admin APIs, loading improvements, new slack tools 2025-12-05 14:03:09 -08:00
Vikhyath Mondreti
fb4c9827f8 fix(custom-bot-slack): dependsOn incorrectly set for bot_token (#2214)
* fix(custom-bot-slack): dependsOn incorrectly set for bot_token"

* fix other references to be compatible

* fix dependsOn for things depending on authMethod"
2025-12-05 13:54:52 -08:00
Siddharth Ganesan
4fd5f0051f fix(copilot): validation (#2215)
* Fix validation error

* Fix lint
2025-12-05 13:46:50 -08:00
Waleed
002713ec4b feat(i18n): update translations (#2208)
Co-authored-by: icecrasher321 <icecrasher321@users.noreply.github.com>
2025-12-05 13:29:44 -08:00
Waleed
5d6c1f7b88 feat(tools): added more slack tools (#2212) 2025-12-05 13:22:35 -08:00
Siddharth Ganesan
7752beac01 fix(import): fix array errors on import/export (#2211)
* Fix import/export

* Remove copilot gdrive tools

* Null

* Fix lint

* Add copilot validation

* Fix validation
2025-12-05 13:07:01 -08:00
Emir Karabeg
7101dc58d4 improvement: loading, optimistic actions (#2193)
* improvement: loading, optimistic operations

* improvement: folders update

* fix usage indicator rounding + new tsconfig

* remove redundant checks

* fix hmr case for missing workflow loads

* add abstraction for zustand/react hybrid optimism

* remove comments

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-12-05 13:01:12 -08:00
Siddharth Ganesan
58251e28e6 feat(copilot): superagent (#2201)
* Superagent poc

* Checkpoint brokeN

* tool call rag

* Fix

* Fixes

* Improvements

* Creds stuff

* Fix

* Fix tools

* Fix stream

* Prompt

* Update sheets descriptions

* Better

* Copilot components

* Delete stuff

* Remove db migration

* Fix migrations

* Fix things

* Copilot side superagent

* Build workflow from chat

* Combine superagent into copilkot

* Render tools

* Function execution

* Max mode indicators

* Tool call confirmations

* Credential settings

* Remove betas

* Bump version

* Dropdown options in block metadata

* Copilot kb tools

* Fix lint

* Credentials modal

* Fix lint

* Cleanup

* Env var resolution in superagent tools

* Get id for workflow vars

* Fix insert into subflow

* Fix executor for while and do while loops

* Fix metadata for parallel

* Remove db migration

* Rebase

* Add migrations back

* Clean up code

* Fix executor logic issue

* Cleanup

* Diagram tool

* Fix tool naems

* Comment out g3p

* Remove popup option

* Hide o3

* Remove db migration

* Fix merge conflicts

* Fix lint

* Fix tests

* Remove webhook change

* Remove cb change

* Fix lint

* Fix

* Fix lint

* Fix build

* comment out gemini

* Add gemini back

* Remove bad test

* Fix

* Fix test

* Fix

* Nuke bad test

* Fix lint

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-04 21:26:18 -08:00
Vikhyath Mondreti
8ef9a45125 fix(env-vars): refactor for workspace/personal env vars to work with server side execution correctly (#2197)
* fix(env-var-resolution): new executor env var resolution changes

* add sessionuser id"

* cleanup code

* add doc update

* fix build

* fix client session pass through"

* add type change

* fix env var with hitl

* fix types
2025-12-04 21:08:20 -08:00
Waleed
ca818a6503 feat(admin): added admin APIs for admin management (#2206) 2025-12-04 20:52:32 -08:00
Waleed
1b903f2db5 fix(images): updated helm charts with branding URL guidance, removed additional nextjs image optimizations (#2205) 2025-12-04 19:39:51 -08:00
Waleed
414a54c358 feat(i18n): update translations (#2204)
Co-authored-by: icecrasher321 <icecrasher321@users.noreply.github.com>
2025-12-04 19:03:03 -08:00
Vikhyath Mondreti
3b9f0f9ce2 feat(error-notifications): workspace-level configuration of slack, email, webhook notifications for workflow execution (#2157)
* feat(notification): slack, email, webhook notifications from logs

* retain search params for filters to link in notification

* add alerting rules

* update selector

* fix lint

* add limits on num of emails and notification triggers per workspace

* address greptile comments

* add search to combobox

* move notifications to react query

* fix lint

* fix email formatting

* add more alert types

* fix imports

* fix test route

* use emcn componentfor modal

* refactor: consolidate notification config fields into jsonb objects

* regen migration

* fix delete notif modal ui

* make them multiselect dropdowns

* update tag styling

* combobox font size with multiselect tags'
2025-12-04 18:29:22 -08:00
Waleed
dcbdcb43aa chore(deps): upgrade to nextjs 16 (#2203)
* chore(deps): upgrade to nextjs 16

* upgraded fumadocs

* ensure vercel uses bun

* fix build

* fix bui;d

* remove redundant vercel.json
2025-12-04 17:55:37 -08:00
Emir Karabeg
1642ed754b improvement: modal UI (#2202)
* fix: trigger-save delete modal

* improvement: old modal styling
2025-12-04 17:10:59 -08:00
Vikhyath Mondreti
d22b5783be fix(enterprise-plan): seats should be taken from metadata (#2200)
* fix(enterprise): seats need to be picked up from metadata not column

* fix env var access

* fix user avatar
2025-12-04 16:22:29 -08:00
Waleed
8e7d8c93e3 fix(profile-pics): remove sharp dependency for serving profile pics in settings (#2199) 2025-12-04 15:46:10 -08:00
Waleed
ca3eb5b5a5 fix(subscription): fixed text clipping on subscription panel (#2198) 2025-12-04 15:12:50 -08:00
Waleed
dc5a2b1ad1 fix(envvar): fix envvar dropdown positioning, remove dead code (#2196) 2025-12-04 14:35:25 -08:00
Waleed
3f84ed9b72 fix(settings): fix long description on wordpress integration (#2195) 2025-12-04 14:10:50 -08:00
Waleed
31874939ee v0.5.17: modals, billing fixes, bun update, zoom, dropbox, kalshi, polymarket, datadog, ahrefs, gitlab, shopify, ssh, wordpress integrations 2025-12-04 13:29:46 -08:00
Waleed
b54ca604b6 fix(chat): fix download & clear popover staying open after pressing in floating chat (#2192) 2025-12-04 13:03:12 -08:00
Waleed
e581608472 fix(copilot): fix code viewer in copilot user inp (#2191) 2025-12-04 12:50:11 -08:00
Emir Karabeg
a4d4dfaa32 fix: tooltip on env settings (#2190) 2025-12-04 12:39:37 -08:00
Waleed
099e86e3c1 fix(settings): fixed sso form validation (#2189) 2025-12-04 12:34:28 -08:00
Emir Karabeg
042de6a944 fix: modals, settings, panel (#2187) 2025-12-04 12:01:36 -08:00
Waleed
f44e7e34ec fix(input): allow test value if no real value provided for inputs in deployed executions (#2186)
* fix(input): allow test value if no real value provided for inputs in deployed executions

* ack PR comments
2025-12-04 11:41:08 -08:00
Waleed
6bfb643ef8 fix(polling): fixed gmail and outlook polling to respect disabled status (#2185) 2025-12-04 11:31:33 -08:00
Siddharth Ganesan
cd5d1c0958 fix(executor): nested error activation (#2184) 2025-12-04 10:55:26 -08:00
Waleed
9df87d9b88 fix(mcp): remove client-side cache and reduce server cache from 5m to 30s (#2182)
* fix(mcp): remove client-side cache and reduce server cache from 5m to 30s

* ack PR comments
2025-12-04 08:51:06 -08:00
Waleed
c864d17991 chore(deps): upgrade to bun v1.3 (#2181)
* chore(deps): upgrade to bun v1.3

* ack PR comments
2025-12-04 00:43:01 -08:00
Emir Karabeg
36c91f4ca9 feat: terminal serach; fix: delete-modal (#2176) 2025-12-04 00:41:38 -08:00
Waleed
6d4ba6d5cf chore(deps): upgrade from nextjs 15.4.1 to 15.4.8 and upgrade turborepo (#2180) 2025-12-04 00:20:50 -08:00
Waleed
5d791cd55f feat(i18n): update translations (#2178)
* feat(i18n): update translations

* memory optimizations

---------

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-04 00:18:21 -08:00
Waleed
5630e133fd feat(tools): added zoom, elasticsearch, dropbox, kalshi, polymarket, datadog, ahrefs, gitlab, shopify, ssh, wordpress (#2175)
* feat(tools): added zoom, elasticsearch, dropbox, box, datadog, ahrefs, gitlab, shopify, ssh, wordpress

* added polymarket & kalshi, fixed ssh

* fix search modal bg instead of bgColor, added polymarket and kalshi new endpoints

* split up grafana

* update docs script & docs

* added more zoom endpoints

* remove unused box creds

* finished wordpress, shopify, kalshi

* cleanup

* revert envvar dropdown changes

* updated grafana endpoints
2025-12-03 20:09:27 -08:00
Emir Karabeg
08a11935af fix: commented out light mode (#2173) 2025-12-03 16:52:35 -08:00
Emir Karabeg
3158b62da8 feat: light, emcn, modals (#2104)
* feat: aligned current unassigned hex to old globals

* feat: emcn modal, help-modal; improvement(ui): emcn textarea, emcn combobox, messages-input

* improvement(modal): ui, transition

* improvement: terminal expand, variables styling; refactor(float): hooks

* improvement(invite-modal): emcn aligned

* feat(terminal): height memory

* improvement(invite-modal): skeleton ui

* improvement(invite-modal): badges UI

* feat: deploy-modal, emcn

* refactor: deleted duplicate dark styles

* feat: emcn, settings, light

* improvement: emcn, settings

* improvement: settings-modal, emcn

* improvement: SSO, light-mode

* improvement: EMCN, light

* fix issues, run lint

* fix: reverted mock data
2025-12-03 16:31:27 -08:00
Waleed
e157ce5fbc v0.5.16: MCP fixes, code refactors, jira fixes, new mistral models 2025-12-02 22:02:11 -08:00
Vikhyath Mondreti
7de721e090 fix(logs): logging with error issues for model costs (#2169)
* fix(async-execution): restore async executions

* fix schedules trace span collection'

* fix execution trace spans for schedules + cost tracking when workflow errors
2025-12-02 20:54:17 -08:00
Waleed
3e83fb398c fix(trace-spans): fix input/output token count in trace spans (#2168) 2025-12-02 20:36:16 -08:00
Waleed
a6e3c92c10 fix(jira): fixed incorrect dependsOn for jira project/issue subblcks (#2167) 2025-12-02 20:18:01 -08:00
Vikhyath Mondreti
9670d96eca fix(templates-page): loading issue due to loading extensive workflow block in preview for all listings (#2166)
* fix(templates-page): loading issue due to loading extensive workflow block in preview for all listings

* add more properties
2025-12-02 19:47:48 -08:00
Waleed
eb0d4cbd57 fix(templates): fixed verified creator status displaying & tooltip on templates (#2165) 2025-12-02 19:23:35 -08:00
Waleed
ffd12e1da4 fix(subblocks): update guardrails pii selector component to use emcn (#2164) 2025-12-02 18:36:34 -08:00
Waleed
84c2335a37 feat(i18n): update translations (#2163)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-02 16:37:30 -08:00
Waleed
2ab8cec8c3 fix(icons): fix mailgun, restore tts and smtp blocks (#2162)
* fix(icons): fix mailgun

* register smtp block that was missing
2025-12-02 16:21:43 -08:00
Waleed
bf54c88ae4 feat(models): added xai models and updated gemini pricing (#2161) 2025-12-02 14:31:23 -08:00
Waleed
41c068c023 improvement(lib): refactored lib/ to be more aligned with queries and api directory (#2160)
* fix(lib): consolidate into core dir in lib/

* refactored lib/
2025-12-02 14:17:41 -08:00
Waleed
6fda9bd72e feat(models): added latest mistral models (#2159) 2025-12-02 13:46:00 -08:00
Waleed
3b4f227e43 fix(mcp): reuse sessionID for consecutive MCP tool calls, fix dynamic args clearing, fix refreshing tools on save (#2158)
* fix(mcp): reuse sessionID for consecutive MCP tool calls, fix dynamic args clearing, fix refreshing tools on save

* prevent defaults

* fix subblock text area

* added placeholders in tool-inp for mcp dynamic args

* ack PR comments
2025-12-02 12:37:59 -08:00
Siddharth Ganesan
0ae7eb197a improvement(agent): switch default model to claude 4.5 sonnet (#2156)
* Switch default model to claude 4.5 sonnet

* Fix defaults

* Switch back to medium
2025-12-01 18:34:46 -08:00
Waleed
304b5d9c7e feat(i18n): update translations (#2153)
* feat(i18n): update translations

* fix build

---------

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-01 15:15:13 -08:00
Waleed
ee3e1e8cf9 fix(docs): update docs to background instead of backgroundColor (#2154) 2025-12-01 14:16:23 -08:00
Vikhyath Mondreti
774e5d585c v0.5.15: add tools, revert subblock prop change 2025-12-01 13:52:12 -08:00
Vikhyath Mondreti
ede41af674 fix(selector): remove subblock state prop for subblock component (#2151) 2025-12-01 13:46:32 -08:00
Waleed
cb0c55c6f6 feat(tools): added rds, dynamodb, background color gradient (#2150)
* feat(tools): added rds tools/block

* feat(tools): added rds, dynamodb, background color gradient

* changed conditions for WHERE condition to be json conditions instead of raw string
2025-12-01 13:42:05 -08:00
Vikhyath Mondreti
54cc93743f v0.5.14: fix issue with teams, google selectors + cleanup code 2025-12-01 12:39:39 -08:00
Vikhyath Mondreti
d22b21c8d1 improvement(selectors): make serviceId sole source of truth (#2128)
* improvement(serviceId): make serviceId sole source of truth

* incorrect gmail service id

* fix teams selectors

* fix linkedin
2025-12-01 12:33:26 -08:00
Waleed
8c32ad4c0d v0.5.13: polling fixes, generic agent search tool, status page, smtp, sendgrid, linkedin, more tools (#2148)
* feat(tools): added smtp, sendgrid, mailgun, linkedin, fixed permissions in context menu (#2133)

* feat(tools): added twilio sendgrid integration

* feat(tools): added smtp, sendgrid, mailgun, fixed permissions in context menu

* added top level mocks for sporadically failing tests

* incr type safety

* fix(team-plans): track departed member usage so value not lost (#2118)

* fix(team-plans): track departed member usage so value not lost

* reset usage to 0 when they leave team

* prep merge with stagig

* regen migrations

* fix org invite + ws selection'

---------

Co-authored-by: Waleed <walif6@gmail.com>

* feat(i18n): update translations (#2134)

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>

* feat(creators): add verification for creators (#2135)

* feat(tools): added apify block/tools  (#2136)

* feat(tools): added apify

* cleanup

* feat(i18n): update translations (#2137)

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>

* feat(env): added more optional env var examples (#2138)

* feat(statuspage): added statuspage, updated list of tools in footer, renamed routes (#2139)

* feat(statuspage): added statuspage, updated list of tools in footer, renamed routes

* ack PR comments

* feat(tools): add generic search tool (#2140)

* feat(i18n): update translations (#2141)

* fix(sdks): bump sdk versions (#2142)

* fix(webhooks): count test webhooks towards usage limit (#2143)

* fix(bill): add requestId to webhook processing (#2144)

* improvement(subflow): remove all associated edges when moving a block into a subflow (#2145)

* improvement(subflow): remove all associated edges when moving a block into a subflow

* ack PR comments

* fix(polling): mark webhook failed on webhook trigger errors (#2146)

* fix(deps): declare core transient deps explicitly (#2147)

* fix(deps): declare core transient deps explicitly

* ack PR comments

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-01 10:15:36 -08:00
Waleed
1e080e98e8 fix(deps): declare core transient deps explicitly (#2147)
* fix(deps): declare core transient deps explicitly

* ack PR comments
2025-12-01 09:51:00 -08:00
Waleed
b069034d9c fix(polling): mark webhook failed on webhook trigger errors (#2146) 2025-12-01 08:18:41 -08:00
Waleed
3a4f130f69 improvement(subflow): remove all associated edges when moving a block into a subflow (#2145)
* improvement(subflow): remove all associated edges when moving a block into a subflow

* ack PR comments
2025-11-30 23:20:51 -08:00
Waleed
e80feee51f fix(bill): add requestId to webhook processing (#2144) 2025-11-30 21:21:54 -08:00
Waleed
7f62467f84 fix(webhooks): count test webhooks towards usage limit (#2143) 2025-11-30 20:28:36 -08:00
Waleed
7b2792122d fix(sdks): bump sdk versions (#2142) 2025-11-30 19:47:58 -08:00
Waleed
4e9cab39c3 feat(i18n): update translations (#2141) 2025-11-30 14:23:27 -08:00
Waleed
e3a57d30e8 feat(tools): add generic search tool (#2140) 2025-11-30 14:13:46 -08:00
Waleed
f25db707d7 feat(statuspage): added statuspage, updated list of tools in footer, renamed routes (#2139)
* feat(statuspage): added statuspage, updated list of tools in footer, renamed routes

* ack PR comments
2025-11-30 10:46:18 -08:00
Waleed
08d57b4f8b feat(env): added more optional env var examples (#2138) 2025-11-30 09:13:39 -08:00
Waleed
f56d85bda6 feat(i18n): update translations (#2137)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-11-30 09:07:35 -08:00
Waleed
d7a650a355 feat(tools): added apify block/tools (#2136)
* feat(tools): added apify

* cleanup
2025-11-29 23:42:43 -08:00
Waleed
a8f87f7e3a feat(creators): add verification for creators (#2135) 2025-11-29 20:58:18 -08:00
Waleed
9330940658 feat(i18n): update translations (#2134)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-11-29 20:30:56 -08:00
Vikhyath Mondreti
fc5f815c7a fix(team-plans): track departed member usage so value not lost (#2118)
* fix(team-plans): track departed member usage so value not lost

* reset usage to 0 when they leave team

* prep merge with stagig

* regen migrations

* fix org invite + ws selection'

---------

Co-authored-by: Waleed <walif6@gmail.com>
2025-11-29 18:27:12 -08:00
Waleed
7bf9251db1 feat(tools): added smtp, sendgrid, mailgun, linkedin, fixed permissions in context menu (#2133)
* feat(tools): added twilio sendgrid integration

* feat(tools): added smtp, sendgrid, mailgun, fixed permissions in context menu

* added top level mocks for sporadically failing tests

* incr type safety
2025-11-29 17:58:42 -08:00
Waleed
1d08796853 v0.5.12: memory optimizations, sentry, incidentio, posthog, zendesk, pylon, intercom, mailchimp, loading optimizations (#2132)
* fix(memory-util): fixed unbounded array of gmail/outlook pollers causing high memory util, added missing db indexes/removed unused ones, auto-disable schedules/webhooks after 10 consecutive failures (#2115)

* fix(memory-util): fixed unbounded array of gmail/outlook pollers causing high memory util, added missing db indexes/removed unused ones, auto-disable schedules/webhooks after 10 consecutive failures

* ack PR comments

* ack

* improvement(teams-plan): seats increase simplification + not triggering checkout session (#2117)

* improvement(teams-plan): seats increase simplification + not triggering checkout session

* cleanup via helper

* feat(tools): added sentry, incidentio, and posthog tools (#2116)

* feat(tools): added sentry, incidentio, and posthog tools

* update docs

* fixed docs to use native fumadocs for llms.txt and copy markdown, fixed tool issues

* cleanup

* enhance error extractor, fixed posthog tools

* docs enhancements, cleanup

* added more incident io ops, remove zustand/shallow in favor of zustand/react/shallow

* fix type errors

* remove unnecessary comments

* added vllm to docs

* feat(i18n): update translations (#2120)

* feat(i18n): update translations

* fix build

---------

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>

* improvement(workflow-execution): perf improvements to passing workflow state + decrypted env vars (#2119)

* improvement(execution): load workflow state once instead of 2-3 times

* decrypt only in get helper

* remove comments

* remove comments

* feat(models): host google gemini models (#2122)

* feat(models): host google gemini models

* remove unused primary key

* feat(i18n): update translations (#2123)

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>

* feat(tools): added zendesk, pylon, intercom, & mailchimp (#2126)

* feat(tools): added zendesk, pylon, intercom, & mailchimp

* finish zendesk and pylon

* updated docs

* feat(i18n): update translations (#2129)

* feat(i18n): update translations

* fixed build

---------

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>

* fix(permissions): add client-side permissions validation to prevent unauthorized actions, upgraded custom tool modal (#2130)

* fix(permissions): add client-side permissions validation to prevent unauthorized actions, upgraded custom tool modal

* fix failing test

* fix test

* cleanup

* fix(custom-tools): add composite index on custom tool names & workspace id (#2131)

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-11-28 16:08:06 -08:00
Waleed
21a640af50 fix(custom-tools): add composite index on custom tool names & workspace id (#2131) 2025-11-28 15:33:08 -08:00
Waleed
a10e1a63af fix(permissions): add client-side permissions validation to prevent unauthorized actions, upgraded custom tool modal (#2130)
* fix(permissions): add client-side permissions validation to prevent unauthorized actions, upgraded custom tool modal

* fix failing test

* fix test

* cleanup
2025-11-28 12:24:22 -08:00
Waleed
be91cd3794 feat(i18n): update translations (#2129)
* feat(i18n): update translations

* fixed build

---------

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-11-27 18:35:31 -08:00
Waleed
1ee49ae611 feat(tools): added zendesk, pylon, intercom, & mailchimp (#2126)
* feat(tools): added zendesk, pylon, intercom, & mailchimp

* finish zendesk and pylon

* updated docs
2025-11-27 16:33:47 -08:00
Waleed
aab1b3f259 feat(i18n): update translations (#2123)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-11-26 12:53:17 -08:00
Waleed
8000394e98 feat(models): host google gemini models (#2122)
* feat(models): host google gemini models

* remove unused primary key
2025-11-26 12:30:20 -08:00
Vikhyath Mondreti
0830490d32 improvement(workflow-execution): perf improvements to passing workflow state + decrypted env vars (#2119)
* improvement(execution): load workflow state once instead of 2-3 times

* decrypt only in get helper

* remove comments

* remove comments
2025-11-26 12:02:55 -08:00
Waleed
93e1c513b2 feat(i18n): update translations (#2120)
* feat(i18n): update translations

* fix build

---------

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-11-25 21:35:15 -08:00
Waleed
ff79b78b5f feat(tools): added sentry, incidentio, and posthog tools (#2116)
* feat(tools): added sentry, incidentio, and posthog tools

* update docs

* fixed docs to use native fumadocs for llms.txt and copy markdown, fixed tool issues

* cleanup

* enhance error extractor, fixed posthog tools

* docs enhancements, cleanup

* added more incident io ops, remove zustand/shallow in favor of zustand/react/shallow

* fix type errors

* remove unnecessary comments

* added vllm to docs
2025-11-25 19:50:23 -08:00
Vikhyath Mondreti
3a3c946607 improvement(teams-plan): seats increase simplification + not triggering checkout session (#2117)
* improvement(teams-plan): seats increase simplification + not triggering checkout session

* cleanup via helper
2025-11-25 19:00:12 -08:00
Waleed
7b7586d093 fix(memory-util): fixed unbounded array of gmail/outlook pollers causing high memory util, added missing db indexes/removed unused ones, auto-disable schedules/webhooks after 10 consecutive failures (#2115)
* fix(memory-util): fixed unbounded array of gmail/outlook pollers causing high memory util, added missing db indexes/removed unused ones, auto-disable schedules/webhooks after 10 consecutive failures

* ack PR comments

* ack
2025-11-25 14:15:46 -08:00
Waleed
ebcd243942 v0.5.11: stt, videogen, vllm, billing fixes, new models 2025-11-25 01:14:12 -08:00
Siddharth Ganesan
d413bcdfb0 feat(copilot): add claude opus 4.5 and remove context usage indicator (#2113)
* Add claude opus 4.5 to copilot and remove context usage indicator

* Lint
2025-11-24 16:40:55 -08:00
Siddharth Ganesan
ff768ca410 fix(copilot): fix webhook triggers unsaving in new diff store (#2096)
* Fix copilot trigger unsave

* Fix for schedules

* fix lint

* hide schedule save subblock from preview

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-11-24 16:06:11 -08:00
Vikhyath Mondreti
bbaf7e90f8 improvement(autolayout): simplify code to use fixed block widths, height + refactor (#2112)
* improvement(autolayout): simplify code to use fixed block widths, height + refactor

* change to aliased imports
2025-11-24 13:13:28 -08:00
Waleed
c80827f21b feat(agent): added workflow, kb, and function as a tool for agent block, fix keyboard nav in tool input (#2107)
* feat(agent): added workflow, kb, and function as a tool for agent block

* fix keyboard nav and keyboard selection in tool-inp

* ack PR comments

* remove custom tool changes

* fixed kb tools for agent

* cleanup
2025-11-24 12:16:02 -08:00
Waleed
a5b7897b34 feat(models): added claude opus 4.5 (#2111)
* feat(models): added claude opus 4.5

* add to copilot dropdown
2025-11-24 12:12:30 -08:00
Vikhyath Mondreti
c6482f2997 fix(billing): only check owners for billed overages (#2085) 2025-11-24 11:30:29 -08:00
Adam Gough
bf1719a294 added new scope (#2110) 2025-11-24 10:34:51 -08:00
Waleed
619cab162d feat(i18n): update translations (#2106)
Co-authored-by: aadamgough <aadamgough@users.noreply.github.com>
2025-11-22 21:25:53 -08:00
Adam Gough
72776f4402 improvement(docs): added docs content (#2105) 2025-11-22 17:52:56 -08:00
Waleed
6114c213d2 feature(models): added vllm provider (#2103)
* Add vLLM self-hosted provider

* updated vllm to have pull parity with openai, dynamically fetch models

---------

Co-authored-by: MagellaX <alphacr792@gmail.com>
2025-11-22 14:50:43 -08:00
Waleed
d1f0d21e7f improvement(logs): surface integration triggers in logs instead of catchall 'webhook' trigger type (#2102)
* improvement(logs): surface integration triggers in logs instead of  catchall

* optimized calculation, added new triggers to search

* cleanup

* fix console log
2025-11-22 14:18:42 -08:00
Waleed
33ac828d3d fix(settings): settings components and behavior consolidation (#2100)
* fix(settings): settings components and behavior consolidation

* ack PR comments
2025-11-21 19:49:32 -08:00
Adam Gough
29156e3b61 added missing mcp images (#2099) 2025-11-21 19:02:04 -08:00
Adam Gough
fa4b34fc46 removed broken scope (#2098) 2025-11-21 18:45:00 -08:00
Waleed
9fad5860bc feat(i18n): update translations (#2097)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-11-21 18:28:13 -08:00
Waleed
0a4244bcef feat(tools): added more tts providers, added stt and videogen models, fixed search modal keyboard nav (#2094)
* feat(tools): added more tts providers, added stt and videogen models, fixed search modal keyboard nav

* fixed icons

* cleaned up

* added falai

* improvement: icons

* fixed build

---------

Co-authored-by: Emir Karabeg <emirkarabeg@berkeley.edu>
2025-11-21 16:56:13 -08:00
Waleed
b7e814b721 v0.5.10: copilot upgrade, preprocessor, logs search, UI, code hygiene 2025-11-21 12:04:34 -08:00
Siddharth Ganesan
3be57aff8f improvement(copilot): add gpt5.1 and codex (#2092) 2025-11-21 11:39:27 -08:00
Siddharth Ganesan
ddd3219126 improvement(copilot): v0.2 (#2086)
* Edit workflow returns workflow

* Condense workflkow conosle

* Limit console results to 2

* mark checkoff v1

* Mark and checkoff todo

* Fixes

* Plan mode

* fix agent output

* broken

* Fixes

* Fix diff mode persist

* Fix diff coloring

* Undo/redo

* Checkpoint udno redo

* fix(templates): fix templates details page (#1942)

* Fix template details

* Fix deps

* fix(templates-details): restore approval feature, and keep details UI consistent, smoothen out creation of profile (#1943)

* fix(templates): view current ui

* update UI to be less cluttered

* make state management for creating user profile smoother

* fix autoselect logic

* fix lint

* fix(landing): need to propagate landing page copilot prompt (#1944)

* fix(wand): subblocks should not be overwritten after wand gen (#1946)

* fix(settings): fix broken api keys, help modal, logs, workflow renaming (#1945)

* fix(settings): fix broken api keys, help modal, logs, workflow renaming

* fix build

* cleanup

* use emcn

* fix(files): changed file input value sample from string -> object (#1947)

* improvement: usage-indicator UI (#1948)

* fix(deploy): fix button (#1949)

* fix(executor): consolidate execution hooks (#1950)

* fix(autoconnect): should check if triggermode is set from the toolbar drag event directly (#1951)

* improvement: templates styling (#1952)

* improvement: template use button (#1954)

* feat(newgifs): added new gifs (#1953)

* new gifs

* changed wording

* changed wording

* lowercase

* changed wording

* remove blog stuff

---------

Co-authored-by: aadamgough <adam@sim.ai>
Co-authored-by: waleed <walif6@gmail.com>

* feat(drizzle): added ods for analytics from drizzle (#1956)

* feat(drizzle): added ods for analytics from drizzle

* clean

* fix(sheets): file selector had incorrect provider (#1958)

* feat(docs): added docs analytics drizzle ods (#1957)

* feat(docs): added docs analytics drizzle ods

* fix build

* fix provider for docs selector (#1959)

* fix(custom-tools): updates to legacy + copilot generated custom tools  (#1960)

* fix(custom-tools): updates to existing tools

* don't reorder custom tools in modal based on edit time

* restructure custom tools to persist copilot generated tools

* fix tests

* fix(slack): remove update message incorrect canonical param (#1964)

* fix(slack): send message tool

* add logging

* add more logs

* add more logs

* fix canonical param

* improvement(templates): add share button, serve public templates routes for unauthenticated users and workspace one for authenticated users, improve settings style and organization (#1962)

* improvement(templates): add share button, serve public templates routes for unauthenticated users and workspace one for authenticated users, improve settings style and organization

* fix lint

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>

* fix(onedrive): incorrect canonical param (#1966)

* fix(onedrive): incorrect canonical param

* fix download file

* fix

* fix

* Revert "fix"

This reverts commit f68ccd75fd.

* Revert "fix"

This reverts commit f3d8acee7d.

* fix(executor): streaming after tool calls (#1963)

* Provider changes

* Fix lint

* fix(code): readd wand to code subblock (#1969)

* fix(cmd-k): z-index + reoder tools, triggers (#1970)

* fix(cmd-k): z-index + reoder tools, triggers

* fix more z-index styling

* fix(executor): streaming response format (#1972)

* fix(workflow-block): fix redeploy header to not repeatedly show redeploy when redeploy is not necessary (#1973)

* fix(workflow-block): fix redeploy header to not repeatedly show redeploy when redeploy is not necessary

* cleanup

* improvement(platform): chat, emcn, terminal, usage-limit (#1974)

* improvement(usage-indicator): layout

* improvement: expand default terminal height

* fix: swap workflow block ports

* improvement: chat initial positioning

* improvement(chat): display; improvement(emcn): popover attributes

* fix lint

* feat(settings): added reactquery for settings, removed zustand stores, added apollo, added workflow block selector dropdown search, added add environment variable option to empty env var dropdown (#1971)

* feat(settings): added reactquery for settings, removed zustand stores, added apollo, added workflow block selector dropdown search, added add environment variable option to empty env var dropdown

* fix delete dialog for copilot keys

* simplify combobox

* fix more z indices

* consolidated duplicate hooks

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>

* fix(copilot-subflows): copilot-added subflows id mismatch (#1977)

* feat(i18n): update translations (#1978)

* feat(i18n): update translations

* fix build

---------

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>

* fix(logs): show block inputs (#1979)

* Fix executor lgos block inputs

* Fix Comment

* fix(onedrive): parse array values correctly (#1981)

* fix(onedrive): parse array values correctly

* fix onedrive

* fix

* fix onedrive input parsing by reusing code subblock

* fix type

* feat(files): add presigned URL generation support for execution files (#1980)

* fix(popovers): billed account + async example command (#1982)

* fix(settings): update usage data in settings > subs to use reactquery hooks (#1983)

* fix(settings): update usage data in settings > subs to use reactquery hooks

* standardize usage pills calculation

* fix(output-selector): z-index in chat deploy modal (#1984)

* improvement(logs): improved logs search (#1985)

* improvement(logs): improved logs search

* more

* ack PR comments

* feat(slack): added slack full message object in response (#1987)

* feat(slack): add better error messages, reminder to add bot to app (#1990)

* feat(i18n): update translations (#1989)

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>

* fix(landing): hero stripe icon (#1988)

* Temp

* Update

* Update

* Update

* Progress

* Diff store fixes

* simplify sockets ops for diff store

* Search patterns tool

* Better tool calls

* Fix sanitizationg

* Context window display

* fix(variables): fix double stringification (#1991)

* improvement(variables): support dot notation for nested objects (#1992)

* improvement(tanstack): migrate multiple stores (#1994)

* improvement(tanstack): migrate folders, knowledge to tanstack

* fix types

* fix(folders): duplicate (#1996)

* fix(variables): fix variables block json resolution (#1997)

* Improvement(ui/ux): signup, command-list, cursors, search modal, workflow runs, usage indicator (#1998)

* improvement: signup loading, command-list, cursors, search modal ordering

* improvement: workflow runs, search modal

* improvement(usage-indicator): ui/ux

* test(pr): hackathon (#1999)

* test(pr): github trigger (#2000)

* fix(usage-indicator): conditional rendering, upgrade, and ui/ux (#2001)

* fix: usage-limit indicator and render conditonally on is billing enabled

* fix: upgrade render

* fix(notes): fix notes, tighten spacing, update deprecated zustand function, update use mention data to ignore block positon (#2002)

* fix(pdfs): use unpdf instead of pdf-parse (#2004)

* fix(modals): fix z-index for various modals and output selector and variables (#2005)

* fix(condition): treat condition input the same as the code subblock (#2006)

* feat(models): added gpt-5.1 (#2007)

* improvement: runpath edges, blocks, active (#2008)

* feat(i18n): update translations (#2009)

* fix(triggers): check triggermode and consolidate block type (#2011)

* fix(triggers): disabled trigger shouldn't be added to dag (#2012)

* Fix disabled blocks

* Comments

* Fix api/chat trigger not found message

* fix(tags): only show start block upstream if is ancestor (#2013)

* fix(variables): Fix resolution on double < (#2016)

* Fix variable <>

* Ling

* Clean

* feat(billing): add notif for first failed payment, added upgrade email from free, updated providers that supported granular tool control to support them, fixed envvar popover, fixed redirect to wrong workspace after oauth connect (#2015)

* feat(billing): add notif for first failed payment, added upgrade email from free, updated providers that supported granular tool control to support them, fixed envvar popover, fixed redirect to wrong workspace after oauth connect

* fix build

* ack PR comments

* feat(performance): added reactquery hooks for workflow operations, for logs, fixed logs reloading, fix subscription UI (#2017)

* feat(performance): added reactquery hooks for workflow operations, for logs, fixed logs reloading, fix subscription UI

* use useInfiniteQuery for logs fetching

* fix(copilot): run workflow supports input format and fix run id (#2018)

* fix(router): fix error edge in router block + fix source handle problem (#2019)

* Fix router block error port handling

* Remove comment

* Fix edge execution

* improvement: code subblock, action bar, connections (#2024)

* improvement: action bar, connections

* fix: code block draggable resize

* fix(response): fix response block http format (#2027)

* Fix response block

* Lint

* fix(notes): fix notes block spacing, additional logs for billing transfer route (#2029)

* fix(usage-data): refetch on usage limit update in settings (#2032)

* fix(overage): fix pill calculation in the usage indicator to be consistent across views (#2034)

* fix(workflows): fixed workflow loading in without start block, added templates RQ hook, cleaned up unused templates code (#2035)

* fix(triggers): dedup + not surfacing deployment status log (#2033)

* fix(triggers): dedup + not surfacing deployment status log

* fix ms teams

* change to microsoftteams

* Revert "change to microsoftteams"

This reverts commit 217f808641.

* fix

* fix

* fix provider name

* fix oauth for msteams

* improvement(undo-redo): expand undo-redo store to store 100 ops instead of 15 (#2036)

* improvement(undo-redo): expand undo-redo store to store 100 ops instead of 15

* prevent undo-redo from interfering with subblock browser text undo

* improvement(docs): remove copy page from mobile view on docs (#2037)

* improvement(docs): remove copy page from mobile view on docs

* bring title and pagenav lower on mobile

* added cursor pointer to clickable components in docs

* fix(workflow-block): clearing child workflow input format field must lazy cascade parent workflow state deletion (#2038)

* Error tools

* Ui tools

* Navigate ui tool

* Combine env vars and oauth tools

* Plan mode section

* Plan mode v1

* Plan mode v1

* Plan mode improvements

* Build plan button

* Make workflow plan editable

* Tool improvements

* Fix build plan button

* Lint

* Fix

* Fix lint

* Fix plan

* Remove migrations

* fix undo/redo settling of ops

* Add migratinos back

* Smoothen out diff store

* Hide plan mode

* Fix lint

* Edit run workflow params

* Fix lint

* Fix tests

* Fix typing

* Fix build errors and lint

* Fix build

* Fix tests

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: Emir Karabeg <78010029+emir-karabeg@users.noreply.github.com>
Co-authored-by: Adam Gough <77861281+aadamgough@users.noreply.github.com>
Co-authored-by: aadamgough <adam@sim.ai>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
Co-authored-by: Emir Karabeg <emirkarabeg@berkeley.edu>
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-11-21 10:22:08 -08:00
Waleed
67bd5bd8fa fix(integ): remove unused oauth providers from list of supported integrations (#2090) 2025-11-20 20:20:10 -08:00
Waleed
c52501616c feat(i18n): update translations (#2088)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-11-20 19:37:20 -08:00
Emir Karabeg
3dbf0f5679 feat: keyboard navigation; improvement: SEO/GEO; refactor: file structure, unused fonts; fix: chat streaming, notification stack (#2083)
* improvement: panel tabs handler on click

* fix: output break words

* feat: keyboard navigation; improvement: SEO/GEO; refactor: file structure, unused fonts; fix: chat streaming, notification stack

* feat: unresolved value handling on error; fix: layout refresh; refactor: delete old panel

* refactor: control bar delete; improvement: workflow constants; fix: clear notifications keyboard shortcut

* update developers count

* fixed relative imports

---------

Co-authored-by: waleed <walif6@gmail.com>
2025-11-20 19:37:09 -08:00
Emir Karabeg
6187561219 improvement(chat): ui (#2089) 2025-11-20 19:16:51 -08:00
Waleed
022b4f64a7 fix(linear): fix remaining ops (#2087) 2025-11-20 19:02:12 -08:00
Waleed
768cdec6ce fix(logs): fixed logs search (#2084) 2025-11-20 17:16:08 -08:00
Waleed
75f55c894a fix(logging): add preprocessing util shared by all execution paths (#2081)
* fix(logging): add preprocessing util shared by all execution paths

* DRY
2025-11-20 14:05:14 -08:00
Waleed
4a0450d1fc fix(embeddings): modified embeddings utils to only index english docs (#2078) 2025-11-20 14:03:49 -08:00
Waleed
00ae718692 improvement(runners): upgrade runners, remove trigger deploy action (#2082) 2025-11-20 13:49:17 -08:00
Vikhyath Mondreti
d7586cdd9f fix(undo-redo): eviction policy to not have unbounded undo-redo stacks (#2079)
* fix(undo-redo): eviction policy to not have unbounded undo-redo stacks

* fix zindex custom tools delete
2025-11-20 12:12:04 -08:00
Waleed
842ef27ed9 v0.5.9: add backwards compatibility for agent messages array 2025-11-20 11:19:42 -08:00
Waleed
f208ff9356 fix(agent): add backwards compat for agent messages array (#2076)
* fix(agent): add backwards compat for agent messages array

* add tests
2025-11-20 11:16:06 -08:00
Vikhyath Mondreti
31c34b2ea3 v0.5.8: notifications, billing, ui changes, store loading state machine 2025-11-20 01:32:32 -08:00
Vikhyath Mondreti
304cafe698 improvement(linear): cleanup linear checks (#2075) 2025-11-20 01:32:01 -08:00
Vikhyath Mondreti
472aff5dd7 fix(resolver): json/array field parsing (#2074)
* fix(resolver): json/array field parsing

* remove comment
2025-11-20 00:27:12 -08:00
Waleed
4d5c574363 fix(stt): add fallback for ffmpeg (#2073) 2025-11-19 21:49:12 -08:00
Waleed
e7d4afa46b feat(i18n): update translations (#2071)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-11-19 21:21:52 -08:00
Waleed
f570592ad7 fix(linear): update required fields (#2070) 2025-11-19 21:17:37 -08:00
Waleed
e64b1c9fcd feat(tools): added speech to text with openai whisper, elevenlabs, and deepgram (#2068)
* feat(tools): added speech to text with openai whisper, elevenlabs, and deepgram

* added new file icons, implemented ffmpeg

* updated docs

* revert environment
2025-11-19 21:03:54 -08:00
Waleed
7c5d625ca5 fix(blogs): update sitemap and fix loading strat on blogs to prevent mobile crash (#2067)
* fix(blogs): update sitemap and fix loading strat on blogs to prevent mobile crash

* updated sitemap
2025-11-19 19:58:26 -08:00
Vikhyath Mondreti
e5cb6e3d0f improvement(store-hydration): refactor loading state tracking for workflows (#2065)
* improvement(store-hydration): refactor loading state tracking for workflows

* fix type issue

* fix

* fix deploy modal reference

* sidebar

* new panel

* reset stores
2025-11-19 19:10:43 -08:00
Waleed
e4ccedc4ff fix(tools): added stricter aura host db validation check for neo4j tool (#2066) 2025-11-19 18:44:33 -08:00
Emir Karabeg
d9cb63ce5f feat(chat): add 'add inputs' button to chat window (#2057)
* improvement(ui): workflow-block border

* feat(chat): add inputs button

* added socket event, reused existing utils to persist chat inputs

---------

Co-authored-by: waleed <walif6@gmail.com>
2025-11-19 18:12:03 -08:00
Waleed
3468593f84 feat(i18n): update translations (#2064)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-11-19 18:01:52 -08:00
Waleed
95d5fd9c35 feat(i18n): update translations (#2062)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-11-19 17:44:42 -08:00
Waleed
becd19bc50 improvement(ux): added tab key navigation for agent messages, made variables styling match chat, added neo4j and calendly (#2056)
* improvement(ux): added tab key navigation for agent messages, made variables styling match chat

* added neo4j tools, added calendly tools and triggers

* more style improvements

* consolidate wand generation type

* more ui improvements

* fix calendly

* tested all neo4j tools

* added fuzzy search for search modal, tested and fixed calendly

* updated docs

* fix various broken docs links, neo4j param validation

* removed limit from neo4j block
2025-11-19 17:40:20 -08:00
Travis Johnson
c93f6620f6 improvement(tools): add eleven_v3 to elevenlabs block (#2053) 2025-11-19 17:39:17 -08:00
Adam Gough
3647a3e38c improvement(tools): added add worksheet to excel block (#2061)
Co-authored-by: aadamgough <adam@sim.ai>
2025-11-19 17:34:45 -08:00
Vikhyath Mondreti
f609b6ea4a fix(z-index): deployment versions rename + view active popover (#2059) 2025-11-19 16:42:09 -08:00
Vikhyath Mondreti
2be3007d69 fix(mcp-preview): server and tool name fetch to use tanstack (#2058)
* fix(mcp-preview): server and tool name fetch to use tanstack

* remove comments

* fix mcp tool interface

* change incorrect reference

* fix

* remove comments
2025-11-19 16:22:17 -08:00
Waleed
570b8d61f0 improvement(runners): added blacksmith optimizations to workflows and dockerfiles to enhance performance (#2055)
* added blacksmith optimizations to workflows and dockerfiles to enhance performance. please review before pushing to production

* remove cache from and cache to directives from docker based actions, per blacksmith docs

---------

Co-authored-by: Connor Mulholland <connormul@Connors-MacBook-Pro.local>
2025-11-19 13:07:03 -08:00
Waleed
7045c4a47b fix(dialogs): standardized delete modals (#2049)
* standardized delete modals

* fix

* fix(ui): live usage indicator, child trace spans, cancel subscription modal z-index (#2044)

* cleanup

* show trace spans for child blocks that error

* fix z index for cancel subscription popup

* rotating digit live usage indicator

* fix

* remove unused code

* fix type

* fix(billing): fix team upgrade

* fix

* fix tests

---------

Co-authored-by: waleed <walif6@gmail.com>

* remove unused barrel exports

* remove unused components

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
2025-11-18 21:17:06 -08:00
Vikhyath Mondreti
5e11e5df91 fix(ui): live usage indicator, child trace spans, cancel subscription modal z-index (#2044)
* cleanup

* show trace spans for child blocks that error

* fix z index for cancel subscription popup

* rotating digit live usage indicator

* fix

* remove unused code

* fix type

* fix(billing): fix team upgrade

* fix

* fix tests

---------

Co-authored-by: waleed <walif6@gmail.com>
2025-11-18 20:21:16 -08:00
Waleed
2608f2f12c fix(copiolot-ui): fix code markdown rendering in copilot & table (#2048) 2025-11-18 18:06:18 -08:00
Waleed
96207d85a7 fix(subflows): add loops/parallels to accessible list of blocks in the tag dropdown when contained withitn a subflow (#2047)
* fix(subflows): add loops/parallels to accessible list of blocks in the tag dropdown when contained withitn a subflow

* remove currentIteration in loop
2025-11-18 17:24:30 -08:00
Waleed
a7fe1d3aea fix(models): remove unrelease oai models, fix help modal (#2046) 2025-11-18 17:08:47 -08:00
Waleed
3faab2cb01 improvement(notifications): add option to disable error notifications, remove deprecated autoFillEnvVars field (#2045) 2025-11-18 16:28:59 -08:00
Emir Karabeg
02d9fedf0c feat(agent): messages array, memory (#2023)
* feat(agent): messages array, memory options

* feat(messages-input): re-order messages

* backend for new memory setup, backwards compatibility in loadWorkflowsFromNormalizedTable from old agent block to new format

* added memories all conversation sliding token window, standardized modals

* lint

* fix build

* reorder popover for output selector for chat

* add internal auth, finish memories

* fix rebase

* fix failing test

---------

Co-authored-by: waleed <walif6@gmail.com>
2025-11-18 15:58:10 -08:00
Waleed
a8a693f1ff fix(deploy): add sockets op for renaming blocks (#2043)
* fix(deploy): add sockets op for renaming blocks

* remove old unused helpers
2025-11-18 15:57:49 -08:00
Emir Karabeg
e0aade85a6 feat: notification store (#2025)
* feat: notification store

* feat: notification stack; improvement: chat output select
2025-11-18 10:43:24 -08:00
Vikhyath Mondreti
8f0ef58056 v0.5.7: combobox selectors, usage indicator, workflow loading race condition, other improvements 2025-11-17 21:25:51 -08:00
Vikhyath Mondreti
33ca1483aa Merge branch 'main' into staging 2025-11-17 21:21:30 -08:00
Vikhyath Mondreti
620ce97056 improvement(selectors): consolidate all integration selectors to use the combobox (#2020)
* improvement(selectors): consolidate all integration selectors to use the combobox

* improved credential selector and file-upload styling to use emcn combobox

* update mcp subblocks to use emcn components, delete unused mcp server modal

* fix filterOptions change

* fix project selector

* attempted jira fix

* fix gdrive inf calls

* rewrite credential selector

* fix docs

* fix onedrive folder

* fix

* fix

* fix excel cred fetch

* fix excel part 2

---------

Co-authored-by: waleed <walif6@gmail.com>
2025-11-17 21:06:52 -08:00
Vikhyath Mondreti
25ac91779b fix(workflow-block): clearing child workflow input format field must lazy cascade parent workflow state deletion (#2038) 2025-11-17 19:00:50 -08:00
Waleed
d51a756c1b improvement(docs): remove copy page from mobile view on docs (#2037)
* improvement(docs): remove copy page from mobile view on docs

* bring title and pagenav lower on mobile

* added cursor pointer to clickable components in docs
2025-11-17 18:10:52 -08:00
Waleed
3d1feab507 improvement(undo-redo): expand undo-redo store to store 100 ops instead of 15 (#2036)
* improvement(undo-redo): expand undo-redo store to store 100 ops instead of 15

* prevent undo-redo from interfering with subblock browser text undo
2025-11-17 18:00:12 -08:00
Vikhyath Mondreti
98908dbfb9 fix(triggers): dedup + not surfacing deployment status log (#2033)
* fix(triggers): dedup + not surfacing deployment status log

* fix ms teams

* change to microsoftteams

* Revert "change to microsoftteams"

This reverts commit 217f808641.

* fix

* fix

* fix provider name

* fix oauth for msteams
2025-11-17 17:48:22 -08:00
Waleed
00d9b45a22 fix(workflows): fixed workflow loading in without start block, added templates RQ hook, cleaned up unused templates code (#2035) 2025-11-17 17:31:01 -08:00
Waleed
b5b2855b40 fix(overage): fix pill calculation in the usage indicator to be consistent across views (#2034) 2025-11-17 16:22:24 -08:00
Waleed
a81f3847df fix(usage-data): refetch on usage limit update in settings (#2032) 2025-11-17 15:07:52 -08:00
Waleed
3058e35edf v0.5.6: executor fixes, UI improvements, run paths (#2028)
* test(pr): hackathon (#1999)

* test(pr): github trigger (#2000)

* fix(usage-indicator): conditional rendering, upgrade, and ui/ux (#2001)

* fix: usage-limit indicator and render conditonally on is billing enabled

* fix: upgrade render

* fix(notes): fix notes, tighten spacing, update deprecated zustand function, update use mention data to ignore block positon (#2002)

* fix(pdfs): use unpdf instead of pdf-parse (#2004)

* fix(modals): fix z-index for various modals and output selector and variables (#2005)

* fix(condition): treat condition input the same as the code subblock (#2006)

* feat(models): added gpt-5.1 (#2007)

* improvement: runpath edges, blocks, active (#2008)

* feat(i18n): update translations (#2009)

* fix(triggers): check triggermode and consolidate block type (#2011)

* fix(triggers): disabled trigger shouldn't be added to dag (#2012)

* Fix disabled blocks

* Comments

* Fix api/chat trigger not found message

* fix(tags): only show start block upstream if is ancestor (#2013)

* fix(variables): Fix resolution on double < (#2016)

* Fix variable <>

* Ling

* Clean

* feat(billing): add notif for first failed payment, added upgrade email from free, updated providers that supported granular tool control to support them, fixed envvar popover, fixed redirect to wrong workspace after oauth connect (#2015)

* feat(billing): add notif for first failed payment, added upgrade email from free, updated providers that supported granular tool control to support them, fixed envvar popover, fixed redirect to wrong workspace after oauth connect

* fix build

* ack PR comments

* feat(performance): added reactquery hooks for workflow operations, for logs, fixed logs reloading, fix subscription UI (#2017)

* feat(performance): added reactquery hooks for workflow operations, for logs, fixed logs reloading, fix subscription UI

* use useInfiniteQuery for logs fetching

* fix(copilot): run workflow supports input format and fix run id (#2018)

* fix(router): fix error edge in router block + fix source handle problem (#2019)

* Fix router block error port handling

* Remove comment

* Fix edge execution

* improvement: code subblock, action bar, connections (#2024)

* improvement: action bar, connections

* fix: code block draggable resize

* fix(response): fix response block http format (#2027)

* Fix response block

* Lint

* fix(notes): fix notes block spacing, additional logs for billing transfer route (#2029)

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Emir Karabeg <78010029+emir-karabeg@users.noreply.github.com>
Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>
2025-11-17 13:46:03 -08:00
Waleed
6f3dee867c fix(notes): fix notes block spacing, additional logs for billing transfer route (#2029) 2025-11-17 13:37:17 -08:00
Siddharth Ganesan
bfa7c919d8 fix(response): fix response block http format (#2027)
* Fix response block

* Lint
2025-11-17 11:50:33 -08:00
Emir Karabeg
e37b01b92c improvement: code subblock, action bar, connections (#2024)
* improvement: action bar, connections

* fix: code block draggable resize
2025-11-17 11:04:41 -08:00
Siddharth Ganesan
7e3e38a6f2 fix(router): fix error edge in router block + fix source handle problem (#2019)
* Fix router block error port handling

* Remove comment

* Fix edge execution
2025-11-15 18:32:14 -08:00
Siddharth Ganesan
1c85fe9a51 fix(copilot): run workflow supports input format and fix run id (#2018) 2025-11-15 18:11:09 -08:00
Waleed
5f446ad756 feat(performance): added reactquery hooks for workflow operations, for logs, fixed logs reloading, fix subscription UI (#2017)
* feat(performance): added reactquery hooks for workflow operations, for logs, fixed logs reloading, fix subscription UI

* use useInfiniteQuery for logs fetching
2025-11-15 16:41:35 -08:00
Waleed
d99d5fe39c feat(billing): add notif for first failed payment, added upgrade email from free, updated providers that supported granular tool control to support them, fixed envvar popover, fixed redirect to wrong workspace after oauth connect (#2015)
* feat(billing): add notif for first failed payment, added upgrade email from free, updated providers that supported granular tool control to support them, fixed envvar popover, fixed redirect to wrong workspace after oauth connect

* fix build

* ack PR comments
2025-11-15 16:09:58 -08:00
Siddharth Ganesan
949f9287cf fix(variables): Fix resolution on double < (#2016)
* Fix variable <>

* Ling

* Clean
2025-11-15 15:09:01 -08:00
Siddharth Ganesan
fca92a7499 fix(tags): only show start block upstream if is ancestor (#2013) 2025-11-15 12:27:34 -08:00
Siddharth Ganesan
c25ea5c677 fix(triggers): disabled trigger shouldn't be added to dag (#2012)
* Fix disabled blocks

* Comments

* Fix api/chat trigger not found message
2025-11-15 12:19:37 -08:00
Siddharth Ganesan
dccd9e9ce5 fix(triggers): check triggermode and consolidate block type (#2011) 2025-11-15 12:00:12 -08:00
Waleed
b5d9964c48 feat(i18n): update translations (#2009) 2025-11-14 23:33:13 -08:00
Emir Karabeg
4bd0f31f36 improvement: runpath edges, blocks, active (#2008) 2025-11-14 23:26:41 -08:00
Waleed
f8070f9029 feat(models): added gpt-5.1 (#2007) 2025-11-14 23:23:47 -08:00
Waleed
bc8947caa6 fix(condition): treat condition input the same as the code subblock (#2006) 2025-11-14 23:23:39 -08:00
Waleed
f1111ec16f fix(modals): fix z-index for various modals and output selector and variables (#2005) 2025-11-14 23:13:31 -08:00
Waleed
d0767507b2 fix(pdfs): use unpdf instead of pdf-parse (#2004) 2025-11-14 22:39:28 -08:00
Waleed
8bd75debc1 fix(notes): fix notes, tighten spacing, update deprecated zustand function, update use mention data to ignore block positon (#2002) 2025-11-14 22:12:01 -08:00
Emir Karabeg
ad2a375358 fix(usage-indicator): conditional rendering, upgrade, and ui/ux (#2001)
* fix: usage-limit indicator and render conditonally on is billing enabled

* fix: upgrade render
2025-11-14 21:26:40 -08:00
Vikhyath Mondreti
de91dc97a9 test(pr): github trigger (#2000) 2025-11-14 18:08:07 -08:00
Vikhyath Mondreti
31ed712378 test(pr): hackathon (#1999) 2025-11-14 18:02:00 -08:00
Waleed
aca4d2fc15 v0.5.5: slack tool updates, logs search, response block fixes, reactquery migrations 2025-11-14 16:20:10 -08:00
Emir Karabeg
96958104c0 Improvement(ui/ux): signup, command-list, cursors, search modal, workflow runs, usage indicator (#1998)
* improvement: signup loading, command-list, cursors, search modal ordering

* improvement: workflow runs, search modal

* improvement(usage-indicator): ui/ux
2025-11-14 16:13:23 -08:00
Siddharth Ganesan
6f29e2413c fix(variables): fix variables block json resolution (#1997) 2025-11-14 16:07:01 -08:00
Vikhyath Mondreti
c2ccd51b3e fix(folders): duplicate (#1996) 2025-11-14 15:50:00 -08:00
Vikhyath Mondreti
ec430abca2 improvement(tanstack): migrate multiple stores (#1994)
* improvement(tanstack): migrate folders, knowledge to tanstack

* fix types
2025-11-14 15:38:15 -08:00
Siddharth Ganesan
4b4060f63f improvement(variables): support dot notation for nested objects (#1992) 2025-11-14 14:47:16 -08:00
Siddharth Ganesan
72a048f37d fix(variables): fix double stringification (#1991) 2025-11-14 12:00:32 -08:00
Emir Karabeg
fa18bef65b fix(landing): hero stripe icon (#1988) 2025-11-14 02:20:32 -08:00
Waleed
a9eb91aed1 feat(i18n): update translations (#1989)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-11-14 02:18:32 -08:00
Waleed
16a4f37dac feat(slack): add better error messages, reminder to add bot to app (#1990) 2025-11-14 02:18:19 -08:00
Waleed
6c56d48e73 feat(slack): added slack full message object in response (#1987) 2025-11-14 01:55:01 -08:00
Waleed
1082e55871 improvement(logs): improved logs search (#1985)
* improvement(logs): improved logs search

* more

* ack PR comments
2025-11-14 01:14:20 -08:00
Vikhyath Mondreti
948b6575dc fix(output-selector): z-index in chat deploy modal (#1984) 2025-11-13 20:13:15 -08:00
Waleed
3ba33791f7 fix(settings): update usage data in settings > subs to use reactquery hooks (#1983)
* fix(settings): update usage data in settings > subs to use reactquery hooks

* standardize usage pills calculation
2025-11-13 19:57:48 -08:00
Vikhyath Mondreti
1e915d5427 fix(popovers): billed account + async example command (#1982) 2025-11-13 19:33:15 -08:00
Waleed
d86198ad5d feat(files): add presigned URL generation support for execution files (#1980) 2025-11-13 19:32:23 -08:00
Vikhyath Mondreti
785f847c48 fix(onedrive): parse array values correctly (#1981)
* fix(onedrive): parse array values correctly

* fix onedrive

* fix

* fix onedrive input parsing by reusing code subblock

* fix type
2025-11-13 19:24:33 -08:00
Siddharth Ganesan
dab70a8f1d fix(logs): show block inputs (#1979)
* Fix executor lgos block inputs

* Fix Comment
2025-11-13 19:07:53 -08:00
Waleed
d2c0147822 v0.5.4: streaming fixes, deployment bug fixes, resolve ui bugs, tanstack query for settings, copilot subflow edits fixes 2025-11-13 18:29:20 -08:00
Waleed
67d9343022 feat(i18n): update translations (#1978)
* feat(i18n): update translations

* fix build

---------

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-11-13 18:07:42 -08:00
Vikhyath Mondreti
b3caef1f31 fix(copilot-subflows): copilot-added subflows id mismatch (#1977) 2025-11-13 17:56:26 -08:00
Waleed
5457d4bc7b feat(settings): added reactquery for settings, removed zustand stores, added apollo, added workflow block selector dropdown search, added add environment variable option to empty env var dropdown (#1971)
* feat(settings): added reactquery for settings, removed zustand stores, added apollo, added workflow block selector dropdown search, added add environment variable option to empty env var dropdown

* fix delete dialog for copilot keys

* simplify combobox

* fix more z indices

* consolidated duplicate hooks

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-11-13 17:33:05 -08:00
Emir Karabeg
32a2e09a14 fix lint 2025-11-13 16:31:30 -08:00
Emir Karabeg
80eaeb00c2 improvement(platform): chat, emcn, terminal, usage-limit (#1974)
* improvement(usage-indicator): layout

* improvement: expand default terminal height

* fix: swap workflow block ports

* improvement: chat initial positioning

* improvement(chat): display; improvement(emcn): popover attributes
2025-11-13 16:02:13 -08:00
Waleed
b67b4ff8fb fix(workflow-block): fix redeploy header to not repeatedly show redeploy when redeploy is not necessary (#1973)
* fix(workflow-block): fix redeploy header to not repeatedly show redeploy when redeploy is not necessary

* cleanup
2025-11-13 15:40:09 -08:00
Siddharth Ganesan
6f4f8cfad2 fix(executor): streaming response format (#1972) 2025-11-13 15:27:15 -08:00
Vikhyath Mondreti
3a8f01f3e4 fix(cmd-k): z-index + reoder tools, triggers (#1970)
* fix(cmd-k): z-index + reoder tools, triggers

* fix more z-index styling
2025-11-13 13:59:09 -08:00
Vikhyath Mondreti
383b6f05a6 fix(code): readd wand to code subblock (#1969) 2025-11-13 12:31:10 -08:00
Siddharth Ganesan
a70f2a6690 fix(executor): streaming after tool calls (#1963)
* Provider changes

* Fix lint
2025-11-13 12:24:26 -08:00
Vikhyath Mondreti
53150021e0 v0.5.3: docs, sheets, slack, custom tools fixes and templates contexts improvements 2025-11-12 22:17:06 -08:00
Vikhyath Mondreti
4e5b834433 fix(onedrive): incorrect canonical param (#1966)
* fix(onedrive): incorrect canonical param

* fix download file

* fix

* fix

* Revert "fix"

This reverts commit f68ccd75fd.

* Revert "fix"

This reverts commit f3d8acee7d.
2025-11-12 22:16:13 -08:00
Waleed
304fb28baf improvement(templates): add share button, serve public templates routes for unauthenticated users and workspace one for authenticated users, improve settings style and organization (#1962)
* improvement(templates): add share button, serve public templates routes for unauthenticated users and workspace one for authenticated users, improve settings style and organization

* fix lint

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-11-12 21:46:26 -08:00
Vikhyath Mondreti
07e803cfdd fix(slack): remove update message incorrect canonical param (#1964)
* fix(slack): send message tool

* add logging

* add more logs

* add more logs

* fix canonical param
2025-11-12 21:46:00 -08:00
Vikhyath Mondreti
d50aefcc68 fix(custom-tools): updates to legacy + copilot generated custom tools (#1960)
* fix(custom-tools): updates to existing tools

* don't reorder custom tools in modal based on edit time

* restructure custom tools to persist copilot generated tools

* fix tests
2025-11-12 18:50:58 -08:00
Vikhyath Mondreti
6513cbb7c1 fix provider for docs selector (#1959) 2025-11-12 17:57:04 -08:00
Waleed
f9e822f6c8 feat(docs): added docs analytics drizzle ods (#1957)
* feat(docs): added docs analytics drizzle ods

* fix build
2025-11-12 17:51:58 -08:00
Vikhyath Mondreti
74202ce1fc fix(sheets): file selector had incorrect provider (#1958) 2025-11-12 17:36:28 -08:00
Waleed
66c8fa2a77 v0.5.2: templates, wand, settings, table, copilot-landing, files, deploy, autoconnect 2025-11-12 16:36:18 -08:00
Waleed
766c7fbfbb feat(drizzle): added ods for analytics from drizzle (#1956)
* feat(drizzle): added ods for analytics from drizzle

* clean
2025-11-12 16:35:46 -08:00
Adam Gough
675c42188a feat(newgifs): added new gifs (#1953)
* new gifs

* changed wording

* changed wording

* lowercase

* changed wording

* remove blog stuff

---------

Co-authored-by: aadamgough <adam@sim.ai>
Co-authored-by: waleed <walif6@gmail.com>
2025-11-12 16:21:09 -08:00
Emir Karabeg
f414ae1936 improvement: template use button (#1954) 2025-11-12 16:17:27 -08:00
Emir Karabeg
ead0db9d2a improvement: templates styling (#1952) 2025-11-12 15:58:38 -08:00
Vikhyath Mondreti
10288111a8 fix(autoconnect): should check if triggermode is set from the toolbar drag event directly (#1951) 2025-11-12 15:51:52 -08:00
Siddharth Ganesan
01183f1771 fix(executor): consolidate execution hooks (#1950) 2025-11-12 15:46:29 -08:00
Waleed
ff081714e4 fix(deploy): fix button (#1949) 2025-11-12 14:16:56 -08:00
Emir Karabeg
36bcd75832 improvement: usage-indicator UI (#1948) 2025-11-12 14:09:18 -08:00
Waleed
9db969b1e0 fix(files): changed file input value sample from string -> object (#1947) 2025-11-12 14:06:33 -08:00
Waleed
2fbe0de5d3 fix(settings): fix broken api keys, help modal, logs, workflow renaming (#1945)
* fix(settings): fix broken api keys, help modal, logs, workflow renaming

* fix build

* cleanup

* use emcn
2025-11-12 13:43:48 -08:00
Vikhyath Mondreti
6315cc105b fix(wand): subblocks should not be overwritten after wand gen (#1946) 2025-11-12 13:36:36 -08:00
Vikhyath Mondreti
61404d48a3 fix(landing): need to propagate landing page copilot prompt (#1944) 2025-11-12 12:36:45 -08:00
Vikhyath Mondreti
dbf9097a5b fix(templates-details): restore approval feature, and keep details UI consistent, smoothen out creation of profile (#1943)
* fix(templates): view current ui

* update UI to be less cluttered

* make state management for creating user profile smoother

* fix autoselect logic

* fix lint
2025-11-12 12:22:16 -08:00
Siddharth Ganesan
79b318fd9c fix(templates): fix templates details page (#1942)
* Fix template details

* Fix deps
2025-11-12 11:16:15 -08:00
Siddharth Ganesan
cb39e697e2 fix(templates): fix template details page (#1940)
* Fix v1

* Template details page
2025-11-12 10:45:34 -08:00
Emir Karabeg
e1a46c90c6 fix: table subblock (#1937) 2025-11-12 09:53:38 -08:00
Waleed
c7560be282 fix(presence): fix additional avatars showing for presence (#1938) 2025-11-12 09:33:01 -08:00
Waleed
63f18995da v0.5.1: blogs 2025-11-12 08:30:33 -08:00
Waleed
af501347bb feat(blogs): added blog tags (#1935) 2025-11-12 08:29:03 -08:00
Waleed
6747d89865 v0.5: platform overhaul, 300+ new tools 2025-11-12 08:08:51 -08:00
Waleed
1201327adc fix(comment): fixed comment (#1933) 2025-11-12 08:08:04 -08:00
Emir Karabeg
f4434e302c feat: templates, usage indicator, wand, approval, logs, help, settings, deploy template, error UI (#1931)
* templates, usage indicator, wand, approval, ...

* fix: build error import isTruthy
2025-11-12 07:42:40 -08:00
Emir Karabeg
42e2769526 feat: place all styles in global vars (#1923)
* feat: place all styles in global vars

* feat: prevented on workspace
2025-11-12 04:51:46 -08:00
Waleed
a0c4bce56e feat(studio): added 'studio' blog (#1927)
* feat(blog): fundraise blog

* added scaffolding and authors for everyone's articles

* rename blog to studio

* add blog post for multiplayer

* add profile pic

* Executor blog

* mark emcn blog as draft

* Fix x

* v0.4.26

* fix(already-cancelled-sub): UI should allow restoring subscription

* restore functionality fixed

* fix

Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>

* fix(conflict): resolve merge conflict

* fix(already-cancelled-sub): UI should allow restoring subscription

* restore functionality fixed

* fix

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>

* fix(billing): should allow restoring subscription (#1728) (#1925)

* fix(already-cancelled-sub): UI should allow restoring subscription

* restore functionality fixed

* fix

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>

* cleanup blog

---------

Co-authored-by: waleed <waleed>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
Co-authored-by: Siddharth Ganesan <siddharthganesan@gmail.com>
Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>
Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
2025-11-12 04:03:50 -08:00
Waleed
64c5f2c473 feat(i18n): update translations (#1926)
* feat(i18n): update translations

* fix build

---------

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-11-12 02:49:17 -08:00
Waleed
413c460ae8 fix(billing): should allow restoring subscription (#1728) (#1925)
* fix(already-cancelled-sub): UI should allow restoring subscription

* restore functionality fixed

* fix

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>
2025-11-12 02:35:35 -08:00
Waleed
fa42ea44c1 fix(conflict): resolve merge conflict
* fix(already-cancelled-sub): UI should allow restoring subscription

* restore functionality fixed

* fix

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>
2025-11-12 02:24:57 -08:00
Waleed
1bd18ee85b feat(tag-dropdown): added start block to tag dropdown by default (#1922) 2025-11-12 02:14:31 -08:00
Siddharth Ganesan
e3e951832b v0.4.26
* fix(already-cancelled-sub): UI should allow restoring subscription

* restore functionality fixed

* fix

Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
2025-11-12 02:00:55 -08:00
Siddharth Ganesan
56835b94d8 fix(executor): duplicate error, cmd+enter (#1920)
* Fix executor error

* Fix cmd+enter

* Lint
2025-11-12 01:44:01 -08:00
Waleed
9a6a6fdacb improvement(docs): updated with new ss, docs script updated to copy items from main app into docs for tools (#1918)
* improvement(docs): updated script to copy over icons, cleanup unnecessary pages

* updated script with auto-icon generation

* ignore translations, only icons changed

* updated images

* updated i18n.lock

* updated images
2025-11-12 01:15:23 -08:00
Siddharth Ganesan
41066b84d2 fix(executor): surface pre-execution errors (#1917) 2025-11-12 01:05:48 -08:00
Vikhyath Mondreti
5cea73fe91 fix(copilot): show subblocks in diff mode (#1916) 2025-11-11 21:47:58 -08:00
Vikhyath Mondreti
cbc98ab4f5 fix(variables): display name rendering (#1915)
* fix(variables): display name rendering

* cleanup

* cleanup more code
2025-11-11 21:08:44 -08:00
Waleed
81411c73b7 feat(registry): renaming workspace and folders shortcut (#1912) 2025-11-11 20:18:58 -08:00
Waleed
d11ee04432 fix(workspace-popover): added duplicate, import, export workspace; added export multiple workflows (#1911)
* fix(workspace-popover): added duplicate, import, export workspace; added export multiple workflows

* fix copilot keyboard nav
2025-11-11 20:12:08 -08:00
Adam Gough
1d58fdf234 fix(invites): remove uuid validation from inv api (#1910) 2025-11-11 18:16:46 -08:00
Waleed
96f134b127 fix(variables): fixed floating variables, added autcomplete off to prevent suggested values (#1908)
* fixed variables

* add autocomplete=off to prevent suggestions for subblock values
2025-11-11 17:52:46 -08:00
Siddharth Ganesan
769555676e Fix start block numbering (#1909) 2025-11-11 17:52:04 -08:00
Vikhyath Mondreti
679c3418d6 fix(selectors-hydration): confluence, jira, teams (#1907)
* fix(jira): issue and project selector

* fix endpoints

* remove # for selector

* fix chat selector

* add preview card for jira

* fix inf calls for teams

* fix inf teams calls

* inf confluence calls

* fix confluence selector

* add small # back for slack channel selector

* fix wealthbox selector
2025-11-11 16:38:21 -08:00
Emir Karabeg
7b48d6ed53 feat(workflow): workflow overhaul (#1906)
* feat: action-bar side-effects; refactor: removed unused styles from globals and tailwind config

* feat(terminal): filters/sorting; fix(workflow): zoom bug

* feat(sidebar): toggle; feat(terminal): show/hide timestamp

* feat(toolbar): triggers ordering

* feat: commands, cursors, room-presence, command-list, rename blocks, workspace controls, invite, search modal

* removed old imports

* ack PR comments

* fix tag dropdown

* feat: variables UI; fix: terminal keys

---------

Co-authored-by: waleed <waleed>
2025-11-11 16:30:30 -08:00
Adam Gough
b093550656 fix(credentials): remove special scopes from additional scopes required hook, remove additionalScopes arg from tool definition (#1905) 2025-11-11 15:54:33 -08:00
Waleed
9b702c4793 improvement(popover): added keyboard nav to tag dropdown popover to iterate over parent & child items (#1903)
* improvement(popover): added keyboard nav to tag dropdown popover to iterate over parent & child items

* code cleanup

* ack PR comments
2025-11-11 15:53:34 -08:00
Siddharth Ganesan
77ba4d106f fix(copilot): fix sent message width (#1904) 2025-11-11 15:34:08 -08:00
Waleed
77d897da85 feat(duplicate): added folder duplication, add duplicate to sidebar context menu (#1902) 2025-11-11 14:05:25 -08:00
Vikhyath Mondreti
f00d5516df fix(google-drive-picker): hydration issues with drive picker + dependsOn for trigger subblocks (#1901)
* fix(google-drive-picker): hydration issues with drive picker

* respect depends on gating

* add depends on for outlook polling

* remove useless file

* fix lint
2025-11-11 13:39:15 -08:00
Adam Gough
831ce91577 fix(trace-spans): fixed small styling bugs (#1900)
* fix trace spands timeline styling and hover tooltip

* fixed invalid dom properties
2025-11-11 13:36:06 -08:00
Siddharth Ganesan
1cce486442 feat(notes): add notes (#1898)
* Notes v1

* v2

* Lint

* Consolidate into hook

* Simplify workflow code

* Fix hitl casing

* Don't allow edges in note block and explicitly exclude from executor

* Add hooks

* Consolidate hook

* Consolidate utils checks

* Consolidate dimensions
2025-11-11 13:31:14 -08:00
Waleed
7c398e64dc feat(i18n): update translations (#1899) 2025-11-11 12:59:37 -08:00
Waleed
a6a9962cb3 feat(registry): support multi-workflow delete (#1897)
* feat(registry): support multi-workflow delete

* added intelligent next index selection if deleting active workflow
2025-11-11 12:55:45 -08:00
Waleed
16bd54c05a feat(i18n): update translations (#1896)
* feat(i18n): update translations

* fix build error
2025-11-11 12:53:36 -08:00
Waleed
1130befb17 fix(local): add missing deps, fix access patterns, update dockerfiles, updated turborepo (#1895)
* fix(local): add missing deps, fix access patterns, update dockerfiles

* upgrade turborepo
2025-11-11 12:01:59 -08:00
Waleed
b6139d6f6e improvement(docs): simplify docs and add examples/pictures of v5 (#1887)
* improvement(docs): added new platform ss

* rename approval to human in the loop

* cleanup

* remove yml

* removed other languages large sections

* fix icons
2025-11-11 11:35:29 -08:00
Siddharth Ganesan
c86f2a0537 fix(copilot): fix execute workflow from diff store (#1894)
* Fix run from diff store

* Fix copilot run workflow
2025-11-11 11:09:17 -08:00
Siddharth Ganesan
41f3d506da fix(deployed-chat): prevent multiple simultaneous messages (#1893) 2025-11-11 10:36:14 -08:00
Siddharth Ganesan
fc162ab236 fix(deployed-chat): fix page crash on chat stream completion (#1892) 2025-11-11 09:49:01 -08:00
Siddharth Ganesan
bc25ea28e0 fix(deployed-chat): fix deployed chat page crash (#1891) 2025-11-11 09:08:23 -08:00
Waleed
68aaedebbf fix(dropdown): add dependsOn to dropdown component to dynamically fetch options predicated on another subblock (#1886) 2025-11-10 23:45:15 -08:00
Vikhyath Mondreti
ec70f6fafe improvement(trigger-subflow): reuse helper code (#1885) 2025-11-10 21:49:03 -08:00
Siddharth Ganesan
37fd21e0aa fix(agent): tool credential dropdown (#1884)
* Checkpoint

* Fix dropdown
2025-11-10 21:40:00 -08:00
Vikhyath Mondreti
82731850b2 improvement(display-names): move display name mapping to central store + access pattern via hook (#1881)
* improvmenet(display-names-store): add displaynames store to map ids to human readable names for creds, etc

* fix workflow in workflow

* dot protection for secrets

* hide from preview certain fields

* fix rest of cases

* fix confluence

* fix type errors

* remove redundant workflow dropdown code

* remove comments

* revert preview card

* fix [object Object] bug

* fix lint
2025-11-10 21:34:37 -08:00
Siddharth Ganesan
991b0e31ad fix(triggers): fix triggers in subflows (#1883) 2025-11-10 20:51:07 -08:00
Siddharth Ganesan
cd48cd4de4 fix(start): fix start drag from toolbar (#1882)
* Fix start block

* Fix webhook

* Remove comments
2025-11-10 20:30:45 -08:00
Waleed
4b37f92f3a improvement(ci): migrate to blacksmith runners (#1879) 2025-11-10 18:53:21 -08:00
Waleed
698717d044 feat(i18n): update translations (#1876) 2025-11-10 18:47:43 -08:00
Emir Karabeg
170eb36ebf feat(subflows): editor, block; fix(copilot): stop, mr (#1877) 2025-11-10 18:38:14 -08:00
Siddharth Ganesan
118c477d97 fix(copilot): fix triggers unsave on edit (#1874)
* Fix copilot trigger unsave

* Fix flushing

* Lint

* Fix test

* Fix some tests

* Fix lint
2025-11-10 18:24:33 -08:00
Adam Gough
2f9224c166 feat(crms): added hubspot, asana, trello, salesforce, pipedrive tools and triggers (#1871)
* trello integration added

* added asana integration

* added pipedrive (need to finish testing)

* finished pipedrive

* finished hubspot, need to test more

* make oauth required modal scrollable

* edited layout and fixed merge conflicts

* salesforce working, need to add more operations

* added all salesforce tools

* hubspot triggers working, plus other fixes

* fixed payload and added hubspot triggers

* fixed test

* build fix

* rebase

* updated docs

* oauth required modal

* fixed icons

* fixed hubspot scopes parsing

* reduce scopes of salesforce oauth

* cleaned up scopes

* lint

* aligned oauth.ts, auth.ts, and block definitions for all 29 providers

* updated icons

* fixed logos and updated docs

* revert changes to unused file

---------

Co-authored-by: Adam Gough <adamgough@Adams-MacBook-Pro.local>
Co-authored-by: waleed <waleed>
Co-authored-by: aadamgough <adam@sim.ai>
2025-11-10 17:46:42 -08:00
Waleed
0ed0a26b3b feat(workflow-block): added redeploy action to workflow header for workflow block (#1875) 2025-11-10 15:59:33 -08:00
Adam Gough
0d4d953169 fixed payload error (#1873) 2025-11-10 12:19:45 -08:00
Waleed
81a12e721e improvement(performance): added revalidation caches on ollama and openrouter models (#1872)
* improvement(performance): added revalidation caches on ollama and openrouter models

* ack PR comments
2025-11-10 12:19:22 -08:00
Waleed
b03f9702d2 feat(permissions): extend hook to detect missing scopes to return those scopes for upgrade, update credential selector subblock (#1869) 2025-11-10 11:40:15 -08:00
Vikhyath Mondreti
997c4639ed fix build 2025-11-10 10:00:51 -08:00
Emir Karabeg
1e8b4769aa feat: toolbar, terminal, tool-input, emcn updates, chat, deploy (#1864)
* feat: toolbar resizing and searching; refactor: copilot folders

* feat(terminal): clear, timestamp, run ID, input, height

* feat: tool inpul, emcn search

* feat: sidebar context menu, delete workflow hook

* feat: chat; improvement: input and dropdown/combobox padding

* feat(panel): deploy logic

* improvement(chat): streaming output
2025-11-10 03:08:13 -08:00
Waleed
28b416078c improvement(subblocks): fixed trigger save, schedule save, time inp, text subblocks and schedule/workflow badges, can now deploy from the badge itself (#1868) 2025-11-10 01:31:37 -08:00
Waleed
d0720b85bc feat(i18n): update translations (#1865) 2025-11-08 20:55:59 -08:00
Vikhyath Mondreti
75ce8882c8 improvement(execution): trigger manual execution using mock payloads (#1863)
* fix(err-message): manual run message

* make external triggers start workflow manually too

* improvement(execution): trigger manual execution using mock payloads

* remove redundant code and update generate mock value func

* cleanup code, add to docs

* fix multi trigger injection

* address greptile comments
2025-11-08 20:34:53 -08:00
Siddharth Ganesan
142d3aadb8 feat(helm): add copilot (#1833)
* Add helm for copilot

* Remove otel and log level

* Change repo name

* improvement(helm): enhance copilot chart with HA support and validation

* refactor(helm): consolidate copilot secrets and fix postgres volume mount
2025-11-08 17:36:48 -08:00
Waleed
7c6e6d1603 improvement(code): add wand config and system prompt for python code generation, strip \n from stdout in JS/Python (#1862) 2025-11-08 16:44:16 -08:00
Waleed
e186ea630a improvement(ux): optimistic updates for envvars, custom tools, folder operations, workflow deletions. shared hook for connection tags & tag dropdown, fix for triggers not re-rendering on trigger selected (#1861) 2025-11-08 15:45:29 -08:00
Waleed
b3490e9127 fix(build): remove mdx from transpilation (#1860) 2025-11-08 14:33:26 -08:00
Emir Karabeg
eed2072723 feat/platform-v3 (#1698)
* feat(fonts): season replacing geist

* feat(emcnn): created emcn

* feat(sidebar): created new sidebar with header and workflow list

* improvement(sidebar): expanded workflow/folder item text sizing and adjusted button padding

* feat(sidebar): added search UI, updated workflows styling

* improvement: globals styling with antialiased in dark mode only

* feat(sidebar): blocks and triggers ui/ux updated

* refactor(sidebar): moved logic into hooks

* feat(sidebar): improved workflow/folder dragging UI/UX; refactored logic into hooks

* improvement(sidebar): adjusted triggers/blocks padding for header

* improvement(sidebar): dragging hover handler; closed folders by default minus active path

* improvement(sidebar): panel resize logic

* improvement(sidebar): blocks and triggers expanded indicator

* feat(tooltips): new emcn component emerged

* feat(sidebar): workflow list handling updated

* refactor: added cursorrules

* feat(panel): new panel layout

* improvement(workspaces): firname's workspace instead of fn ln's workspace

* feat(platform): panel header, new emcn icons, more button variants, refactor sidebar components

* improvement(emcn): added button variants

* feat(panel): tab system

* feat(copilot): refactor, adjusted welcome and user-input UI/UX

* feat(copilot): baseline user-input ui/ux improvement

* feat(emcn): badge outline variant

* fix: build errors

* feat(copilot): base UI copilot

* refactor(workflow-block): added hooks, components

* feat(design): created design panel and removed isWide

* refactor(subblock): edited components, styling

* feat: emcn, editor

* feat(panel): toolbar, editor

* feat(workflow-block): refactor, adjust base styling

* feat(workflow-block): new block, edge

* feat: workflow-block, connections, action-bar, copilot

* feat: panel, workflow, emcn, workflow block, subblocks; clean copilot

* sim-326: remove remote code execution toggle, hide dropdown for language if E2B is not enabled

* feat: sidebar navigation, tag coloring; refactor: rebased to staging

* fix: build errors

* improvement: subblock styles

* feat: workspaces, terminal, emcn, controls

* feat: delete workflow

* fix: rebased

* fix build errors

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-11-08 10:58:31 -08:00
Waleed
945405c461 feat(blogs): added blogs scaffolding (#1857) 2025-11-08 00:04:20 -08:00
Vikhyath Mondreti
c397f5acee fix(triggers): update filtering logic for edges (#1856) 2025-11-07 19:59:51 -08:00
Siddharth Ganesan
3f435ce55e fix(hitl): rename uiurl to url (#1855) 2025-11-07 19:51:27 -08:00
Vikhyath Mondreti
7a8d47a72e fix(schedules): locking schedules to prevent double runs (#1854)
* fix(schedules): locking schedules to prevent double runs

* add migration file

* fix
2025-11-07 19:45:25 -08:00
Waleed
e91a8af7cd fix(files): fix json uploads, disable storage metering when billing is disabled, exclude kb uploads from storage metering, simplify serve path route (#1850)
* fix(files): fix local kb files storage to have parity with cloud storage providers

* fix(files): fix json uploads, disable storage metering when billing is disabled, exclude kb uploads from storage metering, simplify serve path route

* cleanup
2025-11-07 18:41:44 -08:00
Siddharth Ganesan
d17c627064 fix(deployed-chat): fix duplication and file uploads (#1853) 2025-11-07 18:41:03 -08:00
Vikhyath Mondreti
c8ea08e130 fix(file-upload): workspace/chat context not being passed in some forms (#1852) 2025-11-07 18:23:13 -08:00
Siddharth Ganesan
f62568efc7 fix(variables, webhook): fix variable tag dropdown for escaped < and allow empty webhook payload (#1851)
* Fix << tags

* Allow empty webhook body

* Variable highlighting in loop conditions
2025-11-07 18:03:36 -08:00
Vikhyath Mondreti
a73e2aaa8b improvement(templates): make it top-level route and change management/editing process (#1834)
* fix(billing): should allow restoring subscription (#1728)

* fix(already-cancelled-sub): UI should allow restoring subscription

* restore functionality fixed

* fix

* make templates root level url and make it part of deployment system

* separate updating template and deployment versions

* add tags

* add credentials extraction logic + use should import with workflow variables

* fix credential extraction

* add trigger mode indicator

* add starred tracking

* last updated field

* progress on creator profiles

* revert creator profile context type

* progress fix image uploads

* render templates details with creator details

* fix collab rules for workflow edit button

* creator profile perm check improvements

* restore accidental changes

* fix accessibility issues for non logged in users

* remove unused code

* fix type errors

---------

Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>
2025-11-07 17:57:53 -08:00
Siddharth Ganesan
6cdee5351c feat(scopes): add scopes warning hook (#1842)
* fix(billing): should allow restoring subscription (#1728)

* fix(already-cancelled-sub): UI should allow restoring subscription

* restore functionality fixed

* fix

* Server side logic to check auth scopes

* Fix scopes code

* Remove frontend changes

* Fix tests

* Lint

* Remove log for lint

* Fix scopes check

* Fix conflict

---------

Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
2025-11-07 16:31:25 -08:00
Waleed
d3e81e97d5 fix(deploy-modal): remove deleted blocks from example curl (#1849) 2025-11-07 15:27:04 -08:00
Waleed
bb7016a99f improvement(routes): type all untyped routes (#1848)
* improvement(routes): type all untyped routes

* fix routes, remove unused workspace members route

* fix obfuscation of errors behind zod errors

* remove extraneous comments
2025-11-07 15:24:30 -08:00
Waleed
c4278266ef feat(i18n): update translations (#1844)
* feat(i18n): update translations

* fix(streaming-api): fix streaming api (#1846)

* fix(billing): should allow restoring subscription (#1728)

* fix(already-cancelled-sub): UI should allow restoring subscription

* restore functionality fixed

* fix

* Fix streaming api

* Fix uuid stuff

* Lint

* Stripe docs fix

* Fix docs build error

* Fix uuid check

* Fix deployed chat streaming for non agent blocks

* Fix lint
2025-11-07 15:06:25 -08:00
Siddharth Ganesan
b6c2c7456e fix(variables): fix variable resolution error and start block outputs (#1847)
* Fix var resolution if block is not upstream

* Filter convo id from start block outputs if not set

* Lint

* Start block outputs
2025-11-07 15:03:43 -08:00
Siddharth Ganesan
9fd2156e9e fix(streaming-api): fix streaming api (#1846)
* fix(billing): should allow restoring subscription (#1728)

* fix(already-cancelled-sub): UI should allow restoring subscription

* restore functionality fixed

* fix

* Fix streaming api

* Fix uuid stuff

* Lint

* Stripe docs fix

* Fix docs build error

* Fix uuid check

* Fix deployed chat streaming for non agent blocks

* Fix lint

---------

Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
2025-11-07 14:38:15 -08:00
Waleed
c9a8c7e392 feat(tools): added 200+ new tools across confluence, discord, exa, firecrawl, jina, jira, linear, linkup, MS suite, parallel, reddit, supabase, & tavily (#1824)
* feat(tools): added 150+ new tools across confluence, discord, exa, firecrawl, jina, jira, linear, linkup, MS suite, parallel, reddit, supabase, & tavily

* feat(tools): added 150+ new tools across confluence, discord, exa, firecrawl, jina, jira, linear, linkup, MS suite, parallel, reddit, supabase, & tavily

* replace console.log and console.error with loggers instead

* cleanup

* update message change

* removed layout from all blocks with new operations

* cleanup

* fixed create row

* fixed full text search

* fixed firecrawl, fixed supabase download

* fix subblock name

* teams update

* finish supabase

* tested & updated parallel AI

* removed dates from Exa, fixed research

* fix jina

* more jina updates

* fixed tavily + tool-inp for empty dropdown items

* updated microsoft tools

* edited reddit

* added html/text options for gmail outlook resend tools, added linear and jira triggers

* reddit tool fix

* another reddit fix

* remove unused github utils, fix linear triggers

* added onedrive delete, fixed jira tools

* fixed confluence

* fix some linear operations, fixed jira triggers

* fix some linear tools

* fix build

* fix jira payloads

* fixe jira payload

* fix conflicts

* added sample payload

* fix stripe icon

* run lint
2025-11-07 13:03:57 -08:00
Waleed
eb459d0ab9 feat(i18n): update translations (#1843) 2025-11-07 13:03:05 -08:00
Siddharth Ganesan
a31dc733cf fix(copilot): fix image auth (#1841)
* Fix copilot image auth

* Lint

* Remove extra loggign

* Update apps/sim/app/api/copilot/chat/route.ts

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-11-07 11:40:13 -08:00
Waleed
c3436e998f feat(tools): added 50+ stripe tools and trigger and docs (#1816)
* feat(tools): added 150+ new tools across confluence, discord, exa, firecrawl, jina, jira, linear, linkup, MS suite, parallel, reddit, supabase, & tavily

* feat(tools): added 40+ stripe tools and trigger

* added stripe tools to registry

* added number validation, tested all stripe tools

* update stripe payload, tested webhooks
2025-11-07 10:59:19 -08:00
Siddharth Ganesan
742d59f54d feat(hitl): add human in the loop block (#1832)
* fix(billing): should allow restoring subscription (#1728)

* fix(already-cancelled-sub): UI should allow restoring subscription

* restore functionality fixed

* fix

* Add pause resume block

* Add db schema

* Initial test passes

* Tests pass

* Execution pauses

* Snapshot serializer

* Ui checkpoint

* Works 1

* Pause resume simple v1

* Hitl block works in parallel branches without timing overlap

* Pending status to logs

* Pause resume ui link

* Big context consolidation

* HITL works in loops

* Fix parallels

* Reference blocks properly

* Fix tag dropdown and start block resolution

* Filter console logs for hitl block

* Fix notifs

* Fix logs page

* Fix logs page again

* Fix

* Checkpoint

* Cleanup v1

* Refactor v2

* Refactor v3

* Refactor v4

* Refactor v5

* Resume page

* Fix variables in loops

* Fix var res bugs

* Ui changes

* Approval block

* Hitl works e2e v1

* Fix tets

* Row level lock

---------

Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
2025-11-06 15:59:28 -08:00
Waleed
f9ce65eddf feat(i18n): update translations (#1831) 2025-11-06 12:23:34 -08:00
Waleed
8c9ed34d99 feat(tools): added 48 new github tools, 12 triggers (#1821)
* feat(tools): added 10 new github triggers

* feat(tools): added 48 new github tools, 12 triggers

* fix(logging): make logging safe start an upsert to prevent insertions of duplicate execution id records, remove layout from github block
2025-11-06 11:11:45 -08:00
Waleed
541bdd3772 feat(i18n): update translations (#1820) 2025-11-05 18:22:50 -08:00
Waleed
60d53ba14a feat(tools): added typeform form submission trigger, added 4 new tools to complete CRUD typeform tools (#1818)
* feat(tools): added typeform form submission trigger, added 4 new tools to complete CRUD typeform tools

* resolve envvars in trigger configuration upon save, tested typeform

* updated docs

* ack PR comments
2025-11-05 17:47:43 -08:00
Vikhyath Mondreti
5c611c6d65 improvement(block-outputs): fix chat fields being hidden even if in inputFormat, cleanup code (#1819)
* improvement(block-outputs): fix chat fields being hidden even if in inputFormat, cleanup code"

* fix type error
2025-11-05 16:05:39 -08:00
Waleed
2b78b5ea73 feat(i18n): update translations (#1817) 2025-11-05 15:26:19 -08:00
Waleed
cf023e4d22 feat(tools): added download file tool for onedrive, google drive, and slack; added move email tool for gmail and outlook (#1785)
* feat(tools): added download file tool for onedrive, google drive, and slack

* added gmail & outlook move tools, added missing credentials descriptions to modal

* added slack delete/update message, add reaction; added gmail read/unread/label/unarchive; added outlook copy/delete/read/unread

* added threads to slack operations

* added timestamp for slack webhook trigger since api uses timestamp for updating/reacting/deleting

* cleanup

* added file info to slack read messages

* updated slack desc

* fixed downloading for onedrive, slack, and drive

* fix type check

* fix build failure

* cleanup files, fix triggers with attachments, fix integration blocks with include attachment to parse to user files, remove unused code

* fix move files tools

* fix tests

* fix build errors

* fix type error

* fix tests

* remove redundant code and filter out unecessary user file fields

* fix lint error

* remove fields from tag dropdown

* fix file upload via API

* fix pdf parse issue

---------

Co-authored-by: waleed <waleed>
Co-authored-by: Adam Gough <adamgough@Adams-MacBook-Pro.local>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-11-05 13:00:34 -08:00
Waleed
21774de275 feat(i18n): update translations (#1815)
* feat(i18n): update translations

* fix translations
2025-11-05 11:40:56 -08:00
Waleed
2056e8ae5f feat(tools): added additional youtube search params, get channel playlists videos and related videos tools (#1814) 2025-11-05 11:26:45 -08:00
Waleed
11fd1544bb feat(i18n): update translations (#1813) 2025-11-05 11:22:42 -08:00
Waleed
0260dbc3f2 feat(tools): added perplexity search endpoint, updated models list for perplexity block (#1812) 2025-11-05 11:15:15 -08:00
Waleed
68056b72c2 feat(i18n): update translations (#1811) 2025-11-05 05:29:23 -08:00
Adam Gough
fa323e2e51 feat(twilio-voice): added twilio voice webhook + tool (#1776)
* first twilio voice push, no testing

* simplified operations, calling and get recording works

* cleaned up operations

* twilio webhook works

* added docs

* updated logic

* minor change

* reverted change

* files fixed for bun run lint

* fix instructions

* removed unused files

* added slack validation and twilio

* changed twiml instruction

* fixed build

* cleanup

* remove extraneous comments

* fixed missing mcosk

* split out client-side utils

* update docs

* fix tests

* had to add some reverts

* custom tool that was fialing bulid

* reveted changes
2025-11-04 23:56:06 -08:00
Adam Gough
b0fa3e8a26 improvement(reply-gmail): added reply to gmail (#1809)
* added reply to thread/message

* cleanup, extract header helper for threaded replies

* more helpers
2025-11-04 20:23:10 -08:00
Waleed
f65d62ea3d improvement(async): improve error capturing for asynchronous workflow executions (#1808)
* improvement(async): improve error capturing for asynchronous workflow executions

* surface more erros

* added more logs

* fix failing tests

* ack DB comments
2025-11-04 18:16:00 -08:00
Waleed
670e63c108 fix(schedules): restore enabling/disabling of schedules, fix premature cron validation (#1807) 2025-11-04 14:05:29 -08:00
Waleed
e62a635757 feat(i18n): update translations (#1806) 2025-11-04 13:39:10 -08:00
Waleed
a29f9fd55f feat(schedules): move schedule configuration out of modals into subblocks (#1805)
* feat(schedules): move schedule configuration out of modals into subblocks

* added more timezones

* added simple in-memory rate limiting to update schedule, validation on numeric values for date and time, fix update schedule behavior

* fix failing tests, ack PR comments

* surface better errors
2025-11-04 13:36:50 -08:00
Waleed
e9ff94f06f chore(deps): upgrade turbopack (#1803) 2025-11-03 22:48:22 -08:00
Waleed
56f645890a fix(i18n): fix translation pipeline (#1804) 2025-11-03 22:47:55 -08:00
Waleed
1ce834f2fe feat(i18n): update translations (#1794)
* feat(i18n): update translations

* remove all outdated triggers, cleanup yml too
2025-11-03 22:30:50 -08:00
Vikhyath Mondreti
0363f8a33d fix(external-triggers): not passing payload through + incorrect server-side resolver logic (#1801)
* fix integration triggers

* ignore text readonly subblocks

* fix

* fix to ignore readOnly vals

* fix var references

* simplify

* cleanup code
2025-11-03 19:54:42 -08:00
Vikhyath Mondreti
d1fcade5ab fix(conn-status): remove unused connection status inside user avatar stack (#1800) 2025-11-03 15:12:56 -08:00
Waleed
3af7d136c6 feat(mcp): surface better errors for MCP connection failures (#1796) 2025-11-03 14:28:25 -08:00
Vikhyath Mondreti
2eea3caccd feat(import-export): improvements to export workspace, maintain file structure, include workflow variables (#1799)
* feat(import-export): improvements to export workspace, maintain file structure

* fix type'

* import/export variables

* fix var ref id bug
2025-11-03 12:13:57 -08:00
Siddharth Ganesan
fb445b166d fix(legacy-start): fix legacy start block execution in new executor 2025-11-03 10:37:59 -08:00
Siddharth Ganesan
3bf00cbd2a improvement(executor): redesign executor + add start block (#1790)
* fix(billing): should allow restoring subscription (#1728)

* fix(already-cancelled-sub): UI should allow restoring subscription

* restore functionality fixed

* fix

* improvement(start): revert to start block

* make it work with start block

* fix start block persistence

* cleanup triggers

* debounce status checks

* update docs

* improvement(start): revert to start block

* make it work with start block

* fix start block persistence

* cleanup triggers

* debounce status checks

* update docs

* SSE v0.1

* v0.2

* v0.3

* v0.4

* v0.5

* v0.6

* broken checkpoint

* Executor progress - everything preliminarily tested except while loops and triggers

* Executor fixes

* Fix var typing

* Implement while loop execution

* Loop and parallel result agg

* Refactor v1 - loops work

* Fix var resolution in for each loop

* Fix while loop condition and variable resolution

* Fix loop iteration counts

* Fix loop badges

* Clean logs

* Fix variable references from start block

* Fix condition block

* Fix conditional convergence

* Dont execute orphaned nodse

* Code cleanup 1 and error surfacing

* compile time try catch

* Some fixes

* Fix error throwing

* Sentinels v1

* Fix multiple start and end nodes in loop

* Edge restoration

* Fix reachable nodes execution

* Parallel subflows

* Fix loop/parallel sentinel convergence

* Loops and parallels orchestrator

* Split executor

* Variable resolution split

* Dag phase

* Refactor

* Refactor

* Refactor 3

* Lint + refactor

* Lint + cleanup + refactor

* Readability

* Initial logs

* Fix trace spans

* Console pills for iters

* Add input/output pills

* Checkpoint

* remove unused code

* THIS IS THE COMMIT THAT CAN BREAK A LOT OF THINGS

* ANOTHER BIG REFACTOR

* Lint + fix tests

* Fix webhook

* Remove comment

* Merge stash

* Fix triggers?

* Stuff

* Fix error port

* Lint

* Consolidate state

* Clean up some var resolution

* Remove some var resolution logs

* Fix chat

* Fix chat triggers

* Fix chat trigger fully

* Snapshot refactor

* Fix mcp and custom tools

* Lint

* Fix parallel default count and trace span overlay

* Agent purple

* Fix test

* Fix test

---------

Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-11-02 12:21:16 -08:00
Waleed
7d67ae397d fix(evaluator): fix evaluator to handle temperature gracefully like router (#1792)
* fix(evaluator): fix evaluator to handle temperature gracefully like router

* apps/sim

* fix eval-input subblock
2025-11-01 18:52:18 -07:00
Waleed
f9980868a4 improvement(variables): add error context for duplicate variable names, only check for collision when focus is lost (#1791)
* improvement(variables): add error context for duplicate variable names, only check for collision when focus is lost

* disallow empty variable names, performance optimizations

* safety guard against empty variables names
2025-11-01 18:19:34 -07:00
Waleed
e4d21568e3 feat(i18n): update translations (#1788) 2025-11-01 14:44:51 -07:00
Waleed
5479461617 feat(docs): added page nav buttons, static search, TOC footer (#1787)
* feat(docs): added page nav buttons, static search, TOC footer

* back to dynamic search since indexes are too large, added caching hour over hour
2025-11-01 14:38:28 -07:00
Vikhyath Mondreti
86b3570252 fix(trigger-dup): on duplicate trigger should not point at old webhook row (#1784) 2025-10-31 19:39:17 -07:00
Vikhyath Mondreti
44271cd101 fix(triggers-persistence): triggers persistence, deletion, updating configs + state management simplifcation (#1783)
* fix(triggers): configuration persistences issues

* required fields validation staleness issue
2025-10-31 18:06:31 -07:00
Vikhyath Mondreti
f6a5c5c829 improvement(cleanup): remove useWorkflowDiff hook (#1781) 2025-10-31 12:04:25 -07:00
Waleed
e64129c1ad feat(triggers): modify triggers to use existing subblock system, webhook order of operations improvements (#1774)
* feat(triggers): make triggers use existing subblock system, need to still fix webhook URL on multiselect and add script in text subblock for google form

* minimize added subblocks, cleanup code, make triggers first-class subblock users

* remove multi select dropdown and add props to existing dropdown instead

* cleanup dropdown

* add socket op to delete external webhook connections on block delete

* establish external webhook before creating webhook DB record, surface better errors for ones that require external connections

* fix copy button in short-input

* revert environment.ts, cleanup

* add triggers registry, update copilot tool to reflect new trigger setup

* update trigger-save subblock

* clean

* cleanup

* remove unused subblock store op, update search modal to reflect list of triggers

* add init from workflow to subblock store to populate new subblock format from old triggers

* fix mapping of old names to new ones

* added debug logging

* remove all extraneous debug logging and added mapping for triggerConfig field names that were changed

* fix trigger config for triggers w/ multiple triggers

* edge cases for effectiveTriggerId

* cleaned up

* fix dropdown multiselect

* fix multiselect

* updated short-input copy button

* duplicate blocks in trigger mode

* ack PR comments
2025-10-31 11:38:59 -07:00
Waleed
70ff5394a4 improvement(mcp): ditch custom mcp client in favor of mcp sdk (#1780) 2025-10-31 11:21:00 -07:00
Waleed
6cd82f07ed fix(presence): remove presence for a solo user (#1779) 2025-10-30 22:47:37 -07:00
Vikhyath Mondreti
4a3c6d17e3 fix(client-directive): fix build error (#1778) 2025-10-30 20:29:12 -07:00
Vikhyath Mondreti
0b16fa4dd0 fix(triggers): incoming edges should be filtered from execution and UI graph (#1777) 2025-10-30 20:20:32 -07:00
Vikhyath Mondreti
eac358bc7c feat(live-cursor): live cursor during collaboration (#1775)
* feat(live-cursor): collaborative cursor

* fix user avatar url rendering

* simplify presence

* fix env ts

* fix lint

* fix type mismatch
2025-10-30 19:47:11 -07:00
Vikhyath Mondreti
a072e6d1d8 improvement(custom-tools): make them workspace scoped + ux to manage them (#1772)
* improvement(custom-tools): make them workspace scoped

* fix auth check

* remove comments

* add dup check

* fix dup error message display

* fix tests

* fix on app loading of custom tools
2025-10-30 17:40:38 -07:00
Vikhyath Mondreti
3b901b33d1 fix(webhook-notif): modal positioning (#1771) 2025-10-30 16:58:17 -07:00
Vikhyath Mondreti
fe9ebbf81b improvement(api-keys): move to workspace level (#1765)
* fix(billing): should allow restoring subscription (#1728)

* fix(already-cancelled-sub): UI should allow restoring subscription

* restore functionality fixed

* fix

* improvement(api-keys): move to workspace level

* remove migration to prep merge

* remove two more unused cols

* prep staging  merge

* add migration back

---------

Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>
2025-10-30 11:42:58 -07:00
Waleed
c99bb0aaa2 feat(cost): added hidden cost breakdown component to settings > subscription, start collecting current period copilot cost and last period copilot cost (#1770)
* feat(cost): added hidden cost breakdown component to settings > subscription, start collecting current period copilot cost and last period copilot cost

* don't rerender envvars when switching between workflows in the same workspace
2025-10-30 11:09:47 -07:00
Waleed
61725c2d15 feat(envvars): use cache for envvar dropdown key names, prevent autofill & suggestions in the settings (#1769)
* feat(envvars): use cache for envvar dropdown key names, prevent autofill & suggestions in the settings

* add the same prevention for autocomplete and suggestions to sso and webhook
2025-10-30 00:23:35 -07:00
Waleed
8b0079b834 feat(i18n): update translations (#1768) 2025-10-30 00:03:16 -07:00
Vikhyath Mondreti
fdefb14e6b improvement(ms-teams): resolve mentions accurately (#1762)
* improvement(ms-teams): resolve mentions accurately

* fix for bots

* add utils file

* add logs

* fix perms issue

* fix scopes

* fetch works for bots

* Revert "fetch works for bots"

This reverts commit 0ac702a8f3.

* update docs
2025-10-29 23:49:05 -07:00
Waleed
47913f87de fix(kb): fix mistral parse and kb uploads, include userId in internal auth (#1767)
* fix(kb): fix mistral parse and kb uploads, include userId in internal auth

* update updated_at for kb when adding a new doc via knowledge block

* update tests
2025-10-29 23:18:39 -07:00
Waleed
48f520b3c7 feat(files): added file manager table, enforce permissions for viewing files (#1766)
* feat(files): added file manager table, enforce permissions for viewing files

* rename types

* cleanup

* cleanup

* confirm local file system works with all contexts

* clean

* remove isAsync

* ignore expiresAt

* add relative imports instead of absolute ones

* absl imports

* remove redundant comments
2025-10-29 22:03:27 -07:00
Vikhyath Mondreti
da30c25efa improvement(chat): increase max files to 15 and resolve workflow variables in webhook execution (#1764)
* improvement(chat): increase max files to 15 and resolve workflow variables in webhook execution

* fix workflow vars

* fix for schedules
2025-10-29 15:34:59 -07:00
Siddharth Ganesan
b95ea9148f fix(copilot): consolidate usage limit validation (#1763)
* Use helper for api key validation

* Lint
2025-10-29 13:14:28 -07:00
Waleed
fcf947df22 fix(variables): added the same input vars mapping from workflow block, added type validation to variables block, updated UI (#1761)
* fix(variables): added the same input vars mapping from workflow block, added type validation to variables block, updated UI

* cleanup

* lint
2025-10-29 01:22:10 -07:00
Waleed
7be9941bc9 feat(chat): support local file downloads/uploads for chat for parity with kb (#1751)
* feat(chat): support local file downloads/uploads for chat for parity with kb

* cleanup imports

* feat(files): add storage service and consolidate file utils

* fix failing tests

* cleanup

* cleaned up

* clean

* add context for file uplaods/fetches

* fixed blob

* rm comments

* fix failing test

* fix profile pics

* add workspace dedupe for duplicated files

* update chat to accept only accepted types

* add loading anim to profilepic update

* optimistically update keys, copilot keys, and file uploads to prevent flash

* add defensive check for deleting files
2025-10-28 20:09:51 -07:00
Siddharth Ganesan
807014a5d2 fix(wait, vars, while): var set (#1759)
* Fix env is hosted

* Lint
2025-10-28 17:19:11 -07:00
Waleed
aef1f18c1e feat(i18n): update translations (#1756) 2025-10-28 12:43:33 -07:00
Adam Gough
368576b082 feat(create-excel): onedrive create excel (#1745)
* added onedrive upload excel

* added

* updated docs

* lint

* cleaned

* use lib

---------

Co-authored-by: Adam Gough <adamgough@Adams-MacBook-Pro.local>
2025-10-28 12:26:17 -07:00
Siddharth Ganesan
aace3066aa feat(while, vars, wait): add while subflow, variables block, wait block (#1754)
* Add variables block

* Add wait block

* While loop v1

* While loop v1

* Do while loops

* Copilot user input rerender fix

* Fix while and dowhile

* Vars block dropdown

* While loop docs

* Remove vars block coloring

* Fix lint

* Link docs to wait

* Fix build fail
2025-10-28 11:59:47 -07:00
Waleed
ef5b6999ab fix(migrations): add missing migration for processing columns in documents table (#1749) 2025-10-27 23:23:42 -07:00
Waleed
9df886d1e9 feat(kb): added sort ordering to knowledgebase page, styling update (#1748)
* remove extraneous text from careers app

* feat(kb): added sort order to kb

* updated styles of workspace selector and delete button to match theme of rest of knowledgebase
2025-10-27 21:39:48 -07:00
Waleed
9991796661 fix(docs): added new workflow block image, fixed operator issue on null properties (#1747)
* fix(docs): added new workflow block image, fixed operator issue on null properties

* reverted layout change

* fix navbar color in light mode
2025-10-27 20:56:52 -07:00
Waleed
095a15d7b5 feat(careers): added a careers page (#1746)
* feat(careers): added a careers page

* cleanup

* revert hardcoded environment
2025-10-27 20:25:44 -07:00
Waleed
8620ab255a improvement(docs): added a copy page button to the docs pages (#1743)
* improvement(docs): added a copy page button to the docs pages

* added copy page button & fixed TOC alignment
2025-10-27 15:05:27 -07:00
Waleed
47ddfb639e fix(dropdown): auto-add character to trigger tag dropdown on connection tag drop in agent tools (#1742) 2025-10-27 14:28:29 -07:00
Waleed
5d48c2780c improvement(ui): enhance ring outline for code subblock and mcp tool subblocks in agent (#1741) 2025-10-27 13:59:19 -07:00
Waleed
38614fad79 fix(mcp): resolve variables & block references in mcp subblocks (#1735)
* fix(mcp): resolve variables & block references in mcp subblocks

* cleanup

* ack PR comment

* added variables access to mcp tools when added in agent block

* fix sequential migrations issues
2025-10-27 13:13:11 -07:00
Waleed
6f32aea96b feat(kb): added support for local file storage for knowledgebase (#1738)
* feat(kb): added support for local file storage for knowledgebase

* updated tests

* ack PR comments

* added back env example
2025-10-27 11:28:45 -07:00
Waleed
98e98496e8 Revert "improvement(consts): removed redundant default consts in favor of env…" (#1739)
This reverts commit 659b46fa2f.
2025-10-26 23:06:14 -07:00
Waleed
659b46fa2f improvement(consts): removed redundant default consts in favor of envvar defaults for storage & usage limits (#1737)
* improvement(consts): removed redundant default consts in favor of envvar defaults for storage & usage limits

* remove unnecessary tests
2025-10-26 21:43:00 -07:00
Waleed
fb3d6d4c88 feat(files): added usage indicator for file storage to settings (#1736)
* feat(files): added usage indicator for file storage to settings

* cleanup
2025-10-26 21:36:25 -07:00
Waleed
ec2cc82b72 feat(i18n): update translations (#1734) 2025-10-26 18:35:20 -07:00
Adam Gough
274d5e3afc fix(clay): fixed clay tool (#1725)
* fixed clay tool

* added metadata

* added metadata to types

* fix(clay): remove (optional) from subblock name

* regen docs
2025-10-26 18:30:08 -07:00
Waleed
c552bb9c5f fix(elevenlabs): added internal auth helper for proxy routes (#1732)
* fix(elevenlabs): added internal auth helper for proxy routes

* remove concurrent tests

* build fix
2025-10-25 17:54:27 -07:00
Vikhyath Mondreti
ad7b791242 improvement(deployments): simplify deployments for chat and indicate active version (#1730)
* improvement(deployment-ux): deployment should indicate and make details configurable when activating previous version

* fix activation UI

* remove redundant code

* revert pulsing dot

* fix redeploy bug

* bill workspace owner for deployed chat

* deployed chat

* fix bugs

* fix tests, address greptile

* fix

* ui bug to load api key

* fix qdrant fetch tool
2025-10-25 16:55:34 -07:00
Waleed
ce4893a53c feat(sso-chat-deployment): added sso auth option for chat deployment (#1729)
* feat(sso-chat-deployment): added sso auth option for chat deployment

* ack PR comments
2025-10-25 14:58:25 -07:00
Adam Gough
517f1a91b6 fix(google-scopes): added forms and different drive scope (#1532)
* added google forms scope and google drive scope

* added back file scope

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
Co-authored-by: Adam Gough <adamgough@Mac-530.lan>
2025-10-25 12:08:49 -07:00
Waleed
dba7514350 improvement(schedule): fix UI bug with schedule modal (#1722) 2025-10-23 14:16:59 -07:00
Waleed
e94de1dd26 feat(i18n): update translations (#1721) 2025-10-23 13:15:05 -07:00
Waleed
a4e874b266 feat(tools): added webflow OAuth + tools (#1720)
* feat(tools): added webflow OAuth + tools

* remove itemId from delete item

* remove siteId

* added webhook triggers + oauth scopes + site/collection selector

* update sample payload for webflow triggers

* cleanup

* fix discord color
2025-10-23 13:08:32 -07:00
Waleed
ec034f3fc7 fix(dashboard): add additional context for paginated logs in dashboard, add empty state when selected cell has no data (#1719)
* fix(dashboard): add additional context for paginated logs in dashboard, add empty state when selected cell has no data

* apps/sim

* renaming

* remove relative import
2025-10-22 14:07:52 -07:00
Waleed
e425d064c0 improvement(condition): added variable and envvar highlighting for condition input (#1718) 2025-10-22 13:12:09 -07:00
Waleed
bcd1a2faf6 feat(i18n): update translations (#1709) 2025-10-22 12:55:36 -07:00
Vikhyath Mondreti
989a77261c fix(debug-mode): remove duplicate debug mode flag (#1714) 2025-10-22 00:49:18 -10:00
Vikhyath Mondreti
5ab482127d fix(remove-exec-context): tools handle workflow id check themselves 2025-10-21 16:34:08 -10:00
Vikhyath Mondreti
b8bc632baa fix(workflow-auth): adding workflowId param to only internal urls (#1710) 2025-10-21 16:30:22 -10:00
Waleed
4d7ebd8bcb feat(supabase): added vector search tool and updated docs (#1707)
* feat(supabase): added vector search tool and updated docs

* exclude generic webhook from docs gen

* change items to pages in meta.json for tools directory in the docs
2025-10-21 18:48:18 -07:00
Vikhyath Mondreti
ca1156a6c2 fix(base-url): use getBaseUrl helper in copilot revert state endpoint (#1706)
* revert base url

* fix tests"
;
2025-10-21 15:44:05 -10:00
Vikhyath Mondreti
89eb1849d0 fix(external-route): handleInternalRequest should still check if request internal 2025-10-21 15:00:33 -10:00
Vikhyath Mondreti
1d4833f485 fix case sensitive header (#1705) 2025-10-21 14:51:13 -10:00
Waleed
d5902e91da fix(kb): added internal auth for mistral OCR tool via KB (#1704) 2025-10-21 16:56:53 -07:00
Vikhyath Mondreti
e6ba323de4 Merge pull request #1700 from simstudioai/fix/internal-req
fix(internal-req): add internal token to server side
2025-10-21 12:07:54 -07:00
Waleed
859711991f fix(docs): made sidebar directories scrollable, stylistic changes (#1702) 2025-10-21 12:04:19 -07:00
Waleed
c178a90f02 improvement(helm): added additional envvars to helm charts (#1695)
* improvement(helm): added additional envvars to helm charts

* updated docs
2025-10-21 12:02:51 -07:00
Waleed
eb8995ee7c fix(kb): add base URL for kb fetches (#1701) 2025-10-21 12:02:18 -07:00
Vikhyath Mondreti
b269447539 fix(internal-req): add internal token to server side 2025-10-21 08:36:15 -10:00
Vikhyath Mondreti
ce660e2df9 fix(plan-config): align buttons above divider (#1696)
* fix alignment of buttons on landing page

* revert environment.ts

* revert other change
2025-10-19 16:00:43 -07:00
Vikhyath Mondreti
063bd610b1 fix(jira): issue selector inf render (#1693)
* improvement(copilot): version update, edit previous messages, revert logic, model selector, observability, add haiku 4.5 (#1688)

* Add exa to search online tool

* Larger font size

* Copilot UI improvements

* Fix models options

* Add haiku 4.5 to copilot

* Model ui for haiku

* Fix lint

* Revert

* Only allow one revert to message

* Clear diff on revert

* Fix welcome screen flash

* Add focus onto the user input box when clicked

* Fix grayout of new stream on old edit message

* Lint

* Make edit message submit smoother

* Allow message sent while streaming

* Revert popup improvements: gray out stuff below, show cursor on revert

* Fix lint

* Improve chat history dropdown

* Improve get block metadata tool

* Update update cost route

* Fix env

* Context usage endpoint

* Make chat history scrollable

* Fix lint

* Copilot revert popup updates

* Fix lint

* Fix tests and lint

* Add summary tool

* fix(jira): issue selector inf render

* fix

* fixed

* fix endpoints

* fix

* more detailed error

* fix endpoint

* revert environment.ts file

---------

Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>
2025-10-19 15:20:08 -07:00
Waleed
9132cd224d fix(mcp): add workflow id to agent-handler for mcp tools (#1694) 2025-10-19 10:40:58 -07:00
Waleed
c70c32a3bd fix(settings-ui): fix settings ui, add upload status (#1691) 2025-10-18 15:37:12 -07:00
Siddharth Ganesan
cc0ace7de6 improvement(copilot): version update (#1689)
* Add exa to search online tool

* Larger font size

* Copilot UI improvements

* Fix models options

* Add haiku 4.5 to copilot

* Model ui for haiku

* Fix lint

* Revert

* Only allow one revert to message

* Clear diff on revert

* Fix welcome screen flash

* Add focus onto the user input box when clicked

* Fix grayout of new stream on old edit message

* Lint

* Make edit message submit smoother

* Allow message sent while streaming

* Revert popup improvements: gray out stuff below, show cursor on revert

* Fix lint

* Improve chat history dropdown

* Improve get block metadata tool

* Update update cost route

* Fix env

* Context usage endpoint

* Make chat history scrollable

* Fix lint

* Copilot revert popup updates

* Fix lint

* Fix tests and lint

* Add summary tool

* Fix env.ts
2025-10-18 12:59:48 -07:00
Vikhyath Mondreti
de1ac9a704 improvement(models): system to blacklist models (#1687)
* improvment(models): system to blacklist models

* move base models endpoint to right place

* remove tngtech models too
2025-10-18 12:09:18 -07:00
Vikhyath Mondreti
728a4c82c6 add inline defaults for storage limits by plan (#1685) 2025-10-18 10:51:18 -07:00
Waleed
37f293a761 feat(i18n): update translations (#1683) 2025-10-18 09:58:18 -07:00
Waleed
d1c08daaf4 improvement(docs): overhaul docs (#1680)
* improvement(docs): overhaul docs

* lint

* light mode

* more light mode

* added llms.txt and llms-full.txt and sitemap

* fixed mobile styling and position for zoom in out

* finished styling

* improvement(docs): overhaul docs

* lint

* remove dups

* renaming components

* cleanup
2025-10-17 22:29:55 -07:00
Waleed
90c34b2c46 fix(airtable): fix airtable oauth connection (#1682) 2025-10-17 22:15:35 -07:00
Waleed
3a0019bd13 fix(docker): remove prebuild lint check from docker (#1681) 2025-10-17 22:10:25 -07:00
Waleed
a6122f2bbc feat(i18n): update translations (#1673) 2025-10-17 21:59:07 -07:00
Adam Gough
9bf5f6e1fc removed raw paylod for gmail and outlook (#1679)
Co-authored-by: Adam Gough <adamgough@Adams-MacBook-Pro.local>
2025-10-17 18:56:48 -07:00
Vikhyath Mondreti
22b3dde155 fix(env-vars): promotion should never leave a copy in personal vars (#1678)
* fix(env-vars): promotion should never leave a copy in personal vars

* fix lint
2025-10-17 18:34:38 -07:00
Vikhyath Mondreti
c1725c1c4b improvement(error-messages): make error extraction generalized abstraction (#1676)
* make error extraction generalized abstraction

* remove comments

* remove console logs
2025-10-17 17:30:12 -07:00
Vikhyath Mondreti
64eee587cd improvement(gdrive): remove mime type subblock from upload file tool (#1674)
* remove mime type subblock from upload file tool for gdrive

* add UI message to limit every x minutes to <60
2025-10-17 14:58:23 -07:00
Vikhyath Mondreti
35c551984f feat(files): gmail upload attachment, workspace files, file storage limits (#1666)
* feat(gmail): add attachment uploads

* add workspace files

* update landing page

* fix lint

* fix test

* fixed UI

* added additional S3 tools to upload files

* added search filters for gmail trigger

* added files to every block

* works

* fix

* register sharepoint tool

---------

Co-authored-by: waleed <waleed>
2025-10-17 14:44:22 -07:00
Vikhyath Mondreti
d92d9a02cd fix(permissions): cannot create workflow with read perms (#1671) 2025-10-17 13:44:44 -07:00
Adam Gough
64ede7f038 added legit urls to the metadata (#1665)
Co-authored-by: Adam Gough <adamgough@Adams-MacBook-Pro.local>
2025-10-17 13:11:02 -07:00
Vikhyath Mondreti
0fbbbe02c7 fix(execution-counts): execution counts by trigger type recorded accurately (#1670) 2025-10-17 12:18:11 -07:00
Waleed
29c7827d6f fix(deployed-chat): include workspace id in deployed chat request (#1664) 2025-10-16 16:23:28 -07:00
Waleed
22f9d6e2df improvement(dashboard): improve dashboard performance, enrich charts, consolidate routes (#1662)
* improvement(dashboard): improve dashboard performance, enrich charts, consolidate routes

* cleanup
2025-10-16 15:53:06 -07:00
Waleed
0cb615428d feat(powershell): add gitattributes to prevent lint issues for powershell users (#1661) 2025-10-16 15:50:26 -07:00
Waleed
74576ec921 feat(i18n): update translations (#1660) 2025-10-16 15:31:10 -07:00
Waleed
67e681dd7c feat(webhooks): added optioanl input format to webhooks, added support for file uploads (#1654)
* feat(webhooks): added  optioanl input format to webhooks, added support for file uploads

* feat(webhooks): added input format component to generic webhook trigger, added file support

* consolidated execution files utils, extended presigned URL duration for async tasks
2025-10-16 12:16:12 -07:00
Waleed
4b05da31e0 feat(i18n): update translations (#1659) 2025-10-16 11:49:51 -07:00
Vikhyath Mondreti
82fa4e8bbb fix(input-format): allow value field to be cleared (#1658)
* fix(input-format): allow value field to be cleared

* don't let value field be detected as deployment change

* fix zep icon in docs

* exclude collapsed state
2025-10-16 11:11:27 -07:00
Waleed
4cd790b200 feat(i18n): update translations (#1653) 2025-10-15 23:21:26 -07:00
Waleed
b7e0b42d48 improvement(dashboard): cleanup execution dashboard UI, fix logs trace, and improve performance (#1651)
* improvement(dashboard): cleanup execution dashboard UI, fix logs trace, and improve perforamnce

* cleanup

* cleaned up

* ack PR comments
2025-10-15 23:00:07 -07:00
Waleed
c6ef5785c8 fix(i18n): fix SDK and guardrails translation corruption, restore i18n gh action for docs (#1652)
* fix(i18n): fix SDK and guardrails translation corruption

* re-enable i18n gh action
2025-10-15 22:52:48 -07:00
Waleed
48eab7e744 feat(dashboard): update UI for execution dashboard, fix next-runtime-env issues for SSO (#1649) 2025-10-15 19:29:10 -07:00
Vikhyath Mondreti
701bf2b510 improvement(response-copilot): prefer builder mode + fix builder/editor mode conversions (#1648)
* improvement(response-copilot): make it use builder mode over editor mode to prevent json formatting issues

* change placeholder text

* fix conversion between builder and editor mode
2025-10-15 19:14:56 -07:00
Vikhyath Mondreti
ba8acbba07 fix(connection-tags): drag and drop didn't render tag dropdown with input format fields (#1647) 2025-10-15 16:31:30 -07:00
Vikhyath Mondreti
56d04a9558 feat(zep): add tools from Zep (#1646)
* feat(zep): add tools from Zep

* correct icon

* address greptile comments
2025-10-15 15:49:18 -07:00
Waleed
2ca9044bc6 fix(layout): layout canvas onInit after node sizes are calculated, remove legacy history code and legacy marking of dirty workflows (#1645) 2025-10-15 15:35:32 -07:00
Vikhyath Mondreti
b2009fe467 fix build issue (#1644) 2025-10-15 14:26:06 -07:00
Vikhyath Mondreti
eb4821ff30 fix(chat-subs): always use getBaseUrl helper to fetch base url (#1643)
* fix(chat-subs): always use next public app url env

* use getBaseUrl everywhere

* move remaining uses

* fix test

* change auth.ts and make getBaseUrl() call not top level for emails

* change remaining uses

* revert csp

* cleanup

* fix
2025-10-15 14:13:23 -07:00
Waleed
4cceb22f21 fix(slack): update slack config to support refresh token rotation (#1642) 2025-10-15 11:54:33 -07:00
Vikhyath Mondreti
fd67fd220c improvement(functions): increase function block timeout to 3 min (#1641)
* improvement(functions): increase function block timeout to 3 min

* fix tests

* use shared constant

* remove comment
2025-10-15 11:52:02 -07:00
Vikhyath Mondreti
061c1dff4e fix(schedules): offload next run calculation to croner (#1640)
* fix(schedules): offload next run calculation to croner

* fix localstorage dependent tests

* address greptile comment
2025-10-15 11:37:42 -07:00
Siddharth Ganesan
1a05ef97d6 feat(test-framework): add executions logs for test framework (#1639)
* Starting logs page

* Execution history v0

* Execution dashboard

* Fix scroll

* Add open workflow button

* Lint

* Fix fetchExecutions in dependency array

---------

Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
2025-10-15 10:36:02 -07:00
Waleed
7595e54dfb fix(chat): allow file-only messages with no text to be sent in chat panel and deployed chat (#1635) 2025-10-14 20:27:52 -07:00
Adam Gough
6c9fce5da4 Feat(microsoftteams-file): new trigger + file upload (#1590)
* adding file logic and chat trigger

* working trig

* teams specific logic

* greptile comments

* lint

* cleaned up

* save modal changes

* created a interface for subscriptions

* removed trigger task

* reduce comments

* removed trig task

* removed comment

* simplified

* added tele logic back

* addressed some more comments

* simplified db call

* cleaned up utils

* helper telegram

* removed fallback

* removed scope

* simplify to use helpers

* fix credential resolution

* add logs

* fix

* fix attachment case

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
Co-authored-by: Adam Gough <adamgough@Adams-MacBook-Pro.local>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-10-14 19:58:47 -07:00
Vikhyath Mondreti
b296323716 feat(attachments): use filesystem for gmail, outlook triggers to save attachments (#1631)
* feat(outlook): add include attachment feature to outlook

* add include attachments to gmail trigger

* add gmail trigger, outlook block include attachments

* fix rendering issue

* remove comment

* fix architecture

* fix redeploy

* pass files to logging session to surface in logs

* fix gmail block parsing attachments

* fix reads
2025-10-14 19:10:58 -07:00
Waleed
d325fdde6c fix(i18n): exclude SDK files from automatic translation to prevent corruption (#1634)
* fix(i18n): exclude SDK files from automatic translation to prevent corruption

* fix(i18n): temporarily disable auto-translate action while fixing translation corruption

* disable i18n action
2025-10-14 19:09:19 -07:00
Waleed
36f2a62f3f fix(i18n): add additional youtube tools, sync i18n pipeline, remove dated docs (#1632) 2025-10-14 18:34:38 -07:00
Waleed
e83d3a6b9f fix(tool-calls): remove redundant input/output fields in favor of arguments/response, exclude isExpanded for tools in agents in workflow change detection (#1630) 2025-10-14 17:21:17 -07:00
Waleed
6723adf3c1 fix(kb-sanitization): add sanitization for kb tags when exporting workflow (#1628) 2025-10-14 16:56:04 -07:00
Waleed
9efc08a832 fix(telemetry): updated telemetry, added nested sanitization, added granular trace spans for logs and updated UI (#1627)
* feat(logs): updated telemetry, added nested sanitization, added granular trace spans for logs and updated UI

* refactor trace spans into separate components

* remove any's from tool defs

* updated UI and overlayed spans

* cleanup

* ack PR comments

* stricter type safety

* clean
2025-10-14 16:41:12 -07:00
Waleed
f345c4d1d8 fix(docker): updated docker to use non-root user for k8s/helm deployments (#1626)
* fix(docker): updated docker to use non-root user for k8s/helm deployments

* ack PR comments
2025-10-14 15:54:51 -07:00
Waleed
f147eaee1c feat(telegram): added additional telegram tools & docs (#1625)
* feat(telegram): added delete message,send photo-video-audio-animation tools

* fix: updated Telegram tool types and removed debug logs

* reverted telegram message tool to older name

* added docs for telegram

* updated telegram docs

---------

Co-authored-by: SimplyRohit <rohitjaatjaat073@gmail.com>
2025-10-14 15:34:41 -07:00
Siddharth Ganesan
6f3df271fd feat(copilot+canvas rendering): add context window tracking to copilot and selectively render canvas components (#1622)
* Copilot context window

* Fix pill

* Speed up canvas

* Fix react hook bug

* Context pill div
2025-10-13 19:56:02 -07:00
Vikhyath Mondreti
3dd36a8a35 fix(schedules): migrate to trigger dev (#1618)
* fix(schedules): add cron job auth like other cron routes

* migrate schedules to trigger dev

* remove executions check

* fix tests
2025-10-13 13:12:55 -07:00
Waleed
09cccd5487 feat(helm): added cert-postgresql template to helm (#1620)
* feat(helm): added cert-postgresql template to helm

* use js-tiktoken (pure js) in favor of tiktoken (wasm)
2025-10-13 12:41:43 -07:00
Waleed
1773530325 fix(sdk): fixed ts sdk publishing job to use later node version (#1619) 2025-10-13 12:13:50 -07:00
Waleed
2da7a6755c feat(helm): added pdb to helm (#1617)
* feat(helm): added pdb to helm

* add additional config
2025-10-13 12:06:30 -07:00
Waleed
1e81cd6850 fix(kb): added tiktoken for embedding token estimation (#1616)
* fix(kb): added tiktoken for embedding token estimation

* added missing mock
2025-10-13 11:53:50 -07:00
Vikhyath Mondreti
ec73e2e9ce fix(posthog): prevent redirects by whitelisting ingest route (#1615) 2025-10-13 11:08:48 -07:00
Waleed
4937d72d70 fix(devcontainer): fixed devcontainers (#1614) 2025-10-12 18:01:37 -07:00
Waleed
8f06aec68b fix(vulns): fix various vulnerabilities and enhanced code security (#1611)
* fix(vulns): fix SSRF vulnerabilities

* cleanup

* cleanup

* regen docs

* remove unused deps

* fix failing tests

* cleanup

* update deps

* regen bun lock
2025-10-11 22:14:31 -07:00
Waleed
1de6f09069 feat(versions): added the ability to rename deployment versions (#1610) 2025-10-11 21:18:36 -07:00
Waleed
b10b2461a5 feat(mistal): added mistral as a provider, updated model prices (#1607)
* feat(mistal): added mistral as a provider, updated model prices

* remove the ability for a block to reference its own outluts

* fixed order of responses for guardrails block
2025-10-11 20:37:35 -07:00
Waleed
34fc8f84f5 fix(inference-billing): fix inference billing when stream is true via API, add drag-and-drop functionality to deployed chat (#1606)
* fix(inference): fix inference billing when stream is true via API

* add drag-and-drop to deployed chat
2025-10-11 20:37:35 -07:00
Waleed
ee77dea2d6 feat(guardrails): added guardrails block/tools and docs (#1605)
* Adding guardrails block

* ack PR comments

* cleanup checkbox in dark mode

* cleanup

* fix supabase tools
2025-10-11 20:37:35 -07:00
Adam Gough
bba407b507 improvement(privacy-policy): updated privacy policy for google (#1602)
* updated privacy policy for google

* update terms, privacy, and emails to incl address and update verbiage
2025-10-11 20:37:35 -07:00
Waleed
ab63978ce8 fix(blog): rename building to blogs with redirect (#1604) 2025-10-11 20:37:35 -07:00
Waleed
e697e50d4e improvement(performance): remove unused source/target indices, add index on snapshot id (#1603) 2025-10-11 20:37:35 -07:00
Waleed
41ec229431 feat(sessions): remove redis as priority option for session data (#1600) 2025-10-10 18:04:03 -07:00
Waleed
c0f5ba75f1 v0.4.11: webhook, knowledgebase, billing fixes & redis for sessions 2025-10-10 17:46:01 -07:00
Waleed
5a943bca32 fix(ci): pin all workflows and Dockerfiles to Bun v1.2.22 (#1598) 2025-10-10 17:36:06 -07:00
Waleed
923595f57e fix(webhooks): use next public app url instead of request origin for webhook registration (#1596)
* fix(webhooks): use next public app url instead of request origin for webhook registration

* ack PR comments

* ci: pin Bun to v1.2.22 to avoid Bun 1.3 breaking changes
2025-10-10 17:19:51 -07:00
Waleed
241d9fd12d improvement(kb): encode non-ASCII headers for kb uploads (#1595)
* improvement(kb): encode non-ASCII headers for kb uploads

* cleanup

* increase timeouts to match trigger
2025-10-10 17:19:51 -07:00
Vikhyath Mondreti
97a8778449 fix test webhook url (#1594) 2025-10-10 17:19:51 -07:00
Waleed
833e700b58 feat(sessions): add redis as priority option for session data (#1592)
* feat(sessions): add redis as priority option for session data

* update chat client otp
2025-10-10 17:19:51 -07:00
Waleed
2d49892aaa feat(deployed-chat): added file upload to workflow execute API, added to deployed chat, updated chat panel (#1588)
* feat(deployed-chat): updated chat panel UI, deployed chat and API can now accept files

* added nested tag dropdown for files

* added duplicate file validation to chat panel

* update docs & SDKs

* fixed build

* rm extraneous comments

* ack PR comments, cut multiple DB roundtrips for permissions & api key checks in api/workflows

* allow read-only users to access deployment info, but not take actions

* add downloadable file to logs for files passed in via API

* protect files/serve route that is only used client-side

---------

Co-authored-by: waleed <waleed>
2025-10-10 17:19:51 -07:00
Vikhyath Mondreti
8ce5a1b7c0 feat(billing): bill by threshold to prevent cancellation edge case (#1583)
* feat(billing): bill by threshold to prevent cancellation edge case

* fix org billing

* fix idempotency key issue

* small optimization for team checks

* remove console log

* remove unused type

* fix error handling
2025-10-10 17:19:51 -07:00
Waleed
88d2e7b97b fix(env-vars): remove regex parsing from table subblock, add formatDisplayText to various subblocks that didn't have it (#1582) 2025-10-10 17:19:51 -07:00
Waleed
c04eb01aed fix(db): revert to dedicated sockets db connection establishment (#1581) 2025-10-08 08:37:58 -07:00
Waleed
5d887fdca7 v0.4.10: ts-sdk updates, db updates 2025-10-08 00:56:04 -07:00
Waleed
1a0fdb32fe chore(docs): update docs (#1578) 2025-10-08 00:55:18 -07:00
Waleed
9d45b8df1e fix(ts-sdk): fix job to publish ts sdk (#1576) 2025-10-08 00:46:30 -07:00
Waleed
ae3a7f0865 fix(db): reduce overall number of db max conncetions to incr performance (#1575) 2025-10-08 00:30:44 -07:00
Vikhyath Mondreti
25f5e31378 v0.4.9: chat streaming API, DB config changes, sockets improvement, var highlighting, bug fixes 2025-10-07 19:24:37 -07:00
Waleed
7bdf0e94d7 fix(curl-example): fixed curl example in deploy modal to reflect selected option (#1573) 2025-10-07 18:46:12 -07:00
Vikhyath Mondreti
8e43774b5e improvement(sockets): position persistence on drag end, perms call only on joining room (#1571) 2025-10-07 17:31:02 -07:00
Waleed
715f42c1a6 feat(highlighting): added resolved vars highlighting to code subblock, to be consistent with other subblocks (#1570) 2025-10-07 17:17:39 -07:00
Waleed
8200e9a88f feat(i18n): update translations (#1569)
* feat(i18n): update translations

* remove duplicate sections

* fix typos
2025-10-07 16:50:14 -07:00
Waleed
c6f6c9e2a5 fix(streaming-response): add in handling for the response block when streaming (#1568) 2025-10-07 16:21:10 -07:00
Vikhyath Mondreti
2d7ba91c0e fix(workspace-selector-kb): fix selector for assigning workspaces for kbs (#1567) 2025-10-07 15:31:04 -07:00
Waleed
872e034312 feat(chat-streaming): added a stream option to workflow execute route, updated SDKs, updated docs (#1565)
* feat(chat-stream): updated workflow id execute route to support streaming via API

* enable streaming via api

* added only text stream option

* cleanup deployed preview componnet

* updated selectedOutputIds to selectedOutput

* updated TS and Python SDKs with async, rate limits, usage, and streaming API routes

* stream non-streaming blocks when streaming is specified

* fix(chat-panel): add onBlockComplete handler to chat panel to stream back blocks as they complete

* update docs

* cleanup

* ack PR comments

* updated next config

* removed getAssetUrl in favor of local assets

* resolve merge conflicts

* remove extra logic to create sensitive result

* simplify internal auth

* remove vercel blob from CSP + next config
2025-10-07 15:10:37 -07:00
Vikhyath Mondreti
a63a7b0262 fix(undo-redo): preserve trigger/advanced mode (#1566)
* fix(undo-redo): preserve trigger/advanced mode

* remove comments
2025-10-07 14:27:46 -07:00
Vikhyath Mondreti
991a020917 feat(nested-workflow-spans): nested child workflow spans in logs sidepanel (#1561)
* feat(nested-workflow-logs): nested workflow logs display

* logs UX consistency between success and error cases

* fix chat execution

* fix schedules trigger

* update all deployment versions dependent exections to use api key owner instead of workflow owner

* fix tests

* simplify tests
2025-10-07 12:32:04 -07:00
Waleed
f03f395225 fix(db): enable database connection pooling in production (#1564)
* fix: enable database connection pooling in production

* debug: add diagnostic endpoints to test NODE_ENV and database pooling

* test: add connection testing endpoint to diagnose production delay

* redeuce num of concurrent connections
2025-10-07 10:27:33 -07:00
Waleed
174f6a48a6 v0.4.8: more blog 2025-10-06 13:22:22 -07:00
Waleed
c2f0a95802 fix(blog): center footer, fix dark mode, fix avatar (#1559) 2025-10-06 13:20:12 -07:00
Waleed
4dc4073452 v0.4.7: blog 2025-10-06 12:35:29 -07:00
Emir Karabeg
d9b70087c4 feat(blog): created first page (#1550)
* feat(blog): created first page

* feat(building): first draft blog complete
2025-10-06 12:25:07 -07:00
Waleed
07fd9c3a4a feat(posthog): added posthog provider instead of using nextjs instrumentation (#1555)
* fix(posthog): make instrumentation client not use next-runtime-env

* feat(posthog): added posthog provider
2025-10-06 10:59:46 -07:00
Waleed
377b84e18c v0.4.6: kb improvements, posthog fixes 2025-10-05 21:48:32 -07:00
Waleed
223ecda80e fix(posthog): add rewrites for posthog reverse proxy routes unconditionally, remove unused POSTHOG_ENABLED envvar (#1548) 2025-10-05 21:27:03 -07:00
Waleed
7dde01e74b fix(kb): force kb uploads to use serve route (#1547) 2025-10-05 17:50:21 -07:00
Vikhyath Mondreti
b768ca845e v0.4.5: copilot updates, kb improvements, payment failure fix 2025-10-04 16:37:41 -07:00
Waleed
86ed32ea10 feat(kb): added json/yaml parser+chunker, added dedicated csv chunker (#1539)
* feat(kb): added json/yaml parser+chunker, added dedicated csv chunker

* ack PR comments

* improved kb upload
2025-10-04 14:59:21 -07:00
Vikhyath Mondreti
0e838940f1 fix(copilot): targeted auto-layout for copilot edits + custom tool persistence (#1546)
* fix autolayout and custom tools persistence

* fix

* fix preserving positions within subflow

* more fixes

* fix resizing

* consolidate constants
2025-10-04 14:52:37 -07:00
Siddharth Ganesan
7cc9a23f99 fix(copilot): tool renaming 2025-10-04 11:52:20 -07:00
Vikhyath Mondreti
c42d2a32f3 feat(copilot): fix context / json parsing edge cases (#1542)
* Add get ops examples

* input format incorrectly created by copilot should not crash workflow

* fix tool edits triggering overall delta

* fix(db): add more options for SSL connection, add envvar for base64 db cert (#1533)

* fix trigger additions

* fix nested outputs for triggers

* add condition subblock sanitization

* fix custom tools json

* Model selector

* fix response format sanitization

* remove dead code

* fix export sanitization

* Update migration

* fix import race cond

* Copilot settings

* fix response format

* stop loops/parallels copilot generation from breaking diff view

* fix lint

* Apply suggestion from @greptile-apps[bot]

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* fix tests

* fix lint

---------

Co-authored-by: Siddharth Ganesan <siddharthganesan@gmail.com>
Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-10-03 19:08:57 -07:00
Vikhyath Mondreti
4da355d269 fix(billing-blocked): block platform usage if payment fails for regular subs as well (#1541) 2025-10-03 12:17:53 -07:00
Waleed
2175fd1106 v0.4.4: database config updates 2025-10-02 20:08:09 -07:00
Waleed
10692b5e5a fix(db): remove overly complex db connection logic (#1538) 2025-10-02 19:54:32 -07:00
Waleed
62298bf094 fix(db): added database config to drizzle.config in app container (#1536) 2025-10-02 18:09:27 -07:00
Waleed
5f1518ffd9 fix(db): added SSL config to migrations container (#1535) 2025-10-02 18:04:31 -07:00
Waleed
cae0e85826 v0.4.3: posthog, docs updates, search modal improvements 2025-10-02 17:02:48 -07:00
Waleed
fa9c97816b fix(db): add more options for SSL connection, add envvar for base64 db cert (#1533) 2025-10-02 15:53:45 -07:00
Vikhyath Mondreti
4bc37db547 feat(copilot): JSON sanitization logic + operations sequence diff correctness (#1521)
* add state sending capability

* progress

* add ability to add title and description to workflow state

* progress in language

* fix

* cleanup code

* fix type issue

* fix subflow deletion case

* Workflow console tool

* fix lint

---------

Co-authored-by: Siddharth Ganesan <siddharthganesan@gmail.com>
2025-10-02 15:11:03 -07:00
Waleed
15138629cb improvement(performance): remove writes to workflow updated_at on position updates for blocks, edges, & subflows (#1531)
* improvement(performance): remove writes to workflow updated_at on position updates for blocks, edges, & subflows

* update query pattern for logs routes
2025-10-02 11:53:50 -07:00
Waleed
ace83ebcae feat(cmdk): added knowledgebases to the cmdk modal (#1530) 2025-10-01 21:21:42 -07:00
Waleed
b33ae5bff9 fix(fumadocs): fixed client-side export on fumadocs (#1529) 2025-10-01 20:52:20 -07:00
Waleed
dc6052578d fix(kb): removed filename constraint from knowledgebase doc names (#1527) 2025-10-01 20:39:56 -07:00
Waleed
4adbae03e7 chore(deps): update fumadocs (#1525) 2025-10-01 20:28:12 -07:00
Vikhyath Mondreti
3509ce8ce4 fix(autolayout): type issue if workflow deployed + remove dead state code (#1524)
* fix(autolayout): type issue if workflow deployed

* remove dead code hasActiveWebhook field
2025-10-01 20:18:29 -07:00
Waleed
7aae108b87 feat(posthog): added posthog for analytics (#1523)
* feat(posthog): added posthog for analytics

* added envvars to env.ts
2025-10-01 20:12:26 -07:00
Waleed
980a6d8347 improvement(db): enforce SSL everywhere where a DB connection is established (#1522)
* improvement(db): enforce SSL everywhere where a DB connection is established

* remove extraneous comment
2025-10-01 19:09:08 -07:00
Vikhyath Mondreti
745eaff622 v0.4.2: autolayout improvements, variable resolution, CI/CD, deployed chat, router block fixes 2025-10-01 17:27:35 -07:00
Vikhyath Mondreti
35d857ef2e fix(trigger): inject project id env var in correctly (#1520) 2025-10-01 17:16:28 -07:00
Waleed
6e63eafb79 improvement(db): remove vercel, remove railway, remove crons, improve DB connection config (#1519)
* improvement(db): remove vercel, remove railway, remove crons, improve DB connection config

* remove NEXT_PUBLIC_VERCEL_URL

* remove db url fallbacks

* remove railway & more vercel stuff

---------

Co-authored-by: waleed <waleed>
2025-10-01 16:37:13 -07:00
Waleed
896f7bb0a0 fix(ci): update trigger.dev ci to only push to staging on merge to staging & for prod as well (#1518) 2025-10-01 13:22:04 -07:00
Waleed
97f69a24e1 fix(redirects): update middleware to allow access to /chat regardless of auth status (#1516) 2025-10-01 10:46:18 -07:00
Waleed
1a2c4040aa improvement(trigger): increase maxDuration for background tasks to 10 min to match sync API executions (#1504)
* improvement(trigger): increase maxDuration for background tasks to 10 min to match sync API executions

* add trigger proj id
2025-10-01 10:40:18 -07:00
Vikhyath Mondreti
4ad9be0836 fix(router): use getBaseUrl() helper (#1515)
* fix(router): use getBaseUrl() helper

* add existence check
2025-10-01 10:39:57 -07:00
Vikhyath Mondreti
0bf2bce368 improvement(var-resolution): resolve variables with block name check and consolidate code (#1469)
* improvement(var-resolution): resolve variables with block name check and consolidate code

* fix tests

* fix type error

* fix var highlighting in kb tags

* fix kb tags
2025-09-30 19:20:35 -07:00
Vikhyath Mondreti
0d881ecc00 fix(deployed-version-check): check deployed version existence pre-queuing (#1508)
* fix(deployed-version-check): check deployed version existence pre-queuing

* fix tests

* fix edge case
2025-09-30 19:20:21 -07:00
Siddharth Ganesan
7e6a5dc7e2 Fix/remove trigger promotion (#1513)
* Revert trigger promotion

* Move trigger

* Fix ci
2025-09-30 18:29:28 -07:00
Siddharth Ganesan
c1a3500bde fix(ci): capture correct deployment version output (#1512)
* Capture correct deployment version output

* Add trigger access token to each step

* Use correct arn
2025-09-30 16:36:19 -07:00
Siddharth Ganesan
561b6f2778 fix(ci): fix trigger version capture 2025-09-30 16:20:25 -07:00
Siddharth Ganesan
cdfee16b8a Fix trigger ci creds (#1510) 2025-09-30 14:03:38 -07:00
Siddharth Ganesan
9f6cb1becf fix(ci): trigger permissions 2025-09-30 13:53:02 -07:00
Siddharth Ganesan
dca8745c44 fix(ci): add skip promotion to trigger ci 2025-09-30 13:37:07 -07:00
Vikhyath Mondreti
c35c8d1f31 improvement(autolayout): use live block heights / widths for autolayout to prevent overlaps (#1505)
* improvement(autolayout): use live block heights / widths for autolayout to prevent overlaps

* improve layering algo for multiple trigger setting

* remove console logs

* add type annotation
2025-09-30 13:24:19 -07:00
Siddharth Ganesan
87c00cec6d improvement(ci): trigger.dev pushes (#1506)
* Fix trigger workflow ci

* Update trigger location
2025-09-30 13:22:24 -07:00
Vikhyath Mondreti
17edf0405b improvement(triggers): uuid, autolayout, copilot context (#1503)
* make trigger select uuid consistent with sidebar selection

* add trigger allowed flag for core triggers

* fix autolayout with new triggers
2025-09-30 11:31:54 -07:00
Siddharth Ganesan
79461840c3 fix(migrations): make sso migration idempotent 2025-09-30 11:04:44 -07:00
Siddharth Ganesan
e76fc8c2da Remove migrations ci (#1501) 2025-09-30 10:43:41 -07:00
Waleed
e9150a53e3 feat(i18n): update translations (#1496) 2025-09-30 09:44:50 -07:00
Waleed
f9f84111cb v0.4.1: docker fixes, deployed state improvements 2025-09-30 01:16:28 -07:00
Waleed
01ffee8e7c fix(deployed): support internal JWT for deployed child workflow executions (#1498) 2025-09-30 01:14:32 -07:00
Siddharth Ganesan
367189fe15 fix(ci): fix docker manifest build (#1495) 2025-09-29 20:57:00 -07:00
Siddharth Ganesan
7de9e5fb19 fix(ci): fix docker manifest build 2025-09-29 20:55:52 -07:00
Siddharth Ganesan
10652eb9b8 v0.4.0: copilot v1, triggers, sso/saml support, version control 2025-09-29 20:27:23 -07:00
Waleed
010753d170 chore(docs): remove remaining yml references from docs (#1492) 2025-09-29 20:13:44 -07:00
Waleed
bf1c178282 feat(sso): add support for login with SAML/SSO (#1489)
* feat(sso): added login with SAML/SSO

* restore env

* fixed login styling

* upgrade deps, update UI

* more styling improvements

* reran migrations, tested with script

* improvement(auth): created SSO page

* improvement(auth): remove email option for SSO if not enabled

* cleanup

* cleaned up, added documentation for SSO/SAML config + tested registering either one with script and UI form

* cleanup

* ack PR comments

* move sso known providers to consts

---------

Co-authored-by: waleed <waleed>
Co-authored-by: Emir Karabeg <emirkarabeg@berkeley.edu>
2025-09-29 20:05:26 -07:00
Siddharth Ganesan
6a664663cf fix(copilot): deprecate yaml, json import/export, deprecate build_workflow tool, convert copilot to json-based (#1488)
* Temp commit

* Edit workflow self contained

* Remove build_workflow

* Base bad version

* fix lint

* Sanitize workflows for copilot

* Fixes

* Fix import/export buttons

* fix autolayout

* fix lint

* fix training logic to work with json

* Add claude sonnet 4.5 to copilot

* Lint

* Update copilot url

* Update default model and fix build errors

* Fix tests

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-09-29 19:12:08 -07:00
Siddharth Ganesan
333442909b Fix copilot diff (#1485) 2025-09-29 13:12:10 -07:00
Waleed
67c993d743 fix(ci): remove atomic updates for trigger (#1478) 2025-09-27 22:37:28 -07:00
Waleed
38dd2d0f23 improvement(ci): ensure atomicity in trigger deploys, improve overall ci organization (#1477)
* improvement(chat): deployed chat no longer uses subdomains, uses sim.ai/chat/[identifier]

* improvement(ci): ensure atomicity in trigger deploys, improve overall ci organization

* Revert "improvement(chat): deployed chat no longer uses subdomains, uses sim.ai/chat/[identifier]"

This reverts commit c68c052601.

---------

Co-authored-by: waleed <waleed>
2025-09-27 22:11:06 -07:00
Adam Gough
5ee6345120 Fix(google drive): google sheets creating a file (#1476)
* fixed upload to google drive with sheets

* cleanup, remove unneeded scope
2025-09-27 20:48:01 -07:00
Waleed
dd1985c99c improvement(chat): deployed chat no longer uses subdomains, uses sim.ai/chat/[identifier] (#1474)
* improvement(chat): deployed chat no longer uses subdomains, uses sim.ai/chat/[identifier]

* ui fix

* added back validate route, remove backwards compatibility for subdomain redirects

* cleanup

* cleanup

* add chat page to conditional theme layout, and remove custom chat css

* consolidate theme providers

* ack pr commnets

---------

Co-authored-by: waleed <waleed>
2025-09-27 17:32:10 -07:00
Waleed
39356f3d74 fix(ui): standardized 404, chat, and invite pages (#1472)
* improvement(chat): deployed chat no longer uses subdomains, uses sim.ai/chat/[identifier]

* fix(ui): standardized 404, chat, and invite pages

* Revert "improvement(chat): deployed chat no longer uses subdomains, uses sim.ai/chat/[identifier]"

* fixed ui for 404 page
2025-09-27 14:03:24 -07:00
Waleed
1ec5b1bdad improvement(deps): remove vercel speed insights (#1470)
* improvement(chat): deployed chat no longer uses subdomains, uses sim.ai/chat/[identifier]

* improvement(deps): remove vercel speed insights

* Revert "improvement(chat): deployed chat no longer uses subdomains, uses sim.ai/chat/[identifier]"

This reverts commit c68c052601.

---------

Co-authored-by: waleed <waleed>
2025-09-27 11:52:19 -07:00
Waleed
bcc75376e5 feat(permissions): allow users to deploy workflows in all workspaces they are an admin in (#1463)
* feat(permissions): allow admin workspace users to deploy workflows in workspaces they don't own

* fixed failing test

* added additional routes

* remove overly complex, unecessary test and fixed docs formatting

* follow DRY
2025-09-26 19:58:11 -07:00
Adam Gough
448e9ea835 fix(tools): fixed supabase order by (#1467)
Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
2025-09-26 19:26:50 -07:00
Waleed
a63f3a3d8d improvement(copilot): added session context checks in copilot tool calls (#1466)
* improvement(copilot): added session context checks in copilot tool calls

* remove extraneous comments, remove the ability to view copilot API keys after creation

* updated skeleton

---------

Co-authored-by: waleed <waleed>
2025-09-26 19:04:49 -07:00
Waleed
3ff6509028 feat(i18n): update translations (#1465)
* feat(i18n): update translations

* fixed french i18n error

---------
2025-09-26 19:01:22 -07:00
Vikhyath Mondreti
2ae30f1399 add google vault to landing page footer (#1464) 2025-09-26 16:38:24 -07:00
Vikhyath Mondreti
0e65a8a31d feat(trigger-docs): new trigger docs, function block rce imports fix (#1462)
* fix(sidebar): draggable cursor on sidebar when switching workflows (#1276)

* remove inline css for edge labels

* fix remote code execution imports for javascript

* add docs for new triggers

* fix

* fix draggable link

---------

Co-authored-by: Waleed Latif <walif6@gmail.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Adam Gough <77861281+aadamgough@users.noreply.github.com>
Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>
2025-09-26 16:23:52 -07:00
Waleed
d1f5c69e6b fix(envvars): use getEnv for isHosted check since it is client-side (#1461) 2025-09-26 12:50:51 -07:00
Waleed
c468ecbc72 feat(i18n): update translations (#1460) 2025-09-26 12:21:28 -07:00
Adam Gough
97257ca49f Feat(google vault): added google vault tool (#1459)
* first push pre testing

* toosl working

* progress

* bun run lint

* added doc

* changed google client ID and secret back

* cleaned up oauth

* removed comment

* removed any and added manual content

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
2025-09-26 11:13:58 -07:00
Waleed
6daeb77740 feat(turbo): added turborepo, tailwind v3 (#1458) 2025-09-25 21:18:51 -07:00
Waleed
f79e87e4c2 improvement(parallel): update parallel subflow to support conditional routing (#1444)
* improvement(parallel): update parallel subblock to support conditional routing

* ignore disconnected blocks in parallel/loop

* added utils

* fix z-index issues with edges in subflow

* fixed aggregation of results from loop & parallel blocks

* feat(manual-trigger): add manual trigger (#1452)

* feat(manual-trigger): add manual trigger

* consolidate input format extraction

* exclude triggers from console logs + deployed chat error surfacing

* works

* centralize error messages + logging for deployed chat

* fix(css-config): use correct version (#1453)

* fix(css-config): use correct version

* fix lint

* improvement(parallel): update parallel subblock to support conditional routing

* ignore disconnected blocks in parallel/loop

* added utils

* fix z-index issues with edges in subflow

* fixed aggregation of results from loop & parallel blocks

* change z index within component and remvoe global css

* fix cascade deletion subflows sockets case

* improve results array for subflows

* fix onedgeclick inside subflows

* fix test

---------

Co-authored-by: waleed <waleed>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
2025-09-25 18:31:34 -07:00
Waleed
18599ac3c3 fix(tailwind): revert tailwind back to v3 for main app (#1456)
* fix(css): fix css build issue

* fix(postcss): revert back to tailwind v3

* bun.lock update
2025-09-25 18:04:40 -07:00
Waleed
e49cde7766 fix(ci): modify docs embeddings ci to only run on english documentation (#1455) 2025-09-25 17:52:00 -07:00
Waleed
7146ce512d feat(ci): use blacksmith for ci (#1454)
* feat(ci): use blacksmith for ci

* consolidate ecr + ghcr builds for linux/amd64
2025-09-25 17:37:12 -07:00
Vikhyath Mondreti
1b7e883b10 fix(css-config): use correct version (#1453)
* fix(css-config): use correct version

* fix lint
2025-09-25 16:42:31 -07:00
Vikhyath Mondreti
e03c036a10 feat(manual-trigger): add manual trigger (#1452)
* feat(manual-trigger): add manual trigger

* consolidate input format extraction

* exclude triggers from console logs + deployed chat error surfacing

* works

* centralize error messages + logging for deployed chat
2025-09-25 16:29:50 -07:00
Siddharth Ganesan
7e8ac5c27f fix(ci): docker (#1451)
* Docker ci 2

* Bun issues

* bun lock
2025-09-25 13:23:06 -07:00
Siddharth Ganesan
c12b3d2550 Remove double calling of ci (#1450) 2025-09-25 12:39:39 -07:00
Siddharth Ganesan
d381a69c9f feat(ci): consolidate ci, make db migrations dependent on ecr success, remove turbopack for staging/prod builds (#1449)
* Remove turbopack

* Fix ci errors

* Sim agent import fix

* Lint

* Ci orchestration

* Lint

* Ci updates

* Tdz fix for generate

* Remove logger

* Fix imports

* Lint
2025-09-25 12:26:25 -07:00
Vikhyath Mondreti
928581f387 feat(deployments): make deployed state source of truth for non-manual executions + versioning (#1242)
* feat(deployments): make deployed state source of truth for non-manual executions + versioning

* fix lint

* fix test

* add script to migrate to deployed vesions

* fix deployed chat

* address greptile commands

* Remove 84th migration files to prepare for regeneration

* fix script + update migration

* fix script

* cleanup typing

* use shared helper

* fix tests

* fix duplicate route

* revert migrations prep

* add migration back

* add workflow in workflow block func

* fix UI

* fix lint

* make migration idempotent

* remove migrations

* add migrations back'

* adjust script to reuse helper

* add test webhook URL functionality

* consolidate test URL + prod URL code for webhooks

* fixes

* update trigger config save with correct dependencies

* make frozen canvas respect trigger mode

* chore(db): remove latest migration 0088, snapshot, journal entry; delete migrate-deployment-versions script

* separate parent id cleanup migration

* chore(db): remove 0089 migration, snapshot, and prune journal entry

* chore(db): generate 0090 migration after removing 0089 and merging staging

* fix

* chore(db): remove 0090 migration, snapshot, and prune journal entry

* chore(db): generate 0091 migration after merging staging and restoring idempotency flow

* fix some imports

* remove dead code

* fix tests

* remove comment

* working test url functionality restored

* works

* some styling changes

* make deploy text accurate

* chore(db): remove latest migration 0091 and snapshot; update journal before merging staging

* db(migrations): generate 0093_medical_sentinel and snapshots after merging staging

* reconcile with other merge

* fix trigger test

* remove extra use effect

* fix test url"

* don't swallow serializer errors

* fix lint

* fix tests

* fix tests

* expose root for generic webhook

* root access for webhook

* add is workflow ready check correctly
2025-09-24 20:28:09 -07:00
Siddharth Ganesan
2c7c8d582e Add dh login (#1448) 2025-09-24 18:20:45 -07:00
Siddharth Ganesan
426873245f feat(infra): add ci for aws image push (#1447)
* Stash

* Ci for aws v1

* Fix ecr
2025-09-24 17:45:26 -07:00
Siddharth Ganesan
ca6ff7edb6 feat(infra): add staging docker image 2025-09-24 15:18:40 -07:00
Vikhyath Mondreti
094dae3d3f feat(copilot): add training interface (#1445)
* progress

* cleanup UI

* progress

* fix trigger mode in yaml + copilot side

* persist user settings

* wrap operations correctly

* add trigger mode to add op

* remove misplaced comment

* add sent notification

* remove unused tab:
2025-09-24 14:19:11 -07:00
Emir Karabeg
2ee27f972e improvement: remove sentry dependency (#1435)
* improvement: remove Sentry

* update bun.lock
2025-09-24 10:46:59 -07:00
Waleed
0b2ef5e3a6 chore(deps): added entities dependency (#1441) 2025-09-24 10:43:41 -07:00
Waleed
67ac3ff84b chore(deps): upgrade turborepo (#1439) 2025-09-23 21:36:10 -07:00
Waleed
8ed2c5ec53 feat(i18n): update translations (#1437) 2025-09-23 18:56:42 -07:00
Vikhyath Mondreti
2ace06f239 fix build error 2025-09-23 18:31:25 -07:00
Waleed
20a272c8c3 chore(deps): remove unused deps, reduce overall dependencies & size (#1436)
Co-authored-by: waleed <waleed>
2025-09-23 17:39:38 -07:00
Waleed
0d86eaa3a1 fix(usage): persist cost multiplier at provider level instead of also at the logger level (#1433)
* feat(changelog): added changelog

* fix(usage): persist cost multiplier at provider level

* Revert "feat(changelog): added changelog"

This reverts commit 885d10c4d9.

---------

Co-authored-by: waleed <waleed>
2025-09-23 17:11:29 -07:00
Vikhyath Mondreti
aa0a33e60f Revert "feat(traceroot): add traceroot logger" (#1434)
This reverts commit 6d1b172a3e.
2025-09-23 16:59:49 -07:00
Vikhyath Mondreti
603b5471a3 fix(copilot): null check simplified (#1431) 2025-09-23 16:03:32 -07:00
Vikhyath Mondreti
ab8d822edf fix(copilot): restore subblock options (#1430) 2025-09-23 15:56:56 -07:00
Waleed
5bb9b46554 improvement(subflows): support multiple blocks in parallel subflow, enhance logs to group by iteration for parallels/loop (#1429)
* feat(changelog): added changelog

* move avatar icons in changelog

* improvement(parallels): support multiple blocks in parallel subflow, enhance logs to group by iteration for parallels/loops

* restore env

* added tests

* lint

* update drizzle

---------

Co-authored-by: waleed <waleed>
2025-09-23 15:25:05 -07:00
Waleed
994eb8db2a feat(i18n): added japanese and german translations (#1428)
* feat(changelog): added changelog

* feat(i18n): added japanese and german translations

* reordered

---------

Co-authored-by: waleed <waleed>
2025-09-23 15:13:31 -07:00
Vikhyath Mondreti
fbb164db98 improvement(copilot): add best practices for core blocks (#1427)
* improvement(copilot): add best practices for blocks

* fix kb, api

* Update apps/sim/blocks/blocks/memory.ts

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* address comments

* remove non deterministic test

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-09-23 13:11:41 -07:00
Vikhyath Mondreti
dd8f633f9f fix(instrumentation): open telemetry init (#1426) 2025-09-23 11:06:40 -07:00
Vikhyath Mondreti
6d1b172a3e feat(traceroot): add traceroot logger 2025-09-23 10:39:52 -07:00
Vikhyath Mondreti
b7876ca466 improvement(copilot): structured metadata context + start block deprecation (#1362)
* progress

* progress

* deploy command update

* add trigger mode modal

* fix trigger icons'

* fix corners for add trigger card

* update serialization error visual in console

* works

* improvement(copilot-context): structured context for copilot

* forgot long description

* Update metadata params

* progress

* add better workflow ux

* progress

* highlighting works

* trigger card

* default agent workflow change

* fix build error

* remove any casts

* address greptile comments

* Diff input format

* address greptile comments

* improvement: ui/ux

* improvement: changed to vertical scrolling

* fix(workflow): ensure new blocks from sidebar click/drag use getUniqueBlockName (with semantic trigger base when applicable)

* Validation + build/edit mark complete

* fix trigger dropdown

* Copilot stuff (lots of it)

* Temp update prod dns

* fix trigger check

* fix

* fix trigger mode check

* Fix yaml imports

* Fix autolayout error

* fix deployed chat

* Fix copilot input text overflow

* fix trigger mode persistence in addBlock with enableTriggerMode flag passed in

* Lint

* Fix failing tests

* Reset ishosted

* Lint

* input format for legacy starter

* Fix executor

---------

Co-authored-by: Siddharth Ganesan <siddharthganesan@gmail.com>
Co-authored-by: Emir Karabeg <emirkarabeg@berkeley.edu>
2025-09-22 23:24:50 -07:00
Waleed
68df95906f feat(changelog): added changelog and gh action to auto-release (#1423)
* feat(changelog): added changelog

* finished changelog

* updated metadata

* reverted env

* cleanup

---------

Co-authored-by: waleed <waleed>
2025-09-22 21:35:21 -07:00
Waleed
760219dcce feat(i18n): update translations (#1421) 2025-09-22 19:52:51 -07:00
Waleed
f1b83c1988 feat(tools): added resend email sender (#1420) 2025-09-22 19:16:42 -07:00
Vikhyath Mondreti
2f97782df0 feat(undo-redo): undo/redo for canvas editing (#1392)
* feat(undo-redo): support undo-redo on canvas

* fix zoom live subscribe

* progress

* fix subflows

* progress

* fix subflow logic

* pruning stacks

* centralize unique naming logic

* fix type issues

* address greptile comments

* remove timeouts
2025-09-22 16:38:13 -07:00
Waleed
7cb303e713 fix(redirects): move redirects for terms/privacy to client-side redirects (#1418) 2025-09-22 15:10:29 -07:00
Waleed
8eaa83fe21 fix(billing): reset usage on transition from free -> paid plan (#1397)
* fix(billing): reset usage on transition from free -> paid plan

* fixes: pro->team upgrade logic, single org server side check on invite routes

* ui improvements

* cleanup team-members code

* minor renaming

* progress

* fix pro->team upgrade to prevent double billing

* add subscription delete case handler

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-09-22 13:58:29 -07:00
Waleed
5c92d5d456 v0.3.58: trigger.dev updates 2025-09-22 12:58:15 -07:00
Waleed
aa01e7e58a fix(actions): update trigger.dev github action (#1417) 2025-09-22 12:38:31 -07:00
Waleed
a3c76da636 chore(deps): update trigger.dev sdk (#1416) 2025-09-22 12:30:28 -07:00
Waleed
cf19c895bb chore(deps): upgdate trigger.dev cli (#1414) 2025-09-22 12:24:45 -07:00
Waleed
c017027000 v0.3.57: docs updates, generic webhook variables deconstruction, ollama & docker fixes 2025-09-22 12:17:02 -07:00
Waleed
73d779ad79 fix(csp): added terms, privacy, & logo URLs to CSP (#1413) 2025-09-22 12:04:48 -07:00
Emir Karabeg
25781279e2 feat: added favicon (#1410) 2025-09-22 11:14:06 -07:00
Waleed
6fada45cd8 improvement(readme): update readme.md (#1412) 2025-09-22 11:12:25 -07:00
Waleed
e640102797 feat(otp): added environemnt variable to control enforcement of verified accounts (#1411)
* feat(otp): added environemnt variable to control enforcement of verified accounts

* added to helm
2025-09-22 11:04:47 -07:00
Vikhyath Mondreti
16f5819941 fix(missing-user-stats): missing user stats rows covered via migration' (#1409) 2025-09-22 10:50:04 -07:00
Waleed
d83865c635 fix(tools): fixed arxiv tools (#1403) 2025-09-21 12:05:41 -07:00
Waleed
6b4ebbac6e feat(404): added 404 page (#1401)
* feat(404): added 404 page

* use provided brand support email over default sim one
2025-09-20 14:35:44 -07:00
Waleed
708321d0bf fix(tools): added transform response to handle non-json responses for internal tools (#1400) 2025-09-20 14:17:47 -07:00
Waleed
e4d35afe1f improvement(usage): bar execution if limits cannot be determined, init user stats record on user creation instead of in stripe plugin (#1399)
* improvement(usage): bar execution if limits cannot be determined, init user stats record on user creation instead of in stripe plugin

* upsert user stats record in execution logger
2025-09-20 14:08:51 -07:00
Waleed
1d74ccfeda fix(ollama): fix ollama container for CPU vs GPU mode (#1396) 2025-09-20 12:08:44 -07:00
Waleed
545e590ce5 fix(emails): updated path for email assets to absolute rather than relative paths (#1398) 2025-09-20 12:08:34 -07:00
Waleed
93f9293f2c fix(verification): add OTP dev skip (#1395) 2025-09-20 11:31:41 -07:00
Vikhyath Mondreti
b5570c1c0e fix(cursor): misaligned in long inputs (#1388) 2025-09-19 11:49:36 -07:00
Waleed
225571c49a improvement(search): improved filters UI and search suggestions (#1387)
* improvement(search): improved filters UI and search suggestions

* update tool input UI
2025-09-19 11:22:47 -07:00
Waleed
a1c518e4e1 feat(file): add more upload types to the file block (#1386) 2025-09-19 10:07:52 -07:00
Vikhyath Mondreti
04922fe5c9 fix(generic-webhooks): idempotency simplification, generic webhook vars changes (#1384)
* fix(idempotency): simplify for deterministic provider based checks

* remove generic webhook outputs and allow body to be referenced via vars
2025-09-19 10:03:45 -07:00
Waleed
8e70a61ba9 fix(docker): added copilot-related keys to docker container definitions (#1382) 2025-09-18 21:08:25 -07:00
Waleed
abae6b96b5 feat(i18n): update translations (#1381)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-09-18 18:18:17 -07:00
Vikhyath Mondreti
bff1852a85 v0.3.56: i18n, sharepoint operations & logs search improvements 2025-09-18 14:21:14 -07:00
Adam Gough
7327b448e5 Improvement(sharepoint): added ability to create list items, different from create list (#1379)
* added add list items

(cherry picked from commit df6ea35d5bb975c03c7ec0c787bd915f34890ac0)

* bun run lint

* minor changes

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
Co-authored-by: Adam Gough <adamgough@Adams-MacBook-Pro.local>
2025-09-18 14:18:58 -07:00
Waleed
eb1e90bb7f improvement(search): added more granular logs search, added logs export, improved overall search experience (#1378)
* improvement(search): added more granular logs search, added logs export, improved overall search experience

* updated tests
2025-09-18 13:58:44 -07:00
Vikhyath Mondreti
3905d1cb81 fix(selectors): gdrive and slack selectors inf loops (#1376)
* fix(selectors): gdrive and slack selectors inf loops

* remove comment
2025-09-18 11:40:36 -07:00
Waleed
cd084e8236 fix(actions): updated i18n gh action to use PAT instead of default token (#1377) 2025-09-18 11:29:02 -07:00
Waleed
5d96484501 fix(variables): remove quote stripping from short & long inputs (#1375)
* fix(variables): remove quote stripping from short & long inputs

* restore env

* remove quote stripping everywhere

* remove unused file
2025-09-18 11:04:22 -07:00
Waleed
6747a497fc fix(migrations): upgrade drizzle-kit in migrations container (#1374)
* fix(migrations): upgrade drizzle-kit in migrations container

* fix comments

* rm unused file
2025-09-18 11:04:06 -07:00
Waleed
2df65527d3 v0.3.55: landing page / OTP improvements, DB package separation, Webhooks fixes, Sharepoint Improvement 2025-09-17 23:48:35 -07:00
Adam Gough
d0b69455e2 Improvement(sharepoint): added more operations in sharepoint (#1369)
* added list tools

* not working yet

* improved read and create

* added scopes

* updated sharepoint tools

* added greptile comments

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
2025-09-17 19:16:12 -07:00
Vikhyath Mondreti
6028b1f5c0 fix(dockerfile): needs dummy db url (#1368) 2025-09-17 18:56:54 -07:00
Waleed
658cf11299 improvement(idempotency): added atomic claims to prevent duplicate processing for long-running workflows (#1366)
* improvement(idempotency): added atomic claims to prevent duplicate processing for long-running workflows

* ack PR comments
2025-09-17 17:17:55 -07:00
Waleed
6312df3a07 feat(signup): added back to login functionality to OTP page (#1365)
* update infra and remove railway

* feat(signup): added back to login functionalityfrom OTP page

* remove placeholders from docker commands, simplified login flow

* Revert "update infra and remove railway"

This reverts commit abfa2f8d51.
2025-09-17 17:17:37 -07:00
Vikhyath Mondreti
9de7a00373 improvement(code-structure): move db into separate package (#1364)
* improvement(code-structure): move db into separate package

* make db separate package

* remake bun lock

* update imports to not maintain two separate ones

* fix CI for tests by adding dummy url

* vercel build fix attempt

* update bun lock

* regenerate bun lock

* fix mocks

* remove db commands from apps/sim package json
2025-09-17 15:41:13 -07:00
Waleed
325a666a8b improvement(landing): insert prompt into copilot panel from landing, open panel on entry (#1363)
* update infra and remove railway

* improvement(landing): insert prompt into copilot panel from landing, open panel on entry

* Revert "update infra and remove railway"

This reverts commit abfa2f8d51.

* fixes

* remove debug logs

* go back to old env
2025-09-17 12:28:22 -07:00
Vikhyath Mondreti
2149f5e36d v0.3.54: google forms block, new landing page, generic mail tool, billing fixes 2025-09-16 22:13:12 -07:00
Emir Karabeg
009e1da5f1 improvement(platform): ui/ux (#1357)
* improvement: branding; auth; chat-deploy

* improvement: docs favicon

* fix: rolled back verification logic
2025-09-16 21:51:23 -07:00
Vikhyath Mondreti
6101493f12 fix(next-js): pin version (#1358)
* fix(next-js): pin version

* fix
2025-09-16 21:50:52 -07:00
Adam Gough
4b5c2b43e9 feat(google-forms): added google forms block (#1343)
* fix(sidebar): draggable cursor on sidebar when switching workflows (#1276)

* added google form tool to read forms

* added trigger mode and block docs

* updated docs

* removed file

* reverted diff

* greptile comments

* Reverted bun file

* remove outdated code for old webhook modal

* restore ui changes to webhooks

* removed provider specific logic

* fix lint

---------

Co-authored-by: Waleed Latif <walif6@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>
2025-09-16 21:20:59 -07:00
Vikhyath Mondreti
bd402cdda5 fix(layout): fix layout semantics on invite page (#1356) 2025-09-16 21:17:51 -07:00
Emir Karabeg
0c30646a2d improvement: branding; auth; chat-deploy (#1351)
* improvement: branding; auth; chat-deploy

* improvement: docs favicon
2025-09-16 21:16:55 -07:00
Vikhyath Mondreti
53792b9a1d fix bun lock (#1354) 2025-09-16 21:02:11 -07:00
Vikhyath Mondreti
48f86e66f4 fix(better-auth): revert back to version 1.2.9 (#1352) 2025-09-16 20:53:01 -07:00
Waleed
fd422b5d0d feat(sms): add generic sms sending block/tool (#1349)
* update infra and remove railway

* feat(sms): add generic sms sending block/tool

* added docs

* Revert "update infra and remove railway"

This reverts commit abfa2f8d51.

* updated colors

* remove fallbacks, stronger typing
2025-09-16 17:47:15 -07:00
Waleed
17cf72834d improvement(gh): fix i18n github action to run on merge to staging (#1350)
* update infra and remove railway

* improvement(ci): fix i18n github action

* Revert "update infra and remove railway"

This reverts commit abfa2f8d51.
2025-09-16 17:34:53 -07:00
Waleed
3122b506fd feat(tools): add generic mail sending block/tools, updated docs script (#1348)
* update infra and remove railway

* feat(tools): add generic mail sending block/tools, updated docs script

* Revert "update infra and remove railway"

This reverts commit abfa2f8d51.

* remove message id

* updated type
2025-09-16 16:06:31 -07:00
Waleed
a31305b7ee fix(bun): pin bun version for db migrations (#1347)
* fix(migrations): downgrade nextjs

* fix(bun): pin bun version in db migrations

* Revert "fix(migrations): downgrade nextjs"

This reverts commit 27b544f22d.
2025-09-16 14:31:37 -07:00
Emir Karabeg
4f26a7aa73 feat(landing): new landing page (#1219)
* update infra and remove railway

* feat(landing): background; font; metadata; nav

* finished navbar ui

* completed hero UI

* hero heading UI/UX

* updated icon descriptions

* canvas improvements

* canvas improvements

* updated canvas; adjusted background

* removed gsap; adjusted canvas height

* added templates outline

* feat(landing, landing-2): Update background, hero components, nav, integrations, pricing, templates, testimonials, tailwind config

* feat(landing, landing-2): Update background, footer, hero, index components, integrations, landing-pricing, landing templates, footer in sections, icons, middleware

* improvement(landing): optimized html

* feat(landing): update background, footer, hero, integrations, landing-enterprise, landing-pricing, landing-templates, nav, add github-stars route

* feat(landing): added onclicks

* feat(landing): commented out templates

* fix: reset environment

* fixed build

* feat(landing): updated background, footer, index, integrations, landing-pricing, nav, testimonials, landing page, fonts, environment

* feat(landing): swapped integrations and pricing

* navigation for new landing

* login/signup/terms/privacy preliminary changes, as well as navigation setup

* feat(landing,nav,hero,integrations,footer,testimonials,background,structured-data): updates and additions across components

* feat(landing): updated terms and privacy

* feat(auth): adjusted background

* feat(auth): signup and login complete

* feat(auth): completed all flows ui/ux

* fix: testing and build

* feat(landing, auth): update nav and login tests

* fix(ui): update auth navigation component (149 chars)

* restore scripts dir

* revert back to old globals.css brand primary color, updated invite page

* Revert "update infra and remove railway"

This reverts commit abfa2f8d51.

* remove logos

* add gh stars action for reuse on landing + cht

---------

Co-authored-by: waleedlatif1 <walif6@gmail.com>
2025-09-15 21:40:35 -07:00
Waleed
a06ae0d2e7 v0.3.53: logs search, idempotency for webhooks, billing fixes for overage, i18n for docs 2025-09-15 19:53:14 -07:00
Waleed
ab97ac5a77 fix(build): upgrade fumadocs to latest (#1341)
* update infra and remove railway

* fix(builds): upgraded fumadocs

* Revert "update infra and remove railway"

This reverts commit abfa2f8d51.
2025-09-15 19:28:07 -07:00
Waleed
ac8bf96eee fix(build): upgrade fumadocs (#1340)
* update infra and remove railway

* fix(build): fixed the build

* Revert "update infra and remove railway"

This reverts commit abfa2f8d51.
2025-09-15 17:47:34 -07:00
Waleed
d4165f5be6 feat(docs): added footer for page navigation, i18n for docs (#1339)
* update infra and remove railway

* feat(docs): added footer for page navigation, i18n for docs

* Revert "update infra and remove railway"

This reverts commit abfa2f8d51.

* added SEO-related stuff

* fix image sizes

* add missing pages

* remove extraneous comments
2025-09-15 17:31:35 -07:00
Vikhyath Mondreti
994c35f62c fix(stripe): revert to stable versioning for better auth plugin (#1337) 2025-09-15 16:04:28 -07:00
Vikhyath Mondreti
4ce6bc94c3 fix(stripe): use latest version to fix event mismatch issues (#1336)
* fix(stripe): use latest version to fix event mismatch issues

* fix enterprise handling

* cleanup

* update better auth version

* fix overage order of ops

* upgrade better auth version

* fix image typing

* change image type to string | undefined
2025-09-15 15:54:41 -07:00
Adam Gough
ba21d274ec improvement(array-index): resolved variables for 2d arrays (#1328)
* resolved variables for 2d arrays

* added tests

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
Co-authored-by: waleedlatif1 <walif6@gmail.com>
2025-09-15 15:43:20 -07:00
Waleed
d73a97ffa2 feat(idempotency): added generalized idempotency service for all triggers/webhooks (#1330)
* update infra and remove railway

* feat(webhooks): add idempotency service for all triggers/webhooks

* Revert "update infra and remove railway"

This reverts commit abfa2f8d51.

* cleanup

* ack PR comments
2025-09-15 14:50:18 -07:00
Waleed
f2ec43e4f9 feat(logs): added intelligent search with suggestions to logs (#1329)
* update infra and remove railway

* feat(logs): added intelligent search to logs

* Revert "update infra and remove railway"

This reverts commit abfa2f8d51.

* cleanup

* cleanup
2025-09-13 17:32:41 -07:00
Adam Gough
3e5d3735dc changed search for folders and workflows in logs (#1327)
Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
2025-09-13 12:38:50 -07:00
Waleed
172d51e061 fix(security): fix ssrf vuln and path validation for files route (#1325)
* update infra and remove railway

* fix(security): fix ssrf vuln

* fix path validation for file serve

* Revert "update infra and remove railway"

This reverts commit abfa2f8d51.

* lint

* ack PR comments
2025-09-13 11:32:10 -07:00
Vikhyath Mondreti
1ad31c92ac v0.3.52: docs updates, deployment version tables, workspace-level api keys, knowledgebase improvements 2025-09-12 12:14:11 -07:00
Waleed
065fc5b87b feat(api-keys): add workspace level api keys to share with other workspace members, add encryption for api keys (#1323)
* update infra and remove railway

* feat(api-keys): add workspace-level api keys

* encrypt api keys

* Revert "update infra and remove railway"

This reverts commit b23258a5a1.

* reran migrations

* tested workspace keys

* consolidated code

* more consolidation

* cleanup

* consolidate, remove unused code

* add dummy key for ci

* continue with regular path for self-hosted folks that don't have key set

* fix tests

* fix test

* remove tests

* removed ci additions
2025-09-12 11:46:47 -07:00
Adam Gough
3798c56e8c improvement(long-description): modified long description for every block (#1322)
modified long description
2025-09-11 19:26:32 -07:00
Waleed
c591433248 fix(file-upload): fix nextjs file upload issue with pdf-parse (#1321)
* update infra and remove railway

* fix(file-upload): fix nextjs file upload issue with pdf-parse

* Revert "update infra and remove railway"

This reverts commit b23258a5a1.
2025-09-11 14:13:51 -07:00
Vikhyath Mondreti
f0186593a1 chore(deployment-versioning): add migration script into repo (#1318)
* chore(deployment-versioning): add migration script into repo

* add migration

* remove parent id changes
2025-09-11 12:45:31 -07:00
Waleed
6cf02b9b5a fix(kb): exclude deleted docs from embeddings/vector search (#1319)
* update infra and remove railway

* fix(kb): exclude deleted docs from queries

* Revert "update infra and remove railway"

This reverts commit b23258a5a1.
2025-09-11 12:09:03 -07:00
Waleed
2dc75b1ac1 feat(docs): overhaul docs (#1317)
* update infra and remove railway

* overhaul docs

* added a lot more videos/examples to docs

* Revert "update infra and remove railway"

This reverts commit b23258a5a1.

* remove unused lines

* update start block docs

* update agent docs

* update API block docs

* update function block docs

* update response block docs

* update parallel and router docs

* update workflow docs

* update connections docs

* fix(sheets): fixed google sheets update (#1311)

Google sheets append was sending an invalid shape to the google sheets api. This PR fixes this by having similar logic to what is in append.ts

* fix(serializer): Required-field validation now respects sub-block visibility (#1313)

* audit content

* audit content

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
Co-authored-by: Adam Gough <77861281+aadamgough@users.noreply.github.com>
Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
2025-09-11 11:53:56 -07:00
Vikhyath Mondreti
d3f7ef4ac4 fix(serializer): Required-field validation now respects sub-block visibility (#1313) 2025-09-10 19:47:20 -07:00
Adam Gough
9a6cc78332 fix(sheets): fixed google sheets update (#1311)
Google sheets append was sending an invalid shape to the google sheets api. This PR fixes this by having similar logic to what is in append.ts
2025-09-10 17:55:35 -07:00
Waleed
ea8762e99b v0.3.51: mcp support, copilot improvements, polling for live execution data, bug fixes 2025-09-10 14:35:53 -07:00
Waleed
cff0a8718e fix(webhooks): made spacing more clear, added copy button for webhook URL & fixed race condition for mcp tools/server fetching in the mcp block (#1309)
* update infra and remove railway

* fix(webooks-ui): made spacing more clear, added copy button for webhook URL & fixed race condition for mcp tools/server fetching in the mcp block

* Revert "update infra and remove railway"

This reverts commit 5a8876209d.

* remove extraneous comments

* ack PR comments
2025-09-10 14:25:17 -07:00
Vikhyath Mondreti
abca73106d improvement(readme): add e2b reference to readme (#1307) 2025-09-10 10:53:47 -07:00
Waleed
afb99fbaf1 fix(webhook-ui): fixed webhook ui (#1301)
* update infra and remove railway

* fix(webhook-ui): fixed webhook ui

* Revert "update infra and remove railway"

This reverts commit 88669ad0b7.

* feat(control-bar): updated export controls and webhook settings

* additional styling improvements to chat deploy & templates modals

* fix test event

---------

Co-authored-by: Emir Karabeg <emirkarabeg@berkeley.edu>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-09-10 09:35:28 -07:00
Adam Gough
4d973ffb01 Fix(yaml env var): added env var fallback (#1300)
* added env var to route

* lint

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
2025-09-09 18:11:53 -07:00
Vikhyath Mondreti
8841e9bd6b fix(subflow-validation): validate subflow fields correctly + surface serialization errors in the logs correctly (#1299)
* fix(subflow-validation): validate subflow fields correctly + surface serialiazation errors in the logs correctly

* remove comments
2025-09-09 18:02:30 -07:00
Waleed
3d4b9f0665 feat(mcp): added support for mcp servers (#1296)
* update infra and remove railway

* feat(mcp): add mcp support

* consolidate mcp utils

* UI improvements, more MCP stuff

* cleanup placeholders

* reran migrations

* general improvements

* fix server side mcp exec

* more improvements, fixed search in environment settings tab

* persist subblock values for mcp block

* style fixes

* udpdate all text-primary to text-muted-foreground for visibility in dark mode

* Revert "update infra and remove railway"

This reverts commit dbf2b153b8f96808e7bb7e5f86f7e8624e3c12dd.

* make MCP servers workspace-scoped

* cleanup & remove unused dep

* consolidated utils, DRY

* added tests

* better error messages, confirmed that permissions works correctly

* additional improvements

* remove extraneous comments

* reran migrations

* lint

* style changes

* fix: prevent config mutation in MCP client URL retry logic

Fixed an issue where the MCP client was mutating the shared configuration
object's URL during retry attempts. This could cause configuration corruption
if the same config object was reused elsewhere.

* resolve PR comments

* ack PR comments
2025-09-09 17:18:08 -07:00
Vikhyath Mondreti
c48039f97f improvement(subblock-defaults): custom defaults for subblocks if needed (#1298) 2025-09-09 17:12:10 -07:00
Waleed
8f7b11f089 feat(account): added user profile pictures in settings (#1297)
* update infra and remove railway

* feat(account): add profile pictures

* Revert "update infra and remove railway"

This reverts commit e3f0c49456.

* ack PR comments, use brandConfig logo URL as default
2025-09-09 16:09:31 -07:00
Waleed
ae670a7819 fix(start-input): restore tag dropdown in input-format component (#1294)
* update infra and remove railway

* fix(input-format): restore tag dropdown in input-format component

* Revert "update infra and remove railway"

This reverts commit 7ade5fb2ef.

* style improvements
2025-09-09 12:58:21 -07:00
Vikhyath Mondreti
a5c224e4b0 fix(workflow-block): remove process specific circular dependency check (#1293)
* fix(workflow-block): remove process specific circular dep check

* remove comments
2025-09-09 12:50:25 -07:00
Vikhyath Mondreti
0785f6e920 feat(logs-api): expose logs as api + can subscribe to workflow execution using webhook url (#1287)
* feat(logs-api): expose logs as api + can subscribe to workflow exection using webhook url

* fix scroll

* Update apps/docs/content/docs/execution/api.mdx

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* fix rate limits

* address greptile comments

* remove unused file

* address more greptile comments

* minor UI changes

* fix atomicity to prevent races

* make search param sensible

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-09-09 11:34:18 -07:00
Siddharth Ganesan
cf4a935575 Merge pull request #1286 from simstudioai/fix/copilot-custom-tools
fix(copilot): custom tools
2025-09-08 17:23:58 -07:00
Siddharth Ganesan
521316bb8c Lint 2025-09-08 16:39:57 -07:00
Vikhyath Mondreti
d357280003 feat(usage-api): make external endpoint to query usage (#1285)
* feat(usage-api): make external endpoint to query usage

* add docs

* consolidate endpoints with rate-limits one

* update docs

* consolidate code

* remove unused route
2025-09-08 16:35:58 -07:00
Siddharth Ganesan
adf8c2244c Fix custom tool save 2025-09-08 15:46:59 -07:00
Siddharth Ganesan
ebfdb9ce3b V1 2025-09-08 15:23:15 -07:00
Vikhyath Mondreti
784992f347 v0.3.50: debounce moved server side, hasWorkflowChanged fixes, advanced mode/serializer fix, jira fix, billing notifs 2025-09-08 11:53:44 -07:00
Waleed
5218dd41b9 fix(notifications): increase precision on billing calculations (#1283)
* update infra and remove railway

* fix(notifications): increase precision on billing calculations

* Revert "update infra and remove railway"

This reverts commit d17603e844.

* cleanup
2025-09-08 10:46:23 -07:00
Waleed
07e70409c7 feat(notifications): added notifications for usage thresholds, overages, and welcome emails (#1266)
* feat(notifications): added notifications for usage thresholds, overages, and welcome emails

* cleanup

* updated logo, ack PR comments

* ran migrations
2025-09-08 09:47:16 -07:00
Adam Gough
07ba17422b Fix(jira): reading multiple issues and write
fixed the read and write tools in jira
2025-09-06 20:48:49 -07:00
Waleed
d45324bb83 fix(sidebar): draggable cursor on sidebar when switching workflows (#1276) 2025-09-06 19:52:23 -07:00
Vikhyath Mondreti
ced64129da fix(subblock-param-mapping): consolidate resolution of advanced / basic mode params using canonicalParamId (#1274)
* fix(serializer): block's params mapper not running first

* fix

* fix

* revert

* add canonicalParamId

* fix

* fix tests

* fix discord

* fix condition checking

* edit condition check

* fix

* fix subblock config check

* fix

* add logging

* add more logs

* fix

* fix

* attempt

* fix discord

* remove unused discord code

* mark as required correctly
2025-09-06 17:33:49 -07:00
Vikhyath Mondreti
1e14743391 fix(sockets): move debounce to server side (#1265)
* fix(sockets): move debounce to server side

* remove comments / unused onBlur
2025-09-06 12:49:35 -07:00
Waleed
a0bb754c8c 0.3.49: readme updates, router block and variables improvements 2025-09-05 14:58:39 -07:00
Waleed
851031239d fix(variables): add back ability to reference root block like <start> (#1262) 2025-09-05 14:45:26 -07:00
Waleed
3811b509ef fix(router): change router block content to prompt (#1261)
* fix(router): remove prompt from router content

* fixed router
2025-09-05 13:39:04 -07:00
Vikhyath Mondreti
abb835d22d fix(schedule-self-host): remove incorrect migration (#1260)
* fix(schedule-self-host): remove incorrect migration

* delete unintentional file
2025-09-05 11:52:39 -07:00
Vikhyath Mondreti
f2a046ff24 improvement(docs): readme.md to mention .env setup for copilot setup 2025-09-05 11:01:54 -07:00
Vikhyath Mondreti
bd6d4a91a3 0.3.48: revert trigger dev bypass for enterprise users 2025-09-04 23:57:22 -07:00
Vikhyath Mondreti
21beca8fd5 fix(cleanup): cleanup unused vars + webhook typo (#1259) 2025-09-04 23:52:31 -07:00
Vikhyath Mondreti
0a86eda853 Revert "feat(enterprise-plan-webhooks): skip webhook queue for enterprise plan users (#1250)" (#1257)
This reverts commit 37dcde2afc.
2025-09-04 23:37:19 -07:00
Waleed
60a061e38a v0.3.47: race condition fixes, store rehydration consolidation, other bugs 2025-09-04 22:36:42 -07:00
Waleed
ab71fcfc49 feat(invitations): add ability to resend invitations with cooldown, fixed UI in dark mode issues (#1256) 2025-09-04 22:15:27 -07:00
Vikhyath Mondreti
864622c1dc fix(ratelimits): enterprise and team checks should be pooled limit (#1255)
* fix(ratelimits): enterprise and team checks should be pooled limit"

* fix

* fix dynamic imports

* fix tests"
;
2025-09-04 21:44:56 -07:00
Waleed
8668622d66 feat(duplicate): duplicate variables when duplicating a workflow (#1254)
* feat(duplicate): duplicate variables when duplicating a workflow

* better typing
2025-09-04 21:20:30 -07:00
Waleed
53dd277cfe fix(cost): restored cost reporting for agent block in console entry (#1253) 2025-09-04 21:12:15 -07:00
Vikhyath Mondreti
0e8e8c7a47 fix(sidebar): order by created at (#1251) 2025-09-04 20:23:00 -07:00
Vikhyath Mondreti
47da5eb6e8 fix(rehydration): consolidate store rehydration code (#1249)
* fix(rehydration): consolidate store rehydration code

* fix stale closure
2025-09-04 20:00:51 -07:00
Vikhyath Mondreti
37dcde2afc feat(enterprise-plan-webhooks): skip webhook queue for enterprise plan users (#1250)
* feat(enterprise-plan-webhooks): skip webhook queue for enterprise plan users

* reuse subscription record instead of making extra db call
2025-09-04 20:00:24 -07:00
Vikhyath Mondreti
e31627c7c2 fix(sidebar): re-ordering based on last edit is confusing (#1248) 2025-09-04 18:30:59 -07:00
Vikhyath Mondreti
57c98d86ba fix(race-condition-workflow-switching): another race condition between registry and workflow stores (#1247)
* fix(race-condition-workflow-switching): another race condition between regitry and workflow stores"

* fix initial load race cond + cleanup

* fix initial load issue + simplify
2025-09-04 18:02:00 -07:00
Vikhyath Mondreti
0f7dfe084a fix(hydration): duplicate overlay after idle + subblocks race condition (#1246)
* fix(hydration): duplicate overlay after idle + subblocks race condition

* remove random timeout

* re-use correct helper

* remove redundant check

* add check

* remove third init func
2025-09-04 16:18:35 -07:00
Siddharth Ganesan
afc1632830 Merge pull request #1245 from simstudioai/fix/copilot-billing
improvement(copilot): billing multiplier adjustments
2025-09-04 12:05:17 -07:00
Siddharth Ganesan
56eee2c2d2 Waring 2025-09-04 11:37:06 -07:00
Siddharth Ganesan
fc558a8eef Lint + tests 2025-09-04 11:35:03 -07:00
Siddharth Ganesan
c68cadfb84 Docs 2025-09-04 11:27:54 -07:00
Siddharth Ganesan
95d93a2532 change 2025-09-04 11:23:36 -07:00
Siddharth Ganesan
59b2023124 Lint 2025-09-04 11:19:41 -07:00
Siddharth Ganesan
a672f17136 Add input/output multipliers 2025-09-04 11:19:00 -07:00
Waleed
1de59668e4 fix(whitelabel): move redirects (build-time) for whitelabeling to middlware (runtime) (#1236) 2025-09-03 16:36:47 -07:00
Waleed
26243b99e8 fix(code-subblock): added validation to not parse non-variables as variables in the code subblock (#1240)
* fix(code-subblock): added validation to not parse non-variables as variables in the code subblock

* fix wand prompt bar styling

* fix error message for available connected blocks to only show connected available blocks, not block ID's

* ui
2025-09-03 16:09:02 -07:00
Siddharth Ganesan
fce1423d05 v0.3.46: fix copilot stats updates
v0.3.46: fix copilot stats updates
2025-09-03 13:26:00 -07:00
Siddharth Ganesan
3656d3d7ad Updates (#1237) 2025-09-03 13:19:34 -07:00
Waleed
581929bc01 v0.3.45: fixes for organization invites, custom tool execution 2025-09-03 08:31:56 -07:00
Waleed
11d8188415 fix(rce): always use VM over RCE for custom tools (#1233) 2025-09-03 08:16:50 -07:00
Waleed
36c98d18e9 fix(team): fix organization invitation URL for teams (#1232) 2025-09-03 08:05:38 -07:00
Waleed
0cf87e650d v0.3.44: removing unused routes, whitelabeling terms & policy URLs, e2b remote code execution, copilot improvements 2025-09-02 21:29:55 -07:00
Waleed
baef8d77f9 fix(styling): fix styling inconsistencies in dark mode, fix invites fetching to show active members (#1229)
* fix(styling): fix unreadble text in dark mode

* fix styling inconsistencies in kb

* refetch permissions on invite modal open

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
2025-09-02 21:17:15 -07:00
Vikhyath Mondreti
b74ab46820 fix(e2b-env-var): use isTruthy and getEnv (#1228) 2025-09-02 20:03:43 -07:00
Waleed
533b4c53e0 feat(tools): add MongoDB (#1225)
* added mongo, haven't tested

* fixed bugs, refined prompts, added billing for wand if billing enabled

* add docs

* ack PR comments
2025-09-02 18:55:45 -07:00
Siddharth Ganesan
c2d668c3eb feat(copilot): stats tracking (#1227)
* Add copilot stats table schema

* Move db to agent

* Lint

* Fix tests
2025-09-02 18:17:50 -07:00
Vikhyath Mondreti
1a5d5ddffa feat(e2b-execution): add remote code execution to support Python + Imports (#1226)
* feat(e2b-execution): add remote code execution via e2b

* ux improvements

* fix streaming

* progress

* fix tooltip text

* make supported languages an enum

* fix error handling

* fix tests
2025-09-02 18:15:29 -07:00
Waleed
9de0d91f9a feat(llms): added additional params to llm-based blocks for alternative models (#1223)
* feat(llms): added additional params to llm-based blocks for alternative models

* add hidden temp param to other LLM-based blocks
2025-09-02 13:29:03 -07:00
Waleed
3db73ff721 fix(whitelabel): make terms and privacy URL envvars available at build time (#1222) 2025-09-02 12:54:30 -07:00
Vikhyath Mondreti
9ffb48ee02 make 79th migration idempotent 2025-09-02 10:48:22 -07:00
Vikhyath Mondreti
1f2a317ac2 fix if not exists check 2025-09-02 10:39:53 -07:00
Vikhyath Mondreti
a618d289d8 add if not exists check 2025-09-02 10:38:33 -07:00
Vikhyath Mondreti
461d7b2342 Merge branch 'staging' of github.com:simstudioai/sim into staging 2025-09-02 10:27:08 -07:00
Vikhyath Mondreti
4273161c0f fix 80th migration 2025-09-02 10:26:57 -07:00
Waleed
54d42b33eb fix(wand): remove duplicate transfer encoding header meant to be set by nginx proxy (#1221) 2025-09-02 09:15:25 -07:00
Waleed
2c2c32c64b improvement(hygiene): refactored routes to be more restful, reduced code surface area and removed redundant code (#1217)
* improvement(invitations): consolidate invite-error and invite pages, made API endpoints more restful and reduced code surface area for invitations by 50%

* refactored logs API routes

* refactor rate limit api route, consolidate usage check api endpoint

* refactored chat page and invitations page

* consolidate ollama and openrouter stores to just providers store

* removed unused route

* removed legacy envvar methods

* remove dead, legacy routes for invitations PUT and workflow SYNC

* improvement(copilot): improve context inputs and fix some bugs (#1216)

* Add logs v1

* Update

* Updates

* Updates

* Fixes

* Fix current workflow in context

* Fix mentions

* Error handling

* Fix chat loading

* Hide current workflow from context

* Run workflow fix

* Lint

* updated invitation log

* styling for invitation pages

---------

Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>
2025-09-01 21:22:23 -07:00
Waleed
65e861822c fix(ui): dark mode styling for switch, trigger modal UI, signup/login improvements with auto-submit for OTP (#1214)
* fix(ui): fix dark mode styling for switch, fix trigger modal UI

* auto-submit OTP when characters are entered

* trim leading and trailing whitespace from name on signup, throw more informative error messages on reset pass
2025-09-01 21:19:12 -07:00
Siddharth Ganesan
12135d2aa8 improvement(copilot): improve context inputs and fix some bugs (#1216)
* Add logs v1

* Update

* Updates

* Updates

* Fixes

* Fix current workflow in context

* Fix mentions

* Error handling

* Fix chat loading

* Hide current workflow from context

* Run workflow fix

* Lint
2025-09-01 16:51:58 -07:00
Waleed
f75c807580 improvement(performance): added new indexes for improved session performance (#1215) 2025-09-01 16:00:15 -07:00
Vikhyath Mondreti
9ea7ea79e9 feat(workspace-vars): add workspace scoped environment + fix cancellation of assoc. workspace invites if org invite cancelled (#1208)
* feat(env-vars): workspace scoped environment variables

* fix cascade delete or workspace invite if org invite with attached workspace invites are created

* remove redundant refetch

* feat(env-vars): workspace scoped environment variables

* fix redirect for invitation error, remove check for validated emails on workspace invitation accept

* styling improvements

* remove random migration code

* stronger typing, added helpers, parallelized envvar encryption

---------

Co-authored-by: waleedlatif1 <walif6@gmail.com>
2025-09-01 15:56:58 -07:00
Waleed
5bbb349d8a fix(build): add missing pdf-parse dep, add docker build in staging (#1213)
* fix(build): add missing pdf-parse dep

* add docker build (no push) in staging
2025-09-01 13:04:16 -07:00
Waleed
ea09fcecb7 fix(build): consolidate pdf parsing dependencies, remove extraneous html deps (#1212)
* fix(build): consolidate pdf parsing dependencies, remove extraneous html deps

* add types
2025-09-01 10:19:24 -07:00
Waleed
9ccb7600f9 fix(organizations): remove org calls when billing is disabled (#1211) 2025-09-01 09:48:58 -07:00
Waleed
ee17cf461a v0.3.43: added additional parsers, mysql block improvements, billing fixes, permission fixes 2025-08-31 01:01:24 -07:00
Waleed
43cb124d97 fix(parsers): fix md, pptx, html kb uploads (#1209)
* fix md, pptx, html

* consolidate consts
2025-08-31 00:52:42 -07:00
Waleed
76889fde26 fix(permissions): remove permissions granted by org membership (#1206)
* fix(permissions): remove cross-functional permissions granted by org membership

* code hygiene
2025-08-30 18:14:01 -07:00
Vikhyath Mondreti
7780d9b32b fix(enterprise-billing): simplification to be fixed-cost (#1196)
* fix(enterprise-billing): simplify

* conceptual improvement

* add seats to enterprise sub meta

* correct type

* fix UI

* send emails to new enterprise users

* fix fallback

* fix merge conflict issue

---------

Co-authored-by: waleedlatif1 <walif6@gmail.com>
2025-08-30 17:26:17 -07:00
Waleed
4a703a02cb improvement(tools): update mysql to respect ssl pref (#1205) 2025-08-30 13:48:39 -07:00
Waleed
a969d09782 feat(parsers): added pptx, md, & html parsers (#1202)
* feat(parsers): added pptx, md, & html parsers

* ack PR comments

* file renaming, reorganization
2025-08-30 02:11:01 -07:00
Waleed
0bc778130f v0.3.42: kb config defaults, downgrade nextjs 2025-08-29 21:51:00 -07:00
Waleed
df3d532495 fix(deps): downgrade nextjs (#1200) 2025-08-29 21:44:51 -07:00
Waleed
f4f8fc051e improvement(kb): add fallbacks for kb configs (#1199) 2025-08-29 21:09:09 -07:00
Waleed
76fac13f3d v0.3.41: wand with azure openai, generic mysql and postgres blocks 2025-08-29 19:19:29 -07:00
Waleed
a3838302e0 feat(kb): add adjustable concurrency and batching to uploads and embeddings (#1198) 2025-08-29 18:37:23 -07:00
Waleed
4310dd6c15 imporvement(pg): added wand config for writing sql queries for generic db blocks & supabase postgrest syntax (#1197)
* add parallel ai, postgres, mysql, slight modifications to dark mode styling

* bun install frozen lockfile

* new deps

* improve security, add wand to short input and update wand config
2025-08-29 18:32:07 -07:00
Waleed
813a0fb741 feat(tools): add parallel ai, postgres, mysql, slight modifications to dark mode styling (#1192)
* add parallel ai, postgres, mysql, slight modifications to dark mode styling

* bun install frozen lockfile

* new deps
2025-08-29 17:25:02 -07:00
Waleed
7e23e942d7 fix(billing-ui): open settings when enterprise sub folks press usage indicator (#1194) 2025-08-29 16:11:32 -07:00
Siddharth Ganesan
7fcbafab97 Use direct fetch (#1193) 2025-08-29 16:10:36 -07:00
Siddharth Ganesan
056dc2879c Fix/wand (#1191)
* Switch to node

* Refactor
2025-08-29 15:50:26 -07:00
Siddharth Ganesan
1aec32b7e2 Switch to node (#1190) 2025-08-29 15:18:07 -07:00
Vikhyath Mondreti
316c9704af Merge pull request #1189 from simstudioai/staging
fix(deps): revert dependencies to before pg block was added
2025-08-29 14:28:31 -07:00
Vikhyath Mondreti
4e3a3bd1b1 run bun install 2025-08-29 14:23:31 -07:00
Vikhyath Mondreti
36773e8cdb Revert "feat(integrations): added parallel AI, mySQL, and postgres block/tools (#1126)"
This reverts commit 766279bb8b.
2025-08-29 14:14:45 -07:00
Vikhyath Mondreti
7ac89e35a1 revert(dep-changes): revert drizzle-orm version and change CI yaml script 2025-08-29 13:51:36 -07:00
Vikhyath Mondreti
faa094195a change bun install to be based on frozen-lockfile flag"
"
2025-08-29 13:42:20 -07:00
Vikhyath Mondreti
69319d21cd revert drizzle-orm version 2025-08-29 13:36:57 -07:00
Vikhyath Mondreti
8362fd7a83 remove bun lock 2025-08-29 13:34:46 -07:00
Vikhyath Mondreti
39ad793a9a revert package.json 2025-08-29 13:34:19 -07:00
Waleed
921c755711 v0.3.40: drizzle fixes, custom postgres port support 2025-08-29 10:24:40 -07:00
Waleed
41ec75fcad fix(pg): fix POSTGRES_PORT envvar to map external port to 5432 internally (#1187) 2025-08-29 10:11:37 -07:00
Waleed
f2502f5e48 fix(database): revert changes related to db URL (#1185)
* fix(database): revert changes related to db URL

* cleanup
2025-08-29 09:33:40 -07:00
Vikhyath Mondreti
f3c4f7e20a fix 2025-08-29 00:35:15 -07:00
Vikhyath Mondreti
f578f43c9a graceful exit for drizzle migration 2025-08-29 00:25:47 -07:00
Vikhyath Mondreti
5c73038023 fix(db): attempt parsing cert and db url separately (#1183) 2025-08-29 00:17:05 -07:00
Waleed
92132024ca fix(db): accept self-signed certs (#1181) 2025-08-28 23:19:43 -07:00
Waleed
ed11456de3 fix(db): accept self-signed certs (#1181) 2025-08-28 23:19:02 -07:00
Waleed
8739a3d378 fix(ssl): add envvar for optional ssl cert (#1179) 2025-08-28 23:11:21 -07:00
Waleed
ca015deea9 fix(ssl): add envvar for optional ssl cert (#1179) 2025-08-28 23:00:43 -07:00
Waleed
fd6d927228 v0.3.40: copilot improvements, knowledgebase improvements, security improvements, billing fixes 2025-08-28 22:00:58 -07:00
Adam Gough
6ac59a3264 Revert "fix(cursor-and-input): fixes cursor and input canvas error (#1168)" (#1178)
This reverts commit aa84c75360.
2025-08-28 21:06:30 -07:00
Adam Gough
aa84c75360 fix(cursor-and-input): fixes cursor and input canvas error (#1168)
* fixed long input

* lint

* fix gray canvas

* fixed auto-pan

* remove duplicate useEffect

* fix auto-pan for wide mode

* removed any

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
2025-08-28 20:17:10 -07:00
Vikhyath Mondreti
ebb8cf8bf9 fix(slack): set depends on for slack channel channel subblock (#1177)
* fix(slack): set depends on for slack channel

* use foreign credential check

* fix

* fix clearing of block
2025-08-28 20:11:30 -07:00
Siddharth Ganesan
cadfcdbfbd Fix (#1176) 2025-08-28 19:21:29 -07:00
Vikhyath Mondreti
7d62c200fa feat(openrouter): add open router to model block (#1172)
* feat(openrouter): add open router to model block

* improvement(openrouter): streaming fix, temperature fix

* pr comments

---------

Co-authored-by: waleedlatif1 <walif6@gmail.com>
2025-08-28 18:47:36 -07:00
Siddharth Ganesan
df646256b3 Revert "feat(debug): create debugger (#1174)" (#1175)
This reverts commit 7c73f5ffe0.
2025-08-28 18:46:40 -07:00
Siddharth Ganesan
7c73f5ffe0 feat(debug): create debugger (#1174)
* Updates

* Updates

* Updates

* Checkpoint

* Checkpoint

* Checkpoitn

* Var improvements

* Fixes

* Execution status

* UI improvements

* Ui updates

* Fix

* Fix scoping

* Fix workflow vars

* Fix env vars

* Remove number styling

* Variable highlighting

* Updates

* Update

* Fix resume

* Stuff

* Breakpoint ui

* Ui

* Ui updates

* Loops and parallels

* HIde env vars

* Checkpoint

* Stuff

* Panel toggle

* Lint
2025-08-28 18:19:20 -07:00
Waleed
bb5f40a027 feat(pg): added ability to customize postgres port when running containerized app (#1173) 2025-08-28 17:16:24 -07:00
Waleed
5ae5429296 chore(deps): upgrade trigger.dev in gh action (#1171) 2025-08-28 17:08:59 -07:00
Waleed
fcf128f6db improvement(knowledge): remove innerJoin and add id identifiers to results, updated docs (#1170)
* improvement(knowledge): remove innerJoin and add id identifiers to results, updated docs

* cleanup

* add documentName to upload chunk op as well
2025-08-28 17:04:31 -07:00
Vikhyath Mondreti
56543dafb4 fix(billing): usage tracking cleanup, shared pool of limits for team/enterprise (#1131)
* fix(billing): team usage tracking cleanup, shared pool of limits for team

* address greptile commments

* fix lint

* remove usage of deprecated cols"

* update periodStart and periodEnd correctly

* fix lint

* fix type issue

* fix(billing): cleaned up billing, still more work to do on UI and population of data and consolidation

* fix upgrade

* cleanup

* progress

* works

* Remove 78th migration to prepare for merge with staging

* fix migration conflict

* remove useless test file

* fix

* Fix undefined seat pricing display and handle cancelled subscription seat updates

* cleanup code

* cleanup to use helpers for pulling pricing limits

* cleanup more things

* cleanup

* restore environment ts file

* remove unused files

* fix(team-management): fix team management UI, consolidate components

* use session data instead of subscription data in settings navigation

* remove unused code

* fix UI for enterprise plans

* added enterprise plan support

* progress

* billing state machine

* split overage and base into separate invoices

* fix badge logic

---------

Co-authored-by: waleedlatif1 <walif6@gmail.com>
2025-08-28 17:00:48 -07:00
Emir Karabeg
7cc4574913 improvement(knowledge): search returns document name (#1167) 2025-08-28 16:07:22 -07:00
Waleed
3f900947ce improvement(kb): use trigger.dev for kb tasks (#1166) 2025-08-28 12:14:31 -07:00
Waleed
bda8ee772a fix(security): strengthen email invite validation logic, fix invite page UI (#1162)
* fix(security): strengthen email ivnite validation logic, fix invite page UI

* ui
2025-08-28 00:03:03 -07:00
Siddharth Ganesan
104d34cc9e fix(copilot): context filtering (#1160)
* Add filter

* Scope kb and chats

* Lint

* Remove comments

* Lint
2025-08-27 22:57:28 -07:00
Siddharth Ganesan
06e9a6b302 feat(copilot): context (#1157)
* Copilot updates

* Set/get vars

* Credentials opener v1

* Progress

* Checkpoint?

* Context v1

* Workflow references

* Add knowledge base context

* Blocks

* Templates

* Much better pills

* workflow updates

* Major ui

* Workflow box colors

* Much i mproved ui

* Improvements

* Much better

* Add @ icon

* Welcome page

* Update tool names

* Matches

* UPdate ordering

* Good sort

* Good @ handling

* Update placeholder

* Updates

* Lint

* Almost there

* Wrapped up?

* Lint

* Builid error fix

* Build fix?

* Lint

* Fix load vars
2025-08-27 21:07:51 -07:00
Waleed
fed4e507cc fix(signup): refetch session data on signup (#1155) 2025-08-27 20:01:04 -07:00
Waleed
389456e0f3 fix(envvars): fix split for pasting envvars with query params (#1156) 2025-08-27 19:55:54 -07:00
Vikhyath Mondreti
c720f23d9b fix(sockets): useCollabWorkflow cleanup, variables store logic simplification (#1154)
* fix(sockets): useCollabWorkflow cleanup, variables store logic simplification

* remove unecessary check
2025-08-27 17:11:39 -07:00
Vikhyath Mondreti
89f7d2b943 improvement(sockets): cleanup debounce logic + add flush mechanism to… (#1152)
* improvement(sockets): cleanup debounce logic + add flush mechanism to not lose ops

* fix optimistic update overwritten race condition

* fix

* fix forever stuck in processing
2025-08-27 11:35:20 -07:00
Emir Karabeg
923c05239c fix(auto-layout): revert (#1148) 2025-08-26 23:24:09 -07:00
Waleed
3424a338b7 fix(security): fixed SSRF vulnerability (#1149) 2025-08-26 23:11:08 -07:00
Waleed
51b1e97fa2 fix(kb-uploads): created knowledge, chunks, tags services and use redis for queueing docs in kb (#1143)
* improvement(kb): created knowledge, chunks, tags services and use redis for queueing docs in kb

* moved directories around

* cleanup

* bulk create docuemnt records after upload is completed

* fix(copilot): send api key to sim agent (#1142)

* Fix api key auth

* Lint

* ack PR comments

* added sort by functionality for headers in kb table

* updated

* test fallback from redis, fix styling

* cleanup copilot, fixed tooltips

* feat: local auto layout (#1144)

* feat: added llms.txt and robots.txt (#1145)

* fix(condition-block): edges not following blocks, duplicate issues (#1146)

* fix(condition-block): edges not following blocks, duplicate issues

* add subblock update to setActiveWorkflow

* Update apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/condition-input.tsx

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* fix dependency array

* fix(copilot-cleanup): support azure blob upload in copilot, remove dead code & consolidate other copilot files (#1147)

* cleanup

* support azure blob image upload

* imports cleanup

* PR comments

* ack PR comments

* fix key validation

* improvement(forwarding+excel): added forwarding and improve excel read (#1136)

* added forwarding for outlook

* lint

* improved excel sheet read

* addressed greptile

* fixed bodytext getting truncated

* fixed any type

* added html func

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>

* revert agent const

* update docs

---------

Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>
Co-authored-by: Emir Karabeg <78010029+emir-karabeg@users.noreply.github.com>
Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
Co-authored-by: Adam Gough <77861281+aadamgough@users.noreply.github.com>
Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
2025-08-26 22:55:18 -07:00
Adam Gough
ab74b13802 improvement(forwarding+excel): added forwarding and improve excel read (#1136)
* added forwarding for outlook

* lint

* improved excel sheet read

* addressed greptile

* fixed bodytext getting truncated

* fixed any type

* added html func

---------

Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
2025-08-26 21:18:09 -07:00
Vikhyath Mondreti
861ab1446a Merge branch 'staging' of github.com:simstudioai/sim into staging 2025-08-26 20:09:13 -07:00
Vikhyath Mondreti
e6f519a5a6 fix dependency array 2025-08-26 20:08:37 -07:00
Waleed
8226e7b40a fix(copilot-cleanup): support azure blob upload in copilot, remove dead code & consolidate other copilot files (#1147)
* cleanup

* support azure blob image upload

* imports cleanup

* PR comments

* ack PR comments

* fix key validation
2025-08-26 20:06:43 -07:00
Vikhyath Mondreti
b177b291cf fix(condition-block): edges not following blocks, duplicate issues (#1146)
* fix(condition-block): edges not following blocks, duplicate issues

* add subblock update to setActiveWorkflow

* Update apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/condition-input.tsx

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-08-26 19:51:55 -07:00
Emir Karabeg
9c3b43325b feat: added llms.txt and robots.txt (#1145) 2025-08-26 19:04:27 -07:00
Emir Karabeg
973a5c6497 feat: local auto layout (#1144) 2025-08-26 19:03:09 -07:00
Siddharth Ganesan
78437c688e fix(copilot): send api key to sim agent (#1142)
* Fix api key auth

* Lint
2025-08-26 16:01:42 -07:00
Vikhyath Mondreti
3b74250335 fix(subblock-race-condition): check loading state correctly (#1141)
* fix(subblock-race-condition): check loading state correctly"
;

* clean up

* remove useless comments

* fix date fallback
2025-08-26 12:14:58 -07:00
Waleed
c68800c772 feat(login): add terms and privacy to signup and login pages (#1139) 2025-08-26 11:19:17 -07:00
Siddharth Ganesan
5403665fa9 Docs update (#1140) 2025-08-26 11:16:07 -07:00
Siddharth Ganesan
3d3443f68e fix(copilot): enterprise api keys (#1138)
* Copilot enterprise

* Fix validation and enterprise azure keys

* Lint

* update tests

* Update

* Lint

* Remove hardcoded ishosted

* Lint

* Updatse

* Add tests
2025-08-26 10:55:08 -07:00
Emir Karabeg
e5c0b14367 improvement(help-modal): ui/ux (#1135) 2025-08-25 19:36:38 -07:00
Siddharth Ganesan
a495516901 feat(copilot): enable azure openai and move key validation (#1134)
* Copilot enterprise

* Fix validation and enterprise azure keys

* Lint

* update tests

* Update

* Lint

* Remove hardcoded ishosted

* Lint
2025-08-25 18:03:08 -07:00
Waleed
1f9b4a8ef0 fix(wand): remove unstable__noStore and remove, add additional logs for wand generation (#1133)
* feat(wand): added additional logs for wand generation

* remove unstable__noStore
2025-08-25 16:20:41 -07:00
Waleed
3372829c30 fix(wand): remove edge runtime for wand (#1132) 2025-08-25 14:21:27 -07:00
Waleed
45372aece5 fix(files): fix vulnerabilities in file uploads/deletes (#1130)
* fix(vulnerability): fix arbitrary file deletion vuln

* fix(uploads): fix vuln during upload

* cleanup
2025-08-25 11:26:42 -07:00
5727 changed files with 1260517 additions and 200338 deletions

View File

@@ -0,0 +1,35 @@
---
description: EMCN component library patterns
globs: ["apps/sim/components/emcn/**"]
---
# EMCN Components
Import from `@/components/emcn`, never from subpaths (except CSS files).
## CVA vs Direct Styles
**Use CVA when:** 2+ variants (primary/secondary, sm/md/lg)
```tsx
const buttonVariants = cva('base-classes', {
variants: { variant: { default: '...', primary: '...' } }
})
export { Button, buttonVariants }
```
**Use direct className when:** Single consistent style, no variations
```tsx
function Label({ className, ...props }) {
return <Primitive className={cn('style-classes', className)} {...props} />
}
```
## Rules
- Use Radix UI primitives for accessibility
- Export component and variants (if using CVA)
- TSDoc with usage examples
- Consistent tokens: `font-medium`, `text-[12px]`, `rounded-[4px]`
- `transition-colors` for hover states

20
.cursor/rules/global.mdc Normal file
View File

@@ -0,0 +1,20 @@
---
description: Global coding standards that apply to all files
alwaysApply: true
---
# Global Standards
You are a professional software engineer. All code must follow best practices: accurate, readable, clean, and efficient.
## Logging
Import `createLogger` from `sim/logger`. Use `logger.info`, `logger.warn`, `logger.error` instead of `console.log`.
## Comments
Use TSDoc for documentation. No `====` separators. No non-TSDoc comments.
## Styling
Never update global styles. Keep all styling local to components.
## Package Manager
Use `bun` and `bunx`, not `npm` and `npx`.

View File

@@ -0,0 +1,56 @@
---
description: Core architecture principles for the Sim app
globs: ["apps/sim/**"]
---
# Sim App Architecture
## Core Principles
1. **Single Responsibility**: Each component, hook, store has one clear purpose
2. **Composition Over Complexity**: Break down complex logic into smaller pieces
3. **Type Safety First**: TypeScript interfaces for all props, state, return types
4. **Predictable State**: Zustand for global state, useState for UI-only concerns
## Root-Level Structure
```
apps/sim/
├── app/ # Next.js app router (pages, API routes)
├── blocks/ # Block definitions and registry
├── components/ # Shared UI (emcn/, ui/)
├── executor/ # Workflow execution engine
├── hooks/ # Shared hooks (queries/, selectors/)
├── lib/ # App-wide utilities
├── providers/ # LLM provider integrations
├── stores/ # Zustand stores
├── tools/ # Tool definitions
└── triggers/ # Trigger definitions
```
## Feature Organization
Features live under `app/workspace/[workspaceId]/`:
```
feature/
├── components/ # Feature components
├── hooks/ # Feature-scoped hooks
├── utils/ # Feature-scoped utilities (2+ consumers)
├── feature.tsx # Main component
└── page.tsx # Next.js page entry
```
## Naming Conventions
- **Components**: PascalCase (`WorkflowList`)
- **Hooks**: `use` prefix (`useWorkflowOperations`)
- **Files**: kebab-case (`workflow-list.tsx`)
- **Stores**: `stores/feature/store.ts`
- **Constants**: SCREAMING_SNAKE_CASE
- **Interfaces**: PascalCase with suffix (`WorkflowListProps`)
## Utils Rules
- **Never create `utils.ts` for single consumer** - inline it
- **Create `utils.ts` when** 2+ files need the same helper
- **Check existing sources** before duplicating (`lib/` has many utilities)
- **Location**: `lib/` (app-wide) → `feature/utils/` (feature-scoped) → inline (single-use)

View File

@@ -0,0 +1,48 @@
---
description: Component patterns and structure for React components
globs: ["apps/sim/**/*.tsx"]
---
# Component Patterns
## Structure Order
```typescript
'use client' // Only if using hooks
// Imports (external → internal)
// Constants at module level
const CONFIG = { SPACING: 8 } as const
// Props interface
interface ComponentProps {
requiredProp: string
optionalProp?: boolean
}
export function Component({ requiredProp, optionalProp = false }: ComponentProps) {
// a. Refs
// b. External hooks (useParams, useRouter)
// c. Store hooks
// d. Custom hooks
// e. Local state
// f. useMemo
// g. useCallback
// h. useEffect
// i. Return JSX
}
```
## Rules
1. `'use client'` only when using React hooks
2. Always define props interface
3. Extract constants with `as const`
4. Semantic HTML (`aside`, `nav`, `article`)
5. Optional chain callbacks: `onAction?.(id)`
## Component Extraction
**Extract when:** 50+ lines, used in 2+ files, or has own state/logic
**Keep inline when:** < 10 lines, single use, purely presentational

View File

@@ -0,0 +1,54 @@
---
description: Custom hook patterns and best practices
globs: ["apps/sim/**/use-*.ts", "apps/sim/**/hooks/**/*.ts"]
---
# Hook Patterns
## Structure
```typescript
interface UseFeatureProps {
id: string
onSuccess?: (result: Result) => void
}
export function useFeature({ id, onSuccess }: UseFeatureProps) {
// 1. Refs for stable dependencies
const idRef = useRef(id)
const onSuccessRef = useRef(onSuccess)
// 2. State
const [data, setData] = useState<Data | null>(null)
const [isLoading, setIsLoading] = useState(false)
// 3. Sync refs
useEffect(() => {
idRef.current = id
onSuccessRef.current = onSuccess
}, [id, onSuccess])
// 4. Operations (useCallback with empty deps when using refs)
const fetchData = useCallback(async () => {
setIsLoading(true)
try {
const result = await fetch(`/api/${idRef.current}`).then(r => r.json())
setData(result)
onSuccessRef.current?.(result)
} finally {
setIsLoading(false)
}
}, [])
return { data, isLoading, fetchData }
}
```
## Rules
1. Single responsibility per hook
2. Props interface required
3. Refs for stable callback dependencies
4. Wrap returned functions in useCallback
5. Always try/catch async operations
6. Track loading/error states

View File

@@ -0,0 +1,49 @@
---
description: Import patterns for the Sim application
globs: ["apps/sim/**/*.ts", "apps/sim/**/*.tsx"]
---
# Import Patterns
## Absolute Imports
**Always use absolute imports.** Never use relative imports.
```typescript
// ✓ Good
import { useWorkflowStore } from '@/stores/workflows/store'
import { Button } from '@/components/ui/button'
// ✗ Bad
import { useWorkflowStore } from '../../../stores/workflows/store'
```
## Barrel Exports
Use barrel exports (`index.ts`) when a folder has 3+ exports. Import from barrel, not individual files.
```typescript
// ✓ Good
import { Dashboard, Sidebar } from '@/app/workspace/[workspaceId]/logs/components'
// ✗ Bad
import { Dashboard } from '@/app/workspace/[workspaceId]/logs/components/dashboard/dashboard'
```
## Import Order
1. React/core libraries
2. External libraries
3. UI components (`@/components/emcn`, `@/components/ui`)
4. Utilities (`@/lib/...`)
5. Stores (`@/stores/...`)
6. Feature imports
7. CSS imports
## Type Imports
Use `type` keyword for type-only imports:
```typescript
import type { WorkflowLog } from '@/stores/logs/types'
```

View File

@@ -0,0 +1,207 @@
---
description: Adding new integrations (tools, blocks, triggers)
globs: ["apps/sim/tools/**", "apps/sim/blocks/**", "apps/sim/triggers/**"]
---
# Adding Integrations
## Overview
Adding a new integration typically requires:
1. **Tools** - API operations (`tools/{service}/`)
2. **Block** - UI component (`blocks/blocks/{service}.ts`)
3. **Icon** - SVG icon (`components/icons.tsx`)
4. **Trigger** (optional) - Webhooks/polling (`triggers/{service}/`)
Always look up the service's API docs first.
## 1. Tools (`tools/{service}/`)
```
tools/{service}/
├── index.ts # Export all tools
├── types.ts # Params/response types
├── {action}.ts # Individual tool (e.g., send_message.ts)
└── ...
```
**Tool file structure:**
```typescript
// tools/{service}/{action}.ts
import type { {Service}Params, {Service}Response } from '@/tools/{service}/types'
import type { ToolConfig } from '@/tools/types'
export const {service}{Action}Tool: ToolConfig<{Service}Params, {Service}Response> = {
id: '{service}_{action}',
name: '{Service} {Action}',
description: 'What this tool does',
version: '1.0.0',
oauth: { required: true, provider: '{service}' }, // if OAuth
params: { /* param definitions */ },
request: {
url: '/api/tools/{service}/{action}',
method: 'POST',
headers: () => ({ 'Content-Type': 'application/json' }),
body: (params) => ({ ...params }),
},
transformResponse: async (response) => {
const data = await response.json()
if (!data.success) throw new Error(data.error)
return { success: true, output: data.output }
},
outputs: { /* output definitions */ },
}
```
**Register in `tools/registry.ts`:**
```typescript
import { {service}{Action}Tool } from '@/tools/{service}'
// Add to registry object
{service}_{action}: {service}{Action}Tool,
```
## 2. Block (`blocks/blocks/{service}.ts`)
```typescript
import { {Service}Icon } from '@/components/icons'
import type { BlockConfig } from '@/blocks/types'
import type { {Service}Response } from '@/tools/{service}/types'
export const {Service}Block: BlockConfig<{Service}Response> = {
type: '{service}',
name: '{Service}',
description: 'Short description',
longDescription: 'Detailed description',
category: 'tools',
bgColor: '#hexcolor',
icon: {Service}Icon,
subBlocks: [ /* see SubBlock Properties below */ ],
tools: {
access: ['{service}_{action}', ...],
config: {
tool: (params) => `{service}_${params.operation}`,
params: (params) => ({ ...params }),
},
},
inputs: { /* input definitions */ },
outputs: { /* output definitions */ },
}
```
### SubBlock Properties
```typescript
{
id: 'fieldName', // Unique identifier
title: 'Field Label', // UI label
type: 'short-input', // See SubBlock Types below
placeholder: 'Hint text',
required: true, // See Required below
condition: { ... }, // See Condition below
dependsOn: ['otherField'], // See DependsOn below
mode: 'basic', // 'basic' | 'advanced' | 'both' | 'trigger'
}
```
**SubBlock Types:** `short-input`, `long-input`, `dropdown`, `code`, `switch`, `slider`, `oauth-input`, `channel-selector`, `user-selector`, `file-upload`, etc.
### `condition` - Show/hide based on another field
```typescript
// Show when operation === 'send'
condition: { field: 'operation', value: 'send' }
// Show when operation is 'send' OR 'read'
condition: { field: 'operation', value: ['send', 'read'] }
// Show when operation !== 'send'
condition: { field: 'operation', value: 'send', not: true }
// Complex: NOT in list AND another condition
condition: {
field: 'operation',
value: ['list_channels', 'list_users'],
not: true,
and: { field: 'destinationType', value: 'dm', not: true }
}
```
### `required` - Field validation
```typescript
// Always required
required: true
// Conditionally required (same syntax as condition)
required: { field: 'operation', value: 'send' }
```
### `dependsOn` - Clear field when dependencies change
```typescript
// Clear when credential changes
dependsOn: ['credential']
// Clear when authMethod changes AND (credential OR botToken) changes
dependsOn: { all: ['authMethod'], any: ['credential', 'botToken'] }
```
### `mode` - When to show field
- `'basic'` - Only in basic mode (default UI)
- `'advanced'` - Only in advanced mode (manual input)
- `'both'` - Show in both modes (default)
- `'trigger'` - Only when block is used as trigger
**Register in `blocks/registry.ts`:**
```typescript
import { {Service}Block } from '@/blocks/blocks/{service}'
// Add to registry object (alphabetically)
{service}: {Service}Block,
```
## 3. Icon (`components/icons.tsx`)
```typescript
export function {Service}Icon(props: SVGProps<SVGSVGElement>) {
return (
<svg {...props} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
{/* SVG path from service's brand assets */}
</svg>
)
}
```
## 4. Trigger (`triggers/{service}/`) - Optional
```
triggers/{service}/
├── index.ts # Export all triggers
├── webhook.ts # Webhook handler
├── utils.ts # Shared utilities
└── {event}.ts # Specific event handlers
```
**Register in `triggers/registry.ts`:**
```typescript
import { {service}WebhookTrigger } from '@/triggers/{service}'
// Add to TRIGGER_REGISTRY
{service}_webhook: {service}WebhookTrigger,
```
## Checklist
- [ ] Look up API docs for the service
- [ ] Create `tools/{service}/types.ts` with proper types
- [ ] Create tool files for each operation
- [ ] Create `tools/{service}/index.ts` barrel export
- [ ] Register tools in `tools/registry.ts`
- [ ] Add icon to `components/icons.tsx`
- [ ] Create block in `blocks/blocks/{service}.ts`
- [ ] Register block in `blocks/registry.ts`
- [ ] (Optional) Create triggers in `triggers/{service}/`
- [ ] (Optional) Register triggers in `triggers/registry.ts`

View File

@@ -0,0 +1,66 @@
---
description: React Query patterns for the Sim application
globs: ["apps/sim/hooks/queries/**/*.ts"]
---
# React Query Patterns
All React Query hooks live in `hooks/queries/`.
## Query Key Factory
Every query file defines a keys factory:
```typescript
export const entityKeys = {
all: ['entity'] as const,
list: (workspaceId?: string) => [...entityKeys.all, 'list', workspaceId ?? ''] as const,
detail: (id?: string) => [...entityKeys.all, 'detail', id ?? ''] as const,
}
```
## File Structure
```typescript
// 1. Query keys factory
// 2. Types (if needed)
// 3. Private fetch functions
// 4. Exported hooks
```
## Query Hook
```typescript
export function useEntityList(workspaceId?: string, options?: { enabled?: boolean }) {
return useQuery({
queryKey: entityKeys.list(workspaceId),
queryFn: () => fetchEntities(workspaceId as string),
enabled: Boolean(workspaceId) && (options?.enabled ?? true),
staleTime: 60 * 1000,
placeholderData: keepPreviousData,
})
}
```
## Mutation Hook
```typescript
export function useCreateEntity() {
const queryClient = useQueryClient()
return useMutation({
mutationFn: async (variables) => { /* fetch POST */ },
onSuccess: () => queryClient.invalidateQueries({ queryKey: entityKeys.all }),
})
}
```
## Optimistic Updates
For optimistic mutations syncing with Zustand, use `createOptimisticMutationHandlers` from `@/hooks/queries/utils/optimistic-mutation`.
## Naming
- **Keys**: `entityKeys`
- **Query hooks**: `useEntity`, `useEntityList`
- **Mutation hooks**: `useCreateEntity`, `useUpdateEntity`
- **Fetch functions**: `fetchEntity` (private)

View File

@@ -0,0 +1,70 @@
---
description: Zustand store patterns
globs: ["apps/sim/**/store.ts", "apps/sim/**/stores/**/*.ts"]
---
# Zustand Store Patterns
Stores live in `stores/`. Complex stores split into `store.ts` + `types.ts`.
## Basic Store
```typescript
import { create } from 'zustand'
import { devtools } from 'zustand/middleware'
import type { FeatureState } from '@/stores/feature/types'
const initialState = { items: [] as Item[], activeId: null as string | null }
export const useFeatureStore = create<FeatureState>()(
devtools(
(set, get) => ({
...initialState,
setItems: (items) => set({ items }),
addItem: (item) => set((state) => ({ items: [...state.items, item] })),
reset: () => set(initialState),
}),
{ name: 'feature-store' }
)
)
```
## Persisted Store
```typescript
import { create } from 'zustand'
import { persist } from 'zustand/middleware'
export const useFeatureStore = create<FeatureState>()(
persist(
(set) => ({
width: 300,
setWidth: (width) => set({ width }),
_hasHydrated: false,
setHasHydrated: (v) => set({ _hasHydrated: v }),
}),
{
name: 'feature-state',
partialize: (state) => ({ width: state.width }),
onRehydrateStorage: () => (state) => state?.setHasHydrated(true),
}
)
)
```
## Rules
1. Use `devtools` middleware (named stores)
2. Use `persist` only when data should survive reload
3. `partialize` to persist only necessary state
4. `_hasHydrated` pattern for persisted stores needing hydration tracking
5. Immutable updates only
6. `set((state) => ...)` when depending on previous state
7. Provide `reset()` action
## Outside React
```typescript
const items = useFeatureStore.getState().items
useFeatureStore.setState({ items: newItems })
```

View File

@@ -0,0 +1,40 @@
---
description: Tailwind CSS and styling conventions
globs: ["apps/sim/**/*.tsx", "apps/sim/**/*.css"]
---
# Styling Rules
## Tailwind
1. **No inline styles** - Use Tailwind classes
2. **No duplicate dark classes** - Skip `dark:` when value matches light mode
3. **Exact values** - `text-[14px]`, `h-[25px]`
4. **Transitions** - `transition-colors` for interactive states
## Conditional Classes
```typescript
import { cn } from '@/lib/utils'
<div className={cn(
'base-classes',
isActive && 'active-classes',
disabled ? 'opacity-60' : 'hover:bg-accent'
)} />
```
## CSS Variables
For dynamic values (widths, heights) synced with stores:
```typescript
// In store
setWidth: (width) => {
set({ width })
document.documentElement.style.setProperty('--sidebar-width', `${width}px`)
}
// In component
<aside style={{ width: 'var(--sidebar-width)' }} />
```

View File

@@ -0,0 +1,60 @@
---
description: Testing patterns with Vitest
globs: ["apps/sim/**/*.test.ts", "apps/sim/**/*.test.tsx"]
---
# Testing Patterns
Use Vitest. Test files live next to source: `feature.ts` → `feature.test.ts`
## Structure
```typescript
/**
* Tests for [feature name]
*
* @vitest-environment node
*/
// 1. Mocks BEFORE imports
vi.mock('@sim/db', () => ({ db: { select: vi.fn() } }))
vi.mock('@sim/logger', () => loggerMock)
// 2. Imports AFTER mocks
import { describe, expect, it, vi, beforeEach, afterEach } from 'vitest'
import { createSession, loggerMock } from '@sim/testing'
import { myFunction } from '@/lib/feature'
describe('myFunction', () => {
beforeEach(() => vi.clearAllMocks())
it('should do something', () => {
expect(myFunction()).toBe(expected)
})
it.concurrent('runs in parallel', () => { ... })
})
```
## @sim/testing Package
```typescript
// Factories - create test data
import { createBlock, createWorkflow, createSession } from '@sim/testing'
// Mocks - pre-configured mocks
import { loggerMock, databaseMock, fetchMock } from '@sim/testing'
// Builders - fluent API for complex objects
import { ExecutionBuilder, WorkflowBuilder } from '@sim/testing'
```
## Rules
1. `@vitest-environment node` directive at file top
2. **Mocks before imports** - `vi.mock()` calls must come first
3. Use `@sim/testing` factories over manual test data
4. `it.concurrent` for independent tests (faster)
5. `beforeEach(() => vi.clearAllMocks())` to reset state
6. Group related tests with nested `describe` blocks
7. Test file naming: `*.test.ts` (not `*.spec.ts`)

View File

@@ -0,0 +1,20 @@
---
description: TypeScript conventions and type safety
globs: ["apps/sim/**/*.ts", "apps/sim/**/*.tsx"]
---
# TypeScript Rules
1. **No `any`** - Use proper types or `unknown` with type guards
2. **Props interface** - Always define for components
3. **Const assertions** - `as const` for constant objects/arrays
4. **Ref types** - Explicit: `useRef<HTMLDivElement>(null)`
5. **Type imports** - `import type { X }` for type-only imports
```typescript
// ✗ Bad
const handleClick = (e: any) => {}
// ✓ Good
const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {}
```

View File

@@ -1,69 +0,0 @@
# Sim Development Environment Bashrc
# This gets sourced by post-create.sh
# Enhanced prompt with git branch info
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\[\033[01;32m\]\u@simstudio\[\033[00m\]:\[\033[01;34m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\]\$ "
# Helpful aliases
alias ll="ls -la"
alias ..="cd .."
alias ...="cd ../.."
# Database aliases
alias pgc="PGPASSWORD=postgres psql -h db -U postgres -d simstudio"
alias check-db="PGPASSWORD=postgres psql -h db -U postgres -c '\l'"
# Sim specific aliases
alias logs="cd /workspace/apps/sim && tail -f logs/*.log 2>/dev/null || echo 'No log files found'"
alias sim-start="cd /workspace && bun run dev"
alias sim-migrate="cd /workspace/apps/sim && bunx drizzle-kit push"
alias sim-generate="cd /workspace/apps/sim && bunx drizzle-kit generate"
alias sim-rebuild="cd /workspace && bun run build && bun run start"
alias docs-dev="cd /workspace/apps/docs && bun run dev"
# Turbo related commands
alias turbo-build="cd /workspace && bunx turbo run build"
alias turbo-dev="cd /workspace && bunx turbo run dev"
alias turbo-test="cd /workspace && bunx turbo run test"
# Bun specific commands
alias bun-update="cd /workspace && bun update"
alias bun-add="cd /workspace && bun add"
alias bun-pm="cd /workspace && bun pm"
alias bun-canary="bun upgrade --canary"
# Default to workspace directory
cd /workspace 2>/dev/null || true
# Welcome message - only show once per session
if [ -z "$SIM_WELCOME_SHOWN" ]; then
export SIM_WELCOME_SHOWN=1
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "🚀 Welcome to Sim development environment!"
echo ""
echo "Available commands:"
echo " sim-start - Start all apps in development mode"
echo " sim-migrate - Push schema changes to the database for sim app"
echo " sim-generate - Generate new migrations for sim app"
echo " sim-rebuild - Build and start all apps"
echo " docs-dev - Start only the docs app in development mode"
echo ""
echo "Turbo commands:"
echo " turbo-build - Build all apps using Turborepo"
echo " turbo-dev - Start development mode for all apps"
echo " turbo-test - Run tests for all packages"
echo ""
echo "Bun commands:"
echo " bun-update - Update dependencies"
echo " bun-add - Add a new dependency"
echo " bun-pm - Manage dependencies"
echo " bun-canary - Upgrade to the latest canary version of Bun"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
fi

View File

@@ -1,38 +1,43 @@
# Use the latest Bun canary image for development
FROM oven/bun:canary
# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
FROM oven/bun:1.3.3-alpine
# Install necessary packages for development
RUN apt-get update \
&& apt-get -y install --no-install-recommends \
git curl wget jq sudo postgresql-client vim nano \
bash-completion ca-certificates lsb-release gnupg \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
RUN apk add --no-cache \
git \
curl \
wget \
jq \
sudo \
postgresql-client \
vim \
nano \
bash \
bash-completion \
zsh \
zsh-vcs \
ca-certificates \
shadow
# Create a non-root user
# Create a non-root user with matching UID/GID
ARG USERNAME=bun
ARG USER_UID=1000
ARG USER_GID=$USER_UID
# Create user group if it doesn't exist
RUN if ! getent group $USER_GID >/dev/null; then \
addgroup -g $USER_GID $USERNAME; \
fi
# Create user if it doesn't exist
RUN if ! getent passwd $USER_UID >/dev/null; then \
adduser -D -u $USER_UID -G $(getent group $USER_GID | cut -d: -f1) $USERNAME; \
fi
# Add sudo support
RUN echo "$USERNAME ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME
# Install global packages for development
RUN bun install -g turbo drizzle-kit typescript @types/node
# Install bun completions
RUN bun completions > /etc/bash_completion.d/bun
# Set up shell environment
RUN echo "export PATH=$PATH:/home/$USERNAME/.bun/bin" >> /etc/profile
RUN echo "source /etc/profile" >> /etc/bash.bashrc
# Switch back to dialog for any ad-hoc use of apt-get
ENV DEBIAN_FRONTEND=dialog
RUN echo "export PATH=\$PATH:/home/$USERNAME/.bun/bin" >> /etc/profile
WORKDIR /workspace

View File

@@ -1,78 +1,75 @@
# Sim Development Container
This directory contains configuration files for Visual Studio Code Dev Containers / GitHub Codespaces. Dev containers provide a consistent, isolated development environment for this project.
Development container configuration for VS Code Dev Containers and GitHub Codespaces.
## Contents
- `devcontainer.json` - The main configuration file that defines the development container settings
- `Dockerfile` - Defines the container image and development environment
- `docker-compose.yml` - Sets up the application and database containers
- `post-create.sh` - Script that runs when the container is created
- `.bashrc` - Custom shell configuration with helpful aliases
## Usage
### Prerequisites
## Prerequisites
- Visual Studio Code
- Docker installation:
- Docker Desktop (Windows/macOS)
- Docker Engine (Linux)
- VS Code Remote - Containers extension
- Docker Desktop or Podman Desktop
- VS Code Dev Containers extension
### Getting Started
## Getting Started
1. Open this project in Visual Studio Code
2. When prompted, click "Reopen in Container"
- Alternatively, press `F1` and select "Remote-Containers: Reopen in Container"
1. Open this project in VS Code
2. Click "Reopen in Container" when prompted (or press `F1` → "Dev Containers: Reopen in Container")
3. Wait for the container to build and initialize
4. The post-creation script will automatically:
4. Start developing with `sim-start`
- Install dependencies
- Set up environment variables
- Run database migrations
- Configure helpful aliases
The setup script will automatically install dependencies and run migrations.
5. Start the application with `sim-start` (alias for `bun run dev`)
## Development Commands
### Development Commands
### Running Services
The development environment includes these helpful aliases:
You have two options for running the development environment:
**Option 1: Run everything together (recommended for most development)**
```bash
sim-start # Runs both app and socket server using concurrently
```
**Option 2: Run services separately (useful for debugging individual services)**
- In the **app** container terminal: `sim-app` (starts Next.js app on port 3000)
- In the **realtime** container terminal: `sim-sockets` (starts socket server on port 3002)
### Other Commands
- `sim-start` - Start the development server
- `sim-migrate` - Push schema changes to the database
- `sim-generate` - Generate new migrations
- `sim-rebuild` - Build and start the production version
- `pgc` - Connect to the PostgreSQL database
- `check-db` - List all databases
### Using GitHub Codespaces
This project is also configured for GitHub Codespaces. To use it:
1. Go to the GitHub repository
2. Click the "Code" button
3. Select the "Codespaces" tab
4. Click "Create codespace on main"
This will start a new Codespace with the development environment already set up.
## Customization
You can customize the development environment by:
- Modifying `devcontainer.json` to add VS Code extensions or settings
- Updating the `Dockerfile` to install additional packages
- Editing `docker-compose.yml` to add services or change configuration
- Modifying `.bashrc` to add custom aliases or configurations
- `build` - Build the application
- `pgc` - Connect to PostgreSQL database
## Troubleshooting
If you encounter issues:
**Build errors**: Rebuild the container with `F1` → "Dev Containers: Rebuild Container"
1. Rebuild the container: `F1` → "Remote-Containers: Rebuild Container"
2. Check Docker logs for build errors
3. Verify Docker Desktop is running
4. Ensure all prerequisites are installed
**Port conflicts**: Ensure ports 3000, 3002, and 5432 are available
For more information, see the [VS Code Remote Development documentation](https://code.visualstudio.com/docs/remote/containers).
**Container runtime issues**: Verify Docker Desktop or Podman Desktop is running
## Technical Details
Services:
- **App container** (8GB memory limit) - Main Next.js application
- **Realtime container** (4GB memory limit) - Socket.io server for real-time features
- **Database** - PostgreSQL with pgvector extension
- **Migrations** - Runs automatically on container creation
You can develop with services running together or independently.
### Personalization
**Project commands** (`sim-start`, `sim-app`, etc.) are automatically available via `/workspace/.devcontainer/sim-commands.sh`.
**Personal shell customization** (aliases, prompts, etc.) should use VS Code's dotfiles feature:
1. Create a dotfiles repository (e.g., `github.com/youruser/dotfiles`)
2. Add your `.bashrc`, `.zshrc`, or other configs
3. Configure in VS Code Settings:
```json
{
"dotfiles.repository": "youruser/dotfiles",
"dotfiles.installCommand": "install.sh"
}
```
This separates project-specific commands from personal preferences, following VS Code best practices.

View File

@@ -13,13 +13,6 @@
"source.fixAll.biome": "explicit",
"source.organizeImports.biome": "explicit"
},
"terminal.integrated.defaultProfile.linux": "bash",
"terminal.integrated.profiles.linux": {
"bash": {
"path": "/bin/bash",
"args": ["--login"]
}
},
"terminal.integrated.shellIntegration.enabled": true
},
"extensions": [
@@ -36,18 +29,9 @@
}
},
"forwardPorts": [3000, 5432],
"forwardPorts": [3000, 3002, 5432],
"postCreateCommand": "bash -c 'bash .devcontainer/post-create.sh || true'",
"postStartCommand": "bash -c 'if [ ! -f ~/.bashrc ] || ! grep -q \"sim-start\" ~/.bashrc; then cp .devcontainer/.bashrc ~/.bashrc; fi'",
"remoteUser": "bun",
"features": {
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/prulloac/devcontainer-features/bun:1": {
"version": "latest"
}
}
"remoteUser": "bun"
}

View File

@@ -7,53 +7,56 @@ services:
- ..:/workspace:cached
- bun-cache:/home/bun/.bun/cache:delegated
command: sleep infinity
deploy:
resources:
limits:
memory: 8G
environment:
- NODE_ENV=development
- DATABASE_URL=postgresql://postgres:postgres@db:5432/simstudio
- POSTGRES_URL=postgresql://postgres:postgres@db:5432/simstudio
- BETTER_AUTH_URL=http://localhost:3000
- NEXT_PUBLIC_APP_URL=http://localhost:3000
- BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET:-your_auth_secret_here}
- ENCRYPTION_KEY=${ENCRYPTION_KEY:-your_encryption_key_here}
- COPILOT_API_KEY=${COPILOT_API_KEY}
- SIM_AGENT_API_URL=${SIM_AGENT_API_URL}
- OLLAMA_URL=${OLLAMA_URL:-http://localhost:11434}
- NEXT_PUBLIC_SOCKET_URL=${NEXT_PUBLIC_SOCKET_URL:-http://localhost:3002}
- BUN_INSTALL_CACHE_DIR=/home/bun/.bun/cache
depends_on:
db:
condition: service_healthy
realtime:
condition: service_healthy
migrations:
condition: service_completed_successfully
ports:
- "3000:3000"
- "3001:3001"
working_dir: /workspace
healthcheck:
test: ['CMD', 'wget', '--spider', '--quiet', 'http://127.0.0.1:3000']
interval: 90s
timeout: 5s
retries: 3
start_period: 10s
realtime:
build:
context: ..
dockerfile: .devcontainer/Dockerfile
volumes:
- ..:/workspace:cached
- bun-cache:/home/bun/.bun/cache:delegated
command: sleep infinity
deploy:
resources:
limits:
memory: 4G
environment:
- NODE_ENV=development
- DATABASE_URL=postgresql://postgres:postgres@db:5432/simstudio
- BETTER_AUTH_URL=http://localhost:3000
- NEXT_PUBLIC_APP_URL=http://localhost:3000
- BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET:-your_auth_secret_here}
depends_on:
db:
condition: service_healthy
ports:
- "3002:3002"
working_dir: /workspace
healthcheck:
test: ['CMD', 'wget', '--spider', '--quiet', 'http://127.0.0.1:3002']
interval: 90s
timeout: 5s
retries: 3
start_period: 10s
migrations:
build:
@@ -77,7 +80,7 @@ services:
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=simstudio
ports:
- "5432:5432"
- "${POSTGRES_PORT:-5432}:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s

View File

@@ -8,11 +8,43 @@ echo "🔧 Setting up Sim development environment..."
# Change to the workspace root directory
cd /workspace
# Setup .bashrc
echo "📄 Setting up .bashrc with aliases..."
cp /workspace/.devcontainer/.bashrc ~/.bashrc
# Add to .profile to ensure .bashrc is sourced in non-interactive shells
echo 'if [ -f ~/.bashrc ]; then . ~/.bashrc; fi' >> ~/.profile
# Install global packages for development (done at runtime, not build time)
echo "📦 Installing global development tools..."
bun install -g turbo drizzle-kit typescript @types/node 2>/dev/null || {
echo "⚠️ Some global packages may already be installed, continuing..."
}
# Set up bun completions (with proper shell detection)
echo "🔧 Setting up shell completions..."
if [ -n "$SHELL" ] && [ -f "$SHELL" ]; then
SHELL=/bin/bash bun completions 2>/dev/null | sudo tee /etc/bash_completion.d/bun > /dev/null || {
echo "⚠️ Could not install bun completions, but continuing..."
}
fi
# Add project commands to shell profile
echo "📄 Setting up project commands..."
# Add sourcing of sim-commands.sh to user's shell config files if they exist
for rcfile in ~/.bashrc ~/.zshrc; do
if [ -f "$rcfile" ]; then
# Check if already added
if ! grep -q "sim-commands.sh" "$rcfile"; then
echo "" >> "$rcfile"
echo "# Sim project commands" >> "$rcfile"
echo "if [ -f /workspace/.devcontainer/sim-commands.sh ]; then" >> "$rcfile"
echo " source /workspace/.devcontainer/sim-commands.sh" >> "$rcfile"
echo "fi" >> "$rcfile"
fi
fi
done
# If no rc files exist yet, create a minimal one
if [ ! -f ~/.bashrc ] && [ ! -f ~/.zshrc ]; then
echo "# Source Sim project commands" > ~/.bashrc
echo "if [ -f /workspace/.devcontainer/sim-commands.sh ]; then" >> ~/.bashrc
echo " source /workspace/.devcontainer/sim-commands.sh" >> ~/.bashrc
echo "fi" >> ~/.bashrc
fi
# Clean and reinstall dependencies to ensure platform compatibility
echo "📦 Cleaning and reinstalling dependencies..."
@@ -29,18 +61,12 @@ chmod 700 ~/.bun ~/.bun/cache
# Install dependencies with platform-specific binaries
echo "Installing dependencies with Bun..."
bun install || {
echo "⚠️ bun install had issues but continuing setup..."
}
bun install
# Check for native dependencies
echo "Checking for native dependencies compatibility..."
NATIVE_DEPS=$(grep '"trustedDependencies"' apps/sim/package.json || echo "")
if [ ! -z "$NATIVE_DEPS" ]; then
echo "⚠️ Native dependencies detected. Ensuring compatibility with Bun..."
for pkg in $(echo $NATIVE_DEPS | grep -oP '"[^"]*"' | tr -d '"' | grep -v "trustedDependencies"); do
echo "Checking compatibility for $pkg..."
done
if grep -q '"trustedDependencies"' apps/sim/package.json 2>/dev/null; then
echo "⚠️ Native dependencies detected. Bun will handle compatibility during install."
fi
# Set up environment variables if .env doesn't exist for the sim app
@@ -82,23 +108,6 @@ echo "Waiting for database to be ready..."
fi
) || echo "⚠️ Database setup had issues but continuing..."
# Add additional helpful aliases to .bashrc
cat << EOF >> ~/.bashrc
# Additional Sim Development Aliases
alias migrate="cd /workspace/apps/sim && DATABASE_URL=postgresql://postgres:postgres@db:5432/simstudio bunx drizzle-kit push"
alias generate="cd /workspace/apps/sim && bunx drizzle-kit generate"
alias dev="cd /workspace && bun run dev"
alias build="cd /workspace && bun run build"
alias start="cd /workspace && bun run dev"
alias lint="cd /workspace/apps/sim && bun run lint"
alias test="cd /workspace && bun run test"
alias bun-update="cd /workspace && bun update"
EOF
# Source the .bashrc to make aliases available immediately
. ~/.bashrc
# Clear the welcome message flag to ensure it shows after setup
unset SIM_WELCOME_SHOWN

42
.devcontainer/sim-commands.sh Executable file
View File

@@ -0,0 +1,42 @@
#!/bin/bash
# Sim Project Commands
# Source this file to add project-specific commands to your shell
# Add to your ~/.bashrc or ~/.zshrc: source /workspace/.devcontainer/sim-commands.sh
# Project-specific aliases for Sim development
alias sim-start="cd /workspace && bun run dev:full"
alias sim-app="cd /workspace && bun run dev"
alias sim-sockets="cd /workspace && bun run dev:sockets"
alias sim-migrate="cd /workspace/apps/sim && bunx drizzle-kit push"
alias sim-generate="cd /workspace/apps/sim && bunx drizzle-kit generate"
alias sim-rebuild="cd /workspace && bun run build && bun run start"
alias docs-dev="cd /workspace/apps/docs && bun run dev"
# Database connection helpers
alias pgc="PGPASSWORD=postgres psql -h db -U postgres -d simstudio"
alias check-db="PGPASSWORD=postgres psql -h db -U postgres -c '\l'"
# Default to workspace directory
cd /workspace 2>/dev/null || true
# Welcome message - show once per session
if [ -z "$SIM_WELCOME_SHOWN" ]; then
export SIM_WELCOME_SHOWN=1
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "🚀 Sim Development Environment"
echo ""
echo "Project commands:"
echo " sim-start - Start app + socket server"
echo " sim-app - Start only main app"
echo " sim-sockets - Start only socket server"
echo " sim-migrate - Push schema changes"
echo " sim-generate - Generate migrations"
echo ""
echo "Database:"
echo " pgc - Connect to PostgreSQL"
echo " check-db - List databases"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
fi

View File

@@ -1,11 +1,67 @@
# Git
.git
.gitignore
# Documentation
LICENSE
NOTICE
README.md
*.md
docs/
# IDE and editor
.vscode
.idea
*.swp
*.swo
# Environment and config
.env*
!.env.example
.prettierrc
.prettierignore
README.md
.gitignore
.husky
.eslintrc*
.eslintignore
# CI/CD and DevOps
.github
.devcontainer
.env.example
node_modules
.husky
docker-compose*.yml
Dockerfile*
# Build artifacts and caches
.next
.turbo
.cache
dist
build
out
coverage
*.log
# Dependencies (will be installed fresh in container)
node_modules
.bun
# Test files
**/*.test.ts
**/*.test.tsx
**/*.spec.ts
**/*.spec.tsx
__tests__
__mocks__
jest.config.*
vitest.config.*
# TypeScript build info
*.tsbuildinfo
# OS files
.DS_Store
Thumbs.db
# Temporary files
tmp
temp
*.tmp

34
.gitattributes vendored Normal file
View File

@@ -0,0 +1,34 @@
# Set default behavior to automatically normalize line endings
* text=auto eol=lf
# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout
*.ts text eol=lf
*.tsx text eol=lf
*.js text eol=lf
*.jsx text eol=lf
*.json text eol=lf
*.md text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
*.toml text eol=lf
*.css text eol=lf
*.scss text eol=lf
*.sh text eol=lf
*.bash text eol=lf
Dockerfile* text eol=lf
.dockerignore text eol=lf
.gitignore text eol=lf
.gitattributes text eol=lf
# Denote all files that are truly binary and should not be modified
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.woff binary
*.woff2 binary
*.ttf binary
*.eot binary
*.pdf binary

View File

@@ -321,8 +321,7 @@ In addition, you will need to update the registries:
{
id: 'operation',
title: 'Operation',
type: 'dropdown',
layout: 'full',
type: 'dropdown'
required: true,
options: [
{ label: 'Generate Embeddings', id: 'generate' },
@@ -333,8 +332,7 @@ In addition, you will need to update the registries:
{
id: 'apiKey',
title: 'API Key',
type: 'short-input',
layout: 'full',
type: 'short-input'
placeholder: 'Your Pinecone API key',
password: true,
required: true,
@@ -376,7 +374,7 @@ In addition, you will need to update the registries:
Add your block to the blocks registry (`/apps/sim/blocks/registry.ts`):
```typescript:/apps/sim/blocks/registry.ts
import { PineconeBlock } from './blocks/pinecone'
import { PineconeBlock } from '@/blocks/blocks/pinecone'
// Registry of all available blocks
export const registry: Record<string, BlockConfig> = {

View File

@@ -1,159 +0,0 @@
name: Build and Publish Docker Image
on:
push:
branches: [main]
tags: ['v*']
jobs:
build-and-push:
strategy:
fail-fast: false
matrix:
include:
# AMD64 builds on x86 runners
- dockerfile: ./docker/app.Dockerfile
image: ghcr.io/simstudioai/simstudio
platform: linux/amd64
arch: amd64
runner: linux-x64-8-core
- dockerfile: ./docker/db.Dockerfile
image: ghcr.io/simstudioai/migrations
platform: linux/amd64
arch: amd64
runner: linux-x64-8-core
- dockerfile: ./docker/realtime.Dockerfile
image: ghcr.io/simstudioai/realtime
platform: linux/amd64
arch: amd64
runner: linux-x64-8-core
# ARM64 builds on native ARM64 runners
- dockerfile: ./docker/app.Dockerfile
image: ghcr.io/simstudioai/simstudio
platform: linux/arm64
arch: arm64
runner: linux-arm64-8-core
- dockerfile: ./docker/db.Dockerfile
image: ghcr.io/simstudioai/migrations
platform: linux/arm64
arch: arm64
runner: linux-arm64-8-core
- dockerfile: ./docker/realtime.Dockerfile
image: ghcr.io/simstudioai/realtime
platform: linux/arm64
arch: arm64
runner: linux-arm64-8-core
runs-on: ${{ matrix.runner }}
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ matrix.image }}
tags: |
type=raw,value=latest-${{ matrix.arch }},enable=${{ github.ref == 'refs/heads/main' }}
type=ref,event=pr,suffix=-${{ matrix.arch }}
type=semver,pattern={{version}},suffix=-${{ matrix.arch }}
type=semver,pattern={{major}}.{{minor}},suffix=-${{ matrix.arch }}
type=semver,pattern={{major}}.{{minor}}.{{patch}},suffix=-${{ matrix.arch }}
type=sha,format=long,suffix=-${{ matrix.arch }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ${{ matrix.dockerfile }}
platforms: ${{ matrix.platform }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha,scope=build-v3
cache-to: type=gha,mode=max,scope=build-v3
provenance: false
sbom: false
create-manifests:
runs-on: ubuntu-latest
needs: build-and-push
if: github.event_name != 'pull_request'
strategy:
matrix:
include:
- image: ghcr.io/simstudioai/simstudio
- image: ghcr.io/simstudioai/migrations
- image: ghcr.io/simstudioai/realtime
permissions:
contents: read
packages: write
steps:
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata for manifest
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ matrix.image }}
tags: |
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}.{{minor}}.{{patch}}
type=sha,format=long
- name: Create and push manifest
run: |
# Extract the tags from metadata (these are the final manifest tags we want)
MANIFEST_TAGS="${{ steps.meta.outputs.tags }}"
# Create manifest for each tag
for manifest_tag in $MANIFEST_TAGS; do
echo "Creating manifest for $manifest_tag"
# The architecture-specific images have -amd64 and -arm64 suffixes
amd64_image="${manifest_tag}-amd64"
arm64_image="${manifest_tag}-arm64"
echo "Looking for images: $amd64_image and $arm64_image"
# Check if both architecture images exist
if docker manifest inspect "$amd64_image" >/dev/null 2>&1 && docker manifest inspect "$arm64_image" >/dev/null 2>&1; then
echo "Both images found, creating manifest..."
docker manifest create "$manifest_tag" \
"$amd64_image" \
"$arm64_image"
docker manifest push "$manifest_tag"
echo "Successfully created and pushed manifest for $manifest_tag"
else
echo "Error: One or both architecture images not found"
echo "Checking AMD64 image: $amd64_image"
docker manifest inspect "$amd64_image" || echo "AMD64 image not found"
echo "Checking ARM64 image: $arm64_image"
docker manifest inspect "$arm64_image" || echo "ARM64 image not found"
exit 1
fi
done

View File

@@ -6,72 +6,274 @@ on:
pull_request:
branches: [main, staging]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: false
jobs:
test:
test-build:
name: Test and Build
runs-on: ubuntu-latest
uses: ./.github/workflows/test-build.yml
secrets: inherit
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: latest
- name: Install dependencies
run: bun install
- name: Run tests with coverage
env:
NODE_OPTIONS: '--no-warnings'
NEXT_PUBLIC_APP_URL: 'https://www.sim.ai'
ENCRYPTION_KEY: '7cf672e460e430c1fba707575c2b0e2ad5a99dddf9b7b7e3b5646e630861db1c' # dummy key for CI only
run: bun run test
- name: Build application
env:
NODE_OPTIONS: '--no-warnings'
NEXT_PUBLIC_APP_URL: 'https://www.sim.ai'
STRIPE_SECRET_KEY: 'dummy_key_for_ci_only'
STRIPE_WEBHOOK_SECRET: 'dummy_secret_for_ci_only'
RESEND_API_KEY: 'dummy_key_for_ci_only'
AWS_REGION: 'us-west-2'
ENCRYPTION_KEY: '7cf672e460e430c1fba707575c2b0e2ad5a99dddf9b7b7e3b5646e630861db1c' # dummy key for CI only
run: bun run build
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
directory: ./apps/sim/coverage
fail_ci_if_error: false
verbose: true
migrations:
name: Apply Database Migrations
runs-on: ubuntu-latest
# Detect if this is a version release commit (e.g., "v0.5.24: ...")
detect-version:
name: Detect Version
runs-on: blacksmith-4vcpu-ubuntu-2404
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging')
needs: test
outputs:
version: ${{ steps.extract.outputs.version }}
is_release: ${{ steps.extract.outputs.is_release }}
steps:
- name: Extract version from commit message
id: extract
run: |
COMMIT_MSG="${{ github.event.head_commit.message }}"
# Only tag versions on main branch
if [ "${{ github.ref }}" = "refs/heads/main" ] && [[ "$COMMIT_MSG" =~ ^(v[0-9]+\.[0-9]+\.[0-9]+): ]]; then
VERSION="${BASH_REMATCH[1]}"
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "is_release=true" >> $GITHUB_OUTPUT
echo "✅ Detected release commit: ${VERSION}"
else
echo "version=" >> $GITHUB_OUTPUT
echo "is_release=false" >> $GITHUB_OUTPUT
echo " Not a release commit"
fi
# Build AMD64 images and push to ECR immediately (+ GHCR for main)
build-amd64:
name: Build AMD64
needs: [test-build, detect-version]
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging')
runs-on: blacksmith-8vcpu-ubuntu-2404
permissions:
contents: read
packages: write
id-token: write
strategy:
fail-fast: false
matrix:
include:
- dockerfile: ./docker/app.Dockerfile
ghcr_image: ghcr.io/simstudioai/simstudio
ecr_repo_secret: ECR_APP
- dockerfile: ./docker/db.Dockerfile
ghcr_image: ghcr.io/simstudioai/migrations
ecr_repo_secret: ECR_MIGRATIONS
- dockerfile: ./docker/realtime.Dockerfile
ghcr_image: ghcr.io/simstudioai/realtime
ecr_repo_secret: ECR_REALTIME
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
bun-version: latest
role-to-assume: ${{ github.ref == 'refs/heads/main' && secrets.AWS_ROLE_TO_ASSUME || secrets.STAGING_AWS_ROLE_TO_ASSUME }}
aws-region: ${{ github.ref == 'refs/heads/main' && secrets.AWS_REGION || secrets.STAGING_AWS_REGION }}
- name: Install dependencies
run: bun install
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
- name: Apply migrations
working-directory: ./apps/sim
env:
DATABASE_URL: ${{ github.ref == 'refs/heads/main' && secrets.DATABASE_URL || secrets.STAGING_DATABASE_URL }}
run: bunx drizzle-kit migrate
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GHCR
if: github.ref == 'refs/heads/main'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: useblacksmith/setup-docker-builder@v1
- name: Generate tags
id: meta
run: |
ECR_REGISTRY="${{ steps.login-ecr.outputs.registry }}"
ECR_REPO="${{ secrets[matrix.ecr_repo_secret] }}"
GHCR_IMAGE="${{ matrix.ghcr_image }}"
# ECR tags (always build for ECR)
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
ECR_TAG="latest"
else
ECR_TAG="staging"
fi
ECR_IMAGE="${ECR_REGISTRY}/${ECR_REPO}:${ECR_TAG}"
# Build tags list
TAGS="${ECR_IMAGE}"
# Add GHCR tags only for main branch
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
GHCR_AMD64="${GHCR_IMAGE}:latest-amd64"
GHCR_SHA="${GHCR_IMAGE}:${{ github.sha }}-amd64"
TAGS="${TAGS},$GHCR_AMD64,$GHCR_SHA"
# Add version tag if this is a release commit
if [ "${{ needs.detect-version.outputs.is_release }}" = "true" ]; then
VERSION="${{ needs.detect-version.outputs.version }}"
GHCR_VERSION="${GHCR_IMAGE}:${VERSION}-amd64"
TAGS="${TAGS},$GHCR_VERSION"
echo "📦 Adding version tag: ${VERSION}-amd64"
fi
fi
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
- name: Build and push images
uses: useblacksmith/build-push-action@v2
with:
context: .
file: ${{ matrix.dockerfile }}
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
provenance: false
sbom: false
# Build ARM64 images for GHCR (main branch only, runs in parallel)
build-ghcr-arm64:
name: Build ARM64 (GHCR Only)
needs: [test-build, detect-version]
runs-on: blacksmith-8vcpu-ubuntu-2404-arm
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
include:
- dockerfile: ./docker/app.Dockerfile
image: ghcr.io/simstudioai/simstudio
- dockerfile: ./docker/db.Dockerfile
image: ghcr.io/simstudioai/migrations
- dockerfile: ./docker/realtime.Dockerfile
image: ghcr.io/simstudioai/realtime
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: useblacksmith/setup-docker-builder@v1
- name: Generate ARM64 tags
id: meta
run: |
IMAGE="${{ matrix.image }}"
TAGS="${IMAGE}:latest-arm64,${IMAGE}:${{ github.sha }}-arm64"
# Add version tag if this is a release commit
if [ "${{ needs.detect-version.outputs.is_release }}" = "true" ]; then
VERSION="${{ needs.detect-version.outputs.version }}"
TAGS="${TAGS},${IMAGE}:${VERSION}-arm64"
echo "📦 Adding version tag: ${VERSION}-arm64"
fi
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
- name: Build and push ARM64 to GHCR
uses: useblacksmith/build-push-action@v2
with:
context: .
file: ${{ matrix.dockerfile }}
platforms: linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
provenance: false
sbom: false
# Create GHCR multi-arch manifests (only for main, after both builds)
create-ghcr-manifests:
name: Create GHCR Manifests
runs-on: blacksmith-2vcpu-ubuntu-2404
needs: [build-amd64, build-ghcr-arm64, detect-version]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
permissions:
packages: write
strategy:
matrix:
include:
- image: ghcr.io/simstudioai/simstudio
- image: ghcr.io/simstudioai/migrations
- image: ghcr.io/simstudioai/realtime
steps:
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create and push manifests
run: |
IMAGE_BASE="${{ matrix.image }}"
# Create latest manifest
docker manifest create "${IMAGE_BASE}:latest" \
"${IMAGE_BASE}:latest-amd64" \
"${IMAGE_BASE}:latest-arm64"
docker manifest push "${IMAGE_BASE}:latest"
# Create SHA manifest
docker manifest create "${IMAGE_BASE}:${{ github.sha }}" \
"${IMAGE_BASE}:${{ github.sha }}-amd64" \
"${IMAGE_BASE}:${{ github.sha }}-arm64"
docker manifest push "${IMAGE_BASE}:${{ github.sha }}"
# Create version manifest if this is a release commit
if [ "${{ needs.detect-version.outputs.is_release }}" = "true" ]; then
VERSION="${{ needs.detect-version.outputs.version }}"
echo "📦 Creating version manifest: ${VERSION}"
docker manifest create "${IMAGE_BASE}:${VERSION}" \
"${IMAGE_BASE}:${VERSION}-amd64" \
"${IMAGE_BASE}:${VERSION}-arm64"
docker manifest push "${IMAGE_BASE}:${VERSION}"
fi
# Check if docs changed
check-docs-changes:
name: Check Docs Changes
runs-on: blacksmith-4vcpu-ubuntu-2404
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
outputs:
docs_changed: ${{ steps.filter.outputs.docs }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2 # Need at least 2 commits to detect changes
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
docs:
- 'apps/docs/content/docs/en/**'
- 'apps/sim/scripts/process-docs.ts'
- 'apps/sim/lib/chunkers/**'
# Process docs embeddings (only when docs change, after ECR images are pushed)
process-docs:
name: Process Docs
needs: [build-amd64, check-docs-changes]
if: needs.check-docs-changes.outputs.docs_changed == 'true'
uses: ./.github/workflows/docs-embeddings.yml
secrets: inherit

View File

@@ -1,17 +1,14 @@
name: Process Docs Embeddings
on:
push:
branches: [main, staging]
paths:
- 'apps/docs/**'
workflow_call:
workflow_dispatch: # Allow manual triggering
jobs:
process-docs-embeddings:
name: Process Documentation Embeddings
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging'
runs-on: blacksmith-8vcpu-ubuntu-2404
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout code
@@ -20,19 +17,30 @@ jobs:
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
bun-version: 1.3.3
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: latest
- name: Cache Bun dependencies
uses: actions/cache@v4
with:
path: |
~/.bun/install/cache
node_modules
**/node_modules
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install dependencies
run: bun install
run: bun install --frozen-lockfile
- name: Process docs embeddings
working-directory: ./apps/sim
env:
DATABASE_URL: ${{ github.ref == 'refs/heads/main' && secrets.DATABASE_URL || secrets.STAGING_DATABASE_URL }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: bun run scripts/process-docs-embeddings.ts --clear
run: bun run scripts/process-docs.ts --clear

180
.github/workflows/i18n.yml vendored Normal file
View File

@@ -0,0 +1,180 @@
name: 'Auto-translate Documentation'
on:
push:
branches: [ staging ]
paths:
- 'apps/docs/content/docs/en/**'
- 'apps/docs/i18n.json'
permissions:
contents: write
pull-requests: write
jobs:
translate:
runs-on: blacksmith-4vcpu-ubuntu-2404
if: github.actor != 'github-actions[bot]' # Prevent infinite loops
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_PAT }}
fetch-depth: 0
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.3
- name: Cache Bun dependencies
uses: actions/cache@v4
with:
path: |
~/.bun/install/cache
node_modules
**/node_modules
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Run Lingo.dev translations
env:
LINGODOTDEV_API_KEY: ${{ secrets.LINGODOTDEV_API_KEY }}
run: |
cd apps/docs
bunx lingo.dev@latest i18n
- name: Check for translation changes
id: changes
run: |
cd apps/docs
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
if [ -n "$(git status --porcelain content/docs)" ]; then
echo "changes=true" >> $GITHUB_OUTPUT
else
echo "changes=false" >> $GITHUB_OUTPUT
fi
- name: Create Pull Request with translations
if: steps.changes.outputs.changes == 'true'
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GH_PAT }}
commit-message: "feat(i18n): update translations"
title: "feat(i18n): update translations"
body: |
## Summary
Automated translation updates triggered by changes to documentation.
This PR was automatically created after content changes were made, updating translations for all supported languages using Lingo.dev AI translation engine.
**Original trigger**: ${{ github.event.head_commit.message }}
**Commit**: ${{ github.sha }}
**Workflow**: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [x] Documentation
- [ ] Other: ___________
## Testing
This PR includes automated translations for modified English documentation content:
- 🇪🇸 Spanish (es) translations
- 🇫🇷 French (fr) translations
- 🇨🇳 Chinese (zh) translations
- 🇯🇵 Japanese (ja) translations
- 🇩🇪 German (de) translations
**What reviewers should focus on:**
- Verify translated content accuracy and context
- Check that all links and references work correctly in translated versions
- Ensure formatting, code blocks, and structure are preserved
- Validate that technical terms are appropriately translated
## Checklist
- [x] Code follows project style guidelines (automated translation)
- [x] Self-reviewed my changes (automated process)
- [ ] Tests added/updated and passing
- [x] No new warnings introduced
- [x] I confirm that I have read and agree to the terms outlined in the [Contributor License Agreement (CLA)](./CONTRIBUTING.md#contributor-license-agreement-cla)
## Screenshots/Videos
<!-- Translation changes are text-based - no visual changes expected -->
<!-- Reviewers should check the documentation site renders correctly for all languages -->
branch: auto-translate/staging-merge-${{ github.run_id }}
base: staging
labels: |
i18n
verify-translations:
needs: translate
runs-on: blacksmith-4vcpu-ubuntu-2404
if: always() # Run even if translation fails
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: staging
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.3
- name: Cache Bun dependencies
uses: actions/cache@v4
with:
path: |
~/.bun/install/cache
node_modules
**/node_modules
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install dependencies
run: |
cd apps/docs
bun install --frozen-lockfile
- name: Build documentation to verify translations
run: |
cd apps/docs
bun run build
- name: Report translation status
run: |
cd apps/docs
echo "## Translation Status Report" >> $GITHUB_STEP_SUMMARY
echo "**Triggered by merge to staging branch**" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
en_count=$(find content/docs/en -name "*.mdx" | wc -l)
es_count=$(find content/docs/es -name "*.mdx" 2>/dev/null | wc -l || echo 0)
fr_count=$(find content/docs/fr -name "*.mdx" 2>/dev/null | wc -l || echo 0)
zh_count=$(find content/docs/zh -name "*.mdx" 2>/dev/null | wc -l || echo 0)
ja_count=$(find content/docs/ja -name "*.mdx" 2>/dev/null | wc -l || echo 0)
de_count=$(find content/docs/de -name "*.mdx" 2>/dev/null | wc -l || echo 0)
es_percentage=$((es_count * 100 / en_count))
fr_percentage=$((fr_count * 100 / en_count))
zh_percentage=$((zh_count * 100 / en_count))
ja_percentage=$((ja_count * 100 / en_count))
de_percentage=$((de_count * 100 / en_count))
echo "### Coverage Statistics" >> $GITHUB_STEP_SUMMARY
echo "- **🇬🇧 English**: $en_count files (source)" >> $GITHUB_STEP_SUMMARY
echo "- **🇪🇸 Spanish**: $es_count/$en_count files ($es_percentage%)" >> $GITHUB_STEP_SUMMARY
echo "- **🇫🇷 French**: $fr_count/$en_count files ($fr_percentage%)" >> $GITHUB_STEP_SUMMARY
echo "- **🇨🇳 Chinese**: $zh_count/$en_count files ($zh_percentage%)" >> $GITHUB_STEP_SUMMARY
echo "- **🇯🇵 Japanese**: $ja_count/$en_count files ($ja_percentage%)" >> $GITHUB_STEP_SUMMARY
echo "- **🇩🇪 German**: $de_count/$en_count files ($de_percentage%)" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "🔄 **Auto-translation PR**: Check for new pull request with updated translations" >> $GITHUB_STEP_SUMMARY

181
.github/workflows/images.yml vendored Normal file
View File

@@ -0,0 +1,181 @@
name: Build and Push Images
on:
workflow_call:
workflow_dispatch:
permissions:
contents: read
packages: write
id-token: write
jobs:
build-amd64:
name: Build AMD64
runs-on: blacksmith-8vcpu-ubuntu-2404
strategy:
fail-fast: false
matrix:
include:
- dockerfile: ./docker/app.Dockerfile
ghcr_image: ghcr.io/simstudioai/simstudio
ecr_repo_secret: ECR_APP
- dockerfile: ./docker/db.Dockerfile
ghcr_image: ghcr.io/simstudioai/migrations
ecr_repo_secret: ECR_MIGRATIONS
- dockerfile: ./docker/realtime.Dockerfile
ghcr_image: ghcr.io/simstudioai/realtime
ecr_repo_secret: ECR_REALTIME
outputs:
registry: ${{ steps.login-ecr.outputs.registry }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ github.ref == 'refs/heads/main' && secrets.AWS_ROLE_TO_ASSUME || secrets.STAGING_AWS_ROLE_TO_ASSUME }}
aws-region: ${{ github.ref == 'refs/heads/main' && secrets.AWS_REGION || secrets.STAGING_AWS_REGION }}
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GHCR
if: github.ref == 'refs/heads/main'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: useblacksmith/setup-docker-builder@v1
- name: Generate tags
id: meta
run: |
ECR_REGISTRY="${{ steps.login-ecr.outputs.registry }}"
ECR_REPO="${{ secrets[matrix.ecr_repo_secret] }}"
GHCR_IMAGE="${{ matrix.ghcr_image }}"
# ECR tags (always build for ECR)
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
ECR_TAG="latest"
else
ECR_TAG="staging"
fi
ECR_IMAGE="${ECR_REGISTRY}/${ECR_REPO}:${ECR_TAG}"
# Build tags list
TAGS="${ECR_IMAGE}"
# Add GHCR tags only for main branch
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
GHCR_AMD64="${GHCR_IMAGE}:latest-amd64"
GHCR_SHA="${GHCR_IMAGE}:${{ github.sha }}-amd64"
TAGS="${TAGS},$GHCR_AMD64,$GHCR_SHA"
fi
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
- name: Build and push images
uses: useblacksmith/build-push-action@v2
with:
context: .
file: ${{ matrix.dockerfile }}
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
provenance: false
sbom: false
build-ghcr-arm64:
name: Build ARM64 (GHCR Only)
runs-on: blacksmith-8vcpu-ubuntu-2404-arm
if: github.ref == 'refs/heads/main'
strategy:
fail-fast: false
matrix:
include:
- dockerfile: ./docker/app.Dockerfile
image: ghcr.io/simstudioai/simstudio
- dockerfile: ./docker/db.Dockerfile
image: ghcr.io/simstudioai/migrations
- dockerfile: ./docker/realtime.Dockerfile
image: ghcr.io/simstudioai/realtime
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: useblacksmith/setup-docker-builder@v1
- name: Generate ARM64 tags
id: meta
run: |
IMAGE="${{ matrix.image }}"
echo "tags=${IMAGE}:latest-arm64,${IMAGE}:${{ github.sha }}-arm64" >> $GITHUB_OUTPUT
- name: Build and push ARM64 to GHCR
uses: useblacksmith/build-push-action@v2
with:
context: .
file: ${{ matrix.dockerfile }}
platforms: linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
provenance: false
sbom: false
create-ghcr-manifests:
name: Create GHCR Manifests
runs-on: blacksmith-8vcpu-ubuntu-2404
needs: [build-amd64, build-ghcr-arm64]
if: github.ref == 'refs/heads/main'
strategy:
matrix:
include:
- image: ghcr.io/simstudioai/simstudio
- image: ghcr.io/simstudioai/migrations
- image: ghcr.io/simstudioai/realtime
steps:
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create and push manifests
run: |
IMAGE_BASE="${{ matrix.image }}"
# Create latest manifest
docker manifest create "${IMAGE_BASE}:latest" \
"${IMAGE_BASE}:latest-amd64" \
"${IMAGE_BASE}:latest-arm64"
docker manifest push "${IMAGE_BASE}:latest"
# Create SHA manifest
docker manifest create "${IMAGE_BASE}:${{ github.sha }}" \
"${IMAGE_BASE}:${{ github.sha }}-amd64" \
"${IMAGE_BASE}:${{ github.sha }}-arm64"
docker manifest push "${IMAGE_BASE}:${{ github.sha }}"

39
.github/workflows/migrations.yml vendored Normal file
View File

@@ -0,0 +1,39 @@
name: Database Migrations
on:
workflow_call:
workflow_dispatch:
jobs:
migrate:
name: Apply Database Migrations
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.3
- name: Cache Bun dependencies
uses: actions/cache@v4
with:
path: |
~/.bun/install/cache
node_modules
**/node_modules
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Apply migrations
working-directory: ./packages/db
env:
DATABASE_URL: ${{ github.ref == 'refs/heads/main' && secrets.DATABASE_URL || secrets.STAGING_DATABASE_URL }}
run: bunx drizzle-kit migrate --config=./drizzle.config.ts

View File

@@ -8,7 +8,7 @@ on:
jobs:
publish-npm:
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Checkout repository
uses: actions/checkout@v4
@@ -16,7 +16,7 @@ jobs:
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
bun-version: 1.3.3
- name: Setup Node.js for npm publishing
uses: actions/setup-node@v4
@@ -24,9 +24,20 @@ jobs:
node-version: '18'
registry-url: 'https://registry.npmjs.org/'
- name: Cache Bun dependencies
uses: actions/cache@v4
with:
path: |
~/.bun/install/cache
node_modules
**/node_modules
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install dependencies
working-directory: packages/cli
run: bun install
run: bun install --frozen-lockfile
- name: Build package
working-directory: packages/cli

View File

@@ -8,7 +8,7 @@ on:
jobs:
publish-pypi:
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Checkout repository
uses: actions/checkout@v4
@@ -84,6 +84,6 @@ jobs:
```
### Documentation
See the [README](https://github.com/simstudio/sim/tree/main/packages/python-sdk) for usage instructions.
See the [README](https://github.com/simstudioai/sim/tree/main/packages/python-sdk) or the [docs](https://docs.sim.ai/sdks/python) for more information.
draft: false
prerelease: false

View File

@@ -8,7 +8,7 @@ on:
jobs:
publish-npm:
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Checkout repository
uses: actions/checkout@v4
@@ -16,17 +16,27 @@ jobs:
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
bun-version: 1.3.3
- name: Setup Node.js for npm publishing
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '22'
registry-url: 'https://registry.npmjs.org/'
- name: Cache Bun dependencies
uses: actions/cache@v4
with:
path: |
~/.bun/install/cache
node_modules
**/node_modules
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install dependencies
working-directory: packages/ts-sdk
run: bun install
run: bun install --frozen-lockfile
- name: Run tests
working-directory: packages/ts-sdk
@@ -80,6 +90,6 @@ jobs:
```
### Documentation
See the [README](https://github.com/simstudio/sim/tree/main/packages/ts-sdk) for usage instructions.
See the [README](https://github.com/simstudioai/sim/tree/main/packages/ts-sdk) or the [docs](https://docs.sim.ai/sdks/typescript) for more information.
draft: false
prerelease: false

82
.github/workflows/test-build.yml vendored Normal file
View File

@@ -0,0 +1,82 @@
name: Test and Build
on:
workflow_call:
workflow_dispatch:
jobs:
test-build:
name: Test and Build
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.3
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: latest
- name: Mount Bun cache (Sticky Disk)
uses: useblacksmith/stickydisk@v1
with:
key: ${{ github.repository }}-bun-cache
path: ~/.bun/install/cache
- name: Mount node_modules (Sticky Disk)
uses: useblacksmith/stickydisk@v1
with:
key: ${{ github.repository }}-node-modules
path: ./node_modules
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Lint code
run: bun run lint:check
- name: Run tests with coverage
env:
NODE_OPTIONS: '--no-warnings'
NEXT_PUBLIC_APP_URL: 'https://www.sim.ai'
DATABASE_URL: 'postgresql://postgres:postgres@localhost:5432/simstudio'
ENCRYPTION_KEY: '7cf672e460e430c1fba707575c2b0e2ad5a99dddf9b7b7e3b5646e630861db1c' # dummy key for CI only
run: bun run test
- name: Check schema and migrations are in sync
working-directory: packages/db
run: |
bunx drizzle-kit generate --config=./drizzle.config.ts
if [ -n "$(git status --porcelain ./migrations)" ]; then
echo "❌ Schema and migrations are out of sync!"
echo "Run 'cd packages/db && bunx drizzle-kit generate' and commit the new migrations."
git status --porcelain ./migrations
git diff ./migrations
exit 1
fi
echo "✅ Schema and migrations are in sync"
- name: Build application
env:
NODE_OPTIONS: '--no-warnings'
NEXT_PUBLIC_APP_URL: 'https://www.sim.ai'
DATABASE_URL: 'postgresql://postgres:postgres@localhost:5432/simstudio'
STRIPE_SECRET_KEY: 'dummy_key_for_ci_only'
STRIPE_WEBHOOK_SECRET: 'dummy_secret_for_ci_only'
RESEND_API_KEY: 'dummy_key_for_ci_only'
AWS_REGION: 'us-west-2'
ENCRYPTION_KEY: '7cf672e460e430c1fba707575c2b0e2ad5a99dddf9b7b7e3b5646e630861db1c' # dummy key for CI only
run: bun run build
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
directory: ./apps/sim/coverage
fail_ci_if_error: false
verbose: true

View File

@@ -1,44 +0,0 @@
name: Trigger.dev Deploy
on:
push:
branches:
- main
- staging
jobs:
deploy:
name: Trigger.dev Deploy
runs-on: ubuntu-latest
concurrency:
group: trigger-deploy-${{ github.ref }}
cancel-in-progress: false
env:
TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Deploy to Staging
if: github.ref == 'refs/heads/staging'
working-directory: ./apps/sim
run: npx --yes trigger.dev@4.0.0 deploy -e staging
- name: Deploy to Production
if: github.ref == 'refs/heads/main'
working-directory: ./apps/sim
run: npx --yes trigger.dev@4.0.0 deploy

8
.gitignore vendored
View File

@@ -46,7 +46,7 @@ sim-standalone.tar.gz
next-env.d.ts
# cursorrules
.cursorrules
# .cursorrules
# docs
/apps/docs/.source
@@ -67,5 +67,9 @@ start-collector.sh
# VSCode
.vscode
# IntelliJ
.idea
## Helm Chart Tests
helm/sim/test
helm/sim/test
i18n.cache

295
CLAUDE.md Normal file
View File

@@ -0,0 +1,295 @@
# Sim Studio Development Guidelines
You are a professional software engineer. All code must follow best practices: accurate, readable, clean, and efficient.
## Global Standards
- **Logging**: Import `createLogger` from `@sim/logger`. Use `logger.info`, `logger.warn`, `logger.error` instead of `console.log`
- **Comments**: Use TSDoc for documentation. No `====` separators. No non-TSDoc comments
- **Styling**: Never update global styles. Keep all styling local to components
- **Package Manager**: Use `bun` and `bunx`, not `npm` and `npx`
## Architecture
### Core Principles
1. Single Responsibility: Each component, hook, store has one clear purpose
2. Composition Over Complexity: Break down complex logic into smaller pieces
3. Type Safety First: TypeScript interfaces for all props, state, return types
4. Predictable State: Zustand for global state, useState for UI-only concerns
### Root Structure
```
apps/sim/
├── app/ # Next.js app router (pages, API routes)
├── blocks/ # Block definitions and registry
├── components/ # Shared UI (emcn/, ui/)
├── executor/ # Workflow execution engine
├── hooks/ # Shared hooks (queries/, selectors/)
├── lib/ # App-wide utilities
├── providers/ # LLM provider integrations
├── stores/ # Zustand stores
├── tools/ # Tool definitions
└── triggers/ # Trigger definitions
```
### Naming Conventions
- Components: PascalCase (`WorkflowList`)
- Hooks: `use` prefix (`useWorkflowOperations`)
- Files: kebab-case (`workflow-list.tsx`)
- Stores: `stores/feature/store.ts`
- Constants: SCREAMING_SNAKE_CASE
- Interfaces: PascalCase with suffix (`WorkflowListProps`)
## Imports
**Always use absolute imports.** Never use relative imports.
```typescript
// ✓ Good
import { useWorkflowStore } from '@/stores/workflows/store'
// ✗ Bad
import { useWorkflowStore } from '../../../stores/workflows/store'
```
Use barrel exports (`index.ts`) when a folder has 3+ exports.
### Import Order
1. React/core libraries
2. External libraries
3. UI components (`@/components/emcn`, `@/components/ui`)
4. Utilities (`@/lib/...`)
5. Stores (`@/stores/...`)
6. Feature imports
7. CSS imports
Use `import type { X }` for type-only imports.
## TypeScript
1. No `any` - Use proper types or `unknown` with type guards
2. Always define props interface for components
3. `as const` for constant objects/arrays
4. Explicit ref types: `useRef<HTMLDivElement>(null)`
## Components
```typescript
'use client' // Only if using hooks
const CONFIG = { SPACING: 8 } as const
interface ComponentProps {
requiredProp: string
optionalProp?: boolean
}
export function Component({ requiredProp, optionalProp = false }: ComponentProps) {
// Order: refs → external hooks → store hooks → custom hooks → state → useMemo → useCallback → useEffect → return
}
```
Extract when: 50+ lines, used in 2+ files, or has own state/logic. Keep inline when: < 10 lines, single use, purely presentational.
## Hooks
```typescript
interface UseFeatureProps { id: string }
export function useFeature({ id }: UseFeatureProps) {
const idRef = useRef(id)
const [data, setData] = useState<Data | null>(null)
useEffect(() => { idRef.current = id }, [id])
const fetchData = useCallback(async () => { ... }, []) // Empty deps when using refs
return { data, fetchData }
}
```
## Zustand Stores
Stores live in `stores/`. Complex stores split into `store.ts` + `types.ts`.
```typescript
import { create } from 'zustand'
import { devtools } from 'zustand/middleware'
const initialState = { items: [] as Item[] }
export const useFeatureStore = create<FeatureState>()(
devtools(
(set, get) => ({
...initialState,
setItems: (items) => set({ items }),
reset: () => set(initialState),
}),
{ name: 'feature-store' }
)
)
```
Use `devtools` middleware. Use `persist` only when data should survive reload with `partialize` to persist only necessary state.
## React Query
All React Query hooks live in `hooks/queries/`.
```typescript
export const entityKeys = {
all: ['entity'] as const,
list: (workspaceId?: string) => [...entityKeys.all, 'list', workspaceId ?? ''] as const,
}
export function useEntityList(workspaceId?: string) {
return useQuery({
queryKey: entityKeys.list(workspaceId),
queryFn: () => fetchEntities(workspaceId as string),
enabled: Boolean(workspaceId),
staleTime: 60 * 1000,
placeholderData: keepPreviousData,
})
}
```
## Styling
Use Tailwind only, no inline styles. Use `cn()` from `@/lib/utils` for conditional classes.
```typescript
<div className={cn('base-classes', isActive && 'active-classes')} />
```
## EMCN Components
Import from `@/components/emcn`, never from subpaths (except CSS files). Use CVA when 2+ variants exist.
## Testing
Use Vitest. Test files: `feature.ts``feature.test.ts`
```typescript
/**
* @vitest-environment node
*/
// Mocks BEFORE imports
vi.mock('@sim/db', () => ({ db: { select: vi.fn() } }))
// Imports AFTER mocks
import { describe, expect, it, vi } from 'vitest'
import { createSession, loggerMock } from '@sim/testing'
describe('feature', () => {
beforeEach(() => vi.clearAllMocks())
it.concurrent('runs in parallel', () => { ... })
})
```
Use `@sim/testing` factories over manual test data.
## Utils Rules
- Never create `utils.ts` for single consumer - inline it
- Create `utils.ts` when 2+ files need the same helper
- Check existing sources in `lib/` before duplicating
## Adding Integrations
New integrations require: **Tools****Block****Icon** → (optional) **Trigger**
Always look up the service's API docs first.
### 1. Tools (`tools/{service}/`)
```
tools/{service}/
├── index.ts # Barrel export
├── types.ts # Params/response types
└── {action}.ts # Tool implementation
```
**Tool structure:**
```typescript
export const serviceTool: ToolConfig<Params, Response> = {
id: 'service_action',
name: 'Service Action',
description: '...',
version: '1.0.0',
oauth: { required: true, provider: 'service' },
params: { /* ... */ },
request: { url: '/api/tools/service/action', method: 'POST', ... },
transformResponse: async (response) => { /* ... */ },
outputs: { /* ... */ },
}
```
Register in `tools/registry.ts`.
### 2. Block (`blocks/blocks/{service}.ts`)
```typescript
export const ServiceBlock: BlockConfig = {
type: 'service',
name: 'Service',
description: '...',
category: 'tools',
bgColor: '#hexcolor',
icon: ServiceIcon,
subBlocks: [ /* see SubBlock Properties */ ],
tools: { access: ['service_action'], config: { tool: (p) => `service_${p.operation}` } },
inputs: { /* ... */ },
outputs: { /* ... */ },
}
```
Register in `blocks/registry.ts` (alphabetically).
**SubBlock Properties:**
```typescript
{
id: 'field', title: 'Label', type: 'short-input', placeholder: '...',
required: true, // or condition object
condition: { field: 'op', value: 'send' }, // show/hide
dependsOn: ['credential'], // clear when dep changes
mode: 'basic', // 'basic' | 'advanced' | 'both' | 'trigger'
}
```
**condition examples:**
- `{ field: 'op', value: 'send' }` - show when op === 'send'
- `{ field: 'op', value: ['a','b'] }` - show when op is 'a' OR 'b'
- `{ field: 'op', value: 'x', not: true }` - show when op !== 'x'
- `{ field: 'op', value: 'x', not: true, and: { field: 'type', value: 'dm', not: true } }` - complex
**dependsOn:** `['field']` or `{ all: ['a'], any: ['b', 'c'] }`
### 3. Icon (`components/icons.tsx`)
```typescript
export function ServiceIcon(props: SVGProps<SVGSVGElement>) {
return <svg {...props}>/* SVG from brand assets */</svg>
}
```
### 4. Trigger (`triggers/{service}/`) - Optional
```
triggers/{service}/
├── index.ts # Barrel export
├── webhook.ts # Webhook handler
└── {event}.ts # Event-specific handlers
```
Register in `triggers/registry.ts`.
### Integration Checklist
- [ ] Look up API docs
- [ ] Create `tools/{service}/` with types and tools
- [ ] Register tools in `tools/registry.ts`
- [ ] Add icon to `components/icons.tsx`
- [ ] Create block in `blocks/blocks/{service}.ts`
- [ ] Register block in `blocks/registry.ts`
- [ ] (Optional) Create and register triggers

109
README.md
View File

@@ -13,8 +13,25 @@
<a href="https://docs.sim.ai" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/badge/Docs-6F3DFA.svg" alt="Documentation"></a>
</p>
### Build Workflows with Ease
Design agent workflows visually on a canvas—connect agents, tools, and blocks, then run them instantly.
<p align="center">
<img src="apps/sim/public/static/demo.gif" alt="Sim Demo" width="800"/>
<img src="apps/sim/public/static/workflow.gif" alt="Workflow Builder Demo" width="800"/>
</p>
### Supercharge with Copilot
Leverage Copilot to generate nodes, fix errors, and iterate on flows directly from natural language.
<p align="center">
<img src="apps/sim/public/static/copilot.gif" alt="Copilot Demo" width="800"/>
</p>
### Integrate Vector Databases
Upload documents to a vector store and let agents answer questions grounded in your specific content.
<p align="center">
<img src="apps/sim/public/static/knowledge.gif" alt="Knowledge Uploads and Retrieval Demo" width="800"/>
</p>
## Quickstart
@@ -72,6 +89,36 @@ Wait for the model to download, then visit [http://localhost:3000](http://localh
docker compose -f docker-compose.ollama.yml exec ollama ollama pull llama3.1:8b
```
#### Using an External Ollama Instance
If you already have Ollama running on your host machine (outside Docker), you need to configure the `OLLAMA_URL` to use `host.docker.internal` instead of `localhost`:
```bash
# Docker Desktop (macOS/Windows)
OLLAMA_URL=http://host.docker.internal:11434 docker compose -f docker-compose.prod.yml up -d
# Linux (add extra_hosts or use host IP)
docker compose -f docker-compose.prod.yml up -d # Then set OLLAMA_URL to your host's IP
```
**Why?** When running inside Docker, `localhost` refers to the container itself, not your host machine. `host.docker.internal` is a special DNS name that resolves to the host.
For Linux users, you can either:
- Use your host machine's actual IP address (e.g., `http://192.168.1.100:11434`)
- Add `extra_hosts: ["host.docker.internal:host-gateway"]` to the simstudio service in your compose file
#### Using vLLM
Sim also supports [vLLM](https://docs.vllm.ai/) for self-hosted models with OpenAI-compatible API:
```bash
# Set these environment variables
VLLM_BASE_URL=http://your-vllm-server:8000
VLLM_API_KEY=your_optional_api_key # Only if your vLLM instance requires auth
```
When running with Docker, use `host.docker.internal` if vLLM is on your host machine (same as Ollama above).
### Self-hosted: Dev Containers
1. Open VS Code with the [Remote - Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
@@ -83,6 +130,7 @@ docker compose -f docker-compose.ollama.yml exec ollama ollama pull llama3.1:8b
**Requirements:**
- [Bun](https://bun.sh/) runtime
- [Node.js](https://nodejs.org/) v20+ (required for sandboxed code execution)
- PostgreSQL 12+ with [pgvector extension](https://github.com/pgvector/pgvector) (required for AI embeddings)
**Note:** Sim uses vector embeddings for AI features like knowledge bases and semantic search, which requires the `pgvector` PostgreSQL extension.
@@ -127,8 +175,21 @@ DATABASE_URL="postgresql://postgres:your_password@localhost:5432/simstudio"
4. Set up the database:
First, configure the database package environment:
```bash
bunx drizzle-kit migrate
cd packages/db
cp .env.example .env
```
Update your `packages/db/.env` file with the database URL:
```bash
DATABASE_URL="postgresql://postgres:your_password@localhost:5432/simstudio"
```
Then run the migrations:
```bash
cd packages/db # Required so drizzle picks correct .env file
bunx drizzle-kit migrate --config=./drizzle.config.ts
```
5. Start the development servers:
@@ -159,8 +220,47 @@ bun run dev:sockets
Copilot is a Sim-managed service. To use Copilot on a self-hosted instance:
- Go to https://sim.ai → Settings → Copilot and generate a Copilot API key
- Set `COPILOT_API_KEY` in your self-hosted environment to that value
- Host Sim on a publicly available DNS and set NEXT_PUBLIC_APP_URL and BETTER_AUTH_URL to that value ([ngrok](https://ngrok.com/))
- Set `COPILOT_API_KEY` environment variable in your self-hosted apps/sim/.env file to that value
## Environment Variables
Key environment variables for self-hosted deployments (see `apps/sim/.env.example` for full list):
| Variable | Required | Description |
|----------|----------|-------------|
| `DATABASE_URL` | Yes | PostgreSQL connection string with pgvector |
| `BETTER_AUTH_SECRET` | Yes | Auth secret (`openssl rand -hex 32`) |
| `BETTER_AUTH_URL` | Yes | Your app URL (e.g., `http://localhost:3000`) |
| `NEXT_PUBLIC_APP_URL` | Yes | Public app URL (same as above) |
| `ENCRYPTION_KEY` | Yes | Encryption key (`openssl rand -hex 32`) |
| `OLLAMA_URL` | No | Ollama server URL (default: `http://localhost:11434`) |
| `VLLM_BASE_URL` | No | vLLM server URL for self-hosted models |
| `COPILOT_API_KEY` | No | API key from sim.ai for Copilot features |
## Troubleshooting
### Ollama models not showing in dropdown (Docker)
If you're running Ollama on your host machine and Sim in Docker, change `OLLAMA_URL` from `localhost` to `host.docker.internal`:
```bash
OLLAMA_URL=http://host.docker.internal:11434 docker compose -f docker-compose.prod.yml up -d
```
See [Using an External Ollama Instance](#using-an-external-ollama-instance) for details.
### Database connection issues
Ensure PostgreSQL has the pgvector extension installed. When using Docker, wait for the database to be healthy before running migrations.
### Port conflicts
If ports 3000, 3002, or 5432 are in use, configure alternatives:
```bash
# Custom ports
NEXT_PUBLIC_APP_URL=http://localhost:3100 POSTGRES_PORT=5433 docker compose up -d
```
## Tech Stack
@@ -175,6 +275,7 @@ Copilot is a Sim-managed service. To use Copilot on a self-hosted instance:
- **Monorepo**: [Turborepo](https://turborepo.org/)
- **Realtime**: [Socket.io](https://socket.io/)
- **Background Jobs**: [Trigger.dev](https://trigger.dev/)
- **Remote Code Execution**: [E2B](https://www.e2b.dev/)
## Contributing

View File

@@ -1,5 +0,0 @@
import type { ReactNode } from 'react'
export default function SlugLayout({ children }: { children: ReactNode }) {
return children
}

View File

@@ -1,58 +0,0 @@
import { DocsBody, DocsDescription, DocsPage, DocsTitle } from 'fumadocs-ui/page'
import { notFound } from 'next/navigation'
import mdxComponents from '@/components/mdx-components'
import { source } from '@/lib/source'
export const dynamic = 'force-dynamic'
export default async function Page(props: { params: Promise<{ slug?: string[] }> }) {
const params = await props.params
const page = source.getPage(params.slug)
if (!page) notFound()
const MDX = page.data.body
return (
<DocsPage
toc={page.data.toc}
full={page.data.full}
tableOfContent={{
style: 'clerk',
enabled: true,
header: <div className='mb-2 font-medium text-sm'>On this page</div>,
single: false,
}}
article={{
className: 'scroll-smooth max-sm:pb-16',
}}
tableOfContentPopover={{
style: 'clerk',
enabled: true,
}}
footer={{
enabled: false,
}}
>
<DocsTitle>{page.data.title}</DocsTitle>
<DocsDescription>{page.data.description}</DocsDescription>
<DocsBody>
<MDX components={mdxComponents} />
</DocsBody>
</DocsPage>
)
}
export async function generateStaticParams() {
return source.generateParams()
}
export async function generateMetadata(props: { params: Promise<{ slug?: string[] }> }) {
const params = await props.params
const page = source.getPage(params.slug)
if (!page) notFound()
return {
title: page.data.title,
description: page.data.description,
}
}

View File

@@ -1,46 +0,0 @@
import type { ReactNode } from 'react'
import { DocsLayout } from 'fumadocs-ui/layouts/docs'
import { ExternalLink, GithubIcon } from 'lucide-react'
import Link from 'next/link'
import { source } from '@/lib/source'
const GitHubLink = () => (
<div className='fixed right-4 bottom-4 z-50'>
<Link
href='https://github.com/simstudioai/sim'
target='_blank'
rel='noopener noreferrer'
className='flex h-8 w-8 items-center justify-center rounded-full border border-border bg-background transition-colors hover:bg-muted'
>
<GithubIcon className='h-4 w-4' />
</Link>
</div>
)
export default function Layout({ children }: { children: ReactNode }) {
return (
<>
<DocsLayout
tree={source.pageTree}
nav={{
title: <div className='flex items-center font-medium'>Sim</div>,
}}
links={[
{
text: 'Visit Sim',
url: 'https://sim.ai',
icon: <ExternalLink className='h-4 w-4' />,
},
]}
sidebar={{
defaultOpenLevel: 1,
collapsible: true,
footer: null,
}}
>
{children}
</DocsLayout>
<GitHubLink />
</>
)
}

View File

@@ -0,0 +1,335 @@
import type React from 'react'
import { findNeighbour } from 'fumadocs-core/page-tree'
import defaultMdxComponents from 'fumadocs-ui/mdx'
import { DocsBody, DocsDescription, DocsPage, DocsTitle } from 'fumadocs-ui/page'
import { ChevronLeft, ChevronRight } from 'lucide-react'
import Link from 'next/link'
import { notFound } from 'next/navigation'
import { PageNavigationArrows } from '@/components/docs-layout/page-navigation-arrows'
import { TOCFooter } from '@/components/docs-layout/toc-footer'
import { LLMCopyButton } from '@/components/page-actions'
import { StructuredData } from '@/components/structured-data'
import { CodeBlock } from '@/components/ui/code-block'
import { Heading } from '@/components/ui/heading'
import { type PageData, source } from '@/lib/source'
export default async function Page(props: { params: Promise<{ slug?: string[]; lang: string }> }) {
const params = await props.params
const page = source.getPage(params.slug, params.lang)
if (!page) notFound()
const data = page.data as PageData
const MDX = data.body
const baseUrl = 'https://docs.sim.ai'
const pageTreeRecord = source.pageTree as Record<string, any>
const pageTree =
pageTreeRecord[params.lang] ?? pageTreeRecord.en ?? Object.values(pageTreeRecord)[0]
const neighbours = pageTree ? findNeighbour(pageTree, page.url) : null
const generateBreadcrumbs = () => {
const breadcrumbs: Array<{ name: string; url: string }> = [
{
name: 'Home',
url: baseUrl,
},
]
const urlParts = page.url.split('/').filter(Boolean)
let currentPath = ''
urlParts.forEach((part, index) => {
if (index === 0 && ['en', 'es', 'fr', 'de', 'ja', 'zh'].includes(part)) {
currentPath = `/${part}`
return
}
currentPath += `/${part}`
const name = part
.split('-')
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
.join(' ')
if (index === urlParts.length - 1) {
breadcrumbs.push({
name: data.title,
url: `${baseUrl}${page.url}`,
})
} else {
breadcrumbs.push({
name: name,
url: `${baseUrl}${currentPath}`,
})
}
})
return breadcrumbs
}
const breadcrumbs = generateBreadcrumbs()
const CustomFooter = () => (
<div className='mt-12'>
{/* Navigation links */}
<div className='flex items-center justify-between py-8'>
{neighbours?.previous ? (
<Link
href={neighbours.previous.url}
className='group flex items-center gap-2 text-muted-foreground transition-colors hover:text-foreground'
>
<ChevronLeft className='group-hover:-translate-x-1 h-4 w-4 transition-transform' />
<span className='font-medium'>{neighbours.previous.name}</span>
</Link>
) : (
<div />
)}
{neighbours?.next ? (
<Link
href={neighbours.next.url}
className='group flex items-center gap-2 text-muted-foreground transition-colors hover:text-foreground'
>
<span className='font-medium'>{neighbours.next.name}</span>
<ChevronRight className='h-4 w-4 transition-transform group-hover:translate-x-1' />
</Link>
) : (
<div />
)}
</div>
{/* Divider line */}
<div className='border-border border-t' />
{/* Social icons */}
<div className='flex items-center gap-4 py-6'>
<Link
href='https://x.com/simdotai'
target='_blank'
rel='noopener noreferrer'
aria-label='X (Twitter)'
>
<div
className='h-5 w-5 bg-gray-400 transition-colors hover:bg-gray-500 dark:bg-gray-500 dark:hover:bg-gray-400'
style={{
maskImage:
"url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cpath d=%22M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z%22/%3E%3C/svg%3E')",
maskRepeat: 'no-repeat',
maskPosition: 'center center',
WebkitMaskImage:
"url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cpath d=%22M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z%22/%3E%3C/svg%3E')",
WebkitMaskRepeat: 'no-repeat',
WebkitMaskPosition: 'center center',
}}
/>
</Link>
<Link
href='https://github.com/simstudioai/sim'
target='_blank'
rel='noopener noreferrer'
aria-label='GitHub'
>
<div
className='h-5 w-5 bg-gray-400 transition-colors hover:bg-gray-500 dark:bg-gray-500 dark:hover:bg-gray-400'
style={{
maskImage:
"url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cpath d=%22M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z%22/%3E%3C/svg%3E')",
maskRepeat: 'no-repeat',
maskPosition: 'center center',
WebkitMaskImage:
"url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cpath d=%22M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z%22/%3E%3C/svg%3E')",
WebkitMaskRepeat: 'no-repeat',
WebkitMaskPosition: 'center center',
}}
/>
</Link>
<Link
href='https://discord.gg/Hr4UWYEcTT'
target='_blank'
rel='noopener noreferrer'
aria-label='Discord'
>
<div
className='h-5 w-5 bg-gray-400 transition-colors hover:bg-gray-500 dark:bg-gray-500 dark:hover:bg-gray-400'
style={{
maskImage:
"url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cpath d=%22M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515a.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0a12.64 12.64 0 0 0-.617-1.25a.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057a19.9 19.9 0 0 0 5.993 3.03a.078.078 0 0 0 .084-.028a14.09 14.09 0 0 0 1.226-1.994a.076.076 0 0 0-.041-.106a13.107 13.107 0 0 1-1.872-.892a.077.077 0 0 1-.008-.128a10.2 10.2 0 0 0 .372-.292a.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127a12.299 12.299 0 0 1-1.873.892a.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028a19.839 19.839 0 0 0 6.002-3.03a.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419c0-1.333.956-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419c0-1.333.955-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.946 2.418-2.157 2.418z%22/%3E%3C/svg%3E')",
maskRepeat: 'no-repeat',
maskPosition: 'center center',
WebkitMaskImage:
"url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cpath d=%22M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515a.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0a12.64 12.64 0 0 0-.617-1.25a.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057a19.9 19.9 0 0 0 5.993 3.03a.078.078 0 0 0 .084-.028a14.09 14.09 0 0 0 1.226-1.994a.076.076 0 0 0-.041-.106a13.107 13.107 0 0 1-1.872-.892a.077.077 0 0 1-.008-.128a10.2 10.2 0 0 0 .372-.292a.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127a12.299 12.299 0 0 1-1.873.892a.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028a19.839 19.839 0 0 0 6.002-3.03a.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419c0-1.333.956-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419c0-1.333.955-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.946 2.418-2.157 2.418z%22/%3E%3C/svg%3E')",
WebkitMaskRepeat: 'no-repeat',
WebkitMaskPosition: 'center center',
}}
/>
</Link>
</div>
</div>
)
return (
<>
<StructuredData
title={data.title}
description={data.description || ''}
url={`${baseUrl}${page.url}`}
lang={params.lang}
breadcrumb={breadcrumbs}
/>
<DocsPage
toc={data.toc}
full={data.full}
breadcrumb={{
enabled: false,
}}
tableOfContent={{
style: 'clerk',
enabled: true,
header: (
<div key='toc-header' className='mb-2 font-medium text-sm'>
On this page
</div>
),
footer: <TOCFooter />,
single: false,
}}
tableOfContentPopover={{
style: 'clerk',
enabled: true,
}}
footer={{
enabled: true,
component: <CustomFooter />,
}}
>
<div className='relative mt-6 sm:mt-0'>
<div className='absolute top-1 right-0 flex items-center gap-2'>
<div className='hidden sm:flex'>
<LLMCopyButton markdownUrl={`${page.url}.mdx`} />
</div>
<PageNavigationArrows previous={neighbours?.previous} next={neighbours?.next} />
</div>
<DocsTitle>{data.title}</DocsTitle>
<DocsDescription>{data.description}</DocsDescription>
</div>
<DocsBody>
<MDX
components={{
...defaultMdxComponents,
CodeBlock,
h1: (props: React.HTMLAttributes<HTMLHeadingElement>) => (
<Heading as='h1' {...props} />
),
h2: (props: React.HTMLAttributes<HTMLHeadingElement>) => (
<Heading as='h2' {...props} />
),
h3: (props: React.HTMLAttributes<HTMLHeadingElement>) => (
<Heading as='h3' {...props} />
),
h4: (props: React.HTMLAttributes<HTMLHeadingElement>) => (
<Heading as='h4' {...props} />
),
h5: (props: React.HTMLAttributes<HTMLHeadingElement>) => (
<Heading as='h5' {...props} />
),
h6: (props: React.HTMLAttributes<HTMLHeadingElement>) => (
<Heading as='h6' {...props} />
),
}}
/>
</DocsBody>
</DocsPage>
</>
)
}
export async function generateStaticParams() {
return source.generateParams()
}
export async function generateMetadata(props: {
params: Promise<{ slug?: string[]; lang: string }>
}) {
const params = await props.params
const page = source.getPage(params.slug, params.lang)
if (!page) notFound()
const data = page.data as PageData
const baseUrl = 'https://docs.sim.ai'
const fullUrl = `${baseUrl}${page.url}`
const ogImageUrl = `${baseUrl}/api/og?title=${encodeURIComponent(data.title)}`
return {
title: data.title,
description:
data.description || 'Sim visual workflow builder for AI applications documentation',
keywords: [
'AI workflow builder',
'visual workflow editor',
'AI automation',
'workflow automation',
'AI agents',
'no-code AI',
'drag and drop workflows',
data.title?.toLowerCase().split(' '),
]
.flat()
.filter(Boolean),
authors: [{ name: 'Sim Team' }],
category: 'Developer Tools',
openGraph: {
title: data.title,
description:
data.description || 'Sim visual workflow builder for AI applications documentation',
url: fullUrl,
siteName: 'Sim Documentation',
type: 'article',
locale: params.lang === 'en' ? 'en_US' : `${params.lang}_${params.lang.toUpperCase()}`,
alternateLocale: ['en', 'es', 'fr', 'de', 'ja', 'zh']
.filter((lang) => lang !== params.lang)
.map((lang) => (lang === 'en' ? 'en_US' : `${lang}_${lang.toUpperCase()}`)),
images: [
{
url: ogImageUrl,
width: 1200,
height: 630,
alt: data.title,
},
],
},
twitter: {
card: 'summary_large_image',
title: data.title,
description:
data.description || 'Sim visual workflow builder for AI applications documentation',
images: [ogImageUrl],
creator: '@simdotai',
site: '@simdotai',
},
robots: {
index: true,
follow: true,
googleBot: {
index: true,
follow: true,
'max-video-preview': -1,
'max-image-preview': 'large',
'max-snippet': -1,
},
},
canonical: fullUrl,
alternates: {
canonical: fullUrl,
languages: {
'x-default': `${baseUrl}${page.url.replace(`/${params.lang}`, '')}`,
en: `${baseUrl}${page.url.replace(`/${params.lang}`, '')}`,
es: `${baseUrl}/es${page.url.replace(`/${params.lang}`, '')}`,
fr: `${baseUrl}/fr${page.url.replace(`/${params.lang}`, '')}`,
de: `${baseUrl}/de${page.url.replace(`/${params.lang}`, '')}`,
ja: `${baseUrl}/ja${page.url.replace(`/${params.lang}`, '')}`,
zh: `${baseUrl}/zh${page.url.replace(`/${params.lang}`, '')}`,
},
},
}
}

View File

@@ -0,0 +1,137 @@
import type { ReactNode } from 'react'
import { defineI18nUI } from 'fumadocs-ui/i18n'
import { DocsLayout } from 'fumadocs-ui/layouts/docs'
import { RootProvider } from 'fumadocs-ui/provider/next'
import { Geist_Mono, Inter } from 'next/font/google'
import Image from 'next/image'
import {
SidebarFolder,
SidebarItem,
SidebarSeparator,
} from '@/components/docs-layout/sidebar-components'
import { Navbar } from '@/components/navbar/navbar'
import { i18n } from '@/lib/i18n'
import { source } from '@/lib/source'
import '../global.css'
const inter = Inter({
subsets: ['latin'],
variable: '--font-geist-sans',
})
const geistMono = Geist_Mono({
subsets: ['latin'],
variable: '--font-geist-mono',
})
const { provider } = defineI18nUI(i18n, {
translations: {
en: {
displayName: 'English',
},
es: {
displayName: 'Español',
},
fr: {
displayName: 'Français',
},
de: {
displayName: 'Deutsch',
},
ja: {
displayName: '日本語',
},
zh: {
displayName: '简体中文',
},
},
})
type LayoutProps = {
children: ReactNode
params: Promise<{ lang: string }>
}
export default async function Layout({ children, params }: LayoutProps) {
const { lang } = await params
const structuredData = {
'@context': 'https://schema.org',
'@type': 'WebSite',
name: 'Sim Documentation',
description:
'Comprehensive documentation for Sim - the visual workflow builder for AI Agent Workflows.',
url: 'https://docs.sim.ai',
publisher: {
'@type': 'Organization',
name: 'Sim',
url: 'https://sim.ai',
logo: {
'@type': 'ImageObject',
url: 'https://docs.sim.ai/static/logo.png',
},
},
inLanguage: lang,
potentialAction: {
'@type': 'SearchAction',
target: {
'@type': 'EntryPoint',
urlTemplate: 'https://docs.sim.ai/api/search?q={search_term_string}',
},
'query-input': 'required name=search_term_string',
},
}
return (
<html
lang={lang}
className={`${inter.variable} ${geistMono.variable}`}
suppressHydrationWarning
>
<head>
<script
type='application/ld+json'
dangerouslySetInnerHTML={{ __html: JSON.stringify(structuredData) }}
/>
{/* OneDollarStats Analytics - CDN script handles everything automatically */}
<script defer src='https://assets.onedollarstats.com/stonks.js' />
</head>
<body className='flex min-h-screen flex-col font-sans'>
<RootProvider i18n={provider(lang)}>
<Navbar />
<DocsLayout
tree={source.pageTree[lang]}
nav={{
title: (
<Image
src='/static/logo.png'
alt='Sim'
width={72}
height={28}
className='h-7 w-auto'
priority
/>
),
}}
sidebar={{
defaultOpenLevel: 0,
collapsible: false,
footer: null,
banner: null,
components: {
Item: SidebarItem,
Folder: SidebarFolder,
Separator: SidebarSeparator,
},
}}
containerProps={{
className: '!pt-0',
}}
>
{children}
</DocsLayout>
</RootProvider>
</body>
</html>
)
}

View File

@@ -0,0 +1,23 @@
import { DocsBody, DocsPage } from 'fumadocs-ui/page'
export const metadata = {
title: 'Page Not Found',
}
export default function NotFound() {
return (
<DocsPage>
<DocsBody>
<div className='flex min-h-[60vh] flex-col items-center justify-center text-center'>
<h1 className='mb-4 bg-gradient-to-b from-[#8357FF] to-[#6F3DFA] bg-clip-text font-bold text-8xl text-transparent'>
404
</h1>
<h2 className='mb-2 font-semibold text-2xl text-foreground'>Page Not Found</h2>
<p className='text-muted-foreground'>
The page you're looking for doesn't exist or has been moved.
</p>
</div>
</DocsBody>
</DocsPage>
)
}

View File

@@ -0,0 +1,152 @@
import { ImageResponse } from 'next/og'
import type { NextRequest } from 'next/server'
export const runtime = 'edge'
const TITLE_FONT_SIZE = {
large: 64,
medium: 56,
small: 48,
} as const
function getTitleFontSize(title: string): number {
if (title.length > 45) return TITLE_FONT_SIZE.small
if (title.length > 30) return TITLE_FONT_SIZE.medium
return TITLE_FONT_SIZE.large
}
/**
* Loads a Google Font dynamically by fetching the CSS and extracting the font URL.
*/
async function loadGoogleFont(font: string, weights: string, text: string): Promise<ArrayBuffer> {
const url = `https://fonts.googleapis.com/css2?family=${font}:wght@${weights}&text=${encodeURIComponent(text)}`
const css = await (await fetch(url)).text()
const resource = css.match(/src: url\((.+)\) format\('(opentype|truetype)'\)/)
if (resource) {
const response = await fetch(resource[1])
if (response.status === 200) {
return await response.arrayBuffer()
}
}
throw new Error('Failed to load font data')
}
/**
* Generates dynamic Open Graph images for documentation pages.
*/
export async function GET(request: NextRequest) {
const { searchParams } = new URL(request.url)
const title = searchParams.get('title') || 'Documentation'
const baseUrl = new URL(request.url).origin
const allText = `${title}docs.sim.ai`
const fontData = await loadGoogleFont('Geist', '400;500;600', allText)
return new ImageResponse(
<div
style={{
height: '100%',
width: '100%',
display: 'flex',
flexDirection: 'column',
background: '#0c0c0c',
position: 'relative',
fontFamily: 'Geist',
}}
>
{/* Base gradient layer - subtle purple tint across the entire image */}
<div
style={{
position: 'absolute',
top: 0,
left: 0,
width: '100%',
height: '100%',
background:
'radial-gradient(ellipse 150% 100% at 50% 100%, rgba(88, 28, 135, 0.15) 0%, rgba(88, 28, 135, 0.08) 25%, rgba(88, 28, 135, 0.03) 50%, transparent 80%)',
display: 'flex',
}}
/>
{/* Secondary glow - adds depth without harsh edges */}
<div
style={{
position: 'absolute',
top: 0,
left: 0,
width: '100%',
height: '100%',
background:
'radial-gradient(ellipse 100% 80% at 80% 90%, rgba(112, 31, 252, 0.12) 0%, rgba(112, 31, 252, 0.04) 40%, transparent 70%)',
display: 'flex',
}}
/>
{/* Top darkening - creates natural vignette */}
<div
style={{
position: 'absolute',
top: 0,
left: 0,
width: '100%',
height: '100%',
background:
'linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, transparent 40%, transparent 100%)',
display: 'flex',
}}
/>
{/* Content */}
<div
style={{
display: 'flex',
flexDirection: 'column',
padding: '56px 72px',
height: '100%',
justifyContent: 'space-between',
}}
>
{/* Logo */}
<img src={`${baseUrl}/static/logo.png`} alt='sim' height={32} />
{/* Title */}
<span
style={{
fontSize: getTitleFontSize(title),
fontWeight: 600,
color: '#ffffff',
lineHeight: 1.1,
letterSpacing: '-0.02em',
}}
>
{title}
</span>
{/* Footer */}
<span
style={{
fontSize: 20,
fontWeight: 500,
color: '#71717a',
}}
>
docs.sim.ai
</span>
</div>
</div>,
{
width: 1200,
height: 630,
fonts: [
{
name: 'Geist',
data: fontData,
style: 'normal',
},
],
}
)
}

View File

@@ -1,4 +1,126 @@
import { createFromSource } from 'fumadocs-core/search/server'
import { source } from '@/lib/source'
import { sql } from 'drizzle-orm'
import { type NextRequest, NextResponse } from 'next/server'
import { db, docsEmbeddings } from '@/lib/db'
import { generateSearchEmbedding } from '@/lib/embeddings'
export const { GET } = createFromSource(source)
export const runtime = 'nodejs'
export const revalidate = 0
/**
* Hybrid search API endpoint
* - English: Vector embeddings + keyword search
* - Other languages: Keyword search only
*/
export async function GET(request: NextRequest) {
try {
const searchParams = request.nextUrl.searchParams
const query = searchParams.get('query') || searchParams.get('q') || ''
const locale = searchParams.get('locale') || 'en'
const limit = Number.parseInt(searchParams.get('limit') || '10', 10)
if (!query || query.trim().length === 0) {
return NextResponse.json([])
}
const candidateLimit = limit * 3
const similarityThreshold = 0.6
const localeMap: Record<string, string> = {
en: 'english',
es: 'spanish',
fr: 'french',
de: 'german',
ja: 'simple', // PostgreSQL doesn't have Japanese support, use simple
zh: 'simple', // PostgreSQL doesn't have Chinese support, use simple
}
const tsConfig = localeMap[locale] || 'simple'
const useVectorSearch = locale === 'en'
let vectorResults: Array<{
chunkId: string
chunkText: string
sourceDocument: string
sourceLink: string
headerText: string
headerLevel: number
similarity: number
searchType: string
}> = []
if (useVectorSearch) {
const queryEmbedding = await generateSearchEmbedding(query)
vectorResults = await db
.select({
chunkId: docsEmbeddings.chunkId,
chunkText: docsEmbeddings.chunkText,
sourceDocument: docsEmbeddings.sourceDocument,
sourceLink: docsEmbeddings.sourceLink,
headerText: docsEmbeddings.headerText,
headerLevel: docsEmbeddings.headerLevel,
similarity: sql<number>`1 - (${docsEmbeddings.embedding} <=> ${JSON.stringify(queryEmbedding)}::vector)`,
searchType: sql<string>`'vector'`,
})
.from(docsEmbeddings)
.where(
sql`1 - (${docsEmbeddings.embedding} <=> ${JSON.stringify(queryEmbedding)}::vector) >= ${similarityThreshold}`
)
.orderBy(sql`${docsEmbeddings.embedding} <=> ${JSON.stringify(queryEmbedding)}::vector`)
.limit(candidateLimit)
}
const keywordResults = await db
.select({
chunkId: docsEmbeddings.chunkId,
chunkText: docsEmbeddings.chunkText,
sourceDocument: docsEmbeddings.sourceDocument,
sourceLink: docsEmbeddings.sourceLink,
headerText: docsEmbeddings.headerText,
headerLevel: docsEmbeddings.headerLevel,
similarity: sql<number>`ts_rank(${docsEmbeddings.chunkTextTsv}, plainto_tsquery(${tsConfig}, ${query}))`,
searchType: sql<string>`'keyword'`,
})
.from(docsEmbeddings)
.where(sql`${docsEmbeddings.chunkTextTsv} @@ plainto_tsquery(${tsConfig}, ${query})`)
.orderBy(
sql`ts_rank(${docsEmbeddings.chunkTextTsv}, plainto_tsquery(${tsConfig}, ${query})) DESC`
)
.limit(candidateLimit)
const seenIds = new Set<string>()
const mergedResults = []
for (let i = 0; i < Math.max(vectorResults.length, keywordResults.length); i++) {
if (i < vectorResults.length && !seenIds.has(vectorResults[i].chunkId)) {
mergedResults.push(vectorResults[i])
seenIds.add(vectorResults[i].chunkId)
}
if (i < keywordResults.length && !seenIds.has(keywordResults[i].chunkId)) {
mergedResults.push(keywordResults[i])
seenIds.add(keywordResults[i].chunkId)
}
}
const filteredResults = mergedResults.slice(0, limit)
const searchResults = filteredResults.map((result) => {
const title = result.headerText || result.sourceDocument.replace('.mdx', '')
const pathParts = result.sourceDocument
.replace('.mdx', '')
.split('/')
.map((part) => part.charAt(0).toUpperCase() + part.slice(1))
return {
id: result.chunkId,
type: 'page' as const,
url: result.sourceLink,
content: title,
breadcrumbs: pathParts,
}
})
return NextResponse.json(searchResults)
} catch (error) {
console.error('Semantic search error:', error)
return NextResponse.json([])
}
}

View File

@@ -2,8 +2,494 @@
@import "fumadocs-ui/css/neutral.css";
@import "fumadocs-ui/css/preset.css";
/* Prevent overscroll bounce effect on the page */
html,
body {
overscroll-behavior: none;
}
@theme {
--color-fd-primary: #802fff; /* Purple from control-bar component */
--font-geist-sans: var(--font-geist-sans);
--font-geist-mono: var(--font-geist-mono);
}
/* Font family utilities */
.font-sans {
font-family: var(--font-geist-sans), ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
"Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.font-mono {
font-family: var(--font-geist-mono), ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
"Liberation Mono", "Courier New", monospace;
}
/* Target any potential border classes */
* {
--fd-border-sidebar: transparent !important;
}
/* Override any CSS custom properties for borders */
:root {
--fd-border: transparent !important;
--fd-border-sidebar: transparent !important;
--fd-nav-height: 64px; /* Custom navbar height (h-16 = 4rem = 64px) */
/* Content container width used to center main content */
--spacing-fd-container: 1400px;
/* Edge gutter = leftover space on each side of centered container */
--edge-gutter: max(1rem, calc((100vw - var(--spacing-fd-container)) / 2));
/* Shift the sidebar slightly left from the content edge for extra breathing room */
--sidebar-shift: 90px;
--sidebar-offset: max(0px, calc(var(--edge-gutter) - var(--sidebar-shift)));
/* Shift TOC slightly right to match sidebar spacing for symmetry */
--toc-shift: 90px;
--toc-offset: max(0px, calc(var(--edge-gutter) - var(--toc-shift)));
/* Sidebar and TOC have 20px internal padding - navbar accounts for this directly */
/* Extra gap between sidebar/TOC and the main text content */
--content-gap: 1.75rem;
}
/* Remove custom layout variable overrides to fallback to fumadocs defaults */
/* ============================================
Navbar Light Mode Styling
============================================ */
/* Light mode navbar and search styling */
:root:not(.dark) nav {
background-color: hsla(0, 0%, 96%, 0.85) !important;
}
:root:not(.dark) nav button[type="button"] {
background-color: hsla(0, 0%, 93%, 0.85) !important;
backdrop-filter: blur(33px) saturate(180%) !important;
-webkit-backdrop-filter: blur(33px) saturate(180%) !important;
color: rgba(0, 0, 0, 0.6) !important;
}
:root:not(.dark) nav button[type="button"] kbd {
color: rgba(0, 0, 0, 0.6) !important;
}
/* Dark mode navbar and search styling */
:root.dark nav {
background-color: hsla(0, 0%, 7.04%, 0.92) !important;
backdrop-filter: blur(25px) saturate(180%) brightness(0.6) !important;
-webkit-backdrop-filter: blur(25px) saturate(180%) brightness(0.6) !important;
}
/* ============================================
Custom Sidebar Styling (Turborepo-inspired)
============================================ */
/* Floating sidebar appearance - remove background */
[data-sidebar-container],
#nd-sidebar {
background: transparent !important;
background-color: transparent !important;
border: none !important;
--color-fd-muted: transparent !important;
--color-fd-card: transparent !important;
--color-fd-secondary: transparent !important;
}
aside[data-sidebar],
aside#nd-sidebar {
background: transparent !important;
background-color: transparent !important;
border: none !important;
border-right: none !important;
}
/* Fumadocs v16: Add sidebar placeholder styling for grid area */
[data-sidebar-placeholder] {
background: transparent !important;
}
/* Fumadocs v16: Hide sidebar panel (floating collapse button) */
[data-sidebar-panel] {
display: none !important;
}
/* Mobile only: Reduce gap between navbar and content */
@media (max-width: 1023px) {
#nd-docs-layout {
margin-top: -25px;
}
}
/* Desktop only: Apply custom navbar offset, sidebar width and margin offsets */
/* On mobile, let fumadocs handle the layout natively */
@media (min-width: 1024px) {
:root {
--fd-banner-height: 64px !important;
}
#nd-docs-layout {
--fd-docs-height: calc(100dvh - 64px) !important;
--fd-sidebar-width: 300px !important;
margin-left: var(--sidebar-offset) !important;
margin-right: var(--toc-offset) !important;
}
/* Hide fumadocs nav on desktop - we use custom navbar there */
#nd-docs-layout > header {
display: none !important;
}
}
/* Sidebar spacing - compact like turborepo */
/* Fumadocs v16: [data-sidebar-viewport] doesn't exist, target #nd-sidebar > div instead */
[data-sidebar-viewport],
#nd-sidebar > div {
padding: 0.5rem 12px 12px;
background: transparent !important;
background-color: transparent !important;
}
/* Override sidebar item styling to match Raindrop */
/* Target Link and button elements in sidebar - override Fumadocs itemVariants */
/* Exclude the small chevron-only toggle buttons */
/* Using html prefix for higher specificity over Tailwind v4 utilities */
html #nd-sidebar a,
html #nd-sidebar button:not([aria-label*="ollapse"]):not([aria-label*="xpand"]) {
font-size: 0.9375rem !important; /* 15px to match Raindrop */
line-height: 1.4 !important;
padding: 0.5rem 0.75rem !important; /* More compact like Raindrop */
font-weight: 400 !important;
border-radius: 0.75rem !important; /* More rounded like Raindrop */
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
sans-serif !important;
}
/* Dark mode sidebar text */
html.dark #nd-sidebar a,
html.dark #nd-sidebar button:not([aria-label*="ollapse"]):not([aria-label*="xpand"]) {
color: rgba(255, 255, 255, 0.6) !important;
}
/* Light mode sidebar text */
html:not(.dark) #nd-sidebar a,
html:not(.dark) #nd-sidebar button:not([aria-label*="ollapse"]):not([aria-label*="xpand"]) {
color: rgba(0, 0, 0, 0.6) !important;
}
/* Make sure chevron icons are visible and properly styled */
#nd-sidebar svg {
display: inline-block !important;
opacity: 0.6 !important;
flex-shrink: 0 !important;
width: 0.75rem !important;
height: 0.75rem !important;
}
/* Ensure the small chevron toggle buttons are visible */
#nd-sidebar button[aria-label*="ollapse"],
#nd-sidebar button[aria-label*="xpand"] {
display: flex !important;
opacity: 1 !important;
padding: 0.25rem !important;
}
/* Root-level spacing now handled by [data-sidebar-viewport] > * rule below */
/* Add tiny gap between nested items */
#nd-sidebar ul li {
margin-bottom: 0.0625rem !important;
}
#nd-sidebar ul li:last-child {
margin-bottom: 0 !important;
}
/* Section headers should be slightly larger */
/* Fumadocs v16: Also target #nd-sidebar for compatibility */
[data-sidebar-viewport] [data-separator],
#nd-sidebar [data-separator],
#nd-sidebar p {
font-size: 0.75rem !important;
font-weight: 600 !important;
text-transform: uppercase !important;
letter-spacing: 0.05em !important;
}
/* Override active state (NO PURPLE) */
#nd-sidebar a[data-active="true"],
#nd-sidebar button[data-active="true"],
#nd-sidebar a.bg-fd-primary\/10,
#nd-sidebar a.text-fd-primary,
#nd-sidebar a[class*="bg-fd-primary"],
#nd-sidebar a[class*="text-fd-primary"],
/* Override custom sidebar purple classes */
#nd-sidebar
a.bg-purple-50\/80,
#nd-sidebar a.text-purple-600,
#nd-sidebar a[class*="bg-purple"],
#nd-sidebar a[class*="text-purple"] {
background-image: none !important;
}
/* Dark mode active state */
html.dark #nd-sidebar a[data-active="true"],
html.dark #nd-sidebar button[data-active="true"],
html.dark #nd-sidebar a.bg-fd-primary\/10,
html.dark #nd-sidebar a.text-fd-primary,
html.dark #nd-sidebar a[class*="bg-fd-primary"],
html.dark #nd-sidebar a[class*="text-fd-primary"],
html.dark #nd-sidebar a.bg-purple-50\/80,
html.dark #nd-sidebar a.text-purple-600,
html.dark #nd-sidebar a[class*="bg-purple"],
html.dark #nd-sidebar a[class*="text-purple"] {
background-color: rgba(255, 255, 255, 0.15) !important;
color: rgba(255, 255, 255, 1) !important;
}
/* Light mode active state */
html:not(.dark) #nd-sidebar a[data-active="true"],
html:not(.dark) #nd-sidebar button[data-active="true"],
html:not(.dark) #nd-sidebar a.bg-fd-primary\/10,
html:not(.dark) #nd-sidebar a.text-fd-primary,
html:not(.dark) #nd-sidebar a[class*="bg-fd-primary"],
html:not(.dark) #nd-sidebar a[class*="text-fd-primary"],
html:not(.dark) #nd-sidebar a.bg-purple-50\/80,
html:not(.dark) #nd-sidebar a.text-purple-600,
html:not(.dark) #nd-sidebar a[class*="bg-purple"],
html:not(.dark) #nd-sidebar a[class*="text-purple"] {
background-color: rgba(0, 0, 0, 0.07) !important;
color: rgba(0, 0, 0, 0.9) !important;
}
/* Dark mode hover state */
html.dark #nd-sidebar a:hover:not([data-active="true"]),
html.dark #nd-sidebar button:hover:not([data-active="true"]) {
background-color: rgba(255, 255, 255, 0.08) !important;
}
/* Light mode hover state */
html:not(.dark) #nd-sidebar a:hover:not([data-active="true"]),
html:not(.dark) #nd-sidebar button:hover:not([data-active="true"]) {
background-color: rgba(0, 0, 0, 0.03) !important;
}
/* Dark mode - ensure active/selected items don't change on hover */
html.dark #nd-sidebar a.bg-purple-50\/80:hover,
html.dark #nd-sidebar a[class*="bg-purple"]:hover,
html.dark #nd-sidebar a[data-active="true"]:hover,
html.dark #nd-sidebar button[data-active="true"]:hover {
background-color: rgba(255, 255, 255, 0.15) !important;
color: rgba(255, 255, 255, 1) !important;
}
/* Light mode - ensure active/selected items don't change on hover */
html:not(.dark) #nd-sidebar a.bg-purple-50\/80:hover,
html:not(.dark) #nd-sidebar a[class*="bg-purple"]:hover,
html:not(.dark) #nd-sidebar a[data-active="true"]:hover,
html:not(.dark) #nd-sidebar button[data-active="true"]:hover {
background-color: rgba(0, 0, 0, 0.07) !important;
color: rgba(0, 0, 0, 0.9) !important;
}
/* Hide search, platform, and collapse button from sidebar completely */
[data-sidebar] [data-search],
[data-sidebar] .search-toggle,
#nd-sidebar [data-search],
#nd-sidebar .search-toggle,
[data-sidebar-viewport] [data-search],
[data-sidebar-viewport] button[data-search],
aside[data-sidebar] [role="button"]:has([data-search]),
aside[data-sidebar] > div > button:first-child,
#nd-sidebar > div > button:first-child,
[data-sidebar] a[href*="sim.ai"],
#nd-sidebar a[href*="sim.ai"],
[data-sidebar-viewport] a[href*="sim.ai"],
/* Hide search buttons (but NOT folder chevron buttons) */
aside[data-sidebar] > div:first-child
> button:not([aria-label="Collapse"]):not([aria-label="Expand"]),
#nd-sidebar > div:first-child > button:not([aria-label="Collapse"]):not([aria-label="Expand"]),
/* Hide sidebar collapse button (panel icon) - direct children only */
aside[data-sidebar] > button:first-of-type:not([aria-label="Collapse"]):not([aria-label="Expand"]),
[data-sidebar]
> button[type="button"]:first-of-type:not([aria-label="Collapse"]):not([aria-label="Expand"]),
button[data-collapse]:not([aria-label="Collapse"]):not([aria-label="Expand"]),
[data-sidebar-header] button,
/* Hide theme toggle from sidebar footer */
aside[data-sidebar] [data-theme-toggle],
[data-sidebar-footer],
[data-sidebar] footer,
footer button[aria-label*="heme"],
aside[data-sidebar] > div:last-child:has(button[aria-label*="heme"]),
aside[data-sidebar] button[aria-label*="heme"],
[data-sidebar] button[aria-label*="Theme"],
/* Additional theme toggle selectors */
aside[data-sidebar] > *:last-child
button,
[data-sidebar-viewport] ~ *,
aside[data-sidebar] > div:not([data-sidebar-viewport]),
/* Aggressive theme toggle hiding */
aside[data-sidebar] svg[class*="sun"],
aside[data-sidebar] svg[class*="moon"],
aside[data-sidebar] button[type="button"]:last-child,
aside button:has(svg:only-child),
[data-sidebar] div:has(> button[type="button"]:only-child:last-child),
/* Hide theme toggle and other non-content elements */
aside[data-sidebar] > *:not([data-sidebar-viewport]) {
display: none !important;
visibility: hidden !important;
opacity: 0 !important;
height: 0 !important;
max-height: 0 !important;
overflow: hidden !important;
pointer-events: none !important;
position: absolute !important;
left: -9999px !important;
}
/* Desktop only: Hide sidebar toggle buttons and nav title/logo (keep visible on mobile) */
@media (min-width: 1025px) {
[data-sidebar-container] > button,
[data-sidebar-container] [data-toggle],
aside[data-sidebar] [data-sidebar-toggle],
button[data-sidebar-toggle],
nav button[data-sidebar-toggle],
button[aria-label="Toggle Sidebar"],
button[aria-label="Collapse Sidebar"],
/* Hide nav title/logo in sidebar on desktop - target all possible locations */
aside[data-sidebar] a[href="/"],
aside[data-sidebar] a[href="/"] img,
aside[data-sidebar] > a:first-child,
aside[data-sidebar] > div > a:first-child,
aside[data-sidebar] img[alt="Sim"],
[data-sidebar-header],
[data-sidebar] [data-title],
#nd-sidebar > a:first-child,
#nd-sidebar > div:first-child > a:first-child,
#nd-sidebar img[alt="Sim"],
/* Hide theme toggle at bottom of sidebar on desktop */
#nd-sidebar
> footer,
#nd-sidebar footer,
aside#nd-sidebar > *:last-child:not(div),
#nd-sidebar > button:last-child,
#nd-sidebar button[aria-label*="theme" i],
#nd-sidebar button[aria-label*="Theme"],
#nd-sidebar > div:last-child > button {
display: none !important;
visibility: hidden !important;
height: 0 !important;
max-height: 0 !important;
overflow: hidden !important;
}
}
/* Extra aggressive - hide everything after the viewport */
aside[data-sidebar] [data-sidebar-viewport] ~ * {
display: none !important;
}
/* Tighter spacing for sidebar content */
[data-sidebar-viewport] > * {
margin-bottom: 0.0625rem;
}
[data-sidebar-viewport] > *:last-child {
margin-bottom: 0;
}
[data-sidebar-viewport] ul {
margin: 0;
padding: 0;
}
/* Ensure sidebar starts with content immediately */
aside[data-sidebar] > div:first-child {
padding-top: 0;
}
/* Remove all sidebar borders and backgrounds */
[data-sidebar-container],
aside[data-sidebar],
[data-sidebar],
[data-sidebar] *,
#nd-sidebar,
#nd-sidebar * {
border: none !important;
border-right: none !important;
border-left: none !important;
border-top: none !important;
border-bottom: none !important;
}
/* Override fumadocs background colors for sidebar */
.dark #nd-sidebar,
.dark [data-sidebar-container],
.dark aside[data-sidebar] {
--color-fd-muted: transparent !important;
--color-fd-secondary: transparent !important;
background: transparent !important;
background-color: transparent !important;
}
/* Force normal text flow in sidebar */
[data-sidebar],
[data-sidebar] *,
[data-sidebar-viewport],
[data-sidebar-viewport] * {
writing-mode: horizontal-tb !important;
}
/* ============================================
Code Block Styling (Improved)
============================================ */
/* Apply Geist Mono to code elements */
code,
pre,
pre code {
font-family: var(--font-geist-mono), ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
"Liberation Mono", "Courier New", monospace;
}
/* Inline code */
:not(pre) > code {
padding: 0.2em 0.4em;
border-radius: 0.25rem;
font-size: 0.875em;
font-weight: 500;
}
/* Light mode inline code */
:root:not(.dark) :not(pre) > code {
background-color: rgb(243 244 246);
color: rgb(220 38 38);
border: 1px solid rgb(229 231 235);
}
/* Dark mode inline code */
.dark :not(pre) > code {
background-color: rgb(31 41 55);
color: rgb(248 113 113);
border: 1px solid rgb(55 65 81);
}
/* Code block container improvements */
pre {
font-size: 0.875rem;
line-height: 1.7;
tab-size: 2;
-webkit-overflow-scrolling: touch;
}
pre code {
display: block;
width: fit-content;
min-width: 100%;
}
/* Syntax highlighting adjustments for better readability */
pre code .line {
padding-left: 0;
padding-right: 0;
}
/* Custom text highlighting styles */
@@ -16,6 +502,63 @@
color: var(--color-fd-primary);
}
/* Add bottom spacing to prevent abrupt page endings */
[data-content] {
padding-top: 1.5rem !important;
padding-bottom: 4rem;
}
/* Alternative fallback for different Fumadocs versions */
main article,
.docs-page main {
padding-top: 1.5rem !important;
padding-bottom: 4rem;
}
/* ============================================
Center and Constrain Main Content Width
============================================ */
/* Main content area - center and constrain like turborepo/raindrop */
/* Note: --sidebar-offset and --toc-offset are now applied at #nd-docs-layout level */
main[data-main] {
max-width: var(--spacing-fd-container, 1400px);
margin-left: auto;
margin-right: auto;
padding-top: 1rem;
padding-left: var(--content-gap);
padding-right: var(--content-gap);
order: 1 !important;
}
/* Adjust for smaller screens */
@media (max-width: 768px) {
main[data-main] {
padding-left: 1rem;
padding-right: 1rem;
}
}
/* Ensure docs page content is properly constrained */
[data-docs-page] {
max-width: 1400px;
margin-left: auto;
margin-right: auto;
padding-top: 1.5rem !important;
}
/* Override Fumadocs default content padding */
article[data-content],
div[data-content] {
padding-top: 1.5rem !important;
}
/* Remove any unwanted borders/outlines from video elements */
video {
outline: none !important;
border-style: solid !important;
}
/* Tailwind v4 content sources */
@source '../app/**/*.{js,ts,jsx,tsx,mdx}';
@source '../components/**/*.{js,ts,jsx,tsx,mdx}';

View File

@@ -1,30 +1,38 @@
import type { ReactNode } from 'react'
import { RootProvider } from 'fumadocs-ui/provider'
import { Inter } from 'next/font/google'
import './global.css'
import { Analytics } from '@vercel/analytics/next'
const inter = Inter({
subsets: ['latin'],
})
export default function Layout({ children }: { children: ReactNode }) {
return (
<html lang='en' className={inter.className} suppressHydrationWarning>
<body className='flex min-h-screen flex-col'>
<RootProvider>
{children}
<Analytics />
</RootProvider>
</body>
</html>
)
export default function RootLayout({ children }: { children: ReactNode }) {
return children
}
export const metadata = {
title: 'Sim',
metadataBase: new URL('https://docs.sim.ai'),
title: {
default: 'Sim Documentation - Visual Workflow Builder for AI Applications',
template: '%s',
},
description:
'Build agents in seconds with a drag and drop workflow builder. Access comprehensive documentation to help you create efficient workflows and maximize your automation capabilities.',
'Comprehensive documentation for Sim - the visual workflow builder for AI applications. Create powerful AI agents, automation workflows, and data processing pipelines by connecting blocks on a canvas—no coding required.',
keywords: [
'AI workflow builder',
'visual workflow editor',
'AI automation',
'workflow automation',
'AI agents',
'no-code AI',
'drag and drop workflows',
'AI integrations',
'workflow canvas',
'AI Agent Workflow Builder',
'workflow orchestration',
'agent builder',
'AI workflow automation',
'visual programming',
],
authors: [{ name: 'Sim Team', url: 'https://sim.ai' }],
creator: 'Sim',
publisher: 'Sim',
category: 'Developer Tools',
classification: 'Developer Documentation',
manifest: '/favicon/site.webmanifest',
icons: {
icon: [
@@ -39,4 +47,54 @@ export const metadata = {
statusBarStyle: 'default',
title: 'Sim Docs',
},
openGraph: {
type: 'website',
locale: 'en_US',
alternateLocale: ['es_ES', 'fr_FR', 'de_DE', 'ja_JP', 'zh_CN'],
url: 'https://docs.sim.ai',
siteName: 'Sim Documentation',
title: 'Sim Documentation - Visual Workflow Builder for AI Applications',
description:
'Comprehensive documentation for Sim - the visual workflow builder for AI applications. Create powerful AI agents, automation workflows, and data processing pipelines.',
images: [
{
url: 'https://docs.sim.ai/api/og?title=Sim%20Documentation',
width: 1200,
height: 630,
alt: 'Sim Documentation',
},
],
},
twitter: {
card: 'summary_large_image',
title: 'Sim Documentation - Visual Workflow Builder for AI Applications',
description:
'Comprehensive documentation for Sim - the visual workflow builder for AI applications.',
creator: '@simdotai',
site: '@simdotai',
images: ['https://docs.sim.ai/api/og?title=Sim%20Documentation'],
},
robots: {
index: true,
follow: true,
googleBot: {
index: true,
follow: true,
'max-video-preview': -1,
'max-image-preview': 'large',
'max-snippet': -1,
},
},
alternates: {
canonical: 'https://docs.sim.ai',
languages: {
'x-default': 'https://docs.sim.ai',
en: 'https://docs.sim.ai',
es: 'https://docs.sim.ai/es',
fr: 'https://docs.sim.ai/fr',
de: 'https://docs.sim.ai/de',
ja: 'https://docs.sim.ai/ja',
zh: 'https://docs.sim.ai/zh',
},
},
}

View File

@@ -0,0 +1,31 @@
import { getLLMText } from '@/lib/llms'
import { source } from '@/lib/source'
export const revalidate = false
export async function GET() {
try {
const pages = source.getPages().filter((page) => {
if (!page || !page.data || !page.url) return false
const pathParts = page.url.split('/').filter(Boolean)
const hasLangPrefix = pathParts[0] && ['es', 'fr', 'de', 'ja', 'zh'].includes(pathParts[0])
return !hasLangPrefix
})
const scan = pages.map((page) => getLLMText(page))
const scanned = await Promise.all(scan)
const filtered = scanned.filter((text) => text && text.length > 0)
return new Response(filtered.join('\n\n---\n\n'), {
headers: {
'Content-Type': 'text/plain; charset=utf-8',
},
})
} catch (error) {
console.error('Error generating LLM full text:', error)
return new Response('Error generating full documentation text', { status: 500 })
}
}

View File

@@ -1,16 +1,33 @@
import { notFound } from 'next/navigation'
import { type NextRequest, NextResponse } from 'next/server'
import { i18n } from '@/lib/i18n'
import { getLLMText } from '@/lib/llms'
import { source } from '@/lib/source'
export const revalidate = false
export async function GET(_req: NextRequest, { params }: { params: Promise<{ slug?: string[] }> }) {
export async function GET(
_request: NextRequest,
{ params }: { params: Promise<{ slug?: string[] }> }
) {
const { slug } = await params
const page = source.getPage(slug)
let lang: (typeof i18n.languages)[number] = i18n.defaultLanguage
let pageSlug = slug
if (slug && slug.length > 0 && i18n.languages.includes(slug[0] as typeof lang)) {
lang = slug[0] as typeof lang
pageSlug = slug.slice(1)
}
const page = source.getPage(pageSlug, lang)
if (!page) notFound()
return new NextResponse(await getLLMText(page))
return new NextResponse(await getLLMText(page), {
headers: {
'Content-Type': 'text/markdown',
},
})
}
export function generateStaticParams() {

View File

@@ -1,12 +1,87 @@
import { getLLMText } from '@/lib/llms'
import { source } from '@/lib/source'
// cached forever
export const revalidate = false
export async function GET() {
const scan = source.getPages().map(getLLMText)
const scanned = await Promise.all(scan)
const baseUrl = 'https://docs.sim.ai'
return new Response(scanned.join('\n\n'))
try {
const pages = source.getPages().filter((page) => {
if (!page || !page.data || !page.url) return false
const pathParts = page.url.split('/').filter(Boolean)
const hasLangPrefix = pathParts[0] && ['es', 'fr', 'de', 'ja', 'zh'].includes(pathParts[0])
return !hasLangPrefix
})
const sections: Record<string, Array<{ title: string; url: string; description?: string }>> = {}
pages.forEach((page) => {
const pathParts = page.url.split('/').filter(Boolean)
const section =
pathParts[0] && ['en', 'es', 'fr', 'de', 'ja', 'zh'].includes(pathParts[0])
? pathParts[1] || 'root'
: pathParts[0] || 'root'
if (!sections[section]) {
sections[section] = []
}
sections[section].push({
title: page.data.title || 'Untitled',
url: `${baseUrl}${page.url}`,
description: page.data.description,
})
})
const manifest = `# Sim Documentation
> Visual Workflow Builder for AI Applications
Sim is a visual workflow builder for AI applications that lets you build AI agent workflows visually. Create powerful AI agents, automation workflows, and data processing pipelines by connecting blocks on a canvas—no coding required.
## Documentation Overview
This file provides an overview of our documentation. For full content of all pages, see ${baseUrl}/llms-full.txt
## Main Sections
${Object.entries(sections)
.map(([section, items]) => {
const sectionTitle = section
.split('-')
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
.join(' ')
return `### ${sectionTitle}\n\n${items.map((item) => `- ${item.title}: ${item.url}${item.description ? `\n ${item.description}` : ''}`).join('\n')}`
})
.join('\n\n')}
## Additional Resources
- Full documentation content: ${baseUrl}/llms-full.txt
- Individual page content: ${baseUrl}/llms.mdx/[page-path]
- API documentation: ${baseUrl}/sdks/
- Tool integrations: ${baseUrl}/tools/
## Statistics
- Total pages: ${pages.length} (English only)
- Other languages available at: ${baseUrl}/[lang]/ (es, fr, de, ja, zh)
---
Generated: ${new Date().toISOString()}
Format: llms.txt v0.1.0
See: https://llmstxt.org for specification`
return new Response(manifest, {
headers: {
'Content-Type': 'text/plain; charset=utf-8',
},
})
} catch (error) {
console.error('Error generating LLM manifest:', error)
return new Response('Error generating documentation manifest', { status: 500 })
}
}

View File

@@ -0,0 +1,100 @@
export const revalidate = false
export async function GET() {
const baseUrl = 'https://docs.sim.ai'
const robotsTxt = `# Robots.txt for Sim Documentation
# Generated on ${new Date().toISOString()}
User-agent: *
Allow: /
# Search engine crawlers
User-agent: Googlebot
Allow: /
User-agent: Bingbot
Allow: /
User-agent: Slurp
Allow: /
User-agent: DuckDuckBot
Allow: /
User-agent: Baiduspider
Allow: /
User-agent: YandexBot
Allow: /
# AI and LLM crawlers - explicitly allowed for documentation indexing
User-agent: GPTBot
Allow: /
User-agent: ChatGPT-User
Allow: /
User-agent: CCBot
Allow: /
User-agent: anthropic-ai
Allow: /
User-agent: Claude-Web
Allow: /
User-agent: Applebot
Allow: /
User-agent: PerplexityBot
Allow: /
User-agent: Diffbot
Allow: /
User-agent: FacebookBot
Allow: /
User-agent: cohere-ai
Allow: /
# Disallow admin and internal paths (if any exist)
Disallow: /.next/
Disallow: /api/internal/
Disallow: /_next/static/
Disallow: /admin/
# Allow but don't prioritize these
Allow: /api/search
Allow: /llms.txt
Allow: /llms-full.txt
Allow: /llms.mdx/
# Sitemaps
Sitemap: ${baseUrl}/sitemap.xml
# Crawl delay for aggressive bots (optional)
# Crawl-delay: 1
# Additional resources for AI indexing
# See https://github.com/AnswerDotAI/llms-txt for more info
# LLM-friendly content:
# Manifest: ${baseUrl}/llms.txt
# Full content: ${baseUrl}/llms-full.txt
# Individual pages: ${baseUrl}/llms.mdx/[page-path]
# Multi-language documentation available at:
# ${baseUrl}/en - English
# ${baseUrl}/es - Español
# ${baseUrl}/fr - Français
# ${baseUrl}/de - Deutsch
# ${baseUrl}/ja - 日本語
# ${baseUrl}/zh - 简体中文`
return new Response(robotsTxt, {
headers: {
'Content-Type': 'text/plain',
},
})
}

View File

@@ -0,0 +1,63 @@
import { i18n } from '@/lib/i18n'
import { source } from '@/lib/source'
export const revalidate = false
export async function GET() {
const baseUrl = 'https://docs.sim.ai'
const allPages = source.getPages()
const getPriority = (url: string): string => {
if (url === '/introduction' || url === '/') return '1.0'
if (url === '/getting-started') return '0.9'
if (url.match(/^\/[^/]+$/)) return '0.8'
if (url.includes('/sdks/') || url.includes('/tools/')) return '0.7'
return '0.6'
}
const urls = allPages
.flatMap((page) => {
const urlWithoutLang = page.url.replace(/^\/[a-z]{2}\//, '/')
return i18n.languages.map((lang) => {
const url =
lang === i18n.defaultLanguage
? `${baseUrl}${urlWithoutLang}`
: `${baseUrl}/${lang}${urlWithoutLang}`
return ` <url>
<loc>${url}</loc>
<lastmod>${new Date().toISOString().split('T')[0]}</lastmod>
<changefreq>weekly</changefreq>
<priority>${getPriority(urlWithoutLang)}</priority>
${i18n.languages.length > 1 ? generateAlternateLinks(baseUrl, urlWithoutLang) : ''}
</url>`
})
})
.join('\n')
const sitemap = `<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
${urls}
</urlset>`
return new Response(sitemap, {
headers: {
'Content-Type': 'application/xml',
'Cache-Control': 'public, max-age=3600, s-maxage=3600',
},
})
}
function generateAlternateLinks(baseUrl: string, urlWithoutLang: string): string {
return i18n.languages
.map((lang) => {
const url =
lang === i18n.defaultLanguage
? `${baseUrl}${urlWithoutLang}`
: `${baseUrl}/${lang}${urlWithoutLang}`
return ` <xhtml:link rel="alternate" hreflang="${lang}" href="${url}" />`
})
.join('\n')
}

11
apps/docs/cli.json Normal file
View File

@@ -0,0 +1,11 @@
{
"aliases": {
"uiDir": "./components/ui",
"componentsDir": "./components",
"blockDir": "./components",
"cssDir": "./styles",
"libDir": "./lib"
},
"baseDir": "",
"commands": {}
}

View File

@@ -0,0 +1,42 @@
'use client'
import { ChevronLeft, ChevronRight } from 'lucide-react'
import Link from 'next/link'
interface PageNavigationArrowsProps {
previous?: {
url: string
}
next?: {
url: string
}
}
export function PageNavigationArrows({ previous, next }: PageNavigationArrowsProps) {
if (!previous && !next) return null
return (
<div className='flex items-center gap-2'>
{previous && (
<Link
href={previous.url}
className='inline-flex items-center justify-center gap-1.5 rounded-lg border border-border/40 bg-background px-2.5 py-1.5 text-muted-foreground/60 text-sm transition-all hover:border-border hover:bg-accent/50 hover:text-muted-foreground'
aria-label='Previous page'
title='Previous page'
>
<ChevronLeft className='h-4 w-4' />
</Link>
)}
{next && (
<Link
href={next.url}
className='inline-flex items-center justify-center gap-1.5 rounded-lg border border-border/40 bg-background px-2.5 py-1.5 text-muted-foreground/60 text-sm transition-all hover:border-border hover:bg-accent/50 hover:text-muted-foreground'
aria-label='Next page'
title='Next page'
>
<ChevronRight className='h-4 w-4' />
</Link>
)}
</div>
)
}

View File

@@ -0,0 +1,206 @@
'use client'
import { type ReactNode, useEffect, useState } from 'react'
import type { Folder, Item, Separator } from 'fumadocs-core/page-tree'
import { ChevronRight } from 'lucide-react'
import Link from 'next/link'
import { usePathname } from 'next/navigation'
import { cn } from '@/lib/utils'
const LANG_PREFIXES = ['/en', '/es', '/fr', '/de', '/ja', '/zh']
function stripLangPrefix(path: string): string {
for (const prefix of LANG_PREFIXES) {
if (path === prefix) return '/'
if (path.startsWith(`${prefix}/`)) return path.slice(prefix.length)
}
return path
}
function isActive(url: string, pathname: string, nested = true): boolean {
const normalizedPathname = stripLangPrefix(pathname)
const normalizedUrl = stripLangPrefix(url)
return (
normalizedUrl === normalizedPathname ||
(nested && normalizedPathname.startsWith(`${normalizedUrl}/`))
)
}
export function SidebarItem({ item }: { item: Item }) {
const pathname = usePathname()
const active = isActive(item.url, pathname, false)
return (
<Link
href={item.url}
data-active={active}
className={cn(
// Mobile styles (default)
'flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors',
'text-fd-muted-foreground hover:bg-fd-accent/50 hover:text-fd-accent-foreground',
active && 'bg-fd-primary/10 font-medium text-fd-primary',
// Desktop styles (lg+)
'lg:mb-[0.0625rem] lg:block lg:rounded-md lg:px-2.5 lg:py-1.5 lg:font-normal lg:text-[13px] lg:leading-tight',
'lg:text-gray-600 lg:dark:text-gray-400',
!active && 'lg:hover:bg-gray-100/60 lg:dark:hover:bg-gray-800/40',
active &&
'lg:bg-purple-50/80 lg:font-normal lg:text-purple-600 lg:dark:bg-purple-900/15 lg:dark:text-purple-400'
)}
>
{item.name}
</Link>
)
}
export function SidebarFolder({ item, children }: { item: Folder; children: ReactNode }) {
const pathname = usePathname()
const hasActiveChild = checkHasActiveChild(item, pathname)
const hasChildren = item.children.length > 0
const [open, setOpen] = useState(hasActiveChild)
useEffect(() => {
setOpen(hasActiveChild)
}, [hasActiveChild])
const active = item.index ? isActive(item.index.url, pathname, false) : false
if (item.index && !hasChildren) {
return (
<Link
href={item.index.url}
data-active={active}
className={cn(
// Mobile styles (default)
'flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors',
'text-fd-muted-foreground hover:bg-fd-accent/50 hover:text-fd-accent-foreground',
active && 'bg-fd-primary/10 font-medium text-fd-primary',
// Desktop styles (lg+)
'lg:mb-[0.0625rem] lg:block lg:rounded-md lg:px-2.5 lg:py-1.5 lg:font-normal lg:text-[13px] lg:leading-tight',
'lg:text-gray-600 lg:dark:text-gray-400',
!active && 'lg:hover:bg-gray-100/60 lg:dark:hover:bg-gray-800/40',
active &&
'lg:bg-purple-50/80 lg:font-normal lg:text-purple-600 lg:dark:bg-purple-900/15 lg:dark:text-purple-400'
)}
>
{item.name}
</Link>
)
}
return (
<div className='flex flex-col lg:mb-[0.0625rem]'>
<div className='flex w-full items-center lg:gap-0.5'>
{item.index ? (
<Link
href={item.index.url}
data-active={active}
className={cn(
// Mobile styles (default)
'flex flex-1 items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors',
'text-fd-muted-foreground hover:bg-fd-accent/50 hover:text-fd-accent-foreground',
active && 'bg-fd-primary/10 font-medium text-fd-primary',
// Desktop styles (lg+)
'lg:block lg:flex-1 lg:rounded-md lg:px-2.5 lg:py-1.5 lg:font-medium lg:text-[13px] lg:leading-tight',
'lg:text-gray-800 lg:dark:text-gray-200',
!active && 'lg:hover:bg-gray-100/60 lg:dark:hover:bg-gray-800/40',
active &&
'lg:bg-purple-50/80 lg:text-purple-600 lg:dark:bg-purple-900/15 lg:dark:text-purple-400'
)}
>
{item.name}
</Link>
) : (
<button
onClick={() => setOpen(!open)}
className={cn(
// Mobile styles (default)
'flex flex-1 items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors',
'text-fd-muted-foreground hover:bg-fd-accent/50',
// Desktop styles (lg+)
'lg:flex lg:w-full lg:cursor-pointer lg:items-center lg:justify-between lg:rounded-md lg:px-2.5 lg:py-1.5 lg:text-left lg:font-medium lg:text-[13px] lg:leading-tight',
'lg:text-gray-800 lg:hover:bg-gray-100/60 lg:dark:text-gray-200 lg:dark:hover:bg-gray-800/40'
)}
>
<span>{item.name}</span>
{/* Desktop-only chevron for non-index folders */}
<ChevronRight
className={cn(
'ml-auto hidden h-3 w-3 flex-shrink-0 text-gray-400 transition-transform duration-200 ease-in-out lg:block dark:text-gray-500',
open && 'rotate-90'
)}
/>
</button>
)}
{hasChildren && (
<button
onClick={() => setOpen(!open)}
className={cn(
// Mobile styles
'rounded p-1 hover:bg-fd-accent/50',
// Desktop styles
'lg:cursor-pointer lg:rounded lg:p-1 lg:transition-colors lg:hover:bg-gray-100/60 lg:dark:hover:bg-gray-800/40'
)}
aria-label={open ? 'Collapse' : 'Expand'}
>
<ChevronRight
className={cn(
// Mobile styles
'h-4 w-4 transition-transform',
// Desktop styles
'lg:h-3 lg:w-3 lg:text-gray-400 lg:duration-200 lg:ease-in-out lg:dark:text-gray-500',
open && 'rotate-90'
)}
/>
</button>
)}
</div>
{hasChildren && (
<div
className={cn(
'overflow-hidden transition-all duration-200 ease-in-out',
open ? 'max-h-[10000px] opacity-100' : 'max-h-0 opacity-0'
)}
>
{/* Mobile: simple indent */}
<div className='ml-4 flex flex-col gap-0.5 lg:hidden'>{children}</div>
{/* Desktop: styled with border */}
<ul className='mt-0.5 ml-2 hidden space-y-[0.0625rem] border-gray-200/60 border-l pl-2.5 lg:block dark:border-gray-700/60'>
{children}
</ul>
</div>
)}
</div>
)
}
export function SidebarSeparator({ item }: { item: Separator }) {
return (
<p
className={cn(
// Mobile styles
'mt-4 mb-2 px-2 font-medium text-fd-muted-foreground text-xs',
// Desktop styles
'lg:mt-4 lg:mb-1.5 lg:px-2.5 lg:font-semibold lg:text-[10px] lg:text-gray-500/80 lg:uppercase lg:tracking-wide lg:dark:text-gray-500'
)}
>
{item.name}
</p>
)
}
function checkHasActiveChild(node: Folder, pathname: string): boolean {
if (node.index && isActive(node.index.url, pathname)) {
return true
}
for (const child of node.children) {
if (child.type === 'page' && isActive(child.url, pathname)) {
return true
}
if (child.type === 'folder' && checkHasActiveChild(child, pathname)) {
return true
}
}
return false
}

View File

@@ -0,0 +1,41 @@
'use client'
import { useState } from 'react'
import { ArrowRight, ChevronRight } from 'lucide-react'
import Link from 'next/link'
export function TOCFooter() {
const [isHovered, setIsHovered] = useState(false)
return (
<div className='sticky bottom-0 mt-6'>
<div className='flex flex-col gap-2 rounded-lg border border-border bg-secondary p-6 text-sm'>
<div className='text-balance font-semibold text-base leading-tight'>
Start building today
</div>
<div className='text-muted-foreground'>Trusted by over 60,000 builders.</div>
<div className='text-muted-foreground'>
Build Agentic workflows visually on a drag-and-drop canvas or with natural language.
</div>
<Link
href='https://sim.ai/signup'
target='_blank'
rel='noopener noreferrer'
onMouseEnter={() => setIsHovered(true)}
onMouseLeave={() => setIsHovered(false)}
className='group mt-2 inline-flex h-8 w-fit items-center justify-center gap-1 whitespace-nowrap rounded-[10px] border border-[#6F3DFA] bg-gradient-to-b from-[#8357FF] to-[#6F3DFA] px-3 pr-[10px] pl-[12px] font-medium text-sm text-white shadow-[inset_0_2px_4px_0_#9B77FF] outline-none transition-all hover:shadow-lg focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50'
aria-label='Get started with Sim - Sign up for free'
>
<span>Get started</span>
<span className='inline-flex transition-transform duration-200 group-hover:translate-x-0.5'>
{isHovered ? (
<ArrowRight className='h-4 w-4' aria-hidden='true' />
) : (
<ChevronRight className='h-4 w-4' aria-hidden='true' />
)}
</span>
</Link>
</div>
</div>
)
}

File diff suppressed because one or more lines are too long

View File

@@ -1,10 +0,0 @@
import defaultMdxComponents from 'fumadocs-ui/mdx'
import { ThemeImage } from './ui/theme-image'
// Extend the default MDX components with our custom components
const mdxComponents = {
...defaultMdxComponents,
ThemeImage,
}
export default mdxComponents

View File

@@ -0,0 +1,66 @@
'use client'
import Image from 'next/image'
import Link from 'next/link'
import { LanguageDropdown } from '@/components/ui/language-dropdown'
import { SearchTrigger } from '@/components/ui/search-trigger'
import { ThemeToggle } from '@/components/ui/theme-toggle'
export function Navbar() {
return (
<nav
className='sticky top-0 z-50 border-border/50 border-b'
style={{
backdropFilter: 'blur(25px) saturate(180%)',
WebkitBackdropFilter: 'blur(25px) saturate(180%)',
}}
>
{/* Desktop: Single row layout */}
<div className='hidden h-16 w-full items-center lg:flex'>
<div
className='relative flex w-full items-center justify-between'
style={{
paddingLeft: 'calc(var(--sidebar-offset) + 32px)',
paddingRight: 'calc(var(--toc-offset) + 60px)',
}}
>
{/* Left cluster: logo */}
<div className='flex items-center'>
<Link href='/' className='flex min-w-[100px] items-center'>
<Image
src='/static/logo.png'
alt='Sim'
width={72}
height={28}
className='h-7 w-auto'
/>
</Link>
</div>
{/* Center cluster: search - absolutely positioned to center */}
<div className='-translate-x-1/2 absolute left-1/2 flex items-center justify-center'>
<SearchTrigger />
</div>
{/* Right cluster aligns with TOC edge */}
<div className='flex items-center gap-4'>
<Link
href='https://sim.ai'
target='_blank'
rel='noopener noreferrer'
className='rounded-xl px-3 py-2 font-normal text-[0.9375rem] text-foreground/60 leading-[1.4] transition-colors hover:bg-foreground/8 hover:text-foreground'
style={{
fontFamily:
'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
}}
>
Platform
</Link>
<LanguageDropdown />
<ThemeToggle />
</div>
</div>
</div>
</nav>
)
}

View File

@@ -0,0 +1,60 @@
'use client'
import { useState } from 'react'
import { useCopyButton } from 'fumadocs-ui/utils/use-copy-button'
import { Check, Copy } from 'lucide-react'
const cache = new Map<string, string>()
export function LLMCopyButton({
markdownUrl,
}: {
/**
* A URL to fetch the raw Markdown/MDX content of page
*/
markdownUrl: string
}) {
const [isLoading, setLoading] = useState(false)
const [checked, onClick] = useCopyButton(async () => {
const cached = cache.get(markdownUrl)
if (cached) return navigator.clipboard.writeText(cached)
setLoading(true)
try {
await navigator.clipboard.write([
new ClipboardItem({
'text/plain': fetch(markdownUrl).then(async (res) => {
const content = await res.text()
cache.set(markdownUrl, content)
return content
}),
}),
])
} finally {
setLoading(false)
}
})
return (
<button
disabled={isLoading}
onClick={onClick}
className='flex cursor-pointer items-center gap-1.5 rounded-lg border border-border/40 bg-background px-2.5 py-2 text-muted-foreground/60 text-sm leading-none transition-all hover:border-border hover:bg-accent/50 hover:text-muted-foreground'
aria-label={checked ? 'Copied to clipboard' : 'Copy page content'}
>
{checked ? (
<>
<Check className='h-3.5 w-3.5' />
<span>Copied</span>
</>
) : (
<>
<Copy className='h-3.5 w-3.5' />
<span>Copy page</span>
</>
)}
</button>
)
}

View File

@@ -0,0 +1,174 @@
import Script from 'next/script'
interface StructuredDataProps {
title: string
description: string
url: string
lang: string
dateModified?: string
breadcrumb?: Array<{ name: string; url: string }>
}
export function StructuredData({
title,
description,
url,
lang,
dateModified,
breadcrumb,
}: StructuredDataProps) {
const baseUrl = 'https://docs.sim.ai'
const articleStructuredData = {
'@context': 'https://schema.org',
'@type': 'TechArticle',
headline: title,
description: description,
url: url,
datePublished: dateModified || new Date().toISOString(),
dateModified: dateModified || new Date().toISOString(),
author: {
'@type': 'Organization',
name: 'Sim Team',
url: baseUrl,
},
publisher: {
'@type': 'Organization',
name: 'Sim',
url: baseUrl,
logo: {
'@type': 'ImageObject',
url: `${baseUrl}/static/logo.png`,
},
},
mainEntityOfPage: {
'@type': 'WebPage',
'@id': url,
},
inLanguage: lang,
isPartOf: {
'@type': 'WebSite',
name: 'Sim Documentation',
url: baseUrl,
},
potentialAction: {
'@type': 'ReadAction',
target: url,
},
}
const breadcrumbStructuredData = breadcrumb && {
'@context': 'https://schema.org',
'@type': 'BreadcrumbList',
itemListElement: breadcrumb.map((item, index) => ({
'@type': 'ListItem',
position: index + 1,
name: item.name,
item: item.url,
})),
}
const websiteStructuredData = url === baseUrl && {
'@context': 'https://schema.org',
'@type': 'WebSite',
name: 'Sim Documentation',
url: baseUrl,
description:
'Comprehensive documentation for Sim visual workflow builder for AI applications. Create powerful AI agents, automation workflows, and data processing pipelines.',
publisher: {
'@type': 'Organization',
name: 'Sim',
url: baseUrl,
},
potentialAction: {
'@type': 'SearchAction',
target: {
'@type': 'EntryPoint',
urlTemplate: `${baseUrl}/search?q={search_term_string}`,
},
'query-input': 'required name=search_term_string',
},
inLanguage: ['en', 'es', 'fr', 'de', 'ja', 'zh'],
}
const faqStructuredData = title.toLowerCase().includes('faq') && {
'@context': 'https://schema.org',
'@type': 'FAQPage',
mainEntity: [],
}
const softwareStructuredData = {
'@context': 'https://schema.org',
'@type': 'SoftwareApplication',
name: 'Sim',
applicationCategory: 'DeveloperApplication',
operatingSystem: 'Any',
description:
'Visual workflow builder for AI applications. Create powerful AI agents, automation workflows, and data processing pipelines by connecting blocks on a canvas—no coding required.',
url: baseUrl,
author: {
'@type': 'Organization',
name: 'Sim Team',
},
offers: {
'@type': 'Offer',
category: 'Developer Tools',
},
featureList: [
'Visual workflow builder with drag-and-drop interface',
'AI agent creation and automation',
'80+ built-in integrations',
'Real-time team collaboration',
'Multiple deployment options',
'Custom integrations via MCP protocol',
],
}
return (
<>
<Script
id='article-structured-data'
type='application/ld+json'
dangerouslySetInnerHTML={{
__html: JSON.stringify(articleStructuredData),
}}
/>
{breadcrumbStructuredData && (
<Script
id='breadcrumb-structured-data'
type='application/ld+json'
dangerouslySetInnerHTML={{
__html: JSON.stringify(breadcrumbStructuredData),
}}
/>
)}
{websiteStructuredData && (
<Script
id='website-structured-data'
type='application/ld+json'
dangerouslySetInnerHTML={{
__html: JSON.stringify(websiteStructuredData),
}}
/>
)}
{faqStructuredData && (
<Script
id='faq-structured-data'
type='application/ld+json'
dangerouslySetInnerHTML={{
__html: JSON.stringify(faqStructuredData),
}}
/>
)}
{url === baseUrl && (
<Script
id='software-structured-data'
type='application/ld+json'
dangerouslySetInnerHTML={{
__html: JSON.stringify(softwareStructuredData),
}}
/>
)}
</>
)
}

View File

@@ -1,44 +1,40 @@
'use client'
import type * as React from 'react'
import { blockTypeToIconMap } from '@/components/ui/icon-mapping'
interface BlockInfoCardProps {
type: string
color: string
icon?: boolean
iconSvg?: string
icon?: React.ComponentType<{ className?: string }>
iconSvg?: string // Deprecated: Use automatic icon resolution instead
}
export function BlockInfoCard({
type,
color,
icon = false,
icon: IconComponent,
iconSvg,
}: BlockInfoCardProps): React.ReactNode {
// Auto-resolve icon component from block type if not explicitly provided
const ResolvedIcon = IconComponent || blockTypeToIconMap[type] || null
return (
<div className='mb-6 overflow-hidden rounded-lg border border-border'>
<div className='flex items-center justify-center p-6'>
<div
className='flex h-20 w-20 items-center justify-center rounded-lg'
style={{ backgroundColor: color }}
style={{ background: color }}
>
{iconSvg ? (
{ResolvedIcon ? (
<ResolvedIcon className='h-10 w-10 text-white' />
) : iconSvg ? (
<div className='h-10 w-10 text-white' dangerouslySetInnerHTML={{ __html: iconSvg }} />
) : (
<div className='font-mono text-xl opacity-70'>{type.substring(0, 2)}</div>
)}
</div>
</div>
{icon && (
<style jsx global>{`
.block-icon {
width: 80px;
height: 80px;
margin: 1rem auto;
display: block;
}
`}</style>
)}
</div>
)
}

View File

@@ -1,163 +0,0 @@
import {
AgentIcon,
ApiIcon,
ChartBarIcon,
CodeIcon,
ConditionalIcon,
ConnectIcon,
ResponseIcon,
} from '@/components/icons'
import { cn } from '@/lib/utils'
// Custom Feature component specifically for BlockTypes to handle the 6-item layout
const BlockFeature = ({
title,
description,
icon,
href,
index,
totalItems,
itemsPerRow,
}: {
title: string
description: string
icon: React.ReactNode
href?: string
index: number
totalItems: number
itemsPerRow: number
}) => {
const blockColor = {
'--block-color':
title === 'Agent'
? '#8b5cf6'
: title === 'API'
? '#3b82f6'
: title === 'Condition'
? '#f59e0b'
: title === 'Function'
? '#10b981'
: title === 'Router'
? '#6366f1'
: title === 'Evaluator'
? '#ef4444'
: '#8b5cf6',
} as React.CSSProperties
const content = (
<>
{index < itemsPerRow && (
<div className='pointer-events-none absolute inset-0 h-full w-full bg-gradient-to-t from-neutral-100 to-transparent opacity-0 transition duration-200 group-hover/feature:opacity-100 dark:from-neutral-800' />
)}
{index >= itemsPerRow && (
<div className='pointer-events-none absolute inset-0 h-full w-full bg-gradient-to-b from-neutral-100 to-transparent opacity-0 transition duration-200 group-hover/feature:opacity-100 dark:from-neutral-800' />
)}
<div
className='relative z-10 mb-4 px-10 text-neutral-500 transition-colors duration-200 group-hover/feature:text-[color:var(--block-color,#8b5cf6)] dark:text-neutral-400 dark:group-hover/feature:text-[color:var(--block-color,#a78bfa)]'
style={blockColor}
>
{icon}
</div>
<div className='relative z-10 mb-2 px-10 font-bold text-lg'>
<div
className='absolute inset-y-0 left-0 h-6 w-1 origin-center rounded-tr-full rounded-br-full bg-neutral-300 transition-all duration-200 group-hover/feature:h-8 group-hover/feature:bg-[color:var(--block-color,#8b5cf6)] dark:bg-neutral-700'
style={blockColor}
/>
<span className='inline-block text-neutral-800 transition duration-200 group-hover/feature:translate-x-2 dark:text-neutral-100'>
{title}
</span>
</div>
<p className='relative z-10 max-w-xs px-10 text-neutral-600 text-sm dark:text-neutral-300'>
{description}
</p>
</>
)
const containerClasses = cn(
'flex flex-col lg:border-r py-5 relative group/feature dark:border-neutral-800',
(index === 0 || index === itemsPerRow) && 'lg:border-l dark:border-neutral-800',
index < itemsPerRow && 'lg:border-b dark:border-neutral-800',
href && 'cursor-pointer hover:bg-neutral-50 dark:hover:bg-neutral-900/50 transition-colors'
)
if (href) {
return (
<a href={href} className={containerClasses} style={{ textDecoration: 'none' }}>
{content}
</a>
)
}
return <div className={containerClasses}>{content}</div>
}
export function BlockTypes() {
const features = [
{
title: 'Agent',
description:
'Create powerful AI agents using any LLM provider with customizable system prompts and tool integrations.',
icon: <AgentIcon className='h-6 w-6' />,
href: '/blocks/agent',
},
{
title: 'API',
description:
'Connect to any external API with support for all standard HTTP methods and customizable request parameters.',
icon: <ApiIcon className='h-6 w-6' />,
href: '/blocks/api',
},
{
title: 'Condition',
description:
'Add a condition to the workflow to branch the execution path based on a boolean expression.',
icon: <ConditionalIcon className='h-6 w-6' />,
href: '/blocks/condition',
},
{
title: 'Function',
description:
'Execute custom JavaScript or TypeScript code within your workflow to transform data or implement complex logic.',
icon: <CodeIcon className='h-6 w-6' />,
href: '/blocks/function',
},
{
title: 'Router',
description:
'Intelligently direct workflow execution to different paths based on input analysis.',
icon: <ConnectIcon className='h-6 w-6' />,
href: '/blocks/router',
},
{
title: 'Evaluator',
description:
'Assess content using customizable evaluation metrics and scoring criteria across multiple dimensions.',
icon: <ChartBarIcon className='h-6 w-6' />,
href: '/blocks/evaluator',
},
{
title: 'Response',
description:
'Send a response back to the caller with customizable data, status, and headers.',
icon: <ResponseIcon className='h-6 w-6' />,
href: '/blocks/response',
},
]
const totalItems = features.length
const itemsPerRow = 3 // For large screens
return (
<div className='relative z-10 mx-auto grid max-w-7xl grid-cols-1 py-10 md:grid-cols-2 lg:grid-cols-3'>
{features.map((feature, index) => (
<BlockFeature
key={feature.title}
{...feature}
index={index}
totalItems={totalItems}
itemsPerRow={itemsPerRow}
/>
))}
</div>
)
}

View File

@@ -0,0 +1,27 @@
import { cva, type VariantProps } from 'class-variance-authority'
const variants = {
primary: 'bg-fd-primary text-fd-primary-foreground hover:bg-fd-primary/80',
outline: 'border hover:bg-fd-accent hover:text-fd-accent-foreground',
ghost: 'hover:bg-fd-accent hover:text-fd-accent-foreground',
secondary:
'border bg-fd-secondary text-fd-secondary-foreground hover:bg-fd-accent hover:text-fd-accent-foreground',
} as const
export const buttonVariants = cva(
'inline-flex items-center justify-center rounded-md p-2 text-sm font-medium transition-colors duration-100 disabled:pointer-events-none disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fd-ring',
{
variants: {
variant: variants,
color: variants,
size: {
sm: 'gap-1 px-2 py-1.5 text-xs',
icon: 'p-1.5 [&_svg]:size-5',
'icon-sm': 'p-1.5 [&_svg]:size-4.5',
'icon-xs': 'p-1 [&_svg]:size-4',
},
},
}
)
export type ButtonProps = VariantProps<typeof buttonVariants>

View File

@@ -0,0 +1,50 @@
'use client'
import { useState } from 'react'
import { CodeBlock as FumadocsCodeBlock } from 'fumadocs-ui/components/codeblock'
import { Check, Copy } from 'lucide-react'
import { cn } from '@/lib/utils'
export function CodeBlock(props: React.ComponentProps<typeof FumadocsCodeBlock>) {
const [copied, setCopied] = useState(false)
const handleCopy = async (text: string) => {
await navigator.clipboard.writeText(text)
setCopied(true)
setTimeout(() => setCopied(false), 2000)
}
return (
<FumadocsCodeBlock
{...props}
Actions={({ children, className }) => (
<div className={cn('empty:hidden', className)}>
{/* Custom copy button */}
<button
type='button'
aria-label={copied ? 'Copied Text' : 'Copy Text'}
onClick={(e) => {
const pre = (e.currentTarget as HTMLElement)
.closest('.nd-codeblock')
?.querySelector('pre')
if (pre) handleCopy(pre.textContent || '')
}}
className={cn(
'cursor-pointer rounded-md p-2 transition-all',
'border border-border bg-background/80 hover:bg-muted',
'backdrop-blur-sm'
)}
>
<span className='flex items-center justify-center'>
{copied ? (
<Check size={16} className='text-green-600 dark:text-green-400' />
) : (
<Copy size={16} className='text-muted-foreground' />
)}
</span>
</button>
</div>
)}
/>
)
}

View File

@@ -1,102 +0,0 @@
import {
IconAdjustmentsBolt,
IconCloud,
IconEaseInOut,
IconHeart,
IconHelp,
IconHistory,
IconRouteAltLeft,
IconTerminal2,
} from '@tabler/icons-react'
import { cn } from '@/lib/utils'
export function Features() {
const features = [
{
title: 'Multi-LLM Support',
description: 'Connect to any LLM provider including OpenAI, Anthropic, and more',
icon: <IconCloud />,
},
{
title: 'API Deployment',
description: 'Deploy your workflows as secure, scalable APIs',
icon: <IconTerminal2 />,
},
{
title: 'Webhook Integration',
description: 'Trigger workflows via webhooks from external services',
icon: <IconRouteAltLeft />,
},
{
title: 'Scheduled Execution',
description: 'Schedule workflows to run at specific times or intervals',
icon: <IconEaseInOut />,
},
{
title: '40+ Integrations',
description: 'Connect to hundreds of external services and data sources',
icon: <IconAdjustmentsBolt />,
},
{
title: 'Visual Debugging',
description: 'Debug workflows visually with detailed execution logs',
icon: <IconHelp />,
},
{
title: 'Version Control',
description: 'Track changes and roll back to previous versions',
icon: <IconHistory />,
},
{
title: 'Team Collaboration',
description: 'Collaborate with team members on workflow development',
icon: <IconHeart />,
},
]
return (
<div className='relative z-20 mx-auto grid max-w-7xl grid-cols-1 py-10 md:grid-cols-2 lg:grid-cols-4'>
{features.map((feature, index) => (
<Feature key={feature.title} {...feature} index={index} />
))}
</div>
)
}
export const Feature = ({
title,
description,
icon,
index,
}: {
title: string
description: string
icon: React.ReactNode
index: number
}) => {
return (
<div
className={cn(
'group/feature relative flex flex-col py-5 lg:border-r dark:border-neutral-800',
(index === 0 || index === 4) && 'lg:border-l dark:border-neutral-800',
index < 4 && 'lg:border-b dark:border-neutral-800'
)}
>
{index < 4 && (
<div className='pointer-events-none absolute inset-0 h-full w-full bg-gradient-to-t from-neutral-100 to-transparent opacity-0 transition duration-200 group-hover/feature:opacity-100 dark:from-neutral-800' />
)}
{index >= 4 && (
<div className='pointer-events-none absolute inset-0 h-full w-full bg-gradient-to-b from-neutral-100 to-transparent opacity-0 transition duration-200 group-hover/feature:opacity-100 dark:from-neutral-800' />
)}
<div className='relative z-10 mb-4 px-10 text-neutral-600 dark:text-neutral-400'>{icon}</div>
<div className='relative z-10 mb-2 px-10 font-bold text-lg'>
<div className='absolute inset-y-0 left-0 h-6 w-1 origin-center rounded-tr-full rounded-br-full bg-neutral-300 transition-all duration-200 group-hover/feature:h-8 group-hover/feature:bg-purple-500 dark:bg-neutral-700' />
<span className='inline-block text-neutral-800 transition duration-200 group-hover/feature:translate-x-2 dark:text-neutral-100'>
{title}
</span>
</div>
<p className='relative z-10 max-w-xs px-10 text-neutral-600 text-sm dark:text-neutral-300'>
{description}
</p>
</div>
)
}

View File

@@ -0,0 +1,58 @@
'use client'
import { type ComponentPropsWithoutRef, useState } from 'react'
import { Check, Link } from 'lucide-react'
import { cn } from '@/lib/utils'
type HeadingTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'
interface HeadingProps extends ComponentPropsWithoutRef<'h1'> {
as?: HeadingTag
}
export function Heading({ as, className, ...props }: HeadingProps) {
const [copied, setCopied] = useState(false)
const As = as ?? 'h1'
if (!props.id) {
return <As className={className} {...props} />
}
const handleClick = async (e: React.MouseEvent) => {
e.preventDefault()
const url = `${window.location.origin}${window.location.pathname}#${props.id}`
try {
await navigator.clipboard.writeText(url)
setCopied(true)
// Update URL hash without scrolling
window.history.pushState(null, '', `#${props.id}`)
setTimeout(() => setCopied(false), 2000)
} catch {
// Fallback: just navigate to the anchor
window.location.hash = props.id as string
}
}
return (
<As className={cn('group flex scroll-m-28 flex-row items-center gap-2', className)} {...props}>
<a data-card='' href={`#${props.id}`} className='peer' onClick={handleClick}>
{props.children}
</a>
{copied ? (
<Check
aria-hidden
className='size-3.5 shrink-0 text-green-500 opacity-100 transition-opacity'
/>
) : (
<Link
aria-hidden
className='size-3.5 shrink-0 text-fd-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 peer-hover:opacity-100'
/>
)}
</As>
)
}

View File

@@ -0,0 +1,244 @@
// Auto-generated file - do not edit manually
// Generated by scripts/generate-docs.ts
// Maps block types to their icon component references
import type { ComponentType, SVGProps } from 'react'
import {
AhrefsIcon,
AirtableIcon,
ApifyIcon,
ApolloIcon,
ArxivIcon,
AsanaIcon,
BrainIcon,
BrowserUseIcon,
CalendlyIcon,
CirclebackIcon,
ClayIcon,
ConfluenceIcon,
CursorIcon,
DatadogIcon,
DiscordIcon,
DocumentIcon,
DropboxIcon,
DuckDuckGoIcon,
DynamoDBIcon,
ElasticsearchIcon,
ElevenLabsIcon,
ExaAIIcon,
EyeIcon,
FirecrawlIcon,
GithubIcon,
GitLabIcon,
GmailIcon,
GoogleCalendarIcon,
GoogleDocsIcon,
GoogleDriveIcon,
GoogleFormsIcon,
GoogleGroupsIcon,
GoogleIcon,
GoogleSheetsIcon,
GoogleSlidesIcon,
GoogleVaultIcon,
GrafanaIcon,
GrainIcon,
GreptileIcon,
HubspotIcon,
HuggingFaceIcon,
HunterIOIcon,
ImageIcon,
IncidentioIcon,
IntercomIcon,
JinaAIIcon,
JiraIcon,
JiraServiceManagementIcon,
KalshiIcon,
LinearIcon,
LinkedInIcon,
LinkupIcon,
MailchimpIcon,
MailgunIcon,
Mem0Icon,
MicrosoftExcelIcon,
MicrosoftOneDriveIcon,
MicrosoftPlannerIcon,
MicrosoftSharepointIcon,
MicrosoftTeamsIcon,
MistralIcon,
MongoDBIcon,
MySQLIcon,
Neo4jIcon,
NotionIcon,
OpenAIIcon,
OutlookIcon,
PackageSearchIcon,
ParallelIcon,
PerplexityIcon,
PineconeIcon,
PipedriveIcon,
PolymarketIcon,
PostgresIcon,
PosthogIcon,
QdrantIcon,
RDSIcon,
RedditIcon,
ResendIcon,
S3Icon,
SalesforceIcon,
SearchIcon,
SendgridIcon,
SentryIcon,
SerperIcon,
ServiceNowIcon,
SftpIcon,
ShopifyIcon,
SlackIcon,
SmtpIcon,
SpotifyIcon,
SQSIcon,
SshIcon,
STTIcon,
StagehandIcon,
StripeIcon,
SupabaseIcon,
TavilyIcon,
TelegramIcon,
TranslateIcon,
TrelloIcon,
TTSIcon,
TwilioIcon,
TypeformIcon,
VideoIcon,
WealthboxIcon,
WebflowIcon,
WhatsAppIcon,
WikipediaIcon,
WordpressIcon,
xIcon,
YouTubeIcon,
ZendeskIcon,
ZepIcon,
ZoomIcon,
} from '@/components/icons'
type IconComponent = ComponentType<SVGProps<SVGSVGElement>>
export const blockTypeToIconMap: Record<string, IconComponent> = {
ahrefs: AhrefsIcon,
airtable: AirtableIcon,
apify: ApifyIcon,
apollo: ApolloIcon,
arxiv: ArxivIcon,
asana: AsanaIcon,
browser_use: BrowserUseIcon,
calendly: CalendlyIcon,
circleback: CirclebackIcon,
clay: ClayIcon,
confluence: ConfluenceIcon,
cursor: CursorIcon,
datadog: DatadogIcon,
discord: DiscordIcon,
dropbox: DropboxIcon,
duckduckgo: DuckDuckGoIcon,
dynamodb: DynamoDBIcon,
elasticsearch: ElasticsearchIcon,
elevenlabs: ElevenLabsIcon,
exa: ExaAIIcon,
file: DocumentIcon,
firecrawl: FirecrawlIcon,
github: GithubIcon,
gitlab: GitLabIcon,
gmail: GmailIcon,
google_calendar: GoogleCalendarIcon,
google_docs: GoogleDocsIcon,
google_drive: GoogleDriveIcon,
google_forms: GoogleFormsIcon,
google_groups: GoogleGroupsIcon,
google_search: GoogleIcon,
google_sheets: GoogleSheetsIcon,
google_slides: GoogleSlidesIcon,
google_vault: GoogleVaultIcon,
grafana: GrafanaIcon,
grain: GrainIcon,
greptile: GreptileIcon,
hubspot: HubspotIcon,
huggingface: HuggingFaceIcon,
hunter: HunterIOIcon,
image_generator: ImageIcon,
incidentio: IncidentioIcon,
intercom: IntercomIcon,
jina: JinaAIIcon,
jira: JiraIcon,
jira_service_management: JiraServiceManagementIcon,
kalshi: KalshiIcon,
knowledge: PackageSearchIcon,
linear: LinearIcon,
linkedin: LinkedInIcon,
linkup: LinkupIcon,
mailchimp: MailchimpIcon,
mailgun: MailgunIcon,
mem0: Mem0Icon,
memory: BrainIcon,
microsoft_excel: MicrosoftExcelIcon,
microsoft_planner: MicrosoftPlannerIcon,
microsoft_teams: MicrosoftTeamsIcon,
mistral_parse: MistralIcon,
mongodb: MongoDBIcon,
mysql: MySQLIcon,
neo4j: Neo4jIcon,
notion: NotionIcon,
onedrive: MicrosoftOneDriveIcon,
openai: OpenAIIcon,
outlook: OutlookIcon,
parallel_ai: ParallelIcon,
perplexity: PerplexityIcon,
pinecone: PineconeIcon,
pipedrive: PipedriveIcon,
polymarket: PolymarketIcon,
postgresql: PostgresIcon,
posthog: PosthogIcon,
qdrant: QdrantIcon,
rds: RDSIcon,
reddit: RedditIcon,
resend: ResendIcon,
s3: S3Icon,
salesforce: SalesforceIcon,
search: SearchIcon,
sendgrid: SendgridIcon,
sentry: SentryIcon,
serper: SerperIcon,
servicenow: ServiceNowIcon,
sftp: SftpIcon,
sharepoint: MicrosoftSharepointIcon,
shopify: ShopifyIcon,
slack: SlackIcon,
smtp: SmtpIcon,
spotify: SpotifyIcon,
sqs: SQSIcon,
ssh: SshIcon,
stagehand: StagehandIcon,
stripe: StripeIcon,
stt: STTIcon,
supabase: SupabaseIcon,
tavily: TavilyIcon,
telegram: TelegramIcon,
thinking: BrainIcon,
translate: TranslateIcon,
trello: TrelloIcon,
tts: TTSIcon,
twilio_sms: TwilioIcon,
twilio_voice: TwilioIcon,
typeform: TypeformIcon,
video_generator: VideoIcon,
vision: EyeIcon,
wealthbox: WealthboxIcon,
webflow: WebflowIcon,
whatsapp: WhatsAppIcon,
wikipedia: WikipediaIcon,
wordpress: WordpressIcon,
x: xIcon,
youtube: YouTubeIcon,
zendesk: ZendeskIcon,
zep: ZepIcon,
zoom: ZoomIcon,
}

View File

@@ -0,0 +1,53 @@
'use client'
import { useState } from 'react'
import NextImage, { type ImageProps as NextImageProps } from 'next/image'
import { Lightbox } from '@/components/ui/lightbox'
import { cn } from '@/lib/utils'
interface ImageProps extends Omit<NextImageProps, 'className'> {
className?: string
enableLightbox?: boolean
}
export function Image({
className = 'w-full',
enableLightbox = true,
alt = '',
src,
...props
}: ImageProps) {
const [isLightboxOpen, setIsLightboxOpen] = useState(false)
const handleImageClick = () => {
if (enableLightbox) {
setIsLightboxOpen(true)
}
}
return (
<>
<NextImage
className={cn(
'overflow-hidden rounded-xl border border-border object-cover shadow-sm',
enableLightbox && 'cursor-pointer transition-opacity hover:opacity-90',
className
)}
alt={alt}
src={src}
onClick={handleImageClick}
{...props}
/>
{enableLightbox && (
<Lightbox
isOpen={isLightboxOpen}
onClose={() => setIsLightboxOpen(false)}
src={typeof src === 'string' ? src : String(src)}
alt={alt}
type='image'
/>
)}
</>
)
}

View File

@@ -0,0 +1,129 @@
'use client'
import { useEffect, useState } from 'react'
import { Check, ChevronRight } from 'lucide-react'
import { useParams, usePathname, useRouter } from 'next/navigation'
const languages = {
en: { name: 'English', flag: '🇺🇸' },
es: { name: 'Español', flag: '🇪🇸' },
fr: { name: 'Français', flag: '🇫🇷' },
de: { name: 'Deutsch', flag: '🇩🇪' },
ja: { name: '日本語', flag: '🇯🇵' },
zh: { name: '简体中文', flag: '🇨🇳' },
}
export function LanguageDropdown() {
const [isOpen, setIsOpen] = useState(false)
const pathname = usePathname()
const params = useParams()
const router = useRouter()
const [currentLang, setCurrentLang] = useState(() => {
const langFromParams = params?.lang as string
return langFromParams && Object.keys(languages).includes(langFromParams) ? langFromParams : 'en'
})
useEffect(() => {
const langFromParams = params?.lang as string
if (langFromParams && Object.keys(languages).includes(langFromParams)) {
if (langFromParams !== currentLang) {
setCurrentLang(langFromParams)
}
} else {
if (currentLang !== 'en') {
setCurrentLang('en')
}
}
}, [params, currentLang])
const handleLanguageChange = (locale: string) => {
if (locale === currentLang) {
setIsOpen(false)
return
}
setIsOpen(false)
const segments = pathname.split('/').filter(Boolean)
if (segments[0] && Object.keys(languages).includes(segments[0])) {
segments.shift()
}
let newPath = ''
if (locale === 'en') {
newPath = segments.length > 0 ? `/${segments.join('/')}` : '/introduction'
} else {
newPath = `/${locale}${segments.length > 0 ? `/${segments.join('/')}` : '/introduction'}`
}
router.push(newPath)
}
useEffect(() => {
if (!isOpen) return
const onKey = (e: KeyboardEvent) => {
if (e.key === 'Escape') setIsOpen(false)
}
window.addEventListener('keydown', onKey)
return () => window.removeEventListener('keydown', onKey)
}, [isOpen])
return (
<div className='relative'>
<button
onClick={(e) => {
e.preventDefault()
e.stopPropagation()
setIsOpen(!isOpen)
}}
aria-haspopup='listbox'
aria-expanded={isOpen}
aria-controls='language-menu'
className='flex cursor-pointer items-center gap-1.5 rounded-xl px-3 py-2 font-normal text-[0.9375rem] text-foreground/60 leading-[1.4] transition-colors hover:bg-foreground/8 hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring'
style={{
fontFamily:
'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
}}
>
<span>{languages[currentLang as keyof typeof languages]?.name}</span>
<ChevronRight className='h-3.5 w-3.5' />
</button>
{isOpen && (
<>
<div className='fixed inset-0 z-[1000]' aria-hidden onClick={() => setIsOpen(false)} />
<div
id='language-menu'
role='listbox'
className='absolute top-full right-0 z-[1001] mt-1 max-h-[75vh] w-56 overflow-auto rounded-xl border border-border/50 bg-white shadow-2xl md:w-44 md:bg-background/95 md:backdrop-blur-md dark:bg-neutral-950 md:dark:bg-background/95'
>
{Object.entries(languages).map(([code, lang]) => (
<button
key={code}
onClick={(e) => {
e.preventDefault()
e.stopPropagation()
handleLanguageChange(code)
}}
role='option'
aria-selected={currentLang === code}
className={`flex w-full cursor-pointer items-center gap-3 px-3 py-3 text-base transition-colors first:rounded-t-xl last:rounded-b-xl hover:bg-muted/80 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring md:gap-2 md:px-2.5 md:py-2 md:text-sm ${
currentLang === code ? 'bg-muted/60 font-medium text-primary' : 'text-foreground'
}`}
>
<span className='text-base md:text-sm'>{lang.flag}</span>
<span className='leading-none'>{lang.name}</span>
{currentLang === code && (
<Check className='ml-auto h-4 w-4 text-primary md:h-3.5 md:w-3.5' />
)}
</button>
))}
</div>
</>
)}
</div>
)
}

View File

@@ -0,0 +1,74 @@
'use client'
import { useEffect, useRef } from 'react'
import { getAssetUrl } from '@/lib/utils'
interface LightboxProps {
isOpen: boolean
onClose: () => void
src: string
alt: string
type: 'image' | 'video'
}
export function Lightbox({ isOpen, onClose, src, alt, type }: LightboxProps) {
const overlayRef = useRef<HTMLDivElement>(null)
useEffect(() => {
const handleKeyDown = (event: KeyboardEvent) => {
if (event.key === 'Escape') {
onClose()
}
}
const handleClickOutside = (event: MouseEvent) => {
if (overlayRef.current && event.target === overlayRef.current) {
onClose()
}
}
if (isOpen) {
document.addEventListener('keydown', handleKeyDown)
document.addEventListener('click', handleClickOutside)
document.body.style.overflow = 'hidden'
}
return () => {
document.removeEventListener('keydown', handleKeyDown)
document.removeEventListener('click', handleClickOutside)
document.body.style.overflow = 'unset'
}
}, [isOpen, onClose])
if (!isOpen) return null
return (
<div
ref={overlayRef}
className='fixed inset-0 z-50 flex items-center justify-center bg-black/80 p-12 backdrop-blur-sm'
role='dialog'
aria-modal='true'
aria-label='Media viewer'
>
<div className='relative max-h-full max-w-full overflow-hidden rounded-xl shadow-2xl'>
{type === 'image' ? (
<img
src={src}
alt={alt}
className='max-h-[calc(100vh-6rem)] max-w-[calc(100vw-6rem)] rounded-xl object-contain'
loading='lazy'
/>
) : (
<video
src={getAssetUrl(src)}
autoPlay
loop
muted
playsInline
className='max-h-[calc(100vh-6rem)] max-w-[calc(100vw-6rem)] rounded-xl outline-none focus:outline-none'
/>
)}
</div>
</div>
)
}

View File

@@ -0,0 +1,38 @@
'use client'
import { Search } from 'lucide-react'
export function SearchTrigger() {
const handleClick = () => {
const event = new KeyboardEvent('keydown', {
key: 'k',
metaKey: true,
bubbles: true,
})
document.dispatchEvent(event)
}
return (
<button
type='button'
className='flex h-10 w-[460px] cursor-pointer items-center gap-2 rounded-xl border border-border/50 px-3 py-2 text-sm backdrop-blur-xl transition-colors hover:border-border'
style={{
backgroundColor: 'hsla(0, 0%, 5%, 0.85)',
backdropFilter: 'blur(33px) saturate(180%)',
WebkitBackdropFilter: 'blur(33px) saturate(180%)',
color: 'rgba(255, 255, 255, 0.6)',
}}
onClick={handleClick}
>
<Search className='h-4 w-4' />
<span>Search...</span>
<kbd
className='ml-auto flex items-center gap-0.5 font-medium'
style={{ color: 'rgba(255, 255, 255, 0.6)' }}
>
<span style={{ fontSize: '15px', lineHeight: '1' }}></span>
<span style={{ fontSize: '13px', lineHeight: '1' }}>K</span>
</kbd>
</button>
)
}

View File

@@ -1,48 +0,0 @@
'use client'
import { useEffect, useState } from 'react'
import Image from 'next/image'
import { useTheme } from 'next-themes'
interface ThemeImageProps {
lightSrc: string
darkSrc: string
alt: string
width?: number
height?: number
className?: string
}
export function ThemeImage({
lightSrc,
darkSrc,
alt,
width = 600,
height = 400,
className = 'rounded-lg border border-border my-6',
}: ThemeImageProps) {
const { resolvedTheme } = useTheme()
const [imageSrc, setImageSrc] = useState(lightSrc)
const [mounted, setMounted] = useState(false)
// Wait until component is mounted to avoid hydration mismatch
useEffect(() => {
setMounted(true)
}, [])
useEffect(() => {
if (mounted) {
setImageSrc(resolvedTheme === 'dark' ? darkSrc : lightSrc)
}
}, [resolvedTheme, lightSrc, darkSrc, mounted])
if (!mounted) {
return null
}
return (
<div className='flex justify-center'>
<Image src={imageSrc} alt={alt} width={width} height={height} className={className} />
</div>
)
}

View File

@@ -0,0 +1,32 @@
'use client'
import { useEffect, useState } from 'react'
import { Moon, Sun } from 'lucide-react'
import { useTheme } from 'next-themes'
export function ThemeToggle() {
const { theme, setTheme } = useTheme()
const [mounted, setMounted] = useState(false)
useEffect(() => {
setMounted(true)
}, [])
if (!mounted) {
return (
<button className='flex cursor-pointer items-center justify-center rounded-md p-1 text-muted-foreground'>
<Moon className='h-4 w-4' />
</button>
)
}
return (
<button
onClick={() => setTheme(theme === 'dark' ? 'light' : 'dark')}
className='flex cursor-pointer items-center justify-center rounded-md p-1 text-muted-foreground transition-colors hover:text-foreground'
aria-label='Toggle theme'
>
{theme === 'dark' ? <Moon className='h-4 w-4' /> : <Sun className='h-4 w-4' />}
</button>
)
}

View File

@@ -1,4 +1,8 @@
import { getVideoUrl } from '@/lib/utils'
'use client'
import { useState } from 'react'
import { getAssetUrl } from '@/lib/utils'
import { Lightbox } from './lightbox'
interface VideoProps {
src: string
@@ -7,24 +11,47 @@ interface VideoProps {
loop?: boolean
muted?: boolean
playsInline?: boolean
enableLightbox?: boolean
}
export function Video({
src,
className = 'w-full -mb-2 rounded-lg',
className = 'w-full rounded-xl border border-border shadow-sm overflow-hidden outline-none focus:outline-none',
autoPlay = true,
loop = true,
muted = true,
playsInline = true,
enableLightbox = true,
}: VideoProps) {
const [isLightboxOpen, setIsLightboxOpen] = useState(false)
const handleVideoClick = () => {
if (enableLightbox) {
setIsLightboxOpen(true)
}
}
return (
<video
autoPlay={autoPlay}
loop={loop}
muted={muted}
playsInline={playsInline}
className={className}
src={getVideoUrl(src)}
/>
<>
<video
autoPlay={autoPlay}
loop={loop}
muted={muted}
playsInline={playsInline}
className={`${className} ${enableLightbox ? 'cursor-pointer transition-opacity hover:opacity-90' : ''}`}
src={getAssetUrl(src)}
onClick={handleVideoClick}
/>
{enableLightbox && (
<Lightbox
isOpen={isLightboxOpen}
onClose={() => setIsLightboxOpen(false)}
src={src}
alt={`Video: ${src}`}
type='video'
/>
)}
</>
)
}

View File

@@ -1,303 +0,0 @@
---
title: Agent
description: Create powerful AI agents using any LLM provider
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { ThemeImage } from '@/components/ui/theme-image'
The Agent block serves as the interface between your workflow and Large Language Models (LLMs). It executes inference requests against various AI providers, processes natural language inputs according to defined instructions, and generates structured or unstructured outputs for downstream consumption.
<ThemeImage
lightSrc="/static/light/agent-light.png"
darkSrc="/static/dark/agent-dark.png"
alt="Agent Block Configuration"
width={350}
height={175}
/>
## Overview
The Agent block enables you to:
<Steps>
<Step>
<strong>Process natural language</strong>: Analyze user input and generate contextual responses
</Step>
<Step>
<strong>Execute AI-powered tasks</strong>: Perform content analysis, generation, and decision-making
</Step>
<Step>
<strong>Call external tools</strong>: Access APIs, databases, and services during processing
</Step>
<Step>
<strong>Generate structured output</strong>: Return JSON data that matches your schema requirements
</Step>
</Steps>
## Configuration Options
### System Prompt
The system prompt establishes the agent's operational parameters and behavioral constraints. This configuration defines the agent's role, response methodology, and processing boundaries for all incoming requests.
```markdown
You are a helpful assistant that specializes in financial analysis.
Always provide clear explanations and cite sources when possible.
When responding to questions about investments, include risk disclaimers.
```
### User Prompt
The user prompt represents the primary input data for inference processing. This parameter accepts natural language text or structured data that the agent will analyze and respond to. Input sources include:
- **Static Configuration**: Direct text input specified in the block configuration
- **Dynamic Input**: Data passed from upstream blocks through connection interfaces
- **Runtime Generation**: Programmatically generated content during workflow execution
### Model Selection
The Agent block supports multiple LLM providers through a unified inference interface. Available models include:
**OpenAI Models**: GPT-5, GPT-4o, o1, o3, o4-mini, gpt-4.1 (API-based inference)
**Anthropic Models**: Claude 3.7 Sonnet (API-based inference)
**Google Models**: Gemini 2.5 Pro, Gemini 2.0 Flash (API-based inference)
**Alternative Providers**: Groq, Cerebras, xAI, DeepSeek (API-based inference)
**Local Deployment**: Ollama-compatible models (self-hosted inference)
<div className="mx-auto w-3/5 overflow-hidden rounded-lg">
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/models.mp4"></video>
</div>
### Temperature
Control the creativity and randomness of responses:
<Tabs items={['Low (0-0.3)', 'Medium (0.3-0.7)', 'High (0.7-2.0)']}>
<Tab>
More deterministic, focused responses. Best for factual tasks, customer support, and
situations where accuracy is critical.
</Tab>
<Tab>
Balanced creativity and focus. Suitable for general purpose applications that require both
accuracy and some creativity.
</Tab>
<Tab>
More creative, varied responses. Ideal for creative writing, brainstorming, and generating
diverse ideas.
</Tab>
</Tabs>
<p className="mt-4 text-sm text-gray-600 dark:text-gray-400">
The temperature range (0-1 or 0-2) varies depending on the selected model.
</p>
### API Key
Your API key for the selected LLM provider. This is securely stored and used for authentication.
### Tools
Tools extend the agent's capabilities through external API integrations and service connections. The tool system enables function calling, allowing the agent to execute operations beyond text generation.
**Tool Integration Process**:
1. Access the Tools configuration section within the Agent block
2. Select from 60+ pre-built integrations or define custom functions
3. Configure authentication parameters and operational constraints
<div className="mx-auto w-3/5 overflow-hidden rounded-lg">
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/tools.mp4"></video>
</div>
**Available Tool Categories**:
- **Communication**: Gmail, Slack, Telegram, WhatsApp, Microsoft Teams
- **Data Sources**: Notion, Google Sheets, Airtable, Supabase, Pinecone
- **Web Services**: Firecrawl, Google Search, Exa AI, browser automation
- **Development**: GitHub, Jira, Linear repository and issue management
- **AI Services**: OpenAI, Perplexity, Hugging Face, ElevenLabs
**Tool Execution Control**:
- **Auto**: Model determines tool invocation based on context and necessity
- **Required**: Tool must be called during every inference request
- **None**: Tool definition available but excluded from model context
<div className="mx-auto w-3/5 overflow-hidden rounded-lg">
<video autoPlay loop muted playsInline className="w-full -mb-2 rounded-lg" src="/granular-tool-control.mp4"></video>
</div>
### Response Format
The Response Format parameter enforces structured output generation through JSON Schema validation. This ensures consistent, machine-readable responses that conform to predefined data structures:
```json
{
"name": "user_analysis",
"schema": {
"type": "object",
"properties": {
"sentiment": {
"type": "string",
"enum": ["positive", "negative", "neutral"]
},
"confidence": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": ["sentiment", "confidence"]
}
}
```
This configuration constrains the model's output to comply with the specified schema, preventing free-form text responses and ensuring structured data generation.
### Accessing Results
After an agent completes, you can access its outputs:
- **`<agent.content>`**: The agent's response text or structured data
- **`<agent.tokens>`**: Token usage statistics (prompt, completion, total)
- **`<agent.tool_calls>`**: Details of any tools the agent used during execution
- **`<agent.cost>`**: Estimated cost of the API call (if available)
## Advanced Features
### Memory Integration
Agents can maintain context across interactions using the memory system:
```javascript
// In a Function block before the agent
const memory = {
conversation_history: previousMessages,
user_preferences: userProfile,
session_data: currentSession
};
```
### Structured Output Validation
Use JSON Schema to ensure consistent, machine-readable responses:
```json
{
"type": "object",
"properties": {
"analysis": {"type": "string"},
"confidence": {"type": "number", "minimum": 0, "maximum": 1},
"categories": {"type": "array", "items": {"type": "string"}}
},
"required": ["analysis", "confidence"]
}
```
### Error Handling
Agents automatically handle common errors:
- API rate limits with exponential backoff
- Invalid tool calls with retry logic
- Network failures with connection recovery
- Schema validation errors with fallback responses
## Inputs and Outputs
<Tabs items={['Configuration', 'Variables', 'Results']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>System Prompt</strong>: Instructions defining agent behavior and role
</li>
<li>
<strong>User Prompt</strong>: Input text or data to process
</li>
<li>
<strong>Model</strong>: AI model selection (OpenAI, Anthropic, Google, etc.)
</li>
<li>
<strong>Temperature</strong>: Response randomness control (0-2)
</li>
<li>
<strong>Tools</strong>: Array of available tools for function calling
</li>
<li>
<strong>Response Format</strong>: JSON Schema for structured output
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>agent.content</strong>: Agent's response text or structured data
</li>
<li>
<strong>agent.tokens</strong>: Token usage statistics object
</li>
<li>
<strong>agent.tool_calls</strong>: Array of tool execution details
</li>
<li>
<strong>agent.cost</strong>: Estimated API call cost (if available)
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Content</strong>: Primary response output from the agent
</li>
<li>
<strong>Metadata</strong>: Usage statistics and execution details
</li>
<li>
<strong>Access</strong>: Available in blocks after the agent
</li>
</ul>
</Tab>
</Tabs>
## Example Use Cases
### Customer Support Automation
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Handle customer inquiries with database access</h4>
<ol className="list-decimal pl-5 text-sm">
<li>User submits support ticket via API block</li>
<li>Agent processes inquiry with product database tools</li>
<li>Agent generates response and creates follow-up ticket</li>
<li>Response block sends reply to customer</li>
</ol>
</div>
### Multi-Model Content Analysis
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Analyze content with different AI models</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Function block processes uploaded document</li>
<li>Agent with GPT-4o performs technical analysis</li>
<li>Agent with Claude analyzes sentiment and tone</li>
<li>Function block combines results for final report</li>
</ol>
</div>
### Tool-Powered Research Assistant
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Research assistant with web search and document access</h4>
<ol className="list-decimal pl-5 text-sm">
<li>User query received via input</li>
<li>Agent searches web using Google Search tool</li>
<li>Agent accesses Notion database for internal docs</li>
<li>Agent compiles comprehensive research report</li>
</ol>
</div>
## Best Practices
- **Be specific in system prompts**: Clearly define the agent's role, tone, and limitations. The more specific your instructions are, the better the agent will be able to fulfill its intended purpose.
- **Choose the right temperature setting**: Use lower temperature settings (0-0.3) when accuracy is important, or increase temperature (0.7-2.0) for more creative or varied responses
- **Leverage tools effectively**: Integrate tools that complement the agent's purpose and enhance its capabilities. Be selective about which tools you provide to avoid overwhelming the agent. For tasks with little overlap, use another Agent block for the best results.

View File

@@ -1,234 +0,0 @@
---
title: API
description: Connect to external services through API endpoints
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { ThemeImage } from '@/components/ui/theme-image'
The API block enables you to connect your workflow to external services through HTTP requests. It supports various methods like GET, POST, PUT, DELETE, and PATCH, allowing you to interact with virtually any API endpoint.
<ThemeImage
lightSrc="/static/light/api-light.png"
darkSrc="/static/dark/api-dark.png"
alt="API Block"
width={350}
height={175}
/>
## Overview
The API block enables you to:
<Steps>
<Step>
<strong>Connect to external services</strong>: Make HTTP requests to REST APIs and web services
</Step>
<Step>
<strong>Send and receive data</strong>: Process responses and transform data from external sources
</Step>
<Step>
<strong>Integrate third-party platforms</strong>: Connect with services like Stripe, Slack, or custom APIs
</Step>
<Step>
<strong>Handle authentication</strong>: Support various auth methods including Bearer tokens and API keys
</Step>
</Steps>
## Configuration Options
### URL
The endpoint URL for the API request. This can be:
- A static URL entered directly in the block
- A dynamic URL connected from another block's output
- A URL with path parameters
### Method
Select the HTTP method for your request:
- **GET**: Retrieve data from the server
- **POST**: Send data to the server to create a resource
- **PUT**: Update an existing resource on the server
- **DELETE**: Remove a resource from the server
- **PATCH**: Partially update an existing resource
### Query Parameters
Define key-value pairs that will be appended to the URL as query parameters. For example:
```
Key: apiKey
Value: your_api_key_here
Key: limit
Value: 10
```
These would be added to the URL as `?apiKey=your_api_key_here&limit=10`.
### Headers
Configure HTTP headers for your request. Common headers include:
```
Key: Content-Type
Value: application/json
Key: Authorization
Value: Bearer your_token_here
```
### Request Body
For methods that support a request body (POST, PUT, PATCH), you can define the data to send. The body can be:
- JSON data entered directly in the block
- Data connected from another block's output
- Dynamically generated during workflow execution
### Accessing Results
After an API request completes, you can access its outputs:
- **`<api.data>`**: The response body data from the API
- **`<api.status>`**: HTTP status code (200, 404, 500, etc.)
- **`<api.headers>`**: Response headers from the server
- **`<api.error>`**: Error details if the request failed
## Advanced Features
### Dynamic URL Construction
Build URLs dynamically using variables from previous blocks:
```javascript
// In a Function block before the API
const userId = <start.userId>;
const apiUrl = `https://api.example.com/users/${userId}/profile`;
```
### Request Retries
The API block automatically handles:
- Network timeouts with exponential backoff
- Rate limit responses (429 status codes)
- Server errors (5xx status codes) with retry logic
- Connection failures with reconnection attempts
### Response Validation
Validate API responses before processing:
```javascript
// In a Function block after the API
if (<api.status> === 200) {
const data = <api.data>;
// Process successful response
} else {
// Handle error response
console.error(`API Error: ${<api.status>}`);
}
```
## Inputs and Outputs
<Tabs items={['Configuration', 'Variables', 'Results']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>URL</strong>: The endpoint to send the request to
</li>
<li>
<strong>Method</strong>: HTTP method (GET, POST, PUT, DELETE, PATCH)
</li>
<li>
<strong>Query Parameters</strong>: Key-value pairs for URL parameters
</li>
<li>
<strong>Headers</strong>: HTTP headers for authentication and content type
</li>
<li>
<strong>Body</strong>: Request payload for POST/PUT/PATCH methods
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>api.data</strong>: Response body data from the API call
</li>
<li>
<strong>api.status</strong>: HTTP status code returned by server
</li>
<li>
<strong>api.headers</strong>: Response headers from the server
</li>
<li>
<strong>api.error</strong>: Error details if request failed
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Response Data</strong>: Primary API response content
</li>
<li>
<strong>Status Information</strong>: HTTP status and error details
</li>
<li>
<strong>Access</strong>: Available in blocks after the API call
</li>
</ul>
</Tab>
</Tabs>
## Example Use Cases
### Fetch User Profile Data
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Retrieve user information from external service</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Function block constructs user ID from input</li>
<li>API block calls GET /users/&#123;id&#125; endpoint</li>
<li>Function block processes and formats user data</li>
<li>Response block returns formatted profile</li>
</ol>
</div>
### Create Support Ticket
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Submit support request to ticketing system</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Agent analyzes user issue and generates ticket data</li>
<li>API block POSTs ticket to support system</li>
<li>Condition block checks if ticket was created successfully</li>
<li>Response block confirms ticket creation with ID</li>
</ol>
</div>
### Payment Processing
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Process payment through Stripe API</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Function block validates payment data</li>
<li>API block creates payment intent via Stripe</li>
<li>Condition block handles payment success/failure</li>
<li>Function block updates order status in database</li>
</ol>
</div>
## Best Practices
- **Use environment variables for sensitive data**: Don't hardcode API keys or credentials
- **Handle errors gracefully**: Connect error handling logic for failed requests
- **Validate responses**: Check status codes and response formats before processing data
- **Respect rate limits**: Be mindful of API rate limits and implement appropriate throttling

View File

@@ -1,236 +0,0 @@
---
title: Condition
description: Create conditional logic and branching in your workflows
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion'
import { ThemeImage } from '@/components/ui/theme-image'
The Condition block allows you to branch your workflow execution path based on boolean expressions. It evaluates conditions and routes the workflow accordingly, enabling you to create dynamic, responsive workflows with different execution paths.
<ThemeImage
lightSrc="/static/light/condition-light.png"
darkSrc="/static/dark/condition-dark.png"
alt="Condition Block"
width={350}
height={175}
/>
<Callout>
Condition blocks enable deterministic decision-making without requiring an LLM, making them ideal
for straightforward branching logic.
</Callout>
## Overview
The Condition block enables you to:
<Steps>
<Step>
<strong>Create branching logic</strong>: Route workflows based on boolean expressions
</Step>
<Step>
<strong>Make data-driven decisions</strong>: Evaluate conditions using previous block outputs
</Step>
<Step>
<strong>Handle multiple scenarios</strong>: Define multiple conditions with different paths
</Step>
<Step>
<strong>Provide deterministic routing</strong>: Make decisions without requiring an LLM
</Step>
</Steps>
## How It Works
The Condition block operates through a sequential evaluation process:
1. **Evaluate Expression** - Processes the JavaScript/TypeScript boolean expression using current workflow data
2. **Determine Result** - Returns true or false based on the expression evaluation
3. **Route Workflow** - Directs execution to the appropriate destination block based on the result
4. **Provide Context** - Generates metadata about the decision for debugging and monitoring
## Configuration Options
### Conditions
Define one or more conditions that will be evaluated. Each condition includes:
- **Expression**: A JavaScript/TypeScript expression that evaluates to true or false
- **Path**: The destination block to route to if the condition is true
- **Description**: Optional explanation of what the condition checks
You can create multiple conditions that are evaluated in order, with the first matching condition determining the execution path.
### Condition Expression Format
Conditions use JavaScript syntax and can reference input values from previous blocks.
<Tabs items={['Score Threshold', 'Text Analysis', 'Multiple Conditions']}>
<Tab>
```javascript
// Check if a score is above a threshold
<agent.score> > 75
```
</Tab>
<Tab>
```javascript
// Check if a text contains specific keywords
<agent.text>.includes('urgent') || <agent.text>.includes('emergency')
```
</Tab>
<Tab>
```javascript
// Check multiple conditions
<agent.age> >= 18 && <agent.country> === 'US'
```
</Tab>
</Tabs>
### Accessing Results
After a condition evaluates, you can access its outputs:
- **`<condition.result>`**: Boolean result of the condition evaluation
- **`<condition.matched_condition>`**: ID of the condition that was matched
- **`<condition.content>`**: Description of the evaluation result
- **`<condition.path>`**: Details of the chosen routing destination
## Advanced Features
### Complex Expressions
Use JavaScript operators and functions in conditions:
```javascript
// String operations
<user.email>.endsWith('@company.com')
// Array operations
<api.tags>.includes('urgent')
// Mathematical operations
<agent.confidence> * 100 > 85
// Date comparisons
new Date(<api.created_at>) > new Date('2024-01-01')
```
### Multiple Condition Evaluation
Conditions are evaluated in order until one matches:
```javascript
// Condition 1: Check for high priority
<ticket.priority> === 'high'
// Condition 2: Check for urgent keywords
<ticket.subject>.toLowerCase().includes('urgent')
// Condition 3: Default fallback
true
```
### Error Handling
Conditions automatically handle:
- Undefined or null values with safe evaluation
- Type mismatches with appropriate fallbacks
- Invalid expressions with error logging
- Missing variables with default values
## Inputs and Outputs
<Tabs items={['Configuration', 'Variables', 'Results']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Conditions</strong>: Array of boolean expressions to evaluate
</li>
<li>
<strong>Expressions</strong>: JavaScript/TypeScript conditions using block outputs
</li>
<li>
<strong>Routing Paths</strong>: Destination blocks for each condition result
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>condition.result</strong>: Boolean result of condition evaluation
</li>
<li>
<strong>condition.matched_condition</strong>: ID of the matched condition
</li>
<li>
<strong>condition.content</strong>: Description of evaluation result
</li>
<li>
<strong>condition.path</strong>: Details of chosen routing destination
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Boolean Result</strong>: Primary condition evaluation outcome
</li>
<li>
<strong>Routing Information</strong>: Path selection and condition details
</li>
<li>
<strong>Access</strong>: Available in blocks after the condition
</li>
</ul>
</Tab>
</Tabs>
## Example Use Cases
### Customer Support Routing
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Route support tickets based on priority</h4>
<ol className="list-decimal pl-5 text-sm">
<li>API block fetches support ticket data</li>
<li>Condition checks if `<api.priority>` equals 'high'</li>
<li>High priority tickets → Agent with escalation tools</li>
<li>Normal priority tickets → Standard support agent</li>
</ol>
</div>
### Content Moderation
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Filter content based on analysis results</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Agent analyzes user-generated content</li>
<li>Condition checks if `<agent.toxicity_score>` > 0.7</li>
<li>Toxic content → Moderation workflow</li>
<li>Clean content → Publishing workflow</li>
</ol>
</div>
### User Onboarding Flow
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Personalize onboarding based on user type</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Function block processes user registration data</li>
<li>Condition checks if `<user.account_type>` === 'enterprise'</li>
<li>Enterprise users → Advanced setup workflow</li>
<li>Individual users → Simple onboarding workflow</li>
</ol>
</div>
## Best Practices
- **Order conditions correctly**: Place more specific conditions before general ones to ensure specific logic takes precedence over fallbacks
- **Include a default condition**: Add a catch-all condition (`true`) as the last condition to handle unmatched cases and prevent workflow execution from getting stuck
- **Keep expressions simple**: Use clear, straightforward boolean expressions for better readability and easier debugging
- **Document your conditions**: Add descriptions to explain the purpose of each condition for better team collaboration and maintenance
- **Test edge cases**: Verify conditions handle boundary values correctly by testing with values at the edges of your condition ranges

View File

@@ -1,131 +0,0 @@
---
title: Evaluator
description: Assess content quality using customizable evaluation metrics
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { ThemeImage } from '@/components/ui/theme-image'
import { Video } from '@/components/ui/video'
The Evaluator block uses AI to score and assess content quality based on metrics you define. Perfect for quality control, A/B testing, and ensuring your AI outputs meet specific standards.
<ThemeImage
lightSrc="/static/light/evaluator-light.png"
darkSrc="/static/dark/evaluator-dark.png"
alt="Evaluator Block Configuration"
width={350}
height={175}
/>
## What You Can Evaluate
**AI-Generated Content**: Score chatbot responses, generated articles, or marketing copy
**User Input**: Evaluate customer feedback, survey responses, or form submissions
**Content Quality**: Assess clarity, accuracy, relevance, and tone
**Performance Metrics**: Track improvements over time with consistent scoring
**A/B Testing**: Compare different approaches with objective metrics
## Configuration Options
### Evaluation Metrics
Define custom metrics to evaluate content against. Each metric includes:
- **Name**: A short identifier for the metric
- **Description**: A detailed explanation of what the metric measures
- **Range**: The numeric range for scoring (e.g., 1-5, 0-10)
Example metrics:
```
Accuracy (1-5): How factually accurate is the content?
Clarity (1-5): How clear and understandable is the content?
Relevance (1-5): How relevant is the content to the original query?
```
### Content
The content to be evaluated. This can be:
- Directly provided in the block configuration
- Connected from another block's output (typically an Agent block)
- Dynamically generated during workflow execution
### Model Selection
Choose an AI model to perform the evaluation:
**OpenAI**: GPT-4o, o1, o3, o4-mini, gpt-4.1
**Anthropic**: Claude 3.7 Sonnet
**Google**: Gemini 2.5 Pro, Gemini 2.0 Flash
**Other Providers**: Groq, Cerebras, xAI, DeepSeek
**Local Models**: Any model running on Ollama
<div className="w-full max-w-2xl mx-auto overflow-hidden rounded-lg">
<Video src="models.mp4" />
</div>
**Recommendation**: Use models with strong reasoning capabilities like GPT-4o or Claude 3.7 Sonnet for more accurate evaluations.
### API Key
Your API key for the selected LLM provider. This is securely stored and used for authentication.
## How It Works
1. The Evaluator block takes the provided content and your custom metrics
2. It generates a specialized prompt that instructs the LLM to evaluate the content
3. The prompt includes clear guidelines on how to score each metric
4. The LLM evaluates the content and returns numeric scores for each metric
5. The Evaluator block formats these scores as structured output for use in your workflow
## Inputs and Outputs
### Inputs
- **Content**: The text or structured data to evaluate
- **Metrics**: Custom evaluation criteria with scoring ranges
- **Model Settings**: LLM provider and parameters
### Outputs
- **Content**: A summary of the evaluation
- **Model**: The model used for evaluation
- **Tokens**: Usage statistics
- **Metric Scores**: Numeric scores for each defined metric
## Example Usage
Here's an example of how an Evaluator block might be configured for assessing customer service responses:
```yaml
# Example Evaluator Configuration
metrics:
- name: Empathy
description: How well does the response acknowledge and address the customer's emotional state?
range:
min: 1
max: 5
- name: Solution
description: How effectively does the response solve the customer's problem?
range:
min: 1
max: 5
- name: Clarity
description: How clear and easy to understand is the response?
range:
min: 1
max: 5
model: Anthropic/claude-3-opus
```
## Best Practices
- **Use specific metric descriptions**: Clearly define what each metric measures to get more accurate evaluations
- **Choose appropriate ranges**: Select scoring ranges that provide enough granularity without being overly complex
- **Connect with Agent blocks**: Use Evaluator blocks to assess Agent block outputs and create feedback loops
- **Use consistent metrics**: For comparative analysis, maintain consistent metrics across similar evaluations
- **Combine multiple metrics**: Use several metrics to get a comprehensive evaluation

View File

@@ -1,313 +0,0 @@
---
title: Function
description: Execute custom JavaScript or TypeScript code in your workflows
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { ThemeImage } from '@/components/ui/theme-image'
The Function block lets you run custom JavaScript or TypeScript code in your workflow. Use it to transform data, perform calculations, or implement custom logic that isn't available in other blocks.
<ThemeImage
lightSrc="/static/light/function-light.png"
darkSrc="/static/dark/function-dark.png"
alt="Function Block with Code Editor"
width={350}
height={175}
/>
## Overview
The Function block enables you to:
<Steps>
<Step>
<strong>Transform data</strong>: Convert formats, parse text, manipulate arrays and objects
</Step>
<Step>
<strong>Perform calculations</strong>: Math operations, statistics, financial calculations
</Step>
<Step>
<strong>Implement custom logic</strong>: Complex conditionals, loops, and algorithms
</Step>
<Step>
<strong>Process external data</strong>: Parse responses, format requests, handle authentication
</Step>
</Steps>
## How It Works
The Function block runs your code in a secure, isolated environment:
1. **Receive Input**: Access data from previous blocks via the `input` object
2. **Execute Code**: Run your JavaScript/TypeScript code
3. **Return Results**: Use `return` to pass data to the next block
4. **Handle Errors**: Built-in error handling and logging
## Configuration Options
### Code Editor
Write your JavaScript/TypeScript code in a full-featured editor with:
- Syntax highlighting and error checking
- Line numbers and bracket matching
- Support for modern JavaScript features
- Native support for `fetch`
### Accessing Input Data
Use the `input` object to access data from previous blocks:
```javascript
// Access data from connected blocks
const userData = <agent.userData>;
const orderData = <agent.orderData>;
// Access specific fields
const customerName = <agent.customer.name>;
const total = <agent.order.total>;
```
### Common Examples
**Data Transformation**:
```javascript
// Convert and format data
const formatted = {
name: <agent.user.firstName> + ' ' + <agent.user.lastName>,
email: <agent.user.email>.toLowerCase(),
joinDate: new Date(<agent.user.created>).toLocaleDateString()
};
return formatted;
```
**Calculations**:
```javascript
// Calculate discounts and totals
const subtotal = <agent.items>.reduce((sum, item) => sum + item.price, 0);
const discount = subtotal > 100 ? 0.1 : 0;
const total = subtotal * (1 - discount);
return { subtotal, discount, total };
```
**Data Validation**:
```javascript
// Validate email format
const email = <agent.email>;
const isValid = /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
if (!isValid) {
throw new Error('Invalid email format');
}
return { email, isValid };
```
### Accessing Results
After a function executes, you can access its outputs:
- **`<function.result>`**: The value returned from your function
- **`<function.stdout>`**: Any console.log() output from your code
## Advanced Features
### Async/Await Support
Use async functions for complex operations:
```javascript
// Async function example
const processData = async () => {
const data = <api.response>;
// Process data with async operations
const processed = await Promise.all(
data.map(async (item) => {
return {
id: item.id,
processed: true,
timestamp: new Date().toISOString()
};
})
);
return processed;
};
return await processData();
```
### Error Handling
Implement robust error handling:
```javascript
try {
const result = <api.data>;
if (!result || !result.length) {
throw new Error('No data received');
}
return result.map(item => ({
id: item.id,
name: item.name.trim(),
valid: true
}));
} catch (error) {
console.error('Processing failed:', error.message);
return { error: error.message, valid: false };
}
```
### Performance Optimization
Optimize for large datasets:
```javascript
// Efficient data processing
const data = <api.large_dataset>;
// Use efficient array methods
const processed = data
.filter(item => item.status === 'active')
.map(item => ({
id: item.id,
summary: item.description.substring(0, 100)
}))
.slice(0, 1000); // Limit results
return processed;
```
## Security and Limitations
<Callout type="warning">
Functions run in a secure environment with these restrictions:
- **Execution timeout**: 30 seconds maximum to prevent infinite loops
- **Memory limits**: Limited memory to prevent resource exhaustion
- **No network access**: Cannot make HTTP requests (use API blocks instead)
- **Limited APIs**: Only safe JavaScript APIs are available
</Callout>
## Inputs and Outputs
<Tabs items={['Configuration', 'Variables', 'Results']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Code</strong>: Your JavaScript/TypeScript code to execute
</li>
<li>
<strong>Timeout</strong>: Maximum execution time (defaults to 30 seconds)
</li>
<li>
<strong>Input Data</strong>: All connected block outputs available via variables
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>function.result</strong>: The value returned from your function
</li>
<li>
<strong>function.stdout</strong>: Console.log() output from your code
</li>
<li>
<strong>function.error</strong>: Error details if function failed
</li>
<li>
<strong>function.execution_time</strong>: Time taken to execute
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Function Result</strong>: Primary output from your code
</li>
<li>
<strong>Debug Information</strong>: Logs and execution details
</li>
<li>
<strong>Access</strong>: Available in blocks after the function
</li>
</ul>
</Tab>
</Tabs>
## Example Use Cases
### Data Processing Pipeline
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Transform API response into structured data</h4>
<ol className="list-decimal pl-5 text-sm">
<li>API block fetches raw customer data</li>
<li>Function block processes and validates data</li>
<li>Function block calculates derived metrics</li>
<li>Response block returns formatted results</li>
</ol>
</div>
### Business Logic Implementation
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Calculate loyalty scores and tiers</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Agent retrieves customer purchase history</li>
<li>Function block calculates loyalty metrics</li>
<li>Function block determines customer tier</li>
<li>Condition block routes based on tier level</li>
</ol>
</div>
### Data Validation and Sanitization
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Validate and clean user input</h4>
<ol className="list-decimal pl-5 text-sm">
<li>User input received from form submission</li>
<li>Function block validates email format and phone numbers</li>
<li>Function block sanitizes and normalizes data</li>
<li>API block saves validated data to database</li>
</ol>
</div>
### Example: Loyalty Score Calculator
```javascript title="loyalty-calculator.js"
// Process customer data and calculate loyalty score
const { purchaseHistory, accountAge, supportTickets } = <agent>;
// Calculate metrics
const totalSpent = purchaseHistory.reduce((sum, purchase) => sum + purchase.amount, 0);
const purchaseFrequency = purchaseHistory.length / (accountAge / 365);
const ticketRatio = supportTickets.resolved / supportTickets.total;
// Calculate loyalty score (0-100)
const spendScore = Math.min(totalSpent / 1000 * 30, 30);
const frequencyScore = Math.min(purchaseFrequency * 20, 40);
const supportScore = ticketRatio * 30;
const loyaltyScore = Math.round(spendScore + frequencyScore + supportScore);
return {
customer: <agent.name>,
loyaltyScore,
loyaltyTier: loyaltyScore >= 80 ? "Platinum" : loyaltyScore >= 60 ? "Gold" : "Silver",
metrics: { spendScore, frequencyScore, supportScore }
};
```
## Best Practices
- **Keep functions focused**: Write functions that do one thing well to improve maintainability and debugging
- **Handle errors gracefully**: Use try/catch blocks to handle potential errors and provide meaningful error messages
- **Test edge cases**: Ensure your code handles unusual inputs, null values, and boundary conditions correctly
- **Optimize for performance**: Be mindful of computational complexity and memory usage for large datasets
- **Use console.log() for debugging**: Leverage stdout output to debug and monitor function execution

View File

@@ -1,129 +0,0 @@
---
title: Blocks
description: The building components of your AI workflows
---
import { Card, Cards } from 'fumadocs-ui/components/card'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { BlockTypes } from '@/components/ui/block-types'
import { Video } from '@/components/ui/video'
Blocks are the building components you connect together to create AI workflows. Think of them as specialized modules that each handle a specific task—from chatting with AI models to making API calls or processing data.
<div className="w-full max-w-2xl mx-auto overflow-hidden rounded-lg">
<Video src="connections.mp4" />
</div>
## Core Block Types
Sim provides seven core block types that handle the essential functions of AI workflows:
### Processing Blocks
- **[Agent](/blocks/agent)** - Chat with AI models (OpenAI, Anthropic, Google, local models)
- **[Function](/blocks/function)** - Run custom JavaScript/TypeScript code
- **[API](/blocks/api)** - Connect to external services via HTTP requests
### Logic Blocks
- **[Condition](/blocks/condition)** - Branch workflow paths based on boolean expressions
- **[Router](/blocks/router)** - Use AI to intelligently route requests to different paths
- **[Evaluator](/blocks/evaluator)** - Score and assess content quality using AI
### Output Blocks
- **[Response](/blocks/response)** - Format and return final results from your workflow
<BlockTypes />
## How Blocks Work
Each block has three main components:
**Inputs**: Data coming into the block from other blocks or user input
**Configuration**: Settings that control how the block behaves
**Outputs**: Data the block produces for other blocks to use
<Steps>
<Step>
<strong>Receive Input</strong>: Block receives data from connected blocks or user input
</Step>
<Step>
<strong>Process</strong>: Block processes the input according to its configuration
</Step>
<Step>
<strong>Output Results</strong>: Block produces output data for the next blocks in the workflow
</Step>
</Steps>
## Connecting Blocks
You create workflows by connecting blocks together. The output of one block becomes the input of another:
- **Drag to connect**: Drag from an output port to an input port
- **Multiple connections**: One output can connect to multiple inputs
- **Branching paths**: Some blocks can route to different paths based on conditions
<div className="w-full max-w-2xl mx-auto overflow-hidden rounded-lg">
<Video src="connections.mp4" />
</div>
## Common Patterns
### Sequential Processing
Connect blocks in a chain where each block processes the output of the previous one:
```
User Input → Agent → Function → Response
```
### Conditional Branching
Use Condition or Router blocks to create different paths:
```
User Input → Router → Agent A (for questions)
→ Agent B (for commands)
```
### Quality Control
Use Evaluator blocks to assess and filter outputs:
```
Agent → Evaluator → Condition → Response (if good)
→ Agent (retry if bad)
```
## Block Configuration
Each block type has specific configuration options:
**All Blocks**:
- Input/output connections
- Error handling behavior
- Execution timeout settings
**AI Blocks** (Agent, Router, Evaluator):
- Model selection (OpenAI, Anthropic, Google, local)
- API keys and authentication
- Temperature and other model parameters
- System prompts and instructions
**Logic Blocks** (Condition, Function):
- Custom expressions or code
- Variable references
- Execution environment settings
**Integration Blocks** (API, Response):
- Endpoint configuration
- Headers and authentication
- Request/response formatting
<Cards>
<Card title="Agent Block" href="/blocks/agent">
Connect to AI models and create intelligent responses
</Card>
<Card title="Function Block" href="/blocks/function">
Run custom code to process and transform data
</Card>
<Card title="API Block" href="/blocks/api">
Integrate with external services and APIs
</Card>
<Card title="Condition Block" href="/blocks/condition">
Create branching logic based on data evaluation
</Card>
</Cards>

View File

@@ -1,175 +0,0 @@
---
title: Loop
description: Create iterative workflows with loops that execute blocks repeatedly
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { ThemeImage } from '@/components/ui/theme-image'
The Loop block is a container block in Sim that allows you to execute a group of blocks repeatedly. Loops enable iterative processing in your workflows.
<ThemeImage
lightSrc="/static/light/loop-light.png"
darkSrc="/static/dark/loop-dark.png"
alt="Loop Block"
width={500}
height={300}
/>
<Callout type="info">
Loop blocks are container nodes that can hold other blocks inside them. The blocks inside a loop will execute multiple times based on your configuration.
</Callout>
## Overview
The Loop block enables you to:
<Steps>
<Step>
<strong>Iterate over collections</strong>: Process arrays or objects one item at a time
</Step>
<Step>
<strong>Repeat operations</strong>: Execute blocks a fixed number of times
</Step>
</Steps>
## Configuration Options
### Loop Type
Choose between two types of loops:
<Tabs items={['For Loop', 'ForEach Loop']}>
<Tab>
A numeric loop that executes a fixed number of times. Use this when you need to repeat an operation a specific number of times.
```
Example: Run 5 times
- Iteration 1
- Iteration 2
- Iteration 3
- Iteration 4
- Iteration 5
```
</Tab>
<Tab>
A collection-based loop that iterates over each item in an array or object. Use this when you need to process a collection of items.
```
Example: Process ["apple", "banana", "orange"]
- Iteration 1: Process "apple"
- Iteration 2: Process "banana"
- Iteration 3: Process "orange"
```
</Tab>
</Tabs>
## How to Use Loops
### Creating a Loop
1. Drag a Loop block from the toolbar onto your canvas
2. Configure the loop type and parameters
3. Drag other blocks inside the loop container
4. Connect the blocks as needed
### Accessing Results
After a loop completes, you can access aggregated results:
- **`<loop.results>`**: Array of results from all loop iterations
## Example Use Cases
### Processing API Results
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Process multiple customer records</h4>
<ol className="list-decimal pl-5 text-sm">
<li>API block fetches customer list</li>
<li>ForEach loop iterates over each customer</li>
<li>Inside loop: Agent analyzes customer data</li>
<li>Inside loop: Function stores analysis results</li>
</ol>
</div>
### Iterative Content Generation
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Generate multiple variations</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Set For loop to 5 iterations</li>
<li>Inside loop: Agent generates content variation</li>
<li>Inside loop: Evaluator scores the content</li>
<li>After loop: Function selects best variation</li>
</ol>
</div>
## Advanced Features
### Limitations
<Callout type="warning">
Container blocks (Loops and Parallels) cannot be nested inside each other. This means:
- You cannot place a Loop block inside another Loop block
- You cannot place a Parallel block inside a Loop block
- You cannot place any container block inside another container block
If you need multi-dimensional iteration, consider restructuring your workflow to use sequential loops or process data in stages.
</Callout>
<Callout type="info">
Loops execute sequentially, not in parallel. If you need concurrent execution, use the Parallel block instead.
</Callout>
## Inputs and Outputs
<Tabs items={['Configuration', 'Variables', 'Results']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Loop Type</strong>: Choose between 'for' or 'forEach'
</li>
<li>
<strong>Iterations</strong>: Number of times to execute (for loops)
</li>
<li>
<strong>Collection</strong>: Array or object to iterate over (forEach loops)
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>loop.currentItem</strong>: Current item being processed
</li>
<li>
<strong>loop.index</strong>: Current iteration number (0-based)
</li>
<li>
<strong>loop.items</strong>: Full collection (forEach loops)
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>loop.results</strong>: Array of all iteration results
</li>
<li>
<strong>Structure</strong>: Results maintain iteration order
</li>
<li>
<strong>Access</strong>: Available in blocks after the loop
</li>
</ul>
</Tab>
</Tabs>
## Best Practices
- **Set reasonable limits**: Keep iteration counts reasonable to avoid long execution times
- **Use ForEach for collections**: When processing arrays or objects, use ForEach instead of For loops
- **Handle errors gracefully**: Consider adding error handling inside loops for robust workflows

View File

@@ -1,15 +0,0 @@
{
"title": "Blocks",
"pages": [
"agent",
"api",
"condition",
"evaluator",
"function",
"loop",
"parallel",
"response",
"router",
"workflow"
]
}

View File

@@ -1,210 +0,0 @@
---
title: Parallel
description: Execute multiple blocks concurrently for faster workflow processing
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { ThemeImage } from '@/components/ui/theme-image'
The Parallel block is a container block in Sim that allows you to execute multiple instances of blocks concurrently.
<ThemeImage
lightSrc="/static/light/parallel-light.png"
darkSrc="/static/dark/parallel-dark.png"
alt="Parallel Block"
width={500}
height={300}
/>
<Callout type="info">
Parallel blocks are container nodes that execute their contents multiple times simultaneously, unlike loops which execute sequentially.
</Callout>
## Overview
The Parallel block enables you to:
<Steps>
<Step>
<strong>Distribute work</strong>: Process multiple items concurrently
</Step>
<Step>
<strong>Speed up execution</strong>: Run independent operations simultaneously
</Step>
<Step>
<strong>Handle bulk operations</strong>: Process large datasets efficiently
</Step>
<Step>
<strong>Aggregate results</strong>: Collect outputs from all parallel executions
</Step>
</Steps>
## Configuration Options
### Parallel Type
Choose between two types of parallel execution:
<Tabs items={['Count-based', 'Collection-based']}>
<Tab>
Execute a fixed number of parallel instances. Use this when you need to run the same operation multiple times concurrently.
```
Example: Run 5 parallel instances
- Instance 1 ┐
- Instance 2 ├─ All execute simultaneously
- Instance 3 │
- Instance 4 │
- Instance 5 ┘
```
</Tab>
<Tab>
Distribute a collection across parallel instances. Each instance processes one item from the collection simultaneously.
```
Example: Process ["task1", "task2", "task3"] in parallel
- Instance 1: Process "task1" ┐
- Instance 2: Process "task2" ├─ All execute simultaneously
- Instance 3: Process "task3" ┘
```
</Tab>
</Tabs>
## How to Use Parallel Blocks
### Creating a Parallel Block
1. Drag a Parallel block from the toolbar onto your canvas
2. Configure the parallel type and parameters
3. Drag a single block inside the parallel container
4. Connect the block as needed
### Accessing Results
After a parallel block completes, you can access aggregated results:
- **`<parallel.results>`**: Array of results from all parallel instances
## Example Use Cases
### Batch API Processing
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Process multiple API calls simultaneously</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Parallel block with collection of API endpoints</li>
<li>Inside parallel: API block calls each endpoint</li>
<li>After parallel: Process all responses together</li>
</ol>
</div>
### Multi-Model AI Processing
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Get responses from multiple AI models</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Count-based parallel set to 3 instances</li>
<li>Inside parallel: Agent configured with different model per instance</li>
<li>After parallel: Compare and select best response</li>
</ol>
</div>
## Advanced Features
### Result Aggregation
Results from all parallel instances are automatically collected:
```javascript
// In a Function block after the parallel
const allResults = input.parallel.results;
// Returns: [result1, result2, result3, ...]
```
### Instance Isolation
Each parallel instance runs independently:
- Separate variable scopes
- No shared state between instances
- Failures in one instance don't affect others
### Limitations
<Callout type="warning">
Container blocks (Loops and Parallels) cannot be nested inside each other. This means:
- You cannot place a Loop block inside a Parallel block
- You cannot place another Parallel block inside a Parallel block
- You cannot place any container block inside another container block
</Callout>
<Callout type="warning">
Parallel blocks can only contain a single block. You cannot have multiple blocks connected to each other inside a parallel - only the first block would execute in that case.
</Callout>
<Callout type="info">
While parallel execution is faster, be mindful of:
- API rate limits when making concurrent requests
- Memory usage with large datasets
- Maximum of 20 concurrent instances to prevent resource exhaustion
</Callout>
## Parallel vs Loop
Understanding when to use each:
| Feature | Parallel | Loop |
|---------|----------|------|
| Execution | Concurrent | Sequential |
| Speed | Faster for independent operations | Slower but ordered |
| Order | No guaranteed order | Maintains order |
| Use case | Independent operations | Dependent operations |
| Resource usage | Higher | Lower |
## Inputs and Outputs
<Tabs items={['Configuration', 'Variables', 'Results']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Parallel Type</strong>: Choose between 'count' or 'collection'
</li>
<li>
<strong>Count</strong>: Number of instances to run (count-based)
</li>
<li>
<strong>Collection</strong>: Array or object to distribute (collection-based)
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>parallel.currentItem</strong>: Item for this instance
</li>
<li>
<strong>parallel.index</strong>: Instance number (0-based)
</li>
<li>
<strong>parallel.items</strong>: Full collection (collection-based)
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>parallel.results</strong>: Array of all instance results
</li>
<li>
<strong>Access</strong>: Available in blocks after the parallel
</li>
</ul>
</Tab>
</Tabs>
## Best Practices
- **Independent operations only**: Ensure operations don't depend on each other
- **Handle rate limits**: Add delays or throttling for API-heavy workflows
- **Error handling**: Each instance should handle its own errors gracefully

View File

@@ -1,186 +0,0 @@
---
title: Response
description: Send a structured response back to API calls
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { ThemeImage } from '@/components/ui/theme-image'
The Response block is the final step in your workflow that formats and returns data to whoever called your workflow. It's like the "return" statement for your entire workflow—it packages up results and sends them back.
<ThemeImage
lightSrc="/static/light/response-light.png"
darkSrc="/static/dark/response-dark.png"
alt="Response Block Configuration"
width={350}
height={175}
/>
<Callout type="info">
Response blocks are terminal blocks - they end the workflow execution and cannot connect to other blocks.
</Callout>
## When You Need Response Blocks
**API Endpoints**: When your workflow is called via API, Response blocks format the return data
**Webhooks**: Return confirmation or data back to the calling system
**Testing**: See formatted results when testing your workflow
**Data Export**: Structure data for external systems or reports
## Two Ways to Build Responses
### Builder Mode (Recommended)
Visual interface for building response structure:
- Drag and drop fields
- Reference workflow variables easily
- Visual preview of response structure
### Editor Mode (Advanced)
Write JSON directly:
- Full control over response format
- Support for complex nested structures
- Use `<variable.name>` syntax for dynamic values
## Configuration Options
### Response Data
The response data is the main content that will be sent back to the API caller. This should be formatted as JSON and can include:
- Static values
- Dynamic references to workflow variables using the `<variable.name>` syntax
- Nested objects and arrays
- Any valid JSON structure
### Status Code
Set the HTTP status code for the response. Common status codes include:
<Tabs items={['Success (2xx)', 'Client Error (4xx)', 'Server Error (5xx)']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li><strong>200</strong>: OK - Standard success response</li>
<li><strong>201</strong>: Created - Resource successfully created</li>
<li><strong>204</strong>: No Content - Success with no response body</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li><strong>400</strong>: Bad Request - Invalid request parameters</li>
<li><strong>401</strong>: Unauthorized - Authentication required</li>
<li><strong>404</strong>: Not Found - Resource doesn't exist</li>
<li><strong>422</strong>: Unprocessable Entity - Validation errors</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li><strong>500</strong>: Internal Server Error - Server-side error</li>
<li><strong>502</strong>: Bad Gateway - External service error</li>
<li><strong>503</strong>: Service Unavailable - Service temporarily down</li>
</ul>
</Tab>
</Tabs>
<p className="mt-4 text-sm text-gray-600 dark:text-gray-400">
Default status code is 200 if not specified.
</p>
### Response Headers
Configure additional HTTP headers to include in the response.
Headers are configured as key-value pairs:
| Key | Value |
|-----|-------|
| Content-Type | application/json |
| Cache-Control | no-cache |
| X-API-Version | 1.0 |
## Inputs and Outputs
<Tabs items={['Inputs', 'Outputs']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>data</strong> (JSON, optional): The JSON data to send in the response body
</li>
<li>
<strong>status</strong> (number, optional): HTTP status code (default: 200)
</li>
<li>
<strong>headers</strong> (JSON, optional): Additional response headers
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li><strong>data</strong>: The response body data</li>
<li><strong>status</strong>: HTTP status code</li>
<li><strong>headers</strong>: Response headers</li>
</ul>
</Tab>
</Tabs>
## Variable References
Use the `<variable.name>` syntax to dynamically insert workflow variables into your response:
```json
{
"user": {
"id": "<variable.userId>",
"name": "<variable.userName>",
"email": "<variable.userEmail>"
},
"query": "<variable.searchQuery>",
"results": "<variable.searchResults>",
"totalFound": "<variable.resultCount>",
"processingTime": "<variable.executionTime>ms"
}
```
<Callout type="warning">
Variable names are case-sensitive and must match exactly with the variables available in your workflow.
</Callout>
## Example Usage
Here's an example of how a Response block might be configured for a user search API:
```yaml
data: |
{
"success": true,
"data": {
"users": "<variable.searchResults>",
"pagination": {
"page": "<variable.currentPage>",
"limit": "<variable.pageSize>",
"total": "<variable.totalUsers>"
}
},
"query": {
"searchTerm": "<variable.searchTerm>",
"filters": "<variable.appliedFilters>"
},
"timestamp": "<variable.timestamp>"
}
status: 200
headers:
- key: X-Total-Count
value: <variable.totalUsers>
- key: Cache-Control
value: public, max-age=300
```
## Best Practices
- **Use meaningful status codes**: Choose appropriate HTTP status codes that accurately reflect the outcome of the workflow
- **Structure your responses consistently**: Maintain a consistent JSON structure across all your API endpoints for better developer experience
- **Include relevant metadata**: Add timestamps and version information to help with debugging and monitoring
- **Handle errors gracefully**: Use conditional logic in your workflow to set appropriate error responses with descriptive messages
- **Validate variable references**: Ensure all referenced variables exist and contain the expected data types before the Response block executes

View File

@@ -1,259 +0,0 @@
---
title: Router
description: Route workflow execution based on specific conditions or logic
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion'
import { ThemeImage } from '@/components/ui/theme-image'
import { Video } from '@/components/ui/video'
The Router block uses AI to intelligently decide which path your workflow should take next. Unlike Condition blocks that use simple rules, Router blocks can understand context and make smart routing decisions based on content analysis.
<ThemeImage
lightSrc="/static/light/router-light.png"
darkSrc="/static/dark/router-dark.png"
alt="Router Block with Multiple Paths"
width={350}
height={175}
/>
## Overview
The Router block enables you to:
<Steps>
<Step>
<strong>Intelligent content routing</strong>: Use AI to understand intent and context
</Step>
<Step>
<strong>Dynamic path selection</strong>: Route workflows based on unstructured content analysis
</Step>
<Step>
<strong>Context-aware decisions</strong>: Make smart routing choices beyond simple rules
</Step>
<Step>
<strong>Multi-path management</strong>: Handle complex workflows with multiple potential destinations
</Step>
</Steps>
## Router vs Condition Blocks
<Accordions>
<Accordion title="When to Use Router">
- AI-powered content analysis needed
- Unstructured or varying content types
- Intent-based routing (e.g., "route support tickets to departments")
- Context-aware decision making required
</Accordion>
<Accordion title="When to Use Condition">
- Simple, rule-based decisions
- Structured data or numeric comparisons
- Fast, deterministic routing needed
- Boolean logic sufficient
</Accordion>
</Accordions>
## How It Works
The Router block:
<Steps>
<Step>
<strong>Analyze content</strong>: Uses an LLM to understand input content and context
</Step>
<Step>
<strong>Evaluate targets</strong>: Compares content against available destination blocks
</Step>
<Step>
<strong>Select destination</strong>: Identifies the most appropriate path based on intent
</Step>
<Step>
<strong>Route execution</strong>: Directs workflow to the selected block
</Step>
</Steps>
## Configuration Options
### Content/Prompt
The content or prompt that the Router will analyze to make routing decisions. This can be:
- A direct user query or input
- Output from a previous block
- A system-generated message
### Target Blocks
The possible destination blocks that the Router can select from. The Router will automatically detect connected blocks, but you can also:
- Customize the descriptions of target blocks to improve routing accuracy
- Specify routing criteria for each target block
- Exclude certain blocks from being considered as routing targets
### Model Selection
Choose an AI model to power the routing decision:
**OpenAI**: GPT-4o, o1, o3, o4-mini, gpt-4.1 \
**Anthropic**: Claude 3.7 Sonnet \
**Google**: Gemini 2.5 Pro, Gemini 2.0 Flash \
**Other Providers**: Groq, Cerebras, xAI, DeepSeek \
**Local Models**: Any model running on Ollama
<div className="w-full max-w-2xl mx-auto overflow-hidden rounded-lg">
<Video src="router-model-dropdown.mp4" />
</div>
**Recommendation**: Use models with strong reasoning capabilities like GPT-4o or Claude 3.7 Sonnet for more accurate routing decisions.
### API Key
Your API key for the selected LLM provider. This is securely stored and used for authentication.
### Accessing Results
After a router makes a decision, you can access its outputs:
- **`<router.content>`**: Summary of the routing decision made
- **`<router.selected_path>`**: Details of the chosen destination block
- **`<router.tokens>`**: Token usage statistics from the LLM
- **`<router.model>`**: The model used for decision-making
## Advanced Features
### Custom Routing Criteria
Define specific criteria for each target block:
```javascript
// Example routing descriptions
Target Block 1: "Technical support issues, API problems, integration questions"
Target Block 2: "Billing inquiries, subscription changes, payment issues"
Target Block 3: "General questions, feedback, feature requests"
```
### Multi-Model Routing
Use different models for different routing scenarios:
```javascript
// Fast routing for simple cases
Model: GPT-4o-mini
Criteria: Simple, common routing patterns
// Complex routing for nuanced decisions
Model: Claude 3.7 Sonnet
Criteria: Complex content analysis required
```
### Fallback Handling
Implement robust fallback mechanisms:
```javascript
// Router configuration
Primary Targets: ["Support", "Sales", "Technical"]
Fallback Target: "General" // Default when no specific match
Confidence Threshold: 0.7 // Minimum confidence for routing
```
## Inputs and Outputs
<Tabs items={['Configuration', 'Variables', 'Results']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Content/Prompt</strong>: Text to analyze for routing decisions
</li>
<li>
<strong>Target Blocks</strong>: Connected blocks as potential destinations
</li>
<li>
<strong>Model</strong>: AI model for routing analysis
</li>
<li>
<strong>API Key</strong>: Authentication for selected LLM provider
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>router.content</strong>: Summary of routing decision
</li>
<li>
<strong>router.selected_path</strong>: Details of chosen destination
</li>
<li>
<strong>router.tokens</strong>: Token usage statistics
</li>
<li>
<strong>router.model</strong>: Model used for decision-making
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Routing Decision</strong>: Primary path selection result
</li>
<li>
<strong>Decision Context</strong>: Analysis summary and reasoning
</li>
<li>
<strong>Access</strong>: Available in blocks after the router
</li>
</ul>
</Tab>
</Tabs>
## Example Use Cases
### Customer Support Triage
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Route support tickets to specialized departments</h4>
<ol className="list-decimal pl-5 text-sm">
<li>User submits support request via form</li>
<li>Router analyzes ticket content and context</li>
<li>Technical issues → Engineering support agent</li>
<li>Billing questions → Finance support agent</li>
</ol>
</div>
### Content Classification
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Classify and route user-generated content</h4>
<ol className="list-decimal pl-5 text-sm">
<li>User submits content or feedback</li>
<li>Router analyzes content type and sentiment</li>
<li>Feature requests → Product team workflow</li>
<li>Bug reports → Technical support workflow</li>
</ol>
</div>
### Lead Qualification
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Route leads based on qualification criteria</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Lead information captured from form</li>
<li>Router analyzes company size, industry, and needs</li>
<li>Enterprise leads → Sales team with custom pricing</li>
<li>SMB leads → Self-service onboarding flow</li>
</ol>
</div>
## Best Practices
- **Provide clear target descriptions**: Help the Router understand when to select each destination with specific, detailed descriptions
- **Use specific routing criteria**: Define clear conditions and examples for each path to improve accuracy
- **Implement fallback paths**: Connect a default destination for when no specific path is appropriate
- **Test with diverse inputs**: Ensure the Router handles various input types, edge cases, and unexpected content
- **Monitor routing performance**: Review routing decisions regularly and refine criteria based on actual usage patterns
- **Choose appropriate models**: Use models with strong reasoning capabilities for complex routing decisions

View File

@@ -1,259 +0,0 @@
---
title: Workflow
description: Execute other workflows as reusable components within your current workflow
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { ThemeImage } from '@/components/ui/theme-image'
The Workflow block allows you to execute other workflows as reusable components within your current workflow. This powerful feature enables modular design, code reuse, and the creation of complex nested workflows that can be composed from smaller, focused workflows.
<ThemeImage
lightSrc="/static/light/workflow-light.png"
darkSrc="/static/dark/workflow-dark.png"
alt="Workflow Block"
width={300}
height={175}
/>
<Callout type="info">
Workflow blocks enable modular design by allowing you to compose complex workflows from smaller, reusable components.
</Callout>
## Overview
The Workflow block serves as a bridge between workflows, enabling you to:
<Steps>
<Step>
<strong>Reuse existing workflows</strong>: Execute previously created workflows as components within new workflows
</Step>
<Step>
<strong>Create modular designs</strong>: Break down complex processes into smaller, manageable workflows
</Step>
<Step>
<strong>Maintain separation of concerns</strong>: Keep different business logic isolated in separate workflows
</Step>
<Step>
<strong>Enable team collaboration</strong>: Share and reuse workflows across different projects and team members
</Step>
</Steps>
## How It Works
The Workflow block:
1. Takes a reference to another workflow in your workspace
2. Passes input data from the current workflow to the child workflow
3. Executes the child workflow in an isolated context
4. Returns the results back to the parent workflow for further processing
## Configuration Options
### Workflow Selection
Choose which workflow to execute from a dropdown list of available workflows in your workspace. The list includes:
- All workflows you have access to in the current workspace
- Workflows shared with you by other team members
- Both enabled and disabled workflows (though only enabled workflows can be executed)
### Input Data
Define the data to pass to the child workflow:
- **Single Variable Input**: Select a variable or block output to pass to the child workflow
- **Variable References**: Use `<variable.name>` to reference workflow variables
- **Block References**: Use `<blockName.field>` to reference outputs from previous blocks
- **Automatic Mapping**: The selected data is automatically available as `start.input` in the child workflow
- **Optional**: The input field is optional - child workflows can run without input data
- **Type Preservation**: Variable types (strings, numbers, objects, etc.) are preserved when passed to the child workflow
### Accessing Results
After a workflow executes, you can access its outputs:
- **`<workflow.response>`**: The complete output from the child workflow
- **`<workflow.name>`**: The name of the executed child workflow
- **`<workflow.success>`**: Boolean indicating successful completion
- **`<workflow.error>`**: Error details if the workflow failed
- **`<workflow.execution_time>`**: Time taken to execute the workflow
### Execution Context
The child workflow executes with:
- Its own isolated execution context
- Access to the same workspace resources (API keys, environment variables)
- Proper workspace membership and permission checks
- Independent logging and monitoring
## Safety and Limitations
To prevent infinite recursion and ensure system stability, the Workflow block includes several safety mechanisms:
<Callout type="warning">
**Cycle Detection**: The system automatically detects and prevents circular dependencies between workflows to avoid infinite loops.
</Callout>
- **Maximum Depth Limit**: Nested workflows are limited to a maximum depth of 10 levels
- **Cycle Detection**: Automatic detection and prevention of circular workflow dependencies
- **Timeout Protection**: Child workflows inherit timeout settings to prevent indefinite execution
- **Resource Limits**: Memory and execution time limits apply to prevent resource exhaustion
## Advanced Features
### Dynamic Workflow Selection
Select workflows dynamically based on runtime conditions:
```javascript
// In a Function block before the Workflow block
const workflowId = <condition.result> ? 'premium-workflow' : 'standard-workflow';
return { selectedWorkflow: workflowId };
```
### Error Handling and Fallbacks
Implement robust error handling for child workflows:
```javascript
// In a Function block after the Workflow block
if (!<workflow.success>) {
console.error('Child workflow failed:', <workflow.error>);
// Implement fallback logic
return { fallback: true, error: <workflow.error> };
}
return <workflow.response>;
```
### Workflow Chaining
Chain multiple workflows together:
```javascript
// Pass output from one workflow to another
Workflow 1 Input: <start.input>
Workflow 2 Input: <workflow1.response>
Workflow 3 Input: <workflow2.response>
```
## Inputs and Outputs
<Tabs items={['Configuration', 'Variables', 'Results']}>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Workflow Selection</strong>: Choose which workflow to execute
</li>
<li>
<strong>Input Data</strong>: Variable or block reference to pass to child workflow
</li>
<li>
<strong>Execution Context</strong>: Isolated environment with workspace resources
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>workflow.response</strong>: Complete output from child workflow
</li>
<li>
<strong>workflow.name</strong>: Name of executed child workflow
</li>
<li>
<strong>workflow.success</strong>: Boolean indicating completion status
</li>
<li>
<strong>workflow.error</strong>: Error details if workflow failed
</li>
<li>
<strong>workflow.execution_time</strong>: Time taken to execute
</li>
</ul>
</Tab>
<Tab>
<ul className="list-disc space-y-2 pl-6">
<li>
<strong>Workflow Response</strong>: Primary output from child workflow
</li>
<li>
<strong>Execution Status</strong>: Success status and error information
</li>
<li>
<strong>Access</strong>: Available in blocks after the workflow
</li>
</ul>
</Tab>
</Tabs>
## Example Use Cases
### Modular Customer Onboarding
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Break down complex onboarding into reusable components</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Main workflow receives customer data</li>
<li>Workflow block executes validation workflow</li>
<li>Workflow block executes account setup workflow</li>
<li>Workflow block executes welcome email workflow</li>
</ol>
</div>
### Microservice Architecture
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Create independent service workflows</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Payment processing workflow handles transactions</li>
<li>Inventory management workflow updates stock</li>
<li>Notification workflow sends confirmations</li>
<li>Main workflow orchestrates all services</li>
</ol>
</div>
### Conditional Processing
<div className="mb-4 rounded-md border p-4">
<h4 className="font-medium">Scenario: Execute different workflows based on conditions</h4>
<ol className="list-decimal pl-5 text-sm">
<li>Condition block evaluates user type</li>
<li>Enterprise users → Complex approval workflow</li>
<li>Standard users → Simple approval workflow</li>
<li>Free users → Basic processing workflow</li>
</ol>
</div>
### Example: Customer Validation Workflow
```javascript title="validation-workflow.js"
// Main workflow passes customer data to validation workflow
const customerData = <start.input>;
// Validation workflow processes the data
const emailValid = /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(customerData.email);
const phoneValid = /^\+?[1-9]\d{1,14}$/.test(customerData.phone);
return {
customer: customerData,
validation: {
email: emailValid,
phone: phoneValid,
overall: emailValid && phoneValid
}
};
```
## Best Practices
- **Keep workflows focused**: Design child workflows to handle specific, well-defined tasks with clear inputs and outputs
- **Minimize nesting depth**: Avoid deeply nested workflow hierarchies for better maintainability and performance
- **Handle errors gracefully**: Implement proper error handling for child workflow failures and provide fallback mechanisms
- **Document dependencies**: Clearly document which workflows depend on others and maintain dependency maps
- **Test independently**: Ensure child workflows can be tested and validated independently from parent workflows
- **Monitor performance**: Be aware that nested workflows can impact overall execution time and resource usage
- **Use semantic naming**: Give workflows descriptive names that clearly indicate their purpose and functionality

View File

@@ -1,190 +0,0 @@
---
title: Accessing Connected Data
description: Techniques for accessing and manipulating data from connected blocks
---
import { Callout } from 'fumadocs-ui/components/callout'
import { File, Files, Folder } from 'fumadocs-ui/components/files'
Once blocks are connected, you can access data from source blocks in destination blocks using connection tags and various data access techniques.
## Basic Data Access
The simplest way to access data is through direct references using connection tags:
<Files>
<File name="Simple Property" annotation="<block.content>" />
<File name="Nested Property" annotation="<block.tokens.total>" />
<File name="Array Element" annotation="<block.items[0].name>" />
<File name="Complex Path" annotation="<block.data.users[2].profile.email>" />
</Files>
## Advanced Data Access Techniques
### Array Access
You can access array elements using square bracket notation:
```javascript
// Access the first item in an array
<block.items[0]>
// Access a specific property of an array item
<block.items[2].name>
// Access the last item in an array (in Function blocks)
const items = input.block.items;
const lastItem = items[items.length - 1];
```
### Object Property Access
Access object properties using dot notation:
```javascript
// Access a simple property
<block.content>
// Access a nested property
<block.data.user.profile.name>
// Access a property with special characters (in Function blocks)
const data = input.block.data;
const specialProp = data['property-with-dashes'];
```
### Dynamic References
Connection references are evaluated at runtime, allowing for dynamic data flow through your workflow:
```javascript
// In a Function block, you can access connected data
const userName = input.userBlock.name;
const orderTotal = input.apiBlock.body.order.total;
// Process the data
const discount = orderTotal > 100 ? 0.1 : 0;
const finalPrice = orderTotal * (1 - discount);
// Return the result
return {
userName,
originalTotal: orderTotal,
discount: discount * 100 + '%',
finalPrice
};
```
## Data Transformation
### Using Function Blocks
Function blocks are the most powerful way to transform data between connections:
```javascript
// Example: Transform API response data
const apiResponse = input.apiBlock.data;
const transformedData = {
users: apiResponse.results.map(user => ({
id: user.id,
fullName: `${user.firstName} ${user.lastName}`,
email: user.email.toLowerCase(),
isActive: user.status === 'active'
})),
totalCount: apiResponse.count,
timestamp: new Date().toISOString()
};
return transformedData;
```
### String Interpolation
You can combine connection tags with static text:
```
Hello, <userBlock.name>! Your order #<orderBlock.id> has been processed.
```
### Conditional Content
In Function blocks, you can create conditional content based on connected data:
```javascript
const user = input.userBlock;
const orderTotal = input.orderBlock.total;
let message = `Thank you for your order, ${user.name}!`;
if (orderTotal > 100) {
message += " You've qualified for free shipping!";
} else {
message += ` Add $${(100 - orderTotal).toFixed(2)} more to qualify for free shipping.`;
}
return { message };
```
## Handling Missing Data
It's important to handle cases where connected data might be missing or null:
<Callout type="warning">
Always validate connected data before using it, especially when accessing nested properties or
array elements.
</Callout>
### Default Values
In Function blocks, you can provide default values for missing data:
```javascript
const userName = input.userBlock?.name || 'Guest'
const items = input.orderBlock?.items || []
const total = input.orderBlock?.total ?? 0
```
### Conditional Checks
Check if data exists before accessing nested properties:
```javascript
let userEmail = 'No email provided'
if (input.userBlock && input.userBlock.contact && input.userBlock.contact.email) {
userEmail = input.userBlock.contact.email
}
```
### Optional Chaining
In Function blocks, use optional chaining to safely access nested properties:
```javascript
const userCity = input.userBlock?.address?.city
const firstItemName = input.orderBlock?.items?.[0]?.name
```
## Debugging Connection Data
When troubleshooting connection issues, these techniques can help:
1. **Log Data**: In Function blocks, use `console.log()` to inspect connected data
2. **Return Full Objects**: Return the full input object to see all available data
3. **Check Types**: Verify the data types of connected values
4. **Validate Paths**: Ensure you're using the correct path to access nested data
```javascript
// Example debugging function
function debugConnections() {
console.log('All inputs:', input)
console.log('User data type:', typeof input.userBlock)
console.log('Order items:', input.orderBlock?.items)
return {
debug: true,
allInputs: input,
userExists: !!input.userBlock,
orderItemCount: input.orderBlock?.items?.length || 0,
}
}
```

View File

@@ -1,76 +0,0 @@
---
title: Connection Basics
description: Learn how connections work in Sim
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
## How Connections Work
Connections are the pathways that allow data to flow between blocks in your workflow. When you connect two blocks in Sim, you're establishing a data flow relationship that defines how information passes from one block to another.
<Callout type="info">
Each connection represents a directed relationship where data flows from a source block's output
to a destination block's input.
</Callout>
### Creating Connections
<Steps>
<Step>
<strong>Select Source Block</strong>: Click on the output port of the block you want to connect
from
</Step>
<Step>
<strong>Draw Connection</strong>: Drag to the input port of the destination block
</Step>
<Step>
<strong>Confirm Connection</strong>: Release to create the connection
</Step>
<Step>
<strong>Configure (Optional)</strong>: Some connections may require additional configuration
</Step>
</Steps>
### Connection Flow
The flow of data through connections follows these principles:
1. **Directional Flow**: Data always flows from outputs to inputs
2. **Execution Order**: Blocks execute in order based on their connections
3. **Data Transformation**: Data may be transformed as it passes between blocks
4. **Conditional Paths**: Some blocks (like Router and Condition) can direct flow to different paths
### Connection Visualization
Connections are visually represented in the workflow editor:
- **Solid Lines**: Active connections that will pass data
- **Animated Flow**: During execution, data flow is visualized along connections
- **Color Coding**: Different connection types may have different colors
- **Connection Tags**: Visual indicators showing what data is available
### Managing Connections
You can manage your connections in several ways:
- **Delete**: Click on a connection and press Delete or use the context menu
- **Reroute**: Drag a connection to change its path
- **Inspect**: Click on a connection to see details about the data being passed
- **Disable**: Temporarily disable a connection without deleting it
<Callout type="warning">
Deleting a connection will immediately stop data flow between the blocks. Make sure this is
intended before removing connections.
</Callout>
## Connection Compatibility
Not all blocks can be connected to each other. Compatibility depends on:
1. **Data Type Compatibility**: The output type must be compatible with the input type
2. **Block Restrictions**: Some blocks may have restrictions on what they can connect to
3. **Workflow Logic**: Connections must make logical sense in the context of your workflow
The editor will indicate when connections are invalid or incompatible.

View File

@@ -1,208 +0,0 @@
---
title: Connection Best Practices
description: Recommended patterns for effective connection management
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Step, Steps } from 'fumadocs-ui/components/steps'
## Workflow Organization
### Organize Your Connections
Keep your workflow clean and understandable by organizing connections logically:
- **Minimize crossing connections** when possible to reduce visual complexity
- **Group related blocks together** to make data flow more intuitive
- **Use consistent flow direction** (typically left-to-right or top-to-bottom)
- **Label complex connections** with descriptive names
<Callout type="info">
A well-organized workflow is easier to understand, debug, and maintain. Take time to arrange your
blocks and connections in a logical manner.
</Callout>
### Connection Naming Conventions
When working with multiple connections, consistent naming helps maintain clarity:
<Steps>
<Step>
<strong>Use descriptive block names</strong>: Name blocks based on their function (e.g.,
"UserDataFetcher", "ResponseGenerator")
</Step>
<Step>
<strong>Be specific with connection references</strong>: Use clear variable names when
referencing connections in code
</Step>
<Step>
<strong>Document complex connections</strong>: Add comments explaining non-obvious data
transformations
</Step>
</Steps>
## Data Validation
### Validate Data Flow
Ensure that the data being passed between blocks is compatible:
- **Check that required fields are available** in the source block
- **Verify data types match expectations** before using them
- **Use Function blocks to transform data** when necessary
- **Handle missing or null values** with default values or conditional logic
```javascript
// Example: Validating and transforming data in a Function block
function processUserData() {
// Validate required fields
if (!input.userBlock || !input.userBlock.id) {
return { error: 'Missing user data', valid: false }
}
// Transform and validate data types
const userId = String(input.userBlock.id)
const userName = input.userBlock.name || 'Unknown User'
const userScore = Number(input.userBlock.score) || 0
return {
valid: true,
user: {
id: userId,
name: userName,
score: userScore,
isHighScore: userScore > 100,
},
}
}
```
## Documentation
### Document Connection Purpose
Add comments or descriptions to clarify the purpose of connections, especially in complex workflows:
- **What data is being passed**: Document the key fields and their purpose
- **Why this connection exists**: Explain the relationship between blocks
- **Any transformations or conditions applied**: Note any data processing that occurs
```javascript
// Example: Documenting connection purpose in a Function block
/*
* This function processes user data from the UserFetcher block
* and order history from the OrderHistory block to generate
* personalized product recommendations.
*
* Input:
* - userBlock: User profile data (id, preferences, history)
* - orderBlock: Recent order history (items, dates, amounts)
*
* Output:
* - recommendations: Array of recommended product IDs
* - userSegment: Calculated user segment for marketing
* - conversionProbability: Estimated likelihood of purchase
*/
function generateRecommendations() {
// Implementation...
}
```
## Testing and Debugging
### Test Connection References
Verify that connection references work as expected:
- **Test with different input values** to ensure robustness
- **Check edge cases** (empty values, large datasets, special characters)
- **Ensure error handling for missing or invalid data**
- **Use console logging in Function blocks** to debug connection issues
```javascript
// Example: Testing connection references with edge cases
function testConnections() {
console.log('Testing connections...')
// Log all inputs for debugging
console.log('All inputs:', JSON.stringify(input, null, 2))
// Test for missing data
const hasUserData = !!input.userBlock
console.log('Has user data:', hasUserData)
// Test edge cases
const items = input.orderBlock?.items || []
console.log('Item count:', items.length)
console.log('Empty items test:', items.length === 0 ? 'Passed' : 'Failed')
// Return test results
return {
tests: {
hasUserData,
hasItems: items.length > 0,
hasLargeOrder: items.length > 10,
},
}
}
```
## Performance Considerations
### Optimize Data Flow
Keep your workflows efficient by optimizing how data flows through connections:
- **Pass only necessary data** between blocks to reduce memory usage
- **Use Function blocks to filter large datasets** before passing them on
- **Consider caching results** for expensive operations
- **Break complex workflows into smaller, reusable components**
```javascript
// Example: Optimizing data flow by filtering
function optimizeUserData() {
const userData = input.userBlock
// Only pass necessary fields to downstream blocks
return {
id: userData.id,
name: userData.name,
email: userData.email,
// Filter out unnecessary profile data, history, etc.
}
}
```
## Security Best Practices
### Secure Sensitive Data
Protect sensitive information when using connections:
- **Never expose API keys or credentials** in connection data
- **Sanitize user input** before processing it
- **Redact sensitive information** when logging connection data
- **Use secure connections** for external API calls
<Callout type="warning">
Be careful when logging connection data that might contain sensitive information. Always redact or
mask sensitive fields like passwords, API keys, or personal information.
</Callout>
## Advanced Patterns
### Conditional Connections
Use Condition blocks to create dynamic workflows:
- **Route data based on content** to different processing paths
- **Implement fallback paths** for error handling
- **Create decision trees** for complex business logic
### Feedback Loops
Create more sophisticated workflows with feedback connections:
- **Implement iterative processing** by connecting later blocks back to earlier ones
- **Use Memory blocks** to store state between iterations
- **Set termination conditions** to prevent infinite loops

View File

@@ -1,190 +0,0 @@
---
title: Connection Data Structure
description: Understanding the data structure of different block outputs
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
When you connect blocks, the output data structure from the source block determines what values are available in the destination block. Each block type produces a specific output structure that you can reference in downstream blocks.
<Callout type="info">
Understanding these data structures is essential for effectively using connection tags and
accessing the right data in your workflows.
</Callout>
## Block Output Structures
Different block types produce different output structures. Here's what you can expect from each block type:
<Tabs items={['Agent Output', 'API Output', 'Function Output', 'Evaluator Output', 'Condition Output', 'Router Output']}>
<Tab>
```json
{
"content": "The generated text response",
"model": "gpt-4o",
"tokens": {
"prompt": 120,
"completion": 85,
"total": 205
},
"toolCalls": [...],
"cost": [...],
"usage": [...]
}
```
### Agent Block Output Fields
- **content**: The main text response generated by the agent
- **model**: The AI model used (e.g., "gpt-4o", "claude-3-opus")
- **tokens**: Token usage statistics
- **prompt**: Number of tokens in the prompt
- **completion**: Number of tokens in the completion
- **total**: Total tokens used
- **toolCalls**: Array of tool calls made by the agent (if any)
- **cost**: Array of cost objects for each tool call (if any)
- **usage**: Token usage statistics for the entire response
</Tab>
<Tab>
```json
{
"data": "Response data",
"status": 200,
"headers": {
"content-type": "application/json",
"cache-control": "no-cache"
}
}
```
### API Block Output Fields
- **data**: The response data from the API (can be any type)
- **status**: HTTP status code of the response
- **headers**: HTTP headers returned by the API
</Tab>
<Tab>
```json
{
"result": "Function return value",
"stdout": "Console output",
}
```
### Function Block Output Fields
- **result**: The return value of the function (can be any type)
- **stdout**: Console output captured during function execution
</Tab>
<Tab>
```json
{
"content": "Evaluation summary",
"model": "gpt-5",
"tokens": {
"prompt": 120,
"completion": 85,
"total": 205
},
"metric1": 8.5,
"metric2": 7.2,
"metric3": 9.0
}
```
### Evaluator Block Output Fields
- **content**: Summary of the evaluation
- **model**: The AI model used for evaluation
- **tokens**: Token usage statistics
- **[metricName]**: Score for each metric defined in the evaluator (dynamic fields)
</Tab>
<Tab>
```json
{
"content": "Original content passed through",
"conditionResult": true,
"selectedPath": {
"blockId": "2acd9007-27e8-4510-a487-73d3b825e7c1",
"blockType": "agent",
"blockTitle": "Follow-up Agent"
},
"selectedConditionId": "condition-1"
}
```
### Condition Block Output Fields
- **content**: The original content passed through
- **conditionResult**: Boolean result of the condition evaluation
- **selectedPath**: Information about the selected path
- **blockId**: ID of the next block in the selected path
- **blockType**: Type of the next block
- **blockTitle**: Title of the next block
- **selectedConditionId**: ID of the selected condition
</Tab>
<Tab>
```json
{
"content": "Routing decision",
"model": "gpt-4o",
"tokens": {
"prompt": 120,
"completion": 85,
"total": 205
},
"selectedPath": {
"blockId": "2acd9007-27e8-4510-a487-73d3b825e7c1",
"blockType": "agent",
"blockTitle": "Customer Service Agent"
}
}
```
### Router Block Output Fields
- **content**: The routing decision text
- **model**: The AI model used for routing
- **tokens**: Token usage statistics
- **selectedPath**: Information about the selected path
- **blockId**: ID of the selected destination block
- **blockType**: Type of the selected block
- **blockTitle**: Title of the selected block
</Tab>
</Tabs>
## Custom Output Structures
Some blocks may produce custom output structures based on their configuration:
1. **Agent Blocks with Response Format**: When using a response format in an Agent block, the output structure will match the defined schema instead of the standard structure.
2. **Function Blocks**: The `result` field can contain any data structure returned by your function code.
3. **API Blocks**: The `data` field will contain whatever the API returns, which could be any valid JSON structure.
<Callout type="warning">
Always check the actual output structure of your blocks during development to ensure you're
referencing the correct fields in your connections.
</Callout>
## Nested Data Structures
Many block outputs contain nested data structures. You can access these using dot notation in connection tags:
```
<blockId.path.to.nested.data>
```
For example:
- `<agent1.tokens.total>` - Access the total tokens from an Agent block
- `<api1.data.results[0].id>` - Access the ID of the first result from an API response
- `<function1.result.calculations.total>` - Access a nested field in a Function block's result

View File

@@ -1,42 +0,0 @@
---
title: Connections
description: Connect your blocks to one another.
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Card, Cards } from 'fumadocs-ui/components/card'
import { ConnectIcon } from '@/components/icons'
import { Video } from '@/components/ui/video'
Connections are the pathways that allow data to flow between blocks in your workflow. They define how information is passed from one block to another, enabling you to create sophisticated, multi-step processes.
<Callout type="info">
Properly configured connections are essential for creating effective workflows. They determine how
data moves through your system and how blocks interact with each other.
</Callout>
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="connections.mp4" />
</div>
## Connection Types
Sim supports different types of connections that enable various workflow patterns:
<Cards>
<Card title="Connection Basics" href="/connections/basics">
Learn how connections work and how to create them in your workflows
</Card>
<Card title="Connection Tags" href="/connections/tags">
Understand how to use connection tags to reference data between blocks
</Card>
<Card title="Data Structure" href="/connections/data-structure">
Explore the output data structures of different block types
</Card>
<Card title="Accessing Data" href="/connections/accessing-data">
Learn techniques for accessing and manipulating connected data
</Card>
<Card title="Best Practices" href="/connections/best-practices">
Follow recommended patterns for effective connection management
</Card>
</Cards>

View File

@@ -1,4 +0,0 @@
{
"title": "Connections",
"pages": ["basics", "tags", "data-structure", "accessing-data", "best-practices"]
}

View File

@@ -1,110 +0,0 @@
---
title: Connection Tags
description: Using connection tags to reference data between blocks
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Video } from '@/components/ui/video'
Connection tags are visual representations of the data available from connected blocks. They provide an easy way to reference outputs from previous blocks in your workflow.
<div className="mx-auto w-full overflow-hidden rounded-lg">
<Video src="connections.mp4" />
</div>
### What Are Connection Tags?
Connection tags are interactive elements that appear when blocks are connected. They represent the data that can flow from one block to another and allow you to:
- Visualize available data from source blocks
- Reference specific data fields in destination blocks
- Create dynamic data flows between blocks
<Callout type="info">
Connection tags make it easy to see what data is available from previous blocks and use it in your
current block without having to remember complex data structures.
</Callout>
## Using Connection Tags
There are two primary ways to use connection tags in your workflows:
<div className="my-6 grid grid-cols-1 gap-4 md:grid-cols-2">
<div className="rounded-lg border border-gray-200 p-4 dark:border-gray-800">
<h3 className="mb-2 text-lg font-medium">Drag and Drop</h3>
<div className="text-sm text-gray-600 dark:text-gray-400">
Click on a connection tag and drag it into input fields of destination blocks. A dropdown will
appear showing available values.
</div>
<ol className="mt-2 list-decimal pl-5 text-sm text-gray-600 dark:text-gray-400">
<li>Hover over a connection tag to see available data</li>
<li>Click and drag the tag to an input field</li>
<li>Select the specific data field from the dropdown</li>
<li>The reference is inserted automatically</li>
</ol>
</div>
<div className="rounded-lg border border-gray-200 p-4 dark:border-gray-800">
<h3 className="mb-2 text-lg font-medium">Angle Bracket Syntax</h3>
<div className="text-sm text-gray-600 dark:text-gray-400">
Type <code>&lt;&gt;</code> in input fields to see a dropdown of available connection values
from previous blocks.
</div>
<ol className="mt-2 list-decimal pl-5 text-sm text-gray-600 dark:text-gray-400">
<li>Click in any input field where you want to use connected data</li>
<li>
Type <code>&lt;&gt;</code> to trigger the connection dropdown
</li>
<li>Browse and select the data you want to reference</li>
<li>Continue typing or select from the dropdown to complete the reference</li>
</ol>
</div>
</div>
## Tag Syntax
Connection tags use a simple syntax to reference data:
```
<blockId.path.to.data>
```
Where:
- `blockId` is the identifier of the source block
- `path.to.data` is the path to the specific data field
For example:
- `<agent1.content>` - References the content field from a block with ID "agent1"
- `<api2.data.users[0].name>` - References the name of the first user in the users array from the data field of a block with ID "api2"
## Dynamic Tag References
Connection tags are evaluated at runtime, which means:
1. They always reference the most current data
2. They can be used in expressions and combined with static text
3. They can be nested within other data structures
### Examples
```javascript
// Reference in text
"The user's name is <userBlock.name>"
// Reference in JSON
{
"userName": "<userBlock.name>",
"orderTotal": <apiBlock.data.total>
}
// Reference in code
const greeting = "Hello, <userBlock.name>!";
const total = <apiBlock.data.total> * 1.1; // Add 10% tax
```
<Callout type="warning">
When using connection tags in numeric contexts, make sure the referenced data is actually a number
to avoid type conversion issues.
</Callout>

View File

@@ -1,97 +0,0 @@
---
title: Copilot
description: Build and edit workflows with Sim Copilot
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Card, Cards } from 'fumadocs-ui/components/card'
import { MessageCircle, Package, Zap, Infinity as InfinityIcon, Brain, BrainCircuit } from 'lucide-react'
## What is Copilot
Copilot is your in-editor assistant that helps you build, understand, and improve workflows. It can:
- **Explain**: Answer questions about Sim and your current workflow
- **Guide**: Suggest edits and best practices
- **Edit**: Make changes to blocks, connections, and settings when you approve
<Callout type="info">
Copilot is a Sim-managed service. For self-hosted deployments, generate a Copilot API key in the hosted app (sim.ai → Settings → Copilot)
1. Go to [sim.ai](https://sim.ai) → Settings → Copilot and generate a Copilot API key
2. Set `COPILOT_API_KEY` in your self-hosted environment to that value
3. Host Sim on a publicly available DNS and set `NEXT_PUBLIC_APP_URL` and `BETTER_AUTH_URL` to that value (e.g., using ngrok)
</Callout>
## Modes
<Cards>
<Card title="Ask">
<div className="flex items-start gap-3">
<span className="mt-0.5 inline-flex h-8 w-8 items-center justify-center rounded-md border border-border/50 bg-muted/60">
<MessageCircle className="h-4 w-4 text-muted-foreground" />
</span>
<div>
<p className="m-0 text-sm">
Q&A mode for explanations, guidance, and suggestions without making changes to your workflow.
</p>
</div>
</div>
</Card>
<Card title="Agent">
<div className="flex items-start gap-3">
<span className="mt-0.5 inline-flex h-8 w-8 items-center justify-center rounded-md border border-border/50 bg-muted/60">
<Package className="h-4 w-4 text-muted-foreground" />
</span>
<div>
<p className="m-0 text-sm">
Build-and-edit mode. Copilot proposes specific edits (add blocks, wire variables, tweak settings) and applies them when you approve.
</p>
</div>
</div>
</Card>
</Cards>
## Depth Levels
<Cards>
<Card title="Fast">
<div className="flex items-start gap-3">
<span className="mt-0.5 inline-flex h-8 w-8 items-center justify-center rounded-md border border-border/50 bg-muted/60">
<Zap className="h-4 w-4 text-muted-foreground" />
</span>
<div>
<p className="m-0 text-sm">Quickest and cheapest. Best for small edits, simple workflows, and minor tweaks.</p>
</div>
</div>
</Card>
<Card title="Auto">
<div className="flex items-start gap-3">
<span className="mt-0.5 inline-flex h-8 w-8 items-center justify-center rounded-md border border-border/50 bg-muted/60">
<InfinityIcon className="h-4 w-4 text-muted-foreground" />
</span>
<div>
<p className="m-0 text-sm">Balanced speed and reasoning. Recommended default for most tasks.</p>
</div>
</div>
</Card>
<Card title="Pro">
<div className="flex items-start gap-3">
<span className="mt-0.5 inline-flex h-8 w-8 items-center justify-center rounded-md border border-border/50 bg-muted/60">
<Brain className="h-4 w-4 text-muted-foreground" />
</span>
<div>
<p className="m-0 text-sm">More reasoning for larger workflows and complex edits while staying performant.</p>
</div>
</div>
</Card>
<Card title="Max">
<div className="flex items-start gap-3">
<span className="mt-0.5 inline-flex h-8 w-8 items-center justify-center rounded-md border border-border/50 bg-muted/60">
<BrainCircuit className="h-4 w-4 text-muted-foreground" />
</span>
<div>
<p className="m-0 text-sm">Maximum reasoning for deep planning, debugging, and complex architectural changes.</p>
</div>
</div>
</Card>
</Cards>

View File

@@ -1,4 +0,0 @@
{
"title": "Copilot",
"pages": ["index"]
}

View File

@@ -0,0 +1,154 @@
---
title: Agent
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { Image } from '@/components/ui/image'
Der Agent-Block verbindet deinen Workflow mit Large Language Models (LLMs). Er verarbeitet natürlichsprachliche Eingaben, ruft externe Tools auf und generiert strukturierte oder unstrukturierte Ausgaben.
<div className="flex justify-center">
<Image
src="/static/blocks/agent.png"
alt="Agent-Block-Konfiguration"
width={500}
height={400}
className="my-6"
/>
</div>
## Konfigurationsoptionen
### System-Prompt
Der System-Prompt legt die Betriebsparameter und Verhaltenseinschränkungen des Agenten fest. Diese Konfiguration definiert die Rolle des Agenten, die Antwortmethodik und die Verarbeitungsgrenzen für alle eingehenden Anfragen.
```markdown
You are a helpful assistant that specializes in financial analysis.
Always provide clear explanations and cite sources when possible.
When responding to questions about investments, include risk disclaimers.
```
### Benutzer-Prompt
Der Benutzer-Prompt stellt die primären Eingabedaten für die Inferenzverarbeitung dar. Dieser Parameter akzeptiert natürlichsprachlichen Text oder strukturierte Daten, die der Agent analysieren und auf die er reagieren wird. Zu den Eingabequellen gehören:
- **Statische Konfiguration**: Direkte Texteingabe, die in der Block-Konfiguration angegeben ist
- **Dynamische Eingabe**: Daten, die von vorgelagerten Blöcken über Verbindungsschnittstellen übergeben werden
- **Laufzeitgenerierung**: Programmatisch generierte Inhalte während der Workflow-Ausführung
### Modellauswahl
Der Agent-Block unterstützt mehrere LLM-Anbieter über eine einheitliche Inferenzschnittstelle. Verfügbare Modelle umfassen:
- **OpenAI**: GPT-5.1, GPT-5, GPT-4o, o1, o3, o4-mini, gpt-4.1
- **Anthropic**: Claude 4.5 Sonnet, Claude Opus 4.1
- **Google**: Gemini 2.5 Pro, Gemini 2.0 Flash
- **Andere Anbieter**: Groq, Cerebras, xAI, Azure OpenAI, OpenRouter
- **Lokale Modelle**: Ollama oder VLLM-kompatible Modelle
### Temperatur
Steuert die Zufälligkeit und Kreativität der Antworten:
- **Niedrig (0-0,3)**: Deterministisch und fokussiert. Am besten für faktische Aufgaben und Genauigkeit.
- **Mittel (0,3-0,7)**: Ausgewogene Kreativität und Fokus. Gut für allgemeine Verwendung.
- **Hoch (0,7-2,0)**: Kreativ und abwechslungsreich. Ideal für Brainstorming und Content-Generierung.
### API-Schlüssel
Ihr API-Schlüssel für den ausgewählten LLM-Anbieter. Dieser wird sicher gespeichert und für die Authentifizierung verwendet.
### Tools
Erweitern Sie die Fähigkeiten des Agenten mit externen Integrationen. Wählen Sie aus über 60 vorgefertigten Tools oder definieren Sie benutzerdefinierte Funktionen.
**Verfügbare Kategorien:**
- **Kommunikation**: Gmail, Slack, Telegram, WhatsApp, Microsoft Teams
- **Datenquellen**: Notion, Google Sheets, Airtable, Supabase, Pinecone
- **Webdienste**: Firecrawl, Google Search, Exa AI, Browser-Automatisierung
- **Entwicklung**: GitHub, Jira, Linear
- **KI-Dienste**: OpenAI, Perplexity, Hugging Face, ElevenLabs
**Ausführungsmodi:**
- **Auto**: Modell entscheidet kontextbasiert, wann Tools verwendet werden
- **Erforderlich**: Tool muss bei jeder Anfrage aufgerufen werden
- **Keine**: Tool verfügbar, aber dem Modell nicht vorgeschlagen
### Antwortformat
Der Parameter für das Antwortformat erzwingt die Generierung strukturierter Ausgaben durch JSON-Schema-Validierung. Dies gewährleistet konsistente, maschinenlesbare Antworten, die vordefinierten Datenstrukturen entsprechen:
```json
{
"type": "object",
"properties": {
"sentiment": {
"type": "string",
"enum": ["positive", "neutral", "negative"]
},
"summary": {
"type": "string",
"description": "Brief summary of the content"
}
},
"required": ["sentiment", "summary"]
}
```
Diese Konfiguration beschränkt die Ausgabe des Modells auf die Einhaltung des angegebenen Schemas, verhindert Freitextantworten und stellt die Generierung strukturierter Daten sicher.
### Zugriff auf Ergebnisse
Nach Abschluss eines Agenten können Sie auf seine Ausgaben zugreifen:
- **response**: Der Antworttext oder die strukturierten Daten des Agenten
- **usage**: Token-Nutzungsstatistiken (Prompt, Completion, Gesamt)
- **toolExecutions**: Details zu allen Tools, die der Agent während der Ausführung verwendet hat
- **estimatedCost**: Geschätzte Kosten des API-Aufrufs (falls verfügbar)
## Erweiterte Funktionen
### Memory + Agent: Gesprächsverlauf
Verwenden Sie einen memory Block mit einer konsistenten memoryId (zum Beispiel, conversationHistory), um Nachrichten zwischen Durchläufen zu speichern und diesen Verlauf in den Prompt des Agenten einzubeziehen.
- Fügen Sie die Nachricht des Benutzers vor dem Agenten hinzu
- Lesen Sie den Gesprächsverlauf für den Kontext
- Hängen Sie die Antwort des Agenten nach dessen Ausführung an
Siehe den [`Memory`](/tools/memory) Blockverweis für Details.
## Ausgaben
- **`<agent.content>`**: Antworttext des Agenten
- **`<agent.tokens>`**: Token-Nutzungsstatistiken
- **`<agent.tool_calls>`**: Details zur Tool-Ausführung
- **`<agent.cost>`**: Geschätzte Kosten des API-Aufrufs
## Beispielanwendungsfälle
**Automatisierung des Kundenservice** - Bearbeitung von Anfragen mit Datenbank- und Tool-Zugriff
```
API (Ticket) → Agent (Postgres, KB, Linear) → Gmail (Reply) → Memory (Save)
```
**Multi-Modell-Inhaltsanalyse** - Analyse von Inhalten mit verschiedenen KI-Modellen
```
Function (Process) → Agent (GPT-4o Technical) → Agent (Claude Sentiment) → Function (Report)
```
**Tool-gestützter Rechercheassistent** - Recherche mit Websuche und Dokumentenzugriff
```
Input → Agent (Google Search, Notion) → Function (Compile Report)
```
## Bewährte Praktiken
- **Sei spezifisch in System-Prompts**: Definiere die Rolle, den Ton und die Einschränkungen des Agenten klar. Je spezifischer deine Anweisungen sind, desto besser kann der Agent seinen vorgesehenen Zweck erfüllen.
- **Wähle die richtige Temperatureinstellung**: Verwende niedrigere Temperatureinstellungen (0-0,3), wenn Genauigkeit wichtig ist, oder erhöhe die Temperatur (0,7-2,0) für kreativere oder vielfältigere Antworten
- **Nutze Tools effektiv**: Integriere Tools, die den Zweck des Agenten ergänzen und seine Fähigkeiten erweitern. Sei selektiv bei der Auswahl der Tools, um den Agenten nicht zu überfordern. Für Aufgaben mit wenig Überschneidung verwende einen anderen Agent-Block für die besten Ergebnisse.

View File

@@ -0,0 +1,145 @@
---
title: API
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { Image } from '@/components/ui/image'
Der API-Block verbindet Ihren Workflow mit externen Diensten durch HTTP-Anfragen. Unterstützt GET, POST, PUT, DELETE und PATCH Methoden für die Interaktion mit REST-APIs.
<div className="flex justify-center">
<Image
src="/static/blocks/api.png"
alt="API-Block"
width={500}
height={400}
className="my-6"
/>
</div>
## Konfigurationsoptionen
### URL
Die Endpunkt-URL für die API-Anfrage. Diese kann sein:
- Eine statische URL, die direkt im Block eingegeben wird
- Eine dynamische URL, die mit der Ausgabe eines anderen Blocks verbunden ist
- Eine URL mit Pfadparametern
### Methode
Wählen Sie die HTTP-Methode für Ihre Anfrage:
- **GET**: Daten vom Server abrufen
- **POST**: Daten an den Server senden, um eine Ressource zu erstellen
- **PUT**: Eine bestehende Ressource auf dem Server aktualisieren
- **DELETE**: Eine Ressource vom Server entfernen
- **PATCH**: Eine bestehende Ressource teilweise aktualisieren
### Abfrageparameter
Definieren Sie Schlüssel-Wert-Paare, die als Abfrageparameter an die URL angehängt werden. Zum Beispiel:
```
Key: apiKey
Value: your_api_key_here
Key: limit
Value: 10
```
Diese würden der URL als `?apiKey=your_api_key_here&limit=10` hinzugefügt.
### Header
Konfigurieren Sie HTTP-Header für Ihre Anfrage. Häufige Header sind:
```
Key: Content-Type
Value: application/json
Key: Authorization
Value: Bearer your_token_here
```
### Anfragekörper
Für Methoden, die einen Anfragekörper unterstützen (POST, PUT, PATCH), können Sie die zu sendenden Daten definieren. Der Körper kann sein:
- JSON-Daten, die direkt im Block eingegeben werden
- Daten, die mit der Ausgabe eines anderen Blocks verbunden sind
- Dynamisch während der Workflow-Ausführung generiert
### Zugriff auf Ergebnisse
Nach Abschluss einer API-Anfrage können Sie auf folgende Ausgaben zugreifen:
- **`<api.data>`**: Die Antwortdaten vom API
- **`<api.status>`**: HTTP-Statuscode (200, 404, 500, usw.)
- **`<api.headers>`**: Antwort-Header vom Server
- **`<api.error>`**: Fehlerdetails, falls die Anfrage fehlgeschlagen ist
## Erweiterte Funktionen
### Dynamische URL-Konstruktion
Erstellen Sie URLs dynamisch mit Variablen aus vorherigen Blöcken:
```javascript
// In a Function block before the API
const userId = <start.userId>;
const apiUrl = `https://api.example.com/users/${userId}/profile`;
```
### Anfrage-Wiederholungen
Der API-Block verarbeitet automatisch:
- Netzwerk-Timeouts mit exponentiellem Backoff
- Antworten bei Ratenbegrenzung (429-Statuscodes)
- Serverfehler (5xx-Statuscodes) mit Wiederholungslogik
- Verbindungsfehler mit Wiederverbindungsversuchen
### Antwortvalidierung
Validieren Sie API-Antworten vor der Verarbeitung:
```javascript
// In a Function block after the API
if (<api.status> === 200) {
const data = <api.data>;
// Process successful response
} else {
// Handle error response
console.error(`API Error: ${<api.status>}`);
}
```
## Ausgaben
- **`<api.data>`**: Antwortdaten vom API
- **`<api.status>`**: HTTP-Statuscode
- **`<api.headers>`**: Antwort-Header
- **`<api.error>`**: Fehlerdetails bei fehlgeschlagener Anfrage
## Anwendungsbeispiele
**Benutzerprofildaten abrufen** - Benutzerinformationen von externem Dienst abrufen
```
Function (Build ID) → API (GET /users/{id}) → Function (Format) → Response
```
**Zahlungsabwicklung** - Zahlung über die Stripe-API verarbeiten
```
Function (Validate) → API (Stripe) → Condition (Success) → Supabase (Update)
```
## Bewährte Praktiken
- **Umgebungsvariablen für sensible Daten verwenden**: Keine API-Schlüssel oder Anmeldedaten im Code festlegen
- **Fehler elegant behandeln**: Fehlerbehandlungslogik für fehlgeschlagene Anfragen einbinden
- **Antworten validieren**: Statuscode und Antwortformate vor der Datenverarbeitung prüfen
- **Ratenbegrenzungen respektieren**: Achten Sie auf API-Ratenbegrenzungen und implementieren Sie angemessene Drosselung

View File

@@ -0,0 +1,149 @@
---
title: Bedingung
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { Image } from '@/components/ui/image'
Der Bedingungsblock verzweigt die Workflow-Ausführung basierend auf booleschen Ausdrücken. Bewerten Sie Bedingungen anhand vorheriger Block-Ausgaben und leiten Sie zu verschiedenen Pfaden weiter, ohne dass ein LLM erforderlich ist.
<div className="flex justify-center">
<Image
src="/static/blocks/condition.png"
alt="Bedingungsblock"
width={500}
height={400}
className="my-6"
/>
</div>
## Konfigurationsoptionen
### Bedingungen
Definieren Sie eine oder mehrere Bedingungen, die ausgewertet werden. Jede Bedingung umfasst:
- **Ausdruck**: Ein JavaScript/TypeScript-Ausdruck, der zu wahr oder falsch ausgewertet wird
- **Pfad**: Der Zielblock, zu dem weitergeleitet werden soll, wenn die Bedingung wahr ist
- **Beschreibung**: Optionale Erklärung, was die Bedingung prüft
Sie können mehrere Bedingungen erstellen, die der Reihe nach ausgewertet werden, wobei die erste übereinstimmende Bedingung den Ausführungspfad bestimmt.
### Format für Bedingungsausdrücke
Bedingungen verwenden JavaScript-Syntax und können auf Eingabewerte aus vorherigen Blöcken verweisen.
<Tabs items={['Schwellenwert', 'Textanalyse', 'Mehrere Bedingungen']}>
<Tab>
```javascript
// Check if a score is above a threshold
<agent.score> > 75
```
</Tab>
<Tab>
```javascript
// Check if a text contains specific keywords
<agent.text>.includes('urgent') || <agent.text>.includes('emergency')
```
</Tab>
<Tab>
```javascript
// Check multiple conditions
<agent.age> >= 18 && <agent.country> === 'US'
```
</Tab>
</Tabs>
### Zugriff auf Ergebnisse
Nach der Auswertung einer Bedingung können Sie auf folgende Ausgaben zugreifen:
- **condition.result**: Boolesches Ergebnis der Bedingungsauswertung
- **condition.matched_condition**: ID der übereinstimmenden Bedingung
- **condition.content**: Beschreibung des Auswertungsergebnisses
- **condition.path**: Details zum gewählten Routing-Ziel
## Erweiterte Funktionen
### Komplexe Ausdrücke
Verwenden Sie JavaScript-Operatoren und -Funktionen in Bedingungen:
```javascript
// String operations
<user.email>.endsWith('@company.com')
// Array operations
<api.tags>.includes('urgent')
// Mathematical operations
<agent.confidence> * 100 > 85
// Date comparisons
new Date(<api.created_at>) > new Date('2024-01-01')
```
### Auswertung mehrerer Bedingungen
Bedingungen werden der Reihe nach ausgewertet, bis eine übereinstimmt:
```javascript
// Condition 1: Check for high priority
<ticket.priority> === 'high'
// Condition 2: Check for urgent keywords
<ticket.subject>.toLowerCase().includes('urgent')
// Condition 3: Default fallback
true
```
### Fehlerbehandlung
Bedingungen behandeln automatisch:
- Undefinierte oder Null-Werte mit sicherer Auswertung
- Typabweichungen mit geeigneten Fallbacks
- Ungültige Ausdrücke mit Fehlerprotokollierung
- Fehlende Variablen mit Standardwerten
## Ausgaben
- **`<condition.result>`**: Boolesches Ergebnis der Auswertung
- **`<condition.matched_condition>`**: ID der übereinstimmenden Bedingung
- **`<condition.content>`**: Beschreibung des Auswertungsergebnisses
- **`<condition.path>`**: Details zum gewählten Routing-Ziel
## Beispielanwendungsfälle
**Kundenservice-Routing** - Tickets basierend auf Priorität weiterleiten
```
API (Ticket) → Condition (priority === 'high') → Agent (Escalation) or Agent (Standard)
```
**Inhaltsmoderation** - Inhalte basierend auf Analysen filtern
```
Agent (Analyze) → Condition (toxicity > 0.7) → Moderation or Publish
```
**Benutzer-Onboarding-Ablauf** - Onboarding basierend auf Benutzertyp personalisieren
```
Function (Process) → Condition (account_type === 'enterprise') → Advanced or Simple
```
## Bewährte Praktiken
- **Bedingungen korrekt anordnen**: Platzieren Sie spezifischere Bedingungen vor allgemeinen, um sicherzustellen, dass spezifische Logik Vorrang vor Fallbacks hat
- **Verwenden Sie den Else-Zweig bei Bedarf**: Wenn keine Bedingungen übereinstimmen und der Else-Zweig nicht verbunden ist, endet der Workflow-Zweig ordnungsgemäß. Verbinden Sie den Else-Zweig, wenn Sie einen Fallback-Pfad für nicht übereinstimmende Fälle benötigen
- **Halten Sie Ausdrücke einfach**: Verwenden Sie klare, unkomplizierte boolesche Ausdrücke für bessere Lesbarkeit und einfachere Fehlersuche
- **Dokumentieren Sie Ihre Bedingungen**: Fügen Sie Beschreibungen hinzu, um den Zweck jeder Bedingung für bessere Teamzusammenarbeit und Wartung zu erklären
- **Testen Sie Grenzfälle**: Überprüfen Sie, ob Bedingungen Grenzwerte korrekt behandeln, indem Sie mit Werten an den Grenzen Ihrer Bedingungsbereiche testen

View File

@@ -0,0 +1,96 @@
---
title: Evaluator
---
import { Callout } from 'fumadocs-ui/components/callout'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { Image } from '@/components/ui/image'
Der Evaluator-Block nutzt KI, um die Inhaltsqualität anhand benutzerdefinierter Metriken zu bewerten. Perfekt für Qualitätskontrolle, A/B-Tests und um sicherzustellen, dass KI-Ausgaben bestimmte Standards erfüllen.
<div className="flex justify-center">
<Image
src="/static/blocks/evaluator.png"
alt="Evaluator-Block-Konfiguration"
width={500}
height={400}
className="my-6"
/>
</div>
## Konfigurationsoptionen
### Bewertungsmetriken
Definieren Sie benutzerdefinierte Metriken, anhand derer Inhalte bewertet werden. Jede Metrik umfasst:
- **Name**: Eine kurze Bezeichnung für die Metrik
- **Beschreibung**: Eine detaillierte Erklärung, was die Metrik misst
- **Bereich**: Der numerische Bereich für die Bewertung (z.B. 1-5, 0-10)
Beispielmetriken:
```
Accuracy (1-5): How factually accurate is the content?
Clarity (1-5): How clear and understandable is the content?
Relevance (1-5): How relevant is the content to the original query?
```
### Inhalt
Der zu bewertende Inhalt. Dies kann sein:
- Direkt in der Blockkonfiguration bereitgestellt
- Verbunden mit der Ausgabe eines anderen Blocks (typischerweise ein Agent-Block)
- Dynamisch während der Workflow-Ausführung generiert
### Modellauswahl
Wählen Sie ein KI-Modell für die Durchführung der Bewertung:
- **OpenAI**: GPT-4o, o1, o3, o4-mini, gpt-4.1
- **Anthropic**: Claude 3.7 Sonnet
- **Google**: Gemini 2.5 Pro, Gemini 2.0 Flash
- **Andere Anbieter**: Groq, Cerebras, xAI, DeepSeek
- **Lokale Modelle**: Ollama oder VLLM-kompatible Modelle
Verwenden Sie Modelle mit starken Argumentationsfähigkeiten wie GPT-4o oder Claude 3.7 Sonnet für beste Ergebnisse.
### API-Schlüssel
Ihr API-Schlüssel für den ausgewählten LLM-Anbieter. Dieser wird sicher gespeichert und für die Authentifizierung verwendet.
## Beispielanwendungsfälle
**Bewertung der Inhaltsqualität** - Inhalte vor der Veröffentlichung bewerten
```
Agent (Generate) → Evaluator (Score) → Condition (Check threshold) → Publish or Revise
```
**A/B-Tests von Inhalten** - Vergleich mehrerer KI-generierter Antworten
```
Parallel (Variations) → Evaluator (Score Each) → Function (Select Best) → Response
```
**Qualitätskontrolle im Kundenservice** - Sicherstellen, dass Antworten Qualitätsstandards erfüllen
```
Agent (Support Response) → Evaluator (Score) → Function (Log) → Condition (Review if Low)
```
## Ausgaben
- **`<evaluator.content>`**: Zusammenfassung der Bewertung mit Punktzahlen
- **`<evaluator.model>`**: Für die Bewertung verwendetes Modell
- **`<evaluator.tokens>`**: Statistik zur Token-Nutzung
- **`<evaluator.cost>`**: Geschätzte Bewertungskosten
## Best Practices
- **Verwenden Sie spezifische Metrikbeschreibungen**: Definieren Sie klar, was jede Metrik misst, um genauere Bewertungen zu erhalten
- **Wählen Sie geeignete Bereiche**: Wählen Sie Bewertungsbereiche, die ausreichend Granularität bieten, ohne zu komplex zu sein
- **Verbinden Sie mit Agent-Blöcken**: Verwenden Sie Evaluator-Blöcke, um die Ausgaben von Agent-Blöcken zu bewerten und Feedback-Schleifen zu erstellen
- **Verwenden Sie konsistente Metriken**: Für vergleichende Analysen sollten Sie konsistente Metriken über ähnliche Bewertungen hinweg beibehalten
- **Kombinieren Sie mehrere Metriken**: Verwenden Sie verschiedene Metriken, um eine umfassende Bewertung zu erhalten

View File

@@ -0,0 +1,76 @@
---
title: Funktion
---
import { Image } from '@/components/ui/image'
Der Funktionsblock führt benutzerdefinierten JavaScript- oder TypeScript-Code in Ihren Workflows aus. Transformieren Sie Daten, führen Sie Berechnungen durch oder implementieren Sie benutzerdefinierte Logik.
<div className="flex justify-center">
<Image
src="/static/blocks/function.png"
alt="Funktionsblock mit Code-Editor"
width={500}
height={400}
className="my-6"
/>
</div>
## Ausgaben
- **`<function.result>`**: Der von Ihrer Funktion zurückgegebene Wert
- **`<function.stdout>`**: Console.log()-Ausgabe Ihres Codes
## Beispielanwendungsfälle
**Datenverarbeitungspipeline** - Transformation von API-Antworten in strukturierte Daten
```
API (Fetch) → Function (Process & Validate) → Function (Calculate Metrics) → Response
```
**Implementierung von Geschäftslogik** - Berechnung von Treuepunkten und Stufen
```
Agent (Get History) → Function (Calculate Score) → Function (Determine Tier) → Condition (Route)
```
**Datenvalidierung und -bereinigung** - Validierung und Bereinigung von Benutzereingaben
```
Input → Function (Validate & Sanitize) → API (Save to Database)
```
### Beispiel: Treuepunkte-Rechner
```javascript title="loyalty-calculator.js"
// Process customer data and calculate loyalty score
const { purchaseHistory, accountAge, supportTickets } = <agent>;
// Calculate metrics
const totalSpent = purchaseHistory.reduce((sum, purchase) => sum + purchase.amount, 0);
const purchaseFrequency = purchaseHistory.length / (accountAge / 365);
const ticketRatio = supportTickets.resolved / supportTickets.total;
// Calculate loyalty score (0-100)
const spendScore = Math.min(totalSpent / 1000 * 30, 30);
const frequencyScore = Math.min(purchaseFrequency * 20, 40);
const supportScore = ticketRatio * 30;
const loyaltyScore = Math.round(spendScore + frequencyScore + supportScore);
return {
customer: <agent.name>,
loyaltyScore,
loyaltyTier: loyaltyScore >= 80 ? "Platinum" : loyaltyScore >= 60 ? "Gold" : "Silver",
metrics: { spendScore, frequencyScore, supportScore }
};
```
## Best Practices
- **Funktionen fokussiert halten**: Schreiben Sie Funktionen, die eine Sache gut erledigen, um die Wartbarkeit und Fehlersuche zu verbessern
- **Fehler elegant behandeln**: Verwenden Sie try/catch-Blöcke, um potenzielle Fehler zu behandeln und aussagekräftige Fehlermeldungen bereitzustellen
- **Grenzfälle testen**: Stellen Sie sicher, dass Ihr Code ungewöhnliche Eingaben, Null-Werte und Grenzbedingungen korrekt behandelt
- **Für Leistung optimieren**: Achten Sie bei großen Datensätzen auf die Berechnungskomplexität und den Speicherverbrauch
- **Console.log() zum Debuggen verwenden**: Nutzen Sie die Stdout-Ausgabe zum Debuggen und Überwachen der Funktionsausführung

Some files were not shown because too many files have changed in this diff Show More