import type { CatalogFetch } from '@teamtrail/core/agents'; /** How a `guides` command talks to the person running it; tests pass their own. */ export interface GuidesIo { out: (text: string) => void; err: (text: string) => void; /** Shows a long text a screen at a time (a pager at a terminal); `out` when missing. */ page?: (text: string) => void; /** True when a person can answer prompts (a TTY). */ interactive: boolean; /** Asks a yes/no question; only called when `interactive`. */ confirm: (question: string) => Promise; /** Overrides `fetch` for catalog requests (tests). */ fetch?: CatalogFetch['fetch']; } /** Flags of `guides `. */ export interface GuidesArgs { command: string; dir: string; rest: string[]; registry?: string; /** Who `guides new` signs the guide with; defaults to the repo's user.name. */ author?: string; /** `--sha256`: approve exactly the guide file with this hash, without a terminal. */ sha256?: string; verified: boolean; approveChecks: boolean; json: boolean; }