/** * Working-directory state classification for `opensip init`. * * Decides one of four states (pristine / fully-initialized / * partial-config-only / partial-dir-only) based on whether the config * file and the user-source dir exist, and renders the partial-state * refusal message + the "discovered inside existing project" message. */ import type { InitResult, PreExistingFile } from '@opensip-cli/contracts'; import type { ProjectPaths } from '@opensip-cli/core'; export type WorkingDirState = NonNullable; /** * Classify the working directory into one of four states based on the * presence of the config file and the `opensip-cli/` directory. * * The dir-presence check ignores `opensip-cli/.runtime/` — that * subtree is tool-managed (logs, sessions, caches, plugin installs) * and the CLI's `preAction` hook creates `.runtime/logs/` before any * subcommand runs. Treating a runtime-only dir as a "partial-dir" * would misclassify a pristine project the moment the bootstrap hook * touches the disk. User-authored content lives under * `opensip-cli/{fit,sim}/`; only those count as "the dir is present". */ export declare function classifyWorkingDir(paths: ProjectPaths): WorkingDirState; export declare function buildPartialStateMessage(state: WorkingDirState, preExistingFiles: readonly PreExistingFile[], cwd: string): string; /** * Build the "✗ This directory is already inside an OpenSIP CLI project" * refusal message. Same string is embedded in the InitResult.insideExistingProject * for --json consumers and rendered by InitFeedback for human-readable output. */ export declare function formatInsideExistingProjectMessage(discoveredRoot: string): string; //# sourceMappingURL=state-machine.d.ts.map