@vibefield/puppeteer-views 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (522) hide show
  1. package/LICENSE +21 -0
  2. package/dist/bar/InstrumentBar.d.ts +81 -0
  3. package/dist/bar/InstrumentBar.d.ts.map +1 -0
  4. package/dist/bar/InstrumentBar.js +86 -0
  5. package/dist/bar/InstrumentBar.js.map +1 -0
  6. package/dist/bar/ProfileTabs.d.ts +24 -0
  7. package/dist/bar/ProfileTabs.d.ts.map +1 -0
  8. package/dist/bar/ProfileTabs.js +141 -0
  9. package/dist/bar/ProfileTabs.js.map +1 -0
  10. package/dist/chrome/ChromeBoundary.d.ts +60 -0
  11. package/dist/chrome/ChromeBoundary.d.ts.map +1 -0
  12. package/dist/chrome/ChromeBoundary.js +70 -0
  13. package/dist/chrome/ChromeBoundary.js.map +1 -0
  14. package/dist/chrome/stage.d.ts +8 -0
  15. package/dist/chrome/stage.d.ts.map +1 -0
  16. package/dist/chrome/stage.js +8 -0
  17. package/dist/chrome/stage.js.map +1 -0
  18. package/dist/colour/pane-colours.d.ts +21 -0
  19. package/dist/colour/pane-colours.d.ts.map +1 -0
  20. package/dist/colour/pane-colours.js +25 -0
  21. package/dist/colour/pane-colours.js.map +1 -0
  22. package/dist/colour/project-tint.d.ts +23 -0
  23. package/dist/colour/project-tint.d.ts.map +1 -0
  24. package/dist/colour/project-tint.js +100 -0
  25. package/dist/colour/project-tint.js.map +1 -0
  26. package/dist/deck/DeckFrames.d.ts +71 -0
  27. package/dist/deck/DeckFrames.d.ts.map +1 -0
  28. package/dist/deck/DeckFrames.js +50 -0
  29. package/dist/deck/DeckFrames.js.map +1 -0
  30. package/dist/deck/PaneFrame.d.ts +80 -0
  31. package/dist/deck/PaneFrame.d.ts.map +1 -0
  32. package/dist/deck/PaneFrame.js +118 -0
  33. package/dist/deck/PaneFrame.js.map +1 -0
  34. package/dist/deck/completed-agent-panes.d.ts +24 -0
  35. package/dist/deck/completed-agent-panes.d.ts.map +1 -0
  36. package/dist/deck/completed-agent-panes.js +72 -0
  37. package/dist/deck/completed-agent-panes.js.map +1 -0
  38. package/dist/deck/deck-zoom.d.ts +40 -0
  39. package/dist/deck/deck-zoom.d.ts.map +1 -0
  40. package/dist/deck/deck-zoom.js +200 -0
  41. package/dist/deck/deck-zoom.js.map +1 -0
  42. package/dist/deck/index.d.ts +8 -0
  43. package/dist/deck/index.d.ts.map +1 -0
  44. package/dist/deck/index.js +13 -0
  45. package/dist/deck/index.js.map +1 -0
  46. package/dist/deck/pane-elements.d.ts +24 -0
  47. package/dist/deck/pane-elements.d.ts.map +1 -0
  48. package/dist/deck/pane-elements.js +73 -0
  49. package/dist/deck/pane-elements.js.map +1 -0
  50. package/dist/deck/pane-frame.d.ts +88 -0
  51. package/dist/deck/pane-frame.d.ts.map +1 -0
  52. package/dist/deck/pane-frame.js +51 -0
  53. package/dist/deck/pane-frame.js.map +1 -0
  54. package/dist/deck/unused-pane-sessions.d.ts +24 -0
  55. package/dist/deck/unused-pane-sessions.d.ts.map +1 -0
  56. package/dist/deck/unused-pane-sessions.js +75 -0
  57. package/dist/deck/unused-pane-sessions.js.map +1 -0
  58. package/dist/deck/use-deck-zoom.d.ts +10 -0
  59. package/dist/deck/use-deck-zoom.d.ts.map +1 -0
  60. package/dist/deck/use-deck-zoom.js +31 -0
  61. package/dist/deck/use-deck-zoom.js.map +1 -0
  62. package/dist/find/FindSheet.d.ts +23 -0
  63. package/dist/find/FindSheet.d.ts.map +1 -0
  64. package/dist/find/FindSheet.js +197 -0
  65. package/dist/find/FindSheet.js.map +1 -0
  66. package/dist/find/find-agent.d.ts +35 -0
  67. package/dist/find/find-agent.d.ts.map +1 -0
  68. package/dist/find/find-agent.js +2 -0
  69. package/dist/find/find-agent.js.map +1 -0
  70. package/dist/find/find-model.d.ts +93 -0
  71. package/dist/find/find-model.d.ts.map +1 -0
  72. package/dist/find/find-model.js +372 -0
  73. package/dist/find/find-model.js.map +1 -0
  74. package/dist/find/history-port.d.ts +78 -0
  75. package/dist/find/history-port.d.ts.map +1 -0
  76. package/dist/find/history-port.js +9 -0
  77. package/dist/find/history-port.js.map +1 -0
  78. package/dist/icons/ServiceMark.d.ts +32 -0
  79. package/dist/icons/ServiceMark.d.ts.map +1 -0
  80. package/dist/icons/ServiceMark.js +57 -0
  81. package/dist/icons/ServiceMark.js.map +1 -0
  82. package/dist/icons/profile-glyph-suggest.d.ts +8 -0
  83. package/dist/icons/profile-glyph-suggest.d.ts.map +1 -0
  84. package/dist/icons/profile-glyph-suggest.js +42 -0
  85. package/dist/icons/profile-glyph-suggest.js.map +1 -0
  86. package/dist/icons/service-marks.d.ts +5 -0
  87. package/dist/icons/service-marks.d.ts.map +1 -0
  88. package/dist/icons/service-marks.js +81 -0
  89. package/dist/icons/service-marks.js.map +1 -0
  90. package/dist/index.d.ts +60 -0
  91. package/dist/index.d.ts.map +1 -0
  92. package/dist/index.js +86 -0
  93. package/dist/index.js.map +1 -0
  94. package/dist/lab/lab-clock.d.ts +11 -0
  95. package/dist/lab/lab-clock.d.ts.map +1 -0
  96. package/dist/lab/lab-clock.js +48 -0
  97. package/dist/lab/lab-clock.js.map +1 -0
  98. package/dist/lab/lab-model.d.ts +10 -0
  99. package/dist/lab/lab-model.d.ts.map +1 -0
  100. package/dist/lab/lab-model.js +146 -0
  101. package/dist/lab/lab-model.js.map +1 -0
  102. package/dist/lab/lab-stage.d.ts +72 -0
  103. package/dist/lab/lab-stage.d.ts.map +1 -0
  104. package/dist/lab/lab-stage.js +201 -0
  105. package/dist/lab/lab-stage.js.map +1 -0
  106. package/dist/lab/lab-world.d.ts +33 -0
  107. package/dist/lab/lab-world.d.ts.map +1 -0
  108. package/dist/lab/lab-world.js +394 -0
  109. package/dist/lab/lab-world.js.map +1 -0
  110. package/dist/lab/view-lab.css +98 -0
  111. package/dist/launcher/DeckLaunchers.d.ts +92 -0
  112. package/dist/launcher/DeckLaunchers.d.ts.map +1 -0
  113. package/dist/launcher/DeckLaunchers.js +377 -0
  114. package/dist/launcher/DeckLaunchers.js.map +1 -0
  115. package/dist/launcher/PaneLaunch.d.ts +50 -0
  116. package/dist/launcher/PaneLaunch.d.ts.map +1 -0
  117. package/dist/launcher/PaneLaunch.js +318 -0
  118. package/dist/launcher/PaneLaunch.js.map +1 -0
  119. package/dist/launcher/PaneLaunchChrome.d.ts +49 -0
  120. package/dist/launcher/PaneLaunchChrome.d.ts.map +1 -0
  121. package/dist/launcher/PaneLaunchChrome.js +32 -0
  122. package/dist/launcher/PaneLaunchChrome.js.map +1 -0
  123. package/dist/launcher/PaneLauncher.d.ts +97 -0
  124. package/dist/launcher/PaneLauncher.d.ts.map +1 -0
  125. package/dist/launcher/PaneLauncher.js +349 -0
  126. package/dist/launcher/PaneLauncher.js.map +1 -0
  127. package/dist/launcher/PaneLauncherChrome.d.ts +97 -0
  128. package/dist/launcher/PaneLauncherChrome.d.ts.map +1 -0
  129. package/dist/launcher/PaneLauncherChrome.js +131 -0
  130. package/dist/launcher/PaneLauncherChrome.js.map +1 -0
  131. package/dist/launcher/index.d.ts +9 -0
  132. package/dist/launcher/index.d.ts.map +1 -0
  133. package/dist/launcher/index.js +16 -0
  134. package/dist/launcher/index.js.map +1 -0
  135. package/dist/launcher/launch-model.d.ts +162 -0
  136. package/dist/launcher/launch-model.d.ts.map +1 -0
  137. package/dist/launcher/launch-model.js +169 -0
  138. package/dist/launcher/launch-model.js.map +1 -0
  139. package/dist/launcher/launcher-model.d.ts +268 -0
  140. package/dist/launcher/launcher-model.d.ts.map +1 -0
  141. package/dist/launcher/launcher-model.js +443 -0
  142. package/dist/launcher/launcher-model.js.map +1 -0
  143. package/dist/launcher/launcher-port.d.ts +115 -0
  144. package/dist/launcher/launcher-port.d.ts.map +1 -0
  145. package/dist/launcher/launcher-port.js +12 -0
  146. package/dist/launcher/launcher-port.js.map +1 -0
  147. package/dist/monitor/agent-status.d.ts +13 -0
  148. package/dist/monitor/agent-status.d.ts.map +1 -0
  149. package/dist/monitor/agent-status.js +5 -0
  150. package/dist/monitor/agent-status.js.map +1 -0
  151. package/dist/monitor/agents.d.ts +6 -0
  152. package/dist/monitor/agents.d.ts.map +1 -0
  153. package/dist/monitor/agents.js +21 -0
  154. package/dist/monitor/agents.js.map +1 -0
  155. package/dist/monitor/cost-format.d.ts +3 -0
  156. package/dist/monitor/cost-format.d.ts.map +1 -0
  157. package/dist/monitor/cost-format.js +12 -0
  158. package/dist/monitor/cost-format.js.map +1 -0
  159. package/dist/monitor/folder-name.d.ts +3 -0
  160. package/dist/monitor/folder-name.d.ts.map +1 -0
  161. package/dist/monitor/folder-name.js +6 -0
  162. package/dist/monitor/folder-name.js.map +1 -0
  163. package/dist/monitor/palette.d.ts +94 -0
  164. package/dist/monitor/palette.d.ts.map +1 -0
  165. package/dist/monitor/palette.js +157 -0
  166. package/dist/monitor/palette.js.map +1 -0
  167. package/dist/monitor/parameters.d.ts +33 -0
  168. package/dist/monitor/parameters.d.ts.map +1 -0
  169. package/dist/monitor/parameters.js +53 -0
  170. package/dist/monitor/parameters.js.map +1 -0
  171. package/dist/monitor/recede.d.ts +14 -0
  172. package/dist/monitor/recede.d.ts.map +1 -0
  173. package/dist/monitor/recede.js +35 -0
  174. package/dist/monitor/recede.js.map +1 -0
  175. package/dist/monitor/registry.d.ts +14 -0
  176. package/dist/monitor/registry.d.ts.map +1 -0
  177. package/dist/monitor/registry.js +36 -0
  178. package/dist/monitor/registry.js.map +1 -0
  179. package/dist/monitor/remote-write.d.ts +16 -0
  180. package/dist/monitor/remote-write.d.ts.map +1 -0
  181. package/dist/monitor/remote-write.js +21 -0
  182. package/dist/monitor/remote-write.js.map +1 -0
  183. package/dist/monitor/types.d.ts +205 -0
  184. package/dist/monitor/types.d.ts.map +1 -0
  185. package/dist/monitor/types.js +2 -0
  186. package/dist/monitor/types.js.map +1 -0
  187. package/dist/styles/bar.css +396 -0
  188. package/dist/styles/deck-frame.css +439 -0
  189. package/dist/styles/deck-zoom.css +70 -0
  190. package/dist/styles/find-sheet.css +270 -0
  191. package/dist/styles/pane-launcher.css +955 -0
  192. package/dist/styles/usage.css +368 -0
  193. package/dist/styles/views.css +12 -0
  194. package/dist/usage/UsageColumn.d.ts +8 -0
  195. package/dist/usage/UsageColumn.d.ts.map +1 -0
  196. package/dist/usage/UsageColumn.js +133 -0
  197. package/dist/usage/UsageColumn.js.map +1 -0
  198. package/dist/usage/account-usage-port.d.ts +12 -0
  199. package/dist/usage/account-usage-port.d.ts.map +1 -0
  200. package/dist/usage/account-usage-port.js +2 -0
  201. package/dist/usage/account-usage-port.js.map +1 -0
  202. package/dist/usage/account-usage.d.ts +86 -0
  203. package/dist/usage/account-usage.d.ts.map +1 -0
  204. package/dist/usage/account-usage.js +262 -0
  205. package/dist/usage/account-usage.js.map +1 -0
  206. package/dist/views/list/AgentList.d.ts +4 -0
  207. package/dist/views/list/AgentList.d.ts.map +1 -0
  208. package/dist/views/list/AgentList.js +101 -0
  209. package/dist/views/list/AgentList.js.map +1 -0
  210. package/dist/views/list/ListSpawnMenu.d.ts +20 -0
  211. package/dist/views/list/ListSpawnMenu.d.ts.map +1 -0
  212. package/dist/views/list/ListSpawnMenu.js +143 -0
  213. package/dist/views/list/ListSpawnMenu.js.map +1 -0
  214. package/dist/views/list/index.d.ts +8 -0
  215. package/dist/views/list/index.d.ts.map +1 -0
  216. package/dist/views/list/index.js +43 -0
  217. package/dist/views/list/index.js.map +1 -0
  218. package/dist/views/list/lab/main.d.ts +2 -0
  219. package/dist/views/list/lab/main.d.ts.map +1 -0
  220. package/dist/views/list/lab/main.js +25 -0
  221. package/dist/views/list/lab/main.js.map +1 -0
  222. package/dist/views/list/list-parameters.d.ts +9 -0
  223. package/dist/views/list/list-parameters.d.ts.map +1 -0
  224. package/dist/views/list/list-parameters.js +27 -0
  225. package/dist/views/list/list-parameters.js.map +1 -0
  226. package/dist/views/list/list.css +387 -0
  227. package/dist/views/rain/RainView.d.ts +4 -0
  228. package/dist/views/rain/RainView.d.ts.map +1 -0
  229. package/dist/views/rain/RainView.js +282 -0
  230. package/dist/views/rain/RainView.js.map +1 -0
  231. package/dist/views/rain/index.d.ts +8 -0
  232. package/dist/views/rain/index.d.ts.map +1 -0
  233. package/dist/views/rain/index.js +53 -0
  234. package/dist/views/rain/index.js.map +1 -0
  235. package/dist/views/rain/lab/main.d.ts +2 -0
  236. package/dist/views/rain/lab/main.d.ts.map +1 -0
  237. package/dist/views/rain/lab/main.js +26 -0
  238. package/dist/views/rain/lab/main.js.map +1 -0
  239. package/dist/views/rain/rain-parameters.d.ts +15 -0
  240. package/dist/views/rain/rain-parameters.d.ts.map +1 -0
  241. package/dist/views/rain/rain-parameters.js +52 -0
  242. package/dist/views/rain/rain-parameters.js.map +1 -0
  243. package/dist/views/rain/rain-streams.d.ts +44 -0
  244. package/dist/views/rain/rain-streams.d.ts.map +1 -0
  245. package/dist/views/rain/rain-streams.js +101 -0
  246. package/dist/views/rain/rain-streams.js.map +1 -0
  247. package/dist/views/rain/rain.css +200 -0
  248. package/dist/views/spend/SpendView.d.ts +30 -0
  249. package/dist/views/spend/SpendView.d.ts.map +1 -0
  250. package/dist/views/spend/SpendView.js +645 -0
  251. package/dist/views/spend/SpendView.js.map +1 -0
  252. package/dist/views/spend/index.d.ts +8 -0
  253. package/dist/views/spend/index.d.ts.map +1 -0
  254. package/dist/views/spend/index.js +54 -0
  255. package/dist/views/spend/index.js.map +1 -0
  256. package/dist/views/spend/lab/main.d.ts +2 -0
  257. package/dist/views/spend/lab/main.d.ts.map +1 -0
  258. package/dist/views/spend/lab/main.js +237 -0
  259. package/dist/views/spend/lab/main.js.map +1 -0
  260. package/dist/views/spend/lab/spend-fixtures.d.ts +72 -0
  261. package/dist/views/spend/lab/spend-fixtures.d.ts.map +1 -0
  262. package/dist/views/spend/lab/spend-fixtures.js +412 -0
  263. package/dist/views/spend/lab/spend-fixtures.js.map +1 -0
  264. package/dist/views/spend/spend-ink.d.ts +18 -0
  265. package/dist/views/spend/spend-ink.d.ts.map +1 -0
  266. package/dist/views/spend/spend-ink.js +50 -0
  267. package/dist/views/spend/spend-ink.js.map +1 -0
  268. package/dist/views/spend/spend-list.d.ts +48 -0
  269. package/dist/views/spend/spend-list.d.ts.map +1 -0
  270. package/dist/views/spend/spend-list.js +93 -0
  271. package/dist/views/spend/spend-list.js.map +1 -0
  272. package/dist/views/spend/spend-paint.d.ts +88 -0
  273. package/dist/views/spend/spend-paint.d.ts.map +1 -0
  274. package/dist/views/spend/spend-paint.js +225 -0
  275. package/dist/views/spend/spend-paint.js.map +1 -0
  276. package/dist/views/spend/spend-parameters.d.ts +11 -0
  277. package/dist/views/spend/spend-parameters.d.ts.map +1 -0
  278. package/dist/views/spend/spend-parameters.js +27 -0
  279. package/dist/views/spend/spend-parameters.js.map +1 -0
  280. package/dist/views/spend/spend-scale.d.ts +43 -0
  281. package/dist/views/spend/spend-scale.d.ts.map +1 -0
  282. package/dist/views/spend/spend-scale.js +71 -0
  283. package/dist/views/spend/spend-scale.js.map +1 -0
  284. package/dist/views/spend/spend-series.d.ts +91 -0
  285. package/dist/views/spend/spend-series.d.ts.map +1 -0
  286. package/dist/views/spend/spend-series.js +212 -0
  287. package/dist/views/spend/spend-series.js.map +1 -0
  288. package/dist/views/spend/spend-words.d.ts +82 -0
  289. package/dist/views/spend/spend-words.d.ts.map +1 -0
  290. package/dist/views/spend/spend-words.js +164 -0
  291. package/dist/views/spend/spend-words.js.map +1 -0
  292. package/dist/views/spend/spend.css +585 -0
  293. package/dist/views/swarm/AgentSwarm.d.ts +4 -0
  294. package/dist/views/swarm/AgentSwarm.d.ts.map +1 -0
  295. package/dist/views/swarm/AgentSwarm.js +969 -0
  296. package/dist/views/swarm/AgentSwarm.js.map +1 -0
  297. package/dist/views/swarm/bloom/SpawnBloom.d.ts +26 -0
  298. package/dist/views/swarm/bloom/SpawnBloom.d.ts.map +1 -0
  299. package/dist/views/swarm/bloom/SpawnBloom.js +332 -0
  300. package/dist/views/swarm/bloom/SpawnBloom.js.map +1 -0
  301. package/dist/views/swarm/bloom/birth.d.ts +70 -0
  302. package/dist/views/swarm/bloom/birth.d.ts.map +1 -0
  303. package/dist/views/swarm/bloom/birth.js +89 -0
  304. package/dist/views/swarm/bloom/birth.js.map +1 -0
  305. package/dist/views/swarm/bloom/canvas-measure.d.ts +11 -0
  306. package/dist/views/swarm/bloom/canvas-measure.d.ts.map +1 -0
  307. package/dist/views/swarm/bloom/canvas-measure.js +37 -0
  308. package/dist/views/swarm/bloom/canvas-measure.js.map +1 -0
  309. package/dist/views/swarm/bloom/constants.d.ts +93 -0
  310. package/dist/views/swarm/bloom/constants.d.ts.map +1 -0
  311. package/dist/views/swarm/bloom/constants.js +94 -0
  312. package/dist/views/swarm/bloom/constants.js.map +1 -0
  313. package/dist/views/swarm/bloom/field-frame.d.ts +69 -0
  314. package/dist/views/swarm/bloom/field-frame.d.ts.map +1 -0
  315. package/dist/views/swarm/bloom/field-frame.js +104 -0
  316. package/dist/views/swarm/bloom/field-frame.js.map +1 -0
  317. package/dist/views/swarm/bloom/geometry.d.ts +187 -0
  318. package/dist/views/swarm/bloom/geometry.d.ts.map +1 -0
  319. package/dist/views/swarm/bloom/geometry.js +379 -0
  320. package/dist/views/swarm/bloom/geometry.js.map +1 -0
  321. package/dist/views/swarm/bloom/index.d.ts +8 -0
  322. package/dist/views/swarm/bloom/index.d.ts.map +1 -0
  323. package/dist/views/swarm/bloom/index.js +13 -0
  324. package/dist/views/swarm/bloom/index.js.map +1 -0
  325. package/dist/views/swarm/bloom/menu.d.ts +5 -0
  326. package/dist/views/swarm/bloom/menu.d.ts.map +1 -0
  327. package/dist/views/swarm/bloom/menu.js +14 -0
  328. package/dist/views/swarm/bloom/menu.js.map +1 -0
  329. package/dist/views/swarm/bloom/model.d.ts +255 -0
  330. package/dist/views/swarm/bloom/model.d.ts.map +1 -0
  331. package/dist/views/swarm/bloom/model.js +678 -0
  332. package/dist/views/swarm/bloom/model.js.map +1 -0
  333. package/dist/views/swarm/bloom/scenarios.d.ts +7 -0
  334. package/dist/views/swarm/bloom/scenarios.d.ts.map +1 -0
  335. package/dist/views/swarm/bloom/scenarios.js +57 -0
  336. package/dist/views/swarm/bloom/scenarios.js.map +1 -0
  337. package/dist/views/swarm/bloom/spawn-bloom.css +407 -0
  338. package/dist/views/swarm/bloom/targeting.d.ts +60 -0
  339. package/dist/views/swarm/bloom/targeting.d.ts.map +1 -0
  340. package/dist/views/swarm/bloom/targeting.js +74 -0
  341. package/dist/views/swarm/bloom/targeting.js.map +1 -0
  342. package/dist/views/swarm/bloom/use-spawn-bloom.d.ts +100 -0
  343. package/dist/views/swarm/bloom/use-spawn-bloom.d.ts.map +1 -0
  344. package/dist/views/swarm/bloom/use-spawn-bloom.js +333 -0
  345. package/dist/views/swarm/bloom/use-spawn-bloom.js.map +1 -0
  346. package/dist/views/swarm/bloom/words.d.ts +73 -0
  347. package/dist/views/swarm/bloom/words.d.ts.map +1 -0
  348. package/dist/views/swarm/bloom/words.js +195 -0
  349. package/dist/views/swarm/bloom/words.js.map +1 -0
  350. package/dist/views/swarm/body-id.d.ts +13 -0
  351. package/dist/views/swarm/body-id.d.ts.map +1 -0
  352. package/dist/views/swarm/body-id.js +12 -0
  353. package/dist/views/swarm/body-id.js.map +1 -0
  354. package/dist/views/swarm/bubble-model.d.ts +128 -0
  355. package/dist/views/swarm/bubble-model.d.ts.map +1 -0
  356. package/dist/views/swarm/bubble-model.js +421 -0
  357. package/dist/views/swarm/bubble-model.js.map +1 -0
  358. package/dist/views/swarm/gpu/frame-layout.d.ts +52 -0
  359. package/dist/views/swarm/gpu/frame-layout.d.ts.map +1 -0
  360. package/dist/views/swarm/gpu/frame-layout.js +122 -0
  361. package/dist/views/swarm/gpu/frame-layout.js.map +1 -0
  362. package/dist/views/swarm/gpu/glyph-atlas.d.ts +63 -0
  363. package/dist/views/swarm/gpu/glyph-atlas.d.ts.map +1 -0
  364. package/dist/views/swarm/gpu/glyph-atlas.js +207 -0
  365. package/dist/views/swarm/gpu/glyph-atlas.js.map +1 -0
  366. package/dist/views/swarm/gpu/profile-icons.d.ts +4 -0
  367. package/dist/views/swarm/gpu/profile-icons.d.ts.map +1 -0
  368. package/dist/views/swarm/gpu/profile-icons.js +18 -0
  369. package/dist/views/swarm/gpu/profile-icons.js.map +1 -0
  370. package/dist/views/swarm/gpu/shaders/body.wgsl.d.ts +3 -0
  371. package/dist/views/swarm/gpu/shaders/body.wgsl.d.ts.map +1 -0
  372. package/dist/views/swarm/gpu/shaders/body.wgsl.js +162 -0
  373. package/dist/views/swarm/gpu/shaders/body.wgsl.js.map +1 -0
  374. package/dist/views/swarm/gpu/shaders/common.wgsl.d.ts +3 -0
  375. package/dist/views/swarm/gpu/shaders/common.wgsl.d.ts.map +1 -0
  376. package/dist/views/swarm/gpu/shaders/common.wgsl.js +171 -0
  377. package/dist/views/swarm/gpu/shaders/common.wgsl.js.map +1 -0
  378. package/dist/views/swarm/gpu/shaders/erase.wgsl.d.ts +3 -0
  379. package/dist/views/swarm/gpu/shaders/erase.wgsl.d.ts.map +1 -0
  380. package/dist/views/swarm/gpu/shaders/erase.wgsl.js +61 -0
  381. package/dist/views/swarm/gpu/shaders/erase.wgsl.js.map +1 -0
  382. package/dist/views/swarm/gpu/shaders/field.wgsl.d.ts +3 -0
  383. package/dist/views/swarm/gpu/shaders/field.wgsl.d.ts.map +1 -0
  384. package/dist/views/swarm/gpu/shaders/field.wgsl.js +47 -0
  385. package/dist/views/swarm/gpu/shaders/field.wgsl.js.map +1 -0
  386. package/dist/views/swarm/gpu/shaders/glow.wgsl.d.ts +3 -0
  387. package/dist/views/swarm/gpu/shaders/glow.wgsl.d.ts.map +1 -0
  388. package/dist/views/swarm/gpu/shaders/glow.wgsl.js +39 -0
  389. package/dist/views/swarm/gpu/shaders/glow.wgsl.js.map +1 -0
  390. package/dist/views/swarm/gpu/shaders/hub.wgsl.d.ts +3 -0
  391. package/dist/views/swarm/gpu/shaders/hub.wgsl.d.ts.map +1 -0
  392. package/dist/views/swarm/gpu/shaders/hub.wgsl.js +48 -0
  393. package/dist/views/swarm/gpu/shaders/hub.wgsl.js.map +1 -0
  394. package/dist/views/swarm/gpu/shaders/shadow.wgsl.d.ts +3 -0
  395. package/dist/views/swarm/gpu/shaders/shadow.wgsl.d.ts.map +1 -0
  396. package/dist/views/swarm/gpu/shaders/shadow.wgsl.js +37 -0
  397. package/dist/views/swarm/gpu/shaders/shadow.wgsl.js.map +1 -0
  398. package/dist/views/swarm/gpu/shaders/text.wgsl.d.ts +3 -0
  399. package/dist/views/swarm/gpu/shaders/text.wgsl.d.ts.map +1 -0
  400. package/dist/views/swarm/gpu/shaders/text.wgsl.js +51 -0
  401. package/dist/views/swarm/gpu/shaders/text.wgsl.js.map +1 -0
  402. package/dist/views/swarm/gpu/swarm-renderer.d.ts +155 -0
  403. package/dist/views/swarm/gpu/swarm-renderer.d.ts.map +1 -0
  404. package/dist/views/swarm/gpu/swarm-renderer.js +696 -0
  405. package/dist/views/swarm/gpu/swarm-renderer.js.map +1 -0
  406. package/dist/views/swarm/index.d.ts +9 -0
  407. package/dist/views/swarm/index.d.ts.map +1 -0
  408. package/dist/views/swarm/index.js +40 -0
  409. package/dist/views/swarm/index.js.map +1 -0
  410. package/dist/views/swarm/lab/fixtures.d.ts +148 -0
  411. package/dist/views/swarm/lab/fixtures.d.ts.map +1 -0
  412. package/dist/views/swarm/lab/fixtures.js +821 -0
  413. package/dist/views/swarm/lab/fixtures.js.map +1 -0
  414. package/dist/views/swarm/lab/lab.css +315 -0
  415. package/dist/views/swarm/lab/main.d.ts +2 -0
  416. package/dist/views/swarm/lab/main.d.ts.map +1 -0
  417. package/dist/views/swarm/lab/main.js +474 -0
  418. package/dist/views/swarm/lab/main.js.map +1 -0
  419. package/dist/views/swarm/physics/driver.d.ts +23 -0
  420. package/dist/views/swarm/physics/driver.d.ts.map +1 -0
  421. package/dist/views/swarm/physics/driver.js +68 -0
  422. package/dist/views/swarm/physics/driver.js.map +1 -0
  423. package/dist/views/swarm/physics/frame.d.ts +28 -0
  424. package/dist/views/swarm/physics/frame.d.ts.map +1 -0
  425. package/dist/views/swarm/physics/frame.js +47 -0
  426. package/dist/views/swarm/physics/frame.js.map +1 -0
  427. package/dist/views/swarm/physics/host.d.ts +28 -0
  428. package/dist/views/swarm/physics/host.d.ts.map +1 -0
  429. package/dist/views/swarm/physics/host.js +168 -0
  430. package/dist/views/swarm/physics/host.js.map +1 -0
  431. package/dist/views/swarm/physics/index.d.ts +6 -0
  432. package/dist/views/swarm/physics/index.d.ts.map +1 -0
  433. package/dist/views/swarm/physics/index.js +14 -0
  434. package/dist/views/swarm/physics/index.js.map +1 -0
  435. package/dist/views/swarm/physics/inline-driver.d.ts +27 -0
  436. package/dist/views/swarm/physics/inline-driver.d.ts.map +1 -0
  437. package/dist/views/swarm/physics/inline-driver.js +37 -0
  438. package/dist/views/swarm/physics/inline-driver.js.map +1 -0
  439. package/dist/views/swarm/physics/protocol.d.ts +125 -0
  440. package/dist/views/swarm/physics/protocol.d.ts.map +1 -0
  441. package/dist/views/swarm/physics/protocol.js +4 -0
  442. package/dist/views/swarm/physics/protocol.js.map +1 -0
  443. package/dist/views/swarm/physics/spawn-clamp.d.ts +11 -0
  444. package/dist/views/swarm/physics/spawn-clamp.d.ts.map +1 -0
  445. package/dist/views/swarm/physics/spawn-clamp.js +15 -0
  446. package/dist/views/swarm/physics/spawn-clamp.js.map +1 -0
  447. package/dist/views/swarm/physics/swarm-physics.worker.d.ts +2 -0
  448. package/dist/views/swarm/physics/swarm-physics.worker.d.ts.map +1 -0
  449. package/dist/views/swarm/physics/swarm-physics.worker.js +66 -0
  450. package/dist/views/swarm/physics/swarm-physics.worker.js.map +1 -0
  451. package/dist/views/swarm/physics/world.d.ts +174 -0
  452. package/dist/views/swarm/physics/world.d.ts.map +1 -0
  453. package/dist/views/swarm/physics/world.js +454 -0
  454. package/dist/views/swarm/physics/world.js.map +1 -0
  455. package/dist/views/swarm/swarm-parameters.d.ts +50 -0
  456. package/dist/views/swarm/swarm-parameters.d.ts.map +1 -0
  457. package/dist/views/swarm/swarm-parameters.js +103 -0
  458. package/dist/views/swarm/swarm-parameters.js.map +1 -0
  459. package/dist/views/swarm/swarm-theme.d.ts +5 -0
  460. package/dist/views/swarm/swarm-theme.d.ts.map +1 -0
  461. package/dist/views/swarm/swarm-theme.js +63 -0
  462. package/dist/views/swarm/swarm-theme.js.map +1 -0
  463. package/dist/views/swarm/swarm.css +136 -0
  464. package/dist/views/swarm/text-layout.d.ts +72 -0
  465. package/dist/views/swarm/text-layout.d.ts.map +1 -0
  466. package/dist/views/swarm/text-layout.js +76 -0
  467. package/dist/views/swarm/text-layout.js.map +1 -0
  468. package/dist/views/swarm/weight.d.ts +44 -0
  469. package/dist/views/swarm/weight.d.ts.map +1 -0
  470. package/dist/views/swarm/weight.js +57 -0
  471. package/dist/views/swarm/weight.js.map +1 -0
  472. package/dist/views/timeline/TimelineView.d.ts +9 -0
  473. package/dist/views/timeline/TimelineView.d.ts.map +1 -0
  474. package/dist/views/timeline/TimelineView.js +889 -0
  475. package/dist/views/timeline/TimelineView.js.map +1 -0
  476. package/dist/views/timeline/index.d.ts +11 -0
  477. package/dist/views/timeline/index.d.ts.map +1 -0
  478. package/dist/views/timeline/index.js +63 -0
  479. package/dist/views/timeline/index.js.map +1 -0
  480. package/dist/views/timeline/lab/main.d.ts +2 -0
  481. package/dist/views/timeline/lab/main.d.ts.map +1 -0
  482. package/dist/views/timeline/lab/main.js +114 -0
  483. package/dist/views/timeline/lab/main.js.map +1 -0
  484. package/dist/views/timeline/lab/timeline-fixtures.d.ts +31 -0
  485. package/dist/views/timeline/lab/timeline-fixtures.d.ts.map +1 -0
  486. package/dist/views/timeline/lab/timeline-fixtures.js +337 -0
  487. package/dist/views/timeline/lab/timeline-fixtures.js.map +1 -0
  488. package/dist/views/timeline/pulse-map.d.ts +63 -0
  489. package/dist/views/timeline/pulse-map.d.ts.map +1 -0
  490. package/dist/views/timeline/pulse-map.js +162 -0
  491. package/dist/views/timeline/pulse-map.js.map +1 -0
  492. package/dist/views/timeline/timeline-inks.d.ts +28 -0
  493. package/dist/views/timeline/timeline-inks.d.ts.map +1 -0
  494. package/dist/views/timeline/timeline-inks.js +35 -0
  495. package/dist/views/timeline/timeline-inks.js.map +1 -0
  496. package/dist/views/timeline/timeline-lanes.d.ts +139 -0
  497. package/dist/views/timeline/timeline-lanes.d.ts.map +1 -0
  498. package/dist/views/timeline/timeline-lanes.js +240 -0
  499. package/dist/views/timeline/timeline-lanes.js.map +1 -0
  500. package/dist/views/timeline/timeline-paint.d.ts +39 -0
  501. package/dist/views/timeline/timeline-paint.d.ts.map +1 -0
  502. package/dist/views/timeline/timeline-paint.js +242 -0
  503. package/dist/views/timeline/timeline-paint.js.map +1 -0
  504. package/dist/views/timeline/timeline-parameters.d.ts +11 -0
  505. package/dist/views/timeline/timeline-parameters.d.ts.map +1 -0
  506. package/dist/views/timeline/timeline-parameters.js +27 -0
  507. package/dist/views/timeline/timeline-parameters.js.map +1 -0
  508. package/dist/views/timeline/timeline-scale.d.ts +73 -0
  509. package/dist/views/timeline/timeline-scale.d.ts.map +1 -0
  510. package/dist/views/timeline/timeline-scale.js +152 -0
  511. package/dist/views/timeline/timeline-scale.js.map +1 -0
  512. package/dist/views/timeline/timeline-words.d.ts +46 -0
  513. package/dist/views/timeline/timeline-words.d.ts.map +1 -0
  514. package/dist/views/timeline/timeline-words.js +132 -0
  515. package/dist/views/timeline/timeline-words.js.map +1 -0
  516. package/dist/views/timeline/timeline.css +875 -0
  517. package/dist/views/timeline/wake-geometry.d.ts +88 -0
  518. package/dist/views/timeline/wake-geometry.d.ts.map +1 -0
  519. package/dist/views/timeline/wake-geometry.js +243 -0
  520. package/dist/views/timeline/wake-geometry.js.map +1 -0
  521. package/package.json +78 -3
  522. package/README.md +0 -3
@@ -0,0 +1,412 @@
1
+ import { AGENT_MARK_PROVIDERS, DEFAULT_PROJECT_TINT, paneColour, projectColour, } from '@vibefield/puppeteer-view-sdk/toolkit';
2
+ // The spend lab's afternoon, as a host's replica hands the rows over — runtime
3
+ // only: each priced row's `MonitorCost`, its meter (`usd`) and Core's last ten
4
+ // minutes (`series`, twenty 30-second buckets, the last the one now is in), and
5
+ // nothing older. Eight agents on this desktop with their buckets — three
6
+ // rosetta siblings, two waiting on you (a question, a permission), a reply
7
+ // nobody opened, one born four minutes ago, one partly priced — one on another
8
+ // desktop with a total and no buckets, one on a provider with no price (SV-D5),
9
+ // and two terminals, which cost nothing. Every priced response is drawn from a
10
+ // generator seeded by the agent's id from where the afternoon was opened, so a
11
+ // fold at a later moment reads the same afternoon further on, as the backend's
12
+ // ledger at every step boundary would. `crowd` adds ten more agents, for the
13
+ // dock (SV-D19). Ported from the prototype's world (`draft/godview-spend/site/
14
+ // sv-core.js`), as the held view's lab drew it (`feat/sv-live`), in the model's
15
+ // words (MV-7). The held rows named each agent's task; the model carries none,
16
+ // so the line under a name is M4's (the wait, else the reply, else the
17
+ // status, M178), and a few rows carry the latest reply the backend would.
18
+ const SEC = 1000;
19
+ const MIN = 60 * SEC;
20
+ const HOUR = 60 * MIN;
21
+ /** The backend's ledger: twenty buckets of 30 s (`MonitorCost.series`). */
22
+ const STEP_MS = 30 * SEC;
23
+ const STEP_COUNT = 20;
24
+ /** Responses are drawn from this long before the opening: past what Core's buckets reach. */
25
+ const LEAD_MS = 11 * MIN;
26
+ /** How long past the opening a working agent keeps working: the lab runs live for an hour. */
27
+ const HORIZON_MS = HOUR;
28
+ const AGENTS = [
29
+ {
30
+ id: 'vibe-field',
31
+ project: 'vibe-field',
32
+ model: 'opus',
33
+ branch: 'main',
34
+ mark: 0,
35
+ born: 5 * HOUR + 10 * MIN,
36
+ now: { state: 'working', ago: 12 * MIN + 41 * SEC },
37
+ spent: 48.2,
38
+ rate: 0.3,
39
+ gap: 24,
40
+ cover: 'complete',
41
+ task: 'port the History view into the frame',
42
+ reply: { text: 'Porting the History view into the frame: the room mounts, the search is next.', final: false },
43
+ pane: { seq: 2, active: false },
44
+ },
45
+ {
46
+ id: 'refactor-auth',
47
+ project: 'refactor-auth',
48
+ model: 'opus',
49
+ branch: 'refactor-auth',
50
+ mark: 0,
51
+ born: 2 * HOUR + 5 * MIN,
52
+ now: { state: 'working', ago: 41 * MIN + 20 * SEC },
53
+ spent: 26.4,
54
+ rate: 0.24,
55
+ gap: 20,
56
+ cover: 'complete',
57
+ task: 'move the token store behind the grant',
58
+ },
59
+ {
60
+ id: 'rosetta-grants',
61
+ project: 'rosetta',
62
+ model: 'gpt-5',
63
+ branch: 'main',
64
+ mark: 1,
65
+ born: 4 * HOUR + 30 * MIN,
66
+ now: {
67
+ state: 'blocked',
68
+ ago: 3 * MIN + 40 * SEC,
69
+ blocker: { kind: 'question', detail: 'Should the grant expire with the session, or after an hour?' },
70
+ },
71
+ spent: 16.1,
72
+ rate: 0.14,
73
+ gap: 16,
74
+ cover: 'complete',
75
+ task: 'direct-plane grants',
76
+ },
77
+ {
78
+ id: 'rosetta-index',
79
+ project: 'rosetta',
80
+ branch: 'main',
81
+ mark: 0,
82
+ born: 3 * HOUR + 15 * MIN,
83
+ now: { state: 'working', ago: 6 * MIN + 5 * SEC },
84
+ spent: 15.2,
85
+ rate: 0.16,
86
+ gap: 18,
87
+ cover: 'complete',
88
+ task: 'rebuild the session index',
89
+ reply: { text: "Rebuilding the session index from the store's segments.", final: false },
90
+ },
91
+ {
92
+ id: 'rosetta-docs',
93
+ project: 'rosetta',
94
+ model: 'sonnet',
95
+ branch: 'docs',
96
+ mark: 0,
97
+ born: 3 * HOUR + 40 * MIN,
98
+ now: { state: 'unseen', ago: 5 * MIN + 10 * SEC },
99
+ spent: 3.7,
100
+ rate: 0.06,
101
+ gap: 12,
102
+ cover: 'complete',
103
+ task: 'tidy the timeline route docs',
104
+ reply: { text: 'Tidied the timeline route docs: every route now names its owner.', final: true },
105
+ },
106
+ {
107
+ id: 'billing-api',
108
+ project: 'billing-api',
109
+ model: 'gpt-5',
110
+ branch: 'billing/ledger-reader',
111
+ mark: 1,
112
+ born: HOUR + 32 * MIN,
113
+ now: {
114
+ state: 'blocked',
115
+ ago: 4 * MIN + 12 * SEC,
116
+ blocker: { kind: 'permission', detail: 'Bash · git push origin billing/ledger-reader' },
117
+ },
118
+ spent: 3.9,
119
+ rate: 0.09,
120
+ gap: 14,
121
+ cover: 'partial',
122
+ task: 'tighten the ledger reader',
123
+ pane: { seq: 1, active: false },
124
+ },
125
+ {
126
+ id: 'dotfiles',
127
+ project: 'dotfiles',
128
+ model: 'sonnet',
129
+ branch: 'main',
130
+ mark: 0,
131
+ born: 6 * HOUR + 20 * MIN,
132
+ now: { state: 'idle', ago: HOUR + 2 * MIN },
133
+ spent: 4.73,
134
+ rate: 0.035,
135
+ gap: 10,
136
+ cover: 'complete',
137
+ task: 'zsh: stop the colon modifier eating revision paths',
138
+ reply: { text: 'Fixed: the colon modifier no longer eats revision paths.', final: true },
139
+ },
140
+ {
141
+ id: 'notes',
142
+ project: 'notes',
143
+ model: 'haiku',
144
+ peer: 'tower',
145
+ mark: 0,
146
+ born: 2 * HOUR + 50 * MIN,
147
+ now: { state: 'working', ago: 2 * MIN + 30 * SEC },
148
+ spent: 1.22,
149
+ rate: 0.05,
150
+ gap: 8,
151
+ cover: 'complete',
152
+ task: "sort Tuesday's notes by project",
153
+ reply: { text: "Sorting Tuesday's notes by project.", final: false },
154
+ },
155
+ {
156
+ id: 'swarm-lab',
157
+ project: 'swarm-lab',
158
+ model: 'fast-4',
159
+ branch: 'lab',
160
+ mark: 2,
161
+ born: 58 * MIN,
162
+ now: { state: 'unseen', ago: 38 * MIN + 2 * SEC },
163
+ spent: 0,
164
+ rate: 0,
165
+ gap: 20,
166
+ cover: 'none',
167
+ task: 'why do bodies jam top-left after release?',
168
+ reply: { text: 'Release clears the obstacle list before the step, so bodies pile into the corner.', final: true },
169
+ },
170
+ {
171
+ id: 'changelog',
172
+ project: 'changelog',
173
+ model: 'haiku',
174
+ branch: 'main',
175
+ mark: 0,
176
+ born: 4 * MIN + 30 * SEC,
177
+ now: { state: 'working', ago: 4 * MIN + 30 * SEC },
178
+ spent: 0,
179
+ rate: 0.06,
180
+ gap: 9,
181
+ cover: 'complete',
182
+ task: "write this week's changelog",
183
+ },
184
+ ];
185
+ const PROJECT_SEQ = {
186
+ 'vibe-field': 0,
187
+ rosetta: 1,
188
+ 'refactor-auth': 2,
189
+ 'billing-api': 3,
190
+ 'swarm-lab': 4,
191
+ dotfiles: 5,
192
+ notes: 6,
193
+ changelog: 7,
194
+ ice: 9,
195
+ truffle: 10,
196
+ ghosttea: 11,
197
+ puppeteer: 12,
198
+ jabali: 13,
199
+ voyager: 14,
200
+ study: 15,
201
+ };
202
+ /** Ten more agents across other projects: id, project, model, hours old, $/min, state now, its length, task. */
203
+ const CROWD = [
204
+ ['ice-render', 'ice', 'opus', 4.2, 0.22, 'working', 6, 'batch the card shadows'],
205
+ ['ice-bench', 'ice', 'gpt-5', 2.6, 0.1, 'blocked', 9, 'profile the ground at n=96'],
206
+ ['truffle', 'truffle', 'sonnet', 3.4, 0.07, 'idle', 14, 'sidecar reconnect backoff'],
207
+ ['ghosttea-gpu', 'ghosttea', 'opus', 1.9, 0.26, 'working', 3, 'glyph atlas on the GPU'],
208
+ ['ghosttea-docs', 'ghosttea', 'sonnet', 1.2, 0.04, 'blocked', 2, 'theme pages for the docs'],
209
+ ['puppeteer-core', 'puppeteer', 'opus', 5.4, 0.18, 'idle', 21, 'status ledger types'],
210
+ ['puppeteer-views', 'puppeteer', 'gpt-5', 2.2, 0.09, 'working', 11, 'list view keyboard focus'],
211
+ ['jabali', 'jabali', 'haiku', 4.8, 0.015, 'idle', 33, 'tilemap import'],
212
+ ['voyager', 'voyager', 'sonnet', 0.7, 0.06, 'blocked', 5, 'chord detection accuracy'],
213
+ ['study', 'study', 'gpt-5', 3.1, 0.03, 'idle', 8, 'shader study notes'],
214
+ ];
215
+ /** A small seeded generator (FNV-1a into mulberry32). */
216
+ function seeded(text) {
217
+ let hash = 2166136261;
218
+ for (const character of text)
219
+ hash = Math.imul(hash ^ character.charCodeAt(0), 16777619);
220
+ let state = hash >>> 0;
221
+ return () => {
222
+ state = (state + 0x6d2b79f5) | 0;
223
+ let t = Math.imul(state ^ (state >>> 15), 1 | state);
224
+ t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;
225
+ return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
226
+ };
227
+ }
228
+ /** Log-normal with mean 1: most responses cost about the average, a few cost much more. */
229
+ function lognormal(random, sigma = 0.6) {
230
+ const u = Math.max(1e-9, random());
231
+ const v = random();
232
+ return Math.exp(sigma * Math.sqrt(-2 * Math.log(u)) * Math.cos(2 * Math.PI * v) - (sigma * sigma) / 2);
233
+ }
234
+ /** One priced response at a time while it works: a working agent from when it started on, a waiting or idle one until it stopped. */
235
+ function responsesOf(def, originMs) {
236
+ const at = [];
237
+ const usd = [];
238
+ if (def.cover === 'none')
239
+ return { at, usd };
240
+ const random = seeded(`${def.id}:spend`);
241
+ const stateFrom = originMs - def.now.ago;
242
+ const from = Math.max(originMs - LEAD_MS, originMs - def.born, def.now.state === 'working' ? stateFrom : -Infinity);
243
+ const to = def.now.state === 'working' ? originMs + HORIZON_MS : stateFrom;
244
+ const gap = def.gap * SEC;
245
+ const pace = 0.6 + random() * 0.8;
246
+ for (let t = from + gap * (0.2 + random() * 0.8); t < to; t += gap * (0.35 + random() * 1.3)) {
247
+ let amount = def.rate * pace * (gap / MIN) * lognormal(random);
248
+ // Now and then a compaction or a long read costs several responses' worth at once.
249
+ if (random() < 0.025)
250
+ amount *= 4 + random() * 4;
251
+ at.push(t);
252
+ usd.push(amount);
253
+ }
254
+ return { at, usd };
255
+ }
256
+ /** The row's cost at `nowMs`, bucketed as the backend's usage ledger buckets it (`MonitorCost`). */
257
+ function costAt(def, responses, nowMs) {
258
+ const boundary = Math.floor(nowMs / STEP_MS);
259
+ const steps = new Array(STEP_COUNT).fill(0);
260
+ let total = def.spent;
261
+ for (let index = 0; index < responses.at.length && responses.at[index] <= nowMs; index += 1) {
262
+ const cost = responses.usd[index];
263
+ total += cost;
264
+ const step = STEP_COUNT - 1 - (boundary - Math.floor(responses.at[index] / STEP_MS));
265
+ if (step >= 0)
266
+ steps[step] += cost;
267
+ }
268
+ return {
269
+ usd: total,
270
+ coverage: def.cover === 'partial' ? 'partial' : 'complete',
271
+ // Another desktop's row carries its owner's total and no buckets: none cross desktops.
272
+ ...(def.peer ? {} : { series: { stepMs: STEP_MS, steps, lastStepAt: boundary * STEP_MS } }),
273
+ };
274
+ }
275
+ const HERE = { id: 'here', name: 'here', os: 'mac', self: true };
276
+ function providerOf(mark) {
277
+ const id = AGENT_MARK_PROVIDERS[mark % AGENT_MARK_PROVIDERS.length] ?? 'imposter';
278
+ return { id, label: id.slice(0, 1).toUpperCase() + id.slice(1) };
279
+ }
280
+ function waitOf(def, since) {
281
+ const blocker = def.now.blocker;
282
+ if (!blocker)
283
+ return undefined;
284
+ return {
285
+ kind: blocker.kind,
286
+ since,
287
+ detail: blocker.detail,
288
+ ...(blocker.kind === 'permission' ? { tool: 'Bash' } : {}),
289
+ ...(blocker.kind === 'question' ? { question: blocker.detail } : {}),
290
+ };
291
+ }
292
+ /** The row at the opening, before any cost is read into it. */
293
+ function rowOf(def, originMs, tint) {
294
+ const status = def.now.state === 'unseen' ? 'idle' : def.now.state;
295
+ const born = originMs - def.born;
296
+ const since = originMs - def.now.ago;
297
+ const seq = PROJECT_SEQ[def.project] ?? 9;
298
+ const wait = waitOf(def, since);
299
+ const device = def.peer ? { id: def.peer, name: def.peer, self: false } : HERE;
300
+ return {
301
+ id: def.id,
302
+ kind: 'agent',
303
+ createdAt: born,
304
+ status,
305
+ statusSince: since,
306
+ stale: false,
307
+ alive: true,
308
+ observed: true,
309
+ detail: def.task,
310
+ ...(status === 'working' ? { activity: { kind: 'tool', line: def.task, since } } : {}),
311
+ project: { name: def.project, ...(def.branch ? { branch: def.branch } : {}), seq },
312
+ provider: providerOf(def.mark),
313
+ ...(def.model ? { model: def.model } : {}),
314
+ ...(wait ? { wait } : {}),
315
+ // A working row's reply is from a moment ago; a resting one's from when it stopped.
316
+ ...(def.reply
317
+ ? {
318
+ reply: {
319
+ text: def.reply.text,
320
+ at: status === 'working' ? originMs - 20 * SEC : since,
321
+ final: def.reply.final,
322
+ },
323
+ }
324
+ : {}),
325
+ unread: def.now.state === 'unseen',
326
+ device,
327
+ tier: def.peer ? 'remote' : 'managed',
328
+ profileSet: 'native',
329
+ attachable: true,
330
+ writable: true,
331
+ colour: projectColour(seq, tint),
332
+ active: def.pane?.active ?? false,
333
+ receded: false,
334
+ ...(def.pane ? { attachment: { panes: 1, colour: paneColour(def.pane.seq, tint) } } : {}),
335
+ };
336
+ }
337
+ function crowdDefs() {
338
+ return CROWD.map(([id, project, model, hours, rate, state, minutes, task]) => {
339
+ const random = seeded(id);
340
+ const kind = random() < 0.6 ? 'permission' : 'question';
341
+ return {
342
+ id,
343
+ project,
344
+ model,
345
+ mark: Math.floor(random() * 3),
346
+ born: hours * HOUR,
347
+ now: {
348
+ state,
349
+ ago: minutes * MIN,
350
+ ...(state === 'blocked' ? { blocker: { kind, detail: 'Bash · pnpm test' } } : {}),
351
+ },
352
+ // About a third of its life at work, at its own price.
353
+ spent: Math.round(rate * hours * 60 * (0.25 + random() * 0.2) * 100) / 100,
354
+ rate,
355
+ gap: 12 + Math.round(random() * 14),
356
+ cover: 'complete',
357
+ task,
358
+ };
359
+ });
360
+ }
361
+ /** A bare terminal: no project's colour, the ramp, nothing it costs. */
362
+ function terminalOf(id, folder, running, born, neutral, tint, pane) {
363
+ return {
364
+ id,
365
+ kind: 'terminal',
366
+ createdAt: born,
367
+ status: running ? 'working' : 'idle',
368
+ statusSince: born,
369
+ stale: false,
370
+ alive: true,
371
+ observed: true,
372
+ detail: `/Users/james/Projects/${folder}`,
373
+ activity: { kind: running ? 'foreground-job' : 'shell-idle' },
374
+ // A terminal is named by its folder, as the backend names one (`deriveTerminalRow`).
375
+ project: { name: folder },
376
+ unread: false,
377
+ device: HERE,
378
+ attachable: true,
379
+ writable: true,
380
+ colour: neutral,
381
+ active: pane !== undefined,
382
+ receded: false,
383
+ ...(pane === undefined ? {} : { attachment: { panes: 1, colour: paneColour(pane, tint) } }),
384
+ };
385
+ }
386
+ /**
387
+ * The afternoon opened at `originMs`; `tint` is the theme's, and the project and pane colours are dealt from it.
388
+ * `neutral` is the ramp a bare terminal wears.
389
+ */
390
+ export function spendAfternoon(originMs, tint = DEFAULT_PROJECT_TINT.light, options = {}) {
391
+ const defs = options.crowd ? [...AGENTS, ...crowdDefs()] : AGENTS;
392
+ const neutral = options.neutral ?? 'rgba(127, 127, 127, 0.4)';
393
+ return {
394
+ originMs,
395
+ entries: defs.map((def) => ({ def, row: rowOf(def, originMs, tint), responses: responsesOf(def, originMs) })),
396
+ // The shell is the pane you are in.
397
+ terminals: [
398
+ terminalOf('term-vf', 'vibe-field', true, originMs - (5 * HOUR + 12 * MIN), neutral, tint, 0),
399
+ terminalOf('term-home', '~', false, originMs - 2 * HOUR, neutral, tint),
400
+ ],
401
+ };
402
+ }
403
+ /** The rows a replica hands over at `nowMs` (at or after the opening): each priced row's cost then. */
404
+ export function spendRows(afternoon, nowMs) {
405
+ const rows = afternoon.entries.map(({ def, row, responses }) => def.cover === 'none' ? row : { ...row, cost: costAt(def, responses, nowMs) });
406
+ return [...rows, ...afternoon.terminals];
407
+ }
408
+ /** The afternoon opened at `nowMs` and read then: the rows a replica hands the view. */
409
+ export function spendWorld(nowMs, tint = DEFAULT_PROJECT_TINT.light, options = {}) {
410
+ return spendRows(spendAfternoon(nowMs, tint, options), nowMs);
411
+ }
412
+ //# sourceMappingURL=spend-fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spend-fixtures.js","sourceRoot":"","sources":["../../../../src/views/spend/lab/spend-fixtures.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,UAAU,EACV,aAAa,GACd,MAAM,uCAAuC,CAA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EAAE,QAAQ,GAAG,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC;SACxE;KACF,CAAC;AACJ,CAAC;AAED,uGAAuG;AACvG,MAAM,UAAU,SAAS,CAAC,SAAyB,EAAE,KAAa;IAChE,MAAM,IAAI,GAAG,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,EAAE,CAC7D,GAAG,CAAC,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,CAC7E,CAAC;IACF,OAAO,CAAC,GAAG,IAAI,EAAE,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC;AAC3C,CAAC;AAED,wFAAwF;AACxF,MAAM,UAAU,UAAU,CACxB,KAAa,EACb,OAAoB,oBAAoB,CAAC,KAAK,EAC9C,UAAiD,EAAE;IAEnD,OAAO,SAAS,CAAC,cAAc,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,KAAK,CAAC,CAAC;AAChE,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { type Rgba } from '@vibefield/puppeteer-view-sdk/toolkit';
2
+ /** sRGB (0–1) to OKLCH: lightness, chroma, hue in degrees. */
3
+ export declare function rgbToOklch(colour: Rgba): {
4
+ l: number;
5
+ c: number;
6
+ h: number;
7
+ };
8
+ /** The sibling's tone of a project colour: `sib` 0 is the colour itself, 1 a step darker, 2 and on a step lighter. */
9
+ export declare function siblingTone(colour: Rgba, sib: number, dark: boolean): Rgba;
10
+ /** The colour lifted to a light fill its own dark text reads on, in both themes. */
11
+ export declare function liftedFill(colour: Rgba, sib: number): string;
12
+ /** Siblings by birth: the order each agent was born in among its project's priced agents. */
13
+ export declare function siblingIndex(rows: readonly {
14
+ id: string;
15
+ project: string;
16
+ bornMs: number;
17
+ }[]): Map<string, number>;
18
+ //# sourceMappingURL=spend-ink.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spend-ink.d.ts","sourceRoot":"","sources":["../../../src/views/spend/spend-ink.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,IAAI,EAAE,MAAM,uCAAuC,CAAC;AAgB7F,8DAA8D;AAC9D,wBAAgB,UAAU,CAAC,MAAM,EAAE,IAAI,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAY5E;AAED,sHAAsH;AACtH,wBAAgB,WAAW,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,CAK1E;AAED,oFAAoF;AACpF,wBAAgB,UAAU,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAG5D;AAED,6FAA6F;AAC7F,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CASlH"}
@@ -0,0 +1,50 @@
1
+ import { oklchToHex, parseCssColor } from '@vibefield/puppeteer-view-sdk/toolkit';
2
+ // Two inks the spend view derives from a row's project colour, so nothing new
3
+ // crosses the seam (SV-D4): a sibling's TONE — the second agent born in a
4
+ // project a step darker, the third a step lighter, so three rosetta lines can
5
+ // be told apart while all three read as rosetta — and a FILL, the hue lifted
6
+ // so the ink's own text reads on it (the tag at a pointed head). The host's
7
+ // colour is kept as it is for the first. Ported from the prototype's
8
+ // `SV.ink.tone` and `SV.ink.fill` (`draft/godview-spend/site/sv-core.js`).
9
+ /** The lightness step per sibling, in OKLCH L: the first keeps the host's colour. */
10
+ const TONE_STEP = { light: [0, -0.1, 0.1], dark: [0, -0.1, 0.08] };
11
+ const toLinear = (channel) => channel <= 0.04045 ? channel / 12.92 : Math.pow((channel + 0.055) / 1.055, 2.4);
12
+ /** sRGB (0–1) to OKLCH: lightness, chroma, hue in degrees. */
13
+ export function rgbToOklch(colour) {
14
+ const r = toLinear(colour[0]);
15
+ const g = toLinear(colour[1]);
16
+ const b = toLinear(colour[2]);
17
+ const l_ = Math.cbrt(0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b);
18
+ const m_ = Math.cbrt(0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b);
19
+ const s_ = Math.cbrt(0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b);
20
+ const L = 0.2104542553 * l_ + 0.793617785 * m_ - 0.0040720468 * s_;
21
+ const A = 1.9779984951 * l_ - 2.428592205 * m_ + 0.4505937099 * s_;
22
+ const B = 0.0259040371 * l_ + 0.7827717662 * m_ - 0.808675766 * s_;
23
+ const h = (Math.atan2(B, A) * 180) / Math.PI;
24
+ return { l: L, c: Math.hypot(A, B), h: h < 0 ? h + 360 : h };
25
+ }
26
+ /** The sibling's tone of a project colour: `sib` 0 is the colour itself, 1 a step darker, 2 and on a step lighter. */
27
+ export function siblingTone(colour, sib, dark) {
28
+ if (sib <= 0)
29
+ return colour;
30
+ const { l, c, h } = rgbToOklch(colour);
31
+ const step = TONE_STEP[dark ? 'dark' : 'light'][Math.min(sib, 2)];
32
+ return parseCssColor(oklchToHex(Math.min(0.9, Math.max(0.3, l + step)), c, h)) ?? colour;
33
+ }
34
+ /** The colour lifted to a light fill its own dark text reads on, in both themes. */
35
+ export function liftedFill(colour, sib) {
36
+ const { h } = rgbToOklch(colour);
37
+ return oklchToHex(0.83 - Math.min(sib, 2) * 0.035, 0.085, h);
38
+ }
39
+ /** Siblings by birth: the order each agent was born in among its project's priced agents. */
40
+ export function siblingIndex(rows) {
41
+ const seen = new Map();
42
+ const out = new Map();
43
+ for (const row of [...rows].sort((a, b) => a.bornMs - b.bornMs || (a.id < b.id ? -1 : 1))) {
44
+ const n = seen.get(row.project) ?? 0;
45
+ out.set(row.id, n);
46
+ seen.set(row.project, n + 1);
47
+ }
48
+ return out;
49
+ }
50
+ //# sourceMappingURL=spend-ink.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spend-ink.js","sourceRoot":"","sources":["../../../src/views/spend/spend-ink.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAa,MAAM,uCAAuC,CAAC;AAE7F,8EAA8E;AAC9E,0EAA0E;AAC1E,8EAA8E;AAC9E,6EAA6E;AAC7E,4EAA4E;AAC5E,qEAAqE;AACrE,2EAA2E;AAE3E,qFAAqF;AACrF,MAAM,SAAS,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,EAAW,CAAC;AAE5E,MAAM,QAAQ,GAAG,CAAC,OAAe,EAAU,EAAE,CAC3C,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,GAAG,KAAK,CAAC,GAAG,KAAK,EAAE,GAAG,CAAC,CAAC;AAElF,8DAA8D;AAC9D,MAAM,UAAU,UAAU,CAAC,MAAY;IACrC,MAAM,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9B,MAAM,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9B,MAAM,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9B,MAAM,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,GAAG,CAAC,GAAG,YAAY,GAAG,CAAC,GAAG,YAAY,GAAG,CAAC,CAA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C;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -0,0 +1,48 @@
1
+ export type ScrubOrder = 'hold' | 'sink' | 'rank';
2
+ export interface OrderEntry {
3
+ readonly id: string;
4
+ /** What it had spent at the head (most first). */
5
+ readonly value: number;
6
+ readonly bornMs: number;
7
+ }
8
+ /** Most spent first; equal spend, the elder first. */
9
+ export declare function bySpend(entries: readonly OrderEntry[]): string[];
10
+ /**
11
+ * The order the list shows. `held` is the order it showed while the pointer
12
+ * rests on it (rows never move under the pointer); otherwise most spent at the
13
+ * head. While scrubbing at `t`, 'hold' keeps that order, 'sink' sends the rows
14
+ * not yet started below the rest (by start), 'rank' re-ranks by `valueAt(t)`.
15
+ */
16
+ export declare function listOrder(entries: readonly OrderEntry[], options?: {
17
+ held?: readonly string[] | null | undefined;
18
+ scrub?: {
19
+ t: number;
20
+ order: ScrubOrder;
21
+ valueAt(id: string): number | undefined;
22
+ } | undefined;
23
+ }): string[];
24
+ export interface ListFit {
25
+ /** How many ordered rows show in sequence, from `offset`. */
26
+ readonly fits: number;
27
+ readonly offset: number;
28
+ /** The most `offset` can be. */
29
+ readonly maxOffset: number;
30
+ /** Waiting rows out of sight, docked at the foot, longest wait first. */
31
+ readonly docked: readonly string[];
32
+ /** Whether a "more" row is shown, and what it counts. */
33
+ readonly more: boolean;
34
+ readonly below: number;
35
+ readonly above: number;
36
+ /** Waiting rows out of sight that did not dock. */
37
+ readonly waitingUnshown: number;
38
+ }
39
+ /**
40
+ * What fits in `cap` row slots. With more rows than slots one slot says how
41
+ * many more; waiting rows the scroll leaves out dock under the sequence, at
42
+ * most ⌊(cap−1)/3⌋ of them (a first cut docked all five and ate the list), the
43
+ * longest wait first.
44
+ */
45
+ export declare function fitList(order: readonly string[], cap: number, offset: number, waiting: ReadonlyMap<string, number>, dock?: boolean): ListFit;
46
+ /** The "more" row's words. */
47
+ export declare function moreWords(fit: ListFit): string;
48
+ //# sourceMappingURL=spend-list.d.ts.map
@@ -0,0 +1 @@
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