-
Notifications
You must be signed in to change notification settings - Fork 3.7k
perf(dev): curate SIM_DEV_MINIMAL_REGISTRY to core toolbar blocks #5251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: staging
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,55 +1,84 @@ | ||
| import { A2ABlock } from '@/blocks/blocks/a2a' | ||
| import { AgentBlock } from '@/blocks/blocks/agent' | ||
| import { ApiBlock } from '@/blocks/blocks/api' | ||
| import { ApiTriggerBlock } from '@/blocks/blocks/api_trigger' | ||
| import { ChatTriggerBlock } from '@/blocks/blocks/chat_trigger' | ||
| import { ConditionBlock } from '@/blocks/blocks/condition' | ||
| import { CredentialBlock } from '@/blocks/blocks/credential' | ||
| import { DeploymentsBlock } from '@/blocks/blocks/deployments' | ||
| import { EnrichmentBlock } from '@/blocks/blocks/enrichment' | ||
| import { EvaluatorBlock } from '@/blocks/blocks/evaluator' | ||
| import { FileV5Block } from '@/blocks/blocks/file' | ||
| import { FunctionBlock } from '@/blocks/blocks/function' | ||
| import { GenericWebhookBlock } from '@/blocks/blocks/generic_webhook' | ||
| import { InputTriggerBlock } from '@/blocks/blocks/input_trigger' | ||
| import { GuardrailsBlock } from '@/blocks/blocks/guardrails' | ||
| import { HumanInTheLoopBlock } from '@/blocks/blocks/human_in_the_loop' | ||
| import { ImapBlock } from '@/blocks/blocks/imap' | ||
| import { KnowledgeBlock } from '@/blocks/blocks/knowledge' | ||
| import { ManualTriggerBlock } from '@/blocks/blocks/manual_trigger' | ||
| import { LogsV2Block } from '@/blocks/blocks/logs' | ||
| import { McpBlock } from '@/blocks/blocks/mcp' | ||
| import { MemoryBlock } from '@/blocks/blocks/memory' | ||
| import { NoteBlock } from '@/blocks/blocks/note' | ||
| import { ResponseBlock } from '@/blocks/blocks/response' | ||
| import { RouterBlock } from '@/blocks/blocks/router' | ||
| import { RouterV2Block } from '@/blocks/blocks/router' | ||
| import { RssBlock } from '@/blocks/blocks/rss' | ||
| import { ScheduleBlock } from '@/blocks/blocks/schedule' | ||
| import { SearchBlock } from '@/blocks/blocks/search' | ||
| import { SimWorkspaceEventBlock } from '@/blocks/blocks/sim_workspace_event' | ||
| import { StartTriggerBlock } from '@/blocks/blocks/start_trigger' | ||
| import { StarterBlock } from '@/blocks/blocks/starter' | ||
| import { TableBlock } from '@/blocks/blocks/table' | ||
| import { TranslateBlock } from '@/blocks/blocks/translate' | ||
| import { VariablesBlock } from '@/blocks/blocks/variables' | ||
| import { WorkflowBlock } from '@/blocks/blocks/workflow' | ||
| import { WaitBlock } from '@/blocks/blocks/wait' | ||
| import { WebhookRequestBlock } from '@/blocks/blocks/webhook_request' | ||
| import { WorkflowInputBlock } from '@/blocks/blocks/workflow_input' | ||
| import type { BlockConfig, BlockMeta } from '@/blocks/types' | ||
|
|
||
| /** | ||
| * Dev-only minimal block maps. Swapped in for `@/blocks/registry-maps` via a | ||
| * resolve-alias when `SIM_DEV_MINIMAL_REGISTRY=1` (see next.config.ts) so the | ||
| * dev server only compiles a curated core set of block configs instead of all | ||
| * ~268. Only these blocks resolve in the editor/executor in minimal mode; unset | ||
| * the flag for the full set. NEVER aliased in production. | ||
| * ~268. The set is drawn from the canonical, toolbar-visible blocks | ||
| * (`category: 'blocks'` / `'triggers'`, not `hideFromToolbar`, always the latest | ||
| * version — never a superseded one). The ~247 `category: 'tools'` integrations | ||
| * are excluded (that is the heavy graph minimal mode exists to skip), and so are | ||
| * a few heavy or rarely-core-dev blocks pruned by hand: `mothership` and `pi` | ||
| * (chunkiest configs), the media blocks `tts` / `stt_v2` / `image_generator_v2` | ||
| * / `video_generator_v3`, and the `circleback` meeting-notetaker integration | ||
| * trigger. Only these blocks resolve in the editor/executor in minimal mode; | ||
| * unset the flag for the full set. NEVER aliased in production. | ||
| */ | ||
| export const BLOCK_REGISTRY: Record<string, BlockConfig> = { | ||
| a2a: A2ABlock, | ||
| agent: AgentBlock, | ||
| api: ApiBlock, | ||
| api_trigger: ApiTriggerBlock, | ||
| chat_trigger: ChatTriggerBlock, | ||
| condition: ConditionBlock, | ||
| credential: CredentialBlock, | ||
| deployments: DeploymentsBlock, | ||
| enrichment: EnrichmentBlock, | ||
| evaluator: EvaluatorBlock, | ||
| file_v5: FileV5Block, | ||
| function: FunctionBlock, | ||
| generic_webhook: GenericWebhookBlock, | ||
| input_trigger: InputTriggerBlock, | ||
| guardrails: GuardrailsBlock, | ||
| human_in_the_loop: HumanInTheLoopBlock, | ||
| imap: ImapBlock, | ||
| knowledge: KnowledgeBlock, | ||
| manual_trigger: ManualTriggerBlock, | ||
| logs_v2: LogsV2Block, | ||
| mcp: McpBlock, | ||
| memory: MemoryBlock, | ||
| note: NoteBlock, | ||
| response: ResponseBlock, | ||
| router: RouterBlock, | ||
| router_v2: RouterV2Block, | ||
| rss: RssBlock, | ||
| schedule: ScheduleBlock, | ||
| search: SearchBlock, | ||
| sim_workspace_event: SimWorkspaceEventBlock, | ||
| start_trigger: StartTriggerBlock, | ||
| starter: StarterBlock, | ||
| table: TableBlock, | ||
| translate: TranslateBlock, | ||
| variables: VariablesBlock, | ||
| workflow: WorkflowBlock, | ||
| wait: WaitBlock, | ||
| webhook_request: WebhookRequestBlock, | ||
| workflow_input: WorkflowInputBlock, | ||
|
Comment on lines
+70
to
+81
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When |
||
| } | ||
|
|
||
| export const BLOCK_META_REGISTRY: Record<string, BlockMeta> = {} | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When
SIM_DEV_MINIMAL_REGISTRY=1loads a saved or fixture workflow that still storesstarter,router,workflow, or the removed trigger ids, persistence keeps those blocktypevalues and later registry validation cannot resolve them. Existing dev:minimal workflows can then fail validation or execution instead of loading through a compatibility alias or block-type migration.