waterplane 0.1.24 → 0.1.26

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 (429) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/SECURITY.md +25 -5
  3. package/node_modules/@waterplane/shared/dist/agentseries/compare.d.ts +8 -0
  4. package/node_modules/@waterplane/shared/dist/agentseries/compare.js +103 -0
  5. package/node_modules/@waterplane/shared/dist/agentseries/compare.js.map +1 -0
  6. package/node_modules/@waterplane/shared/dist/agentseries/markers.d.ts +17 -0
  7. package/node_modules/@waterplane/shared/dist/agentseries/markers.js +125 -0
  8. package/node_modules/@waterplane/shared/dist/agentseries/markers.js.map +1 -0
  9. package/node_modules/@waterplane/shared/dist/agentseries/series.d.ts +16 -0
  10. package/node_modules/@waterplane/shared/dist/agentseries/series.js +93 -0
  11. package/node_modules/@waterplane/shared/dist/agentseries/series.js.map +1 -0
  12. package/node_modules/@waterplane/shared/dist/agentseries/stats.d.ts +8 -0
  13. package/node_modules/@waterplane/shared/dist/agentseries/stats.js +33 -0
  14. package/node_modules/@waterplane/shared/dist/agentseries/stats.js.map +1 -0
  15. package/node_modules/@waterplane/shared/dist/agentseries/types.d.ts +103 -0
  16. package/node_modules/@waterplane/shared/dist/agentseries/types.js +11 -0
  17. package/node_modules/@waterplane/shared/dist/agentseries/types.js.map +1 -0
  18. package/node_modules/@waterplane/shared/dist/agentseries.d.ts +10 -0
  19. package/node_modules/@waterplane/shared/dist/agentseries.js +11 -0
  20. package/node_modules/@waterplane/shared/dist/agentseries.js.map +1 -0
  21. package/node_modules/@waterplane/shared/dist/calday.d.ts +5 -0
  22. package/node_modules/@waterplane/shared/dist/calday.js +10 -0
  23. package/node_modules/@waterplane/shared/dist/calday.js.map +1 -1
  24. package/node_modules/@waterplane/shared/dist/clihealth/healthfixture.d.ts +13 -1
  25. package/node_modules/@waterplane/shared/dist/clihealth/healthfixture.js +22 -4
  26. package/node_modules/@waterplane/shared/dist/clihealth/healthfixture.js.map +1 -1
  27. package/node_modules/@waterplane/shared/dist/clihealth.d.ts +1 -1
  28. package/node_modules/@waterplane/shared/dist/clihealth.js +1 -1
  29. package/node_modules/@waterplane/shared/dist/clihealth.js.map +1 -1
  30. package/node_modules/@waterplane/shared/dist/dictate.d.ts +6 -0
  31. package/node_modules/@waterplane/shared/dist/dictate.js.map +1 -1
  32. package/node_modules/@waterplane/shared/dist/dictatemodels.d.ts +23 -0
  33. package/node_modules/@waterplane/shared/dist/dictatemodels.js +31 -0
  34. package/node_modules/@waterplane/shared/dist/dictatemodels.js.map +1 -0
  35. package/node_modules/@waterplane/shared/dist/healthindex/commits.d.ts +1 -1
  36. package/node_modules/@waterplane/shared/dist/healthindex/commits.js +2 -2
  37. package/node_modules/@waterplane/shared/dist/healthindex/commits.js.map +1 -1
  38. package/node_modules/@waterplane/shared/dist/healthindex/coverage.d.ts +128 -0
  39. package/node_modules/@waterplane/shared/dist/healthindex/coverage.js +343 -0
  40. package/node_modules/@waterplane/shared/dist/healthindex/coverage.js.map +1 -0
  41. package/node_modules/@waterplane/shared/dist/healthindex/readings.d.ts +9 -1
  42. package/node_modules/@waterplane/shared/dist/healthindex/readings.js +122 -4
  43. package/node_modules/@waterplane/shared/dist/healthindex/readings.js.map +1 -1
  44. package/node_modules/@waterplane/shared/dist/healthindex/repoindex.d.ts +5 -0
  45. package/node_modules/@waterplane/shared/dist/healthindex/repoindex.js +2 -0
  46. package/node_modules/@waterplane/shared/dist/healthindex/repoindex.js.map +1 -1
  47. package/node_modules/@waterplane/shared/dist/healthindex/score.d.ts +3 -0
  48. package/node_modules/@waterplane/shared/dist/healthindex/score.js +52 -16
  49. package/node_modules/@waterplane/shared/dist/healthindex/score.js.map +1 -1
  50. package/node_modules/@waterplane/shared/dist/healthindex/types.d.ts +82 -6
  51. package/node_modules/@waterplane/shared/dist/healthindex/types.js +35 -2
  52. package/node_modules/@waterplane/shared/dist/healthindex/types.js.map +1 -1
  53. package/node_modules/@waterplane/shared/dist/healthindex/words.js +65 -6
  54. package/node_modules/@waterplane/shared/dist/healthindex/words.js.map +1 -1
  55. package/node_modules/@waterplane/shared/dist/healthindex.d.ts +21 -7
  56. package/node_modules/@waterplane/shared/dist/healthindex.js +20 -7
  57. package/node_modules/@waterplane/shared/dist/healthindex.js.map +1 -1
  58. package/node_modules/@waterplane/shared/dist/healthindexresponse.js +3 -2
  59. package/node_modules/@waterplane/shared/dist/healthindexresponse.js.map +1 -1
  60. package/node_modules/@waterplane/shared/dist/healthspend.d.ts +23 -0
  61. package/node_modules/@waterplane/shared/dist/healthspend.js +32 -1
  62. package/node_modules/@waterplane/shared/dist/healthspend.js.map +1 -1
  63. package/node_modules/@waterplane/shared/dist/hints.js +9 -0
  64. package/node_modules/@waterplane/shared/dist/hints.js.map +1 -1
  65. package/node_modules/@waterplane/shared/dist/index.d.ts +9 -0
  66. package/node_modules/@waterplane/shared/dist/index.js +9 -0
  67. package/node_modules/@waterplane/shared/dist/index.js.map +1 -1
  68. package/node_modules/@waterplane/shared/dist/installrow.js +10 -0
  69. package/node_modules/@waterplane/shared/dist/installrow.js.map +1 -1
  70. package/node_modules/@waterplane/shared/dist/intent/kind.d.ts +45 -1
  71. package/node_modules/@waterplane/shared/dist/intent/kind.js +60 -2
  72. package/node_modules/@waterplane/shared/dist/intent/kind.js.map +1 -1
  73. package/node_modules/@waterplane/shared/dist/intent.d.ts +1 -1
  74. package/node_modules/@waterplane/shared/dist/intent.js +1 -1
  75. package/node_modules/@waterplane/shared/dist/intent.js.map +1 -1
  76. package/node_modules/@waterplane/shared/dist/itempaths.d.ts +23 -0
  77. package/node_modules/@waterplane/shared/dist/itempaths.js +38 -0
  78. package/node_modules/@waterplane/shared/dist/itempaths.js.map +1 -1
  79. package/node_modules/@waterplane/shared/dist/pluginlaunch.d.ts +3 -2
  80. package/node_modules/@waterplane/shared/dist/pluginlaunch.js +1 -1
  81. package/node_modules/@waterplane/shared/dist/pluginlaunch.js.map +1 -1
  82. package/node_modules/@waterplane/shared/dist/pricelist.d.ts +57 -0
  83. package/node_modules/@waterplane/shared/dist/pricelist.js +128 -0
  84. package/node_modules/@waterplane/shared/dist/pricelist.js.map +1 -0
  85. package/node_modules/@waterplane/shared/dist/pricing.d.ts +86 -9
  86. package/node_modules/@waterplane/shared/dist/pricing.js +140 -20
  87. package/node_modules/@waterplane/shared/dist/pricing.js.map +1 -1
  88. package/node_modules/@waterplane/shared/dist/queue/queuelanestate.d.ts +14 -0
  89. package/node_modules/@waterplane/shared/dist/queue/queuelanestate.js +25 -0
  90. package/node_modules/@waterplane/shared/dist/queue/queuelanestate.js.map +1 -0
  91. package/node_modules/@waterplane/shared/dist/queue/queueplan.d.ts +4 -0
  92. package/node_modules/@waterplane/shared/dist/queue/queueplan.js +21 -0
  93. package/node_modules/@waterplane/shared/dist/queue/queueplan.js.map +1 -1
  94. package/node_modules/@waterplane/shared/dist/queue/queuewords.js +2 -1
  95. package/node_modules/@waterplane/shared/dist/queue/queuewords.js.map +1 -1
  96. package/node_modules/@waterplane/shared/dist/queue.d.ts +2 -0
  97. package/node_modules/@waterplane/shared/dist/queue.js +1 -0
  98. package/node_modules/@waterplane/shared/dist/queue.js.map +1 -1
  99. package/node_modules/@waterplane/shared/dist/repohealth.d.ts +178 -0
  100. package/node_modules/@waterplane/shared/dist/repohealth.js.map +1 -1
  101. package/node_modules/@waterplane/shared/dist/repohealthhabits.d.ts +15 -0
  102. package/node_modules/@waterplane/shared/dist/repohealthhabits.js +117 -0
  103. package/node_modules/@waterplane/shared/dist/repohealthhabits.js.map +1 -0
  104. package/node_modules/@waterplane/shared/dist/repohealthnative.d.ts +10 -0
  105. package/node_modules/@waterplane/shared/dist/repohealthnative.js +94 -0
  106. package/node_modules/@waterplane/shared/dist/repohealthnative.js.map +1 -0
  107. package/node_modules/@waterplane/shared/dist/repohealthread.js +23 -1
  108. package/node_modules/@waterplane/shared/dist/repohealthread.js.map +1 -1
  109. package/node_modules/@waterplane/shared/dist/skillstate.d.ts +51 -0
  110. package/node_modules/@waterplane/shared/dist/skillstate.js +176 -0
  111. package/node_modules/@waterplane/shared/dist/skillstate.js.map +1 -0
  112. package/node_modules/@waterplane/shared/dist/skillwords.d.ts +10 -0
  113. package/node_modules/@waterplane/shared/dist/skillwords.js +18 -0
  114. package/node_modules/@waterplane/shared/dist/skillwords.js.map +1 -0
  115. package/node_modules/@waterplane/shared/dist/wire/agentreadings.d.ts +248 -0
  116. package/node_modules/@waterplane/shared/dist/wire/agentreadings.js +36 -0
  117. package/node_modules/@waterplane/shared/dist/wire/agentreadings.js.map +1 -0
  118. package/node_modules/@waterplane/shared/dist/wire/backend.d.ts +2 -0
  119. package/node_modules/@waterplane/shared/dist/wire/costwindow.d.ts +4 -0
  120. package/node_modules/@waterplane/shared/dist/wire/dictatesetup.d.ts +42 -0
  121. package/node_modules/@waterplane/shared/dist/wire/dictatesetup.js +9 -0
  122. package/node_modules/@waterplane/shared/dist/wire/dictatesetup.js.map +1 -0
  123. package/node_modules/@waterplane/shared/dist/wire/messages/hostcore.d.ts +22 -1
  124. package/node_modules/@waterplane/shared/dist/wire/notify.d.ts +6 -1
  125. package/node_modules/@waterplane/shared/dist/wire/notify.js +6 -1
  126. package/node_modules/@waterplane/shared/dist/wire/notify.js.map +1 -1
  127. package/node_modules/@waterplane/shared/dist/wire/repo.d.ts +1 -1
  128. package/node_modules/@waterplane/shared/dist/wire/skills.d.ts +142 -0
  129. package/node_modules/@waterplane/shared/dist/wire/skills.js +6 -0
  130. package/node_modules/@waterplane/shared/dist/wire/skills.js.map +1 -0
  131. package/node_modules/@waterplane/shared/dist/wire/sysstat.d.ts +17 -0
  132. package/node_modules/@waterplane/shared/dist/wire/telemetry.d.ts +4 -0
  133. package/npm-shrinkwrap.json +2 -2
  134. package/package.json +1 -1
  135. package/packages/extensions/diskspace/waterplane-plugin.json +16 -0
  136. package/packages/extensions/links/waterplane-plugin.json +18 -0
  137. package/packages/host/dist/agentclass.d.ts +116 -0
  138. package/packages/host/dist/agentclass.js +339 -0
  139. package/packages/host/dist/agentclass.js.map +1 -0
  140. package/packages/host/dist/agentintents.d.ts +18 -0
  141. package/packages/host/dist/agentintents.js +40 -7
  142. package/packages/host/dist/agentintents.js.map +1 -1
  143. package/packages/host/dist/agentmarkers.d.ts +49 -0
  144. package/packages/host/dist/agentmarkers.js +255 -0
  145. package/packages/host/dist/agentmarkers.js.map +1 -0
  146. package/packages/host/dist/agentreadings.d.ts +68 -0
  147. package/packages/host/dist/agentreadings.js +336 -0
  148. package/packages/host/dist/agentreadings.js.map +1 -0
  149. package/packages/host/dist/agentscan.d.ts +8 -0
  150. package/packages/host/dist/agentscan.js +427 -0
  151. package/packages/host/dist/agentscan.js.map +1 -0
  152. package/packages/host/dist/archive.js +9 -3
  153. package/packages/host/dist/archive.js.map +1 -1
  154. package/packages/host/dist/artifacts.js +4 -7
  155. package/packages/host/dist/artifacts.js.map +1 -1
  156. package/packages/host/dist/askrules.js +12 -4
  157. package/packages/host/dist/askrules.js.map +1 -1
  158. package/packages/host/dist/auth.d.ts +1 -0
  159. package/packages/host/dist/auth.js +5 -3
  160. package/packages/host/dist/auth.js.map +1 -1
  161. package/packages/host/dist/autopull.js +4 -8
  162. package/packages/host/dist/autopull.js.map +1 -1
  163. package/packages/host/dist/backends/claude.js +1 -0
  164. package/packages/host/dist/backends/claude.js.map +1 -1
  165. package/packages/host/dist/backends/derive.js +3 -1
  166. package/packages/host/dist/backends/derive.js.map +1 -1
  167. package/packages/host/dist/binguard.js +19 -2
  168. package/packages/host/dist/binguard.js.map +1 -1
  169. package/packages/host/dist/capture.js +7 -10
  170. package/packages/host/dist/capture.js.map +1 -1
  171. package/packages/host/dist/clifixtures.d.ts +24 -4
  172. package/packages/host/dist/clifixtures.js +50 -10
  173. package/packages/host/dist/clifixtures.js.map +1 -1
  174. package/packages/host/dist/clihealth.d.ts +8 -2
  175. package/packages/host/dist/clihealth.js +11 -3
  176. package/packages/host/dist/clihealth.js.map +1 -1
  177. package/packages/host/dist/costwindow.js +4 -2
  178. package/packages/host/dist/costwindow.js.map +1 -1
  179. package/packages/host/dist/ctxlog/ctxagents.d.ts +2 -0
  180. package/packages/host/dist/ctxlog/ctxagents.js +5 -5
  181. package/packages/host/dist/ctxlog/ctxagents.js.map +1 -1
  182. package/packages/host/dist/ctxlog/ctxcursor.d.ts +2 -0
  183. package/packages/host/dist/ctxlog/ctxcursor.js +2 -2
  184. package/packages/host/dist/ctxlog/ctxcursor.js.map +1 -1
  185. package/packages/host/dist/ctxlog/ctxupdate.js +11 -6
  186. package/packages/host/dist/ctxlog/ctxupdate.js.map +1 -1
  187. package/packages/host/dist/deliver/deliverknobs.d.ts +0 -2
  188. package/packages/host/dist/deliver/deliverknobs.js +0 -2
  189. package/packages/host/dist/deliver/deliverknobs.js.map +1 -1
  190. package/packages/host/dist/deliver/deliverproof.d.ts +3 -2
  191. package/packages/host/dist/deliver/deliverproof.js +9 -8
  192. package/packages/host/dist/deliver/deliverproof.js.map +1 -1
  193. package/packages/host/dist/deliver/deliverreturn.d.ts +3 -2
  194. package/packages/host/dist/deliver/deliverreturn.js +13 -12
  195. package/packages/host/dist/deliver/deliverreturn.js.map +1 -1
  196. package/packages/host/dist/deliver/deliverrun.js +20 -18
  197. package/packages/host/dist/deliver/deliverrun.js.map +1 -1
  198. package/packages/host/dist/deliver/deliverscreen.d.ts +2 -1
  199. package/packages/host/dist/deliver/deliverscreen.js +9 -8
  200. package/packages/host/dist/deliver/deliverscreen.js.map +1 -1
  201. package/packages/host/dist/deliver/delivertypes.d.ts +4 -0
  202. package/packages/host/dist/deliver.js +2 -1
  203. package/packages/host/dist/deliver.js.map +1 -1
  204. package/packages/host/dist/dictate.d.ts +11 -0
  205. package/packages/host/dist/dictate.js +20 -10
  206. package/packages/host/dist/dictate.js.map +1 -1
  207. package/packages/host/dist/dictatesetup.d.ts +54 -0
  208. package/packages/host/dist/dictatesetup.js +261 -0
  209. package/packages/host/dist/dictatesetup.js.map +1 -0
  210. package/packages/host/dist/doctor.js +1 -1
  211. package/packages/host/dist/doctor.js.map +1 -1
  212. package/packages/host/dist/exposure.d.ts +10 -0
  213. package/packages/host/dist/exposure.js +25 -0
  214. package/packages/host/dist/exposure.js.map +1 -1
  215. package/packages/host/dist/exposurepush.js +2 -2
  216. package/packages/host/dist/exposurepush.js.map +1 -1
  217. package/packages/host/dist/extensions/diskspace/host/candidates.d.mts +180 -0
  218. package/packages/host/dist/extensions/diskspace/host/candidates.mjs +716 -0
  219. package/packages/host/dist/extensions/diskspace/host/candidates.mjs.map +1 -0
  220. package/packages/host/dist/extensions/diskspace/host/engine.d.mts +21 -0
  221. package/packages/host/dist/extensions/diskspace/host/engine.mjs +498 -0
  222. package/packages/host/dist/extensions/diskspace/host/engine.mjs.map +1 -0
  223. package/packages/host/dist/extensions/diskspace/host/index.d.mts +25 -0
  224. package/packages/host/dist/extensions/diskspace/host/index.mjs +135 -0
  225. package/packages/host/dist/extensions/diskspace/host/index.mjs.map +1 -0
  226. package/packages/host/dist/extensions/diskspace/host/large.d.mts +11 -0
  227. package/packages/host/dist/extensions/diskspace/host/large.mjs +56 -0
  228. package/packages/host/dist/extensions/diskspace/host/large.mjs.map +1 -0
  229. package/packages/host/dist/extensions/diskspace/host/run.d.mts +94 -0
  230. package/packages/host/dist/extensions/diskspace/host/run.mjs +200 -0
  231. package/packages/host/dist/extensions/diskspace/host/run.mjs.map +1 -0
  232. package/packages/host/dist/extensions/diskspace/shared/wire.d.mts +197 -0
  233. package/packages/host/dist/extensions/diskspace/shared/wire.mjs +23 -0
  234. package/packages/host/dist/extensions/diskspace/shared/wire.mjs.map +1 -0
  235. package/packages/host/dist/extensions/links/host/engine.d.mts +39 -0
  236. package/packages/host/dist/extensions/links/host/engine.mjs +285 -0
  237. package/packages/host/dist/extensions/links/host/engine.mjs.map +1 -0
  238. package/packages/host/dist/extensions/links/host/index.d.mts +10 -0
  239. package/packages/host/dist/extensions/links/host/index.mjs +72 -0
  240. package/packages/host/dist/extensions/links/host/index.mjs.map +1 -0
  241. package/packages/host/dist/extensions/links/host/parse.d.mts +61 -0
  242. package/packages/host/dist/extensions/links/host/parse.mjs +225 -0
  243. package/packages/host/dist/extensions/links/host/parse.mjs.map +1 -0
  244. package/packages/host/dist/extensions/links/host/run.d.mts +15 -0
  245. package/packages/host/dist/extensions/links/host/run.mjs +32 -0
  246. package/packages/host/dist/extensions/links/host/run.mjs.map +1 -0
  247. package/packages/host/dist/extensions/links/host/store.d.mts +11 -0
  248. package/packages/host/dist/extensions/links/host/store.mjs +76 -0
  249. package/packages/host/dist/extensions/links/host/store.mjs.map +1 -0
  250. package/packages/host/dist/extensions/links/shared/wire.d.mts +141 -0
  251. package/packages/host/dist/extensions/links/shared/wire.mjs +20 -0
  252. package/packages/host/dist/extensions/links/shared/wire.mjs.map +1 -0
  253. package/packages/host/dist/git.d.ts +5 -3
  254. package/packages/host/dist/git.js +16 -28
  255. package/packages/host/dist/git.js.map +1 -1
  256. package/packages/host/dist/halt.js +16 -3
  257. package/packages/host/dist/halt.js.map +1 -1
  258. package/packages/host/dist/jsonstore.d.ts +16 -4
  259. package/packages/host/dist/jsonstore.js +32 -8
  260. package/packages/host/dist/jsonstore.js.map +1 -1
  261. package/packages/host/dist/landedbase.d.ts +41 -0
  262. package/packages/host/dist/landedbase.js +59 -0
  263. package/packages/host/dist/landedbase.js.map +1 -0
  264. package/packages/host/dist/lantls.js +2 -2
  265. package/packages/host/dist/lantls.js.map +1 -1
  266. package/packages/host/dist/limitretry.js +2 -3
  267. package/packages/host/dist/limitretry.js.map +1 -1
  268. package/packages/host/dist/localledger.js +9 -12
  269. package/packages/host/dist/localledger.js.map +1 -1
  270. package/packages/host/dist/main.js +2 -0
  271. package/packages/host/dist/main.js.map +1 -1
  272. package/packages/host/dist/opendeliveries.d.ts +4 -0
  273. package/packages/host/dist/opendeliveries.js +27 -1
  274. package/packages/host/dist/opendeliveries.js.map +1 -1
  275. package/packages/host/dist/plugins/setupcontrib.js +3 -2
  276. package/packages/host/dist/plugins/setupcontrib.js.map +1 -1
  277. package/packages/host/dist/pricefetch.d.ts +80 -0
  278. package/packages/host/dist/pricefetch.js +289 -0
  279. package/packages/host/dist/pricefetch.js.map +1 -0
  280. package/packages/host/dist/pricegap.d.ts +11 -0
  281. package/packages/host/dist/pricegap.js +30 -0
  282. package/packages/host/dist/pricegap.js.map +1 -0
  283. package/packages/host/dist/repohealthscopes.js +16 -24
  284. package/packages/host/dist/repohealthscopes.js.map +1 -1
  285. package/packages/host/dist/repos.d.ts +4 -0
  286. package/packages/host/dist/repos.js +1 -1
  287. package/packages/host/dist/repos.js.map +1 -1
  288. package/packages/host/dist/reposkilltext.d.ts +2 -0
  289. package/packages/host/dist/reposkilltext.js +8 -2
  290. package/packages/host/dist/reposkilltext.js.map +1 -1
  291. package/packages/host/dist/routes/apiagentpoints.d.ts +5 -0
  292. package/packages/host/dist/routes/apiagentpoints.js +48 -0
  293. package/packages/host/dist/routes/apiagentpoints.js.map +1 -0
  294. package/packages/host/dist/routes/apidictate.d.ts +2 -0
  295. package/packages/host/dist/routes/apidictate.js +27 -0
  296. package/packages/host/dist/routes/apidictate.js.map +1 -0
  297. package/packages/host/dist/routes/apihost.js +3 -2
  298. package/packages/host/dist/routes/apihost.js.map +1 -1
  299. package/packages/host/dist/routes/apirepofiles.js +3 -1
  300. package/packages/host/dist/routes/apirepofiles.js.map +1 -1
  301. package/packages/host/dist/routes/apirepowork.js +14 -0
  302. package/packages/host/dist/routes/apirepowork.js.map +1 -1
  303. package/packages/host/dist/routes/apiroutes.js +4 -1
  304. package/packages/host/dist/routes/apiroutes.js.map +1 -1
  305. package/packages/host/dist/routes/apiskills.d.ts +3 -0
  306. package/packages/host/dist/routes/apiskills.js +81 -0
  307. package/packages/host/dist/routes/apiskills.js.map +1 -0
  308. package/packages/host/dist/routes/apistats.js +2 -2
  309. package/packages/host/dist/routes/apistats.js.map +1 -1
  310. package/packages/host/dist/routes/apisystem.js +3 -1
  311. package/packages/host/dist/routes/apisystem.js.map +1 -1
  312. package/packages/host/dist/routes/apitable.d.ts +2 -0
  313. package/packages/host/dist/routes/apitable.js.map +1 -1
  314. package/packages/host/dist/server/billingwire.js +5 -0
  315. package/packages/host/dist/server/billingwire.js.map +1 -1
  316. package/packages/host/dist/server/deliveries.d.ts +4 -1
  317. package/packages/host/dist/server/deliveries.js +38 -6
  318. package/packages/host/dist/server/deliveries.js.map +1 -1
  319. package/packages/host/dist/server/http.js +1 -1
  320. package/packages/host/dist/server/http.js.map +1 -1
  321. package/packages/host/dist/server/intentDeps.js +20 -6
  322. package/packages/host/dist/server/intentDeps.js.map +1 -1
  323. package/packages/host/dist/server/wsops.js +2 -1
  324. package/packages/host/dist/server/wsops.js.map +1 -1
  325. package/packages/host/dist/sessions/core.d.ts +1 -0
  326. package/packages/host/dist/sessions/ctxseries.js +7 -5
  327. package/packages/host/dist/sessions/ctxseries.js.map +1 -1
  328. package/packages/host/dist/sessions/drive.d.ts +6 -1
  329. package/packages/host/dist/sessions/drive.js +13 -10
  330. package/packages/host/dist/sessions/drive.js.map +1 -1
  331. package/packages/host/dist/sessions/record.js +16 -17
  332. package/packages/host/dist/sessions/record.js.map +1 -1
  333. package/packages/host/dist/sessions/sidechannel.js +1 -1
  334. package/packages/host/dist/sessions/sidechannel.js.map +1 -1
  335. package/packages/host/dist/sessions/tmux.js +6 -1
  336. package/packages/host/dist/sessions/tmux.js.map +1 -1
  337. package/packages/host/dist/sessions/turn.js +5 -0
  338. package/packages/host/dist/sessions/turn.js.map +1 -1
  339. package/packages/host/dist/sessions.d.ts +2 -1
  340. package/packages/host/dist/sessions.js +1 -1
  341. package/packages/host/dist/sessions.js.map +1 -1
  342. package/packages/host/dist/settle.d.ts +3 -2
  343. package/packages/host/dist/settle.js +13 -13
  344. package/packages/host/dist/settle.js.map +1 -1
  345. package/packages/host/dist/sidecar/sidecarname.d.ts +2 -0
  346. package/packages/host/dist/sidecar/sidecarname.js +5 -1
  347. package/packages/host/dist/sidecar/sidecarname.js.map +1 -1
  348. package/packages/host/dist/sidecar/sidecarroute.d.ts +1 -1
  349. package/packages/host/dist/sidecar/sidecarroute.js +5 -0
  350. package/packages/host/dist/sidecar/sidecarroute.js.map +1 -1
  351. package/packages/host/dist/sidecar.d.ts +1 -1
  352. package/packages/host/dist/sidecar.js +1 -1
  353. package/packages/host/dist/sidecar.js.map +1 -1
  354. package/packages/host/dist/skills/skillinventory.d.ts +23 -0
  355. package/packages/host/dist/skills/skillinventory.js +275 -0
  356. package/packages/host/dist/skills/skillinventory.js.map +1 -0
  357. package/packages/host/dist/skills/skilllayers.d.ts +28 -0
  358. package/packages/host/dist/skills/skilllayers.js +73 -0
  359. package/packages/host/dist/skills/skilllayers.js.map +1 -0
  360. package/packages/host/dist/skills/skillrecommend.d.ts +42 -0
  361. package/packages/host/dist/skills/skillrecommend.js +171 -0
  362. package/packages/host/dist/skills/skillrecommend.js.map +1 -0
  363. package/packages/host/dist/skills/skillrefs.d.ts +2 -0
  364. package/packages/host/dist/skills/skillrefs.js +50 -0
  365. package/packages/host/dist/skills/skillrefs.js.map +1 -0
  366. package/packages/host/dist/skills/skilluse.d.ts +57 -0
  367. package/packages/host/dist/skills/skilluse.js +242 -0
  368. package/packages/host/dist/skills/skilluse.js.map +1 -0
  369. package/packages/host/dist/skills/skillweight.d.ts +18 -0
  370. package/packages/host/dist/skills/skillweight.js +69 -0
  371. package/packages/host/dist/skills/skillweight.js.map +1 -0
  372. package/packages/host/dist/skills/skillwrite.d.ts +56 -0
  373. package/packages/host/dist/skills/skillwrite.js +183 -0
  374. package/packages/host/dist/skills/skillwrite.js.map +1 -0
  375. package/packages/host/dist/sysstat.d.ts +34 -1
  376. package/packages/host/dist/sysstat.js +82 -14
  377. package/packages/host/dist/sysstat.js.map +1 -1
  378. package/packages/host/dist/tokenscan.js +5 -2
  379. package/packages/host/dist/tokenscan.js.map +1 -1
  380. package/packages/host/dist/tokenstats.js +7 -4
  381. package/packages/host/dist/tokenstats.js.map +1 -1
  382. package/packages/host/dist/transcript/transcriptparse.js +2 -2
  383. package/packages/host/dist/transcript/transcriptparse.js.map +1 -1
  384. package/packages/host/dist/waitclock.d.ts +12 -0
  385. package/packages/host/dist/waitclock.js +23 -0
  386. package/packages/host/dist/waitclock.js.map +1 -0
  387. package/packages/host/dist/weekburn.js +7 -5
  388. package/packages/host/dist/weekburn.js.map +1 -1
  389. package/packages/host/dist/worktreeleftover.js +13 -15
  390. package/packages/host/dist/worktreeleftover.js.map +1 -1
  391. package/packages/web/dist/assets/demo-DHkwSmU5.js +26 -0
  392. package/packages/web/dist/assets/{icons-D8RlmSLR.js → icons-5lVTFNUU.js} +1 -1
  393. package/packages/web/dist/assets/index-Bh4cH6X8.js +170 -0
  394. package/packages/web/dist/assets/index-F7VHtsLI.css +1 -0
  395. package/packages/web/dist/assets/shared-BvQMg9ra.js +51 -0
  396. package/packages/web/dist/assets/sheets-Cwi72V02.js +257 -0
  397. package/packages/web/dist/assets/sheets-DjU2XiUd.css +1 -0
  398. package/packages/web/dist/build-id.txt +1 -1
  399. package/packages/web/dist/buildstamp.json +1 -1
  400. package/packages/web/dist/index.html +7 -7
  401. package/packages/web/dist/sw.js +2 -2
  402. package/release.json +11 -3
  403. package/tools/repohealth/constants.mjs +34 -1
  404. package/tools/repohealth/fixture.json +5374 -38
  405. package/tools/repohealth/git.mjs +77 -0
  406. package/tools/repohealth/lang/dart-analyze.mjs +181 -0
  407. package/tools/repohealth/lang/dart-lex.mjs +494 -0
  408. package/tools/repohealth/lang/dart-resolve.mjs +95 -0
  409. package/tools/repohealth/lang/python-ast.mjs +602 -0
  410. package/tools/repohealth/lang/python-resolve.mjs +228 -0
  411. package/tools/repohealth/metrics/habits.mjs +286 -0
  412. package/tools/repohealth/metrics/native.mjs +542 -0
  413. package/tools/repohealth/metrics/untested.mjs +20 -8
  414. package/tools/repohealth/metrics/workspace.mjs +256 -0
  415. package/tools/repohealth/own.mjs +67 -5
  416. package/tools/repohealth/packs/dart.mjs +153 -85
  417. package/tools/repohealth/packs/python.mjs +51 -14
  418. package/tools/repohealth/plot.mjs +143 -1
  419. package/tools/repohealth/reach.mjs +98 -0
  420. package/tools/repohealth/scope.mjs +14 -1
  421. package/tools/repohealth/series.mjs +5 -0
  422. package/tools/repohealth/types.mjs +4 -0
  423. package/tools/repohealth.mjs +39 -5
  424. package/packages/web/dist/assets/demo-ad3g3HDa.js +0 -26
  425. package/packages/web/dist/assets/index-Csb7jynu.js +0 -170
  426. package/packages/web/dist/assets/index-Cz9Haocy.css +0 -1
  427. package/packages/web/dist/assets/shared-DBaaGttP.js +0 -51
  428. package/packages/web/dist/assets/sheets-CqsP9w1V.js +0 -256
  429. package/packages/web/dist/assets/sheets-DoUhPGK0.css +0 -1
@@ -0,0 +1,51 @@
1
+ import { type PluginRow, type SkillChange, type SkillRow, type SkillState, type SwitchLevel } from "./wire/skills.js";
2
+ /** Settings files, nearest first: `.local` beats project beats user. */
3
+ export interface SkillLayers<T> {
4
+ local?: T;
5
+ project?: T;
6
+ user?: T;
7
+ }
8
+ export interface SkillLocks<T> {
9
+ policy?: T;
10
+ flag?: T;
11
+ }
12
+ export type ResolvedFrom = SwitchLevel | "default" | "locked";
13
+ export declare function resolveSkillState(id: string, layers: SkillLayers<Record<string, unknown>>, locks?: SkillLocks<Record<string, unknown>>): {
14
+ state: SkillState;
15
+ from: ResolvedFrom;
16
+ };
17
+ export declare function resolvePluginEnabled(id: string, layers: SkillLayers<Record<string, unknown>>, locks?: SkillLocks<Record<string, unknown>>, cliDefault?: boolean): {
18
+ enabled: boolean;
19
+ from: ResolvedFrom;
20
+ };
21
+ /** null = fine, else a sentence. */
22
+ export declare function validateChange(c: SkillChange): string | null;
23
+ export type SettingsWrite = {
24
+ ok: true;
25
+ text: string;
26
+ changed: {
27
+ id: string;
28
+ from: string;
29
+ to: string;
30
+ }[];
31
+ } | {
32
+ ok: false;
33
+ error: string;
34
+ };
35
+ /**
36
+ * Apply `changes` to a settings file's text. Touches only `skillOverrides` and `enabledPlugins`;
37
+ * a new key appends, an existing key keeps its place, `inherit` deletes the key (and the object
38
+ * only if this call emptied it). `text: null` = no file yet. Refuses an unparseable file.
39
+ */
40
+ export declare function withSkillSettings(text: string | null, changes: SkillChange[]): SettingsWrite;
41
+ export declare function lineCost(row: SkillRow, state: SkillState): number | null;
42
+ export interface Savings {
43
+ chars: number;
44
+ tokens: number;
45
+ unmeasured: number;
46
+ }
47
+ /**
48
+ * Chars a change set would remove from the skill listing (negative = adds). Unmeasured rows and
49
+ * `inherit` (whose result depends on the other levels) contribute nothing and are counted.
50
+ */
51
+ export declare function savingsOf(rows: (SkillRow | PluginRow)[], changes: SkillChange[]): Savings;
@@ -0,0 +1,176 @@
1
+ /**
2
+ * Skills and plugins switch — the pure logic both ends agree on: which level wins, what a write
3
+ * to a settings file may touch, and what a change set saves. Degrades to refusal-in-words, never
4
+ * to a rewrite of a file it could not read.
5
+ */
6
+ import { CHARS_PER_TOKEN } from "./contextweight.js";
7
+ import { SKILL_STATES, } from "./wire/skills.js";
8
+ const RANK = { "on": 0, "name-only": 1, "user-invocable-only": 2, "off": 3 };
9
+ const isState = (v) => typeof v === "string" && SKILL_STATES.includes(v);
10
+ const own = (o, k) => !!o && Object.prototype.hasOwnProperty.call(o, k);
11
+ export function resolveSkillState(id, layers, locks = {}) {
12
+ let locked = null;
13
+ for (const l of [locks.policy, locks.flag]) {
14
+ const v = own(l, id) ? l[id] : undefined;
15
+ if (isState(v) && (locked === null || RANK[v] > RANK[locked]))
16
+ locked = v;
17
+ }
18
+ if (locked)
19
+ return { state: locked, from: "locked" };
20
+ const order = [["local", "repo-local"], ["project", "repo-shared"], ["user", "global"]];
21
+ for (const [k, level] of order) {
22
+ const m = layers[k];
23
+ const v = own(m, id) ? m[id] : undefined;
24
+ if (isState(v))
25
+ return { state: v, from: level };
26
+ }
27
+ return { state: "on", from: "default" };
28
+ }
29
+ export function resolvePluginEnabled(id, layers, locks = {}, cliDefault = true) {
30
+ const bools = [locks.policy, locks.flag].map((l) => (own(l, id) ? l[id] : undefined)).filter((v) => typeof v === "boolean");
31
+ if (bools.length)
32
+ return { enabled: !bools.includes(false), from: "locked" };
33
+ const order = [["local", "repo-local"], ["project", "repo-shared"], ["user", "global"]];
34
+ for (const [k, level] of order) {
35
+ const m = layers[k];
36
+ const v = own(m, id) ? m[id] : undefined;
37
+ if (typeof v === "boolean")
38
+ return { enabled: v, from: level };
39
+ }
40
+ return { enabled: cliDefault, from: "default" };
41
+ }
42
+ const KEY_RE = /^[A-Za-z0-9._:@-]{1,255}$/;
43
+ const FORBIDDEN_KEYS = new Set(["__proto__", "constructor", "prototype"]);
44
+ const PLUGIN_RE = /^[A-Za-z0-9._-]{1,127}@[A-Za-z0-9._-]{1,127}$/;
45
+ /** null = fine, else a sentence. */
46
+ export function validateChange(c) {
47
+ if (!c || (c.kind !== "skill" && c.kind !== "plugin") || typeof c.id !== "string")
48
+ return "A change needs a kind and an id.";
49
+ if (FORBIDDEN_KEYS.has(c.id) || !KEY_RE.test(c.id))
50
+ return `"${c.id.slice(0, 60)}" is not a name this screen can write.`;
51
+ if (c.kind === "plugin") {
52
+ if (!PLUGIN_RE.test(c.id))
53
+ return `"${c.id}" is not a plugin id (name@marketplace).`;
54
+ if (c.to !== true && c.to !== false && c.to !== "inherit")
55
+ return `A plugin is switched on, off or back to inherit, not "${String(c.to)}".`;
56
+ return null;
57
+ }
58
+ if (c.to !== "inherit" && !isState(c.to))
59
+ return `"${String(c.to)}" is not one of the four skill states.`;
60
+ return null;
61
+ }
62
+ function indentOf(text) {
63
+ const m = /^[ \t]+(?=")/m.exec(text);
64
+ if (!m)
65
+ return 2;
66
+ return m[0].includes("\t") ? "\t" : m[0].length;
67
+ }
68
+ const show = (v) => (v === undefined ? "inherit" : String(v));
69
+ /**
70
+ * Apply `changes` to a settings file's text. Touches only `skillOverrides` and `enabledPlugins`;
71
+ * a new key appends, an existing key keeps its place, `inherit` deletes the key (and the object
72
+ * only if this call emptied it). `text: null` = no file yet. Refuses an unparseable file.
73
+ */
74
+ export function withSkillSettings(text, changes) {
75
+ for (const c of changes) {
76
+ const bad = validateChange(c);
77
+ if (bad)
78
+ return { ok: false, error: bad };
79
+ }
80
+ let obj = {};
81
+ let indent = 2;
82
+ let trailingNl = true;
83
+ if (text != null && text.trim() !== "") {
84
+ let parsed;
85
+ try {
86
+ parsed = JSON.parse(text);
87
+ }
88
+ catch (e) {
89
+ return { ok: false, error: `not valid JSON, left as it is (${e.message})` };
90
+ }
91
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed))
92
+ return { ok: false, error: "not a JSON object, left as it is" };
93
+ obj = parsed;
94
+ indent = indentOf(text);
95
+ trailingNl = text.endsWith("\n");
96
+ }
97
+ for (const k of ["skillOverrides", "enabledPlugins"]) {
98
+ const v = obj[k];
99
+ if (v !== undefined && (!v || typeof v !== "object" || Array.isArray(v)))
100
+ return { ok: false, error: `"${k}" is not an object, left as it is` };
101
+ }
102
+ const changed = [];
103
+ for (const c of changes) {
104
+ const field = c.kind === "skill" ? "skillOverrides" : "enabledPlugins";
105
+ const had = Object.prototype.hasOwnProperty.call(obj, field);
106
+ const map = (had ? obj[field] : {});
107
+ const before = own(map, c.id) ? map[c.id] : undefined;
108
+ if (c.to === "inherit") {
109
+ if (before === undefined)
110
+ continue;
111
+ delete map[c.id];
112
+ if (had && Object.keys(map).length === 0)
113
+ delete obj[field];
114
+ }
115
+ else {
116
+ if (before === c.to)
117
+ continue;
118
+ map[c.id] = c.to;
119
+ if (!had)
120
+ obj[field] = map;
121
+ }
122
+ changed.push({ id: c.id, from: show(before), to: show(c.to === "inherit" ? undefined : c.to) });
123
+ }
124
+ if (changed.length === 0 && text != null)
125
+ return { ok: true, text, changed };
126
+ return { ok: true, text: JSON.stringify(obj, null, indent) + (trailingNl ? "\n" : ""), changed };
127
+ }
128
+ /** The listing line a skill costs in a given state: name-only keeps "- name", the others drop it or keep all of it. */
129
+ const NAME_LINE = 2;
130
+ export function lineCost(row, state) {
131
+ if (row.listingChars === undefined)
132
+ return null;
133
+ if (state === "on")
134
+ return row.listingChars;
135
+ if (state === "name-only")
136
+ return Math.min(row.listingChars, row.id.length + NAME_LINE);
137
+ return 0;
138
+ }
139
+ /**
140
+ * Chars a change set would remove from the skill listing (negative = adds). Unmeasured rows and
141
+ * `inherit` (whose result depends on the other levels) contribute nothing and are counted.
142
+ */
143
+ export function savingsOf(rows, changes) {
144
+ const byId = new Map(rows.map((r) => [`${r.kind}:${r.id}`, r]));
145
+ let chars = 0;
146
+ let unmeasured = 0;
147
+ for (const c of changes) {
148
+ const r = byId.get(`${c.kind}:${c.id}`);
149
+ if (!r || c.to === "inherit") {
150
+ unmeasured++;
151
+ continue;
152
+ }
153
+ if (r.kind === "skill" && c.kind === "skill") {
154
+ if (!isState(c.to))
155
+ continue;
156
+ const a = lineCost(r, r.effective);
157
+ const b = lineCost(r, c.to);
158
+ if (a === null || b === null) {
159
+ unmeasured++;
160
+ continue;
161
+ }
162
+ chars += a - b;
163
+ }
164
+ else if (r.kind === "plugin" && c.kind === "plugin" && typeof c.to === "boolean") {
165
+ if (c.to === r.enabled)
166
+ continue;
167
+ if (r.listingChars === undefined) {
168
+ unmeasured++;
169
+ continue;
170
+ }
171
+ chars += c.to ? -r.listingChars : r.listingChars;
172
+ }
173
+ }
174
+ return { chars, tokens: Math.round(chars / CHARS_PER_TOKEN), unmeasured };
175
+ }
176
+ //# sourceMappingURL=skillstate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skillstate.js","sourceRoot":"","sources":["../src/skillstate.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EACL,YAAY,GAEb,MAAM,kBAAkB,CAAC;AAG1B,MAAM,IAAI,GAAS,EAAE,IAAI,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,qBAAqB,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;AACnF,MAAM,OAAO,GAAG,CAAC,CAAU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CAAC,EAAE,CAAC;gBAAE,SAAS;YAC7B,MAAM,CAAC,GAAG,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC;YACnC,MAAM,CAAC,GAAG,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;YAC5B,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;gBAAC,UAAU,EAAE,CAAC;gBAAC,SAAS;YAAC,CAAC;YACzD,KAAK,IAAI,CAAC,GAAG,CAAC,CAAC;QACjB,CAAC;aAAM,IAAI,CAAC,CAAC,IAAI,KAAK,QAAQ,IAAI,CAAC,CAAC,IAAI,KAAK,QAAQ,IAAI,OAAO,CAAC,CAAC,EAAE,KAAK,SAAS,EAAE,CAAC;YACnF,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,OAAO;gBAAE,SAAS;YACjC,IAAI,CAAC,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;gBAAC,UAAU,EAAE,CAAC;gBAAC,SAAS;YAAC,CAAC;YAC7D,KAAK,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC;QACnD,CAAC;IACH,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,eAAe,CAAC,EAAE,UAAU,EAAE,CAAC;AAC5E,CAAC"}
@@ -0,0 +1,10 @@
1
+ /** The sentences of the skills and plugins switch, worded once for phone, host and VS Code. */
2
+ import type { SwitchLevel } from "./wire/skills.js";
3
+ export declare const SKILL_NEW_SESSIONS_ONLY = "Changes reach new sessions only \u2014 a session that is already running keeps what it was started with.";
4
+ export declare function skillFileLine(level: SwitchLevel, path: string): string;
5
+ export declare const skillPluginSkillLine: (plugin: string) => string;
6
+ export declare const skillPluginNotSwitchable: (plugin: string) => string;
7
+ export declare const SKILL_UNMEASURED = "size not measured";
8
+ export declare const skillLayerUnreadable: (path: string, why: string) => string;
9
+ export declare const skillRevConflict: (path: string) => string;
10
+ export declare const skillSavingsLine: (tokens: number, unmeasured: number) => string;
@@ -0,0 +1,18 @@
1
+ export const SKILL_NEW_SESSIONS_ONLY = "Changes reach new sessions only — a session that is already running keeps what it was started with.";
2
+ export function skillFileLine(level, path) {
3
+ const who = level === "global" ? "every repo on this desktop" : level === "repo-shared" ? "this repo, shared with everyone who clones it" : "this repo, on this desktop only";
4
+ return `Writes ${path} (${who}).`;
5
+ }
6
+ export const skillPluginSkillLine = (plugin) => `follows ${plugin}`;
7
+ export const skillPluginNotSwitchable = (plugin) => `This skill comes with ${plugin}; the CLI only switches it with the whole plugin.`;
8
+ export const SKILL_UNMEASURED = "size not measured";
9
+ export const skillLayerUnreadable = (path, why) => `${path} was not changed: ${why}`;
10
+ export const skillRevConflict = (path) => `${path} changed since this screen read it. Nothing was written; reload and choose again.`;
11
+ export const skillSavingsLine = (tokens, unmeasured) => {
12
+ const more = unmeasured > 0 ? `, plus ${unmeasured} unmeasured` : "";
13
+ if (tokens === 0)
14
+ return `No change in the skill listing${more}.`;
15
+ const n = Math.abs(tokens);
16
+ return tokens > 0 ? `Up to about ${n} tokens fewer per turn${more}.` : `Up to about ${n} tokens more per turn${more}.`;
17
+ };
18
+ //# sourceMappingURL=skillwords.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skillwords.js","sourceRoot":"","sources":["../src/skillwords.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,uBAAuB,GAClC,qGAAqG,CAAC;AAExG,MAAM,UAAU,aAAa,CAAC,KAAkB,EAAE,IAAY;IAC5D,MAAM,GAAG,GAAG,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,4BAA4B,CAAC,CAAC,CAAC,KAAK,KAAK,aAAa,CAAC,CAAC,CAAC,+CAA+C,CAAC,CAAC,CAAC,iCAAiC,CAAC;IAC9K,OAAO,UAAU,IAAI,KAAK,GAAG,IAAI,CAAC;AACpC,CAAC;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,MAAc,EAAU,EAAE,CAAC,WAAW,MAAM,EAAE,CAAC;AACpF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,MAAc,EAAU,EAAE,CACjE,yBAAyB,MAAM,mDAAmD,CAAC;AACrF,MAAM,CAAC,MAAM,gBAAgB,GAAG,mBAAmB,CAAC;AACpD,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,IAAY,EAAE,GAAW,EAAU,EAAE,CACxE,GAAG,IAAI,qBAAqB,GAAG,EAAE,CAAC;AACpC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,IAAY,EAAU,EAAE,CACvD,GAAG,IAAI,mFAAmF,CAAC;AAC7F,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,MAAc,EAAE,UAAkB,EAAU,EAAE;IAC7E,MAAM,IAAI,GAAG,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,UAAU,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;IACrE,IAAI,MAAM,KAAK,CAAC;QAAE,OAAO,iCAAiC,IAAI,GAAG,CAAC;IAClE,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3B,OAAO,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,yBAAyB,IAAI,GAAG,CAAC,CAAC,CAAC,eAAe,CAAC,wBAAwB,IAAI,GAAG,CAAC;AACzH,CAAC,CAAC"}
@@ -0,0 +1,248 @@
1
+ /**
2
+ * Agent readings: what only this desktop can measure about a repo, because it
3
+ * keeps every claude conversation that ran in it (`GET /api/repos/:id/agentreadings`,
4
+ * host `agentreadings.ts`). Four readings, one row per ISO week (Monday, the
5
+ * host's local day), oldest first:
6
+ *
7
+ * - `start` — what a fresh session's first request carried: median tokens,
8
+ * median chars per part, and the subagents' own start. MEASURED off the logs
9
+ * (never the skills screen's estimated weights; the two are never summed).
10
+ * - `explore` — "Before the first edit": input-side tokens AND look calls a
11
+ * fresh session spends before its first file edit, over one population.
12
+ * - `requests` — median requests of a fresh session that committed.
13
+ * - `rework` — the share of the week's tokens spent in sessions whose work
14
+ * was repairing earlier work, beside feature and UNKNOWN (never folded into
15
+ * feature).
16
+ * - `compact` — compactions per session that ran a successful `git commit`:
17
+ * context pressure on work that finished.
18
+ * - `escaped` — crash-triage marks and backlog items marked as a bug.
19
+ *
20
+ * READINGS, not index entries: nothing here is judged, ranked or coloured, and
21
+ * nothing applies itself. Every reading is ABSENT with the sentence why rather
22
+ * than a zero where it cannot be taken (no session that week, no ledger) —
23
+ * `{ absent }`. A total always travels with its split (`TokenTotals`).
24
+ */
25
+ import type { TokenTotals } from "./telemetry.js";
26
+ import type { SeriesValue } from "../agentseries/types.js";
27
+ import type { AgentMarker } from "../agentseries/types.js";
28
+ /** A reading that could not be taken this week, and why — never a zero. */
29
+ export interface AgentReadingAbsent {
30
+ absent: string;
31
+ }
32
+ export interface AgentExploreReading {
33
+ /** Fresh sessions this week that reached an edit (the median is over these). */
34
+ sessions: number;
35
+ /** Fresh sessions this week that never edited a file — not in the median, counted here. */
36
+ noEdit: number;
37
+ /** Sessions left out: resumed or forked logs, and headless `claude -p` runs. */
38
+ skipped: number;
39
+ /** Input + cache read + cache write before the first edit, of the median session
40
+ * (the lower middle one when the count is even, so the split below is a real session's). */
41
+ medianTok: number;
42
+ /** That same session's split: output is zero by construction (input-side only). */
43
+ split: TokenTotals;
44
+ /** Requests that session made before its first edit. Kept on the wire for older phones; not drawn
45
+ * (the look-call median says what it said, more tightly). */
46
+ medianRequests: number;
47
+ /** Median look calls before the first edit over the same sessions (`LOOK_RULE_TEXT`), the agent
48
+ * series' `look` reading. Absent FIELD on an older host. */
49
+ looks?: SeriesValue;
50
+ }
51
+ /** What a fresh session's first request carried this week (agent series `start`, `parts`, `subStart`). */
52
+ export interface AgentStartReading {
53
+ /** Fresh, non-subagent sessions that started this week (headless included). */
54
+ fresh: number;
55
+ /** Median first-request tokens (input + cache read + cache write), fresh interactive sessions. */
56
+ tok: SeriesValue;
57
+ /** Median chars per part over the same sessions, in `START_PARTS` order; a part no session measured is not listed. */
58
+ parts: {
59
+ id: StartPart;
60
+ chars: SeriesValue;
61
+ }[];
62
+ /** Median first-request tokens of the subagent logs that started this week. */
63
+ sub: SeriesValue;
64
+ }
65
+ /** Which bucket a session's tokens were filed under. */
66
+ export type ReworkClass = "rework" | "feature" | "unknown";
67
+ export interface AgentReworkReading {
68
+ /** Every token of the week's sessions (all four kinds), the denominator. */
69
+ totalTok: number;
70
+ /** The week's tokens per class, each with its kind split. */
71
+ byClass: Record<ReworkClass, TokenTotals>;
72
+ /** Conversations per class that spent tokens this week. */
73
+ sessions: Record<ReworkClass, number>;
74
+ /** Review-repair workflow runs found this week (their agents are rework). */
75
+ repairRuns: number;
76
+ }
77
+ export interface AgentCompactReading {
78
+ /** Sessions that ended this week having run a `git commit` that did not error. */
79
+ committed: number;
80
+ /** Compactions in those sessions. */
81
+ compactions: number;
82
+ /** Every session that ended this week, and their compactions — the split around the ratio. */
83
+ sessionsAll: number;
84
+ compactionsAll: number;
85
+ }
86
+ export interface AgentEscapedReading {
87
+ /** Crash groups a person or agent marked this week (`<name>.triage.json`), or why there is no count. */
88
+ crashMarks: number | AgentReadingAbsent;
89
+ /** Backlog items with category `bug` created this week that are still on the backlog. */
90
+ bugItems: number | AgentReadingAbsent;
91
+ }
92
+ /**
93
+ * What the week cost, off the token ledger's per-repo day rows (the same rows
94
+ * the token-stats screen's *By repo* and the health score's context line read):
95
+ * every request the repo's conversations made, subagents included.
96
+ */
97
+ export interface AgentSpendReading {
98
+ requests: number;
99
+ /** Requests on a model with a list price: the denominator of a price per request. */
100
+ pricedRequests: number;
101
+ /** List-price dollars — a counterfactual off one dated table, never a bill. */
102
+ usd: number;
103
+ /** Input + cache read + cache write over `requests`: the context they sent. Absent on an older ledger. */
104
+ ctxTok?: number;
105
+ }
106
+ /** Who did the week's work: the conversations and their subagents, off the same logs as `rework`. */
107
+ export interface AgentActivityReading {
108
+ /** Conversations that spent tokens this week (a conversation over two weeks counts in both). */
109
+ sessions: number;
110
+ /** Of those, the ones that started this week. */
111
+ started: number;
112
+ /** Subagent logs that spent tokens this week. */
113
+ agents: number;
114
+ /** Tokens (all four kinds) in the conversations' own logs, and in their subagents' — the split of `rework.totalTok`. */
115
+ mainTok: number;
116
+ agentTok: number;
117
+ }
118
+ export interface AgentReadingsWeek {
119
+ /** ISO week, its Monday as `YYYY-MM-DD` (host local day). */
120
+ week: string;
121
+ /** Absent FIELD on an older host; absent READING when the ledger has no row for the repo that week. */
122
+ spend?: AgentSpendReading | AgentReadingAbsent;
123
+ /** Absent FIELD on an older host. */
124
+ activity?: AgentActivityReading | AgentReadingAbsent;
125
+ /** Absent FIELD on an older host. */
126
+ start?: AgentStartReading | AgentReadingAbsent;
127
+ explore: AgentExploreReading | AgentReadingAbsent;
128
+ /** Median requests of fresh sessions that committed, in the week they started. Absent FIELD on an older host. */
129
+ requests?: SeriesValue;
130
+ rework: AgentReworkReading | AgentReadingAbsent;
131
+ compact: AgentCompactReading | AgentReadingAbsent;
132
+ escaped: AgentEscapedReading;
133
+ }
134
+ /** The rule each reading follows, worded by the host that applied it — the region's `?` quotes these. */
135
+ export interface AgentReadingRules {
136
+ explore: string;
137
+ rework: string;
138
+ compact: string;
139
+ escaped: string;
140
+ /** Absent on an older host. */
141
+ spend?: string;
142
+ activity?: string;
143
+ start?: string;
144
+ requests?: string;
145
+ }
146
+ export interface AgentReadingsDoc {
147
+ ok: true;
148
+ /** The repo the logs were filed under (worktrees folded in). */
149
+ repo: string;
150
+ /** Oldest first, at most `AGENT_READING_WEEKS`, ending with the current week. */
151
+ weeks: AgentReadingsWeek[];
152
+ rules: AgentReadingRules;
153
+ /** When the logs were last swept, and how many of this repo's were read again that sweep. */
154
+ scannedAt: number;
155
+ logs: number;
156
+ reread: number;
157
+ }
158
+ /** `pending`: the first sweep of this repo's logs is still running (it carries on after the answer); ask again. */
159
+ export type AgentReadingsResponse = AgentReadingsDoc | {
160
+ ok: false;
161
+ error: string;
162
+ pending?: true;
163
+ };
164
+ /** How many weeks the route answers. */
165
+ export declare const AGENT_READING_WEEKS = 12;
166
+ /** True when the reading is the absent sentence rather than a value. */
167
+ export declare function isAgentAbsent(x: unknown): x is AgentReadingAbsent;
168
+ /** What the first request carried, by part, in display order. Closed: a part not listed is `other`. */
169
+ export type StartPart = "system" | "tools" | "claudeMd" | "memory" | "skills" | "deferredTools" | "agents" | "hooks" | "session" | "other";
170
+ /**
171
+ * The parts in display order, with the label a person reads — the SAME names the per-session
172
+ * "what every turn carries" list uses (`alwaysonwords.ts` `carriedLabel`), so one part has one
173
+ * name app-wide; `claudeMd` and `memory` are that list's "instruction files" cut by file type.
174
+ */
175
+ export declare const START_PARTS: readonly {
176
+ id: StartPart;
177
+ label: string;
178
+ }[];
179
+ /** What counts as a look before the first edit, in a sentence the region's `?` quotes. */
180
+ export declare const LOOK_RULE_TEXT = "A look is a call that only reads: Read, Grep, Glob, LS or NotebookRead, or a shell command that starts with grep, rg, find, ls, cat, head, tail, sed -n, wc, jq, tree or git log, show, diff, grep, blame or status (a leading cd \u2026 && is ignored). Looks are counted up to the session's first file edit; a session that never edits has no count.";
181
+ export interface AgentPoint {
182
+ /** The log's own id: the conversation's session id, or a subagent's path under it. */
183
+ id: string;
184
+ /** First record's time (ms). */
185
+ t0: number;
186
+ /** The repo the session ran in (worktrees folded in). */
187
+ repo: string;
188
+ /** Began as a new conversation: not a fork, a continuation or a headless run. */
189
+ fresh: boolean;
190
+ headless: boolean;
191
+ /** A subagent's log. */
192
+ sub?: boolean;
193
+ /** Model of the first counted request, as logged. */
194
+ model?: string;
195
+ /** The CLI version that wrote the log. */
196
+ cli?: string;
197
+ /** Tokens the first request carried: input + cache read + cache write. */
198
+ start?: number;
199
+ /** Characters per part of that start context; a part never observed is absent. */
200
+ parts?: Partial<Record<StartPart, number>>;
201
+ /** Read-only calls before the first edit; absent when the session never edited. */
202
+ look?: number;
203
+ /** Counted requests (a streamed reply counted once). */
204
+ req: number;
205
+ /** A `git commit` succeeded in the session. Absent on a subagent (not read there). */
206
+ commit?: boolean;
207
+ }
208
+ export interface AgentPointsDoc {
209
+ ok: true;
210
+ /** Newest first: at most `AGENT_POINTS_CAP` fresh conversations (a fork, a continuation or a headless run is no reading's session, so it is left off) and `AGENT_SUB_POINTS_CAP` subagent logs. */
211
+ points: AgentPoint[];
212
+ /** Points left off by the caps (the oldest of each kind), 0 when none. */
213
+ cut: number;
214
+ /** The repos asked about: one for a repo's route, every known one otherwise. */
215
+ repos: string[];
216
+ rules: {
217
+ look: string;
218
+ };
219
+ scannedAt: number;
220
+ logs: number;
221
+ reread: number;
222
+ }
223
+ export type AgentPointsResponse = AgentPointsDoc | {
224
+ ok: false;
225
+ error: string;
226
+ pending?: true;
227
+ };
228
+ /** The window the points cover: the same weeks the readings do. */
229
+ export declare const AGENT_POINT_WEEKS = 12;
230
+ /**
231
+ * Caps, per kind. A point is ~300 bytes of JSON, so these keep a response near 1.5 MB, which a phone
232
+ * parses without a stall. Subagent logs outnumber conversations ~5:1 on a busy repo (measured: 20,000
233
+ * of 24,000 points in twelve weeks), so one shared cap would be all subagents of the last few days
234
+ * and no conversation at all; each kind keeps its own newest.
235
+ */
236
+ export declare const AGENT_POINTS_CAP = 3000;
237
+ export declare const AGENT_SUB_POINTS_CAP = 2000;
238
+ /** What changed, drawn beside the readings (`GET /api/repos/:id/agentmarkers`). Markers say what changed, never whether it helped. */
239
+ export interface AgentMarkersDoc {
240
+ ok: true;
241
+ markers: AgentMarker[];
242
+ /** One sentence per source that could not be read: a source missing here is unknown, not unchanged. */
243
+ absent: string[];
244
+ }
245
+ export type AgentMarkersResponse = AgentMarkersDoc | {
246
+ ok: false;
247
+ error: string;
248
+ };
@@ -0,0 +1,36 @@
1
+ /** How many weeks the route answers. */
2
+ export const AGENT_READING_WEEKS = 12;
3
+ /** True when the reading is the absent sentence rather than a value. */
4
+ export function isAgentAbsent(x) {
5
+ return typeof x === "object" && x !== null && typeof x.absent === "string";
6
+ }
7
+ /**
8
+ * The parts in display order, with the label a person reads — the SAME names the per-session
9
+ * "what every turn carries" list uses (`alwaysonwords.ts` `carriedLabel`), so one part has one
10
+ * name app-wide; `claudeMd` and `memory` are that list's "instruction files" cut by file type.
11
+ */
12
+ export const START_PARTS = [
13
+ { id: "system", label: "system prompt" },
14
+ { id: "tools", label: "tool schemas" },
15
+ { id: "claudeMd", label: "instruction files: CLAUDE.md" },
16
+ { id: "memory", label: "instruction files: auto-memory" },
17
+ { id: "skills", label: "skill listing" },
18
+ { id: "deferredTools", label: "deferred tool names" },
19
+ { id: "agents", label: "subagent listing" },
20
+ { id: "hooks", label: "hook context" },
21
+ { id: "session", label: "session context" },
22
+ { id: "other", label: "MCP instructions and other" },
23
+ ];
24
+ /** What counts as a look before the first edit, in a sentence the region's `?` quotes. */
25
+ export const LOOK_RULE_TEXT = "A look is a call that only reads: Read, Grep, Glob, LS or NotebookRead, or a shell command that starts with grep, rg, find, ls, cat, head, tail, sed -n, wc, jq, tree or git log, show, diff, grep, blame or status (a leading cd … && is ignored). Looks are counted up to the session's first file edit; a session that never edits has no count.";
26
+ /** The window the points cover: the same weeks the readings do. */
27
+ export const AGENT_POINT_WEEKS = AGENT_READING_WEEKS;
28
+ /**
29
+ * Caps, per kind. A point is ~300 bytes of JSON, so these keep a response near 1.5 MB, which a phone
30
+ * parses without a stall. Subagent logs outnumber conversations ~5:1 on a busy repo (measured: 20,000
31
+ * of 24,000 points in twelve weeks), so one shared cap would be all subagents of the last few days
32
+ * and no conversation at all; each kind keeps its own newest.
33
+ */
34
+ export const AGENT_POINTS_CAP = 3000;
35
+ export const AGENT_SUB_POINTS_CAP = 2000;
36
+ //# sourceMappingURL=agentreadings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agentreadings.js","sourceRoot":"","sources":["../../src/wire/agent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ackendInfo {
123
123
  modes?: true;
124
124
  /** The phone's slash sheet lists the backend's OWN commands (`slash` keeps meaning claude's set and header chips). */
125
125
  commands?: true;
126
+ /** The skills and plugins switch (settings files of the claude family) is offered; absent = not offered, never `false`. */
127
+ skillSwitch?: true;
126
128
  /** How the core's repo instructions reach this backend by default (the session's actual: `SessionInfo.told`). */
127
129
  told?: "plugin-dir" | "env-file" | "config" | "flag" | "none";
128
130
  /**
@@ -139,6 +139,10 @@ export interface CostWindowDoc {
139
139
  /** Tokens no list price covered — counted, never charged zero. */
140
140
  unpriced: TokenTotals;
141
141
  pricesAsOf: string;
142
+ /** `list`: the rates were read off Anthropic's price page on `pricesAsOf`.
143
+ * `builtin`: the table shipped with this version, dated `pricesAsOf`.
144
+ * Absent on an older host — which always meant the built-in table. */
145
+ pricesFrom?: "list" | "builtin";
142
146
  scannedAt: number;
143
147
  /** Records in `totals` that are in NO hour (no readable timestamp) and that COULD fall in this
144
148
  * window — only logs last written at or after `fromHour` count (a record is never later than
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Setting up local dictation from the phone, on the wire.
3
+ *
4
+ * The desktop installs whisper.cpp (macOS brew) and downloads ONE chosen ggml
5
+ * model from upstream on a person's tap — never bundled, never automatic. The
6
+ * model table itself is `dictatemodels.ts`; these are the shapes that cross.
7
+ */
8
+ /** A model the person may choose, as the phone draws it (the table's row less
9
+ * the url and hash: the host holds those). */
10
+ export interface DictateModelChoice {
11
+ id: string;
12
+ file: string;
13
+ bytes: number;
14
+ note: string;
15
+ recommended: boolean;
16
+ /** This model's file is already in the model directory at the right size. */
17
+ installed: boolean;
18
+ }
19
+ /** What `POST /api/host/dictate/setup` takes. */
20
+ export interface DictateSetupRequest {
21
+ model: string;
22
+ }
23
+ export type DictateSetupStep = "engine" | "disk" | "download" | "verify";
24
+ /** `GET /api/host/dictate/setup`. A failure is a SENTENCE a person can act on;
25
+ * there is no auto-retry — the next attempt is another POST. */
26
+ export type DictateSetupState = {
27
+ state: "idle";
28
+ } | {
29
+ state: "running";
30
+ model: string;
31
+ step: DictateSetupStep;
32
+ bytesDone: number;
33
+ bytesTotal: number;
34
+ } | {
35
+ state: "done";
36
+ model: string;
37
+ } | {
38
+ state: "failed";
39
+ model: string;
40
+ step: DictateSetupStep;
41
+ reason: string;
42
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Setting up local dictation from the phone, on the wire.
3
+ *
4
+ * The desktop installs whisper.cpp (macOS brew) and downloads ONE chosen ggml
5
+ * model from upstream on a person's tap — never bundled, never automatic. The
6
+ * model table itself is `dictatemodels.ts`; these are the shapes that cross.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=dictatesetup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dictatesetup.js","sourceRoot":"","sources":["../../src/wire/dictatesetup.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}