@plebeiantech/lat.md 0.12.3-fork.9 → 0.13.4-fork.1
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 +27 -3
- package/dist/src/cli/agent-invocation.d.ts +6 -0
- package/dist/src/cli/agent-invocation.js +23 -0
- package/dist/src/cli/checklist-menu.d.ts +2 -1
- package/dist/src/cli/checklist-menu.js +3 -2
- package/dist/src/cli/fork-instructions.d.ts +1 -0
- package/dist/src/cli/fork-instructions.js +8 -32
- package/dist/src/cli/fork-scaffold.js +2 -2
- package/dist/src/cli/graph.d.ts +1 -1
- package/dist/src/cli/hook.d.ts +26 -0
- package/dist/src/cli/hook.js +115 -64
- package/dist/src/cli/index.js +147 -70
- package/dist/src/cli/init-preferences.d.ts +4 -0
- package/dist/src/cli/init-preferences.js +36 -0
- package/dist/src/cli/init.d.ts +2 -1
- package/dist/src/cli/init.js +100 -60
- package/dist/src/cli/reindex.d.ts +1 -1
- package/dist/src/cli/reindex.js +7 -10
- package/dist/src/cli/search.d.ts +14 -4
- package/dist/src/cli/search.js +115 -101
- package/dist/src/cli/ui-build-server.d.ts +12 -0
- package/dist/src/cli/ui-build-server.js +26 -0
- package/dist/src/cli/ui-build.d.ts +1 -1
- package/dist/src/cli/ui-build.js +1 -1
- package/dist/src/cli/ui.d.ts +1 -1
- package/dist/src/cli/ui.js +1 -1
- package/dist/src/fork/antigravity-hook.d.ts +47 -0
- package/dist/src/fork/antigravity-hook.js +424 -0
- package/dist/src/fork/antigravity-init.d.ts +17 -0
- package/dist/src/fork/antigravity-init.js +124 -0
- package/dist/src/fork/upstream-drift.js +1 -1
- package/dist/src/fork/upstream-guard.d.ts +1 -1
- package/dist/src/fork/upstream-guard.js +8 -7
- package/dist/src/graph-export.js +7 -7
- package/dist/src/knowledge/index.js +2 -2
- package/dist/src/mcp/server.js +34 -18
- package/dist/src/search/cache.d.ts +3 -0
- package/dist/src/search/cache.js +104 -0
- package/dist/src/search/chunks.d.ts +23 -0
- package/dist/src/search/chunks.js +200 -0
- package/dist/src/search/db.d.ts +28 -16
- package/dist/src/search/db.js +100 -40
- package/dist/src/search/embedder.d.ts +2 -1
- package/dist/src/search/embedder.js +7 -6
- package/dist/src/search/index.d.ts +6 -2
- package/dist/src/search/index.js +176 -70
- package/dist/src/search/lexical.d.ts +6 -0
- package/dist/src/search/lexical.js +36 -0
- package/dist/src/search/lock.d.ts +5 -0
- package/dist/src/search/lock.js +45 -0
- package/dist/src/search/query.d.ts +26 -0
- package/dist/src/search/query.js +103 -0
- package/dist/src/search/search.d.ts +16 -7
- package/dist/src/search/search.js +165 -21
- package/dist/src/search/types.d.ts +15 -0
- package/dist/src/view/client/assets/GraphView-D_xnk0bP.js +456 -0
- package/dist/src/view/client/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/dist/src/view/client/assets/MarkdownEditor-bjqt_FoF.js +28 -0
- package/dist/src/view/client/assets/OrbitControls-DwcpQNja.js +1 -0
- package/dist/src/view/client/assets/STLLoader-CLWTKt5i.js +1 -0
- package/dist/src/view/client/assets/_commonjsHelpers-CqkleIqs.js +1 -0
- package/dist/src/view/client/assets/abnfDiagram-VCTEODGH-kWGvtRnL.js +1 -0
- package/dist/src/view/client/assets/arc-BPAFd7cP.js +1 -0
- package/dist/src/view/client/assets/architectureDiagram-5GKGNRK7-CsY39oIR.js +36 -0
- package/dist/src/view/client/assets/blockDiagram-I7D4REHJ-DHGBG7BJ.js +129 -0
- package/dist/src/view/client/assets/c4Diagram-7LVT6UL2-vywK4eb7.js +38 -0
- package/dist/src/view/client/assets/channel-CX71L_qV.js +1 -0
- package/dist/src/view/client/assets/chunk-2Q5K7J3B-Do3Hz_ci.js +1 -0
- package/dist/src/view/client/assets/chunk-5VM5RSS4-B5R1lSeY.js +15 -0
- package/dist/src/view/client/assets/chunk-F27PBJKO-Dm55FM_W.js +1 -0
- package/dist/src/view/client/assets/chunk-IMKFNOWR-ChptrvvM.js +231 -0
- package/dist/src/view/client/assets/chunk-JWPE2WC7-BRQBjrKS.js +1 -0
- package/dist/src/view/client/assets/chunk-POPQ4Y6H-CainVZIL.js +1 -0
- package/dist/src/view/client/assets/chunk-SVP7TREG-DsKsNGmM.js +88 -0
- package/dist/src/view/client/assets/chunk-TICWLB2K-BctkMcJc.js +206 -0
- package/dist/src/view/client/assets/chunk-XXDRQBXY-BN7SgOUT.js +1 -0
- package/dist/src/view/client/assets/classDiagram-ZZMXUADV-B1VyU6zO.js +1 -0
- package/dist/src/view/client/assets/classDiagram-v2-VYDZK3BY-B1VyU6zO.js +1 -0
- package/dist/src/view/client/assets/cose-bilkent-JH36ORCC-BszzwrMe.js +1 -0
- package/dist/src/view/client/assets/cynefin-OW5HDTMX-CdRyAkPs.js +166 -0
- package/dist/src/view/client/assets/cynefinDiagram-5FMLGOSQ-BLvKPZ1u.js +62 -0
- package/dist/src/view/client/assets/cytoscape.esm-DzSz-X2X.js +321 -0
- package/dist/src/view/client/assets/dagre-GXQ25YYZ-V68w_l65.js +4 -0
- package/dist/src/view/client/assets/defaultLocale-DX6XiGOO.js +1 -0
- package/dist/src/view/client/assets/diagram-S7CK7UJ4-C2i4eEMg.js +30 -0
- package/dist/src/view/client/assets/diagram-UQ7AKVKN-BiwWh5jC.js +41 -0
- package/dist/src/view/client/assets/diagram-VSXAHHWV-hkKR_vyS.js +3 -0
- package/dist/src/view/client/assets/diagram-VX7I27RA-DzRCSMAc.js +24 -0
- package/dist/src/view/client/assets/diagram-Z3DM3KII-fhSFPxyK.js +24 -0
- package/dist/src/view/client/assets/ebnfDiagram-PWID7BFC-CCEUDKSA.js +1 -0
- package/dist/src/view/client/assets/erDiagram-RLTQ6QDP-FJ2IMyTi.js +99 -0
- package/dist/src/view/client/assets/flowDiagram-HODETNUW-BvasdLeK.js +168 -0
- package/dist/src/view/client/assets/ganttDiagram-EL5Y4UJY-CiwkBZvY.js +292 -0
- package/dist/src/view/client/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/dist/src/view/client/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/dist/src/view/client/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dist/src/view/client/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dist/src/view/client/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2 +0 -0
- package/dist/src/view/client/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2 +0 -0
- package/dist/src/view/client/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2 +0 -0
- package/dist/src/view/client/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 +0 -0
- package/dist/src/view/client/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2 +0 -0
- package/dist/src/view/client/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2 +0 -0
- package/dist/src/view/client/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/dist/src/view/client/assets/gitGraphDiagram-WWUBYQGX-DYlP2_js.js +106 -0
- package/dist/src/view/client/assets/index-BnENo9bV.js +1 -0
- package/dist/src/view/client/assets/index-CQ7EOox7.css +1 -0
- package/dist/src/view/client/assets/index-CynNDkxt.js +13 -0
- package/dist/src/view/client/assets/infoDiagram-27XIBGKW-DRPB2c48.js +2 -0
- package/dist/src/view/client/assets/init-Gi6I4Gst.js +1 -0
- package/dist/src/view/client/assets/ishikawaDiagram-5VMMS53U-8VV429Cv.js +70 -0
- package/dist/src/view/client/assets/journeyDiagram-3NMN7TZE-Dzmwnf83.js +139 -0
- package/dist/src/view/client/assets/kanban-definition-UXKFOSKX-pYyZZ1i-.js +89 -0
- package/dist/src/view/client/assets/katex-HP8lGamR.js +257 -0
- package/dist/src/view/client/assets/layout-GF9k6yGo.js +1 -0
- package/dist/src/view/client/assets/linear-Yt2sSOYV.js +1 -0
- package/dist/src/view/client/assets/logo-RR_KBOAT.svg +149 -0
- package/dist/src/view/client/assets/maplibre-gl-CDX6Zuow.js +800 -0
- package/dist/src/view/client/assets/mermaid.core-ChWYCHN0.js +310 -0
- package/dist/src/view/client/assets/mindmap-definition-YA3MSWOX-Cc4fQvf1.js +96 -0
- package/dist/src/view/client/assets/ordinal-Cboi1Yqb.js +1 -0
- package/dist/src/view/client/assets/pegDiagram-XKGWAZYB-C0SsB8bZ.js +1 -0
- package/dist/src/view/client/assets/pieDiagram-E7YTZNPT-DIJpqERZ.js +39 -0
- package/dist/src/view/client/assets/quadrantDiagram-AXDQQJYC--d-gl6j-.js +7 -0
- package/dist/src/view/client/assets/railroadDiagram-O6MQD6OU-BQxwTt7z.js +1 -0
- package/dist/src/view/client/assets/requirementDiagram-BXWQKSXE-B_oTeD2A.js +84 -0
- package/dist/src/view/client/assets/sankeyDiagram-P5KCCOFB-DLukmE8X.js +40 -0
- package/dist/src/view/client/assets/sequenceDiagram-WJ2MYXX4-BNjVB2sc.js +162 -0
- package/dist/src/view/client/assets/sizeCapture-INFHLROL-BZecQTOw.js +1 -0
- package/dist/src/view/client/assets/stateDiagram-D77RDMKH-Bu1urvXC.js +1 -0
- package/dist/src/view/client/assets/stateDiagram-v2-MP3YSRHH-5pc_697G.js +1 -0
- package/dist/src/view/client/assets/swimlanes-42K2YHIH-bLAlcepB.js +1 -0
- package/dist/src/view/client/assets/swimlanesDiagram-VR7AAH4N-BbOpZjpp.js +8 -0
- package/dist/src/view/client/assets/three.module-PDSP0dbZ.js +4108 -0
- package/dist/src/view/client/assets/timeline-definition-24CTP7MA-tbwCNvcA.js +120 -0
- package/dist/src/view/client/assets/vennDiagram-4TSXK5OY-D8U8Fk0N.js +34 -0
- package/dist/src/view/client/assets/wardleyDiagram-VM6X3IG4-LHBVIeNb.js +78 -0
- package/dist/src/view/client/assets/xychartDiagram-S5SC5T6Z-CN4tfaFV.js +7 -0
- package/dist/src/view/client/index.html +2 -2
- package/dist/src/view/client-shell.d.ts +2 -0
- package/dist/src/view/client-shell.js +5 -0
- package/dist/src/view/diagnostics.d.ts +3 -2
- package/dist/src/view/diagnostics.js +49 -58
- package/dist/src/view/document-edit.d.ts +8 -0
- package/dist/src/view/document-edit.js +25 -0
- package/dist/src/view/document-route.d.ts +14 -0
- package/dist/src/view/document-route.js +137 -0
- package/dist/src/view/document-tree.d.ts +18 -0
- package/dist/src/view/document-tree.js +139 -0
- package/dist/src/view/external-document-tree.d.ts +3 -0
- package/dist/src/view/external-document-tree.js +674 -0
- package/dist/src/view/git-diff.js +202 -2
- package/dist/src/view/git.js +1 -1
- package/dist/src/view/graph.d.ts +4 -3
- package/dist/src/view/graph.js +100 -9
- package/dist/src/view/highlight.d.ts +10 -2
- package/dist/src/view/highlight.js +50648 -3166
- package/dist/src/view/markdown.d.ts +3 -2
- package/dist/src/view/markdown.js +256 -54
- package/dist/src/view/preindexed-search.d.ts +15 -0
- package/dist/src/view/preindexed-search.js +25 -0
- package/dist/src/view/protocol.d.ts +53 -7
- package/dist/src/view/publication.d.ts +2 -0
- package/dist/src/view/publication.js +78 -0
- package/dist/src/view/references.d.ts +11 -26
- package/dist/src/view/references.js +121 -112
- package/dist/src/view/repository.d.ts +14 -4
- package/dist/src/view/repository.js +260 -19
- package/dist/src/view/request-security.d.ts +5 -0
- package/dist/src/view/request-security.js +46 -0
- package/dist/src/view/search-result.d.ts +4 -0
- package/dist/src/view/search-result.js +25 -0
- package/dist/src/view/search.d.ts +7 -2
- package/dist/src/view/search.js +23 -34
- package/dist/src/view/server-build.d.ts +21 -0
- package/dist/src/view/server-build.js +145 -0
- package/dist/src/view/server-deployment.d.ts +31 -0
- package/dist/src/view/server-deployment.js +123 -0
- package/dist/src/view/server-index-worker.d.ts +6 -0
- package/dist/src/view/server-index-worker.js +14 -0
- package/dist/src/view/server.d.ts +11 -2
- package/dist/src/view/server.js +245 -73
- package/dist/src/view/source-target.d.ts +2 -0
- package/dist/src/view/source-target.js +49 -8
- package/dist/src/view/static-build.d.ts +18 -2
- package/dist/src/view/static-build.js +449 -110
- package/dist/src/view/static-protocol.d.ts +26 -2
- package/dist/src/view/static-protocol.js +5 -0
- package/dist/src/view/store.d.ts +20 -3
- package/dist/src/view/store.js +304 -48
- package/dist/src/view/table-of-contents.d.ts +2 -2
- package/dist/src/view/table-of-contents.js +2 -22
- package/dist/src/view/vercel-build.d.ts +24 -0
- package/dist/src/view/vercel-build.js +152 -0
- package/dist/src/view/vercel-server-build.d.ts +10 -0
- package/dist/src/view/vercel-server-build.js +61 -0
- package/dist/vendor/lat.md-server/cli.d.ts +2 -0
- package/dist/vendor/lat.md-server/cli.js +12 -0
- package/dist/vendor/lat.md-server/index.d.ts +38 -0
- package/dist/vendor/lat.md-server/index.js +128 -0
- package/package.json +68 -22
- package/plugins/lat-md/README.md +61 -0
- package/plugins/lat-md/hooks.json +38 -0
- package/plugins/lat-md/plugin.json +9 -0
- package/plugins/lat-md/rules/AGENTS.md +344 -0
- package/plugins/lat-md/skills/lat-md/SKILL.md +210 -0
- package/plugins/lat-md/skills/lat-md-conventions/SKILL.md +226 -0
- package/templates/AGENTS.md +26 -7
- package/templates/cursor-rules.md +23 -7
- package/templates/fork/conventions.md +133 -11
- package/templates/opencode-plugin.ts +9 -9
- package/templates/pi-extension.ts +11 -11
- package/templates/skill/SKILL.md +35 -3
- package/dist/src/cli/check-coverage.d.ts +0 -2
- package/dist/src/cli/check-coverage.js +0 -71
- package/dist/src/cli/check-frontmatter.d.ts +0 -12
- package/dist/src/cli/check-frontmatter.js +0 -44
- package/dist/src/cli/check-mode.d.ts +0 -21
- package/dist/src/cli/check-mode.js +0 -364
- package/dist/src/cli/check-status.d.ts +0 -74
- package/dist/src/cli/check-status.js +0 -217
- package/dist/src/cli/check.d.ts +0 -45
- package/dist/src/cli/check.js +0 -781
- package/dist/src/cli/context.d.ts +0 -11
- package/dist/src/cli/context.js +0 -58
- package/dist/src/cli/expand.d.ts +0 -8
- package/dist/src/cli/expand.js +0 -94
- package/dist/src/cli/gen-index.d.ts +0 -45
- package/dist/src/cli/gen-index.js +0 -235
- package/dist/src/cli/link-scheme.d.ts +0 -54
- package/dist/src/cli/link-scheme.js +0 -101
- package/dist/src/cli/locate.d.ts +0 -2
- package/dist/src/cli/locate.js +0 -17
- package/dist/src/cli/refs.d.ts +0 -22
- package/dist/src/cli/refs.js +0 -229
- package/dist/src/cli/section.d.ts +0 -43
- package/dist/src/cli/section.js +0 -252
- package/dist/src/cli/select-menu.d.ts +0 -13
- package/dist/src/cli/select-menu.js +0 -100
- package/dist/src/code-refs.d.ts +0 -17
- package/dist/src/code-refs.js +0 -298
- package/dist/src/config.d.ts +0 -29
- package/dist/src/config.js +0 -83
- package/dist/src/context.d.ts +0 -23
- package/dist/src/context.js +0 -11
- package/dist/src/extensions/wiki-link/from-markdown.d.ts +0 -5
- package/dist/src/extensions/wiki-link/from-markdown.js +0 -34
- package/dist/src/extensions/wiki-link/index.d.ts +0 -4
- package/dist/src/extensions/wiki-link/index.js +0 -3
- package/dist/src/extensions/wiki-link/syntax.d.ts +0 -14
- package/dist/src/extensions/wiki-link/syntax.js +0 -121
- package/dist/src/extensions/wiki-link/to-markdown.d.ts +0 -5
- package/dist/src/extensions/wiki-link/to-markdown.js +0 -28
- package/dist/src/extensions/wiki-link/types.d.ts +0 -34
- package/dist/src/format.d.ts +0 -8
- package/dist/src/format.js +0 -43
- package/dist/src/init-version.d.ts +0 -10
- package/dist/src/init-version.js +0 -49
- package/dist/src/lattice.d.ts +0 -109
- package/dist/src/lattice.js +0 -817
- package/dist/src/parser.d.ts +0 -3
- package/dist/src/parser.js +0 -18
- package/dist/src/source-parser.d.ts +0 -27
- package/dist/src/source-parser.js +0 -916
- package/dist/src/untrusted.d.ts +0 -18
- package/dist/src/untrusted.js +0 -93
- package/dist/src/view/client/assets/index-C3iaZyYT.css +0 -1
- package/dist/src/view/client/assets/index-KWi67IMz.js +0 -334
- package/dist/src/view/client/assets/logo-CNF8zs47.svg +0 -182
- package/dist/src/walk.d.ts +0 -18
- package/dist/src/walk.js +0 -27
- /package/dist/src/{extensions/wiki-link → search}/types.js +0 -0
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { Data, Literal } from 'mdast';
|
|
2
|
-
/**
|
|
3
|
-
* mdast node for a wiki-style link like [[target]] or [[target|alias]].
|
|
4
|
-
*/
|
|
5
|
-
export interface WikiLink extends Literal {
|
|
6
|
-
type: 'wikiLink';
|
|
7
|
-
value: string;
|
|
8
|
-
data: Data & {
|
|
9
|
-
alias: string | null;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
declare module 'mdast' {
|
|
13
|
-
interface RootContentMap {
|
|
14
|
-
wikiLink: WikiLink;
|
|
15
|
-
}
|
|
16
|
-
interface PhrasingContentMap {
|
|
17
|
-
wikiLink: WikiLink;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
declare module 'micromark-util-types' {
|
|
21
|
-
interface TokenTypeMap {
|
|
22
|
-
wikiLink: 'wikiLink';
|
|
23
|
-
wikiLinkMarker: 'wikiLinkMarker';
|
|
24
|
-
wikiLinkData: 'wikiLinkData';
|
|
25
|
-
wikiLinkTarget: 'wikiLinkTarget';
|
|
26
|
-
wikiLinkAliasMarker: 'wikiLinkAliasMarker';
|
|
27
|
-
wikiLinkAlias: 'wikiLinkAlias';
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
declare module 'mdast-util-to-markdown' {
|
|
31
|
-
interface ConstructNameMap {
|
|
32
|
-
wikiLink: 'wikiLink';
|
|
33
|
-
}
|
|
34
|
-
}
|
package/dist/src/format.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Section, SectionMatch } from './lattice.js';
|
|
2
|
-
import type { CmdContext, Styler } from './context.js';
|
|
3
|
-
export declare function formatSectionId(id: string, s: Styler): string;
|
|
4
|
-
export declare function formatSectionPreview(ctx: CmdContext, section: Section, opts?: {
|
|
5
|
-
reason?: string;
|
|
6
|
-
}): string;
|
|
7
|
-
export declare function formatResultList(ctx: CmdContext, header: string, matches: SectionMatch[]): string;
|
|
8
|
-
export declare function formatNavHints(ctx: CmdContext): string;
|
package/dist/src/format.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { join, relative } from 'node:path';
|
|
2
|
-
export function formatSectionId(id, s) {
|
|
3
|
-
const parts = id.split('#');
|
|
4
|
-
return parts.length === 1
|
|
5
|
-
? s.boldWhite(parts[0])
|
|
6
|
-
: s.dim(parts.slice(0, -1).join('#') + '#') +
|
|
7
|
-
s.boldWhite(parts[parts.length - 1]);
|
|
8
|
-
}
|
|
9
|
-
export function formatSectionPreview(ctx, section, opts) {
|
|
10
|
-
const s = ctx.styler;
|
|
11
|
-
const relPath = relative(process.cwd(), join(ctx.projectRoot, section.filePath));
|
|
12
|
-
const kind = section.id.includes('#') ? 'Section' : 'File';
|
|
13
|
-
const reasonSuffix = opts?.reason ? ' ' + s.dim(`(${opts.reason})`) : '';
|
|
14
|
-
const lines = [
|
|
15
|
-
`${s.dim('*')} ${s.dim(kind + ':')} [[${formatSectionId(section.id, s)}]]${reasonSuffix}`,
|
|
16
|
-
` ${s.dim('Defined in')} ${s.cyan(relPath)}${s.dim(`:${section.startLine}-${section.endLine}`)}`,
|
|
17
|
-
];
|
|
18
|
-
if (section.firstParagraph) {
|
|
19
|
-
lines.push('', ` ${s.dim('>')} ${section.firstParagraph}`);
|
|
20
|
-
}
|
|
21
|
-
return lines.join('\n');
|
|
22
|
-
}
|
|
23
|
-
export function formatResultList(ctx, header, matches) {
|
|
24
|
-
const lines = ['', `## ${header}`, ''];
|
|
25
|
-
for (let i = 0; i < matches.length; i++) {
|
|
26
|
-
if (i > 0)
|
|
27
|
-
lines.push('');
|
|
28
|
-
lines.push(formatSectionPreview(ctx, matches[i].section, {
|
|
29
|
-
reason: matches[i].reason,
|
|
30
|
-
}));
|
|
31
|
-
}
|
|
32
|
-
lines.push('');
|
|
33
|
-
return lines.join('\n');
|
|
34
|
-
}
|
|
35
|
-
export function formatNavHints(ctx) {
|
|
36
|
-
const s = ctx.styler;
|
|
37
|
-
const hints = ctx.mode === 'cli'
|
|
38
|
-
? `${s.dim('*')} \`lat section "section#id"\` \u2014 show full content with outgoing/incoming refs\n` +
|
|
39
|
-
`${s.dim('*')} \`lat search "new query"\` \u2014 search for something else`
|
|
40
|
-
: `${s.dim('*')} \`lat_section\` \u2014 show full content with outgoing/incoming refs\n` +
|
|
41
|
-
`${s.dim('*')} \`lat_search\` \u2014 search for something else`;
|
|
42
|
-
return `\n## To navigate further:\n\n${hints}`;
|
|
43
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Bump this number whenever `lat init` setup or defaults change in a way that
|
|
3
|
-
* requires users to re-run it (e.g. new hooks, generated files, MCP config, or
|
|
4
|
-
* a configuration migration).
|
|
5
|
-
*/
|
|
6
|
-
export declare const INIT_VERSION = 7;
|
|
7
|
-
export declare function readInitVersion(latDir: string): number | null;
|
|
8
|
-
export declare function readFileHash(latDir: string, relPath: string): string | null;
|
|
9
|
-
export declare function contentHash(content: string): string;
|
|
10
|
-
export declare function writeInitMeta(latDir: string, fileHashes: Record<string, string>): void;
|
package/dist/src/init-version.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { createHash } from 'node:crypto';
|
|
2
|
-
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
3
|
-
import { join } from 'node:path';
|
|
4
|
-
/**
|
|
5
|
-
* Bump this number whenever `lat init` setup or defaults change in a way that
|
|
6
|
-
* requires users to re-run it (e.g. new hooks, generated files, MCP config, or
|
|
7
|
-
* a configuration migration).
|
|
8
|
-
*/
|
|
9
|
-
export const INIT_VERSION = 7;
|
|
10
|
-
function cachePath(latDir) {
|
|
11
|
-
return join(latDir, '.cache', 'lat_init.json');
|
|
12
|
-
}
|
|
13
|
-
function readMeta(latDir) {
|
|
14
|
-
const p = cachePath(latDir);
|
|
15
|
-
if (!existsSync(p))
|
|
16
|
-
return null;
|
|
17
|
-
try {
|
|
18
|
-
return JSON.parse(readFileSync(p, 'utf-8'));
|
|
19
|
-
}
|
|
20
|
-
catch {
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
export function readInitVersion(latDir) {
|
|
25
|
-
const meta = readMeta(latDir);
|
|
26
|
-
if (!meta)
|
|
27
|
-
return null;
|
|
28
|
-
return typeof meta.init_version === 'number' ? meta.init_version : null;
|
|
29
|
-
}
|
|
30
|
-
export function readFileHash(latDir, relPath) {
|
|
31
|
-
const meta = readMeta(latDir);
|
|
32
|
-
return meta?.file_hashes?.[relPath] ?? null;
|
|
33
|
-
}
|
|
34
|
-
export function contentHash(content) {
|
|
35
|
-
return createHash('sha256').update(content).digest('hex');
|
|
36
|
-
}
|
|
37
|
-
export function writeInitMeta(latDir, fileHashes) {
|
|
38
|
-
const cacheDir = join(latDir, '.cache');
|
|
39
|
-
mkdirSync(cacheDir, { recursive: true });
|
|
40
|
-
// Merge with existing hashes so we don't lose entries from agents
|
|
41
|
-
// that weren't selected this run
|
|
42
|
-
const existing = readMeta(latDir);
|
|
43
|
-
const mergedHashes = { ...existing?.file_hashes, ...fileHashes };
|
|
44
|
-
const data = {
|
|
45
|
-
init_version: INIT_VERSION,
|
|
46
|
-
file_hashes: mergedHashes,
|
|
47
|
-
};
|
|
48
|
-
writeFileSync(cachePath(latDir), JSON.stringify(data, null, 2) + '\n');
|
|
49
|
-
}
|
package/dist/src/lattice.d.ts
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import type { Root } from 'mdast';
|
|
2
|
-
export type Section = {
|
|
3
|
-
id: string;
|
|
4
|
-
heading: string;
|
|
5
|
-
depth: number;
|
|
6
|
-
file: string;
|
|
7
|
-
filePath: string;
|
|
8
|
-
children: Section[];
|
|
9
|
-
startLine: number;
|
|
10
|
-
endLine: number;
|
|
11
|
-
firstParagraph: string;
|
|
12
|
-
/** GitHub-compatible anchor generated from the rendered heading text. */
|
|
13
|
-
githubSlug?: string;
|
|
14
|
-
};
|
|
15
|
-
export type Ref = {
|
|
16
|
-
target: string;
|
|
17
|
-
fromSection: string;
|
|
18
|
-
file: string;
|
|
19
|
-
line: number;
|
|
20
|
-
};
|
|
21
|
-
/** An ordinary markdown destination or an undefined reference-style link. */
|
|
22
|
-
export type MdLink = {
|
|
23
|
-
/** Destination exactly as authored, percent-escapes and all. */
|
|
24
|
-
url: string;
|
|
25
|
-
kind: 'link' | 'image' | 'definition';
|
|
26
|
-
line: number;
|
|
27
|
-
} | {
|
|
28
|
-
/** Authored label that should have a matching definition. */
|
|
29
|
-
identifier: string;
|
|
30
|
-
/** Full reference syntax exactly as authored. */
|
|
31
|
-
source: string;
|
|
32
|
-
kind: 'linkReference' | 'imageReference';
|
|
33
|
-
line: number;
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* Every field this build reads out of the `lat:` mapping. Kept in one place so
|
|
37
|
-
* a field added later is covered by the misplacement check without a second
|
|
38
|
-
* edit — the trap this list guards against is silent, so it must not depend on
|
|
39
|
-
* whoever adds the next field remembering to register it twice.
|
|
40
|
-
*/
|
|
41
|
-
export declare const LAT_FIELDS: readonly ["require-code-mention", "mode", "require-mode", "status", "reviewed-hash", "tags"];
|
|
42
|
-
/**
|
|
43
|
-
* Something wrong with the frontmatter itself, carried out of the parser for a
|
|
44
|
-
* caller to report. Both kinds fail OPEN if they stay quiet: a misplaced or
|
|
45
|
-
* unparseable `require-code-mention` turns a validation off and `lat check`
|
|
46
|
-
* then reports success on a file that is no longer being validated.
|
|
47
|
-
*/
|
|
48
|
-
export type FrontmatterProblem = {
|
|
49
|
-
kind: 'root-level-field';
|
|
50
|
-
field: string;
|
|
51
|
-
} | {
|
|
52
|
-
kind: 'parse-error';
|
|
53
|
-
message: string;
|
|
54
|
-
};
|
|
55
|
-
export type LatFrontmatter = {
|
|
56
|
-
/** Every key under the `lat:` mapping, parsed but not mapped to a field. */
|
|
57
|
-
raw: Record<string, unknown>;
|
|
58
|
-
requireCodeMention?: boolean;
|
|
59
|
-
/** Populated only when something is wrong; absent on a healthy document. */
|
|
60
|
-
problems?: FrontmatterProblem[];
|
|
61
|
-
};
|
|
62
|
-
export declare function parseFrontmatter(content: string): LatFrontmatter;
|
|
63
|
-
export declare function findLatticeDir(from?: string): string | null;
|
|
64
|
-
export declare function findProjectRoot(from?: string): string | null;
|
|
65
|
-
export declare function listLatticeFiles(latticeDir: string): Promise<string[]>;
|
|
66
|
-
export declare function parseSections(filePath: string, content: string, projectRoot?: string, tree?: Root): Section[];
|
|
67
|
-
export declare function loadAllSections(latticeDir: string, projectRoot?: string): Promise<Section[]>;
|
|
68
|
-
export declare function flattenSections(sections: Section[]): Section[];
|
|
69
|
-
/**
|
|
70
|
-
* Build an index mapping path suffixes to their full vault-relative paths.
|
|
71
|
-
* Used by resolveRef to allow short references when a suffix is unambiguous.
|
|
72
|
-
*
|
|
73
|
-
* For a file like `lat.md/guides/setup`, indexes both `guides/setup` and `setup`.
|
|
74
|
-
* This ensures backward-compatible short refs after the vault root moved to the
|
|
75
|
-
* project root (so section IDs now include the `lat.md/` prefix).
|
|
76
|
-
*/
|
|
77
|
-
export declare function buildFileIndex(sections: Section[]): Map<string, string[]>;
|
|
78
|
-
export type SectionSlugIndex = ReadonlyMap<string, string>;
|
|
79
|
-
/**
|
|
80
|
-
* Map GitHub-slugged heading paths back to canonical, literal-heading ids.
|
|
81
|
-
* Every path segment accepts either representation so an implicit literal h1
|
|
82
|
-
* can still prefix slugged child headings during short-ref resolution.
|
|
83
|
-
*/
|
|
84
|
-
export declare function buildSectionSlugIndex(sections: Section[]): Map<string, string>;
|
|
85
|
-
export type ResolveResult = {
|
|
86
|
-
resolved: string;
|
|
87
|
-
ambiguous: string[] | null;
|
|
88
|
-
/** When ambiguous but exactly one candidate has the section, suggest it. */
|
|
89
|
-
suggested: string | null;
|
|
90
|
-
};
|
|
91
|
-
/**
|
|
92
|
-
* Resolve a potentially short reference to its canonical full-path form.
|
|
93
|
-
* If the file segment of the ref is a bare stem that uniquely maps to one
|
|
94
|
-
* full path, expands it. Otherwise returns the ref unchanged.
|
|
95
|
-
*
|
|
96
|
-
* When ambiguous (multiple files share the stem), returns all candidates.
|
|
97
|
-
* If exactly one candidate actually contains the referenced section,
|
|
98
|
-
* `suggested` is set to that candidate so the caller can propose a fix.
|
|
99
|
-
*/
|
|
100
|
-
export declare function resolveRef(target: string, sectionIds: Set<string>, fileIndex: Map<string, string[]>, slugIndex?: SectionSlugIndex): ResolveResult;
|
|
101
|
-
export type SectionMatch = {
|
|
102
|
-
section: Section;
|
|
103
|
-
reason: string;
|
|
104
|
-
score?: number;
|
|
105
|
-
};
|
|
106
|
-
export declare function findSections(sections: Section[], query: string): SectionMatch[];
|
|
107
|
-
export declare function extractRefs(filePath: string, content: string, projectRoot?: string, tree?: Root): Ref[];
|
|
108
|
-
/** Extract link destinations and undefined full/collapsed references. */
|
|
109
|
-
export declare function extractLinks(content: string, tree?: Root): MdLink[];
|