import { Command } from "commander"; export declare const collectList: (value: string, previous?: string[]) => string[]; export declare const normalizeArgs: (argv: string[]) => string[]; export declare const addConfigOption: (command: Command) => Command; export declare const addEnvironmentOption: (command: Command) => Command; /** * Options for an **org-scoped** command (`ops brief`, `ops campaign`, * `brand`): the command acts on a Sitecore organization, not an XM Cloud * environment. `--org-id` names the org directly; `-n/--environment-name` * names it indirectly via an env profile's `organizationId`. Both are * optional — `resolveOrganization` falls back to the sole/first env * profile, so a single-environment config needs neither flag. */ export declare const addOrgScopeOptions: (command: Command) => Command; /** * Adds the shared verbosity/output flags to a command. * * `--non-interactive` is included by default, but commands that own * their own interactivity decision (e.g. `setup login`, where the * browser device flow simply cannot run headless) pass * `{ nonInteractive: false }` to omit it — the flag would only ever * produce a confusing error or be redundant there. */ export declare const addVerbosityOptions: (command: Command, options?: { nonInteractive?: boolean; }) => Command; export declare const addAllowWriteOption: (command: Command) => Command; export declare const addIncludeExcludeOptions: (command: Command) => Command; export declare const addWhatIfOption: (command: Command) => Command; /** * `--allow-prune` is the recipe-author-aware consent flag for recipe * pushes whose IR contains `PruneChildren` ops in `mode: "delete"`. * The op's mode is the recipe-author's intent ("I want this section's * unlisted children deleted"); `--allow-prune` is the operator's intent * ("I've reviewed the prune list in --what-if and authorize this push * to actually delete those items"). Both must align before the * executor calls `deleteItem`; either alone makes the prune a * rehearsal. * * Without this flag, `recipe push --apply` with delete-mode PruneChildren * ops in the IR fails fast with `POLICY_DENIED` rather than silently * degrading to a no-op. Operators set this AFTER reviewing the prune * list from a `--what-if` run. */ export declare const addAllowPruneOption: (command: Command) => Command; /** * `--snapshot-languages` overrides which languages the prune-rollback * snapshot captures per-(language, version) field values for. Comma- * separated ISO codes. The first language is also treated as the * rollback's createItem default. * * When unset, the planner AUTO-DISCOVERS via the Authoring API's * tenant-level `languages { nodes { name } }` connection (the XM Cloud * schema does NOT expose `Item.languages` — item-level discovery isn't * possible). The client caches the tenant language set for the run; if * the query errors the safety net default is `["en"]`. * * Set this when you want to bound snapshot cost (e.g. tenant has 12 * languages but only `en` and `fr` are operationally important to * preserve in a rollback). */ export declare const addSnapshotLanguagesOption: (command: Command) => Command; /** * `--apply` is the universal "yes really execute" flag for destructive * commands. Without it, scai dry-runs as if `--what-if` were set. * Agent-first: no destruction without an explicit affirmative in the * command line. * * Pre-2026-05-14, destructive commands ran whenever the operator passed * `--allow-write` (cleanup) or `--force` (deploy). That made "I forgot * `--what-if`" the same keystroke as "delete." Inverting the default * costs one flag for intentional mutations and removes the muscle- * memory hazard for everything else. */ export declare const addApplyOption: (command: Command) => Command; /** * Wrap a CLI command runner with the `--apply` gate. Without `--apply` * (and absent an explicit `--what-if`), the runner is invoked with * `whatIf: true` so it produces a plan-only output. Emits a one-line * stderr hint so operators don't wonder why no mutation happened. * * Use at the CLI command layer (in `.action()` handlers). Library * callers (MCP tools, direct programmatic use) bypass this wrapper and * are gated by their own contract (e.g. MCP's per-call `allowWrite`). */ export declare const withApplyGate: (runner: (options: T) => unknown | Promise) => ((options: T) => Promise); /** * Mark a command group as an **unstable surface**. * * Three things happen: `[unstable]` is stamped onto the `--help` * summary (so it shows both in the parent's command list and atop the * group's own help), a stability note is appended to `--help`, and a * one-line stderr warning is printed before any action in the group * runs. * * Unstable areas (`brand`, `ops brief`, `ops campaign`, `agents`) are * reverse-engineered from observed traffic and carry no SemVer * stability promise — their commands, flags, and output may change in * any release. The matching SDK subpaths live under `./unstable/*`; * see the SDK stability section in the README. * * The `preAction` hook is inherited by every subcommand, so the warning * fires once for `scai ` regardless of nesting depth. It * writes to stderr and is suppressed for machine-readable output * (`--json` / `--format json`) and `--quiet` — a JSON consumer often * captures the merged stdout+stderr stream (e.g. the orchestrator's * spawn), where this banner would corrupt the parse. * * `surface` is the user-facing command path (e.g. `"scai ops brief"`), * used verbatim in both the help note and the runtime warning. */ export declare const markUnstable: (command: Command, surface: string) => Command; export declare const addSkipValidationOption: (command: Command) => Command; export declare const addForceOption: (command: Command) => Command; export declare const addUseDebugSignaturesOption: (command: Command) => Command; export declare const addPublishOptions: (command: Command) => Command; export declare const addSkipPullOption: (command: Command) => Command; export declare const addAllowFileChangesOption: (command: Command) => Command; export declare const addExplainOptions: (command: Command) => Command; export declare const addDiffOptions: (command: Command) => Command; export declare const addValidateOptions: (command: Command) => Command; export declare const addPackageCreateOptions: (command: Command) => Command; export declare const addPackageInstallOptions: (command: Command) => Command;