Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 45 additions & 16 deletions apps/sim/blocks/registry-maps.minimal.ts
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,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Legacy Block Types Stop Resolving

When SIM_DEV_MINIMAL_REGISTRY=1 loads a saved or fixture workflow that still stores starter, router, workflow, or the removed trigger ids, persistence keeps those block type values 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.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Legacy Block Types Disappear

When SIM_DEV_MINIMAL_REGISTRY=1 opens a saved workflow containing router, workflow, starter, or the older trigger types, getBlock(type) can no longer resolve the persisted type and the serializer throws Invalid block type. The executor still recognizes those IDs and there is no load-time type migration, so older dev workflows can fail to open or save in minimal mode.

}

export const BLOCK_META_REGISTRY: Record<string, BlockMeta> = {}
Loading