diffing 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (241) hide show
  1. package/README.md +41 -13
  2. package/dist/{cli-agent-D71pq2ep.mjs → cli-agent-CLrK54k2.mjs} +2 -2
  3. package/dist/{cli-gh-D5OCnjNe.mjs → cli-gh-8YC1NzyM.mjs} +6 -1
  4. package/dist/cli.mjs +3 -3
  5. package/dist/client/assets/{angular-html-fJEV04aV.js → angular-html-DdAR2u-k.js} +1 -1
  6. package/dist/client/assets/{angular-ts-xftEy_9y.js → angular-ts-Dz_vWKSu.js} +1 -1
  7. package/dist/client/assets/{apl-DUFfGxuB.js → apl-BJ5QXrIk.js} +1 -1
  8. package/dist/client/assets/{arc-RVQiB1sa.js → arc-D9erSW6x.js} +1 -1
  9. package/dist/client/assets/{architectureDiagram-3BPJPVTR-DgH6newi.js → architectureDiagram-3BPJPVTR-CCQWZLXR.js} +1 -1
  10. package/dist/client/assets/{astro-B7BLqQNi.js → astro-BQAej5a5.js} +1 -1
  11. package/dist/client/assets/{blade-CBEg4pSd.js → blade-DkAmuwDx.js} +1 -1
  12. package/dist/client/assets/{blockDiagram-GPEHLZMM-La5y3Fsh.js → blockDiagram-GPEHLZMM-vwjxNybI.js} +1 -1
  13. package/dist/client/assets/{c-WpzQapSy.js → c-DG5p-ChJ.js} +1 -1
  14. package/dist/client/assets/{c4Diagram-AAUBKEIU-Ut0ZmiTu.js → c4Diagram-AAUBKEIU-DJ_hVlh4.js} +1 -1
  15. package/dist/client/assets/channel-DmZgR6r0.js +1 -0
  16. package/dist/client/assets/{chunk-2J33WTMH-MeV3nUej.js → chunk-2J33WTMH-CiLowxCo.js} +1 -1
  17. package/dist/client/assets/{chunk-3OPIFGDE-xRyDWGrg.js → chunk-3OPIFGDE-H3jjMR5Y.js} +1 -1
  18. package/dist/client/assets/{chunk-4BX2VUAB-BFVyXq5X.js → chunk-4BX2VUAB-Dk0dk4n5.js} +1 -1
  19. package/dist/client/assets/{chunk-55IACEB6-_oXB-8Yw.js → chunk-55IACEB6-nbLiUMJS.js} +1 -1
  20. package/dist/client/assets/{chunk-5ZQYHXKU-CYUXotxX.js → chunk-5ZQYHXKU-DZ8RgHg8.js} +1 -1
  21. package/dist/client/assets/{chunk-727SXJPM-hUUwZVvB.js → chunk-727SXJPM-DDe5dqJV.js} +1 -1
  22. package/dist/client/assets/{chunk-AQP2D5EJ-DK43jOQq.js → chunk-AQP2D5EJ-DmpNclOr.js} +1 -1
  23. package/dist/client/assets/{chunk-BSJP7CBP-CMo_92Fk.js → chunk-BSJP7CBP-BKQKvtIj.js} +1 -1
  24. package/dist/client/assets/{chunk-CSCIHK7Q-B_3Ak8tT.js → chunk-CSCIHK7Q-D27t4cyv.js} +1 -1
  25. package/dist/client/assets/{chunk-FMBD7UC4-CB3nCgdr.js → chunk-FMBD7UC4-Bu3LA663.js} +1 -1
  26. package/dist/client/assets/{chunk-KSCS5N6A-eSZPuByD.js → chunk-KSCS5N6A-Ed5HNXRW.js} +1 -1
  27. package/dist/client/assets/{chunk-L5ZTLDWV-BMQsVhiH.js → chunk-L5ZTLDWV-DLjJZgf8.js} +1 -1
  28. package/dist/client/assets/{chunk-LZXEDZCA-L3ad86Se.js → chunk-LZXEDZCA-B-cs89SM.js} +2 -2
  29. package/dist/client/assets/{chunk-ND2GUHAM-BUU6Elne.js → chunk-ND2GUHAM-D_kPSuUA.js} +1 -1
  30. package/dist/client/assets/{chunk-NZK2D7GU-8UnIsHgz.js → chunk-NZK2D7GU-D1u3pjq-.js} +1 -1
  31. package/dist/client/assets/{chunk-O5CBEL6O-Bt0iBpRT.js → chunk-O5CBEL6O-Mt0cnPSf.js} +1 -1
  32. package/dist/client/assets/chunk-QZHKN3VN-BrYnBs7h.js +1 -0
  33. package/dist/client/assets/chunk-WU5MYG2G-CdBcsQs_.js +1 -0
  34. package/dist/client/assets/{chunk-XPW4576I-CiPhy2lR.js → chunk-XPW4576I-Bt8a8x28.js} +1 -1
  35. package/dist/client/assets/classDiagram-4FO5ZUOK-CCpp3t5M.js +1 -0
  36. package/dist/client/assets/classDiagram-v2-Q7XG4LA2-B1aV1sYb.js +1 -0
  37. package/dist/client/assets/{cobol-C6EN1HSS.js → cobol-Daidj_5Y.js} +1 -1
  38. package/dist/client/assets/{coffee-0fBPy0at.js → coffee-DUMdB2Cr.js} +1 -1
  39. package/dist/client/assets/{cose-bilkent-S5V4N54A-B6017ve4.js → cose-bilkent-S5V4N54A-DVUDLXie.js} +1 -1
  40. package/dist/client/assets/{cpp-Cgd-x8Qm.js → cpp-C2FeX1Mc.js} +1 -1
  41. package/dist/client/assets/{crystal-c3E-pfg5.js → crystal-D4yb9blJ.js} +1 -1
  42. package/dist/client/assets/{css-Cv1L9Lkg.js → css-B5cr0U9F.js} +1 -1
  43. package/dist/client/assets/{dagre-BM42HDAG-Dq1xDMIS.js → dagre-BM42HDAG-DdZWb-Ee.js} +1 -1
  44. package/dist/client/assets/{diagram-2AECGRRQ-BhzSmI_P.js → diagram-2AECGRRQ-C9DOZt92.js} +1 -1
  45. package/dist/client/assets/{diagram-5GNKFQAL-DQ80iRmT.js → diagram-5GNKFQAL-Bbc07UKr.js} +1 -1
  46. package/dist/client/assets/{diagram-KO2AKTUF-DgFYNuBX.js → diagram-KO2AKTUF-C-lUzY3m.js} +1 -1
  47. package/dist/client/assets/{diagram-LMA3HP47-jRSitpUw.js → diagram-LMA3HP47-D-OjEFhp.js} +1 -1
  48. package/dist/client/assets/{diagram-OG6HWLK6-DW8rasB2.js → diagram-OG6HWLK6-BjtWGvrf.js} +1 -1
  49. package/dist/client/assets/{dist-yGGkBCKR.js → dist-BXZygPdX.js} +1 -1
  50. package/dist/client/assets/{edge-Bhz1Ui7v.js → edge-RCQWcWNp.js} +1 -1
  51. package/dist/client/assets/{elixir-DwVjV4S5.js → elixir-DwKyVg2X.js} +1 -1
  52. package/dist/client/assets/{elm-D_aEQPcR.js → elm-DjR33IVs.js} +1 -1
  53. package/dist/client/assets/{erDiagram-TEJ5UH35-Cw9JC5D-.js → erDiagram-TEJ5UH35-C5T4ywLG.js} +1 -1
  54. package/dist/client/assets/{erb-CWSTVYrU.js → erb-BnhUH1Hk.js} +1 -1
  55. package/dist/client/assets/{flowDiagram-I6XJVG4X-CaMT-5ly.js → flowDiagram-I6XJVG4X-BJmjm7Kx.js} +1 -1
  56. package/dist/client/assets/{ganttDiagram-6RSMTGT7-C_676lk4.js → ganttDiagram-6RSMTGT7-DREPnzu5.js} +1 -1
  57. package/dist/client/assets/{git-rebase-YH8g16wO.js → git-rebase-DzXoSDXA.js} +1 -1
  58. package/dist/client/assets/{gitGraphDiagram-PVQCEYII-BGOaoZI0.js → gitGraphDiagram-PVQCEYII-DIR4G_-_.js} +1 -1
  59. package/dist/client/assets/{glimmer-js-BW02TI5b.js → glimmer-js-HKnZpCn_.js} +1 -1
  60. package/dist/client/assets/{glimmer-ts-CI0zXYYJ.js → glimmer-ts-DedV7rWs.js} +1 -1
  61. package/dist/client/assets/{glsl-BPxiz4_T.js → glsl-Bz-0Alp2.js} +1 -1
  62. package/dist/client/assets/{graphql-i9EfBOYT.js → graphql-DSKkDYCD.js} +1 -1
  63. package/dist/client/assets/{hack-PGwXKmg5.js → hack-CnaHZm8k.js} +1 -1
  64. package/dist/client/assets/{haml-DJEaRUnh.js → haml-huGFYKlj.js} +1 -1
  65. package/dist/client/assets/{handlebars-BKbKE3mu.js → handlebars-CKmgzfWY.js} +1 -1
  66. package/dist/client/assets/{html-DUCTVgfz.js → html-B9Ih_dUU.js} +1 -1
  67. package/dist/client/assets/{html-derivative-DEAtKAli.js → html-derivative-YabD-M5d.js} +1 -1
  68. package/dist/client/assets/{http-bjFkSEgi.js → http-Bdu12JYX.js} +1 -1
  69. package/dist/client/assets/{hurl-Be_0iFn7.js → hurl-twZzDTNs.js} +1 -1
  70. package/dist/client/assets/{index-Dwcvtw9r.js → index-BktdZRWB.js} +115 -115
  71. package/dist/client/assets/{index-kdpS_WCg.css → index-YlwaPTSG.css} +1 -1
  72. package/dist/client/assets/{infoDiagram-5YYISTIA-DEM4xhVR.js → infoDiagram-5YYISTIA-D2ty2R-i.js} +1 -1
  73. package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-qvVbcu9F.js → ishikawaDiagram-YF4QCWOH-Ccnc9xlE.js} +1 -1
  74. package/dist/client/assets/{java-DI-eL_a_.js → java-_5trO-p9.js} +1 -1
  75. package/dist/client/assets/{javascript-C1NsxtXz.js → javascript-BOQn0ikE.js} +1 -1
  76. package/dist/client/assets/{jinja-CehVuPO9.js → jinja-BgY-0IBz.js} +1 -1
  77. package/dist/client/assets/{jison-f1_yV3M6.js → jison-BLNTmT1_.js} +1 -1
  78. package/dist/client/assets/{journeyDiagram-JHISSGLW-B_zXWlKX.js → journeyDiagram-JHISSGLW-W7eWXlw0.js} +1 -1
  79. package/dist/client/assets/{json-C5zdLJJF.js → json-BLbH8rZf.js} +1 -1
  80. package/dist/client/assets/{jsx-B3RrBasc.js → jsx-CxteptsJ.js} +1 -1
  81. package/dist/client/assets/{julia-Bi0vJ2BX.js → julia-B__Ncp_z.js} +1 -1
  82. package/dist/client/assets/{just-xIhMZsmQ.js → just-DBsHUGW1.js} +1 -1
  83. package/dist/client/assets/{kanban-definition-UN3LZRKU-CbD2KWf1.js → kanban-definition-UN3LZRKU-Z_AFL-rd.js} +1 -1
  84. package/dist/client/assets/{latex-Dp7jRlke.js → latex-DFF_0wxo.js} +1 -1
  85. package/dist/client/assets/{line-WeunFuQk.js → line-aAv8TyOs.js} +1 -1
  86. package/dist/client/assets/{linear-CDJM1IL7.js → linear-BOvEZKH8.js} +1 -1
  87. package/dist/client/assets/{liquid-KVO31g_D.js → liquid-kDWCO6d7.js} +1 -1
  88. package/dist/client/assets/{lua-DhSdSYSx.js → lua-CYTFayq-.js} +1 -1
  89. package/dist/client/assets/{marko-ypMfiov0.js → marko-Dpmz3Pdx.js} +1 -1
  90. package/dist/client/assets/{mdc-Co-EpgU8.js → mdc-BsxHyM1i.js} +1 -1
  91. package/dist/client/assets/{mermaid-parser.core-zvabDowq.js → mermaid-parser.core-D8z_CWL1.js} +1 -1
  92. package/dist/client/assets/{mermaid.core-L0zHdHeP.js → mermaid.core-DNKchnly.js} +3 -3
  93. package/dist/client/assets/{mindmap-definition-RKZ34NQL-Dsz4uiiI.js → mindmap-definition-RKZ34NQL-xQKMV4Kw.js} +1 -1
  94. package/dist/client/assets/{nginx-BFhKPsbv.js → nginx-CcdTDme-.js} +1 -1
  95. package/dist/client/assets/{nim-DQUznJNh.js → nim-B5wWDskL.js} +1 -1
  96. package/dist/client/assets/{perl-CK3JJIks.js → perl-Ce2_iKLz.js} +1 -1
  97. package/dist/client/assets/{php-Bjv6uy3B.js → php-DuLCFERd.js} +1 -1
  98. package/dist/client/assets/{pieDiagram-4H26LBE5-Dsd16XxY.js → pieDiagram-4H26LBE5-CBSCJnUr.js} +1 -1
  99. package/dist/client/assets/{pug-llyOv0JA.js → pug-BfQJoQj1.js} +1 -1
  100. package/dist/client/assets/{qml-XSU4YlGi.js → qml-DYeovlVl.js} +1 -1
  101. package/dist/client/assets/{quadrantDiagram-W4KKPZXB-XwtlgYug.js → quadrantDiagram-W4KKPZXB-uEcgb0Rm.js} +1 -1
  102. package/dist/client/assets/{r-C7DDDUty.js → r-DgHSP56L.js} +1 -1
  103. package/dist/client/assets/{razor-CjoCuGIf.js → razor-B00x7W-i.js} +1 -1
  104. package/dist/client/assets/{regexp-C7lVLI_E.js → regexp-CmWVupmd.js} +1 -1
  105. package/dist/client/assets/{requirementDiagram-4Y6WPE33-rjFkmK7q.js → requirementDiagram-4Y6WPE33-Q4yY_ALe.js} +1 -1
  106. package/dist/client/assets/{review-export-Dzn9Nrv2.js → review-export-pcqDKNqx.js} +1 -1
  107. package/dist/client/assets/{rst-CoXGYz_Q.js → rst-B3VARbTX.js} +1 -1
  108. package/dist/client/assets/{ruby-D0SxUI68.js → ruby-CaxKSSbT.js} +1 -1
  109. package/dist/client/assets/{sankeyDiagram-5OEKKPKP-ULHSBgpO.js → sankeyDiagram-5OEKKPKP-B-GLzFGa.js} +1 -1
  110. package/dist/client/assets/{sas-Dg6lNKUG.js → sas-Ue0rHUIk.js} +1 -1
  111. package/dist/client/assets/{scss-Bor1IW81.js → scss-BJJ7_L6c.js} +1 -1
  112. package/dist/client/assets/{sequenceDiagram-3UESZ5HK-PxpMeVqA.js → sequenceDiagram-3UESZ5HK-DW0em0D_.js} +1 -1
  113. package/dist/client/assets/{shellscript-CRyyhEkO.js → shellscript-C6LkZs1u.js} +1 -1
  114. package/dist/client/assets/{shellsession-DjKLkXA9.js → shellsession-CkZu1e84.js} +1 -1
  115. package/dist/client/assets/{soy-C8vE4Bz5.js → soy-CDaZV57J.js} +1 -1
  116. package/dist/client/assets/{sql-BrDZX5HK.js → sql-CLfMGH4x.js} +1 -1
  117. package/dist/client/assets/{src-CNmxBaik.js → src-C27zxuNO.js} +1 -1
  118. package/dist/client/assets/{stata-b17UrTyn.js → stata-B0kNMHc9.js} +1 -1
  119. package/dist/client/assets/{stateDiagram-AJRCARHV-BBeJC3ay.js → stateDiagram-AJRCARHV-CrO_D3m4.js} +1 -1
  120. package/dist/client/assets/stateDiagram-v2-BHNVJYJU-C9KDGD7R.js +1 -0
  121. package/dist/client/assets/{surrealql-CsZ116gs.js → surrealql-D9os_yZO.js} +1 -1
  122. package/dist/client/assets/{svelte-D0HiSC98.js → svelte-2SxVToeO.js} +1 -1
  123. package/dist/client/assets/{templ-wtuCSMmI.js → templ-DzmZB67T.js} +1 -1
  124. package/dist/client/assets/{tex-DmngvaO4.js → tex-BMPk3nHk.js} +1 -1
  125. package/dist/client/assets/{timeline-definition-PNZ67QCA-ChtEFrOv.js → timeline-definition-PNZ67QCA-C9FBevHv.js} +1 -1
  126. package/dist/client/assets/{ts-tags-Cu7v6AQx.js → ts-tags-CG14Bplc.js} +1 -1
  127. package/dist/client/assets/{tsx-CQTsVgW0.js → tsx-D6NK461A.js} +1 -1
  128. package/dist/client/assets/{twig--VG4V71I.js → twig-Agh0j5sD.js} +1 -1
  129. package/dist/client/assets/{typescript-Dm0_1KTl.js → typescript-_AkeziZ2.js} +1 -1
  130. package/dist/client/assets/{vennDiagram-CIIHVFJN-CQSGJn90.js → vennDiagram-CIIHVFJN-2H9HfhhR.js} +1 -1
  131. package/dist/client/assets/{vue-BlytSRgm.js → vue-C1z3QGG9.js} +1 -1
  132. package/dist/client/assets/{vue-html-BFRFxjGG.js → vue-html-C1RMzLZk.js} +1 -1
  133. package/dist/client/assets/{vue-vine-B4MbjVZh.js → vue-vine-oOixA6ge.js} +1 -1
  134. package/dist/client/assets/{wardleyDiagram-YWT4CUSO-AJu-N2AD.js → wardleyDiagram-YWT4CUSO-BJxrQhTf.js} +1 -1
  135. package/dist/client/assets/{xml-BBYil7Ep.js → xml-okuDZ7vq.js} +1 -1
  136. package/dist/client/assets/{xsl-DfHxKcnH.js → xsl-S_n3XrKb.js} +1 -1
  137. package/dist/client/assets/{xychartDiagram-2RQKCTM6-BOakoiUg.js → xychartDiagram-2RQKCTM6-BGdee7KG.js} +1 -1
  138. package/dist/client/assets/{yaml-B9aOtJMC.js → yaml-BoX-kqX1.js} +1 -1
  139. package/dist/client/index.html +2 -2
  140. package/dist/{doctor-q6oA64hm.mjs → doctor-CmP0u7-d.mjs} +1 -1
  141. package/dist/github-BjZZcSKV.mjs +2 -0
  142. package/dist/{github-HfIlIS-J.mjs → github-oCZx5aim.mjs} +270 -29
  143. package/dist/{mcp-eor39qmD.mjs → mcp-CqxXILYL.mjs} +1 -1
  144. package/dist/{server-C105rwQw.mjs → server-CczuXSWo.mjs} +164 -11
  145. package/package.json +3 -3
  146. package/dist/cli-agent-B4hU6Xay.mjs +0 -499
  147. package/dist/cli-agent-B_PHd635.mjs +0 -499
  148. package/dist/cli-agent-BatQgghr.mjs +0 -499
  149. package/dist/cli-agent-BkkRbKqq.mjs +0 -513
  150. package/dist/cli-agent-BlMtx1Tx.mjs +0 -736
  151. package/dist/cli-agent-BwZE05CQ.mjs +0 -499
  152. package/dist/cli-agent-C4Fb90GL.mjs +0 -728
  153. package/dist/cli-agent-CKE1Cvor.mjs +0 -513
  154. package/dist/cli-agent-CLvCYpmH.mjs +0 -499
  155. package/dist/cli-agent-CX8Fa1Ph.mjs +0 -499
  156. package/dist/cli-agent-ChALuNbw.mjs +0 -841
  157. package/dist/cli-agent-KxNAFIPf.mjs +0 -450
  158. package/dist/cli-agent-SILzesQP.mjs +0 -513
  159. package/dist/cli-agent-USzLoAit.mjs +0 -499
  160. package/dist/cli-agent-qBT8clNM.mjs +0 -841
  161. package/dist/cli-gh-6qiblgj7.mjs +0 -150
  162. package/dist/cli-gh-BV5az425.mjs +0 -147
  163. package/dist/cli-gh-Bo6fOHQR.mjs +0 -147
  164. package/dist/cli-gh-CDGSpndZ.mjs +0 -147
  165. package/dist/cli-gh-D1LoWJl-.mjs +0 -147
  166. package/dist/cli-gh-D1sIZ-jX.mjs +0 -147
  167. package/dist/cli-gh-DROAJlHi.mjs +0 -147
  168. package/dist/cli-gh-DgqscIkg.mjs +0 -147
  169. package/dist/cli-gh-DiT8BWwu.mjs +0 -147
  170. package/dist/cli-gh-KjPnyST6.mjs +0 -150
  171. package/dist/cli-gh-abs-IJrz.mjs +0 -147
  172. package/dist/client/assets/channel-CsxAySTG.js +0 -1
  173. package/dist/client/assets/chunk-QZHKN3VN-t_dKKAQO.js +0 -1
  174. package/dist/client/assets/chunk-WU5MYG2G-B712vNst.js +0 -1
  175. package/dist/client/assets/classDiagram-4FO5ZUOK-WK8tPFKZ.js +0 -1
  176. package/dist/client/assets/classDiagram-v2-Q7XG4LA2-DJNeQCV0.js +0 -1
  177. package/dist/client/assets/stateDiagram-v2-BHNVJYJU-CHWDCBHj.js +0 -1
  178. package/dist/comment-format-CKTt0fzi.mjs +0 -113
  179. package/dist/comment-format-DG_PAehC.mjs +0 -117
  180. package/dist/github-C9GLNak7.mjs +0 -2
  181. package/dist/mcp-7eXATtez.mjs +0 -1334
  182. package/dist/mcp-B6mCC7D3.mjs +0 -1047
  183. package/dist/mcp-BBk8AIO4.mjs +0 -1334
  184. package/dist/mcp-BJxrW9dS.mjs +0 -1334
  185. package/dist/mcp-BMTZLQuB.mjs +0 -758
  186. package/dist/mcp-BUF2nEL7.mjs +0 -1036
  187. package/dist/mcp-BWeWR4yd.mjs +0 -255
  188. package/dist/mcp-BgZO-iXI.mjs +0 -1047
  189. package/dist/mcp-BhT5GgYF.mjs +0 -1334
  190. package/dist/mcp-Bpx76OGU.mjs +0 -945
  191. package/dist/mcp-BsGdNA88.mjs +0 -1334
  192. package/dist/mcp-BxBm3d5l.mjs +0 -1047
  193. package/dist/mcp-C1T7LI0H.mjs +0 -1036
  194. package/dist/mcp-C4Bjmf9m.mjs +0 -1047
  195. package/dist/mcp-CFxcdEcJ.mjs +0 -733
  196. package/dist/mcp-Ca9QAlJ0.mjs +0 -1334
  197. package/dist/mcp-CphIUJUg.mjs +0 -1047
  198. package/dist/mcp-CtKRXQRC.mjs +0 -1047
  199. package/dist/mcp-CwjThGi2.mjs +0 -913
  200. package/dist/mcp-D4OsB9lt.mjs +0 -1047
  201. package/dist/mcp-DJ2batvt.mjs +0 -913
  202. package/dist/mcp-DNZQvKKF.mjs +0 -298
  203. package/dist/mcp-DO4zfNZX.mjs +0 -298
  204. package/dist/mcp-D_LGvBTw.mjs +0 -1047
  205. package/dist/mcp-Ds_lPX_o.mjs +0 -913
  206. package/dist/plan-format-B6nbAw_c.mjs +0 -132
  207. package/dist/plan-format-Bi46QS0m.mjs +0 -132
  208. package/dist/plan-format-DVnF8xrq.mjs +0 -126
  209. package/dist/plan-format-f62JWFI-.mjs +0 -117
  210. package/dist/plan-format-mSDtsPcC.mjs +0 -132
  211. package/dist/review-export-BoV0884M.mjs +0 -66
  212. package/dist/review-export-CKTI5Od_.mjs +0 -66
  213. package/dist/server-95UE5bgh.mjs +0 -3367
  214. package/dist/server-AisDKkpW.mjs +0 -3227
  215. package/dist/server-B0cS95Lf.mjs +0 -3488
  216. package/dist/server-BUsRhL1B.mjs +0 -3283
  217. package/dist/server-BZBFquG8.mjs +0 -3875
  218. package/dist/server-Bc2m9R5-.mjs +0 -3263
  219. package/dist/server-Bj-6KlK5.mjs +0 -3367
  220. package/dist/server-Bmt57wV5.mjs +0 -3875
  221. package/dist/server-Bpf84Il0.mjs +0 -3367
  222. package/dist/server-C15WRRnS.mjs +0 -3740
  223. package/dist/server-CYSpLbdA.mjs +0 -3360
  224. package/dist/server-ChT2DCaR.mjs +0 -3701
  225. package/dist/server-D0Ni8PKP.mjs +0 -3252
  226. package/dist/server-D2xEbakj.mjs +0 -3874
  227. package/dist/server-DJxysGxV.mjs +0 -3701
  228. package/dist/server-Dov7jbV3.mjs +0 -3367
  229. package/dist/server-TOElOuNP.mjs +0 -3258
  230. package/dist/server-eQ2E4Axo.mjs +0 -3367
  231. package/dist/server-lock-C_wPtEsH.mjs +0 -909
  232. package/dist/server-lock-Cbu3qHdu.mjs +0 -924
  233. package/dist/server-lock-D32inEn9.mjs +0 -924
  234. package/dist/server-lock-D73NKKbn.mjs +0 -842
  235. package/dist/server-lock-DaSx7DjW.mjs +0 -1049
  236. package/dist/server-lock-Ddcat0HF.mjs +0 -851
  237. package/dist/server-lock-Dj9fG9md.mjs +0 -838
  238. package/dist/server-lock-Dq_1CJaF.mjs +0 -1047
  239. package/dist/server-lock-Ujbcgq28.mjs +0 -954
  240. package/dist/update-check-CXeSZANo.mjs +0 -129
  241. package/dist/update-check-DAPFCqpF.mjs +0 -129
@@ -1,132 +0,0 @@
1
- //#region src/lib/plan-format.ts
2
- /**
3
- * Serialize a reviewed plan into the `<plan-review>` XML envelope handed back to
4
- * a waiting agent. The diff-review counterpart is {@link formatComments}; this
5
- * keeps the two handoffs structurally consistent so an agent learns one shape.
6
- *
7
- * Shared by the server's `/api/plan-review/await` handoff, the `diffing plan`
8
- * CLI, and the MCP server so every channel emits byte-identical output.
9
- */
10
- function escapeAttr(value) {
11
- return value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
12
- }
13
- /** Human-readable guidance the agent should act on, derived from the verdict. */
14
- function decisionSummary(decision) {
15
- switch (decision) {
16
- case "approved": return "The reviewer APPROVED this plan. Proceed with implementation exactly as described, taking any inline comments into account.";
17
- case "rejected": return "The reviewer REJECTED this plan. Do NOT proceed. Reconsider the approach based on the comments; only continue once a new plan is approved.";
18
- case "changes-requested": return "The reviewer REQUESTED CHANGES. Revise the plan to address every open comment below, then resubmit the updated plan for re-review (do not start implementation yet).";
19
- case "comment-only": return "The reviewer chose COMMENT-ONLY mode. You MUST NOT edit any files or implement the plan. Only reply to the comments below — answer questions, provide clarification, or discuss. The decision comment (if present) is your prompt for this chat.";
20
- default: return "This plan has not been decided yet. Wait for the reviewer to approve, reject, or request changes.";
21
- }
22
- }
23
- /**
24
- * Resolve the line label for a plan comment: `plan` for whole-plan notes,
25
- * `12-15` for a multi-line selection, otherwise the single line number.
26
- */
27
- function lineLabel(comment) {
28
- if (comment.lineNumber === 0) return "plan";
29
- if (comment.startLineNumber && comment.startLineNumber !== comment.lineNumber) return `${comment.startLineNumber}-${comment.lineNumber}`;
30
- return `${comment.lineNumber}`;
31
- }
32
- function formatPlanReview(plan, options = {}) {
33
- const { viewingVersion, mode } = options;
34
- const isHistorical = viewingVersion !== void 0 && viewingVersion !== plan.version;
35
- const versions = plan.versions ?? [];
36
- const historical = isHistorical && versions.length > 0 ? versions.find((v) => v.version === viewingVersion) : void 0;
37
- const bodyToRender = historical ? historical.body : plan.body;
38
- const titleToRender = historical ? historical.title : plan.title;
39
- const visibleComments = isHistorical ? (plan.comments ?? []).filter((c) => c.createdAtPlanVersion === viewingVersion) : plan.comments ?? [];
40
- const modeAttr = mode && mode !== "standard" ? ` mode="${mode}"` : "";
41
- const lines = [];
42
- lines.push("<plan-review>");
43
- lines.push(" <instructions>");
44
- lines.push(" You are an AI coding assistant receiving a human review of a plan you submitted.");
45
- if (mode === "comment-only") lines.push(" ⚠️ COMMENT-ONLY MODE: You MUST NOT edit any files or implement the plan. Your only task is to reply to the comments below — answer questions, provide clarification, or discuss. The decision comment (if present) is your prompt for this chat.");
46
- else {
47
- lines.push(" - The \"decision\" attribute is the headline verdict: \"approved\", \"rejected\", \"changes-requested\", \"comment-only\", or \"pending\".");
48
- lines.push(" - <decision-summary> tells you, in plain language, what to do next based on that verdict.");
49
- lines.push(" - <decision-comment> is the reviewer's overall note (may be absent).");
50
- lines.push(" - <plan-body> is the exact markdown of the plan being reviewed. Inline comments target lines within it.");
51
- lines.push(" - Each <comment> targets a line (\"line=42\"), a range (\"line=12-15\"), or the whole plan (\"line=plan\").");
52
- lines.push(" \"section\" names the nearest markdown heading for context. Only address comments with status=\"open\".");
53
- lines.push(" - <context> contains the exact plan text the comment is anchored to.");
54
- lines.push("");
55
- lines.push(" HOW TO RESPOND:");
56
- lines.push(" - If approved: proceed with the work.");
57
- lines.push(" - If changes-requested: revise the plan and resubmit it for another review round.");
58
- lines.push(" - If rejected: stop and rethink; do not implement.");
59
- lines.push(" - If comment-only: do NOT implement; only reply to comments.");
60
- lines.push(" Prefer the diffing CLI or MCP (port-agnostic, no copy-paste):");
61
- lines.push(" diffing plan reply <comment-id> --body \"...\" --model \"<your-model-name>\"");
62
- lines.push(" diffing plan resolve <comment-id>");
63
- lines.push(" diffing plan submit <revised-plan.md> --id <plan-id> # resubmit a new version for re-review");
64
- lines.push(" (Or the equivalent MCP tools: reply_to_plan_comment, resolve_plan_comment, submit_plan.)");
65
- }
66
- lines.push(" </instructions>");
67
- const decidedAttr = plan.decidedAt ? ` decided-at="${new Date(plan.decidedAt).toISOString()}"` : "";
68
- const viewingAttr = isHistorical ? ` viewing-version="${viewingVersion}"` : "";
69
- lines.push(` <plan id="${escapeAttr(plan.id)}" title="${escapeAttr(titleToRender)}" version="${plan.version}" decision="${plan.decision}"${decidedAttr}${viewingAttr}${modeAttr}>`);
70
- lines.push(` <decision-summary><![CDATA[${decisionSummary(plan.decision)}]]></decision-summary>`);
71
- const trimmedDecisionComment = plan.decisionComment?.trim();
72
- if (trimmedDecisionComment) lines.push(` <decision-comment><![CDATA[${trimmedDecisionComment}]]></decision-comment>`);
73
- if (isHistorical) lines.push(` <viewing-version-info><![CDATA[Reviewing historical version ${viewingVersion} of ${plan.version}. Comments are filtered to those anchored to v${viewingVersion}.]]></viewing-version-info>`);
74
- lines.push(` <plan-body><![CDATA[${bodyToRender}]]></plan-body>`);
75
- if (visibleComments.length > 0) {
76
- lines.push(" <comments>");
77
- for (const comment of visibleComments) {
78
- const sectionAttr = comment.sectionTitle ? ` section="${escapeAttr(comment.sectionTitle)}"` : "";
79
- const isoDate = new Date(comment.createdAt).toISOString();
80
- const versionAttr = ` plan-version="${comment.createdAtPlanVersion ?? plan.version}"`;
81
- lines.push(` <comment id="${escapeAttr(comment.id)}" line="${lineLabel(comment)}"${sectionAttr} status="${comment.status}" created-at="${isoDate}"${versionAttr}>`);
82
- if (comment.lineNumber !== 0 && comment.lineContent) lines.push(` <context><![CDATA[${comment.lineContent}]]></context>`);
83
- lines.push(` <body><![CDATA[${comment.body}]]></body>`);
84
- if (comment.replies && comment.replies.length > 0) {
85
- lines.push(" <replies>");
86
- for (const reply of comment.replies) {
87
- const replyIsoDate = new Date(reply.createdAt).toISOString();
88
- const roleAttr = reply.role ? ` role="${reply.role}"` : " role=\"agent\"";
89
- const modelAttr = reply.model ? ` model="${escapeAttr(reply.model)}"` : "";
90
- lines.push(` <reply id="${escapeAttr(reply.id)}" created-at="${replyIsoDate}"${roleAttr}${modelAttr}>`);
91
- lines.push(` <![CDATA[${reply.body}]]>`);
92
- lines.push(" </reply>");
93
- }
94
- lines.push(" </replies>");
95
- }
96
- lines.push(" </comment>");
97
- }
98
- lines.push(" </comments>");
99
- }
100
- lines.push(" </plan>");
101
- lines.push("</plan-review>");
102
- return lines.join("\n");
103
- }
104
- /**
105
- * Find the nearest markdown ATX heading at or above a 1-based line, so a comment
106
- * can record which section of the plan it belongs to. Returns the heading text
107
- * without the leading `#`s, or undefined when the line precedes any heading.
108
- */
109
- function sectionTitleForLine(body, lineNumber) {
110
- if (lineNumber < 1) return void 0;
111
- const lines = body.split("\n");
112
- const end = Math.min(lineNumber, lines.length);
113
- for (let i = end - 1; i >= 0; i--) {
114
- const match = /^\s{0,3}(#{1,6})\s+(.*?)\s*#*\s*$/.exec(lines[i]);
115
- if (match) return match[2].trim();
116
- }
117
- }
118
- /**
119
- * Snapshot the plan text spanned by a 1-based, inclusive [start, end] line
120
- * range, used as the `lineContent` anchor when a comment is created without one
121
- * (e.g. posted by an agent over the API).
122
- */
123
- function extractPlanLines(body, startLine, endLine) {
124
- if (startLine < 1) return "";
125
- const lines = body.split("\n");
126
- const from = Math.max(1, startLine);
127
- const to = Math.min(endLine, lines.length);
128
- if (to < from) return "";
129
- return lines.slice(from - 1, to).join("\n");
130
- }
131
- //#endregion
132
- export { formatPlanReview as n, sectionTitleForLine as r, extractPlanLines as t };
@@ -1,132 +0,0 @@
1
- //#region src/lib/plan-format.ts
2
- /**
3
- * Serialize a reviewed plan into the `<plan-review>` XML envelope handed back to
4
- * a waiting agent. The diff-review counterpart is {@link formatComments}; this
5
- * keeps the two handoffs structurally consistent so an agent learns one shape.
6
- *
7
- * Shared by the server's `/api/plan-review/await` handoff, the `diffing plan`
8
- * CLI, and the MCP server so every channel emits byte-identical output.
9
- */
10
- function escapeAttr(value) {
11
- return value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
12
- }
13
- /** Human-readable guidance the agent should act on, derived from the verdict. */
14
- function decisionSummary(decision) {
15
- switch (decision) {
16
- case "approved": return "The reviewer APPROVED this plan. Proceed with implementation exactly as described, taking any inline comments into account.";
17
- case "rejected": return "The reviewer REJECTED this plan. Do NOT proceed. Reconsider the approach based on the comments; only continue once a new plan is approved.";
18
- case "changes-requested": return "The reviewer REQUESTED CHANGES. Revise the plan to address every open comment below, then resubmit the updated plan for re-review (do not start implementation yet).";
19
- case "comment-only": return "The reviewer chose COMMENT-ONLY mode. You MUST NOT edit any files or implement the plan. Only reply to the comments below — answer questions, provide clarification, or discuss. The decision comment (if present) is your prompt for this chat.";
20
- default: return "This plan has not been decided yet. Wait for the reviewer to approve, reject, or request changes.";
21
- }
22
- }
23
- /**
24
- * Resolve the line label for a plan comment: `plan` for whole-plan notes,
25
- * `12-15` for a multi-line selection, otherwise the single line number.
26
- */
27
- function lineLabel(comment) {
28
- if (comment.lineNumber === 0) return "plan";
29
- if (comment.startLineNumber && comment.startLineNumber !== comment.lineNumber) return `${comment.startLineNumber}-${comment.lineNumber}`;
30
- return `${comment.lineNumber}`;
31
- }
32
- function formatPlanReview(plan, options = {}) {
33
- const { viewingVersion, mode } = options;
34
- const isHistorical = viewingVersion !== void 0 && viewingVersion !== plan.version;
35
- const versions = plan.versions ?? [];
36
- const historical = isHistorical && versions.length > 0 ? versions.find((v) => v.version === viewingVersion) : void 0;
37
- const bodyToRender = historical ? historical.body : plan.body;
38
- const titleToRender = historical ? historical.title : plan.title;
39
- const visibleComments = isHistorical ? (plan.comments ?? []).filter((c) => c.createdAtPlanVersion === viewingVersion) : plan.comments ?? [];
40
- const modeAttr = mode && mode !== "standard" ? ` mode="${mode}"` : "";
41
- const lines = [];
42
- lines.push("<plan-review>");
43
- lines.push(" <instructions>");
44
- lines.push(" You are an AI coding assistant receiving a human review of a plan you submitted.");
45
- if (mode === "comment-only") lines.push(" ⚠️ COMMENT-ONLY MODE: You MUST NOT edit any files or implement the plan. Your only task is to reply to the comments below — answer questions, provide clarification, or discuss. The decision comment (if present) is your prompt for this chat.");
46
- else {
47
- lines.push(" - The \"decision\" attribute is the headline verdict: \"approved\", \"rejected\", \"changes-requested\", \"comment-only\", or \"pending\".");
48
- lines.push(" - <decision-summary> tells you, in plain language, what to do next based on that verdict.");
49
- lines.push(" - <decision-comment> is the reviewer's overall note (may be absent).");
50
- lines.push(" - <plan-body> is the exact markdown of the plan being reviewed. Inline comments target lines within it.");
51
- lines.push(" - Each <comment> targets a line (\"line=42\"), a range (\"line=12-15\"), or the whole plan (\"line=plan\").");
52
- lines.push(" \"section\" names the nearest markdown heading for context. Only address comments with status=\"open\".");
53
- lines.push(" - <context> contains the exact plan text the comment is anchored to.");
54
- lines.push("");
55
- lines.push(" HOW TO RESPOND:");
56
- lines.push(" - If approved: proceed with the work.");
57
- lines.push(" - If changes-requested: revise the plan and resubmit it for another review round.");
58
- lines.push(" - If rejected: stop and rethink; do not implement.");
59
- lines.push(" - If comment-only: do NOT implement; only reply to comments.");
60
- lines.push(" Prefer the diffing CLI or MCP (port-agnostic, no copy-paste):");
61
- lines.push(" diffing plan reply <comment-id> --body \"...\" --model \"<your-model-name>\"");
62
- lines.push(" diffing plan resolve <comment-id>");
63
- lines.push(" diffing plan submit <revised-plan.md> --id <plan-id> # resubmit a new version for re-review");
64
- lines.push(" (Or the equivalent MCP tools: reply_to_plan_comment, resolve_plan_comment, submit_plan.)");
65
- }
66
- lines.push(" </instructions>");
67
- const decidedAttr = plan.decidedAt ? ` decided-at="${new Date(plan.decidedAt).toISOString()}"` : "";
68
- const viewingAttr = isHistorical ? ` viewing-version="${viewingVersion}"` : "";
69
- lines.push(` <plan id="${escapeAttr(plan.id)}" title="${escapeAttr(titleToRender)}" version="${plan.version}" decision="${plan.decision}"${decidedAttr}${viewingAttr}${modeAttr}>`);
70
- lines.push(` <decision-summary><![CDATA[${decisionSummary(plan.decision)}]]></decision-summary>`);
71
- const trimmedDecisionComment = plan.decisionComment?.trim();
72
- if (trimmedDecisionComment) lines.push(` <decision-comment><![CDATA[${trimmedDecisionComment}]]></decision-comment>`);
73
- if (isHistorical) lines.push(` <viewing-version-info><![CDATA[Reviewing historical version ${viewingVersion} of ${plan.version}. Comments are filtered to those anchored to v${viewingVersion}.]]></viewing-version-info>`);
74
- lines.push(` <plan-body><![CDATA[${bodyToRender}]]></plan-body>`);
75
- if (visibleComments.length > 0) {
76
- lines.push(" <comments>");
77
- for (const comment of visibleComments) {
78
- const sectionAttr = comment.sectionTitle ? ` section="${escapeAttr(comment.sectionTitle)}"` : "";
79
- const isoDate = new Date(comment.createdAt).toISOString();
80
- const versionAttr = ` plan-version="${comment.createdAtPlanVersion ?? plan.version}"`;
81
- lines.push(` <comment id="${escapeAttr(comment.id)}" line="${lineLabel(comment)}"${sectionAttr} status="${comment.status}" created-at="${isoDate}"${versionAttr}>`);
82
- if (comment.lineNumber !== 0 && comment.lineContent) lines.push(` <context><![CDATA[${comment.lineContent}]]></context>`);
83
- lines.push(` <body><![CDATA[${comment.body}]]></body>`);
84
- if (comment.replies && comment.replies.length > 0) {
85
- lines.push(" <replies>");
86
- for (const reply of comment.replies) {
87
- const replyIsoDate = new Date(reply.createdAt).toISOString();
88
- const roleAttr = reply.role ? ` role="${reply.role}"` : " role=\"agent\"";
89
- const modelAttr = reply.model ? ` model="${escapeAttr(reply.model)}"` : "";
90
- lines.push(` <reply id="${escapeAttr(reply.id)}" created-at="${replyIsoDate}"${roleAttr}${modelAttr}>`);
91
- lines.push(` <![CDATA[${reply.body}]]>`);
92
- lines.push(" </reply>");
93
- }
94
- lines.push(" </replies>");
95
- }
96
- lines.push(" </comment>");
97
- }
98
- lines.push(" </comments>");
99
- }
100
- lines.push(" </plan>");
101
- lines.push("</plan-review>");
102
- return lines.join("\n");
103
- }
104
- /**
105
- * Find the nearest markdown ATX heading at or above a 1-based line, so a comment
106
- * can record which section of the plan it belongs to. Returns the heading text
107
- * without the leading `#`s, or undefined when the line precedes any heading.
108
- */
109
- function sectionTitleForLine(body, lineNumber) {
110
- if (lineNumber < 1) return void 0;
111
- const lines = body.split("\n");
112
- const end = Math.min(lineNumber, lines.length);
113
- for (let i = end - 1; i >= 0; i--) {
114
- const match = /^\s{0,3}(#{1,6})\s+(.*?)\s*#*\s*$/.exec(lines[i]);
115
- if (match) return match[2].trim();
116
- }
117
- }
118
- /**
119
- * Snapshot the plan text spanned by a 1-based, inclusive [start, end] line
120
- * range, used as the `lineContent` anchor when a comment is created without one
121
- * (e.g. posted by an agent over the API).
122
- */
123
- function extractPlanLines(body, startLine, endLine) {
124
- if (startLine < 1) return "";
125
- const lines = body.split("\n");
126
- const from = Math.max(1, startLine);
127
- const to = Math.min(endLine, lines.length);
128
- if (to < from) return "";
129
- return lines.slice(from - 1, to).join("\n");
130
- }
131
- //#endregion
132
- export { formatPlanReview as n, sectionTitleForLine as r, extractPlanLines as t };
@@ -1,126 +0,0 @@
1
- //#region src/lib/plan-format.ts
2
- /**
3
- * Serialize a reviewed plan into the `<plan-review>` XML envelope handed back to
4
- * a waiting agent. The diff-review counterpart is {@link formatComments}; this
5
- * keeps the two handoffs structurally consistent so an agent learns one shape.
6
- *
7
- * Shared by the server's `/api/plan-review/await` handoff, the `diffing plan`
8
- * CLI, and the MCP server so every channel emits byte-identical output.
9
- */
10
- function escapeAttr(value) {
11
- return value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
12
- }
13
- /** Human-readable guidance the agent should act on, derived from the verdict. */
14
- function decisionSummary(decision) {
15
- switch (decision) {
16
- case "approved": return "The reviewer APPROVED this plan. Proceed with implementation exactly as described, taking any inline comments into account.";
17
- case "rejected": return "The reviewer REJECTED this plan. Do NOT proceed. Reconsider the approach based on the comments; only continue once a new plan is approved.";
18
- case "changes-requested": return "The reviewer REQUESTED CHANGES. Revise the plan to address every open comment below, then resubmit the updated plan for re-review (do not start implementation yet).";
19
- default: return "This plan has not been decided yet. Wait for the reviewer to approve, reject, or request changes.";
20
- }
21
- }
22
- /**
23
- * Resolve the line label for a plan comment: `plan` for whole-plan notes,
24
- * `12-15` for a multi-line selection, otherwise the single line number.
25
- */
26
- function lineLabel(comment) {
27
- if (comment.lineNumber === 0) return "plan";
28
- if (comment.startLineNumber && comment.startLineNumber !== comment.lineNumber) return `${comment.startLineNumber}-${comment.lineNumber}`;
29
- return `${comment.lineNumber}`;
30
- }
31
- function formatPlanReview(plan, options = {}) {
32
- const { viewingVersion } = options;
33
- const isHistorical = viewingVersion !== void 0 && viewingVersion !== plan.version;
34
- const versions = plan.versions ?? [];
35
- const historical = isHistorical && versions.length > 0 ? versions.find((v) => v.version === viewingVersion) : void 0;
36
- const bodyToRender = historical ? historical.body : plan.body;
37
- const titleToRender = historical ? historical.title : plan.title;
38
- const visibleComments = isHistorical ? (plan.comments ?? []).filter((c) => c.createdAtPlanVersion === viewingVersion) : plan.comments ?? [];
39
- const lines = [];
40
- lines.push("<plan-review>");
41
- lines.push(" <instructions>");
42
- lines.push(" You are an AI coding assistant receiving a human review of a plan you submitted.");
43
- lines.push(" - The \"decision\" attribute is the headline verdict: \"approved\", \"rejected\", \"changes-requested\", or \"pending\".");
44
- lines.push(" - <decision-summary> tells you, in plain language, what to do next based on that verdict.");
45
- lines.push(" - <decision-comment> is the reviewer's overall note (may be absent).");
46
- lines.push(" - <plan-body> is the exact markdown of the plan being reviewed. Inline comments target lines within it.");
47
- lines.push(" - Each <comment> targets a line (\"line=42\"), a range (\"line=12-15\"), or the whole plan (\"line=plan\").");
48
- lines.push(" \"section\" names the nearest markdown heading for context. Only address comments with status=\"open\".");
49
- lines.push(" - <context> contains the exact plan text the comment is anchored to.");
50
- lines.push("");
51
- lines.push(" HOW TO RESPOND:");
52
- lines.push(" - If approved: proceed with the work.");
53
- lines.push(" - If changes-requested: revise the plan and resubmit it for another review round.");
54
- lines.push(" - If rejected: stop and rethink; do not implement.");
55
- lines.push(" Prefer the diffing CLI or MCP (port-agnostic, no copy-paste):");
56
- lines.push(" diffing plan reply <comment-id> --body \"...\" --model \"<your-model-name>\"");
57
- lines.push(" diffing plan resolve <comment-id>");
58
- lines.push(" diffing plan submit <revised-plan.md> --id <plan-id> # resubmit a new version for re-review");
59
- lines.push(" (Or the equivalent MCP tools: reply_to_plan_comment, resolve_plan_comment, submit_plan.)");
60
- lines.push(" </instructions>");
61
- const decidedAttr = plan.decidedAt ? ` decided-at="${new Date(plan.decidedAt).toISOString()}"` : "";
62
- const viewingAttr = isHistorical ? ` viewing-version="${viewingVersion}"` : "";
63
- lines.push(` <plan id="${escapeAttr(plan.id)}" title="${escapeAttr(titleToRender)}" version="${plan.version}" decision="${plan.decision}"${decidedAttr}${viewingAttr}>`);
64
- lines.push(` <decision-summary><![CDATA[${decisionSummary(plan.decision)}]]></decision-summary>`);
65
- const trimmedDecisionComment = plan.decisionComment?.trim();
66
- if (trimmedDecisionComment) lines.push(` <decision-comment><![CDATA[${trimmedDecisionComment}]]></decision-comment>`);
67
- if (isHistorical) lines.push(` <viewing-version-info><![CDATA[Reviewing historical version ${viewingVersion} of ${plan.version}. Comments are filtered to those anchored to v${viewingVersion}.]]></viewing-version-info>`);
68
- lines.push(` <plan-body><![CDATA[${bodyToRender}]]></plan-body>`);
69
- if (visibleComments.length > 0) {
70
- lines.push(" <comments>");
71
- for (const comment of visibleComments) {
72
- const sectionAttr = comment.sectionTitle ? ` section="${escapeAttr(comment.sectionTitle)}"` : "";
73
- const isoDate = new Date(comment.createdAt).toISOString();
74
- const versionAttr = ` plan-version="${comment.createdAtPlanVersion ?? plan.version}"`;
75
- lines.push(` <comment id="${escapeAttr(comment.id)}" line="${lineLabel(comment)}"${sectionAttr} status="${comment.status}" created-at="${isoDate}"${versionAttr}>`);
76
- if (comment.lineNumber !== 0 && comment.lineContent) lines.push(` <context><![CDATA[${comment.lineContent}]]></context>`);
77
- lines.push(` <body><![CDATA[${comment.body}]]></body>`);
78
- if (comment.replies && comment.replies.length > 0) {
79
- lines.push(" <replies>");
80
- for (const reply of comment.replies) {
81
- const replyIsoDate = new Date(reply.createdAt).toISOString();
82
- const roleAttr = reply.role ? ` role="${reply.role}"` : " role=\"agent\"";
83
- const modelAttr = reply.model ? ` model="${escapeAttr(reply.model)}"` : "";
84
- lines.push(` <reply id="${escapeAttr(reply.id)}" created-at="${replyIsoDate}"${roleAttr}${modelAttr}>`);
85
- lines.push(` <![CDATA[${reply.body}]]>`);
86
- lines.push(" </reply>");
87
- }
88
- lines.push(" </replies>");
89
- }
90
- lines.push(" </comment>");
91
- }
92
- lines.push(" </comments>");
93
- }
94
- lines.push(" </plan>");
95
- lines.push("</plan-review>");
96
- return lines.join("\n");
97
- }
98
- /**
99
- * Find the nearest markdown ATX heading at or above a 1-based line, so a comment
100
- * can record which section of the plan it belongs to. Returns the heading text
101
- * without the leading `#`s, or undefined when the line precedes any heading.
102
- */
103
- function sectionTitleForLine(body, lineNumber) {
104
- if (lineNumber < 1) return void 0;
105
- const lines = body.split("\n");
106
- const end = Math.min(lineNumber, lines.length);
107
- for (let i = end - 1; i >= 0; i--) {
108
- const match = /^\s{0,3}(#{1,6})\s+(.*?)\s*#*\s*$/.exec(lines[i]);
109
- if (match) return match[2].trim();
110
- }
111
- }
112
- /**
113
- * Snapshot the plan text spanned by a 1-based, inclusive [start, end] line
114
- * range, used as the `lineContent` anchor when a comment is created without one
115
- * (e.g. posted by an agent over the API).
116
- */
117
- function extractPlanLines(body, startLine, endLine) {
118
- if (startLine < 1) return "";
119
- const lines = body.split("\n");
120
- const from = Math.max(1, startLine);
121
- const to = Math.min(endLine, lines.length);
122
- if (to < from) return "";
123
- return lines.slice(from - 1, to).join("\n");
124
- }
125
- //#endregion
126
- export { formatPlanReview as n, sectionTitleForLine as r, extractPlanLines as t };
@@ -1,117 +0,0 @@
1
- //#region src/lib/plan-format.ts
2
- /**
3
- * Serialize a reviewed plan into the `<plan-review>` XML envelope handed back to
4
- * a waiting agent. The diff-review counterpart is {@link formatComments}; this
5
- * keeps the two handoffs structurally consistent so an agent learns one shape.
6
- *
7
- * Shared by the server's `/api/plan-review/await` handoff, the `diffing plan`
8
- * CLI, and the MCP server so every channel emits byte-identical output.
9
- */
10
- function escapeAttr(value) {
11
- return value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
12
- }
13
- /** Human-readable guidance the agent should act on, derived from the verdict. */
14
- function decisionSummary(decision) {
15
- switch (decision) {
16
- case "approved": return "The reviewer APPROVED this plan. Proceed with implementation exactly as described, taking any inline comments into account.";
17
- case "rejected": return "The reviewer REJECTED this plan. Do NOT proceed. Reconsider the approach based on the comments; only continue once a new plan is approved.";
18
- case "changes-requested": return "The reviewer REQUESTED CHANGES. Revise the plan to address every open comment below, then resubmit the updated plan for re-review (do not start implementation yet).";
19
- default: return "This plan has not been decided yet. Wait for the reviewer to approve, reject, or request changes.";
20
- }
21
- }
22
- /**
23
- * Resolve the line label for a plan comment: `plan` for whole-plan notes,
24
- * `12-15` for a multi-line selection, otherwise the single line number.
25
- */
26
- function lineLabel(comment) {
27
- if (comment.lineNumber === 0) return "plan";
28
- if (comment.startLineNumber && comment.startLineNumber !== comment.lineNumber) return `${comment.startLineNumber}-${comment.lineNumber}`;
29
- return `${comment.lineNumber}`;
30
- }
31
- function formatPlanReview(plan) {
32
- const lines = [];
33
- lines.push("<plan-review>");
34
- lines.push(" <instructions>");
35
- lines.push(" You are an AI coding assistant receiving a human review of a plan you submitted.");
36
- lines.push(" - The \"decision\" attribute is the headline verdict: \"approved\", \"rejected\", \"changes-requested\", or \"pending\".");
37
- lines.push(" - <decision-summary> tells you, in plain language, what to do next based on that verdict.");
38
- lines.push(" - <decision-comment> is the reviewer's overall note (may be absent).");
39
- lines.push(" - <plan-body> is the exact markdown of the plan being reviewed. Inline comments target lines within it.");
40
- lines.push(" - Each <comment> targets a line (\"line=42\"), a range (\"line=12-15\"), or the whole plan (\"line=plan\").");
41
- lines.push(" \"section\" names the nearest markdown heading for context. Only address comments with status=\"open\".");
42
- lines.push(" - <context> contains the exact plan text the comment is anchored to.");
43
- lines.push("");
44
- lines.push(" HOW TO RESPOND:");
45
- lines.push(" - If approved: proceed with the work.");
46
- lines.push(" - If changes-requested: revise the plan and resubmit it for another review round.");
47
- lines.push(" - If rejected: stop and rethink; do not implement.");
48
- lines.push(" Prefer the diffing CLI or MCP (port-agnostic, no copy-paste):");
49
- lines.push(" diffing plan reply <comment-id> --body \"...\" --model \"<your-model-name>\"");
50
- lines.push(" diffing plan resolve <comment-id>");
51
- lines.push(" diffing plan submit <revised-plan.md> --id <plan-id> # resubmit a new version for re-review");
52
- lines.push(" (Or the equivalent MCP tools: reply_to_plan_comment, resolve_plan_comment, submit_plan.)");
53
- lines.push(" </instructions>");
54
- const decidedAttr = plan.decidedAt ? ` decided-at="${new Date(plan.decidedAt).toISOString()}"` : "";
55
- lines.push(` <plan id="${escapeAttr(plan.id)}" title="${escapeAttr(plan.title)}" version="${plan.version}" decision="${plan.decision}"${decidedAttr}>`);
56
- lines.push(` <decision-summary><![CDATA[${decisionSummary(plan.decision)}]]></decision-summary>`);
57
- const trimmedDecisionComment = plan.decisionComment?.trim();
58
- if (trimmedDecisionComment) lines.push(` <decision-comment><![CDATA[${trimmedDecisionComment}]]></decision-comment>`);
59
- lines.push(` <plan-body><![CDATA[${plan.body}]]></plan-body>`);
60
- const comments = plan.comments ?? [];
61
- if (comments.length > 0) {
62
- lines.push(" <comments>");
63
- for (const comment of comments) {
64
- const sectionAttr = comment.sectionTitle ? ` section="${escapeAttr(comment.sectionTitle)}"` : "";
65
- const isoDate = new Date(comment.createdAt).toISOString();
66
- lines.push(` <comment id="${escapeAttr(comment.id)}" line="${lineLabel(comment)}"${sectionAttr} status="${comment.status}" created-at="${isoDate}">`);
67
- if (comment.lineNumber !== 0 && comment.lineContent) lines.push(` <context><![CDATA[${comment.lineContent}]]></context>`);
68
- lines.push(` <body><![CDATA[${comment.body}]]></body>`);
69
- if (comment.replies && comment.replies.length > 0) {
70
- lines.push(" <replies>");
71
- for (const reply of comment.replies) {
72
- const replyIsoDate = new Date(reply.createdAt).toISOString();
73
- const roleAttr = reply.role ? ` role="${reply.role}"` : " role=\"agent\"";
74
- const modelAttr = reply.model ? ` model="${escapeAttr(reply.model)}"` : "";
75
- lines.push(` <reply id="${escapeAttr(reply.id)}" created-at="${replyIsoDate}"${roleAttr}${modelAttr}>`);
76
- lines.push(` <![CDATA[${reply.body}]]>`);
77
- lines.push(" </reply>");
78
- }
79
- lines.push(" </replies>");
80
- }
81
- lines.push(" </comment>");
82
- }
83
- lines.push(" </comments>");
84
- }
85
- lines.push(" </plan>");
86
- lines.push("</plan-review>");
87
- return lines.join("\n");
88
- }
89
- /**
90
- * Find the nearest markdown ATX heading at or above a 1-based line, so a comment
91
- * can record which section of the plan it belongs to. Returns the heading text
92
- * without the leading `#`s, or undefined when the line precedes any heading.
93
- */
94
- function sectionTitleForLine(body, lineNumber) {
95
- if (lineNumber < 1) return void 0;
96
- const lines = body.split("\n");
97
- const end = Math.min(lineNumber, lines.length);
98
- for (let i = end - 1; i >= 0; i--) {
99
- const match = /^\s{0,3}(#{1,6})\s+(.*?)\s*#*\s*$/.exec(lines[i]);
100
- if (match) return match[2].trim();
101
- }
102
- }
103
- /**
104
- * Snapshot the plan text spanned by a 1-based, inclusive [start, end] line
105
- * range, used as the `lineContent` anchor when a comment is created without one
106
- * (e.g. posted by an agent over the API).
107
- */
108
- function extractPlanLines(body, startLine, endLine) {
109
- if (startLine < 1) return "";
110
- const lines = body.split("\n");
111
- const from = Math.max(1, startLine);
112
- const to = Math.min(endLine, lines.length);
113
- if (to < from) return "";
114
- return lines.slice(from - 1, to).join("\n");
115
- }
116
- //#endregion
117
- export { formatPlanReview as n, sectionTitleForLine as r, extractPlanLines as t };
@@ -1,132 +0,0 @@
1
- //#region src/lib/plan-format.ts
2
- /**
3
- * Serialize a reviewed plan into the `<plan-review>` XML envelope handed back to
4
- * a waiting agent. The diff-review counterpart is {@link formatComments}; this
5
- * keeps the two handoffs structurally consistent so an agent learns one shape.
6
- *
7
- * Shared by the server's `/api/plan-review/await` handoff, the `diffing plan`
8
- * CLI, and the MCP server so every channel emits byte-identical output.
9
- */
10
- function escapeAttr(value) {
11
- return value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
12
- }
13
- /** Human-readable guidance the agent should act on, derived from the verdict. */
14
- function decisionSummary(decision) {
15
- switch (decision) {
16
- case "approved": return "The reviewer APPROVED this plan. Proceed with implementation exactly as described, taking any inline comments into account.";
17
- case "rejected": return "The reviewer REJECTED this plan. Do NOT proceed. Reconsider the approach based on the comments; only continue once a new plan is approved.";
18
- case "changes-requested": return "The reviewer REQUESTED CHANGES. Revise the plan to address every open comment below, then resubmit the updated plan for re-review (do not start implementation yet).";
19
- case "comment-only": return "The reviewer chose COMMENT-ONLY mode. You MUST NOT edit any files or implement the plan. Only reply to the comments below — answer questions, provide clarification, or discuss. The decision comment (if present) is your prompt for this chat.";
20
- default: return "This plan has not been decided yet. Wait for the reviewer to approve, reject, or request changes.";
21
- }
22
- }
23
- /**
24
- * Resolve the line label for a plan comment: `plan` for whole-plan notes,
25
- * `12-15` for a multi-line selection, otherwise the single line number.
26
- */
27
- function lineLabel(comment) {
28
- if (comment.lineNumber === 0) return "plan";
29
- if (comment.startLineNumber && comment.startLineNumber !== comment.lineNumber) return `${comment.startLineNumber}-${comment.lineNumber}`;
30
- return `${comment.lineNumber}`;
31
- }
32
- function formatPlanReview(plan, options = {}) {
33
- const { viewingVersion, mode } = options;
34
- const isHistorical = viewingVersion !== void 0 && viewingVersion !== plan.version;
35
- const versions = plan.versions ?? [];
36
- const historical = isHistorical && versions.length > 0 ? versions.find((v) => v.version === viewingVersion) : void 0;
37
- const bodyToRender = historical ? historical.body : plan.body;
38
- const titleToRender = historical ? historical.title : plan.title;
39
- const visibleComments = isHistorical ? (plan.comments ?? []).filter((c) => c.createdAtPlanVersion === viewingVersion) : plan.comments ?? [];
40
- const modeAttr = mode && mode !== "standard" ? ` mode="${mode}"` : "";
41
- const lines = [];
42
- lines.push("<plan-review>");
43
- lines.push(" <instructions>");
44
- lines.push(" You are an AI coding assistant receiving a human review of a plan you submitted.");
45
- if (mode === "comment-only") lines.push(" ⚠️ COMMENT-ONLY MODE: You MUST NOT edit any files or implement the plan. Your only task is to reply to the comments below — answer questions, provide clarification, or discuss. The decision comment (if present) is your prompt for this chat.");
46
- else {
47
- lines.push(" - The \"decision\" attribute is the headline verdict: \"approved\", \"rejected\", \"changes-requested\", \"comment-only\", or \"pending\".");
48
- lines.push(" - <decision-summary> tells you, in plain language, what to do next based on that verdict.");
49
- lines.push(" - <decision-comment> is the reviewer's overall note (may be absent).");
50
- lines.push(" - <plan-body> is the exact markdown of the plan being reviewed. Inline comments target lines within it.");
51
- lines.push(" - Each <comment> targets a line (\"line=42\"), a range (\"line=12-15\"), or the whole plan (\"line=plan\").");
52
- lines.push(" \"section\" names the nearest markdown heading for context. Only address comments with status=\"open\".");
53
- lines.push(" - <context> contains the exact plan text the comment is anchored to.");
54
- lines.push("");
55
- lines.push(" HOW TO RESPOND:");
56
- lines.push(" - If approved: proceed with the work.");
57
- lines.push(" - If changes-requested: revise the plan and resubmit it for another review round.");
58
- lines.push(" - If rejected: stop and rethink; do not implement.");
59
- lines.push(" - If comment-only: do NOT implement; only reply to comments.");
60
- lines.push(" Prefer the diffing CLI or MCP (port-agnostic, no copy-paste):");
61
- lines.push(" diffing plan reply <comment-id> --body \"...\" --model \"<your-model-name>\"");
62
- lines.push(" diffing plan resolve <comment-id>");
63
- lines.push(" diffing plan submit <revised-plan.md> --id <plan-id> # resubmit a new version for re-review");
64
- lines.push(" (Or the equivalent MCP tools: reply_to_plan_comment, resolve_plan_comment, submit_plan.)");
65
- }
66
- lines.push(" </instructions>");
67
- const decidedAttr = plan.decidedAt ? ` decided-at="${new Date(plan.decidedAt).toISOString()}"` : "";
68
- const viewingAttr = isHistorical ? ` viewing-version="${viewingVersion}"` : "";
69
- lines.push(` <plan id="${escapeAttr(plan.id)}" title="${escapeAttr(titleToRender)}" version="${plan.version}" decision="${plan.decision}"${decidedAttr}${viewingAttr}${modeAttr}>`);
70
- lines.push(` <decision-summary><![CDATA[${decisionSummary(plan.decision)}]]></decision-summary>`);
71
- const trimmedDecisionComment = plan.decisionComment?.trim();
72
- if (trimmedDecisionComment) lines.push(` <decision-comment><![CDATA[${trimmedDecisionComment}]]></decision-comment>`);
73
- if (isHistorical) lines.push(` <viewing-version-info><![CDATA[Reviewing historical version ${viewingVersion} of ${plan.version}. Comments are filtered to those anchored to v${viewingVersion}.]]></viewing-version-info>`);
74
- lines.push(` <plan-body><![CDATA[${bodyToRender}]]></plan-body>`);
75
- if (visibleComments.length > 0) {
76
- lines.push(" <comments>");
77
- for (const comment of visibleComments) {
78
- const sectionAttr = comment.sectionTitle ? ` section="${escapeAttr(comment.sectionTitle)}"` : "";
79
- const isoDate = new Date(comment.createdAt).toISOString();
80
- const versionAttr = ` plan-version="${comment.createdAtPlanVersion ?? plan.version}"`;
81
- lines.push(` <comment id="${escapeAttr(comment.id)}" line="${lineLabel(comment)}"${sectionAttr} status="${comment.status}" created-at="${isoDate}"${versionAttr}>`);
82
- if (comment.lineNumber !== 0 && comment.lineContent) lines.push(` <context><![CDATA[${comment.lineContent}]]></context>`);
83
- lines.push(` <body><![CDATA[${comment.body}]]></body>`);
84
- if (comment.replies && comment.replies.length > 0) {
85
- lines.push(" <replies>");
86
- for (const reply of comment.replies) {
87
- const replyIsoDate = new Date(reply.createdAt).toISOString();
88
- const roleAttr = reply.role ? ` role="${reply.role}"` : " role=\"agent\"";
89
- const modelAttr = reply.model ? ` model="${escapeAttr(reply.model)}"` : "";
90
- lines.push(` <reply id="${escapeAttr(reply.id)}" created-at="${replyIsoDate}"${roleAttr}${modelAttr}>`);
91
- lines.push(` <![CDATA[${reply.body}]]>`);
92
- lines.push(" </reply>");
93
- }
94
- lines.push(" </replies>");
95
- }
96
- lines.push(" </comment>");
97
- }
98
- lines.push(" </comments>");
99
- }
100
- lines.push(" </plan>");
101
- lines.push("</plan-review>");
102
- return lines.join("\n");
103
- }
104
- /**
105
- * Find the nearest markdown ATX heading at or above a 1-based line, so a comment
106
- * can record which section of the plan it belongs to. Returns the heading text
107
- * without the leading `#`s, or undefined when the line precedes any heading.
108
- */
109
- function sectionTitleForLine(body, lineNumber) {
110
- if (lineNumber < 1) return void 0;
111
- const lines = body.split("\n");
112
- const end = Math.min(lineNumber, lines.length);
113
- for (let i = end - 1; i >= 0; i--) {
114
- const match = /^\s{0,3}(#{1,6})\s+(.*?)\s*#*\s*$/.exec(lines[i]);
115
- if (match) return match[2].trim();
116
- }
117
- }
118
- /**
119
- * Snapshot the plan text spanned by a 1-based, inclusive [start, end] line
120
- * range, used as the `lineContent` anchor when a comment is created without one
121
- * (e.g. posted by an agent over the API).
122
- */
123
- function extractPlanLines(body, startLine, endLine) {
124
- if (startLine < 1) return "";
125
- const lines = body.split("\n");
126
- const from = Math.max(1, startLine);
127
- const to = Math.min(endLine, lines.length);
128
- if (to < from) return "";
129
- return lines.slice(from - 1, to).join("\n");
130
- }
131
- //#endregion
132
- export { formatPlanReview as n, sectionTitleForLine as r, extractPlanLines as t };