@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,420 @@
1
+ // VENDORED: @voxgig/sekreto sdk-20260908-1556-0 (c/plugins/tls.c)
2
+ // Source: https://github.com/voxgig/sekreto @ 1267ee2e5f49566bc92695bc9eb3a60ef4924998 [tag: sdk-20260908-1556-0]
3
+ // License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
4
+ /* The TLS binding, and the only file in this port that names OpenSSL.
5
+ *
6
+ * It is under `plugins/` because it is what a plugin is. A chain of the
7
+ * four built-in kinds links no socket, so it links no TLS either, and a
8
+ * consumer that never configures a vault does not carry libssl at all -
9
+ * `make check-core` reads the core archive and says so.
10
+ *
11
+ * The rule this file exists under is AGENTS.md's, stated as a principle
12
+ * rather than a list: cryptographic transport is not hand-rolled. Where a
13
+ * port's standard library has TLS it uses it; where it does not - and C's
14
+ * does not - it binds the platform's audited TLS library, which in C is
15
+ * the one the whole C ecosystem binds. Everything ELSE a standard library
16
+ * lacks is still written in-tree, so the core's json.c, this directory's
17
+ * httpjson.c and sha256.c, and the PEM reader at the foot of this file
18
+ * stay hand-rolled even though libcrypto could do all four. Rust is the
19
+ * worked precedent: `ring` sits inside rustls's closure and
20
+ * rust/src/crypto.rs carries SHA-256 and HMAC anyway.
21
+ *
22
+ * THE AUDIT SURFACE IS `-lssl -lcrypto`, and it is the distribution's
23
+ * OpenSSL: this port pins no version, vendors no source and carries no
24
+ * patch. There is no other edge - `ldd build/sekreto-cli` names libssl,
25
+ * libcrypto and libc, and nothing else.
26
+ *
27
+ * A binding that connects but does not VERIFY is worse than no TLS,
28
+ * because it looks like it works. The four obligations every binding in
29
+ * this repository must meet are met in sek_tls_open below, each marked
30
+ * where it happens:
31
+ *
32
+ * (1) the chain is verified against the system trust store;
33
+ * (2) the HOSTNAME is verified - a separate step from (1), and the half
34
+ * people forget - with the IP-literal case handled separately,
35
+ * because SSL_set1_host does DNS-name matching and will not match
36
+ * an iPAddress SAN;
37
+ * (3) SNI is sent, and NOT for an IP literal, which RFC 6066 forbids;
38
+ * (4) SEKRETO_CA_BUNDLE adds extra roots, additively.
39
+ */
40
+
41
+ #define _POSIX_C_SOURCE 200809L
42
+
43
+ #include <arpa/inet.h>
44
+ #include <errno.h>
45
+ #include <stdio.h>
46
+ #include <stdlib.h>
47
+ #include <string.h>
48
+
49
+ #include <openssl/err.h>
50
+ #include <openssl/ssl.h>
51
+ #include <openssl/x509.h>
52
+ #include <openssl/x509v3.h>
53
+
54
+ #include "support.h"
55
+
56
+ /* Every certificate in a PEM bundle, as DER. Declared here and defined at
57
+ * the foot of the file: `addbundle` below is its only caller anywhere in
58
+ * the library, so it is a private detail of the TLS binding rather than
59
+ * something the encoders have to carry. */
60
+ typedef struct {
61
+ unsigned char **items;
62
+ size_t *lens;
63
+ size_t len;
64
+ } sek_ders;
65
+
66
+ static sek_ders *sek_pemcerts(sek_pool *pool, const char *text);
67
+
68
+ struct sek_tls_conn {
69
+ SSL_CTX *ctx;
70
+ SSL *ssl;
71
+ sek_pool *pool;
72
+ };
73
+
74
+ int sek_tls_available(void) { return 1; }
75
+
76
+ /* OpenSSL's own account of what went wrong, which is the only useful text
77
+ * for a rejected certificate: "certificate verify failed" is what a user
78
+ * needs to see, and the errno the syscall layer would report is not. */
79
+ static const char *sslreason(sek_pool *pool, SSL *ssl, int code) {
80
+ unsigned long queued = ERR_get_error();
81
+ char buf[256];
82
+
83
+ if (0 != queued) {
84
+ ERR_error_string_n(queued, buf, sizeof(buf));
85
+ /* The queue is drained so a later failure cannot report this one. */
86
+ while (0 != ERR_get_error()) {
87
+ }
88
+ return sek_strdup(pool, buf);
89
+ }
90
+
91
+ if (NULL != ssl && SSL_ERROR_ZERO_RETURN == SSL_get_error(ssl, code)) {
92
+ return "connection closed";
93
+ }
94
+
95
+ return "tls failure";
96
+ }
97
+
98
+ /* Extra trust roots from SEKRETO_CA_BUNDLE - obligation (4).
99
+ *
100
+ * ADDITIVE, never a replacement: the system roots are loaded first and
101
+ * unconditionally, so a private CA is added to them rather than swapped
102
+ * for them. An internal Vault behind a private CA is the common case, not
103
+ * the exotic one, and a port whose bundle variable REPLACED the store
104
+ * would silently stop trusting the public web the moment it was set.
105
+ *
106
+ * FAILS OPEN, SILENTLY: an unreadable file, a file that is not PEM, or a
107
+ * certificate the store rejects is discarded and nothing is raised. A
108
+ * wrong path adds no roots and weakens nothing.
109
+ *
110
+ * The PEM is parsed in-tree (at the foot of this file) rather than
111
+ * through SSL_CTX_load_verify_locations, because the rule keeps PEM on
112
+ * the hand-rolled side of the line even here. */
113
+ static void addbundle(sek_pool *pool, SSL_CTX *ctx) {
114
+ const char *path = getenv(SEK_CABUNDLE);
115
+ FILE *file;
116
+ sek_buf text;
117
+ char chunk[4096];
118
+ size_t got;
119
+ sek_ders *ders;
120
+ X509_STORE *store;
121
+ size_t index;
122
+
123
+ if (sek_empty(path)) {
124
+ return;
125
+ }
126
+
127
+ file = fopen(path, "rb");
128
+ if (NULL == file) {
129
+ return;
130
+ }
131
+
132
+ sek_buf_init(&text, pool);
133
+ while (0 < (got = fread(chunk, 1, sizeof(chunk), file))) {
134
+ sek_buf_addn(&text, chunk, got);
135
+ }
136
+ fclose(file);
137
+
138
+ ders = sek_pemcerts(pool, text.data);
139
+ store = SSL_CTX_get_cert_store(ctx);
140
+
141
+ if (NULL == store) {
142
+ return;
143
+ }
144
+
145
+ for (index = 0; index < ders->len; index++) {
146
+ const unsigned char *at = ders->items[index];
147
+ X509 *cert = d2i_X509(NULL, &at, (long)ders->lens[index]);
148
+
149
+ if (NULL == cert) {
150
+ continue;
151
+ }
152
+
153
+ /* A duplicate or otherwise unacceptable certificate is discarded. */
154
+ X509_STORE_add_cert(store, cert);
155
+ X509_free(cert);
156
+ }
157
+
158
+ /* Anything OpenSSL queued while rejecting a certificate is dropped, so
159
+ * a later handshake failure does not report this instead of itself. */
160
+ while (0 != ERR_get_error()) {
161
+ }
162
+ }
163
+
164
+ static int isipliteral(const char *host) {
165
+ unsigned char scratch[16];
166
+
167
+ return 1 == inet_pton(AF_INET, host, scratch) || 1 == inet_pton(AF_INET6, host, scratch);
168
+ }
169
+
170
+ sek_err sek_tls_open(sek_pool *pool, int fd, const char *host, sek_tls_conn **out) {
171
+ sek_tls_conn *conn = (sek_tls_conn *)sek_alloc(pool, sizeof(sek_tls_conn));
172
+ X509_VERIFY_PARAM *param;
173
+ int shook;
174
+ int literal = isipliteral(host);
175
+
176
+ conn->pool = pool;
177
+ conn->ctx = SSL_CTX_new(TLS_client_method());
178
+
179
+ if (NULL == conn->ctx) {
180
+ return sek_fmt(pool, "tls setup failed: %s", sslreason(pool, NULL, 0));
181
+ }
182
+
183
+ /* (1) THE CHAIN, against the system trust store.
184
+ *
185
+ * set_default_verify_paths loads the distribution's CA directory, and
186
+ * honours SSL_CERT_FILE / SSL_CERT_DIR while doing it. set_verify with
187
+ * SSL_VERIFY_PEER and a NULL callback is what makes a verification
188
+ * failure ABORT the handshake - without it OpenSSL happily completes
189
+ * one against a certificate it does not trust and leaves the verdict
190
+ * for a caller to remember to ask about. */
191
+ if (1 != SSL_CTX_set_default_verify_paths(conn->ctx)) {
192
+ SSL_CTX_free(conn->ctx);
193
+ return sek_fmt(pool, "tls setup failed: no system trust store");
194
+ }
195
+ SSL_CTX_set_verify(conn->ctx, SSL_VERIFY_PEER, NULL);
196
+
197
+ /* Nothing below TLS 1.2. */
198
+ SSL_CTX_set_min_proto_version(conn->ctx, TLS1_2_VERSION);
199
+
200
+ /* (4) extra roots, additive. */
201
+ addbundle(pool, conn->ctx);
202
+
203
+ conn->ssl = SSL_new(conn->ctx);
204
+ if (NULL == conn->ssl) {
205
+ SSL_CTX_free(conn->ctx);
206
+ return sek_fmt(pool, "tls setup failed: %s", sslreason(pool, NULL, 0));
207
+ }
208
+
209
+ param = SSL_get0_param(conn->ssl);
210
+ X509_VERIFY_PARAM_set_hostflags(param, X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS);
211
+
212
+ /* (2) THE HOSTNAME. Separate from (1): a valid certificate for some
213
+ * other host chains perfectly well.
214
+ *
215
+ * The two cases are genuinely different checks. SSL_set1_host matches
216
+ * DNS names against dNSName SANs, and will NOT match an iPAddress SAN -
217
+ * so an IP literal has to go through set1_ip_asc instead. This
218
+ * repository's own TLS endpoint is https://127.0.0.1:8304, so a port
219
+ * that treats every host as a name fails there, and a port that only
220
+ * ever tested against that endpoint could ship with no name check at
221
+ * all. Both are set here, and both before the handshake. */
222
+ if (literal) {
223
+ if (1 != X509_VERIFY_PARAM_set1_ip_asc(param, host)) {
224
+ SSL_free(conn->ssl);
225
+ SSL_CTX_free(conn->ctx);
226
+ return sek_fmt(pool, "tls setup failed: bad address %s", host);
227
+ }
228
+ } else {
229
+ if (1 != SSL_set1_host(conn->ssl, host)) {
230
+ SSL_free(conn->ssl);
231
+ SSL_CTX_free(conn->ctx);
232
+ return sek_fmt(pool, "tls setup failed: bad host name %s", host);
233
+ }
234
+
235
+ /* (3) SNI, for a name only. RFC 6066 forbids a literal address in
236
+ * server_name, and OpenSSL will send whatever it is handed. */
237
+ SSL_set_tlsext_host_name(conn->ssl, host);
238
+ }
239
+
240
+ SSL_set_fd(conn->ssl, fd);
241
+
242
+ shook = SSL_connect(conn->ssl);
243
+ if (1 != shook) {
244
+ sek_err why = sek_fmt(pool, "%s", sslreason(pool, conn->ssl, shook));
245
+ SSL_free(conn->ssl);
246
+ SSL_CTX_free(conn->ctx);
247
+ return why;
248
+ }
249
+
250
+ /* Belt and braces. SSL_VERIFY_PEER above already aborts on a bad chain,
251
+ * but a future edit that weakened it would be silent, and these two
252
+ * lines are not. A peer that presented no certificate at all is caught
253
+ * here whatever the verify mode says. */
254
+ if (X509_V_OK != SSL_get_verify_result(conn->ssl)) {
255
+ sek_err why = sek_fmt(pool, "certificate verify failed: %s",
256
+ X509_verify_cert_error_string(SSL_get_verify_result(conn->ssl)));
257
+ SSL_free(conn->ssl);
258
+ SSL_CTX_free(conn->ctx);
259
+ return why;
260
+ }
261
+
262
+ {
263
+ X509 *peer = SSL_get1_peer_certificate(conn->ssl);
264
+ if (NULL == peer) {
265
+ SSL_free(conn->ssl);
266
+ SSL_CTX_free(conn->ctx);
267
+ return sek_strdup(pool, "server presented no certificate");
268
+ }
269
+ X509_free(peer);
270
+ }
271
+
272
+ *out = conn;
273
+
274
+ return NULL;
275
+ }
276
+
277
+ long sek_tls_write(sek_tls_conn *conn, const char *data, size_t len, sek_err *err) {
278
+ int wrote = SSL_write(conn->ssl, data, (int)len);
279
+
280
+ if (0 >= wrote) {
281
+ *err = sslreason(conn->pool, conn->ssl, wrote);
282
+ return -1;
283
+ }
284
+
285
+ return wrote;
286
+ }
287
+
288
+ long sek_tls_read(sek_tls_conn *conn, char *data, size_t len, sek_err *err) {
289
+ int got = SSL_read(conn->ssl, data, (int)len);
290
+
291
+ if (0 < got) {
292
+ return got;
293
+ }
294
+
295
+ {
296
+ int why = SSL_get_error(conn->ssl, got);
297
+
298
+ /* A clean close_notify is the end of the body. */
299
+ if (SSL_ERROR_ZERO_RETURN == why) {
300
+ return 0;
301
+ }
302
+
303
+ /* SSL_ERROR_SYSCALL is two different things and they must not be
304
+ * collapsed. errno 0 means the peer closed WITHOUT close_notify,
305
+ * which is the ordinary end of a `Connection: close` exchange -
306
+ * refusing it would turn every such response into an unreachable
307
+ * store. EAGAIN means the socket's own deadline fired: the body is
308
+ * TRUNCATED, and reporting that as end-of-stream would hand a half
309
+ * response to the parser and call whatever it made of it an answer. */
310
+ /* OpenSSL 3.0 reports a peer that closed without close_notify as
311
+ * SSL_ERROR_SSL with this reason rather than as SSL_ERROR_SYSCALL.
312
+ * It is the same ordinary end of a `Connection: close` exchange, so
313
+ * it is read the same way - and the HTTP framing above still decides
314
+ * whether what arrived is a whole response. */
315
+ if (SSL_ERROR_SSL == why &&
316
+ SSL_R_UNEXPECTED_EOF_WHILE_READING == ERR_GET_REASON(ERR_peek_error())) {
317
+ while (0 != ERR_get_error()) {
318
+ }
319
+ return 0;
320
+ }
321
+
322
+ if (SSL_ERROR_SYSCALL == why) {
323
+ if (EAGAIN == errno || EWOULDBLOCK == errno) {
324
+ *err = "timed out";
325
+ return -1;
326
+ }
327
+ if (0 == errno) {
328
+ return 0;
329
+ }
330
+ *err = strerror(errno);
331
+ return -1;
332
+ }
333
+ }
334
+
335
+ *err = sslreason(conn->pool, conn->ssl, got);
336
+
337
+ return -1;
338
+ }
339
+
340
+ void sek_tls_close(sek_tls_conn *conn) {
341
+ if (NULL == conn) {
342
+ return;
343
+ }
344
+
345
+ if (NULL != conn->ssl) {
346
+ SSL_shutdown(conn->ssl);
347
+ SSL_free(conn->ssl);
348
+ conn->ssl = NULL;
349
+ }
350
+
351
+ if (NULL != conn->ctx) {
352
+ SSL_CTX_free(conn->ctx);
353
+ conn->ctx = NULL;
354
+ }
355
+ }
356
+
357
+ /* ---- PEM ----------------------------------------------------------- */
358
+
359
+
360
+ /* The trust-anchor reader, HERE rather than beside the base64 it uses,
361
+ * because tls.c is its only caller and an object nothing else pulls is an
362
+ * object no other plugin has to carry.
363
+ *
364
+ * Certificates only: no header handling, no other label, no private keys.
365
+ * Trust anchors are all this port ever parses out of a PEM file. */
366
+ static sek_ders *sek_pemcerts(sek_pool *pool, const char *text) {
367
+ static const char OPEN[] = "-----BEGIN CERTIFICATE-----";
368
+ static const char CLOSE[] = "-----END CERTIFICATE-----";
369
+
370
+ sek_ders *out = (sek_ders *)sek_alloc(pool, sizeof(sek_ders));
371
+ size_t cap = 8;
372
+ const char *rest = text;
373
+
374
+ out->items = (unsigned char **)sek_alloc(pool, cap * sizeof(unsigned char *));
375
+ out->lens = (size_t *)sek_alloc(pool, cap * sizeof(size_t));
376
+ out->len = 0;
377
+
378
+ while (NULL != rest) {
379
+ const char *start = strstr(rest, OPEN);
380
+ const char *body;
381
+ const char *end;
382
+ char *span;
383
+ size_t derlen = 0;
384
+ unsigned char *der;
385
+
386
+ if (NULL == start) {
387
+ break;
388
+ }
389
+
390
+ body = start + sizeof(OPEN) - 1;
391
+ end = strstr(body, CLOSE);
392
+ if (NULL == end) {
393
+ break;
394
+ }
395
+
396
+ span = sek_strndup(pool, body, (size_t)(end - body));
397
+ der = sek_unbase64(pool, span, &derlen);
398
+
399
+ if (NULL != der && 0 < derlen) {
400
+ if (out->len == cap) {
401
+ size_t bigger = cap * 2;
402
+ unsigned char **items =
403
+ (unsigned char **)sek_alloc(pool, bigger * sizeof(unsigned char *));
404
+ size_t *lens = (size_t *)sek_alloc(pool, bigger * sizeof(size_t));
405
+ memcpy(items, out->items, out->len * sizeof(unsigned char *));
406
+ memcpy(lens, out->lens, out->len * sizeof(size_t));
407
+ out->items = items;
408
+ out->lens = lens;
409
+ cap = bigger;
410
+ }
411
+ out->items[out->len] = der;
412
+ out->lens[out->len] = derlen;
413
+ out->len++;
414
+ }
415
+
416
+ rest = end + sizeof(CLOSE) - 1;
417
+ }
418
+
419
+ return out;
420
+ }
@@ -0,0 +1,86 @@
1
+ // VENDORED: @voxgig/sekreto sdk-20260908-1556-0 (c/src/internal.h)
2
+ // Source: https://github.com/voxgig/sekreto @ 1267ee2e5f49566bc92695bc9eb3a60ef4924998 [tag: sdk-20260908-1556-0]
3
+ // License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
4
+ /* What the CORE's own files share, and a consumer never sees: the string
5
+ * helpers and the one local-file read the four built-in kinds need.
6
+ *
7
+ * THE PLUGINS SEE IT TOO, and that direction is the whole point. A plugin
8
+ * compiles against this header and links against the core archive; the
9
+ * core names nothing under `plugins/`, so a build of the core cannot pull
10
+ * one in. Everything a plugin needs that the core must not link - the
11
+ * HTTP transport, TLS, the SHA-256 primitives, a child process - is in
12
+ * `plugins/support.h` instead.
13
+ *
14
+ * Nothing declared here opens a socket, spawns a child or hashes
15
+ * anything. `make check-core` reads the core archive's own list of
16
+ * undefined symbols and says so.
17
+ */
18
+
19
+ #ifndef VOXGIG_SEKRETO_INTERNAL_H
20
+ #define VOXGIG_SEKRETO_INTERNAL_H
21
+
22
+ #include <stddef.h>
23
+
24
+ #include "sekreto.h"
25
+
26
+ /* ---- string helpers ------------------------------------------------ */
27
+
28
+ int sek_empty(const char *text);
29
+ const char *sek_first(const char *a, const char *b);
30
+ /* The first candidate that is set and non-empty, or "". */
31
+ const char *sek_first3(const char *a, const char *b, const char *c);
32
+ const char *sek_orempty(const char *text);
33
+ int sek_has_prefix(const char *text, const char *prefix);
34
+ int sek_contains(const char *hay, const char *needle);
35
+ char *sek_trimslash(sek_pool *pool, const char *text);
36
+ char *sek_bareurl(sek_pool *pool, const char *url);
37
+ char sek_upper(char ch);
38
+ char sek_lower(char ch);
39
+ char *sek_lowercase(sek_pool *pool, const char *text);
40
+
41
+ /* ---- reading a local file ------------------------------------------ */
42
+
43
+ /* The whole file, or NULL with `*why` set to errno.
44
+ *
45
+ * This is the FLOOR of what a built-in kind may do - `dotenv` reads a
46
+ * `.env`, `file` reads a mounted secret directory - and it is the reason
47
+ * the line between core and plugin is "reads at most a local file"
48
+ * rather than "imports nothing". */
49
+ char *sek_readfile(sek_pool *pool, const char *path, int *why);
50
+
51
+ /* Does this read failure mean "no secrets here", rather than "I could not
52
+ * answer"?
53
+ *
54
+ * Absence is a MISS and the chain carries on; anything else - permission
55
+ * denied, an unreadable mount, a failing disk - is an ERROR, because
56
+ * returning a miss there falls silently through to a weaker store.
57
+ *
58
+ * ENOENT and ENOTDIR are the two absence codes: a missing file, a missing
59
+ * directory, and a path whose parent is a plain file. EACCES is NOT one
60
+ * of them, which is the case the rule exists for - the obvious spelling,
61
+ * an `exists()` predicate, answers false for a locked mount and would
62
+ * turn it into a miss. */
63
+ int sek_absent(int why);
64
+
65
+ /* ---- the construction slot ----------------------------------------- */
66
+
67
+ /* HOW A PROVIDER CROSSES THE PLUGIN BOUNDARY.
68
+ *
69
+ * voxgig/plugin's value model carries numbers and strings, never
70
+ * pointers, and its Definition carries no context. So for the duration of
71
+ * one sek_new the pool travels to each kind's `define` through a
72
+ * file-scope slot, and each `define` exports the INDEX of the provider it
73
+ * built; sek_new reads the index back and looks the pointer up here. It
74
+ * is the shape the zig port arrived at, and the shape plugin's own C port
75
+ * uses for its pending error.
76
+ *
77
+ * This is why sek_new is not reentrant, and it says so. */
78
+ /* A spec as the options map its plugin instance is declared with: the
79
+ * spec's own key names, the shape a config document would have. */
80
+ Value *sek_optionsof(const sek_spec *spec);
81
+
82
+ void sek_build_begin(sek_pool *pool);
83
+ void sek_build_end(void);
84
+ sek_provider *sek_build_at(double index);
85
+
86
+ #endif /* VOXGIG_SEKRETO_INTERNAL_H */