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-logseq-graph

v0.1.6-alpha.2

Published

Host-plane wiki-graph service over the Logseq CLI: one typed seam (ctx.wikiGraph) the web UI and host API read and write the LLM-wiki graph through, headlessly and without the desktop app.

Readme

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

English | 中文

Summary

ctx.wikiGraph exposes the Logseq CLI's db-worker-node graph operations as structured JSON calls, independent of any agent tools: page and block trees, tags, properties, Datalog queries, upserts and removals, and the logseq_server lifecycle. The web GUI's wiki drawer serves its reads and writes through this service in the upstream harness, while the model-facing logseq_* tools (see @hy-sde-org/dsh-tool-logseq) call the same CLI directly. Choose it when a composition needs wiki-graph storage behind a host service with one logical change per call. The cost is one fresh CLI process per method call, and graph writes require a running db-worker-node server; the invariant companion fails fast at boot when the CLI binary is unreachable.

Table of Contents


Host-plane graph service exposing the Logseq CLI's db-worker-node graph operations as structured JSON calls, independent of any agent tools: page/block trees, tags, properties, Datalog queries, upserts/removals, and the logseq_server lifecycle. In the upstream harness, the web GUI's embedded wiki drawer serves its reads/writes through this service via the apiproxy wiki domain; this standalone ships the service only (the drawer and its host API proxy row are not included). The model-facing logseq_* CLI tools (see @hy-sde-org/dsh-tool-logseq) use the same CLI directly.

Service surface

One Cordis service ctx.wikiGraph (LogseqGraphService) with methods:

  • listPages({ includeBuiltIn, limit, offset }) → flat page rows
  • getPage({ page | id | uuid }) → nested block tree + linked references
  • listTags, listProperties
  • search({ type, content, limit }), query({ query, inputs, limit }) (Datalog)
  • upsert(args), remove(args) — one logical change per call, forwarded flag-for-flag
  • server(action, { name })list / start / stop / restart / cleanup

Every method spawns the logseq CLI once (--graph <name> when configured) with --output json, validates the envelope, and projects the raw rows into the wire view types (WikiTagRef, WikiBlockNode, WikiPageRoot, …). The @hy-sde-org/dsh-logseq-graph/invariant companion fails fast at boot when the CLI binary is unreachable.

Model Experience

None, as the host service registers no tool schema, prompt section, or result of its own; the wiki content it serves reaches the model only through @hy-sde-org/dsh-tool-logseq and the human's wiki drawer.

KV Cache effect

No prompt-shaping data comes from this package.

Known Limitations and Deferred Work

    • CLI must be installed — the service spawns logseq; there is no bundled binary (built from the logseq repo: opam exec -- dune build @bundle). The invariant companion gives an install hint and cliPath supports a non-PATH binary.
    • Per-call process spawn — each method starts a fresh CLI process. Fine for interactive drawer use and one-shot agent edits; a high-frequency integration should batch via upsert.
    • Graph server required — graph writes need a db-worker-node server; the service reuses a running one (including the desktop app's) or logseq_server start launches a headless one. Requests against a stopped server surface as CLI errors.
    • JSON shapes are read at runtimelist/search/query fields follow the CLI's JSON contract and are projected defensively; a future CLI shape change degrades rows rather than crashing.
    • user.property/* values are db-id refs — property values appear as separate value blocks; editing property values through the service writes the value block, not inline key:: value.

Dev Note

None.