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

dsh-fabric-schema

v0.1.11

Published

Schema-enforced world state, evidence digests, and fail-closed certification for dsh-fabric

Downloads

2,105

Readme

dsh-fabric-schema

Schema-enforced world state, evidence digests, and fail-closed certification for dsh-fabric — the Schema harness world-model pattern (hypothesis → verification → certified transaction), adapted from pi-fabric's proven schema and state layers onto DSH's durable fabric_mesh surface.

What it provides

  • World state (state_* tools): an append-only Timeline of labeled, typed transitions stored as mesh topic events, a compare-and-swap head pointer recomputable from the log (state/current), a structural complexity ledger (state/complexity/*, TS/JS/TSX/JSX decision-point token fold), the executable goal predicate (state/goal), and fail-closed re-verification that certifies or revokes.
  • Schema transactions (schema_* tools): schema_hypothesize binds a falsifiable hypothesis plus nonempty typed evidence to the current state and a git-aware workspace fingerprint; schema_verify fail-closed confirms every evidence item against the unchanged fingerprint and may issue one fresh session-bound single-use certificate; schema_commit consumes the certificate and atomically applies declared write/edit/delete operations with SHA-256 preconditions, postconditions, before-image journals, rollback/quarantine, and crash recovery, then records net committed text changes and complete-content SHA-1/SHA-256 transitions through the Harness mutation receipt API; schema_abort discards uncommitted artifacts.
  • Enforcement (mode: off | audit | enforce): in enforce mode the tools/pre-execute gate denies direct edit/write calls with the Schema route; audit publishes would_block events without denying. Shell-produced mutations are outside this gate (pi-fabric's prewalk shell-mutation interception is a separate deferred surface); evidence commands run through the controller's own bounded runner.
  • Guidance: a visibility-gated fabric:schema-guidance prompt section plus a ## Schema block in the Fabric operating prompt.

Records

All state and schema records are ordinary durable mesh records — inspectable with fabric_mesh (get_state, read_topic, snapshot) and folded into the same workspace-scoped durability as topics and actor mailboxes:

  • topic fabric.state: transition, transition.committed, transition.rejected, state.certified, state.violated, state.goal.met
  • topic fabric.schema: hypothesized, verified, verification_failed, committed, rolled_back, quarantined, aborted, would_block, blocked
  • states: state/current (head), state/goal, state/complexity/<file>, schema/workspace, schema/hypothesis/<id>, schema/certificate/<token-hash>

Model-facing tools

state_get, state_transition, state_history, state_complexity, state_verify, state_goal, state_check_goal, schema_status, schema_hypothesize, schema_verify, schema_commit, schema_abort.

Composition

The tool row mounts in the fabric agent preset (packages/compaction/presets/fabric/agent.cordis.yml) so the tools and the guidance stay fabric-scoped:

- id: dsh-fabric-schema-tool
  name: 'dsh-fabric-schema/tool'
  config:
    mode: off        # off | audit | enforce

The mesh provider and storage are host-plane; the controller resolves the agent's workspace and cwd per call through the same identity rules as the mesh Consumer. Transaction journals and the commit lock live under the OS temp directory, keyed by the workspace identity hash.

Divergences from pi-fabric (documented)

  • State keys are CAS-fenced mesh records; the mesh has no state delete, so a failed transition's absent-before ledger writes are retained (harmless — they only feed future delta measurements), while present-before writes are restored.
  • Artifacts bind to the DSH session id (per-session invocation) instead of a per-run fabric_exec call id; certificates remain single-use and TTL-bounded.
  • mode: enforce covers edit/write; bash and other tools are not gated (pi's prewalk handoff is a separate deferred surface).