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

@x12i/memorix-skill-process

v0.3.4

Published

Process Memorix records through a skill — select by OT/CT filter, run skill with Scoper MCP, markdown→JSON, write output CT

Readme

@x12i/memorix-skill-process

Select Memorix records by OT + structured CT filter, run each through @x12i/memorix-skills, convert markdown skill output to JSON, and write one output content type at the same OT + recordId.

Requires @x12i/memorix-client@^3.8.0, @x12i/ai-dispatcher@^2.0.0, @x12i/memorix-scoper@^2.0.0. See docs/prerequisites.md.

Scoper 2.0 fetches stored records by default. Set options.synthesize: true and objective only when the skill must summarize records it cannot name. The host wrapper does that alignment on scoper__scope / scoper__subject_data.

Flow

  1. Select — explore.queryContent on query.contentType + query.filter → recordId[]
  2. Fetch — getContent for each inputContentTypes entry
  3. Run skill — skills.run (dispatcher has Scoper MCP attached unless scoperMcp: false)
  4. Convert — markdown → JSON (nx-json-parser)
  5. Push — writeContent to outputContentType only (OT + recordId known)

Usage

import { createMemorixClient } from "@x12i/memorix-client";
import { createMemorixSkillProcess } from "@x12i/memorix-skill-process";

const memorix = createMemorixClient({ /* baseUrl, orgId, agentIds, caller */ });

// Omit scoperMcp to auto-attach from memorix config; or pass createUniqueTraceScoperMcp(...).
// Pass dispatcher options (not a live dispatcher) so Scoper can be merged.
const process = await createMemorixSkillProcess({
  memorix,
  skills: {
    dispatcher: {
      openrouter: { apiKey: process.env.OPENROUTER_API_KEY },
    },
  },
});

const result = await process.run({
  skill: "echo-records",
  objectType: "employees",
  inputContentTypes: ["raw"],
  query: {
    contentType: "raw",
    filter: { "data.status": "open" },
  },
  outputContentType: "skill-summary",
  request: { provider: "openrouter", model: "openai/gpt-5.2" },
});

Scoper MCP attach

  • Omit scoperMcp: auto-build from Memorix config when this factory creates the dispatcher.
  • Pass servers: merge into dispatcher options.
  • scoperMcp: false: skip Scoper (unit tests / preload-only).
  • Do not pass a live AiDispatcher / MemorixSkills together with scoperMcp — that throws SCOPER_MCP_ATTACH_SKIPPED. Pre-wire with createDispatcherWithScoperMcp and omit top-level scoperMcp instead.

Cloud models only see tool schemas; callTool runs on the host (VPN reachability to Memorix is required on the host, not on OpenRouter).

Notes

  • Output catalog: skill-api startup and each analysis sequence load the full agent pack, add every pipeline output content type that is missing ({ id } only; other content types stay), and call ensureMetadata once (confirm: true). The same checksum is a noop. ready: false stops the process before it writes. A write refused with ROUTE_UNKNOWN_CONTENT_TYPE declares that one content type and retries once.
  • Per-record isolation: one skill run per recordId. Errors on one record do not stop the loop.
  • concurrency (default 1): bounded parallel fetch → skill → write; result order matches recordIds.
  • skipIfOutputExists: skip when the output CT already exists (safe restarts).
  • Empty skill text or non-object markdown→JSON fails that record (no raw markdown push).
  • Write-back: skill JSON is written as record.data only.
    • If the output CT already exists → op: "patch" with [{ op: "set", path: "data", value }].
    • If absent → op: "add" with { recordId, data } plus concept / dataCategory copied from an input CT for the same subject (never invented).
    • Memorix owns format, revision, _system, and keeps concept on updates (buildMutatedRecord).
  • Filter accepts equality maps or SafeFilter (@x12i/memorix-client ContentQueryFilter).

Analysis sequence

# Smoke (2 records per step)
node --env-file=.env packages/skill-process/scripts/run-analysis-sequence.mjs

# Full estate, concurrency 8 — effort: low by default; high for
# attack surface, asset triage, and deepen on exploitable+reachable assets
CONCURRENCY=8 node --env-file=.env packages/skill-process/scripts/run-analysis-sequence.mjs --full

Generic single step:

node --env-file=.env packages/skill-process/scripts/run-skill-batch.mjs \
  --skill=analyze-endpoint-asset --objectType=endpoint-asset \
  --inputContentTypes=inventory --queryContentType=inventory \
  --outputContentType=analysis --discriminatorValue=asset-exposure \
  --reasoningEffort=high --maxRecords=1