/** * Skill installation for bundles, through the existing marketplace install. * * Kept behind {@link BundleSkillInstaller} so the apply engine can switch to * the skill-autoinstall runner (`feat/skill-autoinstall`: skill discovery * over bundled / installed / registry skills + install jobs with setup * recipes) when it lands, without touching the engine. * * A skill counts as available when it is bundled with Crewly * (`config/skills/{agent,team-leader,orchestrator}/**`) or already installed * from the marketplace. Missing ones are installed with the marketplace * installer (`POST /api/marketplace/:id/install` / `crewly install `). * * @module services/bundle/bundle-skill-installer */ import type { MarketplaceItem, MarketplaceRegistry } from '../../types/marketplace.types.js'; import type { BundleSkillInstaller } from './bundle-apply.service.js'; /** * Find a skill folder by id under the bundled skill roots. * * @param packageRoot - Crewly package root (contains `config/skills`) * @param skillId - Skill id (folder name) * @returns The folder, or null */ export declare function findBundledSkill(packageRoot: string, skillId: string): string | null; /** What the marketplace installer needs. */ export interface MarketplaceSkillInstallerDeps { /** Crewly package root */ packageRoot: string; /** The Crewly home this deployment writes to */ crewlyHome: string; /** * The Crewly home the marketplace installer writes to. The marketplace * code always uses `~/.crewly`; when a deployment runs under another * CREWLY_HOME (tests, trials) installing would write outside it, so the * installer refuses instead. */ marketplaceHome: string; /** Local install folder of a skill */ installPath(skillId: string): string; fetchRegistry(): Promise; installItem(item: MarketplaceItem): Promise<{ success: boolean; message: string; }>; } /** * A {@link BundleSkillInstaller} over the marketplace. * * @param deps - Package root, homes and marketplace functions * @returns Installer */ export declare function createMarketplaceSkillInstaller(deps: MarketplaceSkillInstallerDeps): BundleSkillInstaller; /** The parts of the skill-setup services the bundle installer uses. */ export interface SkillSetupInstallerDeps { /** SkillDiscoveryService: resolve + probe (is it set up?) */ discovery: { resolve(id: string): Promise; probe(skill: S): Promise; }; /** SkillInstallJobService: install + setup as a job */ jobs: { startInstall(input: { skillId: string; ownerDashboard?: boolean; resumeNote?: string; }): Promise<{ kind: 'already-ready'; } | { kind: 'job'; job: { jobId: string; }; }>; waitForJob(jobId: string): Promise<{ state: string; log: string; }>; }; /** Home this deploy writes to */ crewlyHome: string; /** Home the marketplace download writes to (always ~/.crewly today) */ marketplaceHome: string; } /** * Bundle skill installer on the skill-setup services (specs/skill-auto-install.md): * a skill counts as available only when its declared dependencies are set up, * and installing runs that setup too (brew/apt/model downloads). Deploying a * bundle is the owner's own action, so third-party skills in it install as * the owner (`ownerDashboard`). * * @param deps - Discovery and install-job services * @returns Installer for the apply engine */ export declare function createSkillSetupInstaller(deps: SkillSetupInstallerDeps): BundleSkillInstaller; //# sourceMappingURL=bundle-skill-installer.d.ts.map