@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,170 @@
1
+ // VENDORED: @voxgig/plugin sdk-20260908-1556-0 (c/src/ref.c)
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
+ /* Identity: name+tag (§4). */
5
+
6
+ #include <stdio.h>
7
+ #include <string.h>
8
+
9
+ #include "ref.h"
10
+
11
+ #define MAX_REF 1024
12
+
13
+ static bool isnamehead(char c) {
14
+ return ('a' <= c && 'z' >= c) || ('A' <= c && 'Z' >= c) || '@' == c;
15
+ }
16
+
17
+ static bool isnamebody(char c) {
18
+ return ('a' <= c && 'z' >= c) || ('A' <= c && 'Z' >= c) ||
19
+ ('0' <= c && '9' >= c) ||
20
+ '.' == c || '~' == c || '_' == c || '-' == c || '/' == c;
21
+ }
22
+
23
+ static bool istagchar(char c) {
24
+ return ('a' <= c && 'z' >= c) || ('A' <= c && 'Z' >= c) ||
25
+ ('0' <= c && '9' >= c) ||
26
+ '.' == c || '~' == c || '_' == c || '-' == c;
27
+ }
28
+
29
+ static bool checkname_s(const char *name) {
30
+ if (NULL == name) return false;
31
+ size_t n = strlen(name);
32
+ if (0 == n || MAX_REF < n) return false;
33
+ if (!isnamehead(name[0])) return false;
34
+ for (size_t i = 1; i < n; i++) {
35
+ if (!isnamebody(name[i])) return false;
36
+ }
37
+ return true;
38
+ }
39
+
40
+ static bool checktag_s(const char *tag) {
41
+ if (NULL == tag) return false;
42
+ size_t n = strlen(tag);
43
+ /* The empty tag is an ordinary tag (§4 rule 2). The single-instance
44
+ * case writes no tag and never learns tags exist. */
45
+ if (0 == n) return true;
46
+ if (MAX_REF < n) return false;
47
+ for (size_t i = 0; i < n; i++) {
48
+ if (!istagchar(tag[i])) return false;
49
+ }
50
+ return true;
51
+ }
52
+
53
+ bool checkname(Value *name) {
54
+ /* A non-string is not a name. Every port has to answer this the same
55
+ * way, and `ref/name` pins it for numbers, nulls and maps alike. */
56
+ if (!visstr(name)) return false;
57
+ return checkname_s(vasstr(name));
58
+ }
59
+
60
+ bool checktag(Value *tag) {
61
+ if (!visstr(tag)) return false;
62
+ return checktag_s(vasstr(tag));
63
+ }
64
+
65
+ Value *parseref(Value *str) {
66
+ if (!visstr(str)) {
67
+ fail("plugin_bad_name", "ref must be a string", NULL);
68
+ }
69
+ const char *s = vasstr(str);
70
+
71
+ /* Split on the FIRST `$`. Nothing in the grammar decides this — `$` is
72
+ * in neither character class — so the corpus is the arbiter (§4 rule
73
+ * 5), and it picks the split that blames the part actually at fault:
74
+ * `a$b$c` is a good name with a bad tag, not the reverse. */
75
+ const char *cut = strchr(s, '$');
76
+ const char *name;
77
+ const char *tag;
78
+ if (NULL == cut) {
79
+ name = arena_strdup(s);
80
+ tag = "";
81
+ }
82
+ else {
83
+ name = arena_strndup(s, (size_t)(cut - s));
84
+ tag = arena_strdup(cut + 1);
85
+ }
86
+
87
+ if (!checkname_s(name)) {
88
+ char *text = (char *)arena_alloc(strlen(name) + 32);
89
+ snprintf(text, strlen(name) + 32, "invalid plugin name: %s", name);
90
+ fail("plugin_bad_name", text, details1("name", vstr(name)));
91
+ }
92
+ if (!checktag_s(tag)) {
93
+ char *text = (char *)arena_alloc(strlen(tag) + 32);
94
+ snprintf(text, strlen(tag) + 32, "invalid plugin tag: %s", tag);
95
+ fail("plugin_bad_tag", text,
96
+ details2("name", vstr(name), "tag", vstr(tag)));
97
+ }
98
+
99
+ Value *out = vmap();
100
+ vset(out, "name", vstr(name));
101
+ vset(out, "tag", vstr(tag));
102
+ return out;
103
+ }
104
+
105
+ const char *formatref(Value *name, Value *tag) {
106
+ const char *t = visnull(tag) ? "" : (visstr(tag) ? vasstr(tag) : NULL);
107
+
108
+ if (!checkname(name)) {
109
+ const char *n = visstr(name) ? vasstr(name) : "";
110
+ size_t sz = strlen(n) + 32;
111
+ char *text = (char *)arena_alloc(sz);
112
+ snprintf(text, sz, "invalid plugin name: %s", n);
113
+ fail("plugin_bad_name", text,
114
+ details1("name", visnull(name) ? vnull() : name));
115
+ }
116
+ if (NULL == t || !checktag_s(t)) {
117
+ const char *shown = NULL == t ? "" : t;
118
+ size_t sz = strlen(shown) + 32;
119
+ char *text = (char *)arena_alloc(sz);
120
+ snprintf(text, sz, "invalid plugin tag: %s", shown);
121
+ fail("plugin_bad_tag", text,
122
+ details2("name", name, "tag", visnull(tag) ? vstr("") : tag));
123
+ }
124
+
125
+ if ('\0' == t[0]) return arena_strdup(vasstr(name));
126
+
127
+ const char *n = vasstr(name);
128
+ size_t sz = strlen(n) + strlen(t) + 2;
129
+ char *out = (char *)arena_alloc(sz);
130
+ snprintf(out, sz, "%s$%s", n, t);
131
+ return out;
132
+ }
133
+
134
+ const char *canonref(Value *str) {
135
+ Value *r = parseref(str);
136
+ return formatref(vget(r, "name"), vget(r, "tag"));
137
+ }
138
+
139
+ const char *tryref(const char *str) {
140
+ if (NULL == str) return NULL;
141
+ const char *cut = strchr(str, '$');
142
+ const char *name;
143
+ const char *tag;
144
+ if (NULL == cut) {
145
+ name = str;
146
+ tag = "";
147
+ }
148
+ else {
149
+ name = arena_strndup(str, (size_t)(cut - str));
150
+ tag = cut + 1;
151
+ }
152
+ if (!checkname_s(name) || !checktag_s(tag)) return NULL;
153
+ if ('\0' == tag[0]) return arena_strdup(name);
154
+ size_t sz = strlen(name) + strlen(tag) + 2;
155
+ char *out = (char *)arena_alloc(sz);
156
+ snprintf(out, sz, "%s$%s", name, tag);
157
+ return out;
158
+ }
159
+
160
+ const char *canon(const char *str) {
161
+ const char *out = tryref(str);
162
+ return NULL == out ? str : out;
163
+ }
164
+
165
+ const char *refname(const char *str) {
166
+ if (NULL == str) return str;
167
+ const char *cut = strchr(str, '$');
168
+ const char *name = NULL == cut ? str : arena_strndup(str, (size_t)(cut - str));
169
+ return checkname_s(name) ? name : str;
170
+ }
@@ -0,0 +1,52 @@
1
+ // VENDORED: @voxgig/plugin sdk-20260908-1556-0 (c/src/ref.h)
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
+ /* Identity: name+tag, written `name$tag` (§4).
5
+ *
6
+ * The four pure functions, and the whole of what `ref` pins. They are
7
+ * the first thing a new port implements and the first corpus section it
8
+ * passes. */
9
+
10
+ #ifndef VOXGIG_PLUGIN_REF_H
11
+ #define VOXGIG_PLUGIN_REF_H
12
+
13
+ #include <stdbool.h>
14
+
15
+ #include "types.h"
16
+ #include "value.h"
17
+
18
+ /* §4: `^[a-zA-Z@][a-zA-Z0-9.~_\-/]*$`, max 1024. */
19
+ bool checkname(Value *name);
20
+ /* §4: `^[a-zA-Z0-9.~_-]+$`, max 1024, or empty.
21
+ *
22
+ * The asymmetry with a name is deliberate: a tag MAY start with a digit
23
+ * because auto-tagging assigns integer tags (`stripe$1`), and a tag
24
+ * admits neither `@` nor `/` because a name is a package specifier and
25
+ * a tag is not. */
26
+ bool checktag(Value *tag);
27
+
28
+ /* `name$tag` -> {name, tag}. Canonicalizing: `stripe$` and `stripe`
29
+ * both give tag ''. Raises plugin_bad_name / plugin_bad_tag. */
30
+ Value *parseref(Value *str);
31
+ /* {name, tag} -> `name$tag`. An empty tag NEVER writes the separator,
32
+ * which is the half of canonicalization formatref owns: parse tolerates
33
+ * `stripe$`, format never produces it, so a round trip is idempotent. */
34
+ const char *formatref(Value *name, Value *tag);
35
+ /* The canonical spelling. §4 rule 5: canonicalize before comparison. */
36
+ const char *canonref(Value *str);
37
+
38
+ /* The canonical ref this string denotes, or NULL if it denotes none —
39
+ * the TOLERANT half of `canonref`, and the one a requirement name needs
40
+ * (§11.1). Capability names are free-form, so `2fa` is a good one and
41
+ * no ref could be called that; `canonref` RAISES on those, and asking it
42
+ * "is this a ref?" made a legal document kill the host. */
43
+ const char *tryref(const char *str);
44
+
45
+ /* `canonref` for internal callers that want the input back unchanged
46
+ * when it is not well formed. NEVER use where a bad ref must be
47
+ * reported — the corpus pins plugin_bad_name at every public entry. */
48
+ const char *canon(const char *str);
49
+ /* The name half, for internal callers that only compare. */
50
+ const char *refname(const char *str);
51
+
52
+ #endif
@@ -0,0 +1,98 @@
1
+ // VENDORED: @voxgig/plugin sdk-20260908-1556-0 (c/src/resolve.c)
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
+ /* Dynamic resolution (§10.2) — name to candidate module ids.
5
+ *
6
+ * PURE. It returns the ids a host WOULD try, in order; it does not load
7
+ * anything. That separation is what lets the corpus pin resolution in
8
+ * every language including those with no dynamic loading at all — c
9
+ * among them — and it is why §15.4 puts real module loading in per-port
10
+ * integration tests rather than here. */
11
+
12
+ #include <stdio.h>
13
+ #include <string.h>
14
+
15
+ #include "resolve.h"
16
+
17
+ static void pushuniq(Value *out, const char *id) {
18
+ for (size_t i = 0; i < vlen(out); i++) {
19
+ if (0 == strcmp(vasstr(vat(out, i)), id)) return;
20
+ }
21
+ vpush(out, vstr(id));
22
+ }
23
+
24
+ Value *resolvecandidates(Value *name, Value *sources) {
25
+ Value *out = vlist();
26
+ const char *n = visstr(name) ? vasstr(name) : "";
27
+
28
+ /* A SCOPED NAME RESOLVES VERBATIM ONLY (§10.2). `@acme/thing` is
29
+ * already a package id; prefixing it produces
30
+ * `@voxgig/plugin-@acme/thing`, which is not a thing that can exist. */
31
+ if ('@' == n[0]) {
32
+ vpush(out, vstr(n));
33
+ return out;
34
+ }
35
+
36
+ static const char *DEFAULT_PREFIX[] = {
37
+ "@voxgig/plugin-", "voxgig-plugin-", "plugin-", "", NULL
38
+ };
39
+
40
+ bool given = vislist(sources) && 0 < vlen(sources);
41
+ if (!given) {
42
+ for (int i = 0; NULL != DEFAULT_PREFIX[i]; i++) {
43
+ size_t sz = strlen(DEFAULT_PREFIX[i]) + strlen(n) + 1;
44
+ char *id = (char *)arena_alloc(sz);
45
+ snprintf(id, sz, "%s%s", DEFAULT_PREFIX[i], n);
46
+ pushuniq(out, id);
47
+ }
48
+ return out;
49
+ }
50
+
51
+ for (size_t si = 0; si < vlen(sources); si++) {
52
+ Value *src = vat(sources, si);
53
+ const char *kind = visstr(vget(src, "kind")) ? vasstr(vget(src, "kind")) : "";
54
+
55
+ if (0 == strcmp(kind, "module")) {
56
+ Value *prefix = vget(src, "prefix");
57
+ if (vislist(prefix) && 0 < vlen(prefix)) {
58
+ for (size_t pi = 0; pi < vlen(prefix); pi++) {
59
+ const char *p = visstr(vat(prefix, pi)) ? vasstr(vat(prefix, pi)) : "";
60
+ size_t sz = strlen(p) + strlen(n) + 1;
61
+ char *id = (char *)arena_alloc(sz);
62
+ snprintf(id, sz, "%s%s", p, n);
63
+ pushuniq(out, id);
64
+ }
65
+ }
66
+ else {
67
+ pushuniq(out, n);
68
+ }
69
+ }
70
+ else if (0 == strcmp(kind, "path")) {
71
+ const char *dir = visstr(vget(src, "dir")) ? vasstr(vget(src, "dir")) : "";
72
+ /* Trailing slashes are trimmed, so `lib/` and `lib` give one id
73
+ * rather than two spellings of it. */
74
+ size_t dl = strlen(dir);
75
+ while (0 < dl && '/' == dir[dl - 1]) dl--;
76
+ size_t sz = dl + strlen(n) + 2;
77
+ char *id = (char *)arena_alloc(sz);
78
+ snprintf(id, sz, "%.*s/%s", (int)dl, dir, n);
79
+ pushuniq(out, id);
80
+ }
81
+ }
82
+
83
+ return out;
84
+ }
85
+
86
+ /* A MODULE PATH IS NOT A NAME (§10.2). The ref grammar starts a name
87
+ * with a letter or `@`, so `./local/thing` is not a ref and never
88
+ * reaches candidate generation — seneca allows a path where a plugin
89
+ * name goes, and this design deliberately does not, because a ref is an
90
+ * ADDRESS WITHIN A HOST and a path is a LOCATION ON A DISK.
91
+ *
92
+ * Loading from an explicit location bypasses candidate generation
93
+ * entirely: `from` is passed to the resolver verbatim. */
94
+ Value *resolvefrom(Value *from) {
95
+ Value *out = vlist();
96
+ vpush(out, visnull(from) ? vnull() : from);
97
+ return out;
98
+ }
@@ -0,0 +1,18 @@
1
+ // VENDORED: @voxgig/plugin sdk-20260908-1556-0 (c/src/resolve.h)
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
+ /* Dynamic resolution (§10.2) — name to candidate module ids. Pure: it
5
+ * returns the ids a host WOULD try, in order, and loads nothing. That
6
+ * is what lets the corpus pin resolution in a language with no dynamic
7
+ * loading at all. */
8
+
9
+ #ifndef VOXGIG_PLUGIN_RESOLVE_H
10
+ #define VOXGIG_PLUGIN_RESOLVE_H
11
+
12
+ #include "types.h"
13
+ #include "value.h"
14
+
15
+ Value *resolvecandidates(Value *name, Value *sources);
16
+ Value *resolvefrom(Value *from);
17
+
18
+ #endif
@@ -0,0 +1,150 @@
1
+ // VENDORED: @voxgig/plugin sdk-20260908-1556-0 (c/src/types.c)
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
+ /* Errors and the raise mechanism. See types.h for why longjmp. */
5
+
6
+ #include <stdio.h>
7
+ #include <stdlib.h>
8
+ #include <string.h>
9
+
10
+ #include "types.h"
11
+
12
+ static CatchFrame *current = NULL;
13
+
14
+ /* The error the most recent raise parked here. FILE SCOPE ON PURPOSE —
15
+ * see types.h for why it cannot live in the frame. */
16
+ static PluginError *pending = NULL;
17
+
18
+ int plugin_try(CatchFrame *f) {
19
+ f->prev = current;
20
+ current = f;
21
+ pending = NULL;
22
+ return 0;
23
+ }
24
+
25
+ PluginError *plugin_caught(void) {
26
+ return pending;
27
+ }
28
+
29
+ void plugin_end(CatchFrame *f) {
30
+ current = f->prev;
31
+ }
32
+
33
+ /* §12's detail fields, IN THIS FIXED ORDER. The order is part of the
34
+ * contract: an earlier draft named six fields while other sections
35
+ * promised diagnostics with nowhere to go, which would have left each
36
+ * port inventing its own order and breaking message parity. */
37
+ static const char *DETAIL_ORDER[] = {
38
+ "host", "ref", "name", "tag", "point", "key", "capability",
39
+ "range", "version", "match", "candidates", "cycle", "holders",
40
+ "refs", "path", "cause", NULL
41
+ };
42
+
43
+ const char *format_error(const char *code, const char *text, Value *details) {
44
+ /* Values render as COMPACT JSON, so a value containing a space or a
45
+ * bracket cannot break the parse and a list renders as an array. The
46
+ * bracket is absent entirely when no field applies. */
47
+ size_t cap = 256;
48
+ if (NULL != text) cap += strlen(text);
49
+ char *tail = (char *)arena_alloc(1);
50
+ tail[0] = '\0';
51
+ size_t taillen = 0;
52
+ size_t tailcap = 1;
53
+
54
+ for (int i = 0; NULL != DETAIL_ORDER[i]; i++) {
55
+ const char *k = DETAIL_ORDER[i];
56
+ if (!vhas(details, k)) continue;
57
+ const char *rendered = vjson(vget(details, k));
58
+ size_t need = taillen + strlen(k) + strlen(rendered) + 4;
59
+ if (need + 1 > tailcap) {
60
+ size_t newcap = need * 2 + 16;
61
+ char *grown = (char *)arena_alloc(newcap);
62
+ memcpy(grown, tail, taillen + 1);
63
+ tail = grown;
64
+ tailcap = newcap;
65
+ }
66
+ if (0 < taillen) {
67
+ tail[taillen++] = ' ';
68
+ tail[taillen] = '\0';
69
+ }
70
+ int n = snprintf(tail + taillen, tailcap - taillen, "%s=%s", k, rendered);
71
+ taillen += (size_t)n;
72
+ }
73
+
74
+ size_t total = strlen("plugin/") + strlen(code) + 2 +
75
+ (NULL == text ? 0 : strlen(text)) + taillen + 8;
76
+ char *out = (char *)arena_alloc(total);
77
+ if (0 < taillen) {
78
+ snprintf(out, total, "plugin/%s: %s [%s]", code,
79
+ NULL == text ? "" : text, tail);
80
+ }
81
+ else {
82
+ snprintf(out, total, "plugin/%s: %s", code, NULL == text ? "" : text);
83
+ }
84
+ (void)cap;
85
+ return out;
86
+ }
87
+
88
+ void fail(const char *code, const char *text, Value *details) {
89
+ PluginError *e = (PluginError *)arena_alloc(sizeof(PluginError));
90
+ e->code = arena_strdup(code);
91
+ e->text = arena_strdup(NULL == text ? "" : text);
92
+ e->details = NULL == details ? vmap() : details;
93
+ e->message = format_error(code, text, e->details);
94
+
95
+ if (NULL == current) {
96
+ /* No catch frame: the caller could not have checked, so saying so
97
+ * loudly beats returning into code that will use a bad value. */
98
+ fprintf(stderr, "plugin: uncaught %s\n", e->message);
99
+ exit(70);
100
+ }
101
+
102
+ CatchFrame *f = current;
103
+ current = f->prev;
104
+ pending = e;
105
+ longjmp(f->jmp, 1);
106
+ }
107
+
108
+ Value *details1(const char *k, Value *v) {
109
+ Value *d = vmap();
110
+ vset(d, k, v);
111
+ return d;
112
+ }
113
+
114
+ Value *details2(const char *k1, Value *v1, const char *k2, Value *v2) {
115
+ Value *d = vmap();
116
+ vset(d, k1, v1);
117
+ vset(d, k2, v2);
118
+ return d;
119
+ }
120
+
121
+ Value *plugin_merge(Value *a, Value *b) {
122
+ if (!vismap(a) || !vismap(b)) return NULL == b ? a : b;
123
+ Value *out = vmap();
124
+ const char **keys;
125
+ size_t n = vkeys(a, &keys);
126
+ for (size_t i = 0; i < n; i++) vset(out, keys[i], vget(a, keys[i]));
127
+ n = vkeys(b, &keys);
128
+ for (size_t i = 0; i < n; i++) {
129
+ Value *bv = vget(b, keys[i]);
130
+ Value *av = vget(out, keys[i]);
131
+ if (vismap(av) && vismap(bv)) vset(out, keys[i], plugin_merge(av, bv));
132
+ else vset(out, keys[i], bv);
133
+ }
134
+ return out;
135
+ }
136
+
137
+ bool matchvalue(Value *want, Value *have) {
138
+ if (visnull(want)) return true;
139
+ if (vismap(want)) {
140
+ if (!vismap(have)) return false;
141
+ const char **keys;
142
+ size_t n = vkeys(want, &keys);
143
+ for (size_t i = 0; i < n; i++) {
144
+ if (!vhas(have, keys[i])) return false;
145
+ if (!matchvalue(vget(want, keys[i]), vget(have, keys[i]))) return false;
146
+ }
147
+ return true;
148
+ }
149
+ return vsame(want, have);
150
+ }
@@ -0,0 +1,104 @@
1
+ // VENDORED: @voxgig/plugin sdk-20260908-1556-0 (c/src/types.h)
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
+ /* Errors, and the raise mechanism (§12).
5
+ *
6
+ * SETJMP/LONGJMP, and the reason is fidelity rather than convenience.
7
+ * The canonical RAISES: a failing call abandons the rest of the
8
+ * function, and the corpus is full of entries that assert exactly what
9
+ * survived a raise mid-sequence (`resource/unwind`, `lifecycle/fail`).
10
+ * Threading an error return through every function would let a missed
11
+ * check silently continue past a failure, which is the one thing the
12
+ * corpus cannot see and the one thing it is trying to pin. `longjmp`
13
+ * abandons the frame the way a `throw` does.
14
+ *
15
+ * THIS IS SAFE HERE BECAUSE OF THE ARENA. `longjmp` past a frame leaks
16
+ * whatever that frame owned; nothing here owns anything, so there is
17
+ * nothing to leak. The two decisions hold each other up.
18
+ *
19
+ * Ports compare by CODE and never by message: wording is a port's own
20
+ * business. The FORMAT is pinned, because a parseable message is what
21
+ * makes a log searchable across twenty languages.
22
+ */
23
+
24
+ #ifndef VOXGIG_PLUGIN_TYPES_H
25
+ #define VOXGIG_PLUGIN_TYPES_H
26
+
27
+ #include <setjmp.h>
28
+ #include <stdbool.h>
29
+
30
+ #include "value.h"
31
+
32
+ typedef struct {
33
+ const char *code;
34
+ const char *text;
35
+ Value *details;
36
+ const char *message;
37
+ } PluginError;
38
+
39
+ /* The active catch frame. `plugin_try` pushes one, `plugin_end_try`
40
+ * pops it. A raise with no frame installed aborts loudly rather than
41
+ * returning into a caller that cannot have checked. */
42
+ typedef struct CatchFrame {
43
+ jmp_buf jmp;
44
+ struct CatchFrame *prev;
45
+ } CatchFrame;
46
+
47
+ /* THE ERROR IS NOT IN THE FRAME, and that is the whole point of this
48
+ * declaration. The obvious design parks it in a `PluginError *err`
49
+ * member, but the frame is an automatic local of the function that
50
+ * called `setjmp`, and C11 7.13.2.1p3 says an automatic local of that
51
+ * function which is not `volatile` and was CHANGED between the `setjmp`
52
+ * and the `longjmp` has an INDETERMINATE value once `setjmp` returns
53
+ * the second time. `fail` changes it, through a pointer, from another
54
+ * translation unit. Taking the frame's address makes it work on every
55
+ * compiler anyone will use, and it is still undefined: the standard
56
+ * says nothing about the address being taken, only about the
57
+ * modification, so a future optimiser is entitled to cache the member
58
+ * in a register across the jump and hand the handler a stale pointer.
59
+ *
60
+ * A file-scope pending error has no such rule attached — it is static
61
+ * storage, not automatic — so `fail` parks the error there and the
62
+ * handler reads it back with `plugin_caught`. The `zig` port arrived at
63
+ * the same shape from the opposite direction: its error values carry no
64
+ * payload at all, so a module-global pending is the only place a
65
+ * `PluginError` can live. `plugin_try` clears it on push, so a handler
66
+ * can never read an error left over from an earlier frame.
67
+ *
68
+ * Use as:
69
+ *
70
+ * CatchFrame f;
71
+ * if (0 == PLUGIN_TRY(&f)) { ... body ... PLUGIN_END(&f); }
72
+ * else { PluginError *e = plugin_caught(); ... }
73
+ *
74
+ * The body MUST reach PLUGIN_END on every non-raising path, and the
75
+ * handler MUST read `plugin_caught` before installing another frame.
76
+ */
77
+ int plugin_try(CatchFrame *f);
78
+ void plugin_end(CatchFrame *f);
79
+ PluginError *plugin_caught(void);
80
+
81
+ #define PLUGIN_TRY(f) (plugin_try(f), setjmp((f)->jmp))
82
+ #define PLUGIN_END(f) plugin_end(f)
83
+
84
+ /* Raise. Never returns. */
85
+ void fail(const char *code, const char *text, Value *details);
86
+
87
+ /* §12's detail fields render in a FIXED ORDER — part of the contract,
88
+ * not a formatting preference, because otherwise each port invents its
89
+ * own and message parity is gone. */
90
+ const char *format_error(const char *code, const char *text, Value *details);
91
+
92
+ /* Convenience: a one-key details map. */
93
+ Value *details1(const char *k, Value *v);
94
+ Value *details2(const char *k1, Value *v1, const char *k2, Value *v2);
95
+
96
+ /* Deep merge, struct's semantics: maps merge, everything else replaces.
97
+ * §16 permits voxgig/struct for this and C has no port of it. */
98
+ Value *plugin_merge(Value *a, Value *b);
99
+
100
+ /* §11.1's partial match: every leaf in `want` must be present and equal
101
+ * in `have`; keys not mentioned are not checked. */
102
+ bool matchvalue(Value *want, Value *have);
103
+
104
+ #endif