perf(dev): curate SIM_DEV_MINIMAL_REGISTRY to core toolbar blocks (#5251)

Rebuild the dev-only minimal block registry from the canonical, toolbar-visible
core (category blocks/triggers, not hideFromToolbar, latest version). Adds the
visible workflow_input and table blocks (previously only the hidden `workflow`
was present, so the Workflow block never rendered in dev:minimal), drops the
superseded/hidden entries (api_trigger, chat_trigger, input_trigger,
manual_trigger, router, starter, workflow), and hand-prunes the heaviest /
rarely-core-dev blocks (mothership, pi, tts, stt_v2, image_generator_v2,
video_generator_v3, circleback).

Dev-only, gated on SIM_DEV_MINIMAL_REGISTRY=1; never aliased in production.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Theodore Li
2026-06-29 15:17:42 -04:00
committed by GitHub
co-authored by Claude Opus 4.8
parent 27b2a4f585
commit a6196e0c86
+45 -16
View File
@@ -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,
}
export const BLOCK_META_REGISTRY: Record<string, BlockMeta> = {}