@runlith/tagma 0.0.0-stage → 0.2.3

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 (342) hide show
  1. package/adapter/claudeHooks.d.ts +10 -0
  2. package/adapter/claudeHooks.js +4 -0
  3. package/adapter/declaration.d.ts +14 -0
  4. package/adapter/declaration.js +2 -0
  5. package/adapter/harness.d.ts +454 -0
  6. package/adapter/harness.js +2 -0
  7. package/adapter/hook.d.ts +43 -0
  8. package/adapter/hook.js +2 -0
  9. package/adapter/hostModules.d.ts +19 -0
  10. package/adapter/hostModules.js +2 -0
  11. package/adapter/loader.d.ts +10 -0
  12. package/adapter/loader.js +2 -0
  13. package/adapter/metadata.d.ts +179 -0
  14. package/adapter/metadata.js +4 -0
  15. package/adapter/payload.d.ts +19 -0
  16. package/adapter/payload.js +3 -0
  17. package/adapter/provider.d.ts +209 -0
  18. package/adapter/provider.js +2 -0
  19. package/adapter/settings.d.ts +182 -0
  20. package/adapter/settings.js +2 -0
  21. package/adapter/speech.d.ts +4 -0
  22. package/adapter/speech.js +2 -0
  23. package/host.d.ts +61223 -0
  24. package/package.json +134 -3
  25. package/plugin/Held-cvetk2wg.js +6 -0
  26. package/plugin/accountKey-t44g9avw.js +2 -0
  27. package/plugin/adapter-qdnpxs6n.js +1 -0
  28. package/plugin/anthropic-a4pdzrv2.js +2 -0
  29. package/plugin/anthropic-messages-svq0svwe.js +2 -0
  30. package/plugin/anthropic-q1xa9n0j.js +2 -0
  31. package/plugin/auth-cp8wnd0z.js +2 -0
  32. package/plugin/authStatus-d6scztz5.js +2 -0
  33. package/plugin/bundling.d.ts +30 -0
  34. package/plugin/bundling.js +2 -0
  35. package/plugin/cacheLifetime-c5mpw676.js +2 -0
  36. package/plugin/callback-server-q2asby82.js +16 -0
  37. package/plugin/capabilities-jfhf61dt.js +2 -0
  38. package/plugin/claudeHooks-edpg1e46.js +3 -0
  39. package/plugin/cli.js +21 -0
  40. package/plugin/cliStore-5s0qerr7.js +2 -0
  41. package/plugin/clientSession-tmmxm39z.js +2 -0
  42. package/plugin/codec-aa8mxqyr.js +1 -0
  43. package/plugin/connect-d7ec6kfh.js +2 -0
  44. package/plugin/contract-qn0z7r9c.js +1 -0
  45. package/plugin/credential-garn07qc.js +2 -0
  46. package/plugin/deepseek-fvdrmjr9.js +2 -0
  47. package/plugin/deepseek-sp4vxjqy.js +2 -0
  48. package/plugin/definition-0h3gqd2z.js +2 -0
  49. package/plugin/description-8xhxryaq.js +2 -0
  50. package/plugin/deviceGrant-axpyc7xr.js +2 -0
  51. package/plugin/devin-hy98d305.js +2 -0
  52. package/plugin/duplex-yexjcpv2.js +2 -0
  53. package/plugin/endpoint-0b9bsb4q.js +2 -0
  54. package/plugin/errors-kck87dpv.js +2 -0
  55. package/plugin/events-81m69vqz.js +2 -0
  56. package/plugin/events-s95ybm4g.js +2 -0
  57. package/plugin/executor-avear8af.js +2 -0
  58. package/plugin/failure-ddv4456n.js +2 -0
  59. package/plugin/framing-jnd2zm0h.js +2 -0
  60. package/plugin/grant-85r3bbqn.js +2 -0
  61. package/plugin/harness-jm3fhnwg.js +2 -0
  62. package/plugin/headers-w6p5sp18.js +2 -0
  63. package/plugin/hook-hjrk83m8.js +2 -0
  64. package/plugin/icon-044pa3y8.js +6 -0
  65. package/plugin/icon-j22svmgp.js +4 -0
  66. package/plugin/icon-ny6qbjvc.js +4 -0
  67. package/plugin/icon-pz54e8n3.js +4 -0
  68. package/plugin/icon-qy92jx2b.js +4 -0
  69. package/plugin/ids-2dndaq8y.js +2 -0
  70. package/plugin/images-s2kqebfv.js +2 -0
  71. package/plugin/index-b3yp4szm.js +2 -0
  72. package/plugin/index-xs7nfsck.js +2 -0
  73. package/plugin/lifecycle-er51apxp.js +2 -0
  74. package/plugin/manual-2mdscj84.js +2 -0
  75. package/plugin/messages-gmwcg1pq.js +2 -0
  76. package/plugin/metadata-gpazs3f5.js +4 -0
  77. package/plugin/muse-g8bc58v8.js +2 -0
  78. package/plugin/muse-tfe6sph7.js +2 -0
  79. package/plugin/museToolSchema-tbe0f3wa.js +2 -0
  80. package/plugin/notes-5m0m3pdr.js +2 -0
  81. package/plugin/object-9pjtdam7.js +2 -0
  82. package/plugin/open-browser-vqb7ckt1.js +2 -0
  83. package/plugin/openai-6f50tf64.js +2 -0
  84. package/plugin/openai-compatible-chat-eez8hkge.js +2 -0
  85. package/plugin/openai-images-haszbnft.js +2 -0
  86. package/plugin/openai-mfqwg6pa.js +2 -0
  87. package/plugin/openai-responses-1gpyp640.js +2 -0
  88. package/plugin/opencodeGo-1wgdjtjz.js +3 -0
  89. package/plugin/opencodeGo-qgw3pfg6.js +2 -0
  90. package/plugin/options-476akxaj.js +2 -0
  91. package/plugin/payload-2gr4q9g8.js +2 -0
  92. package/plugin/pkce-y3sh5pk8.js +2 -0
  93. package/plugin/plugin-0e34qaar.js +3 -0
  94. package/plugin/plugin-1vpp5mqk.js +4 -0
  95. package/plugin/plugin-1zkx860n.js +3 -0
  96. package/plugin/plugin-217mw9ck.js +3 -0
  97. package/plugin/plugin-24j9hnc7.js +3 -0
  98. package/plugin/plugin-2s6bq45c.js +3 -0
  99. package/plugin/plugin-3969dy0b.js +3 -0
  100. package/plugin/plugin-3b8x73y6.js +3 -0
  101. package/plugin/plugin-3t0qp574.js +3 -0
  102. package/plugin/plugin-55fbx586.js +3 -0
  103. package/plugin/plugin-5zq084fb.js +3 -0
  104. package/plugin/plugin-6a56xsx3.js +3 -0
  105. package/plugin/plugin-6vzw5yyr.js +3 -0
  106. package/plugin/plugin-72xxqm1t.js +3 -0
  107. package/plugin/plugin-7swap1ad.js +3 -0
  108. package/plugin/plugin-7te9b50h.js +3 -0
  109. package/plugin/plugin-7xmwhj5h.js +3 -0
  110. package/plugin/plugin-80gqwmjy.js +3 -0
  111. package/plugin/plugin-8g8myq9g.js +3 -0
  112. package/plugin/plugin-8q44b578.js +3 -0
  113. package/plugin/plugin-8v4g0q0b.js +3 -0
  114. package/plugin/plugin-8x3c401q.js +9 -0
  115. package/plugin/plugin-92sxs4r1.js +3 -0
  116. package/plugin/plugin-9gha9fx3.js +3 -0
  117. package/plugin/plugin-9zbh7788.js +3 -0
  118. package/plugin/plugin-a3vzpk4e.js +3 -0
  119. package/plugin/plugin-ak62rhwz.js +3 -0
  120. package/plugin/plugin-azkzdkpk.js +3 -0
  121. package/plugin/plugin-cydz2zhy.js +3 -0
  122. package/plugin/plugin-d28d8jar.js +4 -0
  123. package/plugin/plugin-dd951075.js +3 -0
  124. package/plugin/plugin-dqxdznvd.js +3 -0
  125. package/plugin/plugin-dsjq4tye.js +3 -0
  126. package/plugin/plugin-e5ybk2a2.js +3 -0
  127. package/plugin/plugin-eksq91yp.js +5 -0
  128. package/plugin/plugin-er1kc6f6.js +5 -0
  129. package/plugin/plugin-fjsmz1vy.js +4 -0
  130. package/plugin/plugin-fre9hdcg.js +3 -0
  131. package/plugin/plugin-g0zv4vrz.js +3 -0
  132. package/plugin/plugin-g4hst0jz.js +3 -0
  133. package/plugin/plugin-g7hrtg2p.js +3 -0
  134. package/plugin/plugin-gh857xdd.js +3 -0
  135. package/plugin/plugin-hkjxkgty.js +3 -0
  136. package/plugin/plugin-jxvmq18y.js +3 -0
  137. package/plugin/plugin-kc4z9msd.js +3 -0
  138. package/plugin/plugin-krbbb4ts.js +3 -0
  139. package/plugin/plugin-me00x60n.js +3 -0
  140. package/plugin/plugin-mqr325kz.js +3 -0
  141. package/plugin/plugin-nzacjxf9.js +3 -0
  142. package/plugin/plugin-p59gy5xd.js +3 -0
  143. package/plugin/plugin-p6x7emar.js +3 -0
  144. package/plugin/plugin-pdww1ma8.js +3 -0
  145. package/plugin/plugin-psj9935q.js +3 -0
  146. package/plugin/plugin-q6pvb1xf.js +3 -0
  147. package/plugin/plugin-r342d8zf.js +3 -0
  148. package/plugin/plugin-r7g3vqrm.js +3 -0
  149. package/plugin/plugin-rrgyjesv.js +3 -0
  150. package/plugin/plugin-t4xrq5q2.js +3 -0
  151. package/plugin/plugin-tetj2cr3.js +3 -0
  152. package/plugin/plugin-v80m00bq.js +14 -0
  153. package/plugin/plugin-vfjhxng8.js +3 -0
  154. package/plugin/plugin-vqrd05eg.js +3 -0
  155. package/plugin/plugin-w3zbkmy6.js +3 -0
  156. package/plugin/plugin-w8f977my.js +3 -0
  157. package/plugin/plugin-xbnw80pk.js +3 -0
  158. package/plugin/plugin-xfcgt5ba.js +36 -0
  159. package/plugin/plugin-y9cdpmbv.js +6 -0
  160. package/plugin/plugin-yg0h5k5d.js +3 -0
  161. package/plugin/plugin-yp736z4n.js +3 -0
  162. package/plugin/plugin-zrb8bbr4.js +3 -0
  163. package/plugin/plugin-zsv7wawc.js +3 -0
  164. package/plugin/plugin.d.ts +175 -0
  165. package/plugin/plugin.js +2 -0
  166. package/plugin/points.generated.d.ts +341 -0
  167. package/plugin/points.generated.js +2 -0
  168. package/plugin/process.d.ts +4 -0
  169. package/plugin/process.js +85 -0
  170. package/plugin/protocol-8c26dk6v.js +2 -0
  171. package/plugin/protocol.d.ts +115 -0
  172. package/plugin/protocol.js +2 -0
  173. package/plugin/provider-0b7xxyhn.js +2 -0
  174. package/plugin/quota-v63yvp13.js +2 -0
  175. package/plugin/quotaRead-esmjycnd.js +2 -0
  176. package/plugin/reasoning-1saw6tds.js +2 -0
  177. package/plugin/record-1m3vvy60.js +2 -0
  178. package/plugin/requests-2zyr1g8e.js +1 -0
  179. package/plugin/responseFold-xxhqx4sa.js +2 -0
  180. package/plugin/settings-8xq8dvhp.js +2 -0
  181. package/plugin/shared-4jndfh28.js +2 -0
  182. package/plugin/speech-067caz1a.js +2 -0
  183. package/plugin/stepfun-3en5g41d.js +2 -0
  184. package/plugin/stepfun-xp1c5wpk.js +2 -0
  185. package/plugin/stream-8yrr289z.js +2 -0
  186. package/plugin/svelteProgram-73v9yajk.js +2 -0
  187. package/plugin/synthesisDuplex-ch9jhqzt.js +2 -0
  188. package/plugin/template.d.ts +14 -0
  189. package/plugin/template.js +2 -0
  190. package/plugin/testing.d.ts +85 -0
  191. package/plugin/testing.js +4 -0
  192. package/plugin/tool-content-vean6rqa.js +2 -0
  193. package/plugin/tool-stream-fb180jmt.js +2 -0
  194. package/plugin/transport-j784dsdr.js +2 -0
  195. package/plugin/ui.generated.d.ts +1041 -0
  196. package/plugin/value.d.ts +8 -0
  197. package/plugin/value.js +2 -0
  198. package/plugin/vendor-pn6b5a8f.js +2 -0
  199. package/plugin/vendorCall-6n5chrn0.js +2 -0
  200. package/plugin/vendorCall-82evk8b3.js +2 -0
  201. package/plugin/vendorPayload-458354fv.js +2 -0
  202. package/plugin/vendorWeb-cz5t01m7.js +2 -0
  203. package/plugin/verbatim-2f2d9n02.js +2 -0
  204. package/plugin/xai-2cqraa99.js +2 -0
  205. package/plugin/xai-e8sbtk6a.js +2 -0
  206. package/rules/effect.d.ts +55 -0
  207. package/rules/effect.js +11 -0
  208. package/rules/rules.d.ts +342 -0
  209. package/rules/rules.js +50 -0
  210. package/types/node/assert/strict.d.ts +12 -0
  211. package/types/node/assert.d.ts +76 -0
  212. package/types/node/async_hooks.d.ts +113 -0
  213. package/types/node/buffer.buffer.d.ts +29 -0
  214. package/types/node/buffer.d.ts +162 -0
  215. package/types/node/child_process.d.ts +337 -0
  216. package/types/node/cluster.d.ts +118 -0
  217. package/types/node/compatibility/iterators.d.ts +11 -0
  218. package/types/node/console.d.ts +48 -0
  219. package/types/node/constants.d.ts +8 -0
  220. package/types/node/crypto.d.ts +847 -0
  221. package/types/node/dgram.d.ts +88 -0
  222. package/types/node/diagnostics_channel.d.ts +61 -0
  223. package/types/node/dns/promises.d.ts +94 -0
  224. package/types/node/dns.d.ts +276 -0
  225. package/types/node/domain.d.ts +17 -0
  226. package/types/node/events.d.ts +138 -0
  227. package/types/node/fs/promises.d.ts +253 -0
  228. package/types/node/fs.d.ts +1038 -0
  229. package/types/node/globals.d.ts +73 -0
  230. package/types/node/globals.typedarray.d.ts +22 -0
  231. package/types/node/http.d.ts +530 -0
  232. package/types/node/http2.d.ts +794 -0
  233. package/types/node/https.d.ts +66 -0
  234. package/types/node/index.d.ts +84 -0
  235. package/types/node/inspector/promises.d.ts +13 -0
  236. package/types/node/inspector.d.ts +61 -0
  237. package/types/node/inspector.generated.d.ts +1624 -0
  238. package/types/node/module.d.ts +187 -0
  239. package/types/node/net.d.ts +266 -0
  240. package/types/node/os.d.ts +236 -0
  241. package/types/node/path/posix.d.ts +8 -0
  242. package/types/node/path/win32.d.ts +8 -0
  243. package/types/node/path.d.ts +40 -0
  244. package/types/node/perf_hooks.d.ts +236 -0
  245. package/types/node/process.d.ts +436 -0
  246. package/types/node/punycode.d.ts +15 -0
  247. package/types/node/querystring.d.ts +22 -0
  248. package/types/node/quic.d.ts +203 -0
  249. package/types/node/readline/promises.d.ts +28 -0
  250. package/types/node/readline.d.ts +94 -0
  251. package/types/node/repl.d.ts +104 -0
  252. package/types/node/sea.d.ts +11 -0
  253. package/types/node/sqlite.d.ts +183 -0
  254. package/types/node/stream/consumers.d.ts +13 -0
  255. package/types/node/stream/iter.d.ts +240 -0
  256. package/types/node/stream/promises.d.ts +37 -0
  257. package/types/node/stream/web.d.ts +297 -0
  258. package/types/node/stream.d.ts +378 -0
  259. package/types/node/string_decoder.d.ts +10 -0
  260. package/types/node/test/reporters.d.ts +66 -0
  261. package/types/node/test.d.ts +462 -0
  262. package/types/node/timers/promises.d.ts +16 -0
  263. package/types/node/timers.d.ts +43 -0
  264. package/types/node/tls.d.ts +279 -0
  265. package/types/node/trace_events.d.ts +16 -0
  266. package/types/node/ts5.6/buffer.buffer.d.ts +26 -0
  267. package/types/node/ts5.6/compatibility/float16array.d.ts +43 -0
  268. package/types/node/ts5.6/globals.typedarray.d.ts +22 -0
  269. package/types/node/ts5.6/index.d.ts +84 -0
  270. package/types/node/ts5.7/compatibility/float16array.d.ts +50 -0
  271. package/types/node/ts5.7/index.d.ts +84 -0
  272. package/types/node/tty.d.ts +61 -0
  273. package/types/node/url.d.ts +165 -0
  274. package/types/node/util/types.d.ts +49 -0
  275. package/types/node/util.d.ts +320 -0
  276. package/types/node/v8.d.ts +178 -0
  277. package/types/node/vm.d.ts +130 -0
  278. package/types/node/wasi.d.ts +26 -0
  279. package/types/node/web-globals/abortcontroller.d.ts +47 -0
  280. package/types/node/web-globals/blob.d.ts +34 -0
  281. package/types/node/web-globals/console.d.ts +7 -0
  282. package/types/node/web-globals/crypto.d.ts +46 -0
  283. package/types/node/web-globals/domexception.d.ts +74 -0
  284. package/types/node/web-globals/encoding.d.ts +16 -0
  285. package/types/node/web-globals/events.d.ts +111 -0
  286. package/types/node/web-globals/fetch.d.ts +121 -0
  287. package/types/node/web-globals/importmeta.d.ts +11 -0
  288. package/types/node/web-globals/messaging.d.ts +32 -0
  289. package/types/node/web-globals/navigator.d.ts +28 -0
  290. package/types/node/web-globals/performance.d.ts +71 -0
  291. package/types/node/web-globals/storage.d.ts +26 -0
  292. package/types/node/web-globals/streams.d.ts +162 -0
  293. package/types/node/web-globals/timers.d.ts +22 -0
  294. package/types/node/web-globals/url.d.ts +27 -0
  295. package/types/node/worker_threads.d.ts +199 -0
  296. package/types/node/zlib/iter.d.ts +49 -0
  297. package/types/node/zlib.d.ts +360 -0
  298. package/types/undici/agent.d.ts +24 -0
  299. package/types/undici/api.d.ts +19 -0
  300. package/types/undici/balanced-pool.d.ts +16 -0
  301. package/types/undici/cache-interceptor.d.ts +98 -0
  302. package/types/undici/cache.d.ts +30 -0
  303. package/types/undici/client-stats.d.ts +9 -0
  304. package/types/undici/client.d.ts +61 -0
  305. package/types/undici/connector.d.ts +37 -0
  306. package/types/undici/content-type.d.ts +9 -0
  307. package/types/undici/cookies.d.ts +22 -0
  308. package/types/undici/diagnostics-channel.d.ts +72 -0
  309. package/types/undici/dispatcher.d.ts +207 -0
  310. package/types/undici/env-http-proxy-agent.d.ts +15 -0
  311. package/types/undici/errors.d.ts +117 -0
  312. package/types/undici/eventsource.d.ts +39 -0
  313. package/types/undici/fetch.d.ts +122 -0
  314. package/types/undici/formdata.d.ts +24 -0
  315. package/types/undici/global-dispatcher.d.ts +4 -0
  316. package/types/undici/global-origin.d.ts +3 -0
  317. package/types/undici/h2c-client.d.ts +35 -0
  318. package/types/undici/handlers.d.ts +7 -0
  319. package/types/undici/header.d.ts +10 -0
  320. package/types/undici/index.d.ts +85 -0
  321. package/types/undici/interceptors.d.ts +70 -0
  322. package/types/undici/mock-agent.d.ts +43 -0
  323. package/types/undici/mock-call-history.d.ts +57 -0
  324. package/types/undici/mock-client.d.ts +17 -0
  325. package/types/undici/mock-errors.d.ts +9 -0
  326. package/types/undici/mock-interceptor.d.ts +60 -0
  327. package/types/undici/mock-pool.d.ts +17 -0
  328. package/types/undici/patch.d.ts +21 -0
  329. package/types/undici/pool-stats.d.ts +11 -0
  330. package/types/undici/pool.d.ts +25 -0
  331. package/types/undici/proxy-agent.d.ts +22 -0
  332. package/types/undici/readable.d.ts +24 -0
  333. package/types/undici/retry-agent.d.ts +6 -0
  334. package/types/undici/retry-handler.d.ts +41 -0
  335. package/types/undici/round-robin-pool.d.ts +25 -0
  336. package/types/undici/snapshot-agent.d.ts +98 -0
  337. package/types/undici/socks5-proxy-agent.d.ts +17 -0
  338. package/types/undici/util.d.ts +4 -0
  339. package/types/undici/utility.d.ts +2 -0
  340. package/types/undici/webidl.d.ts +121 -0
  341. package/types/undici/websocket.d.ts +130 -0
  342. package/README.md +0 -3
@@ -0,0 +1,8 @@
1
+ /// <reference path="../types/node/index.d.ts" />
2
+ /// <reference path="../host.d.ts" />
3
+ export type ToolResult = {
4
+ readonly text: string;
5
+ readonly structuredContent?: Readonly<Record<string, unknown>>;
6
+ };
7
+ export declare const toolResultOf: (value: unknown) => ToolResult;
8
+ export declare const toolValueOf: (text: string, structuredContent?: unknown) => unknown;
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{_g,fR}from"./plugin-w8f977my.js";export{_g as toolResultOf,fR as toolValueOf};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ var t=(e)=>e;export{t as subscriptionAccounts};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{js}from"./plugin-krbbb4ts.js";export{js as VENDOR_CALL_TIMEOUT_MS};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{uk,Gg,lk,Fl}from"./plugin-0e34qaar.js";import"./plugin-dqxdznvd.js";import"./plugin-w3zbkmy6.js";import"./plugin-6vzw5yyr.js";import"./plugin-d28d8jar.js";import"./plugin-7te9b50h.js";import"./plugin-krbbb4ts.js";import"./plugin-72xxqm1t.js";import"./plugin-me00x60n.js";import"./plugin-q6pvb1xf.js";import"./plugin-v80m00bq.js";export{Fl as runFlow,uk as vendorCall,Gg as vendorCallOrFail,lk as vendorWire};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Xn,Jg,ka,uc,dk,gf,yf,Kg}from"./plugin-dqxdznvd.js";import"./plugin-krbbb4ts.js";import"./plugin-72xxqm1t.js";import"./plugin-v80m00bq.js";export{Xn as OAuthFlowFailed,dk as oauthErrorSchema,uc as oauthFailure,yf as parseVendorPayload,Kg as readOAuthError,ka as readableVendorAnswer,gf as vendorSeconds,Jg as withOAuthVendorCallTimeout};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{tf,z_}from"./plugin-9zbh7788.js";import"./plugin-v80m00bq.js";export{tf as WebRefused,z_ as mapWebTools};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{e_,t_,n_,Ma}from"./plugin-w3zbkmy6.js";import"./plugin-6vzw5yyr.js";import"./plugin-d28d8jar.js";import"./plugin-7te9b50h.js";import"./plugin-me00x60n.js";import"./plugin-q6pvb1xf.js";import"./plugin-v80m00bq.js";export{e_ as RequestOptions,t_ as head,Ma as layer,n_ as verbatimHttpClient};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./plugin-v80m00bq.js";import"./plugin-d28d8jar.js";import"./plugin-me00x60n.js";import"./plugin-q6pvb1xf.js";import"./plugin-7te9b50h.js";import"./plugin-6vzw5yyr.js";import"./plugin-3t0qp574.js";import"./plugin-g4hst0jz.js";import"./plugin-8q44b578.js";import"./plugin-72xxqm1t.js";import"./plugin-y9cdpmbv.js";import"./plugin-a3vzpk4e.js";import"./plugin-yp736z4n.js";import"./plugin-g7hrtg2p.js";import"./plugin-24j9hnc7.js";import"./plugin-r7g3vqrm.js";import"./plugin-p6x7emar.js";import"./plugin-w3zbkmy6.js";import"./plugin-krbbb4ts.js";import"./plugin-e5ybk2a2.js";import"./plugin-fjsmz1vy.js";import"./plugin-7xmwhj5h.js";import"./plugin-pdww1ma8.js";import"./plugin-7swap1ad.js";import"./plugin-psj9935q.js";import{Rs,as}from"./plugin-zrb8bbr4.js";import"./plugin-zsv7wawc.js";import"./plugin-2s6bq45c.js";import{am,cm}from"./plugin-ak62rhwz.js";import{Hn}from"./plugin-dd951075.js";import{Is}from"./plugin-fre9hdcg.js";import{Yn}from"./plugin-g0zv4vrz.js";import"./plugin-kc4z9msd.js";import{r}from"./plugin-xfcgt5ba.js";var l="https://api.x.ai/v1",e=32000,t={fromHeaders:()=>null,read:Is},a="The model is currently at capacity due to high demand",p=(o)=>o.code===void 0&&o.message.startsWith(a)?{retryable:!0}:null;function u(o){return Rs({store:!1,reasoningEffort:Yn(o.rung),parallelToolCalls:o.parallelToolCalls})}var m={output:{budget:e,sent:!0},model:(o)=>r(f(o.model,am,Hn(o.credentials,o.ownerId,am,o.account).bearer(),t)),options:u};function f(o,i,s,n){return as.with({provider:i,quota:n.fromHeaders,refusals:p,endpoint:{baseURL:l},limits:{output:e},auth:s}).model({id:o})}var h={...cm,profile:m,quota:t};export{l as XAI_BASE_URL,e as XAI_OUTPUT_RESERVATION,h as xaiConsoleRegistration,f as xaiModel,u as xaiOptions,p as xaiRefusals};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{am,L_,pw,cm,D_}from"./plugin-ak62rhwz.js";export{L_ as DEFAULT_XAI_MODEL,am as XAI_PROVIDER,pw as XAI_SPECS,cm as xaiConsoleDescription,D_ as xaiVendor};
@@ -0,0 +1,55 @@
1
+ import type { Builtin } from './rules.js';
2
+ export type SwallowedFailuresParams = {
3
+ /** The directory the entries are relative to, from the repository root, with no leading or trailing `/`; empty for the root itself. Default: `""`. */
4
+ readonly base?: string;
5
+ /** The directory prefixes, relative to `base`, whose selected files are judged; every entry ends in `/`. */
6
+ readonly region: readonly [string, ...string[]];
7
+ /** The files read; absent, every file of the inspection’s languages. */
8
+ readonly files?: {
9
+ /** The file extensions read; a changed file with any other is neither read nor failed. Default: `[".ts",".mts",".cts",".tsx",".js",".mjs",".cjs",".jsx",".svelte"]`. */
10
+ readonly extensions?: readonly ('.ts' | '.mts' | '.cts' | '.tsx' | '.js' | '.mjs' | '.cjs' | '.jsx' | '.svelte')[];
11
+ /** Glob patterns matched against the path relative to `base`; a matching file is neither read nor failed. Default: `[]`. */
12
+ readonly exclude?: readonly string[];
13
+ };
14
+ /** Exact allowances: the file relative to `base`, the owning symbol, the form and the site, each with its one-line reason. Default: `[]`. */
15
+ readonly allow?: readonly ({
16
+ readonly path: string;
17
+ /** The owning declaration: a top-level name, or `Top.inner` for the nearest named declaration inside it; `(top)` for a module-level statement. */
18
+ readonly symbol: string;
19
+ readonly form: 'catch' | 'catchEager' | 'catchCause' | 'orElseSucceed' | 'ignore' | 'ignoreCause' | 'catchTag' | 'catchTags' | 'catchReason' | 'catchReasons' | 'catchIf' | 'catchFilter' | 'failureConditional' | 'failureReturn' | 'getOrElse' | 'optionGetOrElse' | 'match';
20
+ /** The site as a violation or an unjudged entry prints it: eight hex digits of the whitespace-normalized recovery form, with nested function bodies omitted except the recovery itself, so an edited fallback needs its reason declared again. */
21
+ readonly site: string;
22
+ readonly why: string;
23
+ })[];
24
+ };
25
+ export type CallServicesParams = {
26
+ /** The directory the entries are relative to, from the repository root, with no leading or trailing `/`; empty for the root itself. Default: `""`. */
27
+ readonly base?: string;
28
+ /** The directory prefixes, relative to `base`, whose selected files are judged; every entry ends in `/`. */
29
+ readonly region: readonly [string, ...string[]];
30
+ /** The files read; absent, every file of the inspection’s languages. */
31
+ readonly files?: {
32
+ /** The file extensions read; a changed file with any other is neither read nor failed. Default: `[".ts",".mts",".cts",".tsx",".js",".mjs",".cjs",".jsx",".svelte"]`. */
33
+ readonly extensions?: readonly ('.ts' | '.mts' | '.cts' | '.tsx' | '.js' | '.mjs' | '.cjs' | '.jsx' | '.svelte')[];
34
+ /** Glob patterns matched against the path relative to `base`; a matching file is neither read nor failed. Default: `[]`. */
35
+ readonly exclude?: readonly string[];
36
+ };
37
+ /** The call-service tags, each by the file relative to `base` that declares it and its exported name. */
38
+ readonly tags: readonly [
39
+ {
40
+ readonly path: string;
41
+ /** The exported name the file declares the tag under. */
42
+ readonly symbol: string;
43
+ },
44
+ ...{
45
+ readonly path: string;
46
+ readonly symbol: string;
47
+ }[]
48
+ ];
49
+ /** The directories (ending in `/`) and files, relative to `base`, that may provide the tags. */
50
+ readonly allow: readonly string[];
51
+ };
52
+ export declare const Effect: {
53
+ noSwallowedFailures: (params: SwallowedFailuresParams) => Builtin<"swallowed-failures", SwallowedFailuresParams>;
54
+ servicesOnlyIn: (params: CallServicesParams) => Builtin<"call-services", CallServicesParams>;
55
+ };
@@ -0,0 +1,11 @@
1
+ // src/rules/effect.ts
2
+ var Effect = {
3
+ noSwallowedFailures: (params) => ({
4
+ builtin: "swallowed-failures",
5
+ params
6
+ }),
7
+ servicesOnlyIn: (params) => ({ builtin: "call-services", params })
8
+ };
9
+ export {
10
+ Effect
11
+ };
@@ -0,0 +1,342 @@
1
+ export type ModulesParams = {
2
+ /** The directory the entries are relative to, from the repository root, with no leading or trailing `/`; empty for the root itself. Default: `""`. */
3
+ readonly base?: string;
4
+ /** Virtual framework specifiers with no source file in the tree, treated like external packages. An exact name matches itself; a name ending in `/*` matches its subpaths; `./name` matches that sibling import written in any directory. Resolved files still undergo module checks. */
5
+ readonly framework?: readonly string[];
6
+ /** Query suffixes a bundler reads off an import, such as `?raw`: a specifier ending in one is resolved and judged as the file it names without it. An undeclared query stays part of the path. */
7
+ readonly queries?: readonly string[];
8
+ /** The runtimes the judged code runs on: a specifier one of them names a built-in is the runtime’s own, never a package or a path. */
9
+ readonly runtimes?: readonly string[];
10
+ /** Directories a bundler resolves a `/`-leading `import.meta.glob` pattern from, such as a Vite project's `root`, each from the repository root with no leading or trailing `/`, empty for the root itself. A file resolves such a pattern from the deepest one holding it; a glob in a file none holds is named in `unjudged`. */
11
+ readonly roots?: readonly string[];
12
+ /** Exact built output files, relative to base, each with the tracked source that stands for it and the reason: an import landing on the output is judged at the source, and a config extending an output the tree lacks reads the source in its place. A missing source stays unresolved. */
13
+ readonly built?: readonly {
14
+ readonly output: string;
15
+ readonly source: string;
16
+ readonly why: string;
17
+ }[];
18
+ /** The infixes that mark a test file. A test belongs to its own path's module or, where no territory covers that path, to its subject's — its first name segment with its extension, `x.ts` for `x.store.test.ts`; absent, no file is a test. */
19
+ readonly tests?: readonly string[];
20
+ /** Whether the relations of the module map open to all code may close a cycle (`allow`) or must stand in an order (`refuse`); a `testing` relation closes none. Default: `"refuse"`. */
21
+ readonly cycles?: 'refuse' | 'allow';
22
+ /** Whether a selected file of the region no territory covers, and an import landing on a path no territory covers, is a violation (`refuse`) or left unjudged (`allow`). Default: `"refuse"`. */
23
+ readonly coverage?: 'refuse' | 'allow';
24
+ /** Whether a literal import aiming under `base` that lands on no listed path is a violation (`refuse`) or named in `unjudged` (`unjudged`). A load whose target is known only at run time is named in `unjudged` under either. Default: `"refuse"`. */
25
+ readonly unresolved?: 'refuse' | 'unjudged';
26
+ /** Which import spellings count: `from` clauses, what survives compilation including dynamic imports and globs (`runtime`), or both with type-position imports (`every`). Default: `"runtime"`. */
27
+ readonly reads?: 'from' | 'runtime' | 'every';
28
+ /** The conditions a workspace package's `exports` map is read under, besides `default`, which always matches; absent, `default` alone. Default: `[]`. */
29
+ readonly conditions?: readonly string[];
30
+ /** The files read; absent, every file of the inspection’s languages. */
31
+ readonly files?: {
32
+ /** The file extensions read; a changed file with any other is neither read nor failed. Default: `[".ts",".mts",".cts",".tsx",".js",".mjs",".cjs",".jsx",".svelte",".py",".pyi"]`. */
33
+ readonly extensions?: readonly ('.ts' | '.mts' | '.cts' | '.tsx' | '.js' | '.mjs' | '.cjs' | '.jsx' | '.svelte' | '.py' | '.pyi')[];
34
+ /** Glob patterns matched against the path relative to `base`; a matching file is neither read nor failed. Default: `[]`. */
35
+ readonly exclude?: readonly string[];
36
+ };
37
+ };
38
+ export type LoadsParams = {
39
+ /** The directory the entries are relative to, from the repository root, with no leading or trailing `/`; empty for the root itself. Default: `""`. */
40
+ readonly base?: string;
41
+ /** The directories and files, relative to `base`, whose runtime loads are judged, and the modules whose territory under `base` is. */
42
+ readonly from: readonly [
43
+ string | {
44
+ /** A module name: letters, digits, `.`, `_` and `-`, or a package name with its `@scope/`. */
45
+ readonly module: string;
46
+ },
47
+ ...(string | {
48
+ readonly module: string;
49
+ })[]
50
+ ];
51
+ /** What a selected file may not load at runtime, directly or through anything it loads. */
52
+ readonly refuses: readonly [string, ...string[]];
53
+ /** What may be loaded although a refused entry covers it; an allowed workspace package is followed into. The narrowest entry of `refuses` and `allows` covering a specifier decides it: the one with the longer path, and at an equal path the one ending in `/*`. Default: `[]`. */
54
+ readonly allows?: readonly string[];
55
+ /** Which loads are followed: what loads with the module — value and side-effect imports, re-exports and `require` (`static`) — or those and every `import()` call (`runtime`). A type-only import is never followed. Default: `"runtime"`. */
56
+ readonly reads?: 'static' | 'runtime';
57
+ /** The conditions a workspace package's `exports` map is read under, besides `default`, which always matches. Default: `[]`. */
58
+ readonly conditions?: readonly string[];
59
+ /** The runtimes the judged code runs on: a specifier one of them names a built-in is the runtime’s own, never a package or a path. */
60
+ readonly runtimes?: readonly string[];
61
+ /** Exact built output files, relative to base, each with the tracked source that stands for it and the reason: a tsconfig extending an output the tree lacks reads the source in its place, so its `paths` and `baseUrl` aliases resolve bare imports. */
62
+ readonly built?: readonly {
63
+ readonly output: string;
64
+ readonly source: string;
65
+ readonly why: string;
66
+ }[];
67
+ /** The files read; absent, every file of the inspection’s languages. */
68
+ readonly files?: {
69
+ /** The file extensions read; a changed file with any other is neither read nor failed. Default: `[".ts",".mts",".cts",".tsx",".js",".mjs",".cjs",".jsx",".svelte"]`. */
70
+ readonly extensions?: readonly ('.ts' | '.mts' | '.cts' | '.tsx' | '.js' | '.mjs' | '.cjs' | '.jsx' | '.svelte')[];
71
+ /** Glob patterns matched against the path relative to `base`; a matching file is neither read nor failed. Default: `[]`. */
72
+ readonly exclude?: readonly string[];
73
+ };
74
+ };
75
+ export type ReexportsParams = {
76
+ /** The directory the entries are relative to, from the repository root, with no leading or trailing `/`; empty for the root itself. Default: `""`. */
77
+ readonly base?: string;
78
+ /** Glob patterns matched against the path relative to `base`; a matching file may forward bindings, as a published library's entry does, and is not read. Default: `[]`. */
79
+ readonly allows?: readonly string[];
80
+ /** The files read; absent, every file of the inspection’s languages. */
81
+ readonly files?: {
82
+ /** The file extensions read; a changed file with any other is neither read nor failed. Default: `[".ts",".mts",".cts",".tsx",".js",".mjs",".cjs",".jsx",".svelte"]`. */
83
+ readonly extensions?: readonly ('.ts' | '.mts' | '.cts' | '.tsx' | '.js' | '.mjs' | '.cjs' | '.jsx' | '.svelte')[];
84
+ /** Glob patterns matched against the path relative to `base`; a matching file is neither read nor failed. Default: `[]`. */
85
+ readonly exclude?: readonly string[];
86
+ };
87
+ };
88
+ export type SizeParams = {
89
+ /** The directory the entries are relative to, from the repository root, with no leading or trailing `/`; empty for the root itself. Default: `""`. */
90
+ readonly base?: string;
91
+ /** The files read; absent, every file of the inspection’s languages. */
92
+ readonly files?: {
93
+ /** The file extensions read; a changed file with any other is neither read nor failed. Default: `[".ts",".mts",".cts",".tsx",".js",".mjs",".cjs",".jsx",".svelte",".py",".pyi"]`. */
94
+ readonly extensions?: readonly ('.ts' | '.mts' | '.cts' | '.tsx' | '.js' | '.mjs' | '.cjs' | '.jsx' | '.svelte' | '.py' | '.pyi')[];
95
+ /** Glob patterns matched against the path relative to `base`; a matching file is neither read nor failed. Default: `[]`. */
96
+ readonly exclude?: readonly string[];
97
+ };
98
+ /** The ceilings by glob; a file matching several is held to the lowest, and one matching none is not judged. */
99
+ readonly thresholds: readonly [
100
+ {
101
+ /** A glob matched against the path relative to `base`; a file it matches is held to `lines`. */
102
+ readonly glob: string;
103
+ /** What the language adapter measures in each file: `non-import` is its lines outside import statements, blank and comment lines included. Default: `"non-import"`. */
104
+ readonly metric?: 'non-import';
105
+ /** The ceiling on the metric: a file over it is a violation whose value is its measure. */
106
+ readonly lines: number;
107
+ },
108
+ ...{
109
+ readonly glob: string;
110
+ /** Default: `"non-import"`. */
111
+ readonly metric?: 'non-import';
112
+ readonly lines: number;
113
+ }[]
114
+ ];
115
+ };
116
+ export type Concern = "imports" | "loading" | "code" | "size";
117
+ export type FactKind = "imports" | "declarations";
118
+ export type Finding = {
119
+ readonly fingerprint: string;
120
+ readonly path: string;
121
+ readonly line?: number;
122
+ /** What is wrong at this place, one phrase without the file: every reader prints it after `path:line`. */
123
+ readonly message: string;
124
+ /** How to remove this one finding. Absent, readers print the general way out: remove it where the message points, or name the work that removes it. */
125
+ readonly fix?: string;
126
+ readonly value?: number;
127
+ readonly sites?: readonly {
128
+ readonly line: number;
129
+ readonly specifier?: string;
130
+ readonly chain?: readonly string[];
131
+ readonly message?: string;
132
+ readonly fix?: string;
133
+ }[];
134
+ };
135
+ export type Facts = {
136
+ readonly side: 'tree' | 'base';
137
+ readonly commit: string;
138
+ readonly tree: string;
139
+ readonly complete: boolean;
140
+ readonly files: readonly ({
141
+ readonly path: string;
142
+ readonly language: string;
143
+ readonly imports?: readonly ({
144
+ readonly specifier: string;
145
+ readonly line: number;
146
+ readonly kind: 'value' | 'type' | 'dynamic' | 'side-effect';
147
+ readonly forwards: boolean;
148
+ readonly target: {
149
+ readonly path: string;
150
+ } | {
151
+ readonly external: string;
152
+ } | {
153
+ readonly unlisted: string;
154
+ } | {
155
+ readonly unjudged: string;
156
+ };
157
+ })[];
158
+ readonly declarations?: readonly ({
159
+ readonly name: string;
160
+ readonly kind: 'class' | 'function' | 'variable' | 'type' | 'interface' | 'enum' | 'namespace';
161
+ readonly line: number;
162
+ readonly exported: boolean;
163
+ })[];
164
+ readonly lacks?: readonly ('imports' | 'declarations')[];
165
+ readonly unjudged?: string;
166
+ })[];
167
+ readonly reached: readonly ({
168
+ readonly path: string;
169
+ readonly language: string;
170
+ readonly imports?: readonly ({
171
+ readonly specifier: string;
172
+ readonly line: number;
173
+ readonly kind: 'value' | 'type' | 'dynamic' | 'side-effect';
174
+ readonly forwards: boolean;
175
+ readonly target: {
176
+ readonly path: string;
177
+ } | {
178
+ readonly external: string;
179
+ } | {
180
+ readonly unlisted: string;
181
+ } | {
182
+ readonly unjudged: string;
183
+ };
184
+ })[];
185
+ readonly declarations?: readonly ({
186
+ readonly name: string;
187
+ readonly kind: 'class' | 'function' | 'variable' | 'type' | 'interface' | 'enum' | 'namespace';
188
+ readonly line: number;
189
+ readonly exported: boolean;
190
+ })[];
191
+ readonly lacks?: readonly ('imports' | 'declarations')[];
192
+ readonly unjudged?: string;
193
+ })[];
194
+ readonly unread: readonly string[];
195
+ };
196
+ export type Argv = readonly [string, ...string[]];
197
+ export type Builtin<Id extends string, Params extends object> = {
198
+ readonly builtin: Id;
199
+ readonly params: Params;
200
+ };
201
+ export type Reach = {
202
+ readonly files?: readonly string[];
203
+ };
204
+ export type ProgramInspection = {
205
+ readonly program: string;
206
+ readonly name: string;
207
+ readonly concern: Concern;
208
+ readonly needs?: readonly FactKind[];
209
+ readonly params: object;
210
+ readonly files?: readonly string[];
211
+ };
212
+ export type NamedTool = {
213
+ readonly tool: 'eslint' | 'oxlint' | 'ruff' | 'semgrep' | 'ast-grep';
214
+ readonly config?: string;
215
+ readonly argv?: Argv;
216
+ };
217
+ export type SarifCommand = {
218
+ readonly tool: 'command';
219
+ readonly argv: Argv;
220
+ readonly output: 'sarif';
221
+ };
222
+ export type FindingsCommand = {
223
+ readonly tool: 'command';
224
+ readonly argv: Argv;
225
+ readonly output: 'findings';
226
+ };
227
+ export type LinterInspection = {
228
+ readonly linter: NamedTool | SarifCommand;
229
+ readonly rule: string;
230
+ readonly files?: readonly string[];
231
+ } | {
232
+ readonly linter: FindingsCommand;
233
+ readonly files?: readonly string[];
234
+ };
235
+ export type Inspection = Builtin<string, object> | ProgramInspection | LinterInspection;
236
+ export type FormatCommand = {
237
+ readonly run: Argv;
238
+ readonly files: readonly string[];
239
+ readonly ok?: readonly number[];
240
+ readonly reads?: 'tree' | 'nearby';
241
+ readonly on?: 'commit';
242
+ };
243
+ export type DeriveCommand = {
244
+ readonly paths: readonly string[];
245
+ readonly from?: readonly string[];
246
+ readonly run: Argv;
247
+ };
248
+ export type Config = {
249
+ readonly inspections?: {
250
+ readonly [key: string]: Inspection;
251
+ };
252
+ readonly format?: {
253
+ readonly [key: string]: FormatCommand;
254
+ };
255
+ readonly derive?: {
256
+ readonly [key: string]: DeriveCommand;
257
+ };
258
+ };
259
+ export declare const defineConfig: (config: Config) => Config;
260
+ export declare const Imports: {
261
+ modules: (options?: ModulesParams) => Builtin<"modules", ModulesParams>;
262
+ };
263
+ export declare const Loading: {
264
+ forbid: (params: LoadsParams) => Builtin<"loads", LoadsParams>;
265
+ };
266
+ export declare const Code: {
267
+ noReexports: (options?: ReexportsParams) => Builtin<"reexports", ReexportsParams>;
268
+ };
269
+ export type Threshold = SizeParams['thresholds'][number];
270
+ export type MaxLines = {
271
+ readonly base?: SizeParams['base'];
272
+ readonly files?: SizeParams['files'];
273
+ readonly by?: readonly Threshold[];
274
+ };
275
+ export declare const Files: {
276
+ maxLines: (lines: number, { by, ...selection }?: MaxLines) => Builtin<"size", SizeParams>;
277
+ tests: readonly ["**/*.test.*", "**/*.itest.*", "**/*.e2e.*", "**/*.stest.*", "**/*.spec.*", "**/*.bench.*", "**/*.fixture.*"];
278
+ };
279
+ export type Linter = {
280
+ readonly rule: (id: string, reach?: Reach) => LinterInspection;
281
+ };
282
+ declare function command(options: {
283
+ readonly argv: Argv;
284
+ readonly output: 'sarif';
285
+ }): Linter;
286
+ declare function command(options: {
287
+ readonly argv: Argv;
288
+ readonly output: 'findings';
289
+ }, reach?: Reach): LinterInspection;
290
+ export type ToolOptions = {
291
+ readonly config?: string;
292
+ readonly argv?: Argv;
293
+ };
294
+ export declare const Linters: {
295
+ command: typeof command;
296
+ eslint: (options?: ToolOptions) => Linter;
297
+ oxlint: (options?: ToolOptions) => Linter;
298
+ ruff: (options?: ToolOptions) => Linter;
299
+ semgrep: (options?: ToolOptions) => Linter;
300
+ astGrep: (options?: ToolOptions) => Linter;
301
+ };
302
+ export declare const Format: {
303
+ command: (command: FormatCommand) => FormatCommand;
304
+ };
305
+ export declare const Derive: {
306
+ command: (command: DeriveCommand) => DeriveCommand;
307
+ };
308
+ export type ProgramDeclaration = {
309
+ readonly program: string;
310
+ readonly name: string;
311
+ readonly concern: Concern;
312
+ readonly needs?: readonly FactKind[];
313
+ };
314
+ export type DeclaredInspection<Params extends object> = (params: Params, reach?: Reach) => ProgramInspection;
315
+ export declare const defineInspection: <Params extends object>(declaration: ProgramDeclaration) => DeclaredInspection<Params>;
316
+ export type Side = {
317
+ readonly commit: string;
318
+ readonly paths: readonly string[];
319
+ readonly whole: boolean;
320
+ readonly read: (path: string) => Promise<string | null>;
321
+ readonly facts: Facts | null;
322
+ };
323
+ export type InspectionInput<Params extends object> = {
324
+ readonly params: Params;
325
+ readonly tree: Side;
326
+ readonly base: Side | null;
327
+ readonly mode?: ('change' | 'measure');
328
+ };
329
+ export type Reading = {
330
+ readonly findings: readonly Finding[];
331
+ readonly covered?: 'paths' | 'reach' | readonly string[];
332
+ readonly remeasure?: ('delta');
333
+ };
334
+ export type Answer = {
335
+ readonly tree: Reading;
336
+ readonly base?: Reading;
337
+ };
338
+ export type Program<Params extends object> = (input: InspectionInput<Params>) => Answer | Promise<Answer>;
339
+ export declare const defineProgram: <Params extends {
340
+ readonly [name: string]: object;
341
+ }>(programs: { readonly [Name in keyof Params]: Program<Params[Name]>; }) => { readonly [Name in keyof Params]: Program<Params[Name]>; };
342
+ export {};
package/rules/rules.js ADDED
@@ -0,0 +1,50 @@
1
+ // src/rules/rules.ts
2
+ var defineConfig = (config) => config;
3
+ var Imports = {
4
+ modules: (options = {}) => ({ builtin: "modules", params: options })
5
+ };
6
+ var Loading = {
7
+ forbid: (params) => ({ builtin: "loads", params })
8
+ };
9
+ var Code = {
10
+ noReexports: (options = {}) => ({ builtin: "reexports", params: options })
11
+ };
12
+ var Files = {
13
+ maxLines: (lines, { by = [], ...selection } = {}) => ({
14
+ builtin: "size",
15
+ params: { ...selection, thresholds: [{ glob: "**", lines }, ...by] }
16
+ }),
17
+ tests: ["**/*.test.*", "**/*.itest.*", "**/*.e2e.*", "**/*.stest.*", "**/*.spec.*", "**/*.bench.*", "**/*.fixture.*"]
18
+ };
19
+ var linter = (tool) => ({ rule: (rule, reach = {}) => ({ linter: tool, rule, ...reach }) });
20
+ function command(options, reach = {}) {
21
+ return options.output === "sarif" ? linter({ tool: "command", argv: options.argv, output: "sarif" }) : { linter: { tool: "command", argv: options.argv, output: "findings" }, ...reach };
22
+ }
23
+ var Linters = {
24
+ command,
25
+ eslint: (options = {}) => linter({ tool: "eslint", ...options }),
26
+ oxlint: (options = {}) => linter({ tool: "oxlint", ...options }),
27
+ ruff: (options = {}) => linter({ tool: "ruff", ...options }),
28
+ semgrep: (options = {}) => linter({ tool: "semgrep", ...options }),
29
+ astGrep: (options = {}) => linter({ tool: "ast-grep", ...options })
30
+ };
31
+ var Format = {
32
+ command: (command) => command
33
+ };
34
+ var Derive = {
35
+ command: (command) => command
36
+ };
37
+ var defineInspection = (declaration) => (params, reach = {}) => ({ ...declaration, params, ...reach });
38
+ var defineProgram = (programs) => programs;
39
+ export {
40
+ Code,
41
+ Derive,
42
+ Files,
43
+ Format,
44
+ Imports,
45
+ Linters,
46
+ Loading,
47
+ defineConfig,
48
+ defineInspection,
49
+ defineProgram
50
+ };
@@ -0,0 +1,12 @@
1
+ declare module "node:assert/strict" {
2
+ import { Assert, AssertionError, AssertionErrorOptions, AssertOptions, AssertPredicate, AssertStrict, deepStrictEqual, doesNotMatch, doesNotReject, doesNotThrow, fail, ifError, match, notDeepStrictEqual, notStrictEqual, ok, partialDeepStrictEqual, rejects, strictEqual, throws, } from "node:assert";
3
+ function strict(value: unknown, message?: string | Error): asserts value;
4
+ namespace strict {
5
+ export { Assert, AssertionError, AssertionErrorOptions, AssertOptions, AssertPredicate, AssertStrict, deepStrictEqual, deepStrictEqual as deepEqual, doesNotMatch, doesNotReject, doesNotThrow, fail, ifError, match, notDeepStrictEqual, notDeepStrictEqual as notDeepEqual, notStrictEqual, notStrictEqual as notEqual, ok, partialDeepStrictEqual, rejects, strict, strictEqual, strictEqual as equal, throws, };
6
+ }
7
+ export = strict;
8
+ }
9
+ declare module "assert/strict" {
10
+ import strict = require("node:assert/strict");
11
+ export = strict;
12
+ }
@@ -0,0 +1,76 @@
1
+ declare module "node:assert" {
2
+ import strict = require("node:assert/strict");
3
+ function assert(value: unknown, message?: string | Error): asserts value;
4
+ const kOptions: unique symbol;
5
+ namespace assert {
6
+ type AssertMethodNames = "deepEqual" | "deepStrictEqual" | "doesNotMatch" | "doesNotReject" | "doesNotThrow" | "equal" | "fail" | "ifError" | "match" | "notDeepEqual" | "notDeepStrictEqual" | "notEqual" | "notStrictEqual" | "ok" | "partialDeepStrictEqual" | "rejects" | "strictEqual" | "throws";
7
+ interface AssertOptions {
8
+ diff?: "simple" | "full" | undefined;
9
+ strict?: boolean | undefined;
10
+ skipPrototype?: boolean | undefined;
11
+ }
12
+ interface Assert extends Pick<typeof assert, AssertMethodNames> {
13
+ readonly [kOptions]: AssertOptions & {
14
+ strict: false;
15
+ };
16
+ }
17
+ interface AssertStrict extends Pick<typeof strict, AssertMethodNames> {
18
+ readonly [kOptions]: AssertOptions & {
19
+ strict: true;
20
+ };
21
+ }
22
+ var Assert: {
23
+ new (options?: AssertOptions & {
24
+ strict?: true | undefined;
25
+ }): AssertStrict;
26
+ new (options: AssertOptions): Assert;
27
+ };
28
+ interface AssertionErrorOptions {
29
+ message?: string | undefined;
30
+ actual?: unknown;
31
+ expected?: unknown;
32
+ operator?: string | undefined;
33
+ stackStartFn?: Function | undefined;
34
+ diff?: "simple" | "full" | undefined;
35
+ }
36
+ class AssertionError extends Error {
37
+ constructor(options: AssertionErrorOptions);
38
+ actual: unknown;
39
+ expected: unknown;
40
+ generatedMessage: boolean;
41
+ code: "ERR_ASSERTION";
42
+ operator: string;
43
+ }
44
+ type AssertPredicate = RegExp | (new () => object) | ((thrown: unknown) => boolean) | object | Error;
45
+ function fail(message?: string | Error): never;
46
+ function ok(value: unknown, message?: string | Error): asserts value;
47
+ function equal(actual: unknown, expected: unknown, message?: string | Error): void;
48
+ function notEqual(actual: unknown, expected: unknown, message?: string | Error): void;
49
+ function deepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
50
+ function notDeepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
51
+ function strictEqual<T>(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
52
+ function notStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
53
+ function deepStrictEqual<T>(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
54
+ function notDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
55
+ function throws(block: () => unknown, message?: string | Error): void;
56
+ function throws(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
57
+ function doesNotThrow(block: () => unknown, message?: string | Error): void;
58
+ function doesNotThrow(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
59
+ function ifError(value: unknown): asserts value is null | undefined;
60
+ function rejects(block: (() => Promise<unknown>) | Promise<unknown>, message?: string | Error): Promise<void>;
61
+ function rejects(block: (() => Promise<unknown>) | Promise<unknown>, error: AssertPredicate, message?: string | Error): Promise<void>;
62
+ function doesNotReject(block: (() => Promise<unknown>) | Promise<unknown>, message?: string | Error): Promise<void>;
63
+ function doesNotReject(block: (() => Promise<unknown>) | Promise<unknown>, error: AssertPredicate, message?: string | Error): Promise<void>;
64
+ function match(value: string, regExp: RegExp, message?: string | Error): void;
65
+ function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
66
+ function partialDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
67
+ }
68
+ namespace assert {
69
+ export { strict };
70
+ }
71
+ export = assert;
72
+ }
73
+ declare module "assert" {
74
+ import assert = require("node:assert");
75
+ export = assert;
76
+ }