@voxgig/sdkgen 4.46.0 → 4.48.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 (1965) hide show
  1. package/bin/voxgig-sdkgen +1 -1
  2. package/dist/action/check.js +61 -4
  3. package/dist/action/check.js.map +1 -1
  4. package/dist/action/doctor.d.ts +5 -0
  5. package/dist/action/doctor.js +51 -6
  6. package/dist/action/doctor.js.map +1 -1
  7. package/dist/action/package.d.ts +1 -1
  8. package/dist/action/package.js +6 -16
  9. package/dist/action/package.js.map +1 -1
  10. package/dist/action/remove.js +15 -4
  11. package/dist/action/remove.js.map +1 -1
  12. package/dist/action/resolve.d.ts +1 -0
  13. package/dist/action/resolve.js +10 -4
  14. package/dist/action/resolve.js.map +1 -1
  15. package/dist/action/target.js +55 -29
  16. package/dist/action/target.js.map +1 -1
  17. package/dist/admin/status.d.ts +7 -1
  18. package/dist/admin/status.js +34 -5
  19. package/dist/admin/status.js.map +1 -1
  20. package/dist/cmp/AgentGuide.js +53 -32
  21. package/dist/cmp/AgentGuide.js.map +1 -1
  22. package/dist/cmp/AgentGuideContent.d.ts +3 -3
  23. package/dist/cmp/AgentGuideContent.js +26 -19
  24. package/dist/cmp/AgentGuideContent.js.map +1 -1
  25. package/dist/cmp/AgentGuideFeature.js +14 -6
  26. package/dist/cmp/AgentGuideFeature.js.map +1 -1
  27. package/dist/cmp/AgentGuideTop.js +25 -16
  28. package/dist/cmp/AgentGuideTop.js.map +1 -1
  29. package/dist/cmp/Changelog.js +37 -7
  30. package/dist/cmp/Changelog.js.map +1 -1
  31. package/dist/cmp/Deploy.js +67 -21
  32. package/dist/cmp/Deploy.js.map +1 -1
  33. package/dist/cmp/Entity.js +1 -1
  34. package/dist/cmp/Entity.js.map +1 -1
  35. package/dist/cmp/ExternalTarget.js +5 -0
  36. package/dist/cmp/ExternalTarget.js.map +1 -1
  37. package/dist/cmp/Feature.js +2 -2
  38. package/dist/cmp/Feature.js.map +1 -1
  39. package/dist/cmp/FeatureDocs.d.ts +1 -0
  40. package/dist/cmp/FeatureDocs.js +2 -1
  41. package/dist/cmp/FeatureDocs.js.map +1 -1
  42. package/dist/cmp/License.d.ts +3 -1
  43. package/dist/cmp/License.js +25 -7
  44. package/dist/cmp/License.js.map +1 -1
  45. package/dist/cmp/Main.js +1 -1
  46. package/dist/cmp/Main.js.map +1 -1
  47. package/dist/cmp/PublishWorkflow.js +63 -53
  48. package/dist/cmp/PublishWorkflow.js.map +1 -1
  49. package/dist/cmp/Readme.js +0 -2
  50. package/dist/cmp/Readme.js.map +1 -1
  51. package/dist/cmp/ReadmeErrors.js +77 -77
  52. package/dist/cmp/ReadmeErrors.js.map +1 -1
  53. package/dist/cmp/ReadmeExplanation.js +5 -10
  54. package/dist/cmp/ReadmeExplanation.js.map +1 -1
  55. package/dist/cmp/ReadmeFeatures.js +13 -9
  56. package/dist/cmp/ReadmeFeatures.js.map +1 -1
  57. package/dist/cmp/ReadmeIntro.js +1 -1
  58. package/dist/cmp/ReadmeIntro.js.map +1 -1
  59. package/dist/cmp/ReadmeModel.js +15 -11
  60. package/dist/cmp/ReadmeModel.js.map +1 -1
  61. package/dist/cmp/ReadmeOptions.js +3 -11
  62. package/dist/cmp/ReadmeOptions.js.map +1 -1
  63. package/dist/cmp/ReadmeQuick.js +10 -2
  64. package/dist/cmp/ReadmeQuick.js.map +1 -1
  65. package/dist/cmp/ReadmeRefFeatures.js +34 -30
  66. package/dist/cmp/ReadmeRefFeatures.js.map +1 -1
  67. package/dist/cmp/ReadmeStation.js +3 -3
  68. package/dist/cmp/ReadmeStation.js.map +1 -1
  69. package/dist/cmp/ReadmeTop.js +135 -102
  70. package/dist/cmp/ReadmeTop.js.map +1 -1
  71. package/dist/cmp/Registered.js +1 -1
  72. package/dist/cmp/Registered.js.map +1 -1
  73. package/dist/cmp/Security.js +23 -3
  74. package/dist/cmp/Security.js.map +1 -1
  75. package/dist/cmp/Test.js +1 -1
  76. package/dist/cmp/Test.js.map +1 -1
  77. package/dist/helpers/alongside.d.ts +2 -3
  78. package/dist/helpers/alongside.js +16 -15
  79. package/dist/helpers/alongside.js.map +1 -1
  80. package/dist/helpers/applicability.d.ts +2 -1
  81. package/dist/helpers/applicability.js +14 -1
  82. package/dist/helpers/applicability.js.map +1 -1
  83. package/dist/helpers/canonSpec.d.ts +5 -1
  84. package/dist/helpers/canonSpec.js +44 -10
  85. package/dist/helpers/canonSpec.js.map +1 -1
  86. package/dist/helpers/clientOptions.d.ts +9 -0
  87. package/dist/helpers/clientOptions.js +44 -0
  88. package/dist/helpers/clientOptions.js.map +1 -0
  89. package/dist/helpers/component.js +9 -1
  90. package/dist/helpers/component.js.map +1 -1
  91. package/dist/helpers/consumer.d.ts +10 -0
  92. package/dist/helpers/consumer.js +42 -0
  93. package/dist/helpers/consumer.js.map +1 -0
  94. package/dist/helpers/definitionPlan.js +0 -1
  95. package/dist/helpers/definitionPlan.js.map +1 -1
  96. package/dist/helpers/doctext.js +10 -1
  97. package/dist/helpers/doctext.js.map +1 -1
  98. package/dist/helpers/facts.js +198 -4
  99. package/dist/helpers/facts.js.map +1 -1
  100. package/dist/helpers/flowGuard.d.ts +1 -1
  101. package/dist/helpers/flowGuard.js +21 -8
  102. package/dist/helpers/flowGuard.js.map +1 -1
  103. package/dist/helpers/generated.d.ts +1 -0
  104. package/dist/helpers/generated.js +1 -1
  105. package/dist/helpers/generated.js.map +1 -1
  106. package/dist/helpers/graphqlPoint.d.ts +2 -1
  107. package/dist/helpers/graphqlPoint.js +17 -0
  108. package/dist/helpers/graphqlPoint.js.map +1 -1
  109. package/dist/helpers/guardModel.d.ts +2 -0
  110. package/dist/helpers/guardModel.js +41 -0
  111. package/dist/helpers/guardModel.js.map +1 -0
  112. package/dist/helpers/manifest.d.ts +2 -1
  113. package/dist/helpers/manifest.js +16 -0
  114. package/dist/helpers/manifest.js.map +1 -1
  115. package/dist/helpers/mcpTools.d.ts +3 -2
  116. package/dist/helpers/mcpTools.js +9 -3
  117. package/dist/helpers/mcpTools.js.map +1 -1
  118. package/dist/helpers/naming.js +3 -2
  119. package/dist/helpers/naming.js.map +1 -1
  120. package/dist/helpers/opShape.d.ts +8 -2
  121. package/dist/helpers/opShape.js +48 -18
  122. package/dist/helpers/opShape.js.map +1 -1
  123. package/dist/helpers/optional.d.ts +0 -1
  124. package/dist/helpers/optional.js +0 -1
  125. package/dist/helpers/optional.js.map +1 -1
  126. package/dist/helpers/optspec.js +16 -4
  127. package/dist/helpers/optspec.js.map +1 -1
  128. package/dist/helpers/packageMeta.d.ts +7 -4
  129. package/dist/helpers/packageMeta.js +130 -47
  130. package/dist/helpers/packageMeta.js.map +1 -1
  131. package/dist/helpers/placement.d.ts +15 -0
  132. package/dist/helpers/placement.js +76 -0
  133. package/dist/helpers/placement.js.map +1 -0
  134. package/dist/helpers/readerdir.d.ts +4 -0
  135. package/dist/helpers/readerdir.js +26 -0
  136. package/dist/helpers/readerdir.js.map +1 -0
  137. package/dist/helpers/semver.d.ts +2 -1
  138. package/dist/helpers/semver.js +21 -0
  139. package/dist/helpers/semver.js.map +1 -1
  140. package/dist/helpers/serverVars.js +3 -2
  141. package/dist/helpers/serverVars.js.map +1 -1
  142. package/dist/helpers/shipped.d.ts +2 -1
  143. package/dist/helpers/shipped.js +12 -0
  144. package/dist/helpers/shipped.js.map +1 -1
  145. package/dist/helpers/sourcestring.d.ts +4 -0
  146. package/dist/helpers/sourcestring.js +49 -0
  147. package/dist/helpers/sourcestring.js.map +1 -0
  148. package/dist/helpers/stdrep.d.ts +1 -1
  149. package/dist/helpers/stdrep.js +8 -4
  150. package/dist/helpers/stdrep.js.map +1 -1
  151. package/dist/helpers/surface.d.ts +12 -0
  152. package/dist/helpers/surface.js +81 -0
  153. package/dist/helpers/surface.js.map +1 -0
  154. package/dist/helpers/targetguard.d.ts +13 -0
  155. package/dist/helpers/targetguard.js +65 -0
  156. package/dist/helpers/targetguard.js.map +1 -0
  157. package/dist/helpers/testPolicy.js +3 -3
  158. package/dist/helpers/testPolicy.js.map +1 -1
  159. package/dist/helpers/text.d.ts +3 -1
  160. package/dist/helpers/text.js +16 -0
  161. package/dist/helpers/text.js.map +1 -1
  162. package/dist/helpers/textguard.d.ts +31 -0
  163. package/dist/helpers/textguard.js +157 -0
  164. package/dist/helpers/textguard.js.map +1 -0
  165. package/dist/helpers/title.d.ts +4 -0
  166. package/dist/helpers/title.js +52 -0
  167. package/dist/helpers/title.js.map +1 -0
  168. package/dist/sdkgen.d.ts +15 -11
  169. package/dist/sdkgen.js +77 -71
  170. package/dist/sdkgen.js.map +1 -1
  171. package/dist/testkit.d.ts +6 -2
  172. package/dist/testkit.js +4 -1
  173. package/dist/testkit.js.map +1 -1
  174. package/dist/tsconfig.tsbuildinfo +1 -1
  175. package/dist/utility.js +12 -4
  176. package/dist/utility.js.map +1 -1
  177. package/model/fact.aontu +106 -0
  178. package/model/sdkgen.aontu +11 -1
  179. package/package.json +1 -1
  180. package/project/.sdk/model/feature/netsim.aontu +1 -1
  181. package/project/.sdk/model/feature/secrets.aontu +1 -0
  182. package/project/.sdk/model/feature/test.aontu +1 -1
  183. package/project/.sdk/model/feature/validate.aontu +1 -1
  184. package/project/.sdk/model/target/c.aontu +1 -0
  185. package/project/.sdk/model/target/clojure.aontu +1 -0
  186. package/project/.sdk/model/target/cpp.aontu +1 -0
  187. package/project/.sdk/model/target/csharp.aontu +1 -0
  188. package/project/.sdk/model/target/elixir.aontu +1 -0
  189. package/project/.sdk/model/target/go-cli.aontu +5 -5
  190. package/project/.sdk/model/target/go-mcp.aontu +6 -8
  191. package/project/.sdk/model/target/go.aontu +1 -1
  192. package/project/.sdk/model/target/java.aontu +1 -0
  193. package/project/.sdk/model/target/kotlin.aontu +1 -0
  194. package/project/.sdk/model/target/ocaml.aontu +1 -0
  195. package/project/.sdk/model/target/perl.aontu +1 -0
  196. package/project/.sdk/model/target/py-data.aontu +2 -0
  197. package/project/.sdk/model/target/rust.aontu +1 -0
  198. package/project/.sdk/model/target/scala.aontu +1 -0
  199. package/project/.sdk/model/target/zig.aontu +1 -0
  200. package/project/.sdk/src/cmp/c/Config_c.ts +8 -33
  201. package/project/.sdk/src/cmp/c/EntityTypes_c.ts +6 -5
  202. package/project/.sdk/src/cmp/c/Main_c.ts +4 -0
  203. package/project/.sdk/src/cmp/c/PrepareAuth_c.ts +9 -19
  204. package/project/.sdk/src/cmp/c/ReadmeEntity_c.ts +8 -10
  205. package/project/.sdk/src/cmp/c/ReadmeExamplesTest_c.ts +12 -4
  206. package/project/.sdk/src/cmp/c/ReadmeExplanation_c.ts +4 -2
  207. package/project/.sdk/src/cmp/c/ReadmeHowto_c.ts +18 -22
  208. package/project/.sdk/src/cmp/c/ReadmeInstall_c.ts +19 -15
  209. package/project/.sdk/src/cmp/c/ReadmeIntro_c.ts +5 -7
  210. package/project/.sdk/src/cmp/c/ReadmeModel_c.ts +32 -33
  211. package/project/.sdk/src/cmp/c/ReadmeQuick_c.ts +29 -12
  212. package/project/.sdk/src/cmp/c/ReadmeRef_c.ts +35 -26
  213. package/project/.sdk/src/cmp/c/ReadmeTopHowto_c.ts +5 -4
  214. package/project/.sdk/src/cmp/c/ReadmeTopQuick_c.ts +19 -6
  215. package/project/.sdk/src/cmp/c/TestClean_c.ts +298 -22
  216. package/project/.sdk/src/cmp/c/TestDirect_c.ts +1 -1
  217. package/project/.sdk/src/cmp/c/fragment/Entity.fragment.c +9 -9
  218. package/project/.sdk/src/cmp/c/fragment/EntityCreateOp.fragment.c +0 -1
  219. package/project/.sdk/src/cmp/c/fragment/EntityLoadOp.fragment.c +0 -1
  220. package/project/.sdk/src/cmp/c/fragment/EntityPatchOp.fragment.c +0 -1
  221. package/project/.sdk/src/cmp/c/fragment/EntityRemoveOp.fragment.c +0 -1
  222. package/project/.sdk/src/cmp/c/fragment/EntityUpdateOp.fragment.c +0 -1
  223. package/project/.sdk/src/cmp/c/fragment/Main.fragment.c +19 -7
  224. package/project/.sdk/src/cmp/clojure/Config_clojure.ts +4 -25
  225. package/project/.sdk/src/cmp/clojure/Main_clojure.ts +4 -0
  226. package/project/.sdk/src/cmp/clojure/PrepareAuth_clojure.ts +10 -21
  227. package/project/.sdk/src/cmp/clojure/ReadmeEntity_clojure.ts +8 -10
  228. package/project/.sdk/src/cmp/clojure/ReadmeExamplesTest_clojure.ts +13 -5
  229. package/project/.sdk/src/cmp/clojure/ReadmeExplanation_clojure.ts +13 -3
  230. package/project/.sdk/src/cmp/clojure/ReadmeHowto_clojure.ts +9 -8
  231. package/project/.sdk/src/cmp/clojure/ReadmeInstall_clojure.ts +13 -11
  232. package/project/.sdk/src/cmp/clojure/ReadmeIntro_clojure.ts +5 -7
  233. package/project/.sdk/src/cmp/clojure/ReadmeModel_clojure.ts +24 -33
  234. package/project/.sdk/src/cmp/clojure/ReadmeQuick_clojure.ts +21 -10
  235. package/project/.sdk/src/cmp/clojure/ReadmeRef_clojure.ts +23 -23
  236. package/project/.sdk/src/cmp/clojure/ReadmeTopHowto_clojure.ts +5 -4
  237. package/project/.sdk/src/cmp/clojure/ReadmeTopQuick_clojure.ts +11 -4
  238. package/project/.sdk/src/cmp/clojure/Schema_clojure.ts +2 -1
  239. package/project/.sdk/src/cmp/clojure/TestClean_clojure.ts +177 -12
  240. package/project/.sdk/src/cmp/clojure/fragment/Entity.fragment.clj +11 -12
  241. package/project/.sdk/src/cmp/clojure/fragment/EntityLoadOp.fragment.clj +1 -1
  242. package/project/.sdk/src/cmp/clojure/fragment/EntityRemoveOp.fragment.clj +2 -2
  243. package/project/.sdk/src/cmp/cpp/Config_cpp.ts +2 -17
  244. package/project/.sdk/src/cmp/cpp/EntityTypes_cpp.ts +4 -9
  245. package/project/.sdk/src/cmp/cpp/Main_cpp.ts +4 -0
  246. package/project/.sdk/src/cmp/cpp/PrepareAuth_cpp.ts +10 -21
  247. package/project/.sdk/src/cmp/cpp/ReadmeEntity_cpp.ts +10 -12
  248. package/project/.sdk/src/cmp/cpp/ReadmeExamplesTest_cpp.ts +12 -4
  249. package/project/.sdk/src/cmp/cpp/ReadmeExplanation_cpp.ts +5 -2
  250. package/project/.sdk/src/cmp/cpp/ReadmeHowto_cpp.ts +28 -11
  251. package/project/.sdk/src/cmp/cpp/ReadmeInstall_cpp.ts +16 -11
  252. package/project/.sdk/src/cmp/cpp/ReadmeIntro_cpp.ts +5 -7
  253. package/project/.sdk/src/cmp/cpp/ReadmeModel_cpp.ts +26 -35
  254. package/project/.sdk/src/cmp/cpp/ReadmeQuick_cpp.ts +23 -13
  255. package/project/.sdk/src/cmp/cpp/ReadmeRef_cpp.ts +30 -29
  256. package/project/.sdk/src/cmp/cpp/ReadmeTopHowto_cpp.ts +5 -4
  257. package/project/.sdk/src/cmp/cpp/ReadmeTopQuick_cpp.ts +13 -7
  258. package/project/.sdk/src/cmp/cpp/TestClean_cpp.ts +285 -14
  259. package/project/.sdk/src/cmp/cpp/TestEntity_cpp.ts +44 -24
  260. package/project/.sdk/src/cmp/cpp/fragment/EntityCreateOp.fragment.cpp +0 -1
  261. package/project/.sdk/src/cmp/cpp/fragment/EntityLoadOp.fragment.cpp +0 -1
  262. package/project/.sdk/src/cmp/cpp/fragment/EntityPatchOp.fragment.cpp +0 -1
  263. package/project/.sdk/src/cmp/cpp/fragment/EntityRemoveOp.fragment.cpp +0 -1
  264. package/project/.sdk/src/cmp/cpp/fragment/EntityUpdateOp.fragment.cpp +0 -1
  265. package/project/.sdk/src/cmp/csharp/Config_csharp.ts +5 -27
  266. package/project/.sdk/src/cmp/csharp/EntityTypes_csharp.ts +4 -5
  267. package/project/.sdk/src/cmp/csharp/Main_csharp.ts +5 -1
  268. package/project/.sdk/src/cmp/csharp/Package_csharp.ts +2 -1
  269. package/project/.sdk/src/cmp/csharp/PrepareAuth_csharp.ts +9 -20
  270. package/project/.sdk/src/cmp/csharp/ReadmeEntity_csharp.ts +10 -12
  271. package/project/.sdk/src/cmp/csharp/ReadmeExamplesTest_csharp.ts +18 -10
  272. package/project/.sdk/src/cmp/csharp/ReadmeExplanation_csharp.ts +1 -1
  273. package/project/.sdk/src/cmp/csharp/ReadmeHowto_csharp.ts +24 -12
  274. package/project/.sdk/src/cmp/csharp/ReadmeInstall_csharp.ts +9 -6
  275. package/project/.sdk/src/cmp/csharp/ReadmeIntro_csharp.ts +4 -6
  276. package/project/.sdk/src/cmp/csharp/ReadmeModel_csharp.ts +25 -35
  277. package/project/.sdk/src/cmp/csharp/ReadmeQuick_csharp.ts +22 -11
  278. package/project/.sdk/src/cmp/csharp/ReadmeRef_csharp.ts +25 -25
  279. package/project/.sdk/src/cmp/csharp/ReadmeTopHowto_csharp.ts +5 -4
  280. package/project/.sdk/src/cmp/csharp/ReadmeTopQuick_csharp.ts +11 -4
  281. package/project/.sdk/src/cmp/csharp/TestClean_csharp.ts +420 -27
  282. package/project/.sdk/src/cmp/csharp/TestDirect_csharp.ts +13 -13
  283. package/project/.sdk/src/cmp/csharp/TestEntity_csharp.ts +34 -35
  284. package/project/.sdk/src/cmp/csharp/fragment/EntityBase.fragment.cs +8 -7
  285. package/project/.sdk/src/cmp/csharp/fragment/Main.fragment.cs +4 -4
  286. package/project/.sdk/src/cmp/elixir/Config_elixir.ts +5 -26
  287. package/project/.sdk/src/cmp/elixir/EntityTypes_elixir.ts +8 -6
  288. package/project/.sdk/src/cmp/elixir/Main_elixir.ts +8 -2
  289. package/project/.sdk/src/cmp/elixir/Package_elixir.ts +3 -3
  290. package/project/.sdk/src/cmp/elixir/PrepareAuth_elixir.ts +10 -18
  291. package/project/.sdk/src/cmp/elixir/ReadmeEntity_elixir.ts +10 -12
  292. package/project/.sdk/src/cmp/elixir/ReadmeExamplesTest_elixir.ts +12 -5
  293. package/project/.sdk/src/cmp/elixir/ReadmeExplanation_elixir.ts +4 -2
  294. package/project/.sdk/src/cmp/elixir/ReadmeHowto_elixir.ts +13 -21
  295. package/project/.sdk/src/cmp/elixir/ReadmeInstall_elixir.ts +12 -8
  296. package/project/.sdk/src/cmp/elixir/ReadmeIntro_elixir.ts +5 -7
  297. package/project/.sdk/src/cmp/elixir/ReadmeModel_elixir.ts +24 -35
  298. package/project/.sdk/src/cmp/elixir/ReadmeQuick_elixir.ts +22 -11
  299. package/project/.sdk/src/cmp/elixir/ReadmeRef_elixir.ts +24 -24
  300. package/project/.sdk/src/cmp/elixir/ReadmeTopHowto_elixir.ts +5 -4
  301. package/project/.sdk/src/cmp/elixir/ReadmeTopQuick_elixir.ts +11 -4
  302. package/project/.sdk/src/cmp/elixir/Schema_elixir.ts +2 -1
  303. package/project/.sdk/src/cmp/elixir/TestClean_elixir.ts +231 -12
  304. package/project/.sdk/src/cmp/elixir/TestEntity_elixir.ts +3 -3
  305. package/project/.sdk/src/cmp/elixir/app_elixir.ts +14 -0
  306. package/project/.sdk/src/cmp/elixir/fragment/Main.fragment.ex +4 -4
  307. package/project/.sdk/src/cmp/go/Config_go.ts +16 -31
  308. package/project/.sdk/src/cmp/go/EntityTypes_go.ts +13 -7
  309. package/project/.sdk/src/cmp/go/Main_go.ts +10 -12
  310. package/project/.sdk/src/cmp/go/PrepareAuth_go.ts +12 -21
  311. package/project/.sdk/src/cmp/go/ReadmeEntity_go.ts +5 -5
  312. package/project/.sdk/src/cmp/go/ReadmeExamplesTest_go.ts +20 -9
  313. package/project/.sdk/src/cmp/go/ReadmeExplanation_go.ts +4 -2
  314. package/project/.sdk/src/cmp/go/ReadmeHowto_go.ts +28 -13
  315. package/project/.sdk/src/cmp/go/ReadmeInstall_go.ts +11 -6
  316. package/project/.sdk/src/cmp/go/ReadmeIntro_go.ts +5 -4
  317. package/project/.sdk/src/cmp/go/ReadmeModel_go.ts +32 -34
  318. package/project/.sdk/src/cmp/go/ReadmeQuick_go.ts +16 -12
  319. package/project/.sdk/src/cmp/go/ReadmeRef_go.ts +32 -22
  320. package/project/.sdk/src/cmp/go/ReadmeTopHowto_go.ts +5 -4
  321. package/project/.sdk/src/cmp/go/ReadmeTopQuick_go.ts +7 -4
  322. package/project/.sdk/src/cmp/go/Schema_go.ts +2 -1
  323. package/project/.sdk/src/cmp/go/TestClean_go.ts +484 -45
  324. package/project/.sdk/src/cmp/go/TestDirect_go.ts +15 -13
  325. package/project/.sdk/src/cmp/go/TestEntity_go.ts +35 -35
  326. package/project/.sdk/src/cmp/go/fragment/Entity.fragment.go +1 -1
  327. package/project/.sdk/src/cmp/go/fragment/Main.fragment.go +14 -6
  328. package/project/.sdk/src/cmp/go-cli/Main_go-cli.ts +238 -96
  329. package/project/.sdk/src/cmp/go-cli/fragment/main.fragment.go +13 -12
  330. package/project/.sdk/src/cmp/go-cli/fragment/words.fragment.go +3 -8
  331. package/project/.sdk/src/cmp/go-mcp/Main_go-mcp.ts +183 -66
  332. package/project/.sdk/src/cmp/go-mcp/fragment/main.fragment.go +7 -7
  333. package/project/.sdk/src/cmp/java/Config_java.ts +8 -32
  334. package/project/.sdk/src/cmp/java/EntityTypes_java.ts +4 -5
  335. package/project/.sdk/src/cmp/java/Main_java.ts +5 -1
  336. package/project/.sdk/src/cmp/java/Package_java.ts +4 -7
  337. package/project/.sdk/src/cmp/java/PrepareAuth_java.ts +13 -11
  338. package/project/.sdk/src/cmp/java/ReadmeEntity_java.ts +10 -12
  339. package/project/.sdk/src/cmp/java/ReadmeExamplesTest_java.ts +17 -9
  340. package/project/.sdk/src/cmp/java/ReadmeExplanation_java.ts +1 -1
  341. package/project/.sdk/src/cmp/java/ReadmeHowto_java.ts +24 -12
  342. package/project/.sdk/src/cmp/java/ReadmeInstall_java.ts +8 -10
  343. package/project/.sdk/src/cmp/java/ReadmeIntro_java.ts +5 -7
  344. package/project/.sdk/src/cmp/java/ReadmeModel_java.ts +24 -35
  345. package/project/.sdk/src/cmp/java/ReadmeQuick_java.ts +12 -10
  346. package/project/.sdk/src/cmp/java/ReadmeRef_java.ts +25 -25
  347. package/project/.sdk/src/cmp/java/ReadmeTopHowto_java.ts +5 -4
  348. package/project/.sdk/src/cmp/java/ReadmeTopQuick_java.ts +3 -3
  349. package/project/.sdk/src/cmp/java/Schema_java.ts +2 -1
  350. package/project/.sdk/src/cmp/java/TestClean_java.ts +386 -19
  351. package/project/.sdk/src/cmp/java/TestDirect_java.ts +12 -11
  352. package/project/.sdk/src/cmp/java/TestEntity_java.ts +27 -27
  353. package/project/.sdk/src/cmp/java/fragment/EntityBase.fragment.java +8 -7
  354. package/project/.sdk/src/cmp/java/utility_java.ts +7 -23
  355. package/project/.sdk/src/cmp/js/Config_js.ts +13 -35
  356. package/project/.sdk/src/cmp/js/EntityBase_js.ts +1 -1
  357. package/project/.sdk/src/cmp/js/EntityTypes_js.ts +4 -5
  358. package/project/.sdk/src/cmp/js/Entity_js.ts +1 -1
  359. package/project/.sdk/src/cmp/js/Main_js.ts +6 -9
  360. package/project/.sdk/src/cmp/js/Package_js.ts +3 -2
  361. package/project/.sdk/src/cmp/js/PrepareAuth_js.ts +9 -17
  362. package/project/.sdk/src/cmp/js/ReadmeEntity_js.ts +12 -14
  363. package/project/.sdk/src/cmp/js/ReadmeExplanation_js.ts +1 -1
  364. package/project/.sdk/src/cmp/js/ReadmeHowto_js.ts +41 -16
  365. package/project/.sdk/src/cmp/js/ReadmeInstall_js.ts +9 -6
  366. package/project/.sdk/src/cmp/js/ReadmeIntro_js.ts +6 -3
  367. package/project/.sdk/src/cmp/js/ReadmeModel_js.ts +23 -37
  368. package/project/.sdk/src/cmp/js/ReadmeQuick_js.ts +15 -5
  369. package/project/.sdk/src/cmp/js/ReadmeRef_js.ts +31 -35
  370. package/project/.sdk/src/cmp/js/ReadmeTopHowto_js.ts +5 -4
  371. package/project/.sdk/src/cmp/js/ReadmeTopQuick_js.ts +12 -4
  372. package/project/.sdk/src/cmp/js/Schema_js.ts +2 -1
  373. package/project/.sdk/src/cmp/js/TestClean_js.ts +229 -13
  374. package/project/.sdk/src/cmp/js/TestDirect_js.ts +16 -14
  375. package/project/.sdk/src/cmp/js/TestEntity_js.ts +30 -28
  376. package/project/.sdk/src/cmp/js/TestLive_js.ts +7 -6
  377. package/project/.sdk/src/cmp/js/fragment/Direct.test.fragment.js +1 -1
  378. package/project/.sdk/src/cmp/js/fragment/Entity.test.fragment.js +1 -1
  379. package/project/.sdk/src/cmp/js/fragment/EntityBase.fragment.js +5 -4
  380. package/project/.sdk/src/cmp/js/fragment/EntityCreateOp.fragment.js +1 -2
  381. package/project/.sdk/src/cmp/js/fragment/EntityLoadOp.fragment.js +1 -2
  382. package/project/.sdk/src/cmp/js/fragment/EntityPatchOp.fragment.js +1 -2
  383. package/project/.sdk/src/cmp/js/fragment/EntityRemoveOp.fragment.js +1 -2
  384. package/project/.sdk/src/cmp/js/fragment/EntityUpdateOp.fragment.js +1 -2
  385. package/project/.sdk/src/cmp/js/fragment/Main.fragment.js +4 -4
  386. package/project/.sdk/src/cmp/kotlin/Config_kotlin.ts +3 -25
  387. package/project/.sdk/src/cmp/kotlin/EntityTypes_kotlin.ts +4 -5
  388. package/project/.sdk/src/cmp/kotlin/Main_kotlin.ts +5 -1
  389. package/project/.sdk/src/cmp/kotlin/Package_kotlin.ts +5 -5
  390. package/project/.sdk/src/cmp/kotlin/PrepareAuth_kotlin.ts +13 -12
  391. package/project/.sdk/src/cmp/kotlin/ReadmeEntity_kotlin.ts +10 -12
  392. package/project/.sdk/src/cmp/kotlin/ReadmeExamplesTest_kotlin.ts +17 -9
  393. package/project/.sdk/src/cmp/kotlin/ReadmeExplanation_kotlin.ts +1 -1
  394. package/project/.sdk/src/cmp/kotlin/ReadmeHowto_kotlin.ts +24 -12
  395. package/project/.sdk/src/cmp/kotlin/ReadmeInstall_kotlin.ts +8 -10
  396. package/project/.sdk/src/cmp/kotlin/ReadmeIntro_kotlin.ts +5 -7
  397. package/project/.sdk/src/cmp/kotlin/ReadmeModel_kotlin.ts +24 -35
  398. package/project/.sdk/src/cmp/kotlin/ReadmeQuick_kotlin.ts +23 -24
  399. package/project/.sdk/src/cmp/kotlin/ReadmeRef_kotlin.ts +25 -25
  400. package/project/.sdk/src/cmp/kotlin/ReadmeTopHowto_kotlin.ts +5 -4
  401. package/project/.sdk/src/cmp/kotlin/ReadmeTopQuick_kotlin.ts +12 -10
  402. package/project/.sdk/src/cmp/kotlin/Schema_kotlin.ts +2 -1
  403. package/project/.sdk/src/cmp/kotlin/TestClean_kotlin.ts +306 -18
  404. package/project/.sdk/src/cmp/kotlin/TestDirect_kotlin.ts +19 -8
  405. package/project/.sdk/src/cmp/kotlin/TestEntity_kotlin.ts +34 -24
  406. package/project/.sdk/src/cmp/kotlin/fragment/EntityBase.fragment.kt +8 -7
  407. package/project/.sdk/src/cmp/kotlin/utility_kotlin.ts +7 -23
  408. package/project/.sdk/src/cmp/lua/Config_lua.ts +16 -26
  409. package/project/.sdk/src/cmp/lua/EntityTypes_lua.ts +4 -5
  410. package/project/.sdk/src/cmp/lua/Main_lua.ts +5 -4
  411. package/project/.sdk/src/cmp/lua/Package_lua.ts +12 -6
  412. package/project/.sdk/src/cmp/lua/PrepareAuth_lua.ts +13 -12
  413. package/project/.sdk/src/cmp/lua/ReadmeEntity_lua.ts +10 -12
  414. package/project/.sdk/src/cmp/lua/ReadmeExamplesTest_lua.ts +12 -5
  415. package/project/.sdk/src/cmp/lua/ReadmeExplanation_lua.ts +5 -3
  416. package/project/.sdk/src/cmp/lua/ReadmeHowto_lua.ts +25 -13
  417. package/project/.sdk/src/cmp/lua/ReadmeInstall_lua.ts +5 -4
  418. package/project/.sdk/src/cmp/lua/ReadmeIntro_lua.ts +6 -5
  419. package/project/.sdk/src/cmp/lua/ReadmeModel_lua.ts +32 -43
  420. package/project/.sdk/src/cmp/lua/ReadmeQuick_lua.ts +22 -11
  421. package/project/.sdk/src/cmp/lua/ReadmeRef_lua.ts +22 -26
  422. package/project/.sdk/src/cmp/lua/ReadmeTopHowto_lua.ts +5 -4
  423. package/project/.sdk/src/cmp/lua/ReadmeTopQuick_lua.ts +11 -4
  424. package/project/.sdk/src/cmp/lua/Schema_lua.ts +2 -1
  425. package/project/.sdk/src/cmp/lua/TestClean_lua.ts +297 -13
  426. package/project/.sdk/src/cmp/lua/TestDirect_lua.ts +13 -12
  427. package/project/.sdk/src/cmp/lua/TestEntity_lua.ts +30 -30
  428. package/project/.sdk/src/cmp/lua/fragment/Entity.fragment.lua +10 -10
  429. package/project/.sdk/src/cmp/lua/fragment/Main.fragment.lua +4 -4
  430. package/project/.sdk/src/cmp/ocaml/Config_ocaml.ts +4 -20
  431. package/project/.sdk/src/cmp/ocaml/Main_ocaml.ts +4 -0
  432. package/project/.sdk/src/cmp/ocaml/Package_ocaml.ts +8 -5
  433. package/project/.sdk/src/cmp/ocaml/PrepareAuth_ocaml.ts +11 -24
  434. package/project/.sdk/src/cmp/ocaml/ReadmeEntity_ocaml.ts +8 -10
  435. package/project/.sdk/src/cmp/ocaml/ReadmeExamplesTest_ocaml.ts +11 -4
  436. package/project/.sdk/src/cmp/ocaml/ReadmeExplanation_ocaml.ts +1 -1
  437. package/project/.sdk/src/cmp/ocaml/ReadmeHowto_ocaml.ts +12 -20
  438. package/project/.sdk/src/cmp/ocaml/ReadmeInstall_ocaml.ts +12 -11
  439. package/project/.sdk/src/cmp/ocaml/ReadmeIntro_ocaml.ts +8 -10
  440. package/project/.sdk/src/cmp/ocaml/ReadmeModel_ocaml.ts +26 -35
  441. package/project/.sdk/src/cmp/ocaml/ReadmeQuick_ocaml.ts +22 -11
  442. package/project/.sdk/src/cmp/ocaml/ReadmeRef_ocaml.ts +24 -23
  443. package/project/.sdk/src/cmp/ocaml/ReadmeTopHowto_ocaml.ts +5 -4
  444. package/project/.sdk/src/cmp/ocaml/ReadmeTopQuick_ocaml.ts +11 -4
  445. package/project/.sdk/src/cmp/ocaml/TestClean_ocaml.ts +179 -14
  446. package/project/.sdk/src/cmp/ocaml/TestEntity_ocaml.ts +1 -1
  447. package/project/.sdk/src/cmp/ocaml/utility_ocaml.ts +0 -9
  448. package/project/.sdk/src/cmp/perl/Config_perl.ts +2 -16
  449. package/project/.sdk/src/cmp/perl/Main_perl.ts +3 -1
  450. package/project/.sdk/src/cmp/perl/PrepareAuth_perl.ts +12 -10
  451. package/project/.sdk/src/cmp/perl/ReadmeEntity_perl.ts +8 -10
  452. package/project/.sdk/src/cmp/perl/ReadmeExamplesTest_perl.ts +16 -10
  453. package/project/.sdk/src/cmp/perl/ReadmeExplanation_perl.ts +1 -1
  454. package/project/.sdk/src/cmp/perl/ReadmeHowto_perl.ts +25 -13
  455. package/project/.sdk/src/cmp/perl/ReadmeInstall_perl.ts +10 -9
  456. package/project/.sdk/src/cmp/perl/ReadmeIntro_perl.ts +4 -6
  457. package/project/.sdk/src/cmp/perl/ReadmeModel_perl.ts +24 -35
  458. package/project/.sdk/src/cmp/perl/ReadmeQuick_perl.ts +22 -11
  459. package/project/.sdk/src/cmp/perl/ReadmeRef_perl.ts +23 -23
  460. package/project/.sdk/src/cmp/perl/ReadmeTopHowto_perl.ts +5 -4
  461. package/project/.sdk/src/cmp/perl/ReadmeTopQuick_perl.ts +11 -4
  462. package/project/.sdk/src/cmp/perl/TestClean_perl.ts +407 -26
  463. package/project/.sdk/src/cmp/perl/TestDirect_perl.ts +13 -12
  464. package/project/.sdk/src/cmp/perl/TestEntity_perl.ts +29 -30
  465. package/project/.sdk/src/cmp/perl/fragment/Entity.fragment.pm +20 -11
  466. package/project/.sdk/src/cmp/perl/fragment/EntityLoadOp.fragment.pm +5 -5
  467. package/project/.sdk/src/cmp/perl/fragment/EntityRemoveOp.fragment.pm +3 -3
  468. package/project/.sdk/src/cmp/perl/fragment/Main.fragment.pm +10 -5
  469. package/project/.sdk/src/cmp/php/Config_php.ts +18 -33
  470. package/project/.sdk/src/cmp/php/EntityTypes_php.ts +4 -5
  471. package/project/.sdk/src/cmp/php/Main_php.ts +5 -9
  472. package/project/.sdk/src/cmp/php/PrepareAuth_php.ts +7 -17
  473. package/project/.sdk/src/cmp/php/ReadmeEntity_php.ts +10 -12
  474. package/project/.sdk/src/cmp/php/ReadmeExamplesTest_php.ts +15 -9
  475. package/project/.sdk/src/cmp/php/ReadmeExplanation_php.ts +5 -3
  476. package/project/.sdk/src/cmp/php/ReadmeHowto_php.ts +24 -12
  477. package/project/.sdk/src/cmp/php/ReadmeInstall_php.ts +8 -5
  478. package/project/.sdk/src/cmp/php/ReadmeIntro_php.ts +1 -1
  479. package/project/.sdk/src/cmp/php/ReadmeModel_php.ts +31 -37
  480. package/project/.sdk/src/cmp/php/ReadmeQuick_php.ts +22 -11
  481. package/project/.sdk/src/cmp/php/ReadmeRef_php.ts +32 -29
  482. package/project/.sdk/src/cmp/php/ReadmeTopHowto_php.ts +5 -4
  483. package/project/.sdk/src/cmp/php/ReadmeTopQuick_php.ts +11 -4
  484. package/project/.sdk/src/cmp/php/Schema_php.ts +2 -1
  485. package/project/.sdk/src/cmp/php/TestClean_php.ts +416 -39
  486. package/project/.sdk/src/cmp/php/TestDirect_php.ts +13 -12
  487. package/project/.sdk/src/cmp/php/TestEntity_php.ts +56 -31
  488. package/project/.sdk/src/cmp/php/fragment/Entity.fragment.php +8 -8
  489. package/project/.sdk/src/cmp/php/fragment/EntityCreateOp.fragment.php +1 -1
  490. package/project/.sdk/src/cmp/php/fragment/EntityListOp.fragment.php +1 -1
  491. package/project/.sdk/src/cmp/php/fragment/EntityLoadOp.fragment.php +3 -3
  492. package/project/.sdk/src/cmp/php/fragment/EntityPatchOp.fragment.php +1 -1
  493. package/project/.sdk/src/cmp/php/fragment/EntityRemoveOp.fragment.php +3 -3
  494. package/project/.sdk/src/cmp/php/fragment/EntityUpdateOp.fragment.php +1 -1
  495. package/project/.sdk/src/cmp/php/fragment/Main.fragment.php +4 -4
  496. package/project/.sdk/src/cmp/py/Config_py.ts +18 -33
  497. package/project/.sdk/src/cmp/py/EntityTypes_py.ts +4 -5
  498. package/project/.sdk/src/cmp/py/Main_py.ts +3 -9
  499. package/project/.sdk/src/cmp/py/PrepareAuth_py.ts +8 -19
  500. package/project/.sdk/src/cmp/py/ReadmeEntity_py.ts +10 -12
  501. package/project/.sdk/src/cmp/py/ReadmeExamplesTest_py.ts +21 -14
  502. package/project/.sdk/src/cmp/py/ReadmeExplanation_py.ts +25 -15
  503. package/project/.sdk/src/cmp/py/ReadmeHowto_py.ts +25 -13
  504. package/project/.sdk/src/cmp/py/ReadmeInstall_py.ts +5 -4
  505. package/project/.sdk/src/cmp/py/ReadmeIntro_py.ts +4 -6
  506. package/project/.sdk/src/cmp/py/ReadmeModel_py.ts +25 -36
  507. package/project/.sdk/src/cmp/py/ReadmeQuick_py.ts +11 -9
  508. package/project/.sdk/src/cmp/py/ReadmeRef_py.ts +28 -28
  509. package/project/.sdk/src/cmp/py/ReadmeTopHowto_py.ts +5 -4
  510. package/project/.sdk/src/cmp/py/ReadmeTopQuick_py.ts +3 -3
  511. package/project/.sdk/src/cmp/py/Schema_py.ts +2 -1
  512. package/project/.sdk/src/cmp/py/TestClean_py.ts +342 -28
  513. package/project/.sdk/src/cmp/py/TestDirect_py.ts +12 -11
  514. package/project/.sdk/src/cmp/py/TestEntity_py.ts +31 -31
  515. package/project/.sdk/src/cmp/py/fragment/Entity.fragment.py +10 -9
  516. package/project/.sdk/src/cmp/py/fragment/Main.fragment.py +4 -6
  517. package/project/.sdk/src/cmp/py-data/Main_py-data.ts +280 -145
  518. package/project/.sdk/src/cmp/rb/Config_rb.ts +16 -26
  519. package/project/.sdk/src/cmp/rb/Main_rb.ts +3 -9
  520. package/project/.sdk/src/cmp/rb/PrepareAuth_rb.ts +9 -18
  521. package/project/.sdk/src/cmp/rb/ReadmeEntity_rb.ts +10 -12
  522. package/project/.sdk/src/cmp/rb/ReadmeExamplesTest_rb.ts +15 -10
  523. package/project/.sdk/src/cmp/rb/ReadmeExplanation_rb.ts +5 -3
  524. package/project/.sdk/src/cmp/rb/ReadmeHowto_rb.ts +24 -12
  525. package/project/.sdk/src/cmp/rb/ReadmeInstall_rb.ts +8 -5
  526. package/project/.sdk/src/cmp/rb/ReadmeIntro_rb.ts +1 -1
  527. package/project/.sdk/src/cmp/rb/ReadmeModel_rb.ts +28 -37
  528. package/project/.sdk/src/cmp/rb/ReadmeQuick_rb.ts +22 -11
  529. package/project/.sdk/src/cmp/rb/ReadmeRef_rb.ts +27 -27
  530. package/project/.sdk/src/cmp/rb/ReadmeTopHowto_rb.ts +5 -4
  531. package/project/.sdk/src/cmp/rb/ReadmeTopQuick_rb.ts +11 -4
  532. package/project/.sdk/src/cmp/rb/Schema_rb.ts +2 -1
  533. package/project/.sdk/src/cmp/rb/TestClean_rb.ts +270 -23
  534. package/project/.sdk/src/cmp/rb/TestDirect_rb.ts +13 -12
  535. package/project/.sdk/src/cmp/rb/TestEntity_rb.ts +30 -30
  536. package/project/.sdk/src/cmp/rb/fragment/Entity.fragment.rb +9 -9
  537. package/project/.sdk/src/cmp/rb/fragment/EntityLoadOp.fragment.rb +1 -1
  538. package/project/.sdk/src/cmp/rb/fragment/EntityRemoveOp.fragment.rb +1 -1
  539. package/project/.sdk/src/cmp/rb/fragment/Main.fragment.rb +4 -4
  540. package/project/.sdk/src/cmp/rust/Config_rust.ts +4 -34
  541. package/project/.sdk/src/cmp/rust/EntityTypes_rust.ts +3 -4
  542. package/project/.sdk/src/cmp/rust/Main_rust.ts +6 -2
  543. package/project/.sdk/src/cmp/rust/Package_rust.ts +6 -3
  544. package/project/.sdk/src/cmp/rust/PrepareAuth_rust.ts +13 -12
  545. package/project/.sdk/src/cmp/rust/ReadmeEntity_rust.ts +10 -12
  546. package/project/.sdk/src/cmp/rust/ReadmeExamplesTest_rust.ts +13 -6
  547. package/project/.sdk/src/cmp/rust/ReadmeExplanation_rust.ts +4 -2
  548. package/project/.sdk/src/cmp/rust/ReadmeHowto_rust.ts +26 -13
  549. package/project/.sdk/src/cmp/rust/ReadmeInstall_rust.ts +11 -10
  550. package/project/.sdk/src/cmp/rust/ReadmeIntro_rust.ts +5 -7
  551. package/project/.sdk/src/cmp/rust/ReadmeModel_rust.ts +35 -37
  552. package/project/.sdk/src/cmp/rust/ReadmeQuick_rust.ts +22 -10
  553. package/project/.sdk/src/cmp/rust/ReadmeRef_rust.ts +41 -32
  554. package/project/.sdk/src/cmp/rust/ReadmeTopHowto_rust.ts +5 -4
  555. package/project/.sdk/src/cmp/rust/ReadmeTopQuick_rust.ts +12 -4
  556. package/project/.sdk/src/cmp/rust/TestClean_rust.ts +391 -18
  557. package/project/.sdk/src/cmp/rust/TestDirect_rust.ts +17 -14
  558. package/project/.sdk/src/cmp/rust/TestEntity_rust.ts +35 -34
  559. package/project/.sdk/src/cmp/rust/fragment/Entity.fragment.rs +2 -2
  560. package/project/.sdk/src/cmp/rust/fragment/EntityCreateOp.fragment.rs +0 -1
  561. package/project/.sdk/src/cmp/rust/fragment/EntityListOp.fragment.rs +1 -1
  562. package/project/.sdk/src/cmp/rust/fragment/EntityLoadOp.fragment.rs +0 -1
  563. package/project/.sdk/src/cmp/rust/fragment/EntityPatchOp.fragment.rs +0 -1
  564. package/project/.sdk/src/cmp/rust/fragment/EntityUpdateOp.fragment.rs +0 -1
  565. package/project/.sdk/src/cmp/rust/fragment/Main.fragment.rs +5 -4
  566. package/project/.sdk/src/cmp/rust/utility_rust.ts +0 -8
  567. package/project/.sdk/src/cmp/scala/Config_scala.ts +5 -26
  568. package/project/.sdk/src/cmp/scala/EntityTypes_scala.ts +4 -5
  569. package/project/.sdk/src/cmp/scala/Main_scala.ts +5 -1
  570. package/project/.sdk/src/cmp/scala/PrepareAuth_scala.ts +13 -13
  571. package/project/.sdk/src/cmp/scala/ReadmeEntity_scala.ts +10 -12
  572. package/project/.sdk/src/cmp/scala/ReadmeExamplesTest_scala.ts +11 -4
  573. package/project/.sdk/src/cmp/scala/ReadmeExplanation_scala.ts +3 -3
  574. package/project/.sdk/src/cmp/scala/ReadmeHowto_scala.ts +12 -20
  575. package/project/.sdk/src/cmp/scala/ReadmeInstall_scala.ts +11 -15
  576. package/project/.sdk/src/cmp/scala/ReadmeIntro_scala.ts +5 -7
  577. package/project/.sdk/src/cmp/scala/ReadmeModel_scala.ts +24 -35
  578. package/project/.sdk/src/cmp/scala/ReadmeQuick_scala.ts +24 -24
  579. package/project/.sdk/src/cmp/scala/ReadmeRef_scala.ts +25 -25
  580. package/project/.sdk/src/cmp/scala/ReadmeTopHowto_scala.ts +5 -4
  581. package/project/.sdk/src/cmp/scala/ReadmeTopQuick_scala.ts +13 -10
  582. package/project/.sdk/src/cmp/scala/Schema_scala.ts +2 -1
  583. package/project/.sdk/src/cmp/scala/TestClean_scala.ts +324 -20
  584. package/project/.sdk/src/cmp/scala/TestEntity_scala.ts +16 -16
  585. package/project/.sdk/src/cmp/scala/fragment/EntityBase.fragment.scala +8 -7
  586. package/project/.sdk/src/cmp/scala/utility_scala.ts +4 -19
  587. package/project/.sdk/src/cmp/swift/Config_swift.ts +3 -14
  588. package/project/.sdk/src/cmp/swift/EntityTypes_swift.ts +3 -4
  589. package/project/.sdk/src/cmp/swift/Main_swift.ts +4 -0
  590. package/project/.sdk/src/cmp/swift/PrepareAuth_swift.ts +14 -14
  591. package/project/.sdk/src/cmp/swift/ReadmeEntity_swift.ts +10 -12
  592. package/project/.sdk/src/cmp/swift/ReadmeExamplesTest_swift.ts +14 -7
  593. package/project/.sdk/src/cmp/swift/ReadmeExplanation_swift.ts +3 -3
  594. package/project/.sdk/src/cmp/swift/ReadmeHowto_swift.ts +12 -20
  595. package/project/.sdk/src/cmp/swift/ReadmeInstall_swift.ts +13 -13
  596. package/project/.sdk/src/cmp/swift/ReadmeIntro_swift.ts +4 -6
  597. package/project/.sdk/src/cmp/swift/ReadmeModel_swift.ts +24 -35
  598. package/project/.sdk/src/cmp/swift/ReadmeQuick_swift.ts +25 -26
  599. package/project/.sdk/src/cmp/swift/ReadmeRef_swift.ts +25 -25
  600. package/project/.sdk/src/cmp/swift/ReadmeTopHowto_swift.ts +5 -4
  601. package/project/.sdk/src/cmp/swift/ReadmeTopQuick_swift.ts +13 -11
  602. package/project/.sdk/src/cmp/swift/TestClean_swift.ts +352 -23
  603. package/project/.sdk/src/cmp/swift/fragment/EntityBase.fragment.swift +8 -7
  604. package/project/.sdk/src/cmp/swift/fragment/Main.fragment.swift +5 -5
  605. package/project/.sdk/src/cmp/ts/Config_ts.ts +13 -35
  606. package/project/.sdk/src/cmp/ts/EntityBase_ts.ts +1 -1
  607. package/project/.sdk/src/cmp/ts/EntityTypes_ts.ts +4 -5
  608. package/project/.sdk/src/cmp/ts/Entity_ts.ts +1 -1
  609. package/project/.sdk/src/cmp/ts/Main_ts.ts +6 -9
  610. package/project/.sdk/src/cmp/ts/Package_ts.ts +3 -2
  611. package/project/.sdk/src/cmp/ts/PrepareAuth_ts.ts +11 -10
  612. package/project/.sdk/src/cmp/ts/ReadmeEntity_ts.ts +9 -11
  613. package/project/.sdk/src/cmp/ts/ReadmeExampleTest_ts.ts +33 -9
  614. package/project/.sdk/src/cmp/ts/ReadmeExamplesTest_ts.ts +35 -7
  615. package/project/.sdk/src/cmp/ts/ReadmeExplanation_ts.ts +1 -1
  616. package/project/.sdk/src/cmp/ts/ReadmeHowto_ts.ts +38 -18
  617. package/project/.sdk/src/cmp/ts/ReadmeInstall_ts.ts +9 -5
  618. package/project/.sdk/src/cmp/ts/ReadmeIntro_ts.ts +6 -3
  619. package/project/.sdk/src/cmp/ts/ReadmeModel_ts.ts +32 -53
  620. package/project/.sdk/src/cmp/ts/ReadmeQuick_ts.ts +11 -9
  621. package/project/.sdk/src/cmp/ts/ReadmeRef_ts.ts +22 -26
  622. package/project/.sdk/src/cmp/ts/ReadmeTopHowto_ts.ts +5 -4
  623. package/project/.sdk/src/cmp/ts/ReadmeTopQuick_ts.ts +6 -6
  624. package/project/.sdk/src/cmp/ts/Schema_ts.ts +2 -1
  625. package/project/.sdk/src/cmp/ts/TestClean_ts.ts +229 -13
  626. package/project/.sdk/src/cmp/ts/TestDefinition_ts.ts +3 -1
  627. package/project/.sdk/src/cmp/ts/TestDirect_ts.ts +17 -17
  628. package/project/.sdk/src/cmp/ts/TestEntity_ts.ts +30 -30
  629. package/project/.sdk/src/cmp/ts/TestLive_ts.ts +7 -6
  630. package/project/.sdk/src/cmp/ts/fragment/Direct.test.fragment.ts +1 -1
  631. package/project/.sdk/src/cmp/ts/fragment/Entity.test.fragment.ts +1 -1
  632. package/project/.sdk/src/cmp/ts/fragment/EntityBase.fragment.ts +3 -3
  633. package/project/.sdk/src/cmp/ts/fragment/Main.fragment.ts +2 -2
  634. package/project/.sdk/src/cmp/zig/Config_zig.ts +5 -21
  635. package/project/.sdk/src/cmp/zig/Main_zig.ts +4 -0
  636. package/project/.sdk/src/cmp/zig/Package_zig.ts +3 -2
  637. package/project/.sdk/src/cmp/zig/PrepareAuth_zig.ts +10 -21
  638. package/project/.sdk/src/cmp/zig/ReadmeEntity_zig.ts +9 -11
  639. package/project/.sdk/src/cmp/zig/ReadmeExamplesTest_zig.ts +8 -7
  640. package/project/.sdk/src/cmp/zig/ReadmeExplanation_zig.ts +1 -1
  641. package/project/.sdk/src/cmp/zig/ReadmeHowto_zig.ts +17 -22
  642. package/project/.sdk/src/cmp/zig/ReadmeInstall_zig.ts +12 -9
  643. package/project/.sdk/src/cmp/zig/ReadmeIntro_zig.ts +5 -7
  644. package/project/.sdk/src/cmp/zig/ReadmeModel_zig.ts +40 -37
  645. package/project/.sdk/src/cmp/zig/ReadmeQuick_zig.ts +25 -11
  646. package/project/.sdk/src/cmp/zig/ReadmeRef_zig.ts +46 -30
  647. package/project/.sdk/src/cmp/zig/ReadmeTopHowto_zig.ts +5 -4
  648. package/project/.sdk/src/cmp/zig/ReadmeTopQuick_zig.ts +15 -5
  649. package/project/.sdk/src/cmp/zig/TestClean_zig.ts +259 -26
  650. package/project/.sdk/src/cmp/zig/fragment/Build.fragment.zig +1 -0
  651. package/project/.sdk/src/cmp/zig/fragment/Entity.fragment.zig +16 -17
  652. package/project/.sdk/src/cmp/zig/fragment/Main.fragment.zig +23 -12
  653. package/project/.sdk/src/cmp/zig/fragment/Root.fragment.zig +2 -1
  654. package/project/.sdk/src/cmp/zig/utility_zig.ts +0 -13
  655. package/project/.sdk/tm/c/Makefile +2 -1
  656. package/project/.sdk/tm/c/core/response.c +27 -4
  657. package/project/.sdk/tm/c/core/sdk.h +14 -7
  658. package/project/.sdk/tm/c/feature/secrets/plugin/capability.c +2 -2
  659. package/project/.sdk/tm/c/feature/secrets/plugin/capability.h +2 -2
  660. package/project/.sdk/tm/c/feature/secrets/plugin/catalog.c +2 -2
  661. package/project/.sdk/tm/c/feature/secrets/plugin/catalog.h +2 -2
  662. package/project/.sdk/tm/c/feature/secrets/plugin/config.c +2 -2
  663. package/project/.sdk/tm/c/feature/secrets/plugin/config.h +2 -2
  664. package/project/.sdk/tm/c/feature/secrets/plugin/depend.c +2 -2
  665. package/project/.sdk/tm/c/feature/secrets/plugin/depend.h +2 -2
  666. package/project/.sdk/tm/c/feature/secrets/plugin/env.c +2 -2
  667. package/project/.sdk/tm/c/feature/secrets/plugin/env.h +2 -2
  668. package/project/.sdk/tm/c/feature/secrets/plugin/export.c +2 -2
  669. package/project/.sdk/tm/c/feature/secrets/plugin/export.h +2 -2
  670. package/project/.sdk/tm/c/feature/secrets/plugin/graph.c +2 -2
  671. package/project/.sdk/tm/c/feature/secrets/plugin/graph.h +2 -2
  672. package/project/.sdk/tm/c/feature/secrets/plugin/host.c +2 -2
  673. package/project/.sdk/tm/c/feature/secrets/plugin/host.h +2 -2
  674. package/project/.sdk/tm/c/feature/secrets/plugin/order.c +2 -2
  675. package/project/.sdk/tm/c/feature/secrets/plugin/order.h +2 -2
  676. package/project/.sdk/tm/c/feature/secrets/plugin/point.c +2 -2
  677. package/project/.sdk/tm/c/feature/secrets/plugin/point.h +2 -2
  678. package/project/.sdk/tm/c/feature/secrets/plugin/ref.c +2 -2
  679. package/project/.sdk/tm/c/feature/secrets/plugin/ref.h +2 -2
  680. package/project/.sdk/tm/c/feature/secrets/plugin/resolve.c +2 -2
  681. package/project/.sdk/tm/c/feature/secrets/plugin/resolve.h +2 -2
  682. package/project/.sdk/tm/c/feature/secrets/plugin/types.c +2 -2
  683. package/project/.sdk/tm/c/feature/secrets/plugin/types.h +2 -2
  684. package/project/.sdk/tm/c/feature/secrets/plugin/value.c +2 -2
  685. package/project/.sdk/tm/c/feature/secrets/plugin/value.h +2 -2
  686. package/project/.sdk/tm/c/feature/secrets/plugin/version.c +2 -2
  687. package/project/.sdk/tm/c/feature/secrets/plugin/version.h +2 -2
  688. package/project/.sdk/tm/c/feature/secrets/plugins/aws.c +2 -2
  689. package/project/.sdk/tm/c/feature/secrets/plugins/azuresecrets.c +2 -2
  690. package/project/.sdk/tm/c/feature/secrets/plugins/boru.c +2 -2
  691. package/project/.sdk/tm/c/feature/secrets/plugins/clock.c +2 -2
  692. package/project/.sdk/tm/c/feature/secrets/plugins/doppler.c +2 -2
  693. package/project/.sdk/tm/c/feature/secrets/plugins/encode.c +2 -2
  694. package/project/.sdk/tm/c/feature/secrets/plugins/gcpsecrets.c +2 -2
  695. package/project/.sdk/tm/c/feature/secrets/plugins/hashicorp.c +2 -2
  696. package/project/.sdk/tm/c/feature/secrets/plugins/httpjson.c +2 -2
  697. package/project/.sdk/tm/c/feature/secrets/plugins/infisical.c +2 -2
  698. package/project/.sdk/tm/c/feature/secrets/plugins/minivault.c +2 -2
  699. package/project/.sdk/tm/c/feature/secrets/plugins/onepassword.c +2 -2
  700. package/project/.sdk/tm/c/feature/secrets/plugins/proc.c +2 -2
  701. package/project/.sdk/tm/c/feature/secrets/plugins/secretspec.c +2 -2
  702. package/project/.sdk/tm/c/feature/secrets/plugins/sekretoplugins.h +2 -2
  703. package/project/.sdk/tm/c/feature/secrets/plugins/sha256.c +2 -2
  704. package/project/.sdk/tm/c/feature/secrets/plugins/sigv4.c +2 -2
  705. package/project/.sdk/tm/c/feature/secrets/plugins/support.h +2 -2
  706. package/project/.sdk/tm/c/feature/secrets/plugins/tls.c +2 -2
  707. package/project/.sdk/tm/c/feature/secrets/sekreto/internal.h +2 -2
  708. package/project/.sdk/tm/c/feature/secrets/sekreto/json.c +2 -2
  709. package/project/.sdk/tm/c/feature/secrets/sekreto/providers.c +2 -2
  710. package/project/.sdk/tm/c/feature/secrets/sekreto/sekreto.c +2 -2
  711. package/project/.sdk/tm/c/feature/secrets/sekreto/sekreto.h +2 -2
  712. package/project/.sdk/tm/c/feature/secrets/sekreto/util.c +2 -2
  713. package/project/.sdk/tm/c/feature/secrets.c +4 -2
  714. package/project/.sdk/tm/c/feature/validate.c +5 -5
  715. package/project/.sdk/tm/c/tests/feature/secrets/secrets_test.c +200 -1
  716. package/project/.sdk/tm/c/tests/pipeline_test.c +1 -1
  717. package/project/.sdk/tm/c/tests/primary_corpus_test.c +17 -4
  718. package/project/.sdk/tm/c/tests/primary_utility_test.c +7 -7
  719. package/project/.sdk/tm/c/tests/sdk_pipeline_test.c +2 -2
  720. package/project/.sdk/tm/c/tests/server_variable_test.c +10 -48
  721. package/project/.sdk/tm/c/tests/struct_corpus_test.c +68 -2
  722. package/project/.sdk/tm/c/tests/transport_test.c +161 -3
  723. package/project/.sdk/tm/c/tests/vendor/omni/json.c +65 -26
  724. package/project/.sdk/tm/c/tests/vendor/omni/omni.h +2 -2
  725. package/project/.sdk/tm/c/tests/vendor/omni/runner.c +2 -2
  726. package/project/.sdk/tm/c/tests/vendor/omni/util.c +2 -2
  727. package/project/.sdk/tm/c/utility/clean.c +94 -12
  728. package/project/.sdk/tm/c/utility/fetcher.c +22 -6
  729. package/project/.sdk/tm/c/utility/make_error.c +4 -4
  730. package/project/.sdk/tm/c/utility/make_options.c +22 -16
  731. package/project/.sdk/tm/c/utility/struct/inject.c +23 -2
  732. package/project/.sdk/tm/c/utility/struct/re_util.c +3 -0
  733. package/project/.sdk/tm/c/utility/struct/regex.c +43 -22
  734. package/project/.sdk/tm/c/utility/struct/regex.h +4 -1
  735. package/project/.sdk/tm/c/utility/struct/transform.c +982 -296
  736. package/project/.sdk/tm/c/utility/struct/utility.c +712 -136
  737. package/project/.sdk/tm/c/utility/struct/value.c +3 -0
  738. package/project/.sdk/tm/c/utility/struct/value.h +3 -0
  739. package/project/.sdk/tm/c/utility/struct/value_io.c +3 -0
  740. package/project/.sdk/tm/c/utility/struct/value_io.h +3 -0
  741. package/project/.sdk/tm/c/utility/struct/voxgig_struct.h +36 -1
  742. package/project/.sdk/tm/clojure/feature/secrets/sdk/feature/secrets.clj +3 -1
  743. package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/capability.clj +2 -2
  744. package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/catalog.clj +2 -2
  745. package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/config.clj +2 -2
  746. package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/depend.clj +2 -2
  747. package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/env.clj +2 -2
  748. package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/export.clj +2 -2
  749. package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/graph.clj +2 -2
  750. package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/host.clj +2 -2
  751. package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/json.clj +2 -2
  752. package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/order.clj +2 -2
  753. package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/point.clj +2 -2
  754. package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/ref.clj +2 -2
  755. package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/resolve.clj +2 -2
  756. package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/types.clj +2 -2
  757. package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/version.clj +2 -2
  758. package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin.clj +2 -2
  759. package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/addr.clj +2 -2
  760. package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/chain.clj +2 -2
  761. package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/core.clj +2 -2
  762. package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/json.clj +2 -2
  763. package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/aws.clj +2 -2
  764. package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/azuresecrets.clj +2 -2
  765. package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/boru.clj +2 -2
  766. package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/doppler.clj +2 -2
  767. package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/gcpsecrets.clj +2 -2
  768. package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/hashicorp.clj +2 -2
  769. package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/httpjson.clj +2 -2
  770. package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/infisical.clj +2 -2
  771. package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/minivault.clj +2 -2
  772. package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/onepassword.clj +2 -2
  773. package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/proc.clj +2 -2
  774. package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/secretspec.clj +2 -2
  775. package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/sigv4.clj +2 -2
  776. package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/provider.clj +2 -2
  777. package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/providers.clj +2 -2
  778. package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto.clj +2 -2
  779. package/project/.sdk/tm/clojure/src/sdk/client.clj +4 -4
  780. package/project/.sdk/tm/clojure/src/sdk/core.clj +175 -32
  781. package/project/.sdk/tm/clojure/src/sdk/features.clj +6 -7
  782. package/project/.sdk/tm/clojure/src/voxgig/struct.clj +866 -186
  783. package/project/.sdk/tm/clojure/test/sdk/test/feature/secrets.clj +85 -2
  784. package/project/.sdk/tm/clojure/test/sdk/test/feature.clj +1 -1
  785. package/project/.sdk/tm/clojure/test/sdk/test/omni_smoke.clj +1 -1
  786. package/project/.sdk/tm/clojure/test/sdk/test/pipeline.clj +98 -3
  787. package/project/.sdk/tm/clojure/test/sdk/test/primary.clj +7 -2
  788. package/project/.sdk/tm/clojure/test/sdk/test/struct_corpus.clj +22 -9
  789. package/project/.sdk/tm/clojure/test/sdk/test_runner.clj +15 -14
  790. package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/json.clj +2 -2
  791. package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/runner.clj +2 -2
  792. package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/util.clj +2 -2
  793. package/project/.sdk/tm/cpp/Makefile +3 -3
  794. package/project/.sdk/tm/cpp/core/types.hpp +49 -30
  795. package/project/.sdk/tm/cpp/feature/secrets/plugin/capability.cpp +2 -2
  796. package/project/.sdk/tm/cpp/feature/secrets/plugin/capability.hpp +2 -2
  797. package/project/.sdk/tm/cpp/feature/secrets/plugin/catalog.cpp +2 -2
  798. package/project/.sdk/tm/cpp/feature/secrets/plugin/catalog.hpp +2 -2
  799. package/project/.sdk/tm/cpp/feature/secrets/plugin/config.cpp +2 -2
  800. package/project/.sdk/tm/cpp/feature/secrets/plugin/config.hpp +2 -2
  801. package/project/.sdk/tm/cpp/feature/secrets/plugin/depend.cpp +2 -2
  802. package/project/.sdk/tm/cpp/feature/secrets/plugin/depend.hpp +2 -2
  803. package/project/.sdk/tm/cpp/feature/secrets/plugin/env.cpp +2 -2
  804. package/project/.sdk/tm/cpp/feature/secrets/plugin/env.hpp +2 -2
  805. package/project/.sdk/tm/cpp/feature/secrets/plugin/export.cpp +2 -2
  806. package/project/.sdk/tm/cpp/feature/secrets/plugin/export.hpp +2 -2
  807. package/project/.sdk/tm/cpp/feature/secrets/plugin/graph.cpp +2 -2
  808. package/project/.sdk/tm/cpp/feature/secrets/plugin/graph.hpp +2 -2
  809. package/project/.sdk/tm/cpp/feature/secrets/plugin/host.cpp +2 -2
  810. package/project/.sdk/tm/cpp/feature/secrets/plugin/host.hpp +2 -2
  811. package/project/.sdk/tm/cpp/feature/secrets/plugin/order.cpp +2 -2
  812. package/project/.sdk/tm/cpp/feature/secrets/plugin/order.hpp +2 -2
  813. package/project/.sdk/tm/cpp/feature/secrets/plugin/point.cpp +2 -2
  814. package/project/.sdk/tm/cpp/feature/secrets/plugin/point.hpp +2 -2
  815. package/project/.sdk/tm/cpp/feature/secrets/plugin/ref.cpp +2 -2
  816. package/project/.sdk/tm/cpp/feature/secrets/plugin/ref.hpp +2 -2
  817. package/project/.sdk/tm/cpp/feature/secrets/plugin/resolve.cpp +2 -2
  818. package/project/.sdk/tm/cpp/feature/secrets/plugin/resolve.hpp +2 -2
  819. package/project/.sdk/tm/cpp/feature/secrets/plugin/types.cpp +2 -2
  820. package/project/.sdk/tm/cpp/feature/secrets/plugin/types.hpp +2 -2
  821. package/project/.sdk/tm/cpp/feature/secrets/plugin/value.cpp +2 -2
  822. package/project/.sdk/tm/cpp/feature/secrets/plugin/value.hpp +2 -2
  823. package/project/.sdk/tm/cpp/feature/secrets/plugin/version.cpp +2 -2
  824. package/project/.sdk/tm/cpp/feature/secrets/plugin/version.hpp +2 -2
  825. package/project/.sdk/tm/cpp/feature/secrets/plugins/Aws.cpp +2 -2
  826. package/project/.sdk/tm/cpp/feature/secrets/plugins/Aws.hpp +2 -2
  827. package/project/.sdk/tm/cpp/feature/secrets/plugins/Azuresecrets.cpp +2 -2
  828. package/project/.sdk/tm/cpp/feature/secrets/plugins/Azuresecrets.hpp +2 -2
  829. package/project/.sdk/tm/cpp/feature/secrets/plugins/Boru.cpp +2 -2
  830. package/project/.sdk/tm/cpp/feature/secrets/plugins/Boru.hpp +2 -2
  831. package/project/.sdk/tm/cpp/feature/secrets/plugins/Crypto.cpp +2 -2
  832. package/project/.sdk/tm/cpp/feature/secrets/plugins/Crypto.hpp +2 -2
  833. package/project/.sdk/tm/cpp/feature/secrets/plugins/Doppler.cpp +2 -2
  834. package/project/.sdk/tm/cpp/feature/secrets/plugins/Doppler.hpp +2 -2
  835. package/project/.sdk/tm/cpp/feature/secrets/plugins/Gcpsecrets.cpp +2 -2
  836. package/project/.sdk/tm/cpp/feature/secrets/plugins/Gcpsecrets.hpp +2 -2
  837. package/project/.sdk/tm/cpp/feature/secrets/plugins/Hashicorp.cpp +2 -2
  838. package/project/.sdk/tm/cpp/feature/secrets/plugins/Hashicorp.hpp +2 -2
  839. package/project/.sdk/tm/cpp/feature/secrets/plugins/Httpjson.cpp +2 -2
  840. package/project/.sdk/tm/cpp/feature/secrets/plugins/Httpjson.hpp +2 -2
  841. package/project/.sdk/tm/cpp/feature/secrets/plugins/Infisical.cpp +2 -2
  842. package/project/.sdk/tm/cpp/feature/secrets/plugins/Infisical.hpp +2 -2
  843. package/project/.sdk/tm/cpp/feature/secrets/plugins/Minivault.cpp +2 -2
  844. package/project/.sdk/tm/cpp/feature/secrets/plugins/Minivault.hpp +2 -2
  845. package/project/.sdk/tm/cpp/feature/secrets/plugins/Onepassword.cpp +2 -2
  846. package/project/.sdk/tm/cpp/feature/secrets/plugins/Onepassword.hpp +2 -2
  847. package/project/.sdk/tm/cpp/feature/secrets/plugins/Proc.cpp +2 -2
  848. package/project/.sdk/tm/cpp/feature/secrets/plugins/Proc.hpp +2 -2
  849. package/project/.sdk/tm/cpp/feature/secrets/plugins/Secretspec.cpp +2 -2
  850. package/project/.sdk/tm/cpp/feature/secrets/plugins/Secretspec.hpp +2 -2
  851. package/project/.sdk/tm/cpp/feature/secrets/plugins/Sigv4.cpp +2 -2
  852. package/project/.sdk/tm/cpp/feature/secrets/plugins/Sigv4.hpp +2 -2
  853. package/project/.sdk/tm/cpp/feature/secrets/plugins/Tls.cpp +2 -2
  854. package/project/.sdk/tm/cpp/feature/secrets/plugins/Tls.hpp +2 -2
  855. package/project/.sdk/tm/cpp/feature/secrets/sekreto/Json.cpp +2 -2
  856. package/project/.sdk/tm/cpp/feature/secrets/sekreto/Json.hpp +2 -2
  857. package/project/.sdk/tm/cpp/feature/secrets/sekreto/Provider.cpp +2 -2
  858. package/project/.sdk/tm/cpp/feature/secrets/sekreto/Provider.hpp +2 -2
  859. package/project/.sdk/tm/cpp/feature/secrets/sekreto/Providers.cpp +2 -2
  860. package/project/.sdk/tm/cpp/feature/secrets/sekreto/Providers.hpp +2 -2
  861. package/project/.sdk/tm/cpp/feature/secrets/sekreto/Sekreto.cpp +2 -2
  862. package/project/.sdk/tm/cpp/feature/secrets/sekreto/Sekreto.hpp +2 -2
  863. package/project/.sdk/tm/cpp/feature/secrets.hpp +3 -1
  864. package/project/.sdk/tm/cpp/feature/validate.hpp +5 -5
  865. package/project/.sdk/tm/cpp/test/custom_utility_test.cpp +1 -1
  866. package/project/.sdk/tm/cpp/test/feature/secrets/secrets_test.cpp +226 -0
  867. package/project/.sdk/tm/cpp/test/omni_resolver.hpp +1 -1
  868. package/project/.sdk/tm/cpp/test/primary_utility_test.cpp +9 -3
  869. package/project/.sdk/tm/cpp/test/runner_support.hpp +25 -4
  870. package/project/.sdk/tm/cpp/test/struct_corpus_test.cpp +32 -3
  871. package/project/.sdk/tm/cpp/test/vendor/omni/json.hpp +55 -17
  872. package/project/.sdk/tm/cpp/test/vendor/omni/omni.hpp +2 -2
  873. package/project/.sdk/tm/cpp/test/vendor/omni/util.hpp +2 -2
  874. package/project/.sdk/tm/cpp/utility/pipeline.hpp +96 -20
  875. package/project/.sdk/tm/cpp/utility/voxgigstruct/value.hpp +3 -0
  876. package/project/.sdk/tm/cpp/utility/voxgigstruct/value_io.hpp +3 -0
  877. package/project/.sdk/tm/cpp/utility/voxgigstruct/voxgig_struct.hpp +1374 -371
  878. package/project/.sdk/tm/csharp/Makefile +6 -6
  879. package/project/.sdk/tm/csharp/core/Response.cs +21 -2
  880. package/project/.sdk/tm/csharp/core/Result.cs +2 -2
  881. package/project/.sdk/tm/csharp/core/Utility.cs +2 -0
  882. package/project/.sdk/tm/csharp/feature/SecretsFeature.cs +7 -6
  883. package/project/.sdk/tm/csharp/feature/ValidateFeature.cs +4 -5
  884. package/project/.sdk/tm/csharp/feature/secrets/plugin/Capability.cs +2 -2
  885. package/project/.sdk/tm/csharp/feature/secrets/plugin/Catalog.cs +2 -2
  886. package/project/.sdk/tm/csharp/feature/secrets/plugin/Config.cs +2 -2
  887. package/project/.sdk/tm/csharp/feature/secrets/plugin/Definition.cs +2 -2
  888. package/project/.sdk/tm/csharp/feature/secrets/plugin/Depend.cs +2 -2
  889. package/project/.sdk/tm/csharp/feature/secrets/plugin/Entry.cs +2 -2
  890. package/project/.sdk/tm/csharp/feature/secrets/plugin/Env.cs +2 -2
  891. package/project/.sdk/tm/csharp/feature/secrets/plugin/Export.cs +2 -2
  892. package/project/.sdk/tm/csharp/feature/secrets/plugin/Graph.cs +2 -2
  893. package/project/.sdk/tm/csharp/feature/secrets/plugin/Host.cs +2 -2
  894. package/project/.sdk/tm/csharp/feature/secrets/plugin/Inst.cs +2 -2
  895. package/project/.sdk/tm/csharp/feature/secrets/plugin/Json.cs +2 -2
  896. package/project/.sdk/tm/csharp/feature/secrets/plugin/Order.cs +2 -2
  897. package/project/.sdk/tm/csharp/feature/secrets/plugin/Plugin.cs +2 -2
  898. package/project/.sdk/tm/csharp/feature/secrets/plugin/Point.cs +2 -2
  899. package/project/.sdk/tm/csharp/feature/secrets/plugin/Refs.cs +2 -2
  900. package/project/.sdk/tm/csharp/feature/secrets/plugin/Resolve.cs +2 -2
  901. package/project/.sdk/tm/csharp/feature/secrets/plugin/Types.cs +2 -2
  902. package/project/.sdk/tm/csharp/feature/secrets/plugin/Version.cs +2 -2
  903. package/project/.sdk/tm/csharp/feature/secrets/plugins/Aws.cs +2 -2
  904. package/project/.sdk/tm/csharp/feature/secrets/plugins/AzureSecrets.cs +2 -2
  905. package/project/.sdk/tm/csharp/feature/secrets/plugins/Boru.cs +2 -2
  906. package/project/.sdk/tm/csharp/feature/secrets/plugins/Child.cs +2 -2
  907. package/project/.sdk/tm/csharp/feature/secrets/plugins/Doppler.cs +2 -2
  908. package/project/.sdk/tm/csharp/feature/secrets/plugins/GcpSecrets.cs +2 -2
  909. package/project/.sdk/tm/csharp/feature/secrets/plugins/Hashicorp.cs +2 -2
  910. package/project/.sdk/tm/csharp/feature/secrets/plugins/HttpJson.cs +2 -2
  911. package/project/.sdk/tm/csharp/feature/secrets/plugins/Infisical.cs +2 -2
  912. package/project/.sdk/tm/csharp/feature/secrets/plugins/MiniVault.cs +2 -2
  913. package/project/.sdk/tm/csharp/feature/secrets/plugins/OnePassword.cs +2 -2
  914. package/project/.sdk/tm/csharp/feature/secrets/plugins/SecretSpec.cs +2 -2
  915. package/project/.sdk/tm/csharp/feature/secrets/plugins/Sigv4.cs +2 -2
  916. package/project/.sdk/tm/csharp/feature/secrets/sekreto/Json.cs +2 -2
  917. package/project/.sdk/tm/csharp/feature/secrets/sekreto/Providers.cs +2 -2
  918. package/project/.sdk/tm/csharp/feature/secrets/sekreto/Sekreto.cs +2 -2
  919. package/project/.sdk/tm/csharp/test/PipelineTest.cs +1 -1
  920. package/project/.sdk/tm/csharp/test/PrimaryUtilityTest.cs +242 -1
  921. package/project/.sdk/tm/csharp/test/Runner.cs +4 -4
  922. package/project/.sdk/tm/csharp/test/StructUtilityTest.cs +38 -38
  923. package/project/.sdk/tm/csharp/test/feature/secrets/SecretsFeatureTest.cs +267 -0
  924. package/project/.sdk/tm/csharp/test/vendor/omni/Runner.cs +2 -2
  925. package/project/.sdk/tm/csharp/test/vendor/omni/Util.cs +2 -2
  926. package/project/.sdk/tm/csharp/utility/Clean.cs +139 -12
  927. package/project/.sdk/tm/csharp/utility/Fetcher.cs +115 -35
  928. package/project/.sdk/tm/csharp/utility/MakeError.cs +4 -5
  929. package/project/.sdk/tm/csharp/utility/MakeOptions.cs +5 -5
  930. package/project/.sdk/tm/csharp/utility/Register.cs +1 -0
  931. package/project/.sdk/tm/csharp/utility/struct/Struct.cs +1587 -325
  932. package/project/.sdk/tm/elixir/lib/projectname/entity_base.ex +9 -11
  933. package/project/.sdk/tm/elixir/lib/projectname/error.ex +1 -1
  934. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/capability.ex +2 -2
  935. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/catalog.ex +2 -2
  936. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/config.ex +2 -2
  937. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/depend.ex +2 -2
  938. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/env.ex +2 -2
  939. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/error.ex +2 -2
  940. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/export.ex +2 -2
  941. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/graph.ex +2 -2
  942. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/host.ex +2 -2
  943. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/inst.ex +2 -2
  944. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/json.ex +2 -2
  945. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/order.ex +2 -2
  946. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/point.ex +2 -2
  947. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/ref.ex +2 -2
  948. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/resolve.ex +2 -2
  949. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/types.ex +2 -2
  950. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/version.ex +2 -2
  951. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/voxgig_plugin.ex +2 -2
  952. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/json.ex +2 -2
  953. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/aws.ex +2 -2
  954. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/azuresecrets.ex +2 -2
  955. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/boru.ex +2 -2
  956. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/doppler.ex +2 -2
  957. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/gcpsecrets.ex +2 -2
  958. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/hashicorp.ex +2 -2
  959. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/http.ex +2 -2
  960. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/httpjson.ex +2 -2
  961. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/infisical.ex +2 -2
  962. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/minivault.ex +2 -2
  963. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/onepassword.ex +2 -2
  964. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/proc.ex +2 -2
  965. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/secretspec.ex +2 -2
  966. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/sigv4.ex +2 -2
  967. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/provider.ex +2 -2
  968. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/providers.ex +2 -2
  969. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/sekreto.ex +2 -2
  970. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets.ex +4 -2
  971. package/project/.sdk/tm/elixir/lib/projectname/feature/validate.ex +4 -5
  972. package/project/.sdk/tm/elixir/lib/projectname/utility.ex +219 -37
  973. package/project/.sdk/tm/elixir/lib/utility/struct/voxgig_struct.ex +1088 -253
  974. package/project/.sdk/tm/elixir/test/feature/secrets/secrets_test.exs +147 -1
  975. package/project/.sdk/tm/elixir/test/pipeline_test.exs +167 -1
  976. package/project/.sdk/tm/elixir/test/primary_utility_test.exs +12 -1
  977. package/project/.sdk/tm/elixir/test/struct_corpus_test.exs +43 -21
  978. package/project/.sdk/tm/elixir/test/support/omni.ex +2 -2
  979. package/project/.sdk/tm/elixir/test/vendor/omni/json.ex +33 -5
  980. package/project/.sdk/tm/elixir/test/vendor/omni/runner.ex +2 -2
  981. package/project/.sdk/tm/elixir/test/vendor/omni/util.ex +2 -2
  982. package/project/.sdk/tm/go/Makefile +4 -4
  983. package/project/.sdk/tm/go/core/response.go +17 -4
  984. package/project/.sdk/tm/go/core/result.go +2 -2
  985. package/project/.sdk/tm/go/core/utility_type.go +2 -1
  986. package/project/.sdk/tm/go/feature/secrets/plugin/capability.go +2 -2
  987. package/project/.sdk/tm/go/feature/secrets/plugin/catalog.go +2 -2
  988. package/project/.sdk/tm/go/feature/secrets/plugin/config.go +2 -2
  989. package/project/.sdk/tm/go/feature/secrets/plugin/depend.go +2 -2
  990. package/project/.sdk/tm/go/feature/secrets/plugin/env.go +2 -2
  991. package/project/.sdk/tm/go/feature/secrets/plugin/export.go +2 -2
  992. package/project/.sdk/tm/go/feature/secrets/plugin/graph.go +2 -2
  993. package/project/.sdk/tm/go/feature/secrets/plugin/host.go +2 -2
  994. package/project/.sdk/tm/go/feature/secrets/plugin/order.go +2 -2
  995. package/project/.sdk/tm/go/feature/secrets/plugin/point.go +2 -2
  996. package/project/.sdk/tm/go/feature/secrets/plugin/ref.go +2 -2
  997. package/project/.sdk/tm/go/feature/secrets/plugin/resolve.go +2 -2
  998. package/project/.sdk/tm/go/feature/secrets/plugin/types.go +2 -2
  999. package/project/.sdk/tm/go/feature/secrets/plugin/util.go +2 -2
  1000. package/project/.sdk/tm/go/feature/secrets/plugin/version.go +2 -2
  1001. package/project/.sdk/tm/go/feature/secrets/plugins/aws/aws.go +2 -2
  1002. package/project/.sdk/tm/go/feature/secrets/plugins/aws/sigv4.go +2 -2
  1003. package/project/.sdk/tm/go/feature/secrets/plugins/azuresecrets/azuresecrets.go +2 -2
  1004. package/project/.sdk/tm/go/feature/secrets/plugins/boru/boru.go +2 -2
  1005. package/project/.sdk/tm/go/feature/secrets/plugins/doppler/doppler.go +2 -2
  1006. package/project/.sdk/tm/go/feature/secrets/plugins/gcpsecrets/gcpsecrets.go +2 -2
  1007. package/project/.sdk/tm/go/feature/secrets/plugins/hashicorp/hashicorp.go +2 -2
  1008. package/project/.sdk/tm/go/feature/secrets/plugins/httpjson/httpjson.go +2 -2
  1009. package/project/.sdk/tm/go/feature/secrets/plugins/infisical/infisical.go +2 -2
  1010. package/project/.sdk/tm/go/feature/secrets/plugins/minivault/format.go +2 -2
  1011. package/project/.sdk/tm/go/feature/secrets/plugins/minivault/minivault.go +2 -2
  1012. package/project/.sdk/tm/go/feature/secrets/plugins/onepassword/onepassword.go +2 -2
  1013. package/project/.sdk/tm/go/feature/secrets/plugins/secretspec/secretspec.go +2 -2
  1014. package/project/.sdk/tm/go/feature/secrets/sekreto/addr.go +2 -2
  1015. package/project/.sdk/tm/go/feature/secrets/sekreto/providers.go +2 -2
  1016. package/project/.sdk/tm/go/feature/secrets/sekreto/sekreto.go +2 -2
  1017. package/project/.sdk/tm/go/feature/secrets_feature.go +8 -1
  1018. package/project/.sdk/tm/go/test/concurrency_test.go +1 -1
  1019. package/project/.sdk/tm/go/test/custom_utility_test.go +5 -5
  1020. package/project/.sdk/tm/go/test/feature/secrets/secrets_feature_test.go +160 -7
  1021. package/project/.sdk/tm/go/test/feature_corpus_test.go +1 -1
  1022. package/project/.sdk/tm/go/test/feature_test.go +5 -1
  1023. package/project/.sdk/tm/go/test/omni/omni.go +2 -2
  1024. package/project/.sdk/tm/go/test/omni/util.go +12 -5
  1025. package/project/.sdk/tm/go/test/omniresolver_test.go +1 -1
  1026. package/project/.sdk/tm/go/test/pipeline_test.go +4 -1
  1027. package/project/.sdk/tm/go/test/primary_utility_test.go +181 -5
  1028. package/project/.sdk/tm/go/test/server_variable_test.go +50 -0
  1029. package/project/.sdk/tm/go/test/struct_utility_test.go +59 -56
  1030. package/project/.sdk/tm/go/test/testsupport_test.go +13 -3
  1031. package/project/.sdk/tm/go/utility/clean.go +223 -6
  1032. package/project/.sdk/tm/go/utility/fetcher.go +59 -10
  1033. package/project/.sdk/tm/go/utility/make_error.go +4 -4
  1034. package/project/.sdk/tm/go/utility/make_options.go +12 -5
  1035. package/project/.sdk/tm/go/utility/register.go +12 -1
  1036. package/project/.sdk/tm/go/utility/struct/voxgigstruct.go +1510 -430
  1037. package/project/.sdk/tm/java/Makefile +7 -6
  1038. package/project/.sdk/tm/java/core/Response.java +16 -2
  1039. package/project/.sdk/tm/java/core/Result.java +2 -2
  1040. package/project/.sdk/tm/java/core/SdkClient.java +4 -4
  1041. package/project/.sdk/tm/java/core/Utility.java +7 -0
  1042. package/project/.sdk/tm/java/feature/SecretsFeature.java +3 -0
  1043. package/project/.sdk/tm/java/feature/ValidateFeature.java +4 -5
  1044. package/project/.sdk/tm/java/feature/secrets/plugin/Capability.java +2 -2
  1045. package/project/.sdk/tm/java/feature/secrets/plugin/Catalog.java +2 -2
  1046. package/project/.sdk/tm/java/feature/secrets/plugin/Config.java +2 -2
  1047. package/project/.sdk/tm/java/feature/secrets/plugin/Definition.java +2 -2
  1048. package/project/.sdk/tm/java/feature/secrets/plugin/Depend.java +2 -2
  1049. package/project/.sdk/tm/java/feature/secrets/plugin/Entry.java +2 -2
  1050. package/project/.sdk/tm/java/feature/secrets/plugin/Env.java +2 -2
  1051. package/project/.sdk/tm/java/feature/secrets/plugin/Export.java +2 -2
  1052. package/project/.sdk/tm/java/feature/secrets/plugin/Graph.java +2 -2
  1053. package/project/.sdk/tm/java/feature/secrets/plugin/Host.java +2 -2
  1054. package/project/.sdk/tm/java/feature/secrets/plugin/Inst.java +2 -2
  1055. package/project/.sdk/tm/java/feature/secrets/plugin/Json.java +2 -2
  1056. package/project/.sdk/tm/java/feature/secrets/plugin/Order.java +2 -2
  1057. package/project/.sdk/tm/java/feature/secrets/plugin/Plugin.java +2 -2
  1058. package/project/.sdk/tm/java/feature/secrets/plugin/PluginException.java +2 -2
  1059. package/project/.sdk/tm/java/feature/secrets/plugin/Point.java +2 -2
  1060. package/project/.sdk/tm/java/feature/secrets/plugin/Refs.java +2 -2
  1061. package/project/.sdk/tm/java/feature/secrets/plugin/Resolve.java +2 -2
  1062. package/project/.sdk/tm/java/feature/secrets/plugin/Types.java +2 -2
  1063. package/project/.sdk/tm/java/feature/secrets/plugin/Version.java +2 -2
  1064. package/project/.sdk/tm/java/feature/secrets/sekreto/Addr.java +2 -2
  1065. package/project/.sdk/tm/java/feature/secrets/sekreto/Builtins.java +2 -2
  1066. package/project/.sdk/tm/java/feature/secrets/sekreto/Json.java +2 -2
  1067. package/project/.sdk/tm/java/feature/secrets/sekreto/Provider.java +2 -2
  1068. package/project/.sdk/tm/java/feature/secrets/sekreto/Sekreto.java +2 -2
  1069. package/project/.sdk/tm/java/feature/secrets/sekreto/Support.java +2 -2
  1070. package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Aws.java +2 -2
  1071. package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Azuresecrets.java +2 -2
  1072. package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Boru.java +2 -2
  1073. package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Doppler.java +2 -2
  1074. package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Gcpsecrets.java +2 -2
  1075. package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Hashicorp.java +2 -2
  1076. package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Httpjson.java +2 -2
  1077. package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Infisical.java +2 -2
  1078. package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Minivault.java +2 -2
  1079. package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Onepassword.java +2 -2
  1080. package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Proc.java +2 -2
  1081. package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Secretspec.java +2 -2
  1082. package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Sigv4.java +2 -2
  1083. package/project/.sdk/tm/java/test/PipelineTest.java +1 -1
  1084. package/project/.sdk/tm/java/test/PrimaryUtilityTest.java +199 -2
  1085. package/project/.sdk/tm/java/test/RunnerSupport.java +4 -4
  1086. package/project/.sdk/tm/java/test/StructCorpusTest.java +32 -3
  1087. package/project/.sdk/tm/java/test/feature/secrets/SecretsFeatureTest.java +111 -2
  1088. package/project/.sdk/tm/java/test/vendor/omni/Json.java +2 -2
  1089. package/project/.sdk/tm/java/test/vendor/omni/Runner.java +2 -2
  1090. package/project/.sdk/tm/java/test/vendor/omni/Util.java +2 -2
  1091. package/project/.sdk/tm/java/utility/Clean.java +186 -19
  1092. package/project/.sdk/tm/java/utility/Fetcher.java +109 -14
  1093. package/project/.sdk/tm/java/utility/MakeError.java +4 -4
  1094. package/project/.sdk/tm/java/utility/MakeOptions.java +5 -5
  1095. package/project/.sdk/tm/java/utility/Register.java +4 -0
  1096. package/project/.sdk/tm/java/utility/TransformResponse.java +5 -0
  1097. package/project/.sdk/tm/java/utility/struct/Struct.java +1239 -229
  1098. package/project/.sdk/tm/js/Makefile +5 -4
  1099. package/project/.sdk/tm/js/src/feature/secrets/SecretsFeature.js +2 -0
  1100. package/project/.sdk/tm/js/src/feature/secrets/plugin/capability.js +1 -1
  1101. package/project/.sdk/tm/js/src/feature/secrets/plugin/catalog.js +1 -1
  1102. package/project/.sdk/tm/js/src/feature/secrets/plugin/config.js +1 -1
  1103. package/project/.sdk/tm/js/src/feature/secrets/plugin/depend.js +1 -1
  1104. package/project/.sdk/tm/js/src/feature/secrets/plugin/env.js +1 -1
  1105. package/project/.sdk/tm/js/src/feature/secrets/plugin/export.js +1 -1
  1106. package/project/.sdk/tm/js/src/feature/secrets/plugin/graph.js +1 -1
  1107. package/project/.sdk/tm/js/src/feature/secrets/plugin/host.js +1 -1
  1108. package/project/.sdk/tm/js/src/feature/secrets/plugin/index.js +1 -1
  1109. package/project/.sdk/tm/js/src/feature/secrets/plugin/order.js +1 -1
  1110. package/project/.sdk/tm/js/src/feature/secrets/plugin/point.js +1 -1
  1111. package/project/.sdk/tm/js/src/feature/secrets/plugin/ref.js +1 -1
  1112. package/project/.sdk/tm/js/src/feature/secrets/plugin/resolve.js +1 -1
  1113. package/project/.sdk/tm/js/src/feature/secrets/plugin/types.js +1 -1
  1114. package/project/.sdk/tm/js/src/feature/secrets/plugin/version.js +1 -1
  1115. package/project/.sdk/tm/js/src/feature/secrets/sekreto/Sekreto.js +1 -1
  1116. package/project/.sdk/tm/js/src/feature/secrets/sekreto/index.js +1 -1
  1117. package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/aws.js +1 -1
  1118. package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/azuresecrets.js +1 -1
  1119. package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/boru.js +1 -1
  1120. package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/doppler.js +1 -1
  1121. package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/gcpsecrets.js +1 -1
  1122. package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/hashicorp.js +1 -1
  1123. package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/httpjson.js +1 -1
  1124. package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/infisical.js +1 -1
  1125. package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/minivault.js +1 -1
  1126. package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/onepassword.js +1 -1
  1127. package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/secretspec.js +1 -1
  1128. package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/sigv4.js +1 -1
  1129. package/project/.sdk/tm/js/src/feature/secrets/sekreto/provider/addr.js +1 -1
  1130. package/project/.sdk/tm/js/src/feature/secrets/sekreto/provider/builtin.js +1 -1
  1131. package/project/.sdk/tm/js/src/feature/secrets/sekreto/provider/dotenv.js +1 -1
  1132. package/project/.sdk/tm/js/src/feature/secrets/sekreto/provider/env.js +1 -1
  1133. package/project/.sdk/tm/js/src/feature/secrets/sekreto/provider/file.js +1 -1
  1134. package/project/.sdk/tm/js/src/feature/secrets/sekreto/provider/memory.js +1 -1
  1135. package/project/.sdk/tm/js/src/feature/secrets/sekreto/provider/support.js +1 -1
  1136. package/project/.sdk/tm/js/src/feature/validate/ValidateFeature.js +4 -5
  1137. package/project/.sdk/tm/js/src/utility/CleanUtility.js +104 -10
  1138. package/project/.sdk/tm/js/src/utility/FetcherUtility.js +99 -1
  1139. package/project/.sdk/tm/js/src/utility/MakeErrorUtility.js +4 -4
  1140. package/project/.sdk/tm/js/src/utility/MakeOptionsUtility.js +5 -5
  1141. package/project/.sdk/tm/js/src/utility/MediaUtility.js +32 -0
  1142. package/project/.sdk/tm/js/src/utility/ResultBodyUtility.js +6 -14
  1143. package/project/.sdk/tm/js/src/utility/StructUtility.js +972 -180
  1144. package/project/.sdk/tm/js/src/utility/Utility.js +2 -1
  1145. package/project/.sdk/tm/js/test/feature/harness.js +6 -7
  1146. package/project/.sdk/tm/js/test/feature/secrets/Secrets.test.js +92 -2
  1147. package/project/.sdk/tm/js/test/live-entity.js +8 -8
  1148. package/project/.sdk/tm/js/test/utility/PrimaryUtility.test.js +9 -1
  1149. package/project/.sdk/tm/js/test/utility/StructUtility.test.js +32 -27
  1150. package/project/.sdk/tm/js/test/utility/index.js +1 -1
  1151. package/project/.sdk/tm/js/test/vendor/omni/index.js +1 -1
  1152. package/project/.sdk/tm/js/test/vendor/omni/runner.js +1 -1
  1153. package/project/.sdk/tm/js/test/vendor/omni/util.js +1 -1
  1154. package/project/.sdk/tm/kotlin/Makefile +7 -6
  1155. package/project/.sdk/tm/kotlin/core/Response.kt +17 -2
  1156. package/project/.sdk/tm/kotlin/core/Result.kt +2 -2
  1157. package/project/.sdk/tm/kotlin/core/SdkClient.kt +4 -4
  1158. package/project/.sdk/tm/kotlin/core/Utility.kt +4 -2
  1159. package/project/.sdk/tm/kotlin/feature/SecretsFeature.kt +2 -0
  1160. package/project/.sdk/tm/kotlin/feature/ValidateFeature.kt +4 -5
  1161. package/project/.sdk/tm/kotlin/feature/secrets/plugin/Capability.kt +2 -2
  1162. package/project/.sdk/tm/kotlin/feature/secrets/plugin/Catalog.kt +2 -2
  1163. package/project/.sdk/tm/kotlin/feature/secrets/plugin/Config.kt +2 -2
  1164. package/project/.sdk/tm/kotlin/feature/secrets/plugin/Depend.kt +2 -2
  1165. package/project/.sdk/tm/kotlin/feature/secrets/plugin/Env.kt +2 -2
  1166. package/project/.sdk/tm/kotlin/feature/secrets/plugin/Export.kt +2 -2
  1167. package/project/.sdk/tm/kotlin/feature/secrets/plugin/Graph.kt +2 -2
  1168. package/project/.sdk/tm/kotlin/feature/secrets/plugin/Host.kt +2 -2
  1169. package/project/.sdk/tm/kotlin/feature/secrets/plugin/Json.kt +2 -2
  1170. package/project/.sdk/tm/kotlin/feature/secrets/plugin/Order.kt +2 -2
  1171. package/project/.sdk/tm/kotlin/feature/secrets/plugin/Plugin.kt +2 -2
  1172. package/project/.sdk/tm/kotlin/feature/secrets/plugin/Point.kt +2 -2
  1173. package/project/.sdk/tm/kotlin/feature/secrets/plugin/Refs.kt +2 -2
  1174. package/project/.sdk/tm/kotlin/feature/secrets/plugin/Resolve.kt +2 -2
  1175. package/project/.sdk/tm/kotlin/feature/secrets/plugin/Types.kt +2 -2
  1176. package/project/.sdk/tm/kotlin/feature/secrets/plugin/Version.kt +2 -2
  1177. package/project/.sdk/tm/kotlin/feature/secrets/sekreto/Json.kt +2 -2
  1178. package/project/.sdk/tm/kotlin/feature/secrets/sekreto/Provider.kt +2 -2
  1179. package/project/.sdk/tm/kotlin/feature/secrets/sekreto/Providers.kt +2 -2
  1180. package/project/.sdk/tm/kotlin/feature/secrets/sekreto/Sekreto.kt +2 -2
  1181. package/project/.sdk/tm/kotlin/feature/secrets/sekreto/Spec.kt +2 -2
  1182. package/project/.sdk/tm/kotlin/feature/secrets/sekreto/Support.kt +2 -2
  1183. package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Aws.kt +2 -2
  1184. package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Azuresecrets.kt +2 -2
  1185. package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Boru.kt +2 -2
  1186. package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Doppler.kt +2 -2
  1187. package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Gcpsecrets.kt +2 -2
  1188. package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Hashicorp.kt +2 -2
  1189. package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Httpjson.kt +2 -2
  1190. package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Infisical.kt +2 -2
  1191. package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Minivault.kt +2 -2
  1192. package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Onepassword.kt +2 -2
  1193. package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Secretspec.kt +2 -2
  1194. package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Sigv4.kt +2 -2
  1195. package/project/.sdk/tm/kotlin/test/PipelineTest.kt +1 -1
  1196. package/project/.sdk/tm/kotlin/test/PrimaryUtilityTest.kt +188 -2
  1197. package/project/.sdk/tm/kotlin/test/RunnerSupport.kt +23 -4
  1198. package/project/.sdk/tm/kotlin/test/StructCorpusTest.kt +23 -3
  1199. package/project/.sdk/tm/kotlin/test/feature/secrets/SecretsTest.kt +110 -1
  1200. package/project/.sdk/tm/kotlin/test/vendor/omni/Json.kt +2 -2
  1201. package/project/.sdk/tm/kotlin/test/vendor/omni/Runner.kt +2 -2
  1202. package/project/.sdk/tm/kotlin/test/vendor/omni/Util.kt +2 -2
  1203. package/project/.sdk/tm/kotlin/utility/CoreUtil.kt +142 -16
  1204. package/project/.sdk/tm/kotlin/utility/Fetcher.kt +113 -14
  1205. package/project/.sdk/tm/kotlin/utility/MakeOptions.kt +5 -5
  1206. package/project/.sdk/tm/kotlin/utility/Register.kt +1 -0
  1207. package/project/.sdk/tm/kotlin/utility/struct/Struct.kt +1074 -164
  1208. package/project/.sdk/tm/lua/Makefile +4 -3
  1209. package/project/.sdk/tm/lua/core/utility_type.lua +2 -0
  1210. package/project/.sdk/tm/lua/feature/secrets/native/sekretonet.c +2 -2
  1211. package/project/.sdk/tm/lua/feature/secrets/native/sekretovault.c +2 -2
  1212. package/project/.sdk/tm/lua/feature/secrets/plugin/capability.lua +2 -2
  1213. package/project/.sdk/tm/lua/feature/secrets/plugin/catalog.lua +2 -2
  1214. package/project/.sdk/tm/lua/feature/secrets/plugin/config.lua +2 -2
  1215. package/project/.sdk/tm/lua/feature/secrets/plugin/depend.lua +2 -2
  1216. package/project/.sdk/tm/lua/feature/secrets/plugin/env.lua +2 -2
  1217. package/project/.sdk/tm/lua/feature/secrets/plugin/export.lua +2 -2
  1218. package/project/.sdk/tm/lua/feature/secrets/plugin/graph.lua +2 -2
  1219. package/project/.sdk/tm/lua/feature/secrets/plugin/host.lua +2 -2
  1220. package/project/.sdk/tm/lua/feature/secrets/plugin/json.lua +2 -2
  1221. package/project/.sdk/tm/lua/feature/secrets/plugin/order.lua +2 -2
  1222. package/project/.sdk/tm/lua/feature/secrets/plugin/point.lua +2 -2
  1223. package/project/.sdk/tm/lua/feature/secrets/plugin/ref.lua +2 -2
  1224. package/project/.sdk/tm/lua/feature/secrets/plugin/resolve.lua +2 -2
  1225. package/project/.sdk/tm/lua/feature/secrets/plugin/types.lua +2 -2
  1226. package/project/.sdk/tm/lua/feature/secrets/plugin/version.lua +2 -2
  1227. package/project/.sdk/tm/lua/feature/secrets/plugin.lua +2 -2
  1228. package/project/.sdk/tm/lua/feature/secrets/sekreto/addr.lua +2 -2
  1229. package/project/.sdk/tm/lua/feature/secrets/sekreto/err.lua +2 -2
  1230. package/project/.sdk/tm/lua/feature/secrets/sekreto/name.lua +2 -2
  1231. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/aws.lua +2 -2
  1232. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/azuresecrets.lua +2 -2
  1233. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/boru.lua +2 -2
  1234. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/crypto.lua +2 -2
  1235. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/doppler.lua +2 -2
  1236. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/gcpsecrets.lua +2 -2
  1237. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/hashicorp.lua +2 -2
  1238. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/httpjson.lua +2 -2
  1239. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/infisical.lua +2 -2
  1240. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/json.lua +2 -2
  1241. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/minivault.lua +2 -2
  1242. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/net.lua +2 -2
  1243. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/onepassword.lua +2 -2
  1244. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/secretspec.lua +2 -2
  1245. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/sigv4.lua +2 -2
  1246. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/support.lua +2 -2
  1247. package/project/.sdk/tm/lua/feature/secrets/sekreto/providers.lua +2 -2
  1248. package/project/.sdk/tm/lua/feature/secrets/sekreto.lua +2 -2
  1249. package/project/.sdk/tm/lua/feature/secrets_feature.lua +3 -0
  1250. package/project/.sdk/tm/lua/feature/validate_feature.lua +5 -6
  1251. package/project/.sdk/tm/lua/test/feature/secrets/secrets_feature_test.lua +115 -2
  1252. package/project/.sdk/tm/lua/test/omni.lua +1 -1
  1253. package/project/.sdk/tm/lua/test/pipeline_test.lua +1 -1
  1254. package/project/.sdk/tm/lua/test/primary_utility_test.lua +160 -1
  1255. package/project/.sdk/tm/lua/test/runner.lua +3 -1
  1256. package/project/.sdk/tm/lua/test/struct_utility_test.lua +152 -44
  1257. package/project/.sdk/tm/lua/test/vendor/omni/json.lua +26 -6
  1258. package/project/.sdk/tm/lua/test/vendor/omni/regex.lua +2 -2
  1259. package/project/.sdk/tm/lua/test/vendor/omni/runner.lua +2 -2
  1260. package/project/.sdk/tm/lua/test/vendor/omni/util.lua +2 -2
  1261. package/project/.sdk/tm/lua/utility/clean.lua +86 -6
  1262. package/project/.sdk/tm/lua/utility/fetcher.lua +19 -5
  1263. package/project/.sdk/tm/lua/utility/make_error.lua +4 -5
  1264. package/project/.sdk/tm/lua/utility/make_options.lua +5 -5
  1265. package/project/.sdk/tm/lua/utility/media.lua +36 -0
  1266. package/project/.sdk/tm/lua/utility/register.lua +1 -0
  1267. package/project/.sdk/tm/lua/utility/struct/regex.lua +26 -9
  1268. package/project/.sdk/tm/lua/utility/struct/struct.lua +1289 -245
  1269. package/project/.sdk/tm/lua/utility/unreadable_body.lua +6 -16
  1270. package/project/.sdk/tm/ocaml/Makefile +1 -1
  1271. package/project/.sdk/tm/ocaml/feature/secrets/plugin/capability.ml +2 -2
  1272. package/project/.sdk/tm/ocaml/feature/secrets/plugin/catalog.ml +2 -2
  1273. package/project/.sdk/tm/ocaml/feature/secrets/plugin/config.ml +2 -2
  1274. package/project/.sdk/tm/ocaml/feature/secrets/plugin/defs.ml +2 -2
  1275. package/project/.sdk/tm/ocaml/feature/secrets/plugin/depend.ml +2 -2
  1276. package/project/.sdk/tm/ocaml/feature/secrets/plugin/env.ml +2 -2
  1277. package/project/.sdk/tm/ocaml/feature/secrets/plugin/export.ml +2 -2
  1278. package/project/.sdk/tm/ocaml/feature/secrets/plugin/graph.ml +2 -2
  1279. package/project/.sdk/tm/ocaml/feature/secrets/plugin/host.ml +2 -2
  1280. package/project/.sdk/tm/ocaml/feature/secrets/plugin/order.ml +2 -2
  1281. package/project/.sdk/tm/ocaml/feature/secrets/plugin/point.ml +2 -2
  1282. package/project/.sdk/tm/ocaml/feature/secrets/plugin/ref.ml +2 -2
  1283. package/project/.sdk/tm/ocaml/feature/secrets/plugin/resolve.ml +2 -2
  1284. package/project/.sdk/tm/ocaml/feature/secrets/plugin/types.ml +2 -2
  1285. package/project/.sdk/tm/ocaml/feature/secrets/plugin/value.ml +2 -2
  1286. package/project/.sdk/tm/ocaml/feature/secrets/plugin/version.ml +2 -2
  1287. package/project/.sdk/tm/ocaml/feature/secrets/plugins/aws.ml +2 -2
  1288. package/project/.sdk/tm/ocaml/feature/secrets/plugins/azuresecrets.ml +2 -2
  1289. package/project/.sdk/tm/ocaml/feature/secrets/plugins/boru.ml +2 -2
  1290. package/project/.sdk/tm/ocaml/feature/secrets/plugins/crypto.ml +2 -2
  1291. package/project/.sdk/tm/ocaml/feature/secrets/plugins/doppler.ml +2 -2
  1292. package/project/.sdk/tm/ocaml/feature/secrets/plugins/gcpsecrets.ml +2 -2
  1293. package/project/.sdk/tm/ocaml/feature/secrets/plugins/hashicorp.ml +2 -2
  1294. package/project/.sdk/tm/ocaml/feature/secrets/plugins/http.ml +2 -2
  1295. package/project/.sdk/tm/ocaml/feature/secrets/plugins/httpjson.ml +2 -2
  1296. package/project/.sdk/tm/ocaml/feature/secrets/plugins/infisical.ml +2 -2
  1297. package/project/.sdk/tm/ocaml/feature/secrets/plugins/minivault.ml +2 -2
  1298. package/project/.sdk/tm/ocaml/feature/secrets/plugins/minivault_stubs.c +2 -2
  1299. package/project/.sdk/tm/ocaml/feature/secrets/plugins/onepassword.ml +2 -2
  1300. package/project/.sdk/tm/ocaml/feature/secrets/plugins/runcmd.ml +2 -2
  1301. package/project/.sdk/tm/ocaml/feature/secrets/plugins/secretspec.ml +2 -2
  1302. package/project/.sdk/tm/ocaml/feature/secrets/plugins/sigv4.ml +2 -2
  1303. package/project/.sdk/tm/ocaml/feature/secrets/plugins/tls.ml +2 -2
  1304. package/project/.sdk/tm/ocaml/feature/secrets/plugins/tls_stubs.c +2 -2
  1305. package/project/.sdk/tm/ocaml/feature/secrets/sekreto/json.ml +2 -2
  1306. package/project/.sdk/tm/ocaml/feature/secrets/sekreto/provider.ml +2 -2
  1307. package/project/.sdk/tm/ocaml/feature/secrets/sekreto/secret.ml +2 -2
  1308. package/project/.sdk/tm/ocaml/feature/secrets/sekreto/sekreto.ml +2 -2
  1309. package/project/.sdk/tm/ocaml/feature/secrets_feature.ml +3 -1
  1310. package/project/.sdk/tm/ocaml/sdk_features.ml +9 -10
  1311. package/project/.sdk/tm/ocaml/sdk_runtime.ml +78 -15
  1312. package/project/.sdk/tm/ocaml/sdk_types.ml +1 -1
  1313. package/project/.sdk/tm/ocaml/test/feature/secrets/t_secrets.ml +157 -4
  1314. package/project/.sdk/tm/ocaml/test/primary_utility_test.ml +14 -9
  1315. package/project/.sdk/tm/ocaml/test/struct_corpus.ml +24 -15
  1316. package/project/.sdk/tm/ocaml/test/vendor/omni/omni.ml +34 -28
  1317. package/project/.sdk/tm/ocaml/utility/voxgig_struct.ml +807 -157
  1318. package/project/.sdk/tm/ocaml/utility/vregex.ml +190 -60
  1319. package/project/.sdk/tm/perl/Makefile +8 -7
  1320. package/project/.sdk/tm/perl/core/control.pm +1 -1
  1321. package/project/.sdk/tm/perl/core/error.pm +14 -1
  1322. package/project/.sdk/tm/perl/core/helpers.pm +8 -7
  1323. package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Capability.pm +2 -2
  1324. package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Catalog.pm +2 -2
  1325. package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Config.pm +2 -2
  1326. package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Depend.pm +2 -2
  1327. package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Env.pm +2 -2
  1328. package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Export.pm +2 -2
  1329. package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Graph.pm +2 -2
  1330. package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Host.pm +2 -2
  1331. package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Order.pm +2 -2
  1332. package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Point.pm +2 -2
  1333. package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Ref.pm +2 -2
  1334. package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Resolve.pm +2 -2
  1335. package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Types.pm +2 -2
  1336. package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Version.pm +2 -2
  1337. package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin.pm +2 -2
  1338. package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Aws.pm +1 -1
  1339. package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Azuresecrets.pm +1 -1
  1340. package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Boru.pm +1 -1
  1341. package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Doppler.pm +1 -1
  1342. package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Gcpsecrets.pm +1 -1
  1343. package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Hashicorp.pm +1 -1
  1344. package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Httpjson.pm +1 -1
  1345. package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Infisical.pm +1 -1
  1346. package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Minivault.pm +1 -1
  1347. package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Onepassword.pm +1 -1
  1348. package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Proc.pm +1 -1
  1349. package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Secretspec.pm +1 -1
  1350. package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Sigv4.pm +1 -1
  1351. package/project/.sdk/tm/perl/feature/secrets/sekreto/Voxgig/Sekreto/Addr.pm +1 -1
  1352. package/project/.sdk/tm/perl/feature/secrets/sekreto/Voxgig/Sekreto/Providers.pm +1 -1
  1353. package/project/.sdk/tm/perl/feature/secrets/sekreto/Voxgig/Sekreto.pm +1 -1
  1354. package/project/.sdk/tm/perl/feature/secrets_feature.pm +2 -0
  1355. package/project/.sdk/tm/perl/feature/validate_feature.pm +4 -5
  1356. package/project/.sdk/tm/perl/lib/Voxgig/Struct.pm +1082 -149
  1357. package/project/.sdk/tm/perl/t/feature/secrets/secrets.t +105 -0
  1358. package/project/.sdk/tm/perl/t/feature_corpus.t +1 -1
  1359. package/project/.sdk/tm/perl/t/omni.pm +16 -6
  1360. package/project/.sdk/tm/perl/t/primary_utility.t +151 -2
  1361. package/project/.sdk/tm/perl/t/runner.pm +1 -1
  1362. package/project/.sdk/tm/perl/t/struct_utility.t +19 -11
  1363. package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni/Runner.pm +1 -1
  1364. package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni/Util.pm +1 -1
  1365. package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni.pm +1 -1
  1366. package/project/.sdk/tm/perl/utility/clean.pm +130 -15
  1367. package/project/.sdk/tm/perl/utility/fetcher.pm +18 -5
  1368. package/project/.sdk/tm/perl/utility/make_error.pm +4 -4
  1369. package/project/.sdk/tm/perl/utility/make_options.pm +5 -5
  1370. package/project/.sdk/tm/perl/utility/media.pm +29 -0
  1371. package/project/.sdk/tm/perl/utility/result_body.pm +6 -13
  1372. package/project/.sdk/tm/perl/utility/transform_response.pm +3 -0
  1373. package/project/.sdk/tm/php/Makefile +4 -3
  1374. package/project/.sdk/tm/php/core/Control.php +3 -2
  1375. package/project/.sdk/tm/php/core/Helpers.php +49 -0
  1376. package/project/.sdk/tm/php/core/UtilityType.php +2 -0
  1377. package/project/.sdk/tm/php/feature/SecretsFeature.php +2 -0
  1378. package/project/.sdk/tm/php/feature/ValidateFeature.php +6 -5
  1379. package/project/.sdk/tm/php/feature/secrets/plugin/Capability.php +2 -2
  1380. package/project/.sdk/tm/php/feature/secrets/plugin/Catalog.php +2 -2
  1381. package/project/.sdk/tm/php/feature/secrets/plugin/Config.php +2 -2
  1382. package/project/.sdk/tm/php/feature/secrets/plugin/Depend.php +2 -2
  1383. package/project/.sdk/tm/php/feature/secrets/plugin/Env.php +2 -2
  1384. package/project/.sdk/tm/php/feature/secrets/plugin/Export.php +2 -2
  1385. package/project/.sdk/tm/php/feature/secrets/plugin/Graph.php +2 -2
  1386. package/project/.sdk/tm/php/feature/secrets/plugin/Host.php +2 -2
  1387. package/project/.sdk/tm/php/feature/secrets/plugin/Order.php +2 -2
  1388. package/project/.sdk/tm/php/feature/secrets/plugin/Point.php +2 -2
  1389. package/project/.sdk/tm/php/feature/secrets/plugin/Ref.php +2 -2
  1390. package/project/.sdk/tm/php/feature/secrets/plugin/Resolve.php +2 -2
  1391. package/project/.sdk/tm/php/feature/secrets/plugin/Types.php +2 -2
  1392. package/project/.sdk/tm/php/feature/secrets/plugin/Version.php +2 -2
  1393. package/project/.sdk/tm/php/feature/secrets/plugin/plugin.php +2 -2
  1394. package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/aws.php +2 -2
  1395. package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/azuresecrets.php +2 -2
  1396. package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/boru.php +2 -2
  1397. package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/doppler.php +2 -2
  1398. package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/gcpsecrets.php +2 -2
  1399. package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/hashicorp.php +2 -2
  1400. package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/httpjson.php +2 -2
  1401. package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/infisical.php +2 -2
  1402. package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/minivault.php +2 -2
  1403. package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/onepassword.php +2 -2
  1404. package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/runcmd.php +2 -2
  1405. package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/secretspec.php +2 -2
  1406. package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/sigv4.php +2 -2
  1407. package/project/.sdk/tm/php/feature/secrets/sekreto/src/Addr.php +2 -2
  1408. package/project/.sdk/tm/php/feature/secrets/sekreto/src/Providers.php +2 -2
  1409. package/project/.sdk/tm/php/feature/secrets/sekreto/src/Sekreto.php +2 -2
  1410. package/project/.sdk/tm/php/test/FeatureCorpusTest.php +1 -1
  1411. package/project/.sdk/tm/php/test/Omni.php +1 -1
  1412. package/project/.sdk/tm/php/test/PipelineTest.php +146 -1
  1413. package/project/.sdk/tm/php/test/PrimaryUtilityTest.php +23 -1
  1414. package/project/.sdk/tm/php/test/Runner.php +1 -1
  1415. package/project/.sdk/tm/php/test/StructUtilityTest.php +65 -116
  1416. package/project/.sdk/tm/php/test/feature/secrets/SecretsTest.php +119 -2
  1417. package/project/.sdk/tm/php/test/vendor/omni/Runner.php +2 -2
  1418. package/project/.sdk/tm/php/test/vendor/omni/Util.php +2 -2
  1419. package/project/.sdk/tm/php/utility/Clean.php +119 -19
  1420. package/project/.sdk/tm/php/utility/Fetcher.php +24 -7
  1421. package/project/.sdk/tm/php/utility/MakeError.php +4 -5
  1422. package/project/.sdk/tm/php/utility/MakeOptions.php +9 -5
  1423. package/project/.sdk/tm/php/utility/Media.php +29 -0
  1424. package/project/.sdk/tm/php/utility/PrepareBody.php +7 -5
  1425. package/project/.sdk/tm/php/utility/Register.php +1 -0
  1426. package/project/.sdk/tm/php/utility/ResultBody.php +6 -16
  1427. package/project/.sdk/tm/php/utility/TransformResponse.php +5 -0
  1428. package/project/.sdk/tm/php/utility/struct/Struct.php +1933 -530
  1429. package/project/.sdk/tm/py/Makefile +3 -2
  1430. package/project/.sdk/tm/py/pkg/core/utility_type.py +2 -0
  1431. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/__init__.py +1 -1
  1432. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/capability.py +1 -1
  1433. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/catalog.py +1 -1
  1434. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/config.py +1 -1
  1435. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/depend.py +1 -1
  1436. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/env.py +1 -1
  1437. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/export.py +1 -1
  1438. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/graph.py +1 -1
  1439. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/host.py +1 -1
  1440. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/order.py +1 -1
  1441. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/point.py +1 -1
  1442. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/ref.py +1 -1
  1443. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/resolve.py +1 -1
  1444. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/types.py +1 -1
  1445. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/version.py +1 -1
  1446. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/__init__.py +1 -1
  1447. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/addr.py +1 -1
  1448. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/aws.py +1 -1
  1449. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/azuresecrets.py +1 -1
  1450. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/boru.py +1 -1
  1451. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/doppler.py +1 -1
  1452. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/gcpsecrets.py +1 -1
  1453. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/hashicorp.py +1 -1
  1454. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/httpjson.py +1 -1
  1455. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/infisical.py +1 -1
  1456. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/minivault.py +1 -1
  1457. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/onepassword.py +1 -1
  1458. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/secretspec.py +1 -1
  1459. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/sigv4.py +1 -1
  1460. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/providers.py +1 -1
  1461. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/sekreto.py +1 -1
  1462. package/project/.sdk/tm/py/pkg/feature/secrets_feature.py +12 -1
  1463. package/project/.sdk/tm/py/pkg/feature/validate_feature.py +4 -5
  1464. package/project/.sdk/tm/py/pkg/utility/clean.py +104 -16
  1465. package/project/.sdk/tm/py/pkg/utility/fetcher.py +64 -4
  1466. package/project/.sdk/tm/py/pkg/utility/make_error.py +4 -4
  1467. package/project/.sdk/tm/py/pkg/utility/make_options.py +5 -5
  1468. package/project/.sdk/tm/py/pkg/utility/media.py +24 -0
  1469. package/project/.sdk/tm/py/pkg/utility/register.py +2 -1
  1470. package/project/.sdk/tm/py/pkg/utility/result_body.py +7 -12
  1471. package/project/.sdk/tm/py/pkg/utility/voxgig_struct/voxgig_struct.py +1057 -198
  1472. package/project/.sdk/tm/py/test/feature/secrets/test_secrets.py +124 -0
  1473. package/project/.sdk/tm/py/test/feature_harness.py +6 -6
  1474. package/project/.sdk/tm/py/test/omni.py +1 -1
  1475. package/project/.sdk/tm/py/test/runner.py +6 -4
  1476. package/project/.sdk/tm/py/test/test_feature_corpus.py +2 -2
  1477. package/project/.sdk/tm/py/test/test_pipeline.py +1 -1
  1478. package/project/.sdk/tm/py/test/test_primary_utility.py +135 -1
  1479. package/project/.sdk/tm/py/test/test_struct_utility.py +29 -30
  1480. package/project/.sdk/tm/py/test/voxgig_omni/__init__.py +1 -1
  1481. package/project/.sdk/tm/py/test/voxgig_omni/runner.py +1 -1
  1482. package/project/.sdk/tm/py/test/voxgig_omni/util.py +1 -1
  1483. package/project/.sdk/tm/py-data/Makefile +5 -4
  1484. package/project/.sdk/tm/py-data/pkg/auth.py +8 -5
  1485. package/project/.sdk/tm/py-data/pkg/fetch.py +8 -8
  1486. package/project/.sdk/tm/py-data/test/conftest.py +6 -7
  1487. package/project/.sdk/tm/py-data/test/test_auth.py +5 -0
  1488. package/project/.sdk/tm/rb/Makefile +3 -2
  1489. package/project/.sdk/tm/rb/core/control.rb +1 -1
  1490. package/project/.sdk/tm/rb/core/utility_type.rb +2 -1
  1491. package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/capability.rb +2 -2
  1492. package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/catalog.rb +2 -2
  1493. package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/config.rb +2 -2
  1494. package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/depend.rb +2 -2
  1495. package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/env.rb +2 -2
  1496. package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/export.rb +2 -2
  1497. package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/graph.rb +2 -2
  1498. package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/host.rb +2 -2
  1499. package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/order.rb +2 -2
  1500. package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/point.rb +2 -2
  1501. package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/ref.rb +2 -2
  1502. package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/resolve.rb +2 -2
  1503. package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/types.rb +2 -2
  1504. package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/version.rb +2 -2
  1505. package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin.rb +2 -2
  1506. package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/addr.rb +2 -2
  1507. package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/aws.rb +2 -2
  1508. package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/azuresecrets.rb +2 -2
  1509. package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/boru.rb +2 -2
  1510. package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/doppler.rb +2 -2
  1511. package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/gcpsecrets.rb +2 -2
  1512. package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/hashicorp.rb +2 -2
  1513. package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/httpjson.rb +2 -2
  1514. package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/infisical.rb +2 -2
  1515. package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/minivault.rb +2 -2
  1516. package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/onepassword.rb +2 -2
  1517. package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/secretspec.rb +2 -2
  1518. package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/sigv4.rb +2 -2
  1519. package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/providers.rb +2 -2
  1520. package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/sekreto.rb +2 -2
  1521. package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto.rb +2 -2
  1522. package/project/.sdk/tm/rb/feature/secrets_feature.rb +3 -0
  1523. package/project/.sdk/tm/rb/feature/validate_feature.rb +4 -5
  1524. package/project/.sdk/tm/rb/test/feature/secrets/secrets_feature_test.rb +117 -0
  1525. package/project/.sdk/tm/rb/test/feature_corpus_test.rb +1 -1
  1526. package/project/.sdk/tm/rb/test/omni.rb +1 -1
  1527. package/project/.sdk/tm/rb/test/pipeline_test.rb +1 -1
  1528. package/project/.sdk/tm/rb/test/primary_utility_test.rb +121 -1
  1529. package/project/.sdk/tm/rb/test/runner.rb +1 -1
  1530. package/project/.sdk/tm/rb/test/struct_utility_test.rb +30 -34
  1531. package/project/.sdk/tm/rb/test/vendor/omni/runner.rb +2 -2
  1532. package/project/.sdk/tm/rb/test/vendor/omni/util.rb +2 -2
  1533. package/project/.sdk/tm/rb/test/vendor/omni/voxgig_omni.rb +2 -2
  1534. package/project/.sdk/tm/rb/utility/clean.rb +94 -14
  1535. package/project/.sdk/tm/rb/utility/fetcher.rb +12 -3
  1536. package/project/.sdk/tm/rb/utility/make_error.rb +4 -4
  1537. package/project/.sdk/tm/rb/utility/make_options.rb +5 -5
  1538. package/project/.sdk/tm/rb/utility/media.rb +21 -0
  1539. package/project/.sdk/tm/rb/utility/register.rb +1 -0
  1540. package/project/.sdk/tm/rb/utility/result_body.rb +7 -9
  1541. package/project/.sdk/tm/rb/utility/struct/voxgig_struct.rb +1569 -678
  1542. package/project/.sdk/tm/rust/Makefile +5 -5
  1543. package/project/.sdk/tm/rust/core/helpers.rs +1 -1
  1544. package/project/.sdk/tm/rust/core/response.rs +18 -2
  1545. package/project/.sdk/tm/rust/core/result.rs +4 -4
  1546. package/project/.sdk/tm/rust/core/utility_type.rs +5 -1
  1547. package/project/.sdk/tm/rust/feature/secrets/plugin/capability.rs +1 -1
  1548. package/project/.sdk/tm/rust/feature/secrets/plugin/catalog.rs +1 -1
  1549. package/project/.sdk/tm/rust/feature/secrets/plugin/config.rs +1 -1
  1550. package/project/.sdk/tm/rust/feature/secrets/plugin/depend.rs +1 -1
  1551. package/project/.sdk/tm/rust/feature/secrets/plugin/env.rs +1 -1
  1552. package/project/.sdk/tm/rust/feature/secrets/plugin/export.rs +1 -1
  1553. package/project/.sdk/tm/rust/feature/secrets/plugin/graph.rs +1 -1
  1554. package/project/.sdk/tm/rust/feature/secrets/plugin/host.rs +1 -1
  1555. package/project/.sdk/tm/rust/feature/secrets/plugin/mod.rs +1 -1
  1556. package/project/.sdk/tm/rust/feature/secrets/plugin/order.rs +1 -1
  1557. package/project/.sdk/tm/rust/feature/secrets/plugin/point.rs +1 -1
  1558. package/project/.sdk/tm/rust/feature/secrets/plugin/refs.rs +1 -1
  1559. package/project/.sdk/tm/rust/feature/secrets/plugin/resolve.rs +1 -1
  1560. package/project/.sdk/tm/rust/feature/secrets/plugin/types.rs +1 -1
  1561. package/project/.sdk/tm/rust/feature/secrets/plugin/value.rs +1 -1
  1562. package/project/.sdk/tm/rust/feature/secrets/plugin/version.rs +1 -1
  1563. package/project/.sdk/tm/rust/feature/secrets/plugins/aws/crypto.rs +1 -1
  1564. package/project/.sdk/tm/rust/feature/secrets/plugins/aws/sigv4.rs +1 -1
  1565. package/project/.sdk/tm/rust/feature/secrets/plugins/aws.rs +1 -1
  1566. package/project/.sdk/tm/rust/feature/secrets/plugins/azuresecrets.rs +1 -1
  1567. package/project/.sdk/tm/rust/feature/secrets/plugins/boru.rs +1 -1
  1568. package/project/.sdk/tm/rust/feature/secrets/plugins/doppler.rs +1 -1
  1569. package/project/.sdk/tm/rust/feature/secrets/plugins/gcpsecrets.rs +1 -1
  1570. package/project/.sdk/tm/rust/feature/secrets/plugins/hashicorp.rs +1 -1
  1571. package/project/.sdk/tm/rust/feature/secrets/plugins/httpjson/http.rs +1 -1
  1572. package/project/.sdk/tm/rust/feature/secrets/plugins/httpjson/json.rs +1 -1
  1573. package/project/.sdk/tm/rust/feature/secrets/plugins/httpjson.rs +1 -1
  1574. package/project/.sdk/tm/rust/feature/secrets/plugins/infisical.rs +1 -1
  1575. package/project/.sdk/tm/rust/feature/secrets/plugins/minivault/format.rs +1 -1
  1576. package/project/.sdk/tm/rust/feature/secrets/plugins/minivault.rs +1 -1
  1577. package/project/.sdk/tm/rust/feature/secrets/plugins/onepassword.rs +1 -1
  1578. package/project/.sdk/tm/rust/feature/secrets/plugins/secretspec.rs +1 -1
  1579. package/project/.sdk/tm/rust/feature/secrets/sekreto/addr.rs +1 -1
  1580. package/project/.sdk/tm/rust/feature/secrets/sekreto/mod.rs +1 -1
  1581. package/project/.sdk/tm/rust/feature/secrets/sekreto/providers.rs +1 -1
  1582. package/project/.sdk/tm/rust/feature/secrets/sekreto/sekreto.rs +1 -1
  1583. package/project/.sdk/tm/rust/feature/secrets.rs +10 -1
  1584. package/project/.sdk/tm/rust/tests/common/mod.rs +3 -3
  1585. package/project/.sdk/tm/rust/tests/feature/secrets/main.rs +309 -10
  1586. package/project/.sdk/tm/rust/tests/omni_resolver/mod.rs +1 -1
  1587. package/project/.sdk/tm/rust/tests/pipeline_test.rs +5 -2
  1588. package/project/.sdk/tm/rust/tests/primary_utility_test.rs +281 -13
  1589. package/project/.sdk/tm/rust/tests/server_variable_test.rs +48 -0
  1590. package/project/.sdk/tm/rust/tests/struct_utility_test.rs +9 -1
  1591. package/project/.sdk/tm/rust/tests/vendor/omni/json.rs +27 -11
  1592. package/project/.sdk/tm/rust/tests/vendor/omni/mod.rs +1 -1
  1593. package/project/.sdk/tm/rust/tests/vendor/omni/regex.rs +1 -1
  1594. package/project/.sdk/tm/rust/tests/vendor/omni/runner.rs +1 -1
  1595. package/project/.sdk/tm/rust/tests/vendor/omni/util.rs +1 -1
  1596. package/project/.sdk/tm/rust/utility/clean.rs +128 -9
  1597. package/project/.sdk/tm/rust/utility/fetcher.rs +107 -44
  1598. package/project/.sdk/tm/rust/utility/make_error.rs +4 -4
  1599. package/project/.sdk/tm/rust/utility/make_options.rs +12 -8
  1600. package/project/.sdk/tm/rust/utility/voxgigstruct/consts.rs +18 -20
  1601. package/project/.sdk/tm/rust/utility/voxgigstruct/major.rs +1328 -227
  1602. package/project/.sdk/tm/rust/utility/voxgigstruct/mini.rs +90 -95
  1603. package/project/.sdk/tm/rust/utility/voxgigstruct/mod.rs +12 -8
  1604. package/project/.sdk/tm/rust/utility/voxgigstruct/ordered_map.rs +3 -1
  1605. package/project/.sdk/tm/rust/utility/voxgigstruct/re.rs +49 -6
  1606. package/project/.sdk/tm/rust/utility/voxgigstruct/value.rs +5 -2
  1607. package/project/.sdk/tm/scala/Makefile +4 -4
  1608. package/project/.sdk/tm/scala/core/Response.scala +19 -2
  1609. package/project/.sdk/tm/scala/core/Result.scala +2 -2
  1610. package/project/.sdk/tm/scala/core/SdkClient.scala +4 -4
  1611. package/project/.sdk/tm/scala/core/Types.scala +3 -0
  1612. package/project/.sdk/tm/scala/core/Utility.scala +2 -0
  1613. package/project/.sdk/tm/scala/feature/SecretsFeature.scala +2 -0
  1614. package/project/.sdk/tm/scala/feature/ValidateFeature.scala +4 -5
  1615. package/project/.sdk/tm/scala/feature/secrets/plugin/Capability.scala +2 -2
  1616. package/project/.sdk/tm/scala/feature/secrets/plugin/Config.scala +2 -2
  1617. package/project/.sdk/tm/scala/feature/secrets/plugin/Depend.scala +2 -2
  1618. package/project/.sdk/tm/scala/feature/secrets/plugin/Env.scala +2 -2
  1619. package/project/.sdk/tm/scala/feature/secrets/plugin/Export.scala +2 -2
  1620. package/project/.sdk/tm/scala/feature/secrets/plugin/Graph.scala +2 -2
  1621. package/project/.sdk/tm/scala/feature/secrets/plugin/Host.scala +2 -2
  1622. package/project/.sdk/tm/scala/feature/secrets/plugin/Json.scala +2 -2
  1623. package/project/.sdk/tm/scala/feature/secrets/plugin/Order.scala +2 -2
  1624. package/project/.sdk/tm/scala/feature/secrets/plugin/Plugin.scala +2 -2
  1625. package/project/.sdk/tm/scala/feature/secrets/plugin/Point.scala +2 -2
  1626. package/project/.sdk/tm/scala/feature/secrets/plugin/Refs.scala +2 -2
  1627. package/project/.sdk/tm/scala/feature/secrets/plugin/Resolve.scala +2 -2
  1628. package/project/.sdk/tm/scala/feature/secrets/plugin/Types.scala +2 -2
  1629. package/project/.sdk/tm/scala/feature/secrets/plugin/Value.scala +2 -2
  1630. package/project/.sdk/tm/scala/feature/secrets/plugin/Version.scala +2 -2
  1631. package/project/.sdk/tm/scala/feature/secrets/sekreto/Json.scala +2 -2
  1632. package/project/.sdk/tm/scala/feature/secrets/sekreto/Provider.scala +2 -2
  1633. package/project/.sdk/tm/scala/feature/secrets/sekreto/Providers.scala +2 -2
  1634. package/project/.sdk/tm/scala/feature/secrets/sekreto/Sekreto.scala +2 -2
  1635. package/project/.sdk/tm/scala/feature/secrets/sekreto/Spec.scala +2 -2
  1636. package/project/.sdk/tm/scala/feature/secrets/sekreto/Support.scala +2 -2
  1637. package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Aws.scala +2 -2
  1638. package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Azuresecrets.scala +2 -2
  1639. package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Boru.scala +2 -2
  1640. package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Doppler.scala +2 -2
  1641. package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Gcpsecrets.scala +2 -2
  1642. package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Hashicorp.scala +2 -2
  1643. package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Httpjson.scala +2 -2
  1644. package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Infisical.scala +2 -2
  1645. package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Minivault.scala +2 -2
  1646. package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Onepassword.scala +2 -2
  1647. package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Secretspec.scala +2 -2
  1648. package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Sigv4.scala +2 -2
  1649. package/project/.sdk/tm/scala/sdktest/PrimaryCorpus.scala +10 -4
  1650. package/project/.sdk/tm/scala/sdktest/SdkTestMain.scala +219 -3
  1651. package/project/.sdk/tm/scala/sdktest/StructCorpus.scala +20 -14
  1652. package/project/.sdk/tm/scala/sdktest/feature/secrets/SecretsTestMain.scala +108 -0
  1653. package/project/.sdk/tm/scala/sdktest/vendor/omni/Json.scala +2 -2
  1654. package/project/.sdk/tm/scala/sdktest/vendor/omni/Runner.scala +2 -2
  1655. package/project/.sdk/tm/scala/sdktest/vendor/omni/Util.scala +2 -2
  1656. package/project/.sdk/tm/scala/utility/Fetcher.scala +101 -14
  1657. package/project/.sdk/tm/scala/utility/Make.scala +4 -4
  1658. package/project/.sdk/tm/scala/utility/Misc.scala +133 -13
  1659. package/project/.sdk/tm/scala/utility/Register.scala +1 -0
  1660. package/project/.sdk/tm/scala/utility/Transform.scala +6 -1
  1661. package/project/.sdk/tm/scala/utility/struct/Struct.java +1267 -253
  1662. package/project/.sdk/tm/scala/utility/struct/voxgig_struct.scala +909 -202
  1663. package/project/.sdk/tm/swift/Makefile +5 -5
  1664. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Condense.swift +351 -0
  1665. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Constants.swift +7 -4
  1666. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Inject.swift +39 -24
  1667. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Injection.swift +51 -14
  1668. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/JSON.swift +4 -1
  1669. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Merge.swift +3 -0
  1670. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Minor.swift +190 -77
  1671. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/OrderedDictionary.swift +3 -0
  1672. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Path.swift +37 -8
  1673. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Select.swift +37 -20
  1674. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Transform.swift +67 -46
  1675. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Validate.swift +602 -110
  1676. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Value.swift +22 -16
  1677. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Walk.swift +9 -1
  1678. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Response.swift +20 -2
  1679. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Result.swift +2 -2
  1680. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Support.swift +15 -0
  1681. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Utility.swift +2 -0
  1682. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/SecretsFeature.swift +2 -0
  1683. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/TestFeature.swift +6 -6
  1684. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/ValidateFeature.swift +5 -6
  1685. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Capability.swift +2 -2
  1686. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Catalog.swift +2 -2
  1687. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Config.swift +2 -2
  1688. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Depend.swift +2 -2
  1689. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Env.swift +2 -2
  1690. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Export.swift +2 -2
  1691. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Graph.swift +2 -2
  1692. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Host.swift +2 -2
  1693. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Json.swift +2 -2
  1694. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Order.swift +2 -2
  1695. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Point.swift +2 -2
  1696. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Refs.swift +2 -2
  1697. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Resolve.swift +2 -2
  1698. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Types.swift +2 -2
  1699. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Value.swift +2 -2
  1700. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Version.swift +2 -2
  1701. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Aws.swift +2 -2
  1702. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Azuresecrets.swift +2 -2
  1703. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Boru.swift +2 -2
  1704. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Crypto.swift +2 -2
  1705. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Doppler.swift +2 -2
  1706. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Gcpsecrets.swift +2 -2
  1707. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Hashicorp.swift +2 -2
  1708. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Httpjson.swift +2 -2
  1709. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Infisical.swift +2 -2
  1710. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Onepassword.swift +2 -2
  1711. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Proc.swift +2 -2
  1712. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Secretspec.swift +2 -2
  1713. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Sigv4.swift +2 -2
  1714. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/sekreto/Addr.swift +2 -2
  1715. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/sekreto/Json.swift +2 -2
  1716. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/sekreto/Provider.swift +2 -2
  1717. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/sekreto/Providers.swift +2 -2
  1718. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/sekreto/Sekreto.swift +2 -2
  1719. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Fetcher.swift +24 -8
  1720. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/MakeError.swift +4 -4
  1721. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/MakeOptions.swift +7 -7
  1722. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Register.swift +1 -0
  1723. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/ResultUtil.swift +130 -30
  1724. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/OmniResolver.swift +2 -2
  1725. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/PipelineTest.swift +1 -1
  1726. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/PrimaryUtilityTest.swift +191 -1
  1727. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/Runner.swift +3 -3
  1728. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/StructUtilityTest.swift +36 -14
  1729. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/feature/secrets/SecretsFeatureTest.swift +167 -1
  1730. package/project/.sdk/tm/swift/Tests/vendor/omni/Json.swift +32 -8
  1731. package/project/.sdk/tm/swift/Tests/vendor/omni/Runner.swift +2 -2
  1732. package/project/.sdk/tm/swift/Tests/vendor/omni/Util.swift +2 -2
  1733. package/project/.sdk/tm/ts/Makefile +3 -2
  1734. package/project/.sdk/tm/ts/src/feature/secrets/SecretsFeature.ts +2 -0
  1735. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Capability.ts +1 -1
  1736. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Catalog.ts +1 -1
  1737. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Config.ts +1 -1
  1738. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Depend.ts +1 -1
  1739. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Env.ts +1 -1
  1740. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Export.ts +1 -1
  1741. package/project/.sdk/tm/ts/src/feature/secrets/plugin/FeatureHost.ts +1 -1
  1742. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Graph.ts +1 -1
  1743. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Host.ts +1 -1
  1744. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Order.ts +1 -1
  1745. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Point.ts +1 -1
  1746. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Ref.ts +1 -1
  1747. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Resolve.ts +1 -1
  1748. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Types.ts +1 -1
  1749. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Version.ts +1 -1
  1750. package/project/.sdk/tm/ts/src/feature/secrets/plugin/index.ts +1 -1
  1751. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/Sekreto.ts +1 -1
  1752. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/index.ts +1 -1
  1753. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/aws.ts +1 -1
  1754. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/azuresecrets.ts +1 -1
  1755. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/boru.ts +1 -1
  1756. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/doppler.ts +1 -1
  1757. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/gcpsecrets.ts +1 -1
  1758. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/hashicorp.ts +1 -1
  1759. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/httpjson.ts +1 -1
  1760. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/infisical.ts +1 -1
  1761. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/minivault.ts +1 -1
  1762. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/onepassword.ts +1 -1
  1763. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/secretspec.ts +1 -1
  1764. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/sigv4.ts +1 -1
  1765. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/addr.ts +1 -1
  1766. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/builtin.ts +1 -1
  1767. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/dotenv.ts +1 -1
  1768. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/env.ts +1 -1
  1769. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/file.ts +1 -1
  1770. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/memory.ts +1 -1
  1771. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/support.ts +1 -1
  1772. package/project/.sdk/tm/ts/src/utility/CleanUtility.ts +115 -10
  1773. package/project/.sdk/tm/ts/src/utility/FetcherUtility.ts +100 -1
  1774. package/project/.sdk/tm/ts/src/utility/MakeErrorUtility.ts +2 -1
  1775. package/project/.sdk/tm/ts/src/utility/MediaUtility.ts +32 -0
  1776. package/project/.sdk/tm/ts/src/utility/ResultBodyUtility.ts +5 -14
  1777. package/project/.sdk/tm/ts/src/utility/StructUtility.ts +708 -199
  1778. package/project/.sdk/tm/ts/src/utility/Utility.ts +2 -1
  1779. package/project/.sdk/tm/ts/test/feature/secrets/Secrets.test.ts +93 -2
  1780. package/project/.sdk/tm/ts/test/live-entity.ts +8 -8
  1781. package/project/.sdk/tm/ts/test/utility/PrimaryUtility.test.ts +9 -1
  1782. package/project/.sdk/tm/ts/test/utility/StructUtility.test.ts +32 -27
  1783. package/project/.sdk/tm/ts/test/utility/index.ts +1 -1
  1784. package/project/.sdk/tm/ts/test/vendor/omni/Runner.ts +1 -1
  1785. package/project/.sdk/tm/ts/test/vendor/omni/Util.ts +1 -1
  1786. package/project/.sdk/tm/ts/test/vendor/omni/index.ts +1 -1
  1787. package/project/.sdk/tm/zig/core/helpers.zig +2 -2
  1788. package/project/.sdk/tm/zig/core/result.zig +2 -2
  1789. package/project/.sdk/tm/zig/core/types.zig +2 -2
  1790. package/project/.sdk/tm/zig/core/utility.zig +96 -20
  1791. package/project/.sdk/tm/zig/feature/netsim.zig +1 -1
  1792. package/project/.sdk/tm/zig/feature/rbac.zig +1 -1
  1793. package/project/.sdk/tm/zig/feature/secrets/plugin/capability.zig +2 -2
  1794. package/project/.sdk/tm/zig/feature/secrets/plugin/catalog.zig +2 -2
  1795. package/project/.sdk/tm/zig/feature/secrets/plugin/config.zig +2 -2
  1796. package/project/.sdk/tm/zig/feature/secrets/plugin/depend.zig +2 -2
  1797. package/project/.sdk/tm/zig/feature/secrets/plugin/env.zig +2 -2
  1798. package/project/.sdk/tm/zig/feature/secrets/plugin/export.zig +2 -2
  1799. package/project/.sdk/tm/zig/feature/secrets/plugin/graph.zig +2 -2
  1800. package/project/.sdk/tm/zig/feature/secrets/plugin/host.zig +2 -2
  1801. package/project/.sdk/tm/zig/feature/secrets/plugin/inst.zig +2 -2
  1802. package/project/.sdk/tm/zig/feature/secrets/plugin/order.zig +2 -2
  1803. package/project/.sdk/tm/zig/feature/secrets/plugin/plugin.zig +2 -2
  1804. package/project/.sdk/tm/zig/feature/secrets/plugin/point.zig +2 -2
  1805. package/project/.sdk/tm/zig/feature/secrets/plugin/ref.zig +2 -2
  1806. package/project/.sdk/tm/zig/feature/secrets/plugin/resolve.zig +2 -2
  1807. package/project/.sdk/tm/zig/feature/secrets/plugin/types.zig +2 -2
  1808. package/project/.sdk/tm/zig/feature/secrets/plugin/value.zig +2 -2
  1809. package/project/.sdk/tm/zig/feature/secrets/plugin/version.zig +2 -2
  1810. package/project/.sdk/tm/zig/feature/secrets/plugins/aws.zig +2 -2
  1811. package/project/.sdk/tm/zig/feature/secrets/plugins/azuresecrets.zig +2 -2
  1812. package/project/.sdk/tm/zig/feature/secrets/plugins/boru.zig +2 -2
  1813. package/project/.sdk/tm/zig/feature/secrets/plugins/doppler.zig +2 -2
  1814. package/project/.sdk/tm/zig/feature/secrets/plugins/gcpsecrets.zig +2 -2
  1815. package/project/.sdk/tm/zig/feature/secrets/plugins/hashicorp.zig +2 -2
  1816. package/project/.sdk/tm/zig/feature/secrets/plugins/httpjson.zig +2 -2
  1817. package/project/.sdk/tm/zig/feature/secrets/plugins/infisical.zig +2 -2
  1818. package/project/.sdk/tm/zig/feature/secrets/plugins/minivault.zig +2 -2
  1819. package/project/.sdk/tm/zig/feature/secrets/plugins/onepassword.zig +2 -2
  1820. package/project/.sdk/tm/zig/feature/secrets/plugins/secretspec.zig +2 -2
  1821. package/project/.sdk/tm/zig/feature/secrets/plugins/sigv4.zig +2 -2
  1822. package/project/.sdk/tm/zig/feature/secrets/sekreto/addr.zig +2 -2
  1823. package/project/.sdk/tm/zig/feature/secrets/sekreto/builtins.zig +2 -2
  1824. package/project/.sdk/tm/zig/feature/secrets/sekreto/provider.zig +2 -2
  1825. package/project/.sdk/tm/zig/feature/secrets/sekreto/sekreto.zig +2 -2
  1826. package/project/.sdk/tm/zig/feature/secrets.zig +3 -1
  1827. package/project/.sdk/tm/zig/feature/validate.zig +4 -5
  1828. package/project/.sdk/tm/zig/test/feature/secrets/secrets_test.zig +199 -39
  1829. package/project/.sdk/tm/zig/test/fh.zig +11 -0
  1830. package/project/.sdk/tm/zig/test/gotcha_test.zig +11 -10
  1831. package/project/.sdk/tm/zig/test/omniresolver.zig +1 -1
  1832. package/project/.sdk/tm/zig/test/pipeline_test.zig +1 -1
  1833. package/project/.sdk/tm/zig/test/primary_utility_test.zig +17 -9
  1834. package/project/.sdk/tm/zig/test/server_variable_test.zig +46 -0
  1835. package/project/.sdk/tm/zig/test/struct_corpus.zig +54 -34
  1836. package/project/.sdk/tm/zig/test/vendor/omni/omni.zig +2 -2
  1837. package/project/.sdk/tm/zig/test/vendor/omni/regex.zig +2 -2
  1838. package/project/.sdk/tm/zig/utility/voxgigstruct/regex.zig +35 -16
  1839. package/project/.sdk/tm/zig/utility/voxgigstruct/struct.zig +1680 -563
  1840. package/project/sdkgen-package.json +1 -1
  1841. package/src/action/check.ts +82 -4
  1842. package/src/action/doctor.ts +70 -6
  1843. package/src/action/package.ts +1 -13
  1844. package/src/action/remove.ts +19 -5
  1845. package/src/action/resolve.ts +11 -4
  1846. package/src/action/target.ts +75 -32
  1847. package/src/admin/status.ts +25 -5
  1848. package/src/cmp/AgentGuide.ts +57 -32
  1849. package/src/cmp/AgentGuideContent.ts +26 -19
  1850. package/src/cmp/AgentGuideFeature.ts +15 -6
  1851. package/src/cmp/AgentGuideTop.ts +28 -16
  1852. package/src/cmp/Changelog.ts +46 -6
  1853. package/src/cmp/Deploy.ts +76 -25
  1854. package/src/cmp/Entity.ts +1 -1
  1855. package/src/cmp/ExternalTarget.ts +6 -0
  1856. package/src/cmp/Feature.ts +3 -3
  1857. package/src/cmp/FeatureDocs.ts +4 -2
  1858. package/src/cmp/License.ts +33 -10
  1859. package/src/cmp/Main.ts +1 -1
  1860. package/src/cmp/PublishWorkflow.ts +66 -58
  1861. package/src/cmp/Readme.ts +0 -2
  1862. package/src/cmp/ReadmeErrors.ts +82 -81
  1863. package/src/cmp/ReadmeExplanation.ts +7 -11
  1864. package/src/cmp/ReadmeFeatures.ts +16 -9
  1865. package/src/cmp/ReadmeIntro.ts +1 -1
  1866. package/src/cmp/ReadmeModel.ts +17 -11
  1867. package/src/cmp/ReadmeOptions.ts +3 -16
  1868. package/src/cmp/ReadmeQuick.ts +11 -2
  1869. package/src/cmp/ReadmeRefFeatures.ts +38 -33
  1870. package/src/cmp/ReadmeStation.ts +4 -5
  1871. package/src/cmp/ReadmeTop.ts +145 -102
  1872. package/src/cmp/Registered.ts +1 -1
  1873. package/src/cmp/Security.ts +32 -5
  1874. package/src/cmp/Test.ts +1 -1
  1875. package/src/helpers/alongside.ts +16 -19
  1876. package/src/helpers/applicability.ts +16 -1
  1877. package/src/helpers/canonSpec.ts +56 -10
  1878. package/src/helpers/clientOptions.ts +67 -0
  1879. package/src/helpers/component.ts +11 -1
  1880. package/src/helpers/consumer.ts +62 -0
  1881. package/src/helpers/definitionPlan.ts +0 -1
  1882. package/src/helpers/doctext.ts +12 -2
  1883. package/src/helpers/facts.ts +243 -5
  1884. package/src/helpers/flowGuard.ts +23 -8
  1885. package/src/helpers/generated.ts +3 -1
  1886. package/src/helpers/graphqlPoint.ts +20 -1
  1887. package/src/helpers/guardModel.ts +50 -0
  1888. package/src/helpers/manifest.ts +19 -0
  1889. package/src/helpers/mcpTools.ts +15 -3
  1890. package/src/helpers/naming.ts +3 -2
  1891. package/src/helpers/opShape.ts +56 -18
  1892. package/src/helpers/optional.ts +0 -1
  1893. package/src/helpers/optspec.ts +22 -5
  1894. package/src/helpers/packageMeta.ts +142 -45
  1895. package/src/helpers/placement.ts +114 -0
  1896. package/src/helpers/readerdir.ts +33 -0
  1897. package/src/helpers/semver.ts +26 -0
  1898. package/src/helpers/serverVars.ts +4 -2
  1899. package/src/helpers/shipped.ts +13 -0
  1900. package/src/helpers/sourcestring.ts +55 -0
  1901. package/src/helpers/stdrep.ts +9 -4
  1902. package/src/helpers/surface.ts +100 -0
  1903. package/src/helpers/targetguard.ts +91 -0
  1904. package/src/helpers/testPolicy.ts +3 -3
  1905. package/src/helpers/text.ts +22 -0
  1906. package/src/helpers/textguard.ts +208 -0
  1907. package/src/helpers/title.ts +59 -0
  1908. package/src/sdkgen.ts +89 -88
  1909. package/src/testkit.ts +12 -0
  1910. package/src/utility.ts +12 -5
  1911. package/project/.sdk/src/cmp/c/ReadmeOptions_c.ts +0 -65
  1912. package/project/.sdk/src/cmp/clojure/ReadmeOptions_clojure.ts +0 -61
  1913. package/project/.sdk/src/cmp/cpp/ReadmeOptions_cpp.ts +0 -62
  1914. package/project/.sdk/src/cmp/csharp/ReadmeOptions_csharp.ts +0 -60
  1915. package/project/.sdk/src/cmp/elixir/ReadmeOptions_elixir.ts +0 -62
  1916. package/project/.sdk/src/cmp/go/ReadmeOptions_go.ts +0 -59
  1917. package/project/.sdk/src/cmp/java/ReadmeOptions_java.ts +0 -61
  1918. package/project/.sdk/src/cmp/js/ReadmeOptions_js.ts +0 -59
  1919. package/project/.sdk/src/cmp/kotlin/ReadmeOptions_kotlin.ts +0 -61
  1920. package/project/.sdk/src/cmp/lua/ReadmeOptions_lua.ts +0 -59
  1921. package/project/.sdk/src/cmp/ocaml/ReadmeOptions_ocaml.ts +0 -59
  1922. package/project/.sdk/src/cmp/perl/ReadmeOptions_perl.ts +0 -59
  1923. package/project/.sdk/src/cmp/php/ReadmeOptions_php.ts +0 -59
  1924. package/project/.sdk/src/cmp/py/ReadmeOptions_py.ts +0 -59
  1925. package/project/.sdk/src/cmp/rb/ReadmeOptions_rb.ts +0 -59
  1926. package/project/.sdk/src/cmp/rust/ReadmeOptions_rust.ts +0 -60
  1927. package/project/.sdk/src/cmp/scala/ReadmeOptions_scala.ts +0 -61
  1928. package/project/.sdk/src/cmp/swift/ReadmeOptions_swift.ts +0 -62
  1929. package/project/.sdk/src/cmp/ts/ReadmeOptions_ts.ts +0 -59
  1930. package/project/.sdk/src/cmp/zig/ReadmeOptions_zig.ts +0 -60
  1931. package/project/.sdk/tm/c/LICENSE +0 -22
  1932. package/project/.sdk/tm/c/VERSION +0 -1
  1933. package/project/.sdk/tm/clojure/LICENSE +0 -22
  1934. package/project/.sdk/tm/clojure/VERSION +0 -1
  1935. package/project/.sdk/tm/cpp/LICENSE +0 -22
  1936. package/project/.sdk/tm/cpp/VERSION +0 -1
  1937. package/project/.sdk/tm/csharp/LICENSE +0 -22
  1938. package/project/.sdk/tm/csharp/VERSION +0 -1
  1939. package/project/.sdk/tm/elixir/LICENSE +0 -21
  1940. package/project/.sdk/tm/elixir/VERSION +0 -1
  1941. package/project/.sdk/tm/go/LICENSE +0 -22
  1942. package/project/.sdk/tm/go/VERSION +0 -1
  1943. package/project/.sdk/tm/java/LICENSE +0 -22
  1944. package/project/.sdk/tm/java/VERSION +0 -1
  1945. package/project/.sdk/tm/js/LICENSE +0 -22
  1946. package/project/.sdk/tm/kotlin/LICENSE +0 -22
  1947. package/project/.sdk/tm/kotlin/VERSION +0 -1
  1948. package/project/.sdk/tm/lua/LICENSE +0 -22
  1949. package/project/.sdk/tm/ocaml/LICENSE +0 -21
  1950. package/project/.sdk/tm/ocaml/VERSION +0 -1
  1951. package/project/.sdk/tm/perl/LICENSE +0 -22
  1952. package/project/.sdk/tm/php/LICENSE +0 -22
  1953. package/project/.sdk/tm/php/VERSION +0 -1
  1954. package/project/.sdk/tm/py/LICENSE +0 -22
  1955. package/project/.sdk/tm/py-data/LICENSE +0 -22
  1956. package/project/.sdk/tm/rb/LICENSE +0 -22
  1957. package/project/.sdk/tm/rust/LICENSE +0 -22
  1958. package/project/.sdk/tm/rust/VERSION +0 -1
  1959. package/project/.sdk/tm/scala/LICENSE +0 -22
  1960. package/project/.sdk/tm/scala/VERSION +0 -1
  1961. package/project/.sdk/tm/swift/LICENSE +0 -22
  1962. package/project/.sdk/tm/swift/VERSION +0 -1
  1963. package/project/.sdk/tm/ts/LICENSE +0 -22
  1964. package/project/.sdk/tm/zig/LICENSE +0 -21
  1965. package/project/.sdk/tm/zig/VERSION +0 -1
@@ -1,4 +1,8 @@
1
1
  <?php
2
+ // VENDORED: @voxgig/struct 0.1.3 (php/src/Struct.php)
3
+ // Source: https://github.com/voxgig/struct @ 358af9d51c90b589a295a70b2165dbe4629eaf8e [tag: sdk-20261125-1959-0]
4
+ // License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
5
+
2
6
  declare(strict_types=1);
3
7
 
4
8
  namespace Voxgig\Struct;
@@ -63,34 +67,26 @@ class ListRef implements \ArrayAccess, \Countable, \IteratorAggregate
63
67
  */
64
68
  class Struct
65
69
  {
66
-
67
70
  /* =======================
68
71
  * String Constants
69
72
  * =======================
70
73
  */
71
- private const S_MKEYPRE = 'key:pre';
72
- private const S_MKEYPOST = 'key:post';
73
- private const S_MVAL = 'val';
74
- private const S_MKEY = 'key';
75
-
76
- private const S_DKEY = '`$KEY`';
74
+ private const S_DKEY = '$KEY';
77
75
  private const S_DMETA = '`$META`';
78
- private const S_DANNO = '`$ANNO`';
79
-
76
+
80
77
  // Match TypeScript constants exactly
81
78
  private const S_BKEY = '`$KEY`';
82
79
  private const S_BANNO = '`$ANNO`';
80
+ private const S_BVAL = '`$VAL`';
83
81
  private const S_DTOP = '$TOP';
84
82
  private const S_DERRS = '$ERRS';
85
- private const S_ERRS = '$ERRS';
86
83
 
87
- private const S_array = 'array';
88
84
  private const S_boolean = 'boolean';
89
85
  private const S_function = 'function';
86
+ private const S_nil = 'nil';
90
87
  private const S_number = 'number';
91
88
  private const S_object = 'object';
92
89
  private const S_string = 'string';
93
- private const S_null = 'null';
94
90
  private const S_MT = '';
95
91
  private const S_BT = '`';
96
92
  private const S_DS = '$';
@@ -137,15 +133,11 @@ class Struct
137
133
 
138
134
  private const S_CM = ',';
139
135
 
140
- // PATCH (optspec port, pending upstream fix): 'nil', not 'noval'.
141
- //
142
- // validate_TYPE resolves a sentinel by NAME — array_search(strtolower(
143
- // substr($ref, 1)), TYPENAME) — so `$NIL` looked up 'nil', found nothing,
144
- // and got a type bitmask of 0. `0 === ($t & 0)` is true for every value,
145
- // so `$NIL` reported a type error against ANYTHING, including the absent
146
- // value it exists to match. The slot is already T_noval's (1 << 30); only
147
- // the spelling was wrong, and the ts reference spells it 'nil'.
148
136
  private const TYPENAME = [
137
+ // Index 1 is canonical's S_nil = 'nil' (StructUtility.ts:83,129).
138
+ // Spelled 'noval' here, `$NIL` resolved to no index at all, so its
139
+ // type mask was 0 and every $NIL check failed - including the one
140
+ // that should accept an absent field.
149
141
  'any', 'nil', 'boolean', 'decimal', 'integer', 'number', 'string',
150
142
  'function', 'symbol', 'null',
151
143
  '', '', '', '', '', '', '',
@@ -179,6 +171,12 @@ class Struct
179
171
  */
180
172
  private const R_META_PATH = '/^([^$]+)\$([=~])(.+)$/';
181
173
  private const R_TRANSFORM_NAME = '/`\$([A-Z]+)`/';
174
+ private const R_INJECTION_FULL = '/^`(\$[A-Z]+|[^`]*)[0-9]*`$/';
175
+ private const R_CHECKER_NAME = '/^\$[A-Z]+$/';
176
+ private const R_INTEGER_KEY = '/^(0|-?[1-9][0-9]*)\z/';
177
+
178
+ // Names a validate spec may use besides its checkers: transform's that it keeps, and $OPEN.
179
+ private const VALIDATE_NAMES = ['$TOP', '$SPEC', '$BT', '$DS', '$WHEN', '$ANNO', '$REF', '$FORMAT', '$APPLY', '$OPEN'];
182
180
 
183
181
  /* =======================
184
182
  * Private Helpers
@@ -358,7 +356,7 @@ class Struct
358
356
  }
359
357
  }
360
358
  if (is_object($value)) {
361
- return self::T_node | self::T_map;
359
+ return self::T_node | (self::_isinstance($value) ? self::T_instance : self::T_map);
362
360
  }
363
361
  return self::T_noval;
364
362
  }
@@ -427,9 +425,12 @@ class Struct
427
425
  public static function getprop(mixed $val, mixed $key, mixed $alt = null): mixed
428
426
  {
429
427
  $altExplicit = func_num_args() >= 3;
428
+ $resolvedAlt = $altExplicit ? $alt : null;
430
429
  $out = self::_getprop($val, $key, self::undef());
431
- if ($out === self::undef()) {
432
- return $altExplicit ? $alt : null;
430
+ // Group A null rule (canonical TS: `if (null == out) return alt`):
431
+ // a stored JSON null (or the undef sentinel) counts as "no value".
432
+ if ($out === self::undef() || $out === null) {
433
+ return $resolvedAlt;
433
434
  }
434
435
  return $out;
435
436
  }
@@ -440,7 +441,9 @@ class Struct
440
441
  // External callers should use getprop(), which normalises UNDEF to null (or $alt).
441
442
  public static function _getprop(mixed $val, mixed $key, mixed $alt = null): mixed
442
443
  {
443
- if ($alt === null) { $alt = self::undef(); }
444
+ if ($alt === null) {
445
+ $alt = self::undef();
446
+ }
444
447
  // 1) undefined‐marker or invalid key → alt
445
448
  if ($val === self::undef() || $key === self::undef()) {
446
449
  return $alt;
@@ -454,16 +457,20 @@ class Struct
454
457
 
455
458
  // 2) ListRef branch
456
459
  if ($val instanceof ListRef) {
457
- $ki = is_numeric($key) ? (int)$key : -1;
458
- $out = ($ki >= 0 && $ki < count($val->list)) ? $val->list[$ki] : $alt;
459
- }
460
- // 3) array branch
461
- elseif (is_array($val) && array_key_exists($key, $val)) {
462
- $out = $val[$key];
463
- }
464
- // 4) object branch: cast $key to string
460
+ $ki = self::_listindex($key, count($val->list));
461
+ $out = 0 > $ki ? $alt : $val->list[$ki];
462
+ }
463
+ // 3) array branch: array_key_exists would truncate a float key
464
+ elseif (is_array($val) && is_float($key) && self::islist($val)) {
465
+ $ki = self::_listindex($key, count($val));
466
+ $out = 0 > $ki ? $alt : $val[$ki];
467
+ } elseif (is_array($val)) {
468
+ $mkey = is_string($key) ? $key : self::_mapkey($key);
469
+ $out = array_key_exists($mkey, $val) ? $val[$mkey] : $alt;
470
+ }
471
+ // 4) object branch: the key as a string
465
472
  elseif (is_object($val)) {
466
- $prop = (string) $key;
473
+ $prop = is_string($key) ? $key : self::_mapkey($key);
467
474
  if (property_exists($val, $prop)) {
468
475
  $out = $val->$prop;
469
476
  } else {
@@ -479,6 +486,39 @@ class Struct
479
486
  return ($out === self::undef() ? $alt : $out);
480
487
  }
481
488
 
489
+ /**
490
+ * A list key's index, or null: an integral number, or a string as
491
+ * JavaScript's String(n) prints one, so "1" and "-1" but not "01", "+1",
492
+ * " 1", "1.0", "-0" or 1.5.
493
+ */
494
+ private static function _listkey(mixed $key): ?int
495
+ {
496
+ if (is_int($key)) {
497
+ return $key;
498
+ }
499
+ if (is_float($key)) {
500
+ if (!is_finite($key) || floor($key) !== $key) {
501
+ return null;
502
+ }
503
+ // Beyond the int range a key can only fall past an end of the list.
504
+ return abs($key) < 9.2e18 ? (int) $key : (0 < $key ? PHP_INT_MAX : PHP_INT_MIN);
505
+ }
506
+ return is_string($key) && 1 === preg_match(self::R_INTEGER_KEY, $key) ? (int) $key : null;
507
+ }
508
+
509
+ /** The index $key reads in a list of $len elements, or -1. */
510
+ private static function _listindex(mixed $key, int $len): int
511
+ {
512
+ $i = self::_listkey($key);
513
+ return null !== $i && 0 <= $i && $i < $len ? $i : -1;
514
+ }
515
+
516
+ /** A map key: a number as JavaScript's String(n) prints it. */
517
+ private static function _mapkey(mixed $key): string
518
+ {
519
+ return is_string($key) ? $key : self::_condenseStr($key);
520
+ }
521
+
482
522
 
483
523
  public static function strkey(mixed $key = null): string
484
524
  {
@@ -532,19 +572,9 @@ class Struct
532
572
  */
533
573
  public static function haskey(mixed $val = null, mixed $key = null): bool
534
574
  {
535
- // 1. Validate $val is a node
536
- if (!self::isnode($val)) {
537
- return false;
538
- }
539
-
540
- // 2. Validate $key is a valid key
541
- if (!self::iskey($key)) {
542
- return false;
543
- }
544
-
545
- // 3. Check property existence
546
- $marker = new \stdClass();
547
- return self::_getprop($val, $key, $marker) !== $marker;
575
+ // Canonical TS: `null != getprop(val, key)`. getprop applies the
576
+ // Group A null rule, so a present-but-null key counts as absent.
577
+ return self::getprop($val, $key) !== null;
548
578
  }
549
579
 
550
580
  public static function items(mixed $val, ?callable $apply = null): array
@@ -571,6 +601,66 @@ class Struct
571
601
  return preg_quote($s, '/');
572
602
  }
573
603
 
604
+ // -----------------------------------------------------------------------
605
+ // Regex utility — uniform re_* API (see /REGEX_API.md). PHP's PCRE is a
606
+ // strict superset of RE2.
607
+ // -----------------------------------------------------------------------
608
+
609
+ public static function re_compile(string $pattern): string
610
+ {
611
+ // PHP wants a delimited pattern; return one delimited with '/'.
612
+ $delimited = strlen($pattern) > 0 && $pattern[0] === '/'
613
+ ? $pattern
614
+ : '/' . str_replace('/', '\\/', $pattern) . '/';
615
+ // PCRE returns false from preg_match on invalid patterns; surface that
616
+ // to the caller (matching the throw behaviour of JS/Python/Java/.NET).
617
+ if (@preg_match($delimited, '') === false) {
618
+ throw new \InvalidArgumentException("Invalid regex pattern: $pattern");
619
+ }
620
+ return $delimited;
621
+ }
622
+
623
+ public static function re_test(string $pattern, string $input): bool
624
+ {
625
+ return preg_match(self::re_compile($pattern), $input) === 1;
626
+ }
627
+
628
+ public static function re_find(string $pattern, string $input): ?array
629
+ {
630
+ if (preg_match(self::re_compile($pattern), $input, $m) === 1) {
631
+ return $m;
632
+ }
633
+ return null;
634
+ }
635
+
636
+ public static function re_find_all(string $pattern, string $input): array
637
+ {
638
+ $out = [];
639
+ if (preg_match_all(self::re_compile($pattern), $input, $m, PREG_SET_ORDER) !== false) {
640
+ $out = $m;
641
+ }
642
+ return $out;
643
+ }
644
+
645
+ public static function re_replace(string $pattern, string $input, $replacement): string
646
+ {
647
+ if (is_callable($replacement)) {
648
+ return preg_replace_callback(self::re_compile($pattern), function ($m) use ($replacement) {
649
+ return $replacement($m);
650
+ }, $input);
651
+ }
652
+ // Translate JS-style $& / $1 to PCRE \0 / \1 (which preg_replace supports as ${0} etc.).
653
+ $php_repl = preg_replace_callback('/\$([&0-9])/', function ($m) {
654
+ return '\\' . ($m[1] === '&' ? '0' : $m[1]);
655
+ }, $replacement);
656
+ return preg_replace(self::re_compile($pattern), $php_repl, $input);
657
+ }
658
+
659
+ public static function re_escape(string $s): string
660
+ {
661
+ return self::escre($s);
662
+ }
663
+
574
664
  // Keeps what encodeURIComponent keeps.
575
665
  public static function escurl(?string $s): string
576
666
  {
@@ -613,7 +703,7 @@ class Struct
613
703
  $i = (int) $n[0];
614
704
  $s = $n[1];
615
705
 
616
- if ('' !== $sepre && self::S_MT !== $sepre) {
706
+ if (self::S_MT !== $sepre) {
617
707
  if ($url && 0 === $i) {
618
708
  $s = preg_replace('/' . $sepre . '+$/', self::S_MT, $s);
619
709
  return $s;
@@ -627,8 +717,11 @@ class Struct
627
717
  $s = preg_replace('/' . $sepre . '+$/', self::S_MT, $s);
628
718
  }
629
719
 
630
- $s = preg_replace('/([^' . $sepre . '])' . $sepre . '+([^' . $sepre . '])/',
631
- '$1' . $sepdef . '$2', $s);
720
+ $s = preg_replace(
721
+ '/([^' . $sepre . '])' . $sepre . '+([^' . $sepre . '])/',
722
+ '$1' . $sepdef . '$2',
723
+ $s
724
+ );
632
725
  }
633
726
 
634
727
  return $s;
@@ -651,17 +744,24 @@ class Struct
651
744
  }
652
745
  $indent = self::_getprop($flags, 'indent', 2);
653
746
  try {
654
- $encoded = json_encode($val, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
655
- if ($encoded === false) {
656
- return '__JSONIFY_FAILED__';
747
+ if ($indent > 0) {
748
+ $encoded = json_encode($val, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
749
+ if ($encoded === false) {
750
+ return '__JSONIFY_FAILED__';
751
+ }
752
+ // PHP's JSON_PRETTY_PRINT uses 4-space indents; convert to requested indent
753
+ $encoded = preg_replace_callback('/^( +)/m', function ($matches) use ($indent) {
754
+ $level = (int)(strlen($matches[1]) / 4);
755
+ return str_repeat(' ', $level * $indent);
756
+ }, $encoded);
757
+ } else {
758
+ // indent=0: compact single-line, matching C/Rust/Java/Kotlin printers.
759
+ $encoded = json_encode($val, JSON_UNESCAPED_SLASHES);
760
+ if ($encoded === false) {
761
+ return '__JSONIFY_FAILED__';
762
+ }
657
763
  }
658
764
 
659
- // PHP's JSON_PRETTY_PRINT uses 4-space indents; convert to requested indent
660
- $encoded = preg_replace_callback('/^( +)/m', function ($matches) use ($indent) {
661
- $level = (int)(strlen($matches[1]) / 4);
662
- return str_repeat(' ', $level * $indent);
663
- }, $encoded);
664
-
665
765
  $str = $encoded;
666
766
 
667
767
  $offset = self::_getprop($flags, 'offset', 0);
@@ -672,7 +772,9 @@ class Struct
672
772
  self::items($rest, function ($n) use ($offset) {
673
773
  return self::pad($n[1], 0 - $offset - self::size($n[1]));
674
774
  }),
675
- function ($n) { return true; }
775
+ function ($n) {
776
+ return true;
777
+ }
676
778
  );
677
779
  $str = "{\n" . implode("\n", $padded);
678
780
  }
@@ -697,7 +799,9 @@ class Struct
697
799
  if (self::islist($val)) {
698
800
  return count($val);
699
801
  } elseif (self::ismap($val)) {
700
- return count(get_object_vars($val));
802
+ // A map is a stdClass OR an associative array; `get_object_vars`
803
+ // takes only the former, and raises a TypeError on the latter.
804
+ return count(is_array($val) ? $val : get_object_vars($val));
701
805
  }
702
806
 
703
807
  if (is_string($val)) {
@@ -714,9 +818,10 @@ class Struct
714
818
  /**
715
819
  * Extract part of an array or string into a new value, from the start point to the end point.
716
820
  * If no end is specified, extract to the full length of the value. Negative arguments count
717
- * from the end of the value.
821
+ * from the end of the value. When $mutate is true and $val is a reference-stable list
822
+ * (ListRef), the slice is applied in place (mirroring the canonical implementation).
718
823
  */
719
- public static function slice(mixed $val, ?int $start = null, ?int $end = null): mixed
824
+ public static function slice(mixed $val, ?int $start = null, ?int $end = null, ?bool $mutate = null): mixed
720
825
  {
721
826
  if (is_numeric($val)) {
722
827
  $start = $start ?? PHP_INT_MIN;
@@ -758,7 +863,11 @@ class Struct
758
863
 
759
864
  if (-1 < $start && $start <= $end && $end <= $vlen) {
760
865
  if ($val instanceof ListRef) {
761
- $val = new ListRef(array_slice($val->list, $start, $end - $start));
866
+ if ($mutate) {
867
+ $val->list = array_slice($val->list, $start, $end - $start);
868
+ } else {
869
+ $val = new ListRef(array_slice($val->list, $start, $end - $start));
870
+ }
762
871
  } elseif (self::islist($val)) {
763
872
  $val = array_slice($val, $start, $end - $start);
764
873
  } elseif (is_string($val)) {
@@ -766,7 +875,11 @@ class Struct
766
875
  }
767
876
  } else {
768
877
  if ($val instanceof ListRef) {
769
- $val = new ListRef([]);
878
+ if ($mutate) {
879
+ $val->list = [];
880
+ } else {
881
+ $val = new ListRef([]);
882
+ }
770
883
  } elseif (self::islist($val)) {
771
884
  $val = [];
772
885
  } elseif (is_string($val)) {
@@ -787,7 +900,7 @@ class Struct
787
900
  $padding = $padding ?? 44;
788
901
  $padchar = $padchar ?? ' ';
789
902
  $padchar = ($padchar . ' ')[0]; // Get first character or space as fallback
790
-
903
+
791
904
  if ($padding >= 0) {
792
905
  return str_pad($str, $padding, $padchar, STR_PAD_RIGHT);
793
906
  } else {
@@ -841,10 +954,13 @@ class Struct
841
954
  $valstr = $val;
842
955
  } else {
843
956
  $original = $val;
844
- // Unwrap ListRefs before JSON encoding
845
- if ($val instanceof ListRef) {
846
- $val = self::cloneUnwrap($val);
847
- }
957
+ // Unwrap ListRefs before JSON encoding - at ANY depth, not just at
958
+ // the top. A ListRef nested inside a map was encoded as the object
959
+ // it is, leaking its backing field:
960
+ // {x:{list:[3]}} instead of {x:[3]}
961
+ // `cloneUnwrap` recurses and passes non-ListRef values through, so
962
+ // it is safe to call unconditionally.
963
+ $val = self::cloneUnwrap($val);
848
964
  try {
849
965
  $sorted = self::sort_obj($val);
850
966
  $str = json_encode($sorted);
@@ -853,7 +969,11 @@ class Struct
853
969
  }
854
970
  $valstr = str_replace('"', '', $str);
855
971
 
856
- if (is_object($original) && $valstr === '[]') {
972
+ // An empty map must print `{}`, not `[]`. But `is_object` is
973
+ // too broad: a ListRef is an object standing for a LIST, so an
974
+ // empty one was printing `{}` too. `ismap` is the right test -
975
+ // it is true for stdClass and false for ListRef.
976
+ if (self::ismap($original) && $valstr === '[]') {
857
977
  $valstr = '{}';
858
978
  }
859
979
  } catch (\Exception $e) {
@@ -891,7 +1011,7 @@ class Struct
891
1011
 
892
1012
  $pathstr = $UNDEF;
893
1013
 
894
- if ($path !== $UNDEF && $start >= 0) {
1014
+ if ($path !== $UNDEF) {
895
1015
  $len = count($path);
896
1016
  $length = max(0, $len - $end - $start);
897
1017
  $slice = array_slice($path, $start, $length);
@@ -915,13 +1035,11 @@ class Struct
915
1035
  }
916
1036
 
917
1037
  if ($pathstr === $UNDEF) {
918
- if ($val === $UNDEF || $val === null) {
1038
+ // Canonical TS: only NONE/undefined omits the ":value" suffix.
1039
+ // A JSON null renders stringify(null)="null" → <unknown-path:null>.
1040
+ if ($val === $UNDEF) {
919
1041
  $pathstr = '<unknown-path>';
920
- } elseif (is_object($val) && count(get_object_vars($val)) === 0) {
921
- // empty object
922
- $pathstr = '<unknown-path:{}>';
923
1042
  } else {
924
- // booleans, numbers, non-empty objects, etc.
925
1043
  $pathstr = '<unknown-path' . $S_CN . self::stringify($val, 47) . '>';
926
1044
  }
927
1045
  }
@@ -1073,6 +1191,15 @@ class Struct
1073
1191
  if ($depth > 32) {
1074
1192
  return $val;
1075
1193
  }
1194
+ // The no-value is a singleton and must survive cloning as the SAME
1195
+ // object - `undef() === $x` is how the whole port tests for it. The
1196
+ // sentinel is an empty stdClass, so without this it was cloned into a
1197
+ // fresh empty stdClass, every identity test downstream quietly became
1198
+ // false, and `transform`/`validate` returned `[]` where canonical
1199
+ // returns undefined. `clone` and `cloneWrap` both already guard it.
1200
+ if (self::undef() === $val) {
1201
+ return $val;
1202
+ }
1076
1203
  if ($val instanceof ListRef) {
1077
1204
  $result = [];
1078
1205
  foreach ($val->list as $item) {
@@ -1110,12 +1237,16 @@ class Struct
1110
1237
  return $parent;
1111
1238
  }
1112
1239
 
1240
+ if (self::iscondensed($parent)) {
1241
+ throw new \Exception(self::S_CONDENSE_IMMUTABLE);
1242
+ }
1243
+
1113
1244
  // ─── LISTREF ────────────────────────────────────────────────
1114
1245
  if ($parent instanceof ListRef) {
1115
- if (!is_numeric($key)) {
1246
+ $keyI = self::_listkey($key);
1247
+ if (null === $keyI) {
1116
1248
  return $parent;
1117
1249
  }
1118
- $keyI = (int) floor((float) $key);
1119
1250
  if ($val === self::undef()) {
1120
1251
  if ($keyI >= 0 && $keyI < count($parent->list)) {
1121
1252
  array_splice($parent->list, $keyI, 1);
@@ -1134,7 +1265,7 @@ class Struct
1134
1265
 
1135
1266
  // ─── OBJECT (map) ───────────────────────────────────────────
1136
1267
  if (is_object($parent)) {
1137
- $keyStr = self::strkey($key);
1268
+ $keyStr = self::_mapkey($key);
1138
1269
  if ($val === self::undef()) {
1139
1270
  unset($parent->$keyStr);
1140
1271
  } else {
@@ -1147,7 +1278,7 @@ class Struct
1147
1278
  if (is_array($parent)) {
1148
1279
  if (!self::islist($parent)) {
1149
1280
  // map‐array
1150
- $keyStr = self::strkey($key);
1281
+ $keyStr = self::_mapkey($key);
1151
1282
  if ($val === self::undef()) {
1152
1283
  unset($parent[$keyStr]);
1153
1284
  } elseif (ctype_digit((string) $key)) {
@@ -1158,10 +1289,10 @@ class Struct
1158
1289
  }
1159
1290
  } else {
1160
1291
  // list‐array
1161
- if (!is_numeric($key)) {
1292
+ $keyI = self::_listkey($key);
1293
+ if (null === $keyI) {
1162
1294
  return $parent;
1163
1295
  }
1164
- $keyI = (int) floor((float) $key);
1165
1296
  if ($val === self::undef()) {
1166
1297
  if ($keyI >= 0 && $keyI < count($parent)) {
1167
1298
  array_splice($parent, $keyI, 1);
@@ -1184,6 +1315,17 @@ class Struct
1184
1315
 
1185
1316
  private const MAXDEPTH = 32;
1186
1317
 
1318
+ /**
1319
+ * Walk a data structure depth first, applying callbacks to each value.
1320
+ *
1321
+ * The `$path` argument passed to the before/after callbacks is backed
1322
+ * by a per-depth slot in a shared pool that lives for the duration of
1323
+ * the top-level walk call. Read-only consumers (count/size, implode,
1324
+ * iteration) see the current path contents without triggering a copy
1325
+ * under PHP's copy-on-write semantics. Callbacks that need to retain
1326
+ * the path MUST clone it (e.g. via `array_values($path)`); otherwise
1327
+ * its contents will be overwritten by subsequent visits.
1328
+ */
1187
1329
  public static function walk(
1188
1330
  mixed $val,
1189
1331
  ?callable $before = null,
@@ -1193,22 +1335,60 @@ class Struct
1193
1335
  mixed $parent = null,
1194
1336
  ?array $path = null
1195
1337
  ): mixed {
1196
- if ($path === null) {
1197
- $path = [];
1198
- }
1338
+ $pool = [[]];
1339
+ return self::_walk($val, $before, $after, $maxdepth, $key, $parent, $path ?? $pool[0], $pool);
1340
+ }
1341
+
1342
+ /**
1343
+ * Recursive walk helper. The pool is passed by reference so each depth
1344
+ * reuses the same path buffer across sibling iterations, eliminating
1345
+ * the per-node path allocation the original implementation incurred.
1346
+ *
1347
+ * @param array<int, string> $path
1348
+ * @param array<int, array<int, string>> $pool
1349
+ */
1350
+ private static function _walk(
1351
+ mixed $val,
1352
+ ?callable $before,
1353
+ ?callable $after,
1354
+ ?int $maxdepth,
1355
+ mixed $key,
1356
+ mixed $parent,
1357
+ array $path,
1358
+ array &$pool
1359
+ ): mixed {
1360
+ $depth = count($path);
1199
1361
 
1200
1362
  $out = ($before !== null) ? $before($key, $val, $parent, $path) : $val;
1201
1363
 
1202
1364
  $md = ($maxdepth !== null && $maxdepth >= 0) ? $maxdepth : self::MAXDEPTH;
1203
- if (0 === $md || (count($path) > 0 && $md <= count($path))) {
1365
+ if (0 === $md || ($depth > 0 && $md <= $depth)) {
1204
1366
  return $out;
1205
1367
  }
1206
1368
 
1207
1369
  if (self::isnode($out)) {
1370
+ $childDepth = $depth + 1;
1371
+ if (!array_key_exists($childDepth, $pool)) {
1372
+ $pool[$childDepth] = [];
1373
+ }
1374
+ // Sync prefix [0..depth-1] into the child slot. Siblings at the
1375
+ // same level share this prefix; only slot [$depth] differs
1376
+ // between iterations.
1377
+ for ($i = 0; $i < $depth; $i++) {
1378
+ $pool[$childDepth][$i] = $path[$i];
1379
+ }
1380
+
1208
1381
  foreach (self::items($out) as [$childKey, $childVal]) {
1209
- $childPath = self::flatten([$path, self::S_MT . $childKey]);
1210
- $result = self::walk(
1211
- $childVal, $before, $after, $md, $childKey, $out, $childPath
1382
+ $pool[$childDepth][$depth] = self::S_MT . $childKey;
1383
+ $result = self::_walk(
1384
+ $childVal,
1385
+ $before,
1386
+ $after,
1387
+ $md,
1388
+ $childKey,
1389
+ $out,
1390
+ $pool[$childDepth],
1391
+ $pool
1212
1392
  );
1213
1393
  if (self::ismap($out)) {
1214
1394
  if (is_object($out)) {
@@ -1311,20 +1491,96 @@ class Struct
1311
1491
  return $out;
1312
1492
  }
1313
1493
 
1494
+ /**
1495
+ * An injdef may arrive as a map rather than an object.
1496
+ *
1497
+ * Every injdef test in this port is spelled `is_object($injdef) &&
1498
+ * property_exists(...)`, which is right for an injdef built in PHP but
1499
+ * wrong for one that came from JSON: `json_decode($json, true)` yields an
1500
+ * array, so a perfectly good `{ meta, extra, handler }` failed every test
1501
+ * and fell through to the backward-compat branch, where it was treated as
1502
+ * plain store data. The corpus supplies injdefs exactly that way, in
1503
+ * `validate/special` and `getpath/special`.
1504
+ *
1505
+ * A map carrying any injdef key is therefore promoted to an object here.
1506
+ * A map carrying none of them is left alone - that is the backward-compat
1507
+ * "extra data passed directly" case, and it must keep working.
1508
+ */
1509
+ private static function _injdef(mixed $injdef): mixed
1510
+ {
1511
+ if (!is_array($injdef)) {
1512
+ return $injdef;
1513
+ }
1514
+
1515
+ foreach (['extra', 'modify', 'errs', 'meta', 'handler'] as $key) {
1516
+ if (array_key_exists($key, $injdef)) {
1517
+ return self::_injdefmeta((object) $injdef);
1518
+ }
1519
+ }
1520
+
1521
+ return $injdef;
1522
+ }
1523
+
1524
+ /**
1525
+ * `Injection::$meta` is declared `object`, so a `meta` that came from JSON
1526
+ * cannot be assigned to it:
1527
+ *
1528
+ * TypeError: Cannot assign array to property
1529
+ * Voxgig\Struct\Injection::$meta of type object
1530
+ *
1531
+ * Only the meta container itself is promoted - its contents stay as they
1532
+ * are, since they are caller data read through `getprop`, which handles
1533
+ * both shapes.
1534
+ */
1535
+ private static function _injdefmeta(object $injdef): object
1536
+ {
1537
+ if (property_exists($injdef, 'meta') && is_array($injdef->meta)) {
1538
+ $injdef->meta = (object) $injdef->meta;
1539
+ }
1540
+
1541
+ return $injdef;
1542
+ }
1543
+
1314
1544
  public static function getpath(
1315
1545
  mixed $store,
1316
1546
  mixed $path,
1317
1547
  mixed $injdef = null
1318
1548
  ): mixed {
1319
- // Convert path to array of parts
1320
- $parts = is_array($path) ? $path :
1321
- (is_string($path) ? explode('.', $path) :
1322
- (is_numeric($path) ? [self::strkey($path)] : self::undef()));
1323
-
1324
- if ($parts === self::undef()) {
1549
+ $injdef = self::_injdef($injdef);
1550
+
1551
+ // A number part reads as its string form; any other non-string part misses.
1552
+ if (self::islist($path)) {
1553
+ $parts = [];
1554
+ foreach (($path instanceof ListRef ? $path->list : $path) as $part) {
1555
+ if (is_int($part) || is_float($part)) {
1556
+ $parts[] = self::_mapkey($part);
1557
+ } elseif (is_string($part)) {
1558
+ $parts[] = $part;
1559
+ } else {
1560
+ return self::undef();
1561
+ }
1562
+ }
1563
+ } elseif (is_string($path)) {
1564
+ $parts = explode('.', $path);
1565
+ } elseif (is_int($path) || is_float($path)) {
1566
+ $parts = [self::_mapkey($path)];
1567
+ } else {
1325
1568
  return self::undef();
1326
1569
  }
1327
1570
 
1571
+ // A condensed store answers a path as the node it was built from does,
1572
+ // touching only the nodes on the path. A base changes what the path
1573
+ // resolves against, so then it is expanded instead.
1574
+ if (self::iscondensed($store)) {
1575
+ if (null === $injdef || null === self::getprop($injdef, self::S_BASE)) {
1576
+ $at = self::_condenseResolve($store, self::_getprop($store, self::S_condroot), $parts);
1577
+ $found = 0 > $at ? self::undef() : self::_condenseMaterialise($store, $at);
1578
+ // Group A: a stored null reads as absent, as getprop has it.
1579
+ return null === $found ? self::undef() : $found;
1580
+ }
1581
+ $store = self::expand($store);
1582
+ }
1583
+
1328
1584
  $val = $store;
1329
1585
  $base = self::_getprop($injdef, 'base');
1330
1586
  $src = self::_getprop($store, $base, $store);
@@ -1334,7 +1590,7 @@ class Struct
1334
1590
  // An empty path (incl empty string) just finds the src (base data)
1335
1591
  if ($path === null || $store === null || ($numparts === 1 && $parts[0] === '')) {
1336
1592
  $val = $src;
1337
- } else if ($numparts > 0) {
1593
+ } elseif ($numparts > 0) {
1338
1594
  // Check for $ACTIONs
1339
1595
  if ($numparts === 1) {
1340
1596
  $val = self::_getprop($store, $parts[0]);
@@ -1354,24 +1610,26 @@ class Struct
1354
1610
  for ($pI = 0; $val !== self::undef() && $pI < count($parts); $pI++) {
1355
1611
  $part = $parts[$pI];
1356
1612
 
1357
- if ($injdef && $part === '$KEY') {
1613
+ if ($injdef && $part === self::S_DKEY) {
1358
1614
  $part = self::_getprop($injdef, 'key');
1359
- } else if ($injdef && str_starts_with($part, '$GET:')) {
1615
+ } elseif ($injdef && str_starts_with($part, '$GET:')) {
1360
1616
  // $GET:path$ -> get store value, use as path part (string)
1361
1617
  $getpath = substr($part, 5, -1);
1362
1618
  $getval = self::getpath($src, $getpath);
1363
1619
  $part = self::stringify($getval);
1364
- } else if ($injdef && str_starts_with($part, '$REF:')) {
1620
+ } elseif ($injdef && str_starts_with($part, '$REF:')) {
1365
1621
  // $REF:refpath$ -> get spec value, use as path part (string)
1366
1622
  $refpath = substr($part, 5, -1);
1367
1623
  $part = self::stringify(self::getpath(self::_getprop($store, '$SPEC'), self::slice($part, 5, -1)));
1368
- } else if ($injdef && str_starts_with($part, '$META:')) {
1624
+ } elseif ($injdef && str_starts_with($part, '$META:')) {
1369
1625
  // $META:metapath$ -> get meta value, use as path part (string)
1370
1626
  $part = self::stringify(self::getpath(self::_getprop($injdef, 'meta'), substr($part, 6, -1)));
1371
1627
  }
1372
1628
 
1373
- // $$ escapes $
1374
- $part = str_replace('$$', '$', $part);
1629
+ // $$ escapes $ (skip str_replace for the common no-`$$` part)
1630
+ if (strpos($part, '$$') !== false) {
1631
+ $part = str_replace('$$', '$', $part);
1632
+ }
1375
1633
 
1376
1634
  if ($part === '') {
1377
1635
  $ascends = 0;
@@ -1398,12 +1656,14 @@ class Struct
1398
1656
  break;
1399
1657
  }
1400
1658
  } else {
1401
- // Special case for single dot: use dparent if available
1402
- if ($dparent !== null && $dparent !== self::undef()) {
1403
- $val = $dparent;
1404
- } else {
1405
- $val = $src;
1406
- }
1659
+ // Canonical assigns unconditionally here
1660
+ // (StructUtility.ts:1360: `else { val = dparent }`).
1661
+ // Falling back to $src returned the whole store when
1662
+ // there was no dparent - and an unresolved `$GET:`/
1663
+ // `$REF:`/`$META:` key stringifies to '', which lands
1664
+ // in exactly this branch. So a missing dynamic key
1665
+ // produced the entire store instead of the no-value.
1666
+ $val = $dparent;
1407
1667
  }
1408
1668
  } else {
1409
1669
  $val = self::_getprop($val, $part);
@@ -1428,6 +1688,8 @@ class Struct
1428
1688
  mixed $store,
1429
1689
  mixed $injdef = null
1430
1690
  ): mixed {
1691
+ $injdef = self::_injdef($injdef);
1692
+
1431
1693
  $valtype = gettype($val);
1432
1694
 
1433
1695
  /** @var Injection $inj */
@@ -1453,6 +1715,8 @@ class Struct
1453
1715
 
1454
1716
  $inj->descend();
1455
1717
 
1718
+ $inj->named = false;
1719
+
1456
1720
  // Descend into node.
1457
1721
  if (self::isnode($val)) {
1458
1722
  $nodekeys = self::keysof($val);
@@ -1468,6 +1732,7 @@ class Struct
1468
1732
  }
1469
1733
  }
1470
1734
  $nodekeys = array_merge($nonDollar, $dollar);
1735
+ $inj->named = 0 < count($nonDollar);
1471
1736
  } else {
1472
1737
  $nodekeys = self::keysof($val);
1473
1738
  }
@@ -1519,9 +1784,20 @@ class Struct
1519
1784
  }
1520
1785
  }
1521
1786
  }
1787
+
1788
+ $nohole = fn($v) => self::SKIP !== $v;
1789
+ if ($val instanceof ListRef) {
1790
+ $val->list = array_values(array_filter($val->list, $nohole));
1791
+ } elseif (is_array($val) && self::islist($val)) {
1792
+ $val = array_values(array_filter($val, $nohole));
1793
+ if (is_array(self::_getprop($inj->parent, $inj->key))) {
1794
+ $inj->val = $val;
1795
+ self::setprop($inj->parent, $inj->key, $val);
1796
+ }
1797
+ }
1522
1798
  }
1523
1799
  // Inject paths into string scalars.
1524
- else if ($valtype === 'string') {
1800
+ elseif ($valtype === 'string') {
1525
1801
  $inj->mode = self::M_VAL;
1526
1802
  $val = self::_injectstr($val, $store, $inj);
1527
1803
  if (self::SKIP !== $val) {
@@ -1537,7 +1813,7 @@ class Struct
1537
1813
 
1538
1814
  call_user_func(
1539
1815
  $inj->modify,
1540
- $mval,
1816
+ self::SKIP === $mval ? self::undef() : $mval,
1541
1817
  $mkey,
1542
1818
  $mparent,
1543
1819
  $inj,
@@ -1584,10 +1860,9 @@ class Struct
1584
1860
 
1585
1861
  // Get the extracted path reference.
1586
1862
  $out = self::getpath($store, $pathref, $inj);
1587
- }
1588
- else {
1863
+ } else {
1589
1864
  // Check for injections within the string.
1590
- $out = preg_replace_callback('/`([^`]+)`/', function($matches) use ($store, $inj) {
1865
+ $out = preg_replace_callback('/`([^`]+)`/', function ($matches) use ($store, $inj) {
1591
1866
  $ref = $matches[1];
1592
1867
 
1593
1868
  if (strlen($ref) > 3) {
@@ -1631,7 +1906,11 @@ class Struct
1631
1906
  ): mixed {
1632
1907
  $out = $val;
1633
1908
 
1634
- // Check if val is a function (command transforms)
1909
+ // Check if val is a function (command transforms).
1910
+ // The "undef() === $ref" guard mirrors the reference source, where the
1911
+ // ref argument may be the absent-value sentinel; with PHP's string type
1912
+ // hint that branch is unreachable here, hence the analyser hint.
1913
+ // @phpstan-ignore-next-line identical.alwaysFalse
1635
1914
  $iscmd = self::isfunc($val) && (self::undef() === $ref || str_starts_with($ref, self::S_DS));
1636
1915
 
1637
1916
  // Only call val function if it is a special command ($NAME format).
@@ -1645,15 +1924,6 @@ class Struct
1645
1924
  return $out;
1646
1925
  }
1647
1926
 
1648
- private static function _injecthandler_getpath(
1649
- object $state,
1650
- mixed $val,
1651
- string $ref,
1652
- mixed $store
1653
- ): mixed {
1654
- return self::_injecthandler($state, $val, $ref, $store);
1655
- }
1656
-
1657
1927
  /**
1658
1928
  * @internal
1659
1929
  * Delete a key from a map or list.
@@ -1706,10 +1976,10 @@ class Struct
1706
1976
  }
1707
1977
 
1708
1978
  // if parent has a "$KEY" override, use that
1709
- $keyspec = self::_getprop($state->parent, self::S_DKEY);
1979
+ $keyspec = self::_getprop($state->parent, self::S_BKEY);
1710
1980
  if ($keyspec !== self::undef()) {
1711
1981
  // remove the marker
1712
- self::setprop($state->parent, self::S_DKEY, self::undef());
1982
+ self::setprop($state->parent, self::S_BKEY, self::undef());
1713
1983
  return self::_getprop($state->dparent, $keyspec);
1714
1984
  }
1715
1985
 
@@ -1825,7 +2095,7 @@ class Struct
1825
2095
  // Create clones of the child template for each value of the current source.
1826
2096
  if (self::islist($src)) {
1827
2097
  $srcArr = ($src instanceof ListRef) ? $src->list : (array) $src;
1828
- $tval = array_map(function($_) use ($child) {
2098
+ $tval = array_map(function ($_) use ($child) {
1829
2099
  return self::clone($child);
1830
2100
  }, $srcArr);
1831
2101
  } elseif (self::ismap($src)) {
@@ -1841,6 +2111,13 @@ class Struct
1841
2111
 
1842
2112
  $rval = [];
1843
2113
 
2114
+ // Wrap the generated list the way `cloneWrap` wraps the spec: a plain
2115
+ // PHP array is a VALUE, so an injector writing back through
2116
+ // `$inj->nodes` would land on a copy and its result would be lost.
2117
+ // `$tval` is initialised to `[]` above and only ever reassigned to an
2118
+ // array, so no guard is needed - phpstan rejected one as dead.
2119
+ $tval = new ListRef($tval);
2120
+
1844
2121
  if (0 < self::size($tval)) {
1845
2122
  $tcur = (null == $src) ? self::undef() : ($src instanceof ListRef ? $src->list : array_values((array) $src));
1846
2123
 
@@ -1945,7 +2222,11 @@ class Struct
1945
2222
  $keypath = self::_getprop($origchildspec, self::S_BKEY);
1946
2223
  $childspec = self::delprop($origchildspec, self::S_BKEY);
1947
2224
 
1948
- $child = $childspec;
2225
+ // Canonical: `const child = getprop(childspec, S_BVAL, childspec)`
2226
+ // (StructUtility.ts, transform_PACK). A child spec may name its value
2227
+ // under `$VAL`; without this lookup the literal key survived into the
2228
+ // output and the value was never transformed.
2229
+ $child = self::_getprop($childspec, self::S_BVAL, $childspec);
1949
2230
 
1950
2231
  // Build parallel target object.
1951
2232
  $tval = new \stdClass();
@@ -2029,13 +2310,11 @@ class Struct
2029
2310
  /** @internal */
2030
2311
  public static function transform_REF(object $state, mixed $_val, string $_ref, mixed $store): mixed
2031
2312
  {
2032
- $nodes = $state->nodes;
2033
-
2034
2313
  if (self::M_VAL !== $state->mode) {
2035
2314
  return self::undef();
2036
2315
  }
2037
2316
 
2038
- // Get arguments: ['`$REF`', 'ref-path'].
2317
+ // ['`$REF`', 'ref-path']: a relative path starts where this slot is, so .x is a sibling.
2039
2318
  $refpath = self::_getprop($state->parent, 1);
2040
2319
  $state->keyI = self::size($state->keys);
2041
2320
 
@@ -2043,11 +2322,24 @@ class Struct
2043
2322
  $specFn = self::_getprop($store, '$SPEC');
2044
2323
  $spec = is_callable($specFn) ? $specFn() : self::undef();
2045
2324
 
2046
- $dpath = self::slice($state->path, 1);
2047
- $ref = self::getpath($spec, $refpath, (object) [
2325
+ $dpath = self::slice($state->path, 1, -2);
2326
+ $refinj = (object) [
2048
2327
  'dpath' => $dpath,
2049
2328
  'dparent' => self::getpath($spec, $dpath),
2050
- ]);
2329
+ ];
2330
+ $ref = self::getpath($spec, $refpath, $refinj);
2331
+
2332
+ // A chain of references that comes back to a path it has named names nothing.
2333
+ $seen = [$refpath];
2334
+ for ($next = $ref; self::islist($next) && '`$REF`' === self::_getprop($next, 0);) {
2335
+ $nextpath = self::_getprop($next, 1);
2336
+ if (in_array($nextpath, $seen, true)) {
2337
+ $ref = self::undef();
2338
+ break;
2339
+ }
2340
+ $seen[] = $nextpath;
2341
+ $next = self::getpath($spec, $nextpath, $refinj);
2342
+ }
2051
2343
 
2052
2344
  $hasSubRef = false;
2053
2345
  if (self::isnode($ref)) {
@@ -2059,68 +2351,75 @@ class Struct
2059
2351
  });
2060
2352
  }
2061
2353
 
2062
- $tref = self::cloneWrap($ref);
2063
-
2064
- $cpath = self::slice($state->path, -3);
2065
- $tpath = self::slice($state->path, -1);
2066
- $tcur = self::getpath($store, $cpath);
2067
- $tval = self::getpath($store, $tpath);
2068
- $rval = self::undef();
2069
-
2070
- if (!$hasSubRef || self::undef() !== $tval) {
2071
- $tinj = $state->child(0, [self::getelem($tpath, -1)]);
2072
-
2073
- $tinj->path = $tpath;
2074
- $tinj->nodes = self::slice($state->nodes, -1);
2075
- $tinj->parent = self::getelem($nodes, -2);
2076
- $tinj->val = $tref;
2077
-
2078
- $tinj->dpath = self::flatten([$cpath]);
2079
- $tinj->dparent = $tcur;
2080
-
2081
- $injResult = self::inject($tref, $store, $tinj);
2082
-
2083
- // If inject returned SKIP, use tref (mutated in place) not tinj->val (which may be SKIP)
2084
- if ($injResult === self::SKIP || $tinj->val === self::SKIP) {
2085
- $rval = is_object($tref) ? $tref : self::undef();
2086
- } else {
2087
- $rval = $tinj->val;
2088
- }
2089
- } else {
2090
- $rval = self::undef();
2091
- }
2354
+ // A recursive reference stops where the data does.
2355
+ $tval = self::getpath($store, self::slice($state->path, -1));
2356
+ $rval = !$hasSubRef || self::undef() !== $tval ? self::cloneWrap($ref) : self::undef();
2092
2357
 
2358
+ // The enclosing loop injects the referenced spec in this list's place, so
2359
+ // neither this pass nor this element leaves a value for modify to check.
2093
2360
  $grandparent = $state->setval($rval, 2);
2094
2361
 
2095
- // PHP: arrays in nodes are copies, so ancestor setval on arrays doesn't propagate.
2096
- // Sync the prior injection's parent if it's an array.
2097
- if ($state->prior && is_array($state->prior->parent)) {
2098
- $akey = self::getelem($state->path, -2);
2099
- if (self::undef() === $rval) {
2100
- $state->prior->parent = self::delprop($state->prior->parent, $akey);
2101
- } else {
2102
- self::setprop($state->prior->parent, $akey, $rval);
2362
+ $prior = $state->prior;
2363
+ if ($prior) {
2364
+ // PHP: arrays in nodes are copies, so ancestor setval on arrays doesn't propagate.
2365
+ if (is_array($prior->parent)) {
2366
+ $akey = self::getelem($state->path, -2);
2367
+ if (self::undef() === $rval) {
2368
+ $prior->parent = self::delprop($prior->parent, $akey);
2369
+ } else {
2370
+ self::setprop($prior->parent, $akey, $rval);
2371
+ }
2103
2372
  }
2104
- }
2105
2373
 
2106
- if (self::islist($grandparent) && $state->prior) {
2107
- $state->prior->keyI--;
2374
+ $prior->modify = null;
2375
+ if (self::islist($grandparent) || self::undef() !== $rval) {
2376
+ $prior->keyI--;
2377
+ }
2108
2378
  }
2109
2379
 
2110
- return $_val;
2380
+ return self::SKIP;
2111
2381
  }
2112
2382
 
2113
2383
 
2114
2384
  private static array $FORMATTER = [];
2115
2385
 
2386
+ /**
2387
+ * Coerce a scalar to a string the way canonical does.
2388
+ *
2389
+ * The formatters are written `('' + v)` in canonical TypeScript, which is
2390
+ * JavaScript coercion. PHP's `('' . $v)` agrees for strings and numbers
2391
+ * and disagrees for exactly the values the corpus exercises:
2392
+ *
2393
+ * JS PHP
2394
+ * true "true" "1"
2395
+ * false "false" ""
2396
+ * null "null" ""
2397
+ *
2398
+ * so `$FORMAT upper` on `true` produced "1" here and "TRUE" everywhere
2399
+ * else.
2400
+ */
2401
+ private static function _jsstr(mixed $val): string
2402
+ {
2403
+ if (true === $val) {
2404
+ return 'true';
2405
+ }
2406
+ if (false === $val) {
2407
+ return 'false';
2408
+ }
2409
+ if (null === $val) {
2410
+ return 'null';
2411
+ }
2412
+ return '' . $val;
2413
+ }
2414
+
2116
2415
  private static function _getFormatters(): array
2117
2416
  {
2118
2417
  if (empty(self::$FORMATTER)) {
2119
2418
  self::$FORMATTER = [
2120
2419
  'identity' => fn($_k, $v) => $v,
2121
- 'upper' => fn($_k, $v) => self::isnode($v) ? $v : strtoupper('' . $v),
2122
- 'lower' => fn($_k, $v) => self::isnode($v) ? $v : strtolower('' . $v),
2123
- 'string' => fn($_k, $v) => self::isnode($v) ? $v : ('' . $v),
2420
+ 'upper' => fn($_k, $v) => self::isnode($v) ? $v : strtoupper(self::_jsstr($v)),
2421
+ 'lower' => fn($_k, $v) => self::isnode($v) ? $v : strtolower(self::_jsstr($v)),
2422
+ 'string' => fn($_k, $v) => self::isnode($v) ? $v : self::_jsstr($v),
2124
2423
  'number' => function ($_k, $v) {
2125
2424
  if (self::isnode($v)) {
2126
2425
  return $v;
@@ -2137,7 +2436,7 @@ class Struct
2137
2436
  },
2138
2437
  'concat' => function ($k, $v) {
2139
2438
  if (null === $k && self::islist($v)) {
2140
- $parts = self::items($v, fn($n) => self::isnode($n[1]) ? '' : ('' . $n[1]));
2439
+ $parts = self::items($v, fn($n) => self::isnode($n[1]) ? '' : self::_jsstr($n[1]));
2141
2440
  return self::join($parts, '');
2142
2441
  }
2143
2442
  return $v;
@@ -2228,25 +2527,29 @@ class Struct
2228
2527
  *
2229
2528
  * @param mixed $data Source data (not mutated)
2230
2529
  * @param mixed $spec Transform spec (JSON-like)
2231
- * @param array<mixed>|object|null $extra extra transforms or data
2232
- * @param callable|null $modify optional per-value hook
2530
+ * @param mixed $injdef Either an injdef object ({ extra, modify, errs, meta, handler })
2531
+ * or, for backward compatibility, extra transforms/data directly.
2233
2532
  */
2234
2533
  public static function transform(
2235
2534
  mixed $data,
2236
2535
  mixed $spec,
2237
2536
  mixed $injdef = null
2238
2537
  ): mixed {
2538
+ $injdef = self::_injdef($injdef);
2539
+
2239
2540
  // Support injdef object pattern or backward compat (extra data passed directly)
2240
2541
  $extra = null;
2241
2542
  $modify = null;
2242
2543
  $errs = null;
2243
- if (is_object($injdef) && (
2544
+ if (
2545
+ is_object($injdef) && (
2244
2546
  property_exists($injdef, 'extra') ||
2245
2547
  property_exists($injdef, 'modify') ||
2246
2548
  property_exists($injdef, 'errs') ||
2247
2549
  property_exists($injdef, 'meta') ||
2248
2550
  property_exists($injdef, 'handler')
2249
- )) {
2551
+ )
2552
+ ) {
2250
2553
  // New injdef pattern: { extra, modify, errs, meta, handler }
2251
2554
  $extra = property_exists($injdef, 'extra') ? $injdef->extra : null;
2252
2555
  $modify = property_exists($injdef, 'modify') ? $injdef->modify : null;
@@ -2256,6 +2559,18 @@ class Struct
2256
2559
  $extra = $injdef;
2257
2560
  }
2258
2561
 
2562
+ // A caller that supplied `errs` is collecting; anyone else expects the
2563
+ // errors to be raised. Either way they have to be COLLECTED first, and
2564
+ // by reference - a plain PHP array on the store would be copied before
2565
+ // the injectors deep inside ever reached it.
2566
+ $collect = null !== $errs;
2567
+ if (is_array($errs) || null === $errs) {
2568
+ $errs = new \ArrayObject(null === $errs ? [] : $errs);
2569
+ }
2570
+ if ($collect && is_object($injdef)) {
2571
+ $injdef->errs = $errs;
2572
+ }
2573
+
2259
2574
  // 1) clone spec, wrapping arrays in ListRef for reference stability (Go pattern)
2260
2575
  $specClone = self::cloneWrap($spec);
2261
2576
 
@@ -2282,7 +2597,7 @@ class Struct
2282
2597
  self::S_DTOP => $dataClone,
2283
2598
  '$BT' => fn() => self::S_BT,
2284
2599
  '$DS' => fn() => self::S_DS,
2285
- '$WHEN' => fn() => (new \DateTime)->format(\DateTime::ATOM),
2600
+ '$WHEN' => fn() => (new \DateTime())->format(\DateTime::ATOM),
2286
2601
  '$DELETE' => [self::class, 'transform_DELETE'],
2287
2602
  '$COPY' => [self::class, 'transform_COPY'],
2288
2603
  '$KEY' => [self::class, 'transform_KEY'],
@@ -2296,7 +2611,10 @@ class Struct
2296
2611
  '$FORMAT' => [self::class, 'transform_FORMAT'],
2297
2612
  '$APPLY' => [self::class, 'transform_APPLY'],
2298
2613
  ],
2299
- $extraTransforms
2614
+ $extraTransforms,
2615
+ // Last, so an `extra` carrying its own `$ERRS` cannot displace it -
2616
+ // the same ordering `validate` relies on.
2617
+ [self::S_DERRS => $errs]
2300
2618
  );
2301
2619
 
2302
2620
  // 4) run inject to do the transform
@@ -2315,6 +2633,15 @@ class Struct
2315
2633
  }
2316
2634
  $result = self::inject($specClone, $store, $injectOpts);
2317
2635
 
2636
+ // Canonical: `const generr = 0 < size(errs) && !collect` - a transform
2637
+ // that collected errors and was given no collector RAISES them
2638
+ // (StructUtility.ts:2048). Without this the errors were recorded and
2639
+ // then dropped: an unknown `$APPLY` argument produced no value and no
2640
+ // error at all.
2641
+ if (!$collect && 0 < count($errs)) {
2642
+ throw new \Exception(implode(' | ', (array) $errs));
2643
+ }
2644
+
2318
2645
  // When a child transform (e.g. $REF) deletes the key, inject returns SKIP; return mutated spec
2319
2646
  if ($result === self::SKIP) {
2320
2647
  return self::_stdClassToArray(self::cloneUnwrap($specClone));
@@ -2335,6 +2662,13 @@ class Struct
2335
2662
  if ($depth > 64) {
2336
2663
  return $val;
2337
2664
  }
2665
+ // The no-value sentinel is itself an empty stdClass, so it would
2666
+ // otherwise flatten to `[]` - turning `transform`'s and `validate`'s
2667
+ // "no result" into an empty map at the public boundary. Canonical
2668
+ // returns undefined there.
2669
+ if (self::undef() === $val) {
2670
+ return $val;
2671
+ }
2338
2672
  if ($val instanceof \stdClass) {
2339
2673
  $out = [];
2340
2674
  foreach (get_object_vars($val) as $k => $v) {
@@ -2352,25 +2686,6 @@ class Struct
2352
2686
  return $val;
2353
2687
  }
2354
2688
 
2355
- /**
2356
- * Remove unresolved $REF list entries from a list spec.
2357
- * This handles PHP's value-type arrays where in-place mutation via references doesn't propagate.
2358
- */
2359
- private static function _cleanRefEntries(array $list): array {
2360
- $cleaned = [];
2361
- foreach ($list as $item) {
2362
- if (self::islist($item) && count($item) >= 1 && self::_getprop($item, 0) === '`$REF`') {
2363
- // This is an unresolved $REF entry - remove it
2364
- continue;
2365
- }
2366
- if (self::islist($item)) {
2367
- $item = self::_cleanRefEntries($item);
2368
- }
2369
- $cleaned[] = $item;
2370
- }
2371
- return $cleaned;
2372
- }
2373
-
2374
2689
  /** @internal */
2375
2690
  private static function _invalidTypeMsg(array $path, string $needtype, int $vt, mixed $v): string
2376
2691
  {
@@ -2382,71 +2697,294 @@ class Struct
2382
2697
  ($missing ? '' : self::typename($vt) . ': ') . $vs . '.';
2383
2698
  }
2384
2699
 
2385
- /* =======================
2386
- * Validation Functions
2387
- * =======================
2388
-
2389
2700
  /**
2390
- * A required string value.
2701
+ * Report each checker the spec names that validate lacks, and each misplaced
2702
+ * $REST; $EXACT's arguments are literals. Last: spec is a list's last item.
2391
2703
  */
2392
- public static function validate_STRING(object $inj): mixed
2393
- {
2394
- $out = self::_getprop($inj->dparent, $inj->key);
2704
+ private static function _checknames(
2705
+ mixed $spec,
2706
+ mixed $store,
2707
+ array $path,
2708
+ \ArrayObject $errs,
2709
+ bool $last = false
2710
+ ): void {
2711
+ $name = self::_refname($spec);
2712
+ if (null !== $name) {
2713
+ if (self::_unknownname($name, $store)) {
2714
+ $errs[] = 'Unknown validator ' . $name . ' at field ' . self::pathify($path) . '.';
2715
+ } elseif ('$REST' === $name) {
2716
+ $errs[] = self::_restmsg($path, ' must be the last element of an array.');
2717
+ }
2718
+ return;
2719
+ }
2395
2720
 
2396
- $t = self::typify($out);
2397
- if (0 === (self::T_string & $t)) {
2398
- $msg = self::_invalidTypeMsg($inj->path, self::S_string, $t, $out);
2399
- $inj->errs[] = $msg;
2400
- return self::undef();
2721
+ $head = self::islist($spec) ? self::_refname(self::_getprop($spec, 0)) : null;
2722
+ if ('$EXACT' === $head) {
2723
+ return;
2401
2724
  }
2402
2725
 
2403
- if (self::S_MT === $out) {
2404
- $msg = 'Empty string at ' . self::pathify($inj->path, 1);
2405
- $inj->errs[] = $msg;
2406
- return self::undef();
2726
+ if ('$REST' === $head) {
2727
+ if (true !== $last) {
2728
+ $errs[] = self::_restmsg($path, ' must be the last element of an array.');
2729
+ } elseif (2 !== self::size($spec)) {
2730
+ $errs[] = self::_restmsg($path, ' must have exactly one spec.');
2731
+ }
2732
+ self::_checknames(self::_getprop($spec, 1), $store, [...$path, 1], $errs);
2733
+ return;
2407
2734
  }
2408
2735
 
2409
- return $out;
2736
+ $restkey = '`$REST`';
2737
+ if (
2738
+ self::ismap($spec)
2739
+ && self::undef() !== self::_getprop($spec, $restkey)
2740
+ && self::undef() !== self::_getprop($spec, '`$CHILD`')
2741
+ ) {
2742
+ $errs[] = self::_restmsg($path, ' cannot be used with $CHILD.');
2743
+ }
2744
+
2745
+ $lastkey = self::islist($spec) ? self::strkey(self::size($spec) - 1) : null;
2746
+ foreach (self::keysof($spec) as $key) {
2747
+ if (self::ismap($spec) && $restkey !== $key) {
2748
+ self::_checknames($key, $store, $path, $errs);
2749
+ }
2750
+ self::_checknames(self::_getprop($spec, $key), $store, [...$path, $key], $errs, $lastkey === $key);
2751
+ }
2410
2752
  }
2411
2753
 
2412
2754
  /**
2413
- * A required number value (int or float).
2755
+ * The name a whole-string reference gives, when it is a checker name in any case.
2414
2756
  */
2415
- public static function validate_NUMBER(object $inj): mixed
2757
+ private static function _refname(mixed $val): ?string
2416
2758
  {
2417
- $out = self::_getprop($inj->dparent, $inj->key);
2418
-
2419
- $t = self::typify($out);
2420
- if (0 === (self::T_number & $t)) {
2421
- $inj->errs[] = self::_invalidTypeMsg($inj->path, self::S_number, $t, $out);
2422
- return self::undef();
2759
+ if (
2760
+ is_string($val)
2761
+ && 1 === preg_match(self::R_INJECTION_FULL, $val, $m)
2762
+ && 1 === preg_match(self::R_CHECKER_NAME, strtoupper($m[1]))
2763
+ ) {
2764
+ return $m[1];
2423
2765
  }
2424
-
2425
- return $out;
2766
+ return null;
2426
2767
  }
2427
2768
 
2428
2769
  /**
2429
- * A required boolean value.
2770
+ * Unknown: undefined and upper case, or a defined name in another case. Null disables a name.
2430
2771
  */
2431
- public static function validate_BOOLEAN(object $inj): mixed
2772
+ private static function _unknownname(string $name, mixed $store): bool
2432
2773
  {
2433
- $out = self::_getprop($inj->dparent, $inj->key);
2434
-
2435
- $t = self::typify($out);
2436
- if (0 === (self::T_boolean & $t)) {
2437
- $inj->errs[] = self::_invalidTypeMsg($inj->path, self::S_boolean, $t, $out);
2438
- return self::undef();
2439
- }
2774
+ $known = fn(string $n): bool => in_array($n, self::VALIDATE_NAMES, true) || null !== self::getprop($store, $n);
2775
+ $upper = strtoupper($name);
2776
+ return !$known($name) && ($upper === $name || $known($upper));
2777
+ }
2440
2778
 
2441
- return $out;
2779
+ /**
2780
+ * The data value at a list directive's slot, read literally so that a
2781
+ * stored null is a value.
2782
+ */
2783
+ private static function _slotval(object $inj): mixed
2784
+ {
2785
+ $prior = $inj->prior;
2786
+ return null === $prior ? $inj->dparent : self::_getprop($prior->dparent, $prior->key);
2442
2787
  }
2443
2788
 
2444
2789
  /**
2445
- * A required object (map) value (contents not validated).
2790
+ * JSON equality: numbers by value, lists in order, maps by key in any order.
2446
2791
  */
2447
- public static function validate_OBJECT(object $inj): mixed
2792
+ private static function _deepequal(mixed $a, mixed $b): bool
2448
2793
  {
2449
- $out = self::_getprop($inj->dparent, $inj->key);
2794
+ if ($a === $b) {
2795
+ return true;
2796
+ }
2797
+
2798
+ $atype = self::typify($a);
2799
+ $btype = self::typify($b);
2800
+ if (0 < (self::T_number & $atype) && 0 < (self::T_number & $btype)) {
2801
+ return $a == $b;
2802
+ }
2803
+
2804
+ if ($atype !== $btype || 0 === ((self::T_list | self::T_map) & $atype)) {
2805
+ return false;
2806
+ }
2807
+
2808
+ $akeys = self::keysof($a);
2809
+ $bkeys = self::keysof($b);
2810
+ if (count($akeys) !== count($bkeys)) {
2811
+ return false;
2812
+ }
2813
+
2814
+ foreach ($akeys as $kI => $k) {
2815
+ if ($k !== $bkeys[$kI] || !self::_deepequal(self::_getprop($a, $k), self::_getprop($b, $k))) {
2816
+ return false;
2817
+ }
2818
+ }
2819
+
2820
+ return true;
2821
+ }
2822
+
2823
+ /**
2824
+ * A class instance: an object that is not a map (stdClass), a list
2825
+ * (ListRef) or a function (Closure).
2826
+ */
2827
+ private static function _isinstance(mixed $val): bool
2828
+ {
2829
+ return is_object($val) && !($val instanceof \stdClass) && !($val instanceof ListRef)
2830
+ && !($val instanceof \Closure);
2831
+ }
2832
+
2833
+ /**
2834
+ * Every member val has is in out, unchanged. A member only out has is a
2835
+ * default the spec supplied, and is ignored.
2836
+ */
2837
+ private static function _keeps(mixed $val, mixed $out): bool
2838
+ {
2839
+ if (self::undef() === $val) {
2840
+ return true;
2841
+ }
2842
+
2843
+ // out comes from validate as plain arrays, where an empty map is [] too.
2844
+ $samekind = self::islist($val) === self::islist($out) || [] === $out;
2845
+
2846
+ if (0 === ((self::T_list | self::T_map) & self::typify($val)) || !$samekind || !self::isnode($out)) {
2847
+ return self::_deepequal($val, $out);
2848
+ }
2849
+
2850
+ foreach (self::keysof($val) as $k) {
2851
+ if (!self::_keeps(self::_getprop($val, $k), self::_getprop($out, $k))) {
2852
+ return false;
2853
+ }
2854
+ }
2855
+
2856
+ return true;
2857
+ }
2858
+
2859
+ /**
2860
+ * A spec admits a value when validating the value against it finds no error
2861
+ * and gives back the value as it is.
2862
+ */
2863
+ private static function _admits(mixed $val, mixed $spec, object $inj, mixed $store): bool
2864
+ {
2865
+ $vstore = array_merge((array) $store, [self::S_DTOP => $val]);
2866
+
2867
+ $tinj = (object) [
2868
+ 'extra' => $vstore,
2869
+ 'errs' => [],
2870
+ 'meta' => $inj->meta,
2871
+ ];
2872
+ $out = self::validate($val, $spec, $tinj);
2873
+
2874
+ return 0 === count($tinj->errs) && self::_keeps($val, $out);
2875
+ }
2876
+
2877
+ /**
2878
+ * The bounds of a $NOF count, and the words for it, which are absent when
2879
+ * the count is invalid. Without a max, the bound is the number of specs.
2880
+ */
2881
+ private static function _nofcount(mixed $count, int $numtvals): array
2882
+ {
2883
+ $isnat = fn(mixed $n): bool => 0 < (self::T_integer & self::typify($n)) && 0 <= $n;
2884
+
2885
+ // JavaScript has one number type, so 2.0 counts as 2.
2886
+ $asint = fn(mixed $n): mixed => is_float($n) && floor($n) === $n && abs($n) < 9.2e18 ? (int) $n : $n;
2887
+
2888
+ $count = $asint($count);
2889
+ if ($isnat($count)) {
2890
+ return [$count, $count, 0 === $count ? 'none' : 'exactly ' . $count];
2891
+ }
2892
+
2893
+ $min = $asint(self::_getprop($count, 'min'));
2894
+ $max = $asint(self::_getprop($count, 'max'));
2895
+ $nomin = self::undef() === $min;
2896
+ $nomax = self::undef() === $max;
2897
+
2898
+ $valid = self::ismap($count)
2899
+ && 0 < self::size($count)
2900
+ && self::size($count) === ($nomin ? 0 : 1) + ($nomax ? 0 : 1)
2901
+ && ($nomin || $isnat($min))
2902
+ && ($nomax || $isnat($max))
2903
+ && ($nomin || $nomax || $min <= $max);
2904
+
2905
+ if (!$valid) {
2906
+ return [0, 0, self::undef()];
2907
+ }
2908
+
2909
+ $lo = $nomin ? 0 : $min;
2910
+ $hi = $nomax ? $numtvals : $max;
2911
+
2912
+ $desc = $nomax
2913
+ ? 'at least ' . $lo
2914
+ : (0 === $hi
2915
+ ? 'none'
2916
+ : ($nomin
2917
+ ? 'at most ' . $hi
2918
+ : ($lo === $hi ? 'exactly ' . $lo : $lo . ' to ' . $hi)));
2919
+
2920
+ return [$lo, $hi, $desc];
2921
+ }
2922
+
2923
+ /* =======================
2924
+ * Validation Functions
2925
+ * =======================
2926
+
2927
+ /**
2928
+ * A required string value.
2929
+ */
2930
+ public static function validate_STRING(object $inj): mixed
2931
+ {
2932
+ $out = self::_getprop($inj->dparent, $inj->key);
2933
+
2934
+ $t = self::typify($out);
2935
+ if (0 === (self::T_string & $t)) {
2936
+ $msg = self::_invalidTypeMsg($inj->path, self::S_string, $t, $out);
2937
+ $inj->errs[] = $msg;
2938
+ return $out;
2939
+ }
2940
+
2941
+ if (self::S_MT === $out) {
2942
+ $msg = 'Empty string at ' . self::pathify($inj->path, 1);
2943
+ $inj->errs[] = $msg;
2944
+ return $out;
2945
+ }
2946
+
2947
+ return $out;
2948
+ }
2949
+
2950
+ /**
2951
+ * A required number value (int or float).
2952
+ */
2953
+ public static function validate_NUMBER(object $inj): mixed
2954
+ {
2955
+ $out = self::_getprop($inj->dparent, $inj->key);
2956
+
2957
+ $t = self::typify($out);
2958
+ if (0 === (self::T_number & $t)) {
2959
+ $inj->errs[] = self::_invalidTypeMsg($inj->path, self::S_number, $t, $out);
2960
+ return self::undef();
2961
+ }
2962
+
2963
+ return $out;
2964
+ }
2965
+
2966
+ /**
2967
+ * A required boolean value.
2968
+ */
2969
+ public static function validate_BOOLEAN(object $inj): mixed
2970
+ {
2971
+ $out = self::_getprop($inj->dparent, $inj->key);
2972
+
2973
+ $t = self::typify($out);
2974
+ if (0 === (self::T_boolean & $t)) {
2975
+ $inj->errs[] = self::_invalidTypeMsg($inj->path, self::S_boolean, $t, $out);
2976
+ return self::undef();
2977
+ }
2978
+
2979
+ return $out;
2980
+ }
2981
+
2982
+ /**
2983
+ * A required object (map) value (contents not validated).
2984
+ */
2985
+ public static function validate_OBJECT(object $inj): mixed
2986
+ {
2987
+ $out = self::_getprop($inj->dparent, $inj->key);
2450
2988
 
2451
2989
  $t = self::typify($out);
2452
2990
  if (0 === (self::T_map & $t)) {
@@ -2496,13 +3034,15 @@ class Struct
2496
3034
  {
2497
3035
  $tname = strtolower(substr($ref ?? '', 1));
2498
3036
  $idx = array_search($tname, self::TYPENAME);
2499
- $typev = ($idx !== false) ? (1 << (31 - $idx)) : 0;
3037
+
3038
+ // $NIL is absent or null.
3039
+ $typev = (($idx !== false) ? (1 << (31 - $idx)) : 0) | (self::S_nil === $tname ? self::T_null : 0);
2500
3040
  $out = self::_getprop($inj->dparent, $inj->key);
2501
3041
 
2502
3042
  $t = self::typify($out);
2503
3043
  if (0 === ($t & $typev)) {
2504
3044
  $inj->errs[] = self::_invalidTypeMsg($inj->path, $tname, $t, $out);
2505
- return self::undef();
3045
+ return $out;
2506
3046
  }
2507
3047
 
2508
3048
  return $out;
@@ -2536,15 +3076,13 @@ class Struct
2536
3076
 
2537
3077
  // Get corresponding current object.
2538
3078
  $pkey = self::_getprop($path, count($path) - 2);
2539
- $tval = self::_getprop($inj->dparent, $pkey);
3079
+ $tval = self::getprop($inj->dparent, $pkey);
2540
3080
 
2541
- if (self::undef() == $tval) {
3081
+ if (null === $tval) {
2542
3082
  $tval = new \stdClass();
2543
3083
  } elseif (!self::ismap($tval)) {
2544
- $inj->errs[] = self::_invalidTypeMsg(
2545
- self::slice($inj->path, 0, -1), self::S_object, self::typify($tval), $tval);
3084
+ // _validation reports the mismatch, once.
2546
3085
  return self::undef();
2547
-
2548
3086
  }
2549
3087
 
2550
3088
  $ckeys = self::keysof($tval);
@@ -2570,18 +3108,21 @@ class Struct
2570
3108
 
2571
3109
  $childtm = self::_getprop($parent, 1);
2572
3110
 
2573
- if (self::undef() === $inj->dparent) {
2574
- // Empty list as default.
2575
- while (count($parent) > 0) {
2576
- array_pop($parent);
3111
+ // Group A: a stored null is no data.
3112
+ if (self::undef() === $inj->dparent || null === $inj->dparent) {
3113
+ // Empty list as default. `$parent` may be a ListRef - see the
3114
+ // note on the other array_pop below.
3115
+ if ($parent instanceof ListRef) {
3116
+ $parent->list = [];
3117
+ } else {
3118
+ while (count($parent) > 0) {
3119
+ array_pop($parent);
3120
+ }
2577
3121
  }
2578
3122
  return self::undef();
2579
3123
  }
2580
3124
 
2581
3125
  if (!self::islist($inj->dparent)) {
2582
- $msg = self::_invalidTypeMsg(
2583
- self::slice($inj->path, 0, -1), self::S_array, self::typify($inj->dparent), $inj->dparent);
2584
- $inj->errs[] = $msg;
2585
3126
  $inj->keyI = count($parent);
2586
3127
  return $inj->dparent;
2587
3128
  }
@@ -2590,115 +3131,101 @@ class Struct
2590
3131
  foreach ($inj->dparent as $i => $n) {
2591
3132
  $parent[$i] = self::clone($childtm);
2592
3133
  }
2593
- // Adjust array length
3134
+ // Adjust array length. `$parent` may be a ListRef, which is
3135
+ // ArrayAccess and Countable but not an array - `array_pop` takes
3136
+ // an array by reference, so it has to reach the backing list.
3137
+ // (`delprop` already spells its ListRef branch this way.)
2594
3138
  while (count($parent) > count($inj->dparent)) {
2595
- array_pop($parent);
3139
+ if ($parent instanceof ListRef) {
3140
+ array_pop($parent->list);
3141
+ } else {
3142
+ array_pop($parent);
3143
+ }
2596
3144
  }
2597
- $inj->keyI = 0;
2598
- $out = self::_getprop($inj->dparent, 0);
2599
- return $out;
3145
+ // NOTE: modifying inj! This extends the child value loop in inject
3146
+ // to cover every cloned child.
3147
+ for ($ckeyI = count($keys); $ckeyI < count($parent); $ckeyI++) {
3148
+ $keys[] = self::strkey($ckeyI);
3149
+ }
3150
+ $inj->keys = $keys;
3151
+
3152
+ // Restart the child value loop at the first element (the loop
3153
+ // increments keyI on resume) so that the first element is also
3154
+ // validated against the child template.
3155
+ $inj->keyI = -1;
3156
+
3157
+ // SKIP leaves the cloned child template in place at the first
3158
+ // element so the resumed loop can validate it.
3159
+ return self::SKIP;
2600
3160
  }
2601
3161
 
2602
3162
  return self::undef();
2603
3163
  }
2604
3164
 
2605
3165
  /**
2606
- * Match at least one of the specified shapes.
2607
- * Syntax: ['`$ONE`', alt0, alt1, ...]
3166
+ * The members a spec does not name: the map form is a key, the list form a
3167
+ * tuple's last item. Each places clones of its spec for the loop to check.
2608
3168
  */
2609
- public static function validate_ONE(
2610
- object $inj,
2611
- mixed $_val,
2612
- string $_ref,
2613
- mixed $store
2614
- ): mixed {
3169
+ public static function validate_REST(object $inj): mixed
3170
+ {
2615
3171
  $mode = $inj->mode;
3172
+ $key = $inj->key;
2616
3173
  $parent = $inj->parent;
2617
- $keyI = $inj->keyI;
3174
+ $keys = $inj->keys ?? [];
3175
+ $path = $inj->path;
2618
3176
 
2619
- // Only operate in val mode, since parent is a list.
2620
- if (self::M_VAL === $mode) {
2621
- if (!self::islist($parent) || 0 !== $keyI) {
2622
- $inj->errs[] = 'The $ONE validator at field ' .
2623
- self::pathify($inj->path, 1, 1) .
2624
- ' must be the first element of an array.';
2625
- return self::undef();
3177
+ if (self::M_KEYPRE === $mode) {
3178
+ $resttm = self::_getprop($parent, $key);
3179
+ $tval = self::getprop($inj->dparent, self::getelem($path, -2));
3180
+
3181
+ if (self::ismap($tval)) {
3182
+ foreach (self::keysof($tval) as $ckey) {
3183
+ if (!in_array($ckey, $keys, true)) {
3184
+ self::setprop($parent, $ckey, self::clone($resttm));
3185
+ $keys[] = $ckey;
3186
+ }
3187
+ }
3188
+ $inj->keys = $keys;
2626
3189
  }
2627
3190
 
2628
- $inj->keyI = count($inj->keys ?? []);
2629
-
2630
- // Clean up structure, replacing [$ONE, ...] with current
2631
- $inj->setval($inj->dparent, 2);
2632
-
2633
- $inj->path = self::slice($inj->path, 0, -1);
3191
+ $inj->setval(self::undef());
3192
+ return self::undef();
3193
+ }
2634
3194
 
2635
- $tvals = self::slice($parent, 1);
2636
- if (0 === count($tvals)) {
2637
- $inj->errs[] = 'The $ONE validator at field ' .
2638
- self::pathify($inj->path, 1, 1) .
2639
- ' must have at least one argument.';
2640
- return self::undef();
2641
- }
3195
+ $prior = $inj->prior;
3196
+ if (self::M_VAL !== $mode || null === $prior || !self::islist($prior->parent) || 0 !== $inj->keyI) {
3197
+ $inj->errs[] = self::_restmsg(self::slice($path, 1), ' must be the last element of an array.');
3198
+ return self::undef();
3199
+ }
2642
3200
 
2643
- // See if we can find a match.
2644
- foreach ($tvals as $tval) {
2645
- // If match, then errs.length = 0
2646
- $terrs = [];
2647
-
2648
- $vstore = array_merge((array) $store, [self::S_DTOP => $inj->dparent]);
2649
-
2650
- // PATCH (optspec port, pending upstream fix): read the trial
2651
- // errors back off the injdef.
2652
- //
2653
- // `$terrs` is a PHP array, so it was passed BY VALUE into the
2654
- // object literal below; validate wraps it, fills the wrapper,
2655
- // and unwraps onto `$injdef->errs` — never touching the local.
2656
- // `count($terrs)` was therefore always 0, so the first
2657
- // alternative always counted as a match and the "no match"
2658
- // branch below was unreachable. Keeping the injdef and reading
2659
- // its `errs` is what makes the loop actually try alternatives.
2660
- $topts = (object) [
2661
- 'extra' => $vstore,
2662
- 'errs' => $terrs,
2663
- 'meta' => $inj->meta,
2664
- ];
3201
+ $inj->keyI = self::size($keys);
3202
+ $prior->modify = null;
2665
3203
 
2666
- $vcurrent = self::validate($inj->dparent, $tval, $topts);
2667
-
2668
- // PATCH (optspec port, pending upstream fix): the ancestor is
2669
- // -2, not 2.
2670
- //
2671
- // ts writes the trial result back with `setval(vcurrent, -2)`.
2672
- // A NEGATIVE ancestor takes setval's `< 2` branch, which
2673
- // writes to `inj->parent` — still the `[$ONE, ...]` LIST at
2674
- // this point, under a string key, so the write is a no-op and
2675
- // the node the first setval above already put in place is what
2676
- // survives. With `2` this wrote through to the GRANDPARENT
2677
- // instead, which both resurrected a key the data did not have
2678
- // (an optional `['`$ONE`', <spec>, '`$NIL`']` entry the caller
2679
- // omitted came back materialised) and, one level out, invented
2680
- // a synthetic entry named after its own parent carrying the
2681
- // trial store's `$TOP`.
2682
- $inj->setval($vcurrent, -2);
2683
-
2684
- // Accept current value if there was a match
2685
- if (0 === count((array) $topts->errs)) {
2686
- return self::undef();
2687
- }
2688
- }
3204
+ $tuple = $prior->parent;
3205
+ $slot = self::_listkey($prior->key);
3206
+ $dlist = $prior->dparent;
3207
+ $numitems = self::islist($dlist) ? self::size($dlist) : 0;
2689
3208
 
2690
- // There was no match.
2691
- $tvArr = ($tvals instanceof ListRef) ? $tvals->list : (is_array($tvals) ? $tvals : []);
2692
- $valdesc = implode(', ', array_map(fn($v) => self::stringify($v), $tvArr));
2693
- $valdesc = preg_replace(self::R_TRANSFORM_NAME, '$1', strtolower($valdesc));
3209
+ if ($numitems <= $slot) {
3210
+ $inj->setval(self::undef(), 2);
3211
+ return self::SKIP;
3212
+ }
2694
3213
 
2695
- $inj->errs[] = self::_invalidTypeMsg(
2696
- $inj->path,
2697
- (1 < count($tvals) ? 'one of ' : '') . $valdesc,
2698
- self::typify($inj->dparent), $inj->dparent);
3214
+ $resttm = self::_getprop($parent, 1);
3215
+ for ($i = $slot; $i < $numitems; $i++) {
3216
+ self::setprop($tuple, $i, self::clone($resttm));
3217
+ }
3218
+ for ($i = self::size($prior->keys); $i < $numitems; $i++) {
3219
+ $prior->keys[] = self::strkey($i);
2699
3220
  }
2700
3221
 
2701
- return self::undef();
3222
+ $prior->keyI--;
3223
+ return self::SKIP;
3224
+ }
3225
+
3226
+ private static function _restmsg(mixed $path, string $problem): string
3227
+ {
3228
+ return 'The $REST validator at field ' . self::pathify($path) . $problem;
2702
3229
  }
2703
3230
 
2704
3231
  /**
@@ -2720,47 +3247,49 @@ class Struct
2720
3247
  return self::undef();
2721
3248
  }
2722
3249
 
3250
+ $cval = self::_slotval($inj);
3251
+
2723
3252
  $inj->keyI = count($inj->keys ?? []);
2724
3253
 
2725
- // Clean up structure, replacing [$EXACT, ...] with current data parent
2726
- $inj->setval($inj->dparent, 2);
3254
+ // Replace [$EXACT, ...] with the data value; SKIP keeps inject off the detached list.
3255
+ $inj->setval($cval, 2);
2727
3256
 
2728
3257
  $inj->path = self::slice($inj->path, 0, count($inj->path) - 1);
2729
- $inj->key = self::getelem($inj->path, -1);
2730
3258
 
2731
3259
  $tvals = self::slice($parent, 1);
2732
3260
  if (0 === count($tvals)) {
2733
3261
  $inj->errs[] = 'The $EXACT validator at field ' .
2734
3262
  self::pathify($inj->path, 1, 1) .
2735
3263
  ' must have at least one argument.';
2736
- return self::undef();
3264
+ return self::SKIP;
2737
3265
  }
2738
3266
 
2739
- // See if we can find an exact value match.
2740
- $currentstr = null;
2741
3267
  foreach ($tvals as $tval) {
2742
- $exactmatch = $tval === $inj->dparent;
2743
-
2744
- if (!$exactmatch && self::isnode($tval)) {
2745
- $currentstr = $currentstr ?? self::stringify($inj->dparent);
2746
- $tvalstr = self::stringify($tval);
2747
- $exactmatch = $tvalstr === $currentstr;
2748
- }
2749
-
2750
- if ($exactmatch) {
2751
- return self::undef();
3268
+ if (self::_deepequal($tval, $cval)) {
3269
+ return self::SKIP;
2752
3270
  }
2753
3271
  }
2754
3272
 
2755
3273
  $tvArr = ($tvals instanceof ListRef) ? $tvals->list : (is_array($tvals) ? $tvals : []);
2756
3274
  $valdesc = implode(', ', array_map(fn($v) => self::stringify($v), $tvArr));
2757
- $valdesc = preg_replace(self::R_TRANSFORM_NAME, '$1', strtolower($valdesc));
3275
+ // Lowercase the NAME, not the whole string. R_TRANSFORM_NAME matches
3276
+ // `$([A-Z]+)`, so lowercasing first made it stop matching and left
3277
+ // the raw `$string` spelling in the message.
3278
+ $valdesc = preg_replace_callback(
3279
+ self::R_TRANSFORM_NAME,
3280
+ fn(array $m): string => strtolower($m[1]),
3281
+ $valdesc
3282
+ );
2758
3283
 
2759
3284
  $inj->errs[] = self::_invalidTypeMsg(
2760
3285
  $inj->path,
2761
3286
  (1 < count($inj->path) ? '' : 'value ') .
2762
3287
  'exactly equal to ' . (1 === count($tvals) ? '' : 'one of ') . $valdesc,
2763
- self::typify($inj->dparent), $inj->dparent);
3288
+ self::typify($cval),
3289
+ $cval
3290
+ );
3291
+
3292
+ return self::SKIP;
2764
3293
  } else {
2765
3294
  self::delprop($parent, $key);
2766
3295
  }
@@ -2768,6 +3297,321 @@ class Struct
2768
3297
  return self::undef();
2769
3298
  }
2770
3299
 
3300
+ /**
3301
+ * Count the specs that admit the value: ['`$NOF`', count, spec, ...], where
3302
+ * count is an integer, or a map holding min, max or both.
3303
+ */
3304
+ public static function validate_NOF(object $inj, mixed $_val, string $_ref, mixed $store): mixed
3305
+ {
3306
+ return self::_validatecount($inj, $store, '$NOF', true);
3307
+ }
3308
+
3309
+ /**
3310
+ * Every spec admits the value: ['`$ALL`', spec, ...].
3311
+ */
3312
+ public static function validate_ALL(object $inj, mixed $_val, string $_ref, mixed $store): mixed
3313
+ {
3314
+ return self::_validatecount($inj, $store, '$ALL', false);
3315
+ }
3316
+
3317
+ /**
3318
+ * The counting list directives. Without a count, every spec has to admit.
3319
+ */
3320
+ private static function _validatecount(object $inj, mixed $store, string $name, bool $counted): mixed
3321
+ {
3322
+ $mode = $inj->mode;
3323
+ $parent = $inj->parent;
3324
+ $keyI = $inj->keyI;
3325
+
3326
+ if (self::M_VAL !== $mode) {
3327
+ return self::undef();
3328
+ }
3329
+
3330
+ if (!self::islist($parent) || 0 !== $keyI) {
3331
+ $inj->errs[] = 'The ' . $name . ' validator at field ' .
3332
+ self::pathify($inj->path, 1, 1) .
3333
+ ' must be the first element of an array.';
3334
+ return self::undef();
3335
+ }
3336
+
3337
+ $cval = self::_slotval($inj);
3338
+
3339
+ $inj->keyI = count($inj->keys ?? []);
3340
+
3341
+ // Replace the directive's list with the data value. Each return is SKIP, so
3342
+ // that inject leaves the detached list alone and validates nothing in it.
3343
+ $inj->setval($cval, 2);
3344
+
3345
+ $inj->path = self::slice($inj->path, -1);
3346
+
3347
+ $count = $counted ? self::_getprop($parent, 1) : self::undef();
3348
+ $tvals = self::slice($parent, $counted ? 2 : 1);
3349
+ $tvArr = ($tvals instanceof ListRef) ? $tvals->list : (is_array($tvals) ? $tvals : []);
3350
+ $numtvals = count($tvArr);
3351
+ $field = 'The ' . $name . ' validator at field ' . self::pathify($inj->path, 1);
3352
+
3353
+ if (0 === $numtvals) {
3354
+ $inj->errs[] = $field . ($counted ? ' must have a count and' : ' must have') . ' at least one argument.';
3355
+ return self::SKIP;
3356
+ }
3357
+
3358
+ [$lo, $hi, $countdesc] = $counted ? self::_nofcount($count, $numtvals) : [$numtvals, $numtvals, 'all'];
3359
+
3360
+ if (self::undef() === $countdesc) {
3361
+ $inj->errs[] = $field . ' has an invalid count: ' . self::stringify($count) . '.';
3362
+ return self::SKIP;
3363
+ }
3364
+
3365
+ $admitted = 0;
3366
+ for ($tI = 0; $tI < $numtvals; $tI++) {
3367
+ $left = $numtvals - $tI;
3368
+
3369
+ // Stop once the specs left cannot change the verdict.
3370
+ if ($hi < $admitted || $admitted + $left < $lo || ($lo <= $admitted && $admitted + $left <= $hi)) {
3371
+ break;
3372
+ }
3373
+
3374
+ if (self::_admits($cval, $tvArr[$tI], $inj, $store)) {
3375
+ $admitted++;
3376
+ }
3377
+ }
3378
+
3379
+ if ($admitted < $lo || $hi < $admitted) {
3380
+ $valdesc = implode(', ', array_map(fn($v) => self::stringify($v), $tvArr));
3381
+ $valdesc = preg_replace_callback(
3382
+ self::R_TRANSFORM_NAME,
3383
+ fn(array $m): string => strtolower($m[1]),
3384
+ $valdesc
3385
+ );
3386
+
3387
+ $inj->errs[] = self::_invalidTypeMsg(
3388
+ $inj->path,
3389
+ $countdesc . ' of ' . $valdesc,
3390
+ self::typify($cval),
3391
+ $cval
3392
+ );
3393
+ }
3394
+
3395
+ return self::SKIP;
3396
+ }
3397
+
3398
+ /**
3399
+ * The value's length is within a bound: ['`$LEN`', bound, spec?], where the
3400
+ * bound is as for a $NOF count. A string's length is in code points.
3401
+ */
3402
+ public static function validate_LEN(object $inj, mixed $_val, string $_ref, mixed $store): mixed
3403
+ {
3404
+ return self::_validatebound($inj, $store, '$LEN');
3405
+ }
3406
+
3407
+ /**
3408
+ * The value is a number within a bound: ['`$RANGE`', bound, spec?], where the
3409
+ * bound holds min or gt, max or lt, or one of each.
3410
+ */
3411
+ public static function validate_RANGE(object $inj, mixed $_val, string $_ref, mixed $store): mixed
3412
+ {
3413
+ return self::_validatebound($inj, $store, '$RANGE');
3414
+ }
3415
+
3416
+ public static function validate_LIKE(object $inj, mixed $_val, string $_ref, mixed $store): mixed
3417
+ {
3418
+ return self::_validatebound($inj, $store, '$LIKE');
3419
+ }
3420
+
3421
+ /**
3422
+ * The bounding list directives: a bound or pattern, then at most one spec that also admits.
3423
+ */
3424
+ private static function _validatebound(object $inj, mixed $store, string $name): mixed
3425
+ {
3426
+ $mode = $inj->mode;
3427
+ $parent = $inj->parent;
3428
+ $keyI = $inj->keyI;
3429
+
3430
+ if (self::M_VAL !== $mode) {
3431
+ return self::undef();
3432
+ }
3433
+
3434
+ if (!self::islist($parent) || 0 !== $keyI) {
3435
+ $inj->errs[] = 'The ' . $name . ' validator at field ' .
3436
+ self::pathify($inj->path, 1, 1) .
3437
+ ' must be the first element of an array.';
3438
+ return self::undef();
3439
+ }
3440
+
3441
+ $cval = self::_slotval($inj);
3442
+
3443
+ $inj->keyI = count($inj->keys ?? []);
3444
+
3445
+ // As for the counting directives: SKIP keeps inject off the detached list.
3446
+ $inj->setval($cval, 2);
3447
+
3448
+ $inj->path = self::slice($inj->path, -1);
3449
+
3450
+ $field = 'The ' . $name . ' validator at field ' . self::pathify($inj->path, 1);
3451
+ $nargs = self::size($parent) - 1;
3452
+ $islen = '$LEN' === $name;
3453
+ $islike = '$LIKE' === $name;
3454
+ $argname = $islike ? 'pattern' : 'bound';
3455
+
3456
+ if ($nargs < 1 || 2 < $nargs) {
3457
+ $inj->errs[] = $field . ' must have a ' . $argname . ' and at most one spec.';
3458
+ return self::SKIP;
3459
+ }
3460
+
3461
+ $bound = self::_getprop($parent, 1);
3462
+ $like = $islike ? self::_likere($bound) : self::undef();
3463
+ [$lo, $hi, $desc] = $islen
3464
+ ? self::_lenbound($bound)
3465
+ : [0, 0, $islike ? (self::undef() === $like ? self::undef() : 'like /' . $bound . '/') : self::_rangedesc($bound)];
3466
+
3467
+ if (self::undef() === $desc) {
3468
+ $inj->errs[] = $field . ' has an invalid ' . $argname . ': ' . self::stringify($bound) . '.';
3469
+ return self::SKIP;
3470
+ }
3471
+
3472
+ $ctype = self::typify($cval);
3473
+
3474
+ if (2 === $nargs && !self::_admits($cval, self::_getprop($parent, 2), $inj, $store)) {
3475
+ $specdesc = preg_replace_callback(
3476
+ self::R_TRANSFORM_NAME,
3477
+ fn(array $m): string => strtolower($m[1]),
3478
+ self::stringify(self::_getprop($parent, 2))
3479
+ );
3480
+ $inj->errs[] = self::_invalidTypeMsg($inj->path, $specdesc, $ctype, $cval);
3481
+ return self::SKIP;
3482
+ }
3483
+
3484
+ if (0 === (($islen ? self::T_string | self::T_list | self::T_map : ($islike ? self::T_string : self::T_number)) & $ctype)) {
3485
+ $needtype = $islen ? 'string, list or map' : ($islike ? self::S_string : self::S_number);
3486
+ $inj->errs[] = self::_invalidTypeMsg($inj->path, $needtype, $ctype, $cval);
3487
+ return self::SKIP;
3488
+ }
3489
+
3490
+ $len = $islen ? (is_string($cval) ? self::_codepoints($cval) : self::size($cval)) : 0;
3491
+ $inbound = $islen
3492
+ ? $lo <= $len && (-1 === $hi || $len <= $hi)
3493
+ : ($islike ? self::re_test($like, $cval) : self::_inrange($bound, $cval));
3494
+
3495
+ if (!$inbound) {
3496
+ $needtype = (1 < count($inj->path) ? '' : 'value ') . $desc;
3497
+ $inj->errs[] = self::_invalidTypeMsg($inj->path, $needtype, $ctype, $cval);
3498
+ }
3499
+
3500
+ return self::SKIP;
3501
+ }
3502
+
3503
+ /**
3504
+ * The bounds of a $LEN bound, with -1 for no maximum, and the words for it,
3505
+ * which are absent when the bound is invalid.
3506
+ */
3507
+ private static function _lenbound(mixed $bound): array
3508
+ {
3509
+ [$lo, $hi, $countdesc] = self::_nofcount($bound, -1);
3510
+
3511
+ if (self::undef() === $countdesc) {
3512
+ return [0, 0, self::undef()];
3513
+ }
3514
+
3515
+ $desc = 'of length ' .
3516
+ ($lo === $hi
3517
+ ? $lo
3518
+ : (-1 === $hi
3519
+ ? 'at least ' . $lo
3520
+ : (0 === $lo ? 'at most ' . $hi : $lo . ' to ' . $hi)));
3521
+
3522
+ return [$lo, $hi, $desc];
3523
+ }
3524
+
3525
+ /**
3526
+ * A $LIKE pattern compiled by re_compile, which is PCRE here; absent unless it compiles.
3527
+ */
3528
+ private static function _likere(mixed $pattern): mixed
3529
+ {
3530
+ if (!is_string($pattern)) {
3531
+ return self::undef();
3532
+ }
3533
+ try {
3534
+ return self::re_compile($pattern);
3535
+ } catch (\InvalidArgumentException) {
3536
+ return self::undef();
3537
+ }
3538
+ }
3539
+
3540
+ /**
3541
+ * The words for a $RANGE bound, which are absent when the bound is invalid.
3542
+ */
3543
+ private static function _rangedesc(mixed $bound): mixed
3544
+ {
3545
+ $none = self::undef();
3546
+
3547
+ if (!self::ismap($bound)) {
3548
+ return $none;
3549
+ }
3550
+
3551
+ $min = self::_getprop($bound, 'min');
3552
+ $max = self::_getprop($bound, 'max');
3553
+ $gt = self::_getprop($bound, 'gt');
3554
+ $lt = self::_getprop($bound, 'lt');
3555
+ $lower = $none === $min ? $gt : $min;
3556
+ $upper = $none === $max ? $lt : $max;
3557
+ $isnum = fn(mixed $n): bool => $none === $n || 0 < (self::T_number & self::typify($n));
3558
+
3559
+ $valid = 0 < self::size($bound)
3560
+ && self::size($bound) === count(array_filter([$min, $max, $gt, $lt], fn($n) => $none !== $n))
3561
+ && ($none === $min || $none === $gt)
3562
+ && ($none === $max || $none === $lt)
3563
+ && $isnum($min)
3564
+ && $isnum($max)
3565
+ && $isnum($gt)
3566
+ && $isnum($lt)
3567
+ && ($none === $lower || $none === $upper || $lower <= $upper);
3568
+
3569
+ if (!$valid) {
3570
+ return $none;
3571
+ }
3572
+
3573
+ $parts = [];
3574
+ if ($none !== $min) {
3575
+ $parts[] = 'at least ' . self::stringify($min);
3576
+ } elseif ($none !== $gt) {
3577
+ $parts[] = 'greater than ' . self::stringify($gt);
3578
+ }
3579
+ if ($none !== $max) {
3580
+ $parts[] = 'at most ' . self::stringify($max);
3581
+ } elseif ($none !== $lt) {
3582
+ $parts[] = 'less than ' . self::stringify($lt);
3583
+ }
3584
+
3585
+ return implode(' and ', $parts);
3586
+ }
3587
+
3588
+ /**
3589
+ * A number within a valid $RANGE bound.
3590
+ */
3591
+ private static function _inrange(mixed $bound, mixed $val): bool
3592
+ {
3593
+ $none = self::undef();
3594
+ $min = self::_getprop($bound, 'min');
3595
+ $max = self::_getprop($bound, 'max');
3596
+ $gt = self::_getprop($bound, 'gt');
3597
+ $lt = self::_getprop($bound, 'lt');
3598
+
3599
+ return ($none === $min || $min <= $val)
3600
+ && ($none === $max || $val <= $max)
3601
+ && ($none === $gt || $gt < $val)
3602
+ && ($none === $lt || $val < $lt);
3603
+ }
3604
+
3605
+ /**
3606
+ * A string's length in code points, without mbstring. A string that is not
3607
+ * UTF-8 counts its bytes.
3608
+ */
3609
+ private static function _codepoints(string $s): int
3610
+ {
3611
+ $n = preg_match_all('/./su', $s);
3612
+ return false === $n ? strlen($s) : $n;
3613
+ }
3614
+
2771
3615
  /**
2772
3616
  * This is the "modify" argument to inject. Use this to perform
2773
3617
  * generic validation. Runs *after* any special commands.
@@ -2787,11 +3631,16 @@ class Struct
2787
3631
  return;
2788
3632
  }
2789
3633
 
3634
+ // A null on either side reads as no value, as canonical getprop has it.
3635
+ if (null === $pval) {
3636
+ $pval = self::undef();
3637
+ }
3638
+
2790
3639
  // select needs exact matches
2791
3640
  $exact = self::_getprop($inj->meta, '`$EXACT`', false);
2792
3641
 
2793
3642
  // Current val to verify.
2794
- $cval = self::_getprop($inj->dparent, $key);
3643
+ $cval = self::getprop($inj->dparent, $key, self::undef());
2795
3644
 
2796
3645
  if (self::undef() === $inj || (!$exact && self::undef() === $cval)) {
2797
3646
  return;
@@ -2806,17 +3655,6 @@ class Struct
2806
3655
 
2807
3656
  $ctype = self::typify($cval);
2808
3657
 
2809
- // PHP empty [] is ambiguous (list vs map). When the spec expects a
2810
- // map, treat an empty array/ListRef in the data as an empty map so
2811
- // that validation does not produce a spurious type-mismatch error.
2812
- // Go/Lua don't hit this because they have distinct map/list types.
2813
- if (0 < (self::T_map & $ptype) &&
2814
- (is_array($cval) || $cval instanceof \Voxgig\Struct\ListRef) &&
2815
- 0 === count($cval)) {
2816
- $cval = new \stdClass();
2817
- $ctype = self::typify($cval);
2818
- }
2819
-
2820
3658
  // Type mismatch.
2821
3659
  if ($ptype !== $ctype && self::undef() !== $pval) {
2822
3660
  $inj->errs[] = self::_invalidTypeMsg($inj->path, self::typename($ptype), $ctype, $cval);
@@ -2832,11 +3670,19 @@ class Struct
2832
3670
  $ckeys = self::keysof($cval);
2833
3671
  $pkeys = self::keysof($pval);
2834
3672
 
2835
- // Empty spec object {} means object can be open (any keys).
2836
- if (0 < count($pkeys) && true !== self::_getprop($pval, '`$OPEN`')) {
3673
+ // Only a spec written as {} is open, even if named keys resolved away.
3674
+ if ((0 < count($pkeys) || $inj->named) && true !== self::_getprop($pval, '`$OPEN`')) {
3675
+ // Literal presence: the shape DECLARES $ckey even when its value
3676
+ // is null. Canonical uses `NONE === _lookup`; `haskey` is Group A
3677
+ // (value-based) and would drop records with a null field from an
3678
+ // open ($AND) select. Test key presence, mirroring getprop's
3679
+ // array + object handling (a php map is either).
2837
3680
  $badkeys = [];
2838
3681
  foreach ($ckeys as $ckey) {
2839
- if (!((is_array($pval) && array_key_exists((string) $ckey, $pval)) || (is_object($pval) && property_exists($pval, (string) $ckey)))) {
3682
+ $k = (string) $ckey;
3683
+ $present = (is_array($pval) && array_key_exists($k, $pval))
3684
+ || (is_object($pval) && property_exists($pval, $k));
3685
+ if (!$present) {
2840
3686
  $badkeys[] = $ckey;
2841
3687
  }
2842
3688
  }
@@ -2856,11 +3702,24 @@ class Struct
2856
3702
  } elseif (self::islist($cval)) {
2857
3703
  if (!self::islist($pval)) {
2858
3704
  $inj->errs[] = self::_invalidTypeMsg($inj->path, self::typename($ptype), $ctype, $cval);
3705
+ } elseif (0 < self::size($pval)) {
3706
+ // Closed list, so reject items past the end of the shape.
3707
+ $badkeys = [];
3708
+ for ($i = self::size($pval); $i < self::size($cval); $i++) {
3709
+ $badkeys[] = self::strkey($i);
3710
+ }
3711
+ if (0 < count($badkeys)) {
3712
+ $msg = 'Unexpected keys at field ' . self::pathify($inj->path, 1) . ': ' . implode(', ', $badkeys);
3713
+ $inj->errs[] = $msg;
3714
+ }
3715
+ } else {
3716
+ // Empty spec list [] means list can be open (any items).
3717
+ self::merge([$pval, $cval]);
2859
3718
  }
2860
3719
  } elseif ($exact) {
2861
3720
  if ($cval !== $pval) {
2862
3721
  $pathmsg = 1 < self::size($inj->path) ? 'at field ' . self::pathify($inj->path, 1) . ': ' : '';
2863
- $inj->errs[] = 'Value ' . $pathmsg . $cval . ' should equal ' . $pval . '.';
3722
+ $inj->errs[] = 'Value ' . $pathmsg . self::stringify($cval) . ' should equal ' . self::stringify($pval) . '.';
2864
3723
  }
2865
3724
  } else {
2866
3725
  // Spec value was a default, copy over data
@@ -2901,7 +3760,7 @@ class Struct
2901
3760
  /**
2902
3761
  * Validate a data structure against a shape specification.
2903
3762
  * The shape specification follows the "by example" principle.
2904
- *
3763
+ *
2905
3764
  * @param mixed $data Source data to validate
2906
3765
  * @param mixed $spec Validation specification
2907
3766
  * @param mixed $injdef Optional injection definition with extra validators, etc.
@@ -2909,9 +3768,13 @@ class Struct
2909
3768
  */
2910
3769
  public static function validate(mixed $data, mixed $spec, mixed $injdef = null): mixed
2911
3770
  {
3771
+ $injdef = self::_injdef($injdef);
3772
+
2912
3773
  $extra = is_object($injdef) && property_exists($injdef, 'extra') ? $injdef->extra : null;
2913
3774
 
2914
- $collect = null != $injdef && property_exists($injdef, 'errs');
3775
+ // `property_exists` raises a TypeError on an array, and every other
3776
+ // test here guards with `is_object` first. This one did not.
3777
+ $collect = is_object($injdef) && property_exists($injdef, 'errs');
2915
3778
 
2916
3779
  // PHP arrays are value-copied, so a plain array on $injdef->errs would be
2917
3780
  // detached from $inj->errs deep inside inject. Wrap in ArrayObject so the
@@ -2924,50 +3787,48 @@ class Struct
2924
3787
  $injdef->errs = $errs;
2925
3788
  }
2926
3789
 
2927
- $store = array_merge([
2928
- // Remove the transform commands.
2929
- '$DELETE' => null,
2930
- '$COPY' => null,
2931
- '$KEY' => null,
2932
- '$META' => null,
2933
- '$MERGE' => null,
2934
- '$EACH' => null,
2935
- '$PACK' => null,
2936
-
2937
- '$STRING' => [self::class, 'validate_STRING'],
2938
- '$NUMBER' => [self::class, 'validate_TYPE'],
2939
- '$INTEGER' => [self::class, 'validate_TYPE'],
2940
- '$DECIMAL' => [self::class, 'validate_TYPE'],
2941
- '$BOOLEAN' => [self::class, 'validate_TYPE'],
2942
- '$NULL' => [self::class, 'validate_TYPE'],
2943
- '$NIL' => [self::class, 'validate_TYPE'],
2944
- '$MAP' => [self::class, 'validate_TYPE'],
2945
- '$LIST' => [self::class, 'validate_TYPE'],
2946
- '$FUNCTION' => [self::class, 'validate_TYPE'],
2947
- '$INSTANCE' => [self::class, 'validate_TYPE'],
2948
- '$ANY' => [self::class, 'validate_ANY'],
2949
- '$CHILD' => [self::class, 'validate_CHILD'],
2950
- '$ONE' => [self::class, 'validate_ONE'],
2951
- '$EXACT' => [self::class, 'validate_EXACT'],
2952
-
2953
- // PATCH (optspec port, pending upstream fix): $ERRS LAST, so it wins.
2954
- //
2955
- // This merged `$extra` last, so a caller-supplied store overrode
2956
- // `$ERRS`. validate_ONE builds its trial store from the OUTER store —
2957
- // which carries the outer `$ERRS` — so every alternative it tried
2958
- // recorded its failures into the CALLER's error list. A union whose
2959
- // first alternative did not match therefore reported that alternative's
2960
- // failure even when a later one matched, which made `['`$ONE`', X,
2961
- // '`$NIL`']` (the encoding for an optional value) reject an absent key,
2962
- // and `['`$ONE`', 0, '`$NUMBER`']` reject 0.002.
2963
- //
2964
- // The ts reference merges in the order { sentinels }, extra, { $ERRS },
2965
- // and says so: "NOTE: collecterrs parameter always wins." Same order
2966
- // here now.
2967
- ], (array) ($extra ?? []), [
2968
- // A special top level value to collect errors.
2969
- '$ERRS' => $errs,
2970
- ]);
3790
+ $store = array_merge(
3791
+ [
3792
+ // Remove the transform commands.
3793
+ '$DELETE' => null,
3794
+ '$COPY' => null,
3795
+ '$KEY' => null,
3796
+ '$META' => null,
3797
+ '$MERGE' => null,
3798
+ '$EACH' => null,
3799
+ '$PACK' => null,
3800
+
3801
+ '$STRING' => [self::class, 'validate_STRING'],
3802
+ '$NUMBER' => [self::class, 'validate_TYPE'],
3803
+ '$INTEGER' => [self::class, 'validate_TYPE'],
3804
+ '$DECIMAL' => [self::class, 'validate_TYPE'],
3805
+ '$BOOLEAN' => [self::class, 'validate_TYPE'],
3806
+ '$NULL' => [self::class, 'validate_TYPE'],
3807
+ '$NIL' => [self::class, 'validate_TYPE'],
3808
+ '$MAP' => [self::class, 'validate_TYPE'],
3809
+ '$LIST' => [self::class, 'validate_TYPE'],
3810
+ '$FUNCTION' => [self::class, 'validate_TYPE'],
3811
+ '$INSTANCE' => [self::class, 'validate_TYPE'],
3812
+ '$ANY' => [self::class, 'validate_ANY'],
3813
+ '$CHILD' => [self::class, 'validate_CHILD'],
3814
+ '$EXACT' => [self::class, 'validate_EXACT'],
3815
+ '$NOF' => [self::class, 'validate_NOF'],
3816
+ '$ALL' => [self::class, 'validate_ALL'],
3817
+ '$LEN' => [self::class, 'validate_LEN'],
3818
+ '$RANGE' => [self::class, 'validate_RANGE'],
3819
+ '$LIKE' => [self::class, 'validate_LIKE'],
3820
+ '$REST' => [self::class, 'validate_REST'],
3821
+ ],
3822
+ (array) ($extra ?? []),
3823
+ [
3824
+ // A special top level value to collect errors.
3825
+ // NOTE: the errs parameter always wins, so this merges LAST.
3826
+ // An `extra` copied from an enclosing store carries that store's
3827
+ // own `$ERRS`; merging it after would hand this validation the
3828
+ // caller's error list and leak every trial failure into it.
3829
+ '$ERRS' => $errs,
3830
+ ]
3831
+ );
2971
3832
 
2972
3833
  $meta = is_object($injdef) && property_exists($injdef, 'meta') ? $injdef->meta : null;
2973
3834
 
@@ -2979,7 +3840,14 @@ class Struct
2979
3840
  $transformOpts->meta = $meta;
2980
3841
  }
2981
3842
  $transformOpts->errs = $errs;
2982
- $out = self::transform($data, $spec, $transformOpts);
3843
+
3844
+ // A spec that names an unknown checker validates nothing.
3845
+ $numerrs = count($errs);
3846
+ self::_checknames($spec, $store, [], $errs);
3847
+
3848
+ $out = $numerrs < count($errs)
3849
+ ? self::_stdClassToArray(self::cloneUnwrap($data))
3850
+ : self::transform($data, $spec, $transformOpts);
2983
3851
 
2984
3852
  // Unwrap shared ArrayObject back to a plain array on the caller's injdef
2985
3853
  // so count()/foreach work as callers (including select) expect.
@@ -3011,12 +3879,12 @@ class Struct
3011
3879
  }
3012
3880
 
3013
3881
  if (self::ismap($children)) {
3014
- $children = array_map(function($n) {
3882
+ $children = array_map(function ($n) {
3015
3883
  self::setprop($n[1], self::S_DKEY, $n[0]);
3016
3884
  return $n[1];
3017
3885
  }, self::items($children));
3018
3886
  } else {
3019
- $children = array_map(function($n, $i) {
3887
+ $children = array_map(function ($n, $i) {
3020
3888
  if (self::ismap($n)) {
3021
3889
  self::setprop($n, self::S_DKEY, $i);
3022
3890
  }
@@ -3041,7 +3909,7 @@ class Struct
3041
3909
  ];
3042
3910
 
3043
3911
  $q = self::clone($query);
3044
- $q = self::_select_add_open($q);
3912
+ $q = self::_openquery($q);
3045
3913
 
3046
3914
  foreach ($children as $child) {
3047
3915
  $injdef->errs = [];
@@ -3055,32 +3923,33 @@ class Struct
3055
3923
  return $results;
3056
3924
  }
3057
3925
 
3058
- // Recursively add `$OPEN` to all maps in a query for select.
3059
- // PHP arrays are value types, so walk can't modify in-place.
3060
- private static function _select_add_open(mixed $val): mixed
3926
+ // Open every map in a select query, so a child may hold keys the query does
3927
+ // not name, but leave a directive's literals as written: what $EXACT
3928
+ // compares, and the count or bound of $NOF, $LEN and $RANGE.
3929
+ // PHP arrays are value types, so the opened query is returned.
3930
+ private static function _openquery(mixed $q): mixed
3061
3931
  {
3062
- if (self::ismap($val)) {
3063
- if (is_array($val)) {
3064
- if (!array_key_exists('`$OPEN`', $val)) {
3065
- $val['`$OPEN`'] = true;
3066
- }
3067
- foreach ($val as $k => $v) {
3068
- $val[$k] = self::_select_add_open($v);
3069
- }
3070
- } elseif ($val instanceof \stdClass) {
3071
- if (!property_exists($val, '`$OPEN`')) {
3072
- $val->{'`$OPEN`'} = true;
3073
- }
3074
- foreach (get_object_vars($val) as $k => $v) {
3075
- $val->$k = self::_select_add_open($v);
3076
- }
3932
+ if (is_array($q) && self::ismap($q)) {
3933
+ $q['`$OPEN`'] = self::getprop($q, '`$OPEN`', true);
3934
+ foreach ($q as $key => $val) {
3935
+ $q[$key] = self::_openquery($val);
3077
3936
  }
3078
- } elseif (self::islist($val) && is_array($val)) {
3079
- foreach ($val as $i => $v) {
3080
- $val[$i] = self::_select_add_open($v);
3937
+ } elseif ($q instanceof \stdClass) {
3938
+ $q->{'`$OPEN`'} = self::getprop($q, '`$OPEN`', true);
3939
+ foreach (get_object_vars($q) as $key => $val) {
3940
+ $q->$key = self::_openquery($val);
3941
+ }
3942
+ } elseif (self::islist($q)) {
3943
+ $head = $q[0] ?? null;
3944
+ $exact = '`$EXACT`' === $head;
3945
+ $bounded = '`$NOF`' === $head || '`$LEN`' === $head || '`$RANGE`' === $head;
3946
+ foreach ($q as $i => $val) {
3947
+ if (0 === $i || !($exact || ($bounded && 1 === $i))) {
3948
+ $q[$i] = self::_openquery($val);
3949
+ }
3081
3950
  }
3082
3951
  }
3083
- return $val;
3952
+ return $q;
3084
3953
  }
3085
3954
 
3086
3955
  /**
@@ -3098,14 +3967,14 @@ class Struct
3098
3967
  $vstore->{'$TOP'} = $point;
3099
3968
 
3100
3969
  foreach ($terms as $term) {
3101
- $terrs = [];
3102
- self::validate($point, $term, (object) [
3970
+ $tinj = (object) [
3103
3971
  'extra' => $vstore,
3104
- 'errs' => $terrs,
3972
+ 'errs' => [],
3105
3973
  'meta' => $state->meta,
3106
- ]);
3974
+ ];
3975
+ self::validate($point, $term, $tinj);
3107
3976
 
3108
- if (count($terrs) !== 0) {
3977
+ if (count($tinj->errs) !== 0) {
3109
3978
  $state->errs[] = 'AND:' . self::pathify($ppath) . ': ' . self::stringify($point) . ' fail:' . self::stringify($terms);
3110
3979
  }
3111
3980
  }
@@ -3114,7 +3983,7 @@ class Struct
3114
3983
  $gp = self::getelem($state->nodes, -2);
3115
3984
  self::setprop($gp, $gkey, $point);
3116
3985
  }
3117
- return null;
3986
+ return self::undef();
3118
3987
  }
3119
3988
 
3120
3989
  /**
@@ -3132,25 +4001,25 @@ class Struct
3132
4001
  $vstore->{'$TOP'} = $point;
3133
4002
 
3134
4003
  foreach ($terms as $term) {
3135
- $terrs = [];
3136
- self::validate($point, $term, (object) [
4004
+ $tinj = (object) [
3137
4005
  'extra' => $vstore,
3138
- 'errs' => $terrs,
4006
+ 'errs' => [],
3139
4007
  'meta' => $state->meta,
3140
- ]);
4008
+ ];
4009
+ self::validate($point, $term, $tinj);
3141
4010
 
3142
- if (count($terrs) === 0) {
4011
+ if (count($tinj->errs) === 0) {
3143
4012
  $gkey = self::getelem($state->path, -2);
3144
4013
  $gp = self::getelem($state->nodes, -2);
3145
4014
  self::setprop($gp, $gkey, $point);
3146
4015
 
3147
- return null;
4016
+ return self::undef();
3148
4017
  }
3149
4018
  }
3150
4019
 
3151
4020
  $state->errs[] = 'OR:' . self::pathify($ppath) . ': ' . self::stringify($point) . ' fail:' . self::stringify($terms);
3152
4021
  }
3153
- return null;
4022
+ return self::undef();
3154
4023
  }
3155
4024
 
3156
4025
  /**
@@ -3167,14 +4036,14 @@ class Struct
3167
4036
  $vstore = self::merge([(object) [], $store], 1);
3168
4037
  $vstore->{'$TOP'} = $point;
3169
4038
 
3170
- $terrs = [];
3171
- self::validate($point, $term, (object) [
4039
+ $tinj = (object) [
3172
4040
  'extra' => $vstore,
3173
- 'errs' => $terrs,
4041
+ 'errs' => [],
3174
4042
  'meta' => $state->meta,
3175
- ]);
4043
+ ];
4044
+ self::validate($point, $term, $tinj);
3176
4045
 
3177
- if (count($terrs) === 0) {
4046
+ if (count($tinj->errs) === 0) {
3178
4047
  $state->errs[] = 'NOT:' . self::pathify($ppath) . ': ' . self::stringify($point) . ' fail:' . self::stringify($term);
3179
4048
  }
3180
4049
 
@@ -3182,7 +4051,7 @@ class Struct
3182
4051
  $gp = self::getelem($state->nodes, -2);
3183
4052
  self::setprop($gp, $gkey, $point);
3184
4053
  }
3185
- return null;
4054
+ return self::undef();
3186
4055
  }
3187
4056
 
3188
4057
  /**
@@ -3190,6 +4059,11 @@ class Struct
3190
4059
  */
3191
4060
  private static function select_CMP(object $state, mixed $_val, mixed $ref, mixed $store): mixed
3192
4061
  {
4062
+ // The list form of $LIKE is validate's checker; the key form is this operator.
4063
+ if (self::M_VAL === $state->mode && '$LIKE' === $ref) {
4064
+ return self::validate_LIKE($state, $_val, $ref, $store);
4065
+ }
4066
+
3193
4067
  if (self::M_KEYPRE === $state->mode) {
3194
4068
  $term = self::_getprop($state->parent, $state->key);
3195
4069
  $gkey = self::getelem($state->path, -2);
@@ -3201,17 +4075,13 @@ class Struct
3201
4075
 
3202
4076
  if ('$GT' === $ref && $point > $term) {
3203
4077
  $pass = true;
3204
- }
3205
- elseif ('$LT' === $ref && $point < $term) {
4078
+ } elseif ('$LT' === $ref && $point < $term) {
3206
4079
  $pass = true;
3207
- }
3208
- elseif ('$GTE' === $ref && $point >= $term) {
4080
+ } elseif ('$GTE' === $ref && $point >= $term) {
3209
4081
  $pass = true;
3210
- }
3211
- elseif ('$LTE' === $ref && $point <= $term) {
4082
+ } elseif ('$LTE' === $ref && $point <= $term) {
3212
4083
  $pass = true;
3213
- }
3214
- elseif ('$LIKE' === $ref && preg_match('/' . $term . '/', self::stringify($point))) {
4084
+ } elseif ('$LIKE' === $ref && preg_match('/' . $term . '/', self::stringify($point))) {
3215
4085
  $pass = true;
3216
4086
  }
3217
4087
 
@@ -3219,13 +4089,12 @@ class Struct
3219
4089
  // Update spec to match found value so that _validate does not complain
3220
4090
  $gp = self::getelem($state->nodes, -2);
3221
4091
  self::setprop($gp, $gkey, $point);
3222
- }
3223
- else {
4092
+ } else {
3224
4093
  $state->errs[] = 'CMP: ' . self::pathify($ppath) . ': ' . self::stringify($point) .
3225
4094
  ' fail:' . $ref . ' ' . self::stringify($term);
3226
4095
  }
3227
4096
  }
3228
- return null;
4097
+ return self::undef();
3229
4098
  }
3230
4099
 
3231
4100
  /**
@@ -3245,26 +4114,18 @@ class Struct
3245
4114
  if (self::islist($val)) {
3246
4115
  $listArr = ($val instanceof ListRef) ? $val->list : $val;
3247
4116
  $listLen = count($listArr);
3248
- if (is_string($key)) {
3249
- if (!preg_match('/^[-0-9]+$/', $key)) {
3250
- $out = self::undef();
3251
- } else {
3252
- $nkey = (int) $key;
3253
- if ($nkey < 0) {
3254
- $nkey = $listLen + $nkey;
3255
- }
3256
- $out = ($nkey >= 0 && $nkey < $listLen) ? $listArr[$nkey] : self::undef();
3257
- }
3258
- } elseif (is_int($key)) {
3259
- $nkey = $key;
3260
- if ($nkey < 0) {
3261
- $nkey = $listLen + $nkey;
3262
- }
3263
- $out = ($nkey >= 0 && $nkey < $listLen) ? $listArr[$nkey] : self::undef();
4117
+ $nkey = self::_listkey($key);
4118
+ if (null !== $nkey && 0 > $nkey) {
4119
+ $nkey += $listLen;
4120
+ }
4121
+ if (null !== $nkey && 0 <= $nkey && $nkey < $listLen) {
4122
+ $out = $listArr[$nkey];
3264
4123
  }
3265
4124
  }
3266
4125
 
3267
- if ($out === self::undef()) {
4126
+ // Group A null rule (canonical TS: `if (null == out) return ... alt`):
4127
+ // a null (or absent/undef) slot value counts as "no value".
4128
+ if ($out === self::undef() || $out === null) {
3268
4129
  if ($altIsDefault) {
3269
4130
  return null;
3270
4131
  }
@@ -3287,12 +4148,13 @@ class Struct
3287
4148
  return $parent;
3288
4149
  }
3289
4150
 
4151
+ if (self::iscondensed($parent)) {
4152
+ throw new \Exception(self::S_CONDENSE_IMMUTABLE);
4153
+ }
4154
+
3290
4155
  if ($parent instanceof ListRef) {
3291
- $keyI = (int)$key;
3292
- if (!is_numeric($key)) {
3293
- return $parent;
3294
- }
3295
- if ($keyI >= 0 && $keyI < count($parent->list)) {
4156
+ $keyI = self::_listindex($key, count($parent->list));
4157
+ if (0 <= $keyI) {
3296
4158
  array_splice($parent->list, $keyI, 1);
3297
4159
  }
3298
4160
  return $parent;
@@ -3300,17 +4162,20 @@ class Struct
3300
4162
 
3301
4163
  if (self::ismap($parent)) {
3302
4164
  $key = self::strkey($key);
3303
- unset($parent->$key);
3304
- }
3305
- elseif (self::islist($parent)) {
3306
- // Ensure key is an integer
3307
- $keyI = (int)$key;
3308
- if (!is_numeric($key) || (string)$keyI !== (string)$key) {
3309
- return $parent;
4165
+ // A map is a stdClass OR an associative array here - `ismap`
4166
+ // accepts both - so the object spelling alone silently did
4167
+ // nothing for the array case, and `delprop` returned its
4168
+ // argument untouched.
4169
+ if (is_array($parent)) {
4170
+ unset($parent[$key]);
4171
+ } else {
4172
+ unset($parent->$key);
3310
4173
  }
4174
+ } elseif (self::islist($parent)) {
4175
+ $keyI = self::_listindex($key, count($parent));
3311
4176
 
3312
4177
  // Delete list element at position keyI, shifting later elements down
3313
- if ($keyI >= 0 && $keyI < count($parent)) {
4178
+ if (0 <= $keyI) {
3314
4179
  for ($pI = $keyI; $pI < count($parent) - 1; $pI++) {
3315
4180
  $parent[$pI] = $parent[$pI + 1];
3316
4181
  }
@@ -3328,6 +4193,10 @@ class Struct
3328
4193
  mixed $val,
3329
4194
  mixed $injdef = null
3330
4195
  ): mixed {
4196
+ if (self::iscondensed($store)) {
4197
+ throw new \Exception(self::S_CONDENSE_IMMUTABLE);
4198
+ }
4199
+
3331
4200
  $pathType = self::typify($path);
3332
4201
 
3333
4202
  $parts = (0 < (self::T_list & $pathType)) ? $path :
@@ -3340,7 +4209,12 @@ class Struct
3340
4209
 
3341
4210
  $base = self::_getprop($injdef, self::S_BASE);
3342
4211
  $numparts = self::size($parts);
3343
- $parent = self::_getprop($store, $base, $store);
4212
+
4213
+ // Descend by reference, so a write under a plain array lands in the store.
4214
+ $parent = &$store;
4215
+ if (null !== self::getprop($store, $base)) {
4216
+ $parent = &self::_childslot($store, $base, null);
4217
+ }
3344
4218
 
3345
4219
  for ($pI = 0; $pI < $numparts - 1; $pI++) {
3346
4220
  $partKey = self::getelem($parts, $pI);
@@ -3350,7 +4224,7 @@ class Struct
3350
4224
  ? [] : new \stdClass();
3351
4225
  self::setprop($parent, $partKey, $nextParent);
3352
4226
  }
3353
- $parent = $nextParent;
4227
+ $parent = &self::_childslot($parent, $partKey, $nextParent);
3354
4228
  }
3355
4229
 
3356
4230
  if ($val === self::DELETE) {
@@ -3363,6 +4237,468 @@ class Struct
3363
4237
  }
3364
4238
 
3365
4239
 
4240
+ /**
4241
+ * A reference to the slot setprop($parent, $key, ...) writes, or to
4242
+ * $fallback when $parent holds no such slot.
4243
+ */
4244
+ private static function &_childslot(mixed &$parent, mixed $key, mixed $fallback): mixed
4245
+ {
4246
+ if ($parent instanceof ListRef) {
4247
+ $last = count($parent->list) - 1;
4248
+ if (0 <= $last && is_numeric($key)) {
4249
+ return $parent->list[max(0, min((int) floor((float) $key), $last))];
4250
+ }
4251
+ } elseif (is_object($parent)) {
4252
+ $prop = self::strkey($key);
4253
+ if (property_exists($parent, $prop)) {
4254
+ return $parent->$prop;
4255
+ }
4256
+ } elseif (is_array($parent)) {
4257
+ if (self::islist($parent)) {
4258
+ $last = count($parent) - 1;
4259
+ if (0 <= $last && is_numeric($key)) {
4260
+ return $parent[max(0, min((int) floor((float) $key), $last))];
4261
+ }
4262
+ } else {
4263
+ $prop = self::strkey($key);
4264
+ if (array_key_exists($prop, $parent)) {
4265
+ return $parent[$prop];
4266
+ }
4267
+ }
4268
+ }
4269
+ return $fallback;
4270
+ }
4271
+
4272
+
4273
+ /* =======================
4274
+ * Condense
4275
+ * =======================
4276
+ */
4277
+
4278
+ private const CONDENSE_VERSION = 1;
4279
+
4280
+ private const CONDENSE_MAP = 0;
4281
+ private const CONDENSE_LIST = 1;
4282
+ private const CONDENSE_STR = 2;
4283
+ private const CONDENSE_NUM = 3;
4284
+ private const CONDENSE_TRUE = 4;
4285
+ private const CONDENSE_FALSE = 5;
4286
+ private const CONDENSE_NULL = 6;
4287
+
4288
+ private const S_condense = '$condense';
4289
+ private const S_condsym = 'sym';
4290
+ private const S_condnode = 'node';
4291
+ private const S_condroot = 'root';
4292
+
4293
+ private const S_CONDENSE_IMMUTABLE =
4294
+ 'struct: condensed structures are immutable - expand() first, then modify the copy';
4295
+
4296
+ public static function iscondensed(mixed $val = null): bool
4297
+ {
4298
+ // The version must MATCH, not merely be numeric: a future profile would
4299
+ // otherwise be decoded under this one's schema.
4300
+ $version = self::_getprop($val, self::S_condense);
4301
+ if (!(is_int($version) || is_float($version)) || self::CONDENSE_VERSION != $version) {
4302
+ return false;
4303
+ }
4304
+ $root = self::_getprop($val, self::S_condroot);
4305
+ return self::ismap($val)
4306
+ && self::islist(self::_getprop($val, self::S_condsym))
4307
+ && self::islist(self::_getprop($val, self::S_condnode))
4308
+ && (is_int($root) || is_float($root));
4309
+ }
4310
+
4311
+ /**
4312
+ * Condense any JSON-shaped node. Pure: the same input always produces a
4313
+ * byte-identical result, on every port.
4314
+ */
4315
+ public static function condense(mixed $val = null): object
4316
+ {
4317
+ $symset = [];
4318
+
4319
+ $collect = function (mixed $n) use (&$collect, &$symset): void {
4320
+ if (self::ismap($n)) {
4321
+ foreach (self::keysof($n) as $k) {
4322
+ $symset[$k] = true;
4323
+ $collect(self::_getprop($n, $k));
4324
+ }
4325
+ } elseif (self::islist($n)) {
4326
+ foreach ($n as $item) {
4327
+ $collect($item);
4328
+ }
4329
+ } elseif (is_string($n)) {
4330
+ $symset[$n] = true;
4331
+ }
4332
+ };
4333
+ $collect($val);
4334
+
4335
+ // Array keys turn integer-like strings into integers; strval undoes it.
4336
+ $sym = array_map('strval', array_keys($symset));
4337
+ sort($sym, SORT_STRING);
4338
+ $symid = array_flip($sym);
4339
+
4340
+ $node = [];
4341
+ $seen = [];
4342
+
4343
+ $intern = function (array $enc) use (&$node, &$seen): int {
4344
+ $enckey = self::CONDENSE_NUM === $enc[0]
4345
+ ? self::CONDENSE_NUM . ',' . self::_condenseNumKey($enc[1])
4346
+ : implode(',', $enc);
4347
+ if (isset($seen[$enckey])) {
4348
+ return $seen[$enckey];
4349
+ }
4350
+ $idx = count($node);
4351
+ $node[] = $enc;
4352
+ $seen[$enckey] = $idx;
4353
+ return $idx;
4354
+ };
4355
+
4356
+ // Post-order, so identical subtrees are interned before a parent refers to them.
4357
+ $build = function (mixed $n) use (&$build, $intern, $symid): int {
4358
+ if (self::ismap($n)) {
4359
+ $enc = [self::CONDENSE_MAP];
4360
+ // keysof sorts bytewise, which is code-point order, so the key ids ascend for bisection.
4361
+ foreach (self::keysof($n) as $k) {
4362
+ $enc[] = $symid[$k];
4363
+ $enc[] = $build(self::_getprop($n, $k));
4364
+ }
4365
+ return $intern($enc);
4366
+ }
4367
+ if (self::islist($n)) {
4368
+ $enc = [self::CONDENSE_LIST];
4369
+ foreach ($n as $item) {
4370
+ $enc[] = $build($item);
4371
+ }
4372
+ return $intern($enc);
4373
+ }
4374
+ if (is_string($n)) {
4375
+ return $intern([self::CONDENSE_STR, $symid[$n]]);
4376
+ }
4377
+ if (is_int($n) || is_float($n)) {
4378
+ return $intern([self::CONDENSE_NUM, $n]);
4379
+ }
4380
+ if (true === $n) {
4381
+ return $intern([self::CONDENSE_TRUE]);
4382
+ }
4383
+ if (false === $n) {
4384
+ return $intern([self::CONDENSE_FALSE]);
4385
+ }
4386
+ return $intern([self::CONDENSE_NULL]);
4387
+ };
4388
+
4389
+ $root = $build($val);
4390
+
4391
+ $out = new \stdClass();
4392
+ $out->{self::S_condense} = self::CONDENSE_VERSION;
4393
+ $out->{self::S_condsym} = $sym;
4394
+ $out->{self::S_condnode} = $node;
4395
+ $out->{self::S_condroot} = $root;
4396
+ return $out;
4397
+ }
4398
+
4399
+ /**
4400
+ * Fully materialise a condensed structure. A value that is not condensed
4401
+ * comes back unchanged.
4402
+ */
4403
+ public static function expand(mixed $cond = null): mixed
4404
+ {
4405
+ if (!self::iscondensed($cond)) {
4406
+ return $cond;
4407
+ }
4408
+ return self::_condenseMaterialise($cond, self::_getprop($cond, self::S_condroot));
4409
+ }
4410
+
4411
+ /**
4412
+ * A cursor into a condensed structure. Its reads touch only the nodes on
4413
+ * the path; a memo passed in is shared with every view it reaches.
4414
+ */
4415
+ public static function condenseview(mixed $cond = null, mixed $idx = null, mixed $memo = null): CondenseView
4416
+ {
4417
+ $start = (null === $idx || self::undef() === $idx)
4418
+ ? (self::iscondensed($cond) ? self::_getprop($cond, self::S_condroot) : -1)
4419
+ : $idx;
4420
+ return new CondenseView($cond, $start, $memo instanceof \ArrayObject ? $memo : new \ArrayObject());
4421
+ }
4422
+
4423
+ /**
4424
+ * One key per number value, as joining a JS number gives: 1 and 1.0 share
4425
+ * a node, and -0 is 0.
4426
+ */
4427
+ private static function _condenseNumKey(int|float $n): string
4428
+ {
4429
+ $f = (float) $n;
4430
+ return 0.0 == $f ? '0' : sprintf('%.17g', $f);
4431
+ }
4432
+
4433
+ /** A path part as JavaScript's String() spells it. */
4434
+ private static function _condenseStr(mixed $v): string
4435
+ {
4436
+ if (is_string($v)) {
4437
+ return $v;
4438
+ }
4439
+ if (is_int($v)) {
4440
+ return (string) $v;
4441
+ }
4442
+ if (is_float($v)) {
4443
+ if (is_finite($v) && floor($v) == $v && abs($v) < 1e21) {
4444
+ return 0.0 == $v ? '0' : sprintf('%.0f', $v);
4445
+ }
4446
+ return (string) json_encode($v);
4447
+ }
4448
+ if (is_bool($v)) {
4449
+ return $v ? 'true' : 'false';
4450
+ }
4451
+ if (null === $v) {
4452
+ return 'null';
4453
+ }
4454
+ return self::stringify($v);
4455
+ }
4456
+
4457
+ /** @return array<mixed> */
4458
+ private static function _condenseList(mixed $v): array
4459
+ {
4460
+ return $v instanceof ListRef ? $v->list : (is_array($v) ? $v : []);
4461
+ }
4462
+
4463
+ /**
4464
+ * The encoding of node $idx, or null when there is none.
4465
+ *
4466
+ * @internal
4467
+ * @return array<mixed>|null
4468
+ */
4469
+ public static function _condenseEnc(mixed $cond, mixed $idx): ?array
4470
+ {
4471
+ $node = self::_condenseList(self::_getprop($cond, self::S_condnode));
4472
+ if (is_float($idx) && floor($idx) == $idx) {
4473
+ $idx = (int) $idx;
4474
+ }
4475
+ if (!is_int($idx) || 0 > $idx || $idx >= count($node)) {
4476
+ return null;
4477
+ }
4478
+ $enc = $node[$idx];
4479
+ return self::islist($enc) ? self::_condenseList($enc) : null;
4480
+ }
4481
+
4482
+ /** The kind leading an encoding, or -1. */
4483
+ private static function _condenseKind(array $enc): int
4484
+ {
4485
+ $kind = $enc[0] ?? null;
4486
+ return (is_int($kind) || (is_float($kind) && floor($kind) == $kind)) ? (int) $kind : -1;
4487
+ }
4488
+
4489
+ /** Symbol $id, or absent when the table has none. */
4490
+ private static function _condenseSym(array $sym, mixed $id): mixed
4491
+ {
4492
+ if (is_float($id) && floor($id) == $id) {
4493
+ $id = (int) $id;
4494
+ }
4495
+ return (is_int($id) && array_key_exists($id, $sym)) ? $sym[$id] : self::undef();
4496
+ }
4497
+
4498
+ /**
4499
+ * The id of a symbol by bisecting the sorted symbol table, or -1 when the
4500
+ * string does not occur anywhere in the structure.
4501
+ */
4502
+ private static function _condenseSymId(mixed $cond, string $key): int
4503
+ {
4504
+ $sym = self::_condenseList(self::_getprop($cond, self::S_condsym));
4505
+ $lo = 0;
4506
+ $hi = count($sym) - 1;
4507
+ while ($lo <= $hi) {
4508
+ $mid = ($lo + $hi) >> 1;
4509
+ $cmp = strcmp(self::_condenseStr($sym[$mid]), $key);
4510
+ if (0 === $cmp) {
4511
+ return $mid;
4512
+ }
4513
+ if (0 > $cmp) {
4514
+ $lo = $mid + 1;
4515
+ } else {
4516
+ $hi = $mid - 1;
4517
+ }
4518
+ }
4519
+ return -1;
4520
+ }
4521
+
4522
+ /** The node index of $key inside node $idx, or -1. Touches only this node. */
4523
+ private static function _condenseChild(mixed $cond, mixed $idx, mixed $key): mixed
4524
+ {
4525
+ $enc = self::_condenseEnc($cond, $idx);
4526
+ if (null === $enc || !(is_string($key) || is_int($key) || is_float($key))) {
4527
+ return -1;
4528
+ }
4529
+
4530
+ $kind = self::_condenseKind($enc);
4531
+ $k = self::_condenseStr($key);
4532
+
4533
+ if (self::CONDENSE_MAP === $kind) {
4534
+ $symid = self::_condenseSymId($cond, $k);
4535
+ if (0 > $symid) {
4536
+ return -1;
4537
+ }
4538
+ // Pairs live at [1,2], [3,4], ... with keys ascending: bisect the pairs.
4539
+ $lo = 0;
4540
+ $hi = intdiv(count($enc) - 1, 2) - 1;
4541
+ while ($lo <= $hi) {
4542
+ $mid = ($lo + $hi) >> 1;
4543
+ $pk = $enc[1 + $mid * 2] ?? -1;
4544
+ if ($pk == $symid) {
4545
+ return $enc[2 + $mid * 2] ?? -1;
4546
+ }
4547
+ if ($pk < $symid) {
4548
+ $lo = $mid + 1;
4549
+ } else {
4550
+ $hi = $mid - 1;
4551
+ }
4552
+ }
4553
+ return -1;
4554
+ }
4555
+
4556
+ if (self::CONDENSE_LIST === $kind) {
4557
+ $i = self::_listindex($k, count($enc) - 1);
4558
+ return 0 > $i ? -1 : $enc[1 + $i];
4559
+ }
4560
+
4561
+ return -1;
4562
+ }
4563
+
4564
+ /**
4565
+ * Walk a path from node $idx, returning the node index or -1.
4566
+ *
4567
+ * @internal
4568
+ */
4569
+ public static function _condenseResolve(mixed $cond, mixed $idx, mixed $path): mixed
4570
+ {
4571
+ if (self::islist($path)) {
4572
+ $parts = self::_condenseList($path);
4573
+ } elseif (is_string($path)) {
4574
+ $parts = self::S_MT === $path ? [] : explode(self::S_DT, $path);
4575
+ } elseif (null === $path || self::undef() === $path) {
4576
+ $parts = [];
4577
+ } else {
4578
+ $parts = [self::_condenseStr($path)];
4579
+ }
4580
+
4581
+ $at = $idx;
4582
+ foreach ($parts as $part) {
4583
+ if (0 > $at) {
4584
+ return -1;
4585
+ }
4586
+ if (self::S_MT === $part) {
4587
+ continue;
4588
+ }
4589
+ $at = self::_condenseChild($cond, $at, $part);
4590
+ }
4591
+ return $at;
4592
+ }
4593
+
4594
+ /**
4595
+ * Node $idx as a fresh, independent tree; absent when there is no such node.
4596
+ *
4597
+ * @internal
4598
+ */
4599
+ public static function _condenseMaterialise(mixed $cond, mixed $idx): mixed
4600
+ {
4601
+ if (!(is_int($idx) || is_float($idx)) || 0 > $idx) {
4602
+ return self::undef();
4603
+ }
4604
+
4605
+ $sym = self::_condenseList(self::_getprop($cond, self::S_condsym));
4606
+
4607
+ $rebuild = function (mixed $i) use (&$rebuild, $cond, $sym): mixed {
4608
+ $enc = self::_condenseEnc($cond, $i);
4609
+ if (null === $enc) {
4610
+ return self::undef();
4611
+ }
4612
+ $kind = self::_condenseKind($enc);
4613
+ if (self::CONDENSE_MAP === $kind) {
4614
+ $out = new \stdClass();
4615
+ for ($j = 1; $j + 1 < count($enc); $j += 2) {
4616
+ $key = self::_condenseSym($sym, $enc[$j]);
4617
+ $child = $rebuild($enc[$j + 1]);
4618
+ if (self::undef() !== $key && self::undef() !== $child) {
4619
+ $out->{self::_condenseStr($key)} = $child;
4620
+ }
4621
+ }
4622
+ return $out;
4623
+ }
4624
+ if (self::CONDENSE_LIST === $kind) {
4625
+ $out = [];
4626
+ for ($j = 1; $j < count($enc); $j++) {
4627
+ $child = $rebuild($enc[$j]);
4628
+ $out[] = self::undef() === $child ? null : $child;
4629
+ }
4630
+ return $out;
4631
+ }
4632
+ if (self::CONDENSE_STR === $kind) {
4633
+ return self::_condenseSym($sym, $enc[1] ?? null);
4634
+ }
4635
+ if (self::CONDENSE_NUM === $kind) {
4636
+ return $enc[1] ?? null;
4637
+ }
4638
+ if (self::CONDENSE_TRUE === $kind) {
4639
+ return true;
4640
+ }
4641
+ if (self::CONDENSE_FALSE === $kind) {
4642
+ return false;
4643
+ }
4644
+ return null;
4645
+ };
4646
+
4647
+ return $rebuild($idx);
4648
+ }
4649
+
4650
+ /**
4651
+ * The keys of node $idx, without materialising any of its values.
4652
+ *
4653
+ * @internal
4654
+ * @return array<string>
4655
+ */
4656
+ public static function _condenseKeys(mixed $cond, mixed $idx): array
4657
+ {
4658
+ $enc = self::_condenseEnc($cond, $idx);
4659
+ if (null === $enc) {
4660
+ return [];
4661
+ }
4662
+ $out = [];
4663
+ $kind = self::_condenseKind($enc);
4664
+ if (self::CONDENSE_MAP === $kind) {
4665
+ $sym = self::_condenseList(self::_getprop($cond, self::S_condsym));
4666
+ for ($j = 1; $j < count($enc); $j += 2) {
4667
+ $key = self::_condenseSym($sym, $enc[$j]);
4668
+ if (self::undef() !== $key) {
4669
+ $out[] = self::_condenseStr($key);
4670
+ }
4671
+ }
4672
+ } elseif (self::CONDENSE_LIST === $kind) {
4673
+ for ($j = 1; $j < count($enc); $j++) {
4674
+ $out[] = (string) ($j - 1);
4675
+ }
4676
+ }
4677
+ return $out;
4678
+ }
4679
+
4680
+ /**
4681
+ * Map pair count, list length, else 0.
4682
+ *
4683
+ * @internal
4684
+ */
4685
+ public static function _condenseSize(mixed $cond, mixed $idx): int
4686
+ {
4687
+ $enc = self::_condenseEnc($cond, $idx);
4688
+ if (null === $enc) {
4689
+ return 0;
4690
+ }
4691
+ $kind = self::_condenseKind($enc);
4692
+ if (self::CONDENSE_MAP === $kind) {
4693
+ return intdiv(count($enc) - 1, 2);
4694
+ }
4695
+ if (self::CONDENSE_LIST === $kind) {
4696
+ return count($enc) - 1;
4697
+ }
4698
+ return 0;
4699
+ }
4700
+
4701
+
3366
4702
  public static function checkPlacement(
3367
4703
  int $modes,
3368
4704
  string $ijname,
@@ -3372,9 +4708,9 @@ class Struct
3372
4708
  if (0 === ($modes & $inj->mode)) {
3373
4709
  $modeItems = array_filter(
3374
4710
  [self::M_KEYPRE, self::M_KEYPOST, self::M_VAL],
3375
- fn($m) => $modes & $m
4711
+ fn($m) => 0 !== ($modes & $m)
3376
4712
  );
3377
- $placementNames = array_map(fn($m) => self::PLACEMENT[$m] ?? '', $modeItems);
4713
+ $placementNames = array_map(fn($m) => self::PLACEMENT[$m], $modeItems);
3378
4714
  $inj->errs[] = '$' . $ijname . ': invalid placement as ' . (self::PLACEMENT[$inj->mode] ?? '') .
3379
4715
  ', expected: ' . implode(',', $placementNames) . '.';
3380
4716
  return false;
@@ -3421,8 +4757,7 @@ class Struct
3421
4757
  $cinj = $inj->prior->prior->child($inj->prior->keyI, $inj->prior->keys);
3422
4758
  $cinj->val = $child;
3423
4759
  self::setprop($cinj->parent, $inj->prior->key, $child);
3424
- }
3425
- else {
4760
+ } else {
3426
4761
  $cinj = $inj->prior->child($inj->keyI, $inj->keys);
3427
4762
  $cinj->val = $child;
3428
4763
  self::setprop($cinj->parent, $inj->key, $child);
@@ -3433,13 +4768,11 @@ class Struct
3433
4768
 
3434
4769
  return $cinj;
3435
4770
  }
3436
-
3437
4771
  }
3438
4772
 
3439
4773
 
3440
4774
  class Injection
3441
4775
  {
3442
-
3443
4776
  public int $mode;
3444
4777
  public bool $full;
3445
4778
  public int $keyI;
@@ -3462,12 +4795,14 @@ class Injection
3462
4795
  public mixed $modify;
3463
4796
  public ?Injection $prior;
3464
4797
  public mixed $extra;
4798
+ public bool $named; // Current map node names keys of its own (not $ commands).
3465
4799
 
3466
4800
  public function __construct(mixed $val, mixed $parent)
3467
4801
  {
3468
4802
  $this->val = $val;
3469
4803
  $this->parent = $parent;
3470
4804
  $this->errs = [];
4805
+ $this->named = false;
3471
4806
 
3472
4807
  $this->dparent = Struct::UNDEF;
3473
4808
  $this->dpath = ['$TOP'];
@@ -3516,14 +4851,12 @@ class Injection
3516
4851
 
3517
4852
  // Resolve current node in store for local paths.
3518
4853
  if (Struct::UNDEF === $this->dparent) {
3519
-
3520
4854
  // Even if there's no data, dpath should continue to match path, so that
3521
4855
  // relative paths work properly.
3522
4856
  if (1 < Struct::size($this->dpath)) {
3523
4857
  $this->dpath = Struct::flatten([$this->dpath, $parentkey]);
3524
4858
  }
3525
- }
3526
- else {
4859
+ } else {
3527
4860
  // this->dparent is the containing node of the current store value.
3528
4861
  if (null !== $parentkey && Struct::UNDEF !== $parentkey) {
3529
4862
  $this->dparent = Struct::_getprop($this->dparent, $parentkey);
@@ -3531,8 +4864,7 @@ class Injection
3531
4864
  $lastpart = Struct::getelem($this->dpath, -1);
3532
4865
  if ($lastpart === '$:' . $parentkey) {
3533
4866
  $this->dpath = Struct::slice($this->dpath, -1);
3534
- }
3535
- else {
4867
+ } else {
3536
4868
  $this->dpath = Struct::flatten([$this->dpath, $parentkey]);
3537
4869
  }
3538
4870
  }
@@ -3574,14 +4906,17 @@ class Injection
3574
4906
  {
3575
4907
  $parent = Struct::UNDEF;
3576
4908
  if (null === $ancestor || $ancestor < 2) {
3577
- if (Struct::UNDEF === $val) {
4909
+ $none = Struct::UNDEF === $val || Struct::undef() === $val;
4910
+ if ($none && Struct::islist($this->parent)) {
4911
+ // A list keeps the removed slot as a hole until inject's loop ends.
4912
+ $parent = Struct::setprop($this->parent, $this->key, Struct::SKIP);
4913
+ } elseif (Struct::UNDEF === $val) {
3578
4914
  $this->parent = Struct::delprop($this->parent, $this->key);
3579
4915
  $parent = $this->parent;
3580
4916
  } else {
3581
4917
  $parent = Struct::setprop($this->parent, $this->key, $val);
3582
4918
  }
3583
- }
3584
- else {
4919
+ } else {
3585
4920
  $aval = Struct::getelem($this->nodes, 0 - $ancestor);
3586
4921
  $akey = Struct::getelem($this->path, 0 - $ancestor);
3587
4922
  if (Struct::UNDEF === $val) {
@@ -3594,4 +4929,72 @@ class Injection
3594
4929
  return $parent;
3595
4930
  }
3596
4931
  }
3597
- ?>
4932
+
4933
+
4934
+ /**
4935
+ * A cursor into a condensed structure. Reads resolve by node index and touch
4936
+ * only the nodes on the path; nothing is decoded until a value is asked for.
4937
+ */
4938
+ final class CondenseView
4939
+ {
4940
+ public function __construct(
4941
+ private mixed $cond,
4942
+ private mixed $start,
4943
+ private \ArrayObject $memo
4944
+ ) {
4945
+ }
4946
+
4947
+ /** The value at $path, materialised: a container comes back as a fresh copy. */
4948
+ public function get(mixed $path = null): mixed
4949
+ {
4950
+ return Struct::_condenseMaterialise($this->cond, Struct::_condenseResolve($this->cond, $this->start, $path));
4951
+ }
4952
+
4953
+ /** @return array<string> */
4954
+ public function keys(mixed $path = null): array
4955
+ {
4956
+ $at = Struct::_condenseResolve($this->cond, $this->start, $path);
4957
+ return 0 > $at ? [] : Struct::_condenseKeys($this->cond, $at);
4958
+ }
4959
+
4960
+ public function has(mixed $path = null): bool
4961
+ {
4962
+ return 0 <= Struct::_condenseResolve($this->cond, $this->start, $path);
4963
+ }
4964
+
4965
+ /** A view at $path, sharing this view's memo. */
4966
+ public function at(mixed $path = null): CondenseView
4967
+ {
4968
+ return new CondenseView($this->cond, Struct::_condenseResolve($this->cond, $this->start, $path), $this->memo);
4969
+ }
4970
+
4971
+ public function value(): mixed
4972
+ {
4973
+ return Struct::_condenseMaterialise($this->cond, $this->start);
4974
+ }
4975
+
4976
+ public function size(): int
4977
+ {
4978
+ return 0 > $this->start ? 0 : Struct::_condenseSize($this->cond, $this->start);
4979
+ }
4980
+
4981
+ public function exists(): bool
4982
+ {
4983
+ return 0 <= $this->start;
4984
+ }
4985
+
4986
+ /**
4987
+ * A SHARED materialisation: the same object for the same node, in every
4988
+ * view sharing the memo. Mutating it changes what every one of them reads.
4989
+ */
4990
+ public function ref(): mixed
4991
+ {
4992
+ $k = (string) $this->start;
4993
+ $found = $this->memo->offsetExists($k) ? $this->memo[$k] : Struct::undef();
4994
+ if (Struct::undef() === $found) {
4995
+ $found = Struct::_condenseMaterialise($this->cond, $this->start);
4996
+ $this->memo[$k] = $found;
4997
+ }
4998
+ return $found;
4999
+ }
5000
+ }