waterplane 0.1.6 → 0.1.14

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 (656) hide show
  1. package/CHANGELOG.md +146 -1
  2. package/README.md +47 -24
  3. package/SECURITY.md +11 -3
  4. package/deploy/node-version +1 -1
  5. package/node_modules/@waterplane/shared/dist/agentfiles.d.ts +17 -0
  6. package/node_modules/@waterplane/shared/dist/agentfiles.js +60 -5
  7. package/node_modules/@waterplane/shared/dist/agentfiles.js.map +1 -1
  8. package/node_modules/@waterplane/shared/dist/alwaysonwords.d.ts +83 -0
  9. package/node_modules/@waterplane/shared/dist/alwaysonwords.js +215 -0
  10. package/node_modules/@waterplane/shared/dist/alwaysonwords.js.map +1 -0
  11. package/node_modules/@waterplane/shared/dist/assess/sasswords.js +4 -0
  12. package/node_modules/@waterplane/shared/dist/assess/sasswords.js.map +1 -1
  13. package/node_modules/@waterplane/shared/dist/autocompact.js +3 -2
  14. package/node_modules/@waterplane/shared/dist/autocompact.js.map +1 -1
  15. package/node_modules/@waterplane/shared/dist/backendsources.d.ts +11 -1
  16. package/node_modules/@waterplane/shared/dist/backendsources.js.map +1 -1
  17. package/node_modules/@waterplane/shared/dist/branchmode.d.ts +33 -0
  18. package/node_modules/@waterplane/shared/dist/branchmode.js +88 -0
  19. package/node_modules/@waterplane/shared/dist/branchmode.js.map +1 -0
  20. package/node_modules/@waterplane/shared/dist/budget.d.ts +7 -1
  21. package/node_modules/@waterplane/shared/dist/budget.js +11 -3
  22. package/node_modules/@waterplane/shared/dist/budget.js.map +1 -1
  23. package/node_modules/@waterplane/shared/dist/buildstamp.d.ts +37 -0
  24. package/node_modules/@waterplane/shared/dist/buildstamp.js +95 -0
  25. package/node_modules/@waterplane/shared/dist/buildstamp.js.map +1 -0
  26. package/node_modules/@waterplane/shared/dist/burn.d.ts +16 -1
  27. package/node_modules/@waterplane/shared/dist/burn.js +30 -0
  28. package/node_modules/@waterplane/shared/dist/burn.js.map +1 -1
  29. package/node_modules/@waterplane/shared/dist/calday.d.ts +4 -0
  30. package/node_modules/@waterplane/shared/dist/calday.js +25 -0
  31. package/node_modules/@waterplane/shared/dist/calday.js.map +1 -0
  32. package/node_modules/@waterplane/shared/dist/changebrief.d.ts +77 -0
  33. package/node_modules/@waterplane/shared/dist/changebrief.js +70 -0
  34. package/node_modules/@waterplane/shared/dist/changebrief.js.map +1 -0
  35. package/node_modules/@waterplane/shared/dist/clihealth/healthrecord.js +1 -0
  36. package/node_modules/@waterplane/shared/dist/clihealth/healthrecord.js.map +1 -1
  37. package/node_modules/@waterplane/shared/dist/costwindow.d.ts +24 -5
  38. package/node_modules/@waterplane/shared/dist/costwindow.js +35 -15
  39. package/node_modules/@waterplane/shared/dist/costwindow.js.map +1 -1
  40. package/node_modules/@waterplane/shared/dist/desktopfiles.d.ts +100 -0
  41. package/node_modules/@waterplane/shared/dist/desktopfiles.js +192 -0
  42. package/node_modules/@waterplane/shared/dist/desktopfiles.js.map +1 -0
  43. package/node_modules/@waterplane/shared/dist/exposure.d.ts +175 -0
  44. package/node_modules/@waterplane/shared/dist/exposure.js +357 -0
  45. package/node_modules/@waterplane/shared/dist/exposure.js.map +1 -0
  46. package/node_modules/@waterplane/shared/dist/exposurepush.d.ts +60 -0
  47. package/node_modules/@waterplane/shared/dist/exposurepush.js +103 -0
  48. package/node_modules/@waterplane/shared/dist/exposurepush.js.map +1 -0
  49. package/node_modules/@waterplane/shared/dist/healthindex/commits.d.ts +26 -0
  50. package/node_modules/@waterplane/shared/dist/healthindex/commits.js +57 -0
  51. package/node_modules/@waterplane/shared/dist/healthindex/commits.js.map +1 -0
  52. package/node_modules/@waterplane/shared/dist/healthindex/move.d.ts +25 -0
  53. package/node_modules/@waterplane/shared/dist/healthindex/move.js +79 -0
  54. package/node_modules/@waterplane/shared/dist/healthindex/move.js.map +1 -0
  55. package/node_modules/@waterplane/shared/dist/healthindex/readings.d.ts +53 -0
  56. package/node_modules/@waterplane/shared/dist/healthindex/readings.js +154 -0
  57. package/node_modules/@waterplane/shared/dist/healthindex/readings.js.map +1 -0
  58. package/node_modules/@waterplane/shared/dist/healthindex/repoindex.d.ts +41 -0
  59. package/node_modules/@waterplane/shared/dist/healthindex/repoindex.js +19 -0
  60. package/node_modules/@waterplane/shared/dist/healthindex/repoindex.js.map +1 -0
  61. package/node_modules/@waterplane/shared/dist/healthindex/score.d.ts +26 -0
  62. package/node_modules/@waterplane/shared/dist/healthindex/score.js +156 -0
  63. package/node_modules/@waterplane/shared/dist/healthindex/score.js.map +1 -0
  64. package/node_modules/@waterplane/shared/dist/healthindex/types.d.ts +206 -0
  65. package/node_modules/@waterplane/shared/dist/healthindex/types.js +58 -0
  66. package/node_modules/@waterplane/shared/dist/healthindex/types.js.map +1 -0
  67. package/node_modules/@waterplane/shared/dist/healthindex/vs.d.ts +26 -0
  68. package/node_modules/@waterplane/shared/dist/healthindex/vs.js +38 -0
  69. package/node_modules/@waterplane/shared/dist/healthindex/vs.js.map +1 -0
  70. package/node_modules/@waterplane/shared/dist/healthindex/words.d.ts +28 -0
  71. package/node_modules/@waterplane/shared/dist/healthindex/words.js +124 -0
  72. package/node_modules/@waterplane/shared/dist/healthindex/words.js.map +1 -0
  73. package/node_modules/@waterplane/shared/dist/healthindex.d.ts +15 -411
  74. package/node_modules/@waterplane/shared/dist/healthindex.js +8 -602
  75. package/node_modules/@waterplane/shared/dist/healthindex.js.map +1 -1
  76. package/node_modules/@waterplane/shared/dist/hints.js +15 -0
  77. package/node_modules/@waterplane/shared/dist/hints.js.map +1 -1
  78. package/node_modules/@waterplane/shared/dist/index.d.ts +37 -0
  79. package/node_modules/@waterplane/shared/dist/index.js +37 -0
  80. package/node_modules/@waterplane/shared/dist/index.js.map +1 -1
  81. package/node_modules/@waterplane/shared/dist/intent/clean.d.ts +87 -0
  82. package/node_modules/@waterplane/shared/dist/intent/clean.js +51 -3
  83. package/node_modules/@waterplane/shared/dist/intent/clean.js.map +1 -1
  84. package/node_modules/@waterplane/shared/dist/intent/kind.d.ts +40 -1
  85. package/node_modules/@waterplane/shared/dist/intent/kind.js +36 -3
  86. package/node_modules/@waterplane/shared/dist/intent/kind.js.map +1 -1
  87. package/node_modules/@waterplane/shared/dist/intent/types.d.ts +13 -0
  88. package/node_modules/@waterplane/shared/dist/intent/types.js.map +1 -1
  89. package/node_modules/@waterplane/shared/dist/intent/verdict.js +9 -16
  90. package/node_modules/@waterplane/shared/dist/intent/verdict.js.map +1 -1
  91. package/node_modules/@waterplane/shared/dist/intent/words.js +5 -0
  92. package/node_modules/@waterplane/shared/dist/intent/words.js.map +1 -1
  93. package/node_modules/@waterplane/shared/dist/intent.d.ts +2 -2
  94. package/node_modules/@waterplane/shared/dist/intent.js +2 -2
  95. package/node_modules/@waterplane/shared/dist/intent.js.map +1 -1
  96. package/node_modules/@waterplane/shared/dist/launchmodes.d.ts +2 -0
  97. package/node_modules/@waterplane/shared/dist/launchmodes.js +12 -0
  98. package/node_modules/@waterplane/shared/dist/launchmodes.js.map +1 -1
  99. package/node_modules/@waterplane/shared/dist/ledgerspan.d.ts +106 -0
  100. package/node_modules/@waterplane/shared/dist/ledgerspan.js +196 -0
  101. package/node_modules/@waterplane/shared/dist/ledgerspan.js.map +1 -0
  102. package/node_modules/@waterplane/shared/dist/naming.d.ts +3 -1
  103. package/node_modules/@waterplane/shared/dist/naming.js +6 -2
  104. package/node_modules/@waterplane/shared/dist/naming.js.map +1 -1
  105. package/node_modules/@waterplane/shared/dist/netfuse.d.ts +5 -0
  106. package/node_modules/@waterplane/shared/dist/netfuse.js +6 -1
  107. package/node_modules/@waterplane/shared/dist/netfuse.js.map +1 -1
  108. package/node_modules/@waterplane/shared/dist/netretry.d.ts +78 -0
  109. package/node_modules/@waterplane/shared/dist/netretry.js +85 -0
  110. package/node_modules/@waterplane/shared/dist/netretry.js.map +1 -0
  111. package/node_modules/@waterplane/shared/dist/netretrycfg.d.ts +12 -0
  112. package/node_modules/@waterplane/shared/dist/netretrycfg.js +27 -0
  113. package/node_modules/@waterplane/shared/dist/netretrycfg.js.map +1 -0
  114. package/node_modules/@waterplane/shared/dist/nodemin.d.ts +6 -4
  115. package/node_modules/@waterplane/shared/dist/nodemin.js +6 -4
  116. package/node_modules/@waterplane/shared/dist/nodemin.js.map +1 -1
  117. package/node_modules/@waterplane/shared/dist/optins.d.ts +35 -1
  118. package/node_modules/@waterplane/shared/dist/optins.js +39 -1
  119. package/node_modules/@waterplane/shared/dist/optins.js.map +1 -1
  120. package/node_modules/@waterplane/shared/dist/pairing.js +4 -0
  121. package/node_modules/@waterplane/shared/dist/pairing.js.map +1 -1
  122. package/node_modules/@waterplane/shared/dist/passive.js +3 -0
  123. package/node_modules/@waterplane/shared/dist/passive.js.map +1 -1
  124. package/node_modules/@waterplane/shared/dist/plugin/api.d.ts +394 -0
  125. package/node_modules/@waterplane/shared/dist/plugin/api.js +2 -0
  126. package/node_modules/@waterplane/shared/dist/plugin/api.js.map +1 -0
  127. package/node_modules/@waterplane/shared/dist/plugin/backend.d.ts +197 -0
  128. package/node_modules/@waterplane/shared/dist/plugin/backend.js +9 -0
  129. package/node_modules/@waterplane/shared/dist/plugin/backend.js.map +1 -0
  130. package/node_modules/@waterplane/shared/dist/plugin/manifest.d.ts +160 -0
  131. package/node_modules/@waterplane/shared/dist/plugin/manifest.js +98 -0
  132. package/node_modules/@waterplane/shared/dist/plugin/manifest.js.map +1 -0
  133. package/node_modules/@waterplane/shared/dist/plugin/module.d.ts +98 -0
  134. package/node_modules/@waterplane/shared/dist/plugin/module.js +13 -0
  135. package/node_modules/@waterplane/shared/dist/plugin/module.js.map +1 -0
  136. package/node_modules/@waterplane/shared/dist/plugin/version.d.ts +66 -0
  137. package/node_modules/@waterplane/shared/dist/plugin/version.js +86 -0
  138. package/node_modules/@waterplane/shared/dist/plugin/version.js.map +1 -0
  139. package/node_modules/@waterplane/shared/dist/plugin.d.ts +5 -867
  140. package/node_modules/@waterplane/shared/dist/plugin.js +27 -186
  141. package/node_modules/@waterplane/shared/dist/plugin.js.map +1 -1
  142. package/node_modules/@waterplane/shared/dist/pluginlaunch.d.ts +7 -0
  143. package/node_modules/@waterplane/shared/dist/prview.d.ts +23 -0
  144. package/node_modules/@waterplane/shared/dist/prview.js +107 -0
  145. package/node_modules/@waterplane/shared/dist/prview.js.map +1 -0
  146. package/node_modules/@waterplane/shared/dist/queue/queueserial.d.ts +11 -2
  147. package/node_modules/@waterplane/shared/dist/queue/queueserial.js +13 -4
  148. package/node_modules/@waterplane/shared/dist/queue/queueserial.js.map +1 -1
  149. package/node_modules/@waterplane/shared/dist/queue/queuewords.js +1 -0
  150. package/node_modules/@waterplane/shared/dist/queue/queuewords.js.map +1 -1
  151. package/node_modules/@waterplane/shared/dist/repohealth.d.ts +4 -0
  152. package/node_modules/@waterplane/shared/dist/repohealth.js.map +1 -1
  153. package/node_modules/@waterplane/shared/dist/repotwins.d.ts +31 -0
  154. package/node_modules/@waterplane/shared/dist/repotwins.js +52 -0
  155. package/node_modules/@waterplane/shared/dist/repotwins.js.map +1 -0
  156. package/node_modules/@waterplane/shared/dist/requirements.js +4 -1
  157. package/node_modules/@waterplane/shared/dist/requirements.js.map +1 -1
  158. package/node_modules/@waterplane/shared/dist/schedule/schedaction.d.ts +29 -0
  159. package/node_modules/@waterplane/shared/dist/schedule/schedaction.js +22 -0
  160. package/node_modules/@waterplane/shared/dist/schedule/schedaction.js.map +1 -1
  161. package/node_modules/@waterplane/shared/dist/schedule/schedclean.js +26 -0
  162. package/node_modules/@waterplane/shared/dist/schedule/schedclean.js.map +1 -1
  163. package/node_modules/@waterplane/shared/dist/schedule/schedhorizon.d.ts +1 -0
  164. package/node_modules/@waterplane/shared/dist/schedule/schedhorizon.js +1 -0
  165. package/node_modules/@waterplane/shared/dist/schedule/schedhorizon.js.map +1 -1
  166. package/node_modules/@waterplane/shared/dist/schedule.d.ts +1 -1
  167. package/node_modules/@waterplane/shared/dist/schedule.js +1 -1
  168. package/node_modules/@waterplane/shared/dist/schedule.js.map +1 -1
  169. package/node_modules/@waterplane/shared/dist/sessionbudget.d.ts +34 -7
  170. package/node_modules/@waterplane/shared/dist/sessionbudget.js +59 -21
  171. package/node_modules/@waterplane/shared/dist/sessionbudget.js.map +1 -1
  172. package/node_modules/@waterplane/shared/dist/sweep.d.ts +2 -1
  173. package/node_modules/@waterplane/shared/dist/sweep.js +2 -1
  174. package/node_modules/@waterplane/shared/dist/sweep.js.map +1 -1
  175. package/node_modules/@waterplane/shared/dist/tokens.d.ts +4 -3
  176. package/node_modules/@waterplane/shared/dist/tokens.js +9 -7
  177. package/node_modules/@waterplane/shared/dist/tokens.js.map +1 -1
  178. package/node_modules/@waterplane/shared/dist/weekburn.d.ts +144 -0
  179. package/node_modules/@waterplane/shared/dist/weekburn.js +250 -0
  180. package/node_modules/@waterplane/shared/dist/weekburn.js.map +1 -0
  181. package/node_modules/@waterplane/shared/dist/wire/alwayson.d.ts +64 -0
  182. package/node_modules/@waterplane/shared/dist/wire/alwayson.js +7 -0
  183. package/node_modules/@waterplane/shared/dist/wire/alwayson.js.map +1 -0
  184. package/node_modules/@waterplane/shared/dist/wire/backend.d.ts +4 -0
  185. package/node_modules/@waterplane/shared/dist/wire/backendtokens.d.ts +6 -0
  186. package/node_modules/@waterplane/shared/dist/wire/backendtokens.js +0 -9
  187. package/node_modules/@waterplane/shared/dist/wire/backendtokens.js.map +1 -1
  188. package/node_modules/@waterplane/shared/dist/wire/costwindow.d.ts +25 -0
  189. package/node_modules/@waterplane/shared/dist/wire/messages/clienthost.d.ts +15 -1
  190. package/node_modules/@waterplane/shared/dist/wire/messages/clientsession.d.ts +24 -0
  191. package/node_modules/@waterplane/shared/dist/wire/messages/hosttools.d.ts +12 -2
  192. package/node_modules/@waterplane/shared/dist/wire/notify.d.ts +194 -1
  193. package/node_modules/@waterplane/shared/dist/wire/notify.js +139 -1
  194. package/node_modules/@waterplane/shared/dist/wire/notify.js.map +1 -1
  195. package/node_modules/@waterplane/shared/dist/wire/pullrequest.d.ts +42 -0
  196. package/node_modules/@waterplane/shared/dist/wire/pullrequest.js +2 -0
  197. package/node_modules/@waterplane/shared/dist/wire/pullrequest.js.map +1 -0
  198. package/node_modules/@waterplane/shared/dist/wire/repo.d.ts +131 -0
  199. package/node_modules/@waterplane/shared/dist/wire/repo.js +8 -3
  200. package/node_modules/@waterplane/shared/dist/wire/repo.js.map +1 -1
  201. package/node_modules/@waterplane/shared/dist/wire/sent.d.ts +3 -1
  202. package/node_modules/@waterplane/shared/dist/wire/session/contextspark.d.ts +7 -0
  203. package/node_modules/@waterplane/shared/dist/wire/session/info.d.ts +4 -1
  204. package/node_modules/@waterplane/shared/dist/wire/session/launch.d.ts +36 -0
  205. package/node_modules/@waterplane/shared/dist/wire/session.d.ts +1 -1
  206. package/node_modules/@waterplane/shared/dist/wire/telemetry.d.ts +30 -0
  207. package/node_modules/@waterplane/shared/dist/wire/work.d.ts +13 -0
  208. package/node_modules/@waterplane/shared/dist/wire/work.js.map +1 -1
  209. package/node_modules/@waterplane/shared/dist/wordof.d.ts +11 -0
  210. package/node_modules/@waterplane/shared/dist/wordof.js +14 -0
  211. package/node_modules/@waterplane/shared/dist/wordof.js.map +1 -0
  212. package/npm-shrinkwrap.json +3 -3
  213. package/package.json +2 -2
  214. package/packages/extensions/scorecard/waterplane-plugin.json +10 -0
  215. package/packages/host/dist/agentexposure.d.ts +13 -0
  216. package/packages/host/dist/agentexposure.js +90 -0
  217. package/packages/host/dist/agentexposure.js.map +1 -0
  218. package/packages/host/dist/agentintents.js +7 -8
  219. package/packages/host/dist/agentintents.js.map +1 -1
  220. package/packages/host/dist/agentwatch.d.ts +3 -7
  221. package/packages/host/dist/agentwatch.js.map +1 -1
  222. package/packages/host/dist/alwayson.d.ts +18 -0
  223. package/packages/host/dist/alwayson.js +159 -0
  224. package/packages/host/dist/alwayson.js.map +1 -0
  225. package/packages/host/dist/answergate.d.ts +3 -7
  226. package/packages/host/dist/answergate.js.map +1 -1
  227. package/packages/host/dist/attentionstore.d.ts +94 -0
  228. package/packages/host/dist/attentionstore.js +232 -0
  229. package/packages/host/dist/attentionstore.js.map +1 -0
  230. package/packages/host/dist/backends/claude-sources.d.ts +2 -0
  231. package/packages/host/dist/backends/claude-sources.js +12 -0
  232. package/packages/host/dist/backends/claude-sources.js.map +1 -1
  233. package/packages/host/dist/backends/claude.js +3 -2
  234. package/packages/host/dist/backends/claude.js.map +1 -1
  235. package/packages/host/dist/backends/derive.js +1 -0
  236. package/packages/host/dist/backends/derive.js.map +1 -1
  237. package/packages/host/dist/backends/overhead.d.ts +7 -5
  238. package/packages/host/dist/backends/overhead.js +15 -13
  239. package/packages/host/dist/backends/overhead.js.map +1 -1
  240. package/packages/host/dist/backends/registry.js +4 -1
  241. package/packages/host/dist/backends/registry.js.map +1 -1
  242. package/packages/host/dist/backends/types.d.ts +2 -0
  243. package/packages/host/dist/besidespend.d.ts +22 -0
  244. package/packages/host/dist/besidespend.js +65 -0
  245. package/packages/host/dist/besidespend.js.map +1 -0
  246. package/packages/host/dist/boxkit.d.ts +19 -0
  247. package/packages/host/dist/boxkit.js +38 -0
  248. package/packages/host/dist/boxkit.js.map +1 -0
  249. package/packages/host/dist/branchrules.d.ts +14 -0
  250. package/packages/host/dist/branchrules.js +47 -0
  251. package/packages/host/dist/branchrules.js.map +1 -0
  252. package/packages/host/dist/budget.d.ts +3 -2
  253. package/packages/host/dist/budget.js +5 -3
  254. package/packages/host/dist/budget.js.map +1 -1
  255. package/packages/host/dist/builds.d.ts +31 -1
  256. package/packages/host/dist/builds.js +55 -3
  257. package/packages/host/dist/builds.js.map +1 -1
  258. package/packages/host/dist/buildversions.d.ts +2 -0
  259. package/packages/host/dist/buildversions.js +36 -0
  260. package/packages/host/dist/buildversions.js.map +1 -0
  261. package/packages/host/dist/burnwatch.d.ts +23 -11
  262. package/packages/host/dist/burnwatch.js +57 -3
  263. package/packages/host/dist/burnwatch.js.map +1 -1
  264. package/packages/host/dist/changebrief.d.ts +37 -0
  265. package/packages/host/dist/changebrief.js +157 -0
  266. package/packages/host/dist/changebrief.js.map +1 -0
  267. package/packages/host/dist/cli/index.js +1 -1
  268. package/packages/host/dist/cli/index.js.map +1 -1
  269. package/packages/host/dist/clihealth.d.ts +2 -0
  270. package/packages/host/dist/clihealth.js +11 -2
  271. package/packages/host/dist/clihealth.js.map +1 -1
  272. package/packages/host/dist/compliance.d.ts +5 -1
  273. package/packages/host/dist/compliance.js +70 -31
  274. package/packages/host/dist/compliance.js.map +1 -1
  275. package/packages/host/dist/composer.d.ts +3 -1
  276. package/packages/host/dist/composer.js +3 -1
  277. package/packages/host/dist/composer.js.map +1 -1
  278. package/packages/host/dist/context.js +29 -4
  279. package/packages/host/dist/context.js.map +1 -1
  280. package/packages/host/dist/convlog.d.ts +1 -1
  281. package/packages/host/dist/convlog.js +1 -1
  282. package/packages/host/dist/costwindow.d.ts +25 -0
  283. package/packages/host/dist/costwindow.js +63 -1
  284. package/packages/host/dist/costwindow.js.map +1 -1
  285. package/packages/host/dist/ctxlog/ctxagents.js +16 -25
  286. package/packages/host/dist/ctxlog/ctxagents.js.map +1 -1
  287. package/packages/host/dist/ctxlog/ctxcursor.d.ts +36 -1
  288. package/packages/host/dist/ctxlog/ctxcursor.js +96 -2
  289. package/packages/host/dist/ctxlog/ctxcursor.js.map +1 -1
  290. package/packages/host/dist/ctxlog/ctxproject.js +2 -1
  291. package/packages/host/dist/ctxlog/ctxproject.js.map +1 -1
  292. package/packages/host/dist/ctxlog/ctxupdate.js +30 -24
  293. package/packages/host/dist/ctxlog/ctxupdate.js.map +1 -1
  294. package/packages/host/dist/ctxlog/usagerecord.d.ts +28 -0
  295. package/packages/host/dist/ctxlog/usagerecord.js +81 -0
  296. package/packages/host/dist/ctxlog/usagerecord.js.map +1 -0
  297. package/packages/host/dist/diskwatch.d.ts +4 -6
  298. package/packages/host/dist/diskwatch.js +3 -1
  299. package/packages/host/dist/diskwatch.js.map +1 -1
  300. package/packages/host/dist/eraseen.d.ts +6 -0
  301. package/packages/host/dist/eraseen.js +100 -0
  302. package/packages/host/dist/eraseen.js.map +1 -0
  303. package/packages/host/dist/explainjob.d.ts +24 -0
  304. package/packages/host/dist/explainjob.js +80 -0
  305. package/packages/host/dist/explainjob.js.map +1 -0
  306. package/packages/host/dist/exposure.d.ts +56 -0
  307. package/packages/host/dist/exposure.js +371 -0
  308. package/packages/host/dist/exposure.js.map +1 -0
  309. package/packages/host/dist/exposurepush.d.ts +28 -0
  310. package/packages/host/dist/exposurepush.js +136 -0
  311. package/packages/host/dist/exposurepush.js.map +1 -0
  312. package/packages/host/dist/exposurerun.d.ts +18 -0
  313. package/packages/host/dist/exposurerun.js +126 -0
  314. package/packages/host/dist/exposurerun.js.map +1 -0
  315. package/packages/host/dist/exposurewatch.d.ts +29 -0
  316. package/packages/host/dist/exposurewatch.js +127 -0
  317. package/packages/host/dist/exposurewatch.js.map +1 -0
  318. package/packages/host/dist/extensions/scorecard/host/engine.d.mts +54 -0
  319. package/packages/host/dist/extensions/scorecard/host/engine.mjs +303 -0
  320. package/packages/host/dist/extensions/scorecard/host/engine.mjs.map +1 -0
  321. package/packages/host/dist/extensions/scorecard/host/gitslug.d.mts +5 -0
  322. package/packages/host/dist/extensions/scorecard/host/gitslug.mjs +45 -0
  323. package/packages/host/dist/extensions/scorecard/host/gitslug.mjs.map +1 -0
  324. package/packages/host/dist/extensions/scorecard/host/index.d.mts +15 -0
  325. package/packages/host/dist/extensions/scorecard/host/index.mjs +47 -0
  326. package/packages/host/dist/extensions/scorecard/host/index.mjs.map +1 -0
  327. package/packages/host/dist/extensions/scorecard/host/store.d.mts +12 -0
  328. package/packages/host/dist/extensions/scorecard/host/store.mjs +91 -0
  329. package/packages/host/dist/extensions/scorecard/host/store.mjs.map +1 -0
  330. package/packages/host/dist/extensions/scorecard/shared/logic.d.mts +42 -0
  331. package/packages/host/dist/extensions/scorecard/shared/logic.mjs +170 -0
  332. package/packages/host/dist/extensions/scorecard/shared/logic.mjs.map +1 -0
  333. package/packages/host/dist/extensions/scorecard/shared/wire.d.mts +140 -0
  334. package/packages/host/dist/extensions/scorecard/shared/wire.mjs +29 -0
  335. package/packages/host/dist/extensions/scorecard/shared/wire.mjs.map +1 -0
  336. package/packages/host/dist/files.d.ts +14 -12
  337. package/packages/host/dist/files.js +64 -94
  338. package/packages/host/dist/files.js.map +1 -1
  339. package/packages/host/dist/forge/github.d.ts +3 -0
  340. package/packages/host/dist/forge/github.js +96 -0
  341. package/packages/host/dist/forge/github.js.map +1 -0
  342. package/packages/host/dist/forge/index.d.ts +14 -0
  343. package/packages/host/dist/forge/index.js +32 -0
  344. package/packages/host/dist/forge/index.js.map +1 -0
  345. package/packages/host/dist/forge/types.d.ts +58 -0
  346. package/packages/host/dist/forge/types.js +2 -0
  347. package/packages/host/dist/forge/types.js.map +1 -0
  348. package/packages/host/dist/git.d.ts +41 -16
  349. package/packages/host/dist/git.js +162 -101
  350. package/packages/host/dist/git.js.map +1 -1
  351. package/packages/host/dist/gitnotify.d.ts +54 -0
  352. package/packages/host/dist/gitnotify.js +167 -0
  353. package/packages/host/dist/gitnotify.js.map +1 -0
  354. package/packages/host/dist/healthwatch.d.ts +2 -1
  355. package/packages/host/dist/healthwatch.js +4 -2
  356. package/packages/host/dist/healthwatch.js.map +1 -1
  357. package/packages/host/dist/hoststore.js +2 -2
  358. package/packages/host/dist/hoststore.js.map +1 -1
  359. package/packages/host/dist/intents/adapters.js +68 -19
  360. package/packages/host/dist/intents/adapters.js.map +1 -1
  361. package/packages/host/dist/intents/clock.d.ts +6 -3
  362. package/packages/host/dist/intents/clock.js +19 -5
  363. package/packages/host/dist/intents/clock.js.map +1 -1
  364. package/packages/host/dist/intents/contract.d.ts +15 -5
  365. package/packages/host/dist/intents/contract.js.map +1 -1
  366. package/packages/host/dist/intents/disk.d.ts +16 -0
  367. package/packages/host/dist/intents/disk.js +26 -1
  368. package/packages/host/dist/intents/disk.js.map +1 -1
  369. package/packages/host/dist/intents/fire.js +7 -1
  370. package/packages/host/dist/intents/fire.js.map +1 -1
  371. package/packages/host/dist/intents/ladder.js +3 -1
  372. package/packages/host/dist/intents/ladder.js.map +1 -1
  373. package/packages/host/dist/intents/manager.d.ts +3 -3
  374. package/packages/host/dist/intents/manager.js +2 -2
  375. package/packages/host/dist/intents/manager.js.map +1 -1
  376. package/packages/host/dist/intents/watch.d.ts +27 -3
  377. package/packages/host/dist/intents/watch.js +70 -9
  378. package/packages/host/dist/intents/watch.js.map +1 -1
  379. package/packages/host/dist/intents/write.d.ts +28 -1
  380. package/packages/host/dist/intents/write.js +87 -2
  381. package/packages/host/dist/intents/write.js.map +1 -1
  382. package/packages/host/dist/localcistatus.d.ts +22 -0
  383. package/packages/host/dist/localcistatus.js +105 -0
  384. package/packages/host/dist/localcistatus.js.map +1 -0
  385. package/packages/host/dist/main.js +45 -12
  386. package/packages/host/dist/main.js.map +1 -1
  387. package/packages/host/dist/net.d.ts +2 -0
  388. package/packages/host/dist/net.js +11 -2
  389. package/packages/host/dist/net.js.map +1 -1
  390. package/packages/host/dist/netlog.d.ts +40 -0
  391. package/packages/host/dist/netlog.js +165 -0
  392. package/packages/host/dist/netlog.js.map +1 -0
  393. package/packages/host/dist/netretrycfg.d.ts +7 -0
  394. package/packages/host/dist/netretrycfg.js +51 -0
  395. package/packages/host/dist/netretrycfg.js.map +1 -0
  396. package/packages/host/dist/notifyprefs.d.ts +6 -2
  397. package/packages/host/dist/notifyprefs.js +20 -5
  398. package/packages/host/dist/notifyprefs.js.map +1 -1
  399. package/packages/host/dist/notifytypes.d.ts +63 -0
  400. package/packages/host/dist/notifytypes.js +2 -0
  401. package/packages/host/dist/notifytypes.js.map +1 -0
  402. package/packages/host/dist/opendeliveries.js +24 -0
  403. package/packages/host/dist/opendeliveries.js.map +1 -1
  404. package/packages/host/dist/optins.d.ts +28 -1
  405. package/packages/host/dist/optins.js +96 -4
  406. package/packages/host/dist/optins.js.map +1 -1
  407. package/packages/host/dist/peers/agentpeer.js +1 -1
  408. package/packages/host/dist/peers/agentpeer.js.map +1 -1
  409. package/packages/host/dist/peers/jobs.d.ts +2 -4
  410. package/packages/host/dist/peers/jobs.js +6 -1
  411. package/packages/host/dist/peers/jobs.js.map +1 -1
  412. package/packages/host/dist/periodspend.d.ts +22 -3
  413. package/packages/host/dist/periodspend.js +44 -4
  414. package/packages/host/dist/periodspend.js.map +1 -1
  415. package/packages/host/dist/plugins/pluginapi.js +40 -10
  416. package/packages/host/dist/plugins/pluginapi.js.map +1 -1
  417. package/packages/host/dist/plugins/pluginregistry.d.ts +3 -8
  418. package/packages/host/dist/plugins/pluginregistry.js +1 -1
  419. package/packages/host/dist/plugins/pluginregistry.js.map +1 -1
  420. package/packages/host/dist/plugins/plugintoolkit/sessionof.d.ts +47 -0
  421. package/packages/host/dist/plugins/plugintoolkit/sessionof.js +136 -0
  422. package/packages/host/dist/plugins/plugintoolkit/sessionof.js.map +1 -0
  423. package/packages/host/dist/prmergestore.d.ts +31 -0
  424. package/packages/host/dist/prmergestore.js +106 -0
  425. package/packages/host/dist/prmergestore.js.map +1 -0
  426. package/packages/host/dist/protectmain.d.ts +35 -0
  427. package/packages/host/dist/protectmain.js +73 -0
  428. package/packages/host/dist/protectmain.js.map +1 -0
  429. package/packages/host/dist/prpush.d.ts +38 -0
  430. package/packages/host/dist/prpush.js +351 -0
  431. package/packages/host/dist/prpush.js.map +1 -0
  432. package/packages/host/dist/prs.d.ts +118 -0
  433. package/packages/host/dist/prs.js +681 -0
  434. package/packages/host/dist/prs.js.map +1 -0
  435. package/packages/host/dist/push.d.ts +85 -1
  436. package/packages/host/dist/push.js +238 -8
  437. package/packages/host/dist/push.js.map +1 -1
  438. package/packages/host/dist/pushlanded.d.ts +29 -0
  439. package/packages/host/dist/pushlanded.js +61 -0
  440. package/packages/host/dist/pushlanded.js.map +1 -0
  441. package/packages/host/dist/pushreach.d.ts +9 -0
  442. package/packages/host/dist/pushreach.js +102 -0
  443. package/packages/host/dist/pushreach.js.map +1 -0
  444. package/packages/host/dist/pushverdict.d.ts +42 -0
  445. package/packages/host/dist/pushverdict.js +110 -0
  446. package/packages/host/dist/pushverdict.js.map +1 -0
  447. package/packages/host/dist/render.d.ts +57 -0
  448. package/packages/host/dist/render.js +57 -39
  449. package/packages/host/dist/render.js.map +1 -1
  450. package/packages/host/dist/repohealth.js +5 -2
  451. package/packages/host/dist/repohealth.js.map +1 -1
  452. package/packages/host/dist/repohealthapproval.d.ts +3 -0
  453. package/packages/host/dist/repohealthapproval.js +92 -2
  454. package/packages/host/dist/repohealthapproval.js.map +1 -1
  455. package/packages/host/dist/repos.d.ts +7 -1
  456. package/packages/host/dist/repos.js +30 -3
  457. package/packages/host/dist/repos.js.map +1 -1
  458. package/packages/host/dist/reposkill.d.ts +8 -5
  459. package/packages/host/dist/reposkill.js +16 -11
  460. package/packages/host/dist/reposkill.js.map +1 -1
  461. package/packages/host/dist/reposkilltext.d.ts +8 -1
  462. package/packages/host/dist/reposkilltext.js +85 -12
  463. package/packages/host/dist/reposkilltext.js.map +1 -1
  464. package/packages/host/dist/routes/apigitspend.d.ts +2 -0
  465. package/packages/host/dist/routes/apigitspend.js +40 -0
  466. package/packages/host/dist/routes/apigitspend.js.map +1 -0
  467. package/packages/host/dist/routes/apihost.js +17 -0
  468. package/packages/host/dist/routes/apihost.js.map +1 -1
  469. package/packages/host/dist/routes/apiprs.d.ts +2 -0
  470. package/packages/host/dist/routes/apiprs.js +47 -0
  471. package/packages/host/dist/routes/apiprs.js.map +1 -0
  472. package/packages/host/dist/routes/apirepofiles.js +13 -1
  473. package/packages/host/dist/routes/apirepofiles.js.map +1 -1
  474. package/packages/host/dist/routes/apirepowork.d.ts +6 -0
  475. package/packages/host/dist/routes/apirepowork.js +42 -33
  476. package/packages/host/dist/routes/apirepowork.js.map +1 -1
  477. package/packages/host/dist/routes/apiroutes.js +2 -1
  478. package/packages/host/dist/routes/apiroutes.js.map +1 -1
  479. package/packages/host/dist/routes/apisession.js +24 -0
  480. package/packages/host/dist/routes/apisession.js.map +1 -1
  481. package/packages/host/dist/routes/apistats.js +12 -7
  482. package/packages/host/dist/routes/apistats.js.map +1 -1
  483. package/packages/host/dist/routes/apisystem.js +23 -1
  484. package/packages/host/dist/routes/apisystem.js.map +1 -1
  485. package/packages/host/dist/routes/apitable.d.ts +10 -0
  486. package/packages/host/dist/routes/apitable.js.map +1 -1
  487. package/packages/host/dist/routes/apiweekburn.d.ts +2 -0
  488. package/packages/host/dist/routes/apiweekburn.js +30 -0
  489. package/packages/host/dist/routes/apiweekburn.js.map +1 -0
  490. package/packages/host/dist/routes/session.js +10 -0
  491. package/packages/host/dist/routes/session.js.map +1 -1
  492. package/packages/host/dist/routes/system.js +34 -6
  493. package/packages/host/dist/routes/system.js.map +1 -1
  494. package/packages/host/dist/routes/types.d.ts +29 -21
  495. package/packages/host/dist/routes/work/workbuild.js +3 -2
  496. package/packages/host/dist/routes/work/workbuild.js.map +1 -1
  497. package/packages/host/dist/routes/work/workintent.js +6 -2
  498. package/packages/host/dist/routes/work/workintent.js.map +1 -1
  499. package/packages/host/dist/routes/work/workschedule.js +33 -3
  500. package/packages/host/dist/routes/work/workschedule.js.map +1 -1
  501. package/packages/host/dist/screenlog.d.ts +20 -0
  502. package/packages/host/dist/screenlog.js +40 -0
  503. package/packages/host/dist/screenlog.js.map +1 -1
  504. package/packages/host/dist/server/billingwire.d.ts +3 -1
  505. package/packages/host/dist/server/billingwire.js +4 -2
  506. package/packages/host/dist/server/billingwire.js.map +1 -1
  507. package/packages/host/dist/server/clients.d.ts +14 -24
  508. package/packages/host/dist/server/clients.js +81 -11
  509. package/packages/host/dist/server/clients.js.map +1 -1
  510. package/packages/host/dist/server/ctx.d.ts +2 -0
  511. package/packages/host/dist/server/ctxseal.d.ts +1 -1
  512. package/packages/host/dist/server/ctxseal.js +6 -6
  513. package/packages/host/dist/server/ctxseal.js.map +1 -1
  514. package/packages/host/dist/server/deliveries.js +4 -2
  515. package/packages/host/dist/server/deliveries.js.map +1 -1
  516. package/packages/host/dist/server/http.js +2 -2
  517. package/packages/host/dist/server/http.js.map +1 -1
  518. package/packages/host/dist/server/intentDeps.js +13 -6
  519. package/packages/host/dist/server/intentDeps.js.map +1 -1
  520. package/packages/host/dist/server/intentEvents.js +9 -4
  521. package/packages/host/dist/server/intentEvents.js.map +1 -1
  522. package/packages/host/dist/server/scan.js +23 -1
  523. package/packages/host/dist/server/scan.js.map +1 -1
  524. package/packages/host/dist/server/sessionEvents.js +40 -15
  525. package/packages/host/dist/server/sessionEvents.js.map +1 -1
  526. package/packages/host/dist/server/shutdown.d.ts +3 -1
  527. package/packages/host/dist/server/shutdown.js +9 -1
  528. package/packages/host/dist/server/shutdown.js.map +1 -1
  529. package/packages/host/dist/sessionbudget.d.ts +2 -0
  530. package/packages/host/dist/sessionbudget.js +17 -6
  531. package/packages/host/dist/sessionbudget.js.map +1 -1
  532. package/packages/host/dist/sessions/agentpoll.d.ts +42 -0
  533. package/packages/host/dist/sessions/agentpoll.js +193 -0
  534. package/packages/host/dist/sessions/agentpoll.js.map +1 -0
  535. package/packages/host/dist/sessions/apiretry.d.ts +106 -0
  536. package/packages/host/dist/sessions/apiretry.js +387 -0
  537. package/packages/host/dist/sessions/apiretry.js.map +1 -0
  538. package/packages/host/dist/sessions/askwatch.d.ts +62 -0
  539. package/packages/host/dist/sessions/askwatch.js +169 -0
  540. package/packages/host/dist/sessions/askwatch.js.map +1 -0
  541. package/packages/host/dist/sessions/boxes.d.ts +2 -23
  542. package/packages/host/dist/sessions/boxes.js +10 -664
  543. package/packages/host/dist/sessions/boxes.js.map +1 -1
  544. package/packages/host/dist/sessions/boxread.d.ts +47 -0
  545. package/packages/host/dist/sessions/boxread.js +628 -0
  546. package/packages/host/dist/sessions/boxread.js.map +1 -0
  547. package/packages/host/dist/sessions/core.d.ts +22 -1
  548. package/packages/host/dist/sessions/ctxseries.js +3 -0
  549. package/packages/host/dist/sessions/ctxseries.js.map +1 -1
  550. package/packages/host/dist/sessions/drive.d.ts +20 -6
  551. package/packages/host/dist/sessions/drive.js +45 -12
  552. package/packages/host/dist/sessions/drive.js.map +1 -1
  553. package/packages/host/dist/sessions/endsession.d.ts +11 -0
  554. package/packages/host/dist/sessions/endsession.js +71 -0
  555. package/packages/host/dist/sessions/endsession.js.map +1 -0
  556. package/packages/host/dist/sessions/haltall.d.ts +14 -0
  557. package/packages/host/dist/sessions/haltall.js +32 -1
  558. package/packages/host/dist/sessions/haltall.js.map +1 -1
  559. package/packages/host/dist/sessions/knobs.d.ts +11 -0
  560. package/packages/host/dist/sessions/knobs.js +12 -0
  561. package/packages/host/dist/sessions/knobs.js.map +1 -1
  562. package/packages/host/dist/sessions/record.js +7 -2
  563. package/packages/host/dist/sessions/record.js.map +1 -1
  564. package/packages/host/dist/sessions/resume.d.ts +17 -0
  565. package/packages/host/dist/sessions/resume.js +65 -11
  566. package/packages/host/dist/sessions/resume.js.map +1 -1
  567. package/packages/host/dist/sessions/roster.js +3 -0
  568. package/packages/host/dist/sessions/roster.js.map +1 -1
  569. package/packages/host/dist/sessions/sidechannel.d.ts +1 -1
  570. package/packages/host/dist/sessions/sidechannel.js +2 -2
  571. package/packages/host/dist/sessions/tmux.js +21 -2
  572. package/packages/host/dist/sessions/tmux.js.map +1 -1
  573. package/packages/host/dist/sessions/turn.d.ts +15 -58
  574. package/packages/host/dist/sessions/turn.js +19 -358
  575. package/packages/host/dist/sessions/turn.js.map +1 -1
  576. package/packages/host/dist/sessions.d.ts +10 -7
  577. package/packages/host/dist/sessions.js +31 -79
  578. package/packages/host/dist/sessions.js.map +1 -1
  579. package/packages/host/dist/settle.d.ts +30 -2
  580. package/packages/host/dist/settle.js +94 -49
  581. package/packages/host/dist/settle.js.map +1 -1
  582. package/packages/host/dist/setupprefs.d.ts +26 -1
  583. package/packages/host/dist/setupprefs.js +49 -1
  584. package/packages/host/dist/setupprefs.js.map +1 -1
  585. package/packages/host/dist/setupwatch.d.ts +10 -8
  586. package/packages/host/dist/setupwatch.js +19 -16
  587. package/packages/host/dist/setupwatch.js.map +1 -1
  588. package/packages/host/dist/sidecar/sidecarname.d.ts +2 -0
  589. package/packages/host/dist/sidecar/sidecarname.js +5 -1
  590. package/packages/host/dist/sidecar/sidecarname.js.map +1 -1
  591. package/packages/host/dist/sidecar/sidecarroute.d.ts +1 -1
  592. package/packages/host/dist/sidecar/sidecarroute.js +5 -0
  593. package/packages/host/dist/sidecar/sidecarroute.js.map +1 -1
  594. package/packages/host/dist/sidecar.d.ts +1 -1
  595. package/packages/host/dist/sidecar.js +1 -1
  596. package/packages/host/dist/sidecar.js.map +1 -1
  597. package/packages/host/dist/tokenscan.d.ts +4 -4
  598. package/packages/host/dist/tokenscan.js +18 -37
  599. package/packages/host/dist/tokenscan.js.map +1 -1
  600. package/packages/host/dist/tokenstats.js +16 -18
  601. package/packages/host/dist/tokenstats.js.map +1 -1
  602. package/packages/host/dist/transcript/transcriptparse.js +17 -26
  603. package/packages/host/dist/transcript/transcriptparse.js.map +1 -1
  604. package/packages/host/dist/transcript/transcriptturns.d.ts +29 -0
  605. package/packages/host/dist/transcript/transcriptturns.js +27 -0
  606. package/packages/host/dist/transcript/transcriptturns.js.map +1 -1
  607. package/packages/host/dist/transcript.d.ts +1 -1
  608. package/packages/host/dist/transcript.js +1 -1
  609. package/packages/host/dist/transcript.js.map +1 -1
  610. package/packages/host/dist/usagesources.d.ts +1 -1
  611. package/packages/host/dist/usagesources.js +7 -2
  612. package/packages/host/dist/usagesources.js.map +1 -1
  613. package/packages/host/dist/visualskill.js +2 -2
  614. package/packages/host/dist/weekburn.d.ts +79 -0
  615. package/packages/host/dist/weekburn.js +276 -0
  616. package/packages/host/dist/weekburn.js.map +1 -0
  617. package/packages/host/dist/worktreeleftover.d.ts +9 -0
  618. package/packages/host/dist/worktreeleftover.js +17 -1
  619. package/packages/host/dist/worktreeleftover.js.map +1 -1
  620. package/packages/web/dist/assets/demo-DsZGy-MC.js +24 -0
  621. package/packages/web/dist/assets/icons-eqlvjswV.js +1 -0
  622. package/packages/web/dist/assets/index-GHwJuQb3.js +169 -0
  623. package/packages/web/dist/assets/index-VzDSZwwH.css +1 -0
  624. package/packages/web/dist/assets/shared-BWk5jXWb.js +49 -0
  625. package/packages/web/dist/assets/sheets-Dj-0m0DB.js +232 -0
  626. package/packages/web/dist/assets/{sheets-Bjv2L-cG.css → sheets-DoUhPGK0.css} +1 -1
  627. package/packages/web/dist/build-id.txt +1 -1
  628. package/packages/web/dist/buildstamp.json +1 -0
  629. package/packages/web/dist/index.html +7 -7
  630. package/packages/web/dist/sw.js +18 -3
  631. package/release.json +7 -4
  632. package/scripts/windows/wsl-setup.sh +10 -1
  633. package/tools/repohealth/constants.mjs +21 -1
  634. package/tools/repohealth/fixture.json +493 -30
  635. package/tools/repohealth/lang/typescript-resolve.mjs +354 -0
  636. package/tools/repohealth/metrics/graph.mjs +258 -0
  637. package/tools/repohealth/metrics/size.mjs +1 -1
  638. package/tools/repohealth/own.mjs +4 -4
  639. package/tools/repohealth/packs/c.mjs +4 -0
  640. package/tools/repohealth/packs/common.mjs +4 -0
  641. package/tools/repohealth/packs/dart.mjs +4 -0
  642. package/tools/repohealth/packs/kotlin.mjs +8 -0
  643. package/tools/repohealth/packs/python.mjs +8 -0
  644. package/tools/repohealth/packs/shell.mjs +4 -0
  645. package/tools/repohealth/packs/typescript.mjs +278 -7
  646. package/tools/repohealth/readings.mjs +39 -0
  647. package/tools/repohealth/series.mjs +1 -0
  648. package/tools/repohealth/snapshot.mjs +14 -0
  649. package/tools/repohealth/types.mjs +12 -0
  650. package/tools/repohealth.mjs +2 -0
  651. package/packages/web/dist/assets/demo-CXlqlYE4.js +0 -23
  652. package/packages/web/dist/assets/icons-BbqDBVjw.js +0 -1
  653. package/packages/web/dist/assets/index-CgPoyb3Y.css +0 -1
  654. package/packages/web/dist/assets/index-D5JKj8DK.js +0 -169
  655. package/packages/web/dist/assets/shared-eyaskl5l.js +0 -47
  656. package/packages/web/dist/assets/sheets-BzzL2re1.js +0 -204
@@ -0,0 +1,357 @@
1
+ /** Built-in accepts, merged UNDER the accepts file's (the file wins). Keys are what parse.mjs emits. */
2
+ export const PRE_ACCEPTED = {
3
+ "A2:node-pty": { reason: "node-pty is pinned to a pre-release on purpose (SECURITY.md)", at: "2026-10-26" },
4
+ "A5:web-push": { reason: "MPL-2.0, accepted on purpose", at: "2026-10-26" },
5
+ };
6
+ /** Semver-ish compare (-1/0/1); a pre-release sorts below its release, `v` and `+build` ignored. */
7
+ export function semverCmp(a, b) {
8
+ const split = (s) => {
9
+ const [core = "", ...rest] = String(s).trim().replace(/^v/, "").split("+")[0].split("-");
10
+ return { nums: core.split(".").map((n) => parseInt(n, 10) || 0), pre: rest.length ? rest.join("-").split(".") : null };
11
+ };
12
+ const x = split(a), y = split(b);
13
+ for (let i = 0; i < Math.max(x.nums.length, y.nums.length); i++) {
14
+ const d = (x.nums[i] ?? 0) - (y.nums[i] ?? 0);
15
+ if (d)
16
+ return d < 0 ? -1 : 1;
17
+ }
18
+ if (!x.pre && !y.pre)
19
+ return 0;
20
+ if (!x.pre)
21
+ return 1;
22
+ if (!y.pre)
23
+ return -1;
24
+ for (let i = 0; i < Math.max(x.pre.length, y.pre.length); i++) {
25
+ const p = x.pre[i], q = y.pre[i];
26
+ if (p === undefined)
27
+ return -1;
28
+ if (q === undefined)
29
+ return 1;
30
+ const pn = /^\d+$/.test(p), qn = /^\d+$/.test(q);
31
+ if (pn && qn) {
32
+ if (+p !== +q)
33
+ return +p < +q ? -1 : 1;
34
+ }
35
+ else if (pn !== qn)
36
+ return pn ? -1 : 1;
37
+ else if (p !== q)
38
+ return p < q ? -1 : 1;
39
+ }
40
+ return 0;
41
+ }
42
+ /** What a triage mark sticks to: the crash group when there is one, else the finding key. */
43
+ export const exposureTriageId = (f) => f.group ?? f.key;
44
+ const toMs = (d) => (d instanceof Date ? d.getTime() : Date.parse(d));
45
+ /** Is this accept still live for this finding? Every condition it names must hold; none => forever. */
46
+ export function acceptLive(f, a, now) {
47
+ const u = a.until;
48
+ if (!u)
49
+ return true;
50
+ if (u.version !== undefined && f.version && semverCmp(f.version, u.version) > 0)
51
+ return false;
52
+ if (u.date !== undefined && !(toMs(u.date) > toMs(now)))
53
+ return false;
54
+ if (u.change !== undefined && u.change !== f.text)
55
+ return false;
56
+ return true;
57
+ }
58
+ /** Set `accepted` on every finding with a live accept; PRE_ACCEPTED sits under the file's (file wins). */
59
+ export function applyAccepts(findings, accepts, now) {
60
+ const all = { ...PRE_ACCEPTED, ...(accepts ?? {}) };
61
+ // A key that embeds its version (`A3:left-pad@1.2.3`) changes on every patch release, so an
62
+ // accept "until a version newer than X" is also found by its stem, `A3:left-pad`.
63
+ const byStem = new Map();
64
+ for (const [k, a] of Object.entries(all)) {
65
+ const stem = exposureVersionStem(k);
66
+ if (stem && a.until?.version !== undefined)
67
+ byStem.set(stem, a);
68
+ }
69
+ return findings.map((f) => {
70
+ let a = Object.hasOwn(all, f.key) ? all[f.key] : undefined;
71
+ if (!a) {
72
+ const stem = exposureVersionStem(f.key);
73
+ a = stem ? byStem.get(stem) : undefined;
74
+ }
75
+ if (!a || !acceptLive(f, a, now)) {
76
+ const { accepted: _x, ...rest } = f;
77
+ return rest;
78
+ }
79
+ return { ...f, accepted: { reason: a.reason, at: a.at, ...(a.until ? { until: a.until } : {}) } };
80
+ });
81
+ }
82
+ const dayOf = (at) => (/^\d{4}-\d{2}-\d{2}/.exec(String(at)) ?? [String(at)])[0];
83
+ const whoWords = (t) => t.by?.kind === "agent" ? `agent session${t.by.repo ? ` in ${t.by.repo}` : ""}` : "you";
84
+ const str = (v, max = 200) => typeof v === "string" && v.length > 0 && v.length <= max;
85
+ /**
86
+ * Clean a parsed triage file: keep the entries that are well-formed marks, drop the rest (a hand edit, a shape from
87
+ * another version). Never throws; a dropped entry reads as "no mark", never as a thrown checklist or sweep.
88
+ */
89
+ export function cleanTriageFile(v) {
90
+ const out = {};
91
+ if (!v || typeof v !== "object" || Array.isArray(v))
92
+ return out;
93
+ for (const [id, raw] of Object.entries(v)) {
94
+ if (!raw || typeof raw !== "object" || Array.isArray(raw))
95
+ continue;
96
+ const t = raw;
97
+ if (t.state !== "seen" && t.state !== "investigating" && t.state !== "fixed")
98
+ continue;
99
+ if (!str(t.at, 64))
100
+ continue;
101
+ const by = t.by;
102
+ let who;
103
+ if (by && typeof by === "object" && by.kind === "person")
104
+ who = { kind: "person" };
105
+ else if (by && typeof by === "object" && by.kind === "agent") {
106
+ who = { kind: "agent", ...(str(by.session) ? { session: by.session } : {}), ...(str(by.repo) ? { repo: by.repo } : {}) };
107
+ }
108
+ else
109
+ continue;
110
+ if (t.state === "fixed" && !str(t.fixedIn, 32))
111
+ continue;
112
+ out[id] = {
113
+ state: t.state, at: t.at, by: who,
114
+ ...(t.state === "fixed" ? { fixedIn: t.fixedIn } : {}),
115
+ ...(str(t.commit, 40) ? { commit: t.commit } : {}),
116
+ ...(str(t.note, 280) ? { note: t.note } : {}),
117
+ ...(str(t.markedVersion, 64) ? { markedVersion: t.markedVersion } : {}),
118
+ };
119
+ }
120
+ return out;
121
+ }
122
+ /** The sentence a seen / investigating / fixed mark adds to a finding's row. */
123
+ export function triageWords(t) {
124
+ if (t.state === "fixed") {
125
+ return `fixed${t.fixedIn ? ` in ${t.fixedIn}` : ""}${t.commit ? ` (commit ${t.commit})` : ""}, ${whoWords(t)}, ${dayOf(t.at)}${t.note ? `: ${t.note}` : ""}`;
126
+ }
127
+ return `${t.state} \u2014 ${whoWords(t)}, ${dayOf(t.at)}${t.note ? `: ${t.note}` : ""}`;
128
+ }
129
+ /**
130
+ * Apply triage marks (pure). seen / investigating: still open, carries `triage`. fixed + `appVersion` older than
131
+ * `fixedIn`: listed as `accepted` (not counted, never pushed) with words saying installs still report it. fixed with
132
+ * no `appVersion` or no `fixedIn`: not counted while the triage id matches (a finding whose key changes is a new one).
133
+ * fixed + `appVersion` >= `fixedIn`: a REGRESSION, stays an alert with its text prefixed. An existing accept is kept.
134
+ */
135
+ export function applyTriage(findings, triage) {
136
+ if (!triage)
137
+ return findings;
138
+ return findings.map((f) => {
139
+ const id = exposureTriageId(f);
140
+ const t = Object.hasOwn(triage, id) ? triage[id] : undefined;
141
+ if (!t || (t.state !== "seen" && t.state !== "investigating" && t.state !== "fixed"))
142
+ return f;
143
+ if (t.state !== "fixed")
144
+ return { ...f, triage: t };
145
+ const older = !!f.appVersion && !!t.fixedIn && semverCmp(f.appVersion, t.fixedIn) < 0;
146
+ if (f.appVersion && t.fixedIn && !older) {
147
+ return { ...f, triage: t, text: `crashes again in ${f.appVersion} after the fix in ${t.fixedIn}: ${f.text}` };
148
+ }
149
+ if (f.accepted)
150
+ return { ...f, triage: t };
151
+ const reason = older
152
+ ? `${triageWords(t)}; installs on ${f.appVersion} still report it`
153
+ : `${triageWords(t)}; not counted until the reading changes`;
154
+ return { ...f, triage: t, accepted: { reason, at: t.at, byMark: true } };
155
+ });
156
+ }
157
+ /** `<measure>:<subject>@<version>` without its `@<version>`; null for `adv:` keys and keys with no version. */
158
+ export function exposureVersionStem(key) {
159
+ if (key.startsWith("adv:"))
160
+ return null;
161
+ const colon = key.indexOf(":");
162
+ const at = key.lastIndexOf("@");
163
+ return colon > 0 && at > colon + 1 ? key.slice(0, at) : null;
164
+ }
165
+ /** The last parseable JSON line of a JSONL string; a torn last line (a crash mid-append) is skipped. */
166
+ export function readLastRow(text) {
167
+ const lines = String(text ?? "").split("\n");
168
+ for (let i = lines.length - 1; i >= 0; i--) {
169
+ if (!lines[i].trim())
170
+ continue;
171
+ try {
172
+ const v = JSON.parse(lines[i]);
173
+ if (v && typeof v === "object")
174
+ return v;
175
+ }
176
+ catch { /* torn line: try the one before */ }
177
+ }
178
+ return null;
179
+ }
180
+ /**
181
+ * The line each measure crosses, in words, for the row's detail. Code defaults, one phrase per
182
+ * measure id the collector emits; a measure not listed has NO threshold text (absent, never made up).
183
+ */
184
+ export const EXPOSURE_THRESHOLD = {
185
+ A1: "a published advisory against an installed version",
186
+ A2: "a stable release newer than a pre-release pin",
187
+ A3: "a direct dependency marked deprecated",
188
+ A4: "a package that gained an install script",
189
+ A5: "a licence off the allow-list",
190
+ A6: "a dependency a major version behind",
191
+ A7: "a runtime within 90 days of end of life",
192
+ B1: "an open Dependabot alert (high or critical, or open over 14 days)",
193
+ B2: "secret scanning or push protection changed, or a new alert",
194
+ B3: "Dependabot security updates changed",
195
+ B4: "branch protection on main changed",
196
+ B5: "the workflow token default became write",
197
+ B6: "the organisation's 2FA requirement changed",
198
+ B7: "a repo with dependency manifests and no Dependabot config",
199
+ C1: "the published npm package no longer verifies",
200
+ C2: "a release asset or the APK signer does not match",
201
+ C3: "the Marketplace listing is behind the latest release or unlisted",
202
+ C5: "a privacy-policy URL does not answer 200",
203
+ C6: "the domain expires within 45 days",
204
+ C7: "npm 2FA and the trusted publisher not confirmed by hand for 12 months",
205
+ D1: "targetSdk below the API Play requires within 60 days",
206
+ D2: "a user-perceived crash rate over 1.09% or ANR rate over 0.47%",
207
+ D3: "a Connect IQ crash group the ERA check reports, or one that grew tenfold",
208
+ };
209
+ export const EXPOSURE_SUMMARY_ID = "exposure";
210
+ /**
211
+ * The fix the `B4:default-branch` finding (no ruleset, no protection) offers: the host creates the
212
+ * owner's two standard rulesets on GitHub (`protectmain.ts`). Confirm-gated — it changes the remote.
213
+ */
214
+ export const PROTECT_MAIN_FIX = "protect-main";
215
+ const PROTECT_MAIN_KEY = "B4:default-branch";
216
+ /**
217
+ * The fix every open D3 (Connect IQ crash group) finding offers: the host runs the daily runner's
218
+ * `era-seen`, which has the ERA checker record EVERY group it lists as seen (its own `--mark-seen`;
219
+ * a group that grows or recurs comes back) and then reads again. One button per row, one effect for
220
+ * all of them — the confirm words say "every". Confirm-gated: it marks findings handled in bulk.
221
+ */
222
+ export const ERA_SEEN_FIX = "era-seen";
223
+ const CHECK_PREFIX = "exposure:";
224
+ /**
225
+ * Whether a checklist row belongs to the readings sheet's `watch` region (the daily outside view:
226
+ * advisories, stores, Scorecard) rather than the set-up conventions. The ONE spelling of the split —
227
+ * both regions, their counts and their bulk buttons cut on it.
228
+ */
229
+ export const isWatchCheck = (c) => c.watch === true || !!c.exposure || c.id === EXPOSURE_SUMMARY_ID;
230
+ /** The finding key inside a check id (inverse of `exposureCheckId`); null when the id is not one. */
231
+ export const exposureKeyOf = (id) => id.startsWith(CHECK_PREFIX) && id.length > CHECK_PREFIX.length ? id.slice(CHECK_PREFIX.length) : null;
232
+ /** The checklist row id of one finding: the prefix is how the host knows an accept request is ours. */
233
+ export const exposureCheckId = (key) => CHECK_PREFIX + key;
234
+ const DAY_MS = 86_400_000;
235
+ /** "3 hours ago" / "2 days ago": plain words, no precision a daily job cannot back up. */
236
+ function ageWords(ms) {
237
+ if (ms < 90 * 60_000)
238
+ return `${Math.max(1, Math.round(ms / 60_000))} minutes ago`;
239
+ if (ms < 36 * 3_600_000)
240
+ return `${Math.round(ms / 3_600_000)} hours ago`;
241
+ return `${Math.round(ms / DAY_MS)} days ago`;
242
+ }
243
+ /**
244
+ * One exposure row as setup-checklist rows: a summary first, then one per finding. Accepted
245
+ * findings are still sent (marked `accepted`); the phone draws them folded, so "stop accepting"
246
+ * never has to guess what the row would have said.
247
+ */
248
+ export function exposureChecks(row, name, accepts, now, opts, triage) {
249
+ const staleMs = opts?.staleMs ?? 2 * DAY_MS;
250
+ const findings = applyTriage(applyAccepts(row.findings ?? [], accepts, now), triage);
251
+ const open = findings.filter((f) => !f.accepted);
252
+ const alerts = open.filter((f) => f.level === "alert").length;
253
+ const digest = open.length - alerts;
254
+ const accepted = findings.length - open.length;
255
+ const absent = row.absent ?? [];
256
+ // Marks whose group is not in this reading: kept (the group may return), listed so a person can clear them.
257
+ const here = new Set((row.findings ?? []).map(exposureTriageId));
258
+ const staleMarks = Object.entries(triage ?? {}).filter(([id]) => !here.has(id)).map(([triageId, t]) => ({ triageId, triage: t }));
259
+ const age = toMs(now) - Date.parse(row.at);
260
+ const known = Number.isFinite(age);
261
+ const fresh = known && age <= staleMs;
262
+ const parts = [
263
+ known ? `Read ${ageWords(Math.max(0, age))}${fresh ? "" : " (older than the daily reading should be)"}.` : "When this was read is unknown.",
264
+ `${alerts} open alert${alerts === 1 ? "" : "s"}, ${digest} to consider, ${accepted} accepted.`,
265
+ ...absent.map((a) => `Not measured, ${a.measure}: ${a.why}.`),
266
+ ];
267
+ const out = [{
268
+ id: EXPOSURE_SUMMARY_ID, label: "Exposure watch", status: fresh && !absent.length ? "pass" : "warn",
269
+ detail: parts.join(" "), fix: null, advisory: true,
270
+ ...(staleMarks.length ? { staleMarks } : {}),
271
+ }];
272
+ for (const f of findings) {
273
+ const check = {
274
+ id: exposureCheckId(f.key),
275
+ label: `${f.measure} ${f.subject}${f.version ? "@" + f.version : ""}`,
276
+ status: f.level === "alert" ? (f.severity === "critical" || f.severity === "high" ? "fail" : "warn") : "warn",
277
+ detail: f.triage && f.triage.state !== "fixed" ? `${f.text} (${triageWords(f.triage)})` : f.text,
278
+ fix: f.accepted ? null : f.key === PROTECT_MAIN_KEY ? PROTECT_MAIN_FIX : f.measure === "D3" ? ERA_SEEN_FIX : null,
279
+ ...(f.level === "digest" ? { advisory: true } : {}),
280
+ };
281
+ if (f.accepted) {
282
+ const builtIn = Object.hasOwn(PRE_ACCEPTED, f.key) && !(accepts && Object.hasOwn(accepts, f.key));
283
+ check.accepted = { ...f.accepted, ...(builtIn ? { builtIn: true } : {}) };
284
+ }
285
+ const threshold = Object.hasOwn(EXPOSURE_THRESHOLD, f.measure) ? EXPOSURE_THRESHOLD[f.measure] : undefined;
286
+ check.exposure = {
287
+ key: f.key, name, measure: f.measure, subject: f.subject,
288
+ ...(f.version ? { version: f.version } : {}),
289
+ ...(f.severity ? { severity: f.severity } : {}),
290
+ level: f.level, sources: f.sources,
291
+ ...(f.since ? { since: f.since } : {}),
292
+ ...(f.group ? { group: f.group } : {}),
293
+ ...(f.appVersion ? { appVersion: f.appVersion } : {}),
294
+ ...(f.triage ? { triage: f.triage } : {}),
295
+ ...(threshold ? { threshold } : {}),
296
+ };
297
+ out.push(check);
298
+ }
299
+ return out;
300
+ }
301
+ /** Validate one accept request body: ours, with words for why not. Nothing is stored here. */
302
+ export function cleanAcceptRequest(body, now = new Date()) {
303
+ const no = (error) => ({ ok: false, error });
304
+ if (!body || typeof body !== "object" || Array.isArray(body))
305
+ return no("Send an object with an id and accept.");
306
+ const b = body;
307
+ const id = b.id;
308
+ if (typeof id !== "string" || !id.startsWith(CHECK_PREFIX) || id.length === CHECK_PREFIX.length) {
309
+ return no("That row is not an exposure finding; only those can be accepted.");
310
+ }
311
+ if (typeof b.accept !== "boolean")
312
+ return no("Say whether to accept (true) or stop accepting (false).");
313
+ if (!b.accept)
314
+ return { ok: true, value: { id, accept: false } };
315
+ const reason = typeof b.reason === "string" ? b.reason.trim() : "";
316
+ if (!reason)
317
+ return no("Say why you accept it: a reason is required.");
318
+ if (reason.length > 500)
319
+ return no("Keep the reason under 500 characters.");
320
+ const value = { id, accept: true, reason };
321
+ if (b.until !== undefined && b.until !== null) {
322
+ const u = b.until;
323
+ if (typeof u !== "object" || Array.isArray(u))
324
+ return no("until must be a version, a date or a change.");
325
+ const keys = Object.keys(u);
326
+ if (keys.length !== 1)
327
+ return no("Give exactly one end for the accept: a version, a date or a change.");
328
+ const [k] = keys;
329
+ const v = u[k];
330
+ if (k === "version") {
331
+ if (typeof v !== "string" || !v.trim())
332
+ return no("The version to accept up to is empty.");
333
+ const ver = v.trim();
334
+ if (ver.length > 64 || !/^v?\d+(\.\d+){0,3}([-+][0-9A-Za-z.-]+)?$/.test(ver)) {
335
+ return no("That does not read as a version (like 2.0.0, at most 64 characters).");
336
+ }
337
+ value.until = { version: ver };
338
+ }
339
+ else if (k === "date") {
340
+ const ms = typeof v === "string" ? Date.parse(v) : NaN;
341
+ if (!Number.isFinite(ms))
342
+ return no("That date does not read as a date.");
343
+ if (!(ms > toMs(now)))
344
+ return no("That date is already past; pick one in the future.");
345
+ value.until = { date: v };
346
+ }
347
+ else if (k === "change") {
348
+ if (v !== true)
349
+ return no("change must be true.");
350
+ value.until = { change: true };
351
+ }
352
+ else
353
+ return no("until must be a version, a date or a change.");
354
+ }
355
+ return { ok: true, value };
356
+ }
357
+ //# sourceMappingURL=exposure.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exposure.js","sourceRoot":"","sources":["../src/exposure.ts"],"names":[],"mappings":"AAyEA,wGAAwG;AACxG,MAAM,CAAC,MAAM,YAAY,GAAmC;IAC1D,aAAa,EAAE,EAAE,MAAM,EAAE,8DAA8D,EAAE,EAAE,EAAE,YAAY,EAAE;IAC3G,aAAa,EAAE,EAAE,MAAM,EAAE,8BAA8B,EAAE,EAAE,EAAE,YAAY,EAAE;CAC5E,CAAC;AAEF,oGAAoG;AACpG,MAAM,UAAU,SAAS,CAAC,CAAS,EAAE,CAAS;IAC5C,MAAM,KAAK,GAAG,CAAC,CAAS,EAAE,EAAE;QAC1B,MAAM,CAAC,IAAI,GAAG,EAAE,EAAE,GAAG,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC1F,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IACzH,CAAC,CAAC;IACF,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IACjC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,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7E,OAAO,EAAE,CAAC,sEAAsE,CAAC,CAAC;YACpF,CAAC;YACD,KAAK,CAAC,KAAK,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;QACjC,CAAC;aAAM,IAAI,CAAC,KAAK,MAAM,EAAE,CAAC;YACxB,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;YACvD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;gBAAE,OAAO,EAAE,CAAC,oCAAoC,CAAC,CAAC;YAC1E,IAAI,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;gBAAE,OAAO,EAAE,CAAC,oDAAoD,CAAC,CAAC;YACvF,KAAK,CAAC,KAAK,GAAG,EAAE,IAAI,EAAE,CAAW,EAAE,CAAC;QACtC,CAAC;aAAM,IAAI,CAAC,KAAK,QAAQ,EAAE,CAAC;YAC1B,IAAI,CAAC,KAAK,IAAI;gBAAE,OAAO,EAAE,CAAC,sBAAsB,CAAC,CAAC;YAClD,KAAK,CAAC,KAAK,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACjC,CAAC;;YAAM,OAAO,EAAE,CAAC,8CAA8C,CAAC,CAAC;IACnE,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;AAC7B,CAAC"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * **Which exposure findings earn a push, and which keys the host must remember.** The watch's
3
+ * promise (proposal §2-3): an ALERT is a push the same day, one per new finding, keyed
4
+ * (repo, measure, subject, version). Pure, no clock but the `now` handed in, no file reads — the
5
+ * host (`exposurepush.ts`) owns the store and the sending.
6
+ *
7
+ * - **Pushed once FOREVER.** The remembered set is never pruned: an accept that lapses, or a
8
+ * finding that clears and comes back with the same key, does not push a second time.
9
+ * - **Seeding is silent, per repo.** The store carries a `repos` marker: the first time the sweep
10
+ * sees a repo as WATCHED (first run, late add, re-add, missed runs, no store at all) it remembers
11
+ * that repo's alert keys, pushes none, and marks the repo. Only a marked repo pushes new keys.
12
+ * - **Only open alerts.** `digest` findings and accepted ones (`applyAccepts`, the one reader of an
13
+ * accept) are neither pushed nor remembered, so a digest finding is never "spent".
14
+ * - **Up to {@link EXPOSURE_PUSH_CAP} pushes per repo per sweep**, one per finding; more than that
15
+ * is ONE push naming the count, and every key is remembered.
16
+ */
17
+ import { type ExposureTriageFile, type ExposureAccept, type ExposureFinding, type ExposureRow } from "./exposure.js";
18
+ export declare const EXPOSURE_PUSH_CAP = 3;
19
+ /** One push to send. `attention` = critical/high severity (a person is asked to look today). */
20
+ export interface ExposurePush {
21
+ repo: string;
22
+ dir: string;
23
+ title: string;
24
+ body: string;
25
+ /** The stable tag: a later push for the same finding replaces it in the OS tray. */
26
+ tag: string;
27
+ /** The attention key (same spelling as the tag) so the cause can resolve the item. */
28
+ key: string;
29
+ attention: boolean;
30
+ /** The finding keys this push stands for (all of them remembered by the caller). */
31
+ keys: string[];
32
+ }
33
+ export interface ExposurePushPlan {
34
+ push: ExposurePush[];
35
+ /** Keys to add to the store (never already in it). */
36
+ remember: string[];
37
+ /** Repos seen as watched for the first time: to add to the store's marker. */
38
+ seenRepos: string[];
39
+ /** Attention keys whose finding is no longer open (or whose repo has none left): to resolve. */
40
+ resolve: string[];
41
+ }
42
+ /** What the store holds: pushed keys, and the repos whose first sight has been seeded. */
43
+ export interface ExposurePushed {
44
+ keys: ReadonlySet<string>;
45
+ repos: ReadonlySet<string>;
46
+ }
47
+ /** `unreadable`: the accepts file exists but cannot be read, so nothing is known about this row. */
48
+ export interface ExposureSeries {
49
+ row: ExposureRow;
50
+ accepts: Record<string, ExposureAccept> | null;
51
+ triage?: ExposureTriageFile | null;
52
+ unreadable?: boolean;
53
+ }
54
+ /** The dedupe key: (repo, finding.key, version), `\u0000`-joined so no field can fake another.
55
+ * `finding.key` already carries the advisory id and the subject. */
56
+ export declare const exposurePushKey: (repo: string, f: Pick<ExposureFinding, "key" | "version">) => string;
57
+ /** The attention key of one finding's push, and of a repo's summary push. */
58
+ export declare const exposureAttentionKey: (repo: string, findingKey: string) => string;
59
+ export declare const exposureSummaryKey: (repo: string) => string;
60
+ export declare function exposurePushes(series: readonly ExposureSeries[], watched: (dir: string) => boolean, pushed: ExposurePushed, now: Date | string): ExposurePushPlan;
@@ -0,0 +1,103 @@
1
+ /**
2
+ * **Which exposure findings earn a push, and which keys the host must remember.** The watch's
3
+ * promise (proposal §2-3): an ALERT is a push the same day, one per new finding, keyed
4
+ * (repo, measure, subject, version). Pure, no clock but the `now` handed in, no file reads — the
5
+ * host (`exposurepush.ts`) owns the store and the sending.
6
+ *
7
+ * - **Pushed once FOREVER.** The remembered set is never pruned: an accept that lapses, or a
8
+ * finding that clears and comes back with the same key, does not push a second time.
9
+ * - **Seeding is silent, per repo.** The store carries a `repos` marker: the first time the sweep
10
+ * sees a repo as WATCHED (first run, late add, re-add, missed runs, no store at all) it remembers
11
+ * that repo's alert keys, pushes none, and marks the repo. Only a marked repo pushes new keys.
12
+ * - **Only open alerts.** `digest` findings and accepted ones (`applyAccepts`, the one reader of an
13
+ * accept) are neither pushed nor remembered, so a digest finding is never "spent".
14
+ * - **Up to {@link EXPOSURE_PUSH_CAP} pushes per repo per sweep**, one per finding; more than that
15
+ * is ONE push naming the count, and every key is remembered.
16
+ */
17
+ import { applyAccepts, applyTriage } from "./exposure.js";
18
+ export const EXPOSURE_PUSH_CAP = 3;
19
+ /** The dedupe key: (repo, finding.key, version), `\u0000`-joined so no field can fake another.
20
+ * `finding.key` already carries the advisory id and the subject. */
21
+ export const exposurePushKey = (repo, f) => `${repo}\u0000${f.key}\u0000${f.version ?? ""}`;
22
+ /** The attention key of one finding's push, and of a repo's summary push. */
23
+ export const exposureAttentionKey = (repo, findingKey) => `exposure:${repo}:${findingKey}`;
24
+ export const exposureSummaryKey = (repo) => `exposure:${repo}`;
25
+ const LOUD = ["critical", "high"];
26
+ const isLoud = (f) => !!f.severity && LOUD.includes(f.severity);
27
+ export function exposurePushes(series, watched, pushed, now) {
28
+ const push = [];
29
+ const remember = new Set();
30
+ const seenRepos = new Set();
31
+ const resolve = new Set();
32
+ for (const { row, accepts, triage, unreadable } of series) {
33
+ // One repo's bad data must not abort every other repo's pass: it is skipped, nothing remembered for it.
34
+ try {
35
+ if (!row || typeof row.dir !== "string" || typeof row.repo !== "string" || !watched(row.dir))
36
+ continue;
37
+ if (unreadable)
38
+ continue; // nothing is known: push nothing, remember nothing
39
+ const alerts = (Array.isArray(row.findings) ? row.findings : []).filter((f) => f?.level === "alert");
40
+ if (row.firstRun || !pushed.repos.has(row.repo)) {
41
+ for (const f of alerts) {
42
+ const k = exposurePushKey(row.repo, f);
43
+ if (!pushed.keys.has(k))
44
+ remember.add(k);
45
+ }
46
+ if (!pushed.repos.has(row.repo))
47
+ seenRepos.add(row.repo);
48
+ continue;
49
+ }
50
+ const open = applyTriage(applyAccepts(alerts, accepts, now), triage).filter((f) => !f.accepted);
51
+ // Resolve what is no longer open: every remembered key of this repo whose finding is gone.
52
+ const openKeys = new Set(open.map((f) => f.key));
53
+ const prefix = `${row.repo}\u0000`;
54
+ for (const k of pushed.keys) {
55
+ if (!k.startsWith(prefix))
56
+ continue;
57
+ const fk = k.slice(prefix.length).split("\u0000")[0];
58
+ if (!openKeys.has(fk))
59
+ resolve.add(exposureAttentionKey(row.repo, fk));
60
+ }
61
+ if (!open.length)
62
+ resolve.add(exposureSummaryKey(row.repo));
63
+ const seen = new Set();
64
+ const fresh = open.filter((f) => {
65
+ // seen / investigating hold back growth in the SAME app version; a different one reporting the group pushes.
66
+ // A mark with no recorded version holds by key, as before.
67
+ if (f.triage && (f.triage.state === "seen" || f.triage.state === "investigating")
68
+ && !(f.triage.markedVersion && f.appVersion && f.triage.markedVersion !== f.appVersion))
69
+ return false;
70
+ const k = exposurePushKey(row.repo, f);
71
+ if (pushed.keys.has(k) || remember.has(k) || seen.has(k))
72
+ return false;
73
+ seen.add(k);
74
+ return true;
75
+ });
76
+ if (!fresh.length)
77
+ continue;
78
+ for (const f of fresh)
79
+ remember.add(exposurePushKey(row.repo, f));
80
+ const keys = fresh.map((f) => exposurePushKey(row.repo, f));
81
+ if (fresh.length > EXPOSURE_PUSH_CAP) {
82
+ push.push({
83
+ repo: row.repo, dir: row.dir, keys, attention: fresh.some(isLoud),
84
+ title: `${fresh.length} new exposure findings in ${row.repo}`,
85
+ body: fresh.slice(0, EXPOSURE_PUSH_CAP).map((f) => f.text).join("\n") + `\nand ${fresh.length - EXPOSURE_PUSH_CAP} more, in the exposure watch.`,
86
+ tag: exposureSummaryKey(row.repo), key: exposureSummaryKey(row.repo),
87
+ });
88
+ continue;
89
+ }
90
+ for (const f of fresh) {
91
+ push.push({
92
+ repo: row.repo, dir: row.dir, keys: [exposurePushKey(row.repo, f)], attention: isLoud(f),
93
+ title: `${row.repo}: ${f.measure} ${f.subject}${f.version ? "@" + f.version : ""}`,
94
+ body: f.text,
95
+ tag: exposureAttentionKey(row.repo, f.key), key: exposureAttentionKey(row.repo, f.key),
96
+ });
97
+ }
98
+ }
99
+ catch { /* skip this series */ }
100
+ }
101
+ return { push, remember: [...remember], seenRepos: [...seenRepos], resolve: [...resolve] };
102
+ }
103
+ //# sourceMappingURL=exposurepush.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exposurepush.js","sourceRoot":"","sources":["../src/exposurepush.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,YAAY,EAAE,WAAW,EAAuG,MAAM,eAAe,CAAC;AAE/J,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAiCnC;qEACqE;AACrE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAAY,EAAE,CAA2C,EAAU,EAAE,CACnG,GAAG,IAAI,SAAS,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,OA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,CAAC,OAAO,IAAI,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;oBAClF,IAAI,EAAE,CAAC,CAAC,IAAI;oBACZ,GAAG,EAAE,oBAAoB,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,oBAAoB,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC;iBACvF,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAAC,MAAM,CAAC,CAAC,sBAAsB,CAAC,CAAC;IACpC,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,GAAG,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC,EAAE,CAAC;AAC7F,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { type HealthEntry, type HealthSeriesRow } from "./types.js";
2
+ export interface HealthCommitPoint {
3
+ sha7: string;
4
+ day: string;
5
+ ts: number;
6
+ week: string;
7
+ index: number;
8
+ mean: number;
9
+ cappedBy: HealthEntry | null;
10
+ /** Prereg or central fingerprint differs from the previous scored row: do not join the line. */
11
+ gap: boolean;
12
+ }
13
+ export interface HealthCommitSeries {
14
+ points: HealthCommitPoint[];
15
+ /** Scored rows before thinning. */
16
+ total: number;
17
+ thinned: boolean;
18
+ }
19
+ /** Thin to ~`max`: each ISO week's LAST point stays; `ceil(n/max)`-long runs keep their min and max index. At most 2*max + weeks. */
20
+ export declare function thinCommitPoints(points: readonly HealthCommitPoint[], max: number): HealthCommitPoint[];
21
+ /** Every scorable row as a commit point, thinned to about `max`; `null` when no row scores. */
22
+ export declare function healthIndexCommits(rows: readonly HealthSeriesRow[], contextWarnChars: number | null, max?: number): HealthCommitSeries | null;
23
+ /** `absent` = an older host (no key), `none` = the host looked and nothing scores, else `present`. */
24
+ export declare function healthCommitsAvailability(view: {
25
+ commits?: HealthCommitSeries | null;
26
+ } | null | undefined): "absent" | "none" | "present";