@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,179 @@
1
+ /// <reference path="../types/node/index.d.ts" />
2
+ /// <reference path="../host.d.ts" />
3
+ import { Schema } from "effect";
4
+ import type { TransportFailure } from "@runlith/tagma/internal/packages/agent/src/transcript/entries";
5
+ import type { Usage } from "@runlith/llm/schema/events";
6
+ import { type HarnessClaim, type HarnessProvenance } from "@runlith/tagma/adapter/harness";
7
+ export type MetadataField = 'model' | 'effort' | 'title';
8
+ declare const MetadataInvalid_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{
9
+ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P];
10
+ }>) => import("effect/Cause").YieldableError & {
11
+ readonly _tag: "MetadataInvalid";
12
+ } & Readonly<A>;
13
+ export declare class MetadataInvalid extends MetadataInvalid_base<{
14
+ readonly reason: 'malformed' | 'identity' | 'limit' | 'path' | 'changed' | 'terminal-unavailable';
15
+ }> {
16
+ }
17
+ export type MetadataValue = {
18
+ readonly value: string;
19
+ readonly claim: HarnessClaim;
20
+ readonly turnId: string | null;
21
+ };
22
+ export type MetadataValues = {
23
+ readonly [K in MetadataField]: MetadataValue | null;
24
+ };
25
+ export declare const emptyValues: () => MetadataValues;
26
+ export declare const metadataText: Schema.String;
27
+ export declare const recordedValue: (value: string | null | undefined, turnId?: string | null) => MetadataValue | null;
28
+ export declare const jsonValue: (text: string) => unknown;
29
+ export declare const metadataDecode: <S extends Schema.ConstraintDecoder<unknown>>(schema: S) => (input: unknown) => S["Type"];
30
+ export type MetadataFold<A> = {
31
+ readonly json?: true;
32
+ readonly empty: () => A;
33
+ line(value: A, text: string): A;
34
+ readonly missed?: (head: string) => readonly MetadataField[];
35
+ };
36
+ export type MetadataSession = {
37
+ readonly rootKey: string;
38
+ readonly cwd: string;
39
+ readonly transcriptPath?: string;
40
+ readonly exportPath?: string;
41
+ readonly storage: {
42
+ readonly entries: readonly {
43
+ readonly name: string;
44
+ readonly value: string;
45
+ }[];
46
+ };
47
+ };
48
+ export declare const storageHome: (input: MetadataSession, variable: string, folder: string) => string | null;
49
+ export type MetadataScreen = {
50
+ readonly title: string;
51
+ };
52
+ type Sourced = {
53
+ readonly source: HarnessProvenance;
54
+ readonly fields: readonly MetadataField[];
55
+ };
56
+ export type MetadataLocation = Sourced & ({
57
+ readonly kind: 'file';
58
+ readonly root: string;
59
+ readonly path: string;
60
+ readonly fold: MetadataFold<MetadataValues>;
61
+ readonly computed?: true;
62
+ } | {
63
+ readonly kind: 'index';
64
+ readonly root: string;
65
+ readonly path: string;
66
+ readonly parse: (text: string) => {
67
+ id: string;
68
+ title: string | null;
69
+ };
70
+ } | {
71
+ readonly kind: 'terminal';
72
+ readonly cells: boolean;
73
+ readonly parse: (screen: MetadataScreen) => MetadataValue | null;
74
+ } | {
75
+ readonly kind: 'command';
76
+ readonly program: string;
77
+ readonly args: readonly string[];
78
+ readonly parse: (text: string) => MetadataValue | null;
79
+ } | {
80
+ readonly kind: 'unreadable';
81
+ readonly reason: string;
82
+ } | {
83
+ readonly kind: 'unsupported';
84
+ });
85
+ export declare function fileSource(root: string | null, path: string | undefined, fold: MetadataFold<MetadataValues>, fields: Sourced['fields'], source?: HarnessProvenance, computed?: boolean): MetadataLocation;
86
+ export type TranscriptSaid = {
87
+ readonly texts: readonly string[];
88
+ readonly typed: readonly string[];
89
+ readonly at: number | null;
90
+ };
91
+ export type TranscriptRequest = {
92
+ readonly id: string;
93
+ readonly usage: Usage;
94
+ readonly model: string | null;
95
+ readonly at: number | null;
96
+ readonly main: boolean;
97
+ };
98
+ export type TranscriptCompaction = {
99
+ readonly tokens: number | null;
100
+ readonly at: number | null;
101
+ };
102
+ export type TranscriptWords = {
103
+ readonly said: readonly TranscriptSaid[];
104
+ readonly requests: Map<string, TranscriptRequest>;
105
+ readonly compacted: TranscriptCompaction | null;
106
+ };
107
+ export declare const unsaid: () => TranscriptWords;
108
+ export declare const stampMillis: (value: string | undefined) => number | null;
109
+ export declare function userTexts(message: unknown): readonly string[];
110
+ export declare function transcriptSaid(message: unknown, stamp: string | undefined): TranscriptSaid | null;
111
+ export type WordsSource = {
112
+ readonly root: string | null;
113
+ readonly path: string | undefined;
114
+ readonly fold: MetadataFold<TranscriptWords>;
115
+ };
116
+ export type MetadataFieldSource = {
117
+ readonly source: HarnessProvenance;
118
+ readonly readable: boolean;
119
+ } | null;
120
+ export type TailEnd = {
121
+ readonly _tag: 'Completed';
122
+ readonly message: string | null;
123
+ } | {
124
+ readonly _tag: 'Aborted';
125
+ } | {
126
+ readonly _tag: 'Failed';
127
+ readonly reason: string;
128
+ readonly cause?: TransportFailure;
129
+ } | {
130
+ readonly _tag: 'Open';
131
+ };
132
+ export type TailWindow = {
133
+ readonly since: number;
134
+ readonly offset: number | null;
135
+ readonly turn: string | null;
136
+ };
137
+ export type TailReader = {
138
+ readonly shape: 'lines' | 'document';
139
+ readonly window: 'time' | 'offset';
140
+ readonly grain: number;
141
+ readonly stampOf: (record: unknown) => number | null;
142
+ readonly records?: (document: unknown) => readonly unknown[];
143
+ readonly judge: (newestFirst: readonly unknown[], exhausted: boolean, turn: string | null) => TailEnd | null;
144
+ };
145
+ export type TailLocation = {
146
+ readonly root: string;
147
+ readonly path: string;
148
+ };
149
+ export type TailSource = {
150
+ readonly reader: TailReader;
151
+ readonly locate: (input: MetadataSession) => TailLocation | null;
152
+ readonly located: 'launch' | 'reported';
153
+ };
154
+ export type Fields = Readonly<Record<string, unknown>>;
155
+ export declare const fieldsOf: (value: unknown) => Fields | null;
156
+ export declare const textOf: (value: unknown) => string | null;
157
+ export declare const blocksOf: (content: unknown) => readonly Fields[];
158
+ export declare const textBlocks: (content: unknown) => string;
159
+ export declare const answered: (text: string) => TailEnd;
160
+ export declare const isoStamp: (value: unknown) => number | null;
161
+ export type ArtifactFold = {
162
+ readonly fold: (rootKey: string) => MetadataFold<{
163
+ readonly bound: boolean;
164
+ }>;
165
+ readonly scan: 'one-record' | 'whole-file';
166
+ };
167
+ export type MetadataReader = {
168
+ readonly sources: (input: MetadataSession) => readonly MetadataLocation[];
169
+ readonly provenance: {
170
+ readonly [K in MetadataField]: MetadataFieldSource;
171
+ };
172
+ readonly words?: {
173
+ readonly sources: (input: MetadataSession) => readonly WordsSource[];
174
+ readonly usage: boolean;
175
+ };
176
+ readonly ends?: TailSource;
177
+ readonly artifact?: ArtifactFold;
178
+ };
179
+ export {};
@@ -0,0 +1,4 @@
1
+ // @bun
2
+ import{Data as S,Schema as p}from"effect";import{isAbsolute as H,join as k}from"path";import{Schema as o}from"effect";var y=200,f=160,A=o.String.check(o.isPattern(/^[a-z][a-z0-9-]*$/u),o.isMaxLength(64)),C=["tagma","lode"],R="tagma",x=o.Literals(["configured","serving","last-recorded"]),T=o.Literals(["hook","vendor-record","transcript","session-store","terminal","protocol"]),P=o.Union([o.Struct({read:o.Literal("value"),value:o.String.check(o.isMaxLength(y)),claim:x}),o.Struct({read:o.Literal("absent")}),o.Struct({read:o.Literal("unsupported")}),o.Struct({read:o.Literal("unreadable"),reason:o.String.check(o.isMaxLength(f))})]),E=o.Struct({value:o.String,label:o.String,description:o.optional(o.String)}),_=o.Literals(["choice"]),O=o.Struct({id:o.NullOr(o.String.check(o.isMinLength(1))),tool:o.String.check(o.isMinLength(1)),subject:o.String.check(o.isMinLength(1))}),F=["catalog","proxy"],h=1e4,N={chars:h,basis:"unmeasured"},g="tagma";function K(e){let r=e[g];if(r===null)throw Error(`The harness cannot express permission stance ${g}.`);return r}function L(e,r){if(r===void 0)return[];let n=r.rung===null?r.model:`${r.model} at ${r.rung}`;if(e===null)throw Error(`The harness declares no model surface and cannot launch on ${n}.`);return e.argv(r)}var W={_tag:"char",char:"\x03"},j=()=>null,I=()=>null,q=(e)=>(r,n)=>n.length===1?e(r,n[0]):null,V=(e,r)=>{if(e.selected===null)return null;let n=e.options.findIndex((a)=>a.value===e.selected),t=e.options.findIndex((a)=>a.value===r);if(n<0||t<0)return null;let s=t>n?"down":"up";return[...Array.from({length:Math.abs(t-n)}).fill(s),"enter"]},D=(e,r)=>e.options.some((n)=>n.value===r)?[...r].map((n)=>({_tag:"char",char:n})):null,Q=(e,r,n=e.findLastIndex((t)=>r(t)!==null))=>{if(n<0)return null;let t=[],s=[],a=n;for(;a>=0;a-=1){let l=r(e[a]);if(l===null)break;if(t.push({value:l.value,label:l.label}),l.selected)s.push(l.value)}return t.reverse(),{options:t,selected:s.length===1?s[0]:null,marked:s.length,above:a}},i={asksFrom:"never"},d={asksFrom:"review",timeout:"none"},U={names:"kind",byName:{bash:{kind:"execute",approval:d},read:{kind:"read",approval:i},ls:{kind:"read",approval:i},glob:{kind:"read",approval:i},grep:{kind:"read",approval:i},write:{kind:"write",approval:d},edit:{kind:"write",approval:d},delete:{kind:"write",approval:d},rename:{kind:"write",approval:d},webfetch:{kind:"network",approval:d},websearch:{kind:"network",approval:d}}};class u extends S.TaggedError("MetadataInvalid"){}var Y=()=>({model:null,effort:null,title:null}),B=p.String.check(p.isMaxLength(y)),Z=(e,r=null)=>e===void 0||e===null||e.trim()===""?null:{value:e,claim:"last-recorded",turnId:r},ee=(e)=>{try{return JSON.parse(e)}catch{throw new u({reason:"malformed"})}},re=(e)=>{let r=p.decodeUnknownResult(e);return(n)=>{let t=r(n);if(t._tag==="Failure")throw new u({reason:"malformed"});return t.success}},ne=(e,r,n)=>{let t=new Map(e.storage.entries.map((c)=>[c.name,c.value])),s=t.get(r),a=t.get("HOME"),l=s??(a===void 0?void 0:k(a,n));return l!==void 0&&H(l)?l:null};function oe(e,r,n,t,s="transcript",a=!1){if(e===null||r===void 0)return{kind:"unreadable",reason:"source-location-unavailable",source:s,fields:t};return a?{kind:"file",root:e,path:r,fold:n,computed:a,source:s,fields:t}:{kind:"file",root:e,path:r,fold:n,source:s,fields:t}}var te=()=>({said:[],requests:new Map,compacted:null}),m=(e)=>{let r=e===void 0?Number.NaN:Date.parse(e);return Number.isNaN(r)?null:r};function M(e){if(typeof e==="string")return[e];if(!Array.isArray(e))return[];return e.flatMap((r)=>{if(typeof r!=="object"||r===null)return[];let n=r;return(n.type==="text"||n.type==="input_text")&&typeof n.text==="string"?[n.text]:[]})}function ae(e,r){let n=M(e);if(n.join(`
3
+ `).trim()==="")return null;let t=n.filter((s)=>{let a=s.trim();return a!==""&&!a.startsWith("<")&&!a.startsWith("# AGENTS.md")});return{texts:n,typed:t,at:m(r)}}var v=(e)=>typeof e==="object"&&e!==null&&!Array.isArray(e)?e:null,se=(e)=>typeof e==="string"?e:null,b=(e)=>Array.isArray(e)?e.flatMap((r)=>{let n=v(r);return n===null?[]:[n]}):[],le=(e)=>typeof e==="string"?e:b(e).flatMap((r)=>r.type==="text"&&typeof r.text==="string"?[r.text]:[]).join(`
4
+ `),de=(e)=>({_tag:"Completed",message:e.trim()===""?null:e}),ie=(e)=>typeof e==="string"?m(e):null;export{u as MetadataInvalid,de as answered,b as blocksOf,Y as emptyValues,v as fieldsOf,oe as fileSource,ie as isoStamp,ee as jsonValue,re as metadataDecode,B as metadataText,Z as recordedValue,m as stampMillis,ne as storageHome,le as textBlocks,se as textOf,ae as transcriptSaid,te as unsaid,M as userTexts};
@@ -0,0 +1,19 @@
1
+ /// <reference path="../types/node/index.d.ts" />
2
+ /// <reference path="../host.d.ts" />
3
+ import type { FileEffect, HarnessCall, HarnessModelReport } from "@runlith/tagma/adapter/harness";
4
+ export declare const tail: (prompt: string | undefined) => string[];
5
+ export declare function field(event: Record<string, unknown>, name: string): string | null;
6
+ export declare function nested(event: Record<string, unknown>, name: string): Record<string, unknown>;
7
+ export declare const sessionIdOf: (event: Record<string, unknown>) => string | null;
8
+ export declare const unasked: () => null;
9
+ export declare const unturned: () => null;
10
+ export declare const unreported: () => null;
11
+ export declare const answerField: (said: Record<string, unknown>, key: string | null) => string | null;
12
+ export declare const unfiled: () => readonly FileEffect[];
13
+ export declare const unprinted: () => null;
14
+ export declare function patchFiles(patch: string): readonly FileEffect[];
15
+ export declare const questionTool: (tool?: string) => boolean;
16
+ export declare const rootOfArgv: (resumeWord: string, assigns?: boolean) => (argv: readonly string[]) => string | null;
17
+ export declare const modelField: (event: Record<string, unknown>, defaults?: readonly string[]) => HarnessModelReport | null;
18
+ export declare const namedCall: (event: Record<string, unknown>) => HarnessCall | null;
19
+ export declare const toolCall: (event: Record<string, unknown>, tools: Record<string, string>) => HarnessCall | null;
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ var a=(n)=>n===void 0?[]:[n];function o(n,e){let t=n[e];return typeof t==="string"&&t.trim().length>0?t.trim():null}function c(n,e){let t=n[e];return t!==null&&typeof t==="object"&&!Array.isArray(t)?t:{}}var f=(n)=>o(n,"session_id")??o(n,"sessionId"),p=()=>null,g=()=>null,m=()=>null,h=(n,e)=>e===null?null:o(n,e),_=()=>[],w=()=>null,d=[{mark:"*** Add File:",effect:"write"},{mark:"*** Update File:",effect:"write"},{mark:"*** Delete File:",effect:"delete"}],u="*** Move to:";function k(n){let e=[];for(let t of n.split(`
3
+ `)){let r=d.find((i)=>t.startsWith(i.mark));if(r!==void 0){let i=t.slice(r.mark.length).trim();if(i.length>0)e.push({effect:r.effect,path:i});continue}if(!t.startsWith(u))continue;let l=t.slice(u.length).trim(),s=e[e.length-1];if(l.length===0)continue;if(s?.effect==="write")e[e.length-1]={effect:"move",path:l,from:s.path};else e.push({effect:"write",path:l})}return e}var x=(n)=>["askuserquestion","ask_user_question","request_user_input"].includes(n?.toLowerCase()??""),R=(n,e=!1)=>(t)=>{let r=e?[n,"--session-id"]:[n];for(let l=1;l<t.length;l+=1){let s=t[l];if(s!==void 0&&r.includes(s))return t[l+1]??null}return null},y=(n,e=[])=>{if(!("model"in n))return null;let t=o(n,"model");if(t===null)return{read:"absent"};return{read:"value",value:t,claim:e.includes(t)?"configured":"serving"}},F=(n)=>{let e=o(n,"tool_name")??o(n,"toolName");if(e===null)return null;let t=c(n,"tool_input"),r=o(t,"command")??o(t,"cmd")??o(t,"file_path")??o(t,"notebook_path")??o(t,"path")??o(t,"url")??o(t,"query")??o(t,"pattern")??o(n,"tool_input")??JSON.stringify(n.tool_input??{});return{id:o(n,"tool_use_id")??o(n,"toolUseId"),tool:e,subject:r}},E=(n,e)=>{let t=e[(o(n,"tool_name")??o(n,"toolName")??"").toLowerCase()];if(t===void 0)return null;let r=c(n,"tool_input"),l=t==="bash"?o(r,"command"):o(r,"file_path");return l===null?null:{id:o(n,"tool_use_id")??o(n,"toolUseId"),tool:t,subject:l}};export{h as answerField,o as field,y as modelField,F as namedCall,c as nested,k as patchFiles,x as questionTool,R as rootOfArgv,f as sessionIdOf,a as tail,E as toolCall,p as unasked,_ as unfiled,w as unprinted,m as unreported,g as unturned};
@@ -0,0 +1,209 @@
1
+ /// <reference path="../types/node/index.d.ts" />
2
+ /// <reference path="../host.d.ts" />
3
+ import type { Effect } from "effect";
4
+ import type { HttpClient } from "effect/http";
5
+ import type { SettingField } from "@runlith/tagma/adapter/settings";
6
+ import type { ProviderDescription } from "@runlith/llm/models/description";
7
+ import type { StoredCredential } from "@runlith/tagma/internal/packages/llm/src/oauth/credential";
8
+ import type { SubscriptionAccounts } from "@runlith/llm/oauth/vendor";
9
+ import type { ModelCredentials, ProductIdentity, ProviderQuota, ProviderRegistration } from "@runlith/llm/profiles/contract";
10
+ import type { ModelSpecs } from "@runlith/llm/models/description";
11
+ import type { Usage } from "@runlith/llm/schema/events";
12
+ import type { JsonSchema } from "@runlith/llm/schema/ids";
13
+ import type { HarnessSurfaces } from "@runlith/tagma/adapter/harness";
14
+ export declare const PROGRAM_REFUSALS: readonly [
15
+ "ask-not-connected",
16
+ "ask-quota",
17
+ "ask-input-too-large",
18
+ "ask-unreadable-answer",
19
+ "ask-provider-failed"
20
+ ];
21
+ export type ProgramRefusal = (typeof PROGRAM_REFUSALS)[number];
22
+ export type ProgramAsk = {
23
+ readonly model: string;
24
+ readonly rung: string | null;
25
+ readonly system: string;
26
+ readonly schema?: JsonSchema;
27
+ };
28
+ export type ProgramOutput = {
29
+ readonly stdout: string;
30
+ readonly stderr: string;
31
+ readonly exit: number | null;
32
+ };
33
+ export type ProgramAnswer = ({
34
+ readonly _tag: 'Text';
35
+ readonly text: string;
36
+ } | {
37
+ readonly _tag: 'Object';
38
+ readonly object: unknown;
39
+ } | {
40
+ readonly _tag: 'Refused';
41
+ readonly refusal: ProgramRefusal;
42
+ readonly message: string;
43
+ }) & {
44
+ readonly usage?: Usage;
45
+ };
46
+ export type CommandProgram = {
47
+ readonly command: string;
48
+ readonly schemas: boolean;
49
+ readonly progress?: boolean;
50
+ argv(ask: ProgramAsk): readonly string[];
51
+ answer(output: ProgramOutput): ProgramAnswer;
52
+ };
53
+ export type RunnerProgram = {
54
+ readonly runner: string;
55
+ answer(output: ProgramOutput): ProgramAnswer;
56
+ };
57
+ export type AskProgram = CommandProgram | RunnerProgram;
58
+ export type ProviderAsks = {
59
+ readonly program?: AskProgram;
60
+ };
61
+ export type CatalogModels = {
62
+ readonly models: ModelSpecs;
63
+ readonly defaultTextModel: string;
64
+ readonly warnings?: readonly string[];
65
+ };
66
+ export type ProviderCatalogReader = {
67
+ read(credentials: ModelCredentials, ownerId: string, account?: string): Effect.Effect<CatalogModels, {
68
+ readonly message: string;
69
+ }, HttpClient.HttpClient>;
70
+ };
71
+ export type AccountEnvironment = {
72
+ readonly _tag: 'Set';
73
+ readonly name: string;
74
+ readonly value: string;
75
+ } | {
76
+ readonly _tag: 'Unset';
77
+ readonly name: string;
78
+ };
79
+ export type HarnessAccountAddress = {
80
+ readonly directory: string | null;
81
+ readonly entries: readonly AccountEnvironment[];
82
+ };
83
+ export type CliHarnessCatalogReader = {
84
+ read(address: HarnessAccountAddress): Effect.Effect<CatalogModels, {
85
+ readonly message: string;
86
+ }, HttpClient.HttpClient>;
87
+ };
88
+ export type CommandExchange = {
89
+ readonly input: string;
90
+ readonly complete: (line: string) => boolean;
91
+ };
92
+ export type HarnessCommand = {
93
+ readonly program: string;
94
+ readonly args: readonly string[];
95
+ readonly exchange?: CommandExchange;
96
+ };
97
+ export type HarnessOutput = {
98
+ readonly stdout: string;
99
+ readonly stderr: string;
100
+ readonly code: number;
101
+ };
102
+ export type HarnessLoginStatus = {
103
+ readonly kind: 'signed-in';
104
+ readonly label: string;
105
+ } | {
106
+ readonly kind: 'signed-out';
107
+ } | {
108
+ readonly kind: 'unsupported-method';
109
+ readonly method: string;
110
+ } | {
111
+ readonly kind: 'unreadable';
112
+ readonly reason: string;
113
+ };
114
+ export type HarnessAccountAuth = {
115
+ readonly directory: string;
116
+ readonly login: HarnessCommand;
117
+ readonly status: HarnessCommand;
118
+ readonly loggedIn: (output: HarnessOutput) => Effect.Effect<HarnessLoginStatus>;
119
+ readonly discovery?: {
120
+ readonly variable: string;
121
+ readonly directory: string;
122
+ readonly files: readonly string[];
123
+ };
124
+ readonly renew?: HarnessCommand;
125
+ };
126
+ export type BorrowedAccounts = {
127
+ readonly provider: string;
128
+ readonly renewOnReject?: true;
129
+ readonly missing?: string;
130
+ read(directory: string | null): Effect.Effect<StoredCredential | null, {
131
+ readonly message: string;
132
+ }>;
133
+ };
134
+ export type AccountMode = {
135
+ readonly section: string;
136
+ readonly title: string;
137
+ readonly default: string;
138
+ readonly id: string;
139
+ readonly label: string;
140
+ readonly hint: string;
141
+ readonly signInLabel?: string;
142
+ readonly missing?: string;
143
+ readonly defaultPlace?: string;
144
+ };
145
+ export type WireProvider = ProviderRegistration & {
146
+ readonly accountMode?: AccountMode;
147
+ readonly kind: 'wire';
148
+ readonly accounts?: SubscriptionAccounts;
149
+ readonly borrows?: BorrowedAccounts;
150
+ readonly icon?: string;
151
+ readonly accountsLabel?: string;
152
+ readonly keyHint?: string;
153
+ readonly quotaFromReplies?: true;
154
+ readonly catalog?: ProviderCatalogReader;
155
+ };
156
+ type HarnessDescription = ProviderDescription & HarnessSurfaces & {
157
+ readonly kind: 'harness';
158
+ readonly accountMode?: AccountMode;
159
+ readonly icon?: string;
160
+ readonly quota?: ProviderQuota;
161
+ readonly keyHint?: string;
162
+ readonly asks?: ProviderAsks;
163
+ };
164
+ export type CliHarnessProvider = HarnessDescription & {
165
+ readonly auth: 'cli';
166
+ readonly catalog?: CliHarnessCatalogReader;
167
+ readonly accounts?: HarnessAccountAuth;
168
+ environment(directory: string | null): readonly AccountEnvironment[];
169
+ };
170
+ export type KeyHarnessProvider = HarnessDescription & {
171
+ readonly auth: 'api-key';
172
+ readonly catalog?: ProviderCatalogReader;
173
+ readonly accounts: SubscriptionAccounts;
174
+ environment(credential: StoredCredential): readonly AccountEnvironment[];
175
+ };
176
+ export type HarnessProvider = CliHarnessProvider | KeyHarnessProvider;
177
+ export type Provider = WireProvider | HarnessProvider;
178
+ export type SettingValue = string | number | boolean | readonly string[] | readonly SettingRow[];
179
+ export type SettingRow = {
180
+ readonly [field: string]: SettingValue | undefined;
181
+ };
182
+ export type SettingInstance = {
183
+ readonly id: string;
184
+ readonly values: SettingRow;
185
+ readonly revision?: string;
186
+ };
187
+ export type DiscoveryFailure = {
188
+ readonly message: string;
189
+ };
190
+ export type AdapterSettings = {
191
+ readonly title: string;
192
+ readonly instance: string;
193
+ readonly name: string;
194
+ readonly fields: readonly SettingField[];
195
+ validate?(values: SettingRow): string | null;
196
+ discover?(values: SettingRow, secrets: SettingRow): Effect.Effect<readonly SettingRow[], DiscoveryFailure>;
197
+ };
198
+ export type HostInstance = SettingInstance & {
199
+ readonly secrets: SettingRow;
200
+ };
201
+ export type AdapterHost = {
202
+ readonly product: ProductIdentity;
203
+ readonly instances: readonly HostInstance[];
204
+ };
205
+ export type Adapter = ((host: AdapterHost) => readonly Provider[]) & {
206
+ readonly settings?: AdapterSettings;
207
+ };
208
+ export declare const defineAdapter: (provide: (host: AdapterHost) => readonly Provider[], settings?: AdapterSettings) => Adapter;
209
+ export {};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ var n=["ask-not-connected","ask-quota","ask-input-too-large","ask-unreadable-answer","ask-provider-failed"],o=(e,r)=>r===void 0?e:Object.assign((t)=>e(t),{settings:r});export{n as PROGRAM_REFUSALS,o as defineAdapter};
@@ -0,0 +1,182 @@
1
+ /// <reference path="../types/node/index.d.ts" />
2
+ /// <reference path="../host.d.ts" />
3
+ import { Schema } from "effect";
4
+ export declare const settingLeafSchema: Schema.Union<readonly [
5
+ Schema.Struct<{
6
+ readonly type: Schema.Literal<"text">;
7
+ readonly placeholder: Schema.optional<Schema.String>;
8
+ readonly id: Schema.String;
9
+ readonly label: Schema.String;
10
+ readonly hint: Schema.optional<Schema.String>;
11
+ readonly required: Schema.optional<Schema.Literal<true>>;
12
+ readonly secret: Schema.optional<Schema.Literal<true>>;
13
+ }>,
14
+ Schema.Struct<{
15
+ readonly type: Schema.Literal<"number">;
16
+ readonly min: Schema.optional<Schema.Number>;
17
+ readonly unit: Schema.optional<Schema.String>;
18
+ readonly placeholder: Schema.optional<Schema.String>;
19
+ readonly id: Schema.String;
20
+ readonly label: Schema.String;
21
+ readonly hint: Schema.optional<Schema.String>;
22
+ readonly required: Schema.optional<Schema.Literal<true>>;
23
+ readonly secret: Schema.optional<Schema.Literal<true>>;
24
+ }>,
25
+ Schema.Struct<{
26
+ readonly type: Schema.Literal<"flag">;
27
+ readonly id: Schema.String;
28
+ readonly label: Schema.String;
29
+ readonly hint: Schema.optional<Schema.String>;
30
+ readonly required: Schema.optional<Schema.Literal<true>>;
31
+ readonly secret: Schema.optional<Schema.Literal<true>>;
32
+ }>,
33
+ Schema.Struct<{
34
+ readonly type: Schema.Literal<"choice">;
35
+ readonly options: Schema.$Array<Schema.Struct<{
36
+ readonly id: Schema.String;
37
+ readonly label: Schema.String;
38
+ }>>;
39
+ readonly default: Schema.optional<Schema.String>;
40
+ readonly id: Schema.String;
41
+ readonly label: Schema.String;
42
+ readonly hint: Schema.optional<Schema.String>;
43
+ readonly required: Schema.optional<Schema.Literal<true>>;
44
+ readonly secret: Schema.optional<Schema.Literal<true>>;
45
+ }>,
46
+ Schema.Struct<{
47
+ readonly type: Schema.Literal<"set">;
48
+ readonly options: Schema.$Array<Schema.Struct<{
49
+ readonly id: Schema.String;
50
+ readonly label: Schema.String;
51
+ }>>;
52
+ readonly id: Schema.String;
53
+ readonly label: Schema.String;
54
+ readonly hint: Schema.optional<Schema.String>;
55
+ readonly required: Schema.optional<Schema.Literal<true>>;
56
+ readonly secret: Schema.optional<Schema.Literal<true>>;
57
+ }>
58
+ ]>;
59
+ export type SettingLeaf = typeof settingLeafSchema.Type;
60
+ export declare const settingFieldSchema: Schema.Union<readonly [
61
+ Schema.Union<readonly [
62
+ Schema.Struct<{
63
+ readonly type: Schema.Literal<"text">;
64
+ readonly placeholder: Schema.optional<Schema.String>;
65
+ readonly id: Schema.String;
66
+ readonly label: Schema.String;
67
+ readonly hint: Schema.optional<Schema.String>;
68
+ readonly required: Schema.optional<Schema.Literal<true>>;
69
+ readonly secret: Schema.optional<Schema.Literal<true>>;
70
+ }>,
71
+ Schema.Struct<{
72
+ readonly type: Schema.Literal<"number">;
73
+ readonly min: Schema.optional<Schema.Number>;
74
+ readonly unit: Schema.optional<Schema.String>;
75
+ readonly placeholder: Schema.optional<Schema.String>;
76
+ readonly id: Schema.String;
77
+ readonly label: Schema.String;
78
+ readonly hint: Schema.optional<Schema.String>;
79
+ readonly required: Schema.optional<Schema.Literal<true>>;
80
+ readonly secret: Schema.optional<Schema.Literal<true>>;
81
+ }>,
82
+ Schema.Struct<{
83
+ readonly type: Schema.Literal<"flag">;
84
+ readonly id: Schema.String;
85
+ readonly label: Schema.String;
86
+ readonly hint: Schema.optional<Schema.String>;
87
+ readonly required: Schema.optional<Schema.Literal<true>>;
88
+ readonly secret: Schema.optional<Schema.Literal<true>>;
89
+ }>,
90
+ Schema.Struct<{
91
+ readonly type: Schema.Literal<"choice">;
92
+ readonly options: Schema.$Array<Schema.Struct<{
93
+ readonly id: Schema.String;
94
+ readonly label: Schema.String;
95
+ }>>;
96
+ readonly default: Schema.optional<Schema.String>;
97
+ readonly id: Schema.String;
98
+ readonly label: Schema.String;
99
+ readonly hint: Schema.optional<Schema.String>;
100
+ readonly required: Schema.optional<Schema.Literal<true>>;
101
+ readonly secret: Schema.optional<Schema.Literal<true>>;
102
+ }>,
103
+ Schema.Struct<{
104
+ readonly type: Schema.Literal<"set">;
105
+ readonly options: Schema.$Array<Schema.Struct<{
106
+ readonly id: Schema.String;
107
+ readonly label: Schema.String;
108
+ }>>;
109
+ readonly id: Schema.String;
110
+ readonly label: Schema.String;
111
+ readonly hint: Schema.optional<Schema.String>;
112
+ readonly required: Schema.optional<Schema.Literal<true>>;
113
+ readonly secret: Schema.optional<Schema.Literal<true>>;
114
+ }>
115
+ ]>,
116
+ Schema.Struct<{
117
+ readonly type: Schema.Literal<"rows">;
118
+ readonly noun: Schema.String;
119
+ readonly fields: Schema.$Array<Schema.Union<readonly [
120
+ Schema.Struct<{
121
+ readonly type: Schema.Literal<"text">;
122
+ readonly placeholder: Schema.optional<Schema.String>;
123
+ readonly id: Schema.String;
124
+ readonly label: Schema.String;
125
+ readonly hint: Schema.optional<Schema.String>;
126
+ readonly required: Schema.optional<Schema.Literal<true>>;
127
+ readonly secret: Schema.optional<Schema.Literal<true>>;
128
+ }>,
129
+ Schema.Struct<{
130
+ readonly type: Schema.Literal<"number">;
131
+ readonly min: Schema.optional<Schema.Number>;
132
+ readonly unit: Schema.optional<Schema.String>;
133
+ readonly placeholder: Schema.optional<Schema.String>;
134
+ readonly id: Schema.String;
135
+ readonly label: Schema.String;
136
+ readonly hint: Schema.optional<Schema.String>;
137
+ readonly required: Schema.optional<Schema.Literal<true>>;
138
+ readonly secret: Schema.optional<Schema.Literal<true>>;
139
+ }>,
140
+ Schema.Struct<{
141
+ readonly type: Schema.Literal<"flag">;
142
+ readonly id: Schema.String;
143
+ readonly label: Schema.String;
144
+ readonly hint: Schema.optional<Schema.String>;
145
+ readonly required: Schema.optional<Schema.Literal<true>>;
146
+ readonly secret: Schema.optional<Schema.Literal<true>>;
147
+ }>,
148
+ Schema.Struct<{
149
+ readonly type: Schema.Literal<"choice">;
150
+ readonly options: Schema.$Array<Schema.Struct<{
151
+ readonly id: Schema.String;
152
+ readonly label: Schema.String;
153
+ }>>;
154
+ readonly default: Schema.optional<Schema.String>;
155
+ readonly id: Schema.String;
156
+ readonly label: Schema.String;
157
+ readonly hint: Schema.optional<Schema.String>;
158
+ readonly required: Schema.optional<Schema.Literal<true>>;
159
+ readonly secret: Schema.optional<Schema.Literal<true>>;
160
+ }>,
161
+ Schema.Struct<{
162
+ readonly type: Schema.Literal<"set">;
163
+ readonly options: Schema.$Array<Schema.Struct<{
164
+ readonly id: Schema.String;
165
+ readonly label: Schema.String;
166
+ }>>;
167
+ readonly id: Schema.String;
168
+ readonly label: Schema.String;
169
+ readonly hint: Schema.optional<Schema.String>;
170
+ readonly required: Schema.optional<Schema.Literal<true>>;
171
+ readonly secret: Schema.optional<Schema.Literal<true>>;
172
+ }>
173
+ ]>>;
174
+ readonly discoverable: Schema.optional<Schema.Literal<true>>;
175
+ readonly id: Schema.String;
176
+ readonly label: Schema.String;
177
+ readonly hint: Schema.optional<Schema.String>;
178
+ readonly required: Schema.optional<Schema.Literal<true>>;
179
+ readonly secret: Schema.optional<Schema.Literal<true>>;
180
+ }>
181
+ ]>;
182
+ export type SettingField = typeof settingFieldSchema.Type;
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Schema as t}from"effect";var i=t.Struct({id:t.String,label:t.String}),e={id:t.String,label:t.String,hint:t.optional(t.String),required:t.optional(t.Literal(!0)),secret:t.optional(t.Literal(!0))},r=t.Union([t.Struct({...e,type:t.Literal("text"),placeholder:t.optional(t.String)}),t.Struct({...e,type:t.Literal("number"),min:t.optional(t.Number),unit:t.optional(t.String),placeholder:t.optional(t.String)}),t.Struct({...e,type:t.Literal("flag")}),t.Struct({...e,type:t.Literal("choice"),options:t.Array(i),default:t.optional(t.String)}),t.Struct({...e,type:t.Literal("set"),options:t.Array(i)})]),n=t.Union([r,t.Struct({...e,type:t.Literal("rows"),noun:t.String,fields:t.Array(r),discoverable:t.optional(t.Literal(!0))})]);export{n as settingFieldSchema,r as settingLeafSchema};
@@ -0,0 +1,4 @@
1
+ /// <reference path="../types/node/index.d.ts" />
2
+ /// <reference path="../host.d.ts" />
3
+ import type { AnyProvider, SpeechHost, SpeechProvider } from "@runlith/speech/protocol/adapter";
4
+ export declare const defineSpeech: <Credential>(provider: SpeechProvider<Credential, SpeechHost>) => AnyProvider<SpeechHost>;
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ var r=(e)=>e;export{r as defineSpeech};