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

@partitura/sdk

v3.0.0

Published

SDK for building Partitura plugins and accessing hosted models — MCP tool servers, WebView stages, settings panels, and the Gateway API for unified LLM access

Readme

Partitura SDK

SDK for building Partitura plugins and accessing hosted models.

Install

npm install @partitura/sdk

Four Entry Points

1. Gateway API (NEW in v3)

Access Partitura's unified API for hosted models with automatic credit management, conversation memory, and real-time voice support.

import { Partitura } from '@partitura/sdk/gateway'

const partitura = new Partitura({
  token: process.env.PARTITURA_TOKEN
})

// Simple chat
const response = await partitura.chat("What is the meaning of life?")

// Create an agent with memory
const agent = partitura.agent({
  model: 'claude-3-5-sonnet',
  system: 'You are a helpful assistant.',
  memory: true
})

await agent.chat("My name is John")
const response = await agent.chat("What's my name?")  // Remembers!

2. MCP Tool Servers (server-side)

Build custom tools that AI agents can use:

import { createMCPServer, defineTools, PluginContext } from '@partitura/sdk';

const ctx = new PluginContext();
const server = createMCPServer({ name: 'my-tools' });

defineTools(server, {
  my_tool: {
    description: 'Does something useful',
    bubbleText: '{agent} using my tool',
    inputSchema: {
      type: 'object',
      properties: {
        input: { type: 'string', description: 'The input' },
      },
      required: ['input'],
    },
    execute: async ({ input }) => {
      const apiKey = await ctx.getConfig('api_key');
      // ... your logic
      return { content: [{ type: 'text', text: `Result: ${input}` }] };
    },
  },
});

server.start();

3. WebView Stages (client-side)

Communicate with Partitura from stage HTML:

<script type="module">
  import { createStage } from '@partitura/sdk/stage';

  const stage = createStage();

  // Receive messages from agents
  stage.onMessage((msg) => {
    console.log('Agent says:', msg.text);
  });

  // Send messages to the active agent
  document.getElementById('btn').onclick = () => {
    stage.sendToAgent('Hello from the stage!');
  };
</script>

4. Extended API (client-side, v2)

For view replacements and rich plugin WebViews:

// Agent management
const agents = await Partitura.api.agents.list();
await Partitura.api.agents.deliverPrompt('maestro', 'Start the task');

// UI control
Partitura.api.ui.toast('Done!', 'success');

// Config
const value = await Partitura.api.config.get('api_key');

// Generic backend proxy
const res = await Partitura.api.fetch('/management/agents');

Gateway API Examples

Real-time Voice

const voice = partitura.voice({
  model: 'gemini-3.1-flash-live',
  voice: 'Charon'
})

voice.on('speech', (text) => console.log('Agent:', text))
voice.on('user-speech', (text) => console.log('User:', text))

await voice.connect()
await voice.say('Tell me about Partitura')

Tool Use

const agent = partitura.agent({
  model: 'claude-3-5-sonnet',
  tools: [{
    name: 'calculate',
    description: 'Calculate math',
    inputSchema: {
      type: 'object',
      properties: { expr: { type: 'string' } }
    }
  }]
})

const response = await agent.chat("What is 2 + 2?")

Streaming

const stream = await agent.chatStream('Write a story')

for await (const chunk of stream) {
  process.stdout.write(chunk.text)
}

Type-Safe Plugin Manifests

import type { PluginManifest } from '@partitura/sdk/types';

const manifest: PluginManifest = {
  apiVersion: 'partitura.dev/v1',
  kind: 'Plugin',
  metadata: {
    name: 'my-plugin',
    version: '1.0.0',
    displayName: 'My Plugin',
    description: 'Does cool things',
  },
  contributions: {
    mcpPackages: [{
      id: 'my-tools',
      name: 'My Tools',
      transport: 'stdio',
      command: 'node',
      args: ['mcp-servers/index.js'],
    }],
  },
};

All 38 Contribution Types

See the Plugin Documentation for the full manifest reference.

License

MIT