/** * `skaile source manifest …` — curated `skaile.manifest.yaml` lifecycle for a * source you do NOT own. `init` generates a curated manifest from a discovery * run and stores it OUTSIDE the source, under the local store catalog * (`~/.skaile/store/manifests/.yaml`); `edit` opens it in `$EDITOR` and * re-validates on save. `source add`/`sync` then apply it as a read overlay * (see `source.ts` `refreshManifestCache`). * * `rebuild` refreshes a curated manifest after an upstream change (merge by * default — curation is sacred; `--overwrite` re-scans). `verify` is a * read-only integrity check (paths, declared hashes, schema, dep refs). * `publish`/`propose`/`yank` remain stubs — they need the store publish * endpoint (`POST /sources//manifest`), which lands in a follow-up. * * @docLink cli/commands/source#manifest */ import type { Command } from "commander"; /** * Resolve a `source manifest` argument into a `{ url, slug, dest }` triple. * * Resolution order: * 1. A key matching an already-registered project source (stored URL, cache * key, or short slug). * 2. A collision-free **store slug** (`____`) whose * manifest already exists at `~/.skaile/store/manifests/.yaml`. This * MUST be tried before bare-name expansion: a bare name like `cli` would * otherwise expand (via `normalizeSourceUrl`) to the skaile-ai org and a * DIFFERENT slug than the one `init` wrote (e.g. `larksuite`). The slug is * the exact identifier `init`'s next-step hint prints back. * 3. Otherwise a git URL / `owner/repo` / bare name via `normalizeSourceUrl`. * * The clone dir is the same URL-keyed cache `source add` uses. */ export declare function resolveSourceArg(arg: string, projectDir: string): { url: string; slug: string; dest: string; manifestFile: string; }; /** * Split a `$VISUAL`/`$EDITOR` value into `{ command, args }` and append the file * as the final arg. The env value is a full command line, not a bare binary — * `EDITOR="code --wait"` must spawn `code` with `["--wait", ]`, and * `EDITOR=code` (which returns before save) is the user's problem, not ours. * A whitespace split covers the common editors (`code --wait`, `code -w`, * `subl -w`, `vi`); paths with embedded spaces are not supported (rare for an * editor binary and out of scope). Falls back to `vi` when unset/empty. * * @docLink cli/commands/source#manifest-edit */ export declare function resolveEditorCommand(editorEnv: string | undefined, target: string): { command: string; args: string[]; }; /** Minimal spawn contract runEdit needs — lets tests inject a fake. */ type SpawnLike = (command: string, args: string[], opts: { stdio: "inherit"; }) => { status: number | null; }; /** * `source manifest edit ` — open the curated store manifest in `$EDITOR` * and re-validate on save. Warnings are surfaced but never hard-fail. * * `spawn` is injectable so tests can assert the argv without launching a real * editor; production passes the default `spawnSync`. */ export declare function runEdit(arg: string, opts: { projectDir: string; }, spawn?: SpawnLike): void; /** * Append the `manifest` sub-tree to a `source` command. * * Called from `makeSourceCommand()` in `source.ts`. */ export declare function addSourceManifestCommands(src: Command): void; export {}; //# sourceMappingURL=source-manifest.d.ts.map