@tangle-network/sandbox-cli 0.23.51 → 0.23.52

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 (546) hide show
  1. package/dist/{graph-CDrrlr4U.mjs → graph-Cb8lL7fi.mjs} +9 -9
  2. package/dist/{graph-learning-XjrAqpQA.mjs → graph-learning-v9-Gus1I.mjs} +1 -1
  3. package/dist/{graph-operating-evidence-W3dtTQ6O.mjs → graph-operating-evidence-DalCz7IF.mjs} +1 -1
  4. package/dist/{graph-profile-learning-DaoL53AA.mjs → graph-profile-learning-DCoDQi5u.mjs} +1 -1
  5. package/dist/graph-show/styles.css +1354 -607
  6. package/dist/index.mjs +1 -1
  7. package/package.json +9 -10
  8. package/dist/graph-viewer/Analytics-bWsqhurt.js +0 -1001
  9. package/dist/graph-viewer/AnswerStrip-COxV7gLW.js +0 -112
  10. package/dist/graph-viewer/Checks-CQGmKcQ0.js +0 -164
  11. package/dist/graph-viewer/Conversations-DgCshBAf.js +0 -627
  12. package/dist/graph-viewer/Files-CvIOGrAs.js +0 -441
  13. package/dist/graph-viewer/LiveRun-DHmsr6F7.js +0 -311
  14. package/dist/graph-viewer/Outputs-rwBg_x36.js +0 -803
  15. package/dist/graph-viewer/Overview-C150tkVa.js +0 -194
  16. package/dist/graph-viewer/RunOverview-CSqsunqf.js +0 -1720
  17. package/dist/graph-viewer/RunPage-F_prVwiV.js +0 -286
  18. package/dist/graph-viewer/Timeline-BFDywlmz.js +0 -335
  19. package/dist/graph-viewer/Today-BdDuqZGF.js +0 -623
  20. package/dist/graph-viewer/Topology-SAfGtd5u.js +0 -238
  21. package/dist/graph-viewer/Traces-BYqXaS_s.js +0 -254
  22. package/dist/graph-viewer/WallPages-MM70VZrC.js +0 -676
  23. package/dist/graph-viewer/agent-runtime.js +0 -2293
  24. package/dist/graph-viewer/anchor-C4i5SrB9.js +0 -23
  25. package/dist/graph-viewer/assessment.js +0 -117
  26. package/dist/graph-viewer/data-DTGmre1W.js +0 -251
  27. package/dist/graph-viewer/harness-sessions.js +0 -165
  28. package/dist/graph-viewer/index.js +0 -14957
  29. package/dist/graph-viewer/lazy-pages-BYuq_L_n.js +0 -23
  30. package/dist/graph-viewer/outputs-model-CHTx8rMz.js +0 -553
  31. package/dist/graph-viewer/plain-words-BrMHl0On.js +0 -22
  32. package/dist/graph-viewer/publication.js +0 -111
  33. package/dist/graph-viewer/receipt.js +0 -25
  34. package/dist/graph-viewer/record-CsP_3NJS.js +0 -612
  35. package/dist/graph-viewer/record-part-CuT9Xw37.js +0 -334
  36. package/dist/graph-viewer/record.js +0 -2
  37. package/dist/graph-viewer/report-viewer.js +0 -557
  38. package/dist/graph-viewer/report.js +0 -392
  39. package/dist/graph-viewer/research-publication.js +0 -35
  40. package/dist/graph-viewer/run-files-BckQDdTD.js +0 -82
  41. package/dist/graph-viewer/run-receipt-Bt2iXJUy.js +0 -1113
  42. package/dist/graph-viewer/schemas/agent-record.bundle.v1.json +0 -157
  43. package/dist/graph-viewer/schemas/agent-record.v1.json +0 -1025
  44. package/dist/graph-viewer/schemas/agent-trace-assessment.v1.json +0 -302
  45. package/dist/graph-viewer/schemas/agent-trace-assessments.v1.json +0 -335
  46. package/dist/graph-viewer/schemas/agent-trace-dimensions.v1.json +0 -131
  47. package/dist/graph-viewer/schemas/agent-workspace.play.v1.json +0 -8152
  48. package/dist/graph-viewer/schemas/agent-workspace.plays.v1.json +0 -1297
  49. package/dist/graph-viewer/schemas/agent-workspace.run.v1.json +0 -10908
  50. package/dist/graph-viewer/schemas/agent-workspace.version-graph.json +0 -1131
  51. package/dist/graph-viewer/schemas/discovery-lab.profile-graph.json +0 -2628
  52. package/dist/graph-viewer/schemas/evidence.snapshot.v1.json +0 -71
  53. package/dist/graph-viewer/styles.css +0 -16462
  54. package/dist/graph-viewer/trace-spans.js +0 -157
  55. package/dist/graph-viewer/ui-xa5w5bEN.js +0 -889
  56. package/dist/graph-viewer/use-file-text-BaE98QxE.js +0 -47
  57. package/dist/graph-viewer/viewer/AgentGraphCanvas-B74GN1o6-BZEumF7-.js +0 -8717
  58. package/dist/graph-viewer/viewer/Analytics-E3XS570U.js +0 -1002
  59. package/dist/graph-viewer/viewer/AnswerStrip-B7xMU57A.js +0 -45
  60. package/dist/graph-viewer/viewer/Checks-CJ5XSHbv.js +0 -165
  61. package/dist/graph-viewer/viewer/Conversations-AX8G7Qyl.js +0 -904
  62. package/dist/graph-viewer/viewer/Files-DxL1576V.js +0 -630
  63. package/dist/graph-viewer/viewer/LiveRun-B-BckyEj.js +0 -820
  64. package/dist/graph-viewer/viewer/Outputs-BoIpgfMv.js +0 -930
  65. package/dist/graph-viewer/viewer/Overview-Dzg5XJgy.js +0 -436
  66. package/dist/graph-viewer/viewer/RunPage-NtevWXBs.js +0 -285
  67. package/dist/graph-viewer/viewer/Scores-Dgv4WePL.js +0 -414
  68. package/dist/graph-viewer/viewer/Timeline-CzY3LVDu.js +0 -335
  69. package/dist/graph-viewer/viewer/Today-Bi9IIwuh.js +0 -623
  70. package/dist/graph-viewer/viewer/Topology-CzjqSFXH.js +0 -239
  71. package/dist/graph-viewer/viewer/Traces-CMX0H1VU.js +0 -254
  72. package/dist/graph-viewer/viewer/WallPages-Clj4bORg.js +0 -675
  73. package/dist/graph-viewer/viewer/abap-DF4NaQCD.js +0 -3
  74. package/dist/graph-viewer/viewer/actionscript-3-O89o1DyQ.js +0 -3
  75. package/dist/graph-viewer/viewer/ada-UiOHRbSd.js +0 -3
  76. package/dist/graph-viewer/viewer/addon-webgl-BSCscllv.js +0 -4027
  77. package/dist/graph-viewer/viewer/agent-record-BrP-ENHg.css +0 -2
  78. package/dist/graph-viewer/viewer/ahk-7eXkLipS.js +0 -3
  79. package/dist/graph-viewer/viewer/ahk2-BRygvKjG.js +0 -3
  80. package/dist/graph-viewer/viewer/andromeeda-CXE6Hd_y.js +0 -4
  81. package/dist/graph-viewer/viewer/andromeeda-D4hkA5d4.js +0 -135
  82. package/dist/graph-viewer/viewer/angular-html-CH3lfmUV.js +0 -16
  83. package/dist/graph-viewer/viewer/angular-ts-B687Yw-e.js +0 -18
  84. package/dist/graph-viewer/viewer/apache-zsgjHeYU.js +0 -3
  85. package/dist/graph-viewer/viewer/apex-DvIWVZE0.js +0 -3
  86. package/dist/graph-viewer/viewer/apl-MlL-eOOA.js +0 -16
  87. package/dist/graph-viewer/viewer/applescript-D_ETOzPj.js +0 -3
  88. package/dist/graph-viewer/viewer/ara-CXdsJbD3.js +0 -3
  89. package/dist/graph-viewer/viewer/asciidoc-CpqrUCBV.js +0 -3
  90. package/dist/graph-viewer/viewer/asm-DLrPCi7c.js +0 -3
  91. package/dist/graph-viewer/viewer/astro-CEu262ke.js +0 -18
  92. package/dist/graph-viewer/viewer/aurora-x-ByDc5ddl.js +0 -4
  93. package/dist/graph-viewer/viewer/aurora-x-DR-LXA3G.js +0 -149
  94. package/dist/graph-viewer/viewer/awk-452npsTH.js +0 -3
  95. package/dist/graph-viewer/viewer/ayu-dark-AY3FJIQr.js +0 -125
  96. package/dist/graph-viewer/viewer/ayu-dark-Bwg9SdAf.js +0 -4
  97. package/dist/graph-viewer/viewer/ayu-light-CDT1HkHg.js +0 -125
  98. package/dist/graph-viewer/viewer/ayu-light-DPCSrH1e.js +0 -4
  99. package/dist/graph-viewer/viewer/ayu-mirage-BrWHc4Mk.js +0 -125
  100. package/dist/graph-viewer/viewer/ayu-mirage-CArVigxm.js +0 -4
  101. package/dist/graph-viewer/viewer/ballerina-8wA0eHgr.js +0 -3
  102. package/dist/graph-viewer/viewer/bash-B3Pt0-io.js +0 -2
  103. package/dist/graph-viewer/viewer/bat-D5zNUOf1.js +0 -3
  104. package/dist/graph-viewer/viewer/beancount-BXtNUIgX.js +0 -3
  105. package/dist/graph-viewer/viewer/berry-oDXeVIfk.js +0 -3
  106. package/dist/graph-viewer/viewer/bibtex-CAeObnSR.js +0 -3
  107. package/dist/graph-viewer/viewer/bicep-udSZHxea.js +0 -3
  108. package/dist/graph-viewer/viewer/bird2-CeHO9zcD.js +0 -3
  109. package/dist/graph-viewer/viewer/blade-6Y8QadpX.js +0 -20
  110. package/dist/graph-viewer/viewer/bot-BaQU59LG.js +0 -40
  111. package/dist/graph-viewer/viewer/bsl-BYwMGpx9.js +0 -5
  112. package/dist/graph-viewer/viewer/c-CSBSx-ud.js +0 -2
  113. package/dist/graph-viewer/viewer/c-DAvbji88.js +0 -5
  114. package/dist/graph-viewer/viewer/c3-CWnhEhIf.js +0 -3
  115. package/dist/graph-viewer/viewer/cadence-C2DNIpxD.js +0 -3
  116. package/dist/graph-viewer/viewer/cairo-Be_WUhk8.js +0 -5
  117. package/dist/graph-viewer/viewer/catppuccin-frappe-BOyy9syt.js +0 -254
  118. package/dist/graph-viewer/viewer/catppuccin-frappe-XWBMtHoj.js +0 -4
  119. package/dist/graph-viewer/viewer/catppuccin-latte-BTeMSDF4.js +0 -254
  120. package/dist/graph-viewer/viewer/catppuccin-latte-CYOvCvxh.js +0 -4
  121. package/dist/graph-viewer/viewer/catppuccin-macchiato-BdFrVtzY.js +0 -254
  122. package/dist/graph-viewer/viewer/catppuccin-macchiato-Bl-TAIIg.js +0 -4
  123. package/dist/graph-viewer/viewer/catppuccin-mocha-BkEo6vVC.js +0 -4
  124. package/dist/graph-viewer/viewer/catppuccin-mocha-nwxgrdZf.js +0 -254
  125. package/dist/graph-viewer/viewer/ccount-8lyDUwnq.js +0 -1116
  126. package/dist/graph-viewer/viewer/chapel-BipHs2dR.js +0 -5
  127. package/dist/graph-viewer/viewer/chevron-right-Xn05jYLT.js +0 -14
  128. package/dist/graph-viewer/viewer/clarity-CYwjxkRS.js +0 -3
  129. package/dist/graph-viewer/viewer/clojure-g5hblQ59.js +0 -3
  130. package/dist/graph-viewer/viewer/cmake-D30WusUY.js +0 -3
  131. package/dist/graph-viewer/viewer/cobol-BSufitvZ.js +0 -10
  132. package/dist/graph-viewer/viewer/codeowners-a_Z0p9_y.js +0 -3
  133. package/dist/graph-viewer/viewer/codeql-BkSUw1F6.js +0 -3
  134. package/dist/graph-viewer/viewer/coffee-Cq8545xS.js +0 -5
  135. package/dist/graph-viewer/viewer/common-lisp-D2PkvS4V.js +0 -3
  136. package/dist/graph-viewer/viewer/coq-BLTGLocz.js +0 -3
  137. package/dist/graph-viewer/viewer/core-I74i0Bj-.js +0 -3283
  138. package/dist/graph-viewer/viewer/cpp--S2jMQNE.js +0 -16
  139. package/dist/graph-viewer/viewer/cpp-D1SvvKgJ.js +0 -2
  140. package/dist/graph-viewer/viewer/createLucideIcon-BSphcoOJ.js +0 -132
  141. package/dist/graph-viewer/viewer/crystal-CwAQylTf.js +0 -18
  142. package/dist/graph-viewer/viewer/csharp--dn-Xz3x.js +0 -3
  143. package/dist/graph-viewer/viewer/csharp-CFNIW_9w.js +0 -2
  144. package/dist/graph-viewer/viewer/css-DDvgy_Pj.js +0 -2
  145. package/dist/graph-viewer/viewer/css-OZkJJXvy.js +0 -5
  146. package/dist/graph-viewer/viewer/csv-DFU5sVkH.js +0 -3
  147. package/dist/graph-viewer/viewer/cue-cdFZcSz0.js +0 -3
  148. package/dist/graph-viewer/viewer/cypher-DRjO_s97.js +0 -3
  149. package/dist/graph-viewer/viewer/d-BTgKsJ9x.js +0 -3
  150. package/dist/graph-viewer/viewer/dark-plus-C3f5UfGH.js +0 -4
  151. package/dist/graph-viewer/viewer/dark-plus-DpxqFdZb.js +0 -133
  152. package/dist/graph-viewer/viewer/dart-D4omMRdb.js +0 -3
  153. package/dist/graph-viewer/viewer/dashboard-D3JhmRhe-DSl0zhkw.js +0 -371
  154. package/dist/graph-viewer/viewer/data-CVHeKhrh.js +0 -5464
  155. package/dist/graph-viewer/viewer/dax-DMzovUnU.js +0 -3
  156. package/dist/graph-viewer/viewer/desktop-0YG2NeB2.js +0 -3
  157. package/dist/graph-viewer/viewer/diff-Bqcnq92f.js +0 -2
  158. package/dist/graph-viewer/viewer/diff-D0WgTNQn.js +0 -3
  159. package/dist/graph-viewer/viewer/dist-4_KJz8ZM.js +0 -349
  160. package/dist/graph-viewer/viewer/dist-Dy-wrdTt.js +0 -1615
  161. package/dist/graph-viewer/viewer/docker-DzSfvS0u.js +0 -5
  162. package/dist/graph-viewer/viewer/dockerfile-CM1sLMN0.js +0 -2
  163. package/dist/graph-viewer/viewer/dotenv-BSNpOEA3.js +0 -3
  164. package/dist/graph-viewer/viewer/dracula-BfBOnDty.js +0 -4
  165. package/dist/graph-viewer/viewer/dracula-DhjcxBGE.js +0 -153
  166. package/dist/graph-viewer/viewer/dracula-soft-C8OuVugS.js +0 -103
  167. package/dist/graph-viewer/viewer/dracula-soft-D6ffXinY.js +0 -4
  168. package/dist/graph-viewer/viewer/dream-maker-Br_aTy0D.js +0 -3
  169. package/dist/graph-viewer/viewer/edge-BXg6ZoA5.js +0 -12
  170. package/dist/graph-viewer/viewer/elixir-BP4dycnf.js +0 -5
  171. package/dist/graph-viewer/viewer/elk.bundled-ZJBRnwyo.js +0 -46151
  172. package/dist/graph-viewer/viewer/elm-XJ6BGRhm.js +0 -5
  173. package/dist/graph-viewer/viewer/emacs-lisp-CaNYORYC.js +0 -3
  174. package/dist/graph-viewer/viewer/engine-javascript-CuJOa50W.js +0 -2400
  175. package/dist/graph-viewer/viewer/engine-oniguruma-CUxoKLbG.js +0 -238
  176. package/dist/graph-viewer/viewer/erb-Cny7ijxm.js +0 -10
  177. package/dist/graph-viewer/viewer/erlang-CcYvFpBd.js +0 -5
  178. package/dist/graph-viewer/viewer/es2015-utW4DTOJ.js +0 -3506
  179. package/dist/graph-viewer/viewer/everforest-dark-1Qcrb-nR.js +0 -4
  180. package/dist/graph-viewer/viewer/everforest-dark-B8sohDPe.js +0 -87
  181. package/dist/graph-viewer/viewer/everforest-light-CwMdzDa5.js +0 -87
  182. package/dist/graph-viewer/viewer/everforest-light-pWd_20u5.js +0 -4
  183. package/dist/graph-viewer/viewer/fennel-XqmdNU54.js +0 -3
  184. package/dist/graph-viewer/viewer/final-output-BYT-g-9j.js +0 -112
  185. package/dist/graph-viewer/viewer/fish-DnIfDEl-.js +0 -3
  186. package/dist/graph-viewer/viewer/flow-waterfall-model-DvrgPLGS-BdThSFH-.js +0 -2696
  187. package/dist/graph-viewer/viewer/fluent-Dv7iXi9Q.js +0 -3
  188. package/dist/graph-viewer/viewer/fortran-fixed-form-CclFI1c1.js +0 -5
  189. package/dist/graph-viewer/viewer/fortran-free-form-B6CnEX04.js +0 -3
  190. package/dist/graph-viewer/viewer/fsharp-KngoBKg1.js +0 -5
  191. package/dist/graph-viewer/viewer/gdresource-DmwEW6Q8.js +0 -10
  192. package/dist/graph-viewer/viewer/gdscript-DZvGV2HF.js +0 -3
  193. package/dist/graph-viewer/viewer/gdshader-C-YpNGc4.js +0 -3
  194. package/dist/graph-viewer/viewer/genie-eGJU5Fha.js +0 -3
  195. package/dist/graph-viewer/viewer/gherkin-DPafK1RH.js +0 -3
  196. package/dist/graph-viewer/viewer/git-branch-BzTbIcYL.js +0 -28
  197. package/dist/graph-viewer/viewer/git-commit-ic1koML8.js +0 -5
  198. package/dist/graph-viewer/viewer/git-rebase-Cv1EDRHu.js +0 -5
  199. package/dist/graph-viewer/viewer/github-dark-DDdIZDt9.js +0 -4
  200. package/dist/graph-viewer/viewer/github-dark-JXVciwdu.js +0 -130
  201. package/dist/graph-viewer/viewer/github-dark-default-BdQpbWGL.js +0 -76
  202. package/dist/graph-viewer/viewer/github-dark-default-Dqlx6Tfn.js +0 -4
  203. package/dist/graph-viewer/viewer/github-dark-dimmed-Cf-YKaPv.js +0 -4
  204. package/dist/graph-viewer/viewer/github-dark-dimmed-W_ejuONg.js +0 -125
  205. package/dist/graph-viewer/viewer/github-dark-high-contrast-BfhJh7Fv.js +0 -4
  206. package/dist/graph-viewer/viewer/github-dark-high-contrast-Dta6H4l1.js +0 -125
  207. package/dist/graph-viewer/viewer/github-light-D4EN-pJE.js +0 -130
  208. package/dist/graph-viewer/viewer/github-light-D7vUnDjY.js +0 -4
  209. package/dist/graph-viewer/viewer/github-light-default-CA96ogap.js +0 -125
  210. package/dist/graph-viewer/viewer/github-light-default-CbQ7dbx-.js +0 -4
  211. package/dist/graph-viewer/viewer/github-light-high-contrast-CWkjO7j1.js +0 -125
  212. package/dist/graph-viewer/viewer/github-light-high-contrast-Oc7ptxOl.js +0 -4
  213. package/dist/graph-viewer/viewer/gleam-DDi89CaZ.js +0 -3
  214. package/dist/graph-viewer/viewer/glimmer-js-B4XGl72Q.js +0 -14
  215. package/dist/graph-viewer/viewer/glimmer-ts-Cd-JLCfl.js +0 -14
  216. package/dist/graph-viewer/viewer/glsl-gcTBSfUq.js +0 -6
  217. package/dist/graph-viewer/viewer/gn-DMs_IqO4.js +0 -3
  218. package/dist/graph-viewer/viewer/gnuplot-Dwu09Wsa.js +0 -3
  219. package/dist/graph-viewer/viewer/go-BEdBk4fh.js +0 -3
  220. package/dist/graph-viewer/viewer/go-DHVK1MDf.js +0 -2
  221. package/dist/graph-viewer/viewer/graphql-CLsas7pB.js +0 -15
  222. package/dist/graph-viewer/viewer/graphql-hf2jeRF3.js +0 -2
  223. package/dist/graph-viewer/viewer/groovy-CmZ205Qh.js +0 -3
  224. package/dist/graph-viewer/viewer/gruvbox-dark-hard-C03xMCtB.js +0 -4
  225. package/dist/graph-viewer/viewer/gruvbox-dark-hard-D6fxqIcJ.js +0 -128
  226. package/dist/graph-viewer/viewer/gruvbox-dark-medium-CC6ndC01.js +0 -128
  227. package/dist/graph-viewer/viewer/gruvbox-dark-medium-ZTNTOYs1.js +0 -4
  228. package/dist/graph-viewer/viewer/gruvbox-dark-soft-1zGnpoEy.js +0 -4
  229. package/dist/graph-viewer/viewer/gruvbox-dark-soft-DBjjA89e.js +0 -128
  230. package/dist/graph-viewer/viewer/gruvbox-light-hard-CNtKpSCc.js +0 -128
  231. package/dist/graph-viewer/viewer/gruvbox-light-hard-Rq8jWy-t.js +0 -4
  232. package/dist/graph-viewer/viewer/gruvbox-light-medium-DT10IcB_.js +0 -128
  233. package/dist/graph-viewer/viewer/gruvbox-light-medium-qoNn8l_N.js +0 -4
  234. package/dist/graph-viewer/viewer/gruvbox-light-soft-BugAsRiM.js +0 -128
  235. package/dist/graph-viewer/viewer/gruvbox-light-soft-Dnxtmee2.js +0 -4
  236. package/dist/graph-viewer/viewer/hack-CDch_7MP.js +0 -10
  237. package/dist/graph-viewer/viewer/haml-BqkvTyZm.js +0 -11
  238. package/dist/graph-viewer/viewer/handlebars-RDj3fZHz.js +0 -14
  239. package/dist/graph-viewer/viewer/haskell-DSSJ-2AO.js +0 -3
  240. package/dist/graph-viewer/viewer/haxe-DrA0Xrjd.js +0 -3
  241. package/dist/graph-viewer/viewer/hcl-BxX70ue-.js +0 -3
  242. package/dist/graph-viewer/viewer/highlights-DWeSCtiR.js +0 -1351
  243. package/dist/graph-viewer/viewer/hjson-Znrrrv1t.js +0 -3
  244. package/dist/graph-viewer/viewer/hlsl-D-dP8z1U.js +0 -3
  245. package/dist/graph-viewer/viewer/horizon-CE4Yvsia.js +0 -4
  246. package/dist/graph-viewer/viewer/horizon-EI29cEvA.js +0 -85
  247. package/dist/graph-viewer/viewer/horizon-bright-BOLA2YFR.js +0 -4
  248. package/dist/graph-viewer/viewer/horizon-bright-hHpSmrYh.js +0 -85
  249. package/dist/graph-viewer/viewer/houston-CiDLA2oo.js +0 -4
  250. package/dist/graph-viewer/viewer/houston-CiUxf-HU.js +0 -195
  251. package/dist/graph-viewer/viewer/html-9DDE6S-h.js +0 -2
  252. package/dist/graph-viewer/viewer/html-D0TTaG52.js +0 -11
  253. package/dist/graph-viewer/viewer/html-derivative-Gg3E-n-U.js +0 -5
  254. package/dist/graph-viewer/viewer/http-BPgEi3D2.js +0 -14
  255. package/dist/graph-viewer/viewer/hurl-Sfhn3XgM.js +0 -12
  256. package/dist/graph-viewer/viewer/hxml-Dv3Zqri9.js +0 -5
  257. package/dist/graph-viewer/viewer/hy-Cd4h6N3W.js +0 -3
  258. package/dist/graph-viewer/viewer/imba-DdhTsO9l.js +0 -3
  259. package/dist/graph-viewer/viewer/ini-CmgEGOBJ.js +0 -3
  260. package/dist/graph-viewer/viewer/java-CgzoQF6Y.js +0 -5
  261. package/dist/graph-viewer/viewer/java-DnKlCRJQ.js +0 -2
  262. package/dist/graph-viewer/viewer/javascript-CHiBfg7Q.js +0 -2
  263. package/dist/graph-viewer/viewer/javascript-Du25Lw0B.js +0 -5
  264. package/dist/graph-viewer/viewer/jinja-CmKrofRU.js +0 -5
  265. package/dist/graph-viewer/viewer/jison-Bh7j04oA.js +0 -5
  266. package/dist/graph-viewer/viewer/json-Cd131axV.js +0 -2
  267. package/dist/graph-viewer/viewer/json-Cd3mvCHu.js +0 -5
  268. package/dist/graph-viewer/viewer/json5-D2Eltym1.js +0 -3
  269. package/dist/graph-viewer/viewer/jsonc-BPIJyZ7u.js +0 -3
  270. package/dist/graph-viewer/viewer/jsonc-DyuEwhdL.js +0 -2
  271. package/dist/graph-viewer/viewer/jsonl-BGkjXns2.js +0 -3
  272. package/dist/graph-viewer/viewer/jsonnet-DsRfEVPr.js +0 -3
  273. package/dist/graph-viewer/viewer/jssm-DP2pbfxn.js +0 -3
  274. package/dist/graph-viewer/viewer/jsx-BC18Lfga.js +0 -5
  275. package/dist/graph-viewer/viewer/jsx-CDweqMY2.js +0 -2
  276. package/dist/graph-viewer/viewer/jsx-runtime-DPT6sCLq.js +0 -319
  277. package/dist/graph-viewer/viewer/julia-DWXGq3n5.js +0 -16
  278. package/dist/graph-viewer/viewer/just-CPEDqFxc.js +0 -18
  279. package/dist/graph-viewer/viewer/kanagawa-dragon-D5ZXvoAT.js +0 -147
  280. package/dist/graph-viewer/viewer/kanagawa-dragon-m178euzh.js +0 -4
  281. package/dist/graph-viewer/viewer/kanagawa-lotus-BUmV0rdY.js +0 -147
  282. package/dist/graph-viewer/viewer/kanagawa-lotus-C4yCdgdL.js +0 -4
  283. package/dist/graph-viewer/viewer/kanagawa-wave-B6YTgVPM.js +0 -4
  284. package/dist/graph-viewer/viewer/kanagawa-wave-C4G5CGrn.js +0 -147
  285. package/dist/graph-viewer/viewer/kdl-BdIUXyK8.js +0 -3
  286. package/dist/graph-viewer/viewer/kotlin-BYbH5_qW.js +0 -2
  287. package/dist/graph-viewer/viewer/kotlin-CQsNEM2o.js +0 -3
  288. package/dist/graph-viewer/viewer/kusto-UWPUoeE5.js +0 -3
  289. package/dist/graph-viewer/viewer/langs-DKPMizJR.js +0 -1323
  290. package/dist/graph-viewer/viewer/laserwave-BHOyZkaw.js +0 -72
  291. package/dist/graph-viewer/viewer/laserwave-CWOG7haO.js +0 -4
  292. package/dist/graph-viewer/viewer/latex-H1oLZZMa.js +0 -5
  293. package/dist/graph-viewer/viewer/lazy-pages-ChiMJ8r_.js +0 -803
  294. package/dist/graph-viewer/viewer/lean-D3P_r_z_.js +0 -3
  295. package/dist/graph-viewer/viewer/less-9LYkHheD.js +0 -3
  296. package/dist/graph-viewer/viewer/lib-YfRUb5Qz.js +0 -633
  297. package/dist/graph-viewer/viewer/light-plus-BqoAVMwn.js +0 -4
  298. package/dist/graph-viewer/viewer/light-plus-mr4QmlNu.js +0 -134
  299. package/dist/graph-viewer/viewer/liquid-BIl6scjw.js +0 -14
  300. package/dist/graph-viewer/viewer/llvm-eWADufTp.js +0 -3
  301. package/dist/graph-viewer/viewer/loader-CJrlDBKq.js +0 -80
  302. package/dist/graph-viewer/viewer/log-DvQMOE69.js +0 -3
  303. package/dist/graph-viewer/viewer/logo-Cl5E_QyH.js +0 -3
  304. package/dist/graph-viewer/viewer/lua-2MenSe50.js +0 -6
  305. package/dist/graph-viewer/viewer/luau-7dQCidxK.js +0 -3
  306. package/dist/graph-viewer/viewer/make-CE9Hryyp.js +0 -3
  307. package/dist/graph-viewer/viewer/markdown-CSNMIXpG.js +0 -2
  308. package/dist/graph-viewer/viewer/markdown-lADwhD7y.js +0 -8220
  309. package/dist/graph-viewer/viewer/markdown-nUtTZkU8.js +0 -3
  310. package/dist/graph-viewer/viewer/marko-C5vBSh9z.js +0 -14
  311. package/dist/graph-viewer/viewer/material-theme-B36kIseS.js +0 -93
  312. package/dist/graph-viewer/viewer/material-theme-D46aZ2Q0.js +0 -4
  313. package/dist/graph-viewer/viewer/material-theme-darker-DPrN5MJM.js +0 -4
  314. package/dist/graph-viewer/viewer/material-theme-darker-iFXeHXKD.js +0 -93
  315. package/dist/graph-viewer/viewer/material-theme-lighter-2HJjoQcP.js +0 -4
  316. package/dist/graph-viewer/viewer/material-theme-lighter-BBaTLa5v.js +0 -93
  317. package/dist/graph-viewer/viewer/material-theme-ocean-D1aXUM1Z.js +0 -4
  318. package/dist/graph-viewer/viewer/material-theme-ocean-Dj5vMPI8.js +0 -93
  319. package/dist/graph-viewer/viewer/material-theme-palenight-B6DS-lbj.js +0 -4
  320. package/dist/graph-viewer/viewer/material-theme-palenight-EjN7Wy3X.js +0 -93
  321. package/dist/graph-viewer/viewer/matlab-fM7rwTZt.js +0 -3
  322. package/dist/graph-viewer/viewer/mdc-IFxaehab.js +0 -12
  323. package/dist/graph-viewer/viewer/mdx-DswfiFg4.js +0 -3
  324. package/dist/graph-viewer/viewer/mdx-e70j-_I5.js +0 -2
  325. package/dist/graph-viewer/viewer/mermaid-CAl3BhSL.js +0 -3
  326. package/dist/graph-viewer/viewer/min-dark-BAW8Cmrn.js +0 -4
  327. package/dist/graph-viewer/viewer/min-dark-BMrfDL-S.js +0 -110
  328. package/dist/graph-viewer/viewer/min-light-DMqORsIf.js +0 -110
  329. package/dist/graph-viewer/viewer/min-light-PpFL3JTA.js +0 -4
  330. package/dist/graph-viewer/viewer/mipsasm-DbPELTlh.js +0 -3
  331. package/dist/graph-viewer/viewer/model-brand-bTcMjQtB-RSb7EbGB.js +0 -476
  332. package/dist/graph-viewer/viewer/mojo-B8iEg1Sv.js +0 -3
  333. package/dist/graph-viewer/viewer/monokai-2mdc1PFC.js +0 -4
  334. package/dist/graph-viewer/viewer/monokai-b6RWCwKp.js +0 -150
  335. package/dist/graph-viewer/viewer/moonbit-BR88EIMx.js +0 -3
  336. package/dist/graph-viewer/viewer/move-CpCLo8d1.js +0 -3
  337. package/dist/graph-viewer/viewer/narrat-9pGDjQTI.js +0 -3
  338. package/dist/graph-viewer/viewer/nextflow-BEOXmhnx.js +0 -5
  339. package/dist/graph-viewer/viewer/nextflow-groovy-Cvo9WVFK.js +0 -3
  340. package/dist/graph-viewer/viewer/nginx-Dx1JJUel.js +0 -5
  341. package/dist/graph-viewer/viewer/night-owl-B66IhhIZ.js +0 -4
  342. package/dist/graph-viewer/viewer/night-owl-Dgg_EwNf.js +0 -176
  343. package/dist/graph-viewer/viewer/night-owl-light-C6oRQ1ih.js +0 -177
  344. package/dist/graph-viewer/viewer/night-owl-light-D2RFQCtQ.js +0 -4
  345. package/dist/graph-viewer/viewer/nim-CpR9PfF3.js +0 -20
  346. package/dist/graph-viewer/viewer/nix-CwcLdFnB.js +0 -3
  347. package/dist/graph-viewer/viewer/nord-BD48P4mW.js +0 -116
  348. package/dist/graph-viewer/viewer/nord-Sih_lPjv.js +0 -4
  349. package/dist/graph-viewer/viewer/nsis-Dn88_Onr.js +0 -3
  350. package/dist/graph-viewer/viewer/nushell-DDaptVCJ.js +0 -3
  351. package/dist/graph-viewer/viewer/objective-c-DK-EKgyd.js +0 -3
  352. package/dist/graph-viewer/viewer/objective-cpp-CXtEgxjw.js +0 -3
  353. package/dist/graph-viewer/viewer/ocaml-BO-0Wjtk.js +0 -3
  354. package/dist/graph-viewer/viewer/odin-BDNmOx6H.js +0 -3
  355. package/dist/graph-viewer/viewer/one-dark-pro-DFN4GD0H.js +0 -4
  356. package/dist/graph-viewer/viewer/one-dark-pro-MBgmHRam.js +0 -112
  357. package/dist/graph-viewer/viewer/one-light-Bi4vf2dv.js +0 -138
  358. package/dist/graph-viewer/viewer/one-light-zI0r8mzs.js +0 -4
  359. package/dist/graph-viewer/viewer/openscad-B8gTrm-E.js +0 -3
  360. package/dist/graph-viewer/viewer/org-SBzxSGZD.js +0 -100
  361. package/dist/graph-viewer/viewer/page-header-QbUg8F8i.js +0 -73
  362. package/dist/graph-viewer/viewer/pascal-CRtegPzh.js +0 -3
  363. package/dist/graph-viewer/viewer/perl-Cotj8Fvk.js +0 -16
  364. package/dist/graph-viewer/viewer/php-BCjZGKW5.js +0 -2
  365. package/dist/graph-viewer/viewer/php-DuQlfgak.js +0 -18
  366. package/dist/graph-viewer/viewer/pierre-dark-Dc3Ll6Hl.js +0 -154
  367. package/dist/graph-viewer/viewer/pierre-dark-eM2ca6q-.js +0 -4
  368. package/dist/graph-viewer/viewer/pierre-dark-protanopia-deuteranopia-FuOdjT6t.js +0 -4
  369. package/dist/graph-viewer/viewer/pierre-dark-protanopia-deuteranopia-h_4QkzS0.js +0 -154
  370. package/dist/graph-viewer/viewer/pierre-dark-soft-BFXGcQOC.js +0 -4
  371. package/dist/graph-viewer/viewer/pierre-dark-soft-DlFiKlWf.js +0 -154
  372. package/dist/graph-viewer/viewer/pierre-dark-tritanopia-D8Wgm6MB.js +0 -154
  373. package/dist/graph-viewer/viewer/pierre-dark-tritanopia-HphJrMfv.js +0 -4
  374. package/dist/graph-viewer/viewer/pierre-dark-vibrant-BxJmNTpB.js +0 -154
  375. package/dist/graph-viewer/viewer/pierre-dark-vibrant-CJwaYoBu.js +0 -4
  376. package/dist/graph-viewer/viewer/pierre-light-Bd7oPgtx.js +0 -4
  377. package/dist/graph-viewer/viewer/pierre-light-CFLGbwCM.js +0 -154
  378. package/dist/graph-viewer/viewer/pierre-light-protanopia-deuteranopia-BlBh_kV-.js +0 -154
  379. package/dist/graph-viewer/viewer/pierre-light-protanopia-deuteranopia-fUFGoRe8.js +0 -4
  380. package/dist/graph-viewer/viewer/pierre-light-soft-Ah2itsu1.js +0 -154
  381. package/dist/graph-viewer/viewer/pierre-light-soft-DobqmynA.js +0 -4
  382. package/dist/graph-viewer/viewer/pierre-light-tritanopia-Bpej1qhn.js +0 -154
  383. package/dist/graph-viewer/viewer/pierre-light-tritanopia-BrKH6xXA.js +0 -4
  384. package/dist/graph-viewer/viewer/pierre-light-vibrant-BjCO0blv.js +0 -154
  385. package/dist/graph-viewer/viewer/pierre-light-vibrant-COFDSNWf.js +0 -4
  386. package/dist/graph-viewer/viewer/pkl-C53Sb050.js +0 -3
  387. package/dist/graph-viewer/viewer/plain-words-BrMHl0On.js +0 -22
  388. package/dist/graph-viewer/viewer/plastic-BKBSI3T4.js +0 -4
  389. package/dist/graph-viewer/viewer/plastic-BtQ0IfLu.js +0 -125
  390. package/dist/graph-viewer/viewer/plsql-Bx7tup_v.js +0 -3
  391. package/dist/graph-viewer/viewer/po-DSTB2Mz9.js +0 -3
  392. package/dist/graph-viewer/viewer/poimandres-DaSN2vl7.js +0 -112
  393. package/dist/graph-viewer/viewer/poimandres-Dbcm0FXZ.js +0 -4
  394. package/dist/graph-viewer/viewer/polar-E3hAEXm5.js +0 -3
  395. package/dist/graph-viewer/viewer/postcss-BZib8l4b.js +0 -3
  396. package/dist/graph-viewer/viewer/powerquery-CJblX2B2.js +0 -3
  397. package/dist/graph-viewer/viewer/powershell-jc6OXU_u.js +0 -3
  398. package/dist/graph-viewer/viewer/primitives-znfPK9NP-B6UO7uDr.js +0 -346
  399. package/dist/graph-viewer/viewer/prisma-CBAWJppo.js +0 -3
  400. package/dist/graph-viewer/viewer/prolog-Ce1YjgEP.js +0 -3
  401. package/dist/graph-viewer/viewer/proto-DGLklcji.js +0 -3
  402. package/dist/graph-viewer/viewer/pug-CPAFvvT7.js +0 -12
  403. package/dist/graph-viewer/viewer/puppet-B2qoEJs2.js +0 -3
  404. package/dist/graph-viewer/viewer/purescript-Cq_6EhvO.js +0 -3
  405. package/dist/graph-viewer/viewer/python-BgSzeAZt.js +0 -2
  406. package/dist/graph-viewer/viewer/python-D0AaDoWC.js +0 -3
  407. package/dist/graph-viewer/viewer/qml-CAJAZclz.js +0 -5
  408. package/dist/graph-viewer/viewer/qmldir-BSWsNKCW.js +0 -3
  409. package/dist/graph-viewer/viewer/qss-CT2jsqXX.js +0 -3
  410. package/dist/graph-viewer/viewer/r-gNt6i8Zf.js +0 -5
  411. package/dist/graph-viewer/viewer/racket-B0_wXtli.js +0 -3
  412. package/dist/graph-viewer/viewer/raku-DKDZy5Ck.js +0 -3
  413. package/dist/graph-viewer/viewer/razor-CmVjd-Dh.js +0 -10
  414. package/dist/graph-viewer/viewer/rbs-DvNU-OQ_.js +0 -3
  415. package/dist/graph-viewer/viewer/react-DQ7E2Epi.js +0 -4254
  416. package/dist/graph-viewer/viewer/react-dom-BEusmvQH.js +0 -143
  417. package/dist/graph-viewer/viewer/record-DZnT6SWN-H-ul3U3a.js +0 -3523
  418. package/dist/graph-viewer/viewer/record-W39D5MO-.js +0 -1
  419. package/dist/graph-viewer/viewer/record-part-CbweyYoV.js +0 -335
  420. package/dist/graph-viewer/viewer/red-D-VJz2zz.js +0 -154
  421. package/dist/graph-viewer/viewer/red-DidxQpA-.js +0 -4
  422. package/dist/graph-viewer/viewer/reg-D6txjqBF.js +0 -3
  423. package/dist/graph-viewer/viewer/regexp-CJmLSLYE.js +0 -5
  424. package/dist/graph-viewer/viewer/rel-CY3GbSca.js +0 -3
  425. package/dist/graph-viewer/viewer/riscv-BKjM5F1V.js +0 -3
  426. package/dist/graph-viewer/viewer/rolldown-runtime-DArdT4gl.js +0 -23
  427. package/dist/graph-viewer/viewer/ron-DJgcWJZU.js +0 -3
  428. package/dist/graph-viewer/viewer/rose-pine-DN0mhTLO.js +0 -4
  429. package/dist/graph-viewer/viewer/rose-pine-dawn-C7BTe7Qj.js +0 -124
  430. package/dist/graph-viewer/viewer/rose-pine-dawn-wShSQEG_.js +0 -4
  431. package/dist/graph-viewer/viewer/rose-pine-moon-CXZ0x-tN.js +0 -4
  432. package/dist/graph-viewer/viewer/rose-pine-moon-DpdAjsWi.js +0 -124
  433. package/dist/graph-viewer/viewer/rose-pine-ndHcBYxH.js +0 -124
  434. package/dist/graph-viewer/viewer/rosmsg-BTByjkSH.js +0 -3
  435. package/dist/graph-viewer/viewer/rst-BNLuumiw.js +0 -22
  436. package/dist/graph-viewer/viewer/ruby-BPTDv07s.js +0 -30
  437. package/dist/graph-viewer/viewer/ruby-Dgthgv0F.js +0 -2
  438. package/dist/graph-viewer/viewer/rust-DCdaqFaU.js +0 -2
  439. package/dist/graph-viewer/viewer/rust-Dj2n2rl0.js +0 -3
  440. package/dist/graph-viewer/viewer/sas-DViflgLe.js +0 -5
  441. package/dist/graph-viewer/viewer/sass-CL6GLiPQ.js +0 -3
  442. package/dist/graph-viewer/viewer/scala-D9AnhX7I.js +0 -3
  443. package/dist/graph-viewer/viewer/scheme-BksZ4zIw.js +0 -3
  444. package/dist/graph-viewer/viewer/scss-7wpnG0B9.js +0 -2
  445. package/dist/graph-viewer/viewer/scss-DR3BWwkk.js +0 -6
  446. package/dist/graph-viewer/viewer/sdbl-CLOIgNSF.js +0 -3
  447. package/dist/graph-viewer/viewer/segmented-control-Di1mbQlP.js +0 -143
  448. package/dist/graph-viewer/viewer/shaderlab-BNI6l0C5.js +0 -5
  449. package/dist/graph-viewer/viewer/shellscript-JaF_7KS2.js +0 -5
  450. package/dist/graph-viewer/viewer/shellsession-BpXPWCuv.js +0 -5
  451. package/dist/graph-viewer/viewer/shiki-BfNNlmfZ.js +0 -488
  452. package/dist/graph-viewer/viewer/slack-dark-BxRxM-DA.js +0 -72
  453. package/dist/graph-viewer/viewer/slack-dark-eYrSWFNQ.js +0 -4
  454. package/dist/graph-viewer/viewer/slack-ochin-BkYWF81M.js +0 -95
  455. package/dist/graph-viewer/viewer/slack-ochin-DnDV13wS.js +0 -4
  456. package/dist/graph-viewer/viewer/smalltalk-OVt5uEUD.js +0 -3
  457. package/dist/graph-viewer/viewer/smithy-CseSvY8s.js +0 -3
  458. package/dist/graph-viewer/viewer/snazzy-light-CY4buyRs.js +0 -4
  459. package/dist/graph-viewer/viewer/snazzy-light-nzcYE5KK.js +0 -81
  460. package/dist/graph-viewer/viewer/solarized-dark-CJ28ehED.js +0 -4
  461. package/dist/graph-viewer/viewer/solarized-dark-CNL-YE5C.js +0 -148
  462. package/dist/graph-viewer/viewer/solarized-light-CPffzncm.js +0 -4
  463. package/dist/graph-viewer/viewer/solarized-light-CkLaeXvs.js +0 -148
  464. package/dist/graph-viewer/viewer/solidity-CGi7NMBq.js +0 -2
  465. package/dist/graph-viewer/viewer/solidity-CXjfwKeT.js +0 -3
  466. package/dist/graph-viewer/viewer/soy-BgMg3QC4.js +0 -5
  467. package/dist/graph-viewer/viewer/sparql-RY7y0-Jf.js +0 -5
  468. package/dist/graph-viewer/viewer/splunk-MGILMmew.js +0 -3
  469. package/dist/graph-viewer/viewer/sql-BIIYxsxo.js +0 -5
  470. package/dist/graph-viewer/viewer/sql-bbpzmmG9.js +0 -2
  471. package/dist/graph-viewer/viewer/ssh-config-CFmUyPR7.js +0 -3
  472. package/dist/graph-viewer/viewer/stata-W40nJXFi.js +0 -5
  473. package/dist/graph-viewer/viewer/status-meta-S0kV_RDp.js +0 -273
  474. package/dist/graph-viewer/viewer/stream-tokenizer-B5wWaM3U.js +0 -99
  475. package/dist/graph-viewer/viewer/stylus-Kh83dApl.js +0 -3
  476. package/dist/graph-viewer/viewer/surrealql-BvdRuViV.js +0 -5
  477. package/dist/graph-viewer/viewer/svelte-BIpAIvXq.js +0 -14
  478. package/dist/graph-viewer/viewer/swift-B7Z-rXzN.js +0 -3
  479. package/dist/graph-viewer/viewer/swift-CITNSfj8.js +0 -2
  480. package/dist/graph-viewer/viewer/synthwave-84-k9mB1wtO.js +0 -4
  481. package/dist/graph-viewer/viewer/synthwave-84-kUO_gAph.js +0 -398
  482. package/dist/graph-viewer/viewer/system-verilog-CQoMYllC.js +0 -3
  483. package/dist/graph-viewer/viewer/systemd-ArfzIYBi.js +0 -3
  484. package/dist/graph-viewer/viewer/talonscript-SIE54PtE.js +0 -3
  485. package/dist/graph-viewer/viewer/tasl-Ck4PO08m.js +0 -3
  486. package/dist/graph-viewer/viewer/tcl-DfkVwqLO.js +0 -3
  487. package/dist/graph-viewer/viewer/templ-CcrsYqs3.js +0 -12
  488. package/dist/graph-viewer/viewer/terraform-DccThf6s.js +0 -3
  489. package/dist/graph-viewer/viewer/tex-OxWF-6wM.js +0 -6
  490. package/dist/graph-viewer/viewer/themes-DuRxHiga.js +0 -238
  491. package/dist/graph-viewer/viewer/tokyo-night-pVep8RHB.js +0 -141
  492. package/dist/graph-viewer/viewer/tokyo-night-wSZ66vL4.js +0 -4
  493. package/dist/graph-viewer/viewer/toml-CIQJnU5u.js +0 -3
  494. package/dist/graph-viewer/viewer/toml-D2vAS7BS.js +0 -2
  495. package/dist/graph-viewer/viewer/ts-tags-CBuzNYes.js +0 -38
  496. package/dist/graph-viewer/viewer/tsv-AfvsdcL-.js +0 -3
  497. package/dist/graph-viewer/viewer/tsx-BjEV2c_V.js +0 -2
  498. package/dist/graph-viewer/viewer/tsx-utlJ2eBd.js +0 -5
  499. package/dist/graph-viewer/viewer/turtle-D1NNZBgy.js +0 -3
  500. package/dist/graph-viewer/viewer/twig-BojFE3iW.js +0 -18
  501. package/dist/graph-viewer/viewer/typescript-S9qHhxTN.js +0 -5
  502. package/dist/graph-viewer/viewer/typescript-ekZNylIf.js +0 -2
  503. package/dist/graph-viewer/viewer/typespec-M_tZhO7D.js +0 -3
  504. package/dist/graph-viewer/viewer/typst-D2koCOEy.js +0 -120
  505. package/dist/graph-viewer/viewer/ui-ByOBsvk7.js +0 -5
  506. package/dist/graph-viewer/viewer/ui-Co03nZUX.js +0 -889
  507. package/dist/graph-viewer/viewer/ui-CxK41KO5.js +0 -5
  508. package/dist/graph-viewer/viewer/utils-BuObIC0n.js +0 -1815
  509. package/dist/graph-viewer/viewer/v-DbYZLS97.js +0 -3
  510. package/dist/graph-viewer/viewer/vala-i5OYwFuH.js +0 -3
  511. package/dist/graph-viewer/viewer/vb-DRaXf86R.js +0 -3
  512. package/dist/graph-viewer/viewer/verilog-Dl3uFuBh.js +0 -3
  513. package/dist/graph-viewer/viewer/vesper-B2HI-Qu1.js +0 -84
  514. package/dist/graph-viewer/viewer/vesper-DgN5ShJZ.js +0 -4
  515. package/dist/graph-viewer/viewer/vhdl-UepOATuw.js +0 -3
  516. package/dist/graph-viewer/viewer/viml-DgaHry3T.js +0 -3
  517. package/dist/graph-viewer/viewer/vitesse-black-B09teiUx.js +0 -4
  518. package/dist/graph-viewer/viewer/vitesse-black-BLUtFdIS.js +0 -184
  519. package/dist/graph-viewer/viewer/vitesse-dark-CSebpMf5.js +0 -184
  520. package/dist/graph-viewer/viewer/vitesse-dark-CkA3-NtU.js +0 -4
  521. package/dist/graph-viewer/viewer/vitesse-light-DECVT8fj.js +0 -4
  522. package/dist/graph-viewer/viewer/vitesse-light-DJPcjfyV.js +0 -184
  523. package/dist/graph-viewer/viewer/vue-CiFPO7R5.js +0 -21
  524. package/dist/graph-viewer/viewer/vue-html-BZL30ZyU.js +0 -5
  525. package/dist/graph-viewer/viewer/vue-vine-CVQkz-vV.js +0 -18
  526. package/dist/graph-viewer/viewer/vyper-BiyGiCmH.js +0 -3
  527. package/dist/graph-viewer/viewer/wasm-BXdtUMGf.js +0 -4
  528. package/dist/graph-viewer/viewer/wasm-DXa1gtBd.js +0 -3
  529. package/dist/graph-viewer/viewer/wenyan-Ke6AN0BI.js +0 -3
  530. package/dist/graph-viewer/viewer/wgsl-Vcm3Lg52.js +0 -3
  531. package/dist/graph-viewer/viewer/wikitext-C4uDiSA9.js +0 -3
  532. package/dist/graph-viewer/viewer/wit-hbIPZwZR.js +0 -3
  533. package/dist/graph-viewer/viewer/wolfram-DGFnG0I5.js +0 -3
  534. package/dist/graph-viewer/viewer/workbench-E6_5q_oL.js +0 -28351
  535. package/dist/graph-viewer/viewer/workflows--mZpHYqo.js +0 -3298
  536. package/dist/graph-viewer/viewer/workspace-cKs9sGEO.js +0 -2468
  537. package/dist/graph-viewer/viewer/xml-C4j_mOgu.js +0 -6
  538. package/dist/graph-viewer/viewer/xml-SfvhYhbQ.js +0 -2
  539. package/dist/graph-viewer/viewer/xsl-CNv6nqtA.js +0 -5
  540. package/dist/graph-viewer/viewer/yaml-CS1e8wnG.js +0 -5
  541. package/dist/graph-viewer/viewer/yaml-CudzZ2m4.js +0 -2
  542. package/dist/graph-viewer/viewer/zenscript-BtXHY1aa.js +0 -3
  543. package/dist/graph-viewer/viewer/zig-BaU1vZRj.js +0 -3
  544. package/dist/graph-viewer/workspace-model-BkPl_J8E.js +0 -1541
  545. package/dist/graph-viewer/workspace-viewer.js +0 -24407
  546. package/dist/graph-viewer/workspace.js +0 -2
@@ -1,2293 +0,0 @@
1
- import { n as e, r as t } from "./record-CsP_3NJS.js";
2
- import { n, t as r } from "./anchor-C4i5SrB9.js";
3
- import { createHash as i } from "node:crypto";
4
- import { closeSync as a, copyFileSync as o, existsSync as s, mkdtempSync as c, openSync as l, readFileSync as u, readSync as d, readdirSync as f, rmSync as p, statSync as m } from "node:fs";
5
- import { tmpdir as h } from "node:os";
6
- import { basename as g, dirname as _, join as v } from "node:path";
7
- import { pathToFileURL as y } from "node:url";
8
- //#region src/adapters/agent-runtime.ts
9
- var b = "2.7.0", x = 134217728;
10
- function S({ maxBytes: e = 1073741824 } = {}) {
11
- let t = /* @__PURE__ */ new Map(), n = 0;
12
- return {
13
- read(r) {
14
- let i = m(r), a = `${i.dev}:${i.ino}:${i.size}:${i.mtimeMs}:${i.ctimeMs}`, o = t.get(r);
15
- if (o && (t.delete(r), n -= o.bytes.length, o.key === a)) return t.set(r, o), n += o.bytes.length, o;
16
- let s = u(r), c = {
17
- key: a,
18
- bytes: s,
19
- sha256: E(s)
20
- };
21
- s.length <= e / 4 && (t.set(r, c), n += s.length);
22
- for (let [r, i] of t) {
23
- if (n <= e) break;
24
- t.delete(r), n -= i.bytes.length;
25
- }
26
- return c;
27
- },
28
- heldBytes: () => n
29
- };
30
- }
31
- var C = class extends Error {
32
- exitCode = 2;
33
- }, w = class extends Error {
34
- exitCode = 3;
35
- code = "record-too-large";
36
- }, T = class extends Error {
37
- exitCode = 4;
38
- }, E = (e) => i("sha256").update(e).digest("hex"), D = (e) => typeof e == "string" && /^(sha256[:-])?[0-9a-f]{64}$/.test(e) ? e.slice(-64) : null, O = /(^|\/)\.claude\/projects\/[^/]+\/[^/]+\.jsonl$/, k = (e) => O.test(e) ? e.slice(e.lastIndexOf(".claude/projects/")) : null, A = /(^|\/)\.local\/share\/opencode\/opencode\.db$/, j = "evidence/native-index.jsonl", M = "evidence/live-stream", N = Date.UTC(2001, 0, 1), ee = Date.UTC(2100, 0, 1), P = (e) => {
39
- if (typeof e != "string" && typeof e != "number") return null;
40
- let t = new Date(typeof e == "number" && e < 1e11 ? e * 1e3 : e), n = t.valueOf();
41
- return Number.isFinite(n) && n >= N && n < ee ? t.toISOString() : null;
42
- };
43
- function F(e) {
44
- if (e == null) return "null";
45
- if (e === !0) return "true";
46
- if (e === !1) return "false";
47
- if (typeof e == "number") {
48
- if (!Number.isFinite(e)) return e > 0 ? "Infinity" : e < 0 ? "-Infinity" : "NaN";
49
- if (Number.isInteger(e) && Math.abs(e) < 0x2386f26fc10000) return String(e);
50
- let [t, n] = e.toExponential().split("e");
51
- return Number(n) >= -4 && Number(n) < 16 ? /[.e]/.test(String(e)) ? String(e) : `${e}.0` : `${t}e${n[0]}${n.slice(1).padStart(2, "0")}`;
52
- }
53
- if (typeof e == "string") {
54
- let t = "\"";
55
- for (let n = 0; n < e.length; n++) {
56
- let r = e.charCodeAt(n), i = e[n];
57
- t += i === "\"" ? "\\\"" : i === "\\" ? "\\\\" : i === "\n" ? "\\n" : i === "\r" ? "\\r" : i === " " ? "\\t" : i === "\b" ? "\\b" : i === "\f" ? "\\f" : r < 32 || r > 126 ? `\\u${r.toString(16).padStart(4, "0")}` : i;
58
- }
59
- return `${t}"`;
60
- }
61
- return Array.isArray(e) ? `[${e.map(F).join(", ")}]` : typeof e == "object" ? `{${Object.keys(e).sort().map((t) => `${F(t)}: ${F(e[t])}`).join(", ")}}` : "null";
62
- }
63
- function I(e) {
64
- let t = 0;
65
- for (let n of e) {
66
- let e = n && typeof n == "object" ? "text" in n ? n.text : "thinking" in n ? n.thinking : "" : "";
67
- t += [...typeof e == "string" ? e : e === null ? "None" : String(e)].length;
68
- }
69
- return {
70
- contentSha256: E(F(e)),
71
- contentCharacters: t
72
- };
73
- }
74
- var L = (e) => typeof e == "string" ? e : e == null ? "" : JSON.stringify(e), R = (e) => typeof e == "number" && Number.isFinite(e) ? e : void 0, z = [
75
- [/await|wait_?for|wait_agent|^wait$|sleep|poll|watch_events|next_event/, "waiting"],
76
- [/spawn|delegate|subagent|^task$|^agent$|send_message|post_message|coordinat|assign|settle|todowrite|^todo|cancel_child|children/, "coordination"],
77
- [/^(write|edit|multiedit|notebookedit|str_replace|apply_patch|patch|create_file|write_file|edit_file|file_change|replace)/, "writing"],
78
- [/web_?search|web_?fetch|^fetch$|search_papers|arxiv|scholar|knowledge|retriev|literature|crossref|^read|^view|^glob$|^grep$|^ls$|list_dir|open_file|^cat$|search_files|find_files/, "literature"],
79
- [/verif|^check|_check|test|lean|prove|proof|validate|assert/, "verification"],
80
- [/bash|shell|exec|command|^run|python|terminal|jupyter|interpreter|compute|^sh$/, "compute"]
81
- ], B = [
82
- [/\b(pip3? install|python3? -m pip install|npm (i|install|ci)\b|pnpm (i|install|add)\b|yarn add|apt(-get)? install|brew install|cargo install|uv (pip|add|sync)\b|conda install|git clone|elan |rustup )/, "setup"],
83
- [/^\s*(sleep\b|while\b.*\bsleep\b|until\b)|\bwait\b\s*$/, "waiting"],
84
- [/\b(pytest|unittest|cargo test|(npm|pnpm|yarn) (run )?test|lake (build|env)|lean\b|coqc|z3\b|verify|--check\b|sha256sum -c|diff -q)/, "verification"],
85
- [/\b(curl|wget)\b[^|]*(arxiv|doi\.org|semanticscholar|scholar|crossref|openalex|https?:)/, "literature"],
86
- [/^\s*(cat|head|tail|less|rg|grep|find|ls|wc|tree|file|stat|jq)\b|\bsed -n\b/, "literature"],
87
- [/(^|[;&|]\s*)(cat\s*>|tee\b)|\bsed -i\b|>\s*\S+\.(md|tex|json|py|ts|mjs|txt)\b/, "writing"]
88
- ];
89
- function V(e, t) {
90
- let n = e.toLowerCase().replace(/^mcp__[^_]+(?:_[^_]+)*?__/, ""), r = /^mcp__([^_]+(?:[-_][^_]+)*?)__/.exec(e.toLowerCase())?.[1] ?? "", i = (() => {
91
- if (typeof t == "string") try {
92
- let e = JSON.parse(t);
93
- return typeof e?.command == "string" ? e.command : typeof e?.cmd == "string" ? e.cmd : "";
94
- } catch {
95
- return "";
96
- }
97
- let e = t;
98
- return typeof e?.command == "string" ? e.command : typeof e?.cmd == "string" ? e.cmd : "";
99
- })(), a = "other";
100
- for (let [e, t] of z) if (e.test(n)) {
101
- a = t;
102
- break;
103
- }
104
- if (a === "other" && /coordination/.test(r) && (a = "coordination"), (a === "compute" || a === "other") && i) {
105
- for (let [e, t] of B) if (e.test(i)) return t;
106
- return "compute";
107
- }
108
- return a;
109
- }
110
- function H(e, t) {
111
- let n = [], r = 0, i = 1;
112
- for (; r <= e.length;) {
113
- let a = e.indexOf(10, r);
114
- if (a < 0 && (a = e.length), !t || t(i)) {
115
- let t = e.toString("utf8", r, a);
116
- if (t.endsWith("\r") && (t = t.slice(0, -1)), t.trim()) {
117
- let e;
118
- try {
119
- e = JSON.parse(t);
120
- } catch {
121
- e = void 0;
122
- }
123
- n.push({
124
- line: i,
125
- raw: t,
126
- value: e
127
- });
128
- }
129
- }
130
- r = a + 1, i++;
131
- }
132
- return n;
133
- }
134
- var U = (e) => e ? (t) => e.some(([e, n]) => t >= e && t <= n) : void 0, W = (e) => {
135
- try {
136
- return f(e).sort();
137
- } catch {
138
- return [];
139
- }
140
- };
141
- function G(e, t = "", n = []) {
142
- for (let r of W(v(e, t))) {
143
- let i = t ? `${t}/${r}` : r, a;
144
- try {
145
- a = m(v(e, i));
146
- } catch {
147
- continue;
148
- }
149
- a.isDirectory() ? G(e, i, n) : a.isFile() && n.push(i);
150
- }
151
- return n;
152
- }
153
- var K = (...e) => "/" + e.map((e) => String(e).replaceAll("~", "~0").replaceAll("/", "~1")).join("/");
154
- function q(e, t, n) {
155
- for (; t > 0 && t < e.length && (e[t] & 192) == 128;) t++;
156
- for (; n < e.length && n > 0 && (e[n] & 192) == 128;) n--;
157
- return e.subarray(t, n).toString("utf8");
158
- }
159
- var J = class {
160
- runDir;
161
- nativeRoot;
162
- maxText;
163
- options;
164
- runId;
165
- runIdBasis;
166
- manifestFiles = /* @__PURE__ */ new Map();
167
- claimed = /* @__PURE__ */ new Map();
168
- executionOf = /* @__PURE__ */ new Map();
169
- sources = /* @__PURE__ */ new Map();
170
- events = [];
171
- gaps = [];
172
- nodes = /* @__PURE__ */ new Map();
173
- fileCache = /* @__PURE__ */ new Map();
174
- nativeIndexCache;
175
- rootId;
176
- order = 0;
177
- format = "other";
178
- runInput = null;
179
- runInputRel = null;
180
- constructor(e, t, n, r = {}) {
181
- this.runDir = e, this.nativeRoot = t, this.maxText = n, this.options = r;
182
- let i = typeof r.manifest?.runId == "string" && r.manifest.runId ? r.manifest.runId : void 0;
183
- this.runId = r.runId ?? i ?? g(e.replace(/\/+$/, "")), this.runIdBasis = r.runId ? "option" : i ? "manifest" : "directory", this.rootId = this.runId;
184
- for (let e of r.manifest?.files ?? []) this.manifestFiles.set(e.path, e);
185
- }
186
- sourcePath(e) {
187
- return !this.options.prefix || e.startsWith("native:") ? e : `${this.options.prefix}${e}`;
188
- }
189
- file(e, t = v(this.runDir, e)) {
190
- let n = this.fileCache.get(t);
191
- if (n) return n;
192
- let r = this.options.files?.read(t), i = r?.bytes ?? u(t), a, o = {
193
- bytes: i,
194
- sha256: r?.sha256 ?? E(i),
195
- get text() {
196
- return a ??= i.toString("utf8");
197
- }
198
- }, s = this.manifestFiles.get(this.sourcePath(e));
199
- if (s && D(s.sha256) !== o.sha256) throw new T(`${e} does not match its snapshot manifest`);
200
- return this.fileCache.set(t, o), o;
201
- }
202
- digestOnly(e, t = v(this.runDir, e)) {
203
- let n = this.manifestFiles.get(this.sourcePath(e));
204
- if (n) return {
205
- sha256: D(n.sha256),
206
- bytes: n.bytes
207
- };
208
- if (this.options.files) try {
209
- let e = this.options.files.read(t);
210
- return {
211
- sha256: e.sha256,
212
- bytes: e.bytes.length
213
- };
214
- } catch {
215
- return null;
216
- }
217
- let r;
218
- try {
219
- r = l(t, "r");
220
- } catch {
221
- return null;
222
- }
223
- try {
224
- let e = i("sha256"), t = Buffer.allocUnsafe(1 << 20), n = 0;
225
- for (let i = d(r, t); i > 0; i = d(r, t)) e.update(t.subarray(0, i)), n += i;
226
- return {
227
- sha256: e.digest("hex"),
228
- bytes: n
229
- };
230
- } finally {
231
- a(r);
232
- }
233
- }
234
- addSource(e) {
235
- let t = {
236
- ...e,
237
- path: this.sourcePath(e.path)
238
- }, n = `${t.path}\0${t.line ?? ""}\0${t.pointer ?? ""}`, r = this.sources.get(n);
239
- return r?.sha256 ? r : (this.sources.set(n, t), t);
240
- }
241
- fileSource(e, t, n) {
242
- let r = this.file(e, t);
243
- return this.addSource({
244
- path: e,
245
- sha256: r.sha256,
246
- bytes: r.bytes.length,
247
- ...n ? { label: n } : {}
248
- });
249
- }
250
- listSource(e) {
251
- let t = this.digestOnly(e);
252
- t && this.addSource({
253
- path: e,
254
- ...t
255
- });
256
- }
257
- lineSource(e, t, n) {
258
- let r = Buffer.from(n, "utf8");
259
- return this.addSource({
260
- path: e,
261
- line: t,
262
- sha256: E(r),
263
- bytes: r.length
264
- });
265
- }
266
- pointerSource(e, t, n, r) {
267
- let i = Buffer.from(typeof n == "string" ? n : JSON.stringify(n), "utf8");
268
- return this.addSource({
269
- path: e,
270
- pointer: t,
271
- sha256: E(i),
272
- bytes: i.length,
273
- ...r ? { label: r } : {}
274
- });
275
- }
276
- clip(e, t) {
277
- let n = Buffer.from(e, "utf8");
278
- if (n.length <= this.maxText) return {
279
- text: e,
280
- clip: void 0
281
- };
282
- let r = Math.floor(this.maxText * .75), i = this.maxText - r, a = `${q(n, 0, r)}\n\n…\n\n${q(n, n.length - i, n.length)}`, o = t?.() ?? null;
283
- return {
284
- text: a,
285
- clip: {
286
- bytes: n.length,
287
- sha256: o?.sha256 ?? null
288
- }
289
- };
290
- }
291
- compactValue(e, t = 0) {
292
- if (typeof e == "string") {
293
- let t = Math.min(this.maxText, 2048);
294
- return Buffer.byteLength(e) > t ? this.clip(e, null).text.slice(0, t) + "…" : e;
295
- }
296
- if (Array.isArray(e)) {
297
- let n = e.slice(0, 50).map((e) => this.compactValue(e, t + 1));
298
- return e.length > 50 ? [...n, `… ${e.length - 50} more`] : n;
299
- }
300
- if (e && typeof e == "object") {
301
- if (t > 6) return "…";
302
- let n = {};
303
- for (let [r, i] of Object.entries(e)) n[r] = this.compactValue(i, t + 1);
304
- return n;
305
- }
306
- return e;
307
- }
308
- emit(e) {
309
- let t = {
310
- ...e.source,
311
- path: this.sourcePath(e.source.path)
312
- };
313
- this.events.push({
314
- ...e,
315
- source: t,
316
- id: n(t),
317
- order: this.order++
318
- });
319
- }
320
- claim(e, t, n) {
321
- let r = this.claimed.get(e);
322
- return r && r !== t ? (this.gaps.push({
323
- nodeId: t,
324
- code: "source-shared",
325
- detail: `${this.sourcePath(n)} is already the conversation of ${r}`
326
- }), !1) : (this.claimed.set(e, t), !0);
327
- }
328
- nodeFor(e) {
329
- if (typeof e == "string") {
330
- let t = e;
331
- for (; t;) {
332
- if (this.nodes.has(t)) return t;
333
- let e = t.lastIndexOf(":s");
334
- if (e <= 0) break;
335
- t = t.slice(0, e);
336
- }
337
- }
338
- return this.rootId;
339
- }
340
- addSandbox(e, t) {
341
- e && typeof t == "string" && /^sandbox-/.test(t) && !e.sandboxes.includes(t) && e.sandboxes.push(t);
342
- }
343
- blob(e) {
344
- let t = D(e);
345
- if (!t) return null;
346
- let n = `blobs/sha256-${t}.json`, r = v(this.runDir, n);
347
- if (!s(r)) return null;
348
- try {
349
- return {
350
- rel: n,
351
- value: JSON.parse(this.file(n).text)
352
- };
353
- } catch {
354
- return null;
355
- }
356
- }
357
- readRunInput() {
358
- let e = "run-input.json", t = v(this.runDir, e);
359
- if (!s(t)) {
360
- let n = /^(.*)\.v\d+$/.exec(this.runId), r = n ? v(_(this.runDir), n[1], "run-input.json") : null;
361
- if (!r || !s(r)) return;
362
- e = `../${n[1]}/run-input.json`, t = r;
363
- }
364
- try {
365
- let n = this.file(e, t);
366
- this.runInput = JSON.parse(n.text), this.runInputRel = e, this.fileSource(e, t);
367
- } catch {
368
- this.gaps.push({
369
- nodeId: null,
370
- code: "input-unreadable",
371
- detail: `${e} is not valid JSON`
372
- });
373
- return;
374
- }
375
- let n = this.runInput?.placement?.childFiles;
376
- Array.isArray(n) && n.forEach((t, n) => {
377
- typeof t?.content == "string" && this.pointerSource(e, K("placement", "childFiles", n, "content"), t.content, L(t.path) || void 0);
378
- });
379
- }
380
- readJournal() {
381
- let e = "spawn-journal.jsonl", t = v(this.runDir, e);
382
- if (!s(t)) return [];
383
- let n = this.file(e);
384
- this.fileSource(e);
385
- let r = H(n.bytes), i = /* @__PURE__ */ new Map();
386
- for (let e of r) {
387
- let t = e.value?.event;
388
- if (t?.kind !== "spawned" || typeof t.id != "string" || this.nodes.has(t.id)) continue;
389
- let n = t.id, r = n.lastIndexOf(":s"), a = typeof t.parent == "string" ? t.parent : r > 0 ? n.slice(0, r) : null;
390
- !a && this.nodes.size === 0 && (this.rootId = n);
391
- let o = L(t.label) || (a ? "worker" : "root"), s = n.startsWith(this.rootId + ":") ? n.slice(this.rootId.length + 1) : n === this.rootId ? "" : n;
392
- this.nodes.set(n, {
393
- id: n,
394
- label: s ? `${s}${t.key ? ` · ${t.key}` : ""}` : o,
395
- parent: a,
396
- kind: "agent",
397
- role: o,
398
- model: null,
399
- servedModel: null,
400
- harness: null,
401
- start: P(t.at) ?? void 0,
402
- sandboxes: [],
403
- capture: {
404
- channel: "journal",
405
- status: "absent",
406
- reason: null
407
- },
408
- taskDigest: t.identity?.taskDigest,
409
- profileRef: t.profileRef,
410
- outRefs: [],
411
- transcriptRefs: [],
412
- key: typeof t.key == "string" ? t.key : void 0
413
- }), typeof t.runtime == "string" && i.set(n, t.runtime);
414
- }
415
- if (!this.nodes.size) return r;
416
- for (let e of this.nodes.values()) e.parent && !this.nodes.has(e.parent) && (e.parent = null);
417
- this.format = [...i.values()].includes("tangle-sandbox") ? "cloud" : "runtime";
418
- let a = null, o = 0;
419
- for (let t of r) {
420
- let r = t.value?.event ?? t.value;
421
- if (!r || typeof r != "object") continue;
422
- let i = typeof r.id == "string" ? r.id : L(t.value?.root).split("/").at(-1), s = this.nodes.get(this.nodeFor(i)), c = typeof r.id == "string" ? this.nodes.get(r.id) : void 0, l = L(r.kind) || "unknown";
423
- if (l === "materialized" && c) {
424
- let e = r.receipt?.model;
425
- e?.status === "known" && typeof e.id == "string" && !c.model && (c.model = e.id, c.modelSource = "materialization receipt"), r.receipt?.execution?.kind === "environment" && this.addSandbox(c, r.receipt.execution.id), r.receipt?.execution?.kind === "session" && typeof r.receipt.execution.id == "string" && this.executionOf.set(r.receipt.execution.id, {
426
- node: c.id,
427
- line: t.line
428
- });
429
- }
430
- if (c) {
431
- this.addSandbox(c, r.environmentId), this.addSandbox(c, r.request?.source?.environmentId);
432
- for (let e of Array.isArray(r.kept) ? r.kept : []) this.addSandbox(c, e?.environmentId);
433
- }
434
- (l === "settled" || l === "reconciled") && c && ((l === "settled" || !c.status) && (c.status = L(r.status) || c.status, c.end = P(r.at) ?? c.end), l === "reconciled" && !c.end && (c.end = P(r.at) ?? void 0)), c && typeof r.outRef == "string" && !c.outRefs.includes(r.outRef) && c.outRefs.push(r.outRef);
435
- let u = r.harnessTranscript;
436
- c && u && (u.status === "available" && typeof u.transcriptRef == "string" ? (c.transcriptRefs.includes(u.transcriptRef) || c.transcriptRefs.push(u.transcriptRef), typeof u.harness == "string" && (c.harness ??= u.harness)) : typeof u.reason == "string" && (c.transcriptReason = u.reason));
437
- let d = P(r.at ?? t.value?.at);
438
- d && (a = d);
439
- let f = d ?? a;
440
- if (!f || !s) {
441
- o++;
442
- continue;
443
- }
444
- let { kind: p, id: m, seq: h, at: g, ..._ } = r, v = [l.replaceAll("-", " "), r.status ?? r.signal ?? r.record?.classification ?? r.admission?.phase].filter(Boolean).join(" · "), y = L(r.reason ?? r.cause ?? r.record?.error ?? r.outcome?.error ?? r.detail), b = y ? this.clip(y, () => this.lineSource(e, t.line, t.raw)) : null, x = r.spent ?? r.spend, S = l === "metered" && typeof x?.tokens?.input == "number" ? {
445
- usage: {
446
- input: x.tokens.input,
447
- ...typeof x.tokens.output == "number" ? { output: x.tokens.output } : {}
448
- },
449
- usageScope: "metered"
450
- } : void 0;
451
- this.emit({
452
- node: s.id,
453
- at: f,
454
- kind: l,
455
- category: "lifecycle",
456
- label: v,
457
- source: {
458
- path: e,
459
- sha256: n.sha256,
460
- line: t.line
461
- },
462
- detail: {
463
- lifecycle: l,
464
- ...i && i !== s.id ? { subject: i } : {},
465
- ...d ? {} : { atBasis: "carried" },
466
- ...b ? {
467
- publicText: b.text,
468
- ...b.clip ? { clip: b.clip } : {}
469
- } : {},
470
- ...l === "settled" || l === "execution-result" ? { isError: r.status === "down" || r.outcome?.success === !1 } : {},
471
- ...x && (l === "settled" || l === "metered" || l === "reconciled") ? { spent: this.compactValue(x) } : {},
472
- ...S ?? {},
473
- data: this.compactValue(_)
474
- }
475
- });
476
- }
477
- return o && this.gaps.push({
478
- nodeId: null,
479
- code: "journal-untimed-lines",
480
- detail: `${o} spawn-journal lines carry no time and precede every timed line`
481
- }), r;
482
- }
483
- resultJson() {
484
- let e = v(this.runDir, "result.json");
485
- if (!s(e)) return null;
486
- try {
487
- let e = JSON.parse(this.file("result.json").text);
488
- return this.fileSource("result.json"), e;
489
- } catch {
490
- return null;
491
- }
492
- }
493
- nativeFiles(e) {
494
- let t = /* @__PURE__ */ new Map(), n = 0, r = !1, i = (e, r, i, a, o) => {
495
- let s;
496
- try {
497
- s = m(i).size;
498
- } catch {
499
- return;
500
- }
501
- let c = t.get(e);
502
- (!c || s > c.bytes) && t.set(e, {
503
- rel: r,
504
- abs: i,
505
- hex: a,
506
- sessionId: o,
507
- bytes: s,
508
- order: c?.order ?? n++
509
- });
510
- }, a = (e) => this.nativeCacheDir(e);
511
- for (let t of e.transcriptRefs) {
512
- let n = this.blob(t);
513
- if (n?.value?.kind !== "retained-harness-transcript") continue;
514
- let o = n.value;
515
- this.fileSource(n.rel);
516
- let c = D(o.snapshot?.archive?.sha256 ?? o.snapshot?.archive?.locator?.digest), l = typeof o.source?.nativeSessionId == "string" ? o.source.nativeSessionId : null;
517
- e.nativeSessionId ??= l ?? void 0, typeof o.harness == "string" && (e.harness ??= o.harness), this.addSandbox(e, o.source?.environmentId);
518
- let u = (Array.isArray(o.files) ? o.files : []).filter((e) => typeof e?.path == "string" && O.test(e.path)).filter((e) => !l || e.path.endsWith(`/${l}.jsonl`));
519
- if (!c || !u.length) continue;
520
- let d = a(c);
521
- if (!d) {
522
- r = !0;
523
- continue;
524
- }
525
- for (let t of u) {
526
- let n = t.path.split("/"), r = [t.path, [
527
- "workspace/__retention__/sessions",
528
- n[0],
529
- "native",
530
- ...n.slice(1)
531
- ].join("/")].find((e) => s(v(d, e)));
532
- if (!r) {
533
- this.gaps.push({
534
- nodeId: e.id,
535
- code: "no-transcript:native-file-missing",
536
- detail: `${t.path} is not in archive ${c}`
537
- });
538
- continue;
539
- }
540
- let a = v(d, r), o = `native:${c}/${r}`, u = this.file(o, a), f = D(t.sha256);
541
- if (f && f !== u.sha256) {
542
- this.gaps.push({
543
- nodeId: e.id,
544
- code: "no-transcript:native-sha256-mismatch",
545
- detail: `${o} does not match its manifest`
546
- });
547
- continue;
548
- }
549
- i(k(t.path), o, a, c, l);
550
- }
551
- }
552
- let o = this.nativeIndex().get(e.id);
553
- if (o) {
554
- let t = D(o.snapshot?.archive);
555
- this.addSandbox(e, o.environmentId), typeof o.harness == "string" && (e.harness ??= o.harness);
556
- let n = t ? a(t) : void 0;
557
- t && !n && (r = !0);
558
- for (let e of n && Array.isArray(o.native?.sessions) ? o.native.sessions : []) {
559
- let r = typeof e?.path == "string" ? k(e.path) : null;
560
- if (!r || typeof e.sandboxSessionId != "string" || typeof e.rootScope != "string") continue;
561
- let a = [
562
- "workspace/__retention__/sessions",
563
- e.sandboxSessionId,
564
- "native",
565
- ...typeof e.sourceId == "string" ? [e.sourceId] : [],
566
- e.rootScope,
567
- e.path
568
- ].join("/");
569
- i(r, `native:${t}/${a}`, v(n, a), t, null);
570
- }
571
- }
572
- if (t.size) {
573
- let e = [...t.values()].sort((e, t) => e.order - t.order);
574
- for (let t of e) this.fileSource(t.rel, t.abs);
575
- return e;
576
- }
577
- return r ? "not-cached" : null;
578
- }
579
- nativeCacheDir(e) {
580
- return this.nativeRoot ? [
581
- e,
582
- `sha256-${e}`,
583
- `sha256:${e}`
584
- ].map((e) => v(this.nativeRoot, e)).find((e) => s(e)) : void 0;
585
- }
586
- nativeStore(e) {
587
- let t = this.nativeIndex().get(e.id), n = D(t?.snapshot?.archive), r = n ? this.nativeCacheDir(n) : void 0, i = (Array.isArray(t?.native?.sessions) ? t.native.sessions : []).filter((e) => typeof e?.path == "string" && A.test(e.path) && typeof e.sandboxSessionId == "string" && typeof e.rootScope == "string");
588
- if (!r || !i.length) return null;
589
- let a = (e) => [
590
- "workspace/__retention__/sessions",
591
- e.sandboxSessionId,
592
- "native",
593
- ...typeof e.sourceId == "string" ? [e.sourceId] : [],
594
- e.rootScope,
595
- e.path
596
- ].join("/"), o = a(i[0]), c = v(r, o);
597
- if (!s(c)) return this.gaps.push({
598
- nodeId: e.id,
599
- code: "no-transcript:native-file-missing",
600
- detail: `${o} is not in archive ${n}`
601
- }), null;
602
- let l = i.filter((e) => a(e) === o && !e.parentNativeSessionId && typeof e.nativeSessionId == "string").map((e) => e.nativeSessionId);
603
- return {
604
- rel: `native:${n}/${o}`,
605
- abs: c,
606
- sessionIds: l
607
- };
608
- }
609
- nativeIndex() {
610
- if (this.nativeIndexCache) return this.nativeIndexCache;
611
- let e = /* @__PURE__ */ new Map(), t = v(this.runDir, j);
612
- if (s(t)) {
613
- this.listSource(j);
614
- for (let n of H(this.options.files?.read(t).bytes ?? u(t))) {
615
- let t = n.value;
616
- if (t?.schema !== "disco.native-capture.v1" || typeof t.nodeId != "string") continue;
617
- let r = e.get(t.nodeId);
618
- (!r || String(t.at) >= String(r.at)) && e.set(t.nodeId, t);
619
- }
620
- }
621
- return this.nativeIndexCache = e;
622
- }
623
- readNative(e, t) {
624
- let n = !1;
625
- for (let r of t) {
626
- let t = this.readClaudeSession(e, r.rel, r.abs);
627
- t !== null && (n ||= t.unparsable > 0);
628
- }
629
- e.capture = {
630
- channel: "native",
631
- status: n ? "lossy" : "complete",
632
- reason: n ? "unparsable-lines" : null
633
- }, e.harness === null && (e.harness = "claude-code");
634
- }
635
- readClaudeSession(e, t, n, r) {
636
- let i = this.file(t, n);
637
- if (!this.claim(i.sha256, e.id, t)) return null;
638
- this.fileSource(t, n);
639
- let a = {
640
- events: 0,
641
- unparsable: 0,
642
- untimed: 0
643
- }, o = /* @__PURE__ */ new Set(), s, c = e.start ?? null;
644
- for (let n of H(i.bytes, U(r))) {
645
- let r = n.value;
646
- if (!r) {
647
- a.unparsable++;
648
- continue;
649
- }
650
- let l = P(r.timestamp) ?? c;
651
- if (!l) {
652
- a.untimed++;
653
- continue;
654
- }
655
- c = l;
656
- let u = {
657
- path: t,
658
- sha256: i.sha256,
659
- line: n.line
660
- }, d = () => this.lineSource(t, n.line, n.raw), f = typeof r.uuid == "string" ? { nativeRecordId: r.uuid } : {}, p = r.isSidechain ? { sidechain: !0 } : {}, m = r.message, h = this.events.length;
661
- if (r.type === "assistant" && m) {
662
- let t = Array.isArray(m.content) ? m.content : [{
663
- type: "text",
664
- text: L(m.content)
665
- }], n = t.filter((e) => e?.type === "text").map((e) => L(e.text)).join("\n\n"), i = t.filter((e) => e?.type === "thinking").map((e) => L(e.thinking)).filter(Boolean).join("\n\n"), a = t.filter((e) => e?.type === "thinking" && !L(e.thinking)).length, c = t.filter((e) => e?.type === "redacted_thinking").length, h = t.filter((e) => e?.type === "tool_use" || e?.type === "server_tool_use"), g = m.usage, _ = typeof m.id != "string" || !o.has(m.id);
666
- typeof m.id == "string" && o.add(m.id), typeof m.model == "string" && m.model !== "<synthetic>" && (e.servedModel = m.model, e.modelSource = "native response");
667
- let v = n ? this.clip(n, d) : null, y = i ? this.clip(i, d) : null;
668
- this.emit({
669
- node: e.id,
670
- at: l,
671
- kind: "message",
672
- category: h.length ? V(L(h[0].name), h[0].input) : "reasoning",
673
- label: h.length ? `assistant · ${h.map((e) => L(e.name)).join(", ")}` : "assistant",
674
- source: u,
675
- detail: {
676
- role: "assistant",
677
- ...f,
678
- ...v ? { publicText: v.text } : {},
679
- ...y ? { reasoning: y.text } : {},
680
- ...a ? { reasoningOmitted: a } : {},
681
- ...c ? { reasoningRedacted: c } : {},
682
- ...v?.clip ?? y?.clip ? { clip: v?.clip ?? y?.clip } : {},
683
- ...h.length ? { publicToolCalls: h.map((e) => {
684
- let t = this.clip(JSON.stringify(e.input ?? {}), d);
685
- return {
686
- id: L(e.id),
687
- name: L(e.name),
688
- input: t.text,
689
- ...t.clip ? { clip: t.clip } : {}
690
- };
691
- }) } : {},
692
- ...g && _ ? { usage: {
693
- input: R(g.input_tokens),
694
- output: R(g.output_tokens),
695
- cacheRead: R(g.cache_read_input_tokens),
696
- cacheWrite: R(g.cache_creation_input_tokens)
697
- } } : {},
698
- ...typeof m.model == "string" ? { responseReportedModel: m.model } : {},
699
- ...r.isApiErrorMessage ? { responseStatus: "error" } : {},
700
- ...p
701
- }
702
- }), s = this.events.at(-1);
703
- } else if (r.type === "user" && m && typeof m.content == "string") {
704
- let t = this.clip(m.content, d);
705
- this.emit({
706
- node: e.id,
707
- at: l,
708
- kind: "message",
709
- category: "other",
710
- label: "user",
711
- source: u,
712
- detail: {
713
- role: "user",
714
- ...f,
715
- publicText: t.text,
716
- ...t.clip ? { clip: t.clip } : {},
717
- ...p
718
- }
719
- });
720
- } else if (r.type === "user" && m) {
721
- let t = Array.isArray(m.content) ? m.content : [], n = [];
722
- t.forEach((e, t) => {
723
- e?.type === "tool_result" && n.push({
724
- index: t,
725
- block: e
726
- });
727
- });
728
- let r = t.findIndex((e) => e?.type === "text" || e?.type === "image"), i = t.filter((e) => e?.type === "text" || e?.type === "image").map((e) => e.type === "image" ? "[image]" : L(e.text)).join("\n\n");
729
- i && n.push({
730
- index: r,
731
- text: i
732
- }), n.sort((e, t) => e.index - t.index);
733
- let a = n.length > 1;
734
- for (let t of n) {
735
- let n = a ? {
736
- ...u,
737
- item: t.index
738
- } : u;
739
- if (t.block) {
740
- let r = t.block, i = typeof r.content == "string" ? r.content : Array.isArray(r.content) ? r.content.map((e) => e?.type === "text" ? L(e.text) : e?.type === "image" ? "[image]" : JSON.stringify(e)).join("\n") : L(r.content), a = this.clip(i, d);
741
- this.emit({
742
- node: e.id,
743
- at: l,
744
- kind: "tool-result",
745
- category: "other",
746
- label: "tool result",
747
- source: n,
748
- detail: {
749
- role: "toolResult",
750
- ...f,
751
- toolCallId: L(r.tool_use_id),
752
- isError: r.is_error === !0,
753
- publicText: a.text,
754
- ...a.clip ? { clip: a.clip } : {},
755
- ...p
756
- }
757
- });
758
- } else {
759
- let r = this.clip(t.text, d);
760
- this.emit({
761
- node: e.id,
762
- at: l,
763
- kind: "message",
764
- category: "other",
765
- label: "user",
766
- source: n,
767
- detail: {
768
- role: "user",
769
- ...f,
770
- publicText: r.text,
771
- ...r.clip ? { clip: r.clip } : {},
772
- ...p
773
- }
774
- });
775
- }
776
- }
777
- }
778
- r.type === "cost-state" && s && R(r.totalCostUSD) !== void 0 && (s.detail.costListUsd = r.totalCostUSD, s.detail.usdKnown = !1, s.detail.costScope = "session-total"), this.events.length === h && this.emitRecord(e, l, u, r, f), a.events += this.events.length - h;
779
- }
780
- return a.untimed && this.gaps.push({
781
- nodeId: e.id,
782
- code: "untimed-lines",
783
- detail: `${a.untimed} lines of ${this.sourcePath(t)} carry no time`
784
- }), a.unparsable && this.gaps.push({
785
- nodeId: e.id,
786
- code: "unparsable-lines",
787
- detail: `${a.unparsable} lines of ${this.sourcePath(t)} are not JSON`
788
- }), a;
789
- }
790
- emitRecord(e, t, n, r, i = {}) {
791
- let a = L(r?.type) || "unknown", o = L(r?.subtype ?? r?.customType ?? r?.payload?.type), { type: s, timestamp: c, message: l, ...u } = r ?? {};
792
- this.emit({
793
- node: e.id,
794
- at: t,
795
- kind: "record",
796
- category: a === "system" || a === "session" || a.endsWith("_change") ? "lifecycle" : "other",
797
- label: [a.replaceAll("_", " "), o.replaceAll("_", " ")].filter(Boolean).join(" · "),
798
- source: n,
799
- detail: {
800
- recordType: a,
801
- ...o ? { recordSubtype: o } : {},
802
- ...i,
803
- data: this.compactValue(r?.message ? {
804
- ...u,
805
- message: r.message
806
- } : u)
807
- }
808
- });
809
- }
810
- readLiveStream(e) {
811
- let t = `${M}/${encodeURIComponent(e.id)}`, n = G(v(this.runDir, t)).filter((e) => e.endsWith(".jsonl")), r = 0;
812
- for (let i of n) {
813
- let n = `${t}/${i}`, a = this.file(n);
814
- if (!this.claim(a.sha256, e.id, n)) continue;
815
- this.fileSource(n);
816
- let o = H(a.bytes).filter((e) => e.value && typeof e.value == "object");
817
- r += this.readPartEvents(e, n, a, o.map((e) => e.value), {
818
- where: (e) => ({ line: o[e].line }),
819
- full: (e) => this.lineSource(n, o[e].line, o[e].raw)
820
- });
821
- }
822
- return r ? (e.capture = {
823
- channel: "live",
824
- status: "lossy",
825
- reason: "live-stream-until-settled"
826
- }, !0) : !1;
827
- }
828
- readOpenCode(e, t = "native-trajectory.json") {
829
- let n, r;
830
- try {
831
- r = this.file(t), n = JSON.parse(r.text);
832
- } catch {
833
- return !1;
834
- }
835
- return !Array.isArray(n?.messages) || !Array.isArray(n?.parts) || !this.claim(r.sha256, e.id, t) ? !1 : (this.fileSource(t), this.projectOpenCode(e, n, t, r.sha256, (e, t) => K("parts", t, "data")), !0);
836
- }
837
- readOpenCodeStore(e, t) {
838
- let n = this.file(t.rel, t.abs);
839
- if (!t.sessionIds.length || !this.claim(n.sha256, e.id, t.rel)) return !1;
840
- let r = process.getBuiltinModule?.("node:sqlite");
841
- if (!r) return this.gaps.push({
842
- nodeId: e.id,
843
- code: "no-transcript:opencode-store-unreadable",
844
- detail: "this Node has no node:sqlite"
845
- }), !1;
846
- let i = s(`${t.abs}-wal`) ? c(v(h(), "agent-record-opencode-")) : null, a;
847
- try {
848
- if (i) for (let e of [
849
- "",
850
- "-wal",
851
- "-shm"
852
- ]) s(t.abs + e) && o(t.abs + e, v(i, `opencode.db${e}`));
853
- let e = new r.DatabaseSync(i ? v(i, "opencode.db") : `${y(t.abs).href}?immutable=1`, { readOnly: !0 });
854
- try {
855
- let n = JSON.stringify(t.sessionIds), r = "session_id IN (SELECT value FROM json_each(?))";
856
- a = {
857
- session: e.prepare("SELECT * FROM session WHERE id IN (SELECT value FROM json_each(?)) ORDER BY time_created, id").all(n),
858
- messages: e.prepare(`SELECT id, session_id, time_created, data FROM message WHERE ${r} ORDER BY time_created, id`).all(n),
859
- parts: e.prepare(`SELECT id, message_id, session_id, time_created, data FROM part WHERE ${r} ORDER BY time_created, id`).all(n)
860
- };
861
- } finally {
862
- e.close();
863
- }
864
- } catch (n) {
865
- return this.gaps.push({
866
- nodeId: e.id,
867
- code: "no-transcript:opencode-store-unreadable",
868
- detail: `${this.sourcePath(t.rel)}: ${String(n?.message ?? n).slice(0, 200)}`
869
- }), !1;
870
- } finally {
871
- i && p(i, {
872
- recursive: !0,
873
- force: !0
874
- });
875
- }
876
- return this.fileSource(t.rel, t.abs), this.projectOpenCode(e, a, t.rel, n.sha256, (e) => K("part", L(e.id), "data")), !0;
877
- }
878
- projectOpenCode(e, t, n, r, i) {
879
- let a = Array.isArray(t.session) ? t.session[0] : t.session;
880
- if (a?.model) try {
881
- let t = typeof a.model == "string" ? JSON.parse(a.model) : a.model;
882
- typeof t?.id == "string" && (e.model ??= [t.providerID, t.id].filter(Boolean).join("/"));
883
- } catch {}
884
- typeof a?.id == "string" && (e.nativeSessionId ??= a.id), e.harness ??= "opencode";
885
- let o = /* @__PURE__ */ new Map();
886
- t.messages.forEach((e) => {
887
- try {
888
- o.set(e.id, typeof e.data == "string" ? JSON.parse(e.data) : e.data);
889
- } catch {
890
- o.set(e.id, {});
891
- }
892
- });
893
- let s = t.parts.map((e, t) => ({
894
- part: e,
895
- index: t
896
- })).sort((e, t) => (e.part.time_created ?? 0) - (t.part.time_created ?? 0) || e.index - t.index), c = /* @__PURE__ */ new Map(), l = 0, u = 0;
897
- for (let { part: t, index: a } of s) {
898
- let s;
899
- try {
900
- s = typeof t.data == "string" ? JSON.parse(t.data) : t.data;
901
- } catch {
902
- l++;
903
- continue;
904
- }
905
- let d = o.get(t.message_id) ?? {}, f = d.role === "user" ? "user" : "assistant", p = i(t, a), m = {
906
- path: n,
907
- sha256: r,
908
- pointer: p
909
- }, h = () => this.pointerSource(n, p, t.data), g = P(s?.time?.start ?? t.time_created) ?? e.start;
910
- if (!g) {
911
- u++;
912
- continue;
913
- }
914
- let _ = typeof t.id == "string" ? { nativeRecordId: t.id } : {};
915
- if (f === "assistant" && typeof d.modelID == "string" && (e.servedModel = [d.providerID, d.modelID].filter(Boolean).join("/")), (s?.type === "text" || s?.type === "reasoning") && (L(s.text) || s.type === "text")) {
916
- let n = this.clip(L(s.text), h);
917
- this.emit({
918
- node: e.id,
919
- at: g,
920
- kind: "message",
921
- category: f === "user" ? "other" : "reasoning",
922
- label: f,
923
- source: m,
924
- detail: {
925
- role: f,
926
- ..._,
927
- ...s.type === "text" ? { publicText: n.text } : { reasoning: n.text },
928
- ...n.clip ? { clip: n.clip } : {},
929
- ...s.synthetic ? { synthetic: !0 } : {}
930
- }
931
- }), c.set(t.message_id, this.events.at(-1));
932
- } else if (s?.type === "tool") {
933
- let n = s.state ?? {}, r = this.clip(JSON.stringify(n.input ?? {}), h), i = P(n.time?.start) ?? g, a = P(n.time?.end), o = V(L(s.tool), n.input), l = n.status === "completed" || n.status === "error";
934
- if (this.emit({
935
- node: e.id,
936
- at: i,
937
- kind: "message",
938
- category: o,
939
- label: `assistant · ${L(s.tool)}`,
940
- source: l ? {
941
- ...m,
942
- item: 0
943
- } : m,
944
- detail: {
945
- role: "assistant",
946
- ..._,
947
- publicToolCalls: [{
948
- id: L(s.callID || t.id),
949
- name: L(s.tool),
950
- input: r.text,
951
- ...r.clip ? { clip: r.clip } : {}
952
- }]
953
- }
954
- }), c.set(t.message_id, this.events.at(-1)), l) {
955
- let r = n.status === "error" ? L(n.error) : L(n.output), c = this.clip(r, h);
956
- this.emit({
957
- node: e.id,
958
- at: a ?? i,
959
- kind: "tool-result",
960
- category: o,
961
- label: `tool result · ${L(s.tool)}`,
962
- source: {
963
- ...m,
964
- item: 1
965
- },
966
- detail: {
967
- role: "toolResult",
968
- ..._,
969
- toolCallId: L(s.callID || t.id),
970
- isError: n.status === "error",
971
- publicText: c.text,
972
- ...c.clip ? { clip: c.clip } : {},
973
- ...a && n.time?.start ? { durationMs: Math.max(0, Number(n.time.end) - Number(n.time.start)) } : {}
974
- }
975
- });
976
- }
977
- } else {
978
- if (s?.type === "step-finish") {
979
- let e = c.get(t.message_id), n = s.tokens;
980
- e && n && (e.detail.usage = {
981
- input: R(n.input),
982
- output: R(n.output),
983
- cacheRead: R(n.cache?.read),
984
- cacheWrite: R(n.cache?.write),
985
- ...R(n.reasoning) === void 0 ? {} : { reasoning: n.reasoning }
986
- }, R(s.cost) !== void 0 && s.cost > 0 && (e.detail.costListUsd = s.cost, e.detail.usdKnown = !1));
987
- }
988
- this.emitRecord(e, g, m, {
989
- ...s,
990
- type: L(s?.type) || "part"
991
- }, _);
992
- }
993
- }
994
- return u && this.gaps.push({
995
- nodeId: e.id,
996
- code: "untimed-lines",
997
- detail: `${u} parts of ${this.sourcePath(n)} carry no time`
998
- }), e.capture = {
999
- channel: "oc",
1000
- status: l ? "lossy" : "complete",
1001
- reason: l ? "unparsable-parts" : null
1002
- }, !0;
1003
- }
1004
- piSessions() {
1005
- let e = v(this.runDir, "trace/pi-sessions");
1006
- return s(e) ? G(e).filter((e) => e.endsWith(".jsonl")).map((e) => {
1007
- let t = `trace/pi-sessions/${e}`, n = this.file(t), r = H(n.bytes), i = r.find((e) => e.value?.type === "session")?.value, a = r.find((e) => e.value?.type === "message" && e.value.message?.role === "user")?.value?.message, o = a ? typeof a.content == "string" ? a.content : Array.isArray(a.content) ? a.content.filter((e) => e?.type === "text").map((e) => L(e.text)).join("") : null : null;
1008
- return {
1009
- rel: t,
1010
- sessionId: L(i?.id) || g(e, ".jsonl"),
1011
- digest: o === null ? null : `sha256:${E(JSON.stringify(o))}`,
1012
- rows: r,
1013
- sha256: n.sha256
1014
- };
1015
- }) : [];
1016
- }
1017
- readPi(e, t) {
1018
- e.harness ??= "pi";
1019
- let n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
1020
- for (let i of t) {
1021
- if (!this.claim(i.sha256, e.id, i.rel)) continue;
1022
- this.fileSource(i.rel), e.nativeSessionId ??= i.sessionId;
1023
- let t = 0, a = null;
1024
- for (let o of i.rows) {
1025
- let s = o.value;
1026
- if (!s) continue;
1027
- let c = P(s.timestamp) ?? a;
1028
- if (!c) {
1029
- t++;
1030
- continue;
1031
- }
1032
- a = c;
1033
- let l = {
1034
- path: i.rel,
1035
- sha256: i.sha256,
1036
- line: o.line
1037
- }, u = typeof s.id == "string" ? { nativeRecordId: s.id } : {};
1038
- if (s.type === "model_change" && typeof s.modelId == "string" && (e.model ??= s.modelId), s.type !== "message") {
1039
- this.emitRecord(e, c, l, s, u);
1040
- continue;
1041
- }
1042
- let d = s.message ?? {}, f = () => this.lineSource(i.rel, o.line, o.raw), p = Array.isArray(d.content) ? d.content : [{
1043
- type: "text",
1044
- text: L(d.content)
1045
- }], m = p.filter((e) => e?.type === "text").map((e) => L(e.text)).join("\n\n"), h = {
1046
- ...typeof s.parentId == "string" ? { nativeParentId: s.parentId } : {},
1047
- ...I(Array.isArray(d.content) ? d.content : [{
1048
- type: "text",
1049
- text: d.content
1050
- }])
1051
- };
1052
- if (d.role === "toolResult") {
1053
- let t = this.clip(m, f);
1054
- typeof d.toolCallId == "string" && r.add(d.toolCallId), this.emit({
1055
- node: e.id,
1056
- at: c,
1057
- kind: "tool-result",
1058
- category: "other",
1059
- label: `tool result · ${L(d.toolName)}`,
1060
- source: l,
1061
- detail: {
1062
- role: "toolResult",
1063
- ...u,
1064
- ...h,
1065
- toolCallId: L(d.toolCallId),
1066
- isError: d.isError === !0,
1067
- publicText: t.text,
1068
- ...t.clip ? { clip: t.clip } : {}
1069
- }
1070
- });
1071
- continue;
1072
- }
1073
- let g = p.filter((e) => e?.type === "thinking").map((e) => L(e.thinking)).filter(Boolean).join("\n\n"), _ = p.filter((e) => e?.type === "toolCall" || e?.type === "tool_use");
1074
- for (let e of _) typeof e.id == "string" && n.add(e.id);
1075
- typeof d.model == "string" && d.stopReason !== "error" && (e.servedModel = d.model);
1076
- let v = d.role === "assistant" ? {
1077
- ...typeof d.model == "string" ? { responseReportedModel: d.model } : {},
1078
- ...typeof d.stopReason == "string" ? { responseStatus: d.stopReason } : {},
1079
- ...typeof d.responseId == "string" ? { responseId: d.responseId } : {}
1080
- } : {}, y = m ? this.clip(m, f) : null, b = g ? this.clip(g, f) : null, x = d.usage;
1081
- this.emit({
1082
- node: e.id,
1083
- at: c,
1084
- kind: "message",
1085
- category: _.length ? V(L(_[0].name), _[0].arguments ?? _[0].input) : d.role === "user" ? "other" : "reasoning",
1086
- label: d.stopReason === "error" ? "failed assistant request" : _.length ? `${L(d.role)} · ${_.map((e) => L(e.name)).join(", ")}` : L(d.role),
1087
- source: l,
1088
- detail: {
1089
- role: L(d.role),
1090
- ...u,
1091
- ...h,
1092
- ...v,
1093
- ...y ? { publicText: y.text } : {},
1094
- ...b ? { reasoning: b.text } : {},
1095
- ...y?.clip ?? b?.clip ? { clip: y?.clip ?? b?.clip } : {},
1096
- ..._.length ? { publicToolCalls: _.map((e) => {
1097
- let t = this.clip(JSON.stringify(e.arguments ?? e.input ?? {}), f);
1098
- return {
1099
- id: L(e.id),
1100
- name: L(e.name),
1101
- input: t.text,
1102
- ...t.clip ? { clip: t.clip } : {}
1103
- };
1104
- }) } : {},
1105
- ...x && d.stopReason !== "error" ? { usage: {
1106
- input: R(x.input),
1107
- output: R(x.output),
1108
- cacheRead: R(x.cacheRead),
1109
- cacheWrite: R(x.cacheWrite)
1110
- } } : {},
1111
- ...R(x?.cost?.total) !== void 0 && x.cost.total > 0 ? {
1112
- costListUsd: x.cost.total,
1113
- usdKnown: !1
1114
- } : {}
1115
- }
1116
- });
1117
- }
1118
- t && this.gaps.push({
1119
- nodeId: e.id,
1120
- code: "untimed-lines",
1121
- detail: `${t} lines of ${this.sourcePath(i.rel)} carry no time`
1122
- });
1123
- }
1124
- let i = [...n].filter((e) => !r.has(e)).length;
1125
- i && this.gaps.push({
1126
- nodeId: e.id,
1127
- code: "tool-results-not-retained",
1128
- detail: `${i} tool calls have no result in the session`
1129
- }), e.capture = {
1130
- channel: "pi",
1131
- status: i ? "lossy" : "complete",
1132
- reason: i ? "tool-results-not-retained" : null
1133
- };
1134
- }
1135
- bridgeStreams() {
1136
- let e = v(this.runDir, "trace/bridge-sessions");
1137
- return s(e) ? G(e).filter((e) => e.endsWith(".jsonl")).map((e) => {
1138
- let t = `trace/bridge-sessions/${e}`, n = this.file(t), r = H(n.bytes), i = r.find((e) => e.value?.table === "sessions");
1139
- return {
1140
- rel: t,
1141
- rows: r,
1142
- sha256: n.sha256,
1143
- sessionId: L(i?.value?.row?.external_id) || null,
1144
- sessionLine: i?.line ?? null
1145
- };
1146
- }) : [];
1147
- }
1148
- readBridgeStream(e, t) {
1149
- if (!this.claim(t.sha256, e.id, t.rel)) return !1;
1150
- this.fileSource(t.rel);
1151
- let n = 0;
1152
- for (let r of t.rows) {
1153
- let i = r.value;
1154
- if (!i || typeof i.table != "string") continue;
1155
- let a = i.row ?? {}, o = P(a.occurred_at) ?? P(a.received_at) ?? P(Number(a.created_at)) ?? P(Number(a.updated_at));
1156
- if (!o) {
1157
- n++;
1158
- continue;
1159
- }
1160
- let s = {
1161
- path: t.rel,
1162
- sha256: t.sha256,
1163
- line: r.line
1164
- }, c = () => this.lineSource(t.rel, r.line, r.raw);
1165
- if (i.table !== "retained_events") {
1166
- this.emitRecord(e, o, s, {
1167
- type: `bridge ${i.table.replaceAll("_", " ")}`,
1168
- ...a
1169
- });
1170
- continue;
1171
- }
1172
- let l;
1173
- try {
1174
- l = JSON.parse(L(a.event_json));
1175
- } catch {
1176
- l = null;
1177
- }
1178
- let u = l?.event ?? {}, d = typeof a.event_id == "string" ? { nativeRecordId: a.event_id } : {};
1179
- if (typeof u.content == "string" && u.content) {
1180
- let t = this.clip(u.content, c);
1181
- this.emit({
1182
- node: e.id,
1183
- at: o,
1184
- kind: "message",
1185
- category: "reasoning",
1186
- label: "assistant",
1187
- source: s,
1188
- detail: {
1189
- role: "assistant",
1190
- ...d,
1191
- publicText: t.text,
1192
- ...t.clip ? { clip: t.clip } : {}
1193
- }
1194
- });
1195
- } else if (Array.isArray(u.tool_calls) && u.tool_calls.length) {
1196
- let t = u.tool_calls.length > 1;
1197
- u.tool_calls.forEach((n, r) => {
1198
- let i = this.clip(typeof n?.arguments == "string" ? n.arguments : JSON.stringify(n?.arguments ?? {}), c);
1199
- this.emit({
1200
- node: e.id,
1201
- at: o,
1202
- kind: "message",
1203
- category: V(L(n?.name), n?.arguments),
1204
- label: `assistant · ${L(n?.name)}`,
1205
- source: t ? {
1206
- ...s,
1207
- item: r
1208
- } : s,
1209
- detail: {
1210
- role: "assistant",
1211
- ...d,
1212
- publicToolCalls: [{
1213
- id: L(n?.id),
1214
- name: L(n?.name),
1215
- input: i.text,
1216
- ...i.clip ? { clip: i.clip } : {}
1217
- }]
1218
- }
1219
- });
1220
- });
1221
- } else {
1222
- let t = Object.keys(u)[0] ?? L(l?.type) ?? "event";
1223
- this.emitRecord(e, o, s, {
1224
- type: `bridge ${t.replaceAll("_", " ")}`,
1225
- ...u
1226
- }, {
1227
- ...d,
1228
- ...u.error ? { isError: !0 } : {}
1229
- });
1230
- }
1231
- }
1232
- return n && this.gaps.push({
1233
- nodeId: e.id,
1234
- code: "untimed-lines",
1235
- detail: `${n} rows of ${this.sourcePath(t.rel)} carry no time`
1236
- }), e.harness ??= "opencode", e.capture = {
1237
- channel: "bridge",
1238
- status: "lossy",
1239
- reason: "bridge-stream-without-prompts-or-results"
1240
- }, !0;
1241
- }
1242
- readCodex(e, t, n) {
1243
- let r = this.file(t);
1244
- if (!this.claim(r.sha256, e.id, t)) return null;
1245
- this.fileSource(t), e.harness ??= "codex";
1246
- let i = {
1247
- unparsable: 0,
1248
- untimed: 0
1249
- };
1250
- for (let a of H(r.bytes, U(n))) {
1251
- let n = a.value;
1252
- if (!n) {
1253
- i.unparsable++;
1254
- continue;
1255
- }
1256
- let o = P(n.timestamp);
1257
- if (!o) {
1258
- i.untimed++;
1259
- continue;
1260
- }
1261
- let s = {
1262
- path: t,
1263
- sha256: r.sha256,
1264
- line: a.line
1265
- }, c = () => this.lineSource(t, a.line, a.raw), l = n.payload ?? {};
1266
- if (n.type === "session_meta" && typeof l.id == "string" && (e.nativeSessionId ??= l.id), n.type === "turn_context" && typeof l.model == "string" && (e.model ??= l.model, e.servedModel = l.model, e.modelSource ??= "codex turn context"), n.type === "response_item" && l.type === "message") {
1267
- let t = L(l.role) || "assistant", n = (Array.isArray(l.content) ? l.content : []).map((e) => e?.type === "input_image" ? "[image]" : L(e?.text)).filter(Boolean).join("\n\n"), r = this.clip(n, c);
1268
- this.emit({
1269
- node: e.id,
1270
- at: o,
1271
- kind: "message",
1272
- category: t === "assistant" ? "reasoning" : "other",
1273
- label: t,
1274
- source: s,
1275
- detail: {
1276
- role: t,
1277
- publicText: r.text,
1278
- ...r.clip ? { clip: r.clip } : {}
1279
- }
1280
- });
1281
- continue;
1282
- }
1283
- if (n.type === "response_item" && l.type === "reasoning") {
1284
- let t = (Array.isArray(l.summary) ? l.summary : []).map((e) => L(e?.text)).filter(Boolean).join("\n\n"), n = t ? this.clip(t, c) : null;
1285
- this.emit({
1286
- node: e.id,
1287
- at: o,
1288
- kind: "message",
1289
- category: "reasoning",
1290
- label: "reasoning",
1291
- source: s,
1292
- detail: {
1293
- role: "assistant",
1294
- ...n ? {
1295
- reasoning: n.text,
1296
- ...n.clip ? { clip: n.clip } : {}
1297
- } : { contentOmitted: "encrypted reasoning" }
1298
- }
1299
- });
1300
- continue;
1301
- }
1302
- let u = n.type === "response_item" && (l.type === "function_call" || l.type === "custom_tool_call" || l.type === "local_shell_call" || l.type === "web_search_call") ? {
1303
- id: L(l.call_id ?? l.id),
1304
- name: l.type === "local_shell_call" ? "shell" : l.type === "web_search_call" ? "web_search" : L(l.name),
1305
- input: l.type === "function_call" ? L(l.arguments) : l.type === "custom_tool_call" ? L(l.input) : JSON.stringify(l.action ?? {})
1306
- } : null;
1307
- if (u) {
1308
- let t = this.clip(u.input, c);
1309
- this.emit({
1310
- node: e.id,
1311
- at: o,
1312
- kind: "message",
1313
- category: V(u.name, u.input),
1314
- label: `assistant · ${u.name}`,
1315
- source: s,
1316
- detail: {
1317
- role: "assistant",
1318
- publicToolCalls: [{
1319
- id: u.id,
1320
- name: u.name,
1321
- input: t.text,
1322
- ...t.clip ? { clip: t.clip } : {}
1323
- }]
1324
- }
1325
- });
1326
- continue;
1327
- }
1328
- if (n.type === "response_item" && (l.type === "function_call_output" || l.type === "custom_tool_call_output")) {
1329
- let t = l.output, n = typeof t == "string" ? t : typeof t?.content == "string" ? t.content : JSON.stringify(t ?? null), r = this.clip(n, c);
1330
- this.emit({
1331
- node: e.id,
1332
- at: o,
1333
- kind: "tool-result",
1334
- category: "other",
1335
- label: "tool result",
1336
- source: s,
1337
- detail: {
1338
- role: "toolResult",
1339
- toolCallId: L(l.call_id),
1340
- isError: t?.success === !1,
1341
- publicText: r.text,
1342
- ...r.clip ? { clip: r.clip } : {}
1343
- }
1344
- });
1345
- continue;
1346
- }
1347
- if (n.type === "event_msg" && l.type === "token_count" && l.info?.last_token_usage) {
1348
- let t = l.info.last_token_usage, n = R(t.cached_input_tokens) ?? 0;
1349
- this.emit({
1350
- node: e.id,
1351
- at: o,
1352
- kind: "usage",
1353
- category: "other",
1354
- label: "token count",
1355
- source: s,
1356
- detail: {
1357
- recordType: "event_msg",
1358
- recordSubtype: "token_count",
1359
- usage: {
1360
- input: Math.max(0, (R(t.input_tokens) ?? 0) - n),
1361
- output: R(t.output_tokens),
1362
- cacheRead: n,
1363
- ...R(t.reasoning_output_tokens) === void 0 ? {} : { reasoning: t.reasoning_output_tokens }
1364
- }
1365
- }
1366
- });
1367
- continue;
1368
- }
1369
- this.emitRecord(e, o, s, {
1370
- ...l,
1371
- type: L(n.type) || "line",
1372
- ...l.type ? { subtype: l.type } : {}
1373
- });
1374
- }
1375
- return i.untimed && this.gaps.push({
1376
- nodeId: e.id,
1377
- code: "untimed-lines",
1378
- detail: `${i.untimed} lines of ${this.sourcePath(t)} carry no time`
1379
- }), i.unparsable && this.gaps.push({
1380
- nodeId: e.id,
1381
- code: "unparsable-lines",
1382
- detail: `${i.unparsable} lines of ${this.sourcePath(t)} are not JSON`
1383
- }), e.capture = {
1384
- channel: "codex",
1385
- status: i.unparsable ? "lossy" : "complete",
1386
- reason: i.unparsable ? "unparsable-lines" : null
1387
- }, i;
1388
- }
1389
- readParts(e) {
1390
- let t = e.outRefs.map((e) => this.blob(e)).filter((e) => Array.isArray(e?.value?.events));
1391
- if (!t.length) return !1;
1392
- let n = 0;
1393
- for (let r of t) {
1394
- let t = this.fileSource(r.rel);
1395
- this.claim(t.sha256, e.id, r.rel) && (n += this.readPartEvents(e, r.rel, t, r.value.events, {
1396
- where: (e) => ({ pointer: K("events", e) }),
1397
- full: (e, t, n) => this.pointerSource(r.rel, K("events", e, ...t), n)
1398
- }));
1399
- }
1400
- return n ? (e.capture = {
1401
- channel: "part",
1402
- status: "lossy",
1403
- reason: "output-parts-final-state"
1404
- }, !0) : !1;
1405
- }
1406
- readPartEvents(e, n, r, i, a) {
1407
- return t(this, e, n, r, i, a, V);
1408
- }
1409
- readRootStream(e) {
1410
- let t = "root-stream.jsonl", n = v(this.runDir, t);
1411
- if (!s(n)) return !1;
1412
- let r = this.file(t), i = H(r.bytes).filter((e) => e.value?.event);
1413
- if (!i.length || !this.claim(r.sha256, e.id, t)) return !1;
1414
- this.fileSource(t);
1415
- let a = (e) => {
1416
- let t = e.value.event;
1417
- return `${t.kind}\0${t.toolCallId ?? ""}\0${E(JSON.stringify(t.text ?? t.args ?? t.result ?? ""))}`;
1418
- }, o = /* @__PURE__ */ new Map();
1419
- for (let e of i) {
1420
- let t = Number(e.value.attempt ?? 1), n = o.get(t) ?? [];
1421
- n.push(e), o.set(t, n);
1422
- }
1423
- let c = [], l = [], u = 0;
1424
- for (let e of [...o.keys()].sort((e, t) => e - t)) {
1425
- let t = o.get(e), n = 0;
1426
- for (; n < t.length && n < l.length && a(t[n]) === a(l[n]);) n++;
1427
- u += n, c.push(...t.slice(n)), l = t;
1428
- }
1429
- let d = null, f = 0, p = /* @__PURE__ */ new Set(), m = /* @__PURE__ */ new Set(), h = () => {
1430
- if (!d) return;
1431
- let n = d.rows[0], i = d.rows.map((e) => L(e.value.event.text)).join(""), a = P(n.value.at), o = d.rows.at(-1);
1432
- if (a && i.trim()) {
1433
- let s = this.clip(i, d.rows.length === 1 ? () => this.lineSource(t, n.line, n.raw) : null);
1434
- this.emit({
1435
- node: e.id,
1436
- at: a,
1437
- kind: "message",
1438
- category: "reasoning",
1439
- label: "assistant",
1440
- source: {
1441
- path: t,
1442
- sha256: r.sha256,
1443
- line: n.line
1444
- },
1445
- detail: {
1446
- role: "assistant",
1447
- ...n.value.seq === void 0 ? {} : { nativeRecordId: String(n.value.seq) },
1448
- ...d.kind === "text_delta" ? { publicText: s.text } : { reasoning: s.text },
1449
- ...s.clip ? { clip: s.clip } : {},
1450
- ...d.rows.length > 1 ? { anchorRange: [n.line, o.line] } : {}
1451
- }
1452
- });
1453
- }
1454
- d = null;
1455
- };
1456
- for (let n of c) {
1457
- let i = n.value.event, a = L(i.kind);
1458
- if (a === "text_delta" || a === "reasoning_delta") {
1459
- d && d.kind !== a && h(), d ??= {
1460
- kind: a,
1461
- rows: []
1462
- }, d.rows.push(n);
1463
- continue;
1464
- }
1465
- h();
1466
- let o = P(n.value.at);
1467
- if (!o) {
1468
- f++;
1469
- continue;
1470
- }
1471
- let s = {
1472
- path: t,
1473
- sha256: r.sha256,
1474
- line: n.line
1475
- }, c = n.value.seq === void 0 ? {} : { nativeRecordId: String(n.value.seq) }, l = () => this.lineSource(t, n.line, n.raw);
1476
- if (a === "tool_call") {
1477
- let t = i.args === void 0 || i.args === null ? null : this.clip(JSON.stringify(i.args), l);
1478
- p.add(L(i.toolCallId)), this.emit({
1479
- node: e.id,
1480
- at: o,
1481
- kind: "message",
1482
- category: V(L(i.toolName), i.args),
1483
- label: `assistant · ${L(i.toolName)}`,
1484
- source: s,
1485
- detail: {
1486
- role: "assistant",
1487
- ...c,
1488
- publicToolCalls: [{
1489
- id: L(i.toolCallId),
1490
- name: L(i.toolName),
1491
- ...t ? { input: t.text } : {},
1492
- ...t?.clip ? { clip: t.clip } : {}
1493
- }]
1494
- }
1495
- });
1496
- } else if (a === "tool_result") {
1497
- let t = i.result, n = typeof t == "string" ? t : t && typeof t == "object" && typeof t.error == "string" && Object.keys(t).length === 1 ? t.error : JSON.stringify(t ?? null), r = this.clip(n, l);
1498
- m.add(L(i.toolCallId)), this.emit({
1499
- node: e.id,
1500
- at: o,
1501
- kind: "tool-result",
1502
- category: V(L(i.toolName), null),
1503
- label: `tool result · ${L(i.toolName)}`,
1504
- source: s,
1505
- detail: {
1506
- role: "toolResult",
1507
- ...c,
1508
- toolCallId: L(i.toolCallId),
1509
- isError: !!(t && typeof t == "object" && ("error" in t || t.isError === !0)),
1510
- publicText: r.text,
1511
- ...r.clip ? { clip: r.clip } : {}
1512
- }
1513
- });
1514
- } else this.emitRecord(e, o, s, {
1515
- ...i,
1516
- type: a || "event"
1517
- }, c);
1518
- }
1519
- h(), f && this.gaps.push({
1520
- nodeId: e.id,
1521
- code: "untimed-lines",
1522
- detail: `${f} rows of ${this.sourcePath(t)} carry no time`
1523
- }), u && this.gaps.push({
1524
- nodeId: e.id,
1525
- code: "root-replay-dropped",
1526
- detail: `${u} rows of a resumed attempt repeat its predecessor and are not events`
1527
- });
1528
- let g = [...p].filter((e) => !m.has(e)).length;
1529
- return e.capture = {
1530
- channel: "root",
1531
- status: g || u ? "lossy" : "complete",
1532
- reason: g ? "tool-results-not-streamed" : u ? "resumed-attempt-replay-dropped" : null
1533
- }, !0;
1534
- }
1535
- readFindings(e, t = "kb/pages", n) {
1536
- let r = n ?? G(v(this.runDir, t)).filter((e) => e.endsWith(".md")).map((e) => `${t}/${e}`), i = this.nodes.get(e);
1537
- for (let t of r.sort()) {
1538
- let n = this.file(t);
1539
- this.fileSource(t);
1540
- let r = /^---\r?\n([\s\S]*?)\r?\n---[ \t]*(?:\r?\n|$)/.exec(n.text), a = (e) => (r ? RegExp(`^${e}:[ \\t]*(.*)$`, "m").exec(r[1])?.[1]?.trim() : void 0) || void 0, o = P(a("createdAt")) ?? P(a("updatedAt")), s = this.manifestFiles.get(this.sourcePath(t))?.mtime, c = o ? null : P(typeof s == "number" && s < 1e11 ? s * 1e3 : s), l = o ?? c;
1541
- if (!l) {
1542
- this.gaps.push({
1543
- nodeId: e,
1544
- code: "finding-untimed",
1545
- detail: `${this.sourcePath(t)} has no createdAt and its snapshot records no mtime`
1546
- });
1547
- continue;
1548
- }
1549
- let u = r ? r.index + r[0].length : 0, d = n.text.slice(u), f = d.trim(), p = n.text.slice(0, u + (d.length - d.trimStart().length)).split("\n").length;
1550
- i || (i = {
1551
- id: e,
1552
- label: "Recorded findings",
1553
- parent: null,
1554
- kind: "finding",
1555
- role: "Findings",
1556
- model: null,
1557
- servedModel: null,
1558
- harness: null,
1559
- sandboxes: [],
1560
- capture: {
1561
- channel: "kb",
1562
- status: "complete",
1563
- reason: null
1564
- },
1565
- outRefs: [],
1566
- transcriptRefs: []
1567
- }, this.nodes.set(e, i));
1568
- let m = this.clip(f, () => this.fileSource(t)), h = a("title")?.replace(/^(['"])(.*)\1$/, "$2");
1569
- this.emit({
1570
- node: e,
1571
- at: l,
1572
- kind: "finding-record",
1573
- category: "verification",
1574
- label: h ?? g(t, ".md"),
1575
- source: {
1576
- path: t,
1577
- sha256: n.sha256
1578
- },
1579
- detail: {
1580
- ...h ? { title: h } : {},
1581
- createdAt: l,
1582
- ...c ? { atBasis: "snapshot-mtime" } : {},
1583
- ...a("kind") ? { pageKind: a("kind") } : {},
1584
- bodyLine: p,
1585
- contentSha256: E(f),
1586
- recordedClaim: m.text,
1587
- ...m.clip ? { clip: m.clip } : {}
1588
- }
1589
- });
1590
- }
1591
- return r.length;
1592
- }
1593
- convert() {
1594
- let e = this.runDir, t;
1595
- try {
1596
- t = m(e);
1597
- } catch {
1598
- throw new C(`Run directory is unreadable: ${e}`);
1599
- }
1600
- if (!t.isDirectory()) throw new C(`Not a directory: ${e}`);
1601
- this.readRunInput(), this.readJournal();
1602
- let n = this.result = this.resultJson(), r = this.nodes.size > 0, i = G(v(e, "kb/pages")).filter((e) => e.endsWith(".md"));
1603
- if (!r) {
1604
- let t = [
1605
- "result.json",
1606
- "root-stream.jsonl",
1607
- "native-trajectory.json",
1608
- "run-input.json"
1609
- ].some((t) => s(v(e, t))) || G(v(e, "trace")).length > 0;
1610
- this.format = s(v(e, "native-trajectory.json")) ? "bridge-native" : s(v(e, "failure.json")) ? "failure-only" : s(v(e, "ledger.jsonl")) ? "search" : !t && i.length ? "finding-only" : "other", this.format !== "finding-only" && (this.nodes.set(this.runId, {
1611
- id: this.runId,
1612
- label: "root",
1613
- parent: null,
1614
- kind: "agent",
1615
- role: "root",
1616
- model: null,
1617
- servedModel: null,
1618
- harness: null,
1619
- sandboxes: [],
1620
- capture: {
1621
- channel: "journal",
1622
- status: "absent",
1623
- reason: "no-spawn-journal"
1624
- },
1625
- outRefs: [],
1626
- transcriptRefs: []
1627
- }), this.rootId = this.runId, (!t || this.format === "search") && this.gaps.push({
1628
- nodeId: null,
1629
- code: "unsupported-format",
1630
- detail: `No spawn journal in ${this.format === "search" ? "a search ledger" : "this layout"}`
1631
- }));
1632
- }
1633
- let a = this.nodes.get(this.rootId);
1634
- a && s(v(e, "native-trajectory.json")) && this.format !== "cloud" && (this.format = "bridge-native"), a && G(v(e, "trace/pi-sessions")).some((e) => e.endsWith(".jsonl")) && (this.format = "pi-local");
1635
- let o = this.runInput;
1636
- if (a && o?.profile) {
1637
- let e = o.profile.model;
1638
- a.model = typeof e == "string" ? e : typeof e?.default == "string" ? e.default : typeof e?.id == "string" ? e.id : a.model, a.modelSource = "run input profile", typeof o.profile.harness == "string" && (a.harness = o.profile.harness);
1639
- }
1640
- let c = o?.task, l = typeof c == "string" ? c : typeof c?.instruction == "string" ? c.instruction : typeof c?.objective == "string" ? c.objective : null;
1641
- a && l && (a.assignment = this.clip(l, null).text);
1642
- for (let e of this.nodes.values()) {
1643
- if (e.profileRef) {
1644
- let t = this.blob(e.profileRef)?.value;
1645
- if (t && typeof t == "object") {
1646
- let n = t.model, r = typeof n == "string" ? n : typeof n?.default == "string" ? n.default : null;
1647
- r && (e.model = r, e.modelSource = "spawn profile"), typeof t.harness == "string" && (e.harness = t.harness);
1648
- }
1649
- }
1650
- if (e.taskDigest && !e.assignment) {
1651
- let t = this.blob(e.taskDigest);
1652
- t && typeof t.value == "string" && (e.assignment = this.clip(t.value, null).text);
1653
- }
1654
- }
1655
- a && n?.rootHarnessTranscript?.status === "available" && typeof n.rootHarnessTranscript.transcriptRef == "string" ? a.transcriptRefs.includes(n.rootHarnessTranscript.transcriptRef) || a.transcriptRefs.push(n.rootHarnessTranscript.transcriptRef) : a && typeof n?.rootHarnessTranscript?.reason == "string" && (a.transcriptReason ??= n.rootHarnessTranscript.reason);
1656
- let u = this.piSessions(), d = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map();
1657
- for (let e of this.nodes.values()) e.taskDigest && f.set(e.taskDigest, e.id);
1658
- let p = /* @__PURE__ */ new Map();
1659
- for (let [e, t] of this.executionOf) p.set(E(`cli-bridge/pi-session\0${e}`), {
1660
- ...t,
1661
- sessionId: e
1662
- });
1663
- let h = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map(), _ = [];
1664
- for (let e of u) {
1665
- let t = /^trace\/pi-sessions\/cli-bridge\/([0-9a-f]{64})\//.exec(e.rel)?.[1], n = t ? p.get(t) : void 0, r = n?.node ?? (e.digest ? f.get(e.digest) : void 0);
1666
- if (r) {
1667
- let t = d.get(r) ?? [];
1668
- t.push(e), d.set(r, t), n ? (h.set(r, "bridge-session-directory"), g.set(r, {
1669
- journal: {
1670
- path: this.sourcePath("spawn-journal.jsonl"),
1671
- line: n.line
1672
- },
1673
- session: { path: this.sourcePath(e.rel) },
1674
- sessionId: n.sessionId
1675
- })) : h.has(r) || h.set(r, "task-digest");
1676
- } else _.push(e);
1677
- }
1678
- let y = /* @__PURE__ */ new Map();
1679
- for (let e of this.bridgeStreams()) {
1680
- let t = e.sessionId ? this.executionOf.get(e.sessionId) : void 0;
1681
- t && !y.has(t.node) ? y.set(t.node, e) : (this.fileSource(e.rel), this.gaps.push({
1682
- nodeId: null,
1683
- code: "bridge-stream-unjoined",
1684
- detail: `${this.sourcePath(e.rel)} names no materialized session of this run`
1685
- }));
1686
- }
1687
- for (let t of [...this.nodes.values()]) {
1688
- if (!(t.status !== void 0 || t.id === this.rootId && n) && this.readLiveStream(t)) continue;
1689
- let r = this.nativeFiles(t);
1690
- if (Array.isArray(r)) {
1691
- this.readNative(t, r);
1692
- continue;
1693
- }
1694
- let i = this.nativeStore(t);
1695
- if (i && this.readOpenCodeStore(t, i) || (r === "not-cached" && this.gaps.push({
1696
- nodeId: t.id,
1697
- code: "archived-not-ingested",
1698
- detail: "A native transcript archive exists but is not in the native cache"
1699
- }), t.id === this.rootId && s(v(e, "native-trajectory.json")) && this.readOpenCode(t))) continue;
1700
- let a = d.get(t.id);
1701
- if (a?.length) {
1702
- t.joinBasis = h.get(t.id) ?? "task-digest", g.has(t.id) && (t.joinProof = g.get(t.id)), this.readPi(t, a);
1703
- continue;
1704
- }
1705
- let o = y.get(t.id);
1706
- if (o && this.readBridgeStream(t, o)) {
1707
- t.joinBasis = "bridge-session-id", t.joinProof = {
1708
- journal: {
1709
- path: this.sourcePath("spawn-journal.jsonl"),
1710
- line: this.executionOf.get(o.sessionId).line
1711
- },
1712
- stream: {
1713
- path: this.sourcePath(o.rel),
1714
- line: o.sessionLine
1715
- },
1716
- sessionId: o.sessionId
1717
- };
1718
- continue;
1719
- }
1720
- if (this.readParts(t) || t.id === this.rootId && this.readRootStream(t)) continue;
1721
- let c = r === "not-cached" ? "native-archive-not-cached" : t.transcriptReason ?? (t.outRefs.length ? "no-conversation-in-output" : "no-conversation-channel");
1722
- t.capture = {
1723
- channel: "journal",
1724
- status: "absent",
1725
- reason: c
1726
- }, this.gaps.push({
1727
- nodeId: t.id,
1728
- code: `no-transcript:${c}`,
1729
- detail: "Only lifecycle events are recorded for this agent"
1730
- });
1731
- }
1732
- this.readCoordination();
1733
- for (let e of [
1734
- "root-stream.jsonl",
1735
- "native-trajectory.json",
1736
- "observer.jsonl",
1737
- "driver-attempts.jsonl",
1738
- "spans.otlp.jsonl"
1739
- ]) this.listSource(e);
1740
- for (let e of _) {
1741
- let t = `pi:${e.sessionId}`;
1742
- this.nodes.set(t, {
1743
- id: t,
1744
- label: `pi ${e.sessionId.slice(0, 8)}`,
1745
- parent: null,
1746
- kind: "session",
1747
- role: "Session",
1748
- model: null,
1749
- servedModel: null,
1750
- harness: "pi",
1751
- sandboxes: [],
1752
- capture: {
1753
- channel: "pi",
1754
- status: "complete",
1755
- reason: null
1756
- },
1757
- outRefs: [],
1758
- transcriptRefs: [],
1759
- joinBasis: "unresolved"
1760
- }), this.readPi(this.nodes.get(t), [e]), this.nodes.get(t).nativeSessionId = e.sessionId, this.gaps.push({
1761
- nodeId: t,
1762
- code: "pi-session-unjoined",
1763
- detail: "No spawned task digest matches this session"
1764
- });
1765
- }
1766
- i.length && this.readFindings(`finding:${this.runId}`);
1767
- }
1768
- readCoordination() {
1769
- let e = "coordination-log.jsonl";
1770
- if (!s(v(this.runDir, e))) return;
1771
- let t = this.file(e);
1772
- this.fileSource(e);
1773
- let n = /* @__PURE__ */ new Set();
1774
- for (let r of H(t.bytes)) {
1775
- let i = r.value?.event?.type === "instruction" ? r.value.event.instruction : null, a = typeof i?.instruction == "string" ? i.instruction : "", o = typeof i?.toWorker == "string" ? i.toWorker : null, s = P(r.value?.at);
1776
- if (!i || !s) continue;
1777
- let c = o ? this.nodes.get(o)?.parent ?? (this.nodes.has(o) ? this.rootId : null) : null;
1778
- if (!c || !this.nodes.has(c)) {
1779
- this.gaps.push({
1780
- nodeId: null,
1781
- code: "coordination-target-unknown",
1782
- detail: `${this.sourcePath(e)} line ${r.line} names no spawned worker (${o ?? "no toWorker"})`
1783
- });
1784
- continue;
1785
- }
1786
- let l = L(i.kind) || "instruction", u = a ? this.clip(a, () => this.lineSource(e, r.line, r.raw)) : {
1787
- text: "",
1788
- clip: void 0
1789
- };
1790
- if (this.emit({
1791
- node: c,
1792
- at: s,
1793
- kind: "message",
1794
- category: "coordination",
1795
- label: `${l} → ${this.nodes.get(o).label}`,
1796
- source: {
1797
- path: e,
1798
- sha256: t.sha256,
1799
- line: r.line
1800
- },
1801
- detail: {
1802
- role: "assistant",
1803
- ...u.text ? { publicText: u.text } : {},
1804
- ...u.clip ? { clip: u.clip } : {},
1805
- coordination: {
1806
- kind: l,
1807
- toNode: o,
1808
- receiptId: L(i.receiptId) || null,
1809
- interrupt: i.interrupt === !0
1810
- }
1811
- }
1812
- }), o && u.text && l !== "interrupt") {
1813
- let n = this.events.find((e) => e.node === o && e.detail.role === "user" && e.detail.publicText === u.text && Math.abs(Date.parse(e.at) - Date.parse(s)) < 6e4);
1814
- n ? (n.detail.promptKind = "steering", n.detail.promptSender = "Parent agent") : this.emit({
1815
- node: o,
1816
- at: s,
1817
- kind: "message",
1818
- category: "other",
1819
- label: "Steering",
1820
- source: {
1821
- path: e,
1822
- sha256: t.sha256,
1823
- line: r.line,
1824
- item: 1
1825
- },
1826
- detail: {
1827
- role: "user",
1828
- publicText: u.text,
1829
- ...u.clip ? { clip: u.clip } : {},
1830
- promptKind: "steering",
1831
- promptSender: "Parent agent",
1832
- coordination: {
1833
- kind: l,
1834
- fromNode: c,
1835
- receiptId: L(i.receiptId) || null
1836
- }
1837
- }
1838
- });
1839
- }
1840
- n.add(c);
1841
- }
1842
- for (let e of n) {
1843
- let t = this.nodes.get(e);
1844
- if (t.capture.status !== "absent") continue;
1845
- t.capture = {
1846
- channel: "coordination",
1847
- status: "lossy",
1848
- reason: "instructions-to-workers-only"
1849
- };
1850
- let n = this.gaps.findIndex((t) => t.nodeId === e && t.code.startsWith("no-transcript:")), r = {
1851
- nodeId: e,
1852
- code: "conversation-not-retained",
1853
- detail: "Only the instructions this agent sent to its workers were retained (coordination log)"
1854
- };
1855
- n >= 0 ? this.gaps[n] = r : this.gaps.push(r);
1856
- }
1857
- }
1858
- result = null;
1859
- assemble(e = {}) {
1860
- let t = this.nodes.get(this.rootId), n = this.result, i = this.runInput?.task, a = /* @__PURE__ */ new Map();
1861
- for (let e of this.events) for (let t of e.detail.publicToolCalls ?? []) a.set(`${e.node}\0${t.id}`, e);
1862
- for (let e of this.events) {
1863
- let t = e.detail.toolCallId;
1864
- if (typeof t != "string") continue;
1865
- let n = a.get(`${e.node}\0${t}`);
1866
- if (n && (e.category === "other" && (e.category = n.category), e.detail.durationMs === void 0)) {
1867
- let t = Date.parse(e.at) - Date.parse(n.at);
1868
- t >= 0 && e.detail.atBasis !== "carried" && (e.detail.durationMs = t);
1869
- }
1870
- }
1871
- let o = new Map([...this.nodes.keys()].map((e, t) => [e, t])), s = /* @__PURE__ */ new Map();
1872
- for (let e of this.events) {
1873
- let t = s.get(e.node);
1874
- t ? (e.at < t[0] && (t[0] = e.at), e.at > t[1] && (t[1] = e.at)) : s.set(e.node, [e.at, e.at]);
1875
- }
1876
- for (let e of this.nodes.values()) {
1877
- let t = s.get(e.id);
1878
- !e.start && t && (e.start = t[0]), !e.end && t && e.kind === "session" && (e.end = t[1]);
1879
- }
1880
- t && n && !t.status && typeof n.kind == "string" && (t.status = n.kind, t.end ??= s.get(t.id)?.[1]), this.events.sort((e, t) => e.at < t.at ? -1 : e.at > t.at ? 1 : o.get(e.node) - o.get(t.node) || e.order - t.order);
1881
- let c = /* @__PURE__ */ new Set();
1882
- for (let e of this.events) {
1883
- if (c.has(e.id)) throw new T(`duplicate anchor ${e.id} (${e.source.path}${e.source.line ? `:${e.source.line}` : e.source.pointer ?? ""})`);
1884
- c.add(e.id);
1885
- }
1886
- let l = /* @__PURE__ */ new Map();
1887
- for (let e of this.sources.values()) {
1888
- if (!e.sha256 || e.line !== void 0 || e.pointer !== void 0) continue;
1889
- let t = e.sha256.slice(0, 12), n = l.get(t);
1890
- if (n && n !== e.sha256) throw new T(`object prefix ${t} names two objects`);
1891
- l.set(t, e.sha256);
1892
- }
1893
- let u = [...this.nodes.values()].map((e) => ({
1894
- nodeId: e.id,
1895
- ...e.capture
1896
- })), d = {
1897
- complete: 0,
1898
- lossy: 0,
1899
- absent: 0
1900
- };
1901
- for (let e of u) d[e.status]++;
1902
- let f = u.filter((e) => this.nodes.get(e.nodeId)?.kind !== "finding"), p = new Set(this.events.filter((e) => e.kind === "message" && e.detail.role === "assistant" && e.detail.responseStatus !== "error").map((e) => e.node)), m = this.events.some((e) => R(e.detail.costListUsd) !== void 0), h = i?.knowledge, g = i?.completion;
1903
- return {
1904
- record: {
1905
- schema: "agent-record.v1",
1906
- runId: this.runId,
1907
- title: e.title ?? this.runId,
1908
- producer: {
1909
- name: "@drewstone/agent-record/adapters/agent-runtime",
1910
- version: b
1911
- },
1912
- idScheme: r,
1913
- input: {
1914
- ...this.options.manifestSha256 ? { snapshot: `sha256:${this.options.manifestSha256}` } : {},
1915
- runIdBasis: this.runIdBasis,
1916
- ...e.input
1917
- },
1918
- format: e.format ?? this.format,
1919
- nodes: [...this.nodes.values()].map((e) => ({
1920
- id: e.id,
1921
- label: e.label,
1922
- parent: e.parent,
1923
- kind: e.kind,
1924
- role: e.role,
1925
- ...e.assignment ? { assignment: e.assignment } : {},
1926
- model: e.model,
1927
- ...e.modelSource ? { modelSource: e.modelSource } : {},
1928
- servedModel: p.has(e.id) ? e.servedModel : null,
1929
- harness: e.harness,
1930
- ...e.start ? { start: e.start } : {},
1931
- ...e.end ? { end: e.end } : {},
1932
- ...e.status ? { status: e.status } : {},
1933
- ...e.nativeSessionId ? { nativeSessionId: e.nativeSessionId } : {},
1934
- ...e.agentId ? { agentId: e.agentId } : {},
1935
- ...e.joinBasis ? { joinBasis: e.joinBasis } : {},
1936
- ...e.joinProof ? { joinProof: e.joinProof } : {},
1937
- sandboxes: e.sandboxes,
1938
- capture: e.capture
1939
- })),
1940
- events: this.events.map(({ order: e, ...t }) => t),
1941
- sources: [...this.sources.values()].map(({ sha256: e, ...t }) => e ? {
1942
- ...t,
1943
- sha256: e
1944
- } : t).sort((e, t) => e.path < t.path ? -1 : e.path > t.path ? 1 : (e.line ?? 0) - (t.line ?? 0) || (e.pointer ?? "").localeCompare(t.pointer ?? "")),
1945
- assignment: e.assignment ?? {
1946
- objective: L(i?.objective),
1947
- instruction: L(i?.instruction ?? (typeof i == "string" ? i : "")),
1948
- knowledge: typeof h == "string" ? h : h ? JSON.stringify(h, null, 2) : "",
1949
- completion: typeof g == "string" ? g : g ? JSON.stringify(g, null, 2) : "",
1950
- suppliedKnowledge: typeof h == "string" ? h : h ? JSON.stringify(h, null, 2) : "",
1951
- deliverables: typeof g == "string" ? g : g ? JSON.stringify(g, null, 2) : "",
1952
- constraints: "",
1953
- source: this.runInputRel ? {
1954
- path: this.sourcePath(this.runInputRel),
1955
- sha256: this.file(this.runInputRel, this.runInputRel.startsWith("../") ? v(_(this.runDir), this.runInputRel.slice(3)) : void 0).sha256,
1956
- pointer: "/task"
1957
- } : null
1958
- },
1959
- terminal: e.terminal === void 0 ? n ? {
1960
- kind: typeof n.kind == "string" ? n.kind : null,
1961
- reason: typeof n.reason == "string" ? n.reason : null,
1962
- ...typeof n.error?.message == "string" ? { error: this.clip(n.error.message, null).text } : {}
1963
- } : null : e.terminal,
1964
- coverage: {
1965
- completeOriginalCapture: f.length > 0 && f.every((e) => e.status === "complete"),
1966
- publicContent: "",
1967
- categoryMethod: "Activity types are keyword matches on tool names and commands. They do not measure research value or show independent verification.",
1968
- cost: m ? "List price from recorded usage; not billed." : "Not recorded",
1969
- nodes: u,
1970
- gaps: this.gaps.map((e) => ({
1971
- runId: this.runId,
1972
- ...e
1973
- }))
1974
- }
1975
- },
1976
- counts: d
1977
- };
1978
- }
1979
- build() {
1980
- return this.convert(), this.assemble();
1981
- }
1982
- };
1983
- function Y(e, t, n = "") {
1984
- let r = new Map(t.files.filter((e) => e.path.startsWith(n)).map((e) => [e.path.slice(n.length), e])), o = new Set((t.links ?? []).filter((e) => e.path.startsWith(n)).map((e) => e.path.slice(n.length))), c = G(e).filter((e) => !o.has(e)), u = [];
1985
- for (let e of c) r.has(e) || u.push(`${n}${e} is not in the snapshot`);
1986
- for (let [t, o] of r) {
1987
- let r = v(e, t);
1988
- if (!s(r)) {
1989
- u.push(`${n}${t} is missing`);
1990
- continue;
1991
- }
1992
- let c = i("sha256"), f = 0, p = l(r, "r");
1993
- try {
1994
- let e = Buffer.allocUnsafe(1 << 20);
1995
- for (let t = d(p, e); t > 0; t = d(p, e)) c.update(e.subarray(0, t)), f += t;
1996
- } finally {
1997
- a(p);
1998
- }
1999
- (c.digest("hex") !== D(o.sha256) || f !== o.bytes) && u.push(`${n}${t} does not match its sha256 or length`);
2000
- }
2001
- if (u.length) throw new T(`${u.length} files differ from the snapshot: ${u.slice(0, 5).join("; ")}`);
2002
- }
2003
- function X(t, n) {
2004
- let r = e.safeParse(t);
2005
- if (!r.success) throw Error(`Produced record is invalid: ${r.error.message.slice(0, 2e3)}`);
2006
- let i = JSON.stringify(t), a = Buffer.byteLength(i);
2007
- if (a > 134217728) throw new w(`record-too-large: ${a} bytes`);
2008
- return {
2009
- record: t,
2010
- json: i,
2011
- summary: {
2012
- runId: t.runId,
2013
- recordDigest: E(i),
2014
- bytes: a,
2015
- nodes: t.nodes.length,
2016
- events: t.events.length,
2017
- coverage: n
2018
- }
2019
- };
2020
- }
2021
- function Z(e, t = {}) {
2022
- t.manifest && Y(e, t.manifest);
2023
- let { record: n, counts: r } = new J(e, t.native, Math.max(1024, t.maxText ?? 16384), {
2024
- runId: t.runId,
2025
- manifest: t.manifest,
2026
- manifestSha256: t.manifestSha256,
2027
- files: t.files
2028
- }).build();
2029
- return X(n, r);
2030
- }
2031
- var Q = "agent-record.bundle.v1", $ = (e, t) => ({
2032
- id: e,
2033
- label: e,
2034
- parent: null,
2035
- kind: "session",
2036
- role: "Session",
2037
- model: null,
2038
- servedModel: null,
2039
- harness: null,
2040
- sandboxes: [],
2041
- capture: {
2042
- channel: "none",
2043
- status: "absent",
2044
- reason: "no-conversation-channel"
2045
- },
2046
- outRefs: [],
2047
- transcriptRefs: [],
2048
- ...t
2049
- });
2050
- function te(e) {
2051
- if (e?.schema !== "agent-record.bundle.v1") throw new C(`bundle.json is not ${Q}`);
2052
- if (typeof e.recordId != "string" || !e.recordId) throw new C("bundle.json names no recordId");
2053
- if (!Array.isArray(e.sessions)) throw new C("bundle.json lists no sessions");
2054
- let t = (e) => typeof e == "string" && e !== "" && !e.startsWith("/") && !e.split("/").includes("..");
2055
- for (let n of [
2056
- ...e.sessions,
2057
- ...e.journals ?? [],
2058
- ...e.runs ?? [],
2059
- ...e.findings ?? []
2060
- ]) if (!t(n?.path)) throw new C(`bundle.json path ${JSON.stringify(n?.path)} leaves the bundle`);
2061
- return e;
2062
- }
2063
- function ne(e, t = {}) {
2064
- t.manifest && Y(e, t.manifest);
2065
- let n = u(v(e, "bundle.json"), "utf8"), r = te(JSON.parse(n)), i = Math.max(1024, t.maxText ?? 16384), a = new J(e, t.native, i, {
2066
- runId: r.recordId,
2067
- manifest: t.manifest,
2068
- manifestSha256: t.manifestSha256
2069
- });
2070
- a.fileSource("bundle.json");
2071
- for (let n of r.runs ?? []) {
2072
- let r = new J(v(e, n.path), t.native, i, {
2073
- runId: n.runId ?? g(n.path),
2074
- manifest: t.manifest,
2075
- prefix: `${n.path.replace(/\/+$/, "")}/`
2076
- });
2077
- r.convert();
2078
- for (let [e, t] of r.nodes) {
2079
- if (a.nodes.has(e)) throw new T(`node ${e} appears twice in the bundle`);
2080
- a.nodes.set(e, t);
2081
- }
2082
- for (let e of r.events) a.events.push({
2083
- ...e,
2084
- order: a.order++
2085
- });
2086
- for (let [e, t] of r.sources) a.sources.has(e) || a.sources.set(e, t);
2087
- for (let e of r.gaps) a.gaps.push(e);
2088
- for (let [e, t] of r.claimed) a.claimed.set(e, t);
2089
- }
2090
- let o = [], c = /* @__PURE__ */ new Map();
2091
- for (let e of r.journals ?? []) {
2092
- let t = a.file(e.path);
2093
- a.fileSource(e.path);
2094
- let n = g(_(e.path)), r;
2095
- if (e.workflow) {
2096
- a.fileSource(e.workflow);
2097
- try {
2098
- r = P(JSON.parse(a.file(e.workflow).text)?.timestamp) ?? void 0;
2099
- } catch {}
2100
- }
2101
- a.nodes.has(n) || a.nodes.set(n, $(n, {
2102
- label: e.label ?? n,
2103
- kind: "agent",
2104
- role: "workflow",
2105
- harness: "claude-code-workflow",
2106
- start: r,
2107
- capture: {
2108
- channel: "journal",
2109
- status: "complete",
2110
- reason: null
2111
- }
2112
- }));
2113
- for (let r of H(t.bytes)) {
2114
- let i = L(r.value?.agentId);
2115
- if (!i) continue;
2116
- let s = `${n}:${i}`;
2117
- a.nodes.has(s) || (a.nodes.set(s, $(s, {
2118
- label: `agent ${i.slice(0, 8)}`,
2119
- parent: n,
2120
- kind: "agent",
2121
- role: "workflow agent",
2122
- agentId: void 0
2123
- })), c.set(i, {
2124
- node: s,
2125
- rel: e.path,
2126
- line: r.line
2127
- })), o.push({
2128
- node: s,
2129
- rel: e.path,
2130
- sha256: t.sha256,
2131
- row: r,
2132
- type: L(r.value?.type) || "row",
2133
- agentId: i
2134
- });
2135
- }
2136
- }
2137
- let l = /* @__PURE__ */ new Map(), d = [];
2138
- for (let t of r.sessions) {
2139
- let n;
2140
- if (t.harness === "claude-code") {
2141
- let r = H(a.file(t.path).bytes), i = r.find((e) => typeof e.value?.agentId == "string"), o = t.agentId ?? (i ? L(i.value.agentId) : ""), l = t.sessionId ?? L(r.find((e) => typeof e.value?.sessionId == "string")?.value?.sessionId), u = t.path.replace(/\.jsonl$/, ".meta.json"), d = o ? c.get(o) : void 0;
2142
- if (d && i && g(t.path) === `agent-${o}.jsonl` && s(v(e, u))) n = a.nodes.get(d.node), n.joinBasis = "workflow-agent-id", n.joinProof = {
2143
- journal: {
2144
- path: d.rel,
2145
- line: d.line
2146
- },
2147
- session: {
2148
- path: t.path,
2149
- line: i.line
2150
- },
2151
- meta: { path: u }
2152
- }, n.nativeSessionId = l || void 0, a.fileSource(u);
2153
- else {
2154
- let e = `claude-code:${o || l || g(t.path, ".jsonl")}`;
2155
- n = a.nodes.get(e) ?? $(e, {
2156
- label: t.label ?? `claude code ${(o || l).slice(0, 8)}`,
2157
- nativeSessionId: l || void 0
2158
- }), a.nodes.set(e, n);
2159
- }
2160
- n.harness ??= "claude-code", t.label && (n.label = t.label);
2161
- let f = a.readClaudeSession(n, t.path, void 0, t.lines);
2162
- f && (n.capture = {
2163
- channel: "native",
2164
- status: f.unparsable ? "lossy" : "complete",
2165
- reason: f.unparsable ? "unparsable-lines" : t.lines ? "line-window" : null
2166
- });
2167
- } else if (t.harness === "codex") {
2168
- let e = `codex:${t.sessionId ?? g(t.path, ".jsonl")}`;
2169
- n = a.nodes.get(e) ?? $(e, { label: t.label ?? `codex ${(t.sessionId ?? g(t.path)).slice(-12)}` }), a.nodes.set(e, n), a.readCodex(n, t.path, t.lines) && t.lines && (n.capture = {
2170
- ...n.capture,
2171
- reason: n.capture.reason ?? "line-window"
2172
- });
2173
- } else if (t.harness === "opencode") {
2174
- let e = `opencode:${t.sessionId ?? g(_(t.path))}`;
2175
- n = a.nodes.get(e) ?? $(e, { label: t.label ?? e }), a.nodes.set(e, n), a.readOpenCode(n, t.path);
2176
- } else if (t.harness === "opencode-bridge") {
2177
- let e = a.file(t.path), r = H(e.bytes), i = r.find((e) => e.value?.table === "sessions"), o = `bridge:${t.sessionId ?? (L(i?.value?.row?.external_id) || g(t.path, ".jsonl"))}`;
2178
- n = a.nodes.get(o) ?? $(o, { label: t.label ?? o }), a.nodes.set(o, n), a.readBridgeStream(n, {
2179
- rel: t.path,
2180
- rows: r,
2181
- sha256: e.sha256
2182
- });
2183
- } else if (t.harness === "pi") {
2184
- let e = a.file(t.path), r = H(e.bytes), i = r.find((e) => e.value?.type === "session")?.value, o = t.sessionId ?? (L(i?.id) || g(t.path, ".jsonl")), s = `pi:${o}`;
2185
- n = a.nodes.get(s) ?? $(s, { label: t.label ?? `pi ${o.slice(0, 8)}` }), a.nodes.set(s, n), a.readPi(n, [{
2186
- rel: t.path,
2187
- sessionId: o,
2188
- rows: r,
2189
- sha256: e.sha256
2190
- }]);
2191
- } else throw new C(`bundle.json session ${t.path} has an unknown harness`);
2192
- l.set(t.path, n.id), d.push({
2193
- session: t,
2194
- node: n
2195
- });
2196
- }
2197
- let f = (e) => /(?:^|\/)([0-9a-f-]{36})\/subagents\//.exec(e)?.[1], p = (e, t) => {
2198
- let n = f(e);
2199
- return n !== void 0 && g(t, ".jsonl") === n;
2200
- };
2201
- for (let { session: e, node: t } of d) {
2202
- if (!e.parentPath) continue;
2203
- let n = l.get(e.parentPath);
2204
- if (!n || !p(e.path, e.parentPath)) {
2205
- a.gaps.push({
2206
- nodeId: t.id,
2207
- code: "parent-unproven",
2208
- detail: `${e.path} does not sit under ${e.parentPath}`
2209
- });
2210
- continue;
2211
- }
2212
- let r = t.parent && a.nodes.get(t.parent)?.role === "workflow" ? a.nodes.get(t.parent) : t;
2213
- r.parent && r.parent !== n || (r.parent = n, r.joinBasis ??= "session-directory");
2214
- }
2215
- for (let e of r.journals ?? []) {
2216
- if (!e.parentPath) continue;
2217
- let t = l.get(e.parentPath), n = a.nodes.get(g(_(e.path)));
2218
- t && n && p(e.path, e.parentPath) ? n.parent = t : n && a.gaps.push({
2219
- nodeId: n.id,
2220
- code: "parent-unproven",
2221
- detail: `${e.path} does not sit under ${e.parentPath}`
2222
- });
2223
- }
2224
- let m = /* @__PURE__ */ new Map();
2225
- for (let e of a.events) {
2226
- let t = m.get(e.node);
2227
- t ? (e.at < t[0] && (t[0] = e.at), e.at > t[1] && (t[1] = e.at)) : m.set(e.node, [e.at, e.at]);
2228
- }
2229
- for (let e of o) {
2230
- let t = m.get(e.node);
2231
- if (!t) {
2232
- a.gaps.push({
2233
- nodeId: e.node,
2234
- code: "journal-untimed-lines",
2235
- detail: `${e.rel}:${e.row.line} has no time and no joined session`
2236
- });
2237
- continue;
2238
- }
2239
- let n = a.nodes.get(e.node);
2240
- e.type === "result" && (n.status ??= "settled");
2241
- let { type: r, agentId: i, ...o } = e.row.value;
2242
- a.emit({
2243
- node: e.node,
2244
- at: e.type === "started" ? t[0] : t[1],
2245
- kind: e.type,
2246
- category: "lifecycle",
2247
- label: e.type,
2248
- source: {
2249
- path: e.rel,
2250
- sha256: e.sha256,
2251
- line: e.row.line
2252
- },
2253
- detail: {
2254
- lifecycle: e.type,
2255
- atBasis: e.type === "started" ? "session-first-event" : "session-last-event",
2256
- data: a.compactValue(o)
2257
- }
2258
- });
2259
- }
2260
- for (let e of a.nodes.values()) e.role === "workflow agent" && e.capture.status === "absent" && (e.capture = {
2261
- channel: "journal",
2262
- status: "absent",
2263
- reason: "no-session-joined"
2264
- }, a.gaps.push({
2265
- nodeId: e.id,
2266
- code: "no-transcript:no-session-joined",
2267
- detail: "No session file carries this workflow agent id"
2268
- }));
2269
- for (let t of r.findings ?? []) {
2270
- let n = t.path.endsWith(".md") ? [t.path] : G(v(e, t.path)).filter((e) => e.endsWith(".md")).map((e) => `${t.path.replace(/\/+$/, "")}/${e}`);
2271
- a.readFindings(`finding:${r.recordId}`, void 0, n);
2272
- }
2273
- a.rootId = "";
2274
- let { record: h, counts: y } = a.assemble({
2275
- title: r.title ?? r.recordId,
2276
- format: "bundle",
2277
- terminal: null,
2278
- assignment: {
2279
- objective: "",
2280
- instruction: "",
2281
- knowledge: "",
2282
- completion: "",
2283
- suppliedKnowledge: "",
2284
- deliverables: "",
2285
- constraints: "",
2286
- source: null
2287
- },
2288
- input: { bundle: `sha256:${E(n)}` }
2289
- });
2290
- return X(h, y);
2291
- }
2292
- //#endregion
2293
- export { b as ADAPTER_VERSION, Q as BUNDLE_SCHEMA, r as ID_SCHEME, J as Ingest, x as MAX_RECORD_BYTES, w as RecordTooLargeError, C as RunUnreadableError, T as SnapshotMismatchError, V as categoryOf, S as createFileCache, X as finishRecord, ne as ingestBundle, Z as ingestRun, Y as verifySnapshot };