@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,79 @@
1
+ // VENDORED: @voxgig/plugin sdk-20260908-1556-0 (cpp/src/point.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
+ /* Extension points (§6). Three kinds, chosen because they are what the
5
+ * two existing systems actually needed, and no more.
6
+ *
7
+ * A PLUGIN NEVER MUTATES THE HOST. That inversion is what makes
8
+ * deactivation possible: sdkgen's `utility.fetcher = wrapped` is not
9
+ * undoable, but "this instance holds slot 3 of the request chain" is
10
+ * undoable in O(1). OSGi named it the whiteboard pattern in 2004, in a
11
+ * paper called *Listeners Considered Harmful*, and for exactly this
12
+ * reason.
13
+ *
14
+ * A CLOSURE IS A CLOSURE, which is the whole difference from the `c`
15
+ * port. `std::function` captures, so a chain binding receives its
16
+ * `next` as a callable the composition built — the same shape the
17
+ * canonical writes — instead of c's explicit `Chain *` walked by index.
18
+ * Nothing else about the composition changes. */
19
+
20
+ #ifndef VOXGIG_PLUGIN_POINT_HPP
21
+ #define VOXGIG_PLUGIN_POINT_HPP
22
+
23
+ #include <functional>
24
+ #include <string>
25
+ #include <vector>
26
+
27
+ #include "types.hpp"
28
+ #include "value.hpp"
29
+
30
+ namespace plugin {
31
+
32
+ /* A hook or provider binding. */
33
+ using Hook = std::function<V(const V& arg)>;
34
+ /* The remaining composition, as seen by one chain binding. A binding
35
+ * may CALL it and must not store it — a plugin that stashes `next` and
36
+ * calls it after deactivation is a bug the host cannot prevent, and
37
+ * saying so is better than pretending otherwise (§6.2). */
38
+ using Next = std::function<V(const V& arg)>;
39
+ using ChainFn = std::function<V(const Next& next, const V& arg)>;
40
+
41
+ struct Bound {
42
+ std::string ref;
43
+ std::string point;
44
+ /* `provider` ranks by HIGHEST band, unlike hook and chain which run
45
+ * lowest first. Kept as declared so the two rules stay visibly
46
+ * different rather than one being derived from the other by a reader
47
+ * who then gets it backwards. */
48
+ double band = 0;
49
+ Hook hook;
50
+ ChainFn chain;
51
+ };
52
+
53
+ /* Fan-out. Return values are ignored except in `bail`.
54
+ *
55
+ * §6.1: "fan-out" is not one answer but four. In a language with
56
+ * asynchrony, "call every binding" hides a decision — start them all
57
+ * and wait, await each in turn, or do not wait — and a design that
58
+ * leaves it unsaid gets four different answers from four ports, in the
59
+ * concurrency behaviour of production code no corpus entry happens to
60
+ * cover. This port is synchronous, so all four modes are sequential
61
+ * here and only the ERROR and RETURN handling distinguishes them.
62
+ *
63
+ * `errors` receives the collected raises for the gathering modes. */
64
+ V pointemit(const std::vector<Bound>& bindings, const std::string& mode,
65
+ const V& arg, V& errors);
66
+
67
+ /* Composition: b1(b2(b3(base))), FIRST BINDING OUTERMOST (§6.2). */
68
+ V pointcall(const std::vector<Bound>& bindings, const Hook& base, const V& arg);
69
+
70
+ /* At most one live implementation (§6.3). The winner is the highest
71
+ * band, ties broken by ref sort, and THE LOSERS ARE VISIBLE rather than
72
+ * silently ignored. Returns the winner's index (or -1) and fills
73
+ * `shadowed` with the losing refs, in ranked order. */
74
+ long pointprovider(const std::vector<Bound>& bindings, bool exclusive,
75
+ V& shadowed);
76
+
77
+ } // namespace plugin
78
+
79
+ #endif
@@ -0,0 +1,136 @@
1
+ // VENDORED: @voxgig/plugin sdk-20260908-1556-0 (cpp/src/ref.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
+ /* Identity: name+tag (§4). */
5
+
6
+ #include "ref.hpp"
7
+
8
+ namespace plugin {
9
+
10
+ static const size_t MAX_REF = 1024;
11
+
12
+ static bool isnamehead(char c) {
13
+ return ('a' <= c && 'z' >= c) || ('A' <= c && 'Z' >= c) || '@' == c;
14
+ }
15
+
16
+ static bool isnamebody(char c) {
17
+ return ('a' <= c && 'z' >= c) || ('A' <= c && 'Z' >= c) ||
18
+ ('0' <= c && '9' >= c) ||
19
+ '.' == c || '~' == c || '_' == c || '-' == c || '/' == c;
20
+ }
21
+
22
+ static bool istagchar(char c) {
23
+ return ('a' <= c && 'z' >= c) || ('A' <= c && 'Z' >= c) ||
24
+ ('0' <= c && '9' >= c) ||
25
+ '.' == c || '~' == c || '_' == c || '-' == c;
26
+ }
27
+
28
+ static bool namely(const std::string& name) {
29
+ if (name.empty() || MAX_REF < name.size()) return false;
30
+ if (!isnamehead(name[0])) return false;
31
+ for (size_t i = 1; i < name.size(); i++) {
32
+ if (!isnamebody(name[i])) return false;
33
+ }
34
+ return true;
35
+ }
36
+
37
+ static bool tagly(const std::string& tag) {
38
+ /* The empty tag is an ordinary tag (§4 rule 2). The single-instance
39
+ * case writes no tag and never learns tags exist. */
40
+ if (tag.empty()) return true;
41
+ if (MAX_REF < tag.size()) return false;
42
+ for (char c : tag) {
43
+ if (!istagchar(c)) return false;
44
+ }
45
+ return true;
46
+ }
47
+
48
+ bool checkname(const V& name) {
49
+ /* A non-string is not a name. Every port has to answer this the same
50
+ * way, and `ref/name` pins it for numbers, nulls and maps alike. */
51
+ if (!isstr(name)) return false;
52
+ return namely(asstr(name));
53
+ }
54
+
55
+ bool checktag(const V& tag) {
56
+ if (!isstr(tag)) return false;
57
+ return tagly(asstr(tag));
58
+ }
59
+
60
+ /* Split on the FIRST `$`. Nothing in the grammar decides this — `$` is
61
+ * in neither character class — so the corpus is the arbiter (§4 rule
62
+ * 5), and it picks the split that blames the part actually at fault:
63
+ * `a$b$c` is a good name with a bad tag, not the reverse. */
64
+ static void split(const std::string& s, std::string& name, std::string& tag) {
65
+ size_t cut = s.find('$');
66
+ if (std::string::npos == cut) { name = s; tag = ""; return; }
67
+ name = s.substr(0, cut);
68
+ tag = s.substr(cut + 1);
69
+ }
70
+
71
+ V parseref(const V& str) {
72
+ if (!isstr(str)) fail("plugin_bad_name", "ref must be a string");
73
+
74
+ std::string name, tag;
75
+ split(asstr(str), name, tag);
76
+
77
+ if (!namely(name)) {
78
+ fail("plugin_bad_name", "invalid plugin name: " + name,
79
+ details1("name", vstr(name)));
80
+ }
81
+ if (!tagly(tag)) {
82
+ fail("plugin_bad_tag", "invalid plugin tag: " + tag,
83
+ details2("name", vstr(name), "tag", vstr(tag)));
84
+ }
85
+
86
+ V out = vmap();
87
+ set(out, "name", vstr(name));
88
+ set(out, "tag", vstr(tag));
89
+ return out;
90
+ }
91
+
92
+ std::string formatref(const V& name, const V& tag) {
93
+ bool tagok = isnull(tag) || isstr(tag);
94
+ std::string t = isstr(tag) ? asstr(tag) : "";
95
+
96
+ if (!checkname(name)) {
97
+ std::string shown = isstr(name) ? asstr(name) : "";
98
+ fail("plugin_bad_name", "invalid plugin name: " + shown,
99
+ details1("name", isnull(name) ? vnull() : name));
100
+ }
101
+ if (!tagok || !tagly(t)) {
102
+ fail("plugin_bad_tag", "invalid plugin tag: " + t,
103
+ details2("name", name, "tag", isnull(tag) ? vstr("") : tag));
104
+ }
105
+
106
+ if (t.empty()) return asstr(name);
107
+ return asstr(name) + "$" + t;
108
+ }
109
+
110
+ std::string canonref(const V& str) {
111
+ V r = parseref(str);
112
+ return formatref(get(r, "name"), get(r, "tag"));
113
+ }
114
+
115
+ std::string canonref(const std::string& str) { return canonref(vstr(str)); }
116
+
117
+ bool tryref(const std::string& str, std::string& out) {
118
+ std::string name, tag;
119
+ split(str, name, tag);
120
+ if (!namely(name) || !tagly(tag)) return false;
121
+ out = tag.empty() ? name : name + "$" + tag;
122
+ return true;
123
+ }
124
+
125
+ std::string canon(const std::string& str) {
126
+ std::string out;
127
+ return tryref(str, out) ? out : str;
128
+ }
129
+
130
+ std::string refname(const std::string& str) {
131
+ size_t cut = str.find('$');
132
+ std::string name = (std::string::npos == cut) ? str : str.substr(0, cut);
133
+ return namely(name) ? name : str;
134
+ }
135
+
136
+ } // namespace plugin
@@ -0,0 +1,60 @@
1
+ // VENDORED: @voxgig/plugin sdk-20260908-1556-0 (cpp/src/ref.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
+ /* 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_HPP
11
+ #define VOXGIG_PLUGIN_REF_HPP
12
+
13
+ #include <string>
14
+
15
+ #include "types.hpp"
16
+ #include "value.hpp"
17
+
18
+ namespace plugin {
19
+
20
+ /* §4: `^[a-zA-Z@][a-zA-Z0-9.~_\-/]*$`, max 1024. */
21
+ bool checkname(const V& name);
22
+ /* §4: `^[a-zA-Z0-9.~_-]+$`, max 1024, or empty.
23
+ *
24
+ * The asymmetry with a name is deliberate: a tag MAY start with a digit
25
+ * because auto-tagging assigns integer tags (`stripe$1`), and a tag
26
+ * admits neither `@` nor `/` because a name is a package specifier and
27
+ * a tag is not. */
28
+ bool checktag(const V& tag);
29
+
30
+ /* `name$tag` -> {name, tag}. Canonicalizing: `stripe$` and `stripe`
31
+ * both give tag ''. Raises plugin_bad_name / plugin_bad_tag. */
32
+ V parseref(const V& str);
33
+ /* {name, tag} -> `name$tag`. An empty tag NEVER writes the separator,
34
+ * which is the half of canonicalization formatref owns: parse tolerates
35
+ * `stripe$`, format never produces it, so a round trip is idempotent. */
36
+ std::string formatref(const V& name, const V& tag);
37
+ /* The canonical spelling. §4 rule 5: canonicalize before comparison. */
38
+ std::string canonref(const V& str);
39
+ std::string canonref(const std::string& str);
40
+
41
+ /* The canonical ref this string denotes, or empty if it denotes none —
42
+ * the TOLERANT half of `canonref`, and the one a requirement name needs
43
+ * (§11.1). Capability names are free-form, so `2fa` is a good one and
44
+ * no ref could be called that; `canonref` RAISES on those, and asking
45
+ * it "is this a ref?" made a legal document kill the host.
46
+ *
47
+ * Answers through the bool return rather than by an empty string, so a
48
+ * caller cannot mistake "not a ref" for "the empty ref". */
49
+ bool tryref(const std::string& str, std::string& out);
50
+
51
+ /* `canonref` for internal callers that want the input back unchanged
52
+ * when it is not well formed. NEVER use where a bad ref must be
53
+ * reported — the corpus pins plugin_bad_name at every public entry. */
54
+ std::string canon(const std::string& str);
55
+ /* The name half, for internal callers that only compare. */
56
+ std::string refname(const std::string& str);
57
+
58
+ } // namespace plugin
59
+
60
+ #endif
@@ -0,0 +1,82 @@
1
+ // VENDORED: @voxgig/plugin sdk-20260908-1556-0 (cpp/src/resolve.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
+ /* Dynamic resolution (§10.2). See resolve.hpp. */
5
+
6
+ #include "resolve.hpp"
7
+
8
+ namespace plugin {
9
+
10
+ static void pushuniq(const V& out, const std::string& id) {
11
+ for (size_t i = 0; i < len(out); i++) {
12
+ if (asstr(at(out, i)) == id) return;
13
+ }
14
+ push(out, vstr(id));
15
+ }
16
+
17
+ V resolvecandidates(const V& name, const V& sources) {
18
+ V out = vlist();
19
+ const std::string n = isstr(name) ? asstr(name) : "";
20
+
21
+ /* A SCOPED NAME RESOLVES VERBATIM ONLY (§10.2). `@acme/thing` is
22
+ * already a package id; prefixing it produces
23
+ * `@voxgig/plugin-@acme/thing`, which is not a thing that can exist. */
24
+ if (!n.empty() && '@' == n[0]) {
25
+ push(out, vstr(n));
26
+ return out;
27
+ }
28
+
29
+ static const char* const DEFAULT_PREFIX[] = {
30
+ "@voxgig/plugin-", "voxgig-plugin-", "plugin-", "", nullptr
31
+ };
32
+
33
+ bool given = islist(sources) && 0 < len(sources);
34
+ if (!given) {
35
+ for (int i = 0; nullptr != DEFAULT_PREFIX[i]; i++) {
36
+ pushuniq(out, std::string(DEFAULT_PREFIX[i]) + n);
37
+ }
38
+ return out;
39
+ }
40
+
41
+ for (size_t si = 0; si < len(sources); si++) {
42
+ V src = at(sources, si);
43
+ const std::string kind = asstr(get(src, "kind"));
44
+
45
+ if ("module" == kind) {
46
+ V prefix = get(src, "prefix");
47
+ if (islist(prefix) && 0 < len(prefix)) {
48
+ for (size_t pi = 0; pi < len(prefix); pi++) {
49
+ pushuniq(out, asstr(at(prefix, pi)) + n);
50
+ }
51
+ }
52
+ else {
53
+ pushuniq(out, n);
54
+ }
55
+ }
56
+ else if ("path" == kind) {
57
+ std::string dir = asstr(get(src, "dir"));
58
+ /* Trailing slashes are trimmed, so `lib/` and `lib` give one id
59
+ * rather than two spellings of it. */
60
+ while (!dir.empty() && '/' == dir.back()) dir.pop_back();
61
+ pushuniq(out, dir + "/" + n);
62
+ }
63
+ }
64
+
65
+ return out;
66
+ }
67
+
68
+ /* A MODULE PATH IS NOT A NAME (§10.2). The ref grammar starts a name
69
+ * with a letter or `@`, so `./local/thing` is not a ref and never
70
+ * reaches candidate generation — seneca allows a path where a plugin
71
+ * name goes, and this design deliberately does not, because a ref is an
72
+ * ADDRESS WITHIN A HOST and a path is a LOCATION ON A DISK.
73
+ *
74
+ * Loading from an explicit location bypasses candidate generation
75
+ * entirely: `from` is passed to the resolver verbatim. */
76
+ V resolvefrom(const V& from) {
77
+ V out = vlist();
78
+ push(out, isnull(from) ? vnull() : from);
79
+ return out;
80
+ }
81
+
82
+ } // namespace plugin
@@ -0,0 +1,25 @@
1
+ // VENDORED: @voxgig/plugin sdk-20260908-1556-0 (cpp/src/resolve.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
+ /* 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 — cpp
9
+ * among them — and it is why §15.4 puts real module loading in per-port
10
+ * integration tests rather than here. */
11
+
12
+ #ifndef VOXGIG_PLUGIN_RESOLVE_HPP
13
+ #define VOXGIG_PLUGIN_RESOLVE_HPP
14
+
15
+ #include "types.hpp"
16
+ #include "value.hpp"
17
+
18
+ namespace plugin {
19
+
20
+ V resolvecandidates(const V& name, const V& sources);
21
+ V resolvefrom(const V& from);
22
+
23
+ } // namespace plugin
24
+
25
+ #endif
@@ -0,0 +1,90 @@
1
+ // VENDORED: @voxgig/plugin sdk-20260908-1556-0 (cpp/src/types.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
+ /* Errors and the raise mechanism. See types.hpp for why exceptions. */
5
+
6
+ #include "types.hpp"
7
+
8
+ namespace plugin {
9
+
10
+ /* §12's detail fields, IN THIS FIXED ORDER. The order is part of the
11
+ * contract: an earlier draft named six fields while other sections
12
+ * promised diagnostics with nowhere to go, which would have left each
13
+ * port inventing its own order and breaking message parity. */
14
+ static const char* const DETAIL_ORDER[] = {
15
+ "host", "ref", "name", "tag", "point", "key", "capability",
16
+ "range", "version", "match", "candidates", "cycle", "holders",
17
+ "refs", "path", "cause", nullptr
18
+ };
19
+
20
+ std::string formaterror(const std::string& code, const std::string& text,
21
+ const V& details) {
22
+ /* Values render as COMPACT JSON, so a value containing a space or a
23
+ * bracket cannot break the parse and a list renders as an array. The
24
+ * bracket is absent entirely when no field applies. */
25
+ std::string tail;
26
+ for (int i = 0; nullptr != DETAIL_ORDER[i]; i++) {
27
+ const std::string k = DETAIL_ORDER[i];
28
+ if (!has(details, k)) continue;
29
+ if (!tail.empty()) tail += ' ';
30
+ tail += k;
31
+ tail += '=';
32
+ tail += json(get(details, k));
33
+ }
34
+
35
+ std::string out = "plugin/" + code + ": " + text;
36
+ if (!tail.empty()) out += " [" + tail + "]";
37
+ return out;
38
+ }
39
+
40
+ PluginError::PluginError(std::string c, std::string t, V d)
41
+ : code(std::move(c)),
42
+ text(std::move(t)),
43
+ details(d ? d : vmap()),
44
+ message(formaterror(code, text, details)) {}
45
+
46
+ void fail(const std::string& code, const std::string& text, const V& details) {
47
+ throw PluginError(code, text, details);
48
+ }
49
+
50
+ V details1(const std::string& k, const V& v) {
51
+ V d = vmap();
52
+ set(d, k, v);
53
+ return d;
54
+ }
55
+
56
+ V details2(const std::string& k1, const V& v1, const std::string& k2,
57
+ const V& v2) {
58
+ V d = vmap();
59
+ set(d, k1, v1);
60
+ set(d, k2, v2);
61
+ return d;
62
+ }
63
+
64
+ V mergevalue(const V& a, const V& b) {
65
+ if (!ismap(a) || !ismap(b)) return b ? b : a;
66
+ V out = vmap();
67
+ for (const auto& k : keys(a)) set(out, k, get(a, k));
68
+ for (const auto& k : keys(b)) {
69
+ V bv = get(b, k);
70
+ V av = get(out, k);
71
+ if (ismap(av) && ismap(bv)) set(out, k, mergevalue(av, bv));
72
+ else set(out, k, bv);
73
+ }
74
+ return out;
75
+ }
76
+
77
+ bool matchvalue(const V& want, const V& have) {
78
+ if (isnull(want)) return true;
79
+ if (ismap(want)) {
80
+ if (!ismap(have)) return false;
81
+ for (const auto& k : keys(want)) {
82
+ if (!has(have, k)) return false;
83
+ if (!matchvalue(get(want, k), get(have, k))) return false;
84
+ }
85
+ return true;
86
+ }
87
+ return same(want, have);
88
+ }
89
+
90
+ } // namespace plugin
@@ -0,0 +1,65 @@
1
+ // VENDORED: @voxgig/plugin sdk-20260908-1556-0 (cpp/src/types.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
+ /* Errors, and the raise mechanism (§12).
5
+ *
6
+ * A REAL EXCEPTION, which is the whole difference from the `c` port.
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
+ * c reaches that with setjmp/longjmp and pays for it in `volatile`
11
+ * locals and an arena; C++ has the construct, so it is used, and the
12
+ * destructors run on the way out.
13
+ *
14
+ * Ports compare by CODE and never by message: wording is a port's own
15
+ * business. The FORMAT is pinned, because a parseable message is what
16
+ * makes a log searchable across twenty languages. */
17
+
18
+ #ifndef VOXGIG_PLUGIN_TYPES_HPP
19
+ #define VOXGIG_PLUGIN_TYPES_HPP
20
+
21
+ #include <exception>
22
+ #include <string>
23
+
24
+ #include "value.hpp"
25
+
26
+ namespace plugin {
27
+
28
+ class PluginError : public std::exception {
29
+ public:
30
+ std::string code;
31
+ std::string text;
32
+ V details;
33
+ std::string message;
34
+
35
+ PluginError(std::string c, std::string t, V d);
36
+ const char* what() const noexcept override { return message.c_str(); }
37
+ };
38
+
39
+ /* Raise. Never returns — declared [[noreturn]] so the compiler knows a
40
+ * `fail` ends a branch and no caller needs a dead return after it. */
41
+ [[noreturn]] void fail(const std::string& code, const std::string& text,
42
+ const V& details = nullptr);
43
+
44
+ /* §12's detail fields render in a FIXED ORDER — part of the contract,
45
+ * not a formatting preference, because otherwise each port invents its
46
+ * own and message parity is gone. */
47
+ std::string formaterror(const std::string& code, const std::string& text,
48
+ const V& details);
49
+
50
+ /* Convenience: small details maps. */
51
+ V details1(const std::string& k, const V& v);
52
+ V details2(const std::string& k1, const V& v1, const std::string& k2,
53
+ const V& v2);
54
+
55
+ /* Deep merge, struct's semantics: maps merge, everything else replaces.
56
+ * §16 permits voxgig/struct for this and C++ has no port of it. */
57
+ V mergevalue(const V& a, const V& b);
58
+
59
+ /* §11.1's partial match: every leaf in `want` must be present and equal
60
+ * in `have`; keys not mentioned are not checked. */
61
+ bool matchvalue(const V& want, const V& have);
62
+
63
+ } // namespace plugin
64
+
65
+ #endif