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

@ai-gui/plugin-form

v0.29.2

Published

Safe interactive form blocks for AIGUI, backed by the core ActionRuntime.

Readme

@ai-gui/plugin-form

Safe, framework-neutral interactive forms for AIGUI. React, Vue, and vanilla adapters all host the same DOM mount output.

import { ActionRegistry, createActionRuntime } from "@ai-gui/core"
import { form } from "@ai-gui/plugin-form"

const actions = new ActionRegistry()
actions.register({
  type: "travel.search",
  schema: {
    type: "object",
    required: ["from"],
    properties: { from: { type: "string" } },
    additionalProperties: false,
  },
  run: (params, { signal }) => searchTravel(params, signal),
})

const plugins = [form({ actionRuntime: createActionRuntime({ registry: actions }) })]

The model may emit:

```form
{
  "id": "travel-search",
  "fields": [
    { "name": "from", "type": "text", "label": "From", "required": true },
    { "name": "date", "type": "date", "label": "Departure" }
  ],
  "submitAction": "travel.search",
  "submitLabel": "Search"
}
```

Supported fields are text, textarea, number, date, select, radio, checkbox (one box, yes or no) and checkboxes (several answers to one question). Supported constraints are required, minLength, maxLength, pattern, min, max, and — on checkboxesminSelected and maxSelected.

A question with more than one correct answer is checkboxes. Radios exclude each other and a text box makes the person guess the format, so neither can ask it:

```form
{
  "id": "replication",
  "fields": [
    {
      "name": "answer",
      "type": "checkboxes",
      "label": "Which protocols wait for the peer?",
      "required": true,
      "options": [
        { "label": "A. Protocol A", "value": "A" },
        { "label": "B. Protocol B", "value": "B" },
        { "label": "C. Protocol C", "value": "C" }
      ],
      "expect": ["B", "C"]
    }
  ],
  "submitAction": "quiz.answer"
}
```

Its value is the chosen option values, always in the order the options were declared, so the same answer compares equal to itself however it was clicked. expect is the set of every correct option, compared as a set — the order it is written in does not matter. The verdict is positive only when the set matches exactly; how much a partly-right answer is worth is a marking scheme, which belongs to the host rather than to the form.

submitAction must already exist in the injected ActionRuntime. Form JSON rejects unknown properties, HTML, URLs, scripts, event handlers, and dynamic component names. Each mounted form owns its pending state and cancellation scope; adapter teardown aborts only that form's request.