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

@kevinmarmstrong/edgekit

v0.3.2

Published

Browser-native agent runtime core.

Readme

@kevinmarmstrong/edgekit

Core runtime for browser-native agent sidecars.

The recommended production pattern is Primitives -> Skills -> Mission Profiles:

const profile = createMissionProfile({
  id: 'support-workflow-v1',
  mission: 'support-workflow',
  version: '1.0.0',
  systemPrompt: 'Search support cases before answering. Ask for approval before ticket creation.',
  requiredTools: ['searchSupportCases', 'createSupportTicket'],
  defaults: { toolChoice: 'required', downloadPolicy: 'never' },
})

chat.applyMissionProfile(profile)
chat.registerTools({ searchSupportCases, createSupportTicket })

Use raw createAgent() when building custom renderers or advanced orchestration. For most app integrations, define Skills and a Mission Profile, register app-owned executable tools, validate the profile, then run outcome tests.

import { createAgent, modelOptional, tool } from '@kevinmarmstrong/edgekit'
import { z } from 'zod'

const agent = createAgent({
  systemPrompt: 'You are a helpful assistant.',
  tools: {
    searchProducts: tool({
      description: 'Search products',
      inputSchema: z.object({
        query: z.string(),
        maxPrice: modelOptional(z.number()),
      }),
      execute: async ({ query, maxPrice }) => {
        const params = new URLSearchParams({ q: query })
        if (maxPrice) params.set('max_price', String(maxPrice))
        return fetch(`/api/products?${params}`).then(res => res.json())
      },
    }),
  },
})

for await (const event of agent.send('find running shoes')) {
  if (event.type === 'text-delta') process.stdout.write(event.text)
}

Use chromeAI() and webLLM() for the default local model cascade, or pass any AI SDK language model in model. Use createCascadeReadinessController() when the app needs to check browser/provider state before showing agent features. It returns a headless snapshot with provider status, missing capabilities, and a recommended action (prompt, suggest, message, hide, fallback, or continue) so your app can render its own wizard, banner, modal, or disabled state. Use modelOptional(schema) for optional tool fields so browser models can omit a value or send null without causing a visible schema-retry loop. Use createAgUiAgent({ endpoint }) from @kevinmarmstrong/edgekit-agui to connect an AG-UI compatible event stream, and actionsToEdgeView() when you want tool results to render as declarative cards/forms. Use createHybridModelRouter() or createSupervisorRouter() when an app needs cloud fallback or lightweight supervisor/worker delegation without replacing the browser-native runtime. Use createHandoffEnvelope() or supervisor onHandoff callbacks to pass bounded context to cloud workers without leaking secret claims. Use createMarkdownMemoryStore() for inspectable .md-backed memory that can later be replaced by IndexedDB, OPFS, vectors, or a server store implementing the same search() contract. Configure compaction thresholds when Markdown logs become append-heavy. Use EdgeKnowledgeSource, createKnowledgeTool(), and createKnowledgeSkill() when retrieval is a first-class app capability. Edgekit normalizes citations and freshness metadata while the app owns Markdown, vector, hybrid, graph, SQL, or backend knowledge infrastructure. Use createMemoryResponseCache() or createIndexedDbResponseCache() for opt-in state-keyed caching of read-only responses. Use createOfflineTool(), createMemoryMutationJournal(), createLocalStorageMutationJournal(), and syncMutationJournal() for offline-capable mutations that queue locally and sync through the original app tools later. Use createToolPolicyExecutor() or executeToolWithPolicy() to put timeouts, payload limits, and allowlists around dynamically loaded or third-party tools before considering heavier worker or WASM isolation. Use createPiiRedactor() or custom redactors to sanitize tool results before they are emitted to UI events, telemetry, and audit trails. Use toolRepair to invisibly retry validation-shaped tool failures before surfacing an error. Use activity events for safe progress UI, and executeParallelTools() for host-owned read-only tool batches that explicitly opt into parallel execution. Use mcpToolsFromDefinitions(), createMissionControl(), and createAuditTrail() when an app needs MCP-backed tools, telemetry, or approval audit logging. Use identityProvider, sessionProvider, stateProvider, toolManifests, and withToolContext() to bind tools to the host app identity, RBAC permissions, auth context, and current app state.