import type { ParsedDocument } from './parser-utils.js'; import type { SemanticOrigin } from './source-provenance.js'; /** Conventional template value for the required project root descriptor. */ export declare const PROJECT_ENTRYPOINT: string; /** * Resolve the project's required native entrypoint. `entrypoint` is a project locator: * it names the SysML file from which project identity and import scope start; * it does not contribute any model semantics itself. * * There is NO conventional fallback. A project without an `entrypoint` in its * `memo.package.yaml` is not a project, even if a file happens to sit at * `model/catalog/project.sysml` — that path is a scaffolding default, not a * location the resolver assumes. Callers must report the missing locator * rather than a missing file, because the file is usually there. */ export declare function projectEntrypoint(projectRoot: string): string | undefined; /** Where a resolvable SysML package's source lives. */ export interface LibraryRoot { /** Absolute package directory (the one carrying the descriptor). */ dir: string; /** Absolute directory holding the package's .sysml sources. */ sysmlDir: string; packageName: string; packageVersion?: string; } /** One SysML package the resolver found, and where it came from. */ export interface ResolvedPackage { /** Declared SysML package name, e.g. "memo_methodology_core". */ qualifiedName: string; /** Files declaring it. A package may be split across files. */ files: string[]; /** The library root that supplied it, or undefined for project-owned source. */ root?: LibraryRoot; origin: SemanticOrigin; /** Shortest import distance from the project entrypoint; project source is 0. */ importDepth: number; /** Packages that import this one. */ importedBy: string[]; } /** The project's method binding, read from SysML. */ export interface NativeMethodBinding { /** Usage name, e.g. "uiScreenRegionsBinding". */ usageName: string; /** `id` attribute, when authored. */ bindingId?: string; projectName?: string; /** Name the `selectedMethodology` reference resolves to. */ selectedMethodologyName?: string; scopeMode?: ScopeMode; includedModules: string[]; rulePolicies: NativeRulePolicy[]; sourceFile: string; packageQualifiedName?: string; } export type ScopeMode = 'allAvailable' | 'explicit'; /** A `RulePolicy` usage, read from SysML. */ export interface NativeRulePolicy { usageName: string; /** Type name of the referenced `constraint def`, from `ref :>> targetRule : X`. */ targetRuleType?: string; replacementRuleType?: string; disposition?: 'enabled' | 'disabled' | 'replaced'; severityOverride?: 'error' | 'warning' | 'info'; rationaleText?: string; authority?: string; approvalReference?: string; approvedBy?: string; approvedOn?: string; sourceFile: string; } /** A `MethodologyDefinition` usage, read from SysML. */ export interface NativeMethodology { usageName: string; methodologyId?: string; displayName?: string; version?: string; /** Name the `baseMethodology` reference resolves to, when there is one. */ baseMethodologyName?: string; scopeMode?: ScopeMode; includedLayers: string[]; includedModules: string[]; includedStandards: string[]; includedArtifactKinds: string[]; includedViewpoints: string[]; rulePolicies: NativeRulePolicy[]; sourceFile: string; packageQualifiedName?: string; } export interface NativeDiagnostic { code: 'no-entrypoint' | 'no-binding' | 'multiple-bindings' | 'unresolved-methodology' | 'unresolved-import' | 'unresolved-module' | 'scope-mode-conflict' | 'settings-graph-mismatch' | 'invalid-kpar'; message: string; file?: string; } export interface NativeProjectResolution { projectRoot: string; entrypoint?: string; binding?: NativeMethodBinding; /** Methodologies visible anywhere in the resolved closure, by usage name. */ methodologies: Map; /** Packages reachable from the project entrypoint, by qualified name. */ closure: Map; /** Library roots that actually contributed a package to the closure. */ selectedRoots: LibraryRoot[]; /** Roots a locator offered that no import reached. */ unusedRoots: LibraryRoot[]; /** Every parsed document, project and reusable alike. */ documents: ParsedDocument[]; /** * File → the SysML package it declares, for every parsed file. * * Wider than `closure`, deliberately: a caller asking "which package owns * this rule?" needs an answer for every file that was loaded, and whether * that package is in scope is a separate question with its own answer. */ filePackages: Map; diagnostics: NativeDiagnostic[]; } /** * Find the project root by walking up for a root descriptor whose explicit * `entrypoint` names an existing SysML root file. */ export declare function findProjectRoot(startDir: string): string | undefined; /** * Collect the library roots a project could resolve packages from. * * This is deliberately generous: it lists what is *available*, and the import * closure decides what is *selected*. A root listed here and never imported * contributes nothing to the model. */ export declare function discoverLibraryRoots(projectRoot: string): LibraryRoot[]; /** * Resolve a project from its native SysML alone. * * The closure walk starts at the entrypoint's package and follows imports. * Anything it does not reach is not part of the model, however many manifests * point at it. */ export declare function resolveNativeProject(projectRoot: string): Promise; //# sourceMappingURL=native-project.d.ts.map