@voxgig/sdkgen-langpack 0.0.1

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 (300) hide show
  1. package/.sdk/model/target/dart.aon +63 -0
  2. package/.sdk/model/target/haskell.aon +72 -0
  3. package/.sdk/model/target/lean.aon +91 -0
  4. package/.sdk/src/cmp/dart/Config_dart.ts +248 -0
  5. package/.sdk/src/cmp/dart/EntityBase_dart.ts +34 -0
  6. package/.sdk/src/cmp/dart/EntityOperation_dart.ts +43 -0
  7. package/.sdk/src/cmp/dart/EntityTypes_dart.ts +207 -0
  8. package/.sdk/src/cmp/dart/Entity_dart.ts +87 -0
  9. package/.sdk/src/cmp/dart/Gitignore_dart.ts +34 -0
  10. package/.sdk/src/cmp/dart/MainEntity_dart.ts +33 -0
  11. package/.sdk/src/cmp/dart/Main_dart.ts +178 -0
  12. package/.sdk/src/cmp/dart/Package_dart.ts +82 -0
  13. package/.sdk/src/cmp/dart/ReadmeEntity_dart.ts +177 -0
  14. package/.sdk/src/cmp/dart/ReadmeExamplesTest_dart.ts +238 -0
  15. package/.sdk/src/cmp/dart/ReadmeExplanation_dart.ts +53 -0
  16. package/.sdk/src/cmp/dart/ReadmeHowto_dart.ts +152 -0
  17. package/.sdk/src/cmp/dart/ReadmeInstall_dart.ts +59 -0
  18. package/.sdk/src/cmp/dart/ReadmeIntro_dart.ts +65 -0
  19. package/.sdk/src/cmp/dart/ReadmeModel_dart.ts +151 -0
  20. package/.sdk/src/cmp/dart/ReadmeOptions_dart.ts +63 -0
  21. package/.sdk/src/cmp/dart/ReadmeQuick_dart.ts +225 -0
  22. package/.sdk/src/cmp/dart/ReadmeRef_dart.ts +397 -0
  23. package/.sdk/src/cmp/dart/ReadmeTopHowto_dart.ts +24 -0
  24. package/.sdk/src/cmp/dart/ReadmeTopQuick_dart.ts +106 -0
  25. package/.sdk/src/cmp/dart/ReadmeTopTest_dart.ts +78 -0
  26. package/.sdk/src/cmp/dart/SdkError_dart.ts +42 -0
  27. package/.sdk/src/cmp/dart/TestDirect_dart.ts +516 -0
  28. package/.sdk/src/cmp/dart/TestEntity_dart.ts +628 -0
  29. package/.sdk/src/cmp/dart/Test_dart.ts +138 -0
  30. package/.sdk/src/cmp/dart/fragment/Config.data.fragment.dart +98 -0
  31. package/.sdk/src/cmp/dart/fragment/Config.fragment.dart +70 -0
  32. package/.sdk/src/cmp/dart/fragment/Direct.test.fragment.dart +25 -0
  33. package/.sdk/src/cmp/dart/fragment/Entity.fragment.dart +29 -0
  34. package/.sdk/src/cmp/dart/fragment/Entity.test.fragment.dart +28 -0
  35. package/.sdk/src/cmp/dart/fragment/EntityBase.fragment.dart +302 -0
  36. package/.sdk/src/cmp/dart/fragment/EntityCreateOp.fragment.dart +98 -0
  37. package/.sdk/src/cmp/dart/fragment/EntityListOp.fragment.dart +90 -0
  38. package/.sdk/src/cmp/dart/fragment/EntityLoadOp.fragment.dart +102 -0
  39. package/.sdk/src/cmp/dart/fragment/EntityRemoveOp.fragment.dart +108 -0
  40. package/.sdk/src/cmp/dart/fragment/EntityUpdateOp.fragment.dart +102 -0
  41. package/.sdk/src/cmp/dart/fragment/Main.fragment.dart +339 -0
  42. package/.sdk/src/cmp/dart/fragment/SdkError.fragment.dart +26 -0
  43. package/.sdk/src/cmp/dart/tsconfig.json +15 -0
  44. package/.sdk/src/cmp/dart/utility_dart.ts +155 -0
  45. package/.sdk/src/cmp/haskell/Config_haskell.ts +98 -0
  46. package/.sdk/src/cmp/haskell/Entity_haskell.ts +13 -0
  47. package/.sdk/src/cmp/haskell/Gitignore_haskell.ts +27 -0
  48. package/.sdk/src/cmp/haskell/Main_haskell.ts +123 -0
  49. package/.sdk/src/cmp/haskell/Package_haskell.ts +60 -0
  50. package/.sdk/src/cmp/haskell/ReadmeEntity_haskell.ts +186 -0
  51. package/.sdk/src/cmp/haskell/ReadmeExamplesTest_haskell.ts +135 -0
  52. package/.sdk/src/cmp/haskell/ReadmeExplanation_haskell.ts +48 -0
  53. package/.sdk/src/cmp/haskell/ReadmeHowto_haskell.ts +168 -0
  54. package/.sdk/src/cmp/haskell/ReadmeInstall_haskell.ts +51 -0
  55. package/.sdk/src/cmp/haskell/ReadmeIntro_haskell.ts +67 -0
  56. package/.sdk/src/cmp/haskell/ReadmeModel_haskell.ts +162 -0
  57. package/.sdk/src/cmp/haskell/ReadmeOptions_haskell.ts +74 -0
  58. package/.sdk/src/cmp/haskell/ReadmeQuick_haskell.ts +241 -0
  59. package/.sdk/src/cmp/haskell/ReadmeRef_haskell.ts +408 -0
  60. package/.sdk/src/cmp/haskell/ReadmeTopHowto_haskell.ts +31 -0
  61. package/.sdk/src/cmp/haskell/ReadmeTopQuick_haskell.ts +104 -0
  62. package/.sdk/src/cmp/haskell/ReadmeTopTest_haskell.ts +80 -0
  63. package/.sdk/src/cmp/haskell/Test_haskell.ts +297 -0
  64. package/.sdk/src/cmp/haskell/tsconfig.json +15 -0
  65. package/.sdk/src/cmp/haskell/utility_haskell.ts +166 -0
  66. package/.sdk/src/cmp/lean/Config_lean.ts +93 -0
  67. package/.sdk/src/cmp/lean/Entity_lean.ts +9 -0
  68. package/.sdk/src/cmp/lean/Gitignore_lean.ts +18 -0
  69. package/.sdk/src/cmp/lean/Main_lean.ts +120 -0
  70. package/.sdk/src/cmp/lean/Package_lean.ts +93 -0
  71. package/.sdk/src/cmp/lean/ReadmeEntity_lean.ts +29 -0
  72. package/.sdk/src/cmp/lean/ReadmeExplanation_lean.ts +19 -0
  73. package/.sdk/src/cmp/lean/ReadmeHowto_lean.ts +25 -0
  74. package/.sdk/src/cmp/lean/ReadmeInstall_lean.ts +39 -0
  75. package/.sdk/src/cmp/lean/ReadmeIntro_lean.ts +25 -0
  76. package/.sdk/src/cmp/lean/ReadmeModel_lean.ts +24 -0
  77. package/.sdk/src/cmp/lean/ReadmeOptions_lean.ts +22 -0
  78. package/.sdk/src/cmp/lean/ReadmeQuick_lean.ts +50 -0
  79. package/.sdk/src/cmp/lean/ReadmeRef_lean.ts +40 -0
  80. package/.sdk/src/cmp/lean/ReadmeTopHowto_lean.ts +16 -0
  81. package/.sdk/src/cmp/lean/ReadmeTopQuick_lean.ts +23 -0
  82. package/.sdk/src/cmp/lean/ReadmeTopTest_lean.ts +19 -0
  83. package/.sdk/src/cmp/lean/Test_lean.ts +261 -0
  84. package/.sdk/src/cmp/lean/utility_lean.ts +129 -0
  85. package/.sdk/tm/dart/LICENSE +22 -0
  86. package/.sdk/tm/dart/Makefile +50 -0
  87. package/.sdk/tm/dart/lib/Context.dart +150 -0
  88. package/.sdk/tm/dart/lib/Control.dart +15 -0
  89. package/.sdk/tm/dart/lib/Operation.dart +31 -0
  90. package/.sdk/tm/dart/lib/Point.dart +51 -0
  91. package/.sdk/tm/dart/lib/Response.dart +32 -0
  92. package/.sdk/tm/dart/lib/Result.dart +39 -0
  93. package/.sdk/tm/dart/lib/Spec.dart +49 -0
  94. package/.sdk/tm/dart/lib/feature/audit/AuditFeature.dart +103 -0
  95. package/.sdk/tm/dart/lib/feature/base/BaseFeature.dart +76 -0
  96. package/.sdk/tm/dart/lib/feature/cache/CacheFeature.dart +152 -0
  97. package/.sdk/tm/dart/lib/feature/clienttrack/ClienttrackFeature.dart +104 -0
  98. package/.sdk/tm/dart/lib/feature/cost/CostFeature.dart +446 -0
  99. package/.sdk/tm/dart/lib/feature/debug/DebugFeature.dart +153 -0
  100. package/.sdk/tm/dart/lib/feature/idempotency/IdempotencyFeature.dart +92 -0
  101. package/.sdk/tm/dart/lib/feature/log/LogFeature.dart +85 -0
  102. package/.sdk/tm/dart/lib/feature/metrics/MetricsFeature.dart +103 -0
  103. package/.sdk/tm/dart/lib/feature/netsim/NetsimFeature.dart +186 -0
  104. package/.sdk/tm/dart/lib/feature/paging/PagingFeature.dart +240 -0
  105. package/.sdk/tm/dart/lib/feature/proxy/ProxyFeature.dart +118 -0
  106. package/.sdk/tm/dart/lib/feature/ratelimit/RatelimitFeature.dart +103 -0
  107. package/.sdk/tm/dart/lib/feature/rbac/RbacFeature.dart +121 -0
  108. package/.sdk/tm/dart/lib/feature/retry/RetryFeature.dart +155 -0
  109. package/.sdk/tm/dart/lib/feature/secrets/SecretsFeature.dart +649 -0
  110. package/.sdk/tm/dart/lib/feature/secrets/plugin/capability.dart +105 -0
  111. package/.sdk/tm/dart/lib/feature/secrets/plugin/catalog.dart +46 -0
  112. package/.sdk/tm/dart/lib/feature/secrets/plugin/config.dart +297 -0
  113. package/.sdk/tm/dart/lib/feature/secrets/plugin/depend.dart +198 -0
  114. package/.sdk/tm/dart/lib/feature/secrets/plugin/env.dart +144 -0
  115. package/.sdk/tm/dart/lib/feature/secrets/plugin/export.dart +58 -0
  116. package/.sdk/tm/dart/lib/feature/secrets/plugin/graph.dart +160 -0
  117. package/.sdk/tm/dart/lib/feature/secrets/plugin/host.dart +1067 -0
  118. package/.sdk/tm/dart/lib/feature/secrets/plugin/order.dart +172 -0
  119. package/.sdk/tm/dart/lib/feature/secrets/plugin/plugin.dart +23 -0
  120. package/.sdk/tm/dart/lib/feature/secrets/plugin/point.dart +117 -0
  121. package/.sdk/tm/dart/lib/feature/secrets/plugin/ref.dart +105 -0
  122. package/.sdk/tm/dart/lib/feature/secrets/plugin/resolve.dart +58 -0
  123. package/.sdk/tm/dart/lib/feature/secrets/plugin/types.dart +201 -0
  124. package/.sdk/tm/dart/lib/feature/secrets/plugin/version.dart +116 -0
  125. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/aws.dart +285 -0
  126. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/azuresecrets.dart +178 -0
  127. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/boru.dart +145 -0
  128. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/crypto.dart +194 -0
  129. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/doppler.dart +101 -0
  130. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/gcpsecrets.dart +143 -0
  131. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/hashicorp.dart +190 -0
  132. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/httpjson.dart +363 -0
  133. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/infisical.dart +149 -0
  134. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/onepassword.dart +146 -0
  135. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/secretspec.dart +116 -0
  136. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/sigv4.dart +237 -0
  137. package/.sdk/tm/dart/lib/feature/secrets/sekreto/src/addr.dart +138 -0
  138. package/.sdk/tm/dart/lib/feature/secrets/sekreto/src/json.dart +276 -0
  139. package/.sdk/tm/dart/lib/feature/secrets/sekreto/src/provider.dart +31 -0
  140. package/.sdk/tm/dart/lib/feature/secrets/sekreto/src/providers.dart +243 -0
  141. package/.sdk/tm/dart/lib/feature/secrets/sekreto/src/sekreto.dart +730 -0
  142. package/.sdk/tm/dart/lib/feature/secrets/sekreto/src/spec.dart +200 -0
  143. package/.sdk/tm/dart/lib/feature/secrets/sekreto/src/support.dart +217 -0
  144. package/.sdk/tm/dart/lib/feature/streaming/StreamingFeature.dart +97 -0
  145. package/.sdk/tm/dart/lib/feature/telemetry/TelemetryFeature.dart +136 -0
  146. package/.sdk/tm/dart/lib/feature/test/TestFeature.dart +328 -0
  147. package/.sdk/tm/dart/lib/feature/timeout/TimeoutFeature.dart +104 -0
  148. package/.sdk/tm/dart/lib/utility/CleanUtility.dart +12 -0
  149. package/.sdk/tm/dart/lib/utility/DoneUtility.dart +18 -0
  150. package/.sdk/tm/dart/lib/utility/ErrUtility.dart +46 -0
  151. package/.sdk/tm/dart/lib/utility/FeatureAddUtility.dart +35 -0
  152. package/.sdk/tm/dart/lib/utility/FeatureHookUtility.dart +20 -0
  153. package/.sdk/tm/dart/lib/utility/FeatureInitUtility.dart +9 -0
  154. package/.sdk/tm/dart/lib/utility/FetcherUtility.dart +104 -0
  155. package/.sdk/tm/dart/lib/utility/GraphqlUtility.dart +162 -0
  156. package/.sdk/tm/dart/lib/utility/MakeContextUtility.dart +6 -0
  157. package/.sdk/tm/dart/lib/utility/MakeErrorUtility.dart +71 -0
  158. package/.sdk/tm/dart/lib/utility/MakeFetchDefUtility.dart +42 -0
  159. package/.sdk/tm/dart/lib/utility/MakeOptionsUtility.dart +233 -0
  160. package/.sdk/tm/dart/lib/utility/MakePointUtility.dart +130 -0
  161. package/.sdk/tm/dart/lib/utility/MakeRequestUtility.dart +66 -0
  162. package/.sdk/tm/dart/lib/utility/MakeResponseUtility.dart +59 -0
  163. package/.sdk/tm/dart/lib/utility/MakeResultUtility.dart +49 -0
  164. package/.sdk/tm/dart/lib/utility/MakeSpecUtility.dart +77 -0
  165. package/.sdk/tm/dart/lib/utility/MakeUrlUtility.dart +51 -0
  166. package/.sdk/tm/dart/lib/utility/ParamUtility.dart +56 -0
  167. package/.sdk/tm/dart/lib/utility/PrepareAuthUtility.dart +46 -0
  168. package/.sdk/tm/dart/lib/utility/PrepareBodyUtility.dart +19 -0
  169. package/.sdk/tm/dart/lib/utility/PrepareHeadersUtility.dart +11 -0
  170. package/.sdk/tm/dart/lib/utility/PrepareMethodUtility.dart +30 -0
  171. package/.sdk/tm/dart/lib/utility/PrepareParamsUtility.dart +23 -0
  172. package/.sdk/tm/dart/lib/utility/PreparePathUtility.dart +9 -0
  173. package/.sdk/tm/dart/lib/utility/PrepareQueryUtility.dart +18 -0
  174. package/.sdk/tm/dart/lib/utility/ResultBasicUtility.dart +29 -0
  175. package/.sdk/tm/dart/lib/utility/ResultBodyUtility.dart +15 -0
  176. package/.sdk/tm/dart/lib/utility/ResultHeadersUtility.dart +18 -0
  177. package/.sdk/tm/dart/lib/utility/StructUtility.dart +127 -0
  178. package/.sdk/tm/dart/lib/utility/TransformRequestUtility.dart +28 -0
  179. package/.sdk/tm/dart/lib/utility/TransformResponseUtility.dart +44 -0
  180. package/.sdk/tm/dart/lib/utility/Utility.dart +239 -0
  181. package/.sdk/tm/dart/lib/utility/voxgig_struct.dart +2462 -0
  182. package/.sdk/tm/dart/src/feature/README.md +3 -0
  183. package/.sdk/tm/dart/src/feature/audit/.gitkeep +0 -0
  184. package/.sdk/tm/dart/src/feature/base/.gitkeep +0 -0
  185. package/.sdk/tm/dart/src/feature/cache/.gitkeep +0 -0
  186. package/.sdk/tm/dart/src/feature/clienttrack/.gitkeep +0 -0
  187. package/.sdk/tm/dart/src/feature/cost/.gitkeep +0 -0
  188. package/.sdk/tm/dart/src/feature/debug/.gitkeep +0 -0
  189. package/.sdk/tm/dart/src/feature/idempotency/.gitkeep +0 -0
  190. package/.sdk/tm/dart/src/feature/log/.gitkeep +0 -0
  191. package/.sdk/tm/dart/src/feature/metrics/.gitkeep +0 -0
  192. package/.sdk/tm/dart/src/feature/netsim/.gitkeep +0 -0
  193. package/.sdk/tm/dart/src/feature/paging/.gitkeep +0 -0
  194. package/.sdk/tm/dart/src/feature/proxy/.gitkeep +0 -0
  195. package/.sdk/tm/dart/src/feature/ratelimit/.gitkeep +0 -0
  196. package/.sdk/tm/dart/src/feature/rbac/.gitkeep +0 -0
  197. package/.sdk/tm/dart/src/feature/retry/.gitkeep +0 -0
  198. package/.sdk/tm/dart/src/feature/secrets/.gitkeep +0 -0
  199. package/.sdk/tm/dart/src/feature/streaming/.gitkeep +0 -0
  200. package/.sdk/tm/dart/src/feature/telemetry/.gitkeep +0 -0
  201. package/.sdk/tm/dart/src/feature/test/.gitkeep +0 -0
  202. package/.sdk/tm/dart/src/feature/timeout/.gitkeep +0 -0
  203. package/.sdk/tm/dart/test/custom_test.dart +65 -0
  204. package/.sdk/tm/dart/test/exists_test.dart +12 -0
  205. package/.sdk/tm/dart/test/feature/harness.dart +347 -0
  206. package/.sdk/tm/dart/test/feature/secrets/secrets_test.dart +1107 -0
  207. package/.sdk/tm/dart/test/feature_test.dart +1193 -0
  208. package/.sdk/tm/dart/test/harness.dart +153 -0
  209. package/.sdk/tm/dart/test/netsim_test.dart +48 -0
  210. package/.sdk/tm/dart/test/omni.dart +520 -0
  211. package/.sdk/tm/dart/test/omni_smoke_test.dart +143 -0
  212. package/.sdk/tm/dart/test/pipeline_test.dart +608 -0
  213. package/.sdk/tm/dart/test/primary_test.dart +476 -0
  214. package/.sdk/tm/dart/test/sdk-test-control.json +19 -0
  215. package/.sdk/tm/dart/test/struct_test.dart +468 -0
  216. package/.sdk/tm/dart/test/utility.dart +198 -0
  217. package/.sdk/tm/dart/test/vendor/omni/omni.dart +7 -0
  218. package/.sdk/tm/dart/test/vendor/omni/runner.dart +653 -0
  219. package/.sdk/tm/dart/test/vendor/omni/util.dart +232 -0
  220. package/.sdk/tm/haskell/LICENSE +21 -0
  221. package/.sdk/tm/haskell/Makefile +22 -0
  222. package/.sdk/tm/haskell/VERSION +1 -0
  223. package/.sdk/tm/haskell/src/SdkFeatures.hs +1440 -0
  224. package/.sdk/tm/haskell/src/SdkHelpers.hs +337 -0
  225. package/.sdk/tm/haskell/src/SdkJson.hs +111 -0
  226. package/.sdk/tm/haskell/src/SdkRuntime.hs +1279 -0
  227. package/.sdk/tm/haskell/src/SdkTypes.hs +195 -0
  228. package/.sdk/tm/haskell/src/VoxgigStruct.hs +2299 -0
  229. package/.sdk/tm/haskell/src/Vregex.hs +237 -0
  230. package/.sdk/tm/haskell/src/feature/README.md +5 -0
  231. package/.sdk/tm/haskell/src/feature/audit/.gitkeep +0 -0
  232. package/.sdk/tm/haskell/src/feature/base/.gitkeep +0 -0
  233. package/.sdk/tm/haskell/src/feature/cache/.gitkeep +0 -0
  234. package/.sdk/tm/haskell/src/feature/clienttrack/.gitkeep +0 -0
  235. package/.sdk/tm/haskell/src/feature/debug/.gitkeep +0 -0
  236. package/.sdk/tm/haskell/src/feature/idempotency/.gitkeep +0 -0
  237. package/.sdk/tm/haskell/src/feature/log/.gitkeep +0 -0
  238. package/.sdk/tm/haskell/src/feature/metrics/.gitkeep +0 -0
  239. package/.sdk/tm/haskell/src/feature/netsim/.gitkeep +0 -0
  240. package/.sdk/tm/haskell/src/feature/paging/.gitkeep +0 -0
  241. package/.sdk/tm/haskell/src/feature/proxy/.gitkeep +0 -0
  242. package/.sdk/tm/haskell/src/feature/ratelimit/.gitkeep +0 -0
  243. package/.sdk/tm/haskell/src/feature/rbac/.gitkeep +0 -0
  244. package/.sdk/tm/haskell/src/feature/retry/.gitkeep +0 -0
  245. package/.sdk/tm/haskell/src/feature/streaming/.gitkeep +0 -0
  246. package/.sdk/tm/haskell/src/feature/telemetry/.gitkeep +0 -0
  247. package/.sdk/tm/haskell/src/feature/test/.gitkeep +0 -0
  248. package/.sdk/tm/haskell/src/feature/timeout/.gitkeep +0 -0
  249. package/.sdk/tm/haskell/test/Harness.hs +281 -0
  250. package/.sdk/tm/haskell/test/OmniResolver.hs +252 -0
  251. package/.sdk/tm/haskell/test/Runner.hs +49 -0
  252. package/.sdk/tm/haskell/test/StructCorpus.hs +449 -0
  253. package/.sdk/tm/haskell/test/TCustomUtility.hs +38 -0
  254. package/.sdk/tm/haskell/test/TFeature.hs +794 -0
  255. package/.sdk/tm/haskell/test/TNetsim.hs +50 -0
  256. package/.sdk/tm/haskell/test/TPipeline.hs +334 -0
  257. package/.sdk/tm/haskell/test/TPrimaryCorpus.hs +263 -0
  258. package/.sdk/tm/haskell/test/TPrimaryUtility.hs +386 -0
  259. package/.sdk/tm/haskell/test/Testutil.hs +59 -0
  260. package/.sdk/tm/haskell/test/vendor/omni/Omni.hs +1147 -0
  261. package/.sdk/tm/lean/LICENSE +21 -0
  262. package/.sdk/tm/lean/Makefile +32 -0
  263. package/.sdk/tm/lean/VERSION +1 -0
  264. package/.sdk/tm/lean/src/SdkFeature.lean +171 -0
  265. package/.sdk/tm/lean/src/SdkFeatures.lean +787 -0
  266. package/.sdk/tm/lean/src/SdkJson.lean +134 -0
  267. package/.sdk/tm/lean/src/SdkRuntime.lean +374 -0
  268. package/.sdk/tm/lean/src/SdkUtility.lean +809 -0
  269. package/.sdk/tm/lean/src/VoxgigStruct.lean +2880 -0
  270. package/.sdk/tm/lean/src/Vregex.lean +412 -0
  271. package/.sdk/tm/lean/src/feature/README.md +5 -0
  272. package/.sdk/tm/lean/src/feature/audit/.gitkeep +0 -0
  273. package/.sdk/tm/lean/src/feature/base/.gitkeep +0 -0
  274. package/.sdk/tm/lean/src/feature/cache/.gitkeep +0 -0
  275. package/.sdk/tm/lean/src/feature/clienttrack/.gitkeep +0 -0
  276. package/.sdk/tm/lean/src/feature/cost/.gitkeep +0 -0
  277. package/.sdk/tm/lean/src/feature/debug/.gitkeep +0 -0
  278. package/.sdk/tm/lean/src/feature/idempotency/.gitkeep +0 -0
  279. package/.sdk/tm/lean/src/feature/log/.gitkeep +0 -0
  280. package/.sdk/tm/lean/src/feature/metrics/.gitkeep +0 -0
  281. package/.sdk/tm/lean/src/feature/netsim/.gitkeep +0 -0
  282. package/.sdk/tm/lean/src/feature/paging/.gitkeep +0 -0
  283. package/.sdk/tm/lean/src/feature/proxy/.gitkeep +0 -0
  284. package/.sdk/tm/lean/src/feature/ratelimit/.gitkeep +0 -0
  285. package/.sdk/tm/lean/src/feature/rbac/.gitkeep +0 -0
  286. package/.sdk/tm/lean/src/feature/retry/.gitkeep +0 -0
  287. package/.sdk/tm/lean/src/feature/streaming/.gitkeep +0 -0
  288. package/.sdk/tm/lean/src/feature/telemetry/.gitkeep +0 -0
  289. package/.sdk/tm/lean/src/feature/test/.gitkeep +0 -0
  290. package/.sdk/tm/lean/src/feature/timeout/.gitkeep +0 -0
  291. package/.sdk/tm/lean/test/OmniResolver.lean +358 -0
  292. package/.sdk/tm/lean/test/OmniSmoke.lean +174 -0
  293. package/.sdk/tm/lean/test/StructCorpus.lean +368 -0
  294. package/.sdk/tm/lean/test/TFeature.lean +281 -0
  295. package/.sdk/tm/lean/test/TPrimaryUtility.lean +227 -0
  296. package/.sdk/tm/lean/test/vendor/omni/Omni.lean +997 -0
  297. package/LICENSE +21 -0
  298. package/README.md +104 -0
  299. package/package.json +78 -0
  300. package/sdkgen-package.json +22 -0
@@ -0,0 +1,172 @@
1
+ // VENDORED: @voxgig/plugin sdk-20260908-1556-0 (dart/lib/order.dart)
2
+ // Source: https://github.com/voxgig/plugin @ 48392f5e2b6d1434ee9b1a4a9a11f4480aaeb46a [tag: sdk-20260908-1556-0]
3
+ // License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
4
+ /// Ordering (section 7) - one rule, one place.
5
+ ///
6
+ /// sdkgen grew two special cases in `makeOptions` (`test`, then `station`)
7
+ /// and the third was not far off. This sort is the whole replacement, and
8
+ /// the tiers are in this order for a reason:
9
+ ///
10
+ /// 1 constraints before/after edges, by ref or by name
11
+ /// 2 bands integer, lower first, default 0
12
+ /// 3 declaration ties break by `pos`
13
+ ///
14
+ /// CONSTRAINTS BEAT BANDS precisely so the correct tool wins when both are
15
+ /// present. A band expresses a genuine cross-cutting layer; a constraint
16
+ /// expresses a relationship between two specific things; and a band chosen
17
+ /// by trial and error to fix an ordering bug is a bug wearing a number.
18
+ library;
19
+
20
+ import 'types.dart' as t;
21
+ import 'ref.dart' as r;
22
+
23
+ /// One node of the sort. An internal shape, never a corpus value.
24
+ class OrderNode {
25
+ final String ref;
26
+ final int pos;
27
+ final dynamic order;
28
+ OrderNode(this.ref, this.pos, this.order);
29
+ }
30
+
31
+ int orderBand(OrderNode b) => t.asInt(t.get(b.order ?? {}, 'band')) ?? 0;
32
+
33
+ /// Was a constraint stated? An absent value and an EMPTY LIST are both
34
+ /// no-constraint - and an empty list is TRUTHY in most languages, which is
35
+ /// exactly how this class of bug survives a reading.
36
+ bool orderDeclared(dynamic spec) {
37
+ if (spec == null) return false;
38
+ if (spec is List) return spec.any((one) => one != '');
39
+ return spec != '';
40
+ }
41
+
42
+ /// One spelling or a LIST of them. A list fans out to the UNION of what each
43
+ /// names, so after: ['a','b'] means after BOTH, and the same instance named
44
+ /// twice - once by name, once by ref - is one edge.
45
+ ///
46
+ /// Matching is by REF, or by NAME across all of that definition's instances
47
+ /// (section 7) - which is the whole reason the two spellings exist.
48
+ List<String> orderTargets(dynamic spec, List<OrderNode> nodes) {
49
+ final specs = spec is List ? spec : [spec];
50
+ final hit = <String>[];
51
+ for (final one in specs) {
52
+ for (final b in nodes) {
53
+ if (hit.contains(b.ref)) continue;
54
+ if (b.ref == one || r.refName(b.ref) == one) hit.add(b.ref);
55
+ }
56
+ }
57
+ return hit;
58
+ }
59
+
60
+ List<String> resolveOrder(List<OrderNode> bindings, [dynamic pin]) {
61
+ final nodes = bindings;
62
+ final byref = {for (final b in nodes) b.ref: b};
63
+
64
+ // Constraints are edges. A constraint naming an ABSENT binding is
65
+ // satisfied VACUOUSLY (section 7) - a plugin ordered `after: 'test'` must
66
+ // load in a host with no test plugin. That is sdkgen's __after__
67
+ // behaviour, kept.
68
+ final edges = {for (final b in nodes) b.ref: <String>[]};
69
+
70
+ for (final b in nodes) {
71
+ final block = b.order ?? {};
72
+ if (orderDeclared(t.get(block, 'after'))) {
73
+ for (final target in orderTargets(t.get(block, 'after'), nodes)) {
74
+ edges[target]!.add(b.ref);
75
+ }
76
+ }
77
+ if (orderDeclared(t.get(block, 'before'))) {
78
+ edges[b.ref]!.addAll(orderTargets(t.get(block, 'before'), nodes));
79
+ }
80
+ }
81
+
82
+ final indeg = {for (final b in nodes) b.ref: 0};
83
+ for (final tos in edges.values) {
84
+ for (final to in tos) {
85
+ indeg[to] = indeg[to]! + 1;
86
+ }
87
+ }
88
+
89
+ // Stable topological sort. Among ready nodes, band first (lower runs
90
+ // first), then `pos` - the position the DOCUMENT visibly states, not the
91
+ // order instances happened to load and not the incarnation `seq`.
92
+ final out = <String>[];
93
+ var ready = nodes.where((b) => indeg[b.ref] == 0).toList();
94
+
95
+ while (ready.isNotEmpty) {
96
+ ready = t.stableSortBy(ready, (b) => [orderBand(b), b.pos]);
97
+ final next = ready.removeAt(0);
98
+ out.add(next.ref);
99
+ for (final to in edges[next.ref]!) {
100
+ indeg[to] = indeg[to]! - 1;
101
+ if (indeg[to] == 0) ready.add(byref[to]!);
102
+ }
103
+ }
104
+
105
+ if (out.length != nodes.length) {
106
+ final stuck =
107
+ nodes.where((b) => !out.contains(b.ref)).map((b) => b.ref).toList();
108
+ t.fail('plugin_order_cycle',
109
+ 'before/after constraints cycle: ${stuck.join(' -> ')}',
110
+ {'cycle': stuck});
111
+ }
112
+
113
+ return applyPin(out, edges, pin);
114
+ }
115
+
116
+ /// A PIN IS NOT A CONSTRAINT (section 7).
117
+ ///
118
+ /// Constraints and bands are negotiable by definition - they are what
119
+ /// plugins and documents say they want, and the sort's job is to satisfy
120
+ /// them all. A pin is the host stating a structural invariant of its own
121
+ /// architecture, which is a different kind of claim and must not lose a tie
122
+ /// to a document.
123
+ ///
124
+ /// So a pin PLACES the binding at the named end, and an ordering that would
125
+ /// move it away is `plugin_order_pinned` - rejected, not honoured into a
126
+ /// broken wrap.
127
+ List<String> applyPin(
128
+ List<String> order, Map<String, List<String>> edges, dynamic pin) {
129
+ if (pin == null) return order;
130
+ final out = List<String>.from(order);
131
+
132
+ // SORTED, not insertion order. A pin map is data - it can arrive from a
133
+ // host's own construction options in any order, and two names pinned to
134
+ // the same end are order-sensitive (`{b:'first', a:'first'}` and
135
+ // `{a:'first', b:'first'}` give different results). A dart map iterates
136
+ // in insertion order and a Go map has no order at all, so leaving it
137
+ // unstated made the same declaration mean different things in different
138
+ // ports.
139
+ for (final name in t.sortedKeys(pin)) {
140
+ final want = t.get(pin, name);
141
+ final idx = out.indexWhere((ref) => r.refName(ref) == name);
142
+ if (idx < 0) continue;
143
+
144
+ // `first`/`outermost` is index 0; `last`/`innermost` is the end.
145
+ // Section 6.2 makes the first chain binding outermost, which is why the
146
+ // vocabulary is positional and why the two spellings pair this way.
147
+ final wantFirst = want == 'first' || want == 'outermost';
148
+ final ref = out.removeAt(idx);
149
+ if (wantFirst) {
150
+ out.insert(0, ref);
151
+ } else {
152
+ out.add(ref);
153
+ }
154
+ }
155
+
156
+ // Now check that the placement did not break a constraint. This is the
157
+ // half that makes a pin a rejection rather than an override: the host
158
+ // wins on position, but it does not get to silently discard a
159
+ // relationship a plugin declared.
160
+ final at = {for (var i = 0; i < out.length; i++) out[i]: i};
161
+ for (final from in edges.keys) {
162
+ for (final to in edges[from]!) {
163
+ if (at[from]! <= at[to]!) continue;
164
+ t.fail(
165
+ 'plugin_order_pinned',
166
+ 'a pin would move a binding an ordering constrains: '
167
+ '$from must precede $to',
168
+ {'before': from, 'after': to});
169
+ }
170
+ }
171
+ return out;
172
+ }
@@ -0,0 +1,23 @@
1
+ // VENDORED: @voxgig/plugin sdk-20260908-1556-0 (dart/lib/plugin.dart)
2
+ // Source: https://github.com/voxgig/plugin @ 48392f5e2b6d1434ee9b1a4a9a11f4480aaeb46a [tag: sdk-20260908-1556-0]
3
+ // License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
4
+ /// The canonical surface `make parity` checks (AGENTS.md section 4). Small
5
+ /// on purpose (section 19): everything else is methods on the host and
6
+ /// instance types, because a library that grows a second public entry point
7
+ /// per feature is a library twenty ports pay for twice.
8
+ library;
9
+
10
+ export 'types.dart';
11
+ export 'ref.dart';
12
+ export 'version.dart';
13
+ export 'capability.dart';
14
+ export 'resolve.dart';
15
+ export 'export.dart';
16
+ export 'order.dart';
17
+ export 'point.dart';
18
+ export 'config.dart';
19
+ export 'env.dart';
20
+ export 'graph.dart';
21
+ export 'depend.dart';
22
+ export 'catalog.dart';
23
+ export 'host.dart';
@@ -0,0 +1,117 @@
1
+ // VENDORED: @voxgig/plugin sdk-20260908-1556-0 (dart/lib/point.dart)
2
+ // Source: https://github.com/voxgig/plugin @ 48392f5e2b6d1434ee9b1a4a9a11f4480aaeb46a [tag: sdk-20260908-1556-0]
3
+ // License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
4
+ /// Extension points (section 6). Three kinds, chosen because they are what
5
+ /// the two existing systems actually needed, and no more.
6
+ ///
7
+ /// A PLUGIN NEVER MUTATES THE HOST. That inversion is what makes
8
+ /// deactivation possible: sdkgen's `utility.fetcher = wrapped` is not
9
+ /// undoable, but "this instance holds slot 3 of the request chain" is
10
+ /// undoable in O(1). OSGi named it the whiteboard pattern in 2004, in a
11
+ /// paper called *Listeners Considered Harmful*, and for exactly this reason.
12
+ library;
13
+
14
+ import 'types.dart' as t;
15
+
16
+ /// EVERY BINDING IS ARITY TWO, `(next, arg)`, hook and chain alike. `next`
17
+ /// is null for a hook. One signature means this file does not have to know
18
+ /// which kind of point it is holding - and the kind is the HOST's property,
19
+ /// not the binding's.
20
+ typedef BindingFn = dynamic Function(dynamic next, dynamic arg);
21
+
22
+ /// A live binding. An internal shape, never a corpus value.
23
+ class Binding {
24
+ final String ref;
25
+ final String point;
26
+ final BindingFn fn;
27
+ int band;
28
+ Binding(this.ref, this.point, this.fn, this.band);
29
+ Binding withBand(int b) => Binding(ref, point, fn, b);
30
+ }
31
+
32
+ /// Section 6.1: "fan-out" is not one answer but four. In a language with
33
+ /// asynchrony, "call every binding" hides a decision - start them all and
34
+ /// wait, await each in turn, or do not wait - and a design that leaves it
35
+ /// unsaid gets four different answers from four ports, in the concurrency
36
+ /// behaviour of production code no corpus entry happens to cover.
37
+ ///
38
+ /// DART IS A PORT WHERE THAT IS LOUD: `Future.wait` is right there, and
39
+ /// making `emit` return one would turn every hook point into a scheduling
40
+ /// decision and every ordering assertion into a race. The host stays
41
+ /// synchronous (section 5.2) and the modes stay data.
42
+ const modes = ['emit', 'parallel', 'serial', 'bail'];
43
+
44
+ /// Fan-out. Return values are ignored except in `bail`.
45
+ dynamic pointEmit(List<Binding> bindings, String mode, dynamic arg) {
46
+ if (mode == 'bail') {
47
+ // Stops at the first binding that RETURNS A VALUE - the "handled, stop"
48
+ // case. A `null` RETURN DECLINES (section 6.1): dart has one way to say
49
+ // nothing, and the model's rule is written to that rather than to
50
+ // JavaScript's null/undefined pair. `!= null`, NOT truthiness - `false`
51
+ // is a value.
52
+ for (final b in bindings) {
53
+ final v = b.fn(null, arg);
54
+ if (v != null) return v;
55
+ }
56
+ return null;
57
+ }
58
+
59
+ final errors = <String>[];
60
+ for (final b in bindings) {
61
+ try {
62
+ b.fn(null, arg);
63
+ } catch (e) {
64
+ // `emit` raises synchronously; the collecting modes gather.
65
+ if (mode == 'emit') rethrow;
66
+ errors.add(t.messageOf(e));
67
+ }
68
+ }
69
+ return mode == 'emit' ? null : errors;
70
+ }
71
+
72
+ /// Composition: b1(b2(b3(base))), FIRST BINDING OUTERMOST (section 6.2).
73
+ ///
74
+ /// Recomputed by the host whenever the live set changes, and cached between
75
+ /// changes. Plugins receive `next` as an argument; they never see or store
76
+ /// the previous value of anything. A plugin that stashes `next` and calls
77
+ /// it after deactivation is a bug the host cannot prevent, and this says so
78
+ /// rather than pretending otherwise.
79
+ dynamic Function(dynamic) compose(
80
+ List<Binding> bindings, dynamic Function(dynamic) base) {
81
+ var next = base;
82
+ for (var i = bindings.length - 1; i >= 0; i--) {
83
+ // `fn` and `inner` are declared INSIDE the loop, so each layer closes
84
+ // over its own pair. Dart captures the variable rather than the value,
85
+ // and hoisting either would leave every layer calling the last one.
86
+ final fn = bindings[i].fn;
87
+ final inner = next;
88
+ next = (arg) => fn(inner, arg);
89
+ }
90
+ return next;
91
+ }
92
+
93
+ /// The winner and the losers on a provider point.
94
+ class Picked {
95
+ final Binding? winner;
96
+ final List<String> shadowed;
97
+ Picked(this.winner, this.shadowed);
98
+ }
99
+
100
+ /// At most one live implementation (section 6.3). The winner is the highest
101
+ /// band, ties broken by ref sort, and THE LOSERS ARE VISIBLE rather than
102
+ /// silently ignored.
103
+ Picked pointProvider(List<Binding> bindings, dynamic spec) {
104
+ if (bindings.isEmpty) return Picked(null, []);
105
+
106
+ if (t.truthy(t.get(spec, 'exclusive')) && bindings.length > 1) {
107
+ final refs = bindings.map((b) => b.ref).toList()..sort();
108
+ t.fail(
109
+ 'plugin_point_exclusive',
110
+ 'point is exclusive and has ${bindings.length} bindings: '
111
+ '${refs.join(', ')}',
112
+ {'refs': refs});
113
+ }
114
+
115
+ final ranked = t.stableSortBy(bindings, (b) => [-b.band, b.ref]);
116
+ return Picked(ranked[0], ranked.sublist(1).map((b) => b.ref).toList());
117
+ }
@@ -0,0 +1,105 @@
1
+ // VENDORED: @voxgig/plugin sdk-20260908-1556-0 (dart/lib/ref.dart)
2
+ // Source: https://github.com/voxgig/plugin @ 48392f5e2b6d1434ee9b1a4a9a11f4480aaeb46a [tag: sdk-20260908-1556-0]
3
+ // License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
4
+ /// Identity: name+tag, written `name$tag` (section 4).
5
+ ///
6
+ /// The four pure functions, and the whole of what `ref` pins. They are the
7
+ /// first thing a new port implements and the first corpus section it
8
+ /// passes.
9
+ library;
10
+
11
+ import 'types.dart' as t;
12
+
13
+ /// Section 4: `^[a-zA-Z@][a-zA-Z0-9.~_\-/]*$`, max 1024.
14
+ ///
15
+ /// `hasMatch` on an anchored pattern, and the anchors are `^` and `$`
16
+ /// WITHOUT `multiLine` - dart's `$` matches only at the end of input when
17
+ /// multiLine is off, so `'abc\n'` is rejected. Turning multiLine on here
18
+ /// would admit a ref grammar with a newline in it, which is the trap ruby
19
+ /// and java each document from the other side.
20
+ final _nameRe = RegExp(r'^[a-zA-Z@][a-zA-Z0-9.~_\-/]*$');
21
+
22
+ /// Section 4: `^[a-zA-Z0-9.~_-]+$`, max 1024, or empty.
23
+ ///
24
+ /// The asymmetry with a name is deliberate: a tag MAY start with a digit
25
+ /// because auto-tagging assigns integer tags (`stripe$1`), and a tag admits
26
+ /// neither `@` nor `/` because a name is a package specifier and a tag is
27
+ /// not.
28
+ final _tagRe = RegExp(r'^[a-zA-Z0-9.~_-]+$');
29
+
30
+ const refMax = 1024;
31
+
32
+ bool checkName(dynamic name) =>
33
+ name is String && name.isNotEmpty && name.length <= refMax &&
34
+ _nameRe.hasMatch(name);
35
+
36
+ bool checkTag(dynamic tag) {
37
+ if (tag is! String) return false;
38
+ // The empty tag is an ordinary tag (section 4 rule 2). The
39
+ // single-instance case writes no tag and never learns tags exist.
40
+ if (tag.isEmpty) return true;
41
+ return tag.length <= refMax && _tagRe.hasMatch(tag);
42
+ }
43
+
44
+ /// `name$tag` -> the pair. Canonicalizing: `stripe$` and `stripe` both give
45
+ /// tag ''.
46
+ Map<String, dynamic> parseRef(dynamic str) {
47
+ if (str is! String) t.fail('plugin_bad_name', 'ref must be a string');
48
+ // Split on the FIRST `$`. Nothing in the grammar decides this - `$` is in
49
+ // neither character class - so the corpus is the arbiter (section 4 rule
50
+ // 5), and it picks the split that blames the part actually at fault:
51
+ // `a$b$c` is a good name with a bad tag, not the reverse.
52
+ final cut = str.indexOf(r'$');
53
+ final name = cut < 0 ? str : str.substring(0, cut);
54
+ final tag = cut < 0 ? '' : str.substring(cut + 1);
55
+
56
+ if (!checkName(name)) {
57
+ t.fail('plugin_bad_name', 'invalid plugin name: $name', {'name': name});
58
+ }
59
+ if (!checkTag(tag)) {
60
+ t.fail('plugin_bad_tag', 'invalid plugin tag: $tag',
61
+ {'name': name, 'tag': tag});
62
+ }
63
+ return {'name': name, 'tag': tag};
64
+ }
65
+
66
+ /// The pair -> `name$tag`. An empty tag NEVER writes the separator, which
67
+ /// is the half of canonicalization `formatRef` owns: parse tolerates
68
+ /// `stripe$`, format never produces it, so a round trip is idempotent.
69
+ String formatRef(dynamic name, [dynamic tag]) {
70
+ final t2 = tag ?? '';
71
+ if (!checkName(name)) {
72
+ t.fail('plugin_bad_name', 'invalid plugin name: $name', {'name': name});
73
+ }
74
+ if (!checkTag(t2)) {
75
+ t.fail('plugin_bad_tag', 'invalid plugin tag: $t2',
76
+ {'name': name, 'tag': t2});
77
+ }
78
+ return (t2 as String).isEmpty ? name as String : '$name\$$t2';
79
+ }
80
+
81
+ /// The canonical spelling of a ref. Section 4 rule 5: ports must
82
+ /// canonicalize before comparison.
83
+ String canonRef(dynamic str) {
84
+ final r = parseRef(str);
85
+ return formatRef(r['name'], r['tag']);
86
+ }
87
+
88
+ /// `canonRef` for the internal callers that want the input back unchanged
89
+ /// when it is not well formed. NEVER use it where a bad ref must be
90
+ /// reported - the corpus pins plugin_bad_name at every public entry.
91
+ String canon(dynamic str) {
92
+ try {
93
+ return canonRef(str);
94
+ } on t.PluginError {
95
+ return str as String;
96
+ }
97
+ }
98
+
99
+ String refName(dynamic str) {
100
+ try {
101
+ return parseRef(str)['name'] as String;
102
+ } on t.PluginError {
103
+ return str as String;
104
+ }
105
+ }
@@ -0,0 +1,58 @@
1
+ // VENDORED: @voxgig/plugin sdk-20260908-1556-0 (dart/lib/resolve.dart)
2
+ // Source: https://github.com/voxgig/plugin @ 48392f5e2b6d1434ee9b1a4a9a11f4480aaeb46a [tag: sdk-20260908-1556-0]
3
+ // License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
4
+ /// Dynamic resolution (section 10.2) - name to candidate module ids.
5
+ ///
6
+ /// PURE. It returns the ids a host WOULD try, in order; it does not load
7
+ /// anything. That separation is what lets the corpus pin resolution in
8
+ /// every language including those with no dynamic loading at all, and it is
9
+ /// why section 15.4 puts real module loading in per-port integration tests
10
+ /// rather than here.
11
+ library;
12
+
13
+ import 'types.dart' as t;
14
+
15
+ const defaultSources = [
16
+ {
17
+ 'kind': 'module',
18
+ 'prefix': ['@voxgig/plugin-', 'voxgig-plugin-', 'plugin-', ''],
19
+ }
20
+ ];
21
+
22
+ List<String> resolveCandidates(String name, [dynamic sources]) {
23
+ // A SCOPED NAME RESOLVES VERBATIM ONLY (section 10.2). `@acme/thing` is
24
+ // already a package id; prefixing it produces
25
+ // `@voxgig/plugin-@acme/thing`, which is not a thing that can exist.
26
+ if (name.startsWith('@')) return [name];
27
+
28
+ final list = (sources == null || (sources as List).isEmpty)
29
+ ? defaultSources
30
+ : sources;
31
+ final out = <String>[];
32
+
33
+ for (final src in list) {
34
+ switch (t.get(src, 'kind')) {
35
+ case 'module':
36
+ var prefixes = t.get(src, 'prefix') as List?;
37
+ if (prefixes == null || prefixes.isEmpty) prefixes = [''];
38
+ for (final p in prefixes) {
39
+ final id = '$p$name';
40
+ if (!out.contains(id)) out.add(id);
41
+ }
42
+ break;
43
+ case 'path':
44
+ final dir = (t.get(src, 'dir') as String).replaceAll(RegExp(r'/+$'), '');
45
+ final id = '$dir/$name';
46
+ if (!out.contains(id)) out.add(id);
47
+ break;
48
+ }
49
+ }
50
+ return out;
51
+ }
52
+
53
+ /// A MODULE PATH IS NOT A NAME (section 10.2). The ref grammar starts a
54
+ /// name with a letter or `@`, so `./local/thing` is not a ref and never
55
+ /// reaches candidate generation - seneca allows a path where a plugin name
56
+ /// goes, and this design deliberately does not, because a ref is an ADDRESS
57
+ /// WITHIN A HOST and a path is a LOCATION ON A DISK.
58
+ List<dynamic> resolveFrom(dynamic from) => [from];
@@ -0,0 +1,201 @@
1
+ // VENDORED: @voxgig/plugin sdk-20260908-1556-0 (dart/lib/types.dart)
2
+ // Source: https://github.com/voxgig/plugin @ 48392f5e2b6d1434ee9b1a4a9a11f4480aaeb46a [tag: sdk-20260908-1556-0]
3
+ // License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
4
+ /// The value model, the error type, and the JSON writer.
5
+ ///
6
+ /// DART DRAWS ALMOST EVERY DISTINCTION THE MODEL NEEDS. `Map` is not
7
+ /// `List`, a map holds `null` as a value, `containsKey` separates an
8
+ /// authored null from an absent key, and `true == 1` is false. What it
9
+ /// does NOT give is a stable sort or an ordered map iteration that means
10
+ /// anything - see `stableSortBy` and `sortedKeys` below, both of which are
11
+ /// load-bearing rather than tidiness.
12
+ library;
13
+
14
+ /// Section 5.1's seven statuses, and no more.
15
+ const statuses = [
16
+ 'declared', 'loaded', 'pending', 'live', 'failed', 'loading', 'closing'
17
+ ];
18
+
19
+ /// Section 12's detail keys, in the order a message renders them. FIXED,
20
+ /// not the map's: a message is a searchable log line, and a line whose
21
+ /// fields move between runs is not.
22
+ const detailOrder = [
23
+ 'ref', 'point', 'name', 'key', 'spec', 'refs', 'kind', 'directive',
24
+ 'cycle', 'holders', 'cause'
25
+ ];
26
+
27
+ /// The value at a key, or null. Absence and null read the same here.
28
+ dynamic get(dynamic m, String k) => m is Map ? m[k] : null;
29
+
30
+ /// PRESENCE, which is what distinguishes an authored null from absence.
31
+ bool has(dynamic m, String k) => m is Map && m.containsKey(k);
32
+
33
+ /// The keys of a map, SORTED - every walk of a map goes through here.
34
+ ///
35
+ /// A dart `Map` literal is a `LinkedHashMap`, so iteration is INSERTION
36
+ /// order. That is deterministic within one run and meaningless across two:
37
+ /// a document parsed from different byte order, or a registry rebuilt in a
38
+ /// different sequence, iterates differently. Every walk sorts.
39
+ List<String> sortedKeys(dynamic m) {
40
+ if (m is! Map) return [];
41
+ final out = m.keys.map((k) => k as String).toList();
42
+ out.sort();
43
+ return out;
44
+ }
45
+
46
+ /// JSON truthiness: null and false, and nothing else, are false. Dart has
47
+ /// no truthiness of its own - `if (0)` does not compile - so this is where
48
+ /// the model's rule is written down.
49
+ bool truthy(dynamic v) => !(v == null || v == false);
50
+
51
+ /// An INTEGER, and only when the value is one. Section 7's band is an
52
+ /// integer the document wrote as one; `true` and `'2'` are not bands, and
53
+ /// dart's `is int` excludes both.
54
+ int? asInt(dynamic v) {
55
+ if (v is int) return v;
56
+ if (v is double && v == v.floorToDouble()) return v.toInt();
57
+ return null;
58
+ }
59
+
60
+ /// A STABLE sort by a comparable key.
61
+ ///
62
+ /// DART'S `List.sort` IS NOT STABLE, and it is not stable in practice
63
+ /// rather than merely in the documentation: sorting two hundred elements
64
+ /// by a two-valued key visibly reorders equal ones. Section 7's
65
+ /// comparators fall through to a `pos` or ref tie-break that javascript's
66
+ /// stable sort resolves BY POSITION, so without this a teardown order
67
+ /// changes between two runs of the same process.
68
+ List<T> stableSortBy<T>(List<T> list, List<Object> Function(T) keyOf) {
69
+ final decorated = <List<Object>>[];
70
+ for (var i = 0; i < list.length; i++) {
71
+ decorated.add([keyOf(list[i]), i]);
72
+ }
73
+ decorated.sort((a, b) {
74
+ final c = compareKeys(a[0] as List<Object>, b[0] as List<Object>);
75
+ return c != 0 ? c : (a[1] as int).compareTo(b[1] as int);
76
+ });
77
+ return decorated.map((d) => list[d[1] as int]).toList();
78
+ }
79
+
80
+ /// Compare two sort keys element by element. A key is a list of numbers,
81
+ /// strings and nested lists, which is what lets `rankKey` express "absent
82
+ /// version sorts last" as a leading flag rather than as a comparator.
83
+ int compareKeys(List<Object> a, List<Object> b) {
84
+ for (var i = 0; i < a.length && i < b.length; i++) {
85
+ final x = a[i], y = b[i];
86
+ final c = (x is List && y is List)
87
+ ? compareKeys(x.cast<Object>(), y.cast<Object>())
88
+ : (x as Comparable).compareTo(y);
89
+ if (c != 0) return c;
90
+ }
91
+ return a.length.compareTo(b.length);
92
+ }
93
+
94
+ /// JSON equality: same type, then same value.
95
+ ///
96
+ /// `true == 1` is false in dart, so the bool guard the other dynamic ports
97
+ /// need is not required here. `1 == 1.0` IS true, as it is in ruby and
98
+ /// javascript, and no corpus entry turns on the difference.
99
+ bool same(dynamic a, dynamic b) {
100
+ if (a is Map && b is Map) {
101
+ if (a.length != b.length) return false;
102
+ for (final k in a.keys) {
103
+ if (!b.containsKey(k) || !same(a[k], b[k])) return false;
104
+ }
105
+ return true;
106
+ }
107
+ if (a is List || b is List) {
108
+ if (a is! List || b is! List || a.length != b.length) return false;
109
+ for (var i = 0; i < a.length; i++) {
110
+ if (!same(a[i], b[i])) return false;
111
+ }
112
+ return true;
113
+ }
114
+ if (a is Map || b is Map) return false;
115
+ return a == b;
116
+ }
117
+
118
+ /// COMPACT JSON. A whole double renders without its fraction, so `1.0` and
119
+ /// `1` spell the same - the corpus writes both and a message quoting one
120
+ /// must not depend on which. Written here rather than taken from
121
+ /// `dart:convert` because `jsonEncode` walks a map in insertion order and
122
+ /// throws on a value it does not know, and this needs sorted keys and
123
+ /// `"(opaque)"`.
124
+ String encode(dynamic v) {
125
+ if (v == null) return 'null';
126
+ if (v is bool) return v ? 'true' : 'false';
127
+ if (v is int) return '$v';
128
+ if (v is double) return v == v.floorToDouble() ? '${v.toInt()}' : '$v';
129
+ if (v is String) return encodeString(v);
130
+ if (v is List) return '[${v.map(encode).join(',')}]';
131
+ if (v is Map) {
132
+ return '{${sortedKeys(v).map((k) => '${encodeString(k)}:${encode(v[k])}').join(',')}}';
133
+ }
134
+ return '"(opaque)"';
135
+ }
136
+
137
+ String encodeString(String s) {
138
+ final b = StringBuffer('"');
139
+ for (final c in s.codeUnits) {
140
+ switch (c) {
141
+ case 0x22: b.write('\\"'); break;
142
+ case 0x5c: b.write('\\\\'); break;
143
+ case 0x0a: b.write('\\n'); break;
144
+ case 0x0d: b.write('\\r'); break;
145
+ case 0x09: b.write('\\t'); break;
146
+ default:
147
+ if (c < 0x20) {
148
+ b.write('\\u${c.toRadixString(16).padLeft(4, '0')}');
149
+ } else {
150
+ b.writeCharCode(c);
151
+ }
152
+ }
153
+ }
154
+ b.write('"');
155
+ return b.toString();
156
+ }
157
+
158
+ /// Every error carries a section 12 code. Ports compare by CODE and never
159
+ /// by message: wording is a port's own business, and pinning the words
160
+ /// would make every translation a corpus change. The FORMAT, however, is
161
+ /// pinned - a parseable message is what makes a log searchable across
162
+ /// twenty languages.
163
+ class PluginError implements Exception {
164
+ final String code;
165
+ final String text;
166
+ final Map<String, dynamic> details;
167
+ final String message;
168
+
169
+ PluginError(this.code, this.text, this.details)
170
+ : message = formatError(code, text, details);
171
+
172
+ @override
173
+ String toString() => message;
174
+ }
175
+
176
+ /// `plugin/<code>: <text> [<key>=<value> ...]`
177
+ ///
178
+ /// Values render as COMPACT JSON, so a value containing a space or a
179
+ /// bracket cannot break the parse, and a list renders as a JSON array. The
180
+ /// bracket is absent entirely when no field applies.
181
+ String formatError(String code, String text, Map<String, dynamic> details) {
182
+ final parts = detailOrder
183
+ .where((k) => details.containsKey(k))
184
+ .map((k) => '$k=${encode(details[k])}')
185
+ .toList();
186
+ final tail = parts.isEmpty ? '' : ' [${parts.join(' ')}]';
187
+ return 'plugin/$code: $text$tail';
188
+ }
189
+
190
+ /// Throw a section 12 error. One spelling, so every raise site reads the
191
+ /// same.
192
+ Never fail(String code, String text, [Map<String, dynamic>? details]) {
193
+ throw PluginError(code, text, details ?? {});
194
+ }
195
+
196
+ /// The section 12 code of an error, or '' for one this library did not
197
+ /// throw. The corpus compares by code, so the driver needs one place that
198
+ /// knows how to read it.
199
+ String codeOf(Object e) => e is PluginError ? e.code : '';
200
+
201
+ String messageOf(Object e) => e is PluginError ? e.message : '$e';