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

@polydeukes/core

v0.3.0

Published

Polydeukes core — covenant protocol, config loader, and transcript interface. Domain- and agent-agnostic. Alpha.

Readme

@polydeukes/core

English · 한국어

The thin, domain- and agent-agnostic core of Polydeukes — a development discipline framework for building alongside an AI coding partner.

Alpha. The API surface may move between milestones; for anything not landed here, the repository's design docs are the source of truth.

What lives here

Every unit below is landed and tested — not blueprint:

  • Covenant protocol — the contract every covenant (a deterministic, mutually binding promise) speaks: input arrives as stdin-JSON (CovenantInput, parseInput), verdicts leave as exit codes. A covenant body only ever emits 0 (upheld) or 1 (broken, non-blocking); translating 1 into the blocking 2 is the wrapper's job. Parsing is fail-closed — an unjudgeable payload resolves to 2, never to a silent pass. Each tool call optionally carries its own fileChange — agent-neutral evidence as a discriminated union (create/modify/delete, deletion first-class) adapters fill from their own sources (virtual apply, git blobs) so delta judgments never touch disk; allFileChanges flattens it for consumers that need no attribution.
  • ROI telemetry — a single append-only, line-oriented collector (appendRecord, readRecords) plus the gain aggregation (runGain). Every package writes through this one collector — via appendRecordFailOpen, the shared fail-open wrapper. Observation is fail-open: a logging failure never changes a verdict.
  • Config schema v2 (config as data)defineConfig(unknown) validates parsed yml/json data. Unknown keys are rejected loudly at the level this package owns (a typo must not silently disable a discipline) while an adapter namespace's contents are its own adapter's to validate, testCmd is a {scope} template string compiled into a callable, and the matching JSON Schema ships as @polydeukes/core/schema.json — held equivalent to the validator by a contract test. The schema now includes disciplines: — user-declared discipline entries (forbid / immutable / forbidCommand / requirePrecedent, exactly one predicate each) validated here as pure data and compiled by the covenant package. requirePrecedent's evidence vocabulary is layered the way adapters: is: the core fully validates the command key (a shell command is the agent-crossing surface) and validates only the container shape of every other key — a flat object holding exactly one key — passing the value through verbatim for its owning adapter to judge.
  • Fail policy table — one table (resolveFailMode) decides fail-open vs fail-closed per failure kind; "cannot judge" always means block.
  • Protected-path normalizationnormalizeProtectedPaths turns the declared protectedPaths list into the literal path strings the dispatcher matches on (trim, prefix/suffix strip, dedupe). Adapter settings live in the adapters: namespace map — one object per adapter, contents validated by that adapter, passed through the core verbatim.
  • Canonical transcript seamCanonicalTranscript is the query interface covenants use to ask about session history: subagent invocations, user messages, and tool calls (findToolCalls, whose name and args are adapter-supplied values). The default is a noop, so an uninjected consumer converges on "nothing happened"; real transcripts stay behind adapters.

Invariants

  • Zero runtime dependencies. Validation is hand-rolled; the published JSON Schema is a sibling artifact the source never reads.
  • No agent, tool, or language literals. Editor tool verbs and test-runner names are values supplied by configs and adapters, never part of this package's vocabulary — grep gates in the acceptance criteria keep it that way.
  • One-way dependencies. Every other @polydeukes/* package depends only on core; core depends on none of them.

See the project repository for the architecture blueprint and design rationale.

License

MIT