@mostra/protocol 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (439) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +38 -2
  3. package/dist/actions.d.ts +273 -0
  4. package/dist/actions.d.ts.map +1 -0
  5. package/dist/actions.js +154 -0
  6. package/dist/actions.js.map +1 -0
  7. package/dist/artifact.d.ts +113 -0
  8. package/dist/artifact.d.ts.map +1 -0
  9. package/dist/artifact.js +79 -0
  10. package/dist/artifact.js.map +1 -0
  11. package/dist/bridge.d.ts +295 -0
  12. package/dist/bridge.d.ts.map +1 -0
  13. package/dist/bridge.js +343 -0
  14. package/dist/bridge.js.map +1 -0
  15. package/dist/browser.d.ts +195 -0
  16. package/dist/browser.d.ts.map +1 -0
  17. package/dist/browser.js +156 -0
  18. package/dist/browser.js.map +1 -0
  19. package/dist/bundle.d.ts +155 -0
  20. package/dist/bundle.d.ts.map +1 -0
  21. package/dist/bundle.js +130 -0
  22. package/dist/bundle.js.map +1 -0
  23. package/dist/canonical.d.ts +23 -0
  24. package/dist/canonical.d.ts.map +1 -0
  25. package/dist/canonical.js +45 -0
  26. package/dist/canonical.js.map +1 -0
  27. package/dist/capability.d.ts +38 -0
  28. package/dist/capability.d.ts.map +1 -0
  29. package/dist/capability.js +61 -0
  30. package/dist/capability.js.map +1 -0
  31. package/dist/diagnostics/codes/a11y.d.ts +8 -0
  32. package/dist/diagnostics/codes/a11y.d.ts.map +1 -0
  33. package/dist/diagnostics/codes/a11y.js +30 -0
  34. package/dist/diagnostics/codes/a11y.js.map +1 -0
  35. package/dist/diagnostics/codes/action.d.ts +8 -0
  36. package/dist/diagnostics/codes/action.d.ts.map +1 -0
  37. package/dist/diagnostics/codes/action.js +110 -0
  38. package/dist/diagnostics/codes/action.js.map +1 -0
  39. package/dist/diagnostics/codes/artifact.d.ts +8 -0
  40. package/dist/diagnostics/codes/artifact.d.ts.map +1 -0
  41. package/dist/diagnostics/codes/artifact.js +121 -0
  42. package/dist/diagnostics/codes/artifact.js.map +1 -0
  43. package/dist/diagnostics/codes/build.d.ts +8 -0
  44. package/dist/diagnostics/codes/build.d.ts.map +1 -0
  45. package/dist/diagnostics/codes/build.js +55 -0
  46. package/dist/diagnostics/codes/build.js.map +1 -0
  47. package/dist/diagnostics/codes/cli.d.ts +8 -0
  48. package/dist/diagnostics/codes/cli.d.ts.map +1 -0
  49. package/dist/diagnostics/codes/cli.js +44 -0
  50. package/dist/diagnostics/codes/cli.js.map +1 -0
  51. package/dist/diagnostics/codes/console.d.ts +8 -0
  52. package/dist/diagnostics/codes/console.d.ts.map +1 -0
  53. package/dist/diagnostics/codes/console.js +30 -0
  54. package/dist/diagnostics/codes/console.js.map +1 -0
  55. package/dist/diagnostics/codes/dep.d.ts +8 -0
  56. package/dist/diagnostics/codes/dep.d.ts.map +1 -0
  57. package/dist/diagnostics/codes/dep.js +88 -0
  58. package/dist/diagnostics/codes/dep.js.map +1 -0
  59. package/dist/diagnostics/codes/env.d.ts +8 -0
  60. package/dist/diagnostics/codes/env.d.ts.map +1 -0
  61. package/dist/diagnostics/codes/env.js +132 -0
  62. package/dist/diagnostics/codes/env.js.map +1 -0
  63. package/dist/diagnostics/codes/field.d.ts +8 -0
  64. package/dist/diagnostics/codes/field.d.ts.map +1 -0
  65. package/dist/diagnostics/codes/field.js +99 -0
  66. package/dist/diagnostics/codes/field.js.map +1 -0
  67. package/dist/diagnostics/codes/home.d.ts +8 -0
  68. package/dist/diagnostics/codes/home.d.ts.map +1 -0
  69. package/dist/diagnostics/codes/home.js +132 -0
  70. package/dist/diagnostics/codes/home.js.map +1 -0
  71. package/dist/diagnostics/codes/host.d.ts +8 -0
  72. package/dist/diagnostics/codes/host.d.ts.map +1 -0
  73. package/dist/diagnostics/codes/host.js +176 -0
  74. package/dist/diagnostics/codes/host.js.map +1 -0
  75. package/dist/diagnostics/codes/hygiene.d.ts +8 -0
  76. package/dist/diagnostics/codes/hygiene.d.ts.map +1 -0
  77. package/dist/diagnostics/codes/hygiene.js +154 -0
  78. package/dist/diagnostics/codes/hygiene.js.map +1 -0
  79. package/dist/diagnostics/codes/index.d.ts +51 -0
  80. package/dist/diagnostics/codes/index.d.ts.map +1 -0
  81. package/dist/diagnostics/codes/index.js +72 -0
  82. package/dist/diagnostics/codes/index.js.map +1 -0
  83. package/dist/diagnostics/codes/live.d.ts +8 -0
  84. package/dist/diagnostics/codes/live.d.ts.map +1 -0
  85. package/dist/diagnostics/codes/live.js +30 -0
  86. package/dist/diagnostics/codes/live.js.map +1 -0
  87. package/dist/diagnostics/codes/manifest.d.ts +8 -0
  88. package/dist/diagnostics/codes/manifest.d.ts.map +1 -0
  89. package/dist/diagnostics/codes/manifest.js +44 -0
  90. package/dist/diagnostics/codes/manifest.js.map +1 -0
  91. package/dist/diagnostics/codes/network.d.ts +8 -0
  92. package/dist/diagnostics/codes/network.d.ts.map +1 -0
  93. package/dist/diagnostics/codes/network.js +30 -0
  94. package/dist/diagnostics/codes/network.js.map +1 -0
  95. package/dist/diagnostics/codes/platform.d.ts +8 -0
  96. package/dist/diagnostics/codes/platform.d.ts.map +1 -0
  97. package/dist/diagnostics/codes/platform.js +18 -0
  98. package/dist/diagnostics/codes/platform.js.map +1 -0
  99. package/dist/diagnostics/codes/publish.d.ts +8 -0
  100. package/dist/diagnostics/codes/publish.d.ts.map +1 -0
  101. package/dist/diagnostics/codes/publish.js +44 -0
  102. package/dist/diagnostics/codes/publish.js.map +1 -0
  103. package/dist/diagnostics/codes/regression.d.ts +8 -0
  104. package/dist/diagnostics/codes/regression.d.ts.map +1 -0
  105. package/dist/diagnostics/codes/regression.js +77 -0
  106. package/dist/diagnostics/codes/regression.js.map +1 -0
  107. package/dist/diagnostics/codes/runtime.d.ts +8 -0
  108. package/dist/diagnostics/codes/runtime.d.ts.map +1 -0
  109. package/dist/diagnostics/codes/runtime.js +66 -0
  110. package/dist/diagnostics/codes/runtime.js.map +1 -0
  111. package/dist/diagnostics/codes/secret.d.ts +8 -0
  112. package/dist/diagnostics/codes/secret.d.ts.map +1 -0
  113. package/dist/diagnostics/codes/secret.js +18 -0
  114. package/dist/diagnostics/codes/secret.js.map +1 -0
  115. package/dist/diagnostics/codes/smoke.d.ts +8 -0
  116. package/dist/diagnostics/codes/smoke.d.ts.map +1 -0
  117. package/dist/diagnostics/codes/smoke.js +30 -0
  118. package/dist/diagnostics/codes/smoke.js.map +1 -0
  119. package/dist/diagnostics/codes/submit.d.ts +8 -0
  120. package/dist/diagnostics/codes/submit.d.ts.map +1 -0
  121. package/dist/diagnostics/codes/submit.js +99 -0
  122. package/dist/diagnostics/codes/submit.js.map +1 -0
  123. package/dist/diagnostics/codes/target.d.ts +8 -0
  124. package/dist/diagnostics/codes/target.d.ts.map +1 -0
  125. package/dist/diagnostics/codes/target.js +18 -0
  126. package/dist/diagnostics/codes/target.js.map +1 -0
  127. package/dist/diagnostics/codes/type.d.ts +8 -0
  128. package/dist/diagnostics/codes/type.d.ts.map +1 -0
  129. package/dist/diagnostics/codes/type.js +30 -0
  130. package/dist/diagnostics/codes/type.js.map +1 -0
  131. package/dist/diagnostics/codes/verify.d.ts +8 -0
  132. package/dist/diagnostics/codes/verify.d.ts.map +1 -0
  133. package/dist/diagnostics/codes/verify.js +99 -0
  134. package/dist/diagnostics/codes/verify.js.map +1 -0
  135. package/dist/diagnostics/diagnostic.d.ts +79 -0
  136. package/dist/diagnostics/diagnostic.d.ts.map +1 -0
  137. package/dist/diagnostics/diagnostic.js +131 -0
  138. package/dist/diagnostics/diagnostic.js.map +1 -0
  139. package/dist/diagnostics/spec.d.ts +49 -0
  140. package/dist/diagnostics/spec.d.ts.map +1 -0
  141. package/dist/diagnostics/spec.js +31 -0
  142. package/dist/diagnostics/spec.js.map +1 -0
  143. package/dist/hygiene.d.ts +66 -0
  144. package/dist/hygiene.d.ts.map +1 -0
  145. package/dist/hygiene.js +134 -0
  146. package/dist/hygiene.js.map +1 -0
  147. package/dist/ids.d.ts +119 -0
  148. package/dist/ids.d.ts.map +1 -0
  149. package/dist/ids.js +135 -0
  150. package/dist/ids.js.map +1 -0
  151. package/dist/index.d.ts +86 -0
  152. package/dist/index.js +86 -0
  153. package/dist/interaction.d.ts +391 -0
  154. package/dist/interaction.d.ts.map +1 -0
  155. package/dist/interaction.js +306 -0
  156. package/dist/interaction.js.map +1 -0
  157. package/dist/manifest.d.ts +97 -0
  158. package/dist/manifest.d.ts.map +1 -0
  159. package/dist/manifest.js +101 -0
  160. package/dist/manifest.js.map +1 -0
  161. package/dist/method.d.ts +26 -0
  162. package/dist/method.d.ts.map +1 -0
  163. package/dist/method.js +10 -0
  164. package/dist/method.js.map +1 -0
  165. package/dist/methods/artifact/create.d.ts +29 -0
  166. package/dist/methods/artifact/create.d.ts.map +1 -0
  167. package/dist/methods/artifact/create.js +31 -0
  168. package/dist/methods/artifact/create.js.map +1 -0
  169. package/dist/methods/artifact/get.d.ts +17 -0
  170. package/dist/methods/artifact/get.d.ts.map +1 -0
  171. package/dist/methods/artifact/get.js +21 -0
  172. package/dist/methods/artifact/get.js.map +1 -0
  173. package/dist/methods/artifact/list.d.ts +22 -0
  174. package/dist/methods/artifact/list.d.ts.map +1 -0
  175. package/dist/methods/artifact/list.js +19 -0
  176. package/dist/methods/artifact/list.js.map +1 -0
  177. package/dist/methods/artifact/publish.d.ts +28 -0
  178. package/dist/methods/artifact/publish.d.ts.map +1 -0
  179. package/dist/methods/artifact/publish.js +28 -0
  180. package/dist/methods/artifact/publish.js.map +1 -0
  181. package/dist/methods/artifact/verify.d.ts +29 -0
  182. package/dist/methods/artifact/verify.d.ts.map +1 -0
  183. package/dist/methods/artifact/verify.js +27 -0
  184. package/dist/methods/artifact/verify.js.map +1 -0
  185. package/dist/methods/deps/add.d.ts +43 -0
  186. package/dist/methods/deps/add.d.ts.map +1 -0
  187. package/dist/methods/deps/add.js +40 -0
  188. package/dist/methods/deps/add.js.map +1 -0
  189. package/dist/methods/dev/start.d.ts +52 -0
  190. package/dist/methods/dev/start.d.ts.map +1 -0
  191. package/dist/methods/dev/start.js +56 -0
  192. package/dist/methods/dev/start.js.map +1 -0
  193. package/dist/methods/dev/stop.d.ts +16 -0
  194. package/dist/methods/dev/stop.d.ts.map +1 -0
  195. package/dist/methods/dev/stop.js +21 -0
  196. package/dist/methods/dev/stop.js.map +1 -0
  197. package/dist/methods/events/ack.d.ts +20 -0
  198. package/dist/methods/events/ack.d.ts.map +1 -0
  199. package/dist/methods/events/ack.js +26 -0
  200. package/dist/methods/events/ack.js.map +1 -0
  201. package/dist/methods/events/read.d.ts +40 -0
  202. package/dist/methods/events/read.d.ts.map +1 -0
  203. package/dist/methods/events/read.js +35 -0
  204. package/dist/methods/events/read.js.map +1 -0
  205. package/dist/methods/events/subscribe.d.ts +54 -0
  206. package/dist/methods/events/subscribe.d.ts.map +1 -0
  207. package/dist/methods/events/subscribe.js +44 -0
  208. package/dist/methods/events/subscribe.js.map +1 -0
  209. package/dist/methods/events/unsubscribe.d.ts +16 -0
  210. package/dist/methods/events/unsubscribe.d.ts.map +1 -0
  211. package/dist/methods/events/unsubscribe.js +21 -0
  212. package/dist/methods/events/unsubscribe.js.map +1 -0
  213. package/dist/methods/gc/run.d.ts +76 -0
  214. package/dist/methods/gc/run.d.ts.map +1 -0
  215. package/dist/methods/gc/run.js +56 -0
  216. package/dist/methods/gc/run.js.map +1 -0
  217. package/dist/methods/index.d.ts +6 -0
  218. package/dist/methods/index.d.ts.map +1 -0
  219. package/dist/methods/index.js +78 -0
  220. package/dist/methods/index.js.map +1 -0
  221. package/dist/methods/instance/check.d.ts +30 -0
  222. package/dist/methods/instance/check.d.ts.map +1 -0
  223. package/dist/methods/instance/check.js +34 -0
  224. package/dist/methods/instance/check.js.map +1 -0
  225. package/dist/methods/instance/status.d.ts +102 -0
  226. package/dist/methods/instance/status.d.ts.map +1 -0
  227. package/dist/methods/instance/status.js +83 -0
  228. package/dist/methods/instance/status.js.map +1 -0
  229. package/dist/methods/live/push.d.ts +28 -0
  230. package/dist/methods/live/push.d.ts.map +1 -0
  231. package/dist/methods/live/push.js +35 -0
  232. package/dist/methods/live/push.js.map +1 -0
  233. package/dist/methods/mostra/initialize.d.ts +143 -0
  234. package/dist/methods/mostra/initialize.d.ts.map +1 -0
  235. package/dist/methods/mostra/initialize.js +97 -0
  236. package/dist/methods/mostra/initialize.js.map +1 -0
  237. package/dist/methods/mostra/shutdown.d.ts +14 -0
  238. package/dist/methods/mostra/shutdown.d.ts.map +1 -0
  239. package/dist/methods/mostra/shutdown.js +22 -0
  240. package/dist/methods/mostra/shutdown.js.map +1 -0
  241. package/dist/methods/port/drafts-mirror.d.ts +30 -0
  242. package/dist/methods/port/drafts-mirror.d.ts.map +1 -0
  243. package/dist/methods/port/drafts-mirror.js +33 -0
  244. package/dist/methods/port/drafts-mirror.js.map +1 -0
  245. package/dist/methods/port/secrets-get.d.ts +19 -0
  246. package/dist/methods/port/secrets-get.d.ts.map +1 -0
  247. package/dist/methods/port/secrets-get.js +31 -0
  248. package/dist/methods/port/secrets-get.js.map +1 -0
  249. package/dist/methods/port/submissions-deliver.d.ts +38 -0
  250. package/dist/methods/port/submissions-deliver.d.ts.map +1 -0
  251. package/dist/methods/port/submissions-deliver.js +38 -0
  252. package/dist/methods/port/submissions-deliver.js.map +1 -0
  253. package/dist/methods/port/trusted-controls-activated.d.ts +27 -0
  254. package/dist/methods/port/trusted-controls-activated.d.ts.map +1 -0
  255. package/dist/methods/port/trusted-controls-activated.js +33 -0
  256. package/dist/methods/port/trusted-controls-activated.js.map +1 -0
  257. package/dist/methods/port/trusted-controls-policy.d.ts +21 -0
  258. package/dist/methods/port/trusted-controls-policy.d.ts.map +1 -0
  259. package/dist/methods/port/trusted-controls-policy.js +27 -0
  260. package/dist/methods/port/trusted-controls-policy.js.map +1 -0
  261. package/dist/methods/results/get.d.ts +32 -0
  262. package/dist/methods/results/get.d.ts.map +1 -0
  263. package/dist/methods/results/get.js +36 -0
  264. package/dist/methods/results/get.js.map +1 -0
  265. package/dist/methods/secret/delete.d.ts +22 -0
  266. package/dist/methods/secret/delete.d.ts.map +1 -0
  267. package/dist/methods/secret/delete.js +32 -0
  268. package/dist/methods/secret/delete.js.map +1 -0
  269. package/dist/methods/secret/list.d.ts +21 -0
  270. package/dist/methods/secret/list.d.ts.map +1 -0
  271. package/dist/methods/secret/list.js +29 -0
  272. package/dist/methods/secret/list.js.map +1 -0
  273. package/dist/methods/secret/set.d.ts +37 -0
  274. package/dist/methods/secret/set.d.ts.map +1 -0
  275. package/dist/methods/secret/set.js +41 -0
  276. package/dist/methods/secret/set.js.map +1 -0
  277. package/dist/methods/state/get.d.ts +25 -0
  278. package/dist/methods/state/get.d.ts.map +1 -0
  279. package/dist/methods/state/get.js +29 -0
  280. package/dist/methods/state/get.js.map +1 -0
  281. package/dist/methods/state/patch.d.ts +32 -0
  282. package/dist/methods/state/patch.d.ts.map +1 -0
  283. package/dist/methods/state/patch.js +29 -0
  284. package/dist/methods/state/patch.js.map +1 -0
  285. package/dist/methods/view/default.d.ts +19 -0
  286. package/dist/methods/view/default.d.ts.map +1 -0
  287. package/dist/methods/view/default.js +23 -0
  288. package/dist/methods/view/default.js.map +1 -0
  289. package/dist/methods/view/launch.d.ts +27 -0
  290. package/dist/methods/view/launch.d.ts.map +1 -0
  291. package/dist/methods/view/launch.js +30 -0
  292. package/dist/methods/view/launch.js.map +1 -0
  293. package/dist/methods/view/revoke.d.ts +19 -0
  294. package/dist/methods/view/revoke.d.ts.map +1 -0
  295. package/dist/methods/view/revoke.js +26 -0
  296. package/dist/methods/view/revoke.js.map +1 -0
  297. package/dist/methods/view/rotate.d.ts +21 -0
  298. package/dist/methods/view/rotate.d.ts.map +1 -0
  299. package/dist/methods/view/rotate.js +27 -0
  300. package/dist/methods/view/rotate.js.map +1 -0
  301. package/dist/methods/view/url.d.ts +52 -0
  302. package/dist/methods/view/url.d.ts.map +1 -0
  303. package/dist/methods/view/url.js +43 -0
  304. package/dist/methods/view/url.js.map +1 -0
  305. package/dist/methods/wait/wait.d.ts +37 -0
  306. package/dist/methods/wait/wait.d.ts.map +1 -0
  307. package/dist/methods/wait/wait.js +39 -0
  308. package/dist/methods/wait/wait.js.map +1 -0
  309. package/dist/revision.d.ts +43 -0
  310. package/dist/revision.d.ts.map +1 -0
  311. package/dist/revision.js +69 -0
  312. package/dist/revision.js.map +1 -0
  313. package/dist/rpc/error.d.ts +47 -0
  314. package/dist/rpc/error.d.ts.map +1 -0
  315. package/dist/rpc/error.js +77 -0
  316. package/dist/rpc/error.js.map +1 -0
  317. package/dist/rpc/lines.d.ts +30 -0
  318. package/dist/rpc/lines.d.ts.map +1 -0
  319. package/dist/rpc/lines.js +63 -0
  320. package/dist/rpc/lines.js.map +1 -0
  321. package/dist/rpc/messages.d.ts +92 -0
  322. package/dist/rpc/messages.d.ts.map +1 -0
  323. package/dist/rpc/messages.js +133 -0
  324. package/dist/rpc/messages.js.map +1 -0
  325. package/dist/rpc/peer.d.ts +81 -0
  326. package/dist/rpc/peer.d.ts.map +1 -0
  327. package/dist/rpc/peer.js +208 -0
  328. package/dist/rpc/peer.js.map +1 -0
  329. package/dist/serializer.d.ts +178 -0
  330. package/dist/serializer.d.ts.map +1 -0
  331. package/dist/serializer.js +929 -0
  332. package/dist/serializer.js.map +1 -0
  333. package/dist/verify.d.ts +254 -0
  334. package/dist/verify.d.ts.map +1 -0
  335. package/dist/verify.js +243 -0
  336. package/dist/verify.js.map +1 -0
  337. package/dist/view.d.ts +103 -0
  338. package/dist/view.d.ts.map +1 -0
  339. package/dist/view.js +110 -0
  340. package/dist/view.js.map +1 -0
  341. package/dist/wire-registry.js +11 -0
  342. package/dist/wire-registry.js.map +1 -0
  343. package/dist/worker.d.ts +249 -0
  344. package/dist/worker.d.ts.map +1 -0
  345. package/dist/worker.js +158 -0
  346. package/dist/worker.js.map +1 -0
  347. package/package.json +114 -3
  348. package/schemas/protocol.draft-07.json +5120 -0
  349. package/schemas/protocol.schema.json +4964 -0
  350. package/src/actions.ts +418 -0
  351. package/src/artifact.ts +187 -0
  352. package/src/bridge.ts +618 -0
  353. package/src/browser.ts +374 -0
  354. package/src/bundle.ts +264 -0
  355. package/src/canonical.ts +49 -0
  356. package/src/capability.ts +92 -0
  357. package/src/diagnostics/codes/a11y.ts +41 -0
  358. package/src/diagnostics/codes/action.ts +125 -0
  359. package/src/diagnostics/codes/artifact.ts +137 -0
  360. package/src/diagnostics/codes/build.ts +65 -0
  361. package/src/diagnostics/codes/cli.ts +53 -0
  362. package/src/diagnostics/codes/console.ts +41 -0
  363. package/src/diagnostics/codes/dep.ts +101 -0
  364. package/src/diagnostics/codes/env.ts +149 -0
  365. package/src/diagnostics/codes/field.ts +113 -0
  366. package/src/diagnostics/codes/home.ts +150 -0
  367. package/src/diagnostics/codes/host.ts +197 -0
  368. package/src/diagnostics/codes/hygiene.ts +175 -0
  369. package/src/diagnostics/codes/index.ts +142 -0
  370. package/src/diagnostics/codes/live.ts +41 -0
  371. package/src/diagnostics/codes/manifest.ts +53 -0
  372. package/src/diagnostics/codes/network.ts +41 -0
  373. package/src/diagnostics/codes/platform.ts +30 -0
  374. package/src/diagnostics/codes/publish.ts +53 -0
  375. package/src/diagnostics/codes/regression.ts +89 -0
  376. package/src/diagnostics/codes/runtime.ts +77 -0
  377. package/src/diagnostics/codes/secret.ts +29 -0
  378. package/src/diagnostics/codes/smoke.ts +41 -0
  379. package/src/diagnostics/codes/submit.ts +113 -0
  380. package/src/diagnostics/codes/target.ts +29 -0
  381. package/src/diagnostics/codes/type.ts +41 -0
  382. package/src/diagnostics/codes/verify.ts +113 -0
  383. package/src/diagnostics/diagnostic.ts +240 -0
  384. package/src/diagnostics/spec.ts +90 -0
  385. package/src/hygiene.ts +224 -0
  386. package/src/ids.ts +279 -0
  387. package/src/index.ts +576 -0
  388. package/src/interaction.ts +728 -0
  389. package/src/manifest.ts +206 -0
  390. package/src/method.ts +42 -0
  391. package/src/methods/artifact/create.ts +56 -0
  392. package/src/methods/artifact/get.ts +30 -0
  393. package/src/methods/artifact/list.ts +42 -0
  394. package/src/methods/artifact/publish.ts +46 -0
  395. package/src/methods/artifact/verify.ts +46 -0
  396. package/src/methods/deps/add.ts +72 -0
  397. package/src/methods/dev/start.ts +84 -0
  398. package/src/methods/dev/stop.ts +32 -0
  399. package/src/methods/events/ack.ts +41 -0
  400. package/src/methods/events/read.ts +67 -0
  401. package/src/methods/events/subscribe.ts +91 -0
  402. package/src/methods/events/unsubscribe.ts +35 -0
  403. package/src/methods/gc/run.ts +125 -0
  404. package/src/methods/index.ts +81 -0
  405. package/src/methods/instance/check.ts +61 -0
  406. package/src/methods/instance/status.ts +172 -0
  407. package/src/methods/live/push.ts +54 -0
  408. package/src/methods/mostra/initialize.ts +249 -0
  409. package/src/methods/mostra/shutdown.ts +31 -0
  410. package/src/methods/port/drafts-mirror.ts +52 -0
  411. package/src/methods/port/secrets-get.ts +40 -0
  412. package/src/methods/port/submissions-deliver.ts +70 -0
  413. package/src/methods/port/trusted-controls-activated.ts +51 -0
  414. package/src/methods/port/trusted-controls-policy.ts +38 -0
  415. package/src/methods/results/get.ts +59 -0
  416. package/src/methods/secret/delete.ts +43 -0
  417. package/src/methods/secret/list.ts +40 -0
  418. package/src/methods/secret/set.ts +69 -0
  419. package/src/methods/state/get.ts +44 -0
  420. package/src/methods/state/patch.ts +51 -0
  421. package/src/methods/view/default.ts +32 -0
  422. package/src/methods/view/launch.ts +47 -0
  423. package/src/methods/view/revoke.ts +39 -0
  424. package/src/methods/view/rotate.ts +37 -0
  425. package/src/methods/view/url.ts +84 -0
  426. package/src/methods/wait/wait.ts +58 -0
  427. package/src/revision.ts +101 -0
  428. package/src/rpc/error.ts +107 -0
  429. package/src/rpc/lines.ts +70 -0
  430. package/src/rpc/messages.ts +188 -0
  431. package/src/rpc/peer.ts +341 -0
  432. package/src/serializer.ts +1217 -0
  433. package/src/timers.d.ts +8 -0
  434. package/src/verify.ts +458 -0
  435. package/src/view.ts +200 -0
  436. package/src/web-crypto.d.ts +9 -0
  437. package/src/web-platform.d.ts +35 -0
  438. package/src/wire-registry.ts +14 -0
  439. package/src/worker.ts +374 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"method.js","names":[],"sources":["../src/method.ts"],"sourcesContent":["/**\n * Host protocol methods (INTERFACES §6, D59): JSON-RPC 2.0 methods between clients and an\n * instance, each defined once with Zod schemas for its params and result. `pnpm gen\n * protocol-method <group>/<name>` adds one in the right shape; the method modules live in\n * `methods/` and are listed in `methods/index.ts`.\n */\nimport type * as z from \"zod\";\n\n/** Who sends the request: a client to the instance, or the instance to a registering host (ports). */\nexport type MethodDirection = \"client-to-instance\" | \"instance-to-host\";\n\n/** One protocol method. */\nexport interface MethodDefinition<Params, Result> {\n /** The JSON-RPC method name: `group/name` (`artifact/publish`) or a bare name (`wait`). */\n readonly method: string;\n /** Who sends the request. */\n readonly direction: MethodDirection;\n /**\n * Whether the method changes durable state. Mutating methods take an optional `requestId`, and a\n * retry with the same ID returns the recorded result (H-03).\n */\n readonly mutating: boolean;\n /** The schema of the request's `params`. */\n readonly params: z.ZodType<Params>;\n /** The schema of a successful response's `result`. */\n readonly result: z.ZodType<Result>;\n}\n\n/** A method of any params and result type. */\nexport type AnyMethod = MethodDefinition<unknown, unknown>;\n\n/** Defines a protocol method, checking its name has the `group/name` (or bare `name`) form. */\nexport function defineMethod<Params, Result>(\n definition: MethodDefinition<Params, Result>,\n): MethodDefinition<Params, Result> {\n if (!/^([a-z][a-zA-Z]*\\/)?[a-z][a-zA-Z.]*$/.test(definition.method)) {\n throw new Error(\n `Protocol method names have the form group/name or name, got \"${definition.method}\".`,\n );\n }\n return definition;\n}\n"],"mappings":";;AAgCA,SAAgB,aACd,YACkC;CAClC,IAAI,CAAC,uCAAuC,KAAK,WAAW,MAAM,GAChE,MAAM,IAAI,MACR,gEAAgE,WAAW,OAAO,GACpF;CAEF,OAAO;AACT"}
@@ -0,0 +1,29 @@
1
+ import { MethodDefinition } from "../../method.js";
2
+ //#region src/methods/artifact/create.d.ts
3
+ /** The params of `artifact/create` (INTERFACES §6). */
4
+ export interface ArtifactCreateParams {
5
+ /** The new artifact's directory, absolute. It must not exist yet, or be empty. */
6
+ readonly dir: string;
7
+ /** A template to start from. Templates arrive with `mostra new` (WP-26); none is the default. */
8
+ readonly template?: string;
9
+ /** The artifact's title. Default: the directory's name. */
10
+ readonly title?: string;
11
+ /** Makes retries idempotent: a repeated `requestId` returns the recorded result (H-03). */
12
+ readonly requestId?: string;
13
+ }
14
+ /** The result of `artifact/create`. */
15
+ export interface ArtifactCreateResult {
16
+ /** The generated artifact ID, written into the entry's manifest. */
17
+ readonly artifactId: string;
18
+ /** The artifact's directory (its real path). */
19
+ readonly dir: string;
20
+ /** The files written, relative to `dir`. */
21
+ readonly files: readonly string[];
22
+ }
23
+ /**
24
+ * `artifact/create`: writes a new artifact's entry, with a generated artifact ID in its manifest, into
25
+ * an empty directory. The artifact appears in `artifact/list` once it is published.
26
+ */
27
+ export declare const artifactCreateMethod: MethodDefinition<ArtifactCreateParams, ArtifactCreateResult>;
28
+ //#endregion
29
+ //# sourceMappingURL=create.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.d.ts","names":[],"sources":["../../../src/methods/artifact/create.ts"],"mappings":";;;iBAMiB;;WAEN;;WAEA;;WAEA;;WAEA;;;iBAIM;;WAEN;;WAEA;;WAEA;;;;;;qBAwBE,sBAAsB,iBAAiB,sBAAsB"}
@@ -0,0 +1,31 @@
1
+ import { wireRegistry } from "../../wire-registry.js";
2
+ import { ArtifactId } from "../../ids.js";
3
+ import { defineMethod } from "../../method.js";
4
+ import * as z from "zod";
5
+ //#region src/methods/artifact/create.ts
6
+ const params = z.object({
7
+ dir: z.string().regex(/^\//),
8
+ template: z.string().min(1).exactOptional(),
9
+ title: z.string().min(1).exactOptional(),
10
+ requestId: z.string().min(1).exactOptional()
11
+ }).register(wireRegistry, { id: "ArtifactCreateParams" });
12
+ const result = z.object({
13
+ artifactId: ArtifactId.schema,
14
+ dir: z.string(),
15
+ files: z.array(z.string()).readonly()
16
+ }).register(wireRegistry, { id: "ArtifactCreateResult" });
17
+ /**
18
+ * `artifact/create`: writes a new artifact's entry, with a generated artifact ID in its manifest, into
19
+ * an empty directory. The artifact appears in `artifact/list` once it is published.
20
+ */
21
+ const artifactCreateMethod = defineMethod({
22
+ method: "artifact/create",
23
+ direction: "client-to-instance",
24
+ mutating: true,
25
+ params,
26
+ result
27
+ });
28
+ //#endregion
29
+ export { artifactCreateMethod };
30
+
31
+ //# sourceMappingURL=create.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.js","names":[],"sources":["../../../src/methods/artifact/create.ts"],"sourcesContent":["import * as z from \"zod\";\nimport { ArtifactId } from \"../../ids.ts\";\nimport { defineMethod, type MethodDefinition } from \"../../method.ts\";\nimport { wireRegistry } from \"../../wire-registry.ts\";\n\n/** The params of `artifact/create` (INTERFACES §6). */\nexport interface ArtifactCreateParams {\n /** The new artifact's directory, absolute. It must not exist yet, or be empty. */\n readonly dir: string;\n /** A template to start from. Templates arrive with `mostra new` (WP-26); none is the default. */\n readonly template?: string;\n /** The artifact's title. Default: the directory's name. */\n readonly title?: string;\n /** Makes retries idempotent: a repeated `requestId` returns the recorded result (H-03). */\n readonly requestId?: string;\n}\n\n/** The result of `artifact/create`. */\nexport interface ArtifactCreateResult {\n /** The generated artifact ID, written into the entry's manifest. */\n readonly artifactId: string;\n /** The artifact's directory (its real path). */\n readonly dir: string;\n /** The files written, relative to `dir`. */\n readonly files: readonly string[];\n}\n\nconst params: z.ZodType<ArtifactCreateParams> = z\n .object({\n dir: z.string().regex(/^\\//),\n template: z.string().min(1).exactOptional(),\n title: z.string().min(1).exactOptional(),\n requestId: z.string().min(1).exactOptional(),\n })\n .register(wireRegistry, { id: \"ArtifactCreateParams\" });\n\nconst result: z.ZodType<ArtifactCreateResult> = z\n .object({\n artifactId: ArtifactId.schema,\n dir: z.string(),\n files: z.array(z.string()).readonly(),\n })\n .register(wireRegistry, { id: \"ArtifactCreateResult\" });\n\n/**\n * `artifact/create`: writes a new artifact's entry, with a generated artifact ID in its manifest, into\n * an empty directory. The artifact appears in `artifact/list` once it is published.\n */\nexport const artifactCreateMethod: MethodDefinition<ArtifactCreateParams, ArtifactCreateResult> =\n defineMethod({\n method: \"artifact/create\",\n direction: \"client-to-instance\",\n mutating: true,\n params,\n result,\n });\n"],"mappings":";;;;;AA2BA,MAAM,SAA0C,EAC7C,OAAO;CACN,KAAK,EAAE,OAAO,CAAC,CAAC,MAAM,KAAK;CAC3B,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc;CAC1C,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc;CACvC,WAAW,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc;AAC7C,CAAC,CAAC,CACD,SAAS,cAAc,EAAE,IAAI,uBAAuB,CAAC;AAExD,MAAM,SAA0C,EAC7C,OAAO;CACN,YAAY,WAAW;CACvB,KAAK,EAAE,OAAO;CACd,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS;AACtC,CAAC,CAAC,CACD,SAAS,cAAc,EAAE,IAAI,uBAAuB,CAAC;;;;;AAMxD,MAAa,uBACX,aAAa;CACX,QAAQ;CACR,WAAW;CACX,UAAU;CACV;CACA;AACF,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { ArtifactDetail, ArtifactRef } from "../../artifact.js";
2
+ import { MethodDefinition } from "../../method.js";
3
+ //#region src/methods/artifact/get.d.ts
4
+ /** The params of `artifact/get` (INTERFACES §6). */
5
+ export interface ArtifactGetParams {
6
+ /** The artifact, by ID or by a source path bound to it. */
7
+ readonly artifact: ArtifactRef;
8
+ }
9
+ /** The result of `artifact/get`. */
10
+ export type ArtifactGetResult = ArtifactDetail;
11
+ /**
12
+ * `artifact/get`: one artifact with its metadata, policy, source and every version. An unknown
13
+ * artifact is `MOSTRA_ARTIFACT_NOT_FOUND`.
14
+ */
15
+ export declare const artifactGetMethod: MethodDefinition<ArtifactGetParams, ArtifactGetResult>;
16
+ //#endregion
17
+ //# sourceMappingURL=get.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.d.ts","names":[],"sources":["../../../src/methods/artifact/get.ts"],"mappings":";;;;iBAMiB;;WAEN,UAAU;;;YAIT,oBAAoB;;;;;qBAUnB,mBAAmB,iBAAiB,mBAAmB"}
@@ -0,0 +1,21 @@
1
+ import { wireRegistry } from "../../wire-registry.js";
2
+ import { ArtifactDetail, ArtifactRef } from "../../artifact.js";
3
+ import { defineMethod } from "../../method.js";
4
+ import * as z from "zod";
5
+ //#region src/methods/artifact/get.ts
6
+ const params = z.object({ artifact: ArtifactRef }).register(wireRegistry, { id: "ArtifactGetParams" });
7
+ /**
8
+ * `artifact/get`: one artifact with its metadata, policy, source and every version. An unknown
9
+ * artifact is `MOSTRA_ARTIFACT_NOT_FOUND`.
10
+ */
11
+ const artifactGetMethod = defineMethod({
12
+ method: "artifact/get",
13
+ direction: "client-to-instance",
14
+ mutating: false,
15
+ params,
16
+ result: ArtifactDetail
17
+ });
18
+ //#endregion
19
+ export { artifactGetMethod };
20
+
21
+ //# sourceMappingURL=get.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.js","names":[],"sources":["../../../src/methods/artifact/get.ts"],"sourcesContent":["import * as z from \"zod\";\nimport { ArtifactDetail, ArtifactRef } from \"../../artifact.ts\";\nimport { defineMethod, type MethodDefinition } from \"../../method.ts\";\nimport { wireRegistry } from \"../../wire-registry.ts\";\n\n/** The params of `artifact/get` (INTERFACES §6). */\nexport interface ArtifactGetParams {\n /** The artifact, by ID or by a source path bound to it. */\n readonly artifact: ArtifactRef;\n}\n\n/** The result of `artifact/get`. */\nexport type ArtifactGetResult = ArtifactDetail;\n\nconst params: z.ZodType<ArtifactGetParams> = z\n .object({ artifact: ArtifactRef })\n .register(wireRegistry, { id: \"ArtifactGetParams\" });\n\n/**\n * `artifact/get`: one artifact with its metadata, policy, source and every version. An unknown\n * artifact is `MOSTRA_ARTIFACT_NOT_FOUND`.\n */\nexport const artifactGetMethod: MethodDefinition<ArtifactGetParams, ArtifactGetResult> =\n defineMethod({\n method: \"artifact/get\",\n direction: \"client-to-instance\",\n mutating: false,\n params,\n result: ArtifactDetail,\n });\n"],"mappings":";;;;;AAcA,MAAM,SAAuC,EAC1C,OAAO,EAAE,UAAU,YAAY,CAAC,CAAC,CACjC,SAAS,cAAc,EAAE,IAAI,oBAAoB,CAAC;;;;;AAMrD,MAAa,oBACX,aAAa;CACX,QAAQ;CACR,WAAW;CACX,UAAU;CACV;CACA,QAAQ;AACV,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { ArtifactSummary } from "../../artifact.js";
2
+ import { MethodDefinition } from "../../method.js";
3
+ //#region src/methods/artifact/list.d.ts
4
+ /** Narrows `artifact/list`. */
5
+ export interface ArtifactListFilter {
6
+ /** Only artifacts of this family (INTERFACES §2.2). */
7
+ readonly family?: string;
8
+ }
9
+ /** The params of `artifact/list` (INTERFACES §6). */
10
+ export interface ArtifactListParams {
11
+ /** Narrows the list; all artifacts when absent. */
12
+ readonly filter?: ArtifactListFilter;
13
+ }
14
+ /** The result of `artifact/list`. */
15
+ export interface ArtifactListResult {
16
+ /** The home's published artifacts, most recently published first. */
17
+ readonly artifacts: readonly ArtifactSummary[];
18
+ }
19
+ /** `artifact/list`: lists the home's published artifacts. */
20
+ export declare const artifactListMethod: MethodDefinition<ArtifactListParams, ArtifactListResult>;
21
+ //#endregion
22
+ //# sourceMappingURL=list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.d.ts","names":[],"sources":["../../../src/methods/artifact/list.ts"],"mappings":";;;;iBAMiB;;WAEN;;;iBAIM;;WAEN,SAAS;;;iBAIH;;WAEN,oBAAoB;;;qBAclB,oBAAoB,iBAAiB,oBAAoB"}
@@ -0,0 +1,19 @@
1
+ import { wireRegistry } from "../../wire-registry.js";
2
+ import { ArtifactSummary } from "../../artifact.js";
3
+ import { defineMethod } from "../../method.js";
4
+ import * as z from "zod";
5
+ //#region src/methods/artifact/list.ts
6
+ const params = z.object({ filter: z.object({ family: z.string().min(1).exactOptional() }).exactOptional() }).register(wireRegistry, { id: "ArtifactListParams" });
7
+ const result = z.object({ artifacts: z.array(ArtifactSummary).readonly() }).register(wireRegistry, { id: "ArtifactListResult" });
8
+ /** `artifact/list`: lists the home's published artifacts. */
9
+ const artifactListMethod = defineMethod({
10
+ method: "artifact/list",
11
+ direction: "client-to-instance",
12
+ mutating: false,
13
+ params,
14
+ result
15
+ });
16
+ //#endregion
17
+ export { artifactListMethod };
18
+
19
+ //# sourceMappingURL=list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.js","names":[],"sources":["../../../src/methods/artifact/list.ts"],"sourcesContent":["import * as z from \"zod\";\nimport { ArtifactSummary } from \"../../artifact.ts\";\nimport { defineMethod, type MethodDefinition } from \"../../method.ts\";\nimport { wireRegistry } from \"../../wire-registry.ts\";\n\n/** Narrows `artifact/list`. */\nexport interface ArtifactListFilter {\n /** Only artifacts of this family (INTERFACES §2.2). */\n readonly family?: string;\n}\n\n/** The params of `artifact/list` (INTERFACES §6). */\nexport interface ArtifactListParams {\n /** Narrows the list; all artifacts when absent. */\n readonly filter?: ArtifactListFilter;\n}\n\n/** The result of `artifact/list`. */\nexport interface ArtifactListResult {\n /** The home's published artifacts, most recently published first. */\n readonly artifacts: readonly ArtifactSummary[];\n}\n\nconst params: z.ZodType<ArtifactListParams> = z\n .object({\n filter: z.object({ family: z.string().min(1).exactOptional() }).exactOptional(),\n })\n .register(wireRegistry, { id: \"ArtifactListParams\" });\n\nconst result: z.ZodType<ArtifactListResult> = z\n .object({ artifacts: z.array(ArtifactSummary).readonly() })\n .register(wireRegistry, { id: \"ArtifactListResult\" });\n\n/** `artifact/list`: lists the home's published artifacts. */\nexport const artifactListMethod: MethodDefinition<ArtifactListParams, ArtifactListResult> =\n defineMethod({\n method: \"artifact/list\",\n direction: \"client-to-instance\",\n mutating: false,\n params,\n result,\n });\n"],"mappings":";;;;;AAuBA,MAAM,SAAwC,EAC3C,OAAO,EACN,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,cAAc,EAChF,CAAC,CAAC,CACD,SAAS,cAAc,EAAE,IAAI,qBAAqB,CAAC;AAEtD,MAAM,SAAwC,EAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAC1D,SAAS,cAAc,EAAE,IAAI,qBAAqB,CAAC;;AAGtD,MAAa,qBACX,aAAa;CACX,QAAQ;CACR,WAAW;CACX,UAAU;CACV;CACA;AACF,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { SubmissionPolicy } from "../../manifest.js";
2
+ import { PublishReceipt, SourceRef } from "../../artifact.js";
3
+ import { MethodDefinition } from "../../method.js";
4
+ //#region src/methods/artifact/publish.d.ts
5
+ /** The params of `artifact/publish` (INTERFACES §6). */
6
+ export interface ArtifactPublishParams {
7
+ /** What to publish: a source path, or an artifact ID meaning the path it was last published from. */
8
+ readonly source: SourceRef;
9
+ /**
10
+ * Publish even when `verify` reports errors, recording their codes in the version (D41). The
11
+ * verify gate arrives with WP-09; until then publish runs no verify and `force` changes nothing.
12
+ */
13
+ readonly force?: boolean;
14
+ /** The submission policy the host decides on, overriding the manifest's request (D39). */
15
+ readonly policy?: SubmissionPolicy;
16
+ /** Makes retries idempotent: a repeated `requestId` returns the recorded result (H-03). */
17
+ readonly requestId?: string;
18
+ }
19
+ /** The result of `artifact/publish`: the receipt, durable before it is sent (H-07). */
20
+ export type ArtifactPublishResult = PublishReceipt;
21
+ /**
22
+ * `artifact/publish`: freezes an artifact's source into an immutable, content-addressed version and
23
+ * returns its receipt. A failed publish leaves no version (VR-02); the same source and environment
24
+ * publish as the existing version (`reused`).
25
+ */
26
+ export declare const artifactPublishMethod: MethodDefinition<ArtifactPublishParams, ArtifactPublishResult>;
27
+ //#endregion
28
+ //# sourceMappingURL=publish.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publish.d.ts","names":[],"sources":["../../../src/methods/artifact/publish.ts"],"mappings":";;;;;iBAOiB;;WAEN,QAAQ;;;;;WAKR;;WAEA,SAAS;;WAET;;;YAIC,wBAAwB;;;;;;qBAgBvB,uBAAuB,iBAAiB,uBAAuB"}
@@ -0,0 +1,28 @@
1
+ import { wireRegistry } from "../../wire-registry.js";
2
+ import { SubmissionPolicy } from "../../manifest.js";
3
+ import { PublishReceipt, SourceRef } from "../../artifact.js";
4
+ import { defineMethod } from "../../method.js";
5
+ import * as z from "zod";
6
+ //#region src/methods/artifact/publish.ts
7
+ const params = z.object({
8
+ source: SourceRef,
9
+ force: z.boolean().exactOptional(),
10
+ policy: SubmissionPolicy.exactOptional(),
11
+ requestId: z.string().min(1).exactOptional()
12
+ }).register(wireRegistry, { id: "ArtifactPublishParams" });
13
+ /**
14
+ * `artifact/publish`: freezes an artifact's source into an immutable, content-addressed version and
15
+ * returns its receipt. A failed publish leaves no version (VR-02); the same source and environment
16
+ * publish as the existing version (`reused`).
17
+ */
18
+ const artifactPublishMethod = defineMethod({
19
+ method: "artifact/publish",
20
+ direction: "client-to-instance",
21
+ mutating: true,
22
+ params,
23
+ result: PublishReceipt
24
+ });
25
+ //#endregion
26
+ export { artifactPublishMethod };
27
+
28
+ //# sourceMappingURL=publish.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publish.js","names":[],"sources":["../../../src/methods/artifact/publish.ts"],"sourcesContent":["import * as z from \"zod\";\nimport { PublishReceipt, SourceRef } from \"../../artifact.ts\";\nimport { SubmissionPolicy } from \"../../manifest.ts\";\nimport { defineMethod, type MethodDefinition } from \"../../method.ts\";\nimport { wireRegistry } from \"../../wire-registry.ts\";\n\n/** The params of `artifact/publish` (INTERFACES §6). */\nexport interface ArtifactPublishParams {\n /** What to publish: a source path, or an artifact ID meaning the path it was last published from. */\n readonly source: SourceRef;\n /**\n * Publish even when `verify` reports errors, recording their codes in the version (D41). The\n * verify gate arrives with WP-09; until then publish runs no verify and `force` changes nothing.\n */\n readonly force?: boolean;\n /** The submission policy the host decides on, overriding the manifest's request (D39). */\n readonly policy?: SubmissionPolicy;\n /** Makes retries idempotent: a repeated `requestId` returns the recorded result (H-03). */\n readonly requestId?: string;\n}\n\n/** The result of `artifact/publish`: the receipt, durable before it is sent (H-07). */\nexport type ArtifactPublishResult = PublishReceipt;\n\nconst params: z.ZodType<ArtifactPublishParams> = z\n .object({\n source: SourceRef,\n force: z.boolean().exactOptional(),\n policy: SubmissionPolicy.exactOptional(),\n requestId: z.string().min(1).exactOptional(),\n })\n .register(wireRegistry, { id: \"ArtifactPublishParams\" });\n\n/**\n * `artifact/publish`: freezes an artifact's source into an immutable, content-addressed version and\n * returns its receipt. A failed publish leaves no version (VR-02); the same source and environment\n * publish as the existing version (`reused`).\n */\nexport const artifactPublishMethod: MethodDefinition<ArtifactPublishParams, ArtifactPublishResult> =\n defineMethod({\n method: \"artifact/publish\",\n direction: \"client-to-instance\",\n mutating: true,\n params,\n result: PublishReceipt,\n });\n"],"mappings":";;;;;;AAwBA,MAAM,SAA2C,EAC9C,OAAO;CACN,QAAQ;CACR,OAAO,EAAE,QAAQ,CAAC,CAAC,cAAc;CACjC,QAAQ,iBAAiB,cAAc;CACvC,WAAW,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc;AAC7C,CAAC,CAAC,CACD,SAAS,cAAc,EAAE,IAAI,wBAAwB,CAAC;;;;;;AAOzD,MAAa,wBACX,aAAa;CACX,QAAQ;CACR,WAAW;CACX,UAAU;CACV;CACA,QAAQ;AACV,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { SourceRef } from "../../artifact.js";
2
+ import { MethodDefinition } from "../../method.js";
3
+ import { ScreenshotPolicy, VerifyVerdict } from "../../verify.js";
4
+ //#region src/methods/artifact/verify.d.ts
5
+ /** The params of `artifact/verify` (INTERFACES §6). */
6
+ export interface ArtifactVerifyParams {
7
+ /** What to verify: a source path, or an artifact ID meaning the path it was last published from. */
8
+ readonly source: SourceRef;
9
+ /**
10
+ * When the verdict's screenshots are returned to the caller (AX-05): `on-failure` (the default),
11
+ * `always` or `never`. Screenshots are taken either way; this sets their `returned` flag.
12
+ */
13
+ readonly screenshots?: ScreenshotPolicy;
14
+ /**
15
+ * Asks for `artifact/progress` notifications carrying this token as the stages run, when the
16
+ * client accepts them in `mostra/initialize`.
17
+ */
18
+ readonly progressToken?: string;
19
+ }
20
+ /** The result of `artifact/verify`: the verdict, also cached for the publish that follows (D41). */
21
+ export type ArtifactVerifyResult = VerifyVerdict;
22
+ /**
23
+ * `artifact/verify`: builds, type-checks, renders and exercises an artifact's source headlessly,
24
+ * compares it with its last passing version, and returns one verdict (D29, D138). It never
25
+ * publishes and never touches the home's drafts, state, events or deliveries.
26
+ */
27
+ export declare const artifactVerifyMethod: MethodDefinition<ArtifactVerifyParams, ArtifactVerifyResult>;
28
+ //#endregion
29
+ //# sourceMappingURL=verify.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verify.d.ts","names":[],"sources":["../../../src/methods/artifact/verify.ts"],"mappings":";;;;;iBAOiB;;WAEN,QAAQ;;;;;WAKR,cAAc;;;;;WAKd;;;YAIC,uBAAuB;;;;;;qBAetB,sBAAsB,iBAAiB,sBAAsB"}
@@ -0,0 +1,27 @@
1
+ import { wireRegistry } from "../../wire-registry.js";
2
+ import { SourceRef } from "../../artifact.js";
3
+ import { defineMethod } from "../../method.js";
4
+ import { ScreenshotPolicy, VerifyVerdict } from "../../verify.js";
5
+ import * as z from "zod";
6
+ //#region src/methods/artifact/verify.ts
7
+ const params = z.object({
8
+ source: SourceRef,
9
+ screenshots: ScreenshotPolicy.exactOptional(),
10
+ progressToken: z.string().min(1).max(200).exactOptional()
11
+ }).register(wireRegistry, { id: "ArtifactVerifyParams" });
12
+ /**
13
+ * `artifact/verify`: builds, type-checks, renders and exercises an artifact's source headlessly,
14
+ * compares it with its last passing version, and returns one verdict (D29, D138). It never
15
+ * publishes and never touches the home's drafts, state, events or deliveries.
16
+ */
17
+ const artifactVerifyMethod = defineMethod({
18
+ method: "artifact/verify",
19
+ direction: "client-to-instance",
20
+ mutating: false,
21
+ params,
22
+ result: VerifyVerdict
23
+ });
24
+ //#endregion
25
+ export { artifactVerifyMethod };
26
+
27
+ //# sourceMappingURL=verify.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verify.js","names":[],"sources":["../../../src/methods/artifact/verify.ts"],"sourcesContent":["import * as z from \"zod\";\nimport { SourceRef } from \"../../artifact.ts\";\nimport { defineMethod, type MethodDefinition } from \"../../method.ts\";\nimport { ScreenshotPolicy, VerifyVerdict } from \"../../verify.ts\";\nimport { wireRegistry } from \"../../wire-registry.ts\";\n\n/** The params of `artifact/verify` (INTERFACES §6). */\nexport interface ArtifactVerifyParams {\n /** What to verify: a source path, or an artifact ID meaning the path it was last published from. */\n readonly source: SourceRef;\n /**\n * When the verdict's screenshots are returned to the caller (AX-05): `on-failure` (the default),\n * `always` or `never`. Screenshots are taken either way; this sets their `returned` flag.\n */\n readonly screenshots?: ScreenshotPolicy;\n /**\n * Asks for `artifact/progress` notifications carrying this token as the stages run, when the\n * client accepts them in `mostra/initialize`.\n */\n readonly progressToken?: string;\n}\n\n/** The result of `artifact/verify`: the verdict, also cached for the publish that follows (D41). */\nexport type ArtifactVerifyResult = VerifyVerdict;\n\nconst params: z.ZodType<ArtifactVerifyParams> = z\n .object({\n source: SourceRef,\n screenshots: ScreenshotPolicy.exactOptional(),\n progressToken: z.string().min(1).max(200).exactOptional(),\n })\n .register(wireRegistry, { id: \"ArtifactVerifyParams\" });\n\n/**\n * `artifact/verify`: builds, type-checks, renders and exercises an artifact's source headlessly,\n * compares it with its last passing version, and returns one verdict (D29, D138). It never\n * publishes and never touches the home's drafts, state, events or deliveries.\n */\nexport const artifactVerifyMethod: MethodDefinition<ArtifactVerifyParams, ArtifactVerifyResult> =\n defineMethod({\n method: \"artifact/verify\",\n direction: \"client-to-instance\",\n mutating: false,\n params,\n result: VerifyVerdict,\n });\n"],"mappings":";;;;;;AAyBA,MAAM,SAA0C,EAC7C,OAAO;CACN,QAAQ;CACR,aAAa,iBAAiB,cAAc;CAC5C,eAAe,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,cAAc;AAC1D,CAAC,CAAC,CACD,SAAS,cAAc,EAAE,IAAI,uBAAuB,CAAC;;;;;;AAOxD,MAAa,uBACX,aAAa;CACX,QAAQ;CACR,WAAW;CACX,UAAU;CACV;CACA,QAAQ;AACV,CAAC"}
@@ -0,0 +1,43 @@
1
+ import { SourceRef } from "../../artifact.js";
2
+ import { MethodDefinition } from "../../method.js";
3
+ import * as z from "zod";
4
+ //#region src/methods/deps/add.d.ts
5
+ /** The params of `deps/add` (INTERFACES §6, D95). */
6
+ export interface DepsAddParams {
7
+ /** The artifact whose lockfile gains the packages: a source path, or an artifact ID. */
8
+ readonly artifact: SourceRef;
9
+ /**
10
+ * npm package specs: `name`, `name@version`, `name@range` or `name@tag`, scoped names included.
11
+ * A spec without an exact version takes the newest release at least a day old (D95).
12
+ */
13
+ readonly packages: readonly string[];
14
+ /** Makes retries idempotent: a repeated `requestId` returns the recorded result (H-03). */
15
+ readonly requestId?: string;
16
+ }
17
+ /** One package `deps/add` settled. */
18
+ export interface AddedPackage {
19
+ /** The package's name. */
20
+ readonly name: string;
21
+ /** The exact version the artifact's lockfile now holds. */
22
+ readonly version: string;
23
+ /** Whether it comes from the warm set, which every artifact resolves without an install. */
24
+ readonly warm: boolean;
25
+ }
26
+ /** The result of `deps/add`. */
27
+ export interface DepsAddResult {
28
+ /** Each requested package, in request order, with the version it resolved to. */
29
+ readonly packages: readonly AddedPackage[];
30
+ /** The SHA-256 of the artifact's lockfile after the change: the `lockDigest` its next publish uses. */
31
+ readonly lockDigest: string;
32
+ }
33
+ /** The Zod schema of the `AddedPackage` type. */
34
+ export declare const AddedPackage: z.ZodType<AddedPackage>;
35
+ /**
36
+ * `deps/add`: installs npm packages into the home's shared store and records them, at exact
37
+ * versions, in the artifact's lockfile, so its next publish builds with them, offline too. The
38
+ * method behind `mostra add` (D43, D95), and the only way packages enter a lockfile under the
39
+ * `explicit` dependency policy.
40
+ */
41
+ export declare const depsAddMethod: MethodDefinition<DepsAddParams, DepsAddResult>;
42
+ //#endregion
43
+ //# sourceMappingURL=add.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add.d.ts","names":[],"sources":["../../../src/methods/deps/add.ts"],"mappings":";;;;;iBAMiB;;WAEN,UAAU;;;;;WAKV;;WAEA;;;iBAIM;;WAEN;;WAEA;;WAEA;;;iBAIM;;WAEN,mBAAmB;;WAEnB;;;qBAIE,cAAc,EAAE,QAAQ;;;;;;;qBA4BxB,eAAe,iBAAiB,eAAe"}
@@ -0,0 +1,40 @@
1
+ import { wireRegistry } from "../../wire-registry.js";
2
+ import { SourceRef } from "../../artifact.js";
3
+ import { defineMethod } from "../../method.js";
4
+ import * as z from "zod";
5
+ //#region src/methods/deps/add.ts
6
+ /** The Zod schema of the `AddedPackage` type. */
7
+ const AddedPackage = z.object({
8
+ name: z.string().min(1),
9
+ version: z.string().min(1),
10
+ warm: z.boolean()
11
+ }).register(wireRegistry, {
12
+ id: "AddedPackage",
13
+ description: "A package deps/add settled: its name, exact version and whether it is warm."
14
+ });
15
+ const params = z.object({
16
+ artifact: SourceRef,
17
+ packages: z.array(z.string().min(1)).min(1).readonly(),
18
+ requestId: z.string().min(1).exactOptional()
19
+ }).register(wireRegistry, { id: "DepsAddParams" });
20
+ const result = z.object({
21
+ packages: z.array(AddedPackage).readonly(),
22
+ lockDigest: z.string().regex(/^[0-9a-f]{64}$/)
23
+ }).register(wireRegistry, { id: "DepsAddResult" });
24
+ /**
25
+ * `deps/add`: installs npm packages into the home's shared store and records them, at exact
26
+ * versions, in the artifact's lockfile, so its next publish builds with them, offline too. The
27
+ * method behind `mostra add` (D43, D95), and the only way packages enter a lockfile under the
28
+ * `explicit` dependency policy.
29
+ */
30
+ const depsAddMethod = defineMethod({
31
+ method: "deps/add",
32
+ direction: "client-to-instance",
33
+ mutating: true,
34
+ params,
35
+ result
36
+ });
37
+ //#endregion
38
+ export { AddedPackage, depsAddMethod };
39
+
40
+ //# sourceMappingURL=add.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add.js","names":[],"sources":["../../../src/methods/deps/add.ts"],"sourcesContent":["import * as z from \"zod\";\nimport { SourceRef } from \"../../artifact.ts\";\nimport { defineMethod, type MethodDefinition } from \"../../method.ts\";\nimport { wireRegistry } from \"../../wire-registry.ts\";\n\n/** The params of `deps/add` (INTERFACES §6, D95). */\nexport interface DepsAddParams {\n /** The artifact whose lockfile gains the packages: a source path, or an artifact ID. */\n readonly artifact: SourceRef;\n /**\n * npm package specs: `name`, `name@version`, `name@range` or `name@tag`, scoped names included.\n * A spec without an exact version takes the newest release at least a day old (D95).\n */\n readonly packages: readonly string[];\n /** Makes retries idempotent: a repeated `requestId` returns the recorded result (H-03). */\n readonly requestId?: string;\n}\n\n/** One package `deps/add` settled. */\nexport interface AddedPackage {\n /** The package's name. */\n readonly name: string;\n /** The exact version the artifact's lockfile now holds. */\n readonly version: string;\n /** Whether it comes from the warm set, which every artifact resolves without an install. */\n readonly warm: boolean;\n}\n\n/** The result of `deps/add`. */\nexport interface DepsAddResult {\n /** Each requested package, in request order, with the version it resolved to. */\n readonly packages: readonly AddedPackage[];\n /** The SHA-256 of the artifact's lockfile after the change: the `lockDigest` its next publish uses. */\n readonly lockDigest: string;\n}\n\n/** The Zod schema of the `AddedPackage` type. */\nexport const AddedPackage: z.ZodType<AddedPackage> = z\n .object({ name: z.string().min(1), version: z.string().min(1), warm: z.boolean() })\n .register(wireRegistry, {\n id: \"AddedPackage\",\n description: \"A package deps/add settled: its name, exact version and whether it is warm.\",\n });\n\nconst params: z.ZodType<DepsAddParams> = z\n .object({\n artifact: SourceRef,\n packages: z.array(z.string().min(1)).min(1).readonly(),\n requestId: z.string().min(1).exactOptional(),\n })\n .register(wireRegistry, { id: \"DepsAddParams\" });\n\nconst result: z.ZodType<DepsAddResult> = z\n .object({\n packages: z.array(AddedPackage).readonly(),\n lockDigest: z.string().regex(/^[0-9a-f]{64}$/),\n })\n .register(wireRegistry, { id: \"DepsAddResult\" });\n\n/**\n * `deps/add`: installs npm packages into the home's shared store and records them, at exact\n * versions, in the artifact's lockfile, so its next publish builds with them, offline too. The\n * method behind `mostra add` (D43, D95), and the only way packages enter a lockfile under the\n * `explicit` dependency policy.\n */\nexport const depsAddMethod: MethodDefinition<DepsAddParams, DepsAddResult> = defineMethod({\n method: \"deps/add\",\n direction: \"client-to-instance\",\n mutating: true,\n params,\n result,\n});\n"],"mappings":";;;;;;AAqCA,MAAa,eAAwC,EAClD,OAAO;CAAE,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC;CAAG,SAAS,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC;CAAG,MAAM,EAAE,QAAQ;AAAE,CAAC,CAAC,CAClF,SAAS,cAAc;CACtB,IAAI;CACJ,aAAa;AACf,CAAC;AAEH,MAAM,SAAmC,EACtC,OAAO;CACN,UAAU;CACV,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;CACrD,WAAW,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc;AAC7C,CAAC,CAAC,CACD,SAAS,cAAc,EAAE,IAAI,gBAAgB,CAAC;AAEjD,MAAM,SAAmC,EACtC,OAAO;CACN,UAAU,EAAE,MAAM,YAAY,CAAC,CAAC,SAAS;CACzC,YAAY,EAAE,OAAO,CAAC,CAAC,MAAM,gBAAgB;AAC/C,CAAC,CAAC,CACD,SAAS,cAAc,EAAE,IAAI,gBAAgB,CAAC;;;;;;;AAQjD,MAAa,gBAAgE,aAAa;CACxF,QAAQ;CACR,WAAW;CACX,UAAU;CACV;CACA;AACF,CAAC"}
@@ -0,0 +1,52 @@
1
+ import { SourceRef } from "../../artifact.js";
2
+ import { Diagnostic } from "../../diagnostics/diagnostic.js";
3
+ import { MethodDefinition } from "../../method.js";
4
+ import * as z from "zod";
5
+ //#region src/methods/dev/start.d.ts
6
+ /** The params of `dev/start` (INTERFACES §6, D140 item 12, VR-08). */
7
+ export interface DevStartParams {
8
+ /** The artifact source to serve with hot reload. */
9
+ readonly source: SourceRef;
10
+ /** The loopback port for the dev page; one the operating system assigns when absent. */
11
+ readonly port?: number;
12
+ }
13
+ /** The result of `dev/start`. */
14
+ export interface DevStartResult {
15
+ /** The dev page, with the session's secret in its fragment (`#t=…`). Never a capability URL. */
16
+ readonly url: string;
17
+ /** The loopback port the dev page listens on. */
18
+ readonly port: number;
19
+ /** The session, for `dev/stop` and `dev/notify`. */
20
+ readonly sessionId: string;
21
+ }
22
+ /** The notification a dev session sends the connection that started it (D140 item 12). */
23
+ export declare const DEV_NOTIFY = "dev/notify";
24
+ /** What happened in a dev session. */
25
+ export type DevEventKind = "built" | "reloaded" | "server-restarted" | "submission" | "diagnostics";
26
+ /** The params of `dev/notify`. */
27
+ export interface DevNotifyParams {
28
+ /** The session it happened in. */
29
+ readonly sessionId: string;
30
+ /** What happened. */
31
+ readonly kind: DevEventKind;
32
+ /** When it happened (RFC 3339, UTC). */
33
+ readonly at: string;
34
+ /** What the build or the server code reported (`built`, `diagnostics`, `server-restarted`). */
35
+ readonly diagnostics?: readonly Diagnostic[];
36
+ /** The changed files that caused it (`reloaded`, `server-restarted`), relative to the source. */
37
+ readonly files?: readonly string[];
38
+ /** A submission's Results JSON (INTERFACES §8), for `submission`; it was delivered nowhere. */
39
+ readonly results?: unknown;
40
+ }
41
+ /** The Zod schema of `dev/notify`'s params. */
42
+ export declare const DevNotifyParams: z.ZodType<DevNotifyParams>;
43
+ /**
44
+ * `dev/start`: serves an artifact's source with Vite's hot module reload on its own loopback
45
+ * port (VR-08, D140 item 12), with every server feature through a scratch sandbox like verify's:
46
+ * nothing reaches the home's drafts, state, events, hosts or deliveries, and no capability URL
47
+ * reaches it. The session belongs to this connection and ends when it closes or with `dev/stop`;
48
+ * a client that accepts `dev/notify` receives its events.
49
+ */
50
+ export declare const devStartMethod: MethodDefinition<DevStartParams, DevStartResult>;
51
+ //#endregion
52
+ //# sourceMappingURL=start.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start.d.ts","names":[],"sources":["../../../src/methods/dev/start.ts"],"mappings":";;;;;;iBAOiB;;WAEN,QAAQ;;WAER;;;iBAIM;;WAEN;;WAEA;;WAEA;;;qBAgBE;;YAGD;;iBAGK;;WAEN;;WAEA,MAAM;;WAEN;;WAEA,uBAAuB;;WAEvB;;WAEA;;;qBAIE,iBAAiB,EAAE,QAAQ;;;;;;;;qBAkB3B,gBAAgB,iBAAiB,gBAAgB"}
@@ -0,0 +1,56 @@
1
+ import { wireRegistry } from "../../wire-registry.js";
2
+ import { SourceRef } from "../../artifact.js";
3
+ import { Diagnostic } from "../../diagnostics/diagnostic.js";
4
+ import { defineMethod } from "../../method.js";
5
+ import * as z from "zod";
6
+ //#region src/methods/dev/start.ts
7
+ const params = z.object({
8
+ source: SourceRef,
9
+ port: z.int().min(1).max(65535).exactOptional()
10
+ }).register(wireRegistry, { id: "DevStartParams" });
11
+ const result = z.object({
12
+ url: z.string().min(1),
13
+ port: z.int().min(1).max(65535),
14
+ sessionId: z.string().min(1)
15
+ }).register(wireRegistry, {
16
+ id: "DevStartResult",
17
+ description: "A running dev session."
18
+ });
19
+ /** The notification a dev session sends the connection that started it (D140 item 12). */
20
+ const DEV_NOTIFY = "dev/notify";
21
+ /** The Zod schema of `dev/notify`'s params. */
22
+ const DevNotifyParams = z.object({
23
+ sessionId: z.string().min(1),
24
+ kind: z.enum([
25
+ "built",
26
+ "reloaded",
27
+ "server-restarted",
28
+ "submission",
29
+ "diagnostics"
30
+ ]),
31
+ at: z.iso.datetime(),
32
+ diagnostics: z.array(Diagnostic).readonly().exactOptional(),
33
+ files: z.array(z.string()).readonly().exactOptional(),
34
+ results: z.unknown().exactOptional()
35
+ }).register(wireRegistry, {
36
+ id: "DevNotifyParams",
37
+ description: "One event of a dev session."
38
+ });
39
+ /**
40
+ * `dev/start`: serves an artifact's source with Vite's hot module reload on its own loopback
41
+ * port (VR-08, D140 item 12), with every server feature through a scratch sandbox like verify's:
42
+ * nothing reaches the home's drafts, state, events, hosts or deliveries, and no capability URL
43
+ * reaches it. The session belongs to this connection and ends when it closes or with `dev/stop`;
44
+ * a client that accepts `dev/notify` receives its events.
45
+ */
46
+ const devStartMethod = defineMethod({
47
+ method: "dev/start",
48
+ direction: "client-to-instance",
49
+ mutating: true,
50
+ params,
51
+ result
52
+ });
53
+ //#endregion
54
+ export { DEV_NOTIFY, DevNotifyParams, devStartMethod };
55
+
56
+ //# sourceMappingURL=start.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start.js","names":[],"sources":["../../../src/methods/dev/start.ts"],"sourcesContent":["import * as z from \"zod\";\nimport { SourceRef } from \"../../artifact.ts\";\nimport { Diagnostic } from \"../../diagnostics/diagnostic.ts\";\nimport { defineMethod, type MethodDefinition } from \"../../method.ts\";\nimport { wireRegistry } from \"../../wire-registry.ts\";\n\n/** The params of `dev/start` (INTERFACES §6, D140 item 12, VR-08). */\nexport interface DevStartParams {\n /** The artifact source to serve with hot reload. */\n readonly source: SourceRef;\n /** The loopback port for the dev page; one the operating system assigns when absent. */\n readonly port?: number;\n}\n\n/** The result of `dev/start`. */\nexport interface DevStartResult {\n /** The dev page, with the session's secret in its fragment (`#t=…`). Never a capability URL. */\n readonly url: string;\n /** The loopback port the dev page listens on. */\n readonly port: number;\n /** The session, for `dev/stop` and `dev/notify`. */\n readonly sessionId: string;\n}\n\nconst params: z.ZodType<DevStartParams> = z\n .object({ source: SourceRef, port: z.int().min(1).max(65535).exactOptional() })\n .register(wireRegistry, { id: \"DevStartParams\" });\n\nconst result: z.ZodType<DevStartResult> = z\n .object({\n url: z.string().min(1),\n port: z.int().min(1).max(65535),\n sessionId: z.string().min(1),\n })\n .register(wireRegistry, { id: \"DevStartResult\", description: \"A running dev session.\" });\n\n/** The notification a dev session sends the connection that started it (D140 item 12). */\nexport const DEV_NOTIFY = \"dev/notify\";\n\n/** What happened in a dev session. */\nexport type DevEventKind = \"built\" | \"reloaded\" | \"server-restarted\" | \"submission\" | \"diagnostics\";\n\n/** The params of `dev/notify`. */\nexport interface DevNotifyParams {\n /** The session it happened in. */\n readonly sessionId: string;\n /** What happened. */\n readonly kind: DevEventKind;\n /** When it happened (RFC 3339, UTC). */\n readonly at: string;\n /** What the build or the server code reported (`built`, `diagnostics`, `server-restarted`). */\n readonly diagnostics?: readonly Diagnostic[];\n /** The changed files that caused it (`reloaded`, `server-restarted`), relative to the source. */\n readonly files?: readonly string[];\n /** A submission's Results JSON (INTERFACES §8), for `submission`; it was delivered nowhere. */\n readonly results?: unknown;\n}\n\n/** The Zod schema of `dev/notify`'s params. */\nexport const DevNotifyParams: z.ZodType<DevNotifyParams> = z\n .object({\n sessionId: z.string().min(1),\n kind: z.enum([\"built\", \"reloaded\", \"server-restarted\", \"submission\", \"diagnostics\"]),\n at: z.iso.datetime(),\n diagnostics: z.array(Diagnostic).readonly().exactOptional(),\n files: z.array(z.string()).readonly().exactOptional(),\n results: z.unknown().exactOptional(),\n })\n .register(wireRegistry, { id: \"DevNotifyParams\", description: \"One event of a dev session.\" });\n\n/**\n * `dev/start`: serves an artifact's source with Vite's hot module reload on its own loopback\n * port (VR-08, D140 item 12), with every server feature through a scratch sandbox like verify's:\n * nothing reaches the home's drafts, state, events, hosts or deliveries, and no capability URL\n * reaches it. The session belongs to this connection and ends when it closes or with `dev/stop`;\n * a client that accepts `dev/notify` receives its events.\n */\nexport const devStartMethod: MethodDefinition<DevStartParams, DevStartResult> = defineMethod({\n method: \"dev/start\",\n direction: \"client-to-instance\",\n mutating: true,\n params,\n result,\n});\n"],"mappings":";;;;;;AAwBA,MAAM,SAAoC,EACvC,OAAO;CAAE,QAAQ;CAAW,MAAM,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,cAAc;AAAE,CAAC,CAAC,CAC9E,SAAS,cAAc,EAAE,IAAI,iBAAiB,CAAC;AAElD,MAAM,SAAoC,EACvC,OAAO;CACN,KAAK,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC;CACrB,MAAM,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,KAAK;CAC9B,WAAW,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC;AAC7B,CAAC,CAAC,CACD,SAAS,cAAc;CAAE,IAAI;CAAkB,aAAa;AAAyB,CAAC;;AAGzF,MAAa,aAAa;;AAsB1B,MAAa,kBAA8C,EACxD,OAAO;CACN,WAAW,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC;CAC3B,MAAM,EAAE,KAAK;EAAC;EAAS;EAAY;EAAoB;EAAc;CAAa,CAAC;CACnF,IAAI,EAAE,IAAI,SAAS;CACnB,aAAa,EAAE,MAAM,UAAU,CAAC,CAAC,SAAS,CAAC,CAAC,cAAc;CAC1D,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,cAAc;CACpD,SAAS,EAAE,QAAQ,CAAC,CAAC,cAAc;AACrC,CAAC,CAAC,CACD,SAAS,cAAc;CAAE,IAAI;CAAmB,aAAa;AAA8B,CAAC;;;;;;;;AAS/F,MAAa,iBAAmE,aAAa;CAC3F,QAAQ;CACR,WAAW;CACX,UAAU;CACV;CACA;AACF,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { MethodDefinition } from "../../method.js";
2
+ //#region src/methods/dev/stop.d.ts
3
+ /** The params of `dev/stop` (INTERFACES §6, D140 item 12). */
4
+ export interface DevStopParams {
5
+ /** The session `dev/start` returned. */
6
+ readonly sessionId: string;
7
+ }
8
+ /** The result of `dev/stop`. */
9
+ export type DevStopResult = Record<string, never>;
10
+ /**
11
+ * `dev/stop`: ends a dev session this connection started, stopping its Vite child and workers
12
+ * and deleting its scratch state. Stopping a session that already ended succeeds.
13
+ */
14
+ export declare const devStopMethod: MethodDefinition<DevStopParams, DevStopResult>;
15
+ //#endregion
16
+ //# sourceMappingURL=stop.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stop.d.ts","names":[],"sources":["../../../src/methods/dev/stop.ts"],"mappings":";;;iBAKiB;;WAEN;;;YAIC,gBAAgB;;;;;qBAcf,eAAe,iBAAiB,eAAe"}
@@ -0,0 +1,21 @@
1
+ import { wireRegistry } from "../../wire-registry.js";
2
+ import { defineMethod } from "../../method.js";
3
+ import * as z from "zod";
4
+ //#region src/methods/dev/stop.ts
5
+ const params = z.object({ sessionId: z.string().min(1) }).register(wireRegistry, { id: "DevStopParams" });
6
+ const result = z.object({}).register(wireRegistry, { id: "DevStopResult" });
7
+ /**
8
+ * `dev/stop`: ends a dev session this connection started, stopping its Vite child and workers
9
+ * and deleting its scratch state. Stopping a session that already ended succeeds.
10
+ */
11
+ const devStopMethod = defineMethod({
12
+ method: "dev/stop",
13
+ direction: "client-to-instance",
14
+ mutating: true,
15
+ params,
16
+ result
17
+ });
18
+ //#endregion
19
+ export { devStopMethod };
20
+
21
+ //# sourceMappingURL=stop.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stop.js","names":[],"sources":["../../../src/methods/dev/stop.ts"],"sourcesContent":["import * as z from \"zod\";\nimport { defineMethod, type MethodDefinition } from \"../../method.ts\";\nimport { wireRegistry } from \"../../wire-registry.ts\";\n\n/** The params of `dev/stop` (INTERFACES §6, D140 item 12). */\nexport interface DevStopParams {\n /** The session `dev/start` returned. */\n readonly sessionId: string;\n}\n\n/** The result of `dev/stop`. */\nexport type DevStopResult = Record<string, never>;\n\nconst params: z.ZodType<DevStopParams> = z\n .object({ sessionId: z.string().min(1) })\n .register(wireRegistry, { id: \"DevStopParams\" });\n\nconst result: z.ZodType<DevStopResult> = z\n .object({})\n .register(wireRegistry, { id: \"DevStopResult\" });\n\n/**\n * `dev/stop`: ends a dev session this connection started, stopping its Vite child and workers\n * and deleting its scratch state. Stopping a session that already ended succeeds.\n */\nexport const devStopMethod: MethodDefinition<DevStopParams, DevStopResult> = defineMethod({\n method: \"dev/stop\",\n direction: \"client-to-instance\",\n mutating: true,\n params,\n result,\n});\n"],"mappings":";;;;AAaA,MAAM,SAAmC,EACtC,OAAO,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CACxC,SAAS,cAAc,EAAE,IAAI,gBAAgB,CAAC;AAEjD,MAAM,SAAmC,EACtC,OAAO,CAAC,CAAC,CAAC,CACV,SAAS,cAAc,EAAE,IAAI,gBAAgB,CAAC;;;;;AAMjD,MAAa,gBAAgE,aAAa;CACxF,QAAQ;CACR,WAAW;CACX,UAAU;CACV;CACA;AACF,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { MethodDefinition } from "../../method.js";
2
+ //#region src/methods/events/ack.d.ts
3
+ /** The params of `events/ack` (INTERFACES §6). */
4
+ export interface EventsAckParams {
5
+ /** The subscription, as `events/subscribe` returned it. */
6
+ readonly subscriptionId: string;
7
+ /** Every event up to this cursor is handled. An earlier cursor than the last ack changes nothing. */
8
+ readonly cursor: string;
9
+ /** Accepted for uniformity (H-03); acknowledging is idempotent by itself. */
10
+ readonly requestId?: string;
11
+ }
12
+ /** The result of `events/ack`. */
13
+ export type EventsAckResult = Record<string, never>;
14
+ /**
15
+ * `events/ack`: records that a subscriber handled every event up to a cursor. For a named
16
+ * subscription it is durable: the next subscription with that name resumes after it (IN-08).
17
+ */
18
+ export declare const eventsAckMethod: MethodDefinition<EventsAckParams, EventsAckResult>;
19
+ //#endregion
20
+ //# sourceMappingURL=ack.d.ts.map