@voxgig/sdkgen 4.10.0 → 4.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (304) hide show
  1. package/bin/voxgig-sdkgen +1 -1
  2. package/package.json +1 -1
  3. package/project/.sdk/model/feature/secrets.aon +330 -0
  4. package/project/.sdk/model/target/c.aon +15 -2
  5. package/project/.sdk/model/target/cpp.aon +18 -0
  6. package/project/.sdk/model/target/lua.aon +17 -0
  7. package/project/.sdk/model/target/ocaml.aon +48 -5
  8. package/project/.sdk/model/target/zig.aon +30 -4
  9. package/project/.sdk/src/cmp/c/Config_c.ts +338 -1
  10. package/project/.sdk/src/cmp/c/Main_c.ts +57 -2
  11. package/project/.sdk/src/cmp/c/Package_c.ts +12 -2
  12. package/project/.sdk/src/cmp/cpp/Config_cpp.ts +324 -2
  13. package/project/.sdk/src/cmp/cpp/Gitignore_cpp.ts +2 -0
  14. package/project/.sdk/src/cmp/cpp/Main_cpp.ts +62 -4
  15. package/project/.sdk/src/cmp/cpp/Package_cpp.ts +10 -0
  16. package/project/.sdk/src/cmp/lua/Config_lua.ts +88 -0
  17. package/project/.sdk/src/cmp/lua/Gitignore_lua.ts +4 -0
  18. package/project/.sdk/src/cmp/lua/Main_lua.ts +93 -3
  19. package/project/.sdk/src/cmp/lua/Package_lua.ts +60 -0
  20. package/project/.sdk/src/cmp/lua/fragment/Main.fragment.lua +10 -0
  21. package/project/.sdk/src/cmp/ocaml/Config_ocaml.ts +183 -5
  22. package/project/.sdk/src/cmp/ocaml/Main_ocaml.ts +160 -3
  23. package/project/.sdk/src/cmp/ocaml/Package_ocaml.ts +25 -1
  24. package/project/.sdk/src/cmp/zig/Config_zig.ts +130 -9
  25. package/project/.sdk/src/cmp/zig/Main_zig.ts +208 -4
  26. package/project/.sdk/{tm/zig/build.zig → src/cmp/zig/fragment/Build.fragment.zig} +7 -0
  27. package/project/.sdk/src/cmp/zig/fragment/Main.fragment.zig +25 -0
  28. package/project/.sdk/{tm/zig/root.zig → src/cmp/zig/fragment/Root.fragment.zig} +9 -0
  29. package/project/.sdk/tm/c/Makefile +58 -9
  30. package/project/.sdk/tm/c/core/sdk.h +10 -0
  31. package/project/.sdk/tm/c/feature/secrets/plugin/capability.c +133 -0
  32. package/project/.sdk/tm/c/feature/secrets/plugin/capability.h +39 -0
  33. package/project/.sdk/tm/c/feature/secrets/plugin/catalog.c +83 -0
  34. package/project/.sdk/tm/c/feature/secrets/plugin/catalog.h +48 -0
  35. package/project/.sdk/tm/c/feature/secrets/plugin/config.c +413 -0
  36. package/project/.sdk/tm/c/feature/secrets/plugin/config.h +24 -0
  37. package/project/.sdk/tm/c/feature/secrets/plugin/depend.c +264 -0
  38. package/project/.sdk/tm/c/feature/secrets/plugin/depend.h +29 -0
  39. package/project/.sdk/tm/c/feature/secrets/plugin/env.c +220 -0
  40. package/project/.sdk/tm/c/feature/secrets/plugin/env.h +19 -0
  41. package/project/.sdk/tm/c/feature/secrets/plugin/export.c +97 -0
  42. package/project/.sdk/tm/c/feature/secrets/plugin/export.h +19 -0
  43. package/project/.sdk/tm/c/feature/secrets/plugin/graph.c +237 -0
  44. package/project/.sdk/tm/c/feature/secrets/plugin/graph.h +17 -0
  45. package/project/.sdk/tm/c/feature/secrets/plugin/host.c +1494 -0
  46. package/project/.sdk/tm/c/feature/secrets/plugin/host.h +135 -0
  47. package/project/.sdk/tm/c/feature/secrets/plugin/order.c +288 -0
  48. package/project/.sdk/tm/c/feature/secrets/plugin/order.h +18 -0
  49. package/project/.sdk/tm/c/feature/secrets/plugin/point.c +141 -0
  50. package/project/.sdk/tm/c/feature/secrets/plugin/point.h +80 -0
  51. package/project/.sdk/tm/c/feature/secrets/plugin/ref.c +170 -0
  52. package/project/.sdk/tm/c/feature/secrets/plugin/ref.h +52 -0
  53. package/project/.sdk/tm/c/feature/secrets/plugin/resolve.c +98 -0
  54. package/project/.sdk/tm/c/feature/secrets/plugin/resolve.h +18 -0
  55. package/project/.sdk/tm/c/feature/secrets/plugin/types.c +150 -0
  56. package/project/.sdk/tm/c/feature/secrets/plugin/types.h +104 -0
  57. package/project/.sdk/tm/c/feature/secrets/plugin/value.c +649 -0
  58. package/project/.sdk/tm/c/feature/secrets/plugin/value.h +135 -0
  59. package/project/.sdk/tm/c/feature/secrets/plugin/version.c +151 -0
  60. package/project/.sdk/tm/c/feature/secrets/plugin/version.h +34 -0
  61. package/project/.sdk/tm/c/feature/secrets/plugins/aws.c +281 -0
  62. package/project/.sdk/tm/c/feature/secrets/plugins/azuresecrets.c +207 -0
  63. package/project/.sdk/tm/c/feature/secrets/plugins/boru.c +164 -0
  64. package/project/.sdk/tm/c/feature/secrets/plugins/clock.c +75 -0
  65. package/project/.sdk/tm/c/feature/secrets/plugins/doppler.c +141 -0
  66. package/project/.sdk/tm/c/feature/secrets/plugins/encode.c +144 -0
  67. package/project/.sdk/tm/c/feature/secrets/plugins/gcpsecrets.c +177 -0
  68. package/project/.sdk/tm/c/feature/secrets/plugins/hashicorp.c +239 -0
  69. package/project/.sdk/tm/c/feature/secrets/plugins/httpjson.c +599 -0
  70. package/project/.sdk/tm/c/feature/secrets/plugins/infisical.c +165 -0
  71. package/project/.sdk/tm/c/feature/secrets/plugins/onepassword.c +194 -0
  72. package/project/.sdk/tm/c/feature/secrets/plugins/proc.c +233 -0
  73. package/project/.sdk/tm/c/feature/secrets/plugins/secretspec.c +125 -0
  74. package/project/.sdk/tm/c/feature/secrets/plugins/sekretoplugins.h +125 -0
  75. package/project/.sdk/tm/c/feature/secrets/plugins/sha256.c +270 -0
  76. package/project/.sdk/tm/c/feature/secrets/plugins/sigv4.c +382 -0
  77. package/project/.sdk/tm/c/feature/secrets/plugins/support.h +153 -0
  78. package/project/.sdk/tm/c/feature/secrets/plugins/tls.c +420 -0
  79. package/project/.sdk/tm/c/feature/secrets/sekreto/internal.h +86 -0
  80. package/project/.sdk/tm/c/feature/secrets/sekreto/json.c +721 -0
  81. package/project/.sdk/tm/c/feature/secrets/sekreto/providers.c +813 -0
  82. package/project/.sdk/tm/c/feature/secrets/sekreto/sekreto.c +944 -0
  83. package/project/.sdk/tm/c/feature/secrets/sekreto/sekreto.h +490 -0
  84. package/project/.sdk/tm/c/feature/secrets/sekreto/util.c +442 -0
  85. package/project/.sdk/tm/c/feature/secrets.c +797 -0
  86. package/project/.sdk/tm/c/feature/secrets.h +46 -0
  87. package/project/.sdk/tm/c/src/feature/secrets/.gitkeep +0 -0
  88. package/project/.sdk/tm/c/tests/feature/secrets/secrets_test.c +802 -0
  89. package/project/.sdk/tm/clojure/feature/secrets/sdk/feature/secrets.clj +38 -11
  90. package/project/.sdk/tm/clojure/test/sdk/test/feature/secrets.clj +40 -6
  91. package/project/.sdk/tm/cpp/Makefile +48 -4
  92. package/project/.sdk/tm/cpp/feature/secrets/plugin/capability.cpp +121 -0
  93. package/project/.sdk/tm/cpp/feature/secrets/plugin/capability.hpp +41 -0
  94. package/project/.sdk/tm/cpp/feature/secrets/plugin/catalog.cpp +60 -0
  95. package/project/.sdk/tm/cpp/feature/secrets/plugin/catalog.hpp +66 -0
  96. package/project/.sdk/tm/cpp/feature/secrets/plugin/config.cpp +376 -0
  97. package/project/.sdk/tm/cpp/feature/secrets/plugin/config.hpp +29 -0
  98. package/project/.sdk/tm/cpp/feature/secrets/plugin/depend.cpp +230 -0
  99. package/project/.sdk/tm/cpp/feature/secrets/plugin/depend.hpp +31 -0
  100. package/project/.sdk/tm/cpp/feature/secrets/plugin/env.cpp +205 -0
  101. package/project/.sdk/tm/cpp/feature/secrets/plugin/env.hpp +25 -0
  102. package/project/.sdk/tm/cpp/feature/secrets/plugin/export.cpp +84 -0
  103. package/project/.sdk/tm/cpp/feature/secrets/plugin/export.hpp +24 -0
  104. package/project/.sdk/tm/cpp/feature/secrets/plugin/graph.cpp +222 -0
  105. package/project/.sdk/tm/cpp/feature/secrets/plugin/graph.hpp +21 -0
  106. package/project/.sdk/tm/cpp/feature/secrets/plugin/host.cpp +1200 -0
  107. package/project/.sdk/tm/cpp/feature/secrets/plugin/host.hpp +250 -0
  108. package/project/.sdk/tm/cpp/feature/secrets/plugin/order.cpp +250 -0
  109. package/project/.sdk/tm/cpp/feature/secrets/plugin/order.hpp +22 -0
  110. package/project/.sdk/tm/cpp/feature/secrets/plugin/point.cpp +110 -0
  111. package/project/.sdk/tm/cpp/feature/secrets/plugin/point.hpp +79 -0
  112. package/project/.sdk/tm/cpp/feature/secrets/plugin/ref.cpp +136 -0
  113. package/project/.sdk/tm/cpp/feature/secrets/plugin/ref.hpp +60 -0
  114. package/project/.sdk/tm/cpp/feature/secrets/plugin/resolve.cpp +82 -0
  115. package/project/.sdk/tm/cpp/feature/secrets/plugin/resolve.hpp +25 -0
  116. package/project/.sdk/tm/cpp/feature/secrets/plugin/types.cpp +90 -0
  117. package/project/.sdk/tm/cpp/feature/secrets/plugin/types.hpp +65 -0
  118. package/project/.sdk/tm/cpp/feature/secrets/plugin/value.cpp +491 -0
  119. package/project/.sdk/tm/cpp/feature/secrets/plugin/value.hpp +120 -0
  120. package/project/.sdk/tm/cpp/feature/secrets/plugin/version.cpp +143 -0
  121. package/project/.sdk/tm/cpp/feature/secrets/plugin/version.hpp +36 -0
  122. package/project/.sdk/tm/cpp/feature/secrets/plugins/Aws.cpp +248 -0
  123. package/project/.sdk/tm/cpp/feature/secrets/plugins/Aws.hpp +30 -0
  124. package/project/.sdk/tm/cpp/feature/secrets/plugins/Azuresecrets.cpp +149 -0
  125. package/project/.sdk/tm/cpp/feature/secrets/plugins/Azuresecrets.hpp +23 -0
  126. package/project/.sdk/tm/cpp/feature/secrets/plugins/Boru.cpp +117 -0
  127. package/project/.sdk/tm/cpp/feature/secrets/plugins/Boru.hpp +27 -0
  128. package/project/.sdk/tm/cpp/feature/secrets/plugins/Crypto.cpp +180 -0
  129. package/project/.sdk/tm/cpp/feature/secrets/plugins/Crypto.hpp +52 -0
  130. package/project/.sdk/tm/cpp/feature/secrets/plugins/Doppler.cpp +87 -0
  131. package/project/.sdk/tm/cpp/feature/secrets/plugins/Doppler.hpp +23 -0
  132. package/project/.sdk/tm/cpp/feature/secrets/plugins/Gcpsecrets.cpp +121 -0
  133. package/project/.sdk/tm/cpp/feature/secrets/plugins/Gcpsecrets.hpp +23 -0
  134. package/project/.sdk/tm/cpp/feature/secrets/plugins/Hashicorp.cpp +153 -0
  135. package/project/.sdk/tm/cpp/feature/secrets/plugins/Hashicorp.hpp +23 -0
  136. package/project/.sdk/tm/cpp/feature/secrets/plugins/Httpjson.cpp +666 -0
  137. package/project/.sdk/tm/cpp/feature/secrets/plugins/Httpjson.hpp +160 -0
  138. package/project/.sdk/tm/cpp/feature/secrets/plugins/Infisical.cpp +123 -0
  139. package/project/.sdk/tm/cpp/feature/secrets/plugins/Infisical.hpp +23 -0
  140. package/project/.sdk/tm/cpp/feature/secrets/plugins/Onepassword.cpp +125 -0
  141. package/project/.sdk/tm/cpp/feature/secrets/plugins/Onepassword.hpp +23 -0
  142. package/project/.sdk/tm/cpp/feature/secrets/plugins/Proc.cpp +223 -0
  143. package/project/.sdk/tm/cpp/feature/secrets/plugins/Proc.hpp +47 -0
  144. package/project/.sdk/tm/cpp/feature/secrets/plugins/Secretspec.cpp +104 -0
  145. package/project/.sdk/tm/cpp/feature/secrets/plugins/Secretspec.hpp +27 -0
  146. package/project/.sdk/tm/cpp/feature/secrets/plugins/Sigv4.cpp +242 -0
  147. package/project/.sdk/tm/cpp/feature/secrets/plugins/Sigv4.hpp +58 -0
  148. package/project/.sdk/tm/cpp/feature/secrets/plugins/Tls.cpp +260 -0
  149. package/project/.sdk/tm/cpp/feature/secrets/plugins/Tls.hpp +47 -0
  150. package/project/.sdk/tm/cpp/feature/secrets/sekreto/Json.cpp +476 -0
  151. package/project/.sdk/tm/cpp/feature/secrets/sekreto/Json.hpp +89 -0
  152. package/project/.sdk/tm/cpp/feature/secrets/sekreto/Provider.cpp +312 -0
  153. package/project/.sdk/tm/cpp/feature/secrets/sekreto/Provider.hpp +263 -0
  154. package/project/.sdk/tm/cpp/feature/secrets/sekreto/Providers.cpp +354 -0
  155. package/project/.sdk/tm/cpp/feature/secrets/sekreto/Providers.hpp +111 -0
  156. package/project/.sdk/tm/cpp/feature/secrets/sekreto/Sekreto.cpp +613 -0
  157. package/project/.sdk/tm/cpp/feature/secrets/sekreto/Sekreto.hpp +227 -0
  158. package/project/.sdk/tm/cpp/feature/secrets.hpp +745 -0
  159. package/project/.sdk/tm/cpp/src/feature/secrets/.gitkeep +0 -0
  160. package/project/.sdk/tm/cpp/test/feature/secrets/secrets_test.cpp +808 -0
  161. package/project/.sdk/tm/csharp/feature/SecretsFeature.cs +34 -8
  162. package/project/.sdk/tm/csharp/test/feature/secrets/SecretsFeatureTest.cs +85 -0
  163. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets.ex +17 -2
  164. package/project/.sdk/tm/elixir/test/feature/secrets/secrets_test.exs +41 -0
  165. package/project/.sdk/tm/go/feature/secrets_feature.go +32 -10
  166. package/project/.sdk/tm/go/test/feature/secrets/secrets_feature_test.go +116 -0
  167. package/project/.sdk/tm/java/feature/SecretsFeature.java +33 -8
  168. package/project/.sdk/tm/java/test/feature/secrets/SecretsFeatureTest.java +64 -0
  169. package/project/.sdk/tm/js/src/feature/secrets/SecretsFeature.js +34 -11
  170. package/project/.sdk/tm/js/test/feature/secrets/Secrets.test.js +73 -0
  171. package/project/.sdk/tm/kotlin/feature/SecretsFeature.kt +32 -7
  172. package/project/.sdk/tm/kotlin/test/feature/secrets/SecretsTest.kt +69 -0
  173. package/project/.sdk/tm/lua/Makefile +15 -4
  174. package/project/.sdk/tm/lua/feature/secrets/native/sekretonet.c +806 -0
  175. package/project/.sdk/tm/lua/feature/secrets/plugin/capability.lua +135 -0
  176. package/project/.sdk/tm/lua/feature/secrets/plugin/catalog.lua +63 -0
  177. package/project/.sdk/tm/lua/feature/secrets/plugin/config.lua +361 -0
  178. package/project/.sdk/tm/lua/feature/secrets/plugin/depend.lua +232 -0
  179. package/project/.sdk/tm/lua/feature/secrets/plugin/env.lua +168 -0
  180. package/project/.sdk/tm/lua/feature/secrets/plugin/export.lua +66 -0
  181. package/project/.sdk/tm/lua/feature/secrets/plugin/graph.lua +194 -0
  182. package/project/.sdk/tm/lua/feature/secrets/plugin/host.lua +1190 -0
  183. package/project/.sdk/tm/lua/feature/secrets/plugin/json.lua +169 -0
  184. package/project/.sdk/tm/lua/feature/secrets/plugin/order.lua +207 -0
  185. package/project/.sdk/tm/lua/feature/secrets/plugin/point.lua +106 -0
  186. package/project/.sdk/tm/lua/feature/secrets/plugin/ref.lua +115 -0
  187. package/project/.sdk/tm/lua/feature/secrets/plugin/resolve.lua +78 -0
  188. package/project/.sdk/tm/lua/feature/secrets/plugin/types.lua +275 -0
  189. package/project/.sdk/tm/lua/feature/secrets/plugin/version.lua +131 -0
  190. package/project/.sdk/tm/lua/feature/secrets/plugin.lua +76 -0
  191. package/project/.sdk/tm/lua/feature/secrets/sekreto/addr.lua +124 -0
  192. package/project/.sdk/tm/lua/feature/secrets/sekreto/err.lua +47 -0
  193. package/project/.sdk/tm/lua/feature/secrets/sekreto/name.lua +315 -0
  194. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/aws.lua +228 -0
  195. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/azuresecrets.lua +137 -0
  196. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/boru.lua +124 -0
  197. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/crypto.lua +212 -0
  198. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/doppler.lua +89 -0
  199. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/gcpsecrets.lua +129 -0
  200. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/hashicorp.lua +154 -0
  201. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/httpjson.lua +248 -0
  202. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/infisical.lua +113 -0
  203. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/json.lua +449 -0
  204. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/net.lua +198 -0
  205. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/onepassword.lua +126 -0
  206. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/secretspec.lua +93 -0
  207. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/sigv4.lua +269 -0
  208. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/support.lua +146 -0
  209. package/project/.sdk/tm/lua/feature/secrets/sekreto/providers.lua +346 -0
  210. package/project/.sdk/tm/lua/feature/secrets/sekreto.lua +479 -0
  211. package/project/.sdk/tm/lua/feature/secrets_feature.lua +690 -0
  212. package/project/.sdk/tm/lua/src/feature/secrets/.gitkeep +0 -0
  213. package/project/.sdk/tm/lua/test/extend_test.lua +105 -0
  214. package/project/.sdk/tm/lua/test/feature/secrets/secrets_feature_test.lua +862 -0
  215. package/project/.sdk/tm/ocaml/Makefile +52 -8
  216. package/project/.sdk/tm/ocaml/feature/secrets/plugin/capability.ml +106 -0
  217. package/project/.sdk/tm/ocaml/feature/secrets/plugin/catalog.ml +43 -0
  218. package/project/.sdk/tm/ocaml/feature/secrets/plugin/config.ml +349 -0
  219. package/project/.sdk/tm/ocaml/feature/secrets/plugin/defs.ml +143 -0
  220. package/project/.sdk/tm/ocaml/feature/secrets/plugin/depend.ml +217 -0
  221. package/project/.sdk/tm/ocaml/feature/secrets/plugin/env.ml +197 -0
  222. package/project/.sdk/tm/ocaml/feature/secrets/plugin/export.ml +89 -0
  223. package/project/.sdk/tm/ocaml/feature/secrets/plugin/graph.ml +227 -0
  224. package/project/.sdk/tm/ocaml/feature/secrets/plugin/host.ml +1112 -0
  225. package/project/.sdk/tm/ocaml/feature/secrets/plugin/order.ml +202 -0
  226. package/project/.sdk/tm/ocaml/feature/secrets/plugin/point.ml +138 -0
  227. package/project/.sdk/tm/ocaml/feature/secrets/plugin/ref.ml +126 -0
  228. package/project/.sdk/tm/ocaml/feature/secrets/plugin/resolve.ml +62 -0
  229. package/project/.sdk/tm/ocaml/feature/secrets/plugin/types.ml +97 -0
  230. package/project/.sdk/tm/ocaml/feature/secrets/plugin/value.ml +387 -0
  231. package/project/.sdk/tm/ocaml/feature/secrets/plugin/version.ml +139 -0
  232. package/project/.sdk/tm/ocaml/feature/secrets/plugins/aws.ml +171 -0
  233. package/project/.sdk/tm/ocaml/feature/secrets/plugins/azuresecrets.ml +116 -0
  234. package/project/.sdk/tm/ocaml/feature/secrets/plugins/boru.ml +95 -0
  235. package/project/.sdk/tm/ocaml/feature/secrets/plugins/crypto.ml +149 -0
  236. package/project/.sdk/tm/ocaml/feature/secrets/plugins/doppler.ml +61 -0
  237. package/project/.sdk/tm/ocaml/feature/secrets/plugins/gcpsecrets.ml +93 -0
  238. package/project/.sdk/tm/ocaml/feature/secrets/plugins/hashicorp.ml +120 -0
  239. package/project/.sdk/tm/ocaml/feature/secrets/plugins/http.ml +421 -0
  240. package/project/.sdk/tm/ocaml/feature/secrets/plugins/httpjson.ml +66 -0
  241. package/project/.sdk/tm/ocaml/feature/secrets/plugins/infisical.ml +85 -0
  242. package/project/.sdk/tm/ocaml/feature/secrets/plugins/onepassword.ml +112 -0
  243. package/project/.sdk/tm/ocaml/feature/secrets/plugins/runcmd.ml +97 -0
  244. package/project/.sdk/tm/ocaml/feature/secrets/plugins/secretspec.ml +68 -0
  245. package/project/.sdk/tm/ocaml/feature/secrets/plugins/sigv4.ml +259 -0
  246. package/project/.sdk/tm/ocaml/feature/secrets/plugins/tls.ml +44 -0
  247. package/project/.sdk/tm/ocaml/feature/secrets/plugins/tls_stubs.c +358 -0
  248. package/project/.sdk/tm/ocaml/feature/secrets/sekreto/json.ml +376 -0
  249. package/project/.sdk/tm/ocaml/feature/secrets/sekreto/provider.ml +647 -0
  250. package/project/.sdk/tm/ocaml/feature/secrets/sekreto/secret.ml +299 -0
  251. package/project/.sdk/tm/ocaml/feature/secrets/sekreto/sekreto.ml +347 -0
  252. package/project/.sdk/tm/ocaml/feature/secrets_feature.ml +453 -0
  253. package/project/.sdk/tm/ocaml/src/feature/secrets/.gitkeep +0 -0
  254. package/project/.sdk/tm/ocaml/test/feature/secrets/t_secrets.ml +670 -0
  255. package/project/.sdk/tm/perl/feature/secrets_feature.pm +33 -12
  256. package/project/.sdk/tm/perl/t/feature/secrets/secrets.t +47 -0
  257. package/project/.sdk/tm/php/feature/SecretsFeature.php +30 -6
  258. package/project/.sdk/tm/php/test/feature/secrets/SecretsTest.php +98 -0
  259. package/project/.sdk/tm/py/pkg/feature/secrets_feature.py +28 -6
  260. package/project/.sdk/tm/py/test/feature/secrets/test_secrets.py +114 -0
  261. package/project/.sdk/tm/rb/feature/secrets_feature.rb +28 -6
  262. package/project/.sdk/tm/rb/test/feature/secrets/secrets_feature_test.rb +93 -0
  263. package/project/.sdk/tm/rust/feature/secrets.rs +33 -10
  264. package/project/.sdk/tm/rust/tests/feature/secrets/main.rs +96 -0
  265. package/project/.sdk/tm/scala/feature/SecretsFeature.scala +29 -7
  266. package/project/.sdk/tm/scala/sdktest/feature/secrets/SecretsTestMain.scala +71 -0
  267. package/project/.sdk/tm/ts/src/feature/secrets/SecretsFeature.ts +35 -12
  268. package/project/.sdk/tm/ts/test/feature/secrets/Secrets.test.ts +73 -0
  269. package/project/.sdk/tm/zig/feature/secrets/plugin/capability.zig +137 -0
  270. package/project/.sdk/tm/zig/feature/secrets/plugin/catalog.zig +90 -0
  271. package/project/.sdk/tm/zig/feature/secrets/plugin/config.zig +346 -0
  272. package/project/.sdk/tm/zig/feature/secrets/plugin/depend.zig +244 -0
  273. package/project/.sdk/tm/zig/feature/secrets/plugin/env.zig +201 -0
  274. package/project/.sdk/tm/zig/feature/secrets/plugin/export.zig +83 -0
  275. package/project/.sdk/tm/zig/feature/secrets/plugin/graph.zig +212 -0
  276. package/project/.sdk/tm/zig/feature/secrets/plugin/host.zig +1224 -0
  277. package/project/.sdk/tm/zig/feature/secrets/plugin/inst.zig +126 -0
  278. package/project/.sdk/tm/zig/feature/secrets/plugin/order.zig +228 -0
  279. package/project/.sdk/tm/zig/feature/secrets/plugin/plugin.zig +34 -0
  280. package/project/.sdk/tm/zig/feature/secrets/plugin/point.zig +166 -0
  281. package/project/.sdk/tm/zig/feature/secrets/plugin/ref.zig +147 -0
  282. package/project/.sdk/tm/zig/feature/secrets/plugin/resolve.zig +74 -0
  283. package/project/.sdk/tm/zig/feature/secrets/plugin/types.zig +140 -0
  284. package/project/.sdk/tm/zig/feature/secrets/plugin/value.zig +662 -0
  285. package/project/.sdk/tm/zig/feature/secrets/plugin/version.zig +139 -0
  286. package/project/.sdk/tm/zig/feature/secrets/plugins/aws.zig +294 -0
  287. package/project/.sdk/tm/zig/feature/secrets/plugins/azuresecrets.zig +222 -0
  288. package/project/.sdk/tm/zig/feature/secrets/plugins/boru.zig +188 -0
  289. package/project/.sdk/tm/zig/feature/secrets/plugins/doppler.zig +135 -0
  290. package/project/.sdk/tm/zig/feature/secrets/plugins/gcpsecrets.zig +170 -0
  291. package/project/.sdk/tm/zig/feature/secrets/plugins/hashicorp.zig +242 -0
  292. package/project/.sdk/tm/zig/feature/secrets/plugins/httpjson.zig +535 -0
  293. package/project/.sdk/tm/zig/feature/secrets/plugins/infisical.zig +167 -0
  294. package/project/.sdk/tm/zig/feature/secrets/plugins/onepassword.zig +202 -0
  295. package/project/.sdk/tm/zig/feature/secrets/plugins/secretspec.zig +160 -0
  296. package/project/.sdk/tm/zig/feature/secrets/plugins/sigv4.zig +336 -0
  297. package/project/.sdk/tm/zig/feature/secrets/sekreto/addr.zig +148 -0
  298. package/project/.sdk/tm/zig/feature/secrets/sekreto/builtins.zig +259 -0
  299. package/project/.sdk/tm/zig/feature/secrets/sekreto/provider.zig +440 -0
  300. package/project/.sdk/tm/zig/feature/secrets/sekreto/sekreto.zig +944 -0
  301. package/project/.sdk/tm/zig/feature/secrets.zig +854 -0
  302. package/project/.sdk/tm/zig/src/feature/secrets/.gitkeep +0 -0
  303. package/project/.sdk/tm/zig/test/feature/secrets/secrets_test.zig +891 -0
  304. package/project/sdkgen-package.json +1 -1
@@ -0,0 +1,205 @@
1
+ // VENDORED: @voxgig/plugin sdk-20260908-1556-0 (cpp/src/env.cpp)
2
+ // Source: https://github.com/voxgig/plugin @ 48392f5e2b6d1434ee9b1a4a9a11f4480aaeb46a [tag: sdk-20260908-1556-0]
3
+ // License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
4
+ /* Environment overrides (§9.5) — level 7 of the ladder.
5
+ *
6
+ * One prefix, so nothing drifts: `VOXGIG_PLUGIN_*`.
7
+ *
8
+ * VOXGIG_PLUGIN_PROFILE the profile name
9
+ * VOXGIG_PLUGIN_<REF>_<PATH> one option
10
+ * VOXGIG_PLUGIN_ACTIVE/INACTIVE comma-separated refs, INACTIVE wins
11
+ *
12
+ * THE ENCODING IS LOSSY, AND THIS SAYS SO RATHER THAN PRETENDING
13
+ * OTHERWISE. Ref and path are upper-snake with `$` -> `__` and `.` ->
14
+ * `_`. But `_` is legal in a name and in a tag, and the mapping folds
15
+ * case, so `retry$fast` and `retry__fast` both encode to `RETRY__FAST`.
16
+ *
17
+ * Rather than restrict a grammar the rest of the stack already uses,
18
+ * the host DETECTS THE COLLISION: it encodes every ref it holds, and a
19
+ * key two refs claim is `plugin_env_ambiguous`, naming both. */
20
+
21
+ #include "env.hpp"
22
+
23
+ #include <algorithm>
24
+
25
+ #include "ref.hpp"
26
+
27
+ namespace plugin {
28
+
29
+ static const char* const PREFIX = "VOXGIG_PLUGIN_";
30
+
31
+ std::string encoderef(const std::string& ref) {
32
+ std::string out;
33
+ out.reserve(ref.size() * 2);
34
+ for (char c : ref) {
35
+ if ('$' == c) out += "__";
36
+ else if ('.' == c) out += '_';
37
+ else if ('a' <= c && 'z' >= c) out += static_cast<char>(c - 'a' + 'A');
38
+ else out += c;
39
+ }
40
+ return out;
41
+ }
42
+
43
+ static void checkreserved(const std::string& ref, const V& reserved) {
44
+ if (!islist(reserved) || 0 == len(reserved)) return;
45
+ const std::string name = refname(ref);
46
+ for (size_t i = 0; i < len(reserved); i++) {
47
+ if (isstr(at(reserved, i)) && asstr(at(reserved, i)) == name) {
48
+ fail("plugin_ref_reserved", "ref is reserved by the host: " + ref,
49
+ details1("ref", vstr(ref)));
50
+ }
51
+ }
52
+ }
53
+
54
+ /* Values parse as JSON, FALLING BACK TO STRING — so `8080` is a number,
55
+ * `true` is a boolean, `{"a":1}` is a map, and `hello` is the string it
56
+ * looks like rather than a parse error. */
57
+ static V parsevalue(const std::string& v) {
58
+ std::string err;
59
+ V parsed = parsejson(v, err);
60
+ return parsed ? parsed : vstr(v);
61
+ }
62
+
63
+ static std::string lower(std::string s) {
64
+ for (char& c : s) {
65
+ if ('A' <= c && 'Z' >= c) c = static_cast<char>(c - 'A' + 'a');
66
+ }
67
+ return s;
68
+ }
69
+
70
+ V applyenv(const V& input) {
71
+ V env = get(input, "env");
72
+ if (!ismap(env)) env = vmap();
73
+ V refsin = get(input, "refs");
74
+ V reserved = get(input, "reserved");
75
+
76
+ V out = vmap();
77
+ V options = vmap();
78
+ V active = vlist();
79
+ V inactive = vlist();
80
+ set(out, "options", options);
81
+ set(out, "active", active);
82
+ set(out, "inactive", inactive);
83
+
84
+ /* Encode every ref the host holds, and refuse a key that two of them
85
+ * claim. Done UP FRONT so the collision is reported even when no
86
+ * environment variable exercises it — a latent ambiguity is still an
87
+ * ambiguity, and finding it at deploy time is the failure this exists
88
+ * to prevent. */
89
+ V byencoded = vmap();
90
+ if (islist(refsin)) {
91
+ for (size_t i = 0; i < len(refsin); i++) {
92
+ const std::string r = canonref(at(refsin, i));
93
+ const std::string e = encoderef(r);
94
+ V list = get(byencoded, e);
95
+ if (isnull(list)) { list = vlist(); set(byencoded, e, list); }
96
+ push(list, vstr(r));
97
+ }
98
+ }
99
+
100
+ auto encs = sortedkeys(byencoded);
101
+ for (const auto& e : encs) {
102
+ V claims = get(byencoded, e);
103
+ if (1 < len(claims)) {
104
+ std::string a = asstr(at(claims, 0));
105
+ std::string b = asstr(at(claims, 1));
106
+ const std::string& lo = a <= b ? a : b;
107
+ const std::string& hi = a <= b ? b : a;
108
+ V pair = vlist();
109
+ push(pair, vstr(lo));
110
+ push(pair, vstr(hi));
111
+ V d = vmap();
112
+ set(d, "encoded", vstr(e));
113
+ set(d, "refs", pair);
114
+ fail("plugin_env_ambiguous",
115
+ "refs collide in the environment encoding as " + e + ": " + lo +
116
+ ", " + hi,
117
+ d);
118
+ }
119
+ }
120
+
121
+ /* LONGEST encoded ref first, so `retry$fast` wins over `retry` on
122
+ * `RETRY__FAST_MIN`. Shortest-first would read the tag as a path. */
123
+ auto order = encs;
124
+ std::sort(order.begin(), order.end(),
125
+ [](const std::string& a, const std::string& b) {
126
+ if (a.size() != b.size()) return a.size() > b.size();
127
+ return a < b;
128
+ });
129
+
130
+ const size_t plen = std::string(PREFIX).size();
131
+
132
+ for (const auto& key : sortedkeys(env)) {
133
+ if (0 != key.compare(0, plen, PREFIX)) continue;
134
+ const std::string rest = key.substr(plen);
135
+ const std::string val = asstr(get(env, key));
136
+
137
+ if ("PROFILE" == rest) {
138
+ set(out, "profile", vstr(val));
139
+ continue;
140
+ }
141
+
142
+ if ("ACTIVE" == rest || "INACTIVE" == rest) {
143
+ bool isactive = "ACTIVE" == rest;
144
+ size_t p = 0;
145
+ while (p <= val.size()) {
146
+ size_t comma = val.find(',', p);
147
+ size_t end = (std::string::npos == comma) ? val.size() : comma;
148
+ size_t s = p;
149
+ while (s < end && (' ' == val[s] || '\t' == val[s])) s++;
150
+ size_t e = end;
151
+ while (e > s && (' ' == val[e - 1] || '\t' == val[e - 1])) e--;
152
+ if (e > s) {
153
+ const std::string c = canonref(vstr(val.substr(s, e - s)));
154
+ /* The reservation covers EVERY input layer (§9.1).
155
+ * VOXGIG_PLUGIN_INACTIVE=station is easier to set than
156
+ * editing a config file, and INACTIVE has the final word — so
157
+ * guarding documents alone would leave the one lever this
158
+ * mechanism exists to deny wide open. */
159
+ checkreserved(c, reserved);
160
+ push(isactive ? active : inactive, vstr(c));
161
+ }
162
+ if (std::string::npos == comma) break;
163
+ p = comma + 1;
164
+ }
165
+ continue;
166
+ }
167
+
168
+ std::string enc;
169
+ bool found = false;
170
+ for (const auto& cand : order) {
171
+ if (rest == cand ||
172
+ (rest.size() > cand.size() &&
173
+ 0 == rest.compare(0, cand.size(), cand) && '_' == rest[cand.size()])) {
174
+ enc = cand;
175
+ found = true;
176
+ break;
177
+ }
178
+ }
179
+ if (!found) continue; /* not for any ref this host holds */
180
+
181
+ const std::string ref = asstr(at(get(byencoded, enc), 0));
182
+ checkreserved(ref, reserved);
183
+
184
+ if (rest == enc) continue; /* a ref with no path sets nothing */
185
+
186
+ std::string pathtext = rest.substr(enc.size() + 1);
187
+ V node = get(options, ref);
188
+ if (isnull(node)) { node = vmap(); set(options, ref, node); }
189
+
190
+ for (;;) {
191
+ size_t dot = pathtext.find('_');
192
+ if (std::string::npos == dot) break;
193
+ const std::string piece = lower(pathtext.substr(0, dot));
194
+ V next = get(node, piece);
195
+ if (!ismap(next)) { next = vmap(); set(node, piece, next); }
196
+ node = next;
197
+ pathtext = pathtext.substr(dot + 1);
198
+ }
199
+ set(node, lower(pathtext), parsevalue(val));
200
+ }
201
+
202
+ return out;
203
+ }
204
+
205
+ } // namespace plugin
@@ -0,0 +1,25 @@
1
+ // VENDORED: @voxgig/plugin sdk-20260908-1556-0 (cpp/src/env.hpp)
2
+ // Source: https://github.com/voxgig/plugin @ 48392f5e2b6d1434ee9b1a4a9a11f4480aaeb46a [tag: sdk-20260908-1556-0]
3
+ // License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
4
+ /* Environment overrides (§9.5) — level 7 of the ladder. Pure: a
5
+ * function over a string map and a ref set, so the corpus tests it
6
+ * without touching a real environment. */
7
+
8
+ #ifndef VOXGIG_PLUGIN_ENV_HPP
9
+ #define VOXGIG_PLUGIN_ENV_HPP
10
+
11
+ #include <string>
12
+
13
+ #include "types.hpp"
14
+ #include "value.hpp"
15
+
16
+ namespace plugin {
17
+
18
+ /* `retry$fast` -> `RETRY__FAST`. Lossy on purpose; see env.cpp. */
19
+ std::string encoderef(const std::string& ref);
20
+
21
+ V applyenv(const V& input);
22
+
23
+ } // namespace plugin
24
+
25
+ #endif
@@ -0,0 +1,84 @@
1
+ // VENDORED: @voxgig/plugin sdk-20260908-1556-0 (cpp/src/export.cpp)
2
+ // Source: https://github.com/voxgig/plugin @ 48392f5e2b6d1434ee9b1a4a9a11f4480aaeb46a [tag: sdk-20260908-1556-0]
3
+ // License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
4
+ /* Exports (§11).
5
+ *
6
+ * THE UNQUALIFIED ALIAS IS THE INTERESTING PART. `retry/client`
7
+ * resolves to the UNTAGGED instance if one exists; if not, and exactly
8
+ * one tagged instance exports that key, it resolves to that one; if two
9
+ * do, it is `plugin_export_ambiguous` — deliberately diverging from
10
+ * seneca's silent last-wins, because with multi-instance as a headline
11
+ * feature an ambiguous alias is a defect waiting for production. */
12
+
13
+ #include "export.hpp"
14
+
15
+ #include <algorithm>
16
+
17
+ #include "ref.hpp"
18
+
19
+ namespace plugin {
20
+
21
+ V resolveexport(const V& spec, const V& exported) {
22
+ const std::string s = isstr(spec) ? asstr(spec) : "";
23
+ size_t cut = s.find('/');
24
+ if (std::string::npos == cut) {
25
+ fail("plugin_export_ambiguous", "export spec needs a key: " + s,
26
+ details1("spec", vstr(s)));
27
+ }
28
+ const std::string head = s.substr(0, cut);
29
+ const std::string key = s.substr(cut + 1);
30
+
31
+ /* A fully qualified ref: exactly one answer or none.
32
+ *
33
+ * VALIDATING, not tolerant. The canonical calls `canonref(head)`,
34
+ * which RAISES — so `retry$bad!/client` is `plugin_bad_tag` and
35
+ * `2fa/client` is `plugin_bad_name`. Reading it with `tryref` turned
36
+ * a configuration typo into an ordinary missing export, which is the
37
+ * error the caller most needs to see, silently swallowed. */
38
+ const std::string want = canonref(head);
39
+ {
40
+ for (size_t i = 0; i < len(exported); i++) {
41
+ V e = at(exported, i);
42
+ if (asstr(get(e, "ref")) == want && asstr(get(e, "key")) == key) {
43
+ return get(e, "value");
44
+ }
45
+ }
46
+ }
47
+
48
+ /* An alias: the NAME, not a ref. Look at every instance of it. */
49
+ std::vector<V> byname;
50
+ for (size_t i = 0; i < len(exported); i++) {
51
+ V e = at(exported, i);
52
+ const std::string eref = asstr(get(e, "ref"));
53
+ if (refname(eref) == head && asstr(get(e, "key")) == key) byname.push_back(e);
54
+ }
55
+ if (byname.empty()) return nullptr;
56
+
57
+ /* The untagged instance wins outright when there is one. */
58
+ for (const auto& e : byname) {
59
+ if (std::string::npos == asstr(get(e, "ref")).find('$')) return get(e, "value");
60
+ }
61
+
62
+ if (1 == byname.size()) return get(byname[0], "value");
63
+
64
+ std::vector<std::string> refs;
65
+ for (const auto& e : byname) refs.push_back(asstr(get(e, "ref")));
66
+ std::sort(refs.begin(), refs.end());
67
+
68
+ V list = vlist();
69
+ std::string names;
70
+ for (size_t i = 0; i < refs.size(); i++) {
71
+ if (0 < i) names += ", ";
72
+ names += refs[i];
73
+ push(list, vstr(refs[i]));
74
+ }
75
+ V d = vmap();
76
+ set(d, "spec", vstr(s));
77
+ set(d, "refs", list);
78
+ fail("plugin_export_ambiguous",
79
+ "alias " + s + " matches " + std::to_string(byname.size()) +
80
+ " instances: " + names,
81
+ d);
82
+ }
83
+
84
+ } // namespace plugin
@@ -0,0 +1,24 @@
1
+ // VENDORED: @voxgig/plugin sdk-20260908-1556-0 (cpp/src/export.hpp)
2
+ // Source: https://github.com/voxgig/plugin @ 48392f5e2b6d1434ee9b1a4a9a11f4480aaeb46a [tag: sdk-20260908-1556-0]
3
+ // License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
4
+ /* Exports (§11). An instance publishes values for other plugins and for
5
+ * the application. THE UNQUALIFIED ALIAS IS THE INTERESTING PART; see
6
+ * export.cpp. */
7
+
8
+ #ifndef VOXGIG_PLUGIN_EXPORT_HPP
9
+ #define VOXGIG_PLUGIN_EXPORT_HPP
10
+
11
+ #include "types.hpp"
12
+ #include "value.hpp"
13
+
14
+ namespace plugin {
15
+
16
+ /* `retry$fast/client` or the alias `retry/client`, against a list of
17
+ * {ref, key, value}. Answers nullptr for "no such export", which is not
18
+ * an error — `export/missing` pins that, and is why the answer is a
19
+ * nullptr rather than a null Value. */
20
+ V resolveexport(const V& spec, const V& exported);
21
+
22
+ } // namespace plugin
23
+
24
+ #endif
@@ -0,0 +1,222 @@
1
+ // VENDORED: @voxgig/plugin sdk-20260908-1556-0 (cpp/src/graph.cpp)
2
+ // Source: https://github.com/voxgig/plugin @ 48392f5e2b6d1434ee9b1a4a9a11f4480aaeb46a [tag: sdk-20260908-1556-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
14
+ * be 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. */
21
+
22
+ #include "graph.hpp"
23
+
24
+ #include <algorithm>
25
+
26
+ #include "capability.hpp"
27
+ #include "ref.hpp"
28
+ #include "version.hpp"
29
+
30
+ namespace plugin {
31
+
32
+ static V candidates(const V& byref, const V& name) {
33
+ V out = vlist();
34
+ /* A NODE SATISFIES ITS OWN REF (§11.1), and this is where the graph
35
+ * learned it. Considering only declared capabilities made `resolve`
36
+ * answer `absent` about a provider sitting right there and live —
37
+ * §11.4's whole job is explaining the graph the runtime reconciles,
38
+ * and it was explaining a different one. Canonical (§4 rule 5), and
39
+ * tolerant, because a capability name need not be a well-formed ref. */
40
+ std::string asref;
41
+ bool isaref = isstr(name) && tryref(asstr(name), asref);
42
+
43
+ for (const auto& r : sortedkeys(byref)) {
44
+ V node = get(byref, r);
45
+ V pos = get(node, "pos");
46
+ /* The ref match WINS OUTRIGHT for that node, as at runtime: one
47
+ * candidate, not two, for a node both named `b` and providing `b` —
48
+ * without the skip the blocked-chain explanation named it twice. */
49
+ if (isaref && r == asref) {
50
+ V prov = vmap();
51
+ set(prov, "name", name);
52
+ V cand = vmap();
53
+ set(cand, "ref", get(node, "ref"));
54
+ set(cand, "pos", isnum(pos) ? pos : vnum(0));
55
+ set(cand, "provides", prov);
56
+ push(out, cand);
57
+ continue;
58
+ }
59
+ V provides = get(node, "provides");
60
+ for (size_t j = 0; j < len(provides); j++) {
61
+ V p = at(provides, j);
62
+ if (same(get(p, "name"), name)) {
63
+ V cand = vmap();
64
+ set(cand, "ref", get(node, "ref"));
65
+ set(cand, "pos", isnum(pos) ? pos : vnum(0));
66
+ set(cand, "provides", p);
67
+ push(out, cand);
68
+ }
69
+ }
70
+ }
71
+ return out;
72
+ }
73
+
74
+ static V blockedof(const V& node, const V& unmet, const V& why) {
75
+ V out = vmap();
76
+ set(out, "ref", get(node, "ref"));
77
+ set(out, "unmet", unmet);
78
+ set(out, "why", why);
79
+ return out;
80
+ }
81
+
82
+ static V why1(const std::string& kind) {
83
+ V w = vmap();
84
+ set(w, "kind", vstr(kind));
85
+ return w;
86
+ }
87
+
88
+ static V sortedstrings(std::vector<std::string> v) {
89
+ std::sort(v.begin(), v.end());
90
+ V out = vlist();
91
+ for (const auto& s : v) push(out, vstr(s));
92
+ return out;
93
+ }
94
+
95
+ /* The FIRST unmet requirement, with the most specific explanation
96
+ * available. Order matters: "no provider at all" and "a provider at the
97
+ * wrong version" are different problems and a reader must not have to
98
+ * guess which they have. */
99
+ static V firstunmet(const V& node, const V& byref, const V& resolved) {
100
+ V reqs = get(node, "requires");
101
+ for (size_t ri = 0; ri < len(reqs); ri++) {
102
+ V req = at(reqs, ri);
103
+ if (truthy(get(req, "optional"))) continue;
104
+
105
+ V name = get(req, "name");
106
+ V all = candidates(byref, name);
107
+ if (0 == len(all)) return blockedof(node, name, why1("absent"));
108
+
109
+ V ok = resolvecapability(req, all);
110
+ if (0 < len(ok)) {
111
+ /* A provider exists and matches — but if none of them is itself
112
+ * resolved, this node is blocked BEHIND it, and the chain is the
113
+ * useful answer rather than "unmet". */
114
+ bool live = false;
115
+ for (size_t i = 0; i < len(ok); i++) {
116
+ if (has(resolved, asstr(get(at(ok, i), "ref")))) { live = true; break; }
117
+ }
118
+ if (live) continue;
119
+
120
+ std::vector<std::string> chain;
121
+ for (size_t i = 0; i < len(ok); i++) {
122
+ chain.push_back(asstr(get(at(ok, i), "ref")));
123
+ }
124
+ V w = why1("blocked");
125
+ set(w, "chain", sortedstrings(chain));
126
+ return blockedof(node, name, w);
127
+ }
128
+
129
+ /* Providers exist and none matched. Say which test failed. */
130
+ V range = get(req, "range");
131
+ if (!isnull(range)) {
132
+ std::vector<std::string> found;
133
+ for (size_t i = 0; i < len(all); i++) {
134
+ V prov = get(at(all, i), "provides");
135
+ V version = get(prov, "version");
136
+ if (isnull(version) || !satisfiesq(version, range)) {
137
+ found.push_back(isnull(version) ? "(none)" : asstr(version));
138
+ }
139
+ }
140
+ if (!found.empty()) {
141
+ V w = why1("version");
142
+ set(w, "range", range);
143
+ set(w, "found", sortedstrings(found));
144
+ return blockedof(node, name, w);
145
+ }
146
+ }
147
+
148
+ V match = get(req, "match");
149
+ if (!isnull(match)) {
150
+ for (size_t i = 0; i < len(all); i++) {
151
+ V prov = get(at(all, i), "provides");
152
+ V attrs = get(prov, "attrs");
153
+ if (isnull(attrs)) attrs = vmap();
154
+ for (const auto& k : sortedkeys(match)) {
155
+ /* The same recursive partial match the selection applies, so
156
+ * a nested requirement that FAILED the selection is also the
157
+ * one the diagnosis names (§11.4). */
158
+ if (!has(attrs, k) || !capmatchvalue(get(match, k), get(attrs, k))) {
159
+ V w = why1("match");
160
+ set(w, "failing", vstr(k));
161
+ set(w, "want", get(match, k));
162
+ set(w, "found", get(attrs, k));
163
+ return blockedof(node, name, w);
164
+ }
165
+ }
166
+ }
167
+ }
168
+
169
+ return blockedof(node, name, why1("absent"));
170
+ }
171
+ return nullptr;
172
+ }
173
+
174
+ V resolvegraph(const V& nodes) {
175
+ V byref = vmap();
176
+ for (size_t i = 0; i < len(nodes); i++) {
177
+ V n = at(nodes, i);
178
+ set(byref, asstr(get(n, "ref")), n);
179
+ }
180
+
181
+ V resolved = vmap();
182
+
183
+ /* Fixed point: a node resolves when every mandatory requirement is
184
+ * met by an ALREADY-RESOLVED provider. Iterating to a fixed point is
185
+ * what makes a provider that is itself blocked propagate, rather than
186
+ * each node being judged against the raw registry. */
187
+ bool moved = true;
188
+ while (moved) {
189
+ moved = false;
190
+ for (size_t i = 0; i < len(nodes); i++) {
191
+ V n = at(nodes, i);
192
+ const std::string ref = asstr(get(n, "ref"));
193
+ if (has(resolved, ref)) continue;
194
+ if (!firstunmet(n, byref, resolved)) {
195
+ set(resolved, ref, vbool(true));
196
+ moved = true;
197
+ }
198
+ }
199
+ }
200
+
201
+ V blocked = vmap();
202
+ for (size_t i = 0; i < len(nodes); i++) {
203
+ V n = at(nodes, i);
204
+ const std::string ref = asstr(get(n, "ref"));
205
+ if (has(resolved, ref)) continue;
206
+ V why = firstunmet(n, byref, resolved);
207
+ if (why) set(blocked, ref, why);
208
+ }
209
+
210
+ V resolvedlist = vlist();
211
+ for (const auto& k : sortedkeys(resolved)) push(resolvedlist, vstr(k));
212
+
213
+ V blockedlist = vlist();
214
+ for (const auto& k : sortedkeys(blocked)) push(blockedlist, get(blocked, k));
215
+
216
+ V out = vmap();
217
+ set(out, "resolved", resolvedlist);
218
+ set(out, "blocked", blockedlist);
219
+ return out;
220
+ }
221
+
222
+ } // namespace plugin
@@ -0,0 +1,21 @@
1
+ // VENDORED: @voxgig/plugin sdk-20260908-1556-0 (cpp/src/graph.hpp)
2
+ // Source: https://github.com/voxgig/plugin @ 48392f5e2b6d1434ee9b1a4a9a11f4480aaeb46a [tag: sdk-20260908-1556-0]
3
+ // License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
4
+ /* Whole-graph resolution (§11.4) — a pure function of the registry that
5
+ * answers which instances can be live, and for each blocked one THE
6
+ * SPECIFIC requirement that is unmet, and why. See graph.cpp. */
7
+
8
+ #ifndef VOXGIG_PLUGIN_GRAPH_HPP
9
+ #define VOXGIG_PLUGIN_GRAPH_HPP
10
+
11
+ #include "types.hpp"
12
+ #include "value.hpp"
13
+
14
+ namespace plugin {
15
+
16
+ /* [{ref, pos, provides?, requires?}] -> {resolved: [ref], blocked: [...]} */
17
+ V resolvegraph(const V& nodes);
18
+
19
+ } // namespace plugin
20
+
21
+ #endif