npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@crewhaus/preflight

v0.5.8

Published

Typed pre-spawn health checks for harnesses: spec lint, provider-credential matrix, channel boot-gate env refs, MCP secret-ref dry-run, port availability, bundle freshness, and durability warnings

Downloads

1,372

Readme

@crewhaus/preflight

Typed pre-spawn health checks for harnesses. Instead of spawning a process and relaying the stack trace it dies with, run the checks first and render a report: "will not boot: SLACK_SIGNING_SECRET unset".

import { runPreflight } from "@crewhaus/preflight";

const report = await runPreflight({
  harnessDir: "/path/to/harness", // reads crewhaus.yaml, stats dist/
  env: mergedEnv,                 // the env the spawn would receive
});
if (!report.ok) {
  for (const item of report.blocking) console.error(item.message);
}

PreflightReport is { ok, blocking, items }; each PreflightItem carries a stable id, an area (spec | credentials | channels | mcp | ports | bundle | durability), a level (info | warn | blocking), a message, and optional remediation / envVar fields (the fleet credentials matrix keys on envVar).

Areas

| Area | What runs | Blocking when | |---|---|---| | spec | parseSpecIssues from @crewhaus/spec, plus caller-injected compiler warnings (this package never runs the compiler itself) | any spec issue — parseSpec (and so the compiler) throws on all of them | | credentials | provider env-var matrix over the UNION of every model the spec can route to: agent.model, model_fallbacks, model_tiers, model_pool candidates, the evaluation judge model, the budget degrade model — mapped through the @crewhaus/model-router grammar | a required key group is unset (Bedrock, Vertex ADC, and local/ endpoints are informational — their credentials are ambient or unneeded) | | channels | the channel daemon's boot-gate secret env refs, offline (pure env presence — the exact set the compiled daemon exits 2 on) | an env-ref secret is unset, or a credential value would fail compilation | | mcp | dry-run of boot-time secret-ref resolution via @crewhaus/mcp-host, plus lint for $FOO/${FOO} literals (the MCP transports never expand $… values) and credentials pasted inline | an env-ref is unset (the predicted ConfigError is the byte-identical one the boot would throw) | | ports | bindability of gateway.port, a numeric PORT env, and any caller-requested ports | a port is already in use | | bundle | crewhaus.yaml vs newest dist/ mtime — labelled approximate; the FreshnessComparator seam accepts an exact spec-hash comparator once bundle manifests record one | never (warn only) | | durability | channel daemon without CREWHAUS_DEDUP_STORE; live provider credentials with no budget: block | never (warn only) |

Env injection

Every core function takes an explicit env: Record<string, string | undefined> — nothing reads process.env except the preflightHarness convenience wrapper. Pass the MERGED environment the spawn would actually receive (harness .env chain layered under the manager's env), and the same checks serve tests, CI, and a fleet manager identically.

Extracted cores

The doctor-compatible credential checks (buildCredentialChecks, selectedProvider, providerCredentialsSatisfied, providerEnvStubs, modelCredentialGroups, modelCredentialChecks) and the channel boot-gate checks (platformSecretRefs, channelEnvChecks, buildChannelEnvSummaryChecks) preserve the CLI's check semantics and messages, returning the shared { label, pass, warn?, reason? } shape, so crewhaus doctor and crewhaus channel verify --offline can consume them directly. Channel inputs are structural (SecretRef mirrors the IR's secret-ref shape), so both a compiler-lowered IrChannels and lowerSpecChannels(rawSpecChannels) fit.