@self-review/serve 1.45.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 +128 -0
- package/dist/cli.js +839 -0
- package/dist/cli.js.map +1 -0
- package/dist/client/assets/_basePickBy-DzL66huQ.js +1 -0
- package/dist/client/assets/_baseUniq-D_kA9hnK.js +1 -0
- package/dist/client/assets/arc-LxCcHggQ.js +1 -0
- package/dist/client/assets/architectureDiagram-VXUJARFQ-BmSW2FCh.js +36 -0
- package/dist/client/assets/blockDiagram-VD42YOAC-Duz6oS5b.js +122 -0
- package/dist/client/assets/c4Diagram-YG6GDRKO-Bv4P72yB.js +10 -0
- package/dist/client/assets/channel-ydExFSqY.js +1 -0
- package/dist/client/assets/chunk-4BX2VUAB-D2GfUqwd.js +1 -0
- package/dist/client/assets/chunk-55IACEB6-C68L7s0h.js +1 -0
- package/dist/client/assets/chunk-B4BG7PRW-BtVwfswM.js +165 -0
- package/dist/client/assets/chunk-DI55MBZ5-BDdO91wt.js +220 -0
- package/dist/client/assets/chunk-FMBD7UC4-tB9OepVI.js +15 -0
- package/dist/client/assets/chunk-QN33PNHL-HjKgp1PB.js +1 -0
- package/dist/client/assets/chunk-QZHKN3VN-GT04-vw7.js +1 -0
- package/dist/client/assets/chunk-TZMSLE5B-DpxXSXMp.js +1 -0
- package/dist/client/assets/classDiagram-2ON5EDUG-Dg8dmmRD.js +1 -0
- package/dist/client/assets/classDiagram-v2-WZHVMYZB-Dg8dmmRD.js +1 -0
- package/dist/client/assets/clone-Bq6xpRgi.js +1 -0
- package/dist/client/assets/cose-bilkent-S5V4N54A-Ds41oEbD.js +1 -0
- package/dist/client/assets/cytoscape.esm-5J0xJHOV.js +321 -0
- package/dist/client/assets/dagre-6UL2VRFP-DZiEousR.js +4 -0
- package/dist/client/assets/defaultLocale-DX6XiGOO.js +1 -0
- package/dist/client/assets/diagram-PSM6KHXK-0_alnUMs.js +24 -0
- package/dist/client/assets/diagram-QEK2KX5R-KFaKVdU8.js +43 -0
- package/dist/client/assets/diagram-S2PKOQOG-C2Dy10VG.js +24 -0
- package/dist/client/assets/erDiagram-Q2GNP2WA-_P7rrcgu.js +60 -0
- package/dist/client/assets/flowDiagram-NV44I4VS-BvC6gSn5.js +162 -0
- package/dist/client/assets/ganttDiagram-JELNMOA3-DjzuVPeB.js +267 -0
- package/dist/client/assets/gitGraphDiagram-V2S2FVAM-B9fPDqqA.js +65 -0
- package/dist/client/assets/graph-BqLQdgDA.js +1 -0
- package/dist/client/assets/index-CAXQd1OO.js +286 -0
- package/dist/client/assets/index-CmSvc3Wo.css +1 -0
- package/dist/client/assets/infoDiagram-HS3SLOUP-DiMCwlkY.js +2 -0
- package/dist/client/assets/init-Gi6I4Gst.js +1 -0
- package/dist/client/assets/journeyDiagram-XKPGCS4Q-Dn5WdzPP.js +139 -0
- package/dist/client/assets/kanban-definition-3W4ZIXB7-D-BINTOt.js +89 -0
- package/dist/client/assets/katex-DhXJpUyf.js +261 -0
- package/dist/client/assets/layout-Bo5pDIcD.js +1 -0
- package/dist/client/assets/linear-CNmY37sq.js +1 -0
- package/dist/client/assets/mermaid.core-DfADLZQ1.js +250 -0
- package/dist/client/assets/mindmap-definition-VGOIOE7T-H5HwEwuX.js +68 -0
- package/dist/client/assets/ordinal-Cboi1Yqb.js +1 -0
- package/dist/client/assets/pieDiagram-ADFJNKIX-RiZa5XQN.js +30 -0
- package/dist/client/assets/quadrantDiagram-AYHSOK5B-CFFX55h2.js +7 -0
- package/dist/client/assets/requirementDiagram-UZGBJVZJ-B6JBcV1I.js +64 -0
- package/dist/client/assets/sankeyDiagram-TZEHDZUN-GZT80dnc.js +10 -0
- package/dist/client/assets/sequenceDiagram-WL72ISMW-CbUqoUma.js +145 -0
- package/dist/client/assets/stateDiagram-FKZM4ZOC-LEb-ZQVV.js +1 -0
- package/dist/client/assets/stateDiagram-v2-4FDKWEC3-BYGHA8iw.js +1 -0
- package/dist/client/assets/timeline-definition-IT6M3QCI-Cm1Kd50N.js +61 -0
- package/dist/client/assets/treemap-GDKQZRPO-CWXk-dEb.js +160 -0
- package/dist/client/assets/xychartDiagram-PRI3JC2R-BUllxp6G.js +7 -0
- package/dist/client/index.html +29 -0
- package/dist/core/src/apply-suggestion.d.ts +76 -0
- package/dist/core/src/apply-suggestion.d.ts.map +1 -0
- package/dist/core/src/apply-suggestion.js +109 -0
- package/dist/core/src/apply-suggestion.js.map +1 -0
- package/dist/core/src/config.d.ts +3 -0
- package/dist/core/src/config.d.ts.map +1 -0
- package/dist/core/src/config.js +196 -0
- package/dist/core/src/config.js.map +1 -0
- package/dist/core/src/diff-parser.d.ts +3 -0
- package/dist/core/src/diff-parser.d.ts.map +1 -0
- package/dist/core/src/diff-parser.js +236 -0
- package/dist/core/src/diff-parser.js.map +1 -0
- package/dist/core/src/directory-scanner.d.ts +18 -0
- package/dist/core/src/directory-scanner.d.ts.map +1 -0
- package/dist/core/src/directory-scanner.js +99 -0
- package/dist/core/src/directory-scanner.js.map +1 -0
- package/dist/core/src/fetch-comments.d.ts +69 -0
- package/dist/core/src/fetch-comments.d.ts.map +1 -0
- package/dist/core/src/fetch-comments.js +180 -0
- package/dist/core/src/fetch-comments.js.map +1 -0
- package/dist/core/src/file-type-utils.d.ts +16 -0
- package/dist/core/src/file-type-utils.d.ts.map +1 -0
- package/dist/core/src/file-type-utils.js +106 -0
- package/dist/core/src/file-type-utils.js.map +1 -0
- package/dist/core/src/forge-provider.d.ts +123 -0
- package/dist/core/src/forge-provider.d.ts.map +1 -0
- package/dist/core/src/forge-provider.js +68 -0
- package/dist/core/src/forge-provider.js.map +1 -0
- package/dist/core/src/fs-utils.d.ts +7 -0
- package/dist/core/src/fs-utils.d.ts.map +1 -0
- package/dist/core/src/fs-utils.js +20 -0
- package/dist/core/src/fs-utils.js.map +1 -0
- package/dist/core/src/git-diff-args.d.ts +38 -0
- package/dist/core/src/git-diff-args.d.ts.map +1 -0
- package/dist/core/src/git-diff-args.js +170 -0
- package/dist/core/src/git-diff-args.js.map +1 -0
- package/dist/core/src/git-diff-loader.d.ts +14 -0
- package/dist/core/src/git-diff-loader.d.ts.map +1 -0
- package/dist/core/src/git-diff-loader.js +30 -0
- package/dist/core/src/git-diff-loader.js.map +1 -0
- package/dist/core/src/git.d.ts +52 -0
- package/dist/core/src/git.d.ts.map +1 -0
- package/dist/core/src/git.js +191 -0
- package/dist/core/src/git.js.map +1 -0
- package/dist/core/src/github-provider.d.ts +7 -0
- package/dist/core/src/github-provider.d.ts.map +1 -0
- package/dist/core/src/github-provider.js +151 -0
- package/dist/core/src/github-provider.js.map +1 -0
- package/dist/core/src/gitlab-provider.d.ts +10 -0
- package/dist/core/src/gitlab-provider.d.ts.map +1 -0
- package/dist/core/src/gitlab-provider.js +207 -0
- package/dist/core/src/gitlab-provider.js.map +1 -0
- package/dist/core/src/guide-loader.d.ts +23 -0
- package/dist/core/src/guide-loader.d.ts.map +1 -0
- package/dist/core/src/guide-loader.js +95 -0
- package/dist/core/src/guide-loader.js.map +1 -0
- package/dist/core/src/guide-parser.d.ts +34 -0
- package/dist/core/src/guide-parser.d.ts.map +1 -0
- package/dist/core/src/guide-parser.js +136 -0
- package/dist/core/src/guide-parser.js.map +1 -0
- package/dist/core/src/guide-schema.d.ts +2 -0
- package/dist/core/src/guide-schema.d.ts.map +1 -0
- package/dist/core/src/guide-schema.js +202 -0
- package/dist/core/src/guide-schema.js.map +1 -0
- package/dist/core/src/ignore-filter.d.ts +8 -0
- package/dist/core/src/ignore-filter.d.ts.map +1 -0
- package/dist/core/src/ignore-filter.js +16 -0
- package/dist/core/src/ignore-filter.js.map +1 -0
- package/dist/core/src/index.d.ts +38 -0
- package/dist/core/src/index.d.ts.map +1 -0
- package/dist/core/src/index.js +54 -0
- package/dist/core/src/index.js.map +1 -0
- package/dist/core/src/materializer.d.ts +60 -0
- package/dist/core/src/materializer.d.ts.map +1 -0
- package/dist/core/src/materializer.js +255 -0
- package/dist/core/src/materializer.js.map +1 -0
- package/dist/core/src/payload-sizing.d.ts +20 -0
- package/dist/core/src/payload-sizing.d.ts.map +1 -0
- package/dist/core/src/payload-sizing.js +74 -0
- package/dist/core/src/payload-sizing.js.map +1 -0
- package/dist/core/src/remote-mode.d.ts +89 -0
- package/dist/core/src/remote-mode.d.ts.map +1 -0
- package/dist/core/src/remote-mode.js +193 -0
- package/dist/core/src/remote-mode.js.map +1 -0
- package/dist/core/src/review-handlers.d.ts +160 -0
- package/dist/core/src/review-handlers.d.ts.map +1 -0
- package/dist/core/src/review-handlers.js +463 -0
- package/dist/core/src/review-handlers.js.map +1 -0
- package/dist/core/src/staged-untracked.d.ts +12 -0
- package/dist/core/src/staged-untracked.d.ts.map +1 -0
- package/dist/core/src/staged-untracked.js +21 -0
- package/dist/core/src/staged-untracked.js.map +1 -0
- package/dist/core/src/startup-mode.d.ts +6 -0
- package/dist/core/src/startup-mode.d.ts.map +1 -0
- package/dist/core/src/startup-mode.js +73 -0
- package/dist/core/src/startup-mode.js.map +1 -0
- package/dist/core/src/synthetic-diff.d.ts +21 -0
- package/dist/core/src/synthetic-diff.d.ts.map +1 -0
- package/dist/core/src/synthetic-diff.js +104 -0
- package/dist/core/src/synthetic-diff.js.map +1 -0
- package/dist/core/src/thread-mapper.d.ts +39 -0
- package/dist/core/src/thread-mapper.d.ts.map +1 -0
- package/dist/core/src/thread-mapper.js +217 -0
- package/dist/core/src/thread-mapper.js.map +1 -0
- package/dist/core/src/types.d.ts +2 -0
- package/dist/core/src/types.d.ts.map +1 -0
- package/dist/core/src/types.js +2 -0
- package/dist/core/src/types.js.map +1 -0
- package/dist/core/src/xml-parser.d.ts +15 -0
- package/dist/core/src/xml-parser.d.ts.map +1 -0
- package/dist/core/src/xml-parser.js +237 -0
- package/dist/core/src/xml-parser.js.map +1 -0
- package/dist/core/src/xml-serializer.d.ts +4 -0
- package/dist/core/src/xml-serializer.d.ts.map +1 -0
- package/dist/core/src/xml-serializer.js +923 -0
- package/dist/core/src/xml-serializer.js.map +1 -0
- package/dist/react/src/ReviewPanel.d.ts +72 -0
- package/dist/react/src/ReviewPanel.d.ts.map +1 -0
- package/dist/react/src/ReviewPanel.js +51 -0
- package/dist/react/src/ReviewPanel.js.map +1 -0
- package/dist/react/src/SingleFileReview.d.ts +49 -0
- package/dist/react/src/SingleFileReview.d.ts.map +1 -0
- package/dist/react/src/SingleFileReview.js +41 -0
- package/dist/react/src/SingleFileReview.js.map +1 -0
- package/dist/react/src/adapter.d.ts +72 -0
- package/dist/react/src/adapter.d.ts.map +1 -0
- package/dist/react/src/adapter.js +2 -0
- package/dist/react/src/adapter.js.map +1 -0
- package/dist/react/src/components/Comments/AttachmentDropZone.d.ts +10 -0
- package/dist/react/src/components/Comments/AttachmentDropZone.d.ts.map +1 -0
- package/dist/react/src/components/Comments/AttachmentDropZone.js +52 -0
- package/dist/react/src/components/Comments/AttachmentDropZone.js.map +1 -0
- package/dist/react/src/components/Comments/AttachmentImage.d.ts +6 -0
- package/dist/react/src/components/Comments/AttachmentImage.d.ts.map +1 -0
- package/dist/react/src/components/Comments/AttachmentImage.js +50 -0
- package/dist/react/src/components/Comments/AttachmentImage.js.map +1 -0
- package/dist/react/src/components/Comments/AttachmentThumbnail.d.ts +6 -0
- package/dist/react/src/components/Comments/AttachmentThumbnail.d.ts.map +1 -0
- package/dist/react/src/components/Comments/AttachmentThumbnail.js +16 -0
- package/dist/react/src/components/Comments/AttachmentThumbnail.js.map +1 -0
- package/dist/react/src/components/Comments/CategorySelector.d.ts +6 -0
- package/dist/react/src/components/Comments/CategorySelector.d.ts.map +1 -0
- package/dist/react/src/components/Comments/CategorySelector.js +27 -0
- package/dist/react/src/components/Comments/CategorySelector.js.map +1 -0
- package/dist/react/src/components/Comments/CommentDisplay.d.ts +7 -0
- package/dist/react/src/components/Comments/CommentDisplay.d.ts.map +1 -0
- package/dist/react/src/components/Comments/CommentDisplay.js +103 -0
- package/dist/react/src/components/Comments/CommentDisplay.js.map +1 -0
- package/dist/react/src/components/Comments/CommentInput.d.ts +11 -0
- package/dist/react/src/components/Comments/CommentInput.d.ts.map +1 -0
- package/dist/react/src/components/Comments/CommentInput.js +81 -0
- package/dist/react/src/components/Comments/CommentInput.js.map +1 -0
- package/dist/react/src/components/Comments/ComposerCore.d.ts +49 -0
- package/dist/react/src/components/Comments/ComposerCore.d.ts.map +1 -0
- package/dist/react/src/components/Comments/ComposerCore.js +91 -0
- package/dist/react/src/components/Comments/ComposerCore.js.map +1 -0
- package/dist/react/src/components/Comments/EmojiAutocomplete.d.ts +14 -0
- package/dist/react/src/components/Comments/EmojiAutocomplete.d.ts.map +1 -0
- package/dist/react/src/components/Comments/EmojiAutocomplete.js +19 -0
- package/dist/react/src/components/Comments/EmojiAutocomplete.js.map +1 -0
- package/dist/react/src/components/Comments/ReplyDisplay.d.ts +22 -0
- package/dist/react/src/components/Comments/ReplyDisplay.d.ts.map +1 -0
- package/dist/react/src/components/Comments/ReplyDisplay.js +38 -0
- package/dist/react/src/components/Comments/ReplyDisplay.js.map +1 -0
- package/dist/react/src/components/Comments/ReplyInput.d.ts +9 -0
- package/dist/react/src/components/Comments/ReplyInput.d.ts.map +1 -0
- package/dist/react/src/components/Comments/ReplyInput.js +47 -0
- package/dist/react/src/components/Comments/ReplyInput.js.map +1 -0
- package/dist/react/src/components/Comments/SuggestionApplyControl.d.ts +27 -0
- package/dist/react/src/components/Comments/SuggestionApplyControl.d.ts.map +1 -0
- package/dist/react/src/components/Comments/SuggestionApplyControl.js +103 -0
- package/dist/react/src/components/Comments/SuggestionApplyControl.js.map +1 -0
- package/dist/react/src/components/Comments/SuggestionBlock.d.ts +26 -0
- package/dist/react/src/components/Comments/SuggestionBlock.d.ts.map +1 -0
- package/dist/react/src/components/Comments/SuggestionBlock.js +33 -0
- package/dist/react/src/components/Comments/SuggestionBlock.js.map +1 -0
- package/dist/react/src/components/Comments/SuggestionPanel.d.ts +8 -0
- package/dist/react/src/components/Comments/SuggestionPanel.d.ts.map +1 -0
- package/dist/react/src/components/Comments/SuggestionPanel.js +12 -0
- package/dist/react/src/components/Comments/SuggestionPanel.js.map +1 -0
- package/dist/react/src/components/DiffViewer/DiffContentArea.d.ts +35 -0
- package/dist/react/src/components/DiffViewer/DiffContentArea.d.ts.map +1 -0
- package/dist/react/src/components/DiffViewer/DiffContentArea.js +40 -0
- package/dist/react/src/components/DiffViewer/DiffContentArea.js.map +1 -0
- package/dist/react/src/components/DiffViewer/DiffViewer.d.ts +4 -0
- package/dist/react/src/components/DiffViewer/DiffViewer.d.ts.map +1 -0
- package/dist/react/src/components/DiffViewer/DiffViewer.js +110 -0
- package/dist/react/src/components/DiffViewer/DiffViewer.js.map +1 -0
- package/dist/react/src/components/DiffViewer/EmptyDiffMessage.d.ts +6 -0
- package/dist/react/src/components/DiffViewer/EmptyDiffMessage.d.ts.map +1 -0
- package/dist/react/src/components/DiffViewer/EmptyDiffMessage.js +18 -0
- package/dist/react/src/components/DiffViewer/EmptyDiffMessage.js.map +1 -0
- package/dist/react/src/components/DiffViewer/EmptyLinePane.d.ts +2 -0
- package/dist/react/src/components/DiffViewer/EmptyLinePane.d.ts.map +1 -0
- package/dist/react/src/components/DiffViewer/EmptyLinePane.js +5 -0
- package/dist/react/src/components/DiffViewer/EmptyLinePane.js.map +1 -0
- package/dist/react/src/components/DiffViewer/ExpandContextBar.d.ts +10 -0
- package/dist/react/src/components/DiffViewer/ExpandContextBar.d.ts.map +1 -0
- package/dist/react/src/components/DiffViewer/ExpandContextBar.js +16 -0
- package/dist/react/src/components/DiffViewer/ExpandContextBar.js.map +1 -0
- package/dist/react/src/components/DiffViewer/FileSection.d.ts +9 -0
- package/dist/react/src/components/DiffViewer/FileSection.d.ts.map +1 -0
- package/dist/react/src/components/DiffViewer/FileSection.js +137 -0
- package/dist/react/src/components/DiffViewer/FileSection.js.map +1 -0
- package/dist/react/src/components/DiffViewer/FileSectionBody.d.ts +13 -0
- package/dist/react/src/components/DiffViewer/FileSectionBody.d.ts.map +1 -0
- package/dist/react/src/components/DiffViewer/FileSectionBody.js +8 -0
- package/dist/react/src/components/DiffViewer/FileSectionBody.js.map +1 -0
- package/dist/react/src/components/DiffViewer/FileSectionHeader.d.ts +16 -0
- package/dist/react/src/components/DiffViewer/FileSectionHeader.d.ts.map +1 -0
- package/dist/react/src/components/DiffViewer/FileSectionHeader.js +53 -0
- package/dist/react/src/components/DiffViewer/FileSectionHeader.js.map +1 -0
- package/dist/react/src/components/DiffViewer/FrontMatterTable.d.ts +6 -0
- package/dist/react/src/components/DiffViewer/FrontMatterTable.d.ts.map +1 -0
- package/dist/react/src/components/DiffViewer/FrontMatterTable.js +30 -0
- package/dist/react/src/components/DiffViewer/FrontMatterTable.js.map +1 -0
- package/dist/react/src/components/DiffViewer/GuideChapterDivider.d.ts +20 -0
- package/dist/react/src/components/DiffViewer/GuideChapterDivider.d.ts.map +1 -0
- package/dist/react/src/components/DiffViewer/GuideChapterDivider.js +27 -0
- package/dist/react/src/components/DiffViewer/GuideChapterDivider.js.map +1 -0
- package/dist/react/src/components/DiffViewer/GuideOverviewContent.d.ts +16 -0
- package/dist/react/src/components/DiffViewer/GuideOverviewContent.d.ts.map +1 -0
- package/dist/react/src/components/DiffViewer/GuideOverviewContent.js +56 -0
- package/dist/react/src/components/DiffViewer/GuideOverviewContent.js.map +1 -0
- package/dist/react/src/components/DiffViewer/GuideOverviewDialog.d.ts +12 -0
- package/dist/react/src/components/DiffViewer/GuideOverviewDialog.d.ts.map +1 -0
- package/dist/react/src/components/DiffViewer/GuideOverviewDialog.js +13 -0
- package/dist/react/src/components/DiffViewer/GuideOverviewDialog.js.map +1 -0
- package/dist/react/src/components/DiffViewer/GuideOverviewPanel.d.ts +8 -0
- package/dist/react/src/components/DiffViewer/GuideOverviewPanel.d.ts.map +1 -0
- package/dist/react/src/components/DiffViewer/GuideOverviewPanel.js +16 -0
- package/dist/react/src/components/DiffViewer/GuideOverviewPanel.js.map +1 -0
- package/dist/react/src/components/DiffViewer/HunkHeader.d.ts +5 -0
- package/dist/react/src/components/DiffViewer/HunkHeader.d.ts.map +1 -0
- package/dist/react/src/components/DiffViewer/HunkHeader.js +5 -0
- package/dist/react/src/components/DiffViewer/HunkHeader.js.map +1 -0
- package/dist/react/src/components/DiffViewer/InlineCommentSlot.d.ts +18 -0
- package/dist/react/src/components/DiffViewer/InlineCommentSlot.d.ts.map +1 -0
- package/dist/react/src/components/DiffViewer/InlineCommentSlot.js +13 -0
- package/dist/react/src/components/DiffViewer/InlineCommentSlot.js.map +1 -0
- package/dist/react/src/components/DiffViewer/MarkdownCode.d.ts +9 -0
- package/dist/react/src/components/DiffViewer/MarkdownCode.d.ts.map +1 -0
- package/dist/react/src/components/DiffViewer/MarkdownCode.js +24 -0
- package/dist/react/src/components/DiffViewer/MarkdownCode.js.map +1 -0
- package/dist/react/src/components/DiffViewer/MermaidBlock.d.ts +4 -0
- package/dist/react/src/components/DiffViewer/MermaidBlock.d.ts.map +1 -0
- package/dist/react/src/components/DiffViewer/MermaidBlock.js +51 -0
- package/dist/react/src/components/DiffViewer/MermaidBlock.js.map +1 -0
- package/dist/react/src/components/DiffViewer/RenderedImageView.d.ts +8 -0
- package/dist/react/src/components/DiffViewer/RenderedImageView.d.ts.map +1 -0
- package/dist/react/src/components/DiffViewer/RenderedImageView.js +46 -0
- package/dist/react/src/components/DiffViewer/RenderedImageView.js.map +1 -0
- package/dist/react/src/components/DiffViewer/RenderedMarkdownView.d.ts +16 -0
- package/dist/react/src/components/DiffViewer/RenderedMarkdownView.d.ts.map +1 -0
- package/dist/react/src/components/DiffViewer/RenderedMarkdownView.js +324 -0
- package/dist/react/src/components/DiffViewer/RenderedMarkdownView.js.map +1 -0
- package/dist/react/src/components/DiffViewer/RenderedSvgView.d.ts +7 -0
- package/dist/react/src/components/DiffViewer/RenderedSvgView.d.ts.map +1 -0
- package/dist/react/src/components/DiffViewer/RenderedSvgView.js +21 -0
- package/dist/react/src/components/DiffViewer/RenderedSvgView.js.map +1 -0
- package/dist/react/src/components/DiffViewer/SplitView.d.ts +23 -0
- package/dist/react/src/components/DiffViewer/SplitView.d.ts.map +1 -0
- package/dist/react/src/components/DiffViewer/SplitView.js +137 -0
- package/dist/react/src/components/DiffViewer/SplitView.js.map +1 -0
- package/dist/react/src/components/DiffViewer/SyntaxLine.d.ts +49 -0
- package/dist/react/src/components/DiffViewer/SyntaxLine.d.ts.map +1 -0
- package/dist/react/src/components/DiffViewer/SyntaxLine.js +73 -0
- package/dist/react/src/components/DiffViewer/SyntaxLine.js.map +1 -0
- package/dist/react/src/components/DiffViewer/UnifiedView.d.ts +23 -0
- package/dist/react/src/components/DiffViewer/UnifiedView.d.ts.map +1 -0
- package/dist/react/src/components/DiffViewer/UnifiedView.js +96 -0
- package/dist/react/src/components/DiffViewer/UnifiedView.js.map +1 -0
- package/dist/react/src/components/DiffViewer/diff-utils.d.ts +31 -0
- package/dist/react/src/components/DiffViewer/diff-utils.d.ts.map +1 -0
- package/dist/react/src/components/DiffViewer/diff-utils.js +134 -0
- package/dist/react/src/components/DiffViewer/diff-utils.js.map +1 -0
- package/dist/react/src/components/DiffViewer/useDragSelection.d.ts +25 -0
- package/dist/react/src/components/DiffViewer/useDragSelection.d.ts.map +1 -0
- package/dist/react/src/components/DiffViewer/useDragSelection.js +210 -0
- package/dist/react/src/components/DiffViewer/useDragSelection.js.map +1 -0
- package/dist/react/src/components/DiffViewer/useExpandContext.d.ts +15 -0
- package/dist/react/src/components/DiffViewer/useExpandContext.d.ts.map +1 -0
- package/dist/react/src/components/DiffViewer/useExpandContext.js +209 -0
- package/dist/react/src/components/DiffViewer/useExpandContext.js.map +1 -0
- package/dist/react/src/components/FileTree.d.ts +2 -0
- package/dist/react/src/components/FileTree.d.ts.map +1 -0
- package/dist/react/src/components/FileTree.js +93 -0
- package/dist/react/src/components/FileTree.js.map +1 -0
- package/dist/react/src/components/FileTreeEntry.d.ts +13 -0
- package/dist/react/src/components/FileTreeEntry.d.ts.map +1 -0
- package/dist/react/src/components/FileTreeEntry.js +21 -0
- package/dist/react/src/components/FileTreeEntry.js.map +1 -0
- package/dist/react/src/components/FileTreeToggle.d.ts +15 -0
- package/dist/react/src/components/FileTreeToggle.d.ts.map +1 -0
- package/dist/react/src/components/FileTreeToggle.js +16 -0
- package/dist/react/src/components/FileTreeToggle.js.map +1 -0
- package/dist/react/src/components/GuideRouteHud.d.ts +10 -0
- package/dist/react/src/components/GuideRouteHud.d.ts.map +1 -0
- package/dist/react/src/components/GuideRouteHud.js +43 -0
- package/dist/react/src/components/GuideRouteHud.js.map +1 -0
- package/dist/react/src/components/GuideRouteMap.d.ts +20 -0
- package/dist/react/src/components/GuideRouteMap.d.ts.map +1 -0
- package/dist/react/src/components/GuideRouteMap.js +58 -0
- package/dist/react/src/components/GuideRouteMap.js.map +1 -0
- package/dist/react/src/components/GuideStation.d.ts +28 -0
- package/dist/react/src/components/GuideStation.d.ts.map +1 -0
- package/dist/react/src/components/GuideStation.js +24 -0
- package/dist/react/src/components/GuideStation.js.map +1 -0
- package/dist/react/src/components/HintOverlay.d.ts +13 -0
- package/dist/react/src/components/HintOverlay.d.ts.map +1 -0
- package/dist/react/src/components/HintOverlay.js +27 -0
- package/dist/react/src/components/HintOverlay.js.map +1 -0
- package/dist/react/src/components/KeyboardNavigationManager.d.ts +2 -0
- package/dist/react/src/components/KeyboardNavigationManager.d.ts.map +1 -0
- package/dist/react/src/components/KeyboardNavigationManager.js +8 -0
- package/dist/react/src/components/KeyboardNavigationManager.js.map +1 -0
- package/dist/react/src/components/Layout.d.ts +2 -0
- package/dist/react/src/components/Layout.d.ts.map +1 -0
- package/dist/react/src/components/Layout.js +63 -0
- package/dist/react/src/components/Layout.js.map +1 -0
- package/dist/react/src/components/ReviewProgress.d.ts +2 -0
- package/dist/react/src/components/ReviewProgress.d.ts.map +1 -0
- package/dist/react/src/components/ReviewProgress.js +25 -0
- package/dist/react/src/components/ReviewProgress.js.map +1 -0
- package/dist/react/src/components/Toolbar.d.ts +6 -0
- package/dist/react/src/components/Toolbar.d.ts.map +1 -0
- package/dist/react/src/components/Toolbar.js +61 -0
- package/dist/react/src/components/Toolbar.js.map +1 -0
- package/dist/react/src/components/TruncatedPath.d.ts +7 -0
- package/dist/react/src/components/TruncatedPath.d.ts.map +1 -0
- package/dist/react/src/components/TruncatedPath.js +15 -0
- package/dist/react/src/components/TruncatedPath.js.map +1 -0
- package/dist/react/src/components/ui/badge.d.ts +10 -0
- package/dist/react/src/components/ui/badge.d.ts.map +1 -0
- package/dist/react/src/components/ui/badge.js +21 -0
- package/dist/react/src/components/ui/badge.js.map +1 -0
- package/dist/react/src/components/ui/button.d.ts +11 -0
- package/dist/react/src/components/ui/button.d.ts.map +1 -0
- package/dist/react/src/components/ui/button.js +32 -0
- package/dist/react/src/components/ui/button.js.map +1 -0
- package/dist/react/src/components/ui/dialog.d.ts +12 -0
- package/dist/react/src/components/ui/dialog.d.ts.map +1 -0
- package/dist/react/src/components/ui/dialog.js +23 -0
- package/dist/react/src/components/ui/dialog.js.map +1 -0
- package/dist/react/src/components/ui/input.d.ts +4 -0
- package/dist/react/src/components/ui/input.d.ts.map +1 -0
- package/dist/react/src/components/ui/input.js +9 -0
- package/dist/react/src/components/ui/input.js.map +1 -0
- package/dist/react/src/components/ui/separator.d.ts +6 -0
- package/dist/react/src/components/ui/separator.d.ts.map +1 -0
- package/dist/react/src/components/ui/separator.js +8 -0
- package/dist/react/src/components/ui/separator.js.map +1 -0
- package/dist/react/src/components/ui/table.d.ts +11 -0
- package/dist/react/src/components/ui/table.d.ts.map +1 -0
- package/dist/react/src/components/ui/table.js +21 -0
- package/dist/react/src/components/ui/table.js.map +1 -0
- package/dist/react/src/components/ui/textarea.d.ts +4 -0
- package/dist/react/src/components/ui/textarea.d.ts.map +1 -0
- package/dist/react/src/components/ui/textarea.js +9 -0
- package/dist/react/src/components/ui/textarea.js.map +1 -0
- package/dist/react/src/components/ui/toggle-group.d.ts +22 -0
- package/dist/react/src/components/ui/toggle-group.d.ts.map +1 -0
- package/dist/react/src/components/ui/toggle-group.js +48 -0
- package/dist/react/src/components/ui/toggle-group.js.map +1 -0
- package/dist/react/src/components/ui/tooltip.d.ts +16 -0
- package/dist/react/src/components/ui/tooltip.d.ts.map +1 -0
- package/dist/react/src/components/ui/tooltip.js +21 -0
- package/dist/react/src/components/ui/tooltip.js.map +1 -0
- package/dist/react/src/context/ConfigContext.d.ts +26 -0
- package/dist/react/src/context/ConfigContext.d.ts.map +1 -0
- package/dist/react/src/context/ConfigContext.js +150 -0
- package/dist/react/src/context/ConfigContext.js.map +1 -0
- package/dist/react/src/context/DiffNavigationContext.d.ts +16 -0
- package/dist/react/src/context/DiffNavigationContext.d.ts.map +1 -0
- package/dist/react/src/context/DiffNavigationContext.js +79 -0
- package/dist/react/src/context/DiffNavigationContext.js.map +1 -0
- package/dist/react/src/context/GuideContext.d.ts +28 -0
- package/dist/react/src/context/GuideContext.d.ts.map +1 -0
- package/dist/react/src/context/GuideContext.js +64 -0
- package/dist/react/src/context/GuideContext.js.map +1 -0
- package/dist/react/src/context/ReviewAdapterContext.d.ts +9 -0
- package/dist/react/src/context/ReviewAdapterContext.d.ts.map +1 -0
- package/dist/react/src/context/ReviewAdapterContext.js +10 -0
- package/dist/react/src/context/ReviewAdapterContext.js.map +1 -0
- package/dist/react/src/context/ReviewContext.d.ts +60 -0
- package/dist/react/src/context/ReviewContext.d.ts.map +1 -0
- package/dist/react/src/context/ReviewContext.js +233 -0
- package/dist/react/src/context/ReviewContext.js.map +1 -0
- package/dist/react/src/hooks/useDiffNavigation.d.ts +4 -0
- package/dist/react/src/hooks/useDiffNavigation.d.ts.map +1 -0
- package/dist/react/src/hooks/useDiffNavigation.js +5 -0
- package/dist/react/src/hooks/useDiffNavigation.js.map +1 -0
- package/dist/react/src/hooks/useEmojiAutocomplete.d.ts +24 -0
- package/dist/react/src/hooks/useEmojiAutocomplete.d.ts.map +1 -0
- package/dist/react/src/hooks/useEmojiAutocomplete.js +175 -0
- package/dist/react/src/hooks/useEmojiAutocomplete.js.map +1 -0
- package/dist/react/src/hooks/useKeyboardNavigation.d.ts +15 -0
- package/dist/react/src/hooks/useKeyboardNavigation.d.ts.map +1 -0
- package/dist/react/src/hooks/useKeyboardNavigation.js +227 -0
- package/dist/react/src/hooks/useKeyboardNavigation.js.map +1 -0
- package/dist/react/src/hooks/useReviewBridge.d.ts +15 -0
- package/dist/react/src/hooks/useReviewBridge.d.ts.map +1 -0
- package/dist/react/src/hooks/useReviewBridge.js +43 -0
- package/dist/react/src/hooks/useReviewBridge.js.map +1 -0
- package/dist/react/src/hooks/useReviewState.d.ts +16 -0
- package/dist/react/src/hooks/useReviewState.d.ts.map +1 -0
- package/dist/react/src/hooks/useReviewState.js +101 -0
- package/dist/react/src/hooks/useReviewState.js.map +1 -0
- package/dist/react/src/index.d.ts +25 -0
- package/dist/react/src/index.d.ts.map +1 -0
- package/dist/react/src/index.js +22 -0
- package/dist/react/src/index.js.map +1 -0
- package/dist/react/src/lib/utils.d.ts +3 -0
- package/dist/react/src/lib/utils.d.ts.map +1 -0
- package/dist/react/src/lib/utils.js +6 -0
- package/dist/react/src/lib/utils.js.map +1 -0
- package/dist/react/src/utils/category-utils.d.ts +17 -0
- package/dist/react/src/utils/category-utils.d.ts.map +1 -0
- package/dist/react/src/utils/category-utils.js +23 -0
- package/dist/react/src/utils/category-utils.js.map +1 -0
- package/dist/react/src/utils/comment-anchors.d.ts +4 -0
- package/dist/react/src/utils/comment-anchors.d.ts.map +1 -0
- package/dist/react/src/utils/comment-anchors.js +17 -0
- package/dist/react/src/utils/comment-anchors.js.map +1 -0
- package/dist/react/src/utils/diff-styles.d.ts +12 -0
- package/dist/react/src/utils/diff-styles.d.ts.map +1 -0
- package/dist/react/src/utils/diff-styles.js +46 -0
- package/dist/react/src/utils/diff-styles.js.map +1 -0
- package/dist/react/src/utils/emoji-data.d.ts +8 -0
- package/dist/react/src/utils/emoji-data.d.ts.map +1 -0
- package/dist/react/src/utils/emoji-data.js +43 -0
- package/dist/react/src/utils/emoji-data.js.map +1 -0
- package/dist/react/src/utils/file-type-utils.d.ts +20 -0
- package/dist/react/src/utils/file-type-utils.d.ts.map +1 -0
- package/dist/react/src/utils/file-type-utils.js +110 -0
- package/dist/react/src/utils/file-type-utils.js.map +1 -0
- package/dist/react/src/utils/front-matter.d.ts +14 -0
- package/dist/react/src/utils/front-matter.d.ts.map +1 -0
- package/dist/react/src/utils/front-matter.js +40 -0
- package/dist/react/src/utils/front-matter.js.map +1 -0
- package/dist/react/src/utils/guide-accents.d.ts +46 -0
- package/dist/react/src/utils/guide-accents.d.ts.map +1 -0
- package/dist/react/src/utils/guide-accents.js +100 -0
- package/dist/react/src/utils/guide-accents.js.map +1 -0
- package/dist/react/src/utils/guide-display.d.ts +48 -0
- package/dist/react/src/utils/guide-display.d.ts.map +1 -0
- package/dist/react/src/utils/guide-display.js +75 -0
- package/dist/react/src/utils/guide-display.js.map +1 -0
- package/dist/react/src/utils/image-utils.d.ts +3 -0
- package/dist/react/src/utils/image-utils.d.ts.map +1 -0
- package/dist/react/src/utils/image-utils.js +33 -0
- package/dist/react/src/utils/image-utils.js.map +1 -0
- package/dist/react/src/utils/passive-content.d.ts +9 -0
- package/dist/react/src/utils/passive-content.d.ts.map +1 -0
- package/dist/react/src/utils/passive-content.js +135 -0
- package/dist/react/src/utils/passive-content.js.map +1 -0
- package/dist/react/src/utils/remark-emoji.d.ts +3 -0
- package/dist/react/src/utils/remark-emoji.d.ts.map +1 -0
- package/dist/react/src/utils/remark-emoji.js +38 -0
- package/dist/react/src/utils/remark-emoji.js.map +1 -0
- package/dist/serve/src/args.d.ts +15 -0
- package/dist/serve/src/args.d.ts.map +1 -0
- package/dist/serve/src/args.js +65 -0
- package/dist/serve/src/args.js.map +1 -0
- package/dist/serve/src/cli.d.ts +3 -0
- package/dist/serve/src/cli.d.ts.map +1 -0
- package/dist/serve/src/cli.js +81 -0
- package/dist/serve/src/cli.js.map +1 -0
- package/dist/serve/src/client/adapter.d.ts +25 -0
- package/dist/serve/src/client/adapter.d.ts.map +1 -0
- package/dist/serve/src/client/adapter.js +190 -0
- package/dist/serve/src/client/adapter.js.map +1 -0
- package/dist/serve/src/client/index.d.ts +2 -0
- package/dist/serve/src/client/index.d.ts.map +1 -0
- package/dist/serve/src/client/index.js +135 -0
- package/dist/serve/src/client/index.js.map +1 -0
- package/dist/serve/src/lifecycle.d.ts +27 -0
- package/dist/serve/src/lifecycle.d.ts.map +1 -0
- package/dist/serve/src/lifecycle.js +73 -0
- package/dist/serve/src/lifecycle.js.map +1 -0
- package/dist/serve/src/server.d.ts +34 -0
- package/dist/serve/src/server.d.ts.map +1 -0
- package/dist/serve/src/server.js +430 -0
- package/dist/serve/src/server.js.map +1 -0
- package/dist/serve/src/startup.d.ts +19 -0
- package/dist/serve/src/startup.d.ts.map +1 -0
- package/dist/serve/src/startup.js +117 -0
- package/dist/serve/src/startup.js.map +1 -0
- package/dist/serve/src/validate.d.ts +44 -0
- package/dist/serve/src/validate.d.ts.map +1 -0
- package/dist/serve/src/validate.js +295 -0
- package/dist/serve/src/validate.js.map +1 -0
- package/dist/types/src/index.d.ts +417 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/dist/types/src/index.js +5 -0
- package/dist/types/src/index.js.map +1 -0
- package/package.json +38 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AppConfig, GuideLoadPayload } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Derive the guide sidecar path from the resolved output path: strip the
|
|
4
|
+
* last extension and append `.guide.xml` (`review.xml` →
|
|
5
|
+
* `review.guide.xml`). An output filename with no extension gets
|
|
6
|
+
* `.guide.xml` appended verbatim.
|
|
7
|
+
*/
|
|
8
|
+
export declare function deriveGuidePath(outputPath: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* Resolve where to look for the guide: the `guide-file` config override
|
|
11
|
+
* (resolved against cwd, like `output-file`) when set, otherwise the path
|
|
12
|
+
* derived from the resolved output path.
|
|
13
|
+
*/
|
|
14
|
+
export declare function resolveGuidePath(outputPath: string, config: Pick<AppConfig, 'guideFile'>): string;
|
|
15
|
+
/**
|
|
16
|
+
* Discover, read, parse, validate, and reconcile the guide sidecar.
|
|
17
|
+
*
|
|
18
|
+
* Returns the display-ready payload, or null when there is no usable
|
|
19
|
+
* guide. Missing file: silent. Unreadable or invalid file: exactly one
|
|
20
|
+
* `console.error()` line (guide path + reason class). Never throws.
|
|
21
|
+
*/
|
|
22
|
+
export declare function loadGuide(outputPath: string, config: Pick<AppConfig, 'guideFile'>, diffFilePaths: string[]): Promise<GuideLoadPayload | null>;
|
|
23
|
+
//# sourceMappingURL=guide-loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guide-loader.d.ts","sourceRoot":"","sources":["../../../../core/src/guide-loader.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEtD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAI1D;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,GAAG,MAAM,CAKjG;AAED;;;;;;GAMG;AACH,wBAAsB,SAAS,CAC7B,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,EACpC,aAAa,EAAE,MAAM,EAAE,GACtB,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CA6ClC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
// packages/core/src/guide-loader.ts
|
|
2
|
+
// Discovery + tolerant loading of the walkthrough guide sidecar.
|
|
3
|
+
//
|
|
4
|
+
// The guide is orientation garnish on a deterministic tool (see
|
|
5
|
+
// docs/intent/llm-review-guide.md): a missing file is a silent no-op, and
|
|
6
|
+
// an unreadable or invalid one produces exactly one stderr warning and no
|
|
7
|
+
// guide. Nothing in this module may throw out of it — every failure mode
|
|
8
|
+
// resolves to null.
|
|
9
|
+
//
|
|
10
|
+
// Note on startup cost: loadGuide IS awaited before window creation
|
|
11
|
+
// (main.ts Phase 5b), deliberately — `guide:load` piggybacks on the
|
|
12
|
+
// DIFF_REQUEST handler, so the payload must be cached via setGuideData
|
|
13
|
+
// before the renderer's first request arrives. When a guide exists, the
|
|
14
|
+
// xmllint-wasm init and validation delay window paint by a few hundred ms;
|
|
15
|
+
// when none exists the cost is a single failed stat.
|
|
16
|
+
//
|
|
17
|
+
// Discovery is one-shot: the guide is resolved from the startup output
|
|
18
|
+
// path. Changing the output path at runtime does not re-discover.
|
|
19
|
+
import { readFile } from 'fs/promises';
|
|
20
|
+
import { extname, resolve } from 'path';
|
|
21
|
+
import { parseGuideXml, reconcileGuide } from './guide-parser';
|
|
22
|
+
/**
|
|
23
|
+
* Derive the guide sidecar path from the resolved output path: strip the
|
|
24
|
+
* last extension and append `.guide.xml` (`review.xml` →
|
|
25
|
+
* `review.guide.xml`). An output filename with no extension gets
|
|
26
|
+
* `.guide.xml` appended verbatim.
|
|
27
|
+
*/
|
|
28
|
+
export function deriveGuidePath(outputPath) {
|
|
29
|
+
const ext = extname(outputPath);
|
|
30
|
+
const base = ext ? outputPath.slice(0, -ext.length) : outputPath;
|
|
31
|
+
return `${base}.guide.xml`;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Resolve where to look for the guide: the `guide-file` config override
|
|
35
|
+
* (resolved against cwd, like `output-file`) when set, otherwise the path
|
|
36
|
+
* derived from the resolved output path.
|
|
37
|
+
*/
|
|
38
|
+
export function resolveGuidePath(outputPath, config) {
|
|
39
|
+
if (config.guideFile) {
|
|
40
|
+
return resolve(process.cwd(), config.guideFile);
|
|
41
|
+
}
|
|
42
|
+
return deriveGuidePath(outputPath);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Discover, read, parse, validate, and reconcile the guide sidecar.
|
|
46
|
+
*
|
|
47
|
+
* Returns the display-ready payload, or null when there is no usable
|
|
48
|
+
* guide. Missing file: silent. Unreadable or invalid file: exactly one
|
|
49
|
+
* `console.error()` line (guide path + reason class). Never throws.
|
|
50
|
+
*/
|
|
51
|
+
export async function loadGuide(outputPath, config, diffFilePaths) {
|
|
52
|
+
let guidePath;
|
|
53
|
+
try {
|
|
54
|
+
guidePath = resolveGuidePath(outputPath, config);
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
try {
|
|
60
|
+
let content;
|
|
61
|
+
try {
|
|
62
|
+
content = await readFile(guidePath, 'utf-8');
|
|
63
|
+
}
|
|
64
|
+
catch (error) {
|
|
65
|
+
const code = error.code;
|
|
66
|
+
if (code === 'ENOENT') {
|
|
67
|
+
// No sidecar next to the output path — the normal case.
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
console.error(`[guide] Ignoring guide at ${guidePath}: unreadable (${code ?? 'unknown error'})`);
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
const result = await parseGuideXml(content);
|
|
74
|
+
// Explicit comparison: with strictNullChecks off (see tsconfig),
|
|
75
|
+
// truthiness alone does not narrow the discriminated union.
|
|
76
|
+
if (result.ok === false) {
|
|
77
|
+
console.error(`[guide] Ignoring guide at ${guidePath}: invalid (${result.reason})`);
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
const payload = {
|
|
81
|
+
groups: reconcileGuide(result.guide, diffFilePaths),
|
|
82
|
+
};
|
|
83
|
+
if (result.guide.overview !== undefined) {
|
|
84
|
+
payload.overview = result.guide.overview;
|
|
85
|
+
}
|
|
86
|
+
return payload;
|
|
87
|
+
}
|
|
88
|
+
catch (error) {
|
|
89
|
+
// Belt and braces: no failure mode of the guide loader may escape.
|
|
90
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
91
|
+
console.error(`[guide] Ignoring guide at ${guidePath}: invalid (${message})`);
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=guide-loader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guide-loader.js","sourceRoot":"","sources":["../../../../core/src/guide-loader.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,iEAAiE;AACjE,EAAE;AACF,gEAAgE;AAChE,0EAA0E;AAC1E,0EAA0E;AAC1E,yEAAyE;AACzE,oBAAoB;AACpB,EAAE;AACF,oEAAoE;AACpE,oEAAoE;AACpE,uEAAuE;AACvE,wEAAwE;AACxE,2EAA2E;AAC3E,qDAAqD;AACrD,EAAE;AACF,uEAAuE;AACvE,kEAAkE;AAElE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAG/D;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,UAAkB;IAChD,MAAM,GAAG,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAChC,MAAM,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;IACjE,OAAO,GAAG,IAAI,YAAY,CAAC;AAC7B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,UAAkB,EAAE,MAAoC;IACvF,IAAI,MAAM,CAAC,SAAS,EAAE,CAAC;QACrB,OAAO,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;IAClD,CAAC;IACD,OAAO,eAAe,CAAC,UAAU,CAAC,CAAC;AACrC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,UAAkB,EAClB,MAAoC,EACpC,aAAuB;IAEvB,IAAI,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AC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvE,OAAO,CAAC,KAAK,CAAC,6BAA6B,SAAS,cAAc,OAAO,GAAG,CAAC,CAAC;QAC9E,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ResolvedGuideGroup, ReviewGuide } from './types';
|
|
2
|
+
/** Display name given to the derived trailing group of unmentioned files. */
|
|
3
|
+
export declare const IMPLICIT_GUIDE_GROUP_NAME = "Everything else";
|
|
4
|
+
export type GuideParseResult = {
|
|
5
|
+
ok: true;
|
|
6
|
+
guide: ReviewGuide;
|
|
7
|
+
} | {
|
|
8
|
+
ok: false;
|
|
9
|
+
reason: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Parse and validate a guide XML string.
|
|
13
|
+
*
|
|
14
|
+
* The document is validated against the embedded self-review-guide-v1 XSD
|
|
15
|
+
* (same xmllint-wasm tooling the review serializer uses) before being read,
|
|
16
|
+
* so a successful result is structurally guaranteed by the schema. Any
|
|
17
|
+
* defect — non-XML input, schema violations, validator failure — comes back
|
|
18
|
+
* as `{ ok: false, reason }`; this function never throws on bad input.
|
|
19
|
+
*/
|
|
20
|
+
export declare function parseGuideXml(xmlContent: string): Promise<GuideParseResult>;
|
|
21
|
+
/**
|
|
22
|
+
* Merge a parsed guide with the diff's file list into resolved display
|
|
23
|
+
* groups, tolerantly:
|
|
24
|
+
*
|
|
25
|
+
* - Guide entries whose path is not in the diff are dropped (stale guide);
|
|
26
|
+
* a group left with no surviving files is dropped entirely.
|
|
27
|
+
* - A file referenced by more than one group appears only in the first.
|
|
28
|
+
* - Diff files no group mentions land in a terminal implicit
|
|
29
|
+
* "Everything else" group, preserving the diff's file order, marked
|
|
30
|
+
* `implicit: true` so the UI can label it.
|
|
31
|
+
* - Guide group order and in-group file order are preserved.
|
|
32
|
+
*/
|
|
33
|
+
export declare function reconcileGuide(guide: ReviewGuide, diffFilePaths: string[]): ResolvedGuideGroup[];
|
|
34
|
+
//# sourceMappingURL=guide-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guide-parser.d.ts","sourceRoot":"","sources":["../../../../core/src/guide-parser.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAGV,kBAAkB,EAElB,WAAW,EACZ,MAAM,SAAS,CAAC;AAGjB,6EAA6E;AAC7E,eAAO,MAAM,yBAAyB,oBAAoB,CAAC;AAE3D,MAAM,MAAM,gBAAgB,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,WAAW,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhG;;;;;;;;GAQG;AACH,wBAAsB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAsBjF;AAyDD;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,kBAAkB,EAAE,CAgChG"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
// packages/core/src/guide-parser.ts
|
|
2
|
+
// Parse a walkthrough guide XML string into a typed ReviewGuide, and
|
|
3
|
+
// reconcile a guide with the diff's file list into resolved display groups.
|
|
4
|
+
//
|
|
5
|
+
// Tolerance contract (binding, from docs/intent/llm-review-guide.md): the
|
|
6
|
+
// guide is orientation garnish on a deterministic tool. A missing, stale, or
|
|
7
|
+
// invalid guide degrades the consumer to its flat view — parsing problems
|
|
8
|
+
// are failure VALUES the caller can log and ignore, never exceptions.
|
|
9
|
+
import { XMLParser } from 'fast-xml-parser';
|
|
10
|
+
import { validateXML } from 'xmllint-wasm';
|
|
11
|
+
import { GUIDE_XSD_SCHEMA } from './guide-schema';
|
|
12
|
+
/** Display name given to the derived trailing group of unmentioned files. */
|
|
13
|
+
export const IMPLICIT_GUIDE_GROUP_NAME = 'Everything else';
|
|
14
|
+
/**
|
|
15
|
+
* Parse and validate a guide XML string.
|
|
16
|
+
*
|
|
17
|
+
* The document is validated against the embedded self-review-guide-v1 XSD
|
|
18
|
+
* (same xmllint-wasm tooling the review serializer uses) before being read,
|
|
19
|
+
* so a successful result is structurally guaranteed by the schema. Any
|
|
20
|
+
* defect — non-XML input, schema violations, validator failure — comes back
|
|
21
|
+
* as `{ ok: false, reason }`; this function never throws on bad input.
|
|
22
|
+
*/
|
|
23
|
+
export async function parseGuideXml(xmlContent) {
|
|
24
|
+
try {
|
|
25
|
+
const validationResult = await validateXML({
|
|
26
|
+
xml: [{ fileName: 'guide.xml', contents: xmlContent }],
|
|
27
|
+
schema: [{ fileName: 'self-review-guide-v1.xsd', contents: GUIDE_XSD_SCHEMA }],
|
|
28
|
+
});
|
|
29
|
+
if (!validationResult.valid) {
|
|
30
|
+
const details = (validationResult.errors || [])
|
|
31
|
+
.map(err => (typeof err === 'string' ? err : err.message))
|
|
32
|
+
.join('; ');
|
|
33
|
+
return {
|
|
34
|
+
ok: false,
|
|
35
|
+
reason: `Guide XML does not conform to self-review-guide-v1 schema${details ? `: ${details}` : ''}`,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
return { ok: true, guide: readGuide(xmlContent) };
|
|
39
|
+
}
|
|
40
|
+
catch (error) {
|
|
41
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
42
|
+
return { ok: false, reason: `Failed to parse guide XML: ${message}` };
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Extract the typed guide from a document that already passed XSD
|
|
47
|
+
* validation. Values are still string-coerced defensively, but structural
|
|
48
|
+
* guarantees (required attributes/elements, at least one file per group)
|
|
49
|
+
* come from the schema.
|
|
50
|
+
*/
|
|
51
|
+
function readGuide(xmlContent) {
|
|
52
|
+
const parser = new XMLParser({
|
|
53
|
+
ignoreAttributes: false,
|
|
54
|
+
attributeNamePrefix: '@_',
|
|
55
|
+
// Keep values verbatim: a description like "007" or an overview of
|
|
56
|
+
// "true" must stay a string, not become a number or boolean.
|
|
57
|
+
parseTagValue: false,
|
|
58
|
+
parseAttributeValue: false,
|
|
59
|
+
// A prefixed form (<sg:guide xmlns:sg="urn:self-review-guide:v1">) is
|
|
60
|
+
// schema-valid, so reading must accept it too; without this the lookup
|
|
61
|
+
// of `.guide` below finds nothing.
|
|
62
|
+
removeNSPrefix: true,
|
|
63
|
+
});
|
|
64
|
+
const root = parser.parse(xmlContent).guide;
|
|
65
|
+
const guide = { groups: asArray(root.group).map(readGroup) };
|
|
66
|
+
const overview = root.overview;
|
|
67
|
+
if (typeof overview === 'string' && overview !== '') {
|
|
68
|
+
guide.overview = overview;
|
|
69
|
+
}
|
|
70
|
+
return guide;
|
|
71
|
+
}
|
|
72
|
+
function readGroup(raw) {
|
|
73
|
+
const group = raw;
|
|
74
|
+
return {
|
|
75
|
+
name: String(group['@_name']),
|
|
76
|
+
rationale: String(group.rationale ?? ''),
|
|
77
|
+
files: asArray(group.file).map(readFileEntry),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function readFileEntry(raw) {
|
|
81
|
+
const file = raw;
|
|
82
|
+
return {
|
|
83
|
+
path: String(file['@_path']),
|
|
84
|
+
description: String(file.description ?? ''),
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
/** fast-xml-parser yields a bare object for singular elements; normalize. */
|
|
88
|
+
function asArray(value) {
|
|
89
|
+
if (value === undefined || value === null)
|
|
90
|
+
return [];
|
|
91
|
+
return Array.isArray(value) ? value : [value];
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Merge a parsed guide with the diff's file list into resolved display
|
|
95
|
+
* groups, tolerantly:
|
|
96
|
+
*
|
|
97
|
+
* - Guide entries whose path is not in the diff are dropped (stale guide);
|
|
98
|
+
* a group left with no surviving files is dropped entirely.
|
|
99
|
+
* - A file referenced by more than one group appears only in the first.
|
|
100
|
+
* - Diff files no group mentions land in a terminal implicit
|
|
101
|
+
* "Everything else" group, preserving the diff's file order, marked
|
|
102
|
+
* `implicit: true` so the UI can label it.
|
|
103
|
+
* - Guide group order and in-group file order are preserved.
|
|
104
|
+
*/
|
|
105
|
+
export function reconcileGuide(guide, diffFilePaths) {
|
|
106
|
+
const diffPaths = new Set(diffFilePaths);
|
|
107
|
+
const claimed = new Set();
|
|
108
|
+
const resolved = [];
|
|
109
|
+
for (const group of guide.groups) {
|
|
110
|
+
const files = [];
|
|
111
|
+
for (const file of group.files) {
|
|
112
|
+
if (!diffPaths.has(file.path) || claimed.has(file.path))
|
|
113
|
+
continue;
|
|
114
|
+
claimed.add(file.path);
|
|
115
|
+
files.push({ path: file.path, description: file.description });
|
|
116
|
+
}
|
|
117
|
+
if (files.length > 0) {
|
|
118
|
+
resolved.push({
|
|
119
|
+
name: group.name,
|
|
120
|
+
rationale: group.rationale,
|
|
121
|
+
implicit: false,
|
|
122
|
+
files,
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
const leftover = diffFilePaths.filter(path => !claimed.has(path));
|
|
127
|
+
if (leftover.length > 0) {
|
|
128
|
+
resolved.push({
|
|
129
|
+
name: IMPLICIT_GUIDE_GROUP_NAME,
|
|
130
|
+
implicit: true,
|
|
131
|
+
files: leftover.map(path => ({ path })),
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
return resolved;
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=guide-parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guide-parser.js","sourceRoot":"","sources":["../../../../core/src/guide-parser.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,qEAAqE;AACrE,4EAA4E;AAC5E,EAAE;AACF,0EAA0E;AAC1E,6EAA6E;AAC7E,0EAA0E;AAC1E,sEAAsE;AAEtE,OAAO,EAAE,SAAS,EAAE,MAAM,i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IAAI;gBAChB,SAAS,EAAE,KAAK,CAAC,SAAS;gBAC1B,QAAQ,EAAE,KAAK;gBACf,KAAK;aACN,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,MAAM,QAAQ,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;IAClE,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxB,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,yBAAyB;YAC/B,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;SACxC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const GUIDE_XSD_SCHEMA = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<xs:schema\n xmlns:xs=\"http://www.w3.org/2001/XMLSchema\"\n xmlns:sg=\"urn:self-review-guide:v1\"\n targetNamespace=\"urn:self-review-guide:v1\"\n elementFormDefault=\"qualified\"\n>\n\n <!--\n self-review guide XML Schema v1\n ===============================\n Defines the walkthrough guide sidecar for the self-review application.\n This schema is designed to be both machine-validated and fed to an LLM\n so it can author valid guide documents from the schema alone.\n\n Key concepts:\n - A <guide> is a read-only orientation aid generated BEFORE a review\n starts. It lives next to the review output file and is discovered by\n convention; it is never written by the review UI.\n - The optional <overview> is short Markdown prose shown before the\n first file, orienting the reviewer to the change as a whole.\n - Each <group> names a set of files that belong together (for example\n \"Core change\", \"Tests\", \"Generated/mechanical\") and explains, in one\n line, why they are grouped and where they sit in the reading order.\n - Each <file> inside a group points at one diff file by its\n repository-relative path and carries a one-line description of the\n role that file plays in the change.\n\n Ordering:\n - Document order IS the reading order. Groups are presented in the\n order they appear, and files within a group are presented in the\n order they appear. There are no explicit ordering attributes; to\n reorder, reorder the elements.\n\n Presentation only, never suppression:\n - This vocabulary labels and orders content; it cannot hide it. There\n is deliberately no element or attribute that hides, collapses, or\n marks a file as skippable, and none may be added to v1. Files in the\n diff that no group mentions remain fully visible in an implicit\n \"Everything else\" group; files mentioned here but absent from the\n diff are silently ignored.\n\n Tolerance:\n - A missing, stale, or invalid guide degrades the consumer to its\n normal ungrouped view. A guide can therefore never block or fail a\n review, but an invalid guide is silently useless, so authors should\n validate against this schema before writing the file.\n -->\n\n <!-- ===== Root element ===== -->\n\n <xs:element name=\"guide\" type=\"sg:GuideType\">\n <xs:annotation>\n <xs:documentation>\n Root element of a self-review walkthrough guide sidecar. Contains\n an optional overview followed by zero or more ordered groups.\n </xs:documentation>\n </xs:annotation>\n </xs:element>\n\n <!-- ===== Complex types ===== -->\n\n <xs:complexType name=\"GuideType\">\n <xs:annotation>\n <xs:documentation>\n The whole walkthrough guide. The optional metadata attributes\n mirror the review schema's provenance attributes so a consumer can\n sanity-check that the guide was generated for the diff it is being\n shown next to; none of them are required and none affect\n presentation.\n </xs:documentation>\n </xs:annotation>\n <xs:sequence>\n <xs:element name=\"overview\" type=\"xs:string\" minOccurs=\"0\">\n <xs:annotation>\n <xs:documentation>\n Review-level orientation prose shown before the first file.\n Markdown formatting is allowed, including fenced code blocks;\n a fenced code block labelled \"mermaid\" may be used for a\n diagram of the change.\n Keep it short: a few sentences saying what the change does and\n where to start reading, not a restatement of every file.\n </xs:documentation>\n </xs:annotation>\n </xs:element>\n <xs:element name=\"group\" type=\"sg:GroupType\" minOccurs=\"0\" maxOccurs=\"unbounded\">\n <xs:annotation>\n <xs:documentation>\n Ordered reading groups. The first group should hold the files\n the reviewer must understand first (the core of the change);\n later groups hold consequences, tests, and mechanical fallout.\n </xs:documentation>\n </xs:annotation>\n </xs:element>\n </xs:sequence>\n <xs:attribute name=\"timestamp\" type=\"xs:dateTime\" use=\"optional\">\n <xs:annotation>\n <xs:documentation>\n ISO 8601 timestamp of when the guide was generated.\n </xs:documentation>\n </xs:annotation>\n </xs:attribute>\n <xs:attribute name=\"git-diff-args\" type=\"xs:string\" use=\"optional\">\n <xs:annotation>\n <xs:documentation>\n The git diff arguments the guide was generated against.\n Example: \"--staged\", \"main..feature-branch\", \"HEAD~3\".\n Present only when the guide describes a git diff.\n </xs:documentation>\n </xs:annotation>\n </xs:attribute>\n <xs:attribute name=\"repository\" type=\"xs:string\" use=\"optional\">\n <xs:annotation>\n <xs:documentation>\n Absolute path to the repository root the guide was generated in.\n Present only when the guide describes a git diff.\n </xs:documentation>\n </xs:annotation>\n </xs:attribute>\n </xs:complexType>\n\n <xs:complexType name=\"GroupType\">\n <xs:annotation>\n <xs:documentation>\n A named set of related files with a one-line rationale. Groups are\n labels for orientation, never suppressions: a consumer shows every\n group and every file in it. Position in the document is position\n in the reading order.\n </xs:documentation>\n </xs:annotation>\n <xs:sequence>\n <xs:element name=\"rationale\" type=\"xs:string\">\n <xs:annotation>\n <xs:documentation>\n One line explaining why these files form a group and what the\n reviewer should look for in them (e.g., \"The retry wrapper\n everything else calls; read this first\"). Plain text, a single\n sentence; no Markdown, no line breaks.\n </xs:documentation>\n </xs:annotation>\n </xs:element>\n <xs:element name=\"file\" type=\"sg:FileEntryType\" minOccurs=\"1\" maxOccurs=\"unbounded\">\n <xs:annotation>\n <xs:documentation>\n The files in this group, in reading order. A group must list\n at least one file; do not author empty placeholder groups.\n Every file in the diff may appear in at most one group, and\n files omitted from every group are not hidden \u2014 the consumer\n shows them in an implicit trailing \"Everything else\" group.\n </xs:documentation>\n </xs:annotation>\n </xs:element>\n </xs:sequence>\n <xs:attribute name=\"name\" type=\"xs:string\" use=\"required\">\n <xs:annotation>\n <xs:documentation>\n Short display name for the group, e.g. \"Core change\", \"Tests\",\n \"Generated/mechanical\". Shown as the group heading in the file\n tree; keep it to a few words.\n </xs:documentation>\n </xs:annotation>\n </xs:attribute>\n </xs:complexType>\n\n <xs:complexType name=\"FileEntryType\">\n <xs:annotation>\n <xs:documentation>\n One file in a group. The path must match a file in the diff being\n reviewed; entries whose path matches nothing in the diff are\n silently dropped by the consumer, so a stale guide degrades\n instead of erroring.\n </xs:documentation>\n </xs:annotation>\n <xs:sequence>\n <xs:element name=\"description\" type=\"xs:string\">\n <xs:annotation>\n <xs:documentation>\n One line describing the role this file plays in the change\n (e.g., \"Adds the retry wrapper that everything else calls\").\n Plain text, a single sentence; no Markdown, no line breaks.\n </xs:documentation>\n </xs:annotation>\n </xs:element>\n </xs:sequence>\n <xs:attribute name=\"path\" type=\"xs:string\" use=\"required\">\n <xs:annotation>\n <xs:documentation>\n File path relative to the repository root, using the same\n convention as review.xml file paths. For renamed files, use the\n new path.\n </xs:documentation>\n </xs:annotation>\n </xs:attribute>\n </xs:complexType>\n\n</xs:schema>";
|
|
2
|
+
//# sourceMappingURL=guide-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guide-schema.d.ts","sourceRoot":"","sources":["../../../../core/src/guide-schema.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,wxQAmMhB,CAAC"}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
// packages/core/src/guide-schema.ts
|
|
2
|
+
// Embedded copy of the walkthrough guide XSD for validation.
|
|
3
|
+
// This MUST stay byte-identical to the on-disk copy at
|
|
4
|
+
// .agents/skills/self-review-guide/assets/self-review-guide-v1.xsd;
|
|
5
|
+
// the sync test in xsd-schema.test.ts enforces it.
|
|
6
|
+
export const GUIDE_XSD_SCHEMA = `<?xml version="1.0" encoding="UTF-8"?>
|
|
7
|
+
<xs:schema
|
|
8
|
+
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
|
9
|
+
xmlns:sg="urn:self-review-guide:v1"
|
|
10
|
+
targetNamespace="urn:self-review-guide:v1"
|
|
11
|
+
elementFormDefault="qualified"
|
|
12
|
+
>
|
|
13
|
+
|
|
14
|
+
<!--
|
|
15
|
+
self-review guide XML Schema v1
|
|
16
|
+
===============================
|
|
17
|
+
Defines the walkthrough guide sidecar for the self-review application.
|
|
18
|
+
This schema is designed to be both machine-validated and fed to an LLM
|
|
19
|
+
so it can author valid guide documents from the schema alone.
|
|
20
|
+
|
|
21
|
+
Key concepts:
|
|
22
|
+
- A <guide> is a read-only orientation aid generated BEFORE a review
|
|
23
|
+
starts. It lives next to the review output file and is discovered by
|
|
24
|
+
convention; it is never written by the review UI.
|
|
25
|
+
- The optional <overview> is short Markdown prose shown before the
|
|
26
|
+
first file, orienting the reviewer to the change as a whole.
|
|
27
|
+
- Each <group> names a set of files that belong together (for example
|
|
28
|
+
"Core change", "Tests", "Generated/mechanical") and explains, in one
|
|
29
|
+
line, why they are grouped and where they sit in the reading order.
|
|
30
|
+
- Each <file> inside a group points at one diff file by its
|
|
31
|
+
repository-relative path and carries a one-line description of the
|
|
32
|
+
role that file plays in the change.
|
|
33
|
+
|
|
34
|
+
Ordering:
|
|
35
|
+
- Document order IS the reading order. Groups are presented in the
|
|
36
|
+
order they appear, and files within a group are presented in the
|
|
37
|
+
order they appear. There are no explicit ordering attributes; to
|
|
38
|
+
reorder, reorder the elements.
|
|
39
|
+
|
|
40
|
+
Presentation only, never suppression:
|
|
41
|
+
- This vocabulary labels and orders content; it cannot hide it. There
|
|
42
|
+
is deliberately no element or attribute that hides, collapses, or
|
|
43
|
+
marks a file as skippable, and none may be added to v1. Files in the
|
|
44
|
+
diff that no group mentions remain fully visible in an implicit
|
|
45
|
+
"Everything else" group; files mentioned here but absent from the
|
|
46
|
+
diff are silently ignored.
|
|
47
|
+
|
|
48
|
+
Tolerance:
|
|
49
|
+
- A missing, stale, or invalid guide degrades the consumer to its
|
|
50
|
+
normal ungrouped view. A guide can therefore never block or fail a
|
|
51
|
+
review, but an invalid guide is silently useless, so authors should
|
|
52
|
+
validate against this schema before writing the file.
|
|
53
|
+
-->
|
|
54
|
+
|
|
55
|
+
<!-- ===== Root element ===== -->
|
|
56
|
+
|
|
57
|
+
<xs:element name="guide" type="sg:GuideType">
|
|
58
|
+
<xs:annotation>
|
|
59
|
+
<xs:documentation>
|
|
60
|
+
Root element of a self-review walkthrough guide sidecar. Contains
|
|
61
|
+
an optional overview followed by zero or more ordered groups.
|
|
62
|
+
</xs:documentation>
|
|
63
|
+
</xs:annotation>
|
|
64
|
+
</xs:element>
|
|
65
|
+
|
|
66
|
+
<!-- ===== Complex types ===== -->
|
|
67
|
+
|
|
68
|
+
<xs:complexType name="GuideType">
|
|
69
|
+
<xs:annotation>
|
|
70
|
+
<xs:documentation>
|
|
71
|
+
The whole walkthrough guide. The optional metadata attributes
|
|
72
|
+
mirror the review schema's provenance attributes so a consumer can
|
|
73
|
+
sanity-check that the guide was generated for the diff it is being
|
|
74
|
+
shown next to; none of them are required and none affect
|
|
75
|
+
presentation.
|
|
76
|
+
</xs:documentation>
|
|
77
|
+
</xs:annotation>
|
|
78
|
+
<xs:sequence>
|
|
79
|
+
<xs:element name="overview" type="xs:string" minOccurs="0">
|
|
80
|
+
<xs:annotation>
|
|
81
|
+
<xs:documentation>
|
|
82
|
+
Review-level orientation prose shown before the first file.
|
|
83
|
+
Markdown formatting is allowed, including fenced code blocks;
|
|
84
|
+
a fenced code block labelled "mermaid" may be used for a
|
|
85
|
+
diagram of the change.
|
|
86
|
+
Keep it short: a few sentences saying what the change does and
|
|
87
|
+
where to start reading, not a restatement of every file.
|
|
88
|
+
</xs:documentation>
|
|
89
|
+
</xs:annotation>
|
|
90
|
+
</xs:element>
|
|
91
|
+
<xs:element name="group" type="sg:GroupType" minOccurs="0" maxOccurs="unbounded">
|
|
92
|
+
<xs:annotation>
|
|
93
|
+
<xs:documentation>
|
|
94
|
+
Ordered reading groups. The first group should hold the files
|
|
95
|
+
the reviewer must understand first (the core of the change);
|
|
96
|
+
later groups hold consequences, tests, and mechanical fallout.
|
|
97
|
+
</xs:documentation>
|
|
98
|
+
</xs:annotation>
|
|
99
|
+
</xs:element>
|
|
100
|
+
</xs:sequence>
|
|
101
|
+
<xs:attribute name="timestamp" type="xs:dateTime" use="optional">
|
|
102
|
+
<xs:annotation>
|
|
103
|
+
<xs:documentation>
|
|
104
|
+
ISO 8601 timestamp of when the guide was generated.
|
|
105
|
+
</xs:documentation>
|
|
106
|
+
</xs:annotation>
|
|
107
|
+
</xs:attribute>
|
|
108
|
+
<xs:attribute name="git-diff-args" type="xs:string" use="optional">
|
|
109
|
+
<xs:annotation>
|
|
110
|
+
<xs:documentation>
|
|
111
|
+
The git diff arguments the guide was generated against.
|
|
112
|
+
Example: "--staged", "main..feature-branch", "HEAD~3".
|
|
113
|
+
Present only when the guide describes a git diff.
|
|
114
|
+
</xs:documentation>
|
|
115
|
+
</xs:annotation>
|
|
116
|
+
</xs:attribute>
|
|
117
|
+
<xs:attribute name="repository" type="xs:string" use="optional">
|
|
118
|
+
<xs:annotation>
|
|
119
|
+
<xs:documentation>
|
|
120
|
+
Absolute path to the repository root the guide was generated in.
|
|
121
|
+
Present only when the guide describes a git diff.
|
|
122
|
+
</xs:documentation>
|
|
123
|
+
</xs:annotation>
|
|
124
|
+
</xs:attribute>
|
|
125
|
+
</xs:complexType>
|
|
126
|
+
|
|
127
|
+
<xs:complexType name="GroupType">
|
|
128
|
+
<xs:annotation>
|
|
129
|
+
<xs:documentation>
|
|
130
|
+
A named set of related files with a one-line rationale. Groups are
|
|
131
|
+
labels for orientation, never suppressions: a consumer shows every
|
|
132
|
+
group and every file in it. Position in the document is position
|
|
133
|
+
in the reading order.
|
|
134
|
+
</xs:documentation>
|
|
135
|
+
</xs:annotation>
|
|
136
|
+
<xs:sequence>
|
|
137
|
+
<xs:element name="rationale" type="xs:string">
|
|
138
|
+
<xs:annotation>
|
|
139
|
+
<xs:documentation>
|
|
140
|
+
One line explaining why these files form a group and what the
|
|
141
|
+
reviewer should look for in them (e.g., "The retry wrapper
|
|
142
|
+
everything else calls; read this first"). Plain text, a single
|
|
143
|
+
sentence; no Markdown, no line breaks.
|
|
144
|
+
</xs:documentation>
|
|
145
|
+
</xs:annotation>
|
|
146
|
+
</xs:element>
|
|
147
|
+
<xs:element name="file" type="sg:FileEntryType" minOccurs="1" maxOccurs="unbounded">
|
|
148
|
+
<xs:annotation>
|
|
149
|
+
<xs:documentation>
|
|
150
|
+
The files in this group, in reading order. A group must list
|
|
151
|
+
at least one file; do not author empty placeholder groups.
|
|
152
|
+
Every file in the diff may appear in at most one group, and
|
|
153
|
+
files omitted from every group are not hidden — the consumer
|
|
154
|
+
shows them in an implicit trailing "Everything else" group.
|
|
155
|
+
</xs:documentation>
|
|
156
|
+
</xs:annotation>
|
|
157
|
+
</xs:element>
|
|
158
|
+
</xs:sequence>
|
|
159
|
+
<xs:attribute name="name" type="xs:string" use="required">
|
|
160
|
+
<xs:annotation>
|
|
161
|
+
<xs:documentation>
|
|
162
|
+
Short display name for the group, e.g. "Core change", "Tests",
|
|
163
|
+
"Generated/mechanical". Shown as the group heading in the file
|
|
164
|
+
tree; keep it to a few words.
|
|
165
|
+
</xs:documentation>
|
|
166
|
+
</xs:annotation>
|
|
167
|
+
</xs:attribute>
|
|
168
|
+
</xs:complexType>
|
|
169
|
+
|
|
170
|
+
<xs:complexType name="FileEntryType">
|
|
171
|
+
<xs:annotation>
|
|
172
|
+
<xs:documentation>
|
|
173
|
+
One file in a group. The path must match a file in the diff being
|
|
174
|
+
reviewed; entries whose path matches nothing in the diff are
|
|
175
|
+
silently dropped by the consumer, so a stale guide degrades
|
|
176
|
+
instead of erroring.
|
|
177
|
+
</xs:documentation>
|
|
178
|
+
</xs:annotation>
|
|
179
|
+
<xs:sequence>
|
|
180
|
+
<xs:element name="description" type="xs:string">
|
|
181
|
+
<xs:annotation>
|
|
182
|
+
<xs:documentation>
|
|
183
|
+
One line describing the role this file plays in the change
|
|
184
|
+
(e.g., "Adds the retry wrapper that everything else calls").
|
|
185
|
+
Plain text, a single sentence; no Markdown, no line breaks.
|
|
186
|
+
</xs:documentation>
|
|
187
|
+
</xs:annotation>
|
|
188
|
+
</xs:element>
|
|
189
|
+
</xs:sequence>
|
|
190
|
+
<xs:attribute name="path" type="xs:string" use="required">
|
|
191
|
+
<xs:annotation>
|
|
192
|
+
<xs:documentation>
|
|
193
|
+
File path relative to the repository root, using the same
|
|
194
|
+
convention as review.xml file paths. For renamed files, use the
|
|
195
|
+
new path.
|
|
196
|
+
</xs:documentation>
|
|
197
|
+
</xs:annotation>
|
|
198
|
+
</xs:attribute>
|
|
199
|
+
</xs:complexType>
|
|
200
|
+
|
|
201
|
+
</xs:schema>`;
|
|
202
|
+
//# sourceMappingURL=guide-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guide-schema.js","sourceRoot":"","sources":["../../../../core/src/guide-schema.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,6DAA6D;AAE7D,uDAAuD;AACvD,oEAAoE;AACpE,mDAAmD;AACnD,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAmMnB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create a filter function from gitignore-compatible patterns.
|
|
3
|
+
*
|
|
4
|
+
* @param patterns - Array of gitignore-compatible glob patterns
|
|
5
|
+
* @returns A predicate that returns `true` if the path should be kept (not ignored)
|
|
6
|
+
*/
|
|
7
|
+
export declare function createIgnoreFilter(patterns: string[]): (path: string) => boolean;
|
|
8
|
+
//# sourceMappingURL=ignore-filter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ignore-filter.d.ts","sourceRoot":"","sources":["../../../../core/src/ignore-filter.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAIhF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// src/main/ignore-filter.ts
|
|
2
|
+
// Gitignore-compatible file path filtering using the `ignore` package.
|
|
3
|
+
import ignore from 'ignore';
|
|
4
|
+
/**
|
|
5
|
+
* Create a filter function from gitignore-compatible patterns.
|
|
6
|
+
*
|
|
7
|
+
* @param patterns - Array of gitignore-compatible glob patterns
|
|
8
|
+
* @returns A predicate that returns `true` if the path should be kept (not ignored)
|
|
9
|
+
*/
|
|
10
|
+
export function createIgnoreFilter(patterns) {
|
|
11
|
+
if (patterns.length === 0)
|
|
12
|
+
return () => true;
|
|
13
|
+
const ig = ignore().add(patterns);
|
|
14
|
+
return (filePath) => !ig.ignores(filePath);
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=ignore-filter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ignore-filter.js","sourceRoot":"","sources":["../../../../core/src/ignore-filter.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,uEAAuE;AAEvE,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,QAAkB;IACnD,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC;IAC7C,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAClC,OAAO,CAAC,QAAgB,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AACrD,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export type { ChangeType, DiffLineType, DiffLine, DiffHunk, DiffFile, DiffSource, Suggestion, SuggestionApplyRequest, SuggestionApplyOutcome, ApplyDestinationOutcome, Attachment, LineRange, ReviewComment, CommentSeverity, CommentConfidence, FileReviewState, ReviewState, CategoryDef, AppConfig, DiffLoadPayload, ResumeLoadPayload, OutputPathInfo, ExpandContextRequest, ExpandContextResponse, FindInPageRequest, FindInPageResult, VersionUpdateInfo, PayloadStats, ImageLoadResult, ReviewGuide, GuideGroup, GuideFileEntry, ResolvedGuideGroup, ResolvedGuideFile, } from './types';
|
|
2
|
+
export { parseDiff } from './diff-parser';
|
|
3
|
+
export { serializeReview } from './xml-serializer';
|
|
4
|
+
export { parseReviewXml, parseReviewXmlString } from './xml-parser';
|
|
5
|
+
export { GUIDE_XSD_SCHEMA } from './guide-schema';
|
|
6
|
+
export { parseGuideXml, reconcileGuide, IMPLICIT_GUIDE_GROUP_NAME } from './guide-parser';
|
|
7
|
+
export type { GuideParseResult } from './guide-parser';
|
|
8
|
+
export { runGitDiff, runGitDiffAsync, getRepoRoot, getRepoRootAsync, getUntrackedFilesAsync, validateGitAvailable, generateUntrackedDiffs, } from './git';
|
|
9
|
+
export { parseForgeUrl, ForgeCliUnavailableError } from './forge-provider';
|
|
10
|
+
export type { ForgeName, ForgeUrl, ForgeAnchorSide, ForgeThreadAnchor, ForgeThreadTurn, ForgeThread, FetchThreadsOptions, ForgeCommandResult, ForgeCommandRunner, ForgeProvider, } from './forge-provider';
|
|
11
|
+
export { generateSyntheticDiffs } from './synthetic-diff';
|
|
12
|
+
export { scanDirectory, scanFile } from './directory-scanner';
|
|
13
|
+
export { loadConfig } from './config';
|
|
14
|
+
export { computePayloadStats, countTotalLines, getGitDiffStats } from './payload-sizing';
|
|
15
|
+
export { createIgnoreFilter } from './ignore-filter';
|
|
16
|
+
export { checkWritability } from './fs-utils';
|
|
17
|
+
export { applySuggestion } from './apply-suggestion';
|
|
18
|
+
export type { ApplyRefusalReason, ApplySuggestionRequest, ApplySuggestionApplied, ApplySuggestionRefused, ApplySuggestionResult, } from './apply-suggestion';
|
|
19
|
+
export { getLanguageFromPath, getRenderedTextMode, isHtmlFile, isMarkdownFile, isPreviewableImage, isPreviewableRenderedText, isPreviewableSvg, } from './file-type-utils';
|
|
20
|
+
export type { RenderedTextMode } from './file-type-utils';
|
|
21
|
+
export { createGitHubProvider } from './github-provider';
|
|
22
|
+
export { mapThreadsToReviewComments, REVIEW_LEVEL_FILE_PATH } from './thread-mapper';
|
|
23
|
+
export { createGitLabProvider } from './gitlab-provider';
|
|
24
|
+
export { detectExistingClone, materialize, resolveRemoteDefaultBranch, defaultGitRunner, } from './materializer';
|
|
25
|
+
export type { ExistingClone, MaterializeMode, MaterializeResult } from './materializer';
|
|
26
|
+
export { createReviewSession, preparePayload, getDiffLoad, loadImage, getFileHunks, getConfigLoad, submitReviewState, takeReviewState, readAttachment, getResumeLoad, expandContext, prepareDirectoryReview, commitReviewStart, resolveSourceBaseDir, resolveApplyDestination, applySuggestionForSession, } from './review-handlers';
|
|
27
|
+
export type { ReviewSession, ReviewStartResult } from './review-handlers';
|
|
28
|
+
export { determineMode } from './startup-mode';
|
|
29
|
+
export { deriveGuidePath, resolveGuidePath, loadGuide } from './guide-loader';
|
|
30
|
+
export { loadGitDiffWithUntracked } from './git-diff-loader';
|
|
31
|
+
export type { LoadGitDiffOptions } from './git-diff-loader';
|
|
32
|
+
export { applyStagedUntrackedDefault } from './staged-untracked';
|
|
33
|
+
export { normalizeGitDiffArgs } from './git-diff-args';
|
|
34
|
+
export { startRemoteSession, bootstrapRemoteDiff, mergeRemoteThreads, applyRemoteProvenance, computeRemoteDrift, } from './remote-mode';
|
|
35
|
+
export type { RemoteSession, RemoteSessionDeps, RemoteBootstrapResult } from './remote-mode';
|
|
36
|
+
export { buildRemoteReviewState, runFetchComments } from './fetch-comments';
|
|
37
|
+
export type { FetchCommentsDeps, BuildRemoteReviewStateArgs, FetchCommentsOptions, } from './fetch-comments';
|
|
38
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts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