@b4run/core
v0.12.0
Published
Low-level B4.run APIs for route discovery, configuration, state resolution, and type generation.
Maintainers
Readme
@b4run/core
Low-level B4.run APIs for configuration, capabilities, route discovery, state resolution, and type generation.
Use this when: You are building B4.run integrations or tooling below the author-facing SDK. Direct route authors should use @b4run/sdk instead.
Install
pnpm add @b4run/coreExample
The root export includes the typed configuration helper and pure type renderers:
import { config, renderB4Types } from "@b4run/core"
export const appConfig = config({
build: { targets: ["node"] },
})
export const declarations = renderB4Types({ appRoot: "/app", routes: [] }, [])Runtime and stability
@b4run/coreis an edge-safe, low-level integration surface.@b4run/core/nodeis a Node-only, low-level surface for filesystem discovery and compiler-backed extraction.@b4run/core/internal/compileris Node-only and internal. Application and integration code must not depend on it.
Importing /node registers the disk-backed b4.config.ts loader. The root stays free of that filesystem-loader edge so static runtimes can seed configuration instead.
Related
@b4run/sdk— author-facing agents, tools, middleware, and route contracts.@b4run/cli— route discovery, type generation, development, and builds.- Core API reference — complete exports and surface boundaries.
- Routes guide — B4.run's application and filesystem route model.
Maturity and support
This package is pre-1.0 and releases in B4.run's fixed package group. Review the changelog before upgrading. For support, open an issue.
License
MIT. See the repository license.
