Skip to content

feat: support raw plugin HTTP requests and responses - #3073

Open
ttmx wants to merge 3 commits into
emdash-cms:mainfrom
ttmx:tteles/plugin-raw-requests-responses
Open

feat: support raw plugin HTTP requests and responses#3073
ttmx wants to merge 3 commits into
emdash-cms:mainfrom
ttmx:tteles/plugin-raw-requests-responses

Conversation

@ttmx

@ttmx ttmx commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds raw request and response support to native and sandboxed plugin API routes.

Plugin authors can set body: "text" or body: "bytes" to receive the decoded request body through ctx.input. Omitting body preserves the existing JSON and query-string behavior. Route handlers can return a Web API Response to control the response body, status, and headers without the standard JSON envelope.

The route options are preserved through both plugin bundlers and manifests. The workerd sandbox transports byte inputs as base64 and reconstructs custom responses across the isolate boundary.

Type of change

  • Bug fix
  • Feature (requires maintainer-approved Discussion)
  • Refactor (no behavior change)
  • Translation
  • Documentation
  • Performance improvement
  • Tests
  • Chore (dependencies, CI, tooling)

Checklist

AI-generated code disclosure

  • This PR includes AI-generated code — model/tool: OpenAI Codex (GPT-5.6 Sol/Terra/Luna)

Screenshots / test output

Not applicable; this PR does not change the UI.

Verified locally:

  • Core raw-route, cache, bundling, manifest, and route tests: 128 passed
  • Plugin CLI bundle tests: 12 passed
  • Workerd raw-route and response transport tests: 6 passed
  • Core, workerd, plugin CLI, and plugin-types typechecks
  • Type-aware lint, Oxfmt, Prettier, and documentation build

@changeset-bot

changeset-bot Bot commented Sep 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: cbc22c2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 23 packages
Name Type
emdash Minor
@emdash-cms/plugin-types Minor
@emdash-cms/plugin-cli Minor
@emdash-cms/cloudflare Minor
@emdash-cms/sandbox-workerd Minor
@emdash-cms/fixture-perf-site Patch
@emdash-cms/perf-demo-site Patch
@emdash-cms/cache-demo-site Patch
@emdash-cms/do-demo-site Patch
@emdash-cms/do-solo-demo-site Patch
@emdash-cms/admin Minor
@emdash-cms/registry-verification Patch
@emdash-cms/release-service Patch
@emdash-cms/labeler Patch
@emdash-cms/release-action Patch
@emdash-cms/release-verifier Patch
@emdash-cms/auth Minor
@emdash-cms/blocks Minor
create-emdash Minor
@emdash-cms/gutenberg-to-portable-text Minor
@emdash-cms/x402 Minor
@emdash-cms/auth-atproto Patch
@emdash-cms/plugin-embeds Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

Scope check

This PR changes 1,069 lines across 36 files. Large PRs are harder to review and more likely to be closed without review.

If this scope is intentional, no action needed. A maintainer will review it. If not, please consider splitting this into smaller PRs.

See CONTRIBUTING.md for contribution guidelines.

@ttmx
ttmx marked this pull request as ready for review September 11, 2026 18:25
@github-actions github-actions Bot added the review/needs-review No maintainer or bot review yet label Sep 11, 2026
@ttmx
ttmx force-pushed the tteles/plugin-raw-requests-responses branch from a6fe3a8 to 9393ca0 Compare September 11, 2026 18:41
@pkg-pr-new

pkg-pr-new Bot commented Sep 11, 2026

Copy link
Copy Markdown

Open in StackBlitz

@emdash-cms/admin

npm i https://pkg.pr.new/@emdash-cms/admin@3073

@emdash-cms/auth

npm i https://pkg.pr.new/@emdash-cms/auth@3073

@emdash-cms/auth-atproto

npm i https://pkg.pr.new/@emdash-cms/auth-atproto@3073

@emdash-cms/blocks

npm i https://pkg.pr.new/@emdash-cms/blocks@3073

@emdash-cms/cloudflare

npm i https://pkg.pr.new/@emdash-cms/cloudflare@3073

@emdash-cms/contentful-to-portable-text

npm i https://pkg.pr.new/@emdash-cms/contentful-to-portable-text@3073

emdash

npm i https://pkg.pr.new/emdash@3073

create-emdash

npm i https://pkg.pr.new/create-emdash@3073

@emdash-cms/gutenberg-to-portable-text

npm i https://pkg.pr.new/@emdash-cms/gutenberg-to-portable-text@3073

@emdash-cms/plugin-cli

npm i https://pkg.pr.new/@emdash-cms/plugin-cli@3073

@emdash-cms/plugin-types

npm i https://pkg.pr.new/@emdash-cms/plugin-types@3073

@emdash-cms/registry-client

npm i https://pkg.pr.new/@emdash-cms/registry-client@3073

@emdash-cms/registry-lexicons

npm i https://pkg.pr.new/@emdash-cms/registry-lexicons@3073

@emdash-cms/registry-moderation

npm i https://pkg.pr.new/@emdash-cms/registry-moderation@3073

@emdash-cms/registry-verification

npm i https://pkg.pr.new/@emdash-cms/registry-verification@3073

@emdash-cms/sandbox-workerd

npm i https://pkg.pr.new/@emdash-cms/sandbox-workerd@3073

@emdash-cms/x402

npm i https://pkg.pr.new/@emdash-cms/x402@3073

@emdash-cms/plugin-ai-moderation

npm i https://pkg.pr.new/@emdash-cms/plugin-ai-moderation@3073

@emdash-cms/plugin-atproto

npm i https://pkg.pr.new/@emdash-cms/plugin-atproto@3073

@emdash-cms/plugin-audit-log

npm i https://pkg.pr.new/@emdash-cms/plugin-audit-log@3073

@emdash-cms/plugin-color

npm i https://pkg.pr.new/@emdash-cms/plugin-color@3073

@emdash-cms/plugin-embeds

npm i https://pkg.pr.new/@emdash-cms/plugin-embeds@3073

@emdash-cms/plugin-field-kit

npm i https://pkg.pr.new/@emdash-cms/plugin-field-kit@3073

@emdash-cms/plugin-forms

npm i https://pkg.pr.new/@emdash-cms/plugin-forms@3073

@emdash-cms/plugin-webhook-notifier

npm i https://pkg.pr.new/@emdash-cms/plugin-webhook-notifier@3073

commit: cbc22c2

@ttmx
ttmx force-pushed the tteles/plugin-raw-requests-responses branch from 9393ca0 to 410f325 Compare September 11, 2026 22:51
@ttmx
ttmx force-pushed the tteles/plugin-raw-requests-responses branch from 410f325 to cbc22c2 Compare September 11, 2026 23:09
@github-actions

Copy link
Copy Markdown
Contributor

Overlapping PRs

This PR modifies files that are also changed by other open PRs:

This may cause merge conflicts or duplicated work. A maintainer will coordinate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant