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-connector-sdk

v1.3.0

Published

Memorix Connector SDK — defineConnector, workflow, checkpoint-aware collectStream, host/remote/testing surfaces, and conformance utilities.

Readme

@x12i/memorix-connector-sdk — Memorix Connector Framework

One connector contract for source workflows, checkpoints, raw persistence, and reusable data.

npm install @x12i/memorix-connector-sdk@^1.1.1

Package surfaces:

| Export | Purpose | |--------|---------| | @x12i/memorix-connector-sdk | Authoring: defineConnector, workflow, collectStream, types, Credorix adapters | | .../host | In-process host, staged content (no stub HTTP — use Credorix or testing port) | | .../remote | createRemoteCommitPagePort, remote host client | | .../testing | Conformance ports, fixtures, APS session helpers (startApsSession) | | (removed) | Use defineConnector only — no MemoryConnector wrap |

Connectors own provider-specific API choreography. Memorix owns checkpoints, exact raw persistence, deduplication, quarantine, and durable results. This SDK has no Mongo dependency.

Simulation (Studio + APS)

Set capabilities.simulation: true when the connector can run against an @x12i/api-simulator baseUrl with the same pull code (MX-CF-FR-019). Studio toggles mode via x-memorix-simulation.

  • Cert: startApsSession / named cf.* scenarios (./testing)
  • Studio domain sims: pack-shipped package-sim scenarios (APS-CF-FR-009…012) — not a private mock server
  • Unit-only mock-provider in refs stays for fast unit tests; do not expand it into Studio simulation

See docs/connector-framework/MX-CF-simulation-requirements.md and tutorial add-aps-simulation-to-service.

Quick start

import {
  defineConnector,
  defineWorkflow,
  defineStreamTemplates,
  commandStep,
  pollStep,
  collectStep,
} from "@x12i/memorix-connector-sdk";

const streams = defineStreamTemplates([
  {
    streamId: "results",
    objectType: "provider-result",
    dataCategory: "entity",
    identity: { kind: "path", path: "id" },
    checkpoint: { method: "cursor", strategyVersion: 1 },
  },
]);

const workflow = defineWorkflow({
  id: "default",
  version: 1,
  steps: [
    commandStep({ id: "start-export", title: "Prepare export" }),
    pollStep({ id: "wait-for-export", dependsOn: ["start-export"] }),
    collectStep({ id: "collect-results", streamId: "results", dependsOn: ["wait-for-export"] }),
  ],
});

export default defineConnector({
  id: "provider-connector",
  version: "1.0.0",
  capabilities: { pull: true, cursor: true },
  streams,
  workflow,
  async pull(ctx) {
    await ctx.workflow.run(workflow, {
      handlers: {
        "start-export": async () => provider.startExport(await ctx.credentials.resolve()),
        "wait-for-export": async () => provider.waitReady(),
        "collect-results": async () =>
          ctx.collectStream({
            streamId: "results",
            fetchPage: async ({ checkpoint, pageToken, signal }) => {
              const page = await provider.fetchResults({ checkpoint, pageToken, signal });
              return {
                items: page.items.map((i) => ({ data: i, identity: i.id })),
                nextCheckpoint: { method: "cursor", value: page.nextCursor },
                complete: !page.nextCursor,
              };
            },
          }),
      },
    });
  },
});

Must

  • Use ctx.workflow.run + ctx.collectStream for collection
  • Return exact provider-native payloads
  • Resolve secrets only via ctx.credentials / ctx.http (Credorix-backed in production)
  • Honor host budget, abort signal, and page size

Must not

  • Advance checkpoints without a successful page land
  • Access Mongo, global fetch, or raw secret files
  • Call capability.request()brokered-fetch is descriptor-only; use ctx.http
  • Promote / rename into business models
  • Ask operators to run workflow steps individually

Credentials & HTTP

  • Production: host mints Credorix delegation (@x12i/credorix-client@^1.3.0) and adapts ports via adaptGovernedHttpPort
  • Purposes: provider-http | provider-sign | webhook-verification | material-lease (legacy provider-requestprovider-http)
  • Testing: @x12i/memorix-connector-sdk/testingstartApsSession / assertApsEvidence against @x12i/api-simulator@^1.2.0

Protocol

  • Version: memorix-connector/1
  • Unsupported majors → CONNECTOR_PROTOCOL_UNSUPPORTED

Related

  • Docs: docs/connector-framework/
  • @x12i/credorix-client / @x12i/credorix-core — governed credentials + egress
  • @x12i/api-simulator — certification scenarios
  • @x12i/memorix-client — remote commit/checkpoint APIs
  • @x12i/memorix-memory — in-process collector + native DefinedConnector