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

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 (627) 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 +70 -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.reassign-org.descriptor.d.ts +25 -0
  188. package/dist/cli/friction/hq.friction.reassign-org.descriptor.d.ts.map +1 -0
  189. package/dist/cli/friction/hq.friction.reassign-org.descriptor.js +18 -0
  190. package/dist/cli/friction/hq.friction.reassign-org.descriptor.js.map +1 -0
  191. package/dist/cli/friction/hq.friction.reassign-org.impl.d.ts +6 -0
  192. package/dist/cli/friction/hq.friction.reassign-org.impl.d.ts.map +1 -0
  193. package/dist/cli/friction/hq.friction.reassign-org.impl.js +27 -0
  194. package/dist/cli/friction/hq.friction.reassign-org.impl.js.map +1 -0
  195. package/dist/cli/friction/hq.friction.reject.descriptor.d.ts +24 -0
  196. package/dist/cli/friction/hq.friction.reject.descriptor.d.ts.map +1 -0
  197. package/dist/cli/friction/hq.friction.reject.descriptor.js +17 -0
  198. package/dist/cli/friction/hq.friction.reject.descriptor.js.map +1 -0
  199. package/dist/cli/friction/hq.friction.reject.impl.d.ts +6 -0
  200. package/dist/cli/friction/hq.friction.reject.impl.d.ts.map +1 -0
  201. package/dist/cli/friction/hq.friction.reject.impl.js +7 -0
  202. package/dist/cli/friction/hq.friction.reject.impl.js.map +1 -0
  203. package/dist/cli/friction/hq.friction.resolve.descriptor.d.ts +27 -0
  204. package/dist/cli/friction/hq.friction.resolve.descriptor.d.ts.map +1 -0
  205. package/dist/cli/friction/hq.friction.resolve.descriptor.js +18 -0
  206. package/dist/cli/friction/hq.friction.resolve.descriptor.js.map +1 -0
  207. package/dist/cli/friction/hq.friction.resolve.impl.d.ts +6 -0
  208. package/dist/cli/friction/hq.friction.resolve.impl.d.ts.map +1 -0
  209. package/dist/cli/friction/hq.friction.resolve.impl.js +7 -0
  210. package/dist/cli/friction/hq.friction.resolve.impl.js.map +1 -0
  211. package/dist/cli/friction/hq.friction.show.descriptor.d.ts +24 -0
  212. package/dist/cli/friction/hq.friction.show.descriptor.d.ts.map +1 -0
  213. package/dist/cli/friction/hq.friction.show.descriptor.js +17 -0
  214. package/dist/cli/friction/hq.friction.show.descriptor.js.map +1 -0
  215. package/dist/cli/friction/hq.friction.show.impl.d.ts +7 -0
  216. package/dist/cli/friction/hq.friction.show.impl.d.ts.map +1 -0
  217. package/dist/cli/friction/hq.friction.show.impl.js +64 -0
  218. package/dist/cli/friction/hq.friction.show.impl.js.map +1 -0
  219. package/dist/cli/friction/hq.friction.sync.descriptor.d.ts +16 -0
  220. package/dist/cli/friction/hq.friction.sync.descriptor.d.ts.map +1 -0
  221. package/dist/cli/friction/hq.friction.sync.descriptor.js +13 -0
  222. package/dist/cli/friction/hq.friction.sync.descriptor.js.map +1 -0
  223. package/dist/cli/friction/hq.friction.sync.impl.d.ts +7 -0
  224. package/dist/cli/friction/hq.friction.sync.impl.d.ts.map +1 -0
  225. package/dist/cli/friction/hq.friction.sync.impl.js +29 -0
  226. package/dist/cli/friction/hq.friction.sync.impl.js.map +1 -0
  227. package/dist/cli/friction/hq.friction.triage.descriptor.d.ts +27 -0
  228. package/dist/cli/friction/hq.friction.triage.descriptor.d.ts.map +1 -0
  229. package/dist/cli/friction/hq.friction.triage.descriptor.js +18 -0
  230. package/dist/cli/friction/hq.friction.triage.descriptor.js.map +1 -0
  231. package/dist/cli/friction/hq.friction.triage.impl.d.ts +6 -0
  232. package/dist/cli/friction/hq.friction.triage.impl.d.ts.map +1 -0
  233. package/dist/cli/friction/hq.friction.triage.impl.js +7 -0
  234. package/dist/cli/friction/hq.friction.triage.impl.js.map +1 -0
  235. package/dist/cli/friction/invocation.d.ts +17 -0
  236. package/dist/cli/friction/invocation.d.ts.map +1 -0
  237. package/dist/cli/friction/invocation.js +76 -0
  238. package/dist/cli/friction/invocation.js.map +1 -0
  239. package/dist/cli/health/hq.health.descriptor.d.ts +19 -0
  240. package/dist/cli/health/hq.health.descriptor.d.ts.map +1 -0
  241. package/dist/cli/health/hq.health.descriptor.js +16 -0
  242. package/dist/cli/health/hq.health.descriptor.js.map +1 -0
  243. package/dist/cli/health/hq.health.impl.d.ts +3 -0
  244. package/dist/cli/health/hq.health.impl.d.ts.map +1 -0
  245. package/dist/cli/health/hq.health.impl.js +151 -0
  246. package/dist/cli/health/hq.health.impl.js.map +1 -0
  247. package/dist/cli/host-platform.d.ts +14 -0
  248. package/dist/cli/host-platform.d.ts.map +1 -0
  249. package/dist/cli/host-platform.js +30 -0
  250. package/dist/cli/host-platform.js.map +1 -0
  251. package/dist/cli/hq.cli-group.descriptor.d.ts +11 -0
  252. package/dist/cli/hq.cli-group.descriptor.d.ts.map +1 -0
  253. package/dist/cli/hq.cli-group.descriptor.js +11 -0
  254. package/dist/cli/hq.cli-group.descriptor.js.map +1 -0
  255. package/dist/cli/init/hq.init.descriptor.d.ts +7 -0
  256. package/dist/cli/init/hq.init.descriptor.d.ts.map +1 -0
  257. package/dist/cli/init/hq.init.descriptor.js +36 -0
  258. package/dist/cli/init/hq.init.descriptor.js.map +1 -0
  259. package/dist/cli/init/hq.init.impl.d.ts +7 -0
  260. package/dist/cli/init/hq.init.impl.d.ts.map +1 -0
  261. package/dist/cli/init/hq.init.impl.js +163 -0
  262. package/dist/cli/init/hq.init.impl.js.map +1 -0
  263. package/dist/cli/install/hq.install.descriptor.d.ts +9 -0
  264. package/dist/cli/install/hq.install.descriptor.d.ts.map +1 -0
  265. package/dist/cli/install/hq.install.descriptor.js +34 -0
  266. package/dist/cli/install/hq.install.descriptor.js.map +1 -0
  267. package/dist/cli/install/hq.install.impl.d.ts +6 -0
  268. package/dist/cli/install/hq.install.impl.d.ts.map +1 -0
  269. package/dist/cli/install/hq.install.impl.js +110 -0
  270. package/dist/cli/install/hq.install.impl.js.map +1 -0
  271. package/dist/cli/permissions/hq.permissions.descriptor.d.ts +9 -0
  272. package/dist/cli/permissions/hq.permissions.descriptor.d.ts.map +1 -0
  273. package/dist/cli/permissions/hq.permissions.descriptor.js +25 -0
  274. package/dist/cli/permissions/hq.permissions.descriptor.js.map +1 -0
  275. package/dist/cli/permissions/hq.permissions.impl.d.ts +3 -0
  276. package/dist/cli/permissions/hq.permissions.impl.d.ts.map +1 -0
  277. package/dist/cli/permissions/hq.permissions.impl.js +113 -0
  278. package/dist/cli/permissions/hq.permissions.impl.js.map +1 -0
  279. package/dist/cli/plugin.d.ts +3 -0
  280. package/dist/cli/plugin.d.ts.map +1 -0
  281. package/dist/cli/plugin.js +79 -0
  282. package/dist/cli/plugin.js.map +1 -0
  283. package/dist/cli/schemas/input.d.ts +119 -0
  284. package/dist/cli/schemas/input.d.ts.map +1 -0
  285. package/dist/cli/schemas/input.js +67 -0
  286. package/dist/cli/schemas/input.js.map +1 -0
  287. package/dist/cli/service/hq.service.cli-group.descriptor.d.ts +12 -0
  288. package/dist/cli/service/hq.service.cli-group.descriptor.d.ts.map +1 -0
  289. package/dist/cli/service/hq.service.cli-group.descriptor.js +12 -0
  290. package/dist/cli/service/hq.service.cli-group.descriptor.js.map +1 -0
  291. package/dist/cli/service/hq.service.list.descriptor.d.ts +16 -0
  292. package/dist/cli/service/hq.service.list.descriptor.d.ts.map +1 -0
  293. package/dist/cli/service/hq.service.list.descriptor.js +13 -0
  294. package/dist/cli/service/hq.service.list.descriptor.js.map +1 -0
  295. package/dist/cli/service/hq.service.list.impl.d.ts +7 -0
  296. package/dist/cli/service/hq.service.list.impl.d.ts.map +1 -0
  297. package/dist/cli/service/hq.service.list.impl.js +31 -0
  298. package/dist/cli/service/hq.service.list.impl.js.map +1 -0
  299. package/dist/cli/service/hq.service.manage.descriptor.d.ts +25 -0
  300. package/dist/cli/service/hq.service.manage.descriptor.d.ts.map +1 -0
  301. package/dist/cli/service/hq.service.manage.descriptor.js +23 -0
  302. package/dist/cli/service/hq.service.manage.descriptor.js.map +1 -0
  303. package/dist/cli/service/hq.service.manage.impl.d.ts +7 -0
  304. package/dist/cli/service/hq.service.manage.impl.d.ts.map +1 -0
  305. package/dist/cli/service/hq.service.manage.impl.js +64 -0
  306. package/dist/cli/service/hq.service.manage.impl.js.map +1 -0
  307. package/dist/cli/service/hq.service.register.descriptor.d.ts +21 -0
  308. package/dist/cli/service/hq.service.register.descriptor.d.ts.map +1 -0
  309. package/dist/cli/service/hq.service.register.descriptor.js +20 -0
  310. package/dist/cli/service/hq.service.register.descriptor.js.map +1 -0
  311. package/dist/cli/service/hq.service.register.impl.d.ts +7 -0
  312. package/dist/cli/service/hq.service.register.impl.d.ts.map +1 -0
  313. package/dist/cli/service/hq.service.register.impl.js +35 -0
  314. package/dist/cli/service/hq.service.register.impl.js.map +1 -0
  315. package/dist/cli/setup/hq.setup.descriptor.d.ts +9 -0
  316. package/dist/cli/setup/hq.setup.descriptor.d.ts.map +1 -0
  317. package/dist/cli/setup/hq.setup.descriptor.js +22 -0
  318. package/dist/cli/setup/hq.setup.descriptor.js.map +1 -0
  319. package/dist/cli/setup/hq.setup.impl.d.ts +7 -0
  320. package/dist/cli/setup/hq.setup.impl.d.ts.map +1 -0
  321. package/dist/cli/setup/hq.setup.impl.js +57 -0
  322. package/dist/cli/setup/hq.setup.impl.js.map +1 -0
  323. package/dist/cli/setup/index.d.ts +2 -0
  324. package/dist/cli/setup/index.d.ts.map +1 -0
  325. package/dist/cli/setup/index.js +2 -0
  326. package/dist/cli/setup/index.js.map +1 -0
  327. package/dist/cli/surface/hq.surface.cli-group.descriptor.d.ts +12 -0
  328. package/dist/cli/surface/hq.surface.cli-group.descriptor.d.ts.map +1 -0
  329. package/dist/cli/surface/hq.surface.cli-group.descriptor.js +12 -0
  330. package/dist/cli/surface/hq.surface.cli-group.descriptor.js.map +1 -0
  331. package/dist/cli/surface/hq.surface.list.descriptor.d.ts +20 -0
  332. package/dist/cli/surface/hq.surface.list.descriptor.d.ts.map +1 -0
  333. package/dist/cli/surface/hq.surface.list.descriptor.js +20 -0
  334. package/dist/cli/surface/hq.surface.list.descriptor.js.map +1 -0
  335. package/dist/cli/surface/hq.surface.list.impl.d.ts +7 -0
  336. package/dist/cli/surface/hq.surface.list.impl.d.ts.map +1 -0
  337. package/dist/cli/surface/hq.surface.list.impl.js +35 -0
  338. package/dist/cli/surface/hq.surface.list.impl.js.map +1 -0
  339. package/dist/cli/surface/hq.surface.resolve.descriptor.d.ts +22 -0
  340. package/dist/cli/surface/hq.surface.resolve.descriptor.d.ts.map +1 -0
  341. package/dist/cli/surface/hq.surface.resolve.descriptor.js +20 -0
  342. package/dist/cli/surface/hq.surface.resolve.descriptor.js.map +1 -0
  343. package/dist/cli/surface/hq.surface.resolve.impl.d.ts +7 -0
  344. package/dist/cli/surface/hq.surface.resolve.impl.d.ts.map +1 -0
  345. package/dist/cli/surface/hq.surface.resolve.impl.js +29 -0
  346. package/dist/cli/surface/hq.surface.resolve.impl.js.map +1 -0
  347. package/dist/client/friction/index.d.ts +58 -0
  348. package/dist/client/friction/index.d.ts.map +1 -0
  349. package/dist/client/friction/index.js +146 -0
  350. package/dist/client/friction/index.js.map +1 -0
  351. package/dist/client/friction.client.descriptor.d.ts +14 -0
  352. package/dist/client/friction.client.descriptor.d.ts.map +1 -0
  353. package/dist/client/friction.client.descriptor.js +14 -0
  354. package/dist/client/friction.client.descriptor.js.map +1 -0
  355. package/dist/client/hq.client.descriptor.d.ts +14 -0
  356. package/dist/client/hq.client.descriptor.d.ts.map +1 -0
  357. package/dist/client/hq.client.descriptor.js +14 -0
  358. package/dist/client/hq.client.descriptor.js.map +1 -0
  359. package/dist/client/index.d.ts +95 -0
  360. package/dist/client/index.d.ts.map +1 -0
  361. package/dist/client/index.js +144 -0
  362. package/dist/client/index.js.map +1 -0
  363. package/dist/config/hq-friction.config.descriptor.d.ts +227 -0
  364. package/dist/config/hq-friction.config.descriptor.d.ts.map +1 -0
  365. package/dist/config/hq-friction.config.descriptor.js +116 -0
  366. package/dist/config/hq-friction.config.descriptor.js.map +1 -0
  367. package/dist/dashboard.d.ts +133 -0
  368. package/dist/dashboard.d.ts.map +1 -0
  369. package/dist/dashboard.js +371 -0
  370. package/dist/dashboard.js.map +1 -0
  371. package/dist/docs/hq.machines.docs.descriptor.d.ts +22 -0
  372. package/dist/docs/hq.machines.docs.descriptor.d.ts.map +1 -0
  373. package/dist/docs/hq.machines.docs.descriptor.js +65 -0
  374. package/dist/docs/hq.machines.docs.descriptor.js.map +1 -0
  375. package/dist/docs/hq.sessions.docs.descriptor.d.ts +22 -0
  376. package/dist/docs/hq.sessions.docs.descriptor.d.ts.map +1 -0
  377. package/dist/docs/hq.sessions.docs.descriptor.js +74 -0
  378. package/dist/docs/hq.sessions.docs.descriptor.js.map +1 -0
  379. package/dist/docs/hq.surfaces.docs.descriptor.d.ts +38 -0
  380. package/dist/docs/hq.surfaces.docs.descriptor.d.ts.map +1 -0
  381. package/dist/docs/hq.surfaces.docs.descriptor.js +161 -0
  382. package/dist/docs/hq.surfaces.docs.descriptor.js.map +1 -0
  383. package/dist/docs/hq.terminal.docs.descriptor.d.ts +22 -0
  384. package/dist/docs/hq.terminal.docs.descriptor.d.ts.map +1 -0
  385. package/dist/docs/hq.terminal.docs.descriptor.js +86 -0
  386. package/dist/docs/hq.terminal.docs.descriptor.js.map +1 -0
  387. package/dist/friction/clusters.d.ts +23 -0
  388. package/dist/friction/clusters.d.ts.map +1 -0
  389. package/dist/friction/clusters.js +56 -0
  390. package/dist/friction/clusters.js.map +1 -0
  391. package/dist/friction/fingerprint.d.ts +56 -0
  392. package/dist/friction/fingerprint.d.ts.map +1 -0
  393. package/dist/friction/fingerprint.js +113 -0
  394. package/dist/friction/fingerprint.js.map +1 -0
  395. package/dist/friction/friction-dispositions.record.descriptor.d.ts +4 -0
  396. package/dist/friction/friction-dispositions.record.descriptor.d.ts.map +1 -0
  397. package/dist/friction/friction-dispositions.record.descriptor.js +36 -0
  398. package/dist/friction/friction-dispositions.record.descriptor.js.map +1 -0
  399. package/dist/friction/friction-signals.record.descriptor.d.ts +12 -0
  400. package/dist/friction/friction-signals.record.descriptor.d.ts.map +1 -0
  401. package/dist/friction/friction-signals.record.descriptor.js +52 -0
  402. package/dist/friction/friction-signals.record.descriptor.js.map +1 -0
  403. package/dist/friction/intake.d.ts +79 -0
  404. package/dist/friction/intake.d.ts.map +1 -0
  405. package/dist/friction/intake.js +459 -0
  406. package/dist/friction/intake.js.map +1 -0
  407. package/dist/friction/jobs/friction-clusters.job.descriptor.d.ts +71 -0
  408. package/dist/friction/jobs/friction-clusters.job.descriptor.d.ts.map +1 -0
  409. package/dist/friction/jobs/friction-clusters.job.descriptor.js +34 -0
  410. package/dist/friction/jobs/friction-clusters.job.descriptor.js.map +1 -0
  411. package/dist/friction/jobs/friction-clusters.job.impl.d.ts +22 -0
  412. package/dist/friction/jobs/friction-clusters.job.impl.d.ts.map +1 -0
  413. package/dist/friction/jobs/friction-clusters.job.impl.js +33 -0
  414. package/dist/friction/jobs/friction-clusters.job.impl.js.map +1 -0
  415. package/dist/friction/promote-input.d.ts +37 -0
  416. package/dist/friction/promote-input.d.ts.map +1 -0
  417. package/dist/friction/promote-input.js +58 -0
  418. package/dist/friction/promote-input.js.map +1 -0
  419. package/dist/friction/promotion-visibility.d.ts +34 -0
  420. package/dist/friction/promotion-visibility.d.ts.map +1 -0
  421. package/dist/friction/promotion-visibility.js +57 -0
  422. package/dist/friction/promotion-visibility.js.map +1 -0
  423. package/dist/friction/read.d.ts +21 -0
  424. package/dist/friction/read.d.ts.map +1 -0
  425. package/dist/friction/read.js +23 -0
  426. package/dist/friction/read.js.map +1 -0
  427. package/dist/friction/reassign-org.d.ts +21 -0
  428. package/dist/friction/reassign-org.d.ts.map +1 -0
  429. package/dist/friction/reassign-org.js +121 -0
  430. package/dist/friction/reassign-org.js.map +1 -0
  431. package/dist/friction/schemas/disposition.d.ts +42 -0
  432. package/dist/friction/schemas/disposition.d.ts.map +1 -0
  433. package/dist/friction/schemas/disposition.js +22 -0
  434. package/dist/friction/schemas/disposition.js.map +1 -0
  435. package/dist/friction/schemas/intake.d.ts +167 -0
  436. package/dist/friction/schemas/intake.d.ts.map +1 -0
  437. package/dist/friction/schemas/intake.js +69 -0
  438. package/dist/friction/schemas/intake.js.map +1 -0
  439. package/dist/friction/schemas/report.d.ts +138 -0
  440. package/dist/friction/schemas/report.d.ts.map +1 -0
  441. package/dist/friction/schemas/report.js +63 -0
  442. package/dist/friction/schemas/report.js.map +1 -0
  443. package/dist/friction/schemas/signal.d.ts +170 -0
  444. package/dist/friction/schemas/signal.d.ts.map +1 -0
  445. package/dist/friction/schemas/signal.js +77 -0
  446. package/dist/friction/schemas/signal.js.map +1 -0
  447. package/dist/friction/signal-recorded.event.descriptor.d.ts +53 -0
  448. package/dist/friction/signal-recorded.event.descriptor.d.ts.map +1 -0
  449. package/dist/friction/signal-recorded.event.descriptor.js +38 -0
  450. package/dist/friction/signal-recorded.event.descriptor.js.map +1 -0
  451. package/dist/friction/store.d.ts +109 -0
  452. package/dist/friction/store.d.ts.map +1 -0
  453. package/dist/friction/store.js +466 -0
  454. package/dist/friction/store.js.map +1 -0
  455. package/dist/host-guidance/descriptors/accessibility.host-permission-guidance.descriptor.d.ts +8 -0
  456. package/dist/host-guidance/descriptors/accessibility.host-permission-guidance.descriptor.d.ts.map +1 -0
  457. package/dist/host-guidance/descriptors/accessibility.host-permission-guidance.descriptor.js +18 -0
  458. package/dist/host-guidance/descriptors/accessibility.host-permission-guidance.descriptor.js.map +1 -0
  459. package/dist/host-guidance/descriptors/disk.host-permission-guidance.descriptor.d.ts +8 -0
  460. package/dist/host-guidance/descriptors/disk.host-permission-guidance.descriptor.d.ts.map +1 -0
  461. package/dist/host-guidance/descriptors/disk.host-permission-guidance.descriptor.js +18 -0
  462. package/dist/host-guidance/descriptors/disk.host-permission-guidance.descriptor.js.map +1 -0
  463. package/dist/host-guidance/descriptors/homebrew.host-health-check.descriptor.d.ts +8 -0
  464. package/dist/host-guidance/descriptors/homebrew.host-health-check.descriptor.d.ts.map +1 -0
  465. package/dist/host-guidance/descriptors/homebrew.host-health-check.descriptor.js +14 -0
  466. package/dist/host-guidance/descriptors/homebrew.host-health-check.descriptor.js.map +1 -0
  467. package/dist/host-guidance/descriptors/microphone.host-permission-guidance.descriptor.d.ts +8 -0
  468. package/dist/host-guidance/descriptors/microphone.host-permission-guidance.descriptor.d.ts.map +1 -0
  469. package/dist/host-guidance/descriptors/microphone.host-permission-guidance.descriptor.js +18 -0
  470. package/dist/host-guidance/descriptors/microphone.host-permission-guidance.descriptor.js.map +1 -0
  471. package/dist/host-guidance/kinds/host-health-check.kind.d.ts +17 -0
  472. package/dist/host-guidance/kinds/host-health-check.kind.d.ts.map +1 -0
  473. package/dist/host-guidance/kinds/host-health-check.kind.js +22 -0
  474. package/dist/host-guidance/kinds/host-health-check.kind.js.map +1 -0
  475. package/dist/host-guidance/kinds/host-permission-guidance.kind.d.ts +17 -0
  476. package/dist/host-guidance/kinds/host-permission-guidance.kind.d.ts.map +1 -0
  477. package/dist/host-guidance/kinds/host-permission-guidance.kind.js +22 -0
  478. package/dist/host-guidance/kinds/host-permission-guidance.kind.js.map +1 -0
  479. package/dist/host-guidance/registry.d.ts +16 -0
  480. package/dist/host-guidance/registry.d.ts.map +1 -0
  481. package/dist/host-guidance/registry.js +24 -0
  482. package/dist/host-guidance/registry.js.map +1 -0
  483. package/dist/hq.cloud.plugin.d.ts +3 -0
  484. package/dist/hq.cloud.plugin.d.ts.map +1 -0
  485. package/dist/hq.cloud.plugin.js +40 -0
  486. package/dist/hq.cloud.plugin.js.map +1 -0
  487. package/dist/hq.consumer.plugin.d.ts +3 -0
  488. package/dist/hq.consumer.plugin.d.ts.map +1 -0
  489. package/dist/hq.consumer.plugin.js +15 -0
  490. package/dist/hq.consumer.plugin.js.map +1 -0
  491. package/dist/hq.plugin.d.ts +9 -0
  492. package/dist/hq.plugin.d.ts.map +1 -0
  493. package/dist/hq.plugin.js +99 -0
  494. package/dist/hq.plugin.js.map +1 -0
  495. package/dist/installers/builtin/ai-runtimes/installer.d.ts +21 -0
  496. package/dist/installers/builtin/ai-runtimes/installer.d.ts.map +1 -0
  497. package/dist/installers/builtin/ai-runtimes/installer.js +244 -0
  498. package/dist/installers/builtin/ai-runtimes/installer.js.map +1 -0
  499. package/dist/installers/builtin/index.d.ts +9 -0
  500. package/dist/installers/builtin/index.d.ts.map +1 -0
  501. package/dist/installers/builtin/index.js +15 -0
  502. package/dist/installers/builtin/index.js.map +1 -0
  503. package/dist/installers/builtin/language-servers/installer.d.ts +18 -0
  504. package/dist/installers/builtin/language-servers/installer.d.ts.map +1 -0
  505. package/dist/installers/builtin/language-servers/installer.js +139 -0
  506. package/dist/installers/builtin/language-servers/installer.js.map +1 -0
  507. package/dist/installers/builtin/system-deps/installer.d.ts +8 -0
  508. package/dist/installers/builtin/system-deps/installer.d.ts.map +1 -0
  509. package/dist/installers/builtin/system-deps/installer.js +78 -0
  510. package/dist/installers/builtin/system-deps/installer.js.map +1 -0
  511. package/dist/installers/compatibility.consumer.plugin.d.ts +3 -0
  512. package/dist/installers/compatibility.consumer.plugin.d.ts.map +1 -0
  513. package/dist/installers/compatibility.consumer.plugin.js +26 -0
  514. package/dist/installers/compatibility.consumer.plugin.js.map +1 -0
  515. package/dist/installers/core/index.d.ts +3 -0
  516. package/dist/installers/core/index.d.ts.map +1 -0
  517. package/dist/installers/core/index.js +3 -0
  518. package/dist/installers/core/index.js.map +1 -0
  519. package/dist/installers/core/installer-result.d.ts +10 -0
  520. package/dist/installers/core/installer-result.d.ts.map +1 -0
  521. package/dist/installers/core/installer-result.js +14 -0
  522. package/dist/installers/core/installer-result.js.map +1 -0
  523. package/dist/installers/core/installer-runtime.d.ts +18 -0
  524. package/dist/installers/core/installer-runtime.d.ts.map +1 -0
  525. package/dist/installers/core/installer-runtime.js +5 -0
  526. package/dist/installers/core/installer-runtime.js.map +1 -0
  527. package/dist/installers/core/platform.d.ts +6 -0
  528. package/dist/installers/core/platform.d.ts.map +1 -0
  529. package/dist/installers/core/platform.js +19 -0
  530. package/dist/installers/core/platform.js.map +1 -0
  531. package/dist/installers/core/workspace.d.ts +4 -0
  532. package/dist/installers/core/workspace.d.ts.map +1 -0
  533. package/dist/installers/core/workspace.js +11 -0
  534. package/dist/installers/core/workspace.js.map +1 -0
  535. package/dist/installers/index.d.ts +6 -0
  536. package/dist/installers/index.d.ts.map +1 -0
  537. package/dist/installers/index.js +6 -0
  538. package/dist/installers/index.js.map +1 -0
  539. package/dist/installers/schemas/index.d.ts +2 -0
  540. package/dist/installers/schemas/index.d.ts.map +1 -0
  541. package/dist/installers/schemas/index.js +2 -0
  542. package/dist/installers/schemas/index.js.map +1 -0
  543. package/dist/installers/schemas/platform.d.ts +10 -0
  544. package/dist/installers/schemas/platform.d.ts.map +1 -0
  545. package/dist/installers/schemas/platform.js +9 -0
  546. package/dist/installers/schemas/platform.js.map +1 -0
  547. package/dist/installers/schemas/types.d.ts +4 -0
  548. package/dist/installers/schemas/types.d.ts.map +1 -0
  549. package/dist/installers/schemas/types.js +4 -0
  550. package/dist/installers/schemas/types.js.map +1 -0
  551. package/dist/os-wall/channels.wall.d.ts +9 -0
  552. package/dist/os-wall/channels.wall.d.ts.map +1 -0
  553. package/dist/os-wall/channels.wall.js +9 -0
  554. package/dist/os-wall/channels.wall.js.map +1 -0
  555. package/dist/os-wall/surface-store.wall.d.ts +3 -0
  556. package/dist/os-wall/surface-store.wall.d.ts.map +1 -0
  557. package/dist/os-wall/surface-store.wall.js +3 -0
  558. package/dist/os-wall/surface-store.wall.js.map +1 -0
  559. package/dist/runtime-path.d.ts +7 -0
  560. package/dist/runtime-path.d.ts.map +1 -0
  561. package/dist/runtime-path.js +7 -0
  562. package/dist/runtime-path.js.map +1 -0
  563. package/dist/schemas/host-guidance.d.ts +48 -0
  564. package/dist/schemas/host-guidance.d.ts.map +1 -0
  565. package/dist/schemas/host-guidance.js +48 -0
  566. package/dist/schemas/host-guidance.js.map +1 -0
  567. package/dist/services/backends/index.d.ts +24 -0
  568. package/dist/services/backends/index.d.ts.map +1 -0
  569. package/dist/services/backends/index.js +17 -0
  570. package/dist/services/backends/index.js.map +1 -0
  571. package/dist/services/builtin/index.d.ts +78 -0
  572. package/dist/services/builtin/index.d.ts.map +1 -0
  573. package/dist/services/builtin/index.js +44 -0
  574. package/dist/services/builtin/index.js.map +1 -0
  575. package/dist/services/descriptors/vibes-bridge.os-service.descriptor.d.ts +8 -0
  576. package/dist/services/descriptors/vibes-bridge.os-service.descriptor.d.ts.map +1 -0
  577. package/dist/services/descriptors/vibes-bridge.os-service.descriptor.js +21 -0
  578. package/dist/services/descriptors/vibes-bridge.os-service.descriptor.js.map +1 -0
  579. package/dist/services/descriptors/vibes-mcp.os-service.descriptor.d.ts +8 -0
  580. package/dist/services/descriptors/vibes-mcp.os-service.descriptor.d.ts.map +1 -0
  581. package/dist/services/descriptors/vibes-mcp.os-service.descriptor.js +20 -0
  582. package/dist/services/descriptors/vibes-mcp.os-service.descriptor.js.map +1 -0
  583. package/dist/services/descriptors/vibes-pm.os-service.descriptor.d.ts +8 -0
  584. package/dist/services/descriptors/vibes-pm.os-service.descriptor.d.ts.map +1 -0
  585. package/dist/services/descriptors/vibes-pm.os-service.descriptor.js +20 -0
  586. package/dist/services/descriptors/vibes-pm.os-service.descriptor.js.map +1 -0
  587. package/dist/services/index.d.ts +14 -0
  588. package/dist/services/index.d.ts.map +1 -0
  589. package/dist/services/index.js +12 -0
  590. package/dist/services/index.js.map +1 -0
  591. package/dist/services/kinds/os-service.kind.d.ts +19 -0
  592. package/dist/services/kinds/os-service.kind.d.ts.map +1 -0
  593. package/dist/services/kinds/os-service.kind.js +24 -0
  594. package/dist/services/kinds/os-service.kind.js.map +1 -0
  595. package/dist/services/registry.d.ts +45 -0
  596. package/dist/services/registry.d.ts.map +1 -0
  597. package/dist/services/registry.js +141 -0
  598. package/dist/services/registry.js.map +1 -0
  599. package/dist/services/schemas/service.d.ts +79 -0
  600. package/dist/services/schemas/service.d.ts.map +1 -0
  601. package/dist/services/schemas/service.js +82 -0
  602. package/dist/services/schemas/service.js.map +1 -0
  603. package/dist/svelte/report/ReportProblemDialog.svelte +205 -0
  604. package/dist/svelte/report/ReportProblemDialog.svelte.d.ts +5 -0
  605. package/dist/svelte/report/ReportProblemDialog.svelte.d.ts.map +1 -0
  606. package/dist/svelte/report/capture-context.d.ts +61 -0
  607. package/dist/svelte/report/capture-context.d.ts.map +1 -0
  608. package/dist/svelte/report/capture-context.js +100 -0
  609. package/dist/svelte/report/report.plugin.d.ts +68 -0
  610. package/dist/svelte/report/report.plugin.d.ts.map +1 -0
  611. package/dist/svelte/report/report.plugin.js +109 -0
  612. package/dist/svelte/report/severity.d.ts +32 -0
  613. package/dist/svelte/report/severity.d.ts.map +1 -0
  614. package/dist/svelte/report/severity.js +13 -0
  615. package/dist/tools/applet/applet.schemas.d.ts +6 -0
  616. package/dist/tools/applet/applet.schemas.d.ts.map +1 -0
  617. package/dist/tools/applet/applet.schemas.js +6 -0
  618. package/dist/tools/applet/applet.schemas.js.map +1 -0
  619. package/dist/utils/exec.d.ts +22 -0
  620. package/dist/utils/exec.d.ts.map +1 -0
  621. package/dist/utils/exec.js +38 -0
  622. package/dist/utils/exec.js.map +1 -0
  623. package/dist/utils/fs.d.ts +10 -0
  624. package/dist/utils/fs.d.ts.map +1 -0
  625. package/dist/utils/fs.js +25 -0
  626. package/dist/utils/fs.js.map +1 -0
  627. package/package.json +268 -4
@@ -0,0 +1,52 @@
1
+ import { FrictionSignalSchema } from "./schemas/signal.js";
2
+ export const osFrictionSignalsRecordDescriptor = {
3
+ kind: 'storage/record',
4
+ id: 'os.friction-signals',
5
+ name: 'OS Friction Signals',
6
+ description: 'Friction signals (agent- or user-sourced) feeding the distillation + autopilot loop',
7
+ schema: FrictionSignalSchema,
8
+ tableName: 'os_friction_signals',
9
+ primaryKey: 'id',
10
+ relations: {},
11
+ indexes: [
12
+ { fields: ['signatureHash'], unique: false },
13
+ { fields: ['orgId', 'fingerprintVersion', 'fingerprint'], unique: true },
14
+ { fields: ['surface'], unique: false },
15
+ { fields: ['severity'], unique: false },
16
+ { fields: ['audience'], unique: false },
17
+ { fields: ['source'], unique: false },
18
+ { fields: ['orgId'], unique: false }
19
+ ],
20
+ version: 2,
21
+ timestamps: false,
22
+ autoId: false,
23
+ allowedAdapters: ['storage.localdb', 'storage.cloud-api'],
24
+ defaultAdapter: 'storage.localdb',
25
+ persistence: {
26
+ mode: 'local-first',
27
+ localAdapters: ['storage.localdb'],
28
+ remoteAdapters: ['storage.cloud-api']
29
+ },
30
+ adapterConfig: {
31
+ 'storage.localdb': { dbName: 'os.db', scope: 'global' },
32
+ 'storage.cloud-api': {
33
+ ownerApp: 'hq',
34
+ endpoint: '/api/hq/friction-signals',
35
+ apiPath: '/api/hq/friction-signals',
36
+ entityPath: '/api/hq/friction-signals/:id',
37
+ idField: 'id'
38
+ }
39
+ },
40
+ scope: 'global',
41
+ validateOnWrite: false,
42
+ validateOnRead: false,
43
+ versioning: false,
44
+ audit: false,
45
+ changeTracking: false,
46
+ internal: false,
47
+ softDelete: false,
48
+ namespace: 'os.friction-signals',
49
+ tags: ['os', 'friction', 'signals']
50
+ };
51
+ export default osFrictionSignalsRecordDescriptor;
52
+ //# sourceMappingURL=friction-signals.record.descriptor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"friction-signals.record.descriptor.js","sourceRoot":"","sources":["../../src/friction/friction-signals.record.descriptor.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAE3D,MAAM,CAAC,MAAM,iCA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0BAA0B;YACnC,UAAU,EAAE,8BAA8B;YAC1C,OAAO,EAAE,IAAI;SACb;KACD;IACD,KAAK,EAAE,QAAQ;IACf,eAAe,EAAE,KAAK;IACtB,cAAc,EAAE,KAAK;IACrB,UAAU,EAAE,KAAK;IACjB,KAAK,EAAE,KAAK;IACZ,cAAc,EAAE,KAAK;IACrB,QAAQ,EAAE,KAAK;IACf,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE,qBAAqB;IAChC,IAAI,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,SAAS,CAAC;CACnC,CAAC;AAEF,eAAe,iCAAiC,CAAC"}
@@ -0,0 +1,79 @@
1
+ /**
2
+ * The package-owned friction intake (moved from hq-web, PROPOSAL
3
+ * bug-report-flow P0-3), so every HQ deployment, ours and users', runs the
4
+ * same admission.
5
+ *
6
+ * - {@link recordFrictionReport}: the browser "Report a problem" body behind
7
+ * `POST /api/hq/reports`. Tenancy comes from the verified `Origin` through
8
+ * Auth's app registry, never from the body.
9
+ * - {@link recordFrictionIntake}: the authenticated internal intake behind
10
+ * `POST /api/internal/friction` (a verified user, or a service the route
11
+ * already authenticated).
12
+ *
13
+ * Both rate limit through `cache/rate-limiter` where the caller is a browser,
14
+ * redact through `security/redactor` before the write, compute
15
+ * `personalDataLevel` from what was kept and what the redactor found, and
16
+ * fingerprint by the typed report context (fixes defects 1 and 2). A report
17
+ * whose stack points into `@vibesdotdev/*` also files a redacted upstream copy
18
+ * for the Vibes org (`hq.friction.upstream`, default on).
19
+ *
20
+ * Framework-free: a route hands typed request facts and maps the thrown
21
+ * `CapabilityError` to its HTTP status.
22
+ */
23
+ import { type RuntimeRef } from '@vibesdotdev/kernel';
24
+ import { type FrictionSignal } from './schemas/signal.ts';
25
+ import { type FrictionIntakeResponse, type FrictionReportResponse } from './schemas/intake.ts';
26
+ /** The durable write. Defaults to the package store; hq-web binds its owner-scoped D1 writer. */
27
+ export interface FrictionIntakeDeps {
28
+ writeSignal?(runtime: RuntimeRef, signal: FrictionSignal): Promise<FrictionSignal>;
29
+ }
30
+ /** Typed request facts from the route. */
31
+ export interface FrictionReportRequest {
32
+ /** The request's `Origin` header. Tenancy derives from it, never from the body. */
33
+ origin: string | null;
34
+ /** The client address the host saw. Hashed here as a limiter key; never stored. */
35
+ clientAddress?: string;
36
+ body: unknown;
37
+ }
38
+ export type FrictionUpstreamOutcome = {
39
+ status: 'copied';
40
+ signalId: string;
41
+ } | {
42
+ status: 'skipped';
43
+ reason: 'disabled' | 'unconfigured' | 'same-org' | 'no-platform-frame';
44
+ } | {
45
+ status: 'failed';
46
+ reason: string;
47
+ };
48
+ export interface FrictionReportResult {
49
+ response: FrictionReportResponse;
50
+ signal: FrictionSignal;
51
+ upstream: FrictionUpstreamOutcome;
52
+ }
53
+ /** A caller the internal route already verified. */
54
+ export type FrictionIntakeCaller = {
55
+ kind: 'user';
56
+ userId: string;
57
+ orgId?: string;
58
+ } | {
59
+ kind: 'service';
60
+ onBehalfOf?: string;
61
+ };
62
+ export interface FrictionIntakeRequest {
63
+ caller: FrictionIntakeCaller;
64
+ body: unknown;
65
+ }
66
+ /** The page URL without its query and fragment (they carry tokens and personal data). */
67
+ export declare function stripUrl(value: string): string;
68
+ /**
69
+ * Record one browser report. The route has admitted the origin through CORS;
70
+ * this re-derives the app and target org from that same `Origin`.
71
+ */
72
+ export declare function recordFrictionReport(runtime: RuntimeRef, request: FrictionReportRequest, deps?: FrictionIntakeDeps): Promise<FrictionReportResult>;
73
+ /**
74
+ * Record one internal intake body for a caller the route verified (a user
75
+ * principal, or the internal service token). A user's org is the caller's
76
+ * own; a service names one or gets `hq.friction.upstreamOrgId`.
77
+ */
78
+ export declare function recordFrictionIntake(runtime: RuntimeRef, request: FrictionIntakeRequest, deps?: FrictionIntakeDeps): Promise<FrictionIntakeResponse>;
79
+ //# sourceMappingURL=intake.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intake.d.ts","sourceRoot":"","sources":["../../src/friction/intake.ts"],"names":[],"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,MAAM,WAAW,qBAAqB;IACrC,MAAM,EAAE,oBAAoB,CAAC;IAC7B,IAAI,EAAE,OAAO,CAAC;CACd;AAwBD,yFAAyF;AACzF,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAO9C;AA0PD;;;GAGG;AACH,wBAAsB,oBAAoB,CACzC,OAAO,EAAE,UAAU,EACnB,OAAO,EAAE,qBAAqB,EAC9B,IAAI,GAAE,kBAAuB,GAC3B,OAAO,CAAC,oBAAoB,CAAC,CAkG/B;AAED;;;;GAIG;AACH,wBAAsB,oBAAoB,CACzC,OAAO,EAAE,UAAU,EACnB,OAAO,EAAE,qBAAqB,EAC9B,IAAI,GAAE,kBAAuB,GAC3B,OAAO,CAAC,sBAAsB,CAAC,CA2DjC"}
@@ -0,0 +1,459 @@
1
+ /**
2
+ * The package-owned friction intake (moved from hq-web, PROPOSAL
3
+ * bug-report-flow P0-3), so every HQ deployment, ours and users', runs the
4
+ * same admission.
5
+ *
6
+ * - {@link recordFrictionReport}: the browser "Report a problem" body behind
7
+ * `POST /api/hq/reports`. Tenancy comes from the verified `Origin` through
8
+ * Auth's app registry, never from the body.
9
+ * - {@link recordFrictionIntake}: the authenticated internal intake behind
10
+ * `POST /api/internal/friction` (a verified user, or a service the route
11
+ * already authenticated).
12
+ *
13
+ * Both rate limit through `cache/rate-limiter` where the caller is a browser,
14
+ * redact through `security/redactor` before the write, compute
15
+ * `personalDataLevel` from what was kept and what the redactor found, and
16
+ * fingerprint by the typed report context (fixes defects 1 and 2). A report
17
+ * whose stack points into `@vibesdotdev/*` also files a redacted upstream copy
18
+ * for the Vibes org (`hq.friction.upstream`, default on).
19
+ *
20
+ * Framework-free: a route hands typed request facts and maps the thrown
21
+ * `CapabilityError` to its HTTP status.
22
+ */
23
+ import * as z from 'zod/v4';
24
+ import { CapabilityError, CaughtFailureSchema, isCapabilityError, settle, settleNow, valueFreeFailure } from '@vibesdotdev/kernel';
25
+ import { getVibesClient } from '@vibesdotdev/kernel/client';
26
+ import { JsonValueSchema } from '@vibesdotdev/kernel/schemas/json';
27
+ import { getLogger } from '@vibesdotdev/logging';
28
+ import { sha256Hex } from '@vibesdotdev/shared/hashing';
29
+ import { canonicalRegisteredOrigin, RegisteredAppSchema } from '@vibesdotdev/auth/schemas/registered-app';
30
+ import { loadHqFrictionConfig } from "../config/hq-friction.config.descriptor.js";
31
+ import { computeFrictionSignalFingerprint } from "./fingerprint.js";
32
+ import { generateFrictionId, writeFrictionSignal } from "./store.js";
33
+ import { emitFrictionSignalRecorded } from "./signal-recorded.event.descriptor.js";
34
+ import { FrictionEvidenceLinkKindSchema } from "./schemas/signal.js";
35
+ import { FrictionIntakeInputSchema, FrictionIntakeResponseSchema, FrictionReportInputSchema, FrictionReportResponseSchema } from "./schemas/intake.js";
36
+ /**
37
+ * Auth's registered-app answer (P0-1), parsed at the boundary: null is the only
38
+ * "untrusted" answer, and a thrown error is not "untrusted". `ownership` says
39
+ * whether this caller sees the owner (HQ's `apps:owner` scope grants it).
40
+ */
41
+ const RegisteredAppAnswerSchema = RegisteredAppSchema.nullable();
42
+ const RATE_WINDOW_SECONDS = 3600;
43
+ const PLATFORM_FRAME = /@vibesdotdev\//;
44
+ function refuse(message, code, reason, details) {
45
+ return new CapabilityError(message, code, { reason, retryable: code === 'RATE_LIMITED', details: details });
46
+ }
47
+ /** The active request principal, or anonymous on a host without request principals. */
48
+ function requestPrincipal(runtime) {
49
+ if (runtime.scope.capabilities?.requestPrincipals !== true)
50
+ return { kind: 'anonymous' };
51
+ const principal = settleNow(() => runtime.requestPrincipal());
52
+ if (principal.ok)
53
+ return principal.value;
54
+ if (principal.cause instanceof Error && isCapabilityError(principal.cause) && principal.cause.reason === 'invocation-inactive')
55
+ return { kind: 'anonymous' };
56
+ throw principal.cause;
57
+ }
58
+ function isLoopback(origin) {
59
+ const host = new URL(origin).hostname;
60
+ return host === 'localhost' || host === '127.0.0.1' || host === '[::1]' || host.endsWith('.localhost');
61
+ }
62
+ /** The page URL without its query and fragment (they carry tokens and personal data). */
63
+ export function stripUrl(value) {
64
+ const parsed = z.url().safeParse(value);
65
+ if (parsed.success) {
66
+ const url = new URL(parsed.data);
67
+ return `${url.origin}${url.pathname}`;
68
+ }
69
+ return value.split(/[?#]/, 1)[0] ?? '';
70
+ }
71
+ async function resolveRegisteredApp(runtime, origin) {
72
+ const auth = await getVibesClient('auth', runtime);
73
+ return RegisteredAppAnswerSchema.parse(await auth.resolveRegisteredOrigin(origin));
74
+ }
75
+ async function rateLimiter(runtime) {
76
+ const limiter = runtime.hasKind('cache/rate-limiter') ? (await runtime.query('cache/rate-limiter').select())?.impl : undefined;
77
+ if (!limiter)
78
+ throw refuse('Friction reports need a rate limiter; compose a cache/rate-limiter.', 'UNAVAILABLE', 'friction-report-rate-limiter-unavailable');
79
+ return limiter;
80
+ }
81
+ async function enforceLimit(limiter, key, identifier, limit) {
82
+ const result = await limiter.limit({ key, identifier, limit, windowSeconds: RATE_WINDOW_SECONDS });
83
+ if (!result.allowed) {
84
+ throw refuse('Too many problem reports; try again later.', 'RATE_LIMITED', 'friction-report-rate-limited', {
85
+ limiter: key,
86
+ retryAfterSeconds: result.retryAfterSeconds ?? RATE_WINDOW_SECONDS
87
+ });
88
+ }
89
+ }
90
+ const RedactedTextsSchema = z.array(z.string());
91
+ /**
92
+ * Redact every text field through the runtime's `security/redactor`. One
93
+ * call redacts the whole bundle (the built-in redactor runs a supervised
94
+ * child per call); if a redactor's replacement breaks the bundle's shape,
95
+ * each text is redacted on its own. No redactor, or one that ran nothing,
96
+ * refuses: a row is never marked redacted unless redaction ran.
97
+ */
98
+ async function redactTexts(runtime, texts) {
99
+ const redactor = runtime.hasKind('security/redactor')
100
+ ? (await runtime.query('security/redactor').select())?.impl
101
+ : undefined;
102
+ if (!redactor)
103
+ throw refuse('Friction intake needs a security/redactor.', 'UNAVAILABLE', 'friction-report-redactor-unavailable');
104
+ const ran = (result) => {
105
+ if (result.redactorAvailable === false)
106
+ throw refuse('The security redactor is unavailable on this host.', 'UNAVAILABLE', 'friction-report-redactor-unavailable');
107
+ return result;
108
+ };
109
+ if (texts.length === 0)
110
+ return { texts: [], matches: 0 };
111
+ const bundled = ran(await redactor.redact(JSON.stringify(texts)));
112
+ const parsed = settleNow(() => RedactedTextsSchema.parse(JSON.parse(bundled.redacted)));
113
+ if (parsed.ok && parsed.value.length === texts.length)
114
+ return { texts: parsed.value, matches: bundled.matches.length };
115
+ const out = [];
116
+ let matches = 0;
117
+ for (const text of texts) {
118
+ const result = ran(await redactor.redact(text));
119
+ out.push(result.redacted);
120
+ matches += result.matches.length;
121
+ }
122
+ return { texts: out, matches };
123
+ }
124
+ /** Redact the free text, the URL, and every captured error; nothing else holds reporter-typed text. */
125
+ async function redactReport(runtime, report) {
126
+ const texts = [report.observed, report.expected ?? '', report.repro ?? '', report.workaround ?? '', report.evidence === undefined ? '' : JSON.stringify(report.evidence)];
127
+ const errors = report.context?.errors ?? [];
128
+ if (report.context)
129
+ texts.push(report.context.url);
130
+ for (const error of errors)
131
+ texts.push(error.message, error.stack ?? '');
132
+ const { texts: out, matches } = await redactTexts(runtime, texts);
133
+ let cursor = 0;
134
+ const next = () => out[cursor++] ?? '';
135
+ const observed = next();
136
+ const expected = next();
137
+ const repro = next();
138
+ const workaround = next();
139
+ const evidenceText = next();
140
+ const evidence = report.evidence === undefined
141
+ ? undefined
142
+ : (() => {
143
+ // A replacement that breaks the JSON keeps the redacted text itself, never the original.
144
+ const reparsed = settleNow(() => JsonValueSchema.parse(JSON.parse(evidenceText)));
145
+ return reparsed.ok ? reparsed.value : evidenceText;
146
+ })();
147
+ const context = report.context
148
+ ? {
149
+ ...report.context,
150
+ url: next(),
151
+ errors: errors.map((error) => {
152
+ const message = next();
153
+ const stack = next();
154
+ return { ...error, message: message || '[REDACTED]', stack: error.stack !== undefined ? stack : undefined };
155
+ })
156
+ }
157
+ : undefined;
158
+ return {
159
+ report: {
160
+ ...report,
161
+ observed,
162
+ expected: report.expected !== undefined ? expected : undefined,
163
+ repro: report.repro !== undefined ? repro : undefined,
164
+ workaround: report.workaround !== undefined ? workaround : undefined,
165
+ evidence: evidence,
166
+ context: context
167
+ },
168
+ matches
169
+ };
170
+ }
171
+ /**
172
+ * `identified` when the row keeps the reporter's identity; otherwise
173
+ * `redacted` when the redactor removed something, else `none`.
174
+ */
175
+ function personalDataLevel(identified, matches) {
176
+ if (identified)
177
+ return 'identified';
178
+ return matches > 0 ? 'redacted' : 'none';
179
+ }
180
+ function storedContext(capture, config, facts) {
181
+ const attachments = facts.anonymous
182
+ ? []
183
+ : capture.attachments.filter((attachment) => config.intake.screenshots || attachment.kind !== 'screenshot');
184
+ return {
185
+ ...capture,
186
+ url: stripUrl(capture.url),
187
+ errors: config.intake.errors ? capture.errors : [],
188
+ attachments,
189
+ tenancy: facts.tenancy,
190
+ appClientId: facts.appClientId,
191
+ reporterOrgId: facts.reporterOrgId
192
+ };
193
+ }
194
+ async function withFingerprint(signal) {
195
+ const fingerprint = await computeFrictionSignalFingerprint(signal);
196
+ return { ...signal, signatureHash: fingerprint.hash, fingerprint: fingerprint.fingerprint, fingerprintVersion: fingerprint.version };
197
+ }
198
+ async function writeAndAnnounce(runtime, deps, signal, upstreamOf) {
199
+ const write = deps.writeSignal ?? writeFrictionSignal;
200
+ const written = await write(runtime, await withFingerprint(signal));
201
+ // The write is durable; a failing subscriber is logged, never turned into a lost report.
202
+ const announced = await settle(() => emitFrictionSignalRecorded(runtime, {
203
+ signalId: written.id,
204
+ orgId: written.orgId,
205
+ source: written.source,
206
+ severity: written.severity,
207
+ fingerprint: written.fingerprint ?? `v1:${written.signatureHash}`,
208
+ occurrenceCount: written.occurrenceCount ?? 1,
209
+ tenancy: written.context?.tenancy,
210
+ upstreamOf: upstreamOf
211
+ }));
212
+ if (!announced.ok) {
213
+ getLogger('hq:friction', runtime).error('Friction signal-recorded event failed.', {
214
+ error: valueFreeFailure(CaughtFailureSchema.parse(announced.cause)),
215
+ signalId: written.id
216
+ });
217
+ }
218
+ return written;
219
+ }
220
+ function pointsIntoPlatform(context) {
221
+ return context?.errors.some((error) => PLATFORM_FRAME.test(error.stack ?? '') || PLATFORM_FRAME.test(error.message)) ?? false;
222
+ }
223
+ /**
224
+ * The Vibes copy of a report whose stack points into `@vibesdotdev/*`:
225
+ * redacted again, no screenshot or attachment, no reporter identity, linked
226
+ * back to the original. Its occurrence derives from the original's, so a
227
+ * retried submit stays one upstream occurrence.
228
+ */
229
+ async function fileUpstreamCopy(runtime, deps, config, original, occurrence, originalMatches) {
230
+ if (!config.upstream.enabled)
231
+ return { status: 'skipped', reason: 'disabled' };
232
+ if (!pointsIntoPlatform(original.context))
233
+ return { status: 'skipped', reason: 'no-platform-frame' };
234
+ const upstreamOrgId = config.upstreamOrgId;
235
+ if (!upstreamOrgId)
236
+ return { status: 'skipped', reason: 'unconfigured' };
237
+ if (upstreamOrgId === original.orgId)
238
+ return { status: 'skipped', reason: 'same-org' };
239
+ const copied = await settle(async () => {
240
+ const { report, matches } = await redactReport(runtime, {
241
+ observed: original.observed,
242
+ expected: original.expected,
243
+ repro: original.repro,
244
+ workaround: original.workaround,
245
+ context: original.context
246
+ });
247
+ const { reporterOrgId: _reporterOrgId, attachments: _attachments, ...context } = report.context;
248
+ const link = { kind: 'friction-signal', ref: `${original.orgId}/${original.id}` };
249
+ // Vibes gets the route template, never the concrete path (it can carry tenant or user ids).
250
+ const pageUrl = z.url().safeParse(context.url);
251
+ const templateUrl = pageUrl.success ? `${new URL(pageUrl.data).origin}${context.route}` : context.route;
252
+ const copy = {
253
+ id: generateFrictionId(),
254
+ orgId: upstreamOrgId,
255
+ source: original.source,
256
+ audience: original.audience,
257
+ surface: original.surface,
258
+ severity: original.severity,
259
+ observed: report.observed,
260
+ expected: report.expected,
261
+ repro: report.repro,
262
+ evidenceLinks: [{ kind: 'url', ref: templateUrl }, link],
263
+ context: { ...context, url: templateUrl, attachments: [], tenancy: 'upstream-copy' },
264
+ signatureHash: 'pending',
265
+ personalDataLevel: personalDataLevel(false, matches + originalMatches),
266
+ createdAt: original.createdAt,
267
+ createdBy: 'upstream',
268
+ occurrenceId: `upstream:${original.orgId}:${occurrence}`
269
+ };
270
+ return writeAndAnnounce(runtime, deps, copy, link.ref);
271
+ });
272
+ if (copied.ok)
273
+ return { status: 'copied', signalId: copied.value.id };
274
+ const failure = valueFreeFailure(CaughtFailureSchema.parse(copied.cause));
275
+ // The reporter's own report is durable; the upstream copy is best effort and logged.
276
+ getLogger('hq:friction', runtime).error('Friction upstream copy failed.', { error: failure, signalId: original.id });
277
+ return { status: 'failed', reason: failure.reason ?? failure.code ?? 'upstream-copy-failed' };
278
+ }
279
+ function invalidBody(error) {
280
+ const issue = error.issues[0];
281
+ if (issue?.path[0] === 'evidenceLinks') {
282
+ return refuse(`Invalid evidenceLinks[${String(issue.path[1] ?? '')}]; allowed kinds: ${FrictionEvidenceLinkKindSchema.options.join(', ')}`, 'INVALID_INPUT', 'friction-intake-invalid');
283
+ }
284
+ return refuse(issue ? `${issue.path.join('.')}: ${issue.message}` : 'Invalid friction report', 'INVALID_INPUT', 'friction-intake-invalid');
285
+ }
286
+ /**
287
+ * Record one browser report. The route has admitted the origin through CORS;
288
+ * this re-derives the app and target org from that same `Origin`.
289
+ */
290
+ export async function recordFrictionReport(runtime, request, deps = {}) {
291
+ const parsed = FrictionReportInputSchema.safeParse(request.body);
292
+ if (!parsed.success)
293
+ throw invalidBody(parsed.error);
294
+ const body = parsed.data;
295
+ const principal = requestPrincipal(runtime);
296
+ if (principal.kind === 'service') {
297
+ throw refuse('Service callers report through the internal friction intake.', 'PERMISSION_DENIED', 'friction-report-service-caller');
298
+ }
299
+ const user = principal.kind === 'user' ? principal : undefined;
300
+ const config = await loadHqFrictionConfig(runtime);
301
+ if (!user) {
302
+ if (!config.intake.publicOnError)
303
+ throw refuse('Sign in to report a problem.', 'AUTH_REQUIRED', 'friction-report-sign-in-required');
304
+ if (body.context.errors.length === 0) {
305
+ throw refuse('Signed-out visitors can report a problem only after an error.', 'PERMISSION_DENIED', 'friction-report-public-needs-error');
306
+ }
307
+ }
308
+ const origin = canonicalRegisteredOrigin(request.origin);
309
+ if (!origin)
310
+ throw refuse('A problem report needs its page origin.', 'INVALID_INPUT', 'friction-report-origin-missing');
311
+ const app = await resolveRegisteredApp(runtime, origin);
312
+ let tenancy;
313
+ let orgId;
314
+ if (app?.ownership === 'hidden') {
315
+ // An owner exists that this intake may not see: routing upstream would hand a customer's report to Vibes.
316
+ throw refuse('This app\'s owner is not visible to this HQ intake.', 'PERMISSION_DENIED', 'friction-report-app-owner-hidden', { clientId: app.clientId });
317
+ }
318
+ else if (app?.ownership === 'owned') {
319
+ orgId = app.organizationId;
320
+ tenancy = 'app-owner';
321
+ }
322
+ else if (app?.ownership === 'unowned') {
323
+ orgId = config.upstreamOrgId;
324
+ tenancy = 'upstream-fallback';
325
+ }
326
+ else if (runtime.scope.qualifiers?.dev === true && isLoopback(origin)) {
327
+ orgId = config.upstreamOrgId;
328
+ tenancy = 'dev-loopback';
329
+ }
330
+ else {
331
+ throw refuse('This origin is not a registered app.', 'PERMISSION_DENIED', 'friction-report-origin-unregistered');
332
+ }
333
+ if (!orgId) {
334
+ throw refuse('No org receives reports from this app; set hq.friction.upstreamOrgId.', 'UNAVAILABLE', 'friction-report-tenant-unresolved');
335
+ }
336
+ const limiter = await rateLimiter(runtime);
337
+ await enforceLimit(limiter, 'hq.friction.report.origin', origin, config.intake.rateLimit.perOriginPerHour);
338
+ if (user) {
339
+ await enforceLimit(limiter, 'hq.friction.report.user', user.userId, config.intake.rateLimit.signedInPerHour);
340
+ }
341
+ else {
342
+ const address = request.clientAddress?.trim();
343
+ if (!address)
344
+ throw refuse('A signed-out report needs the client address for rate limiting.', 'INVALID_INPUT', 'friction-report-client-address-missing');
345
+ await enforceLimit(limiter, 'hq.friction.report.public', sha256Hex(`hq.friction:${address}`), config.intake.rateLimit.publicPerHour);
346
+ }
347
+ const context = storedContext(body.context, config, {
348
+ appClientId: app?.clientId,
349
+ tenancy,
350
+ reporterOrgId: user?.orgId && user.orgId !== orgId ? user.orgId : undefined,
351
+ anonymous: !user
352
+ });
353
+ const { report, matches } = await redactReport(runtime, {
354
+ observed: body.observed,
355
+ expected: body.expected,
356
+ repro: body.repro,
357
+ context
358
+ });
359
+ const occurrence = body.occurrenceId ?? generateFrictionId();
360
+ const signal = {
361
+ id: generateFrictionId(),
362
+ orgId,
363
+ source: 'user-explicit',
364
+ audience: 'both',
365
+ surface: body.surface ?? context.route,
366
+ severity: body.severity,
367
+ observed: report.observed,
368
+ expected: report.expected,
369
+ repro: report.repro,
370
+ evidenceLinks: report.context.url ? [{ kind: 'url', ref: report.context.url }] : [],
371
+ context: report.context,
372
+ signatureHash: 'pending',
373
+ personalDataLevel: personalDataLevel(Boolean(user), matches),
374
+ createdAt: new Date().toISOString(),
375
+ createdBy: user?.userId ?? 'anonymous',
376
+ userSessionId: user?.sessionId,
377
+ occurrenceId: occurrence
378
+ };
379
+ const written = await writeAndAnnounce(runtime, deps, signal);
380
+ const upstream = await fileUpstreamCopy(runtime, deps, config, written, occurrence, matches);
381
+ return {
382
+ signal: written,
383
+ upstream,
384
+ response: FrictionReportResponseSchema.parse({
385
+ id: written.id,
386
+ severity: written.severity,
387
+ surface: written.surface,
388
+ personalDataLevel: written.personalDataLevel,
389
+ occurrenceCount: written.occurrenceCount ?? 1
390
+ })
391
+ };
392
+ }
393
+ /**
394
+ * Record one internal intake body for a caller the route verified (a user
395
+ * principal, or the internal service token). A user's org is the caller's
396
+ * own; a service names one or gets `hq.friction.upstreamOrgId`.
397
+ */
398
+ export async function recordFrictionIntake(runtime, request, deps = {}) {
399
+ const parsed = FrictionIntakeInputSchema.safeParse(request.body);
400
+ if (!parsed.success)
401
+ throw invalidBody(parsed.error);
402
+ const body = parsed.data;
403
+ const { caller } = request;
404
+ const config = await loadHqFrictionConfig(runtime);
405
+ let orgId;
406
+ if (caller.kind === 'user') {
407
+ orgId = caller.orgId ?? config.upstreamOrgId;
408
+ if (body.orgId && body.orgId !== orgId) {
409
+ throw refuse('Friction organization must match the authenticated caller or the configured intake organization.', 'PERMISSION_DENIED', 'friction-intake-org-mismatch');
410
+ }
411
+ }
412
+ else {
413
+ orgId = body.orgId ?? config.upstreamOrgId;
414
+ }
415
+ if (!orgId)
416
+ throw refuse('orgId is required', 'INVALID_INPUT', 'friction-intake-org-required');
417
+ const userId = caller.kind === 'user' ? caller.userId : caller.onBehalfOf?.trim() || undefined;
418
+ const createdBy = userId ?? body.createdBy ?? 'marshal-cloud';
419
+ const evidenceLinks = [...body.evidenceLinks];
420
+ if (body.page)
421
+ evidenceLinks.push({ kind: 'url', ref: stripUrl(body.page) });
422
+ const context = body.context
423
+ ? storedContext(body.context, config, { tenancy: 'caller', anonymous: false })
424
+ : undefined;
425
+ const { report, matches } = await redactReport(runtime, {
426
+ observed: body.observed,
427
+ expected: body.expected,
428
+ repro: body.repro,
429
+ workaround: body.workaround,
430
+ evidence: body.evidence,
431
+ context: context
432
+ });
433
+ const signal = {
434
+ id: generateFrictionId(),
435
+ orgId,
436
+ source: body.source,
437
+ audience: body.audience,
438
+ surface: body.surface,
439
+ severity: body.severity,
440
+ observed: report.observed,
441
+ expected: report.expected,
442
+ repro: report.repro,
443
+ workaround: report.workaround,
444
+ evidenceLinks,
445
+ evidence: report.evidence,
446
+ context: report.context,
447
+ signatureHash: 'pending',
448
+ personalDataLevel: personalDataLevel(userId !== undefined, matches),
449
+ createdAt: new Date().toISOString(),
450
+ createdBy,
451
+ agentRunId: body.agentRunId,
452
+ userSessionId: body.userSessionId,
453
+ occurrenceId: body.occurrenceId ?? body.agentRunId ?? body.userSessionId
454
+ };
455
+ const written = await writeAndAnnounce(runtime, deps, signal);
456
+ await fileUpstreamCopy(runtime, deps, config, written, signal.occurrenceId ?? written.id, matches);
457
+ return FrictionIntakeResponseSchema.parse(written);
458
+ }
459
+ //# sourceMappingURL=intake.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intake.js","sourceRoot":"","sources":["../../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