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

@hy-sde-org/dsh-graph-control

v0.2.0-rc.2

Published

Durable control plane for the Agent Graph: schedule updates, exactly-once intent claims, operator provisions, and supervisor wakes.

Readme

@hy-sde-org/dsh-graph-control

English | 中文

Summary

dsh-graph-control is the durable decision store for the Agent Graph. It owns exactly the stateful rows a graph needs — the schedule-update log, exactly-once intent claims, operator provisions, and supervisor wakes — and nothing else: records, routes, readiness intents, work status, and client snapshots stay derived (the stream and projection packages fold them).

The store is designed around Maka's one hard rule: the durable claim (with preallocated turn/run identity) is written before the runtime is ever asked to run, and every claim/provision transition is conditional on the schedule revision it observed. A retry therefore reuses the same activation identity instead of invoking the provider twice. All ids are deterministic sha256 (graph_update_…, graph_claim_…, graph_operator_…, graph_wake_…), so replays are idempotent by construction.

Persistence: one KvUnit (name: agent_graph) with five authoritative tables; derived uniqueness indexes are rebuilt from those rows at open, so a torn write heals instead of corrupting. The storage contract forbids concurrent writers on one unit, so the store serializes mutations on one write chain and each per-record write is durable.

This package contributes no tool, prompt, or plugin row — the stream-layer coordinator, the executor adapter, and the supervisor tools consume it.

Table of Contents

Use this package

import Storage, { storageBackendServiceKey } from '@deepseek-ai/dsh-storage'
import { GraphControlStore } from '@hy-sde-org/dsh-graph-control'

const backend = await ctx[storageBackendServiceKey('sqlite')]
const unit = await backend.kv.open(GraphControlStore.descriptor)
const store = await GraphControlStore.open(unit)

const { update, created } = await store.commitScheduleUpdate(request)
const { claim } = await store.claimIntentAtScheduleRevision(claimRequest, update.revision)

Open the unit exactly once per process: the storage layer rejects double-open, and the store is the single writer chain over the unit.

Understand the implementation

  • Schedule log (schedule): append-only decisions, revision = max+1, idempotent by updateId and by source triple (session, run, toolCall); finish cannot combine with add_work; the graph is closed once a finish is committed.
  • Intent claims (claims): keyed graphId:intentId, with activation-identity uniqueness ((targetSessionId, targetTurnId) and (targetSessionId, targetRunId)) enforced against derived indexes; transitions claimed → executing → cancelled are revision-conditional; fresh claims are rejected after closure while existing claims stay dispatchable.
  • Operator provisions (provisions): deterministic provisionId/operatorId make retries adopt the same operator; revision-conditional and closure-blocked like claims.
  • Supervisor wakes (wakes + wake_attempts): claim once, begin attempts (refused once delivered/superseded/exhausted, and at an optional durable maxAttempts ceiling, which also validates as a positive safe integer), complete with waiting_permission | delivered | superseded | retryable_failed; exhaust a retryable wake durably with exhaustSupervisorWake (idempotent, reason bounded to 4000 chars, exhausted is terminal and untouched by supersede); supersede by root session (+ optional graph filter); recoverSupervisorWakes() is deliberately a no-op — whether an interrupted attempt really completed is a Runtime fact, so the coordinator inspects run facts and completes accordingly. The store never guesses.

Further Exploration

Model Experience

No model-facing surface. This package is host-side machinery; the supervisor tools of dsh-tool-graph are what the model sees.

Known Limitations and Deferred Work

  • No epoch table: one DSH session owns one graph per the design decision (multi-graph-per-root is deferred).
  • Multi-row CAS is process-atomic (one write chain), not transaction-atomic; a crash mid-sequence heals on open because indexes are derived. Claims with a torn write are recovered by the coordinator inspecting run facts, as in Maka.
  • Derived work status (requested/stopped/superseded), records, routes, readiness, and client snapshots belong to the stream and projection packages and are not stored here.