Skip to content

[codex] Polish app-server APIs and examples - #9

Merged
jrkropp merged 1 commit into
mainfrom
codex/package-polish-cloudflare-release
May 12, 2026
Merged

[codex] Polish app-server APIs and examples#9
jrkropp merged 1 commit into
mainfrom
codex/package-polish-cloudflare-release

Conversation

@jrkropp

@jrkropp jrkropp commented May 12, 2026

Copy link
Copy Markdown
Owner

Summary

Polishes codex-js as a Codex-aligned SDK and replaces the old examples with a canonical local Node example plus a by-the-book Cloudflare Worker + Durable Object + Vite React example.

What Changed

  • Added stable server helpers in @jrkropp/codex-js/server:
    • createCodexAppServer
    • createCodexAppServerConnection
    • defineDynamicTool
    • defineDynamicToolset
    • dynamicToolResponse
    • pending server-request and connection snapshot contracts
  • Added dynamic tool validation and server-executed tool auto-resolution while preserving client-resolved tool escape hatches.
  • Added app-server connection snapshot support for reconstructable runtimes, including Durable Object WebSocket hibernation use cases.
  • Renamed internal bespoke_event_handling terminology to app_server_event_mapping.
  • Replaced the previous examples with:
    • examples/node-local: local Vite + Node WebSocket app-server example.
    • examples/cloudflare: Vite React + Cloudflare Worker + Durable Object example with one-time WebSocket tickets, SQLite-backed thread state, hibernating WebSockets, and dynamic tools.
  • Uses Cloudflare's standard secret handling for the example: .dev.vars locally, wrangler secret put for deploys, generated Worker types, and secrets.required in Wrangler config.
  • Moved internal parity/mirror/reference docs out of package roots and updated public READMEs around the intended developer path.
  • Added real static linting with ESLint.
  • Bumped both packages to 0.3.0 for the pre-1.0 API/example polish release.

Validation

  • pnpm check
  • pnpm release:preflight
  • NPM_TOKEN=local-preflight pnpm release:preflight
  • pnpm --filter @jrkropp/codex-js-cloudflare-example cf:types:check
  • pnpm --filter @jrkropp/codex-js-cloudflare-example typecheck
  • pnpm --filter @jrkropp/codex-js-cloudflare-example test
  • pnpm --filter @jrkropp/codex-js-cloudflare-example deploy:dry-run

Release Notes

No changeset file is included because package versions are already set to 0.3.0 and both published npm packages are currently below that version. The main release workflow should publish @jrkropp/codex-js@0.3.0 and @jrkropp/codex-js-react@0.3.0 directly after this lands.

@jrkropp
jrkropp merged commit 36431e6 into main May 12, 2026
1 check passed
@jrkropp
jrkropp deleted the codex/package-polish-cloudflare-release branch May 12, 2026 22:16
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.

1 participant