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

@artifactshare/qm-bridge

v0.1.0

Published

Host-side trust-boundary library for sharing qm output through Artifact Share.

Readme

@artifactshare/qm-bridge

This is a host-side service library, not a sharing CLI for a model shell. Do not expose its credential provider or trusted context to a model sandbox.

The package separates untrusted share intent, host-authenticated context, and the Artifact Share bridge credential. The server remains authoritative for conversation mapping, destination, grants, and the final audience ceiling.

Install

npm install @artifactshare/qm-bridge

The root export provides validateBridgeConfig, createBridgePolicy, and publishTrusted. @artifactshare/qm-bridge/client provides the fetch-based Artifact Share client. Root, client, and testing exports contain no Node-only imports and can be bundled for Cloudflare Workers. The qm subpath only normalizes fields that a protected qm host has already authenticated; it does not read environment variables or infer trust.

Minimal host integration

import {
  createBridgePolicy,
  publishTrusted,
  validateBridgeConfig,
} from '@artifactshare/qm-bridge'
import { createArtifactShareBridgeClient } from '@artifactshare/qm-bridge/client'

const config = validateBridgeConfig(parsedConfig)
const result = await publishTrusted({
  intent: untrustedModelIntent,
  context: authenticatedHostContext,
  policy: createBridgePolicy(config),
  client: createArtifactShareBridgeClient({
    baseUrl: config.base_url,
    timeoutMs: config.request_timeout_ms,
  }),
  credentialProvider: async () => ({
    bearer_token: await hostSecretStore.read(),
  }),
})

The host must reuse the same host-generated request ID when retrying. The library performs one request and no hidden retry. A requested workspace audience is only intent: private or stale host context and server policy can narrow it. A successful workspace set_visibility request may therefore return current private visibility without being treated as an error.

Every BridgeClient declares the exact credentialOrigin that receives the bridge credential. publishTrusted rejects a client whose origin differs from the policy before reading the credential.

Configuration

The JSON configuration contains base_url, a bound source, optional request_timeout_ms and max_payload_bytes, and a nonempty allowed_conversations array. The allowlist compares the current authenticated conversation ID; former IDs support server-side mapping continuity but never authorize a request.

The Node operator executable reads only ARTIFACTSHARE_BRIDGE_TOKEN, and only health uses its value:

artifactshare-qm-bridge check --config bridge.json --json
artifactshare-qm-bridge health --config bridge.json --json
artifactshare-qm-bridge dry-run --config bridge.json --intent intent.json --context context.json --json

All commands require --json. Invalid command syntax returns exit 2 with error.code: "invalid_cli_usage"; scripts should parse that code to distinguish usage errors from a reachable bridge rejection. dry-run is offline and anchors public freshness to the fixture timestamp, so fixture_anchor_valid checks syntax and the freshness code path, not wall-clock freshness. Exit 0 is success, 2 is invalid input or application rejection, 3 is unavailable credential/network/timeout, and 1 is an invalid server response or unexpected failure.

Lifecycle

The package has no install or postinstall script. Initial npm publication is a separate owner-approved production operation through the protected release workflow; merging this package does not publish it. For the first publication only, configure the production environment secret NPM_QM_BRIDGE_BOOTSTRAP_TOKEN. After the package exists, configure npm trusted publishing for release-qm-bridge.yml and the production environment, then delete the bootstrap secret. Later releases use OIDC with no npm write token. A future Cloudflare OS Gatekeeper can use the host-neutral root and client exports without importing the qm subpath.