Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:A5c ai Babysitter atlas plugin generation

From Leeroopedia
Knowledge Sources
Domains Plugin_Generation, Version_Management
Last Updated 2026-10-23 00:00 GMT

Overview

Concrete tool for resolving unified plugin versions and managing output directories for atlas plugin generation.

Description

The generate-atlas-plugins.mjs script orchestrates atlas plugin generation from a unified source. Two key functions:

  • resolveUnifiedPluginVersion() — Reads plugins/atlas-unified/versions.json for the sdkVersion field. Falls back to packages/adapters/extensions/package.json version. Throws if no version is found. Also syncs plugins/atlas-unified/plugin.json version to match.
  • resetOutputDir(targetDir) — Clears and recreates the output directory. Safety check: the target must be under ROOT. Uses rmSync with recursive option, then mkdirSync.

Usage

  • Atlas plugin generation Step 1: Resolve the unified plugin version before compilation.
  • Atlas plugin generation Step 4: Reset the output directory before writing generated plugins.

Code Reference

Source Location

  • Repository: Babysitter
  • File: scripts/generate-atlas-plugins.mjs:L26-39 (resolveUnifiedPluginVersion), L243-250 (resetOutputDir)

Signature

function resolveUnifiedPluginVersion(): string;
// Reads plugins/atlas-unified/versions.json → sdkVersion
// Falls back to packages/adapters/extensions/package.json → version
// Throws if neither found

function resetOutputDir(targetDir: string): void;
// targetDir must be under ROOT (safety check)
// rmSync(recursive) then mkdirSync

// CLI
node scripts/generate-atlas-plugins.mjs [--output <dir>] [--marketplace <path>] [--compare <dir>] [--compare-only]

Import

# CLI script — run directly
node scripts/generate-atlas-plugins.mjs

I/O Contract

Inputs

Name Type Required Description
versions.json file Yes plugins/atlas-unified/versions.json with sdkVersion
--output string No Output directory (default: artifacts/generated-atlas-plugins)

Outputs

Name Type Description
version string Unified plugin version (e.g. 6.0.4)
plugin.json modified file Version synced to match
output dir directory Cleaned and recreated

Usage Examples

Resolve Plugin Version

# The version is resolved automatically by the generator
node scripts/generate-atlas-plugins.mjs

# Custom output directory
node scripts/generate-atlas-plugins.mjs --output ./my-output

Related Pages

Implements Principle

Requires Environment

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment