@workos/oagen 0.6.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/cli/index.mjs +1339 -451
  2. package/dist/cli/index.mjs.map +1 -1
  3. package/dist/compat/index.d.mts +144 -57
  4. package/dist/compat/index.d.mts.map +1 -1
  5. package/dist/compat/index.mjs +365 -35
  6. package/dist/compat/index.mjs.map +1 -1
  7. package/dist/{diff-CltJMcwG.mjs → diff-BaH9qa8k.mjs} +100 -23
  8. package/dist/diff-BaH9qa8k.mjs.map +1 -0
  9. package/dist/differ-CTl98yoS.d.mts +116 -0
  10. package/dist/differ-CTl98yoS.d.mts.map +1 -0
  11. package/dist/index.d.mts +4 -2
  12. package/dist/index.d.mts.map +1 -1
  13. package/dist/index.mjs +177 -4
  14. package/dist/index.mjs.map +1 -1
  15. package/dist/{differ-CG5ZErKl.mjs → overlay-TYxHOCow.mjs} +1112 -553
  16. package/dist/overlay-TYxHOCow.mjs.map +1 -0
  17. package/dist/scripts/smoke/baseline.mjs +176 -3
  18. package/dist/scripts/smoke/baseline.mjs.map +1 -1
  19. package/dist/smoke.d.mts +43 -0
  20. package/dist/smoke.d.mts.map +1 -1
  21. package/dist/smoke.mjs +176 -3
  22. package/dist/smoke.mjs.map +1 -1
  23. package/dist/tree-sitter-C53w_0WE.mjs.map +1 -1
  24. package/dist/{types-C7g5sLuX.d.mts → types-mTtkgy_h.d.mts} +213 -2
  25. package/dist/types-mTtkgy_h.d.mts.map +1 -0
  26. package/dist/verify/index.d.mts +4 -3
  27. package/dist/verify/index.d.mts.map +1 -1
  28. package/dist/verify/index.mjs +12 -10
  29. package/dist/verify/index.mjs.map +1 -1
  30. package/docs/architecture/emitter-contract.md +2 -2
  31. package/docs/architecture/extractor-contract.md +6 -5
  32. package/docs/architecture/pipeline.md +4 -3
  33. package/docs/architecture/workflows.md +5 -3
  34. package/docs/cli.md +148 -6
  35. package/docs/contributor/public-api.md +1 -1
  36. package/docs/core/compatibility-ir.md +200 -0
  37. package/docs/core/compatibility-policy.md +170 -0
  38. package/docs/core/compatibility.md +83 -0
  39. package/docs/core/index.md +5 -0
  40. package/docs/core/manifest-schema.md +76 -0
  41. package/docs/core/quickstart.md +9 -2
  42. package/docs/core/verify-compat.md +235 -0
  43. package/package.json +1 -1
  44. package/skills/generate-emitter/SKILL.md +12 -7
  45. package/skills/generate-emitter/references/project-scaffold.md +27 -6
  46. package/skills/generate-extractor/SKILL.md +14 -8
  47. package/skills/generate-sdk/SKILL.md +2 -2
  48. package/skills/generate-smoke-test/SKILL.md +9 -5
  49. package/skills/review-operations/SKILL.md +2 -2
  50. package/skills/verify-compat/SKILL.md +1 -1
  51. package/dist/diff-CltJMcwG.mjs.map +0 -1
  52. package/dist/differ-CG5ZErKl.mjs.map +0 -1
  53. package/dist/types-C7g5sLuX.d.mts.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"differ-CG5ZErKl.mjs","names":["defaultNodeHints"],"sources":["../src/compat/extractor-registry.ts","../src/compat/language-hints.ts","../src/compat/overlay.ts","../src/compat/spec-filter.ts","../src/compat/differ.ts"],"sourcesContent":["import { RegistryError } from '../errors.js';\nimport type { Extractor } from './types.js';\n\nconst extractors = new Map<string, Extractor>();\n\nexport function registerExtractor(extractor: Extractor): void {\n extractors.set(extractor.language, extractor);\n}\n\nexport function getExtractor(language: string): Extractor {\n const extractor = extractors.get(language);\n if (!extractor) {\n const available = [...extractors.keys()].join(', ') || '(none)';\n throw new RegistryError(\n `No extractor registered for language: ${language}. Available: ${available}`,\n `Register an extractor for \"${language}\" via registerExtractor() or add one in your oagen.config.ts plugin.`,\n );\n }\n return extractor;\n}\n","import type { ApiSurface, LanguageHints } from './types.js';\nimport { splitWords } from '../utils/naming.js';\n\n/** Untyped map patterns — hoisted to avoid allocation on every isTypeEquivalent call. */\nconst UNTYPED_MAP_PATTERNS = new Set([\n 'Record<string, unknown>',\n 'Record<string, any>',\n '{ [key: string]: any; }',\n '{ [key: string]: unknown; }',\n 'any',\n]);\n\nexport const NAMED_TYPE_RE = /^[A-Z][a-zA-Z0-9]*$/;\n\n/** Check whether a type name exists as an interface, class, or enum in a surface. */\nexport function typeExistsInSurface(name: string, surface: ApiSurface): boolean {\n return !!(surface.interfaces[name] || surface.classes[name] || surface.enums[name]);\n}\n\n/** Split a PascalCase string into words, keeping only words > 2 chars. */\nfunction splitPascalWords(s: string): string[] {\n return splitWords(s).filter((w) => w.length > 2);\n}\n\n/**\n * Check whether two named types share enough PascalCase word components to\n * be considered equivalent (handles name reordering from Json merges, etc.).\n * Both names have `Response$` stripped before comparison.\n */\nexport function namedTypeWordsOverlap(a: string, b: string, minOverlap = 1): boolean {\n const aNoResp = a.replace(/Response$/, '');\n const bNoResp = b.replace(/Response$/, '');\n const aWords = new Set(splitPascalWords(aNoResp).map((w) => w.toLowerCase()));\n const bWords = new Set(splitPascalWords(bNoResp).map((w) => w.toLowerCase()));\n const overlap = [...aWords].filter((w) => bWords.has(w));\n return overlap.length >= minOverlap && overlap.length >= Math.min(aWords.size, bWords.size) - 1;\n}\n\n/** Split a pipe-delimited union string into trimmed, non-empty members. */\nfunction parseUnionMembers(s: string): string[] {\n return s\n .split('|')\n .map((p) => p.trim())\n .filter(Boolean);\n}\n\n/**\n * Default implementation of isNullableOnlyDifference — shared across extractors.\n * Returns true when stripping nullable wrappers from both sides yields the same\n * type, but the original types differ (i.e., the only difference is nullability).\n */\nexport function defaultIsNullableOnlyDifference(\n hints: Pick<LanguageHints, 'stripNullable'>,\n a: string,\n b: string,\n): boolean {\n return (hints.stripNullable(a) ?? a) === (hints.stripNullable(b) ?? b) && a !== b;\n}\n\n/**\n * Node/TypeScript language hints — reference implementation.\n * Extracted from the hardcoded logic previously in differ.ts and overlay.ts.\n */\nexport const nodeHints: LanguageHints = {\n stripNullable(type: string): string | null {\n const members = parseUnionMembers(type);\n const stripped = members.filter((p) => p !== 'null');\n if (stripped.length === members.length) {\n return null; // no null member found\n }\n return stripped.join(' | ');\n },\n\n isNullableOnlyDifference(a: string, b: string): boolean {\n return (nodeHints.stripNullable(a) ?? a) === (nodeHints.stripNullable(b) ?? b) && a !== b;\n },\n\n isUnionReorder(a: string, b: string): boolean {\n const membersA = parseUnionMembers(a).sort();\n const membersB = parseUnionMembers(b).sort();\n if (membersA.length !== membersB.length || membersA.length < 2) return false;\n return membersA.every((m, i) => m === membersB[i]);\n },\n\n isGenericTypeParam(type: string): boolean {\n if (/^[A-Z]$/.test(type)) return true;\n if (/^T[A-Z][a-zA-Z]*$/.test(type)) return true;\n if (/^[A-Z]\\[\\]$/.test(type) || /^T[A-Z][a-zA-Z]*\\[\\]$/.test(type)) return true;\n return false;\n },\n\n isExtractionArtifact(type: string): boolean {\n return type === 'any' || type === 'Record<string, unknown>';\n },\n\n tolerateCategoryMismatch: true,\n\n extractReturnTypeName(returnType: string): string | null {\n let inner = returnType;\n while (inner.startsWith('Promise<') && inner.endsWith('>')) {\n inner = inner.slice(8, -1);\n }\n const genericMatch = inner.match(/^[A-Za-z]+<(.+)>$/);\n if (genericMatch) {\n inner = genericMatch[1];\n }\n inner = inner.replace(/\\[\\]$/, '');\n if (['void', 'string', 'number', 'boolean', 'any', 'unknown', 'null', 'undefined'].includes(inner)) {\n return null;\n }\n return inner;\n },\n\n extractParamTypeName(paramType: string): string | null {\n if (['string', 'number', 'boolean', 'any', 'unknown'].includes(paramType)) {\n return null;\n }\n return paramType;\n },\n\n propertyMatchesClass(propertyName: string, className: string): boolean {\n // Support both camelCase and snake_case properties matching PascalCase classes\n // e.g., \"organizations\" ≡ \"Organizations\", \"api_keys\" ≡ \"ApiKeys\"\n const normalizedProp = propertyName.replace(/[-_]/g, '').toLowerCase();\n return normalizedProp === className.toLowerCase();\n },\n\n derivedModelNames(modelName: string): string[] {\n return [`${modelName}Response`, `Serialized${modelName}`];\n },\n\n isTypeEquivalent(baselineType: string, candidateType: string, candidateSurface: ApiSurface): boolean {\n // Check if one side is a named enum and the other is an inline union\n // of that enum's string literal values.\n // e.g., baseline: '\"active\" | \"inactive\"', candidate: 'ConnectionState'\n // or baseline: 'ConnectionState', candidate: '\"active\" | \"inactive\"'\n\n // Try: candidate is enum name, baseline is inline union of string literals.\n // The generated enum may have MORE members than the baseline (new spec values),\n // so check that all baseline members exist in the enum (subset match).\n const candEnum = candidateSurface.enums[candidateType];\n if (candEnum) {\n const enumValuesSet = new Set(Object.values(candEnum.members).flatMap((v) => [`\"${v}\"`, `'${v}'`]));\n const baseMembers = parseUnionMembers(baselineType);\n if (baseMembers.length > 0 && baseMembers.every((m) => enumValuesSet.has(m))) {\n return true;\n }\n }\n\n // Tolerate untyped-map equivalences:\n // { [key: string]: any; } ≡ Record<string, unknown> ≡ Record<string, any>\n if (UNTYPED_MAP_PATTERNS.has(baselineType) && UNTYPED_MAP_PATTERNS.has(candidateType)) {\n return true;\n }\n\n // Tolerate inline object literal vs named model in candidate.\n // e.g., baseline: '{ type: \"organization\"; id: string; }', candidate: 'ApiKeyOwner'\n // The named model is more structured but semantically equivalent.\n if (baselineType.startsWith('{') && baselineType.endsWith('}')) {\n if (typeExistsInSurface(candidateType, candidateSurface)) {\n return true;\n }\n }\n\n // Tolerate named-type-to-named-type mismatches when both types exist\n // as models/interfaces/enums in their respective surfaces. This handles\n // cases where the parser qualifies inline types with parent names while\n // the live SDK uses shared types:\n // baseline: RoleResponse, candidate: OrganizationMembershipRole\n // baseline: ConnectionType, candidate: ProfileConnectionType\n // baseline: AuditLogTargetSchema[], candidate: AuditLogSchemaJsonTarget[]\n const baseClean = baselineType.replace(/\\[\\]$/, '');\n const candClean = candidateType.replace(/\\[\\]$/, '');\n const sameArrayness = baselineType.endsWith('[]') === candidateType.endsWith('[]');\n\n // Response suffix equivalence (both directions)\n if (sameArrayness) {\n if (candClean === baseClean + 'Response' || baseClean === candClean + 'Response') {\n return true;\n }\n }\n\n // Both are named types (PascalCase, no operators) — check if candidate\n // is a known model/interface/enum, and baseline looks like a named type too.\n // This tolerates the parser's qualified naming vs the live SDK's shared naming.\n if (sameArrayness && NAMED_TYPE_RE.test(baseClean) && NAMED_TYPE_RE.test(candClean)) {\n if (typeExistsInSurface(candClean, candidateSurface)) {\n // One name contains the other (e.g., ProfileConnectionType contains ConnectionType)\n if (candClean.includes(baseClean) || baseClean.includes(candClean)) {\n return true;\n }\n // Strip Response suffix and check containment\n const baseNoResp = baseClean.replace(/Response$/, '');\n const candNoResp = candClean.replace(/Response$/, '');\n if (candNoResp.includes(baseNoResp) || baseNoResp.includes(candNoResp)) {\n return true;\n }\n // Word-component overlap: split PascalCase into words and check\n // if they share enough meaningful words (handles name reordering\n // from Json merges: AuditLogTargetSchema vs AuditLogSchemaJsonTarget)\n if (namedTypeWordsOverlap(baseClean, candClean, 2)) {\n return true;\n }\n }\n }\n\n return false;\n },\n};\n\n/**\n * Merge partial language hint overrides over nodeHints defaults.\n * Any hint not provided falls back to the Node/TypeScript implementation.\n */\nexport function resolveHints(overrides: Partial<LanguageHints>): LanguageHints {\n return { ...nodeHints, ...overrides };\n}\n","import type { ApiSurface, ApiInterface, ApiMethod, Violation, OverlayLookup, LanguageHints } from './types.js';\nimport type { ApiSpec, Model } from '../ir/types.js';\nimport { toSnakeCase, splitWords } from '../utils/naming.js';\nimport { nodeHints as defaultNodeHints } from './language-hints.js';\n\nexport type { MethodOverlay, OverlayLookup } from './types.js';\n\nexport interface ManifestEntry {\n operationId: string;\n sdkResourceProperty: string;\n sdkMethodName: string;\n httpMethod: string;\n path: string;\n pathParams: string[];\n bodyFields: string[];\n queryFields: string[];\n}\n\n/**\n * Find the class name that owns a given SDK resource property.\n * E.g. if the surface has a class \"Organizations\" with property \"organizations\",\n * and sdkResourceProperty is \"organizations\", return \"Organizations\".\n */\nfunction findClassForProperty(\n surface: ApiSurface,\n sdkResourceProperty: string,\n hints: LanguageHints,\n): string | undefined {\n for (const [className, cls] of Object.entries(surface.classes)) {\n // Check if the class itself maps to this property (language-specific match)\n if (hints.propertyMatchesClass(sdkResourceProperty, className)) {\n return className;\n }\n // Check properties — resolve to the property's type class, not the parent.\n // This prevents generic parent classes (e.g., WorkOS) from being returned\n // when the actual resource class (e.g., ApiKeys) should be used.\n for (const [propName, prop] of Object.entries(cls.properties)) {\n if (propName === sdkResourceProperty) {\n const propType = (prop as { type?: string }).type;\n if (propType && surface.classes[propType]) {\n return propType;\n }\n // Property type not in surface — skip rather than return the parent\n return undefined;\n }\n }\n }\n\n // Strategy 3: Word-suffix fallback\n // \"adminPortal\" → [\"admin\",\"portal\"]; class \"Portal\" → [\"portal\"]\n // [\"portal\"] is a suffix of [\"admin\",\"portal\"] → match\n const propWords = splitWords(sdkResourceProperty).map((w) => w.toLowerCase());\n if (propWords.length > 1) {\n for (const [className] of Object.entries(surface.classes)) {\n const classWords = splitWords(className).map((w) => w.toLowerCase());\n if (classWords.length > 0 && classWords.length < propWords.length) {\n const suffix = propWords.slice(propWords.length - classWords.length);\n if (classWords.every((w, i) => w === suffix[i])) {\n return className;\n }\n }\n }\n }\n\n return undefined;\n}\n\nexport function buildOverlayLookup(\n surface: ApiSurface,\n manifest?: ManifestEntry[],\n spec?: ApiSpec,\n hints?: LanguageHints,\n options?: { strictModelMatch?: boolean },\n): OverlayLookup {\n const resolvedHints = hints ?? defaultNodeHints;\n const lookup: OverlayLookup = {\n methodByOperation: new Map(),\n httpKeyByMethod: new Map(),\n interfaceByName: new Map(),\n typeAliasByName: new Map(),\n requiredExports: new Map(),\n modelNameByIR: new Map(),\n fileBySymbol: new Map(),\n };\n\n // If manifest available, map operationId → HTTP method + path → existing method\n if (manifest) {\n for (const entry of manifest) {\n const key = `${entry.httpMethod.toUpperCase()} ${entry.path}`;\n const className = findClassForProperty(surface, entry.sdkResourceProperty, resolvedHints);\n if (className) {\n let resolvedMethodName = entry.sdkMethodName;\n let methods = surface.classes[className]?.methods[resolvedMethodName];\n\n // Exact match failed — try prefix match on the resolved class.\n // Handles cases where the generated name is shorter than the existing name\n // (e.g., manifest says \"delete\" but existing SDK has \"deleteApiKey\").\n // Only accept when exactly one candidate matches — ambiguous matches are worse than no match.\n if (!methods) {\n const classMethods = surface.classes[className]?.methods ?? {};\n const prefix = resolvedMethodName.toLowerCase();\n const candidates: [string, ApiMethod[]][] = [];\n for (const [name, overloads] of Object.entries(classMethods)) {\n if (name.toLowerCase().startsWith(prefix) && name !== resolvedMethodName) {\n candidates.push([name, overloads]);\n }\n }\n if (candidates.length === 1) {\n methods = candidates[0][1];\n resolvedMethodName = candidates[0][0];\n } else if (candidates.length > 1) {\n // Disambiguate: prefer the candidate whose name is <prefix><pathSegment>\n // derived from the FIRST segment of the operation path. This avoids\n // mismatching when a class combines operations from multiple path groups\n // (e.g., /organizations and /organization_domains both in Organizations).\n const firstSegment =\n entry.path\n .split('/')\n .filter(Boolean)[0]\n ?.replace(/[{}_-]/g, '') ?? '';\n if (firstSegment) {\n const segLower = firstSegment.toLowerCase();\n // Try the path segment as-is and as singular\n const segSingular = segLower.endsWith('s') ? segLower.slice(0, -1) : segLower;\n const best = candidates.find(([name]) => {\n const lower = name.toLowerCase();\n return lower === prefix + segLower || lower === prefix + segSingular;\n });\n if (best) {\n methods = best[1];\n resolvedMethodName = best[0];\n }\n }\n\n // HTTP verb disambiguation: when path disambiguation fails, use the\n // HTTP method to prefer method names that match the verb semantics.\n // E.g., GET → list/get, POST → create, PUT → set/update, DELETE → delete/remove.\n if (!methods) {\n const verbMatch = disambiguateByHttpVerb(candidates, entry.httpMethod);\n if (verbMatch) {\n methods = verbMatch[1];\n resolvedMethodName = verbMatch[0];\n }\n }\n }\n }\n\n // Suffix match: the existing SDK may use a longer controller-prefixed\n // method name that ends with the transformed name.\n // (e.g., manifest says \"validate_api_key\" but existing SDK has\n // \"api_keys_controller_validate_api_key\").\n // Only accept when exactly one candidate matches — ambiguous matches are worse than no match.\n if (!methods) {\n const classMethods = surface.classes[className]?.methods ?? {};\n const suffix = resolvedMethodName.toLowerCase();\n const candidates: [string, ApiMethod[]][] = [];\n for (const [name, overloads] of Object.entries(classMethods)) {\n if (name.toLowerCase().endsWith(suffix) && name !== resolvedMethodName) {\n candidates.push([name, overloads]);\n }\n }\n if (candidates.length === 1) {\n methods = candidates[0][1];\n resolvedMethodName = candidates[0][0];\n }\n }\n\n // Word-part subsequence match: the surface method may have extra words\n // inserted into the manifest method name. For example:\n // \"disableFlag\" → \"disableFeatureFlag\" ([\"disable\",\"Flag\"] ⊂ [\"disable\",\"Feature\",\"Flag\"])\n // \"getByExternalId\" → \"getOrganizationByExternalId\"\n // Only accept when exactly one candidate matches, or use HTTP verb disambiguation.\n if (!methods) {\n const manifestWords = splitCamelCase(resolvedMethodName);\n if (manifestWords.length >= 2) {\n const classMethods = surface.classes[className]?.methods ?? {};\n const candidates: [string, ApiMethod[]][] = [];\n for (const [name, overloads] of Object.entries(classMethods)) {\n if (name === resolvedMethodName) continue;\n const surfaceWords = splitCamelCase(name);\n if (surfaceWords.length > manifestWords.length && isSubsequence(manifestWords, surfaceWords)) {\n candidates.push([name, overloads]);\n }\n }\n if (candidates.length === 1) {\n methods = candidates[0][1];\n resolvedMethodName = candidates[0][0];\n } else if (candidates.length > 1) {\n const verbMatch = disambiguateByHttpVerb(candidates, entry.httpMethod);\n if (verbMatch) {\n methods = verbMatch[1];\n resolvedMethodName = verbMatch[0];\n }\n }\n }\n }\n\n // Reverse prefix match: the manifest name may be LONGER than the surface\n // name (e.g., \"createResources\" → \"createResource\", \"removeRoleByCriteria\" → \"removeRole\").\n // Check if the manifest name starts with a surface name. Only accept unique matches.\n if (!methods) {\n const classMethods = surface.classes[className]?.methods ?? {};\n const manifestLower = resolvedMethodName.toLowerCase();\n const candidates: [string, ApiMethod[]][] = [];\n for (const [name, overloads] of Object.entries(classMethods)) {\n if (name === resolvedMethodName) continue;\n if (manifestLower.startsWith(name.toLowerCase()) && name.length >= 3) {\n candidates.push([name, overloads]);\n }\n }\n if (candidates.length === 1) {\n methods = candidates[0][1];\n resolvedMethodName = candidates[0][0];\n } else if (candidates.length > 1) {\n const verbMatch = disambiguateByHttpVerb(candidates, entry.httpMethod);\n if (verbMatch) {\n methods = verbMatch[1];\n resolvedMethodName = verbMatch[0];\n }\n }\n }\n\n const method = methods?.[0];\n if (method) {\n lookup.methodByOperation.set(key, {\n className,\n methodName: resolvedMethodName,\n params: method.params,\n returnType: method.returnType,\n });\n lookup.httpKeyByMethod.set(`${className}.${resolvedMethodName}`, key);\n }\n }\n }\n }\n\n // Map interface and type alias names\n for (const name of Object.keys(surface.interfaces)) {\n lookup.interfaceByName.set(name, name);\n }\n for (const name of Object.keys(surface.typeAliases)) {\n lookup.typeAliasByName.set(name, name);\n }\n\n // Map barrel exports\n for (const [path, symbols] of Object.entries(surface.exports)) {\n lookup.requiredExports.set(path, new Set(symbols));\n }\n\n // Populate fileBySymbol from enriched surface\n for (const record of [surface.classes, surface.interfaces, surface.typeAliases, surface.enums] as Record<\n string,\n { sourceFile?: string }\n >[]) {\n for (const [name, item] of Object.entries(record)) {\n if (item.sourceFile) lookup.fileBySymbol.set(name, item.sourceFile);\n }\n }\n\n // Auto-infer IR model name → SDK interface name mappings\n if (spec) {\n buildModelNameMap(surface, spec, lookup, resolvedHints, options);\n\n // Remap fileBySymbol so IR model names point to the SDK symbol's file\n for (const [irName, sdkName] of lookup.modelNameByIR) {\n const filePath = lookup.fileBySymbol.get(sdkName);\n if (filePath) {\n lookup.fileBySymbol.set(irName, filePath);\n }\n }\n }\n\n return lookup;\n}\n\n// ---------------------------------------------------------------------------\n// HTTP verb disambiguation\n// ---------------------------------------------------------------------------\n\n/** Map HTTP methods to preferred method name prefixes for disambiguation. */\nconst HTTP_VERB_PREFIXES: Record<string, string[]> = {\n GET: ['list', 'get', 'fetch', 'retrieve', 'find'],\n POST: ['create', 'add', 'insert', 'send'],\n PUT: ['set', 'update', 'replace', 'put'],\n PATCH: ['update', 'patch', 'modify'],\n DELETE: ['delete', 'remove', 'revoke'],\n};\n\n/**\n * Disambiguate multiple method candidates using HTTP verb semantics.\n * Returns the best match or undefined if no unique match is found.\n */\nfunction disambiguateByHttpVerb<T>(candidates: [string, T][], httpMethod: string): [string, T] | undefined {\n const prefixes = HTTP_VERB_PREFIXES[httpMethod.toUpperCase()];\n if (!prefixes) return undefined;\n\n const verbCandidates = candidates.filter(([name]) => {\n const lower = name.toLowerCase();\n return prefixes.some((p) => lower.startsWith(p));\n });\n\n if (verbCandidates.length === 1) return verbCandidates[0];\n return undefined;\n}\n\n// ---------------------------------------------------------------------------\n// Word-part matching helpers\n// ---------------------------------------------------------------------------\n\n/** Split a camelCase identifier into its word parts (e.g., \"getByExternalId\" → [\"get\",\"By\",\"External\",\"Id\"]). */\nfunction splitCamelCase(name: string): string[] {\n const parts: string[] = [];\n let start = 0;\n for (let i = 1; i < name.length; i++) {\n if (name[i] >= 'A' && name[i] <= 'Z') {\n parts.push(name.slice(start, i));\n start = i;\n }\n }\n parts.push(name.slice(start));\n return parts;\n}\n\n/** Check if `needle` words form a subsequence of `haystack` words (case-insensitive). */\nfunction isSubsequence(needle: string[], haystack: string[]): boolean {\n let ni = 0;\n for (let hi = 0; hi < haystack.length && ni < needle.length; hi++) {\n if (needle[ni].toLowerCase() === haystack[hi].toLowerCase()) ni++;\n }\n return ni === needle.length;\n}\n\n// ---------------------------------------------------------------------------\n// Automatic model name inference\n// ---------------------------------------------------------------------------\n\n/**\n * Normalize a field name to a canonical form for comparison.\n * Handles camelCase → snake_case so \"createdAt\" and \"created_at\" match.\n */\nfunction normalizeFieldName(name: string): string {\n return toSnakeCase(name);\n}\n\n/**\n * Compute the Jaccard similarity between two sets of normalized field names.\n * Returns score (0–1) and raw intersection count.\n */\nfunction jaccardSimilarity(a: Set<string>, b: Set<string>): { score: number; intersection: number } {\n if (a.size === 0 && b.size === 0) return { score: 0, intersection: 0 };\n let intersection = 0;\n for (const item of a) {\n if (b.has(item)) intersection++;\n }\n const union = a.size + b.size - intersection;\n return { score: union === 0 ? 0 : intersection / union, intersection };\n}\n\n/**\n * Build a set of normalized field names from an IR model.\n */\nfunction irModelFieldSignature(model: Model): Set<string> {\n return new Set(model.fields.map((f) => normalizeFieldName(f.name)));\n}\n\n/**\n * Build a set of normalized field names from an SDK interface.\n */\nfunction sdkInterfaceFieldSignature(iface: ApiInterface): Set<string> {\n return new Set(Object.keys(iface.fields).map(normalizeFieldName));\n}\n\n/**\n * Populate the modelNameByIR map using two strategies:\n *\n * 1. Operation-based matching (high confidence):\n * When a manifest maps an HTTP operation to an SDK method, extract the\n * method's return type and parameter types. Match them against the IR\n * operation's response model and request body model.\n *\n * 2. Field-structure matching (fallback):\n * For IR models not matched by operations, compare their field names\n * against all SDK interfaces using Jaccard similarity. A match requires\n * ≥60% field overlap with ≥3 fields in common.\n */\nfunction buildModelNameMap(\n surface: ApiSurface,\n spec: ApiSpec,\n lookup: OverlayLookup,\n hints: LanguageHints,\n options?: { strictModelMatch?: boolean },\n): void {\n const mapped = new Set<string>(); // IR model names already mapped\n const usedSdkNames = new Set<string>(); // SDK names already claimed\n\n // --- Strategy 1: Operation-based matching ---\n if (lookup.methodByOperation.size > 0) {\n for (const service of spec.services) {\n for (const op of service.operations) {\n const httpKey = `${op.httpMethod.toUpperCase()} ${op.path}`;\n const methodOverlay = lookup.methodByOperation.get(httpKey);\n if (!methodOverlay) continue;\n\n // Match response model → SDK return type\n if (op.response.kind === 'model' && !mapped.has(op.response.name)) {\n const sdkTypeName = hints.extractReturnTypeName(methodOverlay.returnType);\n if (sdkTypeName && surface.interfaces[sdkTypeName]) {\n lookup.modelNameByIR.set(op.response.name, sdkTypeName);\n mapped.add(op.response.name);\n usedSdkNames.add(sdkTypeName);\n }\n }\n\n // Match request body model → SDK param type\n if (op.requestBody?.kind === 'model' && !mapped.has(op.requestBody.name)) {\n for (const param of methodOverlay.params) {\n const sdkTypeName = hints.extractParamTypeName(param.type);\n if (sdkTypeName && surface.interfaces[sdkTypeName]) {\n lookup.modelNameByIR.set(op.requestBody.name, sdkTypeName);\n mapped.add(op.requestBody.name);\n usedSdkNames.add(sdkTypeName);\n break;\n }\n }\n }\n }\n }\n }\n\n // --- Strategy 2: Field-structure matching ---\n // Pre-compute SDK interface field signatures\n const sdkSignatures: { name: string; fields: Set<string>; fieldCount: number }[] = [];\n for (const [name, iface] of Object.entries(surface.interfaces)) {\n if (usedSdkNames.has(name)) continue;\n const fields = sdkInterfaceFieldSignature(iface);\n if (fields.size >= 2) {\n sdkSignatures.push({ name, fields, fieldCount: fields.size });\n }\n }\n\n const sdkSignatureNames = new Set(sdkSignatures.map((s) => s.name));\n\n for (const model of spec.models) {\n if (mapped.has(model.name)) continue;\n if (model.fields.length < 2) continue;\n\n // Strategy 2a: Prefer exact name match — if the IR model name matches an SDK\n // interface name exactly, use it without Jaccard scoring. This prevents\n // false positives when a superset interface (e.g., DirectoryUserWithGroups)\n // scores higher than the exact match (DirectoryUser).\n if (sdkSignatureNames.has(model.name) && !usedSdkNames.has(model.name)) {\n lookup.modelNameByIR.set(model.name, model.name);\n mapped.add(model.name);\n usedSdkNames.add(model.name);\n continue;\n }\n\n // Strategy 2a+: Try derived model names before falling back to Jaccard\n const derivedNames = hints.derivedModelNames(model.name);\n for (const derived of derivedNames) {\n if (sdkSignatureNames.has(derived) && !usedSdkNames.has(derived)) {\n lookup.modelNameByIR.set(model.name, derived);\n mapped.add(model.name);\n usedSdkNames.add(derived);\n break;\n }\n }\n if (mapped.has(model.name)) continue;\n\n // In strict mode, skip Jaccard entirely\n if (options?.strictModelMatch) continue;\n\n // Strategy 2b: Fall back to Jaccard field-similarity matching\n const irFields = irModelFieldSignature(model);\n let bestMatch: string | null = null;\n let bestScore = 0;\n\n for (const sdk of sdkSignatures) {\n if (usedSdkNames.has(sdk.name)) continue;\n\n const { score, intersection } = jaccardSimilarity(irFields, sdk.fields);\n\n // Require ≥60% Jaccard AND enough fields in common (scaled by model size)\n const minIntersection = Math.max(3, Math.ceil(irFields.size * 0.5));\n if (score > bestScore && score >= 0.6 && intersection >= minIntersection) {\n bestScore = score;\n bestMatch = sdk.name;\n }\n }\n\n if (bestMatch) {\n lookup.modelNameByIR.set(model.name, bestMatch);\n mapped.add(model.name);\n usedSdkNames.add(bestMatch);\n }\n }\n}\n\n/**\n * Patch overlay with violations from a failed verification.\n * Adds explicit name mappings for symbols that were generated with wrong names.\n * Returns a new OverlayLookup (immutable).\n */\nexport function patchOverlay(overlay: OverlayLookup, violations: Violation[], baseline: ApiSurface): OverlayLookup {\n const patched: OverlayLookup = {\n methodByOperation: new Map(overlay.methodByOperation),\n httpKeyByMethod: new Map(overlay.httpKeyByMethod),\n interfaceByName: new Map(overlay.interfaceByName),\n typeAliasByName: new Map(overlay.typeAliasByName),\n requiredExports: new Map(Array.from(overlay.requiredExports.entries()).map(([k, v]) => [k, new Set(v)])),\n modelNameByIR: new Map(overlay.modelNameByIR),\n fileBySymbol: new Map(overlay.fileBySymbol),\n };\n\n let warnedManifest = false;\n\n for (const v of violations) {\n if (v.category === 'public-api') {\n // For missing methods: symbolPath is \"ClassName.methodName\"\n const parts = v.symbolPath.split('.');\n if (parts.length === 2) {\n const [className, methodName] = parts;\n // Check if this is a method on a class in the baseline\n const baseClass = baseline.classes[className];\n if (baseClass && baseClass.methods[methodName]?.length > 0) {\n // Use reverse map to resolve the HTTP key for this method.\n // NOTE: httpKeyByMethod is only populated when a manifest was provided\n // to buildOverlayLookup. Without a manifest, method-level violations\n // cannot be patched via overlay — the emitter must implement\n // generateManifest for the self-correcting loop to resolve these.\n const httpKey = overlay.httpKeyByMethod.get(`${className}.${methodName}`);\n if (!httpKey && overlay.httpKeyByMethod.size === 0 && !warnedManifest) {\n console.warn(\n 'Warning: No smoke-manifest.json available. Method-level violations cannot be auto-patched. ' +\n 'Implement generateManifest in your emitter for the self-correcting loop to resolve these.',\n );\n warnedManifest = true;\n }\n if (httpKey) {\n const method = baseClass.methods[methodName][0];\n patched.methodByOperation.set(httpKey, {\n className,\n methodName,\n params: method.params,\n returnType: method.returnType,\n });\n }\n }\n // Also check if it's an interface field\n const baseIface = baseline.interfaces[className];\n if (baseIface) {\n patched.interfaceByName.set(className, className);\n }\n } else if (parts.length === 1) {\n // Top-level symbol: class, interface, type alias, or enum\n const name = parts[0];\n if (baseline.interfaces[name]) {\n patched.interfaceByName.set(name, name);\n }\n if (baseline.typeAliases[name]) {\n patched.typeAliasByName.set(name, name);\n }\n }\n }\n\n if (v.category === 'export-structure') {\n // symbolPath is \"exports[path].symbolName\"\n const match = v.symbolPath.match(/^exports\\[(.+?)\\]\\.(.+)$/);\n if (match) {\n const [, path, symbol] = match;\n if (!patched.requiredExports.has(path)) {\n patched.requiredExports.set(path, new Set());\n }\n patched.requiredExports.get(path)!.add(symbol);\n }\n }\n }\n\n return patched;\n}\n","import type { ApiSpec, TypeRef } from '../ir/types.js';\nimport { walkTypeRef } from '../ir/types.js';\nimport type { ApiSurface, LanguageHints } from './types.js';\n\n/**\n * Compute the set of symbol names that are derivable from the OpenAPI spec.\n * Only these names should be compared during compat verification — everything\n * else in the baseline is hand-written and out of scope for generation.\n */\nexport function specDerivedNames(spec: ApiSpec, hints: LanguageHints): Set<string> {\n const names = new Set<string>();\n\n // Build set of top-level enum names for filtering inline enums\n const topLevelEnumNames = new Set(spec.enums.map((e) => e.name));\n\n // Service classes\n for (const service of spec.services) {\n names.add(service.name);\n for (const op of service.operations) {\n // Operation methods are matched by the class diff, not by name here\n collectTypeRefNames(op.response, names, hints, topLevelEnumNames);\n if (op.requestBody) collectTypeRefNames(op.requestBody, names, hints, topLevelEnumNames);\n for (const p of [...op.pathParams, ...op.queryParams, ...op.headerParams, ...(op.cookieParams ?? [])]) {\n collectTypeRefNames(p.type, names, hints, topLevelEnumNames);\n }\n }\n }\n\n // Models → domain interface + language-specific derived names\n for (const model of spec.models) {\n names.add(model.name);\n for (const derived of hints.derivedModelNames(model.name)) {\n names.add(derived);\n }\n for (const field of model.fields) {\n collectTypeRefNames(field.type, names, hints, topLevelEnumNames);\n }\n }\n\n // Enums → type aliases\n for (const e of spec.enums) {\n names.add(e.name);\n }\n\n return names;\n}\n\n/**\n * Compute a map of enum name → set of wire values that appear in the spec.\n * Used by filterSurface to exclude hand-added enum members that aren't in the spec.\n */\nexport function specDerivedEnumValues(spec: ApiSpec): Map<string, Set<string | number>> {\n const result = new Map<string, Set<string | number>>();\n for (const e of spec.enums) {\n result.set(e.name, new Set(e.values.map((v) => v.value)));\n }\n return result;\n}\n\n/**\n * Compute the set of field paths (e.g., \"Organization.name\") that are defined\n * in the OpenAPI spec's model schemas. Used by filterSurface to exclude\n * hand-added SDK fields that reference spec-derived types.\n */\nexport function specDerivedFieldPaths(spec: ApiSpec, hints: LanguageHints): Set<string> {\n const paths = new Set<string>();\n for (const model of spec.models) {\n for (const field of model.fields) {\n paths.add(`${model.name}.${field.name}`);\n }\n // Also add field paths for derived model names (e.g., OrganizationResponse.name)\n for (const derived of hints.derivedModelNames(model.name)) {\n for (const field of model.fields) {\n paths.add(`${derived}.${field.name}`);\n }\n }\n }\n return paths;\n}\n\n/**\n * Compute the set of method paths (e.g., \"SSO.authorize\") that are defined\n * as operations in the OpenAPI spec's services. Used by filterSurface to\n * exclude hand-written SDK methods that don't correspond to spec operations.\n */\nexport function specDerivedMethodPaths(spec: ApiSpec): Set<string> {\n const paths = new Set<string>();\n for (const service of spec.services) {\n for (const op of service.operations) {\n paths.add(`${service.name}.${op.name}`);\n }\n }\n return paths;\n}\n\n/**\n * Compute the set of HTTP operation keys (e.g., \"GET /sso/authorize\") that\n * exist in the spec. Used for overlay-based method matching.\n */\nexport function specDerivedHttpKeys(spec: ApiSpec): Set<string> {\n const keys = new Set<string>();\n for (const service of spec.services) {\n for (const op of service.operations) {\n keys.add(`${op.httpMethod.toUpperCase()} ${op.path}`);\n }\n }\n return keys;\n}\n\nfunction collectTypeRefNames(ref: TypeRef, out: Set<string>, hints: LanguageHints, topLevelEnums?: Set<string>): void {\n walkTypeRef(ref, {\n model: (r) => {\n out.add(r.name);\n for (const derived of hints.derivedModelNames(r.name)) {\n out.add(derived);\n }\n },\n enum: (r) => {\n // Only include enums that are top-level (in spec.enums). Inline enums\n // embedded in TypeRefs (e.g., query parameter enums) may not be emitted\n // by all emitters, so they should not create false-positive violations.\n if (!topLevelEnums || topLevelEnums.has(r.name)) {\n out.add(r.name);\n }\n },\n });\n}\n\nfunction filterRecord<T>(record: Record<string, T>, allowed: Set<string>): Record<string, T> {\n const result: Record<string, T> = {};\n for (const [name, value] of Object.entries(record)) {\n if (allowed.has(name)) result[name] = value;\n }\n return result;\n}\n\n/**\n * Filter an ApiSurface to only include symbols whose names appear in the\n * allowed set. Symbols not in the set are dropped entirely — they won't\n * count toward the total or produce violations.\n *\n * For interfaces: when fieldPaths is provided, only keeps fields that appear\n * in the spec-derived field paths. This prevents false positives from hand-added\n * SDK fields that reference spec-derived types but aren't defined in the spec.\n *\n * For classes: when methodPaths is provided, only keeps methods whose names\n * appear in the spec-derived method paths. This prevents false positives from\n * hand-written SDK methods (e.g., SSO.authorization_url, Webhooks.construct_event)\n * that don't correspond to spec operations. Properties on service classes are\n * also filtered: only UPPER_CASE constants that are spec-derivable are kept.\n */\nexport function filterSurface(\n surface: ApiSurface,\n allowedNames: Set<string>,\n opts?: {\n fieldPaths?: Set<string>;\n methodPaths?: Set<string>;\n enumValues?: Map<string, Set<string | number>>;\n },\n): ApiSurface {\n const { fieldPaths, methodPaths, enumValues } = opts ?? {};\n const filteredInterfaces = filterRecord(surface.interfaces, allowedNames);\n\n // Filter interface fields by spec-derived field paths if provided\n if (fieldPaths) {\n for (const [name, iface] of Object.entries(filteredInterfaces)) {\n const filteredFields: Record<string, (typeof iface.fields)[string]> = {};\n for (const [fieldName, field] of Object.entries(iface.fields)) {\n // Keep the field if its path is spec-derived\n if (fieldPaths.has(`${name}.${fieldName}`)) {\n filteredFields[fieldName] = field;\n }\n }\n filteredInterfaces[name] = { ...iface, fields: filteredFields };\n }\n }\n\n let filteredClasses = filterRecord(surface.classes, allowedNames);\n\n // Filter class methods and properties by spec-derived method paths if provided\n if (methodPaths) {\n // Build a set of service-class names that have spec-derived methods.\n // Only filter methods on these classes; non-service model classes keep all members.\n const serviceClassNames = new Set<string>();\n for (const path of methodPaths) {\n const dot = path.indexOf('.');\n if (dot !== -1) serviceClassNames.add(path.slice(0, dot));\n }\n\n const newClasses: Record<string, (typeof filteredClasses)[string]> = {};\n for (const [name, cls] of Object.entries(filteredClasses)) {\n if (serviceClassNames.has(name)) {\n // Service class — filter methods and properties by spec-derived method paths\n const filteredMethods: typeof cls.methods = {};\n for (const [methodName, overloads] of Object.entries(cls.methods)) {\n if (methodPaths.has(`${name}.${methodName}`)) {\n filteredMethods[methodName] = overloads;\n }\n }\n\n // Filter properties: only keep properties that are spec-derivable.\n // Hand-written constants (PROVIDERS, DEFAULT_TOLERANCE, WIDGET_SCOPES)\n // are not derivable from the spec and should be excluded.\n const filteredProperties: typeof cls.properties = {};\n for (const [propName, prop] of Object.entries(cls.properties)) {\n if (methodPaths.has(`${name}.${propName}`)) {\n filteredProperties[propName] = prop;\n }\n }\n\n newClasses[name] = {\n ...cls,\n methods: filteredMethods,\n properties: filteredProperties,\n };\n } else if (fieldPaths) {\n // Non-service (model) class — filter properties by spec-derived field paths.\n // In some languages (Ruby, PHP), models are represented as classes with\n // properties rather than interfaces with fields. Apply the same field-level\n // filtering used for interfaces to exclude hand-added SDK fields.\n const filteredProperties: typeof cls.properties = {};\n for (const [propName, prop] of Object.entries(cls.properties)) {\n if (fieldPaths.has(`${name}.${propName}`)) {\n filteredProperties[propName] = prop;\n }\n }\n\n // Also filter methods on model classes: convenience methods like\n // `primary_email` are hand-written and not spec-derivable.\n // Keep utility methods (from_json, to_json, etc.) if they appear in fieldPaths,\n // otherwise drop non-spec methods.\n const filteredMethods: typeof cls.methods = {};\n for (const [methodName, overloads] of Object.entries(cls.methods)) {\n if (fieldPaths.has(`${name}.${methodName}`) || methodPaths.has(`${name}.${methodName}`)) {\n filteredMethods[methodName] = overloads;\n }\n }\n\n newClasses[name] = {\n ...cls,\n methods: filteredMethods,\n properties: filteredProperties,\n };\n } else {\n // No filtering available — keep as-is\n newClasses[name] = cls;\n }\n }\n filteredClasses = newClasses;\n }\n\n // Filter enum members by spec-derived values if provided\n let filteredEnums = filterRecord(surface.enums, allowedNames);\n if (enumValues) {\n const newEnums: Record<string, (typeof filteredEnums)[string]> = {};\n for (const [name, enumDef] of Object.entries(filteredEnums)) {\n const specValues = enumValues.get(name);\n if (!specValues) {\n // Enum not in spec values map — keep as-is\n newEnums[name] = enumDef;\n continue;\n }\n // Filter members: keep only those whose wire value is in the spec.\n // Use case-insensitive comparison since some extractors produce\n // PascalCase values (e.g., \"Pending\") while the spec has lowercase.\n const specValuesLower = new Set([...specValues].map((v) => String(v).toLowerCase()));\n const filteredMembers: typeof enumDef.members = {};\n for (const [member, value] of Object.entries(enumDef.members)) {\n if (specValues.has(value) || specValuesLower.has(String(value).toLowerCase())) {\n filteredMembers[member] = value;\n }\n }\n newEnums[name] = { ...enumDef, members: filteredMembers };\n }\n filteredEnums = newEnums;\n }\n\n return {\n ...surface,\n classes: filteredClasses,\n interfaces: filteredInterfaces,\n typeAliases: filterRecord(surface.typeAliases, allowedNames),\n enums: filteredEnums,\n exports: {}, // exports are structural, not symbol-level — skip for scoped comparison\n };\n}\n","import type { ApiSurface, ApiMethod, DiffResult, Violation, Addition, LanguageHints } from './types.js';\nimport { NAMED_TYPE_RE, typeExistsInSurface } from './language-hints.js';\n\nexport {\n specDerivedNames,\n specDerivedFieldPaths,\n specDerivedMethodPaths,\n specDerivedHttpKeys,\n specDerivedEnumValues,\n filterSurface,\n} from './spec-filter.js';\n\nexport function diffSurfaces(baseline: ApiSurface, candidate: ApiSurface, hints: LanguageHints): DiffResult {\n const violations: Violation[] = [];\n const additions: Addition[] = [];\n let totalBaseline = 0;\n let preserved = 0;\n\n // Diff classes\n for (const [name, baseClass] of Object.entries(baseline.classes)) {\n totalBaseline++;\n const candClass = candidate.classes[name];\n if (!candClass) {\n violations.push({\n category: 'public-api',\n severity: 'breaking',\n symbolPath: name,\n baseline: name,\n candidate: '(missing)',\n message: `Class \"${name}\" exists in baseline but not in generated output`,\n });\n totalBaseline += Object.values(baseClass.methods).reduce((sum, overloads) => sum + overloads.length, 0);\n totalBaseline += Object.keys(baseClass.properties).length;\n continue;\n }\n preserved++;\n\n // Diff methods (each method name maps to an array of overloads)\n for (const [methodName, baseOverloads] of Object.entries(baseClass.methods)) {\n const candOverloads = candClass.methods[methodName];\n for (const baseMethod of baseOverloads) {\n totalBaseline++;\n if (!candOverloads || candOverloads.length === 0) {\n violations.push({\n category: 'public-api',\n severity: 'breaking',\n symbolPath: `${name}.${methodName}`,\n baseline: methodName,\n candidate: '(missing)',\n message: `Method \"${name}.${methodName}\" exists in baseline but not in generated output`,\n });\n continue;\n }\n const candMethod = candOverloads.find((c) => signaturesMatch(baseMethod, c));\n if (!candMethod) {\n // Fallback: check language-specific signature equivalence\n const equivalentMethod = hints.isSignatureEquivalent\n ? candOverloads.find((c) => hints.isSignatureEquivalent!(baseMethod, c, candidate))\n : undefined;\n if (equivalentMethod) {\n preserved++;\n continue;\n }\n violations.push({\n category: 'signature',\n severity: 'breaking',\n symbolPath: `${name}.${methodName}`,\n baseline: formatSignature(baseMethod),\n candidate: formatSignature(candOverloads[0]),\n message: `Signature mismatch for \"${name}.${methodName}\"`,\n });\n continue;\n }\n preserved++;\n }\n }\n\n // Check for new methods (additions)\n for (const methodName of Object.keys(candClass.methods)) {\n if (!baseClass.methods[methodName]) {\n additions.push({ symbolPath: `${name}.${methodName}`, symbolType: 'method' });\n }\n }\n\n // Diff properties\n for (const [propName, baseProp] of Object.entries(baseClass.properties)) {\n totalBaseline++;\n const candProp = candClass.properties[propName];\n if (!candProp) {\n violations.push({\n category: 'public-api',\n severity: 'breaking',\n symbolPath: `${name}.${propName}`,\n baseline: baseProp.type,\n candidate: '(missing)',\n message: `Property \"${name}.${propName}\" exists in baseline but not in generated output`,\n });\n continue;\n }\n if (baseProp.type !== candProp.type) {\n const nullableOnly = hints.isNullableOnlyDifference(baseProp.type, candProp.type);\n violations.push({\n category: 'signature',\n severity: nullableOnly ? 'warning' : 'breaking',\n symbolPath: `${name}.${propName}`,\n baseline: baseProp.type,\n candidate: candProp.type,\n message: `Property type mismatch for \"${name}.${propName}\"`,\n });\n if (nullableOnly) preserved++;\n continue;\n }\n preserved++;\n }\n\n // Check for new properties (additions)\n for (const propName of Object.keys(candClass.properties)) {\n if (!baseClass.properties[propName]) {\n additions.push({ symbolPath: `${name}.${propName}`, symbolType: 'property' });\n }\n }\n }\n\n // Check for new classes (additions)\n for (const name of Object.keys(candidate.classes)) {\n if (!baseline.classes[name]) {\n additions.push({ symbolPath: name, symbolType: 'class' });\n }\n }\n\n // Precompute lowercased field/property name sets for field-structure matching\n const candIfaceFieldSets = new Map<string, Set<string>>();\n for (const [n, iface] of Object.entries(candidate.interfaces)) {\n candIfaceFieldSets.set(n, new Set(Object.keys(iface.fields).map((f) => f.toLowerCase())));\n }\n const candClassPropSets = new Map<string, Set<string>>();\n for (const [n, cls] of Object.entries(candidate.classes)) {\n candClassPropSets.set(n, new Set(Object.keys(cls.properties).map((f) => f.toLowerCase())));\n }\n\n // Diff interfaces\n for (const [name, baseIface] of Object.entries(baseline.interfaces)) {\n totalBaseline++;\n const candIface = candidate.interfaces[name];\n if (!candIface) {\n // When tolerateCategoryMismatch is on, also check if this interface is\n // a derived type (Serialized*) whose base model exists.\n // These are emitter implementation details, not public API contract violations.\n let tolerated = false;\n if (hints.tolerateCategoryMismatch && name.startsWith('Serialized')) {\n const baseName = name.slice('Serialized'.length);\n if (candidate.interfaces[baseName] || candidate.classes[baseName]) {\n tolerated = true;\n }\n }\n if (tolerated) {\n preserved++;\n totalBaseline += Object.keys(baseIface.fields).length;\n preserved += Object.keys(baseIface.fields).length;\n continue;\n }\n // Field-structure matching: look for a candidate interface or class with\n // the same set of field names (possibly under a different name and case).\n // Handles cases where the emitter generates a response model with a spec-derived\n // name (e.g., PortalSessionsCreateResponse) while the live SDK used a custom\n // name (e.g., GenerateLinkResponse). Also tolerates PascalCase vs camelCase\n // field names (e.g., C# \"Link\" vs extracted \"link\").\n if (!tolerated) {\n const baseFieldNamesLower = new Set(Object.keys(baseIface.fields).map((f) => f.toLowerCase()));\n if (baseFieldNamesLower.size > 0) {\n // Check candidate interfaces\n for (const [, candFieldNamesLower] of candIfaceFieldSets) {\n if (\n candFieldNamesLower.size === baseFieldNamesLower.size &&\n [...baseFieldNamesLower].every((f) => candFieldNamesLower.has(f))\n ) {\n tolerated = true;\n break;\n }\n }\n // Check candidate classes (properties match fields)\n if (!tolerated) {\n for (const [, candPropNamesLower] of candClassPropSets) {\n if (\n candPropNamesLower.size === baseFieldNamesLower.size &&\n [...baseFieldNamesLower].every((f) => candPropNamesLower.has(f))\n ) {\n tolerated = true;\n break;\n }\n }\n }\n } else {\n // Zero fields after spec-filtering: the interface was filtered to name-only.\n // Tolerate this as a structural match when the candidate has any model/interface\n // whose name shares word components with the baseline name (e.g.,\n // GenerateLinkResponse → PortalSessionsCreateResponse, both are \"Response\" types).\n // This prevents false positives from spec-filtered interfaces that can't be\n // meaningfully compared without their fields.\n tolerated = true;\n }\n }\n if (tolerated) {\n preserved++;\n totalBaseline += Object.keys(baseIface.fields).length;\n preserved += Object.keys(baseIface.fields).length;\n continue;\n }\n violations.push({\n category: 'public-api',\n severity: 'breaking',\n symbolPath: name,\n baseline: name,\n candidate: '(missing)',\n message: `Interface \"${name}\" exists in baseline but not in generated output`,\n });\n totalBaseline += Object.keys(baseIface.fields).length;\n continue;\n }\n preserved++;\n\n for (const [fieldName, baseField] of Object.entries(baseIface.fields)) {\n totalBaseline++;\n const candField = candIface.fields[fieldName];\n if (!candField) {\n // Downgrade to warning when the field's type references a named model/interface/enum\n // that doesn't exist in the candidate surface. This indicates the field is missing\n // because the type couldn't be resolved from the spec (parser limitation), not\n // because the emitter chose to omit it.\n const baseTypeClean = baseField.type.replace(/\\[\\]$/, '').replace(/ \\| null$/, '');\n const typeIsUnresolvable = NAMED_TYPE_RE.test(baseTypeClean) && !typeExistsInSurface(baseTypeClean, candidate);\n violations.push({\n category: 'public-api',\n severity: typeIsUnresolvable ? 'warning' : 'breaking',\n symbolPath: `${name}.${fieldName}`,\n baseline: baseField.type,\n candidate: '(missing)',\n message: `Field \"${name}.${fieldName}\" exists in baseline but not in generated output`,\n });\n if (typeIsUnresolvable) preserved++;\n continue;\n }\n if (baseField.type !== candField.type) {\n // Union member reordering is not a real difference\n if (hints.isUnionReorder(baseField.type, candField.type)) {\n preserved++;\n continue;\n }\n // Named type vs inline union equivalence (e.g., ConnectionState ≡ \"active\" | \"inactive\")\n if (hints.isTypeEquivalent?.(baseField.type, candField.type, candidate)) {\n preserved++;\n continue;\n }\n const nullableOnly = hints.isNullableOnlyDifference(baseField.type, candField.type);\n // Generic type params (T, TCustomAttributes, etc.) can't be preserved\n // in generated output — the extractor resolves them to `any`.\n const genericParam = hints.isGenericTypeParam(baseField.type);\n // When candidate resolves to an extraction artifact, it's typically because\n // the extractor couldn't resolve the type due to missing imports.\n // Downgrade to warning since the generated source likely has the correct type.\n const extractionArtifact = hints.isExtractionArtifact(candField.type);\n const isWarning = nullableOnly || genericParam || extractionArtifact;\n violations.push({\n category: 'signature',\n severity: isWarning ? 'warning' : 'breaking',\n symbolPath: `${name}.${fieldName}`,\n baseline: baseField.type,\n candidate: candField.type,\n message: `Field type mismatch for \"${name}.${fieldName}\"`,\n });\n // Warning-level mismatches are backwards-compatible — count as preserved\n if (isWarning) preserved++;\n continue;\n }\n preserved++;\n }\n\n // Check for new fields (additions)\n for (const fieldName of Object.keys(candIface.fields)) {\n if (!baseIface.fields[fieldName]) {\n additions.push({ symbolPath: `${name}.${fieldName}`, symbolType: 'property' });\n }\n }\n }\n\n // Check for new interfaces (additions)\n for (const name of Object.keys(candidate.interfaces)) {\n if (!baseline.interfaces[name]) {\n additions.push({ symbolPath: name, symbolType: 'interface' });\n }\n }\n\n // Diff type aliases\n for (const [name, baseAlias] of Object.entries(baseline.typeAliases)) {\n totalBaseline++;\n const candAlias = candidate.typeAliases[name];\n if (!candAlias) {\n // Category mismatch tolerance: if the candidate has this name as an\n // interface, class, or enum instead of a type alias, it's still \"present\" —\n // just in a different declaration form (e.g., TypeScript type alias vs interface vs enum).\n if (hints.tolerateCategoryMismatch && typeExistsInSurface(name, candidate)) {\n preserved++;\n continue;\n }\n violations.push({\n category: 'public-api',\n severity: 'breaking',\n symbolPath: name,\n baseline: baseAlias.value,\n candidate: '(missing)',\n message: `Type alias \"${name}\" exists in baseline but not in generated output`,\n });\n continue;\n }\n if (baseAlias.value !== candAlias.value) {\n // Type serialization may not guarantee union member ordering,\n // so two identical unions can produce different strings.\n // Check for order-independent equality before flagging.\n if (hints.isUnionReorder(baseAlias.value, candAlias.value)) {\n preserved++;\n continue;\n }\n const nullableOnly = hints.isNullableOnlyDifference(baseAlias.value, candAlias.value);\n violations.push({\n category: 'signature',\n severity: nullableOnly ? 'warning' : 'breaking',\n symbolPath: name,\n baseline: baseAlias.value,\n candidate: candAlias.value,\n message: `Type alias value mismatch for \"${name}\"`,\n });\n if (nullableOnly) preserved++;\n continue;\n }\n preserved++;\n }\n\n // Check for new type aliases (additions)\n for (const name of Object.keys(candidate.typeAliases)) {\n if (!baseline.typeAliases[name]) {\n additions.push({ symbolPath: name, symbolType: 'type-alias' });\n }\n }\n\n // Diff enums\n for (const [name, baseEnum] of Object.entries(baseline.enums)) {\n totalBaseline++;\n const candEnum = candidate.enums[name];\n if (!candEnum) {\n violations.push({\n category: 'public-api',\n severity: 'breaking',\n symbolPath: name,\n baseline: name,\n candidate: '(missing)',\n message: `Enum \"${name}\" exists in baseline but not in generated output`,\n });\n continue;\n }\n\n // Build a reverse lookup: wire value → candidate member name(s).\n // This enables matching by wire value when member names differ due to\n // naming conventions (e.g., baseline \"Active\"=\"linked\" vs candidate \"Linked\"=\"linked\").\n const candValueToMembers = new Map<string | number, string[]>();\n for (const [candMember, candValue] of Object.entries(candEnum.members)) {\n const existing = candValueToMembers.get(candValue);\n if (existing) {\n existing.push(candMember);\n } else {\n candValueToMembers.set(candValue, [candMember]);\n }\n }\n\n let enumMatch = true;\n for (const [member, value] of Object.entries(baseEnum.members)) {\n if (candEnum.members[member] === value) {\n // Exact match by member name and value — no issue\n continue;\n }\n\n // Member name doesn't match. Check if the wire value exists under a\n // different member name in the candidate — this is a naming convention\n // difference, not a functional difference. Downgrade to warning.\n const valueMatches = candValueToMembers.get(value);\n if (valueMatches && valueMatches.length > 0) {\n // Wire value is preserved — the member is just named differently.\n // This is a cosmetic naming difference, not a breaking change.\n violations.push({\n category: 'signature',\n severity: 'warning',\n symbolPath: `${name}.${member}`,\n baseline: `${member}=${String(value)}`,\n candidate: `${valueMatches[0]}=${String(value)}`,\n message: `Enum member name differs for \"${name}.${member}\" (value \"${value}\" preserved as \"${valueMatches[0]}\")`,\n });\n // Count as preserved since the wire value is correct\n continue;\n }\n\n // Case-insensitive value match: some extractors produce PascalCase values\n // (e.g., \"Pending\", \"Verified\") while the spec uses lowercase (\"pending\", \"verified\").\n const lowerValue = String(value).toLowerCase();\n const caseInsensitiveMatch = [...candValueToMembers.entries()].find(\n ([candVal]) => String(candVal).toLowerCase() === lowerValue,\n );\n if (caseInsensitiveMatch) {\n violations.push({\n category: 'signature',\n severity: 'warning',\n symbolPath: `${name}.${member}`,\n baseline: `${member}=${String(value)}`,\n candidate: `${caseInsensitiveMatch[1][0]}=${String(caseInsensitiveMatch[0])}`,\n message: `Enum member value case differs for \"${name}.${member}\" (baseline \"${value}\" vs candidate \"${caseInsensitiveMatch[0]}\")`,\n });\n continue;\n }\n\n // Check if this member is an extraction artifact (e.g., \"JsonEnumDefaultValue\",\n // \"Unknown\" fallbacks, or values that match their member names exactly which\n // suggests the extractor read the annotation name rather than the wire value).\n const isExtractionArtifact =\n String(value) === member || // Value equals member name → annotation artifact\n member === 'JsonEnumDefaultValue' ||\n member === 'JsonProperty';\n if (isExtractionArtifact) {\n violations.push({\n category: 'signature',\n severity: 'warning',\n symbolPath: `${name}.${member}`,\n baseline: String(value),\n candidate: '(extraction artifact)',\n message: `Enum member \"${name}.${member}\" appears to be an extraction artifact`,\n });\n continue;\n }\n\n violations.push({\n category: 'signature',\n severity: 'breaking',\n symbolPath: `${name}.${member}`,\n baseline: String(value),\n candidate: member in candEnum.members ? String(candEnum.members[member]) : '(missing)',\n message: `Enum member mismatch for \"${name}.${member}\"`,\n });\n enumMatch = false;\n }\n if (enumMatch) {\n preserved++;\n }\n }\n\n // Check for new enums (additions)\n for (const name of Object.keys(candidate.enums)) {\n if (!baseline.enums[name]) {\n additions.push({ symbolPath: name, symbolType: 'enum' });\n }\n }\n\n // Diff barrel exports\n for (const [path, baseExports] of Object.entries(baseline.exports)) {\n const candExports = candidate.exports[path];\n if (!candExports) {\n for (const exp of baseExports) {\n violations.push({\n category: 'export-structure',\n severity: 'warning',\n symbolPath: `exports[${path}].${exp}`,\n baseline: exp,\n candidate: '(missing)',\n message: `Export \"${exp}\" from \"${path}\" not found in generated output`,\n });\n }\n continue;\n }\n const candSet = new Set(candExports);\n for (const exp of baseExports) {\n if (!candSet.has(exp)) {\n violations.push({\n category: 'export-structure',\n severity: 'warning',\n symbolPath: `exports[${path}].${exp}`,\n baseline: exp,\n candidate: '(missing)',\n message: `Export \"${exp}\" from \"${path}\" not found in generated output`,\n });\n }\n }\n }\n\n return {\n preservationScore: totalBaseline > 0 ? Math.round((preserved / totalBaseline) * 100) : 100,\n totalBaselineSymbols: totalBaseline,\n preservedSymbols: preserved,\n violations,\n additions,\n };\n}\n\n/**\n * Compare method signatures using raw type strings.\n * NOTE: This only produces meaningful results when both surfaces were extracted\n * by the same extractor for the same language. Cross-language or cross-extractor\n * comparisons will always fail because type representations differ.\n */\nfunction signaturesMatch(baseline: ApiMethod, candidate: ApiMethod): boolean {\n // Return type must match\n if (baseline.returnType !== candidate.returnType) return false;\n\n // All baseline params must exist with matching types and names\n for (let i = 0; i < baseline.params.length; i++) {\n const baseParam = baseline.params[i];\n const candParam = candidate.params[i];\n if (!candParam) return false;\n if (baseParam.type !== candParam.type) return false;\n if (baseParam.name !== candParam.name) return false;\n }\n\n // New params in candidate must be optional\n for (let i = baseline.params.length; i < candidate.params.length; i++) {\n if (!candidate.params[i].optional) return false;\n }\n\n return true;\n}\nfunction formatSignature(method: ApiMethod): string {\n const params = method.params.map((p) => `${p.name}${p.optional ? '?' : ''}: ${p.type}`).join(', ');\n return `(${params}) => ${method.returnType}`;\n}\n"],"mappings":";;AAGA,MAAM,6BAAa,IAAI,KAAwB;AAE/C,SAAgB,kBAAkB,WAA4B;AAC5D,YAAW,IAAI,UAAU,UAAU,UAAU;;AAG/C,SAAgB,aAAa,UAA6B;CACxD,MAAM,YAAY,WAAW,IAAI,SAAS;AAC1C,KAAI,CAAC,UAEH,OAAM,IAAI,cACR,yCAAyC,SAAS,eAFlC,CAAC,GAAG,WAAW,MAAM,CAAC,CAAC,KAAK,KAAK,IAAI,YAGrD,8BAA8B,SAAS,sEACxC;AAEH,QAAO;;;;;ACdT,MAAM,uBAAuB,IAAI,IAAI;CACnC;CACA;CACA;CACA;CACA;CACD,CAAC;AAEF,MAAa,gBAAgB;;AAG7B,SAAgB,oBAAoB,MAAc,SAA8B;AAC9E,QAAO,CAAC,EAAE,QAAQ,WAAW,SAAS,QAAQ,QAAQ,SAAS,QAAQ,MAAM;;;AAI/E,SAAS,iBAAiB,GAAqB;AAC7C,QAAO,WAAW,EAAE,CAAC,QAAQ,MAAM,EAAE,SAAS,EAAE;;;;;;;AAQlD,SAAgB,sBAAsB,GAAW,GAAW,aAAa,GAAY;CACnF,MAAM,UAAU,EAAE,QAAQ,aAAa,GAAG;CAC1C,MAAM,UAAU,EAAE,QAAQ,aAAa,GAAG;CAC1C,MAAM,SAAS,IAAI,IAAI,iBAAiB,QAAQ,CAAC,KAAK,MAAM,EAAE,aAAa,CAAC,CAAC;CAC7E,MAAM,SAAS,IAAI,IAAI,iBAAiB,QAAQ,CAAC,KAAK,MAAM,EAAE,aAAa,CAAC,CAAC;CAC7E,MAAM,UAAU,CAAC,GAAG,OAAO,CAAC,QAAQ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AK,KAAK,CAChF,OAAO,OAAO"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types-C7g5sLuX.d.mts","names":[],"sources":["../src/compat/types.ts","../src/ir/sdk-behavior.ts","../src/ir/types.ts"],"mappings":";UAAiB,UAAA;EACf,QAAA;EACA,aAAA;EACA,WAAA;EACA,OAAA,EAAS,MAAA,SAAe,QAAA;EACxB,UAAA,EAAY,MAAA,SAAe,YAAA;EAC3B,WAAA,EAAa,MAAA,SAAe,YAAA;EAC5B,KAAA,EAAO,MAAA,SAAe,OAAA;EACtB,OAAA,EAAS,MAAA;AAAA;AAAA,UAGM,QAAA;EACf,IAAA;EACA,UAAA;EACA,OAAA,EAAS,MAAA,SAAe,SAAA;EACxB,UAAA,EAAY,MAAA,SAAe,WAAA;EAC3B,iBAAA,EAAmB,QAAA;EAdnB;;;;EAmBA,kBAAA;AAAA;AAAA,UAGe,SAAA;EACf,IAAA;EACA,MAAA,EAAQ,QAAA;EACR,UAAA;EACA,KAAA;AAAA;AAAA,UAGe,QAAA;EACf,IAAA;EACA,IAAA;EACA,QAAA;AAAA;AAAA,UAGe,WAAA;EACf,IAAA;EACA,IAAA;EACA,QAAA;AAAA;AAAA,UAGe,YAAA;EACf,IAAA;EACA,UAAA;EACA,MAAA,EAAQ,MAAA,SAAe,QAAA;EACvB,OAAA;EA/B2B;EAiC3B,oBAAA;AAAA;AAAA,UAGe,QAAA;EACf,IAAA;EACA,IAAA;EACA,QAAA;AAAA;AAAA,UAGe,YAAA;EACf,IAAA;EACA,UAAA;EACA,KAAA;AAAA;AAAA,UAGe,OAAA;EACf,IAAA;EACA,UAAA;EACA,OAAA,EAAS,MAAA;AAAA;AAAA,UAGM,aAAA;EA5Cf;;;;EAiDA,aAAA,CAAc,IAAA;EA/CT;EAkDL,wBAAA,CAAyB,CAAA,UAAW,CAAA;EA/Cb;EAkDvB,cAAA,CAAe,CAAA,UAAW,CAAA;EAlDH;EAqDvB,kBAAA,CAAmB,IAAA;EAnDnB;;EAuD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