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

@breadstone/archipel-platform-intelligence

v0.0.32

Published

Intelligence infrastructure for NestJS – capability registry, text generation, and provider loaders for OpenAI, Anthropic, Google and Grok.

Downloads

3,126

Readme

@breadstone/archipel-platform-intelligence

Intelligence infrastructure for NestJS — capability registry, text generation, and provider loaders for OpenAI, Anthropic, Google, and Grok.

Features

  • Multi-provider — OpenAI, Anthropic, Google (Gemini), and Grok via @ai-sdk/*
  • Capability registry — Register and discover provider capabilities at startup
  • Text generation — Unified IntelligenceTextGenerator with timeout, retry, and backoff
  • Eager validation — Missing API keys or unsupported providers caught at module init
  • Tree-shakable — Provider loaders in separate sub-exports to avoid bundling unused SDKs
  • Health checksIntelligenceHealthIndicator for readiness probes (separate /health subpath)

⚠️ Environment Variables

| Variable | Required | Default | Description | | -------------------------------- | -------- | ------- | ----------------------------- | | INTELLIGENCE_MODEL | no | - | AI model identifier | | INTELLIGENCE_TEMPERATURE | no | 0.7 | AI model sampling temperature | | INTELLIGENCE_TOP_P | no | 1 | AI model top-p value | | INTELLIGENCE_MAX_OUTPUT_TOKENS | no | 1024 | Max generated output tokens | | OPENAI_API_KEY | no | - | OpenAI / Grok API key | | ANTHROPIC_API_KEY | no | - | Anthropic API key | | GOOGLE_GENERATIVE_AI_API_KEY | no | - | Google Gemini API key |

Quick Start

import { IntelligenceModule } from '@breadstone/archipel-platform-intelligence';

@Module({
  imports: [IntelligenceModule],
})
export class AppModule {}

Import Options

// Main import (module, text generator, capability registry)
import { IntelligenceModule, IntelligenceTextGenerator } from '@breadstone/archipel-platform-intelligence';

// Provider-specific loaders (tree-shakable sub-exports)
import { loadOpenAILanguageModel } from '@breadstone/archipel-platform-intelligence/openai';
import { loadAnthropicLanguageModel } from '@breadstone/archipel-platform-intelligence/anthropic';
import { loadGoogleLanguageModel } from '@breadstone/archipel-platform-intelligence/google';

// Health indicator (optional)
import { IntelligenceHealthIndicator } from '@breadstone/archipel-platform-intelligence/health';

Error Handling

| Error Class | Code | When Thrown | | -------------------------------- | ---------------------------- | ------------------------------------------------------------------ | | IntelligenceProviderError | INTELLIGENCE_PROVIDER | Provider SDK failures during text generation | | IntelligenceValidationError | INTELLIGENCE_VALIDATION | Invalid generation parameters (temperature, topP, maxOutputTokens) | | IntelligenceConfigurationError | INTELLIGENCE_CONFIGURATION | Unsupported provider, missing API key, or missing SDK package |

Resource Limits

| Limit | Value | Description | | ------------------------- | ---------- | ----------------------------------------------------- | | Text generation timeout | 30 seconds | LLM requests aborted after 30s (configurable) | | Max retries | 2 | Failed calls retried with exponential backoff (1s–4s) | | Capability registry cap | 500 | Max registered capabilities; excess silently ignored | | Default max output tokens | 1,024 | Maximum generated tokens per request |

Lifecycle

  • Startup (OnModuleInit): IntelligenceTextGenerator and IntelligenceCapabilityRegistrar validate provider configuration eagerly. Missing API keys or unsupported providers are caught before the first request.

Peer Dependencies

| Package | Required | Notes | | --------------------------------------------- | -------- | ----------------------------- | | @breadstone/archipel-platform-configuration | Yes | Typed config key support | | @nestjs/common | Yes | NestJS core | | ai | Yes | Vercel AI SDK core | | @ai-sdk/openai | No | Required for OpenAI / Grok | | @ai-sdk/anthropic | No | Required for Anthropic | | @ai-sdk/google | No | Required for Google Gemini | | @breadstone/archipel-platform-health | No | Required for health indicator | | @nestjs/terminus | No | Required for health indicator |

Documentation

📖 Package Docs: .docs/packages/platform-intelligence/index.md

Development

# Build
yarn nx build platform-intelligence

# Test
yarn nx test platform-intelligence

# Lint
yarn nx lint platform-intelligence