@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,244 @@
1
+ // VENDORED: @voxgig/plugin sdk-20260908-1556-0 (zig/src/depend.zig)
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
+ //! Dependency cardinality, policy, and the restart graph (§11.3).
5
+ //!
6
+ //! TWO AXES, BOTH DECLARED BY THE DEFINITION THAT HAS THE REQUIREMENT,
7
+ //! because only it knows what it can cope with:
8
+ //!
9
+ //! | static (default) | dynamic
10
+ //! -------------|---------------------------|--------------------------
11
+ //! mandatory | unmet -> pending; | unmet -> pending;
12
+ //! (default) | lost -> pending, | lost -> STAYS LIVE,
13
+ //! | recursively | notified
14
+ //! -------------|---------------------------|--------------------------
15
+ //! optional:true| never gates activation; | never gates activation;
16
+ //! | a change deactivates and | a change is a
17
+ //! | reactivates | notification, nothing else
18
+ //!
19
+ //! `dynamic` means the plugin has said, IN WRITING, that it can survive
20
+ //! its provider being swapped underneath it. It is not the default
21
+ //! because most plugins cannot, and the cost of wrongly assuming they
22
+ //! can is a live instance holding a dead reference.
23
+
24
+ const std = @import("std");
25
+ const v = @import("value.zig");
26
+ const t = @import("types.zig");
27
+ const ref = @import("ref.zig");
28
+
29
+ /// A bare string is shorthand for `{name}`.
30
+ pub fn normrequire(r: ?*v.Value) *v.Value {
31
+ if (v.isStr(r)) {
32
+ const out = v.vmap();
33
+ v.set(out, "name", r);
34
+ return out;
35
+ }
36
+ return if (v.isMap(r)) r.? else v.vmap();
37
+ }
38
+
39
+ /// BOTH AXES ARE READ AT TWO LEVELS, AND THE PER-REQUIREMENT ONE WINS.
40
+ ///
41
+ /// The instance-level `policy` and `optional` list are how a DOCUMENT
42
+ /// states the axis without editing the definition, and they apply to
43
+ /// every requirement. The per-requirement form is strictly more
44
+ /// expressive: an instance that is `static` on its store and `dynamic`
45
+ /// on its metrics cannot be written at all at the instance level, and
46
+ /// that is the ordinary case rather than an exotic one.
47
+ ///
48
+ /// `optional` UNIONS rather than overriding — both spellings say this
49
+ /// requirement need not gate activation, and there is no reading under
50
+ /// which one of them means "actually, mandatory".
51
+ pub fn requirements(options: ?*v.Value) *v.Value {
52
+ const raw = v.get(options, "requires");
53
+ const marked = v.get(options, "optional");
54
+ const fallback = v.get(options, "policy");
55
+
56
+ const out = v.vlist();
57
+ for (v.items(raw)) |item| {
58
+ const r = normrequire(item);
59
+ const o = v.vmap();
60
+ for (v.keys(r)) |k| v.set(o, k, v.get(r, k));
61
+
62
+ var opt = v.truthy(v.get(r, "optional"));
63
+ if (!opt and v.isList(marked)) {
64
+ for (v.items(marked)) |m| {
65
+ if (v.same(m, v.get(r, "name"))) {
66
+ opt = true;
67
+ break;
68
+ }
69
+ }
70
+ }
71
+ if (opt) v.set(o, "optional", v.vbool(true));
72
+
73
+ if (v.isNull(v.get(o, "policy")) and !v.isNull(fallback)) v.set(o, "policy", fallback);
74
+ v.push(out, o);
75
+ }
76
+ return out;
77
+ }
78
+
79
+ /// Does losing this requirement's SELECTED provider restart the
80
+ /// consumer? The mandatory ones under `static`, and the `static`
81
+ /// optional ones — both make a capability change deactivate and
82
+ /// reactivate. `dynamic` never restarts.
83
+ pub fn restartsonloss(r: ?*v.Value) bool {
84
+ const p = v.get(r, "policy");
85
+ const policy = if (v.isStr(p)) v.asStr(p) else "static";
86
+ return !std.mem.eql(u8, policy, "dynamic");
87
+ }
88
+
89
+ /// Does an unmet requirement keep the consumer out of `live`?
90
+ ///
91
+ /// CARDINALITY ALONE DECIDES THIS, NOT POLICY. `dynamic` is a statement
92
+ /// about surviving a SWAP, not about starting without the thing at all —
93
+ /// a mandatory-dynamic consumer still waits in `pending` for its first
94
+ /// provider. Conflating the two would let a plugin that declared it can
95
+ /// cope with replacement activate with nothing to call.
96
+ pub fn gatesactivation(r: ?*v.Value) bool {
97
+ return v.asBool(v.get(r, "optional")) != true;
98
+ }
99
+
100
+ /// Edges that can cause a restart, which is exactly the set a cycle must
101
+ /// be detected over (§11.3): the mandatory requirements AND THE `static`
102
+ /// OPTIONAL ONES, because both make a capability change deactivate and
103
+ /// reactivate the consumer — and a cycle of restarts does not settle.
104
+ ///
105
+ /// ONLY `dynamic` OPTIONAL EDGES ARE EXCLUDED, and they are the ones the
106
+ /// exclusion was for. An earlier draft of §11.3 excluded EVERY optional
107
+ /// edge and thereby admitted the non-terminating case it was trying to
108
+ /// permit.
109
+ pub fn restartcausing(r: ?*v.Value) bool {
110
+ return gatesactivation(r) or restartsonloss(r);
111
+ }
112
+
113
+ fn lessStr(_: void, a: []const u8, b: []const u8) bool {
114
+ return std.mem.order(u8, a, b) == .lt;
115
+ }
116
+
117
+ fn listhas(l: []const []const u8, s: []const u8) bool {
118
+ for (l) |x| {
119
+ if (std.mem.eql(u8, x, s)) return true;
120
+ }
121
+ return false;
122
+ }
123
+
124
+ pub fn dependencycycle(nodes: ?*v.Value) ?*v.Value {
125
+ // TWO INDEXES, NOT ONE MERGED MAP. Capability names and refs are
126
+ // matched differently — a capability by its exact name, a ref
127
+ // through the canonical spelling (§4 rule 5) — and one map keyed by
128
+ // both can only do one of them. Keyed by both and looked up raw, a
129
+ // cycle spelled `a$`/`b$` finds no providers and EVADES the
130
+ // load-time check that exists to catch a non-terminating reconcile.
131
+ const bycap = v.vmap();
132
+ const isref = v.vmap();
133
+ for (v.items(nodes)) |n| {
134
+ const nref = v.asStr(v.get(n, "ref"));
135
+ v.set(isref, nref, v.vbool(true));
136
+ for (v.items(v.get(n, "provides"))) |capv| {
137
+ const c = v.asStr(capv);
138
+ var l = v.get(bycap, c);
139
+ if (v.isNull(l)) {
140
+ l = v.vlist();
141
+ v.set(bycap, c, l);
142
+ }
143
+ v.push(l, v.vstr(nref));
144
+ }
145
+ }
146
+
147
+ const edges = v.vmap();
148
+ for (v.items(nodes)) |n| {
149
+ const nref = v.asStr(v.get(n, "ref"));
150
+ var out = v.List([]const u8).init(v.arena());
151
+ for (v.items(v.get(n, "requires"))) |r| {
152
+ if (!restartcausing(r)) continue;
153
+ const rname = if (v.isStr(v.get(r, "name"))) v.asStr(v.get(r, "name")) else "";
154
+ var from = v.List([]const u8).init(v.arena());
155
+ for (v.items(v.get(bycap, rname))) |x| from.append(v.asStr(x)) catch @panic("oom");
156
+ // A node satisfies its own name AS A REF (§11.1),
157
+ // canonically — exactly what `providersof` does at runtime,
158
+ // so the load-time graph and the running one agree about
159
+ // what an edge is.
160
+ if (ref.tryref(rname)) |asref| {
161
+ if (v.has(isref, asref) and !listhas(from.items, asref)) {
162
+ from.append(asref) catch @panic("oom");
163
+ }
164
+ }
165
+ for (from.items) |p| {
166
+ if (!std.mem.eql(u8, p, nref) and !listhas(out.items, p)) {
167
+ out.append(p) catch @panic("oom");
168
+ }
169
+ }
170
+ }
171
+ std.mem.sort([]const u8, out.items, {}, lessStr);
172
+ const sorted = v.vlist();
173
+ for (out.items) |p| v.push(sorted, v.vstr(p));
174
+ v.set(edges, nref, sorted);
175
+ }
176
+
177
+ // Iterative DFS with an explicit stack: twenty ports, and several of
178
+ // them have no recursion budget worth relying on.
179
+ const WHITE: f64 = 0;
180
+ const GREY: f64 = 1;
181
+ const BLACK: f64 = 2;
182
+ const colour = v.vmap();
183
+ for (v.items(nodes)) |n| v.set(colour, v.asStr(v.get(n, "ref")), v.vnum(WHITE));
184
+
185
+ const Frame = struct { ref: []const u8, i: usize };
186
+
187
+ for (v.sortedKeys(edges)) |start| {
188
+ if (v.asNum(v.get(colour, start)) != WHITE) continue;
189
+
190
+ var path = v.List([]const u8).init(v.arena());
191
+ var stack = v.List(Frame).init(v.arena());
192
+ stack.append(.{ .ref = start, .i = 0 }) catch @panic("oom");
193
+ v.set(colour, start, v.vnum(GREY));
194
+ path.append(start) catch @panic("oom");
195
+
196
+ while (stack.items.len > 0) {
197
+ const top = &stack.items[stack.items.len - 1];
198
+ const tos = v.get(edges, top.ref);
199
+
200
+ if (top.i >= v.len(tos)) {
201
+ v.set(colour, top.ref, v.vnum(BLACK));
202
+ _ = stack.pop();
203
+ _ = path.pop();
204
+ continue;
205
+ }
206
+
207
+ const next = v.asStr(v.at(tos, top.i));
208
+ top.i += 1;
209
+ const c = v.asNum(v.get(colour, next));
210
+
211
+ if (c == GREY) {
212
+ // Report the cycle itself, not the walk that found it.
213
+ const cycle = v.vlist();
214
+ var started = false;
215
+ for (path.items) |p| {
216
+ if (!started and std.mem.eql(u8, p, next)) started = true;
217
+ if (started) v.push(cycle, v.vstr(p));
218
+ }
219
+ v.push(cycle, v.vstr(next));
220
+ return cycle;
221
+ }
222
+ if (c == BLACK) continue;
223
+
224
+ v.set(colour, next, v.vnum(GREY));
225
+ path.append(next) catch @panic("oom");
226
+ stack.append(.{ .ref = next, .i = 0 }) catch @panic("oom");
227
+ }
228
+ }
229
+
230
+ return null;
231
+ }
232
+
233
+ /// Raise on a cycle, naming it. Separate from the detector so the
234
+ /// detector stays pure and corpus-testable.
235
+ pub fn checkcycle(nodes: ?*v.Value) t.Err!void {
236
+ const cycle = dependencycycle(nodes) orelse return;
237
+ var text = v.List(u8).init(v.arena());
238
+ text.appendSlice("requirements cycle: ") catch @panic("oom");
239
+ for (v.items(cycle), 0..) |x, i| {
240
+ if (i > 0) text.appendSlice(" -> ") catch @panic("oom");
241
+ text.appendSlice(v.asStr(x)) catch @panic("oom");
242
+ }
243
+ return t.fail("plugin_dependency_cycle", text.items, t.details1("cycle", cycle));
244
+ }
@@ -0,0 +1,201 @@
1
+ // VENDORED: @voxgig/plugin sdk-20260908-1556-0 (zig/src/env.zig)
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
+ const std = @import("std");
22
+ const v = @import("value.zig");
23
+ const t = @import("types.zig");
24
+ const ref = @import("ref.zig");
25
+
26
+ const PREFIX = "VOXGIG_PLUGIN_";
27
+
28
+ pub fn encoderef(r: []const u8) []const u8 {
29
+ var out = v.List(u8).init(v.arena());
30
+ for (r) |c| {
31
+ if (c == '$') {
32
+ out.appendSlice("__") catch @panic("oom");
33
+ } else if (c == '.') {
34
+ out.append('_') catch @panic("oom");
35
+ } else if (c >= 'a' and c <= 'z') {
36
+ out.append(c - 'a' + 'A') catch @panic("oom");
37
+ } else {
38
+ out.append(c) catch @panic("oom");
39
+ }
40
+ }
41
+ return out.items;
42
+ }
43
+
44
+ fn lower(s: []const u8) []const u8 {
45
+ const out = v.arena().alloc(u8, s.len) catch @panic("oom");
46
+ for (s, 0..) |c, i| out[i] = if (c >= 'A' and c <= 'Z') c - 'A' + 'a' else c;
47
+ return out;
48
+ }
49
+
50
+ fn checkreserved(r: []const u8, reserved: ?*v.Value) t.Err!void {
51
+ if (!v.isList(reserved) or v.len(reserved) == 0) return;
52
+ const name = ref.refname(r);
53
+ for (v.items(reserved)) |x| {
54
+ if (v.isStr(x) and std.mem.eql(u8, v.asStr(x), name)) {
55
+ return t.fail("plugin_ref_reserved", v.print("ref is reserved by the host: {s}", .{r}), t.details1("ref", v.vstr(r)));
56
+ }
57
+ }
58
+ }
59
+
60
+ /// Values parse as JSON, FALLING BACK TO STRING — so `8080` is a number,
61
+ /// `true` is a boolean, `{"a":1}` is a map, and `hello` is the string it
62
+ /// looks like rather than a parse error.
63
+ fn parsevalue(s: []const u8) *v.Value {
64
+ var err: []const u8 = "";
65
+ return v.parse(s, &err) orelse v.vstr(s);
66
+ }
67
+
68
+ fn trim(s: []const u8) []const u8 {
69
+ return std.mem.trim(u8, s, " \t");
70
+ }
71
+
72
+ fn lessByLenDesc(_: void, a: []const u8, b: []const u8) bool {
73
+ if (a.len != b.len) return a.len > b.len;
74
+ return std.mem.order(u8, a, b) == .lt;
75
+ }
76
+
77
+ pub fn applyenv(input: ?*v.Value) t.Err!*v.Value {
78
+ var env = v.get(input, "env");
79
+ if (!v.isMap(env)) env = v.vmap();
80
+ const refsin = v.get(input, "refs");
81
+ const reserved = v.get(input, "reserved");
82
+
83
+ const out = v.vmap();
84
+ const options = v.vmap();
85
+ const active = v.vlist();
86
+ const inactive = v.vlist();
87
+ v.set(out, "options", options);
88
+ v.set(out, "active", active);
89
+ v.set(out, "inactive", inactive);
90
+
91
+ // Encode every ref the host holds, and refuse a key that two of them
92
+ // claim. Done UP FRONT so the collision is reported even when no
93
+ // environment variable exercises it — a latent ambiguity is still an
94
+ // ambiguity, and finding it at deploy time is the failure this
95
+ // exists to prevent.
96
+ const byencoded = v.vmap();
97
+ if (v.isList(refsin)) {
98
+ for (v.items(refsin)) |rv| {
99
+ const r = try ref.canonref(rv);
100
+ const e = encoderef(r);
101
+ var list = v.get(byencoded, e);
102
+ if (v.isNull(list)) {
103
+ list = v.vlist();
104
+ v.set(byencoded, e, list);
105
+ }
106
+ v.push(list, v.vstr(r));
107
+ }
108
+ }
109
+
110
+ const encs = v.sortedKeys(byencoded);
111
+ for (encs) |e| {
112
+ const claims = v.get(byencoded, e);
113
+ if (v.len(claims) > 1) {
114
+ const a = v.asStr(v.at(claims, 0));
115
+ const b = v.asStr(v.at(claims, 1));
116
+ const lo = if (std.mem.order(u8, a, b) != .gt) a else b;
117
+ const hi = if (std.mem.order(u8, a, b) != .gt) b else a;
118
+ const pair = v.vlist();
119
+ v.push(pair, v.vstr(lo));
120
+ v.push(pair, v.vstr(hi));
121
+ const d = v.vmap();
122
+ v.set(d, "encoded", v.vstr(e));
123
+ v.set(d, "refs", pair);
124
+ return t.fail("plugin_env_ambiguous", v.print("refs collide in the environment encoding as {s}: {s}, {s}", .{ e, lo, hi }), d);
125
+ }
126
+ }
127
+
128
+ // LONGEST encoded ref first, so `retry$fast` wins over `retry` on
129
+ // `RETRY__FAST_MIN`. Shortest-first would read the tag as a path.
130
+ const order = v.arena().alloc([]const u8, encs.len) catch @panic("oom");
131
+ @memcpy(order, encs);
132
+ std.mem.sort([]const u8, order, {}, lessByLenDesc);
133
+
134
+ for (v.sortedKeys(env)) |key| {
135
+ if (key.len < PREFIX.len or !std.mem.eql(u8, key[0..PREFIX.len], PREFIX)) continue;
136
+ const rest = key[PREFIX.len..];
137
+ const raw = v.get(env, key);
138
+ const val = if (v.isStr(raw)) v.asStr(raw) else "";
139
+
140
+ if (std.mem.eql(u8, rest, "PROFILE")) {
141
+ v.set(out, "profile", v.vstr(val));
142
+ continue;
143
+ }
144
+
145
+ if (std.mem.eql(u8, rest, "ACTIVE") or std.mem.eql(u8, rest, "INACTIVE")) {
146
+ const isactive = std.mem.eql(u8, rest, "ACTIVE");
147
+ var it = std.mem.splitScalar(u8, val, ',');
148
+ while (it.next()) |piece| {
149
+ const p = trim(piece);
150
+ if (p.len == 0) continue;
151
+ const c = try ref.canonrefs(p);
152
+ // The reservation covers EVERY input layer (§9.1).
153
+ // VOXGIG_PLUGIN_INACTIVE=station is easier to set than
154
+ // editing a config file, and INACTIVE has the final word
155
+ // — so guarding documents alone would leave the one
156
+ // lever this mechanism exists to deny wide open.
157
+ try checkreserved(c, reserved);
158
+ v.push(if (isactive) active else inactive, v.vstr(c));
159
+ }
160
+ continue;
161
+ }
162
+
163
+ var enc: ?[]const u8 = null;
164
+ for (order) |cand| {
165
+ if (std.mem.eql(u8, rest, cand) or
166
+ (rest.len > cand.len and std.mem.eql(u8, rest[0..cand.len], cand) and rest[cand.len] == '_'))
167
+ {
168
+ enc = cand;
169
+ break;
170
+ }
171
+ }
172
+ const e = enc orelse continue; // not for any ref this host holds
173
+
174
+ const r = v.asStr(v.at(v.get(byencoded, e), 0));
175
+ try checkreserved(r, reserved);
176
+
177
+ if (std.mem.eql(u8, rest, e)) continue; // a ref with no path sets nothing
178
+
179
+ const pathtext = rest[e.len + 1 ..];
180
+ var node = v.get(options, r);
181
+ if (v.isNull(node)) {
182
+ node = v.vmap();
183
+ v.set(options, r, node);
184
+ }
185
+
186
+ var segs = std.mem.splitScalar(u8, pathtext, '_');
187
+ var seg = segs.next().?;
188
+ while (segs.peek() != null) : (seg = segs.next().?) {
189
+ const piece = lower(seg);
190
+ var next = v.get(node, piece);
191
+ if (!v.isMap(next)) {
192
+ next = v.vmap();
193
+ v.set(node, piece, next);
194
+ }
195
+ node = next;
196
+ }
197
+ v.set(node, lower(seg), parsevalue(val));
198
+ }
199
+
200
+ return out;
201
+ }
@@ -0,0 +1,83 @@
1
+ // VENDORED: @voxgig/plugin sdk-20260908-1556-0 (zig/src/export.zig)
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
+ const std = @import("std");
14
+ const v = @import("value.zig");
15
+ const t = @import("types.zig");
16
+ const ref = @import("ref.zig");
17
+
18
+ fn lessStr(_: void, a: []const u8, b: []const u8) bool {
19
+ return std.mem.order(u8, a, b) == .lt;
20
+ }
21
+
22
+ /// Answers null for "no such export", which is not an error —
23
+ /// `export/missing` pins that, and is why the answer is an optional
24
+ /// rather than a null Value.
25
+ pub fn resolveexport(spec: ?*v.Value, exported: ?*v.Value) t.Err!?*v.Value {
26
+ const s = if (v.isStr(spec)) v.asStr(spec) else "";
27
+ const cut = std.mem.indexOfScalar(u8, s, '/') orelse
28
+ return t.fail("plugin_export_ambiguous", v.print("export spec needs a key: {s}", .{s}), t.details1("spec", v.vstr(s)));
29
+ const head = s[0..cut];
30
+ const key = s[cut + 1 ..];
31
+
32
+ // A fully qualified ref: exactly one answer or none.
33
+ //
34
+ // VALIDATING, not tolerant. The canonical calls `canonref(head)`,
35
+ // which RAISES — so `retry$bad!/client` is `plugin_bad_tag` and
36
+ // `2fa/client` is `plugin_bad_name`. Reading it with `tryref`
37
+ // turned a configuration typo into an ordinary missing export,
38
+ // which is the error the caller most needs to see, silently
39
+ // swallowed.
40
+ const want = try ref.canonrefs(head);
41
+ for (v.items(exported)) |e| {
42
+ if (std.mem.eql(u8, v.asStr(v.get(e, "ref")), want) and
43
+ std.mem.eql(u8, v.asStr(v.get(e, "key")), key))
44
+ {
45
+ return v.get(e, "value");
46
+ }
47
+ }
48
+
49
+ // An alias: the NAME, not a ref. Look at every instance of it.
50
+ var byname = v.List(*v.Value).init(v.arena());
51
+ for (v.items(exported)) |e| {
52
+ const eref = v.asStr(v.get(e, "ref"));
53
+ if (std.mem.eql(u8, ref.refname(eref), head) and
54
+ std.mem.eql(u8, v.asStr(v.get(e, "key")), key))
55
+ {
56
+ byname.append(e) catch @panic("oom");
57
+ }
58
+ }
59
+ if (byname.items.len == 0) return null;
60
+
61
+ // The untagged instance wins outright when there is one.
62
+ for (byname.items) |e| {
63
+ if (std.mem.indexOfScalar(u8, v.asStr(v.get(e, "ref")), '$') == null) return v.get(e, "value");
64
+ }
65
+
66
+ if (byname.items.len == 1) return v.get(byname.items[0], "value");
67
+
68
+ const refs = v.arena().alloc([]const u8, byname.items.len) catch @panic("oom");
69
+ for (byname.items, 0..) |e, i| refs[i] = v.asStr(v.get(e, "ref"));
70
+ std.mem.sort([]const u8, refs, {}, lessStr);
71
+
72
+ const list = v.vlist();
73
+ var names = v.List(u8).init(v.arena());
74
+ for (refs, 0..) |r, i| {
75
+ if (i > 0) names.appendSlice(", ") catch @panic("oom");
76
+ names.appendSlice(r) catch @panic("oom");
77
+ v.push(list, v.vstr(r));
78
+ }
79
+ const d = v.vmap();
80
+ v.set(d, "spec", v.vstr(s));
81
+ v.set(d, "refs", list);
82
+ return t.fail("plugin_export_ambiguous", v.print("alias {s} matches {d} instances: {s}", .{ s, byname.items.len, names.items }), d);
83
+ }