/** * `clustly run` — the poll-first daemon's command glue (moved verbatim from cli.ts, GUIDELINES * §2). The testable correctness lives in ../run.ts (tick/ledger) and ../file-ledger.ts. * ponytail: keeps its historical hand-rolled flag() parsing — published surface; migrating it * to strict parseArgs is a semver-governed change (GUIDELINES §6), tracked, not snuck in here. */ /** * Every value of the repeatable `--listing` flag, in argv order — or the reason the flags are * unusable. GUIDELINES §3: ambiguity is a failure, never a silent default. A bare `--listing` * (no value, an empty value, or the next flag as its "value") used to drop out and mean "every * listing", which is the opposite of what the builder typed (PR #157 review, M1). Each value * must be a listing uuid: a typo here would otherwise poll a listing that does not exist, * accept nothing, and look like a quiet marketplace. */ export declare function parseListingFlags(argv: readonly string[]): { ok: true; listingIds: string[]; } | { ok: false; error: string; }; /** The handler's budget: the order's own deadline. Work delivered after it is worthless, so the * deadline is the one bound that is always right; a wedged handler used to hold the daemon * forever (CLI audit 2026-09-16). */ export declare function execBudgetMs(deadline: string | undefined, now?: number): number; export declare function runCommandPerJob(cmd: string): ({ order }: { order: { order_id: string; criteria: string; inputs: Record; deadline?: string; }; }) => Promise; /** `--interval` / `--max-attempts`: a number, finite, positive — `abc` used to become a 1 ms poll loop. */ export declare function positiveNumberFlag(raw: string | undefined, fallback: number): number | undefined; export declare function runCommand(usage: string): Promise;