Compatibility: Pactmark 0.1.x. These entrypoints are adapter-boundary fixtures, not deployed servers. Durable storage, sandboxing and background wake-ups are deliberately unsupported here.

Run it

All three entrypoints use the same deterministic fixture and return a normalized contract result. No provider key, no network.

What it proves

Figure 1. That the top band is genuinely portable. This example is the executable form of the dependency rule — if core, runtime, policy, evidence or agent acquired a Node import, one of these entrypoints would stop compiling.

The structure

Everything above entrypoints/ is unchanged across all three. The entrypoints are thin by construction:

How to keep your own agent portable

No Node built-ins in shared code

No node:fs, node:path, node:crypto. Use the ports the runtime gives you.

No ambient environment reads

process.env belongs in the entrypoint, passed in via readEnvironment.

No provider SDKs in shared code

Model access goes through an adapter that the entrypoint composes.

Web-standard APIs only

Request, Response, ReadableStream, AbortSignal, TextEncoder.
The fastest way to enforce this is to keep compiling the Cloudflare entrypoint even if you never deploy it. It is a very effective lint.

Portability is not capability

The same agent will not do the same things everywhere. A Worker cannot offer Node-only executors, stdio MCP, local filesystem assumptions or the Postgres worker driver. An agent that declares requiredRuntimeCapabilities the runtime cannot provide fails with KAF_RUNTIME_CAPABILITY_MISSING before it starts — which is the correct behaviour, not a limitation to work around.

What it does not prove

These entrypoints are adapter-boundary fixtures. A passing test means the adapter surface is correct in the same process. It does not mean any of them is deployed, durable, or production-ready — durable storage, sandboxing and background wake-ups are explicitly unsupported in this example.

Deployment overview

What each target is actually evidenced to do.

Architecture

The dependency rule this example enforces.