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

@gotong/services-sdk

v1.0.0

Published

Gotong Services SDK — plugin contract, registry, loader. Same surface for first-party and third-party service plugins (memory / artifact / datastore / …).

Downloads

71

Readme

@gotong/services-sdk

Plugin SDK for Gotong Hub Services — the abstraction agents and workflows use for memory, artifacts, datastores, and (later) anything else the platform wants to manage as a pluggable resource.

Same surface for first-party (@gotong/service-memory-file, service-artifact-file, service-datastore-sqlite) and third-party plugins. No "internal interface" — the loader treats both identically.

See docs/services-rfc.md for the design behind this package.

What's in here

| File | Purpose | |---|---| | src/plugin.ts | ServicePlugin<TConfig, THandle> — the main contract | | src/types/{memory,artifact,datastore}.ts | Per-type handle interfaces agents call | | src/owner.ts | Owner / Scope / resolveOwner() | | src/trash.ts | TrashRef + deterministic id hashing | | src/registry.ts | In-memory plugin index | | src/loader.ts | Reads plugins.json, dynamic-imports each entry | | src/testing.ts | runPluginContract() shared suite for plugin authors |

Writing a plugin (sketch)

import type { ServicePlugin, MemoryHandle, Owner } from '@gotong/services-sdk'

export default class MyMemoryPlugin implements ServicePlugin<MyConfig, MemoryHandle> {
  readonly type = 'memory'
  readonly impl = 'my-impl'
  readonly version = '0.1.0'
  readonly description = 'In-memory demo'

  async validateConfig(raw) { /* parse + throw on bad */ return raw as MyConfig }
  async init(ctx) { /* one-time setup */ }
  async attach(owner, cfg): Promise<MemoryHandle> { /* return handle */ }
  async detach(owner) { /* close, keep data */ }
  async softDelete(owner) { /* move to trash, return TrashRef */ }
  async restore(ref) { /* move back */ }
  async hardDelete(ref) { /* nuke */ }
  async describe(owner) { /* { sizeBytes, preview? } */ }
  async shutdown() { /* flush + close */ }
}

Run the standard contract tests against it:

import { describe } from 'vitest'
import { runPluginContract } from '@gotong/services-sdk/testing'

describe('contract: my-memory-plugin', () => {
  runPluginContract({
    plugin: new MyMemoryPlugin(),
    sampleConfig: { /* ... */ },
    sampleOwner: { kind: 'agent', id: 'test-agent' },
    writeSample: async (h) => { await h.remember({ kind: 'episodic', text: 'hi' }) },
    expectSamplePersisted: async (h) => {
      const items = await h.list({ limit: 10 })
      expect(items).toHaveLength(1)
    },
  })
})

Status

PR-2 of 13 in the Hub Services rollout. Interfaces are stable within v0.x major but minor releases may add fields.