/** * Archetype detection primitives (B wave-3 file-size split). * * Extracted verbatim from `archetype-service.ts`: the backend / * monorepo / swagger candidate lists, the archetype-detection * thresholds (PRD-002b slice 2), and the async detectors that probe a * project root for those signals. Values are bytewise-identical to * the original literals. `archetype-service.ts` keeps the decision * functions (`decideArchetype`, `decideFrontendOnly`, * `decideIntegrationMode`) and the public `scanArchetype` entry; the * `frontendOnly` / `frontendOnlyReason` output contract is unchanged. */ export declare const BACKEND_DEP_NAMES: string[]; export declare const BACKEND_DIR_CANDIDATES: string[]; export declare const MONOREPO_CONFIG_FILES: string[]; /** * PRD-002b slice 2 — extract archetype-detection thresholds. Names * describe the meaning; values are bytewise-identical to the original * literals (signaled in commit message). */ export declare const MS_PER_DAY: number; export declare const GREENFIELD_MAX_SRC_FILES = 20; export declare const LEGACY_MIN_SRC_FILES = 20; export declare const LOCKFILE_STALE_DAYS = 180; export declare const GREENFIELD_MAX_LOCKFILE_DAYS = 30; export declare const HIGH_CONFIDENCE_SIGNAL_COUNT = 3; export declare const SWAGGER_CANDIDATE_PATHS: string[]; export declare function readPackageJsonDeps(projectRoot: string): Promise<{ exists: boolean; deps: Record; }>; export declare function detectBackendFrameworks(deps: Record): Promise; /** * Manifests that only a service writes. Language-diverse on purpose: every * other probe in this file is Node-specific, and a repository whose backend is * Go / Java / Kotlin / Python / Ruby / PHP / Rust has no Node manifest at all, * so a Node-only evidence set reported it as `frontendOnly`. */ export declare const SERVICE_ONLY_MANIFEST_FILES: string[]; /** * Manifests a service MAY write and a library or CLI also writes. Counted as * backend evidence only when the file itself names a web framework — the * alternative is a boolean that fires on any Python or Rust directory, which * trades one wrong answer for another. */ export declare const CONDITIONAL_SERVICE_MANIFESTS: ReadonlyArray; /** * How deep from the project root a service is allowed to sit before its * manifest stops being counted. Two levels covers the layouts that were * invisible (`apps/gateway/package.json`, `services/checkout/requirements.txt`, * `web/` + `cmd/server`), and a deeper walk would read generated trees. */ export declare const SERVICE_MANIFEST_MAX_DEPTH = 2; /** * Backend evidence that lives OUTSIDE the root manifest: a workspace package's * own `package.json`, and any non-Node service manifest. * * Returns `dir: evidence` strings (`apps/gateway: express`, `go.mod`, * `services/checkout: requirements.txt`) rather than a boolean, because the * whole defect this probe closes was a verdict that could not say what it saw. */ export declare function detectNestedServiceEvidence(projectRoot: string, backendDepNames?: readonly string[]): Promise; /** * Next.js server actions: `'use server'` in a file under `app/`. Route handlers * under `pages/api` / `app/api` were the only Next backend the detector knew * about, so a Next app that mutates data through actions — the documented * Next.js way — was reported as having no backend at all. */ export declare function detectNextServerActions(projectRoot: string): Promise; export declare function detectNextApiRoutes(projectRoot: string, hasNext: boolean): Promise; export declare function detectBackendDirs(projectRoot: string): Promise; export declare function detectSwagger(projectRoot: string): Promise; export declare function detectMonorepoConfigs(projectRoot: string): Promise; export declare function lockfileAgeDays(projectRoot: string): Promise;