Pulse is a compiler-driven TypeScript application layer for small, portable edge and WebAssembly services.
Write an application with Pulse or the low-level Router, configure it in
.pulse/config.ts, and use one CLI to test, run, and build it. Each profile
explicitly selects a provider and a Native or JavaScript target.
Start here
Section titled “Start here”Use Node.js 22.14 or newer on the 22.x line, or Node.js 24.x, with npm.
Create a project with the published Beta CLI:
npm exec --package=@pulse-compute/cli@1.0.0-beta.10 -- pulse init ./my-appcd ./my-appnpm installnpm run doctornpm testpulse init writes exact package versions but does not install them.
npm install installs the dependencies, including the project's local CLI;
no global install is needed.
Start the local server:
npm run devOpen http://127.0.0.1:8787/ to see Pulse is running, or
http://127.0.0.1:8787/health for {"ok":true}.
Stop the foreground server with Ctrl+C, then build:
npm run buildFrom a repository checkout with lockfile-pinned dependencies restored, use
pnpm pulse -- init ./my-app for the first command instead.
Use npm run inspect when you need the compiler/provider plan.
npm run compile is the advanced provider-neutral Wasm workflow and requires
Native-compatible source. Neither command is required before npm run build.
See the
project lifecycle guide.
Example
Section titled “Example”This complete handler comes from
examples/01-hello-json/src/index.ts:
import { Pulse } from '@pulse-compute/pulse'
const app = new Pulse({ auto: true })
app.get('/health', async (ctx) => ctx.json({ ok: true }))app.get('/hello', async (ctx) => ctx.json({ message: 'hello from Pulse' }))app.get('/*', async (ctx) => ctx.text('not found', { status: 404 }))
export default appThe matching configuration explicitly selects Node Native:
import { defineConfig } from '@pulse-compute/pulse'
export default defineConfig((_scope) => ({ pulse: { entry: 'src/index.ts', tests: 'tests/pulse.harness.ts', defaultProfile: 'local', strict: true, }, local: { host: 'node', target: 'native', outDir: 'dist', dev: { host: '127.0.0.1', port: 8787 }, },}))Native lowering erases the async wrapper and lowers only trusted Pulse effects; it does not add a Promise runtime or Asyncify. JavaScript executes the reachable source graph and live packages. See compilation and lowering.
canonical TypeScript→ pulse CLI├→ Native: whole-project lowering → effects/continuations → Node or Fastly Wasm└→ JavaScript: reachable source graph → live packages → Node or Fastly lifecycleImplemented Beta surface
Section titled “Implemented Beta surface”Pulse currently supports:
- request method, URL, path, headers, text, and JSON;
- explicit TypeScript JSON schemas compiled with the project;
- branching and structured value manipulation;
- schema-bound
ctx.callcomputations, embedded binary resources and numeric workspaces on their documented targets; - static
Routerauthoring with mounted exact, parameter, wildcard, GET, HEAD, POST, PUT, PATCH, and DELETE routes; - single, grouped, and dependent outbound fetches;
- JSON, text, custom, and direct pass-through responses;
- provider-neutral config, secret, and KV capabilities;
- synchronous thresholded
ctx.log.error|warn|info|debugwith redaction; - opaque binary/stream pass-through without userland inspection;
- package-root GRIP framing/broadcast and Assets realization;
- explicit Node Native, Node JavaScript, Fastly Native, and Fastly JavaScript modes;
- deterministic JavaScript source packages and offline Fastly deployment candidates;
init,doctor,inspect,test,dev,compile, andbuildthrough one CLI.
All four modes share one conformance corpus and never substitute targets automatically. Candidate validation is offline: it does not deploy, activate, or publish a Fastly service.
The Beta deliberately does not expose general Promise-based Native semantics, provider SDKs, ambient environment authority, arbitrary binary inspection, general userland stream transforms, background tasks, or raw sockets. The separate experimental Node finite-output and UTF-8 transform opt-ins retain their documented limits and qualification status; see body handling.
Public packages
Section titled “Public packages”The public 1.0.0-beta.10 catalog is defined by the release manifest.
| Package | Role |
|---|---|
@pulse-compute/pulse | Conventional application root, deferred project configuration, schema declarations, and runtime type re-exports. |
@pulse-compute/runtime | Canonical provider-neutral application types, plain handlers, and the static Router authoring surface. |
@pulse-compute/cli | Project configuration and the supported pulse workflow. |
@pulse-compute/provider-fastly | Typed Fastly configuration, Native lowering, JavaScript execution, local conformance, and Compute target generation. |
@pulse-compute/grip | Stateless GRIP framing and request-bound broadcast across supported targets. |
@pulse-compute/assets | JavaScript asset runtime and package-owned Native lookup lowering. |
@pulse-compute/crypto | Bounded HS256, ES256 and RS256 verification, plus exact-text SHA-256. |
@pulse-compute/jwt | Bounded provider-neutral JWT verification, issuance and claims validation. |
@pulse-compute/entities | Statically declared schema-backed operations with the first-party JSON-RPC adapter. |
@pulse-compute/mcp | Static /pulse MCP binding with local Entities dispatch, plus separate root Fetch and /node host adapters. |
@pulse-compute/s3 | Bounded exact-key object reads and writes on supported Node and Fastly Native targets. |
@pulse-compute/pulse and @pulse-compute/runtime are layered public
application contracts: the former owns conventional project ergonomics and the
latter owns the low-level portable runtime surface. Native and JavaScript
execution are explicitly selected targets over the same canonical model; Pulse
never changes targets automatically.
Documentation
Section titled “Documentation”The public Pulse site introduces the compiler and links into the layered documentation. Exact hosted documentation is release-pinned; repository Markdown remains the reviewable source.
- Documentation index
- Changelog
- Public-site and documentation presentation system
- Getting started
- Project lifecycle
- Handler authoring and target compatibility
- Node build and execution
- Fastly deployment candidates
- Beta scope
- Task-oriented guides
- Concepts: lowering, effects, bodies, and providers
- Package guides and support policy
- API, CLI, config, diagnostics, and environment reference
- Contributor tutorials
- Maintainer governance and support
- Release acceptance
Maintenance and support
Section titled “Maintenance and support”Pulse uses a repository-encoded resident-maintainer control plane. Codex can classify, review, reproduce, document, and prepare bounded patches; human maintainers retain architecture, merge, repository-setting, and release authority.
Run npm run maintainer:check before opening a pull request.
Portable dependency bundle and restore tooling is distributed separately from the source snapshot. A handoff should pair this repository with a target-specific dependency archive and its matching verified restore script; the source workspace does not expose stale versioned wrapper commands.
Examples
Section titled “Examples”The top-level examples/ directory contains complete canonical projects for JSON responses, schemas, fetch workflows, Fastly capabilities, opaque proxying, GRIP, and static Router lowering. Each example can be driven with the same CLI commands used by a normal project.
License
Section titled “License”Pulse is licensed under the Apache License 2.0.