@workos/oagen 0.3.0 → 0.5.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 (42) hide show
  1. package/README.md +72 -1
  2. package/dist/cli/index.mjs +955 -90
  3. package/dist/cli/index.mjs.map +1 -1
  4. package/dist/compat/index.d.mts +1 -1
  5. package/dist/compat/index.mjs +9 -4
  6. package/dist/compat/index.mjs.map +1 -1
  7. package/dist/{diff-Cn6S74vV.mjs → diff-CSy3g-Bq.mjs} +541 -43
  8. package/dist/diff-CSy3g-Bq.mjs.map +1 -0
  9. package/dist/{differ-B6472Yef.mjs → differ-CG5ZErKl.mjs} +2 -2
  10. package/dist/{differ-B6472Yef.mjs.map → differ-CG5ZErKl.mjs.map} +1 -1
  11. package/dist/index.d.mts +111 -3
  12. package/dist/index.d.mts.map +1 -1
  13. package/dist/index.mjs +340 -30
  14. package/dist/index.mjs.map +1 -1
  15. package/dist/scripts/smoke/baseline.mjs +317 -33
  16. package/dist/scripts/smoke/baseline.mjs.map +1 -1
  17. package/dist/smoke.d.mts +140 -0
  18. package/dist/smoke.d.mts.map +1 -1
  19. package/dist/smoke.mjs +317 -33
  20. package/dist/smoke.mjs.map +1 -1
  21. package/dist/{tree-sitter-DFRXfWg9.mjs → tree-sitter-C53w_0WE.mjs} +5 -7
  22. package/dist/tree-sitter-C53w_0WE.mjs.map +1 -0
  23. package/dist/{types-O25qZxMl.d.mts → types-D84LjrVG.d.mts} +167 -2
  24. package/dist/types-D84LjrVG.d.mts.map +1 -0
  25. package/dist/verify/index.d.mts +1 -1
  26. package/dist/verify/index.mjs +4 -4
  27. package/dist/verify/index.mjs.map +1 -1
  28. package/docs/agents/architecture.md +1 -1
  29. package/docs/architecture/emitter-contract.md +1 -2
  30. package/docs/architecture/ir-types.md +73 -1
  31. package/docs/architecture/pipeline.md +0 -1
  32. package/docs/cli.md +29 -8
  33. package/docs/core/minimal-emitter.md +0 -4
  34. package/docs/core/quickstart.md +0 -1
  35. package/examples/reference-emitter/README.md +0 -1
  36. package/examples/reference-emitter/src/emitter.ts +0 -5
  37. package/package.json +4 -4
  38. package/skills/review-operations/SKILL.md +83 -0
  39. package/dist/diff-Cn6S74vV.mjs.map +0 -1
  40. package/dist/tree-sitter-DFRXfWg9.mjs.map +0 -1
  41. package/dist/types-O25qZxMl.d.mts.map +0 -1
  42. package/examples/reference-emitter/src/generators/config.ts +0 -19
@@ -1,4 +1,4 @@
1
- import { B as ApiProperty, F as ApiEnum, G as LanguageHints, H as ApiTypeAlias, I as ApiField, J as Violation, K as MethodOverlay, L as ApiInterface, N as Addition, P as ApiClass, R as ApiMethod, U as DiffResult, V as ApiSurface, W as Extractor, X as ViolationSeverity, Y as ViolationCategory, q as OverlayLookup, t as ApiSpec, z as ApiParam } from "../types-O25qZxMl.mjs";
1
+ import { $ as ApiField, Q as ApiEnum, X as Addition, Z as ApiClass, at as ApiTypeAlias, ct as LanguageHints, dt as Violation, et as ApiInterface, ft as ViolationCategory, it as ApiSurface, lt as MethodOverlay, nt as ApiParam, ot as DiffResult, pt as ViolationSeverity, rt as ApiProperty, st as Extractor, t as ApiSpec, tt as ApiMethod, ut as OverlayLookup } from "../types-D84LjrVG.mjs";
2
2
 
3
3
  //#region src/compat/extractor-registry.d.ts
4
4
  declare function registerExtractor(extractor: Extractor): void;
@@ -1,5 +1,5 @@
1
- import { t as safeParse$1, v as ExtractorError } from "../tree-sitter-DFRXfWg9.mjs";
2
- import { _ as registerExtractor, a as specDerivedHttpKeys, c as buildOverlayLookup, d as defaultIsNullableOnlyDifference, f as namedTypeWordsOverlap, g as getExtractor, h as typeExistsInSurface, i as specDerivedFieldPaths, l as patchOverlay, m as resolveHints, n as filterSurface, o as specDerivedMethodPaths, p as nodeHints, r as specDerivedEnumValues, s as specDerivedNames, t as diffSurfaces, u as NAMED_TYPE_RE } from "../differ-B6472Yef.mjs";
1
+ import { t as safeParse$1, v as ExtractorError } from "../tree-sitter-C53w_0WE.mjs";
2
+ import { _ as registerExtractor, a as specDerivedHttpKeys, c as buildOverlayLookup, d as defaultIsNullableOnlyDifference, f as namedTypeWordsOverlap, g as getExtractor, h as typeExistsInSurface, i as specDerivedFieldPaths, l as patchOverlay, m as resolveHints, n as filterSurface, o as specDerivedMethodPaths, p as nodeHints, r as specDerivedEnumValues, s as specDerivedNames, t as diffSurfaces, u as NAMED_TYPE_RE } from "../differ-CG5ZErKl.mjs";
3
3
  import path, { basename, dirname, join, relative, resolve } from "node:path";
4
4
  import Parser from "tree-sitter";
5
5
  import ts from "typescript";
@@ -538,6 +538,7 @@ function parseClassDeclarations(tree, sourceFile, namespace) {
538
538
  const properties = parseProperties$1(bodyNode);
539
539
  const constants = parseConstants(bodyNode);
540
540
  const resourceAttributes = parseResourceAttributes(bodyNode);
541
+ const hasCustomConstructor = methods.some((m) => m.name === "constructFromResponse" && m.isStatic);
541
542
  classes.push({
542
543
  name: nameNode.text,
543
544
  namespace,
@@ -547,6 +548,7 @@ function parseClassDeclarations(tree, sourceFile, namespace) {
547
548
  properties,
548
549
  constants,
549
550
  resourceAttributes,
551
+ hasCustomConstructor,
550
552
  sourceFile
551
553
  });
552
554
  }
@@ -569,6 +571,7 @@ function parseInterfaceDeclarations(tree, sourceFile, namespace) {
569
571
  properties: [],
570
572
  constants: [],
571
573
  resourceAttributes: [],
574
+ hasCustomConstructor: false,
572
575
  sourceFile
573
576
  });
574
577
  }
@@ -607,6 +610,7 @@ function parseEnumDeclarations(tree, sourceFile, namespace) {
607
610
  properties: [],
608
611
  constants,
609
612
  resourceAttributes: [],
613
+ hasCustomConstructor: false,
610
614
  sourceFile
611
615
  });
612
616
  }
@@ -682,8 +686,9 @@ function buildSurface$6(allClasses, hints) {
682
686
  interfaces[cls.name] = {
683
687
  name: cls.name,
684
688
  sourceFile: cls.sourceFile,
685
- fields: sortRecord(fields),
686
- extends: cls.extends ? [cls.extends] : []
689
+ fields,
690
+ extends: cls.extends ? [cls.extends] : [],
691
+ ...cls.hasCustomConstructor ? { hasCustomConstructor: true } : {}
687
692
  };
688
693
  collector.add(cls.sourceFile, cls.name);
689
694
  } else if (isEnumClass(cls)) {