import { AssetManager } from "@skaile/workspaces/asset-manager"; import type { InstallManifest } from "@skaile/workspaces/types"; import { Command } from "commander"; /** * Minimal catalog-source surface the pointer-only install path needs. * `RemoteCatalogSource` satisfies this — narrowing keeps {@link runPointerOnlyInstall} * testable with a hand-rolled stub. */ export interface InstallManifestSource { getInstallManifest(ref: string): Promise; } /** * Capability check: is this catalog source able to serve install manifests? * * `openCatalogSource` returns a `RemoteCatalogSource | RestCatalogSource`. * Only the tRPC-framed `RemoteCatalogSource` implements `getInstallManifest`; * the REST-framed `RestCatalogSource` (the default for any catalog URL other * than `https://skaile.store`) does not. Calling it unconditionally would be a * runtime `TypeError`, so the pointer-only install path must capability-detect * first and fail with a clear, actionable message. */ export declare function supportsInstallManifest(source: unknown): source is InstallManifestSource; /** * Minimal library surface the pointer-only install path needs. * `LocalIndex` satisfies this. */ export interface InstallLibrary { install(manifest: InstallManifest): Promise<{ installPath: string; }>; } /** * Result of a pointer-only catalog install. */ export interface PointerOnlyInstallResult { /** Absolute path the verified asset bytes were written to. */ installPath: string; /** The pinned upstream commit SHA the asset was fetched at. */ commitSha: string; /** Number of files in the install manifest. */ fileCount: number; } /** * Pointer-only catalog install — the `skaile install ` code path. * * 1. Resolves the pointer-only {@link InstallManifest} from the Catalog. * 2. Hands it to the library, which fetches each file's bytes directly from * the upstream repo at the pinned commit, verifies every per-file SHA256 * plus the composite SHA256, and only then writes the verified files. * * Both dependencies are injected so the function is unit-testable without a * network round-trip. In production the CLI passes a `RemoteCatalogSource` * and a `LocalIndex`. * * @param ref - Asset ref (`/@`, optional leading `@`). * @param deps - Injected catalog source + library. * @returns The install path, pinned commit SHA, and file count. * @throws When the ref is malformed, the manifest cannot be resolved, or any * hash verification fails. The underlying error message is surfaced as-is. */ export declare function runPointerOnlyInstall(ref: string, deps: { catalog: InstallManifestSource; library: InstallLibrary; }): Promise; /** * Creates the `skaile install` command. * * Two modes, selected by argument shape: * * - `skaile install` (no positional arg) — reads `skaile.yaml` and deploys all * declared assets (and their transitive dependencies) to the configured * driver target directory. Supports `--locked` for CI-mode install from a * lock file. * - `skaile install /@` — pointer-only catalog * install: resolves the pointer-only install manifest from the configured * Catalog, fetches each file's bytes directly from the upstream repo at the * pinned commit, verifies every per-file + the composite SHA256, then writes * the verified files into the local Library. * * @returns Configured {@link Command} ready for `program.addCommand()`. * @docLink cli/commands/project#make-install-command */ export declare function makeInstallCommand(): Command; /** * Report (never prompt) the body-link soft deps that the declared assets * reference but that aren't in the project — the `install` counterpart to the * `add`-time soft-dep surface. `install` is a batch/CI path (often non-TTY), so * it only ever prints a hint: pulling stays an explicit `skaile add`. Best-effort * — `reportSoftDeps` swallows any index failure and returns `[]`. */ export declare function reportInstalledSoftDeps(am: Pick, onHint?: (line: string) => void): Promise; /** * Creates the `skaile check` command. * * Scans all deployed assets for unmet dependency requirements **and** the * declared set for deps that resolved into the lock but never materialized, and * exits with code 1 if either is found. `doctor()` alone only walks *deployed* * assets' `requires`, so a declared dep whose bytes never landed (e.g. a * store-sourced `mcp-server`) used to report "satisfied" (#462). * * @returns Configured {@link Command} ready for `program.addCommand()`. * @docLink cli/commands/project#make-check-command */ export declare function makeCheckCommand(): Command; /** * Creates the `skaile clean` command. * * Removes all skaile-managed assets tracked in `skaile.lock.yaml` from the * workspace. With `--all` also removes history, patches, repos, and the lock * file itself. Preserves unmanaged (manually placed) assets. * * @returns Configured {@link Command} ready for `program.addCommand()`. * @docLink cli/commands/project#make-clean-command */ export declare function makeCleanCommand(): Command; //# sourceMappingURL=project.d.ts.map