@diffohq/diffo 0.17.0 → 0.17.2
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/dist/cli.mjs +60 -21
- package/dist/client/assets/{abnfDiagram-O67JEVCF-C4y4PNNf.js → abnfDiagram-YUKMZFIV-DCCl7rag.js} +1 -1
- package/dist/client/assets/{arc-CFoc9vPw.js → arc-CTNHvfmK.js} +1 -1
- package/dist/client/assets/architecture-WOLXFQ4H-DedTjxXh.js +1 -0
- package/dist/client/assets/architectureDiagram-47P4ROYG-lUM1bbDm.js +36 -0
- package/dist/client/assets/{blockDiagram-BEXU5L5S-CpA03aJs.js → blockDiagram-E7TT5TSB-CcPMgsS5.js} +3 -3
- package/dist/client/assets/c-Cz4nF6n_.js +1 -0
- package/dist/client/assets/{c4Diagram-YGBWAQC7-CYMsQutS.js → c4Diagram-CRA5TL53-bjY81K90.js} +2 -2
- package/dist/client/assets/channel-pdhhFqps.js +1 -0
- package/dist/client/assets/chunk-2BW5OAIV-o5RcgrVm.js +10 -0
- package/dist/client/assets/chunk-3YJQHVM4-DyXpsW73.js +2 -0
- package/dist/client/assets/{chunk-7PRAP22T-jooxFnA3.js → chunk-4EA7E6EY-DXcHzA4c.js} +1 -1
- package/dist/client/assets/{chunk-GWA4HPMP-CQHzk-qZ.js → chunk-7TKQ45FW-COALLfSo.js} +1 -1
- package/dist/client/assets/{chunk-GTNCS2PH-B4TC-ScJ.js → chunk-AW2ZBBNX-DQVomlA0.js} +3 -3
- package/dist/client/assets/{chunk-5DYCD2WN-BmQXtfyC.js → chunk-DBDB3WZW-BGe0utmm.js} +1 -1
- package/dist/client/assets/{chunk-MBY4JIJT-CH5sGI-E.js → chunk-E2ZNV5FY-sBUMLz3a.js} +8 -8
- package/dist/client/assets/chunk-EU5HNXII-DynXz8Hb.js +213 -0
- package/dist/client/assets/chunk-FVRAUYC3-B6UxZYLr.js +2 -0
- package/dist/client/assets/{chunk-742MDFTN-BTP6JNdv.js → chunk-HJ2JQQFS-BPuBOIfd.js} +1 -1
- package/dist/client/assets/{chunk-NETBCI7D-B5tMFrlX.js → chunk-HTAEGDNF-COsHxO6d.js} +1 -1
- package/dist/client/assets/{chunk-WEXAMYUT-Dnrs1Ld4.js → chunk-KQW6MTUR-D6ZD4OBU.js} +1 -1
- package/dist/client/assets/chunk-NGNAAXSQ-C2Wy9Xmz.js +136 -0
- package/dist/client/assets/{chunk-UA2S7LBM-DVU8-vtb.js → chunk-NTY3LDVX-BBhs2zfd.js} +1 -1
- package/dist/client/assets/chunk-VPRB5NB3-OEYWGbyv.js +127 -0
- package/dist/client/assets/{chunk-7INBJB4K-BsVmPyov.js → chunk-XC4XBNZT-BHfIsy-X.js} +10 -10
- package/dist/client/assets/{chunk-XXDRQBXY-BDPDpedV.js → chunk-XXDRQBXY-CwVoOjeq.js} +1 -1
- package/dist/client/assets/{classDiagram-v2-NBCMYWYE-DS3TfzLh.js → classDiagram-v2-K4WV4PDN-Cwjs5Fo7.js} +3 -3
- package/dist/client/assets/{core-C38j58LO.js → core-DON0baQC.js} +1 -1
- package/dist/client/assets/cose-bilkent-JH36ORCC-CanIWrad.js +1 -0
- package/dist/client/assets/cpp-DzjeI0uH.js +1 -0
- package/dist/client/assets/css-DgaLhXQH.js +1 -0
- package/dist/client/assets/cynefin-EF2NZ3EQ-BcMV4FxN.js +1 -0
- package/dist/client/assets/cynefinDiagram-3GCD6N5R-COPLrt2e.js +62 -0
- package/dist/client/assets/cytoscape.esm-CHBj4VkZ.js +321 -0
- package/dist/client/assets/dagre-W4DXFKR2-DcO2bm-4.js +4 -0
- package/dist/client/assets/diagram-2UJZ2QOL-D9Ko2dkJ.js +200 -0
- package/dist/client/assets/{diagram-3UASUU5V-DSX_Tpmv.js → diagram-OVF4WLC6-0c5jMwqP.js} +11 -11
- package/dist/client/assets/{diagram-CDSNMT55-BiLgPVAJ.js → diagram-PFPMY2P6-DZEfp0lQ.js} +4 -4
- package/dist/client/assets/{diagram-MLGK6HIB-BFgscT9R.js → diagram-UMYRVEAY-_k3WfcjG.js} +1 -1
- package/dist/client/assets/diagram-YEKJPTXX-D0oEcVM1.js +41 -0
- package/dist/client/assets/diagram-ZIFT7M5P-CpFbAbYg.js +3 -0
- package/dist/client/assets/{dist-CMYkujym.js → dist-BDtfWmIE.js} +1 -1
- package/dist/client/assets/{dist-B77Lw20A.js → dist-CnRLr4w2.js} +16 -16
- package/dist/client/assets/{ebnfDiagram-ZINNZB2B-x4kmvZzD.js → ebnfDiagram-VR2GEFS7-BbG7QvtS.js} +1 -1
- package/dist/client/assets/elk-IJKZMXRS-D9Wm7A4L.js +27 -0
- package/dist/client/assets/{engine-oniguruma-Ds-VbuSq.js → engine-oniguruma-5di9SuAb.js} +1 -1
- package/dist/client/assets/{erDiagram-OPXOYQCR-Bo1yx5ec.js → erDiagram-O2IAPWRE-BZ1E6x8g.js} +2 -2
- package/dist/client/assets/eventmodeling-K75KTNOO-6jgX-7pG.js +1 -0
- package/dist/client/assets/flowDiagram-OXPTDLAJ-DTCqNqx8.js +1 -0
- package/dist/client/assets/ganttDiagram-R7TSEDQI-BRYFh2jn.js +292 -0
- package/dist/client/assets/gitGraph-VSP46ZUC-DxTvmQVO.js +1 -0
- package/dist/client/assets/gitGraphDiagram-XJZIOB7I-DkJ3V-lX.js +106 -0
- package/dist/client/assets/html-BWDvXlHg.js +1 -0
- package/dist/client/assets/index-BSqcB6X4.js +93 -0
- package/dist/client/assets/info-OHQRW6UA-BKHS23vw.js +1 -0
- package/dist/client/assets/{infoDiagram-VRGFBTTK-CautEhHX.js → infoDiagram-5W2HQ5XZ-BVCz6PFV.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-OU5B5YK6-C8BUCcyV.js → ishikawaDiagram-K3B6WC7H-B4tLpzvT.js} +3 -3
- package/dist/client/assets/java-_ATy9zCa.js +1 -0
- package/dist/client/assets/javascript-CpIGwZ_Y.js +1 -0
- package/dist/client/assets/{journeyDiagram-ZHPQQLJL-BA5WG8Xf.js → journeyDiagram-COXZFDF6-DpkzSOyg.js} +3 -3
- package/dist/client/assets/json-C3WlssX3.js +1 -0
- package/dist/client/assets/jsx-C4yDKi0A.js +1 -0
- package/dist/client/assets/{kanban-definition-PNTS6WVX-DRXzEJBa.js → kanban-definition-P3RFRI5V-BkfcUIAv.js} +9 -9
- package/dist/client/assets/{katex-ZlcWpGUi.js → katex-DJhrJSbw.js} +1 -1
- package/dist/client/assets/{line-DAcfMF01.js → line-CUU9NBUe.js} +1 -1
- package/dist/client/assets/{linear-uYi6Pah9.js → linear-Cp1XQoq1.js} +1 -1
- package/dist/client/assets/mermaid-parser.core-Dk_N9wHc.js +7 -0
- package/dist/client/assets/mermaid.core-DFKfv8Jn.js +44 -0
- package/dist/client/assets/{mindmap-definition-NLK3R4M7-Bn4VqIyk.js → mindmap-definition-LZFPQGKD-Dgw3CRjk.js} +24 -24
- package/dist/client/assets/packet-JDAUHWVQ-2Mzusa3F.js +1 -0
- package/dist/client/assets/{pegDiagram-GJSIUBJH-BD1vaxu_.js → pegDiagram-BGZESJAR-DXCIRLqW.js} +1 -1
- package/dist/client/assets/pie-XZMESJXO-UECjOJM3.js +1 -0
- package/dist/client/assets/pieDiagram-CAPJLFHJ-DnDCb_c1.js +39 -0
- package/dist/client/assets/{quadrantDiagram-O4NWA36T-Co7yTeQ3.js → quadrantDiagram-GDMTTRAM-DRYlGsWP.js} +3 -3
- package/dist/client/assets/radar-ABXABTNO-D38H1WiB.js +1 -0
- package/dist/client/assets/railroad-I3PHUGI6-Cdf9S4Mf.js +1 -0
- package/dist/client/assets/railroad-abnf-LNEFI6M7-Y5BNc5fo.js +1 -0
- package/dist/client/assets/railroad-ebnf-DWYD2UWJ-C2o0Hwuh.js +1 -0
- package/dist/client/assets/railroad-peg-JR7BVNR7-ByFwOhZy.js +1 -0
- package/dist/client/assets/{railroadDiagram-XR7U4H2S-B2dydE7a.js → railroadDiagram-SM67HX2B-md_7ESU-.js} +1 -1
- package/dist/client/assets/{requirementDiagram-PLB6GJNP-orHF7QGe.js → requirementDiagram-X7JNWC4A-DV9e6p3j.js} +4 -4
- package/dist/client/assets/sankeyDiagram-UM26HJRW-CeZSnliY.js +40 -0
- package/dist/client/assets/sequenceDiagram-ZO4K6R2Y-2AFkjcMu.js +169 -0
- package/dist/client/assets/shellscript-CVTB3cr6.js +1 -0
- package/dist/client/assets/sql-CfM2IJm3.js +1 -0
- package/dist/client/assets/src-WAdTNUSJ.js +1 -0
- package/dist/client/assets/{stateDiagram-v2-GCMORJYK-CIs80eMe.js → stateDiagram-v2-TBUQTH76-CHxwC_Ic.js} +2 -2
- package/dist/client/assets/swimlanes-N4OXWK64-Cqxh_G4l.js +1 -0
- package/dist/client/assets/swimlanesDiagram-K3J5GTZL-CBFCal5k.js +8 -0
- package/dist/client/assets/{timeline-definition-EJHVYXUP-Bbz9sh3O.js → timeline-definition-YOQAKGHF-BUIhWEtW.js} +4 -4
- package/dist/client/assets/treeView-D4JQ5SDB-xtykCGnU.js +1 -0
- package/dist/client/assets/treemap-SAJKECNS-C51gkxvB.js +1 -0
- package/dist/client/assets/tsx-CGosfAUg.js +1 -0
- package/dist/client/assets/typescript-Bb1J8qyy.js +1 -0
- package/dist/client/assets/usecaseDiagram-VIAY4XPW-DG6OBLoV.js +328 -0
- package/dist/client/assets/{vennDiagram-UO4OBE2U-DvMMdO42.js → vennDiagram-BLWOH2XV-BHp7FuOy.js} +3 -3
- package/dist/client/assets/wardley-7MLQ67FV-D9GUzXWu.js +1 -0
- package/dist/client/assets/{wardleyDiagram-VNRHLVJA-CX0grRSr.js → wardleyDiagram-YMQ3BMBF-G-sqVoSl.js} +3 -3
- package/dist/client/assets/xml-DuKfbPI6.js +1 -0
- package/dist/client/assets/xychartDiagram-TAQBALBS-BURBvnuK.js +7 -0
- package/dist/client/assets/yaml-DDA_XMNu.js +1 -0
- package/dist/client/index.html +1 -1
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/skills/diffo/SKILL.md +7 -4
- package/dist/client/assets/architecture-7GRP2DOG-D0AGQ72s.js +0 -1
- package/dist/client/assets/architectureDiagram-NJMV4G6O-Dr2fN1vr.js +0 -36
- package/dist/client/assets/c-DWGmR78Y.js +0 -1
- package/dist/client/assets/channel-BktdIn5n.js +0 -1
- package/dist/client/assets/chunk-3FUC2YCW-BjQ1itX5.js +0 -2
- package/dist/client/assets/chunk-7M6MHVWA-CsHA_fwz.js +0 -213
- package/dist/client/assets/chunk-FOHPRMQF-DzxwRta7.js +0 -161
- package/dist/client/assets/chunk-O7XYJQB3-LPw4VP6e.js +0 -126
- package/dist/client/assets/chunk-Z7XXMR3K-C5ewXtqS.js +0 -10
- package/dist/client/assets/chunk-ZIGJFQKS-C3kX-TWN.js +0 -2
- package/dist/client/assets/cose-bilkent-JH36ORCC-DbTnvWg3.js +0 -1
- package/dist/client/assets/cpp-CJIxL8VH.js +0 -1
- package/dist/client/assets/css-DUjzNfgv.js +0 -1
- package/dist/client/assets/cynefin-OW5HDTMX-BNjAi5zC.js +0 -1
- package/dist/client/assets/cynefinDiagram-VND7K2PF-DO7VFekp.js +0 -62
- package/dist/client/assets/cytoscape.esm-Yq6u8L66.js +0 -321
- package/dist/client/assets/dagre-6A5THRUB-_yf_g5Eu.js +0 -4
- package/dist/client/assets/diagram-22UHCM2B-C_0zfVyF.js +0 -200
- package/dist/client/assets/diagram-ATOU4E4O-BjdH8AkF.js +0 -3
- package/dist/client/assets/diagram-MPIPVDR6-BuoIMiDa.js +0 -41
- package/dist/client/assets/elk-276RUBZZ-YAyM0RBx.js +0 -27
- package/dist/client/assets/eventmodeling-NTZA5JFV-G8nAQ-r0.js +0 -1
- package/dist/client/assets/flowDiagram-KWPJA3E3-JYut8MuN.js +0 -1
- package/dist/client/assets/ganttDiagram-FUAMR5RP-CIi9ZaVr.js +0 -292
- package/dist/client/assets/gitGraph-4MIJSDKK-DPr2GO72.js +0 -1
- package/dist/client/assets/gitGraphDiagram-X574FWY7-8akAig1Y.js +0 -106
- package/dist/client/assets/html-BlpXnbzK.js +0 -1
- package/dist/client/assets/index-IIP4HzAT.js +0 -93
- package/dist/client/assets/info-A6RAGUB7-Gtb-Ecti.js +0 -1
- package/dist/client/assets/java-DxlWrXwe.js +0 -1
- package/dist/client/assets/javascript-Yelw-5ZN.js +0 -1
- package/dist/client/assets/json-CaljABEy.js +0 -1
- package/dist/client/assets/jsx-hEbJ82HF.js +0 -1
- package/dist/client/assets/mermaid-parser.core-CUupN43F.js +0 -7
- package/dist/client/assets/mermaid.core-P7Zn0OkI.js +0 -44
- package/dist/client/assets/packet-AYTQ26CC-CCcEthJT.js +0 -1
- package/dist/client/assets/pie-WAS4IAKB-DJrFAJNb.js +0 -1
- package/dist/client/assets/pieDiagram-5QR66LMP-BHamJTzC.js +0 -39
- package/dist/client/assets/radar-RG4KPBEZ-C2VAxB0O.js +0 -1
- package/dist/client/assets/railroad-74A4TZTK-dcSfLPuR.js +0 -1
- package/dist/client/assets/railroad-abnf-HS5TGJTU-CZqf5C4_.js +0 -1
- package/dist/client/assets/railroad-ebnf-LZEXJU2U-BkzQPC_g.js +0 -1
- package/dist/client/assets/railroad-peg-WCYAUIDC-CnjsL3Wl.js +0 -1
- package/dist/client/assets/sankeyDiagram-IPEJSGJF-C_OsMuGS.js +0 -40
- package/dist/client/assets/sequenceDiagram-PO4LG4MO-Dh6-7-gO.js +0 -169
- package/dist/client/assets/shellscript-BiGZg9Om.js +0 -1
- package/dist/client/assets/sql-BOsskAmu.js +0 -1
- package/dist/client/assets/src-CoUI9Pvh.js +0 -1
- package/dist/client/assets/swimlanes-2SLR337P-Dwo3Yt9h.js +0 -1
- package/dist/client/assets/swimlanesDiagram-TC7HE7FX-CINzeMsu.js +0 -8
- package/dist/client/assets/treeView-Q6P3EWNA-HHdzOu-n.js +0 -1
- package/dist/client/assets/treemap-WGGIJYW6-Bc3AMsxh.js +0 -1
- package/dist/client/assets/tsx-5f3ulCja.js +0 -1
- package/dist/client/assets/typescript-Utq2Cl8c.js +0 -1
- package/dist/client/assets/usecaseDiagram-POWQR4AR-Dx1EDbri.js +0 -328
- package/dist/client/assets/wardley-WFR3VGLG-BqMvXOfu.js +0 -1
- package/dist/client/assets/xml-CoDIzWF0.js +0 -1
- package/dist/client/assets/xychartDiagram-PMCCYNJV-BQQA3oHd.js +0 -7
- package/dist/client/assets/yaml-CxbubiML.js +0 -1
package/dist/cli.mjs
CHANGED
|
@@ -362,6 +362,17 @@ function buildConnectAsk(isDev, repoPath, home) {
|
|
|
362
362
|
*/
|
|
363
363
|
const POLL_STANCE = "a tracked background task when its completion wakes you on its own, so the reviewer can keep talking to you in chat meanwhile; if it would not, hold it in the foreground and do not end your turn while it runs — never a detached process";
|
|
364
364
|
/**
|
|
365
|
+
* When the first poll starts: in the same response as the open, before the
|
|
366
|
+
* guide and before any chat work. The poll is the one step with no later
|
|
367
|
+
* surface — every other command's ack says "then poll", but an agent that
|
|
368
|
+
* shares the URL and turns to chat work never runs another diffo command, and
|
|
369
|
+
* the review sits with no listener until the user notices. Stated once here
|
|
370
|
+
* and interpolated into the open's next step, the skill and `help agent`.
|
|
371
|
+
*/
|
|
372
|
+
const POLL_NOW = "now — in this same response, right after sharing the URL, before the guide and before anything the user asked for in chat: the review has no listener until it runs, and a turn that ends with it open and no attended poll leaves the reviewer talking to nobody";
|
|
373
|
+
/** The one exception to POLL_NOW, for harnesses whose poll holds the turn. */
|
|
374
|
+
const POLL_NOW_FOREGROUND = "only when that means a foreground poll does the guide go before it";
|
|
375
|
+
/**
|
|
365
376
|
* The tab-title doctrine — the few words an agent hands its first poll, which
|
|
366
377
|
* become the browser tab's name. Stated once and interpolated into every
|
|
367
378
|
* surface that teaches it (the skill, `help agent`, the open-time next step),
|
|
@@ -642,7 +653,7 @@ function prFrame(pr) {
|
|
|
642
653
|
*/
|
|
643
654
|
function guideNudge(hasGuide, D = AUTHOR_DOCTRINE) {
|
|
644
655
|
if (hasGuide) return null;
|
|
645
|
-
return `share the URL above with the user right now, as a message line, before anything else. Then, while they open it, orient them if this changeset needs it (${D.guide.when}): post a guide — one comment on the whole changeset: \`${CLI_COMMANDS.guide}\` (no file, so it anchors to the changeset; it appears live at the top of their review). It is ${D.guide.what}. Not in it: ${GUIDE.order}. How much: ${GUIDE.budget}. ${D.guide.stance}. \`diffo help guide\` has the diagram legend and one example.`;
|
|
656
|
+
return `share the URL above with the user right now, as a message line, before anything else. Then, with the poll running while they open it, orient them if this changeset needs it (${D.guide.when}): post a guide — one comment on the whole changeset: \`${CLI_COMMANDS.guide}\` (no file, so it anchors to the changeset; it appears live at the top of their review). It is ${D.guide.what}. Not in it: ${GUIDE.order}. How much: ${GUIDE.budget}. ${D.guide.stance}. \`diffo help guide\` has the diagram legend and one example.`;
|
|
646
657
|
}
|
|
647
658
|
/**
|
|
648
659
|
* Printed by `diffo` (open) next to the guide nudge while the review has neither
|
|
@@ -1452,7 +1463,15 @@ The loop:
|
|
|
1452
1463
|
ending every message with it while you stay attached.
|
|
1453
1464
|
Attached without ever seeing the URL (a takeover, a fresh session)?
|
|
1454
1465
|
\`diffo status\` prints it.
|
|
1455
|
-
2.
|
|
1466
|
+
2. Listen: run \`${CLI_COMMANDS.firstPoll}\` ${POLL_NOW}. Hold it as
|
|
1467
|
+
${POLL_STANCE}; ${POLL_NOW_FOREGROUND}. It blocks until the
|
|
1468
|
+
reviewer acts, then prints one JSON payload naming the threads to act on.
|
|
1469
|
+
The title is ${TAB_TITLE.what}: ${TAB_TITLE.why}. Write it the way it is
|
|
1470
|
+
read: ${TAB_TITLE.shape} (${TAB_TITLE.examples}). Send it ${TAB_TITLE.when};
|
|
1471
|
+
every other poll is a plain \`diffo poll\`.
|
|
1472
|
+
Killed or timed out? Re-run it; feedback is held in the review, not the
|
|
1473
|
+
poll.
|
|
1474
|
+
3. Guide: post one only when the changeset needs orientation:
|
|
1456
1475
|
${GUIDE.when}.
|
|
1457
1476
|
Right after sharing the URL, while the reviewer opens the page, post ONE
|
|
1458
1477
|
comment on the whole changeset (\`diffo comment -m "…"\`, no file). It is
|
|
@@ -1463,7 +1482,7 @@ The loop:
|
|
|
1463
1482
|
Legend: ${GUIDE.legend}; \`diffo help guide\` has them, and one example.
|
|
1464
1483
|
It lands live at the top of their review; never hold the URL back for it.
|
|
1465
1484
|
If the changeset later shifts under the guide, ${GUIDE.update}.
|
|
1466
|
-
|
|
1485
|
+
4. Layers: offer them when the changeset reads better in order:
|
|
1467
1486
|
${LAYERS.suggest}.
|
|
1468
1487
|
Flag it at open with \`diffo layers --suggest "<why, in one line>"\` and
|
|
1469
1488
|
say so in your handoff ("say layers and I'll outline it"). Post the
|
|
@@ -1473,14 +1492,6 @@ The loop:
|
|
|
1473
1492
|
Summary: ${LAYERS.summary}. Diagram: ${LAYERS.diagram}.
|
|
1474
1493
|
Order: ${LAYERS.order}. ${LAYERS.mechanical}. ${LAYERS.stance}.
|
|
1475
1494
|
${LAYERS.replace}. \`diffo help layers\` has the shape.
|
|
1476
|
-
4. Listen: run \`${CLI_COMMANDS.firstPoll}\`; it blocks until the reviewer
|
|
1477
|
-
acts, then prints one JSON payload naming the threads to act on. Run it
|
|
1478
|
-
attended: ${POLL_STANCE}.
|
|
1479
|
-
The title is ${TAB_TITLE.what}: ${TAB_TITLE.why}. Write it the way it is
|
|
1480
|
-
read: ${TAB_TITLE.shape} (${TAB_TITLE.examples}). Send it ${TAB_TITLE.when};
|
|
1481
|
-
every other poll is a plain \`diffo poll\`.
|
|
1482
|
-
Killed or timed out? Re-run it; feedback is held in the review, not the
|
|
1483
|
-
poll.
|
|
1484
1495
|
5. Act: \`[issue]\` threads want a code change; \`[question]\` threads want an
|
|
1485
1496
|
answer in the reply and no edit. Your edits reach the reviewer live.
|
|
1486
1497
|
6. Reply: \`diffo reply <threadId> --message "<text>"\` (pipe long replies on
|
|
@@ -1501,8 +1512,11 @@ The loop:
|
|
|
1501
1512
|
9. Detach: run \`diffo end\` when the review is over or the user moves on.
|
|
1502
1513
|
|
|
1503
1514
|
Rules:
|
|
1504
|
-
-
|
|
1505
|
-
|
|
1515
|
+
- An open review with no attended poll is a broken state: never end a turn
|
|
1516
|
+
in it. Ending every message with the URL does not make up for it.
|
|
1517
|
+
- Make no edits nobody asked for; the reviewer is mid-read, and an unrelated
|
|
1518
|
+
edit moves the diff under them. Edits the user asks for in chat are theirs
|
|
1519
|
+
to ask for: do them, attached — attaching never waits for chat work.
|
|
1506
1520
|
- One attached agent at a time: the newest poll carries the review; don't
|
|
1507
1521
|
re-poll to take it back from another session; tell the user instead. When
|
|
1508
1522
|
a poll says it took the review over, or returns status "superseded", say so
|
|
@@ -3536,6 +3550,20 @@ async function fetchPrHeadAsync(root, number, remote = "origin") {
|
|
|
3536
3550
|
function fetchBranch(root, branch, remote = "origin") {
|
|
3537
3551
|
fetchSync(root, [remote, branch]);
|
|
3538
3552
|
}
|
|
3553
|
+
async function fetchBranchAsync(root, branch, remote = "origin") {
|
|
3554
|
+
await execFileAsync("git", [
|
|
3555
|
+
"fetch",
|
|
3556
|
+
"--quiet",
|
|
3557
|
+
remote,
|
|
3558
|
+
branch
|
|
3559
|
+
], {
|
|
3560
|
+
cwd: root,
|
|
3561
|
+
encoding: "utf-8",
|
|
3562
|
+
maxBuffer: MAX_BUFFER,
|
|
3563
|
+
timeout: FETCH_TIMEOUT_MS,
|
|
3564
|
+
env: FETCH_ENV
|
|
3565
|
+
});
|
|
3566
|
+
}
|
|
3539
3567
|
function revParse(root, ref) {
|
|
3540
3568
|
try {
|
|
3541
3569
|
return git(root, [
|
|
@@ -5157,11 +5185,19 @@ function prepareWorktree(repoPath, ref, baseBranch, db, home = homedir()) {
|
|
|
5157
5185
|
* Move an existing worktree to the pull request's head, if it is clean.
|
|
5158
5186
|
* `headSha` is what the forge just reported: the fetch runs only when the
|
|
5159
5187
|
* local ref is not there yet, so a quiet PR costs no network on any tick.
|
|
5188
|
+
*
|
|
5189
|
+
* The base branch is fetched with the head. The diff is cut at the merge-base
|
|
5190
|
+
* with `<remote>/<baseBranch>`, and a head that moved has usually caught up
|
|
5191
|
+
* with the base: against the base as it was at the open, every commit the
|
|
5192
|
+
* base gained in between reads as the pull request's own change.
|
|
5160
5193
|
*/
|
|
5161
|
-
async function advanceWorktree(repoPath, worktreePath, ref, headSha) {
|
|
5194
|
+
async function advanceWorktree(repoPath, worktreePath, ref, headSha, baseBranch) {
|
|
5162
5195
|
const root = resolve(repoPath);
|
|
5163
5196
|
const head = prHeadRef(ref.number);
|
|
5164
|
-
if (revParse(root, head) !== headSha)
|
|
5197
|
+
if (revParse(root, head) !== headSha) {
|
|
5198
|
+
const remote = remoteForPr(root, ref);
|
|
5199
|
+
await Promise.all([fetchPrHeadAsync(root, ref.number, remote), fetchBranchAsync(root, baseBranch, remote)]);
|
|
5200
|
+
}
|
|
5165
5201
|
const sha = revParse(root, head);
|
|
5166
5202
|
if (sha === null) return null;
|
|
5167
5203
|
if (revParse(worktreePath, "HEAD") === sha) return {
|
|
@@ -5337,14 +5373,14 @@ var PrPuller = class {
|
|
|
5337
5373
|
}
|
|
5338
5374
|
if (before && before.head.sha !== pr.head.sha) log?.(`pull request head moved ${before.head.sha.slice(0, 7)} → ${pr.head.sha.slice(0, 7)}`);
|
|
5339
5375
|
try {
|
|
5340
|
-
const moved = await advanceWorktree(this.deps.mainRepo, this.deps.worktree, ref, pr.head.sha);
|
|
5376
|
+
const moved = await advanceWorktree(this.deps.mainRepo, this.deps.worktree, ref, pr.head.sha, this.deps.baseBranch);
|
|
5341
5377
|
this.lastFetchError = null;
|
|
5342
5378
|
if (moved?.moved) {
|
|
5343
5379
|
log?.(`worktree advanced to ${moved.sha.slice(0, 7)}`);
|
|
5344
5380
|
await store.refresh();
|
|
5345
5381
|
}
|
|
5346
5382
|
} catch (err) {
|
|
5347
|
-
const message = `could not fetch the pull request
|
|
5383
|
+
const message = `could not fetch the pull request: ${err.message.split("\n")[0]}`;
|
|
5348
5384
|
if (message !== this.lastFetchError) {
|
|
5349
5385
|
this.lastFetchError = message;
|
|
5350
5386
|
log?.(message);
|
|
@@ -8046,6 +8082,7 @@ function startServer(options) {
|
|
|
8046
8082
|
ref: options.pr.ref,
|
|
8047
8083
|
mainRepo: options.pr.mainRepo,
|
|
8048
8084
|
worktree: options.root,
|
|
8085
|
+
baseBranch: options.pr.baseBranch,
|
|
8049
8086
|
store,
|
|
8050
8087
|
review,
|
|
8051
8088
|
db,
|
|
@@ -9175,11 +9212,11 @@ async function printAgentNextStep(port, pr) {
|
|
|
9175
9212
|
const review = await fetchReviewState(port);
|
|
9176
9213
|
const D = doctrineFor(pr ? { pr } : null);
|
|
9177
9214
|
if (pr) console.log(`note: ${prOpenNote(repoPath, pr)}`);
|
|
9215
|
+
console.log(pr ? `next: run \`${CLI_COMMANDS.poll}\` ${POLL_NOW}. Hold it as ${POLL_STANCE}; ${POLL_NOW_FOREGROUND}. It receives the reviewer's private questions; the pull request already names their tab (\`diffo help agent\` prints the whole loop)` : `next: run \`${CLI_COMMANDS.firstPoll}\` ${POLL_NOW}. Hold it as ${POLL_STANCE}; ${POLL_NOW_FOREGROUND}. It receives the reviewer's feedback; the title is ${TAB_TITLE.what} (${TAB_TITLE.examples}): ${TAB_TITLE.why} (\`diffo help agent\` prints the whole loop)`);
|
|
9178
9216
|
const nudge = review ? guideNudge(findGuideThread(review) !== void 0, D) : null;
|
|
9179
|
-
if (nudge) console.log(`
|
|
9217
|
+
if (nudge) console.log(`then: ${nudge}`);
|
|
9180
9218
|
const layers = review ? layersNudge(review, D) : null;
|
|
9181
9219
|
if (layers) console.log(`also: ${layers}`);
|
|
9182
|
-
console.log(pr ? `next: run \`${CLI_COMMANDS.poll}\` to receive the reviewer's private questions; the pull request already names their tab (\`diffo help agent\` prints the whole loop)` : `next: run \`${CLI_COMMANDS.firstPoll}\` to receive the reviewer's feedback; the title is ${TAB_TITLE.what} (${TAB_TITLE.examples}): ${TAB_TITLE.why} (\`diffo help agent\` prints the whole loop)`);
|
|
9183
9220
|
}
|
|
9184
9221
|
/**
|
|
9185
9222
|
* Dev builds serve the client from the checkout's `dist/client`, which nothing
|
|
@@ -9233,12 +9270,13 @@ async function openPullRequest(target, ref, baseOverride, explicitPr) {
|
|
|
9233
9270
|
}
|
|
9234
9271
|
if (pr.state !== "open") process.stderr.write(`diffo: pull request #${pr.number} is ${pr.state}, opening it read-mostly\n`);
|
|
9235
9272
|
const mainRepo = mainRepoOf(repoPath);
|
|
9273
|
+
const baseBranch = baseOverride ?? pr.base.ref;
|
|
9236
9274
|
const db = new DiffoDb();
|
|
9237
9275
|
let prepared;
|
|
9238
9276
|
try {
|
|
9239
9277
|
const own = worktreePathFor(mainRepo, ref.number);
|
|
9240
9278
|
for (const entry of sweepWorktrees(db, mainRepo, { except: own })) if (entry.outcome === "removed") process.stderr.write(`diffo: removed the worktree for ${entry.record.prKey} (${entry.reason})\n`);
|
|
9241
|
-
prepared = prepareWorktree(mainRepo, ref,
|
|
9279
|
+
prepared = prepareWorktree(mainRepo, ref, baseBranch, db);
|
|
9242
9280
|
} catch (err) {
|
|
9243
9281
|
fail(`could not check the pull request out: ${err.message}`);
|
|
9244
9282
|
} finally {
|
|
@@ -9252,7 +9290,8 @@ async function openPullRequest(target, ref, baseOverride, explicitPr) {
|
|
|
9252
9290
|
context: {
|
|
9253
9291
|
ref,
|
|
9254
9292
|
forge,
|
|
9255
|
-
mainRepo
|
|
9293
|
+
mainRepo,
|
|
9294
|
+
baseBranch
|
|
9256
9295
|
}
|
|
9257
9296
|
};
|
|
9258
9297
|
}
|
package/dist/client/assets/{abnfDiagram-O67JEVCF-C4y4PNNf.js → abnfDiagram-YUKMZFIV-DCCl7rag.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e,t}from"./mermaid-parser.core-
|
|
1
|
+
import{m as e,t}from"./mermaid-parser.core-Dk_N9wHc.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-WAdTNUSJ.js";import"./chunk-VPRB5NB3-OEYWGbyv.js";import{n as i,r as a,t as o}from"./chunk-AW2ZBBNX-DQVomlA0.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";import"./mermaid.core-DFKfv8Jn.js";var c=e().RailroadAbnf.parser.LangiumParser,l=n(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformAlternation`),u=n(e=>{let t=e.elements.map(f);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformConcatenation`),d=n(e=>{if(e.includes(`*`)){let[t,n]=e.split(`*`);return{min:t?parseInt(t,10):0,max:n?parseInt(n,10):1/0}}let t=parseInt(e,10);return{min:t,max:t}},`parseRepeat`),f=n(e=>{let t=p(e.primary);if(!e.repeat)return t;let{min:n,max:r}=d(e.repeat);return n===0&&r===1?{type:`optional`,element:t}:{type:`repetition`,element:t,min:n,max:r}},`transformElement`),p=n(e=>{switch(e.$type){case`AbnfStringLiteral`:return{type:`terminal`,value:e.value};case`AbnfNumVal`:return{type:`terminal`,value:e.value};case`AbnfRuleName`:return{type:`nonterminal`,name:e.name};case`AbnfGroup`:return l(e.element);case`AbnfOptionalGroup`:return{type:`optional`,element:l(e.element)};default:throw Error(`Unsupported ABNF primary node: ${e.$type}`)}},`transformPrimary`),m=n(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=n(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(m(e)))},`populateDb`),g={parser:{parse:n(e=>{o.clear(),r.debug(`[ABNF Parser] Starting Langium parse`);let n=c.parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new t(n);let i=n.value;r.debug(`[ABNF Parser] Parsed rules:`,i.rules.length),h(i),r.debug(`[ABNF Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{g as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,t}from"./path-fybaL0A-.js";import{a as n,c as r,d as i,f as a,i as o,l as s,m as c,n as l,o as u,p as d,r as f,u as p}from"./dist-
|
|
1
|
+
import{n as e,t}from"./path-fybaL0A-.js";import{a as n,c as r,d as i,f as a,i as o,l as s,m as c,n as l,o as u,p as d,r as f,u as p}from"./dist-BDtfWmIE.js";function m(e){return e.innerRadius}function h(e){return e.outerRadius}function g(e){return e.startAngle}function _(e){return e.endAngle}function v(e){return e&&e.padAngle}function y(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<1e-12))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function b(e,t,n,r,i,a,o){var c=e-n,l=t-r,u=(o?a:-a)/d(c*c+l*l),f=u*l,p=-u*c,m=e+f,h=t+p,g=n+f,_=r+p,v=(m+g)/2,y=(h+_)/2,b=g-m,x=_-h,S=b*b+x*x,C=i-a,w=m*_-g*h,T=(x<0?-1:1)*d(s(0,C*C*S-w*w)),E=(w*x-b*T)/S,D=(-w*b-x*T)/S,O=(w*x+b*T)/S,k=(-w*b+x*T)/S,A=E-v,j=D-y,M=O-v,N=k-y;return A*A+j*j>M*M+N*N&&(E=O,D=k),{cx:E,cy:D,x01:-f,y01:-p,x11:E*(i/C-1),y11:D*(i/C-1)}}function x(){var s=m,x=h,S=e(0),C=null,w=g,T=_,E=v,D=null,O=t(k);function k(){var e,t,m=+s.apply(this,arguments),h=+x.apply(this,arguments),g=w.apply(this,arguments)-r,_=T.apply(this,arguments)-r,v=l(_-g),k=_>g;if(D||=e=O(),h<m&&(t=h,h=m,m=t),!(h>1e-12))D.moveTo(0,0);else if(v>c-1e-12)D.moveTo(h*u(g),h*a(g)),D.arc(0,0,h,g,_,!k),m>1e-12&&(D.moveTo(m*u(_),m*a(_)),D.arc(0,0,m,_,g,k));else{var A=g,j=_,M=g,N=_,P=v,F=v,I=E.apply(this,arguments)/2,L=I>1e-12&&(C?+C.apply(this,arguments):d(m*m+h*h)),R=p(l(h-m)/2,+S.apply(this,arguments)),z=R,B=R,V,H;if(L>1e-12){var U=o(L/m*a(I)),W=o(L/h*a(I));(P-=U*2)>1e-12?(U*=k?1:-1,M+=U,N-=U):(P=0,M=N=(g+_)/2),(F-=W*2)>1e-12?(W*=k?1:-1,A+=W,j-=W):(F=0,A=j=(g+_)/2)}var G=h*u(A),K=h*a(A),q=m*u(N),J=m*a(N);if(R>1e-12){var Y=h*u(j),X=h*a(j),Z=m*u(M),Q=m*a(M),$;if(v<i){if($=y(G,K,Z,Q,Y,X,q,J)){var ee=G-$[0],te=K-$[1],ne=Y-$[0],re=X-$[1],ie=1/a(f((ee*ne+te*re)/(d(ee*ee+te*te)*d(ne*ne+re*re)))/2),ae=d($[0]*$[0]+$[1]*$[1]);z=p(R,(m-ae)/(ie-1)),B=p(R,(h-ae)/(ie+1))}else z=B=0}}F>1e-12?B>1e-12?(V=b(Z,Q,G,K,h,B,k),H=b(Y,X,q,J,h,B,k),D.moveTo(V.cx+V.x01,V.cy+V.y01),B<R?D.arc(V.cx,V.cy,B,n(V.y01,V.x01),n(H.y01,H.x01),!k):(D.arc(V.cx,V.cy,B,n(V.y01,V.x01),n(V.y11,V.x11),!k),D.arc(0,0,h,n(V.cy+V.y11,V.cx+V.x11),n(H.cy+H.y11,H.cx+H.x11),!k),D.arc(H.cx,H.cy,B,n(H.y11,H.x11),n(H.y01,H.x01),!k))):(D.moveTo(G,K),D.arc(0,0,h,A,j,!k)):D.moveTo(G,K),!(m>1e-12)||!(P>1e-12)?D.lineTo(q,J):z>1e-12?(V=b(q,J,Y,X,m,-z,k),H=b(G,K,Z,Q,m,-z,k),D.lineTo(V.cx+V.x01,V.cy+V.y01),z<R?D.arc(V.cx,V.cy,z,n(V.y01,V.x01),n(H.y01,H.x01),!k):(D.arc(V.cx,V.cy,z,n(V.y01,V.x01),n(V.y11,V.x11),!k),D.arc(0,0,m,n(V.cy+V.y11,V.cx+V.x11),n(H.cy+H.y11,H.cx+H.x11),k),D.arc(H.cx,H.cy,z,n(H.y11,H.x11),n(H.y01,H.x01),!k))):D.arc(0,0,m,N,M,k)}if(D.closePath(),e)return D=null,e+``||null}return k.centroid=function(){var e=(+s.apply(this,arguments)+ +x.apply(this,arguments))/2,t=(+w.apply(this,arguments)+ +T.apply(this,arguments))/2-i/2;return[u(t)*e,a(t)*e]},k.innerRadius=function(t){return arguments.length?(s=typeof t==`function`?t:e(+t),k):s},k.outerRadius=function(t){return arguments.length?(x=typeof t==`function`?t:e(+t),k):x},k.cornerRadius=function(t){return arguments.length?(S=typeof t==`function`?t:e(+t),k):S},k.padRadius=function(t){return arguments.length?(C=t==null?null:typeof t==`function`?t:e(+t),k):C},k.startAngle=function(t){return arguments.length?(w=typeof t==`function`?t:e(+t),k):w},k.endAngle=function(t){return arguments.length?(T=typeof t==`function`?t:e(+t),k):T},k.padAngle=function(t){return arguments.length?(E=typeof t==`function`?t:e(+t),k):E},k.context=function(e){return arguments.length?(D=e??null,k):D},k}export{x as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-NGNAAXSQ-C2Wy9Xmz.js";export{M as createArchitectureServices}from"./mermaid-parser.core-Dk_N9wHc.js";
|