/** * D365FO object-naming rules, as data. * * These rules used to live inside the validate_object_naming MCP tool and nowhere * else, because the module exported only the tool wrapper. So prepare could not * reuse them and grew TWO hand-rolled validators of its own * (prepareCreate.validateNaming, and the block in prepareChange), each weaker and * neither agreeing with this one. Live, on the same input, prepare(mode="create") * answered "Naming looks valid" for a name this checker warns is missing the model * prefix, and prepare(mode="change") answered a malformed table-extension name with * "Confirm naming follows your convention" — no check at all. * * Everything below is MOVED, not rewritten: the tool renders this result and its * ~35 existing tests are the proof that the rules did not change in the move. */ /** What the caller asks about. Mirrors the tool's arguments. */ export interface ObjectNamingInput { proposedName: string; objectType: string; baseObjectName?: string; modelPrefix?: string; modelName?: string; /** * Whether the object an extension EXTENDS exists, already answered by a caller * that has a better source than this one. * * These rules can only probe the SYMBOL INDEX, while `search`, `get_object_info` * and the write path all prefer the C# bridge. On an instance indexed with * `extractMode: "custom"` the index deliberately holds only custom models, so * the index answer for a Microsoft base enum is "not found in symbol index — * ensure it's indexed": false, and advice that re-indexing can never satisfy. * `undefined` keeps the index probe, which is the only option without a bridge. */ baseObjectExists?: boolean; } /** Every verdict the rules reach, before anything decides how to print it. */ export interface ObjectNamingCheck { /** Possibly reinterpreted from the requested type — see reinterpretExtensionType. */ objectType: string; reinterpretedNote?: string; baseObjectName?: string; isExtension: boolean; prefix: string; prefixOrigin: string; modelName: string; modelTokenPhrase: string; extensionInfix: string; useModelName: boolean; namingStyle: string; useModelNameForClass: boolean; usePrefixLeadingForClass: boolean; classNamingStyle: string; errors: string[]; warnings: string[]; suggestions: string[]; exactConflict: Array<{ name: string; type: string; model: string; }>; similarSymbols: Array<{ name: string; type: string; model: string; }>; } /** * Run every naming rule against one proposed name. * * Async because the effective prefix must wait for a model detection still in * flight; reading it early resolves from EXTENSION_PREFIX alone and validates * against a token the server itself would not apply (#833). */ export declare function checkObjectNaming(db: any, input: ObjectNamingInput): Promise; //# sourceMappingURL=objectNamingRules.d.ts.map