Skip to content

Add external Codemode runtime adapter example - #28

Draft
scuffi wants to merge 1 commit into
mainfrom
workspace-codemode-adapter
Draft

Add external Codemode runtime adapter example#28
scuffi wants to merge 1 commit into
mainfrom
workspace-codemode-adapter

Conversation

@scuffi

@scuffi scuffi commented Jul 31, 2026

Copy link
Copy Markdown

Summary

  • adapt @cloudflare/codemode to the Computer runtime through a private trusted module
  • scope providers and connectors to one serialized execution token at a time
  • preserve finite structured values, typed binary data, and undefined across the runtime bridge
  • isolate generated codec helpers from provider namespace shadowing
  • provide one focused Durable Object and POST /run reference harness
  • keep Codemode outside @cloudflare/computer core

Trust model

The adapter backend is host-owned and private. Execution tokens grant only the providers/connectors installed for that call. The executor serializes calls, the dispatcher rejects overlapping tokens, and authority is revoked before retained execution cleanup. The checked-in HTTP route accepts no caller code, provider set, backend, or Workspace identity. It remains an unauthenticated local harness; production services must add tenant identity, authorization, and quotas.

Validation

  • npm run check
  • npm run build --workspaces --if-present
  • npm run typecheck
  • npm test --workspaces --if-present
  • Codemode: 2 files / 13 tests
  • npx wrangler deploy --dry-run --outdir /tmp/computer-codemode-final
  • npm ci --ignore-scripts --dry-run --no-audit --no-fund
  • git diff --check origin/main..HEAD

@pkg-pr-new

pkg-pr-new Bot commented Jul 31, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/cloudflare/computer/@cloudflare/computer@28

commit: 509bf0d

@aron-cf
aron-cf changed the base branch from workspace-runtime-execution to workspace-javascript-backend July 31, 2026 12:11
@scuffi
scuffi force-pushed the workspace-codemode-adapter branch 3 times, most recently from 6b8cd20 to be031a6 Compare July 31, 2026 12:35
Base automatically changed from workspace-javascript-backend to workspace-runtime-execution July 31, 2026 14:14
Base automatically changed from workspace-runtime-execution to main July 31, 2026 14:19
@scuffi
scuffi force-pushed the workspace-codemode-adapter branch from be031a6 to c6048e3 Compare July 31, 2026 14:38
@aron-cf aron-cf closed this Jul 31, 2026
@aron-cf
aron-cf force-pushed the workspace-codemode-adapter branch from c6048e3 to f1cf132 Compare July 31, 2026 14:38
@scuffi scuffi reopened this Jul 31, 2026
@scuffi
scuffi force-pushed the workspace-codemode-adapter branch from c6048e3 to 509bf0d Compare July 31, 2026 15:10
@aron-cf

aron-cf commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Trying to figure out if we need this on top of the existing backend. I'm not sure what it would be used for. What are your thoughts?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants