uigraph 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -51
- package/dist/bin.mjs +1608 -59037
- package/dist/viewer/assets/abnfDiagram-VCTEODGH-D7zWJuPJ.js +1 -0
- package/dist/viewer/assets/actor-avatar-Bu-mKKXB.js +1 -0
- package/dist/viewer/assets/{api-adapters-CnQpLiWI.js → api-adapters-tfr51BsS.js} +1 -1
- package/dist/viewer/assets/{api-endpoints-DCA5GNpC.js → api-endpoints-D-Whnnwd.js} +9 -9
- package/dist/viewer/assets/{api-group-endpoints-page-Di42W69y.js → api-group-endpoints-page-B9R1EI4i.js} +9 -9
- package/dist/viewer/assets/{arc-Cn8owoDw.js → arc-DauzQXFu.js} +1 -1
- package/dist/viewer/assets/architectureDiagram-5GKGNRK7-CXzgHd-c.js +36 -0
- package/dist/viewer/assets/{arrow-left-DWcMgM2U.js → arrow-left-DpQqmf17.js} +1 -1
- package/dist/viewer/assets/avatar-DAFUyk1i.js +43 -0
- package/dist/viewer/assets/badge-hR3QvPWv.js +1 -0
- package/dist/viewer/assets/better-delete-confirmation-modal-CGEQ5O4X.js +1 -0
- package/dist/viewer/assets/better-dialog-DcIxFWwk.js +1 -0
- package/dist/viewer/assets/{blockDiagram-I7D4REHJ-CbYzOsL_.js → blockDiagram-I7D4REHJ-CFHWUw4z.js} +2 -2
- package/dist/viewer/assets/{brands-Bd4RklRx.js → brands-DtmA1AhP.js} +1 -1
- package/dist/viewer/assets/button-DZj74qS7.js +1 -0
- package/dist/viewer/assets/{c4Diagram-7LVT6UL2-CLkVbphC.js → c4Diagram-7LVT6UL2-BHSggPKI.js} +6 -6
- package/dist/viewer/assets/{calendar-C0xdI_ag.js → calendar-Bolgc8E5.js} +1 -1
- package/dist/viewer/assets/channel-CNRSofFP.js +1 -0
- package/dist/viewer/assets/{check-XjanpAFg.js → check-BpmCQNbj.js} +1 -1
- package/dist/viewer/assets/checkbox-CFJfXL6R.js +1 -0
- package/dist/viewer/assets/{chevron-down-R7pQzyLD.js → chevron-down-DDsUE_xz.js} +1 -1
- package/dist/viewer/assets/{chevron-up-CRPypfOs.js → chevron-up-DVznKMGv.js} +1 -1
- package/dist/viewer/assets/{chunk-2Q5K7J3B-CcvtugCu.js → chunk-2Q5K7J3B-CNfz5YDQ.js} +1 -1
- package/dist/viewer/assets/{chunk-5VM5RSS4-CpZHHr12.js → chunk-5VM5RSS4-CwIhjvMe.js} +1 -1
- package/dist/viewer/assets/{chunk-F27PBJKO-DeAl4iOc.js → chunk-F27PBJKO-YFexFJof.js} +1 -1
- package/dist/viewer/assets/{chunk-IMKFNOWR-BfrPe7pS.js → chunk-IMKFNOWR-GY2yrvuo.js} +1 -1
- package/dist/viewer/assets/{chunk-JWPE2WC7-DDjyvUmZ.js → chunk-JWPE2WC7-xd0JGvne.js} +1 -1
- package/dist/viewer/assets/chunk-OB3PAWPO-DJIP1M4r.js +12 -0
- package/dist/viewer/assets/{chunk-POPQ4Y6H-DkDb0mzz.js → chunk-POPQ4Y6H-Bh6rizEy.js} +1 -1
- package/dist/viewer/assets/{chunk-SVP7TREG-D-K2XIGs.js → chunk-SVP7TREG-DtNrjvpq.js} +1 -1
- package/dist/viewer/assets/{chunk-TICWLB2K-DWMQQx6z.js → chunk-TICWLB2K-DrERwtw8.js} +1 -1
- package/dist/viewer/assets/{chunk-XXDRQBXY-DfkljAyM.js → chunk-XXDRQBXY-fYo04iwY.js} +1 -1
- package/dist/viewer/assets/{circle-alert-pm13M-Ef.js → circle-alert-Bl7DXYD_.js} +1 -1
- package/dist/viewer/assets/classDiagram-ZZMXUADV-D7PO-ME9.js +1 -0
- package/dist/viewer/assets/classDiagram-v2-VYDZK3BY-D7PO-ME9.js +1 -0
- package/dist/viewer/assets/color-input-ClkkG_kZ.js +11 -0
- package/dist/viewer/assets/{common-Y7ySZBdh.js → common-DLCsGQ-t.js} +1 -1
- package/dist/viewer/assets/{component-icons-D1BDAuEt.js → component-icons-MJ61E9nt.js} +2 -2
- package/dist/viewer/assets/{copy-CN4K2f_R.js → copy-DMJJonQF.js} +1 -1
- package/dist/viewer/assets/cose-bilkent-JH36ORCC-Dplz8nVT.js +1 -0
- package/dist/viewer/assets/cross-button-D5qst1tj.js +1 -0
- package/dist/viewer/assets/{cynefin-OW5HDTMX-yz-uw9Kz.js → cynefin-OW5HDTMX-DiBs4CI8.js} +1 -1
- package/dist/viewer/assets/cynefinDiagram-5FMLGOSQ-COXS8-dI.js +62 -0
- package/dist/viewer/assets/{dagre-GXQ25YYZ-zjZDwXOe.js → dagre-GXQ25YYZ-K8qvfG8D.js} +2 -2
- package/dist/viewer/assets/dashboard-diagrams-page-Cb0xNr4W.js +2 -0
- package/dist/viewer/assets/dashboard-diagrams-page-inner-CD--zr5q.js +1 -0
- package/dist/viewer/assets/dashboard-docs-page-BfWR9Ai9.js +2 -0
- package/dist/viewer/assets/dashboard-docs-page-inner-BLbX-YwF.js +67 -0
- package/dist/viewer/assets/dashboard-layout-sTeeHNsZ.js +1 -0
- package/dist/viewer/assets/dashboard-lens-layout-D-tu_4kn.js +1 -0
- package/dist/viewer/assets/dashboard-map-frame-page-7pDmbTSe.js +1 -0
- package/dist/viewer/assets/dashboard-plans-page-CfwOZ34A.js +1 -0
- package/dist/viewer/assets/dashboard-service-apis-k93fjW51.js +1 -0
- package/dist/viewer/assets/{dashboard-service-diagrams-CIjk95Jk.js → dashboard-service-diagrams-BIWUxX-Y.js} +3 -3
- package/dist/viewer/assets/dashboard-service-docs-CnniTD6Q.js +1 -0
- package/dist/viewer/assets/{dashboard-service-overview-CzePVPjl.js → dashboard-service-overview-CGBu4omY.js} +5 -5
- package/dist/viewer/assets/dashboard-services-DEscIO2O.js +1 -0
- package/dist/viewer/assets/{db-type-badge-DOgu1Pyc.js → db-type-badge-UbPgpwQf.js} +2 -2
- package/dist/viewer/assets/debounce-Cp8eREM4-D7o-Pzb-.js +2 -0
- package/dist/viewer/assets/{dependencies-CYdEztHw.js → dependencies-DK2GDlhQ.js} +1 -1
- package/dist/viewer/assets/{dependency-graph-DbyfN-rC.js → dependency-graph-xBEnCS0J.js} +3 -3
- package/dist/viewer/assets/{diagram-S7CK7UJ4-q-NHkUCx.js → diagram-S7CK7UJ4-D-liadVe.js} +2 -2
- package/dist/viewer/assets/diagram-UQ7AKVKN-CnA8mgXp.js +41 -0
- package/dist/viewer/assets/{diagram-VSXAHHWV-DZc1kHGx.js → diagram-VSXAHHWV-Ck7dgRFR.js} +2 -2
- package/dist/viewer/assets/diagram-VX7I27RA-Cm1LHbu3.js +24 -0
- package/dist/viewer/assets/diagram-Z3DM3KII-DV3yBUCB.js +24 -0
- package/dist/viewer/assets/diagram-live-preview-DzJ7Nxp1.js +2 -0
- package/dist/viewer/assets/{diagram-portal-page-CWxuok9E.js → diagram-portal-page-gguGLULH.js} +24 -24
- package/dist/viewer/assets/{diagrams-C1xkRPqT.js → diagrams-BqBSv2eb.js} +4 -4
- package/dist/viewer/assets/dialog-D7wzTt0L.js +6 -0
- package/dist/viewer/assets/{doc-file-content-B06roi8L.js → doc-file-content-Be0au9Vo.js} +4 -4
- package/dist/viewer/assets/{download-CLdCXVsO.js → download-DhyZ3g4F.js} +1 -1
- package/dist/viewer/assets/ebnfDiagram-PWID7BFC-BXbHVQvG.js +1 -0
- package/dist/viewer/assets/{editor-vqK4qAnB.js → editor-F9o4zoeB.js} +2 -2
- package/dist/viewer/assets/{erDiagram-RLTQ6QDP-BWuA-aqV.js → erDiagram-RLTQ6QDP-DMfiWput.js} +2 -2
- package/dist/viewer/assets/{file-text-BvszilVL.js → file-text-BFqJQ67P.js} +1 -1
- package/dist/viewer/assets/flow-diagram-preview-B83UU1n_.js +1 -0
- package/dist/viewer/assets/{flowDiagram-HODETNUW-Db0QtNj4.js → flowDiagram-HODETNUW-BNFS2Mkr.js} +1 -1
- package/dist/viewer/assets/ganttDiagram-EL5Y4UJY-DFDsYJNp.js +292 -0
- package/dist/viewer/assets/gitGraphDiagram-WWUBYQGX-BVHabPDp.js +106 -0
- package/dist/viewer/assets/global-loader-XJO9_e0l.js +1 -0
- package/dist/viewer/assets/{globe-Jl6eIZmG.js → globe-CJ35KsQW.js} +1 -1
- package/dist/viewer/assets/gql-FFIj8zdp.js +1 -0
- package/dist/viewer/assets/{grid-scroll-body-CPqSxU6-.js → grid-scroll-body-DC5pYDPJ.js} +2 -2
- package/dist/viewer/assets/iconBase-DtqdW2XR.js +1 -0
- package/dist/viewer/assets/index-B6MxYIzs.js +1 -0
- package/dist/viewer/assets/index-BC5xdBQU.js +48 -0
- package/dist/viewer/assets/index-BIrx3oY4.js +1 -0
- package/dist/viewer/assets/{index-jm22RWpY.js → index-BZGsDmUx.js} +5 -5
- package/dist/viewer/assets/{index-Poftp9f1.js → index-BZXhpoWr.js} +4 -4
- package/dist/viewer/assets/index-Bn2bqqMd.js +1 -0
- package/dist/viewer/assets/{index-HU5pz3kj.js → index-BpCVYTvP.js} +36 -36
- package/dist/viewer/assets/{index-Bt2YHgxl.js → index-CBOYhBKJ.js} +1 -1
- package/dist/viewer/assets/index-CH7cEAxj.js +17 -0
- package/dist/viewer/assets/index-CIf0GId3.js +74 -0
- package/dist/viewer/assets/{index-D7MEHpJf.js → index-Ck66Ic_p.js} +4 -4
- package/dist/viewer/assets/index-Cp9mIQ8F.js +1 -0
- package/dist/viewer/assets/{index-c6Bxcoqm.js → index-DDmBuMKI.js} +1 -1
- package/dist/viewer/assets/{index-BSyJbFDG.js → index-DY3BFyb6.js} +1 -1
- package/dist/viewer/assets/{index-BS94XVnd.js → index-DkzZ-ZvR.js} +1 -1
- package/dist/viewer/assets/{index-C_43VC19.js → index-PglMbhys.js} +1 -1
- package/dist/viewer/assets/infoDiagram-27XIBGKW-CG-wwxBf.js +2 -0
- package/dist/viewer/assets/input--C59pq6j.js +1 -0
- package/dist/viewer/assets/{ishikawaDiagram-5VMMS53U-C4PzFnZ4.js → ishikawaDiagram-5VMMS53U-BlgV7ceJ.js} +2 -2
- package/dist/viewer/assets/{journeyDiagram-3NMN7TZE-Dpn3bBNo.js → journeyDiagram-3NMN7TZE-Cn03_Xl6.js} +2 -2
- package/dist/viewer/assets/{kanban-definition-UXKFOSKX-CJ99H4G6.js → kanban-definition-UXKFOSKX-CJogvDPY.js} +6 -6
- package/dist/viewer/assets/{layout-Bfvxt_D5.js → layout-B26eC4yQ.js} +1 -1
- package/dist/viewer/assets/{lens-run-page-DZneics-.js → lens-run-page-Ba1ppzJt.js} +3 -3
- package/dist/viewer/assets/lens-runs-page-BnUS57LM.js +1 -0
- package/dist/viewer/assets/{link-2-C75goIOt.js → link-2-D1e0xznG.js} +1 -1
- package/dist/viewer/assets/linked-project-dot-BY1gEES9.js +543 -0
- package/dist/viewer/assets/{loader-circle-C5jZoM7X.js → loader-circle-CiqyoJF7.js} +1 -1
- package/dist/viewer/assets/{merge-Cy7YkrN7.js → merge-BhOMvhW1.js} +1 -1
- package/dist/viewer/assets/mermaid.core-BDgZg3kW.js +312 -0
- package/dist/viewer/assets/method-badge-DErZP7y5.js +1 -0
- package/dist/viewer/assets/{mindmap-definition-YA3MSWOX-yQCKA-K4.js → mindmap-definition-YA3MSWOX-DFkLu0ac.js} +2 -2
- package/dist/viewer/assets/nav-links-DZWMpwMR.js +61 -0
- package/dist/viewer/assets/{network-COWNXGMM.js → network-B1apzT1s.js} +1 -1
- package/dist/viewer/assets/{nosql-editor-modal-DTiWkc_r.js → nosql-editor-modal-CvH0SWAi.js} +5 -5
- package/dist/viewer/assets/not-found-page-C-fn8QeM.js +1 -0
- package/dist/viewer/assets/organization-dependency-graph-page-BryP-iJL.js +1 -0
- package/dist/viewer/assets/pegDiagram-XKGWAZYB-g1cM14-L.js +1 -0
- package/dist/viewer/assets/{pieDiagram-E7YTZNPT-DqnkpCX4.js → pieDiagram-E7YTZNPT-WEnDsMY3.js} +2 -2
- package/dist/viewer/assets/{plus-DQakmTjA.js → plus-DbyuOgKB.js} +1 -1
- package/dist/viewer/assets/popover-476u3TN0.js +1 -0
- package/dist/viewer/assets/preload-helper-BlTxHScW.js +1 -0
- package/dist/viewer/assets/{quadrantDiagram-AXDQQJYC-iQjJfars.js → quadrantDiagram-AXDQQJYC-NdfQCpzF.js} +2 -2
- package/dist/viewer/assets/query-D9oj6LGx.js +50 -0
- package/dist/viewer/assets/{quill-rCHj4fCw.js → quill-Cde5JMRD.js} +1 -1
- package/dist/viewer/assets/railroadDiagram-O6MQD6OU-BYhlXlMY.js +1 -0
- package/dist/viewer/assets/{react-BNzYaZuG.js → react-Bx48XWN4.js} +1 -1
- package/dist/viewer/assets/react-flow-wrapper-BcbvHgxz.js +277 -0
- package/dist/viewer/assets/{requirementDiagram-BXWQKSXE-Bv-Vh1dW.js → requirementDiagram-BXWQKSXE-C25Bcm2L.js} +2 -2
- package/dist/viewer/assets/{sankeyDiagram-P5KCCOFB-C__uD07f.js → sankeyDiagram-P5KCCOFB-h8LiCsgk.js} +2 -2
- package/dist/viewer/assets/scroll-area-RagrStGj.js +6 -0
- package/dist/viewer/assets/{search-DW-qhXLk.js → search-vw7ucoOs.js} +1 -1
- package/dist/viewer/assets/section-loader-C4hOfhQS.js +1 -0
- package/dist/viewer/assets/section-not-found-BnrXiPog.js +1 -0
- package/dist/viewer/assets/select-D9fbrr7O.js +1 -0
- package/dist/viewer/assets/{sequenceDiagram-WJ2MYXX4-1RbvcHwO.js → sequenceDiagram-WJ2MYXX4-CDRVvD30.js} +2 -2
- package/dist/viewer/assets/{service-context-C17u_Fw9.js → service-context-D5nBtU18.js} +1 -1
- package/dist/viewer/assets/{service-database-list-page-cYuDHIls.js → service-database-list-page-DBjaDLVy.js} +2 -2
- package/dist/viewer/assets/service-database-page-CenNCgwf.js +2 -0
- package/dist/viewer/assets/service-database-page-inner-gS51TQTZ.js +85 -0
- package/dist/viewer/assets/{service-doc-Dir8g83J.js → service-doc-C-jHqT1U.js} +4 -4
- package/dist/viewer/assets/{service-doc-preview-modal-bJ6tJ5YR.js → service-doc-preview-modal-5sX6FOu1.js} +2 -2
- package/dist/viewer/assets/service-layout-Bf0vZBCH.js +1 -0
- package/dist/viewer/assets/service-pages-CFikvX4t.js +1 -0
- package/dist/viewer/assets/{services-Crqkffr5.js → services-Ivav34WC.js} +4 -4
- package/dist/viewer/assets/{share-2-BmYmqN4k.js → share-2-CQEaWbfH.js} +1 -1
- package/dist/viewer/assets/sizeCapture-INFHLROL-BJ6ndnPM.js +1 -0
- package/dist/viewer/assets/stateDiagram-D77RDMKH-B_tNCX3o.js +1 -0
- package/dist/viewer/assets/stateDiagram-v2-MP3YSRHH-Dl9wqdli.js +1 -0
- package/dist/viewer/assets/{style-DgSU0bQl.js → style-BPesJvJr.js} +8 -8
- package/dist/viewer/assets/super-circle-loader-DSkos6uP.js +1 -0
- package/dist/viewer/assets/super-logo-loader-Cxlbn6MB.js +1 -0
- package/dist/viewer/assets/swimlanes-42K2YHIH-CzURzYwf.js +1 -0
- package/dist/viewer/assets/swimlanesDiagram-VR7AAH4N-DrIlwFtk.js +8 -0
- package/dist/viewer/assets/table-B4pFND-o.js +1 -0
- package/dist/viewer/assets/textarea-Clgdv3Oi.js +1 -0
- package/dist/viewer/assets/{timeline-definition-24CTP7MA-C4yuLwUH.js → timeline-definition-24CTP7MA-D0YXQE1U.js} +2 -2
- package/dist/viewer/assets/ui-graph-logo-gHowu5gP.js +1 -0
- package/dist/viewer/assets/{upload-CRsS43j9.js → upload-CYb3nN_5.js} +1 -1
- package/dist/viewer/assets/{uploads-BOQHX9l4.js → uploads-CX2kdXbM.js} +8 -8
- package/dist/viewer/assets/{use-debounced-value-Ba-kkCUY.js → use-debounced-value-BpNFJd3C.js} +1 -1
- package/dist/viewer/assets/{use-localstorage-DIisTx-J.js → use-localstorage-D233xVb0.js} +1 -1
- package/dist/viewer/assets/use-permissions-BvmxJJ5r.js +1 -0
- package/dist/viewer/assets/{use-scoped-storage-C4RzED-E.js → use-scoped-storage-DL1XVp1j.js} +1 -1
- package/dist/viewer/assets/useMutation-D5ZHwHsx.js +1 -0
- package/dist/viewer/assets/useQuery-Dhe6uxrL.js +1 -0
- package/dist/viewer/assets/{vennDiagram-4TSXK5OY-BCtqXZqe.js → vennDiagram-4TSXK5OY-SSjHlqCQ.js} +2 -2
- package/dist/viewer/assets/{wardleyDiagram-VM6X3IG4-D3OtZJoT.js → wardleyDiagram-VM6X3IG4-CZWNdQxH.js} +2 -2
- package/dist/viewer/assets/{xychartDiagram-S5SC5T6Z-DxLL2CHH.js → xychartDiagram-S5SC5T6Z-B2qAGeb0.js} +2 -2
- package/dist/viewer/assets/zod-BMU4UTQt.js +1 -0
- package/dist/viewer/index.html +10 -1
- package/package.json +57 -57
- package/dist/abort-signals-B4fc3ahg.mjs +0 -34
- package/dist/agents.md +0 -28
- package/dist/anthropic-messages-KPxCHqBN.mjs +0 -14327
- package/dist/auth-storage-BvNH97p9.mjs +0 -2180
- package/dist/azure-openai-config-BbeCSg4y.mjs +0 -55
- package/dist/azure-openai-responses-BRzy8RfL.mjs +0 -182
- package/dist/classifier-shared-DBUHiTGw.mjs +0 -105
- package/dist/cli-2R6QQFp1.mjs +0 -451
- package/dist/cloudflare-workers-ai-system-one-BfqwmRQf.mjs +0 -44
- package/dist/config-D8DMGzIq.mjs +0 -647
- package/dist/cross-spawn-B2jIQPlu.mjs +0 -404
- package/dist/diagnostics-xdSgQR8t.mjs +0 -131
- package/dist/dist-BRyghrKX.mjs +0 -404
- package/dist/dist-D0EzrblG.mjs +0 -12161
- package/dist/dist-EKhnHWHG.mjs +0 -140221
- package/dist/dist-pQtuusFv.mjs +0 -1243
- package/dist/easter-egg-3d-C9_btlWn.mjs +0 -1225
- package/dist/env-api-keys-uytNub6O.mjs +0 -122
- package/dist/error-body-FhmCtR7m.mjs +0 -101
- package/dist/esm-D5isprgl.mjs +0 -1533
- package/dist/esm-DnqE4pfM.mjs +0 -104876
- package/dist/execute-BoTKl80U.mjs +0 -1715
- package/dist/github-copilot-headers-DWcTgoXr.mjs +0 -22
- package/dist/google-generative-ai-Brs5YpJo.mjs +0 -332
- package/dist/google-shared-2CyYa4VE.mjs +0 -33438
- package/dist/google-vertex-DZDUQPKa.mjs +0 -378
- package/dist/hash-DN7ukSfd.mjs +0 -16
- package/dist/headers-GhQHLk-3.mjs +0 -17
- package/dist/jiti-9kWALm4Y.mjs +0 -5439
- package/dist/jiti-loader-f21DrY1K.mjs +0 -27
- package/dist/jiti-static-loader-BI_w28l7.mjs +0 -41704
- package/dist/json-parse-B2mHg7o7.mjs +0 -381
- package/dist/keybinding-hints-D0nLU3ZH.mjs +0 -17899
- package/dist/lib-Dj1gKQJc.mjs +0 -24379
- package/dist/llama-cpp-classify-C73BoMYd.mjs +0 -344
- package/dist/mistral-conversations-DXVR7znL.mjs +0 -698
- package/dist/models-DBdii9gQ.mjs +0 -1255
- package/dist/multipart-parser-DLw9Z0uJ.mjs +0 -298
- package/dist/node-B0NU8X55.mjs +0 -2479
- package/dist/node-B8gaKm9g.mjs +0 -23
- package/dist/openai-I3_AqKDX.mjs +0 -17357
- package/dist/openai-codex-responses-PcZHDuBD.mjs +0 -1198
- package/dist/openai-completions-a_mH01ii.mjs +0 -994
- package/dist/openai-decisions-Du8y4mQG.mjs +0 -142
- package/dist/openai-prompt-cache-Bc6qNWt0.mjs +0 -8
- package/dist/openai-responses-a9lV_U7O.mjs +0 -270
- package/dist/openai-responses-shared-CDs_PBiH.mjs +0 -598
- package/dist/openrouter-images-D0Zc8Cjs.mjs +0 -125
- package/dist/photon_rs-DCvMOMu0.mjs +0 -4252
- package/dist/pi-messages-B5ietIBq.mjs +0 -306
- package/dist/plan-prompt.md +0 -56
- package/dist/prompt.md +0 -44
- package/dist/provider-env-BJhgA66g.mjs +0 -37
- package/dist/provider-retry-DXYM7rVE.mjs +0 -79
- package/dist/runtime-DTkBxiaM.mjs +0 -2822
- package/dist/sanitize-unicode-CqChtoM6.mjs +0 -26
- package/dist/shell-836_JFnI.mjs +0 -162
- package/dist/source-CKPndhKl.mjs +0 -478
- package/dist/src-DNm2QRm3.mjs +0 -5028
- package/dist/system-one-shared-DUAFtNa8.mjs +0 -75
- package/dist/token-DEUkymby.mjs +0 -56
- package/dist/token-util-Cx5S4eKt.mjs +0 -3
- package/dist/tool-DHDYqsyG.mjs +0 -6673
- package/dist/transform-messages-BClk99Vn.mjs +0 -477
- package/dist/typesafe-system-one-D2d8j8hZ.mjs +0 -24
- package/dist/typescript-Br-vsRJV.mjs +0 -6737
- package/dist/uuid-CNCZqNBb.mjs +0 -49
- package/dist/v2-1z8ijsD3.mjs +0 -6120
- package/dist/viewer/assets/abnfDiagram-VCTEODGH-j5YaKnl9.js +0 -1
- package/dist/viewer/assets/actor-avatar-DqmoY8Xc.js +0 -1
- package/dist/viewer/assets/architectureDiagram-5GKGNRK7-D80cJKz_.js +0 -36
- package/dist/viewer/assets/avatar-BI7D-Aia.js +0 -43
- package/dist/viewer/assets/badge-870-A4Y6.js +0 -1
- package/dist/viewer/assets/better-delete-confirmation-modal-Dib31LVb.js +0 -1
- package/dist/viewer/assets/better-dialog-D3AAiahr.js +0 -1
- package/dist/viewer/assets/button-DadqadpO.js +0 -1
- package/dist/viewer/assets/channel-DRkt3LIn.js +0 -1
- package/dist/viewer/assets/checkbox-BXpR079x.js +0 -1
- package/dist/viewer/assets/classDiagram-ZZMXUADV-G5CebNaC.js +0 -1
- package/dist/viewer/assets/classDiagram-v2-VYDZK3BY-G5CebNaC.js +0 -1
- package/dist/viewer/assets/color-input-Efm-lxDy.js +0 -11
- package/dist/viewer/assets/cose-bilkent-JH36ORCC-CrSHFmnp.js +0 -1
- package/dist/viewer/assets/cross-button-5Sr5rWVP.js +0 -1
- package/dist/viewer/assets/cynefinDiagram-5FMLGOSQ-Bdl_eBdu.js +0 -62
- package/dist/viewer/assets/dashboard-diagrams-page-DMupOe1m.js +0 -2
- package/dist/viewer/assets/dashboard-diagrams-page-inner-Dh0yKh2A.js +0 -1
- package/dist/viewer/assets/dashboard-docs-page-DWJ1qOQz.js +0 -2
- package/dist/viewer/assets/dashboard-docs-page-inner-Fs6G3oGo.js +0 -67
- package/dist/viewer/assets/dashboard-layout-D36InAaB.js +0 -1
- package/dist/viewer/assets/dashboard-lens-layout-Cv1Xx3hY.js +0 -1
- package/dist/viewer/assets/dashboard-map-frame-page-CTn61NUO.js +0 -1
- package/dist/viewer/assets/dashboard-plans-page-DxFJkrgK.js +0 -1
- package/dist/viewer/assets/dashboard-service-apis-BHtD9s5z.js +0 -1
- package/dist/viewer/assets/dashboard-service-docs-Uv_1uxxO.js +0 -1
- package/dist/viewer/assets/dashboard-services-CUP-L4Jg.js +0 -1
- package/dist/viewer/assets/diagram-UQ7AKVKN-DhFcurW6.js +0 -41
- package/dist/viewer/assets/diagram-VX7I27RA-DE1nREE8.js +0 -24
- package/dist/viewer/assets/diagram-Z3DM3KII-CSrYcCbc.js +0 -24
- package/dist/viewer/assets/diagram-live-preview-i5doxXLH.js +0 -2
- package/dist/viewer/assets/dialog-D_HtNS17.js +0 -6
- package/dist/viewer/assets/ebnfDiagram-PWID7BFC-BfL8m_sf.js +0 -1
- package/dist/viewer/assets/flow-diagram-preview-T0Z4iMVU.js +0 -1
- package/dist/viewer/assets/ganttDiagram-EL5Y4UJY-CsITpniw.js +0 -292
- package/dist/viewer/assets/gitGraphDiagram-WWUBYQGX-B4eCBGoe.js +0 -106
- package/dist/viewer/assets/iconBase-BoDZfJgC.js +0 -1
- package/dist/viewer/assets/index-5E1tJ7yK.js +0 -125
- package/dist/viewer/assets/index-7XpV2DRw.js +0 -1
- package/dist/viewer/assets/index-C0Rs3s9Z.js +0 -1
- package/dist/viewer/assets/index-CzHjJWeV.js +0 -1
- package/dist/viewer/assets/index-DcEA6SIV.js +0 -74
- package/dist/viewer/assets/infoDiagram-27XIBGKW-lTebN5Ix.js +0 -2
- package/dist/viewer/assets/input-YvHTVS0E.js +0 -1
- package/dist/viewer/assets/lens-runs-page-DoAOObxx.js +0 -1
- package/dist/viewer/assets/linked-project-dot-Ds2uEmJ9.js +0 -543
- package/dist/viewer/assets/mermaid.core-BCRBv8Us.js +0 -312
- package/dist/viewer/assets/method-badge-DMYDKdDZ.js +0 -1
- package/dist/viewer/assets/nav-links-8vT2ixiI.js +0 -61
- package/dist/viewer/assets/not-found-page-CnfLlhS4.js +0 -1
- package/dist/viewer/assets/organization-dependency-graph-page-3xqIxjNx.js +0 -1
- package/dist/viewer/assets/pegDiagram-XKGWAZYB-CMXqeAum.js +0 -1
- package/dist/viewer/assets/popover-CN9ni1N3.js +0 -1
- package/dist/viewer/assets/railroadDiagram-O6MQD6OU-CfqToX3W.js +0 -1
- package/dist/viewer/assets/react-flow-wrapper-BPlRstyO.js +0 -276
- package/dist/viewer/assets/scroll-area-BodE-n7W.js +0 -6
- package/dist/viewer/assets/section-loader-BzpYM_Nx.js +0 -1
- package/dist/viewer/assets/select-DDtnmSET.js +0 -1
- package/dist/viewer/assets/service-database-page-CMi1wF4h.js +0 -2
- package/dist/viewer/assets/service-database-page-inner-CoqAj93L.js +0 -85
- package/dist/viewer/assets/service-layout-0NMm_bKG.js +0 -1
- package/dist/viewer/assets/service-pages-dfnc91SU.js +0 -1
- package/dist/viewer/assets/sizeCapture-INFHLROL-BRJi3gCg.js +0 -1
- package/dist/viewer/assets/stateDiagram-D77RDMKH-DdLsfxgy.js +0 -1
- package/dist/viewer/assets/stateDiagram-v2-MP3YSRHH-DFwg8Qki.js +0 -1
- package/dist/viewer/assets/super-circle-loader-D8MElOMh.js +0 -1
- package/dist/viewer/assets/super-logo-loader-DJYiRbCS.js +0 -1
- package/dist/viewer/assets/swimlanes-42K2YHIH-AuYjrPqh.js +0 -1
- package/dist/viewer/assets/swimlanesDiagram-VR7AAH4N-0nIGA8_4.js +0 -8
- package/dist/viewer/assets/table-Bi4Auk9Z.js +0 -1
- package/dist/viewer/assets/textarea-MgxZ5x6-.js +0 -1
- package/dist/viewer/assets/ui-graph-logo-D4jRhd4z.js +0 -1
- package/dist/viewer/assets/use-permissions-6JVET753.js +0 -1
- package/dist/viewer/assets/useMutation-CmVaR9zz.js +0 -1
- package/dist/viewer/assets/useQuery-B8yYhO0c.js +0 -1
- package/dist/viewer/assets/zod-Dc4H6VVJ.js +0 -1
- package/dist/virtual-modules-DnCx0Gdx.mjs +0 -340
|
@@ -1,306 +0,0 @@
|
|
|
1
|
-
import { t as getProviderEnvValue } from "./provider-env-BJhgA66g.mjs";
|
|
2
|
-
import { a as AssistantMessageEventStream, n as createAssistantMessageDiagnostic, t as appendAssistantMessageDiagnostic } from "./diagnostics-xdSgQR8t.mjs";
|
|
3
|
-
import { n as providerHeadersToRecord, t as headersToRecord } from "./headers-GhQHLk-3.mjs";
|
|
4
|
-
import { n as parseStreamingJson } from "./json-parse-B2mHg7o7.mjs";
|
|
5
|
-
//#region node_modules/.pnpm/@earendil-works+pi-ai@1.2.0_@aws-sdk+credential-provider-node@3.972.86_@modelcontextpro_dcf109e705e96235bfb9a180457030de/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js
|
|
6
|
-
/**
|
|
7
|
-
* pi-messages API implementation.
|
|
8
|
-
*
|
|
9
|
-
* Streams pi's own message protocol directly to a backend: the request is a
|
|
10
|
-
* single POST of `{ model, context, options }` to `<baseUrl>/messages`, the
|
|
11
|
-
* response is an SSE stream of serialized assistant-message events plus a
|
|
12
|
-
* terminal `done`/`error` event. This is the wire protocol spoken by the
|
|
13
|
-
* Radius gateway, but any backend implementing it can be used, e.g. via a
|
|
14
|
-
* models.json custom provider with `"api": "pi-messages"`.
|
|
15
|
-
*/
|
|
16
|
-
var PiMessagesResponseError = class extends Error {
|
|
17
|
-
code;
|
|
18
|
-
diagnosticDetails;
|
|
19
|
-
constructor(message, code, diagnosticDetails) {
|
|
20
|
-
super(message);
|
|
21
|
-
this.name = "PiMessagesResponseError";
|
|
22
|
-
this.code = code;
|
|
23
|
-
this.diagnosticDetails = diagnosticDetails;
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
function parsePiMessagesErrorBody(body) {
|
|
27
|
-
try {
|
|
28
|
-
const parsed = JSON.parse(body);
|
|
29
|
-
const error = parsed?.error;
|
|
30
|
-
return parsed && typeof error === "object" && error !== null && !Array.isArray(error) ? parsed : void 0;
|
|
31
|
-
} catch {
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
function truncateDiagnosticString(value) {
|
|
36
|
-
const maxLength = 8192;
|
|
37
|
-
return value.length > maxLength ? `${value.slice(0, maxLength)}…` : value;
|
|
38
|
-
}
|
|
39
|
-
function formatPiMessagesResponseError(response, body, errorBody) {
|
|
40
|
-
const message = typeof errorBody?.error?.message === "string" ? errorBody.error.message : void 0;
|
|
41
|
-
const code = typeof errorBody?.error?.code === "string" ? errorBody.error.code : void 0;
|
|
42
|
-
const suffix = message ?? body;
|
|
43
|
-
const codeSuffix = code ? ` (${code})` : "";
|
|
44
|
-
return `${response.status} ${response.statusText}: ${suffix}${codeSuffix}`;
|
|
45
|
-
}
|
|
46
|
-
function createPiMessagesResponseError(model, url, response, body) {
|
|
47
|
-
const errorBody = parsePiMessagesErrorBody(body);
|
|
48
|
-
const code = typeof errorBody?.error?.code === "string" ? errorBody.error.code : void 0;
|
|
49
|
-
return new PiMessagesResponseError(formatPiMessagesResponseError(response, body, errorBody), code, {
|
|
50
|
-
version: 1,
|
|
51
|
-
provider: model.provider,
|
|
52
|
-
model: model.id,
|
|
53
|
-
url: url.toString(),
|
|
54
|
-
status: response.status,
|
|
55
|
-
statusText: response.statusText,
|
|
56
|
-
...errorBody?.error === void 0 ? {} : { error: errorBody.error },
|
|
57
|
-
...errorBody ? {} : { body: truncateDiagnosticString(body) },
|
|
58
|
-
timestampMs: Date.now()
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
function createEmptyUsage() {
|
|
62
|
-
return {
|
|
63
|
-
input: 0,
|
|
64
|
-
output: 0,
|
|
65
|
-
cacheRead: 0,
|
|
66
|
-
cacheWrite: 0,
|
|
67
|
-
totalTokens: 0,
|
|
68
|
-
cost: {
|
|
69
|
-
input: 0,
|
|
70
|
-
output: 0,
|
|
71
|
-
cacheRead: 0,
|
|
72
|
-
cacheWrite: 0,
|
|
73
|
-
total: 0
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
function appendRewriteDiagnostic(message, rewrite) {
|
|
78
|
-
if (!rewrite) return;
|
|
79
|
-
appendAssistantMessageDiagnostic(message, {
|
|
80
|
-
type: "pi_messages_rewrite",
|
|
81
|
-
timestamp: Date.now(),
|
|
82
|
-
details: { ...rewrite }
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
function createEventConverter(model) {
|
|
86
|
-
const partial = {
|
|
87
|
-
role: "assistant",
|
|
88
|
-
content: [],
|
|
89
|
-
api: model.api,
|
|
90
|
-
provider: model.provider,
|
|
91
|
-
model: model.id,
|
|
92
|
-
usage: createEmptyUsage(),
|
|
93
|
-
stopReason: "pending",
|
|
94
|
-
timestamp: Date.now()
|
|
95
|
-
};
|
|
96
|
-
const toolJson = /* @__PURE__ */ new Map();
|
|
97
|
-
return (event) => {
|
|
98
|
-
switch (event.type) {
|
|
99
|
-
case "done":
|
|
100
|
-
Object.assign(partial, {
|
|
101
|
-
stopReason: event.reason,
|
|
102
|
-
usage: event.usage,
|
|
103
|
-
responseId: event.responseId
|
|
104
|
-
});
|
|
105
|
-
if (event.providerThinkingLevel !== void 0) partial.providerThinkingLevel = event.providerThinkingLevel;
|
|
106
|
-
appendRewriteDiagnostic(partial, event.rewrite);
|
|
107
|
-
return {
|
|
108
|
-
type: "done",
|
|
109
|
-
reason: event.reason,
|
|
110
|
-
message: partial
|
|
111
|
-
};
|
|
112
|
-
case "error":
|
|
113
|
-
Object.assign(partial, {
|
|
114
|
-
stopReason: event.reason,
|
|
115
|
-
usage: event.usage,
|
|
116
|
-
errorMessage: event.errorMessage,
|
|
117
|
-
responseId: event.responseId
|
|
118
|
-
});
|
|
119
|
-
if (event.providerThinkingLevel !== void 0) partial.providerThinkingLevel = event.providerThinkingLevel;
|
|
120
|
-
appendRewriteDiagnostic(partial, event.rewrite);
|
|
121
|
-
return {
|
|
122
|
-
type: "error",
|
|
123
|
-
reason: event.reason,
|
|
124
|
-
error: partial
|
|
125
|
-
};
|
|
126
|
-
case "start": break;
|
|
127
|
-
case "text_start":
|
|
128
|
-
partial.content[event.contentIndex] = {
|
|
129
|
-
type: "text",
|
|
130
|
-
text: ""
|
|
131
|
-
};
|
|
132
|
-
break;
|
|
133
|
-
case "text_delta":
|
|
134
|
-
partial.content[event.contentIndex].text += event.delta;
|
|
135
|
-
break;
|
|
136
|
-
case "text_end":
|
|
137
|
-
Object.assign(partial.content[event.contentIndex], {
|
|
138
|
-
text: event.content,
|
|
139
|
-
textSignature: event.contentSignature
|
|
140
|
-
});
|
|
141
|
-
break;
|
|
142
|
-
case "thinking_start":
|
|
143
|
-
partial.content[event.contentIndex] = {
|
|
144
|
-
type: "thinking",
|
|
145
|
-
thinking: ""
|
|
146
|
-
};
|
|
147
|
-
break;
|
|
148
|
-
case "thinking_delta":
|
|
149
|
-
partial.content[event.contentIndex].thinking += event.delta;
|
|
150
|
-
break;
|
|
151
|
-
case "thinking_end":
|
|
152
|
-
Object.assign(partial.content[event.contentIndex], {
|
|
153
|
-
thinking: event.content,
|
|
154
|
-
thinkingSignature: event.contentSignature,
|
|
155
|
-
redacted: event.redacted
|
|
156
|
-
});
|
|
157
|
-
break;
|
|
158
|
-
case "toolcall_start":
|
|
159
|
-
partial.content[event.contentIndex] = {
|
|
160
|
-
type: "toolCall",
|
|
161
|
-
id: event.id,
|
|
162
|
-
name: event.toolName,
|
|
163
|
-
arguments: {}
|
|
164
|
-
};
|
|
165
|
-
toolJson.set(event.contentIndex, "");
|
|
166
|
-
break;
|
|
167
|
-
case "toolcall_delta": {
|
|
168
|
-
const json = `${toolJson.get(event.contentIndex) ?? ""}${event.delta}`;
|
|
169
|
-
toolJson.set(event.contentIndex, json);
|
|
170
|
-
partial.content[event.contentIndex].arguments = parseStreamingJson(json);
|
|
171
|
-
break;
|
|
172
|
-
}
|
|
173
|
-
case "toolcall_end":
|
|
174
|
-
Object.assign(partial.content[event.contentIndex], event.toolCall);
|
|
175
|
-
toolJson.delete(event.contentIndex);
|
|
176
|
-
return {
|
|
177
|
-
type: "toolcall_end",
|
|
178
|
-
contentIndex: event.contentIndex,
|
|
179
|
-
toolCall: partial.content[event.contentIndex],
|
|
180
|
-
partial
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
return {
|
|
184
|
-
...event,
|
|
185
|
-
partial
|
|
186
|
-
};
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
async function* readPiMessagesEvents(stream) {
|
|
190
|
-
const decoder = new TextDecoder();
|
|
191
|
-
const reader = stream.getReader();
|
|
192
|
-
let buffer = "";
|
|
193
|
-
try {
|
|
194
|
-
while (true) {
|
|
195
|
-
const { done, value } = await reader.read();
|
|
196
|
-
buffer += done ? decoder.decode() : decoder.decode(value, { stream: true });
|
|
197
|
-
buffer = buffer.replace(/\r\n/g, "\n");
|
|
198
|
-
let split = buffer.indexOf("\n\n");
|
|
199
|
-
while (split !== -1) {
|
|
200
|
-
const event = parsePiMessagesEvent(buffer.slice(0, split));
|
|
201
|
-
if (event) yield event;
|
|
202
|
-
buffer = buffer.slice(split + 2);
|
|
203
|
-
split = buffer.indexOf("\n\n");
|
|
204
|
-
}
|
|
205
|
-
if (done) break;
|
|
206
|
-
}
|
|
207
|
-
if (buffer.trim()) {
|
|
208
|
-
const event = parsePiMessagesEvent(buffer);
|
|
209
|
-
if (event) yield event;
|
|
210
|
-
}
|
|
211
|
-
} finally {
|
|
212
|
-
reader.releaseLock();
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
function parsePiMessagesEvent(raw) {
|
|
216
|
-
const data = raw.split("\n").find((line) => line.startsWith("data:"))?.slice(5).trim();
|
|
217
|
-
return data && data !== "[DONE]" ? JSON.parse(data) : void 0;
|
|
218
|
-
}
|
|
219
|
-
function createErrorEvent(model, error, aborted) {
|
|
220
|
-
const reason = aborted ? "aborted" : "error";
|
|
221
|
-
const assistantMessage = {
|
|
222
|
-
role: "assistant",
|
|
223
|
-
content: [],
|
|
224
|
-
api: model.api,
|
|
225
|
-
provider: model.provider,
|
|
226
|
-
model: model.id,
|
|
227
|
-
usage: createEmptyUsage(),
|
|
228
|
-
stopReason: reason,
|
|
229
|
-
errorMessage: error instanceof Error ? error.message : String(error),
|
|
230
|
-
timestamp: Date.now()
|
|
231
|
-
};
|
|
232
|
-
if (!aborted && error instanceof PiMessagesResponseError) appendAssistantMessageDiagnostic(assistantMessage, createAssistantMessageDiagnostic("pi_messages_response_failure", error, error.diagnosticDetails));
|
|
233
|
-
return {
|
|
234
|
-
type: "error",
|
|
235
|
-
reason,
|
|
236
|
-
error: assistantMessage
|
|
237
|
-
};
|
|
238
|
-
}
|
|
239
|
-
function resolveCacheRetention(cacheRetention, env) {
|
|
240
|
-
if (cacheRetention) return cacheRetention;
|
|
241
|
-
return getProviderEnvValue("PI_CACHE_RETENTION", env) === "long" ? "long" : void 0;
|
|
242
|
-
}
|
|
243
|
-
const stream = (model, context, options) => {
|
|
244
|
-
const eventStream = new AssistantMessageEventStream();
|
|
245
|
-
const convertEvent = createEventConverter(model);
|
|
246
|
-
(async () => {
|
|
247
|
-
try {
|
|
248
|
-
const apiKey = options?.apiKey;
|
|
249
|
-
if (!apiKey) throw new Error(`No API key provided for provider "${model.provider}"`);
|
|
250
|
-
const url = new URL(`${model.baseUrl.replace(/\/+$/u, "")}/messages`);
|
|
251
|
-
if (options?.debug) url.searchParams.set("debug", "1");
|
|
252
|
-
let payload = {
|
|
253
|
-
model: model.id,
|
|
254
|
-
context,
|
|
255
|
-
options: {
|
|
256
|
-
temperature: options?.temperature,
|
|
257
|
-
maxTokens: options?.maxTokens,
|
|
258
|
-
reasoning: options?.reasoning,
|
|
259
|
-
cacheRetention: resolveCacheRetention(options?.cacheRetention, options?.env),
|
|
260
|
-
sessionId: options?.sessionId,
|
|
261
|
-
toolChoice: options?.toolChoice
|
|
262
|
-
}
|
|
263
|
-
};
|
|
264
|
-
const nextPayload = await options?.onPayload?.(payload, model);
|
|
265
|
-
if (nextPayload !== void 0) payload = nextPayload;
|
|
266
|
-
const response = await (options?.fetch ?? globalThis.fetch)(url, {
|
|
267
|
-
method: "POST",
|
|
268
|
-
headers: {
|
|
269
|
-
authorization: `Bearer ${apiKey}`,
|
|
270
|
-
accept: "text/event-stream",
|
|
271
|
-
"content-type": "application/json",
|
|
272
|
-
...providerHeadersToRecord(options?.headers)
|
|
273
|
-
},
|
|
274
|
-
body: JSON.stringify(payload),
|
|
275
|
-
signal: options?.signal
|
|
276
|
-
});
|
|
277
|
-
await options?.onResponse?.({
|
|
278
|
-
status: response.status,
|
|
279
|
-
headers: headersToRecord(response.headers)
|
|
280
|
-
}, model);
|
|
281
|
-
if (!response.ok) throw createPiMessagesResponseError(model, url, response, await response.text());
|
|
282
|
-
if (!response.body) throw new Error(`${model.provider} response has no body`);
|
|
283
|
-
for await (const piEvent of readPiMessagesEvents(response.body)) {
|
|
284
|
-
await options?.onProviderStreamEvent?.(piEvent, model);
|
|
285
|
-
const event = convertEvent(piEvent);
|
|
286
|
-
eventStream.push(event);
|
|
287
|
-
if (event.type === "done" || event.type === "error") return;
|
|
288
|
-
}
|
|
289
|
-
throw new Error(`${model.provider} stream ended without a terminal event`);
|
|
290
|
-
} catch (error) {
|
|
291
|
-
eventStream.push(createErrorEvent(model, error, options?.signal?.aborted ?? false));
|
|
292
|
-
}
|
|
293
|
-
})();
|
|
294
|
-
return eventStream;
|
|
295
|
-
};
|
|
296
|
-
const streamSimple = (model, context, options) => {
|
|
297
|
-
const extra = options;
|
|
298
|
-
return stream(model, context, {
|
|
299
|
-
...options,
|
|
300
|
-
reasoning: options?.reasoning,
|
|
301
|
-
toolChoice: options?.toolChoice,
|
|
302
|
-
debug: extra?.debug
|
|
303
|
-
});
|
|
304
|
-
};
|
|
305
|
-
//#endregion
|
|
306
|
-
export { PiMessagesResponseError, stream, streamSimple };
|
package/dist/plan-prompt.md
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
You plan which architecture diagrams UIGraph should generate for a software repository, and which of its existing documents UIGraph should add. A local UIGraph viewer shows the diagrams the owner approves. Aim for the diagrams an engineer new to the code would most want: one for each important flow that explains how the system's work actually happens. Every candidate must be something the code proves exists.
|
|
2
|
-
|
|
3
|
-
## This run
|
|
4
|
-
|
|
5
|
-
This is a read-only planning run started by the repository owner from the `uigraph` CLI. Do not write files and do not ask questions. Explore the repository, then call `submit_diagram_plan` exactly once with your candidates. The owner sees the lists, ticks the diagrams and documents they want, and a separate run generates only those.
|
|
6
|
-
|
|
7
|
-
You have about 90 tool calls. Spend most of them finding and tracing the important flows, not reading files one by one. Call `submit_diagram_plan` before you run out of calls.
|
|
8
|
-
|
|
9
|
-
## How to explore
|
|
10
|
-
|
|
11
|
-
1. **Map the repository.** List the top level and read the README and the main manifests, such as `package.json`, `go.mod`, `pyproject.toml`, and `docker-compose.yml`. Work out what the system does for its users and which deployable units it has.
|
|
12
|
-
2. **Find the entry points.** Use `search` instead of reading whole folders: route and handler registrations, queue publishers and consumers, scheduled jobs, webhook handlers, CLI commands, and the main entry point of each deployable unit.
|
|
13
|
-
3. **Rank the flows.** Put first the flows that matter most:
|
|
14
|
-
- The core job: the flow the product exists to run, such as placing an order, syncing costs, or generating a report.
|
|
15
|
-
- Risk: flows that move money, grant access, or write important data.
|
|
16
|
-
- Reach: flows that cross a boundary, such as another service, a queue, a third-party API, or several datastores.
|
|
17
|
-
- Complexity: flows with many steps, retries, fan-out, or state changes that are hard to follow in the code.
|
|
18
|
-
4. **Trace the top flows.** For the five or six highest-ranked flows, follow the calls from the entry point through the services to the datastores and external calls, so each summary describes real steps.
|
|
19
|
-
|
|
20
|
-
## Tools
|
|
21
|
-
|
|
22
|
-
- `list_files`, `read_file`, `search` read the repository. They are confined to it, and generated directories and secret files are excluded on purpose; never try to reach them.
|
|
23
|
-
- `read_skill_file` reads the UIGraph skill's references. Read `references/architecture-diagrams.md` first. Read `references/sequence-diagrams.md` or `references/c4-diagrams.md` only if you propose that type.
|
|
24
|
-
- `submit_diagram_plan` submits the diagram and document candidates. It rejects a plan that cites a file that does not exist, so fix what it reports and submit again.
|
|
25
|
-
|
|
26
|
-
## Where candidates come from
|
|
27
|
-
|
|
28
|
-
| Evidence in the repository | Diagram | Mermaid type |
|
|
29
|
-
| --- | --- | --- |
|
|
30
|
-
| The service, its datastores, and every outbound dependency found in code or config | System context. Always propose it and recommend it. | `flowchart` |
|
|
31
|
-
| An important API flow such as authentication, checkout, or ingestion. One per flow, not one per endpoint. | Request lifecycle | `sequenceDiagram` |
|
|
32
|
-
| A worker, queue consumer, scheduled job, or webhook handler | Background flow | `flowchart` or `sequenceDiagram` |
|
|
33
|
-
| An entity with a status enum or a transition table | State machine | `stateDiagram-v2` |
|
|
34
|
-
| Major packages or modules and how they call each other, when that is not obvious from the folder names | Internal components | `flowchart` |
|
|
35
|
-
| Kubernetes manifests, Terraform, or similar config with several deployable units or real infrastructure | Deployment | `flowchart` |
|
|
36
|
-
|
|
37
|
-
Use `C4Container` or `C4Component` only when the repository already documents itself in C4 terms.
|
|
38
|
-
|
|
39
|
-
## Rules
|
|
40
|
-
|
|
41
|
-
- Propose at most 15 candidates. Mark 3 to 8 as recommended: the system context and the flows you ranked highest. A repository with one small script deserves one or two candidates.
|
|
42
|
-
- Prefer a diagram of a specific important flow over a generic overview. Do not propose a diagram that only restates the folder tree or a single file, such as a deployment diagram for one Dockerfile or a components diagram that mirrors the top-level folders.
|
|
43
|
-
- Every candidate has a kebab-case `id` (it becomes the diagram directory name), a plain `name`, a Mermaid `type`, a one-line `summary` of what the diagram shows, and 1 to 4 `evidence` files you actually read.
|
|
44
|
-
- Name each diagram for what it shows, such as "Cost sync from AWS" or "GitHub webhook handling". Never use generic names such as "Diagram 2".
|
|
45
|
-
- Never invent a flow, service, or dependency. When evidence is thin, propose fewer diagrams.
|
|
46
|
-
- When a document (README, comments, docs) claims something, verify it against the code before you cite it.
|
|
47
|
-
- Do not propose a diagram that already exists. The task message lists the existing ones.
|
|
48
|
-
|
|
49
|
-
## Existing documents
|
|
50
|
-
|
|
51
|
-
The owner can add the repository's own Markdown and HTML documents to the viewer as they are. Use `list_files` with a pattern such as `**/*.{md,markdown,html,htm}` to find them.
|
|
52
|
-
|
|
53
|
-
- Propose at most 10 documents that help an engineer understand or operate the service: the README, architecture notes, guides, runbooks, API docs, and decision records.
|
|
54
|
-
- Leave out changelogs, licenses, codes of conduct, contributing guides, issue and pull request templates, generated files, test fixtures, and documents of vendored code.
|
|
55
|
-
- Do not propose a document that `.uigraph.yaml` already lists under `docs`, and never propose a file under `.uigraph/`.
|
|
56
|
-
- Give each one its repository-relative `path`, a plain `name`, and a one-line `summary`. Submit an empty list when no document is worth adding.
|
package/dist/prompt.md
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
You generate UIGraph artifacts for a software repository by following the UIGraph skill below. A local UIGraph viewer reads the files you write and shows them as a service catalog, API endpoint lists, a dependency graph, and editable architecture diagrams, docs, database schemas, and queries.
|
|
2
|
-
|
|
3
|
-
## This run
|
|
4
|
-
|
|
5
|
-
This is a non-interactive run started by the repository owner from the `uigraph` CLI. The owner already approved generation at the CLI prompt and, when the task message lists approved diagrams, chose them from a checklist; that approval replaces the skill's artifact selection question, final plan, and `Generate` trigger word. Do not ask questions or wait for approval. Skip every step of the skill's confirmation workflow and go straight from discovery to generation, then validation.
|
|
6
|
-
|
|
7
|
-
Generate these artifact categories when the repository has evidence for them:
|
|
8
|
-
|
|
9
|
-
- `.uigraph.yaml` with the `service` block.
|
|
10
|
-
- `apis`: OpenAPI, GraphQL, or gRPC specs. Reference spec files that already exist in the repository at their current path; write a new OpenAPI spec under `.uigraph/openapi/` only from routes you read in the code.
|
|
11
|
-
- `dependencies`: other services, datastores, and third-party APIs this service calls or is called by.
|
|
12
|
-
- `architectureDiagrams`: Mermaid `.mmd` files with `context.json` under `.uigraph/diagrams/<name>/`. When the task message lists approved diagrams, generate exactly those, using the id as the directory name and the listed Mermaid type, and no other new diagram. When it lists none, produce a system context diagram, plus a component or data-flow diagram for each service with meaningful internal structure. A repository with one small script deserves at most one diagram.
|
|
13
|
-
- `docs`: Markdown docs under `.uigraph/docs/` for each service, covering what the code proves: how to run and configure it, its main flows, and its operational behaviour. When the task message lists approved existing documents, also add each one under `docs` at its current path, as the task message says.
|
|
14
|
-
- `databases`: one entry per database the service owns, with the schema at `.uigraph/db/<name>.sql` (or `.json` for `dynamodb` and `mongodb`). Build the schema only from migrations, ORM models, or DDL you read. `dialect` must be one of `postgres`, `mysql`, `sqlite`, `dynamodb`, `mongodb`, `other`.
|
|
15
|
-
- `queries`: the important queries the code actually runs against a listed database, copied from the code into `.uigraph/queries/<name>.sql` and referenced by `path`. Each `database` must match a `databases[].name` in the same config.
|
|
16
|
-
|
|
17
|
-
Do not generate test packs, maps, cost tags, timeline, ML projects, helper scripts, or CI files.
|
|
18
|
-
|
|
19
|
-
A repository with several deployable services keeps the main service in `.uigraph.yaml` and gives every other service its own config at `.uigraph/services/<service-name>.yaml`, using the same schema. Each config's `dependencies` names other services by their exact `service.name`.
|
|
20
|
-
|
|
21
|
-
## Tools
|
|
22
|
-
|
|
23
|
-
- `list_files`, `read_file`, `search` read the repository. They are confined to it, and generated directories and secret files are excluded on purpose; never try to reach them.
|
|
24
|
-
- `read_skill_file` reads the skill's references and templates. Read `references/uigraph-yaml-schema.md`, `references/service-dependencies.md`, `references/architecture-diagrams.md`, `references/docs.md`, and `references/database-schemas.md` before writing, plus any other reference you need.
|
|
25
|
-
- `write_file` creates or replaces `.uigraph.yaml` and files under `.uigraph/`. Nothing else in the repository can be written.
|
|
26
|
-
- `validate_artifacts` loads the artifacts exactly like the viewer. Run it after writing and fix every problem it reports, then run it again until it reports that all artifacts are valid.
|
|
27
|
-
|
|
28
|
-
You cannot run shell commands or git. The CLI gives you the repository's git remote below; use it for `service.repository`. When the CLI reports no usable remote, omit `service.repository`.
|
|
29
|
-
|
|
30
|
-
## Evidence rules
|
|
31
|
-
|
|
32
|
-
- Every service, API, dependency, diagram element, doc statement, table, and query must come from files you actually read.
|
|
33
|
-
- Never invent services, endpoints, dependencies, or technologies. When evidence is missing or ambiguous, leave the item out.
|
|
34
|
-
- When a document (README, comments, docs) claims something, verify it against the code.
|
|
35
|
-
- Use `service.ownership.team` only when the repository names an owning team (CODEOWNERS, package metadata); otherwise omit `ownership`.
|
|
36
|
-
|
|
37
|
-
## Diagrams
|
|
38
|
-
|
|
39
|
-
- Never write `style`, `classDef`, `class`, `linkStyle`, or colors; the app renders on a fixed dark canvas.
|
|
40
|
-
- Label an edge that crosses a system boundary with the protocol or call it carries, four words at most.
|
|
41
|
-
- Use `subgraph` only for real boundaries such as a deployable unit, a network zone, or a bounded context.
|
|
42
|
-
- Give nodes context types from the skill's references where they fit; a wrong type is worse than none.
|
|
43
|
-
|
|
44
|
-
Finish with a short summary of what you generated.
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { i as __require } from "./bin.mjs";
|
|
2
|
-
//#region node_modules/.pnpm/@earendil-works+pi-ai@1.2.0_@aws-sdk+credential-provider-node@3.972.86_@modelcontextpro_dcf109e705e96235bfb9a180457030de/node_modules/@earendil-works/pi-ai/dist/utils/provider-env.js
|
|
3
|
-
let procEnvCache = null;
|
|
4
|
-
/**
|
|
5
|
-
* Fallback for https://github.com/oven-sh/bun/issues/27802.
|
|
6
|
-
* Bun compiled binaries can expose an empty process.env inside Linux sandboxes
|
|
7
|
-
* even though /proc/self/environ contains the environment.
|
|
8
|
-
*
|
|
9
|
-
* This intentionally duplicates restoreSandboxEnv() in
|
|
10
|
-
* packages/coding-agent/src/bun/restore-sandbox-env.ts. The ai package can be
|
|
11
|
-
* used directly, without going through that entrypoint, so provider env lookup
|
|
12
|
-
* must not depend on process.env having been patched.
|
|
13
|
-
*/
|
|
14
|
-
function getBunSandboxEnvValue(name) {
|
|
15
|
-
if (typeof process === "undefined" || !process.versions?.bun || Object.keys(process.env).length > 0) return;
|
|
16
|
-
if (procEnvCache === null) {
|
|
17
|
-
procEnvCache = /* @__PURE__ */ new Map();
|
|
18
|
-
try {
|
|
19
|
-
const { readFileSync } = __require("node:fs");
|
|
20
|
-
const data = readFileSync("/proc/self/environ", "utf-8");
|
|
21
|
-
for (const entry of data.split("\0")) {
|
|
22
|
-
const idx = entry.indexOf("=");
|
|
23
|
-
if (idx > 0) procEnvCache.set(entry.slice(0, idx), entry.slice(idx + 1));
|
|
24
|
-
}
|
|
25
|
-
} catch {}
|
|
26
|
-
}
|
|
27
|
-
return procEnvCache.get(name);
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Resolve a provider env value from scoped overrides, normal process.env, then
|
|
31
|
-
* the duplicated Bun sandbox fallback for direct pi-ai consumers.
|
|
32
|
-
*/
|
|
33
|
-
function getProviderEnvValue(name, env) {
|
|
34
|
-
return env?.[name] || (typeof process !== "undefined" ? process.env[name] : void 0) || getBunSandboxEnvValue(name) || void 0;
|
|
35
|
-
}
|
|
36
|
-
//#endregion
|
|
37
|
-
export { getProviderEnvValue as t };
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
//#region node_modules/.pnpm/@earendil-works+pi-ai@1.2.0_@aws-sdk+credential-provider-node@3.972.86_@modelcontextpro_dcf109e705e96235bfb9a180457030de/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.js
|
|
2
|
-
const DEFAULT_MAX_RETRY_DELAY_MS = 6e4;
|
|
3
|
-
function isProviderError(error) {
|
|
4
|
-
if (!(error instanceof Error) || !("status" in error) || !("headers" in error)) return false;
|
|
5
|
-
return (error.status === void 0 || typeof error.status === "number") && (error.headers === void 0 || error.headers instanceof Headers);
|
|
6
|
-
}
|
|
7
|
-
/** Mirrors the pinned OpenAI/Anthropic SDK retry policy; review when either SDK is upgraded. */
|
|
8
|
-
function isRetryableProviderError(error) {
|
|
9
|
-
const shouldRetry = error.headers?.get("x-should-retry");
|
|
10
|
-
if (shouldRetry === "true") return true;
|
|
11
|
-
if (shouldRetry === "false") return false;
|
|
12
|
-
if (error.status === void 0) return true;
|
|
13
|
-
return error.status === 408 || error.status === 409 || error.status === 429 || typeof error.status === "number" && error.status >= 500;
|
|
14
|
-
}
|
|
15
|
-
function validateServerRetryDelayMs(delayMs, maxRetryDelayMs, providerErrorMessage) {
|
|
16
|
-
const maxDelayMs = maxRetryDelayMs ?? DEFAULT_MAX_RETRY_DELAY_MS;
|
|
17
|
-
if (maxDelayMs > 0 && delayMs > maxDelayMs) throw new Error(`Server requested ${Math.ceil(delayMs / 1e3)}s retry delay (max: ${Math.ceil(maxDelayMs / 1e3)}s). ${providerErrorMessage}`);
|
|
18
|
-
return delayMs;
|
|
19
|
-
}
|
|
20
|
-
function getRetryDelayMs(error, retryIndex, maxRetryDelayMs) {
|
|
21
|
-
const retryAfterMs = error.headers?.get("retry-after-ms");
|
|
22
|
-
if (retryAfterMs) {
|
|
23
|
-
const value = Number.parseFloat(retryAfterMs);
|
|
24
|
-
if (Number.isFinite(value)) return validateServerRetryDelayMs(value, maxRetryDelayMs, error.message);
|
|
25
|
-
}
|
|
26
|
-
const retryAfter = error.headers?.get("retry-after");
|
|
27
|
-
if (retryAfter) {
|
|
28
|
-
const seconds = Number.parseFloat(retryAfter);
|
|
29
|
-
const delayMs = Number.isNaN(seconds) ? Date.parse(retryAfter) - Date.now() : seconds * 1e3;
|
|
30
|
-
if (Number.isFinite(delayMs)) return validateServerRetryDelayMs(delayMs, maxRetryDelayMs, error.message);
|
|
31
|
-
}
|
|
32
|
-
return Math.min(.5 * 2 ** retryIndex, 8) * 1e3 * (1 - Math.random() * .25);
|
|
33
|
-
}
|
|
34
|
-
function createAbortError() {
|
|
35
|
-
const error = /* @__PURE__ */ new Error("Request aborted");
|
|
36
|
-
error.name = "AbortError";
|
|
37
|
-
return error;
|
|
38
|
-
}
|
|
39
|
-
function abortableSleep(ms, signal) {
|
|
40
|
-
return new Promise((resolve, reject) => {
|
|
41
|
-
if (signal?.aborted) {
|
|
42
|
-
reject(createAbortError());
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
const onAbort = () => {
|
|
46
|
-
clearTimeout(timeout);
|
|
47
|
-
reject(createAbortError());
|
|
48
|
-
};
|
|
49
|
-
const timeout = setTimeout(() => {
|
|
50
|
-
signal?.removeEventListener("abort", onAbort);
|
|
51
|
-
resolve();
|
|
52
|
-
}, Math.max(0, ms));
|
|
53
|
-
signal?.addEventListener("abort", onAbort, { once: true });
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Reproduce the retry behavior used by the OpenAI and Anthropic SDKs while making
|
|
58
|
-
* their backoff sleep interruptible. Their built-in retry timers ignore the
|
|
59
|
-
* request AbortSignal, so callers must invoke the SDK with `maxRetries: 0` and
|
|
60
|
-
* wrap the request with this helper. Provider-requested delays above
|
|
61
|
-
* `maxRetryDelayMs` fail immediately (60 seconds by default); set it to zero to
|
|
62
|
-
* disable the limit.
|
|
63
|
-
*/
|
|
64
|
-
async function retryProviderRequest(request, options = {}) {
|
|
65
|
-
const maxRetries = options.maxRetries ?? 0;
|
|
66
|
-
let retriesRemaining = maxRetries;
|
|
67
|
-
for (;;) try {
|
|
68
|
-
return await request();
|
|
69
|
-
} catch (error) {
|
|
70
|
-
if (options.signal?.aborted) throw createAbortError();
|
|
71
|
-
if (retriesRemaining <= 0 || !isProviderError(error) || !isRetryableProviderError(error)) throw error;
|
|
72
|
-
if (error.status !== void 0 && options.noRetryStatuses?.includes(error.status)) throw error;
|
|
73
|
-
const retryIndex = maxRetries - retriesRemaining;
|
|
74
|
-
retriesRemaining--;
|
|
75
|
-
await abortableSleep(getRetryDelayMs(error, retryIndex, options.maxRetryDelayMs), options.signal);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
//#endregion
|
|
79
|
-
export { retryProviderRequest as t };
|