@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
@@ -4,24 +4,65 @@
4
4
 
5
5
  CC ?= gcc
6
6
  CFLAGS ?= -std=c11 -Wall -Wextra -Wno-unused-parameter -D_GNU_SOURCE -O0 -g
7
- INC := -I core -I utility/struct
7
+ # -I feature: a feature's own header (feature/<name>.h), which a suite under
8
+ # tests/feature/<name>/ includes by bare name the way every test includes
9
+ # sdk.h. Then EVERY payload directory two levels under feature/: a feature
10
+ # that carries a vendored library keeps it in feature/<name>/<lib>/, and
11
+ # every quoted include inside such a port is a bare basename resolved
12
+ # through these. Derived from the tree rather than listed, so the Makefile
13
+ # names no feature; harmless when the feature trim has removed the
14
+ # directories (the wildcard is then empty), and a payload's value.h /
15
+ # point.h / types.h shadow nothing: the SDK's own value.h (utility/struct)
16
+ # is reached by its neighbours through the including file's directory,
17
+ # which a quoted include searches before any -I.
18
+ PAYLOAD_DIRS := $(patsubst %/,%,$(wildcard feature/*/*/))
19
+ INC := -I core -I utility/struct -I feature $(addprefix -I ,$(PAYLOAD_DIRS))
8
20
  # The vendored omni test runner (tests/vendor/omni) is TEST-ONLY: it is
9
21
  # reachable from tests/ alone, never from LIB_SRCS, so it cannot enter the
10
22
  # shipped libsdk.a. That is why it lives under tests/ and not utility/.
11
23
  OMNI_INC := -I tests -I tests/vendor/omni
24
+ # The test harness headers (ctest.h, feature_harness.h) by bare name, for a
25
+ # suite that lives BELOW tests/ (a gated feature's tests/feature/<name>/
26
+ # suite) and so cannot reach them through its own directory as tests/*.c do.
27
+ TEST_INC := -I tests
12
28
  LDLIBS := -lm
13
29
 
30
+ # ---- gated feature payloads (model/feature/<name>.aon plugin groups) --------
31
+ #
32
+ # A gated feature's vendored payload sits two levels under feature/
33
+ # (feature/<name>/<lib>/*.c) - out of reach of the feature/*/*.c glob below,
34
+ # and deliberately so. What of it is built is decided by a GENERATED make
35
+ # fragment, feature/<name>/kinds.mk, that Config_c emits beside the
36
+ # feature's generated kinds.c only when the model activates the feature for
37
+ # this target. The fragment appends the payload sources to FEATURE_SRCS, the
38
+ # feature's suite to FEATURE_TEST_SRCS, and - only when a plugin group is
39
+ # active - the plugin layer and the external libraries it brings to LDLIBS.
40
+ # Nothing here names a feature: a tree whose model never activated one
41
+ # carries its payload as inert source (as rust carries a module no parent
42
+ # declares), links libc alone, and a project's `target add` trims it
43
+ # outright. `ldd` on any test binary shows which case this tree is.
44
+ FEATURE_SRCS :=
45
+ FEATURE_TEST_SRCS :=
46
+ -include $(wildcard feature/*/kinds.mk)
47
+
14
48
  # feature/*/*.c: a feature may carry a vendored library payload in its own
15
49
  # subdirectory (the station feature vendors voxgig_station there - C has no
16
50
  # package registry, so tier-C libraries ride the feature source; see
17
51
  # utility/struct/ for the same precedent at the utility level). Empty when
18
- # no feature ships one.
19
- LIB_SRCS := $(wildcard core/*.c utility/*.c utility/struct/*.c feature/*.c feature/*/*.c entity/*.c)
52
+ # no feature ships one. A gated feature's own feature/<name>.c is in this
53
+ # glob too and always compiles (its headers are on INC above); without its
54
+ # kinds.mk nothing references it, so the archive member is never pulled
55
+ # into a link.
56
+ LIB_SRCS := $(wildcard core/*.c utility/*.c utility/struct/*.c feature/*.c feature/*/*.c entity/*.c) \
57
+ $(FEATURE_SRCS)
20
58
  LIB_OBJS := $(LIB_SRCS:.c=.o)
21
59
 
22
60
  # Single-level on purpose: the vendored omni sources under
23
- # tests/vendor/omni have no main() and must not become test binaries.
24
- TEST_SRCS := $(wildcard tests/*.c)
61
+ # tests/vendor/omni have no main() and must not become test binaries. A
62
+ # gated feature's suite under tests/feature/<name>/ is added by its
63
+ # generated kinds.mk, so it is only ever built when the feature it links
64
+ # against is wired in.
65
+ TEST_SRCS := $(wildcard tests/*.c) $(FEATURE_TEST_SRCS)
25
66
  TEST_BINS := $(TEST_SRCS:.c=.out)
26
67
 
27
68
  OMNI_SRCS := $(wildcard tests/vendor/omni/*.c)
@@ -36,7 +77,14 @@ build: libsdk.a
36
77
  %.o: %.c
37
78
  $(CC) $(CFLAGS) $(INC) -c $< -o $@
38
79
 
80
+ # `ar r` REPLACES a member by basename on an archive it finds, and this
81
+ # archive carries duplicate basenames by construction: core/utility.o
82
+ # beside utility/struct/utility.o, and a vendored payload's point.o,
83
+ # config.o and value.o beside core's and utility/struct's. One cold
84
+ # `ar rcs` keeps every member; an incremental one would silently drop
85
+ # whichever came first, so the archive is deleted before it is written.
39
86
  libsdk.a: $(LIB_OBJS)
87
+ @rm -f $@
40
88
  ar rcs $@ $(LIB_OBJS)
41
89
 
42
90
  # omni's util.c includes <regex.h>. CFLAGS is `?=`, so an operator override
@@ -50,6 +98,7 @@ tests/vendor/omni/%.o: tests/vendor/omni/%.c
50
98
  $(CC) $(CFLAGS) -D_POSIX_C_SOURCE=200809L -D_DARWIN_C_SOURCE -c $< -o $@
51
99
 
52
100
  libomni.a: $(OMNI_OBJS)
101
+ @rm -f $@
53
102
  ar rcs $@ $(OMNI_OBJS)
54
103
 
55
104
  # Only the corpus drivers and the smoke test reach for omni, and the generic
@@ -61,10 +110,10 @@ OMNI_TESTS := tests/struct_corpus_test.out tests/primary_corpus_test.out \
61
110
  tests/omni_smoke_test.out
62
111
 
63
112
  $(OMNI_TESTS): tests/%.out: tests/%.c libsdk.a libomni.a
64
- $(CC) $(CFLAGS) $(INC) $(OMNI_INC) $< libsdk.a libomni.a -o $@ $(LDLIBS)
113
+ $(CC) $(CFLAGS) $(INC) $(TEST_INC) $(OMNI_INC) $< libsdk.a libomni.a -o $@ $(LDLIBS)
65
114
 
66
115
  tests/%.out: tests/%.c libsdk.a
67
- $(CC) $(CFLAGS) $(INC) $< libsdk.a -o $@ $(LDLIBS)
116
+ $(CC) $(CFLAGS) $(INC) $(TEST_INC) $< libsdk.a -o $@ $(LDLIBS)
68
117
 
69
118
  # Build and run every test; aggregate pass/fail.
70
119
  test: libsdk.a libomni.a
@@ -72,7 +121,7 @@ test: libsdk.a libomni.a
72
121
  for src in $(TEST_SRCS); do \
73
122
  bin=$${src%.c}.out; \
74
123
  case " $(OMNI_TESTS) " in *" $$bin "*) omni="libomni.a"; oinc="$(OMNI_INC)";; *) omni=""; oinc="";; esac; \
75
- $(CC) $(CFLAGS) $(INC) $$oinc $$src libsdk.a $$omni -o $$bin $(LDLIBS) || { echo "BUILD FAIL: $$src"; fail=1; continue; }; \
124
+ $(CC) $(CFLAGS) $(INC) $(TEST_INC) $$oinc $$src libsdk.a $$omni -o $$bin $(LDLIBS) || { echo "BUILD FAIL: $$src"; fail=1; continue; }; \
76
125
  total=$$((total+1)); \
77
126
  if ./$$bin; then :; else echo "TEST FAIL: $$bin"; fail=1; fi; \
78
127
  done; \
@@ -82,7 +131,7 @@ test: libsdk.a libomni.a
82
131
 
83
132
  clean:
84
133
  rm -f $(LIB_OBJS) libsdk.a $(OMNI_OBJS) libomni.a $(TEST_BINS) tests/*.out \
85
- corpus-scoreboard.json
134
+ tests/feature/*/*.out corpus-scoreboard.json
86
135
 
87
136
  # C has no central registry — publishing IS the git tag.
88
137
  VERSION := $(shell cat VERSION 2>/dev/null || echo 0.0.1)
@@ -448,6 +448,16 @@ voxgig_value* make_config(void);
448
448
  voxgig_value* shared_config(void);
449
449
  Feature* make_feature(const char* name);
450
450
 
451
+ // The plugin DEFINITIONS the model selected for one feature's chain - the c
452
+ // peer of go's core.FeaturePlugins(name). Each entry is a `Definition*` from
453
+ // the vendored voxgig/plugin (feature/secrets/plugin/catalog.h), typed void*
454
+ // here because core/ must never name a gated feature's types: the accessor
455
+ // exists in every generated config.c, and answers *n = 0 / NULL for a
456
+ // feature with no plugins or an SDK that never selected the feature. A
457
+ // feature casts the array back at the one place it hands the list to the
458
+ // vendored library.
459
+ void** feature_plugins(const char* name, size_t* n);
460
+
451
461
  // ===========================================================================
452
462
  // Utility builder prototypes (utility/*.c). Fallible ones take PNError** err.
453
463
  // ===========================================================================
@@ -0,0 +1,133 @@
1
+ // VENDORED: @voxgig/plugin sdk-20260908-1556-0 (c/src/capability.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
+ /* Capabilities (§11.1). */
5
+
6
+ #include <stdlib.h>
7
+ #include <string.h>
8
+
9
+ #include "capability.h"
10
+ #include "version.h"
11
+
12
+ bool capmatchvalue(Value *want, Value *got) {
13
+ /* THIS FUNCTION IS WHAT "EVERY LEAF" MEANS, and an earlier draft of
14
+ * the canonical did not have it: the check was a scalar compare,
15
+ * which for any compound value is reference identity in JavaScript. A
16
+ * requirement and a capability are declared in different places and
17
+ * are never the same object, so `match: {limits: {max: 5}}` could not
18
+ * be satisfied by ANY provider — including one declaring exactly
19
+ * that. Invisible while every corpus entry is scalar, which is why
20
+ * the go port found it and P2 did not. */
21
+ if (vismap(want)) {
22
+ if (!vismap(got)) return false;
23
+ const char **keys;
24
+ size_t n = vkeys(want, &keys);
25
+ for (size_t i = 0; i < n; i++) {
26
+ if (!vhas(got, keys[i])) return false;
27
+ if (!capmatchvalue(vget(want, keys[i]), vget(got, keys[i]))) return false;
28
+ }
29
+ return true;
30
+ }
31
+ if (vislist(want)) {
32
+ if (!vislist(got) || vlen(want) != vlen(got)) return false;
33
+ for (size_t i = 0; i < vlen(want); i++) {
34
+ if (!capmatchvalue(vat(want, i), vat(got, i))) return false;
35
+ }
36
+ return true;
37
+ }
38
+ return vsame(want, got);
39
+ }
40
+
41
+ bool capmatches(Value *req, Value *prov) {
42
+ Value *rname = vget(req, "name");
43
+ Value *pname = vget(prov, "name");
44
+ if (!vsame(rname, pname)) return false;
45
+
46
+ Value *range = vget(req, "range");
47
+ if (!visnull(range)) {
48
+ Value *version = vget(prov, "version");
49
+ if (visnull(version)) return false;
50
+ if (!satisfiesq(version, range)) return false;
51
+ }
52
+
53
+ /* `match` is checked against the provider's `attrs`, key by key. A
54
+ * key the provider does not carry is a MISS, not a pass: a
55
+ * requirement asking for `transactional: true` must not be satisfied
56
+ * by a provider that never said. */
57
+ Value *match = vget(req, "match");
58
+ if (!visnull(match)) {
59
+ Value *attrs = vget(prov, "attrs");
60
+ if (visnull(attrs)) attrs = vmap();
61
+ const char **keys;
62
+ size_t n = vkeys(match, &keys);
63
+ for (size_t i = 0; i < n; i++) {
64
+ if (!vhas(attrs, keys[i])) return false;
65
+ if (!capmatchvalue(vget(match, keys[i]), vget(attrs, keys[i]))) {
66
+ return false;
67
+ }
68
+ }
69
+ }
70
+
71
+ return true;
72
+ }
73
+
74
+ /* The rank, as a comparison over two candidates. Ordering is a total
75
+ * rank on purpose: without one, "any provider satisfies" is true of the
76
+ * GRAPH and useless to the PLUGIN — two ports could bind different
77
+ * `store` instances, both resolve green, and behave differently, which
78
+ * is precisely the divergence a shared corpus exists to catch. */
79
+ static int rank(const void *pa, const void *pb) {
80
+ Value *a = *(Value *const *)pa;
81
+ Value *b = *(Value *const *)pb;
82
+ Value *ap = vget(a, "provides");
83
+ Value *bp = vget(b, "provides");
84
+
85
+ Value *av = vget(ap, "version");
86
+ Value *bv = vget(bp, "version");
87
+ bool ahas = !visnull(av), bhas = !visnull(bv);
88
+ if (ahas != bhas) return ahas ? -1 : 1; /* a version beats none */
89
+ if (ahas && bhas) {
90
+ /* HIGHEST version first, so the comparison is reversed. */
91
+ CatchFrame f;
92
+ int c = 0;
93
+ if (0 == PLUGIN_TRY(&f)) {
94
+ c = vercmp(parseversion(bv), parseversion(av));
95
+ PLUGIN_END(&f);
96
+ }
97
+ else {
98
+ c = 0;
99
+ }
100
+ if (0 != c) return c;
101
+ }
102
+
103
+ double apri = visnum(vget(ap, "priority")) ? vasnum(vget(ap, "priority")) : 0.0;
104
+ double bpri = visnum(vget(bp, "priority")) ? vasnum(vget(bp, "priority")) : 0.0;
105
+ if (apri != bpri) return apri < bpri ? -1 : 1; /* LOWEST priority first */
106
+
107
+ double apos = visnum(vget(a, "pos")) ? vasnum(vget(a, "pos")) : 0.0;
108
+ double bpos = visnum(vget(b, "pos")) ? vasnum(vget(b, "pos")) : 0.0;
109
+ if (apos != bpos) return apos < bpos ? -1 : 1;
110
+ return 0;
111
+ }
112
+
113
+ Value *resolvecapability(Value *req, Value *candidates) {
114
+ size_t n = vlen(candidates);
115
+ Value **hits = (Value **)arena_alloc(sizeof(Value *) * (n + 1));
116
+ size_t count = 0;
117
+ for (size_t i = 0; i < n; i++) {
118
+ Value *c = vat(candidates, i);
119
+ if (capmatches(req, vget(c, "provides"))) hits[count++] = c;
120
+ }
121
+
122
+ /* A STABLE SORT. `qsort` is not stable, and §6.3's tie rules make the
123
+ * order observable — so `rank` is a TOTAL order (it falls through to
124
+ * `pos`, which is unique) and stability is not relied on. An earlier
125
+ * reading that stopped at `priority` would have left ties to qsort's
126
+ * discretion, which is exactly the per-port divergence the ranking
127
+ * exists to remove. */
128
+ if (1 < count) qsort(hits, count, sizeof(Value *), rank);
129
+
130
+ Value *out = vlist();
131
+ for (size_t i = 0; i < count; i++) vpush(out, hits[i]);
132
+ return out;
133
+ }
@@ -0,0 +1,39 @@
1
+ // VENDORED: @voxgig/plugin sdk-20260908-1556-0 (c/src/capability.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
+ /* Capabilities (§11.1).
5
+ *
6
+ * A DEPENDENCY IS ON A CAPABILITY, NOT ON A REF — because it is a
7
+ * dependency on something that can do the job, and which instance is
8
+ * doing it is exactly the configuration detail a plugin must not care
9
+ * about. (§11.1 makes one narrow exception for a ref, and `host.c`
10
+ * implements it; the ranking here is capabilities only.)
11
+ *
12
+ * But A BINDING IS TO AN INSTANCE, not to a capability, which is what
13
+ * decides behaviour when the bound provider leaves while another match
14
+ * remains. */
15
+
16
+ #ifndef VOXGIG_PLUGIN_CAPABILITY_H
17
+ #define VOXGIG_PLUGIN_CAPABILITY_H
18
+
19
+ #include <stdbool.h>
20
+
21
+ #include "types.h"
22
+ #include "value.h"
23
+
24
+ /* Rank the matching providers best-first: highest `version`, then
25
+ * LOWEST `priority` (default 0), then declaration position `pos`
26
+ * ascending. `candidates` is a list of {ref, pos, provides}. */
27
+ Value *resolvecapability(Value *req, Value *candidates);
28
+
29
+ /* Does one provider satisfy one requirement? */
30
+ bool capmatches(Value *req, Value *prov);
31
+
32
+ /* PARTIAL MATCH, RECURSING INTO MAPS (§11.1): every leaf in the
33
+ * requirement must be present and equal in the capability, keys not
34
+ * mentioned are not checked. A LIST IS COMPARED LEAF-WISE AT THE SAME
35
+ * LENGTH, not as a subset — "the first two of your three regions" is
36
+ * not something `match` can say. */
37
+ bool capmatchvalue(Value *want, Value *got);
38
+
39
+ #endif
@@ -0,0 +1,83 @@
1
+ // VENDORED: @voxgig/plugin sdk-20260908-1556-0 (c/src/catalog.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
+ /* The definition catalog (§10.1). */
5
+
6
+ #include <stdio.h>
7
+ #include <string.h>
8
+
9
+ #include "catalog.h"
10
+ #include "config.h"
11
+ #include "ref.h"
12
+
13
+ typedef struct CatEntry {
14
+ const char *name;
15
+ Definition *def;
16
+ struct CatEntry *next;
17
+ } CatEntry;
18
+
19
+ struct Catalog {
20
+ CatEntry *first;
21
+ };
22
+
23
+ Catalog *makecatalog(void) {
24
+ Catalog *c = (Catalog *)arena_alloc(sizeof(Catalog));
25
+ c->first = NULL;
26
+ return c;
27
+ }
28
+
29
+ void catalog_add(Catalog *c, Definition *def) {
30
+ if (NULL == def || !checkname(vstr(NULL == def->name ? "" : def->name))) {
31
+ const char *shown = (NULL == def || NULL == def->name) ? "" : def->name;
32
+ size_t sz = strlen(shown) + 48;
33
+ char *text = (char *)arena_alloc(sz);
34
+ snprintf(text, sz, "invalid definition name: %s", shown);
35
+ fail("plugin_definition_name", text, NULL);
36
+ }
37
+
38
+ /* Validate the shape HERE. Deferring it to resolution time means a
39
+ * malformed shape surfaces at a different moment in every host that
40
+ * loads it, which is the divergence the stated domain exists to
41
+ * prevent. */
42
+ if (!visnull(def->shape)) checkshape(def->shape);
43
+
44
+ for (CatEntry *e = c->first; NULL != e; e = e->next) {
45
+ if (0 == strcmp(e->name, def->name)) { e->def = def; return; }
46
+ }
47
+ CatEntry *e = (CatEntry *)arena_alloc(sizeof(CatEntry));
48
+ e->name = arena_strdup(def->name);
49
+ e->def = def;
50
+ e->next = c->first;
51
+ c->first = e;
52
+ }
53
+
54
+ Definition *catalog_get(Catalog *c, const char *name) {
55
+ if (NULL == c || NULL == name) return NULL;
56
+ for (CatEntry *e = c->first; NULL != e; e = e->next) {
57
+ if (0 == strcmp(e->name, name)) return e->def;
58
+ }
59
+ return NULL;
60
+ }
61
+
62
+ bool catalog_has(Catalog *c, const char *name) {
63
+ return NULL != catalog_get(c, name);
64
+ }
65
+
66
+ Value *catalog_names(Catalog *c) {
67
+ Value *m = vmap();
68
+ for (CatEntry *e = c->first; NULL != e; e = e->next) vset(m, e->name, vbool(true));
69
+ const char **keys;
70
+ size_t n = vsortedkeys(m, &keys);
71
+ Value *out = vlist();
72
+ for (size_t i = 0; i < n; i++) vpush(out, vstr(keys[i]));
73
+ return out;
74
+ }
75
+
76
+ LifecycleFn definition_callback(Definition *d, const char *at) {
77
+ if (NULL == d) return NULL;
78
+ if (0 == strcmp(at, "define")) return d->define;
79
+ if (0 == strcmp(at, "activate")) return d->activate;
80
+ if (0 == strcmp(at, "deactivate")) return d->deactivate;
81
+ if (0 == strcmp(at, "close")) return d->close;
82
+ return NULL;
83
+ }
@@ -0,0 +1,48 @@
1
+ // VENDORED: @voxgig/plugin sdk-20260908-1556-0 (c/src/catalog.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
+ /* The definition catalog (§10.1).
5
+ *
6
+ * A definition is registered once and may back many instances. Option
7
+ * shapes are validated AT REGISTRATION, not when a document happens to
8
+ * exercise a key — so a malformed shape fails once, and in the same
9
+ * place everywhere (§9.4). `declare/shape` pins that timing. */
10
+
11
+ #ifndef VOXGIG_PLUGIN_CATALOG_H
12
+ #define VOXGIG_PLUGIN_CATALOG_H
13
+
14
+ #include <stdbool.h>
15
+
16
+ #include "types.h"
17
+ #include "value.h"
18
+
19
+ typedef struct Inst Inst;
20
+
21
+ /* A DEFINITION IS DATA WITH FUNCTIONS IN IT, not a class to extend. A
22
+ * document could produce one, which is the property that makes a
23
+ * catalog a data structure rather than a compile-time registry. */
24
+ typedef void (*LifecycleFn)(Inst *inst);
25
+ typedef void (*ReconfigureFn)(Inst *inst, Value *now, Value *previous);
26
+
27
+ typedef struct Definition {
28
+ const char *name;
29
+ Value *shape;
30
+ LifecycleFn define;
31
+ LifecycleFn activate;
32
+ LifecycleFn deactivate;
33
+ LifecycleFn close;
34
+ ReconfigureFn reconfigure;
35
+ } Definition;
36
+
37
+ typedef struct Catalog Catalog;
38
+
39
+ Catalog *makecatalog(void);
40
+ void catalog_add(Catalog *c, Definition *def);
41
+ Definition *catalog_get(Catalog *c, const char *name);
42
+ bool catalog_has(Catalog *c, const char *name);
43
+ Value *catalog_names(Catalog *c);
44
+
45
+ /* The callback for a phase, by the name the log and the corpus use. */
46
+ LifecycleFn definition_callback(Definition *d, const char *at);
47
+
48
+ #endif