@phreshos/server
v0.1.50
Published
The SDK used by a Program's server endpoint.
Maintainers
Readme
@phreshos/server
The runtime adapter for a PhreshOS Program's Server Endpoint.
Documentation · Server Context · Communication · Source
Role
The Server SDK exposes the complete Core system contract and the current
Server context inside both supported execution modes: supervised child
processes and System-owned Workers.
It adapts the execution boundary without redefining Program, Process, Endpoint, or Service. The System remains authoritative for execution, persistence, routing, and host capabilities.
Installation
| Package manager | Command |
| --- | --- |
| npm | npm install @phreshos/server |
| pnpm | pnpm add @phreshos/server |
| Bun | bun add @phreshos/server |
| Yarn | yarn add @phreshos/server |
@phreshos/core is a peer dependency.
import { context, system } from "@phreshos/server"
context.answer("counter.read", async () => ({ value: 1 }))
const program = await context.program()
const appearance = await system.appearance.snapshot()See Server SDK for the complete entry points and execution contract.
Development
bun install --frozen-lockfile
bun run verifyverify checks the types, both execution adapters, System operations, build,
and published package shape.
check performs static checks, build creates distributable output, and test
runs Vitest assertions from tests/. Run build before testing built artifacts.
verify runs check, build, and test in order. Operational tooling belongs
in scripts/; tests and their fixtures belong in tests/. Verification uses
the committed dependency graph without local package substitutions.
Related repositories
@phreshos/coreis the one public import path for every shared contract and domain class implemented by these handles.@phreshos/clientadapts the paired Client Endpoint boundary.@phreshos/nodeexposes the same System contract to external Node.js code.- PhreshOS System owns execution, persistence, and routing.
Contributing
See CONTRIBUTING.md for the repository workflow and SECURITY.md for private vulnerability reporting.
License
Licensed under the MIT License. Copyright © 2026 Zohayr SLILEH.
