diffing 0.2.1 → 0.4.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.
- package/README.md +169 -3
- package/dist/{cli-agent-BNwY5lZE.mjs → cli-agent-B4hU6Xay.mjs} +58 -5
- package/dist/{cli-agent-CbzXDSSF.mjs → cli-agent-B_PHd635.mjs} +58 -5
- package/dist/{cli-agent-ZAkixf4c.mjs → cli-agent-KxNAFIPf.mjs} +6 -2
- package/dist/cli-gh-CDGSpndZ.mjs +147 -0
- package/dist/cli-gh-abs-IJrz.mjs +147 -0
- package/dist/cli.mjs +1214 -56
- package/dist/client/assets/{angular-html-DsssUIMZ.js → angular-html-BVFBJbbm.js} +1 -1
- package/dist/client/assets/{angular-ts-dTg-sJ77.js → angular-ts-CbJB4bNJ.js} +1 -1
- package/dist/client/assets/{apl-C1yUKbqz.js → apl-MzqTwOQT.js} +1 -1
- package/dist/client/assets/arc-DkYz3FVO.js +1 -0
- package/dist/client/assets/architecture-7EHR7CIX-BM5HxebS.js +1 -0
- package/dist/client/assets/architectureDiagram-3BPJPVTR-CU3k1-_g.js +36 -0
- package/dist/client/assets/array-CkF66D10.js +1 -0
- package/dist/client/assets/{astro-BI07ha2y.js → astro-DDblGxmh.js} +1 -1
- package/dist/client/assets/{blade-DkzUGffS.js → blade-DlgT3iuV.js} +1 -1
- package/dist/client/assets/blockDiagram-GPEHLZMM-1lwkHRY_.js +132 -0
- package/dist/client/assets/{bsl-Dx5tFn3i.js → bsl-BrHd4RA2.js} +1 -1
- package/dist/client/assets/{c-KkuqqOvW.js → c-BL61MF4M.js} +1 -1
- package/dist/client/assets/c4Diagram-AAUBKEIU-BPBjnNM8.js +10 -0
- package/dist/client/assets/{cairo-wCCQTdA9.js → cairo-BDZ6TRZS.js} +1 -1
- package/dist/client/assets/channel-BX6tZjG6.js +1 -0
- package/dist/client/assets/chunk-2J33WTMH-C_SASPYW.js +1 -0
- package/dist/client/assets/chunk-3OPIFGDE-CTcbOBts.js +62 -0
- package/dist/client/assets/chunk-4BX2VUAB-BipHnfY4.js +1 -0
- package/dist/client/assets/chunk-4EGX6M5U-C70lfA2p.js +1 -0
- package/dist/client/assets/chunk-55IACEB6-BzJYLlnc.js +1 -0
- package/dist/client/assets/chunk-5DO6E6H7-PprNUwlI.js +1 -0
- package/dist/client/assets/chunk-5ZQYHXKU-CorupEGf.js +2 -0
- package/dist/client/assets/chunk-727SXJPM-Cqjzb4FZ.js +206 -0
- package/dist/client/assets/chunk-AQP2D5EJ-DcaAmtSe.js +231 -0
- package/dist/client/assets/chunk-BR22UD5L-D8XCYMy9.js +1 -0
- package/dist/client/assets/chunk-BSJP7CBP-CiBjSxwv.js +1 -0
- package/dist/client/assets/chunk-CSCIHK7Q-BTbf6qN3.js +124 -0
- package/dist/client/assets/chunk-FHYWG6QK-CcHPrHH1.js +1 -0
- package/dist/client/assets/chunk-FMBD7UC4-BA8_ZS2e.js +15 -0
- package/dist/client/assets/chunk-KSCS5N6A-ChcT2GOp.js +10 -0
- package/dist/client/assets/chunk-L5ZTLDWV-BjzpE0xm.js +1 -0
- package/dist/client/assets/chunk-LZXEDZCA-Bu0azrf_.js +2 -0
- package/dist/client/assets/chunk-MPE355IW-Bf9yHfDS.js +1 -0
- package/dist/client/assets/chunk-MZUSXYTE-CnUIUKI4.js +1 -0
- package/dist/client/assets/chunk-N66VUXT2-ahAf9GvV.js +1 -0
- package/dist/client/assets/chunk-ND2GUHAM-Co55RNsd.js +1 -0
- package/dist/client/assets/chunk-NNHCCRGN-DHF3V75i.js +159 -0
- package/dist/client/assets/chunk-NZK2D7GU-CtPYeO8_.js +1 -0
- package/dist/client/assets/chunk-O5CBEL6O-CzRKb_Hn.js +70 -0
- package/dist/client/assets/chunk-PUPMXCY4-D0KKIhut.js +1 -0
- package/dist/client/assets/chunk-QZHKN3VN-BCSN705V.js +1 -0
- package/dist/client/assets/chunk-UIBZB4QT-TYsZ_c8u.js +1 -0
- package/dist/client/assets/chunk-WCWK7LTN-Dj8SfnMU.js +1 -0
- package/dist/client/assets/chunk-WU5MYG2G-xPWDnrji.js +1 -0
- package/dist/client/assets/chunk-XPW4576I-CYH9wUok.js +32 -0
- package/dist/client/assets/classDiagram-4FO5ZUOK-7xfBUC5E.js +1 -0
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-CFM5yYso.js +1 -0
- package/dist/client/assets/{cobol-DRh7-jLi.js → cobol-D37UDAkO.js} +1 -1
- package/dist/client/assets/{coffee-wR_ZAh9a.js → coffee-NCjhDwWZ.js} +1 -1
- package/dist/client/assets/cose-bilkent-S5V4N54A-B8RnQ-yF.js +1 -0
- package/dist/client/assets/{cpp-OD_qyywn.js → cpp-CQUNgUz4.js} +1 -1
- package/dist/client/assets/{crystal-E4ahAddE.js → crystal-DGHLJtZ_.js} +1 -1
- package/dist/client/assets/{css-2NgE_uxz.js → css-xCgEbp_3.js} +1 -1
- package/dist/client/assets/cytoscape.esm-B7MQoI9k.js +321 -0
- package/dist/client/assets/dagre-BM42HDAG-CvmQMXPT.js +4 -0
- package/dist/client/assets/dagre-DAhKikc0.js +1 -0
- package/dist/client/assets/defaultLocale-B_TxGd0k.js +1 -0
- package/dist/client/assets/diagram-2AECGRRQ-wIyWTlXo.js +43 -0
- package/dist/client/assets/diagram-5GNKFQAL-BLMMWtHj.js +10 -0
- package/dist/client/assets/diagram-KO2AKTUF-Duz_hHky.js +3 -0
- package/dist/client/assets/diagram-LMA3HP47-CftQIrJ1.js +24 -0
- package/dist/client/assets/diagram-OG6HWLK6-7odjt2qL.js +24 -0
- package/dist/client/assets/dist-PmPhNea3.js +1 -0
- package/dist/client/assets/{edge-8mbscxxD.js → edge-C6_UFojU.js} +1 -1
- package/dist/client/assets/{elixir-CJv1b3Q6.js → elixir-B12MoaTY.js} +1 -1
- package/dist/client/assets/{elm-DUPzqZ9H.js → elm-C80KxC_R.js} +1 -1
- package/dist/client/assets/erDiagram-TEJ5UH35-DOeyf617.js +85 -0
- package/dist/client/assets/{erb-ssvEF26z.js → erb-DqelkF7l.js} +1 -1
- package/dist/client/assets/{erlang-CtK0kQ6z.js → erlang-cuhwpmsu.js} +1 -1
- package/dist/client/assets/eventmodeling-FCH6USID-hlXE2E34.js +1 -0
- package/dist/client/assets/flowDiagram-I6XJVG4X-BJX7W8r0.js +162 -0
- package/dist/client/assets/{fortran-fixed-form-DBM4e0_k.js → fortran-fixed-form-DWr0EnJn.js} +1 -1
- package/dist/client/assets/{fsharp-CmzzGQLe.js → fsharp-CQ5iYSPA.js} +1 -1
- package/dist/client/assets/ganttDiagram-6RSMTGT7-CFWnCca0.js +292 -0
- package/dist/client/assets/{gdresource-B_wbPqHd.js → gdresource-CN-lsNu5.js} +1 -1
- package/dist/client/assets/{git-commit-1z4D6NzL.js → git-commit-6e79eN7Q.js} +1 -1
- package/dist/client/assets/{git-rebase-DiWIK1Oa.js → git-rebase-7L4r_tbx.js} +1 -1
- package/dist/client/assets/gitGraph-WXDBUCRP-D_3ZhTam.js +1 -0
- package/dist/client/assets/gitGraphDiagram-PVQCEYII-oNErRHPR.js +106 -0
- package/dist/client/assets/{glimmer-js-DrHg6AuA.js → glimmer-js-8OQAbTGs.js} +1 -1
- package/dist/client/assets/{glimmer-ts-wQSGOa8A.js → glimmer-ts-3IyQiCHC.js} +1 -1
- package/dist/client/assets/{glsl-OY27QGY0.js → glsl-Bi_bzGJK.js} +1 -1
- package/dist/client/assets/graphlib-DBdw4opr.js +1 -0
- package/dist/client/assets/{graphql-CSWSqe6f.js → graphql-YcGxsBfT.js} +1 -1
- package/dist/client/assets/{hack-Bi1v624Q.js → hack-C9IpUqi6.js} +1 -1
- package/dist/client/assets/{haml-CX94zV9m.js → haml-YWDwVGeX.js} +1 -1
- package/dist/client/assets/{handlebars-C1j6wnjG.js → handlebars-zyG7ocdI.js} +1 -1
- package/dist/client/assets/{html-BcAjMlB7.js → html-CHYhpzfH.js} +1 -1
- package/dist/client/assets/{html-derivative-DcEpOzdx.js → html-derivative-BhgSILdB.js} +1 -1
- package/dist/client/assets/{http-BBxxSc6S.js → http-BPv6bUpq.js} +1 -1
- package/dist/client/assets/{hurl-CpKRNTz4.js → hurl-CpohSten.js} +1 -1
- package/dist/client/assets/{hxml-DC4KwKt2.js → hxml-nwJci6H5.js} +1 -1
- package/dist/client/assets/index-BIrpcT6-.js +3922 -0
- package/dist/client/assets/index-CMyunQt6.css +1 -0
- package/dist/client/assets/info-J43DQDTF-CAllC7mK.js +1 -0
- package/dist/client/assets/infoDiagram-5YYISTIA-D1xM4RZP.js +2 -0
- package/dist/client/assets/init-Ce66tIvf.js +1 -0
- package/dist/client/assets/ishikawaDiagram-YF4QCWOH-7DsxXa1L.js +70 -0
- package/dist/client/assets/{java-CFUlLvAA.js → java-Bt4sAY2m.js} +1 -1
- package/dist/client/assets/{javascript-C-HnT3sE.js → javascript-DZjI42QZ.js} +1 -1
- package/dist/client/assets/{jinja-CPU8RwNP.js → jinja-D2zTW07t.js} +1 -1
- package/dist/client/assets/{jison-CW0TBQOs.js → jison-Dz-ndIM5.js} +1 -1
- package/dist/client/assets/journeyDiagram-JHISSGLW-C_A1TmoL.js +139 -0
- package/dist/client/assets/{json-qUjlNuEJ.js → json-Ykn4LhOH.js} +1 -1
- package/dist/client/assets/{jsx-KWeo60kf.js → jsx-Ce8SKNSt.js} +1 -1
- package/dist/client/assets/{julia-CnJB8y2e.js → julia-DlfibiGU.js} +1 -1
- package/dist/client/assets/{just-Do22d9PP.js → just-CT2PIeY2.js} +1 -1
- package/dist/client/assets/kanban-definition-UN3LZRKU-ccKLE8Df.js +89 -0
- package/dist/client/assets/katex-eRFNlMh0.js +257 -0
- package/dist/client/assets/{latex-CCPgzvKn.js → latex-Dkfo8_p4.js} +1 -1
- package/dist/client/assets/line-BbqJI7bZ.js +1 -0
- package/dist/client/assets/linear-B7c0dSOq.js +1 -0
- package/dist/client/assets/{liquid-B9btdZoI.js → liquid-dWmg5egV.js} +1 -1
- package/dist/client/assets/{lua-IFRifurW.js → lua-6hNhLpj8.js} +1 -1
- package/dist/client/assets/{marko-CCaVBFq1.js → marko-DTVuQVoJ.js} +1 -1
- package/dist/client/assets/{mdc-BtbnOLUc.js → mdc-LbJVW6cj.js} +1 -1
- package/dist/client/assets/mermaid-parser.core-f-eKVdX9.js +4 -0
- package/dist/client/assets/mermaid.core-ClMOD6O3.js +9 -0
- package/dist/client/assets/mindmap-definition-RKZ34NQL-vaLTR09L.js +96 -0
- package/dist/client/assets/{nextflow-CApkvBGW.js → nextflow-DSfydIxt.js} +1 -1
- package/dist/client/assets/{nginx-BkbFZHVt.js → nginx-BvMTgdwH.js} +1 -1
- package/dist/client/assets/{nim-2uCd5j65.js → nim-BdGYhiTu.js} +1 -1
- package/dist/client/assets/ordinal-5ziJS8mo.js +1 -0
- package/dist/client/assets/packet-YPE3B663-Dy58IAiO.js +1 -0
- package/dist/client/assets/path-g3G46IZB.js +1 -0
- package/dist/client/assets/{perl-C4ixqSNT.js → perl-DamEOAxn.js} +1 -1
- package/dist/client/assets/{php-DJ8WOtcI.js → php-DtubpAAy.js} +1 -1
- package/dist/client/assets/pie-LRSECV5Y-FXFFfdz2.js +1 -0
- package/dist/client/assets/pieDiagram-4H26LBE5-yuTkGKaM.js +30 -0
- package/dist/client/assets/{pug-BOaafhT5.js → pug-CMYtl1BN.js} +1 -1
- package/dist/client/assets/{qml-CURE-1y4.js → qml-D76DCV4U.js} +1 -1
- package/dist/client/assets/quadrantDiagram-W4KKPZXB-Db00tlGp.js +7 -0
- package/dist/client/assets/{r-CPWmgzo3.js → r-gMTLVmYP.js} +1 -1
- package/dist/client/assets/radar-GUYGQ44K-BKTzSQ68.js +1 -0
- package/dist/client/assets/{razor-DH83VP_d.js → razor-1oOg77PO.js} +1 -1
- package/dist/client/assets/{regexp-BXVWi-t_.js → regexp-BJzbycG8.js} +1 -1
- package/dist/client/assets/requirementDiagram-4Y6WPE33-CwCGFaVe.js +84 -0
- package/dist/client/assets/rough.esm-BBrzuQ0N.js +1 -0
- package/dist/client/assets/{rst-Bbxxs6E2.js → rst-Be7RtxcU.js} +1 -1
- package/dist/client/assets/{ruby-C-TuWES4.js → ruby-oyNd3WUZ.js} +1 -1
- package/dist/client/assets/sankeyDiagram-5OEKKPKP-D78nH-eA.js +40 -0
- package/dist/client/assets/{sas-njzNYNOq.js → sas-Bx8dCxcK.js} +1 -1
- package/dist/client/assets/{scss-D2i6rHB8.js → scss-DzZEPh1d.js} +1 -1
- package/dist/client/assets/sequenceDiagram-3UESZ5HK-CEy9mjHg.js +162 -0
- package/dist/client/assets/{shaderlab-DXAhMdPo.js → shaderlab-CbbQwRPF.js} +1 -1
- package/dist/client/assets/{shellscript-D6Bxi40C.js → shellscript-t9s0AoBc.js} +1 -1
- package/dist/client/assets/{shellsession-Defxq-I6.js → shellsession-NczJO6Io.js} +1 -1
- package/dist/client/assets/{soy-D0GKXrtT.js → soy-Dl6InSac.js} +1 -1
- package/dist/client/assets/{sparql-BdcL8cbr.js → sparql-DEoxFJ5d.js} +1 -1
- package/dist/client/assets/{sql-BRW_ADkU.js → sql-DXkZEc28.js} +1 -1
- package/dist/client/assets/src-DCIMHd9M.js +1 -0
- package/dist/client/assets/{stata-w7w59F48.js → stata-DmpUDP7M.js} +1 -1
- package/dist/client/assets/stateDiagram-AJRCARHV-Cz0qtN4R.js +1 -0
- package/dist/client/assets/stateDiagram-v2-BHNVJYJU-Dye5cILT.js +1 -0
- package/dist/client/assets/{surrealql-O-lLuqz7.js → surrealql-BAZp4tA6.js} +1 -1
- package/dist/client/assets/{svelte-DN3DR5-t.js → svelte-DXBMAgu7.js} +1 -1
- package/dist/client/assets/{templ-CJ2JFoia.js → templ-CF-yfRM7.js} +1 -1
- package/dist/client/assets/{tex-CpWrf5g9.js → tex-D5tGX-j9.js} +1 -1
- package/dist/client/assets/timeline-definition-PNZ67QCA-B6_u5aFI.js +120 -0
- package/dist/client/assets/treeView-BLDUP644-DtjHwb6x.js +1 -0
- package/dist/client/assets/treemap-LRROVOQU-GqTXzMFU.js +1 -0
- package/dist/client/assets/{ts-tags-CZ6Af6Pe.js → ts-tags-DWMVxoO1.js} +1 -1
- package/dist/client/assets/{tsx-gIUSpRih.js → tsx-C6QVlWvX.js} +1 -1
- package/dist/client/assets/{twig-DwZINhmw.js → twig-DKFN0Lvm.js} +1 -1
- package/dist/client/assets/{typescript-Dj2aMECR.js → typescript-DVfrnfSW.js} +1 -1
- package/dist/client/assets/vennDiagram-CIIHVFJN-C_-TQFos.js +34 -0
- package/dist/client/assets/{vue-B5K0aWrP.js → vue-BCLQ-g1T.js} +1 -1
- package/dist/client/assets/{vue-html-DKGgrypd.js → vue-html-Ddr0JbE-.js} +1 -1
- package/dist/client/assets/{vue-vine-B5iDYTCh.js → vue-vine-CX36RUs5.js} +1 -1
- package/dist/client/assets/wardley-L42UT6IY-pROVAAhW.js +1 -0
- package/dist/client/assets/wardleyDiagram-YWT4CUSO-BJQg7Pb-.js +78 -0
- package/dist/client/assets/{xml-CbTzxfc-.js → xml-FnMA1W8C.js} +1 -1
- package/dist/client/assets/{xsl-Dj-Be6nx.js → xsl-CLduN3zs.js} +1 -1
- package/dist/client/assets/xychartDiagram-2RQKCTM6-1Ux8tle4.js +7 -0
- package/dist/client/assets/{yaml-rTK8uEjh.js → yaml-B6hNfHm7.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/{mcp-CE77qfjx.mjs → mcp-BWeWR4yd.mjs} +2 -1
- package/dist/{mcp-CFeE13n-.mjs → mcp-DNZQvKKF.mjs} +45 -1
- package/dist/{mcp-SGCrfYGo.mjs → mcp-DO4zfNZX.mjs} +45 -1
- package/dist/plan-format-DVnF8xrq.mjs +126 -0
- package/dist/plan-format-f62JWFI-.mjs +117 -0
- package/dist/plan-format-mSDtsPcC.mjs +132 -0
- package/dist/{server-lock-B4crz9-_.mjs → server-lock-D73NKKbn.mjs} +267 -133
- package/dist/{server-lock-DpCrvL-Z.mjs → server-lock-Dj9fG9md.mjs} +246 -122
- package/package.json +26 -14
- package/dist/cli-agent-BLPX3oOP.mjs +0 -443
- package/dist/cli-agent-Cfuy9fLC.mjs +0 -179
- package/dist/cli-agent-CtNivjQW.mjs +0 -179
- package/dist/cli-agent-DZBvZoXZ.mjs +0 -179
- package/dist/cli-agent-DsqbS3n7.mjs +0 -443
- package/dist/cli-agent-Vbs-ePHv.mjs +0 -443
- package/dist/cli-agent-WzJPMH52.mjs +0 -174
- package/dist/cli-agent-uYUoCA4X.mjs +0 -179
- package/dist/client/assets/index-Bwv7BWUp.js +0 -3959
- package/dist/client/assets/index-CoZyJYkw.css +0 -1
- package/dist/mcp-BQmH_By-.mjs +0 -119
- package/dist/mcp-CLgzC8_a.mjs +0 -119
- package/dist/mcp-D9E2HQZ9.mjs +0 -119
- package/dist/mcp-DKlThflu.mjs +0 -253
- package/dist/mcp-LVbLV17O.mjs +0 -119
- package/dist/mcp-nMwTAut3.mjs +0 -119
- package/dist/server-lock-BbiF7u3F.mjs +0 -493
- package/dist/server-lock-Bx9ixiF6.mjs +0 -575
- package/dist/server-lock-CAdqFSfl.mjs +0 -691
- package/dist/server-lock-DIkImokU.mjs +0 -487
- package/dist/server-lock-DbxpfF3j.mjs +0 -575
- package/dist/update-check-DJuFE9w6.mjs +0 -128
- package/dist/update-check-DSC02MWQ.mjs +0 -129
- package/dist/client/assets/{abap-CkQ0tsz-.js → abap-cWYhO34H.js} +0 -0
- package/dist/client/assets/{actionscript-3-DHm0ZfF4.js → actionscript-3-B80ndJsD.js} +0 -0
- package/dist/client/assets/{ada-DK_ua92Z.js → ada-C0C0SoYB.js} +0 -0
- package/dist/client/assets/{andromeeda-D2ccw8v4.js → andromeeda-Ch2kWS7s.js} +0 -0
- package/dist/client/assets/{apache-DXtpFu7o.js → apache-DBwBm4bB.js} +0 -0
- package/dist/client/assets/{apex-DlnRRWpl.js → apex-FcV7UxQi.js} +0 -0
- package/dist/client/assets/{applescript-CShk62ad.js → applescript-hQs8VNpS.js} +0 -0
- package/dist/client/assets/{ara-CWN-FDkm.js → ara-BOadBOZg.js} +0 -0
- package/dist/client/assets/{asciidoc-Bg-PM9Vn.js → asciidoc-BsfqiBck.js} +0 -0
- package/dist/client/assets/{asm-DKOhR24S.js → asm-C2vUqzqz.js} +0 -0
- package/dist/client/assets/{aurora-x-DpaEirL8.js → aurora-x-BHLqzt7j.js} +0 -0
- package/dist/client/assets/{awk-3ibKHffv.js → awk-D4e-eeZT.js} +0 -0
- package/dist/client/assets/{ayu-dark-ursiSH5k.js → ayu-dark-DCotN_ZT.js} +0 -0
- package/dist/client/assets/{ayu-light-DMjlrKmx.js → ayu-light-CKB6o_im.js} +0 -0
- package/dist/client/assets/{ayu-mirage-DZEMb75h.js → ayu-mirage-B38lW-C5.js} +0 -0
- package/dist/client/assets/{ballerina-xx7VNGxs.js → ballerina-BzvFqbha.js} +0 -0
- package/dist/client/assets/{bat-DGYsZ5wR.js → bat-CFyw2ERn.js} +0 -0
- package/dist/client/assets/{beancount-D_ATR1UV.js → beancount-a6Gsu5WX.js} +0 -0
- package/dist/client/assets/{berry-BqYMORfH.js → berry-C2jyz4Ah.js} +0 -0
- package/dist/client/assets/{bibtex-CQTBDajW.js → bibtex-Dyet-B83.js} +0 -0
- package/dist/client/assets/{bicep-CfNtxPrK.js → bicep-CghvUIvy.js} +0 -0
- package/dist/client/assets/{bird2-C0dUPe3I.js → bird2-nHigvs-R.js} +0 -0
- package/dist/client/assets/{c3-BUwZ5e3k.js → c3-9ZrcmAmr.js} +0 -0
- package/dist/client/assets/{cadence-C3OKDYrr.js → cadence-BPDgYNWy.js} +0 -0
- package/dist/client/assets/{catppuccin-frappe-CMnRXVZP.js → catppuccin-frappe-BY_2ofjk.js} +0 -0
- package/dist/client/assets/{catppuccin-latte-CqhXSjCC.js → catppuccin-latte-D6GXPBmA.js} +0 -0
- package/dist/client/assets/{catppuccin-macchiato-B6kneE0C.js → catppuccin-macchiato-BuW8_cyo.js} +0 -0
- package/dist/client/assets/{catppuccin-mocha-CP8YZpvj.js → catppuccin-mocha-znex9DPe.js} +0 -0
- package/dist/client/assets/{clarity-Crxe8gSr.js → clarity-Cmao5KSK.js} +0 -0
- package/dist/client/assets/{clojure-BuzOUPMr.js → clojure-D2dPuTkk.js} +0 -0
- package/dist/client/assets/{cmake-CCpZLdLI.js → cmake-DaqQuj4A.js} +0 -0
- package/dist/client/assets/{codeowners-Bo1VYpHz.js → codeowners-B748jmvc.js} +0 -0
- package/dist/client/assets/{codeql-Db01hzHE.js → codeql-CXb_8gHR.js} +0 -0
- package/dist/client/assets/{common-lisp-CMlJIc6Y.js → common-lisp-UZn9nc_5.js} +0 -0
- package/dist/client/assets/{coq-BlzBYp3f.js → coq-DtO6yBIf.js} +0 -0
- package/dist/client/assets/{csharp-kfNshAa7.js → csharp-C3YlYcLV.js} +0 -0
- package/dist/client/assets/{csv-Dr8ri5Nd.js → csv-BBwiVr0X.js} +0 -0
- package/dist/client/assets/{cue-jXfhyOwY.js → cue-ScBFXY5f.js} +0 -0
- package/dist/client/assets/{cypher-CayLeiaR.js → cypher-CGStaC1X.js} +0 -0
- package/dist/client/assets/{d-BMZQ0mAy.js → d-CuTCIvnX.js} +0 -0
- package/dist/client/assets/{dark-plus-B__q47Nr.js → dark-plus-BvePH-r3.js} +0 -0
- package/dist/client/assets/{dart-gMOEMyuz.js → dart-CqEodbm2.js} +0 -0
- package/dist/client/assets/{dax-C3t5LadU.js → dax-UdE5S0Dh.js} +0 -0
- package/dist/client/assets/{desktop-DmhXLwLR.js → desktop-DfmsfHJA.js} +0 -0
- package/dist/client/assets/{diff-togOXQX6.js → diff-CW0RWGd9.js} +0 -0
- package/dist/client/assets/{docker--6N01olR.js → docker-B1qtW4ha.js} +0 -0
- package/dist/client/assets/{dotenv-Bq930Yx8.js → dotenv-BUzOh1k8.js} +0 -0
- package/dist/client/assets/{dracula-CBkSghcw.js → dracula-kJQjC_Gy.js} +0 -0
- package/dist/client/assets/{dracula-soft-CCSYeoxL.js → dracula-soft-B3XhEjCl.js} +0 -0
- package/dist/client/assets/{dream-maker-BiMf3DHl.js → dream-maker-CBvk18nW.js} +0 -0
- package/dist/client/assets/{emacs-lisp-Dhht7he2.js → emacs-lisp-DvSgLhDc.js} +0 -0
- package/dist/client/assets/{everforest-dark-NqSz4oHS.js → everforest-dark-u0zLn75q.js} +0 -0
- package/dist/client/assets/{everforest-light-a3Yzs_lT.js → everforest-light-D3syIoAR.js} +0 -0
- package/dist/client/assets/{fennel-BExc9TZf.js → fennel-C-1kWlGf.js} +0 -0
- package/dist/client/assets/{fish-C2p-AJmZ.js → fish-CCpdtwqS.js} +0 -0
- package/dist/client/assets/{fluent-CeYzs8Qy.js → fluent-BLg032oD.js} +0 -0
- package/dist/client/assets/{fortran-free-form-BIQEK2Jw.js → fortran-free-form-Br4jRtSc.js} +0 -0
- package/dist/client/assets/{gdscript-B5JQPh_-.js → gdscript-hSAZM1eh.js} +0 -0
- package/dist/client/assets/{gdshader-vVjJ_Qr8.js → gdshader-D4XNAEs9.js} +0 -0
- package/dist/client/assets/{genie-DGl5rqC8.js → genie-DmN-ICAN.js} +0 -0
- package/dist/client/assets/{gherkin-CY_VLUnD.js → gherkin-cuHHmRcX.js} +0 -0
- package/dist/client/assets/{github-dark-ClO4AStc.js → github-dark-CEBLh0--.js} +0 -0
- package/dist/client/assets/{github-dark-default-CM0dPco8.js → github-dark-default-Dq0Z4Xai.js} +0 -0
- package/dist/client/assets/{github-dark-dimmed-Cb6xxpXY.js → github-dark-dimmed-D90YmS4w.js} +0 -0
- package/dist/client/assets/{github-dark-high-contrast-BpYtx2-M.js → github-dark-high-contrast-B6BWv1iC.js} +0 -0
- package/dist/client/assets/{github-light-default-BmnCWL6x.js → github-light-default-DsPWmj4v.js} +0 -0
- package/dist/client/assets/{github-light-high-contrast-rpagNF5O.js → github-light-high-contrast-C7aLb3kp.js} +0 -0
- package/dist/client/assets/{github-light-CeOVFgf_.js → github-light-lXSVSq5T.js} +0 -0
- package/dist/client/assets/{gleam-BarIG9kQ.js → gleam-D8VhqPDN.js} +0 -0
- package/dist/client/assets/{gn-DhYsTPYc.js → gn-BjGRlX27.js} +0 -0
- package/dist/client/assets/{gnuplot-CucLlTBc.js → gnuplot-BZCXuE4q.js} +0 -0
- package/dist/client/assets/{go-toi-uWvg.js → go-BJpWXZEs.js} +0 -0
- package/dist/client/assets/{groovy-Ds4dis_k.js → groovy-D9w3Dn-z.js} +0 -0
- package/dist/client/assets/{gruvbox-dark-hard-aPiW8pQh.js → gruvbox-dark-hard-_deksD0U.js} +0 -0
- package/dist/client/assets/{gruvbox-dark-medium-2HJCvzsS.js → gruvbox-dark-medium-CT31284j.js} +0 -0
- package/dist/client/assets/{gruvbox-dark-soft-Da97ODX9.js → gruvbox-dark-soft-BZuEUCbj.js} +0 -0
- package/dist/client/assets/{gruvbox-light-hard-BXlEipFe.js → gruvbox-light-hard-dxv4n_ZS.js} +0 -0
- package/dist/client/assets/{gruvbox-light-medium-Cun-GjGk.js → gruvbox-light-medium-BsW_fVfR.js} +0 -0
- package/dist/client/assets/{gruvbox-light-soft-Bd3qiiSw.js → gruvbox-light-soft-BiGy99gD.js} +0 -0
- package/dist/client/assets/{haskell-B_jvz5Po.js → haskell-DqDdKEgk.js} +0 -0
- package/dist/client/assets/{haxe-BRbuo5UO.js → haxe-DMg0jS3a.js} +0 -0
- package/dist/client/assets/{hcl-BzNUCtsK.js → hcl-SZIZUK_X.js} +0 -0
- package/dist/client/assets/{hjson-BxVo3sS2.js → hjson-DF1VspiE.js} +0 -0
- package/dist/client/assets/{hlsl-C8Wes1nf.js → hlsl-DPe9L0Dt.js} +0 -0
- package/dist/client/assets/{horizon-D54PjLAY.js → horizon-Ngud75Kn.js} +0 -0
- package/dist/client/assets/{horizon-bright-D9RccdIr.js → horizon-bright-Cnljd0XD.js} +0 -0
- package/dist/client/assets/{houston-CMu1N_4K.js → houston-BenZxlMr.js} +0 -0
- package/dist/client/assets/{hy-dMrJKKU_.js → hy-B0f-B1mH.js} +0 -0
- package/dist/client/assets/{imba-DG_oO8tg.js → imba-Bq3j1cW5.js} +0 -0
- package/dist/client/assets/{ini-geHw79Aj.js → ini-BayloP2U.js} +0 -0
- package/dist/client/assets/{json5-CDUsNqz6.js → json5-CRSfdIrY.js} +0 -0
- package/dist/client/assets/{jsonc-D48xcwyD.js → jsonc-y4g9DQPx.js} +0 -0
- package/dist/client/assets/{jsonl-cpIYDXEe.js → jsonl-D2paVn9r.js} +0 -0
- package/dist/client/assets/{jsonnet-Da1lhszN.js → jsonnet-CLH27mtz.js} +0 -0
- package/dist/client/assets/{jssm-B8BLrEGL.js → jssm-CPPYaqX-.js} +0 -0
- package/dist/client/assets/{kanagawa-dragon-2Sk8Rx83.js → kanagawa-dragon-Bt5mhLu1.js} +0 -0
- package/dist/client/assets/{kanagawa-lotus-CQVSWfJp.js → kanagawa-lotus-FGA3pRJk.js} +0 -0
- package/dist/client/assets/{kanagawa-wave-BKWNioLX.js → kanagawa-wave-DnLVZPAD.js} +0 -0
- package/dist/client/assets/{kdl-B-2tSRmp.js → kdl-D1BQjjnw.js} +0 -0
- package/dist/client/assets/{kotlin-DepsEzh3.js → kotlin-ndCaDnf0.js} +0 -0
- package/dist/client/assets/{kusto-BcCtXIb8.js → kusto-D-4nbkD3.js} +0 -0
- package/dist/client/assets/{laserwave-BUqkO46F.js → laserwave-D2qAZkaG.js} +0 -0
- package/dist/client/assets/{lean-CNO9ffpX.js → lean-YmtAsB0p.js} +0 -0
- package/dist/client/assets/{less-Dj0T9pWC.js → less-DyHub3ow.js} +0 -0
- package/dist/client/assets/{light-plus-C9Hnuc1T.js → light-plus-CP13QUvm.js} +0 -0
- package/dist/client/assets/{llvm-DbV9b66l.js → llvm-DCcqrY0D.js} +0 -0
- package/dist/client/assets/{log-BMblmPyH.js → log-DWAAMNbe.js} +0 -0
- package/dist/client/assets/{logo-B78qMxws.js → logo-ClQMGkNL.js} +0 -0
- package/dist/client/assets/{luau-BUd8xsdE.js → luau-CmcXFvLt.js} +0 -0
- package/dist/client/assets/{make-Ev-6cJrd.js → make-DcfJyUzm.js} +0 -0
- package/dist/client/assets/{markdown-CS4LI6sN.js → markdown-DXxotAxn.js} +0 -0
- package/dist/client/assets/{material-theme-5rA1zn0D.js → material-theme-JFoPTBSr.js} +0 -0
- package/dist/client/assets/{material-theme-darker-DGOEiL65.js → material-theme-darker-BHaqZ19v.js} +0 -0
- package/dist/client/assets/{material-theme-lighter-CULfFRX0.js → material-theme-lighter-CGnnS2bs.js} +0 -0
- package/dist/client/assets/{material-theme-ocean-LQZ9CleP.js → material-theme-ocean-Drhewjqf.js} +0 -0
- package/dist/client/assets/{material-theme-palenight-Di_f5oks.js → material-theme-palenight-DbUypmpb.js} +0 -0
- package/dist/client/assets/{matlab-C0qEtAx9.js → matlab-BlfbTznR.js} +0 -0
- package/dist/client/assets/{mdx-CzvnbLXb.js → mdx-H8fyPQd8.js} +0 -0
- package/dist/client/assets/{mermaid-BPquZaKt.js → mermaid-CWAV2dmV.js} +0 -0
- package/dist/client/assets/{min-dark-rkuIbtJV.js → min-dark-BEelvXUB.js} +0 -0
- package/dist/client/assets/{min-light-Dj_HOGsr.js → min-light-CTPBOACR.js} +0 -0
- package/dist/client/assets/{mipsasm-k5DQoS6j.js → mipsasm-BWYFAm2s.js} +0 -0
- package/dist/client/assets/{mojo-sTTDuNnR.js → mojo-DZcPJEIN.js} +0 -0
- package/dist/client/assets/{monokai-D5p-u2ij.js → monokai-DQlZXbkg.js} +0 -0
- package/dist/client/assets/{moonbit-j5ChFtBC.js → moonbit-6eslNlJL.js} +0 -0
- package/dist/client/assets/{move-Dj0Gmn6R.js → move-DxFc9-QU.js} +0 -0
- package/dist/client/assets/{narrat-DJgMz2oW.js → narrat-gv38dJOT.js} +0 -0
- package/dist/client/assets/{nextflow-groovy-eDLuZ_oi.js → nextflow-groovy-DV4H3hok.js} +0 -0
- package/dist/client/assets/{night-owl-CEdtPl3A.js → night-owl-BLcrYhaC.js} +0 -0
- package/dist/client/assets/{night-owl-light-GdSldewm.js → night-owl-light-BG-tBJOz.js} +0 -0
- package/dist/client/assets/{nix-CxIPS3pb.js → nix-NlOz3HGM.js} +0 -0
- package/dist/client/assets/{nord-3WFAz5H9.js → nord-Dm2F5_QB.js} +0 -0
- package/dist/client/assets/{nushell-GDfBmoBU.js → nushell-D86Z8aFF.js} +0 -0
- package/dist/client/assets/{objective-c-MFQ_MGUa.js → objective-c-iuJvUjCv.js} +0 -0
- package/dist/client/assets/{objective-cpp-Y83LcBE7.js → objective-cpp-C62JvfMT.js} +0 -0
- package/dist/client/assets/{ocaml-FxYfaJxu.js → ocaml-Rbryo9lg.js} +0 -0
- package/dist/client/assets/{odin-CprihY3z.js → odin-CfaOVNP_.js} +0 -0
- package/dist/client/assets/{one-dark-pro-BB6mpmmA.js → one-dark-pro-DC9SHdX0.js} +0 -0
- package/dist/client/assets/{one-light-BYLoxNtg.js → one-light-Doo39p0H.js} +0 -0
- package/dist/client/assets/{openscad-Bc1FbpOi.js → openscad-DCRhgheK.js} +0 -0
- package/dist/client/assets/{pascal-Bb4d8cUL.js → pascal-CTesTHtV.js} +0 -0
- package/dist/client/assets/{pierre-dark-cF19s-RM.js → pierre-dark-Gtc9M_gS.js} +0 -0
- package/dist/client/assets/{pierre-light-BdpX8OpD.js → pierre-light-EDxMHmhf.js} +0 -0
- package/dist/client/assets/{pkl-tM25Sq0w.js → pkl-BjUMjQkt.js} +0 -0
- package/dist/client/assets/{plastic-D3k2Xp_5.js → plastic-B3CcSpon.js} +0 -0
- package/dist/client/assets/{plsql-CLEfFhSj.js → plsql-BgKEZSSo.js} +0 -0
- package/dist/client/assets/{po-CaAzdrrh.js → po-C5s_CVt8.js} +0 -0
- package/dist/client/assets/{poimandres-bPTvT4Da.js → poimandres-BsK70ma5.js} +0 -0
- package/dist/client/assets/{polar-TG7aTGdK.js → polar-y4hX8qM0.js} +0 -0
- package/dist/client/assets/{postcss-8kqfa9f0.js → postcss-BHCm7Qae.js} +0 -0
- package/dist/client/assets/{powerquery-CtSu1Nfd.js → powerquery-C2vMt8aZ.js} +0 -0
- package/dist/client/assets/{powershell-87lLBHMy.js → powershell-DEcjmg1c.js} +0 -0
- package/dist/client/assets/{prisma-Dnf694DZ.js → prisma-Ba-Tcxy5.js} +0 -0
- package/dist/client/assets/{prolog-C0XbHTWa.js → prolog-B4o261Jv.js} +0 -0
- package/dist/client/assets/{proto-BZP-HLIb.js → proto-o3IZKiMR.js} +0 -0
- package/dist/client/assets/{puppet-CJYWgYC5.js → puppet-BC0dqZ31.js} +0 -0
- package/dist/client/assets/{purescript-B95Q6BAd.js → purescript-CLDw1y5G.js} +0 -0
- package/dist/client/assets/{python-CqTCsi7P.js → python-D1NFioGW.js} +0 -0
- package/dist/client/assets/{qmldir-DlIL4hls.js → qmldir-B7i9e9Vn.js} +0 -0
- package/dist/client/assets/{qss-BW72E0q_.js → qss-DIe6oKX8.js} +0 -0
- package/dist/client/assets/{racket-CCAimEsC.js → racket-CAOC_yyk.js} +0 -0
- package/dist/client/assets/{raku-mSuqElkM.js → raku-Ccua3vW6.js} +0 -0
- package/dist/client/assets/{red-C-DA4yBI.js → red-DtDH206x.js} +0 -0
- package/dist/client/assets/{reg-CGwMBJ2c.js → reg-CAYZT9kE.js} +0 -0
- package/dist/client/assets/{rel-JwrbYgX4.js → rel-cvB6F5nO.js} +0 -0
- package/dist/client/assets/{riscv-CoYyE75b.js → riscv-SYGtE4EN.js} +0 -0
- package/dist/client/assets/{ron-C5wrhnmJ.js → ron-CRt869SB.js} +0 -0
- package/dist/client/assets/{rose-pine-DlrMPYYd.js → rose-pine-CjBfSJ5b.js} +0 -0
- package/dist/client/assets/{rose-pine-dawn-DBHFtZD2.js → rose-pine-dawn-C0xwy7iJ.js} +0 -0
- package/dist/client/assets/{rose-pine-moon-BBfrpe5q.js → rose-pine-moon-BSNy9Ty0.js} +0 -0
- package/dist/client/assets/{rosmsg-DlimTR9t.js → rosmsg-BwrfJ66Z.js} +0 -0
- package/dist/client/assets/{rust-Cxnkxx3h.js → rust-DCKTTPxN.js} +0 -0
- package/dist/client/assets/{sass-DEyqUIpU.js → sass-CorcwySt.js} +0 -0
- package/dist/client/assets/{scala-i3RN3yAN.js → scala-DlI-OmYj.js} +0 -0
- package/dist/client/assets/{scheme-BcKdjYkO.js → scheme-CcNEGkZH.js} +0 -0
- package/dist/client/assets/{sdbl-Be_XWc3n.js → sdbl-AL_m-RO_.js} +0 -0
- package/dist/client/assets/{slack-dark-3PDtm74m.js → slack-dark-rMhrfPm6.js} +0 -0
- package/dist/client/assets/{slack-ochin-CwiuFRJD.js → slack-ochin-9w8X74hU.js} +0 -0
- package/dist/client/assets/{smalltalk-BdBlL6ks.js → smalltalk-Y2ogrfbk.js} +0 -0
- package/dist/client/assets/{snazzy-light-Dyqc8Is2.js → snazzy-light-DHr9ygpP.js} +0 -0
- package/dist/client/assets/{solarized-dark-DZiTscIX.js → solarized-dark-UPcKev9Q.js} +0 -0
- package/dist/client/assets/{solarized-light-DBcfxrfG.js → solarized-light-DUsjROvl.js} +0 -0
- package/dist/client/assets/{solidity-DH-yUSWc.js → solidity-Bfbm9QZQ.js} +0 -0
- package/dist/client/assets/{splunk-CIjc4kxs.js → splunk-6DJA2XFa.js} +0 -0
- package/dist/client/assets/{ssh-config-BKVd4drG.js → ssh-config-CbQtdF-u.js} +0 -0
- package/dist/client/assets/{stylus-tqAsmugv.js → stylus-B_iq45Sj.js} +0 -0
- package/dist/client/assets/{swift-CdDBQ3_Z.js → swift-C7KIgN-p.js} +0 -0
- package/dist/client/assets/{synthwave-84-CbbRs73K.js → synthwave-84-lf_Wt0K_.js} +0 -0
- package/dist/client/assets/{system-verilog-CBqEY-9v.js → system-verilog-C3G9wERd.js} +0 -0
- package/dist/client/assets/{systemd-khRP5zwK.js → systemd-CwxGrojj.js} +0 -0
- package/dist/client/assets/{talonscript-D_lneH-6.js → talonscript-DqnSo1EO.js} +0 -0
- package/dist/client/assets/{tasl-CLymawGe.js → tasl-T8ethp86.js} +0 -0
- package/dist/client/assets/{tcl-BRY1S87U.js → tcl-Ccl366o0.js} +0 -0
- package/dist/client/assets/{terraform-BqohMo2f.js → terraform-BBf6ZI_0.js} +0 -0
- package/dist/client/assets/{tokyo-night-BWUONxad.js → tokyo-night-BF5ata25.js} +0 -0
- package/dist/client/assets/{toml-C4c85Lwg.js → toml-C5Z_BR4r.js} +0 -0
- package/dist/client/assets/{tsv-DsZq9HBQ.js → tsv-rX8sUJs7.js} +0 -0
- package/dist/client/assets/{turtle-Dpr8zLlw.js → turtle-BM-MG8WY.js} +0 -0
- package/dist/client/assets/{typespec-DcqgATB-.js → typespec-C5gKydvR.js} +0 -0
- package/dist/client/assets/{typst-CeVxmuPg.js → typst--_5VchrY.js} +0 -0
- package/dist/client/assets/{v-C2Qsh2-1.js → v-C6PwpmTC.js} +0 -0
- package/dist/client/assets/{vala-CvZ3yL7c.js → vala-4pTaceSj.js} +0 -0
- package/dist/client/assets/{vb-B_p4qDw4.js → vb-DhoR5A6S.js} +0 -0
- package/dist/client/assets/{verilog-D8MGjxD7.js → verilog-B9f_1lPn.js} +0 -0
- package/dist/client/assets/{vesper-DossXiE1.js → vesper-CmBi_iCT.js} +0 -0
- package/dist/client/assets/{vhdl-MLyYh_Gz.js → vhdl-Cy4RAmOe.js} +0 -0
- package/dist/client/assets/{viml-BuYIArcz.js → viml-CFQW-CcD.js} +0 -0
- package/dist/client/assets/{vitesse-black-C3kc1227.js → vitesse-black-CE8RoBJP.js} +0 -0
- package/dist/client/assets/{vitesse-dark-kWOu5V36.js → vitesse-dark-BpF142p_.js} +0 -0
- package/dist/client/assets/{vitesse-light-DMtiL8bK.js → vitesse-light-CMwxPBrg.js} +0 -0
- package/dist/client/assets/{vyper-CNqG09-_.js → vyper-BW5zj9bE.js} +0 -0
- package/dist/client/assets/{wasm-BsQDV7Y0.js → wasm-BigxSLnm.js} +0 -0
- package/dist/client/assets/{wasm-DFVlQlgd.js → wasm-CSccDuAq.js} +0 -0
- package/dist/client/assets/{wenyan-BmOQge13.js → wenyan-BZzM1SQT.js} +0 -0
- package/dist/client/assets/{wgsl-CgWrmvIg.js → wgsl-xBPHbLlq.js} +0 -0
- package/dist/client/assets/{wikitext-DkwckXCk.js → wikitext-BXJWUNJK.js} +0 -0
- package/dist/client/assets/{wit-CtyVFGe7.js → wit-2GnUs67P.js} +0 -0
- package/dist/client/assets/{wolfram-CXE4FrKz.js → wolfram-DIFDmw-g.js} +0 -0
- package/dist/client/assets/{zenscript-DH15wJt0.js → zenscript-DQaUUjbx.js} +0 -0
- package/dist/client/assets/{zig-CqXN9brD.js → zig-BDepRvBi.js} +0 -0
- package/dist/{update-check-KL-2sGxE.mjs → update-check-DAPFCqpF.mjs} +1 -1
|
@@ -0,0 +1,126 @@
|
|
|
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, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
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 };
|
|
@@ -0,0 +1,117 @@
|
|
|
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, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
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 };
|
|
@@ -0,0 +1,132 @@
|
|
|
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, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
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 };
|