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

@umbraculum/automation-contracts

v0.2.0

Published

Canonical automation module contract types: Modbus mailbox shape, adapter SDK types, contract-version handshake. Vessel-agnostic platform contract; sister-repo emits JSON-only mailbox artifacts that this package mirrors at build time. Phase A surface per

Downloads

586

Readme

@umbraculum/automation-contracts

Phase A surface of the canonical automation module: typed Modbus mailbox spec, adapter SDK contract, and contract-version handshake.

[!NOTE] Part of Umbraculum. This package landed under the new @umbraculum/* scope as sub-plan #9 slot 4 (2026-05-19) per RFC-0002 Decision C; see docs/design/brewery-scope-migration-plan.md. The sister repo (brewery-alarms-tanks-supervisor) emits JSON-only mailbox artifacts and does not import this package, so the rename was doc-only on the sister side.

Install

npm install @umbraculum/automation-contracts@^0.0.1

Public alpha — see third-party-module.md.

What this is

MIT-licensed contract types for the canonical automation module (docs/design/canonical-automation-module-surface.md, Accepted 2026-05-19).

Four exported surfaces:

  • CONTRACT_VERSION + classifyContractVersionSkew — version-handshake primitives. Mismatch policy per design §12.2: major → adapter refuses, minor → warn on adapterHealth, patch → silent. Bumped from 0.0.0-dev to 2.0.1-dev in Phase A step 5 (tracks the sister-repo integrated release tag).
  • MailboxSpec / MailboxEntry types — typed mirror of the OpenPLC sister-repo PI_* mailbox. The actual PI_* address map is owned by the sister repo and emitted as a checked-in artifact (M2 mechanism, design §12.2).
  • MAILBOX_SPEC constant — the validated, frozen mirror of the sister-repo artifact. 356 entries as of 2.0.1-dev. Loaded from data/mailbox.json and asserted at module-load time (loud failure on drift). Adapters consume this constant rather than reading the JSON directly.
  • AutomationAdapterDefinition — the adapter SDK contract that brewery.openplc.v1 (and future adapters) implements. Phase A declares the type; Phase C lands the first reference adapter.

Scope

  • Contains: TypeScript types, the CONTRACT_VERSION constant, the validated MAILBOX_SPEC constant, and helper functions for version classification and mailbox lookup.
  • Does not contain: any runtime Modbus client, Prisma models, route handlers, or AI tool implementations.

Mailbox mirror — sync procedure

The address map at data/mailbox.json is byte-for-byte identical to out/mailbox.json emitted by the sister repo brewery-alarms-tanks-supervisor (tools/build_mailbox_artifact.py). The sister repo is the single source of truth for PI_* names, addresses, and semantics; this package mirrors that artifact via PR (M2 mechanism, design §12.2).

To refresh the mirror:

# In the OpenPLC sister repo: regenerate the artifact (after editing LOCATED_VAR_BLOCK)
cd "$SISTER_REPO"
make mailbox-artifact
make test-tools

# Back in umbraculum-dev: copy the artifact in
bash scripts/sync-automation-mailbox-mirror.sh

# Drift check (CI-friendly)
bash scripts/sync-automation-mailbox-mirror.sh --check

# Point at your sister-repo checkout (required if not already exported)
SISTER_REPO=/path/to/openplc-sister-repo bash scripts/sync-automation-mailbox-mirror.sh

Never hand-edit data/mailbox.json. Bump CONTRACT_VERSION in src/version.ts whenever the sister-repo INTEGRATED_RELEASE_TAG moves — both move together per the integrated-release-versioning baseline rule.

Phase coupling

| Phase | What lives here | |---|---| | A — Contracts (Q3 2026) | Types + CONTRACT_VERSION constant. This package, today. | | B — Read path (Q3–Q4 2026) | Consumed by services/api/src/modules/automation/ (Prisma schema, vesselState, listVessels). | | C — Brewery adapter (Q4 2026) | Concrete AutomationAdapterDefinition implementation in a brewery package; imports the mailbox artifact emitted by the sister repo. | | D — Alarms (Q4 2026) | AutomationAlarmEvent types added here when alarm capability is enabled. | | E — Write proposals (H1 2027+) | applyCommand capability and proposal types. |

Build / test / typecheck (local)

From repo root (run Node/npm inside the project container, not on the host — see the root README.md for service/container setup; the local-only DEVELOPMENT.md is per-developer and gitignored):

  • Build: npm run build -w @umbraculum/automation-contracts
  • Test: npm run test -w @umbraculum/automation-contracts
  • Typecheck: npm run typecheck -w @umbraculum/automation-contracts

Cross-references