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

@bernierllc/onboarding-plugin-website-builder

v0.1.1

Published

Onboarding feature plugin implementing the website builder conversation flow: goals, questions, tools, panel, and handoffs.

Readme

@bernierllc/onboarding-plugin-website-builder

Onboarding feature plugin that builds a site config conversationally — the first concrete implementation of the onboarding-feature-plugin contract.

Overview

WebsiteBuilderPlugin implements OnboardingFeaturePlugin to wire the Website Builder cluster into an AI onboarding agent session. It contributes:

  • Goals — branding set, theme configured, at least one content section added, site marked ready
  • Questions — phase-organized: business identity, logo & colors (with vision-guided color extraction), content sections
  • Toolswb_updateBranding, wb_updateTheme, wb_upsertSection, wb_getSiteStatus, wb_markSiteReady (all in agent-tool-registry format, calling into an injected SiteBuilder)
  • Panel — side-panel descriptor pointing to SitePreviewCard from @bernierllc/site-preview-ui
  • Handoffs — "View your live site" (route) and "Review your site settings" (task)

Installation

npm install @bernierllc/onboarding-plugin-website-builder

Usage

import { SiteBuilder, InMemorySiteConfigStore } from '@bernierllc/site-builder-service';
import { mergePluginContributions } from '@bernierllc/onboarding-feature-plugin';
import { ToolRegistry } from '@bernierllc/agent-tool-registry';
import {
  WebsiteBuilderPlugin,
  buildAgentToolDefinitions,
  WEBSITE_BUILDER_EVALUATORS,
} from '@bernierllc/onboarding-plugin-website-builder';

// Create the site builder with a store adapter
const siteBuilder = new SiteBuilder({ store: new InMemorySiteConfigStore() });

// Instantiate the plugin
const plugin = new WebsiteBuilderPlugin({
  siteBuilder,
  tenantId: 'tenant-123',
  slug: 'acme-co',
  offeredSections: ['services', 'contact', 'hours'],
  defaults: { heroStyle: 'minimal' },
});

// Contribute goals, phases, questions, and tools to an onboarding session
const goals = plugin.contributeGoals();
const phases = plugin.contributePhases({ baseConfig: onboardingConfig, pluginConfig: {} });
const questions = plugin.contributeQuestions();
const tools = plugin.contributeTools();
const panel = plugin.contributePanel({ baseConfig: onboardingConfig, pluginConfig: {} });
const handoffs = plugin.contributeHandoffs();

// Register executable tools with agent-tool-registry
const toolRegistry = new ToolRegistry();
for (const tool of buildAgentToolDefinitions(siteBuilder, 'tenant-123', 'acme-co')) {
  toolRegistry.register(tool);
}

// Merge plugin contributions into a base onboarding config
const merged = mergePluginContributions(baseOnboardingConfig, [{ plugin, config: {} }]);

API Reference

WebsiteBuilderPlugin

The main plugin class implementing OnboardingFeaturePlugin.

Constructor

new WebsiteBuilderPlugin(config: WebsiteBuilderPluginConfig)

| Parameter | Type | Description | |-----------|------|-------------| | siteBuilder | SiteBuilder | Site builder service instance | | tenantId | string | Tenant identifier | | slug | string | Site slug | | offeredSections | SiteSectionType[] | Optional list of offered section types | | defaults | Partial<SiteTheme> | Optional default theme overrides |

Methods

| Method | Returns | Description | |--------|---------|-------------| | contributeGoals() | GoalDefinition[] | Returns the 4 website builder goals | | contributeQuestions() | PhaseQuestion[] | Returns all onboarding questions | | contributeTools() | PluginToolDefinition[] | Returns 5 schema-only tool definitions | | contributePhases(ctx) | OnboardingPhase[] | Returns 3 onboarding phases | | contributePanel(ctx) | PanelDescriptor | Returns side-panel descriptor | | contributeHandoffs() | Handoff[] | Returns 2 completion handoffs |

buildAgentToolDefinitions

Builds ToolDefinition objects with executable handlers for registration with @bernierllc/agent-tool-registry.

function buildAgentToolDefinitions(
  siteBuilder: SiteBuilder,
  tenantId: string,
  slug: string,
  logger?: Logger
): ToolDefinition[]

Returns definitions for: wb_updateBranding, wb_updateTheme, wb_upsertSection, wb_getSiteStatus, wb_markSiteReady.

GOALS

Array of 4 GoalDefinition objects: wb.branding, wb.theme, wb.sections, wb.ready.

WEBSITE_BUILDER_EVALUATORS

Custom goal evaluator map for use with evaluateGoals from @bernierllc/onboarding-config-core.

PLUGIN_TOOL_DEFINITIONS

Schema-only PluginToolDefinition[] for the 5 website builder tools.

Error Classes

All errors extend OnboardingPluginWebsiteBuilderError which extends Error.

| Class | Code | Usage | |-------|------|-------| | OnboardingPluginWebsiteBuilderError | ONBOARDING_PLUGIN_WB_ERROR | Base error class | | WebsiteBuilderConfigError | WB_CONFIG_INVALID | Invalid plugin configuration | | WebsiteBuilderToolError | WB_TOOL_ERROR | Tool execution failure |

import {
  WebsiteBuilderConfigError,
  WebsiteBuilderToolError,
} from '@bernierllc/onboarding-plugin-website-builder';

try {
  await toolDef.execute(input);
} catch (err) {
  if (err instanceof WebsiteBuilderToolError) {
    console.error(err.code, err.context, err.cause);
  }
}

Integration Status

| Integration | Status | Notes | |-------------|--------|-------| | Logger: | integrated | Uses @bernierllc/logger for tool execution events | | NeverHub: | optional | Pass neverhub option to SiteBuilder constructor |

Logger integration

The plugin uses @bernierllc/logger inside buildAgentToolDefinitions. Pass an external logger instance to share log context:

import { Logger, LogLevel } from '@bernierllc/logger';

const logger = new Logger({ level: LogLevel.INFO, transports: [consoleTransport] });
const tools = buildAgentToolDefinitions(siteBuilder, tenantId, slug, logger);

NeverHub integration

NeverHub integration is handled at the SiteBuilder level (via @bernierllc/site-builder-service), not this plugin directly. Configure it when constructing SiteBuilder:

const siteBuilder = new SiteBuilder({
  store: myStore,
  neverhub: { enabled: true },
});

Graceful degradation: if NeverHub is unavailable, SiteBuilder continues operating with core functionality intact.

License

Copyright (c) 2025 Bernier LLC. Limited-use license — see LICENSE for details.