import { STATES, type VerificationResult } from './manifest.ts'; export { STATES }; import * as REVIEW from './review.ts'; import { type Style } from './style.ts'; /** What `bundle --help` prints: the commands, and how to ask about one. */ export declare const USAGE = "usage: bundle [options]\n bundle -v, --version\n\ncommands:\n create build an archive from a list of files\n sign sign an archive as it is: app.unsigned.nzip into app.nzip\n audit report what is about to be reviewed, and gate signing on the verdict\n verify verify an archive and report its trust state\n attest vouch for an archive from an atproto account, or withdraw that\n like like an app: a star for it, and a post saying so\n likes who likes an app\n publish list an archive's URL under a name, so others can find and install it\n unpublish take a listing down again\n suite write, check and publish a suite: listings installed together\n run mount a signed archive and run it\n search search the listed archives by name, description and publisher\n listings every listed archive, from a local index kept in step with the network\n install fetch a signed archive \u2014 or a suite of them \u2014 from a URL, domain or listing\n parts print the parts an app declares: each archive's package, url and hash\n update refetch what was installed, and replace it if it changed\n installed list what is installed, and re-check each against its record\n validate re-check installs, and say what has been attested since \u2014 at startup\n uninstall remove an installed archive, and forget where it came from\n node say which node runs bundles here, or install one\n sea build a node runtime that verifies an archive before running it\n trust refresh the sigstore trust root and the cached attestations\n policy show the rules this machine installs by, and where they come from\n lexicon show, check or publish the atproto lexicons for attestations and listings\n skill install this package's bundle-auditing skill into a project\n shell print what to load at shell start: Tab completion, and validate\n links make nzip: links open bundle, or say whether they do\n\n bundle --help what one command does, and its options\n bundle help the same\n\noptions:\n -h, --help show this help; after a command, that command's\n -v, --version print the version\n --system the machine's layout, under one root (see 'install')"; /** What `bundle --help` prints: one command, what it does, and its options. */ export declare const HELP: Record; /** * What `bundle --help` prints, for the commands that * have subcommands. The command's own help lists them all. */ export declare const SUBCOMMAND_HELP: Record>; /** * The help for one command, or one of its subcommands: what `--help` after * it prints. Undefined for a command there is none of. */ export declare function helpFor(command: string, subcommand?: string | undefined): string | undefined; /** Where a command's output goes. Swappable so tests need no subprocess. */ export interface Console { out(line: string): void; err(line: string): void; /** * Ask a person something and return the answer — present only when there * is a person to ask. Without it, a decision that needs one is not made. */ ask?: ((question: string) => Promise) | undefined; /** Open a URL for a person to sign in at (default: the system browser). */ open?: ((url: string) => void) | undefined; /** * Let a person edit `file` in their editor, resolving once they close it — * present, as `ask` is, only when there is a person at a terminal. */ edit?: ((file: string) => Promise) | undefined; /** * How each stream is formatted (see style.ts). Without it, both are plain: * the line-oriented text a script reads, which is what tests see too. */ style?: { out: Style; err: Style; } | undefined; } /** The styles `io` writes with: plain unless it says otherwise. */ export declare function styles(io: Console): { o: Style; e: Style; }; /** The exit code for an install or update that needs a decision nobody made, or that was declined. */ export declare const UNDECIDED = 4; /** * The commands, in the order the usage text lists them. Keeping the dispatch * table and the help in one place is what stops the two drifting apart. */ export declare const COMMANDS: Record number | Promise>; /** * Run one CLI invocation. `argv` is the user's arguments — everything after the * runtime and the entry point — and the return value is the process exit code, * so a caller decides what to do with it rather than being exited out from * under. */ export declare function main(argv: string[], io?: Console): Promise; /** Print a verification result, as text or as the JSON `--json` produces. */ export declare function report(res: VerificationResult, json: boolean, io: Console, archive?: string | undefined): void; /** * Split `run`'s own arguments from the application's. * * This command is the one that forwards, so it stops as soon as it reaches * something that is not its own: options up to the archive belong to `run`, and * **everything after the archive belongs to the program**, flags included. That * is what makes * * bundle run ./app verify ./app * * mean what it looks like, rather than quietly handing `verify` to a positional * that nothing reads. `--` is still accepted, and still ends the discussion — * it is only no longer required. */ export declare function splitRunArgs(args: string[]): { mine: string[]; archive?: string | undefined; theirs: string[]; }; /** Show everything a review found, numbered where it can be chosen. */ export declare function showReview(review: REVIEW.Review, about: { name: string; url: string; }, io: Console): void; /** * Every command's options, as `parseArgs` takes them — the one place they are * defined. The commands parse with these, and completion (completion.ts) * offers exactly these, so what Tab suggests is what a command accepts. */ export declare const OPTIONS: { readonly create: { readonly base: { readonly type: 'string'; readonly short: 'b'; readonly default: '.'; }; readonly launcher: { readonly type: 'boolean'; readonly short: 'l'; }; readonly prefix: { readonly type: 'string'; readonly short: 'p'; }; readonly files: { readonly type: 'string'; readonly short: 'f'; }; readonly output: { readonly type: 'string'; readonly short: 'o'; }; readonly key: { readonly type: 'string'; readonly short: 'k'; }; readonly chain: { readonly type: 'string'; readonly short: 'c'; }; readonly hash: { readonly type: 'string'; readonly default: 'sha256'; }; readonly sign: { readonly type: 'string'; readonly default: 'sha256'; }; readonly date: { readonly type: 'string'; }; }; readonly sign: { readonly output: { readonly type: 'string'; readonly short: 'o'; }; readonly executable: { readonly type: 'boolean'; readonly short: 'x'; }; readonly key: { readonly type: 'string'; readonly short: 'k'; }; readonly chain: { readonly type: 'string'; readonly short: 'c'; }; readonly hash: { readonly type: 'string'; readonly default: 'sha256'; }; readonly sign: { readonly type: 'string'; readonly default: 'sha256'; }; readonly flow: { readonly type: 'string'; readonly default: 'auto'; }; readonly token: { readonly type: 'string'; }; readonly 'oidc-issuer': { readonly type: 'string'; }; readonly connector: { readonly type: 'string'; }; readonly fulcio: { readonly type: 'string'; }; readonly rekor: { readonly type: 'string'; }; readonly tsa: { readonly type: 'string'; }; }; readonly audit: { readonly baseline: { readonly type: 'string'; readonly short: 'b'; }; readonly verdict: { readonly type: 'string'; readonly short: 'v'; }; readonly note: { readonly type: 'string'; readonly short: 'n'; }; readonly check: { readonly type: 'boolean'; }; readonly approve: { readonly type: 'boolean'; }; }; readonly verify: { readonly attester: { readonly type: 'string'; readonly multiple: true; }; readonly quorum: { readonly type: 'string'; }; readonly 'max-age': { readonly type: 'string'; }; readonly block: { readonly type: 'string'; readonly multiple: true; }; readonly archive: { readonly type: 'string'; readonly short: 'a'; }; readonly root: { readonly type: 'string'; readonly short: 'r'; readonly multiple: true; }; readonly identity: { readonly type: 'string'; }; readonly issuer: { readonly type: 'string'; }; readonly 'sigstore-root': { readonly type: 'string'; }; readonly json: { readonly type: 'boolean'; }; }; readonly attest: { readonly as: { readonly type: 'string'; }; readonly from: { readonly type: 'string'; }; readonly kind: { readonly type: 'string'; }; readonly note: { readonly type: 'string'; }; readonly post: { readonly type: 'string'; }; readonly 'note-as-post': { readonly type: 'boolean'; }; readonly 'note-from-post': { readonly type: 'boolean'; }; readonly verdict: { readonly type: 'string'; readonly default: 'good'; }; readonly 'password-file': { readonly type: 'string'; }; readonly revoke: { readonly type: 'boolean'; }; readonly root: { readonly type: 'string'; readonly short: 'r'; readonly multiple: true; }; }; readonly like: { readonly as: { readonly type: 'string'; }; readonly note: { readonly type: 'string'; }; readonly revoke: { readonly type: 'boolean'; }; readonly all: { readonly type: 'boolean'; }; readonly yes: { readonly type: 'boolean'; readonly short: 'y'; }; readonly 'password-file': { readonly type: 'string'; }; }; readonly likes: { readonly limit: { readonly type: 'string'; }; readonly json: { readonly type: 'boolean'; }; }; readonly publish: { readonly as: { readonly type: 'string'; }; readonly for: { readonly type: 'string'; }; readonly title: { readonly type: 'string'; }; readonly description: { readonly type: 'string'; }; readonly from: { readonly type: 'string'; }; readonly 'password-file': { readonly type: 'string'; }; readonly root: { readonly type: 'string'; readonly short: 'r'; readonly multiple: true; }; }; readonly unpublish: { readonly as: { readonly type: 'string'; }; readonly 'password-file': { readonly type: 'string'; }; }; readonly suite: { readonly suite: { readonly type: 'string'; readonly short: 's'; readonly default: 'suite.json'; }; readonly for: { readonly type: 'string'; }; readonly yes: { readonly type: 'boolean'; readonly short: 'y'; }; readonly discover: { readonly type: 'boolean'; readonly default: true; }; readonly root: { readonly type: 'string'; readonly short: 'r'; readonly multiple: true; }; readonly json: { readonly type: 'boolean'; }; readonly as: { readonly type: 'string'; }; readonly 'password-file': { readonly type: 'string'; }; readonly kind: { readonly type: 'string'; }; readonly verdict: { readonly type: 'string'; readonly default: 'good'; }; readonly note: { readonly type: 'string'; }; readonly post: { readonly type: 'string'; }; readonly 'note-as-post': { readonly type: 'boolean'; }; readonly 'note-from-post': { readonly type: 'boolean'; }; readonly revoke: { readonly type: 'boolean'; }; }; readonly run: { readonly root: { readonly type: 'string'; readonly short: 'r'; readonly multiple: true; }; readonly identity: { readonly type: 'string'; }; readonly issuer: { readonly type: 'string'; }; readonly untrusted: { readonly type: 'boolean'; }; readonly attester: { readonly type: 'string'; readonly multiple: true; }; readonly quorum: { readonly type: 'string'; }; readonly 'max-age': { readonly type: 'string'; }; readonly block: { readonly type: 'string'; readonly multiple: true; }; }; readonly search: { readonly for: { readonly type: 'string'; }; readonly refresh: { readonly type: 'boolean'; }; readonly offline: { readonly type: 'boolean'; }; readonly json: { readonly type: 'boolean'; }; }; readonly listings: { readonly for: { readonly type: 'string'; }; readonly refresh: { readonly type: 'boolean'; }; readonly offline: { readonly type: 'boolean'; }; readonly json: { readonly type: 'boolean'; }; }; readonly install: { readonly root: { readonly type: 'string'; readonly short: 'r'; readonly multiple: true; }; readonly identity: { readonly type: 'string'; }; readonly issuer: { readonly type: 'string'; }; readonly attester: { readonly type: 'string'; readonly multiple: true; }; readonly quorum: { readonly type: 'string'; }; readonly block: { readonly type: 'string'; readonly multiple: true; }; readonly discover: { readonly type: 'boolean'; readonly default: true; }; readonly yes: { readonly type: 'boolean'; readonly short: 'y'; }; readonly name: { readonly type: 'string'; readonly short: 'n'; }; readonly dir: { readonly type: 'string'; readonly short: 'd'; }; readonly for: { readonly type: 'string'; }; readonly shell: { readonly type: 'boolean'; readonly default: true; }; readonly menu: { readonly type: 'boolean'; readonly default: true; }; readonly window: { readonly type: 'boolean'; }; readonly source: { readonly type: 'string'; }; readonly system: { readonly type: 'boolean'; }; }; readonly parts: { readonly base: { readonly type: 'string'; readonly short: 'b'; }; readonly write: { readonly type: 'string'; readonly short: 'w'; }; }; readonly update: { readonly root: { readonly type: 'string'; readonly short: 'r'; readonly multiple: true; }; readonly identity: { readonly type: 'string'; }; readonly issuer: { readonly type: 'string'; }; readonly attester: { readonly type: 'string'; readonly multiple: true; }; readonly quorum: { readonly type: 'string'; }; readonly block: { readonly type: 'string'; readonly multiple: true; }; readonly discover: { readonly type: 'boolean'; readonly default: true; }; readonly yes: { readonly type: 'boolean'; readonly short: 'y'; }; readonly system: { readonly type: 'boolean'; }; }; readonly installed: { readonly root: { readonly type: 'string'; readonly short: 'r'; readonly multiple: true; }; readonly json: { readonly type: 'boolean'; }; readonly system: { readonly type: 'boolean'; }; }; readonly validate: { readonly quiet: { readonly type: 'boolean'; readonly short: 'q'; }; readonly every: { readonly type: 'string'; }; readonly timeout: { readonly type: 'string'; }; readonly root: { readonly type: 'string'; readonly short: 'r'; readonly multiple: true; }; readonly json: { readonly type: 'boolean'; }; readonly system: { readonly type: 'boolean'; }; }; readonly uninstall: { readonly system: { readonly type: 'boolean'; }; }; readonly sea: { readonly attester: { readonly type: 'string'; readonly multiple: true; }; readonly quorum: { readonly type: 'string'; }; readonly 'max-age': { readonly type: 'string'; }; readonly block: { readonly type: 'string'; readonly multiple: true; }; readonly output: { readonly type: 'string'; readonly short: 'o'; }; readonly node: { readonly type: 'string'; }; readonly base: { readonly type: 'string'; }; readonly sigstore: { readonly type: 'boolean'; readonly default: true; }; readonly untrusted: { readonly type: 'boolean'; }; readonly root: { readonly type: 'string'; readonly short: 'r'; readonly multiple: true; }; readonly identity: { readonly type: 'string'; }; readonly issuer: { readonly type: 'string'; }; readonly hash: { readonly type: 'string'; readonly default: 'sha256'; }; }; readonly trust: { readonly mirror: { readonly type: 'string'; }; readonly attester: { readonly type: 'string'; readonly multiple: true; }; readonly sigstore: { readonly type: 'boolean'; readonly default: true; }; readonly system: { readonly type: 'boolean'; }; }; readonly policy: { readonly app: { readonly type: 'string'; readonly short: 'a'; }; readonly json: { readonly type: 'boolean'; }; readonly system: { readonly type: 'boolean'; }; readonly user: { readonly type: 'boolean'; }; readonly force: { readonly type: 'boolean'; readonly short: 'f'; }; }; readonly node: { readonly minimum: { readonly type: 'string'; }; readonly via: { readonly type: 'string'; }; }; readonly lexicon: { readonly as: { readonly type: 'string'; }; readonly 'dry-run': { readonly type: 'boolean'; }; readonly force: { readonly type: 'boolean'; }; readonly 'password-file': { readonly type: 'string'; }; }; readonly links: { readonly check: { readonly type: 'boolean'; }; }; readonly shell: { readonly every: { readonly type: 'string'; readonly default: '1d'; }; readonly timeout: { readonly type: 'string'; readonly default: '5s'; }; readonly validate: { readonly type: 'boolean'; readonly default: true; }; readonly complete: { readonly type: 'boolean'; readonly default: true; }; }; readonly skill: { readonly dir: { readonly type: 'string'; readonly short: 'd'; }; readonly force: { readonly type: 'boolean'; readonly short: 'f'; }; readonly list: { readonly type: 'boolean'; readonly short: 'l'; }; }; }; //# sourceMappingURL=cli.d.ts.map