@vibesdotdev/hq 0.0.0-stage → 1.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (615) hide show
  1. package/LICENSE +18 -0
  2. package/README.md +49 -2
  3. package/dist/agent-events/descriptors.d.ts +33 -0
  4. package/dist/agent-events/descriptors.d.ts.map +1 -0
  5. package/dist/agent-events/descriptors.js +34 -0
  6. package/dist/agent-events/descriptors.js.map +1 -0
  7. package/dist/app/auth/cloud-sync.consumer.d.ts +12 -0
  8. package/dist/app/auth/cloud-sync.consumer.d.ts.map +1 -0
  9. package/dist/app/auth/cloud-sync.consumer.js +31 -0
  10. package/dist/app/auth/cloud-sync.consumer.js.map +1 -0
  11. package/dist/app/auth/hq.app-auth-machine.record.descriptor.d.ts +5 -0
  12. package/dist/app/auth/hq.app-auth-machine.record.descriptor.d.ts.map +1 -0
  13. package/dist/app/auth/hq.app-auth-machine.record.descriptor.js +39 -0
  14. package/dist/app/auth/hq.app-auth-machine.record.descriptor.js.map +1 -0
  15. package/dist/app/auth/hq.app-auth-pairings.record.descriptor.d.ts +5 -0
  16. package/dist/app/auth/hq.app-auth-pairings.record.descriptor.d.ts.map +1 -0
  17. package/dist/app/auth/hq.app-auth-pairings.record.descriptor.js +43 -0
  18. package/dist/app/auth/hq.app-auth-pairings.record.descriptor.js.map +1 -0
  19. package/dist/app/auth/hq.app-auth-tokens.record.descriptor.d.ts +5 -0
  20. package/dist/app/auth/hq.app-auth-tokens.record.descriptor.d.ts.map +1 -0
  21. package/dist/app/auth/hq.app-auth-tokens.record.descriptor.js +42 -0
  22. package/dist/app/auth/hq.app-auth-tokens.record.descriptor.js.map +1 -0
  23. package/dist/app/auth/schemas/auth.d.ts +146 -0
  24. package/dist/app/auth/schemas/auth.d.ts.map +1 -0
  25. package/dist/app/auth/schemas/auth.js +53 -0
  26. package/dist/app/auth/schemas/auth.js.map +1 -0
  27. package/dist/app/auth/service.consumer.d.ts +17 -0
  28. package/dist/app/auth/service.consumer.d.ts.map +1 -0
  29. package/dist/app/auth/service.consumer.js +79 -0
  30. package/dist/app/auth/service.consumer.js.map +1 -0
  31. package/dist/app/auth/sync.consumer.d.ts +2 -0
  32. package/dist/app/auth/sync.consumer.d.ts.map +1 -0
  33. package/dist/app/auth/sync.consumer.js +2 -0
  34. package/dist/app/auth/sync.consumer.js.map +1 -0
  35. package/dist/app/auth/sync.d.ts +23 -0
  36. package/dist/app/auth/sync.d.ts.map +1 -0
  37. package/dist/app/auth/sync.js +290 -0
  38. package/dist/app/auth/sync.js.map +1 -0
  39. package/dist/app/auth/types.d.ts +20 -0
  40. package/dist/app/auth/types.d.ts.map +1 -0
  41. package/dist/app/auth/types.js +7 -0
  42. package/dist/app/auth/types.js.map +1 -0
  43. package/dist/app/sync/hq.app-auth.sync-bridge.descriptor.d.ts +9 -0
  44. package/dist/app/sync/hq.app-auth.sync-bridge.descriptor.d.ts.map +1 -0
  45. package/dist/app/sync/hq.app-auth.sync-bridge.descriptor.js +45 -0
  46. package/dist/app/sync/hq.app-auth.sync-bridge.descriptor.js.map +1 -0
  47. package/dist/applets/component-ref.d.ts +6 -0
  48. package/dist/applets/component-ref.d.ts.map +1 -0
  49. package/dist/applets/component-ref.js +6 -0
  50. package/dist/applets/component-ref.js.map +1 -0
  51. package/dist/applets/index.d.ts +3 -0
  52. package/dist/applets/index.d.ts.map +1 -0
  53. package/dist/applets/index.js +3 -0
  54. package/dist/applets/index.js.map +1 -0
  55. package/dist/approval/approval-resolved.event.descriptor.d.ts +11 -0
  56. package/dist/approval/approval-resolved.event.descriptor.d.ts.map +1 -0
  57. package/dist/approval/approval-resolved.event.descriptor.js +11 -0
  58. package/dist/approval/approval-resolved.event.descriptor.js.map +1 -0
  59. package/dist/approval/approval-resolved.job.descriptor.d.ts +36 -0
  60. package/dist/approval/approval-resolved.job.descriptor.d.ts.map +1 -0
  61. package/dist/approval/approval-resolved.job.descriptor.js +24 -0
  62. package/dist/approval/approval-resolved.job.descriptor.js.map +1 -0
  63. package/dist/approval/approval-resolved.job.impl.d.ts +19 -0
  64. package/dist/approval/approval-resolved.job.impl.d.ts.map +1 -0
  65. package/dist/approval/approval-resolved.job.impl.js +26 -0
  66. package/dist/approval/approval-resolved.job.impl.js.map +1 -0
  67. package/dist/approval/approval-resolved.subscription.descriptor.d.ts +21 -0
  68. package/dist/approval/approval-resolved.subscription.descriptor.d.ts.map +1 -0
  69. package/dist/approval/approval-resolved.subscription.descriptor.js +20 -0
  70. package/dist/approval/approval-resolved.subscription.descriptor.js.map +1 -0
  71. package/dist/approval/schemas.d.ts +45 -0
  72. package/dist/approval/schemas.d.ts.map +1 -0
  73. package/dist/approval/schemas.js +27 -0
  74. package/dist/approval/schemas.js.map +1 -0
  75. package/dist/approval/surface-approval-channel.descriptor.d.ts +14 -0
  76. package/dist/approval/surface-approval-channel.descriptor.d.ts.map +1 -0
  77. package/dist/approval/surface-approval-channel.descriptor.js +16 -0
  78. package/dist/approval/surface-approval-channel.descriptor.js.map +1 -0
  79. package/dist/approval/surface-approval-channel.impl.d.ts +19 -0
  80. package/dist/approval/surface-approval-channel.impl.d.ts.map +1 -0
  81. package/dist/approval/surface-approval-channel.impl.js +101 -0
  82. package/dist/approval/surface-approval-channel.impl.js.map +1 -0
  83. package/dist/cli/app/handoff/hq.app.handoff.descriptor.d.ts +40 -0
  84. package/dist/cli/app/handoff/hq.app.handoff.descriptor.d.ts.map +1 -0
  85. package/dist/cli/app/handoff/hq.app.handoff.descriptor.js +23 -0
  86. package/dist/cli/app/handoff/hq.app.handoff.descriptor.js.map +1 -0
  87. package/dist/cli/app/handoff/hq.app.handoff.impl.consumer.d.ts +7 -0
  88. package/dist/cli/app/handoff/hq.app.handoff.impl.consumer.d.ts.map +1 -0
  89. package/dist/cli/app/handoff/hq.app.handoff.impl.consumer.js +107 -0
  90. package/dist/cli/app/handoff/hq.app.handoff.impl.consumer.js.map +1 -0
  91. package/dist/cli/app/hq.app.cli-group.descriptor.d.ts +12 -0
  92. package/dist/cli/app/hq.app.cli-group.descriptor.d.ts.map +1 -0
  93. package/dist/cli/app/hq.app.cli-group.descriptor.js +12 -0
  94. package/dist/cli/app/hq.app.cli-group.descriptor.js.map +1 -0
  95. package/dist/cli/app/pair/hq.app.pair.descriptor.d.ts +43 -0
  96. package/dist/cli/app/pair/hq.app.pair.descriptor.d.ts.map +1 -0
  97. package/dist/cli/app/pair/hq.app.pair.descriptor.js +27 -0
  98. package/dist/cli/app/pair/hq.app.pair.descriptor.js.map +1 -0
  99. package/dist/cli/app/pair/hq.app.pair.impl.consumer.d.ts +7 -0
  100. package/dist/cli/app/pair/hq.app.pair.impl.consumer.d.ts.map +1 -0
  101. package/dist/cli/app/pair/hq.app.pair.impl.consumer.js +89 -0
  102. package/dist/cli/app/pair/hq.app.pair.impl.consumer.js.map +1 -0
  103. package/dist/cli/app/shared/options.d.ts +68 -0
  104. package/dist/cli/app/shared/options.d.ts.map +1 -0
  105. package/dist/cli/app/shared/options.js +7 -0
  106. package/dist/cli/app/shared/options.js.map +1 -0
  107. package/dist/cli/app/token/hq.app.token.descriptor.d.ts +40 -0
  108. package/dist/cli/app/token/hq.app.token.descriptor.d.ts.map +1 -0
  109. package/dist/cli/app/token/hq.app.token.descriptor.js +23 -0
  110. package/dist/cli/app/token/hq.app.token.descriptor.js.map +1 -0
  111. package/dist/cli/app/token/hq.app.token.impl.consumer.d.ts +7 -0
  112. package/dist/cli/app/token/hq.app.token.impl.consumer.d.ts.map +1 -0
  113. package/dist/cli/app/token/hq.app.token.impl.consumer.js +89 -0
  114. package/dist/cli/app/token/hq.app.token.impl.consumer.js.map +1 -0
  115. package/dist/cli/channel/hq.channel.cli-group.descriptor.d.ts +12 -0
  116. package/dist/cli/channel/hq.channel.cli-group.descriptor.d.ts.map +1 -0
  117. package/dist/cli/channel/hq.channel.cli-group.descriptor.js +12 -0
  118. package/dist/cli/channel/hq.channel.cli-group.descriptor.js.map +1 -0
  119. package/dist/cli/channel/hq.channel.enable.descriptor.d.ts +21 -0
  120. package/dist/cli/channel/hq.channel.enable.descriptor.d.ts.map +1 -0
  121. package/dist/cli/channel/hq.channel.enable.descriptor.js +16 -0
  122. package/dist/cli/channel/hq.channel.enable.descriptor.js.map +1 -0
  123. package/dist/cli/channel/hq.channel.enable.impl.d.ts +7 -0
  124. package/dist/cli/channel/hq.channel.enable.impl.d.ts.map +1 -0
  125. package/dist/cli/channel/hq.channel.enable.impl.js +23 -0
  126. package/dist/cli/channel/hq.channel.enable.impl.js.map +1 -0
  127. package/dist/cli/channel/hq.channel.fire.descriptor.d.ts +17 -0
  128. package/dist/cli/channel/hq.channel.fire.descriptor.d.ts.map +1 -0
  129. package/dist/cli/channel/hq.channel.fire.descriptor.js +13 -0
  130. package/dist/cli/channel/hq.channel.fire.descriptor.js.map +1 -0
  131. package/dist/cli/channel/hq.channel.fire.impl.d.ts +7 -0
  132. package/dist/cli/channel/hq.channel.fire.impl.d.ts.map +1 -0
  133. package/dist/cli/channel/hq.channel.fire.impl.js +26 -0
  134. package/dist/cli/channel/hq.channel.fire.impl.js.map +1 -0
  135. package/dist/cli/channel/hq.channel.list.descriptor.d.ts +16 -0
  136. package/dist/cli/channel/hq.channel.list.descriptor.d.ts.map +1 -0
  137. package/dist/cli/channel/hq.channel.list.descriptor.js +13 -0
  138. package/dist/cli/channel/hq.channel.list.descriptor.js.map +1 -0
  139. package/dist/cli/channel/hq.channel.list.impl.d.ts +7 -0
  140. package/dist/cli/channel/hq.channel.list.impl.d.ts.map +1 -0
  141. package/dist/cli/channel/hq.channel.list.impl.js +30 -0
  142. package/dist/cli/channel/hq.channel.list.impl.js.map +1 -0
  143. package/dist/cli/channel/hq.channel.logs.descriptor.d.ts +24 -0
  144. package/dist/cli/channel/hq.channel.logs.descriptor.d.ts.map +1 -0
  145. package/dist/cli/channel/hq.channel.logs.descriptor.js +17 -0
  146. package/dist/cli/channel/hq.channel.logs.descriptor.js.map +1 -0
  147. package/dist/cli/channel/hq.channel.logs.impl.d.ts +9 -0
  148. package/dist/cli/channel/hq.channel.logs.impl.d.ts.map +1 -0
  149. package/dist/cli/channel/hq.channel.logs.impl.js +74 -0
  150. package/dist/cli/channel/hq.channel.logs.impl.js.map +1 -0
  151. package/dist/cli/friction/_store-hint.d.ts +7 -0
  152. package/dist/cli/friction/_store-hint.d.ts.map +1 -0
  153. package/dist/cli/friction/_store-hint.js +13 -0
  154. package/dist/cli/friction/_store-hint.js.map +1 -0
  155. package/dist/cli/friction/hq.friction.cli-group.descriptor.d.ts +11 -0
  156. package/dist/cli/friction/hq.friction.cli-group.descriptor.d.ts.map +1 -0
  157. package/dist/cli/friction/hq.friction.cli-group.descriptor.js +15 -0
  158. package/dist/cli/friction/hq.friction.cli-group.descriptor.js.map +1 -0
  159. package/dist/cli/friction/hq.friction.disposition.d.ts +5 -0
  160. package/dist/cli/friction/hq.friction.disposition.d.ts.map +1 -0
  161. package/dist/cli/friction/hq.friction.disposition.js +64 -0
  162. package/dist/cli/friction/hq.friction.disposition.js.map +1 -0
  163. package/dist/cli/friction/hq.friction.emit.descriptor.d.ts +65 -0
  164. package/dist/cli/friction/hq.friction.emit.descriptor.d.ts.map +1 -0
  165. package/dist/cli/friction/hq.friction.emit.descriptor.js +70 -0
  166. package/dist/cli/friction/hq.friction.emit.descriptor.js.map +1 -0
  167. package/dist/cli/friction/hq.friction.emit.impl.d.ts +7 -0
  168. package/dist/cli/friction/hq.friction.emit.impl.d.ts.map +1 -0
  169. package/dist/cli/friction/hq.friction.emit.impl.js +85 -0
  170. package/dist/cli/friction/hq.friction.emit.impl.js.map +1 -0
  171. package/dist/cli/friction/hq.friction.list.descriptor.d.ts +37 -0
  172. package/dist/cli/friction/hq.friction.list.descriptor.d.ts.map +1 -0
  173. package/dist/cli/friction/hq.friction.list.descriptor.js +22 -0
  174. package/dist/cli/friction/hq.friction.list.descriptor.js.map +1 -0
  175. package/dist/cli/friction/hq.friction.list.impl.d.ts +7 -0
  176. package/dist/cli/friction/hq.friction.list.impl.d.ts.map +1 -0
  177. package/dist/cli/friction/hq.friction.list.impl.js +73 -0
  178. package/dist/cli/friction/hq.friction.list.impl.js.map +1 -0
  179. package/dist/cli/friction/hq.friction.promote.descriptor.d.ts +21 -0
  180. package/dist/cli/friction/hq.friction.promote.descriptor.d.ts.map +1 -0
  181. package/dist/cli/friction/hq.friction.promote.descriptor.js +14 -0
  182. package/dist/cli/friction/hq.friction.promote.descriptor.js.map +1 -0
  183. package/dist/cli/friction/hq.friction.promote.impl.d.ts +7 -0
  184. package/dist/cli/friction/hq.friction.promote.impl.d.ts.map +1 -0
  185. package/dist/cli/friction/hq.friction.promote.impl.js +47 -0
  186. package/dist/cli/friction/hq.friction.promote.impl.js.map +1 -0
  187. package/dist/cli/friction/hq.friction.reject.descriptor.d.ts +24 -0
  188. package/dist/cli/friction/hq.friction.reject.descriptor.d.ts.map +1 -0
  189. package/dist/cli/friction/hq.friction.reject.descriptor.js +17 -0
  190. package/dist/cli/friction/hq.friction.reject.descriptor.js.map +1 -0
  191. package/dist/cli/friction/hq.friction.reject.impl.d.ts +6 -0
  192. package/dist/cli/friction/hq.friction.reject.impl.d.ts.map +1 -0
  193. package/dist/cli/friction/hq.friction.reject.impl.js +7 -0
  194. package/dist/cli/friction/hq.friction.reject.impl.js.map +1 -0
  195. package/dist/cli/friction/hq.friction.resolve.descriptor.d.ts +27 -0
  196. package/dist/cli/friction/hq.friction.resolve.descriptor.d.ts.map +1 -0
  197. package/dist/cli/friction/hq.friction.resolve.descriptor.js +18 -0
  198. package/dist/cli/friction/hq.friction.resolve.descriptor.js.map +1 -0
  199. package/dist/cli/friction/hq.friction.resolve.impl.d.ts +6 -0
  200. package/dist/cli/friction/hq.friction.resolve.impl.d.ts.map +1 -0
  201. package/dist/cli/friction/hq.friction.resolve.impl.js +7 -0
  202. package/dist/cli/friction/hq.friction.resolve.impl.js.map +1 -0
  203. package/dist/cli/friction/hq.friction.show.descriptor.d.ts +24 -0
  204. package/dist/cli/friction/hq.friction.show.descriptor.d.ts.map +1 -0
  205. package/dist/cli/friction/hq.friction.show.descriptor.js +17 -0
  206. package/dist/cli/friction/hq.friction.show.descriptor.js.map +1 -0
  207. package/dist/cli/friction/hq.friction.show.impl.d.ts +7 -0
  208. package/dist/cli/friction/hq.friction.show.impl.d.ts.map +1 -0
  209. package/dist/cli/friction/hq.friction.show.impl.js +64 -0
  210. package/dist/cli/friction/hq.friction.show.impl.js.map +1 -0
  211. package/dist/cli/friction/hq.friction.sync.descriptor.d.ts +16 -0
  212. package/dist/cli/friction/hq.friction.sync.descriptor.d.ts.map +1 -0
  213. package/dist/cli/friction/hq.friction.sync.descriptor.js +13 -0
  214. package/dist/cli/friction/hq.friction.sync.descriptor.js.map +1 -0
  215. package/dist/cli/friction/hq.friction.sync.impl.d.ts +7 -0
  216. package/dist/cli/friction/hq.friction.sync.impl.d.ts.map +1 -0
  217. package/dist/cli/friction/hq.friction.sync.impl.js +29 -0
  218. package/dist/cli/friction/hq.friction.sync.impl.js.map +1 -0
  219. package/dist/cli/friction/hq.friction.triage.descriptor.d.ts +27 -0
  220. package/dist/cli/friction/hq.friction.triage.descriptor.d.ts.map +1 -0
  221. package/dist/cli/friction/hq.friction.triage.descriptor.js +18 -0
  222. package/dist/cli/friction/hq.friction.triage.descriptor.js.map +1 -0
  223. package/dist/cli/friction/hq.friction.triage.impl.d.ts +6 -0
  224. package/dist/cli/friction/hq.friction.triage.impl.d.ts.map +1 -0
  225. package/dist/cli/friction/hq.friction.triage.impl.js +7 -0
  226. package/dist/cli/friction/hq.friction.triage.impl.js.map +1 -0
  227. package/dist/cli/friction/invocation.d.ts +12 -0
  228. package/dist/cli/friction/invocation.d.ts.map +1 -0
  229. package/dist/cli/friction/invocation.js +28 -0
  230. package/dist/cli/friction/invocation.js.map +1 -0
  231. package/dist/cli/health/hq.health.descriptor.d.ts +19 -0
  232. package/dist/cli/health/hq.health.descriptor.d.ts.map +1 -0
  233. package/dist/cli/health/hq.health.descriptor.js +16 -0
  234. package/dist/cli/health/hq.health.descriptor.js.map +1 -0
  235. package/dist/cli/health/hq.health.impl.d.ts +3 -0
  236. package/dist/cli/health/hq.health.impl.d.ts.map +1 -0
  237. package/dist/cli/health/hq.health.impl.js +151 -0
  238. package/dist/cli/health/hq.health.impl.js.map +1 -0
  239. package/dist/cli/host-platform.d.ts +14 -0
  240. package/dist/cli/host-platform.d.ts.map +1 -0
  241. package/dist/cli/host-platform.js +30 -0
  242. package/dist/cli/host-platform.js.map +1 -0
  243. package/dist/cli/hq.cli-group.descriptor.d.ts +11 -0
  244. package/dist/cli/hq.cli-group.descriptor.d.ts.map +1 -0
  245. package/dist/cli/hq.cli-group.descriptor.js +11 -0
  246. package/dist/cli/hq.cli-group.descriptor.js.map +1 -0
  247. package/dist/cli/init/hq.init.descriptor.d.ts +7 -0
  248. package/dist/cli/init/hq.init.descriptor.d.ts.map +1 -0
  249. package/dist/cli/init/hq.init.descriptor.js +36 -0
  250. package/dist/cli/init/hq.init.descriptor.js.map +1 -0
  251. package/dist/cli/init/hq.init.impl.d.ts +7 -0
  252. package/dist/cli/init/hq.init.impl.d.ts.map +1 -0
  253. package/dist/cli/init/hq.init.impl.js +163 -0
  254. package/dist/cli/init/hq.init.impl.js.map +1 -0
  255. package/dist/cli/install/hq.install.descriptor.d.ts +9 -0
  256. package/dist/cli/install/hq.install.descriptor.d.ts.map +1 -0
  257. package/dist/cli/install/hq.install.descriptor.js +34 -0
  258. package/dist/cli/install/hq.install.descriptor.js.map +1 -0
  259. package/dist/cli/install/hq.install.impl.d.ts +6 -0
  260. package/dist/cli/install/hq.install.impl.d.ts.map +1 -0
  261. package/dist/cli/install/hq.install.impl.js +110 -0
  262. package/dist/cli/install/hq.install.impl.js.map +1 -0
  263. package/dist/cli/permissions/hq.permissions.descriptor.d.ts +9 -0
  264. package/dist/cli/permissions/hq.permissions.descriptor.d.ts.map +1 -0
  265. package/dist/cli/permissions/hq.permissions.descriptor.js +25 -0
  266. package/dist/cli/permissions/hq.permissions.descriptor.js.map +1 -0
  267. package/dist/cli/permissions/hq.permissions.impl.d.ts +3 -0
  268. package/dist/cli/permissions/hq.permissions.impl.d.ts.map +1 -0
  269. package/dist/cli/permissions/hq.permissions.impl.js +113 -0
  270. package/dist/cli/permissions/hq.permissions.impl.js.map +1 -0
  271. package/dist/cli/plugin.d.ts +3 -0
  272. package/dist/cli/plugin.d.ts.map +1 -0
  273. package/dist/cli/plugin.js +77 -0
  274. package/dist/cli/plugin.js.map +1 -0
  275. package/dist/cli/schemas/input.d.ts +117 -0
  276. package/dist/cli/schemas/input.d.ts.map +1 -0
  277. package/dist/cli/schemas/input.js +66 -0
  278. package/dist/cli/schemas/input.js.map +1 -0
  279. package/dist/cli/service/hq.service.cli-group.descriptor.d.ts +12 -0
  280. package/dist/cli/service/hq.service.cli-group.descriptor.d.ts.map +1 -0
  281. package/dist/cli/service/hq.service.cli-group.descriptor.js +12 -0
  282. package/dist/cli/service/hq.service.cli-group.descriptor.js.map +1 -0
  283. package/dist/cli/service/hq.service.list.descriptor.d.ts +16 -0
  284. package/dist/cli/service/hq.service.list.descriptor.d.ts.map +1 -0
  285. package/dist/cli/service/hq.service.list.descriptor.js +13 -0
  286. package/dist/cli/service/hq.service.list.descriptor.js.map +1 -0
  287. package/dist/cli/service/hq.service.list.impl.d.ts +7 -0
  288. package/dist/cli/service/hq.service.list.impl.d.ts.map +1 -0
  289. package/dist/cli/service/hq.service.list.impl.js +31 -0
  290. package/dist/cli/service/hq.service.list.impl.js.map +1 -0
  291. package/dist/cli/service/hq.service.manage.descriptor.d.ts +25 -0
  292. package/dist/cli/service/hq.service.manage.descriptor.d.ts.map +1 -0
  293. package/dist/cli/service/hq.service.manage.descriptor.js +23 -0
  294. package/dist/cli/service/hq.service.manage.descriptor.js.map +1 -0
  295. package/dist/cli/service/hq.service.manage.impl.d.ts +7 -0
  296. package/dist/cli/service/hq.service.manage.impl.d.ts.map +1 -0
  297. package/dist/cli/service/hq.service.manage.impl.js +64 -0
  298. package/dist/cli/service/hq.service.manage.impl.js.map +1 -0
  299. package/dist/cli/service/hq.service.register.descriptor.d.ts +21 -0
  300. package/dist/cli/service/hq.service.register.descriptor.d.ts.map +1 -0
  301. package/dist/cli/service/hq.service.register.descriptor.js +20 -0
  302. package/dist/cli/service/hq.service.register.descriptor.js.map +1 -0
  303. package/dist/cli/service/hq.service.register.impl.d.ts +7 -0
  304. package/dist/cli/service/hq.service.register.impl.d.ts.map +1 -0
  305. package/dist/cli/service/hq.service.register.impl.js +35 -0
  306. package/dist/cli/service/hq.service.register.impl.js.map +1 -0
  307. package/dist/cli/setup/hq.setup.descriptor.d.ts +9 -0
  308. package/dist/cli/setup/hq.setup.descriptor.d.ts.map +1 -0
  309. package/dist/cli/setup/hq.setup.descriptor.js +22 -0
  310. package/dist/cli/setup/hq.setup.descriptor.js.map +1 -0
  311. package/dist/cli/setup/hq.setup.impl.d.ts +7 -0
  312. package/dist/cli/setup/hq.setup.impl.d.ts.map +1 -0
  313. package/dist/cli/setup/hq.setup.impl.js +57 -0
  314. package/dist/cli/setup/hq.setup.impl.js.map +1 -0
  315. package/dist/cli/setup/index.d.ts +2 -0
  316. package/dist/cli/setup/index.d.ts.map +1 -0
  317. package/dist/cli/setup/index.js +2 -0
  318. package/dist/cli/setup/index.js.map +1 -0
  319. package/dist/cli/surface/hq.surface.cli-group.descriptor.d.ts +12 -0
  320. package/dist/cli/surface/hq.surface.cli-group.descriptor.d.ts.map +1 -0
  321. package/dist/cli/surface/hq.surface.cli-group.descriptor.js +12 -0
  322. package/dist/cli/surface/hq.surface.cli-group.descriptor.js.map +1 -0
  323. package/dist/cli/surface/hq.surface.list.descriptor.d.ts +20 -0
  324. package/dist/cli/surface/hq.surface.list.descriptor.d.ts.map +1 -0
  325. package/dist/cli/surface/hq.surface.list.descriptor.js +20 -0
  326. package/dist/cli/surface/hq.surface.list.descriptor.js.map +1 -0
  327. package/dist/cli/surface/hq.surface.list.impl.d.ts +7 -0
  328. package/dist/cli/surface/hq.surface.list.impl.d.ts.map +1 -0
  329. package/dist/cli/surface/hq.surface.list.impl.js +35 -0
  330. package/dist/cli/surface/hq.surface.list.impl.js.map +1 -0
  331. package/dist/cli/surface/hq.surface.resolve.descriptor.d.ts +22 -0
  332. package/dist/cli/surface/hq.surface.resolve.descriptor.d.ts.map +1 -0
  333. package/dist/cli/surface/hq.surface.resolve.descriptor.js +20 -0
  334. package/dist/cli/surface/hq.surface.resolve.descriptor.js.map +1 -0
  335. package/dist/cli/surface/hq.surface.resolve.impl.d.ts +7 -0
  336. package/dist/cli/surface/hq.surface.resolve.impl.d.ts.map +1 -0
  337. package/dist/cli/surface/hq.surface.resolve.impl.js +29 -0
  338. package/dist/cli/surface/hq.surface.resolve.impl.js.map +1 -0
  339. package/dist/client/friction/index.d.ts +58 -0
  340. package/dist/client/friction/index.d.ts.map +1 -0
  341. package/dist/client/friction/index.js +146 -0
  342. package/dist/client/friction/index.js.map +1 -0
  343. package/dist/client/friction.client.descriptor.d.ts +14 -0
  344. package/dist/client/friction.client.descriptor.d.ts.map +1 -0
  345. package/dist/client/friction.client.descriptor.js +14 -0
  346. package/dist/client/friction.client.descriptor.js.map +1 -0
  347. package/dist/client/hq.client.descriptor.d.ts +14 -0
  348. package/dist/client/hq.client.descriptor.d.ts.map +1 -0
  349. package/dist/client/hq.client.descriptor.js +14 -0
  350. package/dist/client/hq.client.descriptor.js.map +1 -0
  351. package/dist/client/index.d.ts +95 -0
  352. package/dist/client/index.d.ts.map +1 -0
  353. package/dist/client/index.js +144 -0
  354. package/dist/client/index.js.map +1 -0
  355. package/dist/config/hq-friction.config.descriptor.d.ts +227 -0
  356. package/dist/config/hq-friction.config.descriptor.d.ts.map +1 -0
  357. package/dist/config/hq-friction.config.descriptor.js +116 -0
  358. package/dist/config/hq-friction.config.descriptor.js.map +1 -0
  359. package/dist/dashboard.d.ts +133 -0
  360. package/dist/dashboard.d.ts.map +1 -0
  361. package/dist/dashboard.js +371 -0
  362. package/dist/dashboard.js.map +1 -0
  363. package/dist/docs/hq.machines.docs.descriptor.d.ts +22 -0
  364. package/dist/docs/hq.machines.docs.descriptor.d.ts.map +1 -0
  365. package/dist/docs/hq.machines.docs.descriptor.js +65 -0
  366. package/dist/docs/hq.machines.docs.descriptor.js.map +1 -0
  367. package/dist/docs/hq.sessions.docs.descriptor.d.ts +22 -0
  368. package/dist/docs/hq.sessions.docs.descriptor.d.ts.map +1 -0
  369. package/dist/docs/hq.sessions.docs.descriptor.js +74 -0
  370. package/dist/docs/hq.sessions.docs.descriptor.js.map +1 -0
  371. package/dist/docs/hq.surfaces.docs.descriptor.d.ts +38 -0
  372. package/dist/docs/hq.surfaces.docs.descriptor.d.ts.map +1 -0
  373. package/dist/docs/hq.surfaces.docs.descriptor.js +161 -0
  374. package/dist/docs/hq.surfaces.docs.descriptor.js.map +1 -0
  375. package/dist/docs/hq.terminal.docs.descriptor.d.ts +22 -0
  376. package/dist/docs/hq.terminal.docs.descriptor.d.ts.map +1 -0
  377. package/dist/docs/hq.terminal.docs.descriptor.js +86 -0
  378. package/dist/docs/hq.terminal.docs.descriptor.js.map +1 -0
  379. package/dist/friction/clusters.d.ts +23 -0
  380. package/dist/friction/clusters.d.ts.map +1 -0
  381. package/dist/friction/clusters.js +56 -0
  382. package/dist/friction/clusters.js.map +1 -0
  383. package/dist/friction/fingerprint.d.ts +56 -0
  384. package/dist/friction/fingerprint.d.ts.map +1 -0
  385. package/dist/friction/fingerprint.js +113 -0
  386. package/dist/friction/fingerprint.js.map +1 -0
  387. package/dist/friction/friction-dispositions.record.descriptor.d.ts +4 -0
  388. package/dist/friction/friction-dispositions.record.descriptor.d.ts.map +1 -0
  389. package/dist/friction/friction-dispositions.record.descriptor.js +36 -0
  390. package/dist/friction/friction-dispositions.record.descriptor.js.map +1 -0
  391. package/dist/friction/friction-signals.record.descriptor.d.ts +12 -0
  392. package/dist/friction/friction-signals.record.descriptor.d.ts.map +1 -0
  393. package/dist/friction/friction-signals.record.descriptor.js +52 -0
  394. package/dist/friction/friction-signals.record.descriptor.js.map +1 -0
  395. package/dist/friction/intake.d.ts +79 -0
  396. package/dist/friction/intake.d.ts.map +1 -0
  397. package/dist/friction/intake.js +459 -0
  398. package/dist/friction/intake.js.map +1 -0
  399. package/dist/friction/jobs/friction-clusters.job.descriptor.d.ts +71 -0
  400. package/dist/friction/jobs/friction-clusters.job.descriptor.d.ts.map +1 -0
  401. package/dist/friction/jobs/friction-clusters.job.descriptor.js +34 -0
  402. package/dist/friction/jobs/friction-clusters.job.descriptor.js.map +1 -0
  403. package/dist/friction/jobs/friction-clusters.job.impl.d.ts +22 -0
  404. package/dist/friction/jobs/friction-clusters.job.impl.d.ts.map +1 -0
  405. package/dist/friction/jobs/friction-clusters.job.impl.js +33 -0
  406. package/dist/friction/jobs/friction-clusters.job.impl.js.map +1 -0
  407. package/dist/friction/promote-input.d.ts +37 -0
  408. package/dist/friction/promote-input.d.ts.map +1 -0
  409. package/dist/friction/promote-input.js +58 -0
  410. package/dist/friction/promote-input.js.map +1 -0
  411. package/dist/friction/promotion-visibility.d.ts +34 -0
  412. package/dist/friction/promotion-visibility.d.ts.map +1 -0
  413. package/dist/friction/promotion-visibility.js +57 -0
  414. package/dist/friction/promotion-visibility.js.map +1 -0
  415. package/dist/friction/read.d.ts +21 -0
  416. package/dist/friction/read.d.ts.map +1 -0
  417. package/dist/friction/read.js +23 -0
  418. package/dist/friction/read.js.map +1 -0
  419. package/dist/friction/schemas/disposition.d.ts +42 -0
  420. package/dist/friction/schemas/disposition.d.ts.map +1 -0
  421. package/dist/friction/schemas/disposition.js +22 -0
  422. package/dist/friction/schemas/disposition.js.map +1 -0
  423. package/dist/friction/schemas/intake.d.ts +167 -0
  424. package/dist/friction/schemas/intake.d.ts.map +1 -0
  425. package/dist/friction/schemas/intake.js +69 -0
  426. package/dist/friction/schemas/intake.js.map +1 -0
  427. package/dist/friction/schemas/report.d.ts +138 -0
  428. package/dist/friction/schemas/report.d.ts.map +1 -0
  429. package/dist/friction/schemas/report.js +63 -0
  430. package/dist/friction/schemas/report.js.map +1 -0
  431. package/dist/friction/schemas/signal.d.ts +170 -0
  432. package/dist/friction/schemas/signal.d.ts.map +1 -0
  433. package/dist/friction/schemas/signal.js +77 -0
  434. package/dist/friction/schemas/signal.js.map +1 -0
  435. package/dist/friction/signal-recorded.event.descriptor.d.ts +53 -0
  436. package/dist/friction/signal-recorded.event.descriptor.d.ts.map +1 -0
  437. package/dist/friction/signal-recorded.event.descriptor.js +38 -0
  438. package/dist/friction/signal-recorded.event.descriptor.js.map +1 -0
  439. package/dist/friction/store.d.ts +108 -0
  440. package/dist/friction/store.d.ts.map +1 -0
  441. package/dist/friction/store.js +461 -0
  442. package/dist/friction/store.js.map +1 -0
  443. package/dist/host-guidance/descriptors/accessibility.host-permission-guidance.descriptor.d.ts +8 -0
  444. package/dist/host-guidance/descriptors/accessibility.host-permission-guidance.descriptor.d.ts.map +1 -0
  445. package/dist/host-guidance/descriptors/accessibility.host-permission-guidance.descriptor.js +18 -0
  446. package/dist/host-guidance/descriptors/accessibility.host-permission-guidance.descriptor.js.map +1 -0
  447. package/dist/host-guidance/descriptors/disk.host-permission-guidance.descriptor.d.ts +8 -0
  448. package/dist/host-guidance/descriptors/disk.host-permission-guidance.descriptor.d.ts.map +1 -0
  449. package/dist/host-guidance/descriptors/disk.host-permission-guidance.descriptor.js +18 -0
  450. package/dist/host-guidance/descriptors/disk.host-permission-guidance.descriptor.js.map +1 -0
  451. package/dist/host-guidance/descriptors/homebrew.host-health-check.descriptor.d.ts +8 -0
  452. package/dist/host-guidance/descriptors/homebrew.host-health-check.descriptor.d.ts.map +1 -0
  453. package/dist/host-guidance/descriptors/homebrew.host-health-check.descriptor.js +14 -0
  454. package/dist/host-guidance/descriptors/homebrew.host-health-check.descriptor.js.map +1 -0
  455. package/dist/host-guidance/descriptors/microphone.host-permission-guidance.descriptor.d.ts +8 -0
  456. package/dist/host-guidance/descriptors/microphone.host-permission-guidance.descriptor.d.ts.map +1 -0
  457. package/dist/host-guidance/descriptors/microphone.host-permission-guidance.descriptor.js +18 -0
  458. package/dist/host-guidance/descriptors/microphone.host-permission-guidance.descriptor.js.map +1 -0
  459. package/dist/host-guidance/kinds/host-health-check.kind.d.ts +17 -0
  460. package/dist/host-guidance/kinds/host-health-check.kind.d.ts.map +1 -0
  461. package/dist/host-guidance/kinds/host-health-check.kind.js +22 -0
  462. package/dist/host-guidance/kinds/host-health-check.kind.js.map +1 -0
  463. package/dist/host-guidance/kinds/host-permission-guidance.kind.d.ts +17 -0
  464. package/dist/host-guidance/kinds/host-permission-guidance.kind.d.ts.map +1 -0
  465. package/dist/host-guidance/kinds/host-permission-guidance.kind.js +22 -0
  466. package/dist/host-guidance/kinds/host-permission-guidance.kind.js.map +1 -0
  467. package/dist/host-guidance/registry.d.ts +16 -0
  468. package/dist/host-guidance/registry.d.ts.map +1 -0
  469. package/dist/host-guidance/registry.js +24 -0
  470. package/dist/host-guidance/registry.js.map +1 -0
  471. package/dist/hq.cloud.plugin.d.ts +3 -0
  472. package/dist/hq.cloud.plugin.d.ts.map +1 -0
  473. package/dist/hq.cloud.plugin.js +40 -0
  474. package/dist/hq.cloud.plugin.js.map +1 -0
  475. package/dist/hq.consumer.plugin.d.ts +3 -0
  476. package/dist/hq.consumer.plugin.d.ts.map +1 -0
  477. package/dist/hq.consumer.plugin.js +15 -0
  478. package/dist/hq.consumer.plugin.js.map +1 -0
  479. package/dist/hq.plugin.d.ts +9 -0
  480. package/dist/hq.plugin.d.ts.map +1 -0
  481. package/dist/hq.plugin.js +99 -0
  482. package/dist/hq.plugin.js.map +1 -0
  483. package/dist/installers/builtin/ai-runtimes/installer.d.ts +21 -0
  484. package/dist/installers/builtin/ai-runtimes/installer.d.ts.map +1 -0
  485. package/dist/installers/builtin/ai-runtimes/installer.js +244 -0
  486. package/dist/installers/builtin/ai-runtimes/installer.js.map +1 -0
  487. package/dist/installers/builtin/index.d.ts +9 -0
  488. package/dist/installers/builtin/index.d.ts.map +1 -0
  489. package/dist/installers/builtin/index.js +15 -0
  490. package/dist/installers/builtin/index.js.map +1 -0
  491. package/dist/installers/builtin/language-servers/installer.d.ts +18 -0
  492. package/dist/installers/builtin/language-servers/installer.d.ts.map +1 -0
  493. package/dist/installers/builtin/language-servers/installer.js +139 -0
  494. package/dist/installers/builtin/language-servers/installer.js.map +1 -0
  495. package/dist/installers/builtin/system-deps/installer.d.ts +8 -0
  496. package/dist/installers/builtin/system-deps/installer.d.ts.map +1 -0
  497. package/dist/installers/builtin/system-deps/installer.js +78 -0
  498. package/dist/installers/builtin/system-deps/installer.js.map +1 -0
  499. package/dist/installers/compatibility.consumer.plugin.d.ts +3 -0
  500. package/dist/installers/compatibility.consumer.plugin.d.ts.map +1 -0
  501. package/dist/installers/compatibility.consumer.plugin.js +26 -0
  502. package/dist/installers/compatibility.consumer.plugin.js.map +1 -0
  503. package/dist/installers/core/index.d.ts +3 -0
  504. package/dist/installers/core/index.d.ts.map +1 -0
  505. package/dist/installers/core/index.js +3 -0
  506. package/dist/installers/core/index.js.map +1 -0
  507. package/dist/installers/core/installer-result.d.ts +10 -0
  508. package/dist/installers/core/installer-result.d.ts.map +1 -0
  509. package/dist/installers/core/installer-result.js +14 -0
  510. package/dist/installers/core/installer-result.js.map +1 -0
  511. package/dist/installers/core/installer-runtime.d.ts +18 -0
  512. package/dist/installers/core/installer-runtime.d.ts.map +1 -0
  513. package/dist/installers/core/installer-runtime.js +5 -0
  514. package/dist/installers/core/installer-runtime.js.map +1 -0
  515. package/dist/installers/core/platform.d.ts +6 -0
  516. package/dist/installers/core/platform.d.ts.map +1 -0
  517. package/dist/installers/core/platform.js +19 -0
  518. package/dist/installers/core/platform.js.map +1 -0
  519. package/dist/installers/core/workspace.d.ts +4 -0
  520. package/dist/installers/core/workspace.d.ts.map +1 -0
  521. package/dist/installers/core/workspace.js +11 -0
  522. package/dist/installers/core/workspace.js.map +1 -0
  523. package/dist/installers/index.d.ts +6 -0
  524. package/dist/installers/index.d.ts.map +1 -0
  525. package/dist/installers/index.js +6 -0
  526. package/dist/installers/index.js.map +1 -0
  527. package/dist/installers/schemas/index.d.ts +2 -0
  528. package/dist/installers/schemas/index.d.ts.map +1 -0
  529. package/dist/installers/schemas/index.js +2 -0
  530. package/dist/installers/schemas/index.js.map +1 -0
  531. package/dist/installers/schemas/platform.d.ts +10 -0
  532. package/dist/installers/schemas/platform.d.ts.map +1 -0
  533. package/dist/installers/schemas/platform.js +9 -0
  534. package/dist/installers/schemas/platform.js.map +1 -0
  535. package/dist/installers/schemas/types.d.ts +4 -0
  536. package/dist/installers/schemas/types.d.ts.map +1 -0
  537. package/dist/installers/schemas/types.js +4 -0
  538. package/dist/installers/schemas/types.js.map +1 -0
  539. package/dist/os-wall/channels.wall.d.ts +9 -0
  540. package/dist/os-wall/channels.wall.d.ts.map +1 -0
  541. package/dist/os-wall/channels.wall.js +9 -0
  542. package/dist/os-wall/channels.wall.js.map +1 -0
  543. package/dist/os-wall/surface-store.wall.d.ts +3 -0
  544. package/dist/os-wall/surface-store.wall.d.ts.map +1 -0
  545. package/dist/os-wall/surface-store.wall.js +3 -0
  546. package/dist/os-wall/surface-store.wall.js.map +1 -0
  547. package/dist/runtime-path.d.ts +7 -0
  548. package/dist/runtime-path.d.ts.map +1 -0
  549. package/dist/runtime-path.js +7 -0
  550. package/dist/runtime-path.js.map +1 -0
  551. package/dist/schemas/host-guidance.d.ts +48 -0
  552. package/dist/schemas/host-guidance.d.ts.map +1 -0
  553. package/dist/schemas/host-guidance.js +48 -0
  554. package/dist/schemas/host-guidance.js.map +1 -0
  555. package/dist/services/backends/index.d.ts +24 -0
  556. package/dist/services/backends/index.d.ts.map +1 -0
  557. package/dist/services/backends/index.js +17 -0
  558. package/dist/services/backends/index.js.map +1 -0
  559. package/dist/services/builtin/index.d.ts +78 -0
  560. package/dist/services/builtin/index.d.ts.map +1 -0
  561. package/dist/services/builtin/index.js +44 -0
  562. package/dist/services/builtin/index.js.map +1 -0
  563. package/dist/services/descriptors/vibes-bridge.os-service.descriptor.d.ts +8 -0
  564. package/dist/services/descriptors/vibes-bridge.os-service.descriptor.d.ts.map +1 -0
  565. package/dist/services/descriptors/vibes-bridge.os-service.descriptor.js +21 -0
  566. package/dist/services/descriptors/vibes-bridge.os-service.descriptor.js.map +1 -0
  567. package/dist/services/descriptors/vibes-mcp.os-service.descriptor.d.ts +8 -0
  568. package/dist/services/descriptors/vibes-mcp.os-service.descriptor.d.ts.map +1 -0
  569. package/dist/services/descriptors/vibes-mcp.os-service.descriptor.js +20 -0
  570. package/dist/services/descriptors/vibes-mcp.os-service.descriptor.js.map +1 -0
  571. package/dist/services/descriptors/vibes-pm.os-service.descriptor.d.ts +8 -0
  572. package/dist/services/descriptors/vibes-pm.os-service.descriptor.d.ts.map +1 -0
  573. package/dist/services/descriptors/vibes-pm.os-service.descriptor.js +20 -0
  574. package/dist/services/descriptors/vibes-pm.os-service.descriptor.js.map +1 -0
  575. package/dist/services/index.d.ts +14 -0
  576. package/dist/services/index.d.ts.map +1 -0
  577. package/dist/services/index.js +12 -0
  578. package/dist/services/index.js.map +1 -0
  579. package/dist/services/kinds/os-service.kind.d.ts +19 -0
  580. package/dist/services/kinds/os-service.kind.d.ts.map +1 -0
  581. package/dist/services/kinds/os-service.kind.js +24 -0
  582. package/dist/services/kinds/os-service.kind.js.map +1 -0
  583. package/dist/services/registry.d.ts +45 -0
  584. package/dist/services/registry.d.ts.map +1 -0
  585. package/dist/services/registry.js +141 -0
  586. package/dist/services/registry.js.map +1 -0
  587. package/dist/services/schemas/service.d.ts +79 -0
  588. package/dist/services/schemas/service.d.ts.map +1 -0
  589. package/dist/services/schemas/service.js +82 -0
  590. package/dist/services/schemas/service.js.map +1 -0
  591. package/dist/svelte/report/ReportProblemDialog.svelte +205 -0
  592. package/dist/svelte/report/ReportProblemDialog.svelte.d.ts +5 -0
  593. package/dist/svelte/report/ReportProblemDialog.svelte.d.ts.map +1 -0
  594. package/dist/svelte/report/capture-context.d.ts +61 -0
  595. package/dist/svelte/report/capture-context.d.ts.map +1 -0
  596. package/dist/svelte/report/capture-context.js +100 -0
  597. package/dist/svelte/report/report.plugin.d.ts +68 -0
  598. package/dist/svelte/report/report.plugin.d.ts.map +1 -0
  599. package/dist/svelte/report/report.plugin.js +109 -0
  600. package/dist/svelte/report/severity.d.ts +32 -0
  601. package/dist/svelte/report/severity.d.ts.map +1 -0
  602. package/dist/svelte/report/severity.js +13 -0
  603. package/dist/tools/applet/applet.schemas.d.ts +6 -0
  604. package/dist/tools/applet/applet.schemas.d.ts.map +1 -0
  605. package/dist/tools/applet/applet.schemas.js +6 -0
  606. package/dist/tools/applet/applet.schemas.js.map +1 -0
  607. package/dist/utils/exec.d.ts +22 -0
  608. package/dist/utils/exec.d.ts.map +1 -0
  609. package/dist/utils/exec.js +38 -0
  610. package/dist/utils/exec.js.map +1 -0
  611. package/dist/utils/fs.d.ts +10 -0
  612. package/dist/utils/fs.d.ts.map +1 -0
  613. package/dist/utils/fs.js +25 -0
  614. package/dist/utils/fs.js.map +1 -0
  615. package/package.json +268 -4
@@ -0,0 +1,36 @@
1
+ /**
2
+ * The job a surface row's update starts (through `approval-resolved.subscription`):
3
+ * it runs on the Workers consumer, where approval requests wait, and announces an
4
+ * answered approval row there.
5
+ */
6
+ declare const _default: {
7
+ kind: "workers/job";
8
+ id: string;
9
+ name: string;
10
+ description: string;
11
+ queue: string;
12
+ dispatch: "background";
13
+ type: "default";
14
+ hardware: readonly ["consumer"];
15
+ schemas: {
16
+ input: import("zod/v4").ZodObject<{
17
+ recordId: import("zod/v4").ZodString;
18
+ recordKind: import("zod/v4").ZodLiteral<"os.surface-notifications">;
19
+ data: import("zod/v4").ZodObject<{
20
+ channelId: import("zod/v4").ZodString;
21
+ status: import("zod/v4").ZodEnum<{
22
+ pending: "pending";
23
+ approved: "approved";
24
+ discarded: "discarded";
25
+ }>;
26
+ }, import("zod/v4/core").$loose>;
27
+ }, import("zod/v4/core").$strip>;
28
+ output: import("zod/v4").ZodObject<{
29
+ announced: import("zod/v4").ZodBoolean;
30
+ }, import("zod/v4/core").$strip>;
31
+ };
32
+ tags: string[];
33
+ enabled: true;
34
+ };
35
+ export default _default;
36
+ //# sourceMappingURL=approval-resolved.job.descriptor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approval-resolved.job.descriptor.d.ts","sourceRoot":"","sources":["../../src/approval/approval-resolved.job.descriptor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKH,wBAeG"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * The job a surface row's update starts (through `approval-resolved.subscription`):
3
+ * it runs on the Workers consumer, where approval requests wait, and announces an
4
+ * answered approval row there.
5
+ */
6
+ import { createRuntimeAsset } from '@vibesdotdev/kernel';
7
+ import { ApprovalResolvedJobInputSchema, ApprovalResolvedJobOutputSchema, HQ_APPROVAL_RESOLVED_JOB_ID } from "./schemas.js";
8
+ export default createRuntimeAsset({
9
+ kind: 'workers/job',
10
+ id: HQ_APPROVAL_RESOLVED_JOB_ID,
11
+ name: 'Approval answered',
12
+ description: 'Announce an answered hq-surface approval row to the requests waiting on this Workers consumer',
13
+ queue: 'hq-approval',
14
+ dispatch: 'background',
15
+ type: 'default',
16
+ hardware: ['consumer'],
17
+ schemas: {
18
+ input: ApprovalResolvedJobInputSchema,
19
+ output: ApprovalResolvedJobOutputSchema
20
+ },
21
+ tags: ['hq', 'approval', 'surface'],
22
+ enabled: true
23
+ });
24
+ //# sourceMappingURL=approval-resolved.job.descriptor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approval-resolved.job.descriptor.js","sourceRoot":"","sources":["../../src/approval/approval-resolved.job.descriptor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,8BAA8B,EAAE,+BAA+B,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAE5H,eAAe,kBAAkB,CAAC;IACjC,IAAI,EAAE,aAAa;IACnB,EAAE,EAAE,2BAA2B;IAC/B,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,+FAA+F;IAC5G,KAAK,EAAE,aAAa;IACpB,QAAQ,EAAE,YAAqB;IAC/B,IAAI,EAAE,SAAkB;IACxB,QAAQ,EAAE,CAAC,UAAU,CAAU;IAC/B,OAAO,EAAE;QACR,KAAK,EAAE,8BAA8B;QACrC,MAAM,EAAE,+BAA+B;KACvC;IACD,IAAI,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,SAAS,CAAC;IACnC,OAAO,EAAE,IAAI;CACb,CAAC,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Announce an answered approval row on this host's `hq/approval` hook bus. Rows
3
+ * that are not approval requests, or not yet answered, announce nothing.
4
+ */
5
+ import type { VibesRuntime } from '@vibesdotdev/kernel';
6
+ import type { JobDescriptor, JobExecutionContext, JobImplementation } from '@vibesdotdev/kernel/kinds';
7
+ import { type ApprovalResolvedJobInput, type ApprovalResolvedJobOutput } from './schemas.ts';
8
+ export default class ApprovalResolvedJob implements JobImplementation<ApprovalResolvedJobInput, ApprovalResolvedJobOutput> {
9
+ #private;
10
+ readonly id: string;
11
+ readonly descriptor: JobDescriptor;
12
+ readonly type: "default";
13
+ readonly isolation: "inline";
14
+ constructor(descriptor: JobDescriptor, context: {
15
+ runtime: VibesRuntime;
16
+ });
17
+ handle(context: JobExecutionContext<ApprovalResolvedJobInput>): Promise<ApprovalResolvedJobOutput>;
18
+ }
19
+ //# sourceMappingURL=approval-resolved.job.impl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approval-resolved.job.impl.d.ts","sourceRoot":"","sources":["../../src/approval/approval-resolved.job.impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACvG,OAAO,EAGN,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAE9B,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,OAAO,OAAO,mBAAoB,YAAW,iBAAiB,CAAC,wBAAwB,EAAE,yBAAyB,CAAC;;IACzH,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC;IACnC,QAAQ,CAAC,IAAI,EAAG,SAAS,CAAU;IACnC,QAAQ,CAAC,SAAS,EAAG,QAAQ,CAAU;gBAG3B,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE;QAAE,OAAO,EAAE,YAAY,CAAA;KAAE;IAMnE,MAAM,CAAC,OAAO,EAAE,mBAAmB,CAAC,wBAAwB,CAAC,GAAG,OAAO,CAAC,yBAAyB,CAAC;CAOxG"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Announce an answered approval row on this host's `hq/approval` hook bus. Rows
3
+ * that are not approval requests, or not yet answered, announce nothing.
4
+ */
5
+ import { ApprovalResolvedJobInputSchema, HQ_APPROVAL_HOOK_NAMESPACE } from "./schemas.js";
6
+ export default class ApprovalResolvedJob {
7
+ id;
8
+ descriptor;
9
+ type = 'default';
10
+ isolation = 'inline';
11
+ #runtime;
12
+ constructor(descriptor, context) {
13
+ this.id = descriptor.id;
14
+ this.descriptor = descriptor;
15
+ this.#runtime = context.runtime;
16
+ }
17
+ async handle(context) {
18
+ const input = ApprovalResolvedJobInputSchema.parse(context.data);
19
+ const status = input.data.status;
20
+ if (!input.data.channelId.startsWith('approval-') || status === 'pending')
21
+ return { announced: false };
22
+ await this.#runtime.hooks(HQ_APPROVAL_HOOK_NAMESPACE).emit('resolved', { notificationId: input.recordId, status });
23
+ return { announced: true };
24
+ }
25
+ }
26
+ //# sourceMappingURL=approval-resolved.job.impl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approval-resolved.job.impl.js","sourceRoot":"","sources":["../../src/approval/approval-resolved.job.impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACN,8BAA8B,EAC9B,0BAA0B,EAI1B,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,OAAO,OAAO,mBAAmB;IAC9B,EAAE,CAAS;IACX,UAAU,CAAgB;IAC1B,IAAI,GAAG,SAAkB,CAAC;IAC1B,SAAS,GAAG,QAAiB,CAAC;IAC9B,QAAQ,CAAe;IAEhC,YAAY,UAAyB,EAAE,OAAkC;QACxE,IAAI,CAAC,EAAE,GAAG,UAAU,CAAC,EAAE,CAAC;QACxB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC;IACjC,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,OAAsD;QAClE,MAAM,KAAK,GAAG,8BAA8B,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACjE,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC;QACjC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,WAAW,CAAC,IAAI,MAAM,KAAK,SAAS;YAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;QACvG,MAAM,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAmB,0BAA0B,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,cAAc,EAAE,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;QACrI,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;IAC5B,CAAC;CACD"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Start `hq.approval.resolved` whenever an hq surface row is updated. The update
3
+ * happens where the person answers (`vibes hq surface resolve`, its own process);
4
+ * the job runs on the Workers consumer, where the request waits.
5
+ */
6
+ declare const _default: {
7
+ kind: "runtime/subscription";
8
+ id: string;
9
+ name: string;
10
+ description: string;
11
+ event: string;
12
+ handler: string;
13
+ handlerType: string;
14
+ filter: {
15
+ recordKind: string;
16
+ };
17
+ enabled: true;
18
+ priority: number;
19
+ };
20
+ export default _default;
21
+ //# sourceMappingURL=approval-resolved.subscription.descriptor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approval-resolved.subscription.descriptor.d.ts","sourceRoot":"","sources":["../../src/approval/approval-resolved.subscription.descriptor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;;;;;;;;;;;;;AAKH,wBAWG"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Start `hq.approval.resolved` whenever an hq surface row is updated. The update
3
+ * happens where the person answers (`vibes hq surface resolve`, its own process);
4
+ * the job runs on the Workers consumer, where the request waits.
5
+ */
6
+ import { createRuntimeAsset } from '@vibesdotdev/kernel';
7
+ import { HQ_APPROVAL_RESOLVED_JOB_ID } from "./schemas.js";
8
+ export default createRuntimeAsset({
9
+ kind: 'runtime/subscription',
10
+ id: 'hq.approval.surface-updated',
11
+ name: 'Approval answered',
12
+ description: 'Starts hq.approval.resolved when an hq surface notification row is updated',
13
+ event: 'storage.record.afterUpdate',
14
+ handler: HQ_APPROVAL_RESOLVED_JOB_ID,
15
+ handlerType: 'job',
16
+ filter: { recordKind: 'os.surface-notifications' },
17
+ enabled: true,
18
+ priority: 0
19
+ });
20
+ //# sourceMappingURL=approval-resolved.subscription.descriptor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approval-resolved.subscription.descriptor.js","sourceRoot":"","sources":["../../src/approval/approval-resolved.subscription.descriptor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAE3D,eAAe,kBAAkB,CAAC;IACjC,IAAI,EAAE,sBAAsB;IAC5B,EAAE,EAAE,6BAA6B;IACjC,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,4EAA4E;IACzF,KAAK,EAAE,4BAA4B;IACnC,OAAO,EAAE,2BAA2B;IACpC,WAAW,EAAE,KAAK;IAClB,MAAM,EAAE,EAAE,UAAU,EAAE,0BAA0B,EAAE;IAClD,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,CAAC;CACX,CAAC,CAAC"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * The hq-surface approval channel's shapes: ids, the job the surface-row update
3
+ * starts, and the in-process event that wakes the waiting request.
4
+ */
5
+ import * as z from 'zod/v4';
6
+ /** The `tools/approval-channel` id a task's approval policy names. */
7
+ export declare const HQ_SURFACE_APPROVAL_CHANNEL_ID = "hq-surface";
8
+ /** The `workers/job` the surface row's update starts, on the Workers consumer where requests wait. */
9
+ export declare const HQ_APPROVAL_RESOLVED_JOB_ID = "hq.approval.resolved";
10
+ /** The hook namespace the resolve job announces an answer on; waiting requests listen there. */
11
+ export declare const HQ_APPROVAL_HOOK_NAMESPACE = "hq/approval";
12
+ /** The surface channel id an approval request's row is written under: one per request. */
13
+ export declare const approvalSurfaceChannelId: (requestId: string) => string;
14
+ /** What `storage.record.afterUpdate` hands the resolve job for an updated surface row. */
15
+ export declare const ApprovalResolvedJobInputSchema: z.ZodObject<{
16
+ recordId: z.ZodString;
17
+ recordKind: z.ZodLiteral<"os.surface-notifications">;
18
+ data: z.ZodObject<{
19
+ channelId: z.ZodString;
20
+ status: z.ZodEnum<{
21
+ pending: "pending";
22
+ approved: "approved";
23
+ discarded: "discarded";
24
+ }>;
25
+ }, z.core.$loose>;
26
+ }, z.core.$strip>;
27
+ export type ApprovalResolvedJobInput = z.infer<typeof ApprovalResolvedJobInputSchema>;
28
+ /** The answer to one request, announced on the Workers consumer's hook bus. */
29
+ export declare const ApprovalResolvedEventSchema: z.ZodObject<{
30
+ notificationId: z.ZodString;
31
+ status: z.ZodEnum<{
32
+ approved: "approved";
33
+ discarded: "discarded";
34
+ }>;
35
+ }, z.core.$strip>;
36
+ export type ApprovalResolvedEvent = z.infer<typeof ApprovalResolvedEventSchema>;
37
+ export declare const ApprovalResolvedJobOutputSchema: z.ZodObject<{
38
+ announced: z.ZodBoolean;
39
+ }, z.core.$strip>;
40
+ export type ApprovalResolvedJobOutput = z.infer<typeof ApprovalResolvedJobOutputSchema>;
41
+ /** The `hq/approval` hook namespace's events. */
42
+ export type HqApprovalEvents = {
43
+ resolved: ApprovalResolvedEvent;
44
+ };
45
+ //# sourceMappingURL=schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/approval/schemas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,sEAAsE;AACtE,eAAO,MAAM,8BAA8B,eAAe,CAAC;AAE3D,sGAAsG;AACtG,eAAO,MAAM,2BAA2B,yBAAyB,CAAC;AAElE,gGAAgG;AAChG,eAAO,MAAM,0BAA0B,gBAAgB,CAAC;AAExD,0FAA0F;AAC1F,eAAO,MAAM,wBAAwB,GAAI,WAAW,MAAM,KAAG,MAAiC,CAAC;AAI/F,0FAA0F;AAC1F,eAAO,MAAM,8BAA8B;;;;;;;;;;;iBAIzC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEtF,+EAA+E;AAC/E,eAAO,MAAM,2BAA2B;;;;;;iBAGtC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,+BAA+B;;iBAAuC,CAAC;AACpF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAExF,iDAAiD;AACjD,MAAM,MAAM,gBAAgB,GAAG;IAC9B,QAAQ,EAAE,qBAAqB,CAAC;CAChC,CAAC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * The hq-surface approval channel's shapes: ids, the job the surface-row update
3
+ * starts, and the in-process event that wakes the waiting request.
4
+ */
5
+ import * as z from 'zod/v4';
6
+ /** The `tools/approval-channel` id a task's approval policy names. */
7
+ export const HQ_SURFACE_APPROVAL_CHANNEL_ID = 'hq-surface';
8
+ /** The `workers/job` the surface row's update starts, on the Workers consumer where requests wait. */
9
+ export const HQ_APPROVAL_RESOLVED_JOB_ID = 'hq.approval.resolved';
10
+ /** The hook namespace the resolve job announces an answer on; waiting requests listen there. */
11
+ export const HQ_APPROVAL_HOOK_NAMESPACE = 'hq/approval';
12
+ /** The surface channel id an approval request's row is written under: one per request. */
13
+ export const approvalSurfaceChannelId = (requestId) => `approval-${requestId}`;
14
+ const SurfaceStatusSchema = z.enum(['pending', 'approved', 'discarded']);
15
+ /** What `storage.record.afterUpdate` hands the resolve job for an updated surface row. */
16
+ export const ApprovalResolvedJobInputSchema = z.object({
17
+ recordId: z.string().min(1),
18
+ recordKind: z.literal('os.surface-notifications'),
19
+ data: z.looseObject({ channelId: z.string().min(1), status: SurfaceStatusSchema })
20
+ });
21
+ /** The answer to one request, announced on the Workers consumer's hook bus. */
22
+ export const ApprovalResolvedEventSchema = z.object({
23
+ notificationId: z.string().min(1),
24
+ status: z.enum(['approved', 'discarded'])
25
+ });
26
+ export const ApprovalResolvedJobOutputSchema = z.object({ announced: z.boolean() });
27
+ //# sourceMappingURL=schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/approval/schemas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,sEAAsE;AACtE,MAAM,CAAC,MAAM,8BAA8B,GAAG,YAAY,CAAC;AAE3D,sGAAsG;AACtG,MAAM,CAAC,MAAM,2BAA2B,GAAG,sBAAsB,CAAC;AAElE,gGAAgG;AAChG,MAAM,CAAC,MAAM,0BAA0B,GAAG,aAAa,CAAC;AAExD,0FAA0F;AAC1F,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,SAAiB,EAAU,EAAE,CAAC,YAAY,SAAS,EAAE,CAAC;AAE/F,MAAM,mBAAmB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC;AAEzE,0FAA0F;AAC1F,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IACtD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,0BAA0B,CAAC;IACjD,IAAI,EAAE,CAAC,CAAC,WAAW,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,mBAAmB,EAAE,CAAC;CAClF,CAAC,CAAC;AAGH,+EAA+E;AAC/E,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACjC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;CACzC,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * The hq-surface approval channel: a request becomes an hq surface notification
3
+ * and a native Approve/Decline dialog on the owning Mac. CLI resolution remains available.
4
+ */
5
+ declare const _default: {
6
+ kind: "tools/approval-channel";
7
+ id: string;
8
+ name: string;
9
+ description: string;
10
+ hardware: string[];
11
+ enabled: true;
12
+ };
13
+ export default _default;
14
+ //# sourceMappingURL=surface-approval-channel.descriptor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"surface-approval-channel.descriptor.d.ts","sourceRoot":"","sources":["../../src/approval/surface-approval-channel.descriptor.ts"],"names":[],"mappings":"AAAA;;;GAGG;;;;;;;;;AAKH,wBAQG"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * The hq-surface approval channel: a request becomes an hq surface notification
3
+ * and a native Approve/Decline dialog on the owning Mac. CLI resolution remains available.
4
+ */
5
+ import { createRuntimeAsset } from '@vibesdotdev/kernel';
6
+ import { HQ_SURFACE_APPROVAL_CHANNEL_ID } from "./schemas.js";
7
+ export default createRuntimeAsset({
8
+ kind: 'tools/approval-channel',
9
+ id: HQ_SURFACE_APPROVAL_CHANNEL_ID,
10
+ name: 'HQ surface approval',
11
+ description: 'Presents a correlated approval request on the owning Mac; persists the decision in the HQ surface store.',
12
+ // The surface store and its banner are consumer-host facilities.
13
+ hardware: ['consumer'],
14
+ enabled: true
15
+ });
16
+ //# sourceMappingURL=surface-approval-channel.descriptor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"surface-approval-channel.descriptor.js","sourceRoot":"","sources":["../../src/approval/surface-approval-channel.descriptor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,8BAA8B,EAAE,MAAM,cAAc,CAAC;AAE9D,eAAe,kBAAkB,CAAC;IACjC,IAAI,EAAE,wBAAwB;IAC9B,EAAE,EAAE,8BAA8B;IAClC,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,0GAA0G;IACvH,iEAAiE;IACjE,QAAQ,EAAE,CAAC,UAAU,CAAC;IACtB,OAAO,EAAE,IAAI;CACb,CAAC,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * hq-surface approval channel. Each request is written as an hq surface
3
+ * notification and presents its native review UI. CLI resolution still announces
4
+ * its answer on this host's `hq/approval` hook bus. The row is read once after subscribing,
5
+ * so an answer that came first is not missed. A cancelled run stops waiting.
6
+ */
7
+ import { type VibesRuntime } from '@vibesdotdev/kernel';
8
+ import type { KindContext } from '@vibesdotdev/kernel/schemas/kind';
9
+ import type { RuntimeDescriptor } from '@vibesdotdev/kernel/schemas/descriptor';
10
+ import type { ToolApprovalChannelInterface, ToolApprovalGateOptions } from '@vibesdotdev/tools/agents/approval/channel';
11
+ import type { ToolApprovalDecision, ToolApprovalRequest } from '@vibesdotdev/ai-schemas/agents/approval/types';
12
+ export default class HqSurfaceApprovalChannel implements ToolApprovalChannelInterface {
13
+ #private;
14
+ constructor(_descriptor: RuntimeDescriptor, context: KindContext<VibesRuntime>);
15
+ createRuntime(correlation: Record<string, string>, options?: ToolApprovalGateOptions): {
16
+ requestApproval(request: ToolApprovalRequest): Promise<ToolApprovalDecision>;
17
+ };
18
+ }
19
+ //# sourceMappingURL=surface-approval-channel.impl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"surface-approval-channel.impl.d.ts","sourceRoot":"","sources":["../../src/approval/surface-approval-channel.impl.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAmB,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,KAAK,EAAE,4BAA4B,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACxH,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAwD/G,MAAM,CAAC,OAAO,OAAO,wBAAyB,YAAW,4BAA4B;;gBAGxE,WAAW,EAAE,iBAAiB,EAAE,OAAO,EAAE,WAAW,CAAC,YAAY,CAAC;IAI9E,aAAa,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,EAAE,uBAAuB;iCAGnD,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC;;CA2BpF"}
@@ -0,0 +1,101 @@
1
+ /**
2
+ * hq-surface approval channel. Each request is written as an hq surface
3
+ * notification and presents its native review UI. CLI resolution still announces
4
+ * its answer on this host's `hq/approval` hook bus. The row is read once after subscribing,
5
+ * so an answer that came first is not missed. A cancelled run stops waiting.
6
+ */
7
+ import { redactCredentials } from '@vibesdotdev/shared/utils';
8
+ import * as z from 'zod/v4';
9
+ import { CapabilityError } from '@vibesdotdev/kernel';
10
+ import { getSurfaceNotification, resolveSurfaceNotification, SYSTEM_OWNER, writeSurfaceNotification } from "../os-wall/surface-store.wall.js";
11
+ import { approvalSurfaceChannelId, HQ_APPROVAL_HOOK_NAMESPACE } from "./schemas.js";
12
+ /** What an agent's `request-approval` call carries; other gated calls carry their own arguments. */
13
+ const RequestedChangeSchema = z.looseObject({
14
+ action: z.string().min(1).optional(),
15
+ why: z.string().min(1).optional(),
16
+ paths: z.array(z.string()).optional(),
17
+ evidence: z.string().min(1).optional()
18
+ });
19
+ function describe(request, correlation) {
20
+ const change = RequestedChangeSchema.parse(request.args);
21
+ const summary = change.action ?? `${request.toolName}: ${request.description ?? 'needs approval'}`;
22
+ const lines = [
23
+ `Tool: ${request.toolId}`,
24
+ request.toolCallId ? `Tool call: ${request.toolCallId}` : undefined,
25
+ ...Object.entries(correlation).map(([key, value]) => `${key}: ${value}`),
26
+ `Arguments (credentials redacted): ${redactCredentials(JSON.stringify(request.args))}`,
27
+ change.why ? `Why: ${redactCredentials(change.why)}` : undefined,
28
+ change.paths?.length ? `Paths: ${change.paths.join(', ')}` : undefined,
29
+ change.evidence ? `Evidence: ${redactCredentials(change.evidence)}` : undefined,
30
+ request.description && change.action ? `Note: ${redactCredentials(request.description)}` : undefined,
31
+ 'Answer with `vibes hq surface resolve <id> --resolution approved|discarded` (ids: `vibes hq surface list`).'
32
+ ];
33
+ return { summary: redactCredentials(summary), detail: lines.filter((line) => line !== undefined).join('\n') };
34
+ }
35
+ /** Wait for the answer to one row: the announcement, or the row itself when it was answered first. */
36
+ async function answerOf(runtime, id, signal) {
37
+ const bus = runtime.hooks(HQ_APPROVAL_HOOK_NAMESPACE);
38
+ let stop = () => { };
39
+ const announced = new Promise((resolve, reject) => {
40
+ const cancel = () => reject(new CapabilityError('The approval request was cancelled.', 'CANCELLED', { reason: 'approval-request-cancelled' }));
41
+ const off = bus.on('resolved', (event) => {
42
+ if (event.notificationId === id)
43
+ resolve(event.status);
44
+ });
45
+ signal?.addEventListener('abort', cancel, { once: true });
46
+ stop = () => {
47
+ off();
48
+ signal?.removeEventListener('abort', cancel);
49
+ };
50
+ if (signal?.aborted)
51
+ cancel();
52
+ });
53
+ try {
54
+ const current = await getSurfaceNotification(runtime, SYSTEM_OWNER, id);
55
+ if (current && current.status !== 'pending')
56
+ return current.status;
57
+ return await announced;
58
+ }
59
+ finally {
60
+ stop();
61
+ }
62
+ }
63
+ export default class HqSurfaceApprovalChannel {
64
+ #runtime;
65
+ constructor(_descriptor, context) {
66
+ this.#runtime = context.runtime;
67
+ }
68
+ createRuntime(correlation, options) {
69
+ const runtime = this.#runtime;
70
+ return {
71
+ async requestApproval(request) {
72
+ const { summary, detail } = describe(request, correlation);
73
+ const row = await writeSurfaceNotification(runtime, SYSTEM_OWNER, {
74
+ channelId: approvalSurfaceChannelId(request.requestId),
75
+ scope: 'agent',
76
+ summary,
77
+ detail,
78
+ artifacts: [{ type: 'note', description: 'Approval request', content: { requestId: request.requestId, toolId: request.toolId, toolCallId: request.toolCallId, correlation } }],
79
+ actions: []
80
+ });
81
+ // Present on the owning machine: system-owned rows never become public cloud links.
82
+ const { presentSurfaceDecision } = await import('@vibesdotdev/os/surface/decision');
83
+ const presentation = new AbortController();
84
+ const signal = options?.signal ? AbortSignal.any([options.signal, presentation.signal]) : presentation.signal;
85
+ try {
86
+ const result = await Promise.race([
87
+ answerOf(runtime, row.id, signal).then((answer) => ({ answer, native: false })),
88
+ presentSurfaceDecision(runtime, row, { signal }).then((answer) => ({ answer, native: true }))
89
+ ]);
90
+ if (result.native)
91
+ await resolveSurfaceNotification(runtime, SYSTEM_OWNER, row.id, result.answer);
92
+ return result.answer === 'approved' ? { approved: true } : { approved: false, reason: 'Declined in hq.' };
93
+ }
94
+ finally {
95
+ presentation.abort();
96
+ }
97
+ }
98
+ };
99
+ }
100
+ }
101
+ //# sourceMappingURL=surface-approval-channel.impl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"surface-approval-channel.impl.js","sourceRoot":"","sources":["../../src/approval/surface-approval-channel.impl.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,40 @@
1
+ declare const _default: {
2
+ readonly id: "hq.app.handoff";
3
+ readonly kind: "cli/command";
4
+ readonly name: "handoff";
5
+ readonly description: "Stage or clear app handoff metadata on a session";
6
+ readonly group: "hq.app";
7
+ readonly options: [{
8
+ readonly flags: "--app <appId>";
9
+ readonly description: "Target app ID for staged handoff";
10
+ }, {
11
+ readonly flags: "--session <sessionId>";
12
+ readonly description: "Session ID (defaults to active session)";
13
+ }, {
14
+ readonly flags: "--surface <surface>";
15
+ readonly description: "Surface: studio, bridge, or chat";
16
+ }, {
17
+ readonly flags: "--pairing-id <pairingId>";
18
+ readonly description: "Pairing ID bound to this handoff";
19
+ }, {
20
+ readonly flags: "--token-id <tokenId>";
21
+ readonly description: "Token ID bound to this handoff";
22
+ }, {
23
+ readonly flags: "--note <text>";
24
+ readonly description: "Operator note for this handoff stage";
25
+ }, {
26
+ readonly flags: "--clear";
27
+ readonly description: "Clear staged handoff metadata from the session";
28
+ }, {
29
+ readonly flags: "--sync";
30
+ readonly description: "Push app auth metadata to cloud after mutation";
31
+ }, {
32
+ readonly flags: "--json";
33
+ readonly description: "Output JSON";
34
+ }];
35
+ readonly surfaces: ["cli"];
36
+ readonly hardware: readonly ["consumer"];
37
+ readonly enabled: true;
38
+ };
39
+ export default _default;
40
+ //# sourceMappingURL=hq.app.handoff.descriptor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hq.app.handoff.descriptor.d.ts","sourceRoot":"","sources":["../../../../src/cli/app/handoff/hq.app.handoff.descriptor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,wBAoBG"}
@@ -0,0 +1,23 @@
1
+ import { createRuntimeAsset } from '@vibesdotdev/kernel';
2
+ export default createRuntimeAsset({
3
+ id: 'hq.app.handoff',
4
+ kind: 'cli/command',
5
+ name: 'handoff',
6
+ description: 'Stage or clear app handoff metadata on a session',
7
+ group: 'hq.app',
8
+ options: [
9
+ { flags: '--app <appId>', description: 'Target app ID for staged handoff' },
10
+ { flags: '--session <sessionId>', description: 'Session ID (defaults to active session)' },
11
+ { flags: '--surface <surface>', description: 'Surface: studio, bridge, or chat' },
12
+ { flags: '--pairing-id <pairingId>', description: 'Pairing ID bound to this handoff' },
13
+ { flags: '--token-id <tokenId>', description: 'Token ID bound to this handoff' },
14
+ { flags: '--note <text>', description: 'Operator note for this handoff stage' },
15
+ { flags: '--clear', description: 'Clear staged handoff metadata from the session' },
16
+ { flags: '--sync', description: 'Push app auth metadata to cloud after mutation' },
17
+ { flags: '--json', description: 'Output JSON' }
18
+ ],
19
+ surfaces: ['cli'],
20
+ hardware: ['consumer'],
21
+ enabled: true
22
+ });
23
+ //# sourceMappingURL=hq.app.handoff.descriptor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hq.app.handoff.descriptor.js","sourceRoot":"","sources":["../../../../src/cli/app/handoff/hq.app.handoff.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD,eAAe,kBAAkB,CAAC;IACjC,EAAE,EAAE,gBAAgB;IACpB,IAAI,EAAE,aAAa;IACnB,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,kDAAkD;IAC/D,KAAK,EAAE,QAAQ;IACf,OAAO,EAAE;QACR,EAAE,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,kCAAkC,EAAE;QAC3E,EAAE,KAAK,EAAE,uBAAuB,EAAE,WAAW,EAAE,yCAAyC,EAAE;QAC1F,EAAE,KAAK,EAAE,qBAAqB,EAAE,WAAW,EAAE,kCAAkC,EAAE;QACjF,EAAE,KAAK,EAAE,0BAA0B,EAAE,WAAW,EAAE,kCAAkC,EAAE;QACtF,EAAE,KAAK,EAAE,sBAAsB,EAAE,WAAW,EAAE,gCAAgC,EAAE;QAChF,EAAE,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,sCAAsC,EAAE;QAC/E,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,gDAAgD,EAAE;QACnF,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,gDAAgD,EAAE;QAClF,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,aAAa,EAAE;KAC/C;IACD,QAAQ,EAAE,CAAC,KAAK,CAAC;IACjB,QAAQ,EAAE,CAAC,UAAU,CAAC;IACtB,OAAO,EAAE,IAAI;CACb,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { CommandOptions } from '@vibesdotdev/cli';
2
+ import type { CommandContext } from '@vibesdotdev/cli';
3
+ declare const _default: import("@vibesdotdev/kernel").RuntimeImplementationWrapper<{
4
+ execute(inputArgs: CommandOptions, inputOptions: CommandOptions, context: CommandContext): Promise<void>;
5
+ }>;
6
+ export default _default;
7
+ //# sourceMappingURL=hq.app.handoff.impl.consumer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hq.app.handoff.impl.consumer.d.ts","sourceRoot":"","sources":["../../../../src/cli/app/handoff/hq.app.handoff.impl.consumer.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;;uBA4B5B,cAAc,gBAAgB,cAAc,WAAW,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;;AAJhH,wBAyFG"}
@@ -0,0 +1,107 @@
1
+ import * as z from 'zod/v4';
2
+ import { JsonObjectSchema } from '@vibesdotdev/kernel/schemas/json';
3
+ import { writeStdoutLine } from '@vibesdotdev/cli/output';
4
+ import { parseCliArguments, parseCliOptions } from "../../schemas/input.js";
5
+ import { createRuntimeImplementation } from '@vibesdotdev/kernel';
6
+ import { getTokenById, listAppPairings } from "../../../app/auth/service.consumer.js";
7
+ import { syncOsAppAuth } from "../../../app/auth/cloud-sync.consumer.js";
8
+ /** Minimal session manager interface needed for handoff operations */
9
+ import { writeJson } from '@vibesdotdev/cli/output';
10
+ async function resolveSession(manager, sessionId) {
11
+ if (sessionId) {
12
+ const explicit = await manager.getSession(sessionId);
13
+ if (!explicit)
14
+ throw new Error(`Session not found: ${sessionId}`);
15
+ return explicit;
16
+ }
17
+ const active = await manager.getActiveSession();
18
+ if (!active)
19
+ throw new Error('No active session. Pass --session <sessionId>.');
20
+ return active;
21
+ }
22
+ export default createRuntimeImplementation({
23
+ id: 'hq.app.handoff',
24
+ kind: 'cli/command',
25
+ implementation: {
26
+ async execute(inputArgs, inputOptions, context) {
27
+ const _args = parseCliArguments(inputArgs);
28
+ const opts = parseCliOptions(inputOptions);
29
+ const options = opts;
30
+ const asJson = options.json;
31
+ const shouldClear = options.clear;
32
+ const shouldSync = options.sync;
33
+ const { runtime } = context;
34
+ const manager = await runtime.context('session/manager');
35
+ if (!manager)
36
+ throw new Error('Session manager context is unavailable.');
37
+ const session = await resolveSession(manager, options.session);
38
+ const currentMetadata = session.metadata ?? {};
39
+ const currentCustom = JsonObjectSchema.parse(currentMetadata.custom ?? {});
40
+ if (shouldClear) {
41
+ delete currentCustom.osAppHandoff;
42
+ await manager.updateSession(session.id, {
43
+ metadata: {
44
+ ...currentMetadata,
45
+ custom: currentCustom
46
+ }
47
+ });
48
+ if (asJson) {
49
+ await writeJson(runtime, { action: 'cleared', sessionId: session.id });
50
+ return;
51
+ }
52
+ await writeStdoutLine(context.runtime, `Cleared osAppHandoff metadata for session ${session.id}`);
53
+ return;
54
+ }
55
+ const appId = options.app;
56
+ if (!appId)
57
+ throw new Error('Missing required option: --app <appId>');
58
+ const tokenId = options.tokenId;
59
+ if (tokenId) {
60
+ const token = await getTokenById(runtime, tokenId);
61
+ if (!token || token.revokedAt)
62
+ throw new Error(`Token is not active: ${tokenId}`);
63
+ }
64
+ const pairingId = options.pairingId;
65
+ if (pairingId) {
66
+ const pairings = await listAppPairings(runtime, appId);
67
+ if (!pairings.find((pairing) => pairing.id === pairingId)) {
68
+ throw new Error(`Pairing not found for app ${appId}: ${pairingId}`);
69
+ }
70
+ }
71
+ const surface = z.enum(['studio', 'bridge', 'chat']).parse(options.surface ?? 'studio');
72
+ const staged = {
73
+ appId,
74
+ surface,
75
+ pairingId: pairingId ?? null,
76
+ tokenId: tokenId ?? null,
77
+ note: options.note ?? null,
78
+ status: 'staged',
79
+ stagedAt: new Date().toISOString(),
80
+ stagedByHost: (runtime.localEnvironment.getHostname?.() ?? (() => { throw new Error('The selected host declares no hostname'); })())
81
+ };
82
+ await manager.updateSession(session.id, {
83
+ metadata: {
84
+ ...currentMetadata,
85
+ custom: {
86
+ ...currentCustom,
87
+ osAppHandoff: staged
88
+ }
89
+ }
90
+ });
91
+ const sync = shouldSync ? await syncOsAppAuth(runtime, 'push') : null;
92
+ if (asJson) {
93
+ await writeJson(runtime, { action: 'staged', sessionId: session.id, handoff: staged, sync });
94
+ return;
95
+ }
96
+ await writeStdoutLine(context.runtime, `Staged ${surface} handoff for session ${session.id} to app ${appId}`);
97
+ if (pairingId)
98
+ await writeStdoutLine(context.runtime, `Pairing: ${pairingId}`);
99
+ if (tokenId)
100
+ await writeStdoutLine(context.runtime, `Token: ${tokenId}`);
101
+ if (sync) {
102
+ await writeStdoutLine(context.runtime, `Synced ${sync.bridgeId}: ${sync.pushed} pushed, ${sync.errors} errors`);
103
+ }
104
+ }
105
+ }
106
+ });
107
+ //# sourceMappingURL=hq.app.handoff.impl.consumer.js.map