-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Summary
Extract the node library into a standalone package (@dafthunk/nodes) to enable tree-shaking, code splitting, and clearer boundaries between node definitions and platform-specific execution.
Key components to move
apps/api/src/nodes/base-node-registry.ts- Registry patternapps/api/src/nodes/types.ts-ExecutableNodebase class and parameter types- All category folders (
anthropic/,text/,image/, etc.) apps/api/src/nodes/parameter-mapper.ts- API ↔ node format conversion
Decoupling required
- Abstract
NodeContextto remove direct Cloudflare bindings (env.DB,env.AI,env.RESSOURCES) - Convert
cloudflare-node-registry.tsto dynamic/lazy loading - Create
NodeEnvironmentinterface for storage, secrets, and AI providers - Separate nodes by tier: core (no deps) → integration (API deps) → AI (provider deps)
Dependencies
@dafthunk/types(already shared)- ~50+ npm packages for specific integrations
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels