@voxgig/sdkgen 4.8.2 → 4.8.3

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 (376) hide show
  1. package/bin/voxgig-sdkgen +1 -1
  2. package/dist/action/doctor.d.ts +1 -0
  3. package/dist/action/doctor.js +50 -2
  4. package/dist/action/doctor.js.map +1 -1
  5. package/dist/helpers/naming.js +4 -2
  6. package/dist/helpers/naming.js.map +1 -1
  7. package/dist/tsconfig.tsbuildinfo +1 -1
  8. package/model/sdkgen.aon +21 -0
  9. package/package.json +1 -1
  10. package/project/.sdk/model/feature/secrets.aon +120 -18
  11. package/project/.sdk/model/target/c.aon +10 -0
  12. package/project/.sdk/model/target/clojure.aon +13 -0
  13. package/project/.sdk/model/target/cpp.aon +10 -0
  14. package/project/.sdk/model/target/csharp.aon +9 -0
  15. package/project/.sdk/model/target/dart.aon +10 -0
  16. package/project/.sdk/model/target/elixir.aon +9 -0
  17. package/project/.sdk/model/target/go.aon +13 -0
  18. package/project/.sdk/model/target/java.aon +9 -0
  19. package/project/.sdk/model/target/js.aon +7 -0
  20. package/project/.sdk/model/target/kotlin.aon +9 -0
  21. package/project/.sdk/model/target/lean.aon +17 -0
  22. package/project/.sdk/model/target/lua.aon +8 -0
  23. package/project/.sdk/model/target/ocaml.aon +9 -0
  24. package/project/.sdk/model/target/perl.aon +8 -0
  25. package/project/.sdk/model/target/php.aon +8 -0
  26. package/project/.sdk/model/target/py.aon +13 -0
  27. package/project/.sdk/model/target/rb.aon +8 -0
  28. package/project/.sdk/model/target/rust.aon +10 -0
  29. package/project/.sdk/model/target/scala.aon +21 -2
  30. package/project/.sdk/model/target/swift.aon +18 -0
  31. package/project/.sdk/model/target/ts.aon +13 -0
  32. package/project/.sdk/src/cmp/clojure/Package_clojure.ts +9 -2
  33. package/project/.sdk/src/cmp/cpp/Gitignore_cpp.ts +3 -0
  34. package/project/.sdk/src/cmp/dart/Test_dart.ts +2 -0
  35. package/project/.sdk/src/cmp/elixir/Package_elixir.ts +4 -1
  36. package/project/.sdk/src/cmp/go/Config_go.ts +59 -2
  37. package/project/.sdk/src/cmp/go/Main_go.ts +8 -2
  38. package/project/.sdk/src/cmp/java/Test_java.ts +6 -5
  39. package/project/.sdk/src/cmp/kotlin/Test_kotlin.ts +6 -5
  40. package/project/.sdk/src/cmp/lean/Package_lean.ts +23 -0
  41. package/project/.sdk/src/cmp/lean/ReadmeInstall_lean.ts +1 -0
  42. package/project/.sdk/src/cmp/lean/ReadmeTopTest_lean.ts +1 -0
  43. package/project/.sdk/src/cmp/ocaml/Gitignore_ocaml.ts +1 -0
  44. package/project/.sdk/src/cmp/ocaml/Main_ocaml.ts +7 -3
  45. package/project/.sdk/src/cmp/py/Config_py.ts +82 -1
  46. package/project/.sdk/src/cmp/py/Main_py.ts +44 -0
  47. package/project/.sdk/src/cmp/py/fragment/Main.fragment.py +2 -0
  48. package/project/.sdk/src/cmp/swift/Main_swift.ts +10 -0
  49. package/project/.sdk/src/cmp/swift/Package_swift.ts +13 -1
  50. package/project/.sdk/src/cmp/ts/Config_ts.ts +42 -17
  51. package/project/.sdk/src/cmp/ts/fragment/Config.data.fragment.ts +13 -1
  52. package/project/.sdk/src/cmp/ts/fragment/Config.fragment.ts +13 -1
  53. package/project/.sdk/tm/c/Makefile +38 -3
  54. package/project/.sdk/tm/c/tests/omni_resolver.h +361 -0
  55. package/project/.sdk/tm/c/tests/omni_smoke_test.c +237 -0
  56. package/project/.sdk/tm/c/tests/primary_corpus_test.c +205 -284
  57. package/project/.sdk/tm/c/tests/struct_corpus_test.c +292 -212
  58. package/project/.sdk/tm/c/tests/vendor/omni/json.c +811 -0
  59. package/project/.sdk/tm/c/tests/vendor/omni/omni.h +240 -0
  60. package/project/.sdk/tm/c/tests/vendor/omni/runner.c +940 -0
  61. package/project/.sdk/tm/c/tests/vendor/omni/util.c +351 -0
  62. package/project/.sdk/tm/c/utility/struct/utility.c +7 -2
  63. package/project/.sdk/tm/clojure/test/sdk/test/omni.clj +401 -0
  64. package/project/.sdk/tm/clojure/test/sdk/test/omni_smoke.clj +81 -0
  65. package/project/.sdk/tm/clojure/test/sdk/test/primary.clj +92 -58
  66. package/project/.sdk/tm/clojure/test/sdk/test/struct_corpus.clj +122 -149
  67. package/project/.sdk/tm/clojure/test/sdk/test_runner.clj +8 -3
  68. package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/json.clj +145 -0
  69. package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/runner.clj +445 -0
  70. package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/util.clj +145 -0
  71. package/project/.sdk/tm/cpp/Makefile +5 -1
  72. package/project/.sdk/tm/cpp/test/omni_resolver.hpp +473 -0
  73. package/project/.sdk/tm/cpp/test/omni_smoke_test.cpp +209 -0
  74. package/project/.sdk/tm/cpp/test/primary_utility_test.cpp +243 -184
  75. package/project/.sdk/tm/cpp/test/runner_support.hpp +68 -181
  76. package/project/.sdk/tm/cpp/test/struct_corpus_test.cpp +183 -56
  77. package/project/.sdk/tm/cpp/test/vendor/omni/json.hpp +406 -0
  78. package/project/.sdk/tm/cpp/test/vendor/omni/omni.hpp +751 -0
  79. package/project/.sdk/tm/cpp/test/vendor/omni/util.hpp +256 -0
  80. package/project/.sdk/tm/cpp/utility/pipeline.hpp +7 -1
  81. package/project/.sdk/tm/csharp/test/OmniResolver.cs +491 -0
  82. package/project/.sdk/tm/csharp/test/OmniSmokeTest.cs +106 -0
  83. package/project/.sdk/tm/csharp/test/PrimaryUtilityTest.cs +299 -316
  84. package/project/.sdk/tm/csharp/test/Runner.cs +104 -269
  85. package/project/.sdk/tm/csharp/test/StructUtilityTest.cs +535 -724
  86. package/project/.sdk/tm/csharp/test/vendor/omni/Runner.cs +864 -0
  87. package/project/.sdk/tm/csharp/test/vendor/omni/Util.cs +347 -0
  88. package/project/.sdk/tm/csharp/utility/MakeSpec.cs +3 -1
  89. package/project/.sdk/tm/csharp/utility/PrepareMethod.cs +6 -1
  90. package/project/.sdk/tm/csharp/utility/struct/Struct.cs +21 -5
  91. package/project/.sdk/tm/dart/test/omni.dart +520 -0
  92. package/project/.sdk/tm/dart/test/omni_smoke_test.dart +143 -0
  93. package/project/.sdk/tm/dart/test/primary_test.dart +86 -28
  94. package/project/.sdk/tm/dart/test/struct_test.dart +438 -11
  95. package/project/.sdk/tm/dart/test/vendor/omni/omni.dart +7 -0
  96. package/project/.sdk/tm/dart/test/vendor/omni/runner.dart +653 -0
  97. package/project/.sdk/tm/dart/test/vendor/omni/util.dart +232 -0
  98. package/project/.sdk/tm/elixir/Makefile +11 -3
  99. package/project/.sdk/tm/elixir/test/omni_smoke_test.exs +117 -0
  100. package/project/.sdk/tm/elixir/test/primary_utility_test.exs +341 -16
  101. package/project/.sdk/tm/elixir/test/struct_corpus_test.exs +554 -9
  102. package/project/.sdk/tm/elixir/test/support/omni.ex +377 -0
  103. package/project/.sdk/tm/elixir/test/vendor/omni/json.ex +122 -0
  104. package/project/.sdk/tm/elixir/test/vendor/omni/runner.ex +623 -0
  105. package/project/.sdk/tm/elixir/test/vendor/omni/util.ex +187 -0
  106. package/project/.sdk/tm/go/core/context.go +32 -16
  107. package/project/.sdk/tm/go/feature/secrets/plugin/capability.go +261 -0
  108. package/project/.sdk/tm/go/feature/secrets/plugin/catalog.go +78 -0
  109. package/project/.sdk/tm/go/feature/secrets/plugin/config.go +652 -0
  110. package/project/.sdk/tm/go/feature/secrets/plugin/depend.go +250 -0
  111. package/project/.sdk/tm/go/feature/secrets/plugin/env.go +194 -0
  112. package/project/.sdk/tm/go/feature/secrets/plugin/export.go +80 -0
  113. package/project/.sdk/tm/go/feature/secrets/plugin/graph.go +238 -0
  114. package/project/.sdk/tm/go/feature/secrets/plugin/host.go +1575 -0
  115. package/project/.sdk/tm/go/feature/secrets/plugin/order.go +248 -0
  116. package/project/.sdk/tm/go/feature/secrets/plugin/point.go +184 -0
  117. package/project/.sdk/tm/go/feature/secrets/plugin/ref.go +123 -0
  118. package/project/.sdk/tm/go/feature/secrets/plugin/resolve.go +79 -0
  119. package/project/.sdk/tm/go/feature/secrets/plugin/types.go +296 -0
  120. package/project/.sdk/tm/go/feature/secrets/plugin/util.go +87 -0
  121. package/project/.sdk/tm/go/feature/secrets/plugin/version.go +161 -0
  122. package/project/.sdk/tm/go/feature/secrets/plugins/aws/aws.go +292 -0
  123. package/project/.sdk/tm/go/feature/secrets/plugins/aws/sigv4.go +201 -0
  124. package/project/.sdk/tm/go/feature/secrets/plugins/azuresecrets/azuresecrets.go +187 -0
  125. package/project/.sdk/tm/go/feature/secrets/plugins/boru/boru.go +184 -0
  126. package/project/.sdk/tm/go/feature/secrets/plugins/doppler/doppler.go +114 -0
  127. package/project/.sdk/tm/go/feature/secrets/plugins/gcpsecrets/gcpsecrets.go +156 -0
  128. package/project/.sdk/tm/go/feature/secrets/plugins/hashicorp/hashicorp.go +209 -0
  129. package/project/.sdk/tm/go/feature/secrets/plugins/httpjson/httpjson.go +241 -0
  130. package/project/.sdk/tm/go/feature/secrets/plugins/infisical/infisical.go +151 -0
  131. package/project/.sdk/tm/go/feature/secrets/plugins/onepassword/onepassword.go +152 -0
  132. package/project/.sdk/tm/go/feature/secrets/plugins/secretspec/secretspec.go +143 -0
  133. package/project/.sdk/tm/go/feature/secrets/sekreto/addr.go +120 -0
  134. package/project/.sdk/tm/go/feature/secrets/sekreto/providers.go +439 -0
  135. package/project/.sdk/tm/go/feature/secrets/sekreto/sekreto.go +685 -0
  136. package/project/.sdk/tm/go/feature/secrets_feature.go +675 -0
  137. package/project/.sdk/tm/go/src/feature/secrets/.gitkeep +0 -0
  138. package/project/.sdk/tm/go/test/feature/secrets/secrets_feature_test.go +799 -0
  139. package/project/.sdk/tm/go/test/omni/omni.go +897 -0
  140. package/project/.sdk/tm/go/test/omni/util.go +360 -0
  141. package/project/.sdk/tm/go/test/omniresolver_test.go +748 -0
  142. package/project/.sdk/tm/go/test/omnismoke_test.go +112 -0
  143. package/project/.sdk/tm/go/test/primary_utility_test.go +123 -191
  144. package/project/.sdk/tm/go/test/struct_utility_test.go +323 -16
  145. package/project/.sdk/tm/go/test/testsupport_test.go +294 -0
  146. package/project/.sdk/tm/go/utility/make_options.go +8 -1
  147. package/project/.sdk/tm/go/utility/prepare_method.go +5 -1
  148. package/project/.sdk/tm/go/utility/struct/voxgigstruct.go +2 -2
  149. package/project/.sdk/tm/java/test/OmniResolver.java +355 -0
  150. package/project/.sdk/tm/java/test/OmniSmokeTest.java +99 -0
  151. package/project/.sdk/tm/java/test/PrimaryUtilityTest.java +254 -280
  152. package/project/.sdk/tm/java/test/RunnerSupport.java +9 -194
  153. package/project/.sdk/tm/java/test/StructCorpusTest.java +119 -42
  154. package/project/.sdk/tm/java/test/vendor/omni/Json.java +287 -0
  155. package/project/.sdk/tm/java/test/vendor/omni/Runner.java +851 -0
  156. package/project/.sdk/tm/java/test/vendor/omni/Util.java +322 -0
  157. package/project/.sdk/tm/java/utility/MakeSpec.java +3 -1
  158. package/project/.sdk/tm/java/utility/PrepareMethod.java +5 -5
  159. package/project/.sdk/tm/java/utility/struct/Struct.java +17 -4
  160. package/project/.sdk/tm/js/src/utility/StructUtility.js +3 -3
  161. package/project/.sdk/tm/js/test/omni.js +251 -0
  162. package/project/.sdk/tm/js/test/omni.test.js +105 -0
  163. package/project/.sdk/tm/js/test/utility/PrimaryUtility.test.js +6 -2
  164. package/project/.sdk/tm/js/test/utility/StructUtility.test.js +27 -2
  165. package/project/.sdk/tm/js/test/vendor/omni/index.js +77 -0
  166. package/project/.sdk/tm/js/test/vendor/omni/runner.js +613 -0
  167. package/project/.sdk/tm/js/test/vendor/omni/util.js +212 -0
  168. package/project/.sdk/tm/kotlin/core/Utility.kt +1 -1
  169. package/project/.sdk/tm/kotlin/test/OmniResolver.kt +343 -0
  170. package/project/.sdk/tm/kotlin/test/OmniSmokeTest.kt +100 -0
  171. package/project/.sdk/tm/kotlin/test/PrimaryUtilityTest.kt +244 -262
  172. package/project/.sdk/tm/kotlin/test/RunnerSupport.kt +9 -178
  173. package/project/.sdk/tm/kotlin/test/StructCorpusTest.kt +121 -32
  174. package/project/.sdk/tm/kotlin/test/vendor/omni/Json.kt +264 -0
  175. package/project/.sdk/tm/kotlin/test/vendor/omni/Runner.kt +615 -0
  176. package/project/.sdk/tm/kotlin/test/vendor/omni/Util.kt +139 -0
  177. package/project/.sdk/tm/kotlin/utility/MakeSpecUrl.kt +6 -3
  178. package/project/.sdk/tm/kotlin/utility/Prepare.kt +6 -6
  179. package/project/.sdk/tm/kotlin/utility/struct/Struct.kt +18 -2
  180. package/project/.sdk/tm/lean/Makefile +12 -5
  181. package/project/.sdk/tm/lean/src/SdkUtility.lean +14 -1
  182. package/project/.sdk/tm/lean/test/OmniResolver.lean +358 -0
  183. package/project/.sdk/tm/lean/test/OmniSmoke.lean +174 -0
  184. package/project/.sdk/tm/lean/test/StructCorpus.lean +245 -574
  185. package/project/.sdk/tm/lean/test/TPrimaryUtility.lean +155 -291
  186. package/project/.sdk/tm/lean/test/vendor/omni/Omni.lean +997 -0
  187. package/project/.sdk/tm/lua/test/omni.lua +456 -0
  188. package/project/.sdk/tm/lua/test/omni_smoke_test.lua +103 -0
  189. package/project/.sdk/tm/lua/test/primary_utility_test.lua +250 -509
  190. package/project/.sdk/tm/lua/test/struct_utility_test.lua +161 -70
  191. package/project/.sdk/tm/lua/test/vendor/omni/json.lua +268 -0
  192. package/project/.sdk/tm/lua/test/vendor/omni/regex.lua +385 -0
  193. package/project/.sdk/tm/lua/test/vendor/omni/runner.lua +641 -0
  194. package/project/.sdk/tm/lua/test/vendor/omni/util.lua +282 -0
  195. package/project/.sdk/tm/lua/utility/prepare_method.lua +5 -1
  196. package/project/.sdk/tm/lua/utility/struct/regex.lua +663 -0
  197. package/project/.sdk/tm/lua/utility/struct/struct.lua +660 -420
  198. package/project/.sdk/tm/ocaml/Makefile +37 -12
  199. package/project/.sdk/tm/ocaml/test/omni_resolver.ml +284 -0
  200. package/project/.sdk/tm/ocaml/test/omni_smoke_test.ml +169 -0
  201. package/project/.sdk/tm/ocaml/test/primary_utility_test.ml +84 -100
  202. package/project/.sdk/tm/ocaml/test/struct_corpus.ml +225 -201
  203. package/project/.sdk/tm/ocaml/test/vendor/omni/omni.ml +1157 -0
  204. package/project/.sdk/tm/perl/lib/Voxgig/Struct.pm +88 -12
  205. package/project/.sdk/tm/perl/t/omni.pm +647 -0
  206. package/project/.sdk/tm/perl/t/omni_smoke.t +87 -0
  207. package/project/.sdk/tm/perl/t/primary_utility.t +189 -487
  208. package/project/.sdk/tm/perl/t/struct_utility.t +455 -389
  209. package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni/Runner.pm +649 -0
  210. package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni/Util.pm +253 -0
  211. package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni.pm +24 -0
  212. package/project/.sdk/tm/perl/utility/prepare_method.pm +7 -2
  213. package/project/.sdk/tm/php/test/Omni.php +691 -0
  214. package/project/.sdk/tm/php/test/OmniSmokeTest.php +93 -0
  215. package/project/.sdk/tm/php/test/PrimaryUtilityTest.php +210 -571
  216. package/project/.sdk/tm/php/test/StructUtilityTest.php +320 -342
  217. package/project/.sdk/tm/php/test/vendor/omni/Runner.php +644 -0
  218. package/project/.sdk/tm/php/test/vendor/omni/Util.php +283 -0
  219. package/project/.sdk/tm/php/utility/MakeSpec.php +10 -3
  220. package/project/.sdk/tm/php/utility/PrepareBody.php +7 -1
  221. package/project/.sdk/tm/php/utility/PrepareMethod.php +6 -2
  222. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/__init__.py +36 -0
  223. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/capability.py +141 -0
  224. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/catalog.py +50 -0
  225. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/config.py +333 -0
  226. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/depend.py +198 -0
  227. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/env.py +147 -0
  228. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/export.py +52 -0
  229. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/graph.py +139 -0
  230. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/host.py +1053 -0
  231. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/order.py +171 -0
  232. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/point.py +95 -0
  233. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/ref.py +116 -0
  234. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/resolve.py +59 -0
  235. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/types.py +87 -0
  236. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/version.py +112 -0
  237. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/__init__.py +74 -0
  238. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/addr.py +116 -0
  239. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/aws.py +192 -0
  240. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/azuresecrets.py +120 -0
  241. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/boru.py +140 -0
  242. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/doppler.py +62 -0
  243. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/gcpsecrets.py +101 -0
  244. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/hashicorp.py +152 -0
  245. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/httpjson.py +115 -0
  246. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/infisical.py +92 -0
  247. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/onepassword.py +101 -0
  248. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/secretspec.py +119 -0
  249. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/sigv4.py +125 -0
  250. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/providers.py +211 -0
  251. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/sekreto.py +455 -0
  252. package/project/.sdk/tm/py/pkg/feature/secrets_feature.py +467 -0
  253. package/project/.sdk/tm/py/pkg/utility/prepare_method.py +5 -1
  254. package/project/.sdk/tm/py/pkg/utility/voxgig_struct/__init__.py +0 -2
  255. package/project/.sdk/tm/py/pkg/utility/voxgig_struct/voxgig_struct.py +780 -529
  256. package/project/.sdk/tm/py/src/feature/secrets/.gitkeep +0 -0
  257. package/project/.sdk/tm/py/test/feature/__init__.py +0 -0
  258. package/project/.sdk/tm/py/test/feature/secrets/__init__.py +0 -0
  259. package/project/.sdk/tm/py/test/feature/secrets/test_secrets.py +337 -0
  260. package/project/.sdk/tm/py/test/omni.py +415 -0
  261. package/project/.sdk/tm/py/test/test_omni_smoke.py +74 -0
  262. package/project/.sdk/tm/py/test/test_primary_utility.py +144 -668
  263. package/project/.sdk/tm/py/test/test_struct_utility.py +74 -27
  264. package/project/.sdk/tm/py/test/voxgig_omni/__init__.py +62 -0
  265. package/project/.sdk/tm/py/test/voxgig_omni/runner.py +566 -0
  266. package/project/.sdk/tm/py/test/voxgig_omni/util.py +237 -0
  267. package/project/.sdk/tm/rb/test/omni.rb +505 -0
  268. package/project/.sdk/tm/rb/test/omni_smoke_test.rb +72 -0
  269. package/project/.sdk/tm/rb/test/primary_utility_test.rb +174 -560
  270. package/project/.sdk/tm/rb/test/struct_utility_test.rb +13 -7
  271. package/project/.sdk/tm/rb/test/vendor/omni/runner.rb +493 -0
  272. package/project/.sdk/tm/rb/test/vendor/omni/util.rb +199 -0
  273. package/project/.sdk/tm/rb/test/vendor/omni/voxgig_omni.rb +15 -0
  274. package/project/.sdk/tm/rb/utility/prepare_method.rb +5 -1
  275. package/project/.sdk/tm/rust/tests/common/mod.rs +19 -242
  276. package/project/.sdk/tm/rust/tests/omni_resolver/mod.rs +888 -0
  277. package/project/.sdk/tm/rust/tests/omni_smoke_test.rs +286 -0
  278. package/project/.sdk/tm/rust/tests/primary_utility_test.rs +318 -312
  279. package/project/.sdk/tm/rust/tests/struct_utility_test.rs +66 -28
  280. package/project/.sdk/tm/rust/tests/vendor/omni/json.rs +412 -0
  281. package/project/.sdk/tm/rust/tests/vendor/omni/mod.rs +38 -0
  282. package/project/.sdk/tm/rust/tests/vendor/omni/regex.rs +392 -0
  283. package/project/.sdk/tm/rust/tests/vendor/omni/runner.rs +1001 -0
  284. package/project/.sdk/tm/rust/tests/vendor/omni/util.rs +161 -0
  285. package/project/.sdk/tm/rust/utility/prepare_method.rs +5 -1
  286. package/project/.sdk/tm/scala/Makefile +16 -6
  287. package/project/.sdk/tm/scala/sdktest/OmniResolver.scala +497 -0
  288. package/project/.sdk/tm/scala/sdktest/OmniSmoke.scala +192 -0
  289. package/project/.sdk/tm/scala/sdktest/PrimaryCorpus.scala +47 -19
  290. package/project/.sdk/tm/scala/sdktest/StructCorpus.scala +0 -0
  291. package/project/.sdk/tm/scala/sdktest/vendor/omni/Json.scala +229 -0
  292. package/project/.sdk/tm/scala/sdktest/vendor/omni/Runner.scala +552 -0
  293. package/project/.sdk/tm/scala/sdktest/vendor/omni/Util.scala +104 -0
  294. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Constants.swift +10 -0
  295. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Inject.swift +28 -5
  296. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Injection.swift +5 -1
  297. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Minor.swift +4 -1
  298. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Validate.swift +15 -5
  299. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Prepare.swift +6 -1
  300. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/OmniResolver.swift +474 -0
  301. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/OmniSmokeTest.swift +107 -0
  302. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/PrimaryUtilityTest.swift +141 -178
  303. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/Runner.swift +17 -113
  304. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/StructUtilityTest.swift +295 -446
  305. package/project/.sdk/tm/swift/Tests/vendor/omni/Json.swift +364 -0
  306. package/project/.sdk/tm/swift/Tests/vendor/omni/Runner.swift +730 -0
  307. package/project/.sdk/tm/swift/Tests/vendor/omni/Util.swift +162 -0
  308. package/project/.sdk/tm/ts/src/feature/secrets/SecretsFeature.ts +7 -0
  309. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Capability.ts +148 -0
  310. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Catalog.ts +55 -0
  311. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Config.ts +344 -0
  312. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Depend.ts +205 -0
  313. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Env.ts +138 -0
  314. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Export.ts +46 -0
  315. package/project/.sdk/tm/ts/src/feature/secrets/plugin/FeatureHost.ts +349 -0
  316. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Graph.ts +181 -0
  317. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Host.ts +1132 -0
  318. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Order.ts +177 -0
  319. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Point.ts +119 -0
  320. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Ref.ts +102 -0
  321. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Resolve.ts +61 -0
  322. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Types.ts +112 -0
  323. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Version.ts +100 -0
  324. package/project/.sdk/tm/ts/src/feature/secrets/plugin/index.ts +37 -0
  325. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/Sekreto.ts +163 -30
  326. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/index.ts +27 -22
  327. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/aws.ts +26 -36
  328. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/azuresecrets.ts +19 -21
  329. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/boru.ts +36 -17
  330. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/doppler.ts +14 -21
  331. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/gcpsecrets.ts +27 -27
  332. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/hashicorp.ts +25 -39
  333. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/httpjson.ts +99 -0
  334. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/infisical.ts +14 -16
  335. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/onepassword.ts +15 -22
  336. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/secretspec.ts +98 -0
  337. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{Sigv4.ts → plugins/sigv4.ts} +7 -6
  338. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/addr.ts +97 -23
  339. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/builtin.ts +37 -0
  340. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/dotenv.ts +4 -17
  341. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/env.ts +4 -16
  342. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/file.ts +11 -25
  343. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/memory.ts +6 -23
  344. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/support.ts +106 -39
  345. package/project/.sdk/tm/ts/src/utility/StructUtility.ts +3 -3
  346. package/project/.sdk/tm/ts/test/omni.ts +104 -32
  347. package/project/.sdk/tm/ts/test/utility/StructUtility.test.ts +27 -0
  348. package/project/.sdk/tm/ts/test/vendor/omni/Runner.ts +32 -5
  349. package/project/.sdk/tm/ts/test/vendor/omni/Util.ts +2 -2
  350. package/project/.sdk/tm/ts/test/vendor/omni/index.ts +2 -2
  351. package/project/.sdk/tm/zig/test/primary_utility_test.zig +1 -1
  352. package/project/.sdk/tm/zig/test/struct_runner.zig +5 -4
  353. package/project/sdkgen-package.json +1 -1
  354. package/src/action/doctor.ts +66 -2
  355. package/src/helpers/naming.ts +4 -2
  356. package/project/.sdk/tm/c/tests/runner.h +0 -274
  357. package/project/.sdk/tm/cpp/test/struct_runner.hpp +0 -314
  358. package/project/.sdk/tm/csharp/test/StructRunner.cs +0 -276
  359. package/project/.sdk/tm/dart/test/runner.dart +0 -406
  360. package/project/.sdk/tm/dart/test/struct_corpus.dart +0 -531
  361. package/project/.sdk/tm/elixir/test/support/struct_corpus.ex +0 -1088
  362. package/project/.sdk/tm/go/test/runner_test.go +0 -629
  363. package/project/.sdk/tm/go/test/struct_runner_test.go +0 -1094
  364. package/project/.sdk/tm/java/test/StructRunner.java +0 -281
  365. package/project/.sdk/tm/js/test/runner.js +0 -387
  366. package/project/.sdk/tm/kotlin/test/StructRunner.kt +0 -177
  367. package/project/.sdk/tm/lua/test/struct_runner.lua +0 -602
  368. package/project/.sdk/tm/ocaml/test/corpus_runner.ml +0 -185
  369. package/project/.sdk/tm/perl/t/struct_runner.pm +0 -275
  370. package/project/.sdk/tm/php/test/StructRunner.php +0 -275
  371. package/project/.sdk/tm/py/test/struct_runner.py +0 -411
  372. package/project/.sdk/tm/rb/test/struct_runner.rb +0 -309
  373. package/project/.sdk/tm/rust/tests/struct_runner/mod.rs +0 -424
  374. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/Registry.ts +0 -90
  375. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/http.ts +0 -66
  376. package/project/.sdk/tm/ts/test/vendor/omni/compat.ts +0 -188
@@ -0,0 +1,401 @@
1
+ ;; ProjectName SDK corpus test runner: the vendored @voxgig/omni engine driven
2
+ ;; through its NATIVE API (`voxgig.omni.runner/make-runner`), presented to the
3
+ ;; corpus suites in the runner shape they already use (`:spec`, `:runset`,
4
+ ;; `:runsetflags`, `:client`). No compatibility shim is vendored: the adapter
5
+ ;; below IS the whole bridge, per language, per the vendor-tag rollout
6
+ ;; (docs/design/vendor-tag-rollout.md, Decision 4). It is the clojure peer of
7
+ ;; tm/lua/test/omni.lua, tm/rb/test/omni.rb and tm/java/test/OmniResolver.java.
8
+ ;;
9
+ ;; Four local decisions, all required:
10
+ ;;
11
+ ;; 1. TWO VALUE MODELS, converted at the subject boundary. omni's clojure port
12
+ ;; speaks IMMUTABLE clojure data - `ismap` is `map?`, `islist` is `vector?`,
13
+ ;; absence is the `::u/absent` keyword. The SDK and the vendored struct
14
+ ;; speak MUTABLE JVM collections (java.util.LinkedHashMap / ArrayList),
15
+ ;; because struct's contract is that a utility MUTATES the node it is
16
+ ;; given. Neither recognises the other, so `wrap-subject` converts every
17
+ ;; argument on the way in (`->struct`) and the result on the way out
18
+ ;; (`->omni`).
19
+ ;;
20
+ ;; 2. NO-VALUE ARITY (the zero-argument correction the dynamic ports carry).
21
+ ;; An entry with no `in` must reach the subject as NO value, not as one
22
+ ;; null: the corpus has both `{in: null, out: <T_null>}` and
23
+ ;; `{out: <T_noval>}`, and a port that collapses them silently passes one
24
+ ;; of the two. omni models the absence as its ABSENT sentinel, and here it
25
+ ;; becomes a genuine ZERO-ARITY call whenever the subject HAS a zero-arity
26
+ ;; arm - `s/typify` is handed to the corpus bare, so `(typify)` answers
27
+ ;; T_noval where `(typify nil)` answers T_null.
28
+ ;;
29
+ ;; A subject with no zero-arity arm gets `nil` instead. That fallback is
30
+ ;; not a convenience: struct's NOARG is TYPIFY's marker, not a general
31
+ ;; no-value, so handing it to a one-arity subject is simply a wrong
32
+ ;; argument - `(isempty NOARG)` answers false where the corpus wants the
33
+ ;; true that `(isempty nil)` gives, and `(clone NOARG)` answers a sentinel
34
+ ;; where it wants null. The corpus caught both. It is also the LIVE path
35
+ ;; for `minor.stringify` and `minor.pathify`: their corpus subjects are
36
+ ;; one-arity wrappers, so they take the nil and make struct's own no-arg
37
+ ;; call themselves.
38
+ ;;
39
+ ;; Which arm a subject has is READ OFF THE FUNCTION (`accepts-no-args?`),
40
+ ;; never discovered by calling it and catching ArityException - see the
41
+ ;; note on that function.
42
+ ;;
43
+ ;; 2a. WHAT RAN IS COUNTED, not what the corpus declared. A section's pass
44
+ ;; count comes from `subject-calls`, incremented inside the subject
45
+ ;; wrapper - the one place only the engine can reach - and `runsetflags`
46
+ ;; returns the delta across the set. A count taken from the section's own
47
+ ;; `set` prints the same number whether the engine ran or was never
48
+ ;; called, which makes it evidence of nothing.
49
+ ;;
50
+ ;; 3. THE CTX CHANNEL (`live-map`). omni snapshots `entry.ctx` BEFORE calling
51
+ ;; the subject, then matches against that snapshot afterwards. In every
52
+ ;; mutable-language port the snapshot and the argument are the same live
53
+ ;; object, so a utility that writes `ctx.spec.headers.authorization` is
54
+ ;; visible to `match: {ctx: ...}` (9 primary entries turn on exactly that).
55
+ ;; Clojure's data is immutable, so the snapshot would freeze the
56
+ ;; pre-call state and every such assertion would read null. `contextify`
57
+ ;; therefore hands omni a LIVE VIEW: a type that satisfies `map?` (so
58
+ ;; `u/ismap`, `u/getpath`, `u/deepequal` and `u/stringify` all accept it)
59
+ ;; but reads through to the mutable map the subject actually mutates. The
60
+ ;; port's own `:runsetflags-args` channel carries the ARGUMENT writeback;
61
+ ;; this carries the ctx one, which `runsetflags-args` cannot reach.
62
+ ;;
63
+ ;; 4. LIVE OBJECTS CROSS BY REFERENCE. A value that belongs to neither model -
64
+ ;; the provider, an SDK client, a Context atom - passes through the
65
+ ;; converters as a leaf, so subjects keep real object identity (and so a
66
+ ;; cyclic SDK object is never walked).
67
+
68
+ (ns sdk.test.omni
69
+ (:require [voxgig.omni.runner :as runner]
70
+ [voxgig.omni.util :as u]
71
+ [voxgig.struct :as vs]
72
+ [sdk.core :as core]
73
+ [sdk.client :as client]
74
+ [clojure.string :as str])
75
+ (:import [java.util LinkedHashMap ArrayList List Map IdentityHashMap]))
76
+
77
+
78
+ ;; omni's sentinels and error predicate, re-exported so the corpus suites and
79
+ ;; the smoke test never reach into the vendored namespaces themselves.
80
+ (def NULLMARK u/NULLMARK)
81
+ (def UNDEFMARK u/UNDEFMARK)
82
+ (def EXISTSMARK u/EXISTSMARK)
83
+ (def ABSENT u/ABSENT)
84
+
85
+ (defn omni-error? [err] (runner/omni-error? err))
86
+ (defn deep-equal? [a b] (u/deepequal a b))
87
+ (defn stringify [val] (u/stringify val))
88
+
89
+
90
+ ;; --------------------------------------------------------------------------
91
+ ;; Decision 4: the live-object marker.
92
+ ;; --------------------------------------------------------------------------
93
+
94
+ (def ^:private LIVEMETA ::live)
95
+
96
+ (defn- mark-live [val] (vary-meta val assoc LIVEMETA true))
97
+
98
+ (defn- live? [val]
99
+ (boolean (and (instance? clojure.lang.IObj val) (get (meta val) LIVEMETA))))
100
+
101
+
102
+ ;; --------------------------------------------------------------------------
103
+ ;; Decision 3: a live-reading omni map over a mutable struct map.
104
+ ;; --------------------------------------------------------------------------
105
+
106
+ (defprotocol ILiveMap
107
+ (live-backing [this] "The mutable struct map this view reads through to."))
108
+
109
+ (declare ->omni ->struct)
110
+
111
+ ;; A `map?` that is not a map: every read re-converts the mutable backing map,
112
+ ;; so omni sees the state as it is AT MATCH TIME rather than at call time.
113
+ ;; `extra` carries keys omni assoc'd on afterwards (it attaches the active
114
+ ;; client under "client"), which must not be written into the SDK's own node.
115
+ (defn- live-map [^Map backing extra]
116
+ (let [snap (fn [] (merge (->omni backing) extra))]
117
+ (reify
118
+ ILiveMap
119
+ (live-backing [_] backing)
120
+
121
+ clojure.lang.ILookup
122
+ (valAt [_ k] (get (snap) k))
123
+ (valAt [_ k nf] (get (snap) k nf))
124
+
125
+ clojure.lang.Associative
126
+ (containsKey [_ k] (contains? (snap) k))
127
+ (entryAt [_ k] (find (snap) k))
128
+ (assoc [_ k v] (live-map backing (assoc extra k v)))
129
+
130
+ clojure.lang.IPersistentMap
131
+ (assocEx [_ k v] (live-map backing (assoc extra k v)))
132
+ (without [_ k] (live-map backing (dissoc extra k)))
133
+
134
+ clojure.lang.IPersistentCollection
135
+ (count [_] (count (snap)))
136
+ (cons [_ o] (conj (snap) o))
137
+ (empty [_] (array-map))
138
+ (equiv [_ o] (= (snap) o))
139
+
140
+ clojure.lang.Seqable
141
+ (seq [_] (seq (snap)))
142
+
143
+ Iterable
144
+ (iterator [_] (.iterator ^Iterable (snap))))))
145
+
146
+ (defn- live-map? [val] (instance? sdk.test.omni.ILiveMap val))
147
+
148
+
149
+ ;; --------------------------------------------------------------------------
150
+ ;; Decision 1: the converters.
151
+ ;; --------------------------------------------------------------------------
152
+
153
+ (defn ->struct
154
+ "omni's immutable model -> the SDK's mutable one.
155
+
156
+ ABSENT becomes struct's own NOARG (decision 2). A live view is unwrapped to
157
+ the very map it reads, so a subject handed a contextified ctx mutates the
158
+ node omni will match against (decision 3). Anything that is neither an omni
159
+ map nor an omni list crosses as a leaf (decision 4)."
160
+ [val]
161
+ (cond
162
+ (u/isabsent val) vs/NOARG
163
+ (nil? val) nil
164
+ (live-map? val) (live-backing val)
165
+ (live? val) val
166
+ (map? val) (let [out (LinkedHashMap.)]
167
+ (doseq [[k v] val] (.put out (str k) (->struct v)))
168
+ out)
169
+ (vector? val) (let [out (ArrayList.)]
170
+ (doseq [v val] (.add out (->struct v)))
171
+ out)
172
+ :else val))
173
+
174
+
175
+ (defn ->omni
176
+ "The SDK's mutable model -> omni's immutable one.
177
+
178
+ Clojure's own maps and vectors are already omni values, but a clojure map
179
+ is ALSO a java.util.Map and a clojure vector a java.util.List, so the
180
+ persistent branches must be tested first. `seen` guards a cyclic mutable
181
+ node: struct's nodes are trees, but an SDK object reachable from one is not
182
+ necessarily, and a converter that hangs is worse than one that truncates."
183
+ ([val] (->omni val (IdentityHashMap.)))
184
+ ([val ^IdentityHashMap seen]
185
+ (cond
186
+ (identical? vs/NOARG val) u/ABSENT
187
+ (nil? val) nil
188
+ (live-map? val) val
189
+ (live? val) val
190
+ (map? val) (reduce (fn [out k] (assoc out (str k) (->omni (get val k) seen)))
191
+ (array-map)
192
+ (keys val))
193
+ (vector? val) (mapv #(->omni % seen) val)
194
+
195
+ (instance? Map val)
196
+ (if (.containsKey seen val)
197
+ (array-map)
198
+ (do (.put seen val true)
199
+ (let [out (reduce (fn [out k] (assoc out (str k) (->omni (.get ^Map val k) seen)))
200
+ (array-map)
201
+ (vec (.keySet ^Map val)))]
202
+ (.remove seen val)
203
+ out)))
204
+
205
+ (instance? List val)
206
+ (if (.containsKey seen val)
207
+ []
208
+ (do (.put seen val true)
209
+ (let [out (mapv #(->omni % seen) (vec val))]
210
+ (.remove seen val)
211
+ out)))
212
+
213
+ :else val)))
214
+
215
+
216
+ ;; --------------------------------------------------------------------------
217
+ ;; Loading the corpus.
218
+ ;; --------------------------------------------------------------------------
219
+
220
+ ;; THE CORPUS IS PARSED BY THE SDK'S OWN JSON READER, not omni's.
221
+ ;;
222
+ ;; omni's readers model every JSON number as a double - the clojure port's
223
+ ;; `json/parse` calls Double/parseDouble unconditionally, and its java peer
224
+ ;; documents `number -> Double`. On most ports that is invisible, because
225
+ ;; their struct has one numeric type. Clojure's does not: `typify` answers
226
+ ;; T_integer for a Long and T_decimal for a Double, and `validate` prints
227
+ ;; "integer" or "decimal" from it. Read through omni's parser, every `1` in
228
+ ;; the corpus arrives as 1.0 and fourteen struct sections fail on the word
229
+ ;; "decimal" - not because the SDK is wrong, but because the spec was
230
+ ;; re-typed on the way in.
231
+ ;;
232
+ ;; omni's own `make-runner` takes an ALREADY-PARSED spec, so the fix needs no
233
+ ;; change to the vendored files (which are read-only anyway): parse with the
234
+ ;; reader the SDK itself uses, then convert into omni's model. Longs survive
235
+ ;; the round trip, and omni compares numbers by value (`==`, and `numstr`
236
+ ;; renders 5.0 as 5), so nothing downstream notices.
237
+ ;;
238
+ ;; The one distinction this cannot restore is an authored `1.0`: JSON does not
239
+ ;; carry it and neither reader can. The corpus has no such literal today.
240
+ ;; Upstream follow-up: omni's clojure json.clj could parse an integral literal
241
+ ;; with no '.'/'e' as a Long, as the SDK's own reader does.
242
+ (defn load-spec [path]
243
+ (when-not (.exists (java.io.File. ^String path))
244
+ (throw (ex-info (str "omni: cannot read spec: " path) {})))
245
+ (->omni (core/json-parse (slurp path))))
246
+
247
+
248
+ ;; --------------------------------------------------------------------------
249
+ ;; The subject boundary.
250
+ ;; --------------------------------------------------------------------------
251
+
252
+ ;; Decision 2a: the execution counter. omni calls the wrapped subject exactly
253
+ ;; once per entry, and nothing else calls it at all, so the delta across a set
254
+ ;; is the number of entries the ENGINE ran. Every corpus count in this port is
255
+ ;; read from here.
256
+ (def ^:private subject-calls (atom 0))
257
+
258
+ (defn subject-call-count
259
+ "Subject invocations since this process started."
260
+ []
261
+ @subject-calls)
262
+
263
+
264
+ ;; Decision 2: does `f` have a genuine zero-argument arm?
265
+ ;;
266
+ ;; Read off the function object, not discovered by calling it. A
267
+ ;; `(catch ArityException ...)` around the zero-arity call cannot tell a
268
+ ;; subject that has NO zero-arity arm from one whose zero-arity arm raised an
269
+ ;; ArityException from its own body - and for the second, catching it retries
270
+ ;; the subject with nil (after any side effect of the first, partial call has
271
+ ;; already landed) and reports the retry as a pass. A real crash becomes a
272
+ ;; green entry.
273
+ ;;
274
+ ;; A fixed arity is a declared `invoke` of no parameters on the function's OWN
275
+ ;; class - declared, never inherited, because `clojure.lang.AFn` declares an
276
+ ;; `invoke()` that exists only to raise ArityException. A variadic `fn` is a
277
+ ;; RestFn: its fixed arms are declared the same way, and its variadic arm
278
+ ;; accepts no arguments exactly when it requires none.
279
+ (defn- accepts-no-args? [f]
280
+ (boolean
281
+ (or (some (fn [^java.lang.reflect.Method m]
282
+ (and (= "invoke" (.getName m))
283
+ (zero? (alength (.getParameterTypes m)))))
284
+ (.getDeclaredMethods ^Class (class f)))
285
+ (and (instance? clojure.lang.RestFn f)
286
+ (zero? (.getRequiredArity ^clojure.lang.RestFn f))))))
287
+
288
+
289
+ ;; omni calls a subject with ONE argument: the resolved argument VECTOR. The
290
+ ;; SDK's subjects are ordinary functions of their arguments, so the vector is
291
+ ;; applied - which is also what keeps arity honest for decision 2.
292
+ ;;
293
+ ;; The return is `[args result]`, omni's `:runsetflags-args` shape: clojure's
294
+ ;; data is immutable, so handing the arguments back is the only way a
295
+ ;; `match: {args: ...}` can see what a subject did with them.
296
+ (defn- wrap-subject [subject]
297
+ (when (ifn? subject)
298
+ (fn [args]
299
+ ;; Counted BEFORE the call, so an entry whose subject throws - which is
300
+ ;; a pass when the entry expects it - still counts as executed.
301
+ (swap! subject-calls inc)
302
+ (let [converted (mapv ->struct args)
303
+ ;; Decision 2: a lone ABSENT is "no argument at all", so the call
304
+ ;; carries no argument. A subject without that arity gets nil.
305
+ noarg? (and (= 1 (count args)) (u/isabsent (first args)))
306
+ result (if noarg?
307
+ (if (accepts-no-args? subject) (subject) (subject nil))
308
+ (apply subject converted))]
309
+ [(mapv ->omni converted) (->omni result)]))))
310
+
311
+
312
+ ;; `makeContext` -> `:make-context`: corpus subject names are camelCase, the
313
+ ;; SDK utility is a kebab-case keyword map.
314
+ (defn- utility-key [name]
315
+ (-> (str name)
316
+ (str/replace #"([a-z0-9])([A-Z])" "$1-$2")
317
+ (str/lower-case)
318
+ (keyword)))
319
+
320
+
321
+ ;; The live SDK as an omni provider. Marked live so the converters never walk
322
+ ;; it: omni attaches it to every contextified ctx under "client".
323
+ (defn- sdk-provider [sdk]
324
+ (let [utility (when sdk (core/get-utility sdk))]
325
+ (mark-live
326
+ {:sdk sdk
327
+ :utility utility
328
+
329
+ ;; The corpus suites hand most subjects in per-set; this is the by-name
330
+ ;; fallback omni uses when they do not.
331
+ :subject (fn [name]
332
+ (when utility
333
+ (wrap-subject (get (deref utility) (utility-key name)))))
334
+
335
+ ;; A DEF.client entry becomes another test SDK, rewrapped the same way.
336
+ :client (fn [options]
337
+ (sdk-provider (client/test-sdk nil (->struct options))))
338
+
339
+ ;; Decision 3: omni keeps this return value as BOTH args[0] and
340
+ ;; entry.ctx, so making it a live view over one mutable map is what
341
+ ;; makes `match: {ctx: ...}` see a utility's writes.
342
+ :contextify (fn [val]
343
+ (if (u/ismap val)
344
+ (live-map (->struct val) (array-map))
345
+ val))
346
+
347
+ ;; Client options may reference the runner store.
348
+ :inject (fn [options store]
349
+ (let [opts (->struct options)]
350
+ (vs/inject opts (->struct store))
351
+ (->omni opts)))})))
352
+
353
+
354
+ ;; --------------------------------------------------------------------------
355
+ ;; The runner.
356
+ ;; --------------------------------------------------------------------------
357
+
358
+ (defn make-runner
359
+ "Vendored omni's `make-runner`, in the shape the corpus suites use.
360
+
361
+ `specref` is a path to the shared corpus, or an already-parsed spec in
362
+ omni's own value model (which keeps the smoke test free of fixture files)."
363
+ ([specref] (make-runner specref nil))
364
+ ([specref sdk]
365
+ (let [provider (if sdk (sdk-provider sdk) (mark-live {}))
366
+ spec (if (string? specref) (load-spec specref) specref)
367
+ omnirunner (runner/make-runner spec provider)]
368
+ (fn make-runpack
369
+ ([name] (make-runpack name nil))
370
+ ([name store]
371
+ (let [runpack (omnirunner name store)
372
+ ;; Always the `-args` entry point: the plain one drops the
373
+ ;; argument writeback, and clojure has no other channel for it.
374
+ ;;
375
+ ;; RETURNS THE NUMBER OF ENTRIES THE ENGINE RAN (decision 2a),
376
+ ;; measured at the subject wrapper. The suites compare it with
377
+ ;; the set they handed in, so an engine that never called the
378
+ ;; subject reports 0 rather than the set's own size.
379
+ runsetflags (fn [testspec flags testsubject]
380
+ (let [before @subject-calls]
381
+ ((:runsetflags-args runpack)
382
+ testspec flags (wrap-subject testsubject))
383
+ (- @subject-calls before)))]
384
+ {:spec (:spec runpack)
385
+ :runset (fn [testspec testsubject] (runsetflags testspec {} testsubject))
386
+ :runsetflags runsetflags
387
+ :subject (:subject runpack)
388
+ :client provider
389
+ :provider provider}))))))
390
+
391
+
392
+ (defn null-modifier
393
+ "Convert NULLMARK sentinels back into real nulls.
394
+
395
+ NOT a delegation to omni's `nullmodifier`, deliberately: omni's RETURNS the
396
+ replacement, while struct's `inject` passes this as its `modify` hook and
397
+ expects it to MUTATE `parent[key]` in place."
398
+ [val key parent & _]
399
+ (cond
400
+ (= NULLMARK val) (vs/setprop parent key nil)
401
+ (string? val) (vs/setprop parent key (str/replace val NULLMARK "null"))))
@@ -0,0 +1,81 @@
1
+ ;; ProjectName SDK omni runner smoke test.
2
+ ;;
3
+ ;; Smoke tests for the VENDORED omni runner itself: a runner that cannot FAIL a
4
+ ;; bad entry would turn every corpus suite vacuously green, so the failure
5
+ ;; paths are pinned here, not just the happy one. (Clojure peer of lua's
6
+ ;; test/omni_smoke_test.lua and ts's test/omni.test.ts.)
7
+ (ns sdk.test.omni-smoke
8
+ (:require [sdk.test.omni :as omni]
9
+ [sdk.testutil :as t]
10
+ [clojure.string :as str]))
11
+
12
+
13
+ ;; A minimal in-memory spec: no fixture file, no OMNI block (lenient v0, like
14
+ ;; the shared corpus). Built in omni's own value model - immutable clojure
15
+ ;; maps and vectors, which is what its walkers recognise.
16
+ (defn- makespec []
17
+ (array-map
18
+ "primary"
19
+ (array-map
20
+ "smoke"
21
+ (array-map
22
+ "basic" (array-map "set" [(array-map "in" 1 "out" 2)
23
+ (array-map "in" 41 "out" 42)])
24
+ "bad" (array-map "set" [(array-map "in" 1 "out" 999)])
25
+ "err" (array-map "set" [(array-map "in" 0 "err" "zero refused")])))))
26
+
27
+
28
+ (defn- inc-subject [n]
29
+ (when (zero? n) (throw (ex-info "smoke: zero refused" {})))
30
+ (inc n))
31
+
32
+
33
+ (defn- pack [] ((omni/make-runner (makespec)) "smoke"))
34
+
35
+
36
+ ;; Run `thunk`, requiring it to raise an omni FAILURE whose message contains
37
+ ;; `want`. A plain exception is not enough: it must be omni's own error type,
38
+ ;; or the suite is catching something the runner never meant as a verdict.
39
+ (defn- must-fail [thunk want]
40
+ (let [outcome (try (thunk) ::no-throw (catch Throwable e e))]
41
+ (when (= ::no-throw outcome)
42
+ (t/fail! (str "expected the runner to FAIL, but it passed: " want)))
43
+ (when-not (omni/omni-error? outcome)
44
+ (t/fail! (str "expected an omni error, got: " (pr-str outcome))))
45
+ (let [msg (str (ex-message outcome))]
46
+ (when-not (str/includes? msg want)
47
+ (t/fail! (str "expected failure containing '" want "', got: " msg))))
48
+ true))
49
+
50
+
51
+ (defn run [rec]
52
+ (t/run-check rec "omni-smoke-passes-a-correct-subject"
53
+ (fn []
54
+ (let [p (pack)]
55
+ ((:runset p) (get (:spec p) "basic") inc-subject))))
56
+
57
+ (t/run-check rec "omni-smoke-fails-a-wrong-result"
58
+ (fn []
59
+ (let [p (pack)]
60
+ (must-fail (fn [] ((:runset p) (get (:spec p) "bad") inc-subject))
61
+ "result mismatch"))))
62
+
63
+ (t/run-check rec "omni-smoke-matches-an-expected-error"
64
+ (fn []
65
+ (let [p (pack)]
66
+ ((:runset p) (get (:spec p) "err") inc-subject))))
67
+
68
+ (t/run-check rec "omni-smoke-fails-a-missing-expected-error"
69
+ (fn []
70
+ (let [p (pack)]
71
+ (must-fail (fn [] ((:runset p) (get (:spec p) "err") identity))
72
+ "expected error did not occur"))))
73
+
74
+ ;; The engine must be reachable through the SAME entry point the corpus
75
+ ;; suites use, over the SAME spec file - a smoke test that only ever sees an
76
+ ;; in-memory spec cannot notice a broken spec path.
77
+ (t/run-check rec "omni-smoke-loads-the-shared-corpus"
78
+ (fn []
79
+ (let [p ((omni/make-runner "../.sdk/test/test.json") "struct")]
80
+ (t/is-true (map? (:spec p)) "the struct corpus section did not load")
81
+ (t/is-true (some? (get (:spec p) "minor")) "the struct corpus has no minor section")))))