@workos/oagen 0.7.0 → 0.9.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 (52) hide show
  1. package/dist/cli/index.mjs +1190 -512
  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 +362 -41
  6. package/dist/compat/index.mjs.map +1 -1
  7. package/dist/{diff-BYadQQV7.mjs → diff-DZvzV9p3.mjs} +31 -22
  8. package/dist/{diff-BYadQQV7.mjs.map → diff-DZvzV9p3.mjs.map} +1 -1
  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 +13 -4
  12. package/dist/index.d.mts.map +1 -1
  13. package/dist/index.mjs +50 -10
  14. package/dist/index.mjs.map +1 -1
  15. package/dist/{differ-CG5ZErKl.mjs → overlay-Bt6oz0dg.mjs} +1112 -553
  16. package/dist/overlay-Bt6oz0dg.mjs.map +1 -0
  17. package/dist/scripts/smoke/baseline.mjs +49 -9
  18. package/dist/scripts/smoke/baseline.mjs.map +1 -1
  19. package/dist/smoke.d.mts +10 -0
  20. package/dist/smoke.d.mts.map +1 -1
  21. package/dist/smoke.mjs +49 -9
  22. package/dist/smoke.mjs.map +1 -1
  23. package/dist/tree-sitter-C53w_0WE.mjs.map +1 -1
  24. package/dist/{types-DJMbCtIO.d.mts → types-mTtkgy_h.d.mts} +180 -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 +56 -39
  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/differ-CG5ZErKl.mjs.map +0 -1
  52. package/dist/types-DJMbCtIO.d.mts.map +0 -1
@@ -0,0 +1,116 @@
1
+ import { Bt as CompatPolicyHints, Mt as CompatSymbol, _t as ApiSurface, at as CompatProvenance, kt as CompatSnapshot, nt as CompatChangeSeverity, t as ApiSpec, tt as CompatChangeCategory, xt as LanguageHints, yt as DiffResult } from "./types-mTtkgy_h.mjs";
2
+
3
+ //#region src/compat/classify.d.ts
4
+ /** A single classified compatibility change. */
5
+ interface ClassifiedChange {
6
+ /** Specific change category. */
7
+ category: CompatChangeCategory;
8
+ /** Policy-aware severity (may differ from defaultSeverityForCategory). */
9
+ severity: CompatChangeSeverity;
10
+ /** Fully-qualified symbol path. */
11
+ symbol: string;
12
+ /** Deterministic ID for grouping related changes across languages. */
13
+ conceptualChangeId: string;
14
+ /** Where the drift originated. */
15
+ provenance: CompatProvenance;
16
+ /** Description of the old state. */
17
+ old: Record<string, string>;
18
+ /** Description of the new state. */
19
+ new: Record<string, string>;
20
+ /** Human-readable explanation. */
21
+ message: string;
22
+ }
23
+ /** Result of classifying all changes between two snapshots. */
24
+ interface ClassificationResult {
25
+ changes: ClassifiedChange[];
26
+ summary: {
27
+ breaking: number;
28
+ softRisk: number;
29
+ additive: number;
30
+ };
31
+ }
32
+ /**
33
+ * Classify changes between a baseline and candidate symbol.
34
+ * Returns one or more classified changes for the diff.
35
+ */
36
+ declare function classifySymbolChanges(baseline: CompatSymbol, candidate: CompatSymbol | undefined, policy: CompatPolicyHints): ClassifiedChange[];
37
+ /**
38
+ * Classify a new symbol as additive.
39
+ */
40
+ declare function classifyAddedSymbol(symbol: CompatSymbol): ClassifiedChange;
41
+ /** Summarize a list of classified changes by severity. */
42
+ declare function summarizeChanges(changes: ClassifiedChange[]): ClassificationResult['summary'];
43
+ //#endregion
44
+ //#region src/compat/spec-filter.d.ts
45
+ /**
46
+ * Compute the set of symbol names that are derivable from the OpenAPI spec.
47
+ * Only these names should be compared during compat verification — everything
48
+ * else in the baseline is hand-written and out of scope for generation.
49
+ */
50
+ declare function specDerivedNames(spec: ApiSpec, hints: LanguageHints): Set<string>;
51
+ /**
52
+ * Compute a map of enum name → set of wire values that appear in the spec.
53
+ * Used by filterSurface to exclude hand-added enum members that aren't in the spec.
54
+ */
55
+ declare function specDerivedEnumValues(spec: ApiSpec): Map<string, Set<string | number>>;
56
+ /**
57
+ * Compute the set of field paths (e.g., "Organization.name") that are defined
58
+ * in the OpenAPI spec's model schemas. Used by filterSurface to exclude
59
+ * hand-added SDK fields that reference spec-derived types.
60
+ */
61
+ declare function specDerivedFieldPaths(spec: ApiSpec, hints: LanguageHints): Set<string>;
62
+ /**
63
+ * Compute the set of method paths (e.g., "SSO.authorize") that are defined
64
+ * as operations in the OpenAPI spec's services. Used by filterSurface to
65
+ * exclude hand-written SDK methods that don't correspond to spec operations.
66
+ */
67
+ declare function specDerivedMethodPaths(spec: ApiSpec): Set<string>;
68
+ /**
69
+ * Compute the set of HTTP operation keys (e.g., "GET /sso/authorize") that
70
+ * exist in the spec. Used for overlay-based method matching.
71
+ */
72
+ declare function specDerivedHttpKeys(spec: ApiSpec): Set<string>;
73
+ /**
74
+ * Filter an ApiSurface to only include symbols whose names appear in the
75
+ * allowed set. Symbols not in the set are dropped entirely — they won't
76
+ * count toward the total or produce violations.
77
+ *
78
+ * For interfaces: when fieldPaths is provided, only keeps fields that appear
79
+ * in the spec-derived field paths. This prevents false positives from hand-added
80
+ * SDK fields that reference spec-derived types but aren't defined in the spec.
81
+ *
82
+ * For classes: when methodPaths is provided, only keeps methods whose names
83
+ * appear in the spec-derived method paths. This prevents false positives from
84
+ * hand-written SDK methods (e.g., SSO.authorization_url, Webhooks.construct_event)
85
+ * that don't correspond to spec operations. Properties on service classes are
86
+ * also filtered: only UPPER_CASE constants that are spec-derivable are kept.
87
+ */
88
+ declare function filterSurface(surface: ApiSurface, allowedNames: Set<string>, opts?: {
89
+ fieldPaths?: Set<string>;
90
+ methodPaths?: Set<string>;
91
+ enumValues?: Map<string, Set<string | number>>;
92
+ }): ApiSurface;
93
+ //#endregion
94
+ //#region src/compat/differ.d.ts
95
+ /** Result of diffing two compat snapshots. */
96
+ interface CompatDiffResult {
97
+ changes: ClassifiedChange[];
98
+ summary: ClassificationResult['summary'];
99
+ }
100
+ /**
101
+ * Diff two compat snapshots, producing classified changes with
102
+ * policy-aware severity.
103
+ */
104
+ declare function diffSnapshots(baseline: CompatSnapshot, candidate: CompatSnapshot, policy?: CompatPolicyHints): CompatDiffResult;
105
+ /**
106
+ * Compare two ApiSurface objects and return a DiffResult.
107
+ *
108
+ * This preserves the existing diffing behavior used by the overlay retry loop,
109
+ * compat check, and all existing tests. The internal implementation uses the
110
+ * same algorithms as before to maintain full backward compatibility with
111
+ * overlay patching and verification workflows.
112
+ */
113
+ declare function diffSurfaces(baseline: ApiSurface, candidate: ApiSurface, hints: LanguageHints): DiffResult;
114
+ //#endregion
115
+ export { specDerivedEnumValues as a, specDerivedMethodPaths as c, ClassifiedChange as d, classifyAddedSymbol as f, filterSurface as i, specDerivedNames as l, summarizeChanges as m, diffSnapshots as n, specDerivedFieldPaths as o, classifySymbolChanges as p, diffSurfaces as r, specDerivedHttpKeys as s, CompatDiffResult as t, ClassificationResult as u };
116
+ //# sourceMappingURL=differ-CTl98yoS.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"differ-CTl98yoS.d.mts","names":[],"sources":["../src/compat/classify.ts","../src/compat/spec-filter.ts","../src/compat/differ.ts"],"mappings":";;;;UAaiB,gBAAA;EAcJ;EAZX,QAAA,EAAU,oBAAA;EAAV;EAEA,QAAA,EAAU,oBAAA;EAAV;EAEA,MAAA;EAAA;EAEA,kBAAA;EAEA;EAAA,UAAA,EAAY,gBAAA;EAEZ;EAAA,GAAA,EAAK,MAAA;EAEL;EAAA,GAAA,EAAK,MAAA;EAEL;EAAA,OAAA;AAAA;AAIF;AAAA,UAAiB,oBAAA;EACf,OAAA,EAAS,gBAAA;EACT,OAAA;IACE,QAAA;IACA,QAAA;IACA,QAAA;EAAA;AAAA;;;;AAYJ;iBAAgB,qBAAA,CACd,QAAA,EAAU,YAAA,EACV,SAAA,EAAW,YAAA,cACX,MAAA,EAAQ,iBAAA,GACP,gBAAA;;;;iBAuSa,mBAAA,CAAoB,MAAA,EAAQ,YAAA,GAAe,gBAAA;;iBAc3C,gBAAA,CAAiB,OAAA,EAAS,gBAAA,KAAqB,oBAAA;;;;AA9V/D;;;;iBCJgB,gBAAA,CAAiB,IAAA,EAAM,OAAA,EAAS,KAAA,EAAO,aAAA,GAAgB,GAAA;;;;;iBA0CvD,qBAAA,CAAsB,IAAA,EAAM,OAAA,GAAU,GAAA,SAAY,GAAA;;;;;;iBAalD,qBAAA,CAAsB,IAAA,EAAM,OAAA,EAAS,KAAA,EAAO,aAAA,GAAgB,GAAA;;;;;;iBAqB5D,sBAAA,CAAuB,IAAA,EAAM,OAAA,GAAU,GAAA;;;;ADpDvD;iBCkEgB,mBAAA,CAAoB,IAAA,EAAM,OAAA,GAAU,GAAA;;;;;;;;;;;ADjDpD;;;;;iBCqGgB,aAAA,CACd,OAAA,EAAS,UAAA,EACT,YAAA,EAAc,GAAA,UACd,IAAA;EACE,UAAA,GAAa,GAAA;EACb,WAAA,GAAc,GAAA;EACd,UAAA,GAAa,GAAA,SAAY,GAAA;AAAA,IAE1B,UAAA;;;;UChIc,gBAAA;EACf,OAAA,EAAS,gBAAA;EACT,OAAA,EAAS,oBAAA;AAAA;;;;;iBAOK,aAAA,CACd,QAAA,EAAU,cAAA,EACV,SAAA,EAAW,cAAA,EACX,MAAA,GAAS,iBAAA,GACR,gBAAA;;;;;AFXH;;;;iBE4DgB,YAAA,CAAa,QAAA,EAAU,UAAA,EAAY,SAAA,EAAW,UAAA,EAAY,KAAA,EAAO,aAAA,GAAgB,UAAA"}
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as collectEnumRefs, B as IdempotencyPolicy, C as Service, D as UnionType, E as TypeRef, F as walkTypeRef, G as RetryPolicy, H as LoggingPolicy, I as AiAgentEnvVar, J as TimeoutPolicy, K as SdkBehavior, L as BackoffStrategy, M as collectModelRefs, N as collectRequestBodyModels, O as assertNever, P as mapTypeRef, R as DeepPartial, S as ServerEntry, T as TypeParam, U as PaginationPolicy, V as LogEvent, W as RequestGuardPolicy, X as defaultSdkBehavior, Y as UserAgentPolicy, Z as mergeSdkBehavior, _ as Parameter, a as EnumRef, b as PrimitiveType, c as Field, d as MapType, f as Model, ft as OverlayLookup, g as PaginationMeta, h as Operation, i as Enum, j as collectFieldDependencies, k as assignModelsToServices, l as HttpMethod, lt as Extractor, m as NullableType, n as ArrayType, o as EnumValue, ot as ApiSurface, p as ModelRef, q as TelemetryPolicy, r as AuthScheme, s as ErrorResponse, t as ApiSpec, u as LiteralType, v as ParameterGroup, w as SuccessResponse, x as SecurityRequirement, y as ParameterGroupVariant, z as ErrorPolicy } from "./types-DJMbCtIO.mjs";
1
+ import { A as collectEnumRefs, B as IdempotencyPolicy, C as Service, Ct as OverlayLookup, D as UnionType, E as TypeRef, F as walkTypeRef, G as RetryPolicy, H as LoggingPolicy, I as AiAgentEnvVar, J as TimeoutPolicy, K as SdkBehavior, L as BackoffStrategy, M as collectModelRefs, N as collectRequestBodyModels, O as assertNever, P as mapTypeRef, R as DeepPartial, S as ServerEntry, T as TypeParam, U as PaginationPolicy, V as LogEvent, W as RequestGuardPolicy, X as defaultSdkBehavior, Y as UserAgentPolicy, Z as mergeSdkBehavior, _ as Parameter, _t as ApiSurface, a as EnumRef, b as PrimitiveType, bt as Extractor, c as Field, d as MapType, f as Model, g as PaginationMeta, h as Operation, i as Enum, j as collectFieldDependencies, k as assignModelsToServices, l as HttpMethod, m as NullableType, n as ArrayType, o as EnumValue, p as ModelRef, q as TelemetryPolicy, r as AuthScheme, rt as CompatConfig, s as ErrorResponse, t as ApiSpec, u as LiteralType, v as ParameterGroup, w as SuccessResponse, x as SecurityRequirement, y as ParameterGroupVariant, z as ErrorPolicy } from "./types-mTtkgy_h.mjs";
2
2
 
3
3
  //#region src/ir/operation-hints.d.ts
4
4
  /** Per-operation override keyed by "METHOD /path" (e.g. "POST /sso/token"). */
@@ -180,6 +180,12 @@ interface FormatCommand {
180
180
  /** Max files per invocation (to avoid OS arg-length limits). Defaults to 100. */
181
181
  batchSize?: number;
182
182
  }
183
+ /** Maps "METHOD /path" to SDK method info. Values may be arrays for polymorphic operations. */
184
+ type OperationsMapEntry = {
185
+ sdkMethod: string;
186
+ service: string;
187
+ };
188
+ type OperationsMap = Record<string, OperationsMapEntry | OperationsMapEntry[]>;
183
189
  interface Emitter {
184
190
  language: string;
185
191
  generateModels(models: Model[], ctx: EmitterContext): GeneratedFile[];
@@ -189,8 +195,8 @@ interface Emitter {
189
195
  generateErrors(ctx: EmitterContext): GeneratedFile[];
190
196
  generateTypeSignatures?(spec: ApiSpec, ctx: EmitterContext): GeneratedFile[];
191
197
  generateTests(spec: ApiSpec, ctx: EmitterContext): GeneratedFile[];
192
- /** Optional: generate a smoke-manifest.json mapping operationIds to SDK methods */
193
- generateManifest?(spec: ApiSpec, ctx: EmitterContext): GeneratedFile[];
198
+ /** Optional: build operation-to-SDK-method mapping, stored in .oagen-manifest.json */
199
+ buildOperationsMap?(spec: ApiSpec, ctx: EmitterContext): OperationsMap;
194
200
  fileHeader(): string;
195
201
  /**
196
202
  * Optional: return a format command to run on generated files after target
@@ -358,6 +364,7 @@ declare function generateFiles(spec: ApiSpec, emitter: Emitter, options: {
358
364
  files: GeneratedFile[];
359
365
  ctx: EmitterContext;
360
366
  header: string;
367
+ operations?: OperationsMap;
361
368
  };
362
369
  //#endregion
363
370
  //#region src/engine/writer.d.ts
@@ -430,6 +437,8 @@ declare function planOperation(op: Operation): OperationPlan;
430
437
  interface OagenConfig {
431
438
  emitters?: Emitter[];
432
439
  extractors?: Extractor[];
440
+ /** Compatibility verification policy. See docs/core/compatibility-policy.md. */
441
+ compat?: CompatConfig;
433
442
  /** Path to the emitter project (where skills scaffold new emitters, tests, smoke runners). */
434
443
  emitterProject?: string;
435
444
  /** Map from language key to custom smoke runner script path. */
@@ -466,5 +475,5 @@ interface OagenConfig {
466
475
  mountRules?: Record<string, string>;
467
476
  }
468
477
  //#endregion
469
- export { ACRONYM_SET, type AiAgentEnvVar, type ApiSpec, type ArrayType, type AuthScheme, type BackoffStrategy, type Change, CommandError, ConfigError, ConfigLoadError, ConfigVersionMismatchError, type DeepPartial, type DiffReport, type Emitter, type EmitterContext, type Enum, type EnumAdded, type EnumModified, type EnumRef, type EnumRemoved, type EnumValue, type EnumValueChange, type ErrorPolicy, type ErrorResponse, ExtractorError, type Field, type FieldChange, type FormatCommand, type GeneratedFile, type HttpMethod, type IdempotencyPolicy, InternalError, type LiteralType, type LogEvent, type LoggingPolicy, type MapType, type Model, type ModelAdded, type ModelModified, type ModelRef, type ModelRemoved, type NullableType, type OagenConfig, OagenError, type Operation, type OperationAdded, type OperationHint, type OperationModified, type OperationPlan, type OperationRemoved, type PaginationMeta, type PaginationPolicy, type ParamChange, type Parameter, type ParameterGroup, type ParameterGroupVariant, type PrimitiveType, RegistryError, type RequestGuardPolicy, type ResolvedOperation, type ResolvedWrapper, type RetryPolicy, type SdkBehavior, type SecurityRequirement, type ServerEntry, type Service, type ServiceAdded, type ServiceRemoved, SpecParseError, type SplitHint, type SuccessResponse, type TelemetryPolicy, type TimeoutPolicy, type TypeParam, type TypeRef, type UnionType, type UserAgentPolicy, applyFileHeaders, assertNever, assignModelsToServices, buildEmitterContext, cleanSchemaName, collectEnumRefs, collectFieldDependencies, collectModelRefs, collectReferencedNames, collectRequestBodyModels, defaultSdkBehavior, deriveMethodName, diffSpecs, generate, generateAllFiles, generateFiles, getEmitter, integrateGeneratedFiles, mapFilesForTargetIntegration, mapTypeRef, mergeSdkBehavior, parseSpec, planOperation, registerEmitter, resolveOperations, stripBackendPrefixes, toCamelCase, toKebabCase, toPascalCase, toSnakeCase, toUpperSnakeCase, treeShakeFiles, walkTypeRef };
478
+ export { ACRONYM_SET, type AiAgentEnvVar, type ApiSpec, type ArrayType, type AuthScheme, type BackoffStrategy, type Change, CommandError, ConfigError, ConfigLoadError, ConfigVersionMismatchError, type DeepPartial, type DiffReport, type Emitter, type EmitterContext, type Enum, type EnumAdded, type EnumModified, type EnumRef, type EnumRemoved, type EnumValue, type EnumValueChange, type ErrorPolicy, type ErrorResponse, ExtractorError, type Field, type FieldChange, type FormatCommand, type GeneratedFile, type HttpMethod, type IdempotencyPolicy, InternalError, type LiteralType, type LogEvent, type LoggingPolicy, type MapType, type Model, type ModelAdded, type ModelModified, type ModelRef, type ModelRemoved, type NullableType, type OagenConfig, OagenError, type Operation, type OperationAdded, type OperationHint, type OperationModified, type OperationPlan, type OperationRemoved, type OperationsMap, type OperationsMapEntry, type PaginationMeta, type PaginationPolicy, type ParamChange, type Parameter, type ParameterGroup, type ParameterGroupVariant, type PrimitiveType, RegistryError, type RequestGuardPolicy, type ResolvedOperation, type ResolvedWrapper, type RetryPolicy, type SdkBehavior, type SecurityRequirement, type ServerEntry, type Service, type ServiceAdded, type ServiceRemoved, SpecParseError, type SplitHint, type SuccessResponse, type TelemetryPolicy, type TimeoutPolicy, type TypeParam, type TypeRef, type UnionType, type UserAgentPolicy, applyFileHeaders, assertNever, assignModelsToServices, buildEmitterContext, cleanSchemaName, collectEnumRefs, collectFieldDependencies, collectModelRefs, collectReferencedNames, collectRequestBodyModels, defaultSdkBehavior, deriveMethodName, diffSpecs, generate, generateAllFiles, generateFiles, getEmitter, integrateGeneratedFiles, mapFilesForTargetIntegration, mapTypeRef, mergeSdkBehavior, parseSpec, planOperation, registerEmitter, resolveOperations, stripBackendPrefixes, toCamelCase, toKebabCase, toPascalCase, toSnakeCase, toUpperSnakeCase, treeShakeFiles, walkTypeRef };
470
479
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/ir/operation-hints.ts","../src/errors.ts","../src/engine/types.ts","../src/differ/types.ts","../src/parser/parse.ts","../src/engine/orchestrator.ts","../src/engine/generate-files.ts","../src/engine/writer.ts","../src/engine/integrate.ts","../src/engine/registry.ts","../src/differ/diff.ts","../src/utils/naming.ts","../src/engine/operation-plan.ts","../src/cli/config-loader.ts"],"mappings":";;;;UAeiB,aAAA;EAAA;EAEf,IAAA;;EAEA,OAAA;EAFA;EAIA,KAAA,GAAQ,SAAA;EAAR;EAEA,QAAA,GAAW,MAAA;EAAX;EAEA,eAAA;EAAA;;;;AAUF;;EAHE,UAAA;AAAA;AAAA,UAGe,SAAA;EAIf;EAFA,IAAA;EAIW;EAFX,aAAA;EAMA;EAJA,QAAA,GAAW,MAAA;EAUG;EARd,eAAA;EAee;EAbf,aAAA;;;;;;EAMA,cAAA;AAAA;AAAA,UAOe,iBAAA;EAEJ;EAAX,SAAA,EAAW,SAAA;EAEF;EAAT,OAAA,EAAS,OAAA;EAIT;EAFA,UAAA;EAIW;EAFX,OAAA;EAIU;EAFV,QAAA,GAAW,eAAA;EAMX;EAJA,QAAA,EAAU,MAAA;EAIA;EAFV,eAAA;EAK8B;EAH9B,UAAA;AAAA;AAAA,UAGe,eAAA;EAIf;EAFA,IAAA;EAIU;EAFV,aAAA;EAMA;EAJA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,KAAA,EAAO,aAAA;EACP,QAAA;EACA,SAAA;EACA,MAAA;AAAA,IACE,OAAA,CAAQ,eAAA;;;iBCxNI,eAAA,CAAgB,OAAA,EAAS,OAAA;AAAA,iBAIzB,UAAA,CAAW,QAAA,WAAmB,OAAA;;;iBCJ9B,SAAA,CAAU,OAAA,EAAS,OAAA,EAAS,OAAA,EAAS,OAAA,GAAU,UAAA;;;cCuDlD,WAAA,EAAW,GAAA;AAAA,iBAER,YAAA,CAAa,CAAA,UAAW,QAAA,GAAW,GAAA;AAAA,iBAanC,WAAA,CAAY,CAAA,UAAW,QAAA,GAAW,GAAA;AAAA,iBAelC,WAAA,CAAY,CAAA;AAAA,iBAMZ,WAAA,CAAY,CAAA;AAAA,iBAMZ,gBAAA,CAAiB,CAAA;AAAA,iBAiBjB,oBAAA,CAAqB,IAAA;AAAA,iBAqErB,eAAA,CAAgB,IAAA;;;UCzLf,aAAA;EACf,SAAA,EAAW,SAAA;EACX,QAAA;EACA,OAAA;EACA,gBAAA;EACA,mBAAA;EACA,WAAA;EACA,iBAAA;EZWA;;EYRA,sBAAA;EACA,eAAA;EZWA;;;EYPA,eAAA;EACA,cAAA;EACA,OAAA;AAAA;AAAA,iBAGc,aAAA,CAAc,EAAA,EAAI,SAAA,GAAY,aAAA;;;UCf7B,WAAA;EACf,QAAA,GAAW,OAAA;EACX,UAAA,GAAa,SAAA;EbaI;EaXjB,cAAA;EbOA;EaLA,YAAA,GAAe,MAAA;EbOP;;;;;;EaAR,oBAAA,IAAwB,EAAA;EbcT;;;;;;EaPf,mBAAA,IAAuB,IAAA;EbaZ;;EaVX,MAAA;EboBA;;;AAOF;;EarBE,cAAA,GAAiB,MAAA,SAAe,aAAA;EbuBrB;;;;;;EahBX,UAAA,GAAa,MAAA;AAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/ir/operation-hints.ts","../src/errors.ts","../src/engine/types.ts","../src/differ/types.ts","../src/parser/parse.ts","../src/engine/orchestrator.ts","../src/engine/generate-files.ts","../src/engine/writer.ts","../src/engine/integrate.ts","../src/engine/registry.ts","../src/differ/diff.ts","../src/utils/naming.ts","../src/engine/operation-plan.ts","../src/cli/config-loader.ts"],"mappings":";;;;UAeiB,aAAA;EAAA;EAEf,IAAA;;EAEA,OAAA;EAFA;EAIA,KAAA,GAAQ,SAAA;EAAR;EAEA,QAAA,GAAW,MAAA;EAAX;EAEA,eAAA;EAAA;;;;AAUF;;EAHE,UAAA;AAAA;AAAA,UAGe,SAAA;EAIf;EAFA,IAAA;EAIW;EAFX,aAAA;EAMA;EAJA,QAAA,GAAW,MAAA;EAUG;EARd,eAAA;EAee;EAbf,aAAA;;;;;;EAMA,cAAA;AAAA;AAAA,UAOe,iBAAA;EAEJ;EAAX,SAAA,EAAW,SAAA;EAEF;EAAT,OAAA,EAAS,OAAA;EAIT;EAFA,UAAA;EAIW;EAFX,OAAA;EAIU;EAFV,QAAA,GAAW,eAAA;EAMX;EAJA,QAAA,EAAU,MAAA;EAIA;EAFV,eAAA;EAK8B;EAH9B,UAAA;AAAA;AAAA,UAGe,eAAA;EAIf;EAFA,IAAA;EAIU;EAFV,aAAA;EAMA;EAJA,QAAA,EAAU,MAAA;EAQV;EANA,eAAA;EAMiB;EAJjB,aAAA;EAgF8B;EA9E9B,cAAA;EA8E+D;EA5E/D,iBAAA;AAAA;;;;;AA2JF;;;;;;;iBA/EgB,gBAAA,CAAiB,EAAA,EAAI,SAAA,EAAW,QAAA,EAAU,OAAA;;;;;;;;;iBA+E1C,iBAAA,CACd,IAAA,EAAM,OAAA,EACN,KAAA,GAAQ,MAAA,SAAe,aAAA,GACvB,UAAA,GAAa,MAAA,mBACZ,iBAAA;;;;;;AA3OH;;;;cCPa,UAAA,SAAmB,KAAA;EAAA,SACrB,IAAA;cAEG,OAAA,UAAiB,IAAA;AAAA;;cASlB,YAAA,SAAqB,UAAA;EAAA,SACvB,QAAA;cAEG,OAAA,UAAiB,IAAA,UAAc,QAAA;AAAA;;cAQhC,cAAA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AAW,GAAA;AAAA,iBAelC,WAAA,CAAY,CAAA;AAAA,iBAMZ,WAAA,CAAY,CAAA;AAAA,iBAMZ,gBAAA,CAAiB,CAAA;AAAA,iBAiBjB,oBAAA,CAAqB,IAAA;AAAA,iBAqErB,eAAA,CAAgB,IAAA;;;UCzLf,aAAA;EACf,SAAA,EAAW,SAAA;EACX,QAAA;EACA,OAAA;EACA,gBAAA;EACA,mBAAA;EACA,WAAA;EACA,iBAAA;EZWA;;EYRA,sBAAA;EACA,eAAA;EZWA;;;EYPA,eAAA;EACA,cAAA;EACA,OAAA;AAAA;AAAA,iBAGc,aAAA,CAAc,EAAA,EAAI,SAAA,GAAY,aAAA;;;UCd7B,WAAA;EACf,QAAA,GAAW,OAAA;EACX,UAAA,GAAa,SAAA;EbMb;EaJA,MAAA,GAAS,YAAA;EbQT;EaNA,cAAA;EbQA;EaNA,YAAA,GAAe,MAAA;EbQf;;;;AAUF;;EaXE,oBAAA,IAAwB,EAAA;EbiBP;;;;;;EaVjB,mBAAA,IAAuB,IAAA;EboBvB;;EajBA,MAAA;EbwBe;;;;;EalBf,cAAA,GAAiB,MAAA,SAAe,aAAA;Eb8BtB;;;;;;EavBV,UAAA,GAAa,MAAA;AAAA"}
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { A as walkTypeRef, C as assertNever, D as collectModelRefs, E as collectFieldDependencies, O as collectRequestBodyModels, S as SpecParseError, T as collectEnumRefs, _ as ConfigVersionMismatchError, a as singularize, b as OagenError, c as stripListItemMarkers, d as toPascalCase, f as toSnakeCase, g as ConfigLoadError, h as ConfigError, k as mapTypeRef, l as toCamelCase, m as CommandError, n as ACRONYM_SET, p as toUpperSnakeCase, r as cleanSchemaName, s as stripBackendPrefixes, u as toKebabCase, v as ExtractorError, w as assignModelsToServices, x as RegistryError, y as InternalError } from "./tree-sitter-C53w_0WE.mjs";
2
- import { a as integrateGeneratedFiles, c as applyFileHeaders, d as generateAllFiles, f as generateFiles, i as generate, l as buildEmitterContext, m as resolveOperations, n as getEmitter, o as mapFilesForTargetIntegration, p as deriveMethodName, r as registerEmitter, s as treeShakeFiles, t as diffSpecs, u as collectReferencedNames } from "./diff-BYadQQV7.mjs";
2
+ import { c as treeShakeFiles, d as collectReferencedNames, f as generateAllFiles, h as resolveOperations, i as generate, l as applyFileHeaders, m as deriveMethodName, n as getEmitter, o as integrateGeneratedFiles, p as generateFiles, r as registerEmitter, s as mapFilesForTargetIntegration, t as diffSpecs, u as buildEmitterContext } from "./diff-DZvzV9p3.mjs";
3
3
  import { readFile } from "node:fs/promises";
4
4
  import { resolve } from "node:path";
5
5
  import { pathToFileURL } from "node:url";
@@ -575,6 +575,7 @@ function extractModel(name, schema, schemas) {
575
575
  function extractAllOfModel(name, schema, schemas) {
576
576
  const fields = [];
577
577
  const requiredSet = /* @__PURE__ */ new Set();
578
+ let resultDiscriminator;
578
579
  for (const subSchema of schema.allOf ?? []) {
579
580
  let resolved = subSchema;
580
581
  if (subSchema.$ref && schemas) {
@@ -593,14 +594,18 @@ function extractAllOfModel(name, schema, schemas) {
593
594
  }
594
595
  } else if (resolved.oneOf || resolved.anyOf) {
595
596
  const variants = resolved.oneOf ?? resolved.anyOf ?? [];
596
- const emptyRequired = /* @__PURE__ */ new Set();
597
- const seenFieldNames = new Set(fields.map((f) => f.name));
598
- for (const variant of variants) {
599
- if (!variant.properties) continue;
600
- for (const [fieldName, fieldSchema] of Object.entries(variant.properties)) {
601
- if (!fieldSchema || seenFieldNames.has(fieldName)) continue;
602
- seenFieldNames.add(fieldName);
603
- fields.push(buildFieldFromSchema(fieldName, fieldSchema, name, emptyRequired));
597
+ const discriminatorInfo = detectAllOfVariantDiscriminator(variants, name);
598
+ if (discriminatorInfo) resultDiscriminator = discriminatorInfo;
599
+ else {
600
+ const emptyRequired = /* @__PURE__ */ new Set();
601
+ const seenFieldNames = new Set(fields.map((f) => f.name));
602
+ for (const variant of variants) {
603
+ if (!variant.properties) continue;
604
+ for (const [fieldName, fieldSchema] of Object.entries(variant.properties)) {
605
+ if (!fieldSchema || seenFieldNames.has(fieldName)) continue;
606
+ seenFieldNames.add(fieldName);
607
+ fields.push(buildFieldFromSchema(fieldName, fieldSchema, name, emptyRequired));
608
+ }
604
609
  }
605
610
  }
606
611
  } else {
@@ -619,7 +624,42 @@ function extractAllOfModel(name, schema, schemas) {
619
624
  return {
620
625
  name,
621
626
  description: schema.description,
622
- fields
627
+ fields,
628
+ ...resultDiscriminator ? { discriminator: resultDiscriminator } : {}
629
+ };
630
+ }
631
+ /**
632
+ * Detect an implicit discriminator on an allOf+oneOf where every variant is an
633
+ * object that pins the same property to a distinct const value. Unlike
634
+ * detectConstPropertyDiscriminator (which requires $ref or title for variant
635
+ * model names), this version derives model names from the const value itself
636
+ * using deriveDiscriminatedVariantName — matching how extractDiscriminatedAllOfVariantModels
637
+ * names those models.
638
+ *
639
+ * Returns null when no discriminator can be reliably detected.
640
+ */
641
+ function detectAllOfVariantDiscriminator(variants, fallbackName) {
642
+ if (variants.length < 2) return null;
643
+ const candidates = Object.keys(variants[0]?.properties ?? {});
644
+ let candidateProperty = null;
645
+ for (const propName of candidates) if (variants.every((v) => getConstPropertyValue(v, propName) !== null)) {
646
+ candidateProperty = propName;
647
+ break;
648
+ }
649
+ if (!candidateProperty) return null;
650
+ const mapping = {};
651
+ const seenModelNames = /* @__PURE__ */ new Set();
652
+ for (const v of variants) {
653
+ const value = getConstPropertyValue(v, candidateProperty);
654
+ if (value === null) return null;
655
+ const modelName = deriveDiscriminatedVariantName(v, fallbackName);
656
+ if (seenModelNames.has(modelName)) return null;
657
+ seenModelNames.add(modelName);
658
+ mapping[value] = modelName;
659
+ }
660
+ return {
661
+ property: candidateProperty,
662
+ mapping
623
663
  };
624
664
  }
625
665
  function extractDiscriminatedAllOfVariantModels(schema, fallbackName) {