-
Notifications
You must be signed in to change notification settings - Fork 131
feat: Convert HTTP Request from system action to native plugin (plus other related changes) #94
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
Open
bensabic
wants to merge
16
commits into
vercel-labs:main
Choose a base branch
from
bensabic:plugins
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Plugin Templates & Documentation: - Update templates to new declarative structure (configFields, formFields with envVar, getTestFunction) - Remove obsolete files: settings.tsx.txt, steps/action/config.tsx.txt (now auto-generated) - Restructure: steps/action/step.ts.txt → steps/action.ts.txt - Rename: index.tsx.txt → index.ts.txt - Fix template placeholders to use valid identifiers (fieldA, resultId) so generated code compiles - Update CONTRIBUTING.md with streamlined plugin development guide Create Plugin Script: - Add interactive pnpm create-plugin wizard using @inquirer/prompts - Prompts for integration name, description, action name, and action description - Auto-replaces integration and action name placeholders in generated files - Auto-runs discover-plugins after scaffolding to register the plugin - Exit with error if template files are missing - Graceful Ctrl+C handling with ExitPromptError
This refactors the HTTP Request action from a hardcoded system action into a proper plugin under plugins/native/, making it extensible and consistent with the plugin architecture. ## New Plugin: Native Created plugins/native/ with: - index.ts: Plugin definition with HTTP Request action - icon.tsx: Globe icon for the Native category - steps/http-request.ts: Step function with execution logic - codegen/http-request.ts: Code generation template ## New Component: ObjectBuilder Added components/workflow/config/object-builder.tsx - a reusable component for building key-value pairs (similar to SchemaBuilder). Used for HTTP headers and body configuration instead of JSON editors. ## New Config Field Type Added 'object-builder' type to ActionConfigField in plugins/registry.ts and the corresponding renderer in action-config-renderer.tsx. ## Migration & Backward Compatibility - Added 'HTTP Request' -> 'native/http-request' legacy mapping - Updated codegen files to support both legacy and new action IDs - Existing workflows using "HTTP Request" will continue to work ## Optional Integration Support - Add requiresIntegration flag to plugin registry for plugins that don't need credentials - Add shared requiresIntegration() function to centralize integration checks - Hide Native plugin from integration setup dialog since it needs no config ## Integration Loading Optimization - Cache integrations in Jotai store for faster loading when switching actions - Prefetch integrations when workflow loads ## Cleanup Removed HTTP Request from system actions in: - lib/steps/http-request.ts (deleted) - lib/codegen-templates/http-request.ts (deleted) - lib/workflow-executor.workflow.ts - lib/steps/index.ts - components/workflow/config/action-config.tsx - components/workflow/nodes/action-node.tsx - components/workflow/config/action-grid.tsx ## Integration-Based HTTP Requests Added httpConfig to plugins for leveraging existing integrations: - New PluginHttpConfig type with baseUrl, authHeader, authPrefix, authCredentialKey - Added httpConfig to Resend, Slack, Firecrawl, and Linear plugins - New 'integration-select' field type for selecting HTTP-enabled integrations - HTTP Request step auto-injects auth headers from selected integration - Endpoint field shows baseUrl prefix when integration is selected ## JSON Editor for Request Body - New 'json-editor' field type using Monaco editor - Supports nested objects, arrays, numbers, booleans - Real-time JSON validation with error display - Replaced object-builder for HTTP body configuration ## Header Validation - Added validateKey/validateValue functions to ActionConfigField - Plugin-defined validation (validation logic lives in plugin, not renderer) - HTTP headers validated per Cloudflare rules (alphanumeric + hyphen/underscore) - Content-Type header blocked (auto-set to application/json) ## UI Improvements - TemplateBadgeInput supports optional prefix prop - Extracted PropertyRow component to reduce ObjectBuilder complexity - Horizontal scroll instead of wrap for long input values
Contributor
|
@bensabic is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
ctate
reviewed
Dec 2, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR refactors the HTTP Request action from a hardcoded system action into a proper plugin (
plugins/native/), making it extensible and consistent with the plugin architecture. Other related changes have also been made.New Plugin: Native
Created
plugins/native/with:index.ts: Plugin definition with HTTP Request actionicon.tsx: Globe icon for the Native categorysteps/http-request.ts: Step function with execution logiccodegen/http-request.ts: Code generation templateNew Components
ObjectBuilder
Added
components/workflow/config/object-builder.tsx- a reusable component for building key-value pairs (similar to SchemaBuilder). Used for HTTP headers configuration.IntegrationSelectField
Added integration selector component that displays HTTP-enabled integrations grouped by type. Allows selecting an existing integration to auto-inject authentication headers.
New Config Field Types
Added to
plugins/registry.tsandaction-config-renderer.tsx:object-builder: Key-value pair builder with validation supportintegration-select: Dropdown for selecting HTTP-enabled integrationsjson-editor: Monaco-based JSON editor with real-time validationIntegration-Based HTTP Requests
Plugins can now define
httpConfigfor HTTP integration support:PluginHttpConfigtype withbaseUrl,authHeader,authPrefix,authCredentialKeyhttpConfigto Resend, Slack, Firecrawl, and Linear pluginsPlugin System Enhancements
requiresIntegrationflag to hide plugins that don't need credentials from setup dialogrequiresIntegration()helper function to centralize integration checksHeader Validation
validateKey/validateValuefunctions to ActionConfigFieldIntegration Loading Optimization
Migration & Backward Compatibility
HTTP Request->native/http-requestlegacy mappingUI Improvements
Bug Fixes
defaultValue- fields with defaults (like HTTP Method) are no longer incorrectly flagged as missingCleanup
Removed HTTP Request from system actions:
lib/steps/http-request.tslib/codegen-templates/http-request.tslib/workflow-executor.workflow.ts,lib/steps/index.ts, and UI components