Adapters

The lowest-level path is the standard handler, initDevframe(def, { base }): a Web Standard (request: Request) => Promise<Response> for any catch-all route. Every path below builds on it.

The lowest-level path is the standard handler, initDevframe(def, { base }): a Web Standard (request: Request) => Promise<Response> for any catch-all route. Every path below builds on it.

Adapters wrap it as createXxx(def, options?) at devframe/adapters/<name>. cac needs an optional peer (cac).

Comparison

Entry pointModuleFactoryBest for
Standard Handlerdevframe/initiateinitDevframe(def, { base })Raw handler
cacdevframe/adapters/caccreateCac()Standalone tools
devdevframe/adapters/devcreateDevServer()Dev server
builddevframe/adapters/buildcreateBuild()Static snapshots
vite@vitejs/devtools-kit/nodecreatePluginFromDevframe()Vite DevTools
embeddeddevframe/adapters/embeddedcreateEmbedded(def, { ctx })Runtime
mcpdevframe/adapters/mcpcreateMcpServer()Coding agents

Mount paths

SPA basePath depends on the adapter:

Adapter kindDefault basePathReason
cli, build (standalone)/Owns the origin.
vite, embedded (hosted)/__<id>/Shares a host framework's origin.

Override with DevframeDefinition.basePath:

defineDevframe({
  id: 'my-tool',
  basePath: '/devframes/', // force this base regardless of adapter
  setup(ctx) { /* … */ },
})

The SPA discovers its base at runtime; see Client.