@solvrae/core
v0.1.0
Published
Framework-agnostic engine for Solvrae: context, package-manager, plan/execute, registry schemas, and the adapter contract
Maintainers
Readme
@solvrae/core
The framework-agnostic engine behind Solvrae. It knows nothing about any specific framework — adapters do. Core provides:
- Run context —
createContext()resolves cwd, repo root, package manager, scope. - Package manager —
detectPackageManager()+installCommand/addCommand/dlxCommand. - Plan/Execute — a declarative
Action[]model andexecutePlan()with--dry-runand transactional rollback. - Filesystem — injectable
FileSystem,deepMerge,stringifyJson. - Adapter contract — the
FrameworkAdapterinterface adapters implement. - Schemas — Zod schemas for
components.jsonand shadcn registry items.
import { createContext, executePlan, createExecutorDeps, writeFile } from '@solvrae/core';
const ctx = await createContext();
const plan = { summary: 'demo', actions: [writeFile('hello.txt', 'hi', 'overwrite')] };
await executePlan(plan, createExecutorDeps(ctx.logger), { cwd: ctx.cwd, dryRun: ctx.dryRun });Status: pre-alpha (M0). API will change before 1.0.
