@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,46 @@
1
+ // VENDORED: @voxgig/plugin 0.1.6 (typescript/src/Export.ts)
2
+ // Source: https://github.com/voxgig/plugin @ 8d8968afc0a2008fbd795b41ab166307d989f02a [tag: sdk-20260904-1610-0]
3
+ // License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
4
+ /* Exports (§11).
5
+ *
6
+ * An instance publishes values for other plugins and for the
7
+ * application. Read with `host.exports('retry$fast/client')`.
8
+ *
9
+ * THE UNQUALIFIED ALIAS IS THE INTERESTING PART. `retry/client`
10
+ * resolves to the UNTAGGED instance if one exists; if not, and exactly
11
+ * one tagged instance exports that key, it resolves to that one; if two
12
+ * do, it is `plugin_export_ambiguous` — deliberately diverging from
13
+ * seneca's silent last-wins, because with multi-instance as a headline
14
+ * feature an ambiguous alias is a defect waiting for production. */
15
+
16
+ import { fail } from './Types'
17
+ import { parseref, canonref } from './Ref'
18
+
19
+ export type Exported = { ref: string, key: string, value: any }
20
+
21
+ export function resolveexport(spec: string, exported: Exported[]): any {
22
+ const cut = spec.indexOf('/')
23
+ if (-1 === cut) {
24
+ fail('plugin_export_ambiguous', 'export spec needs a key: ' + spec, { spec })
25
+ }
26
+ const head = spec.substring(0, cut)
27
+ const key = spec.substring(cut + 1)
28
+
29
+ // A fully qualified ref: exactly one answer or none.
30
+ const exact = exported.filter((e) => e.ref === canonref(head) && e.key === key)
31
+ if (0 < exact.length) return exact[0].value
32
+
33
+ // An alias: the name, not a ref. Look at every instance of it.
34
+ const byname = exported.filter((e) => parseref(e.ref).name === head && e.key === key)
35
+ if (0 === byname.length) return undefined
36
+
37
+ const untagged = byname.filter((e) => '' === parseref(e.ref).tag)
38
+ if (0 < untagged.length) return untagged[0].value
39
+
40
+ if (1 === byname.length) return byname[0].value
41
+
42
+ const refs = byname.map((e) => e.ref).sort()
43
+ fail('plugin_export_ambiguous',
44
+ 'alias ' + spec + ' matches ' + refs.length + ' instances: ' + refs.join(', '),
45
+ { spec, refs })
46
+ }
@@ -0,0 +1,349 @@
1
+ // VENDORED: @voxgig/plugin 0.1.6 (typescript/src/FeatureHost.ts)
2
+ // Source: https://github.com/voxgig/plugin @ 8d8968afc0a2008fbd795b41ab166307d989f02a [tag: sdk-20260904-1610-0]
3
+ // License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
4
+ /* The sdkgen bridge (§17.2, P3 item 2).
5
+ *
6
+ * THE DELIVERABLE IS A BRIDGE THAT RUNS AN UNMODIFIED SDKGEN FEATURE
7
+ * CLASS AS A PLUGIN, proving the two vocabularies map — and leaving
8
+ * whether sdkgen's generated code adopts the model as a separate,
9
+ * sdkgen-side decision with its own cost across 23 template trees.
10
+ *
11
+ * A generated SDK is not natively a host. Wrapping one in `inst.host()`
12
+ * directly would be a host-shaped object around a non-host, so the
13
+ * INNER HOST IS THE BRIDGE, NOT THE SDK: it declares points for the
14
+ * SDK's hook vocabulary and its `request` chain, and a feature's own
15
+ * method names become its bindings.
16
+ *
17
+ * WHAT THE BRIDGE BUYS, IN ONE SENTENCE: sdkgen can activate a feature
18
+ * and cannot deactivate one, because its transport wrap is an
19
+ * irreversible assignment — `ctx.utility.fetcher = wrapped` — and its
20
+ * hook methods are read off a fixed array. Both become bindings here,
21
+ * and bindings come out.
22
+ *
23
+ *
24
+ * THIS FILE IS OUTSIDE THE PORTABILITY BUDGET, DELIBERATELY, AND IT IS
25
+ * THE ONLY ONE.
26
+ *
27
+ * `typescript/AGENTS.md` forbids dynamic property interception, and the
28
+ * `utility.fetcher` getter/setter below is exactly that. The budget
29
+ * governs the PORTABLE LIBRARY — the thing twenty languages implement
30
+ * from one corpus — and it is not negotiable there.
31
+ *
32
+ * A BRIDGE TO SDKGEN CANNOT BE PORTED AND IS NOT MEANT TO BE. sdkgen
33
+ * generates SDKs in 23 languages, each feature written in that
34
+ * language's idiom; a Go SDK's feature does not assign
35
+ * `ctx.utility.fetcher`, so there is nothing for a Go translation of
36
+ * this file to intercept. Each language that wants the bridge writes
37
+ * its own, against its own generated code, and the thing they share is
38
+ * the plugin model underneath — not this mechanism.
39
+ *
40
+ * Said here because the contradiction is otherwise live and invisible:
41
+ * `Config.ts` cites the same budget as the reason `apply` refills an
42
+ * options map instead of installing a getter. That reasoning is correct
43
+ * and unchanged; this file is a different kind of thing. */
44
+
45
+ import { Definition } from './Catalog'
46
+ import { PointSpec } from './Host'
47
+
48
+ /** sdkgen's declared hook vocabulary (`main.kit.feature.&.hook` in
49
+ * `model/sdkgen.aon`).
50
+ *
51
+ * §17.2 says "13 hook points, named exactly as today". The model
52
+ * declares ELEVEN; the three station's own feature adds — `PrePoint`,
53
+ * `PreDone`, `PreUnexpected` — are declared by that feature rather than
54
+ * by the core, because `hook: &:` admits any name. So the count depends
55
+ * on which features are installed, which is why the bridge takes the
56
+ * extra names rather than this list pretending to be closed.
57
+ * Recorded in doc/plan/handover.md rather than silently resolved. */
58
+ export const SDK_HOOKS = [
59
+ 'PostConstruct',
60
+ 'PostConstructEntity',
61
+ 'SetData',
62
+ 'GetData',
63
+ 'GetMatch',
64
+ 'PreTarget',
65
+ 'PreSpec',
66
+ 'PreRequest',
67
+ 'PreResponse',
68
+ 'PreResult',
69
+ 'PostOperation',
70
+ ]
71
+
72
+ /** The hooks sdkgen-station's feature declares beyond the core set.
73
+ * Named here so the bridge's default vocabulary covers the one feature
74
+ * this repo's first consumer actually ships. */
75
+ export const STATION_HOOKS = ['PrePoint', 'PreDone', 'PreUnexpected']
76
+
77
+ /** The one chain point: the SDK's transport. Its base is
78
+ * `utility.fetcher`, which is exactly what a wrapping feature captures
79
+ * and replaces today. */
80
+ export const REQUEST_POINT = 'request'
81
+
82
+ /** What a particular SDK adds to the default vocabulary.
83
+ *
84
+ * All three fields exist because §17.2's mapping is stated in terms of
85
+ * a specific SDK's declarations, and a bridge that hard-coded them
86
+ * would be right for exactly one SDK. */
87
+ export type BridgeOptions = {
88
+ /** Hook names this SDK's installed features declare beyond the core
89
+ * set. */
90
+ hooks?: string[]
91
+ /** §17.2: "`provider` points for the seams `__replace__` currently
92
+ * serves." A replacement seam is a PROVIDER point and not a chain —
93
+ * at most one implementation wins, the losers are visible, and the
94
+ * host keeps a default — which is precisely what `__replace__` means
95
+ * and what a chain cannot express. */
96
+ replace?: string[]
97
+ /** The SDK's REAL ctx. A feature's `init` may read `ctx.client`,
98
+ * `ctx.utility.log` or anything else the SDK hands it, and a
99
+ * synthetic object with one property would either give it the wrong
100
+ * client or fail on a missing utility. The bridge layers its
101
+ * `fetcher` trap ON TOP of this rather than replacing it. */
102
+ ctx?: any
103
+ }
104
+
105
+ /** Points for a bridge host: every hook name as a `hook` point, each
106
+ * replacement seam as a `provider` point, plus `request` as a `chain`
107
+ * whose base is the SDK's own fetcher. */
108
+ export function featurepoints(
109
+ fetcher: (...args: any[]) => any, options?: BridgeOptions
110
+ ): { [point: string]: PointSpec } {
111
+ const opts = options || {}
112
+ const points: { [point: string]: PointSpec } = {}
113
+
114
+ for (const h of SDK_HOOKS.concat(STATION_HOOKS).concat(opts.hooks || [])) {
115
+ if (undefined === points[h]) { points[h] = { kind: 'hook' } }
116
+ }
117
+ for (const r of opts.replace || []) {
118
+ // A seam declared BOTH ways is a contradiction in the SDK's own
119
+ // declarations, and the provider reading wins loudly rather than
120
+ // the map's iteration order deciding.
121
+ points[r] = { kind: 'provider' }
122
+ }
123
+ points[REQUEST_POINT] = { kind: 'chain', base: fetcher }
124
+ return points
125
+ }
126
+
127
+ /** The ctx an sdkgen feature's `init` expects.
128
+ *
129
+ * `utility.fetcher` is a GETTER/SETTER PAIR rather than a field, and
130
+ * that is the whole trick: a feature that writes
131
+ * `ctx.utility.fetcher = wrapped` is expressing a chain binding, and
132
+ * the bridge records it as one instead of letting it overwrite the
133
+ * slot. Reading it back returns the marker the feature should call,
134
+ * which is `next` — so the feature's own `const inner = utility.fetcher`
135
+ * still gives it something to call through to.
136
+ *
137
+ * This is the single place the irreversible assignment becomes
138
+ * reversible; everything else about the feature is untouched. */
139
+ type Captured = {
140
+ wrap?: (...args: any[]) => any
141
+ inner: any
142
+ }
143
+
144
+ function makectx(base: any, captured: Captured, options: any): any {
145
+ // Layer onto the SDK's REAL utility, so a feature reading anything
146
+ // else off it still finds what the SDK put there.
147
+ const source = (base && base.utility) || {}
148
+ const utility: any = {}
149
+ for (const k of Object.keys(source)) { utility[k] = source[k] }
150
+ Object.defineProperty(utility, 'fetcher', {
151
+ enumerable: true,
152
+ configurable: true,
153
+ get: () => captured.inner,
154
+ set: (fn: any) => { captured.wrap = fn },
155
+ })
156
+ return { ...base, utility, options }
157
+ }
158
+
159
+ export type FeatureClass = {
160
+ new(...args: any[]): any
161
+ }
162
+
163
+ /** Turn an sdkgen `Feature` class into a plugin definition, MECHANICALLY
164
+ * (§17.2):
165
+ *
166
+ * - `name` and `version` come off the instance, as today;
167
+ * - `init(ctx, options)` runs in `define`, where reading options and
168
+ * declaring bindings belong;
169
+ * - a method named after a hook point IS a binding to that point —
170
+ * "a feature's method names are its bindings";
171
+ * - a method named after a replacement seam is a `provider` binding;
172
+ * - an assignment to `ctx.utility.fetcher` becomes a `request` chain
173
+ * binding rather than an irreversible overwrite.
174
+ *
175
+ * The feature class is not modified, subclassed or inspected beyond its
176
+ * own public surface. That is the claim being proved.
177
+ *
178
+ *
179
+ * WHAT "AND DEACTIVATES IT" CLAIMS, EXACTLY.
180
+ *
181
+ * §17.2 says `init` "splits into `define` (read options, declare
182
+ * bindings) and `activate` (capture)". THAT SPLIT IS SDKGEN'S TO MAKE.
183
+ * An unmodified feature has one `init` and no teardown method, so the
184
+ * bridge runs `init` in `define` and there is nothing it could call to
185
+ * undo a side effect `init` performed — a connection opened there stays
186
+ * open, and no amount of bridging changes that.
187
+ *
188
+ * So the claim is precisely: THE FEATURE'S BINDINGS BECOME REVERSIBLE.
189
+ * Its hooks stop firing and its transport wrap leaves the chain, with
190
+ * no cooperation from the feature — which is the thing sdkgen cannot do
191
+ * at all, because it assigns the slot and has nowhere to put the old
192
+ * value back. It is not a claim that arbitrary `init` side effects are
193
+ * undone.
194
+ *
195
+ * A feature that DOES carry `activate` / `deactivate` / `close` methods
196
+ * gets them wired below, which is the same mapping applied to the
197
+ * methods §17.2 expects an adopting sdkgen to add. */
198
+ export function featuredefinition(
199
+ name: string, Feature: FeatureClass, options?: BridgeOptions
200
+ ): Definition {
201
+ const opts = options || {}
202
+ const seams = opts.replace || []
203
+ // DEDUPLICATED. A caller naming a hook the core set already has —
204
+ // easy to do, since `extra` is "what this SDK's features declare" and
205
+ // a feature may well declare a core one — would otherwise bind the
206
+ // same method twice and fire it twice on one `emit`.
207
+ const hooknames: string[] = []
208
+ for (const h of SDK_HOOKS.concat(STATION_HOOKS).concat(opts.hooks || [])) {
209
+ if (-1 === hooknames.indexOf(h) && -1 === seams.indexOf(h)) {
210
+ hooknames.push(h)
211
+ }
212
+ }
213
+
214
+ return {
215
+ name,
216
+
217
+ define: (inst: any) => {
218
+ const feature: any = new (Feature as any)()
219
+
220
+ // THE DEFINITION NAME AND THE FEATURE'S OWN NAME MUST AGREE.
221
+ // §17.2 maps a feature's `name` to the definition's, so a caller
222
+ // passing a different string leaves configuration addressed by
223
+ // the SDK's feature name unable to resolve the definition, while
224
+ // the exported object reports a third identity. Loud, because the
225
+ // failure it prevents is silent.
226
+ if (null != feature.name && feature.name !== name) {
227
+ const err: any = new Error(
228
+ 'plugin/plugin_definition_name: feature name does not match the ' +
229
+ 'definition it was registered as: ' + feature.name + ' vs ' + name)
230
+ err.code = 'plugin_definition_name'
231
+ throw err
232
+ }
233
+
234
+ const captured: Captured = { inner: undefined }
235
+
236
+ // `inner` is what the feature reads back from `utility.fetcher`.
237
+ // In a chain the value to call through to is `next`, which is not
238
+ // known until the binding runs — so the feature is handed a
239
+ // trampoline that forwards to whatever `next` is at call time.
240
+ //
241
+ // ONE SHARED SLOT, AND THE LIMIT IS REAL. An sdkgen feature
242
+ // stashes `inner` once, at init; §6.2 names that exact pattern as
243
+ // "a bug the host cannot prevent" and declines to pretend
244
+ // otherwise. Sequential and nested calls are correct — the
245
+ // binding sets `current` immediately before the wrap runs — but
246
+ // if the wrap awaits and a SECOND request begins before it
247
+ // resumes, both share this slot and the resumed wrap calls
248
+ // through the second request's chain.
249
+ //
250
+ // Restoring the previous value in a `finally` makes it worse, not
251
+ // better: the finally runs when the wrap returns its promise,
252
+ // before the feature ever calls `inner`. Fixing it properly needs
253
+ // either a per-invocation channel the feature would have to be
254
+ // modified to accept — which is the thing this bridge exists to
255
+ // avoid — or async-context storage, which the portability budget
256
+ // forbids and which does not exist in most of the 23 languages.
257
+ // Stated rather than papered over.
258
+ let current: any = null
259
+ captured.inner = (...args: any[]) =>
260
+ null == current ? undefined : current(...args)
261
+
262
+ const ctx = makectx(
263
+ { client: inst, ...(opts.ctx || {}), feature }, captured, inst.options)
264
+
265
+ // The SDK calls `init(ctx, options)`; so do we, unchanged.
266
+ if ('function' === typeof feature.init) {
267
+ feature.init(ctx, inst.options)
268
+ }
269
+
270
+ // A method named after a hook point IS a binding to it.
271
+ for (const h of hooknames) {
272
+ if ('function' !== typeof feature[h]) { continue }
273
+ inst.bind(h, (...args: any[]) => feature[h](...args))
274
+ }
275
+
276
+ // ...and a method named after a replacement seam is a PROVIDER
277
+ // binding (§17.2), which is what `__replace__` means: at most one
278
+ // wins, the losers are visible, and the host keeps a default.
279
+ for (const r of seams) {
280
+ if ('function' !== typeof feature[r]) { continue }
281
+ inst.bind(r, (...args: any[]) => feature[r](...args))
282
+ }
283
+
284
+ // ...and the transport wrap, if the feature took one, is a chain
285
+ // binding. THIS IS THE REVERSIBILITY: sdkgen assigns the slot and
286
+ // can never put it back; a binding comes out when the instance
287
+ // deactivates, with no cooperation from the feature.
288
+ if ('function' === typeof captured.wrap) {
289
+ inst.bind(REQUEST_POINT, (next: any, ...args: any[]) => {
290
+ current = next
291
+ return (captured.wrap as any)(...args)
292
+ })
293
+ }
294
+
295
+ inst.export('feature', feature)
296
+ if (null != feature.version) {
297
+ inst.export('version', feature.version)
298
+ }
299
+
300
+ // ...and the instance's OWN state, which is where the three later
301
+ // callbacks read it from. The export is the public handle; it is
302
+ // not a channel back to the definition, because §11 hides the
303
+ // exports of a `failed` instance — and `unload` on a failed
304
+ // instance still runs `close` (§5.2). Reading the feature back
305
+ // through `exports` therefore lost it in exactly the case where a
306
+ // feature holding a connection most needs its `close` to run.
307
+ inst.state.feature = feature
308
+ },
309
+
310
+ // §17.2's `activate` (capture) half, for a feature that has one.
311
+ // Today's sdkgen features do not — which is why the bridge's claim
312
+ // is about bindings and not about side effects — but a feature that
313
+ // grows the methods §17.2 expects gets them called, in the phase
314
+ // the model puts them in.
315
+ activate: (inst: any) => {
316
+ const feature: any = inst && featureof(inst)
317
+ if (feature && 'function' === typeof feature.activate) {
318
+ feature.activate()
319
+ }
320
+ },
321
+
322
+ deactivate: (inst: any) => {
323
+ const feature: any = inst && featureof(inst)
324
+ if (feature && 'function' === typeof feature.deactivate) {
325
+ feature.deactivate()
326
+ }
327
+ },
328
+
329
+ close: (inst: any) => {
330
+ const feature: any = inst && featureof(inst)
331
+ if (feature && 'function' === typeof feature.close) {
332
+ feature.close()
333
+ }
334
+ },
335
+ }
336
+ }
337
+
338
+ /** The feature object `define` built, read back from the instance's own
339
+ * state rather than closed over, so the three later callbacks do not
340
+ * each need their own capture.
341
+ *
342
+ * NOT from `exports`. §11 hides a `failed` instance's exports, and
343
+ * `unload` on a failed instance still runs `close` — so an exports read
344
+ * returned undefined precisely when a feature holding a connection
345
+ * needed its `close` to run. `state` is the instance's own and survives
346
+ * every status. */
347
+ function featureof(inst: any): any {
348
+ return inst.state && inst.state.feature
349
+ }
@@ -0,0 +1,181 @@
1
+ // VENDORED: @voxgig/plugin 0.1.6 (typescript/src/Graph.ts)
2
+ // Source: https://github.com/voxgig/plugin @ 8d8968afc0a2008fbd795b41ab166307d989f02a [tag: sdk-20260904-1610-0]
3
+ // License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
4
+ /* Whole-graph resolution (§11.4) — a phase, not a discovery.
5
+ *
6
+ * "Activate, and wait in `pending` if you must" is correct and, on its
7
+ * own, produces a terrible experience: apply twenty instances against a
8
+ * registry missing one thing and you get NINETEEN pending rows and no
9
+ * statement of what is actually wrong.
10
+ *
11
+ * `resolvegraph` is a PURE FUNCTION of the registry and the intended
12
+ * activation set. No callbacks run, no state changes, nothing is
13
+ * touched. It answers for the whole graph at once which instances can be
14
+ * live, and for each blocked one THE SPECIFIC REQUIREMENT that is
15
+ * unmet, and why.
16
+ *
17
+ * The failure mode being designed against is a famous one: OSGi's
18
+ * resolver is correct and its diagnostics are legendarily unusable. A
19
+ * resolver that says "blocked" without saying WHY has moved the problem
20
+ * rather than solved it, so `why` is part of the contract and the
21
+ * corpus pins its shape. */
22
+
23
+ import {
24
+ Provided, Required, Candidate, resolvecapability, matchvalue,
25
+ } from './Capability'
26
+ import { satisfies } from './Version'
27
+ import { tryref } from './Ref'
28
+
29
+ export type Node = {
30
+ ref: string
31
+ pos: number
32
+ provides?: Provided[]
33
+ requires?: Required[]
34
+ }
35
+
36
+ export type Blocked = {
37
+ ref: string
38
+ /** The capability name that could not be satisfied. */
39
+ unmet: string
40
+ why: Why
41
+ }
42
+
43
+ export type Why =
44
+ | { kind: 'absent' }
45
+ | { kind: 'version', range: string, found: string[] }
46
+ | { kind: 'match', failing: string, want: any, found: any }
47
+ | { kind: 'blocked', chain: string[] }
48
+
49
+ export type Resolution = { resolved: string[], blocked: Blocked[] }
50
+
51
+ export function resolvegraph(nodes: Node[]): Resolution {
52
+ const byref: { [ref: string]: Node } = {}
53
+ for (const n of nodes) byref[n.ref] = n
54
+
55
+ const resolved = new Set<string>()
56
+ const blocked: { [ref: string]: Blocked } = {}
57
+
58
+ // Fixed point: a node resolves when every mandatory requirement is
59
+ // met by an ALREADY-RESOLVED provider. Iterating to a fixed point is
60
+ // what makes a provider that is itself blocked propagate, rather than
61
+ // each node being judged against the raw registry.
62
+ let moved = true
63
+ while (moved) {
64
+ moved = false
65
+ for (const n of nodes) {
66
+ if (resolved.has(n.ref)) continue
67
+ const why = firstunmet(n, byref, resolved)
68
+ if (null == why) { resolved.add(n.ref); moved = true }
69
+ }
70
+ }
71
+
72
+ for (const n of nodes) {
73
+ if (resolved.has(n.ref)) continue
74
+ const why = firstunmet(n, byref, resolved)
75
+ if (null != why) blocked[n.ref] = why
76
+ }
77
+
78
+ return {
79
+ resolved: Array.from(resolved).sort(),
80
+ blocked: Object.keys(blocked).sort().map((r) => blocked[r]),
81
+ }
82
+ }
83
+
84
+ /** The FIRST unmet requirement, with the most specific explanation
85
+ * available. Order matters: "no provider at all" and "a provider at the
86
+ * wrong version" are different problems and a reader must not have to
87
+ * guess which they have. */
88
+ function firstunmet(
89
+ n: Node,
90
+ byref: { [ref: string]: Node },
91
+ resolved: Set<string>
92
+ ): Blocked | null {
93
+ for (const req of n.requires || []) {
94
+ if (req.optional) continue
95
+
96
+ const all = candidates(byref, req.name)
97
+ if (0 === all.length) {
98
+ return { ref: n.ref, unmet: req.name, why: { kind: 'absent' } }
99
+ }
100
+
101
+ const ok = resolvecapability(req, all)
102
+ if (0 < ok.length) {
103
+ // A provider exists and matches — but if none of them is itself
104
+ // resolved, this node is blocked BEHIND it, and the chain is the
105
+ // useful answer rather than "unmet".
106
+ const live = ok.filter((c) => resolved.has(c.ref))
107
+ if (0 < live.length) continue
108
+ return {
109
+ ref: n.ref, unmet: req.name,
110
+ why: { kind: 'blocked', chain: ok.map((c) => c.ref).sort() },
111
+ }
112
+ }
113
+
114
+ // Providers exist and none matched. Say which test failed.
115
+ if (undefined !== req.range) {
116
+ const versions = all
117
+ .filter((c) => undefined === c.provides.version || !satisfies(c.provides.version, req.range as string))
118
+ .map((c) => c.provides.version || '(none)')
119
+ if (0 < versions.length) {
120
+ return {
121
+ ref: n.ref, unmet: req.name,
122
+ why: { kind: 'version', range: req.range, found: versions.sort() },
123
+ }
124
+ }
125
+ }
126
+
127
+ if (undefined !== req.match) {
128
+ for (const c of all) {
129
+ const attrs = c.provides.attrs || {}
130
+ for (const k of Object.keys(req.match).sort()) {
131
+ // The same recursive partial match `matches` applies, so a
132
+ // nested requirement that FAILED the selection is also the
133
+ // one the diagnosis names (§11.4).
134
+ if (!(k in attrs) || !matchvalue(req.match[k], attrs[k])) {
135
+ return {
136
+ ref: n.ref, unmet: req.name,
137
+ why: {
138
+ kind: 'match', failing: k,
139
+ want: req.match[k],
140
+ found: undefined === attrs[k] ? null : attrs[k],
141
+ },
142
+ }
143
+ }
144
+ }
145
+ }
146
+ }
147
+
148
+ return { ref: n.ref, unmet: req.name, why: { kind: 'absent' } }
149
+ }
150
+ return null
151
+ }
152
+
153
+ function candidates(byref: { [ref: string]: Node }, name: string): Candidate[] {
154
+ const out: Candidate[] = []
155
+ // A NODE SATISFIES ITS OWN REF (§11.1), and this is where the graph
156
+ // learned it. Considering only declared capabilities made `resolve()`
157
+ // answer `absent` about a provider sitting right there and live —
158
+ // §11.4's whole job is explaining the graph the runtime reconciles,
159
+ // and it was explaining a different one. Canonical (§4 rule 5), and
160
+ // tolerant, because a capability name need not be a well-formed ref.
161
+ const asref = tryref(name)
162
+ for (const ref of Object.keys(byref).sort()) {
163
+ const n = byref[ref]
164
+ // Synthesized exactly as `providersof` synthesizes it, so the two
165
+ // answer the same question the same way — including that a bare ref
166
+ // carries no version, and so cannot satisfy a `range`.
167
+ // AND THE REF MATCH WINS OUTRIGHT for that node, as it does at
168
+ // runtime: `providersof` pushes the synthesized candidate and moves
169
+ // to the next instance. A node both named `b` and providing a
170
+ // capability `b` is ONE candidate, not two — without the skip the
171
+ // blocked-chain explanation named it twice.
172
+ if (ref === asref) {
173
+ out.push({ ref: n.ref, pos: n.pos, provides: { name } })
174
+ continue
175
+ }
176
+ for (const p of n.provides || []) {
177
+ if (p.name === name) out.push({ ref: n.ref, pos: n.pos, provides: p })
178
+ }
179
+ }
180
+ return out
181
+ }