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

@activityplug/hackerspub

v1.0.2

Published

HackersPub adapter for ActivityPlug.

Downloads

47

Readme

@activityplug/hackerspub

@activityplug/hackerspub maps HackersPub's GraphQL, authentication, NodeInfo, and media endpoints to the ActivityPlug client contract. Use it with @activityplug/core when an application connects directly to HackersPub.

Installation

pnpm add @activityplug/hackerspub
pnpm add @activityplug/core

Node.js 26 or newer is required. Both packages use ECMAScript modules. @activityplug/core is a peer dependency, so the application controls the compatible core version.

The package root contains the complete public adapter API:

import * as activityplug from "@activityplug/hackerspub";

Create a client

createHackersPubAdapter currently takes no configuration options. Remote I/O still requires a scoped authority supplied by the host application:

import {
  createActivityPlugClient,
  type RemoteAuthority,
} from "@activityplug/core";
import { createHackersPubAdapter } from "@activityplug/hackerspub";

export function createHackersPubClient(
  origin: string,
  remoteAuthority: RemoteAuthority,
) {
  return createActivityPlugClient({
    adapter: createHackersPubAdapter(),
    origin,
    remoteAuthority,
  });
}

The remote authority must use a transport that applies the deployment's origin, DNS, redirect, and response-size policies. See the security model for the transport boundary.

Use capability decisions before enabling an optional workflow:

const profile = await client.instances.detect();
const decision = profile.capabilities["auth.passkey"];

if (decision.status === "supported") {
  const challenge = await client.auth.passkey.start({});
  console.log(challenge.options);
}

Authentication

The adapter implements three strategies:

  • existing access-token import;
  • email challenge;
  • passkey authentication.

It does not expose an OAuth client or OAuth refresh-token flow. The email challenge defaults to the en locale when the caller does not provide one. Passkey completion expects the browser credential fields defined by PasskeyAuthenticationResponse.

See authentication and sessions for session storage and complete authentication flows.

Supported operations

The adapter maps NodeInfo discovery, account lookup, profile updates for displayName, note, and avatarId, followers and following, relationships, post reads/creation/deletion, home and public timelines, account and post search, poll reads and votes, notifications, follow/block actions, favourites, boosts, and emoji reactions. It also supports server-side media ingestion from a URL.

Post creation accepts public, unlisted, followers-only, and direct visibility. Replies and quote posts are supported.

Important explicit limits include:

  • post editing, edit history, poll creation, and content warnings are not mapped;
  • profile updates containing headerId, locked, bot, or fields are unsupported;
  • a post cannot attach an uploaded file through the mapped createNote mutation;
  • URL media ingestion does not store description or sensitivity metadata;
  • hashtag timelines and hashtag search are not mapped;
  • lists, follow requests, filters, scheduled posts, bookmarks, and bookmark folders are not mapped;
  • notification dismissal, clearing, grouping, and unread counts are not exposed as portable operations;
  • streaming is not implemented.

Some HackersPub APIs can upload an image, but ActivityPlug reports media.upload as unsupported because the mapped post-creation API cannot attach that upload. This prevents an application from treating a partial workflow as a complete portable capability.

Unsupported calls fail with ActivityPlugError code UNSUPPORTED_OPERATION. Search also rejects pagination cursors because the mapped API does not provide a reliable cursor.

Media

client.media.ingestUrl asks HackersPub to fetch a remote image and returns the resulting normalized attachment. It requires an authenticated session. The adapter does not implement timeline or notification WebSockets.

See streaming and media for the portable media contract and differences between adapters.

Public exports

The package exports:

  • createHackersPubAdapter;
  • the pre-created hackersPubAdapter.

Use @activityplug/core for the client, sessions, entity types, capability types, errors, and remote-authority types.

Related documentation

License

Licensed under Apache-2.0 OR MIT. See LICENSE-APACHE and LICENSE-MIT.