Skip to content
PluginStats

@lushly-dev/afd-core weekly downloads statistics

By lushly-dev (4 listings) · npm · MCP servers

Core types and utilities for Agent-First Development

View on npm Stale · Oct 17, 2026

@lushly-dev/afd-core has 16,328 recorded weekly downloads on npm, an increase of 168% over the past 30 days, ranking #804 of 2,303 tracked listings.

Weekly downloads
16,328
Official API · Oct 18, 2026
7-day growth
+8.7%
+1.3K weekly downloads
30-day growth
+168%
+10.2K weekly downloads
90-day growth
+3715%
+15.9K weekly downloads
Rank
#804
Among tracked npm listings

About @lushly-dev/afd-core

@lushly-dev/afd-core

Core types and utilities for Agent-First Development.

Installation

npm install @lushly-dev/afd-core
# or
pnpm add @lushly-dev/afd-core

Overview

This package provides the foundational types used across all AFD packages:

  • CommandResult - Standard result type with UX-enabling fields
  • CommandError - Actionable error structure
  • CommandDefinition - Full command schema with handler
  • MCP types - Model Context Protocol types for agent communication

Entry points

ImportContentsRuns in
@lushly-dev/afd-coreAll types and helpers; not connectors or platformNode.js and browsers
@lushly-dev/afd-core/commandsCommand types, defaultExpose, validateCommandName, createCommandRegistry, MCP tool conversionNode.js and browsers
@lushly-dev/afd-core/resultCommandResult, success, failure, error, isSuccess, isFailureNode.js and browsers
@lushly-dev/afd-core/connectorsGitHubConnector, PackageManagerConnector and their typesNode.js only
@lushly-dev/afd-core/platformexec, findUp, isWindows and other process helpersNode.js only
Connectors live in their own subpath

GitHubConnector and PackageManagerConnector spawn processes through node:child_process, so they are exported only from the connectors subpath:

import { GitHubConnector, PackageManagerConnector } from '@lushly-dev/afd-core/connectors';

Since 2.0 the root entry no longer re-exports them, so it bundles for the browser (for example with esbuild --bundle --platform=browser).

Contract version

AFD_CONTRACT_VERSION is the version of the AFD contract this package implements: the wire shapes, pipeline variables, behavior vectors and conformance suite that the TypeScript, Python, Rust and C++ implementations share (spec/VERSION). It is independent of the package version. afd-help reports it as contractVersion.

import { AFD_CONTRACT_VERSION } from '@lushly-dev/afd-core';
Running processes

exec(['git', 'status'], options) from the platform subpath never uses a shell. It captures at most maxOutputBytes (default 10 MiB, DEFAULT_MAX_OUTPUT_BYTES) from each of stdout and stderr. Past that it kills the process and returns errorCode: 'OUTPUT_LIMIT_EXCEEDED' with the output captured up to the limit.

Usage

Creating Command Results
import { success, failure, type CommandResult } from '@lushly-dev/afd-core';

// Successful result with UX-enabling fields
const result: CommandResult<Document> = success(
  { id: 'doc-123', title: 'My Document' },
  {
    confidence: 0.95,
    reasoning: 'Document created with all required fields',
    sources: [{ type: 'template', title: 'Default Template' }]
  }
);

// Failed result with actionable error
const error = failure({
  code: 'VALIDATION_ERROR',
  message: 'Title is required',
  suggestion: 'Provide a title and try again',
  retryable: false
});
Using Type Guards
import { isSuccess, isFailure } from '@lushly-dev/afd-core';

if (isSuccess(result)) {
  console.log(result.data); // Typed as T (undefined for void commands)
}

if (isFailure(result)) {
  console.log(result.error); // TypeScript knows error exists
}

isSuccess checks only success === true, so a void command's success(undefined) is a success. isFailure checks only success === false, so every result is exactly one of the two, and { success: false } without an error is a failure. Results built with failure() always carry an error; read one from an untrusted peer defensively (result.error?.code).

Defining Commands
import {
  type CommandDefinition,
  createCommandRegistry,
  success,
  validationError
} from '@lushly-dev/afd-core';

interface CreateDocInput {
  title: string;
  content?: string;
}

interface Document {
  id: string;
  title: string;
  content: string;
}

const createDocument: CommandDefinition<CreateDocInput, Document> = {
  name: 'document-create',
  description: 'Creates a new document',
  category: 'documents',
  parameters: [
    { name: 'title', type: 'string', description: 'Document title', required: true },
    { name: 'content', type: 'string', description: 'Document content' }
  ],
  handler: async (input) => {
    if (!input.title) {
      return failure(validationError('Title is required'));
    }
    
    const doc = await db.createDocument(input);
    return success(doc, {
      confidence: 1.0,
      reasoning: 'Document created successfully'
    });
  }
};

// Register and execute
const registry = createCommandRegistry();
registry.register(createDocument);

const result = await registry.execute('document-create', { title: 'Test' });

The registry follows the same rules as the MCP server:

  • Pass { interface: 'mcp' } (or 'cli', 'agent', 'palette') as the context to execute, executeBatch or executeStream and the command's expose options are checked on every entry point, including each batch entry.
  • executeBatch validates the whole request with isBatchRequest() before running anything, and options.timeout is a deadline at any parallelism.
  • A handler that throws returns COMMAND_EXECUTION_ERROR without the exception message or stack. Pass createCommandRegistry({ devMode: true }) to include them.

Batch and stream execution live in executeBatch() and executeStream(), which take an execute callback like executePipeline(), so other hosts can reuse the same semantics. The MCP server uses them too.…

Description from the npm listing.

  • afd
  • agent-first
  • mcp
  • ai-agents
  • command-schema

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

@lushly-dev/afd-core weekly downloads on npm, last 90 days: 21,769 weekly downloads as of Oct 18, 2026, +3780% over 90 days.@lushly-dev/afd-coreWeekly downloads on npm · Last 90 days21,769downloads / week+3780% over 90 days010K20K30K40K50KJul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18downloads / weekobservedarchived (Internet Archive)no observationsJul 22, 2026 – Oct 18, 2026 · 89 observations · Updated Oc…pluginstats.com
@lushly-dev/afd-core weekly downloads on npm, last 90 days: 21,769 weekly downloads as of Oct 18, 2026, +3780% over 90 days.

7/30/90-day growth

@lushly-dev/afd-core weekly downloads growth on npm: +47.4% over 7 days, +225% over 30 days, +3780% over 90 days.@lushly-dev/afd-coreWeekly downloads growth on npm21,769downloads / week now7-day growth+6,998 weekly downloads+47.4%30-day growth+15,061 weekly downloads+225%90-day growth+21,208 weekly downloads+3780%Growth vs. nearest observation to each baseline date · Updated Oct 17, 2026pluginstats.com
@lushly-dev/afd-core weekly downloads growth on npm: +47.4% over 7 days, +225% over 30 days, +3780% over 90 days.

Ranking history

@lushly-dev/afd-core npm ranking history: currently #804 (by weekly downloads).@lushly-dev/afd-corenpm ranking · by weekly downloads · Last 90 days#804current rank#200#300#400#500#600#700#800#900Jul 21Aug 5Aug 20Sep 4Sep 19Oct 4Oct 19rankOct 17, 2026 – Oct 19, 2026 · 3 observations · Updated Oct 17, 2026pluginstats.com
@lushly-dev/afd-core npm ranking history: currently #804 (by weekly downloads).

Listing placement

All npm2,256 listings · 113 pages · 1,130 shown · page 41, #4 (overall #804)
All npm: every listing in weekly downloads order

Listing placement

MCP servers258 listings · 13 pages · page 6, #13 (overall #113)
MCP servers: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (544)
Recent weekly downloads observations for @lushly-dev/afd-core
Date (UTC)Weekly downloadsChange vs. previous
21,769+5.4K
16,328-4.7K
21,041+7.6K
13,434-2.5K
15,969-1.8K
17,7480
17,748+3K
14,771-253
15,024+1.6K
13,470-1.6K
15,064+370
14,694-1.4K
16,056-3.9K
19,969—

Similar npm MCP servers plugins

All 20 @lushly-dev/afd-core alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/@lushly-dev/afd-core. First seen Oct 16, 2026; last successful collection Oct 20, 2026. See the methodology.