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,378 +0,0 @@
|
|
|
1
|
-
import { t as getProviderEnvValue } from "./provider-env-BJhgA66g.mjs";
|
|
2
|
-
import { a as AssistantMessageEventStream } from "./diagnostics-xdSgQR8t.mjs";
|
|
3
|
-
import { T as getSystemMessageText, c as collapseSystemMessages, h as getInitialSystemMessage, n as clampThinkingLevel, p as getCurrentTools, t as calculateCost } from "./models-DBdii9gQ.mjs";
|
|
4
|
-
import { n as providerHeadersToRecord } from "./headers-GhQHLk-3.mjs";
|
|
5
|
-
import { m as getPiUserAgent, r as buildBaseOptions } from "./transform-messages-BClk99Vn.mjs";
|
|
6
|
-
import { t as sanitizeSurrogates } from "./sanitize-unicode-CqChtoM6.mjs";
|
|
7
|
-
import { n as normalizeProviderError, t as formatProviderError } from "./error-body-FhmCtR7m.mjs";
|
|
8
|
-
import { a as mapStopReason, c as retainThoughtSignature, d as toGoogleSdkThinkingLevel, f as toGoogleThinkingLevel, h as ResourceScope, i as isThinkingPart, l as retryGoogleRequest, m as GoogleGenAI, n as convertTools, o as resolveGoogleFunctionCallingMode, p as usesGoogleThinkingLevel, r as getDisabledGoogleThinkingConfig, s as resolveGoogleThinkingLevel, t as convertMessages, u as supportsGoogleStrictToolSampling } from "./google-shared-2CyYa4VE.mjs";
|
|
9
|
-
//#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/google-vertex.js
|
|
10
|
-
const API_VERSION = "v1";
|
|
11
|
-
const GCP_VERTEX_CREDENTIALS_MARKER = "gcp-vertex-credentials";
|
|
12
|
-
let toolCallCounter = 0;
|
|
13
|
-
const stream = (model, context, options) => {
|
|
14
|
-
const stream = new AssistantMessageEventStream();
|
|
15
|
-
const normalizedContext = collapseSystemMessages(context);
|
|
16
|
-
(async () => {
|
|
17
|
-
const output = {
|
|
18
|
-
role: "assistant",
|
|
19
|
-
content: [],
|
|
20
|
-
api: "google-vertex",
|
|
21
|
-
provider: model.provider,
|
|
22
|
-
model: model.id,
|
|
23
|
-
usage: {
|
|
24
|
-
input: 0,
|
|
25
|
-
output: 0,
|
|
26
|
-
cacheRead: 0,
|
|
27
|
-
cacheWrite: 0,
|
|
28
|
-
totalTokens: 0,
|
|
29
|
-
cost: {
|
|
30
|
-
input: 0,
|
|
31
|
-
output: 0,
|
|
32
|
-
cacheRead: 0,
|
|
33
|
-
cacheWrite: 0,
|
|
34
|
-
total: 0
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
stopReason: "pending",
|
|
38
|
-
timestamp: Date.now()
|
|
39
|
-
};
|
|
40
|
-
try {
|
|
41
|
-
if (options?.fetch && options.fetch !== globalThis.fetch) throw new Error("Custom fetch is not supported by the Google Vertex adapter");
|
|
42
|
-
const apiKey = resolveApiKey(options);
|
|
43
|
-
const client = apiKey ? createClientWithApiKey(model, apiKey, options?.headers) : createClient(model, resolveProject(options), resolveLocation(options), options?.headers, options?.env);
|
|
44
|
-
let params = buildParams(model, normalizedContext, options);
|
|
45
|
-
const nextParams = await options?.onPayload?.(params, model);
|
|
46
|
-
if (nextParams !== void 0) params = nextParams;
|
|
47
|
-
const googleStream = await retryGoogleRequest(() => client.models.generateContentStream(params), options);
|
|
48
|
-
stream.push({
|
|
49
|
-
type: "start",
|
|
50
|
-
partial: output
|
|
51
|
-
});
|
|
52
|
-
let currentBlock = null;
|
|
53
|
-
const blocks = output.content;
|
|
54
|
-
const blockIndex = () => blocks.length - 1;
|
|
55
|
-
for await (const chunk of googleStream) {
|
|
56
|
-
await options?.onProviderStreamEvent?.(chunk, model);
|
|
57
|
-
output.responseId ||= chunk.responseId;
|
|
58
|
-
const candidate = chunk.candidates?.[0];
|
|
59
|
-
if (candidate?.content?.parts) for (const part of candidate.content.parts) {
|
|
60
|
-
if (part.text !== void 0) {
|
|
61
|
-
const isThinking = isThinkingPart(part);
|
|
62
|
-
if (!currentBlock || isThinking && currentBlock.type !== "thinking" || !isThinking && currentBlock.type !== "text") {
|
|
63
|
-
if (currentBlock) {
|
|
64
|
-
if (currentBlock.type === "text") stream.push({
|
|
65
|
-
type: "text_end",
|
|
66
|
-
contentIndex: blocks.length - 1,
|
|
67
|
-
content: currentBlock.text,
|
|
68
|
-
partial: output
|
|
69
|
-
});
|
|
70
|
-
else stream.push({
|
|
71
|
-
type: "thinking_end",
|
|
72
|
-
contentIndex: blockIndex(),
|
|
73
|
-
content: currentBlock.thinking,
|
|
74
|
-
partial: output
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
if (isThinking) {
|
|
78
|
-
currentBlock = {
|
|
79
|
-
type: "thinking",
|
|
80
|
-
thinking: "",
|
|
81
|
-
thinkingSignature: void 0
|
|
82
|
-
};
|
|
83
|
-
output.content.push(currentBlock);
|
|
84
|
-
stream.push({
|
|
85
|
-
type: "thinking_start",
|
|
86
|
-
contentIndex: blockIndex(),
|
|
87
|
-
partial: output
|
|
88
|
-
});
|
|
89
|
-
} else {
|
|
90
|
-
currentBlock = {
|
|
91
|
-
type: "text",
|
|
92
|
-
text: ""
|
|
93
|
-
};
|
|
94
|
-
output.content.push(currentBlock);
|
|
95
|
-
stream.push({
|
|
96
|
-
type: "text_start",
|
|
97
|
-
contentIndex: blockIndex(),
|
|
98
|
-
partial: output
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
if (currentBlock.type === "thinking") {
|
|
103
|
-
currentBlock.thinking += part.text;
|
|
104
|
-
currentBlock.thinkingSignature = retainThoughtSignature(currentBlock.thinkingSignature, part.thoughtSignature);
|
|
105
|
-
stream.push({
|
|
106
|
-
type: "thinking_delta",
|
|
107
|
-
contentIndex: blockIndex(),
|
|
108
|
-
delta: part.text,
|
|
109
|
-
partial: output
|
|
110
|
-
});
|
|
111
|
-
} else {
|
|
112
|
-
currentBlock.text += part.text;
|
|
113
|
-
currentBlock.textSignature = retainThoughtSignature(currentBlock.textSignature, part.thoughtSignature);
|
|
114
|
-
stream.push({
|
|
115
|
-
type: "text_delta",
|
|
116
|
-
contentIndex: blockIndex(),
|
|
117
|
-
delta: part.text,
|
|
118
|
-
partial: output
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
if (part.functionCall) {
|
|
123
|
-
if (currentBlock) {
|
|
124
|
-
if (currentBlock.type === "text") stream.push({
|
|
125
|
-
type: "text_end",
|
|
126
|
-
contentIndex: blockIndex(),
|
|
127
|
-
content: currentBlock.text,
|
|
128
|
-
partial: output
|
|
129
|
-
});
|
|
130
|
-
else stream.push({
|
|
131
|
-
type: "thinking_end",
|
|
132
|
-
contentIndex: blockIndex(),
|
|
133
|
-
content: currentBlock.thinking,
|
|
134
|
-
partial: output
|
|
135
|
-
});
|
|
136
|
-
currentBlock = null;
|
|
137
|
-
}
|
|
138
|
-
const providedId = part.functionCall.id;
|
|
139
|
-
const toolCall = {
|
|
140
|
-
type: "toolCall",
|
|
141
|
-
id: !providedId || output.content.some((b) => b.type === "toolCall" && b.id === providedId) ? `${part.functionCall.name}_${Date.now()}_${++toolCallCounter}` : providedId,
|
|
142
|
-
name: part.functionCall.name || "",
|
|
143
|
-
arguments: part.functionCall.args ?? {},
|
|
144
|
-
...part.thoughtSignature && { thoughtSignature: part.thoughtSignature }
|
|
145
|
-
};
|
|
146
|
-
output.content.push(toolCall);
|
|
147
|
-
stream.push({
|
|
148
|
-
type: "toolcall_start",
|
|
149
|
-
contentIndex: blockIndex(),
|
|
150
|
-
partial: output
|
|
151
|
-
});
|
|
152
|
-
stream.push({
|
|
153
|
-
type: "toolcall_delta",
|
|
154
|
-
contentIndex: blockIndex(),
|
|
155
|
-
delta: JSON.stringify(toolCall.arguments),
|
|
156
|
-
partial: output
|
|
157
|
-
});
|
|
158
|
-
stream.push({
|
|
159
|
-
type: "toolcall_end",
|
|
160
|
-
contentIndex: blockIndex(),
|
|
161
|
-
toolCall,
|
|
162
|
-
partial: output
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
if (candidate?.finishReason) {
|
|
167
|
-
output.rawStopReason = candidate.finishReason;
|
|
168
|
-
output.stopReason = mapStopReason(candidate.finishReason);
|
|
169
|
-
if (output.content.some((b) => b.type === "toolCall") && output.stopReason === "stop") output.stopReason = "toolUse";
|
|
170
|
-
}
|
|
171
|
-
if (chunk.usageMetadata) {
|
|
172
|
-
output.usage = {
|
|
173
|
-
input: (chunk.usageMetadata.promptTokenCount || 0) - (chunk.usageMetadata.cachedContentTokenCount || 0),
|
|
174
|
-
output: (chunk.usageMetadata.candidatesTokenCount || 0) + (chunk.usageMetadata.thoughtsTokenCount || 0),
|
|
175
|
-
cacheRead: chunk.usageMetadata.cachedContentTokenCount || 0,
|
|
176
|
-
cacheWrite: 0,
|
|
177
|
-
reasoning: chunk.usageMetadata.thoughtsTokenCount || 0,
|
|
178
|
-
totalTokens: chunk.usageMetadata.totalTokenCount || 0,
|
|
179
|
-
cost: {
|
|
180
|
-
input: 0,
|
|
181
|
-
output: 0,
|
|
182
|
-
cacheRead: 0,
|
|
183
|
-
cacheWrite: 0,
|
|
184
|
-
total: 0
|
|
185
|
-
}
|
|
186
|
-
};
|
|
187
|
-
calculateCost(model, output.usage);
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
if (currentBlock) {
|
|
191
|
-
if (currentBlock.type === "text") stream.push({
|
|
192
|
-
type: "text_end",
|
|
193
|
-
contentIndex: blockIndex(),
|
|
194
|
-
content: currentBlock.text,
|
|
195
|
-
partial: output
|
|
196
|
-
});
|
|
197
|
-
else stream.push({
|
|
198
|
-
type: "thinking_end",
|
|
199
|
-
contentIndex: blockIndex(),
|
|
200
|
-
content: currentBlock.thinking,
|
|
201
|
-
partial: output
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
if (options?.signal?.aborted) throw new Error("Request was aborted");
|
|
205
|
-
if (output.stopReason === "pending") throw new Error("Google Vertex stream ended without a finish reason");
|
|
206
|
-
if (output.stopReason === "aborted" || output.stopReason === "error") {
|
|
207
|
-
const errorMessage = output.rawStopReason ? `Provider stopped with: ${output.rawStopReason}` : "An unknown error occurred";
|
|
208
|
-
throw new Error(errorMessage);
|
|
209
|
-
}
|
|
210
|
-
stream.push({
|
|
211
|
-
type: "done",
|
|
212
|
-
reason: output.stopReason,
|
|
213
|
-
message: output
|
|
214
|
-
});
|
|
215
|
-
stream.end();
|
|
216
|
-
} catch (error) {
|
|
217
|
-
for (const block of output.content) if ("index" in block) delete block.index;
|
|
218
|
-
output.stopReason = options?.signal?.aborted ? "aborted" : "error";
|
|
219
|
-
output.errorMessage = formatProviderError(normalizeProviderError(error));
|
|
220
|
-
stream.push({
|
|
221
|
-
type: "error",
|
|
222
|
-
reason: output.stopReason,
|
|
223
|
-
error: output
|
|
224
|
-
});
|
|
225
|
-
stream.end();
|
|
226
|
-
}
|
|
227
|
-
})();
|
|
228
|
-
return stream;
|
|
229
|
-
};
|
|
230
|
-
const streamSimple = (model, context, options) => {
|
|
231
|
-
const base = {
|
|
232
|
-
...buildBaseOptions(model, context, options, void 0),
|
|
233
|
-
toolChoice: options?.toolChoice
|
|
234
|
-
};
|
|
235
|
-
if (!options?.reasoning) return stream(model, context, {
|
|
236
|
-
...base,
|
|
237
|
-
thinking: { enabled: false }
|
|
238
|
-
});
|
|
239
|
-
const clampedReasoning = clampThinkingLevel(model, options.reasoning);
|
|
240
|
-
if (clampedReasoning === "off") return stream(model, context, {
|
|
241
|
-
...base,
|
|
242
|
-
thinking: { enabled: false }
|
|
243
|
-
});
|
|
244
|
-
const resolvedLevel = resolveGoogleThinkingLevel(model, clampedReasoning);
|
|
245
|
-
if (usesGoogleThinkingLevel(model)) return stream(model, context, {
|
|
246
|
-
...base,
|
|
247
|
-
thinking: {
|
|
248
|
-
enabled: true,
|
|
249
|
-
level: toGoogleThinkingLevel(resolvedLevel)
|
|
250
|
-
}
|
|
251
|
-
});
|
|
252
|
-
return stream(model, context, {
|
|
253
|
-
...base,
|
|
254
|
-
thinking: {
|
|
255
|
-
enabled: true,
|
|
256
|
-
budgetTokens: getGoogleBudget(model, resolvedLevel, options.thinkingBudgets)
|
|
257
|
-
}
|
|
258
|
-
});
|
|
259
|
-
};
|
|
260
|
-
function createClient(model, project, location, optionsHeaders, env) {
|
|
261
|
-
const googleAuthOptions = buildGoogleAuthOptions(env);
|
|
262
|
-
return new GoogleGenAI({
|
|
263
|
-
vertexai: true,
|
|
264
|
-
project,
|
|
265
|
-
location,
|
|
266
|
-
apiVersion: API_VERSION,
|
|
267
|
-
...googleAuthOptions ? { googleAuthOptions } : {},
|
|
268
|
-
httpOptions: buildHttpOptions(model, optionsHeaders)
|
|
269
|
-
});
|
|
270
|
-
}
|
|
271
|
-
function createClientWithApiKey(model, apiKey, optionsHeaders) {
|
|
272
|
-
return new GoogleGenAI({
|
|
273
|
-
vertexai: true,
|
|
274
|
-
apiKey,
|
|
275
|
-
apiVersion: API_VERSION,
|
|
276
|
-
httpOptions: buildHttpOptions(model, optionsHeaders)
|
|
277
|
-
});
|
|
278
|
-
}
|
|
279
|
-
function buildHttpOptions(model, optionsHeaders) {
|
|
280
|
-
const httpOptions = {};
|
|
281
|
-
const baseUrl = resolveCustomBaseUrl(model.baseUrl);
|
|
282
|
-
if (baseUrl) {
|
|
283
|
-
httpOptions.baseUrl = baseUrl;
|
|
284
|
-
httpOptions.baseUrlResourceScope = ResourceScope.COLLECTION;
|
|
285
|
-
if (baseUrlIncludesApiVersion(baseUrl)) httpOptions.apiVersion = "";
|
|
286
|
-
}
|
|
287
|
-
const headers = providerHeadersToRecord({
|
|
288
|
-
"User-Agent": getPiUserAgent(),
|
|
289
|
-
...model.headers,
|
|
290
|
-
...optionsHeaders
|
|
291
|
-
});
|
|
292
|
-
if (headers) httpOptions.headers = headers;
|
|
293
|
-
return Object.keys(httpOptions).length > 0 ? httpOptions : void 0;
|
|
294
|
-
}
|
|
295
|
-
function resolveCustomBaseUrl(baseUrl) {
|
|
296
|
-
const trimmed = baseUrl.trim();
|
|
297
|
-
if (!trimmed || trimmed.includes("{location}")) return;
|
|
298
|
-
return trimmed;
|
|
299
|
-
}
|
|
300
|
-
function baseUrlIncludesApiVersion(baseUrl) {
|
|
301
|
-
try {
|
|
302
|
-
return new URL(baseUrl).pathname.split("/").some((part) => /^v\d+(?:beta\d*)?$/.test(part));
|
|
303
|
-
} catch {
|
|
304
|
-
return /(?:^|\/)v\d+(?:beta\d*)?(?:\/|$)/.test(baseUrl);
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
function buildGoogleAuthOptions(env) {
|
|
308
|
-
const keyFilename = getProviderEnvValue("GOOGLE_APPLICATION_CREDENTIALS", env);
|
|
309
|
-
return keyFilename ? { keyFilename } : void 0;
|
|
310
|
-
}
|
|
311
|
-
function resolveApiKey(options) {
|
|
312
|
-
const apiKey = options?.apiKey?.trim();
|
|
313
|
-
if (!apiKey || apiKey === GCP_VERTEX_CREDENTIALS_MARKER || isPlaceholderApiKey(apiKey)) return;
|
|
314
|
-
return apiKey;
|
|
315
|
-
}
|
|
316
|
-
function isPlaceholderApiKey(apiKey) {
|
|
317
|
-
return /^<[^>]+>$/.test(apiKey);
|
|
318
|
-
}
|
|
319
|
-
function resolveProject(options) {
|
|
320
|
-
const project = options?.project || getProviderEnvValue("GOOGLE_CLOUD_PROJECT", options?.env) || getProviderEnvValue("GCLOUD_PROJECT", options?.env);
|
|
321
|
-
if (!project) throw new Error("Vertex AI requires a project ID. Set GOOGLE_CLOUD_PROJECT/GCLOUD_PROJECT or pass project in options.");
|
|
322
|
-
return project;
|
|
323
|
-
}
|
|
324
|
-
function resolveLocation(options) {
|
|
325
|
-
const location = options?.location || getProviderEnvValue("GOOGLE_CLOUD_LOCATION", options?.env);
|
|
326
|
-
if (!location) throw new Error("Vertex AI requires a location. Set GOOGLE_CLOUD_LOCATION or pass location in options.");
|
|
327
|
-
return location;
|
|
328
|
-
}
|
|
329
|
-
function buildParams(model, context, options = {}) {
|
|
330
|
-
const contents = convertMessages(model, context);
|
|
331
|
-
const initialSystemMessage = getInitialSystemMessage(context.messages);
|
|
332
|
-
const currentTools = getCurrentTools(context.messages);
|
|
333
|
-
const generationConfig = {};
|
|
334
|
-
if (options.temperature !== void 0) generationConfig.temperature = options.temperature;
|
|
335
|
-
if (options.maxTokens !== void 0) generationConfig.maxOutputTokens = options.maxTokens;
|
|
336
|
-
const supportsStrictMode = supportsGoogleStrictToolSampling(model.id);
|
|
337
|
-
const functionCallingMode = currentTools.length > 0 ? resolveGoogleFunctionCallingMode(currentTools, options.toolChoice, supportsStrictMode) : void 0;
|
|
338
|
-
const systemInstruction = initialSystemMessage ? getSystemMessageText(initialSystemMessage) : "";
|
|
339
|
-
const config = {
|
|
340
|
-
...Object.keys(generationConfig).length > 0 && generationConfig,
|
|
341
|
-
...systemInstruction && { systemInstruction: sanitizeSurrogates(systemInstruction) },
|
|
342
|
-
...currentTools.length > 0 && { tools: convertTools(currentTools, false, supportsStrictMode) },
|
|
343
|
-
...functionCallingMode !== void 0 && { toolConfig: { functionCallingConfig: { mode: functionCallingMode } } }
|
|
344
|
-
};
|
|
345
|
-
if (options.thinking?.enabled && model.reasoning) {
|
|
346
|
-
const thinkingConfig = { includeThoughts: true };
|
|
347
|
-
if (options.thinking.level !== void 0) thinkingConfig.thinkingLevel = toGoogleSdkThinkingLevel(options.thinking.level);
|
|
348
|
-
else if (options.thinking.budgetTokens !== void 0) thinkingConfig.thinkingBudget = options.thinking.budgetTokens;
|
|
349
|
-
config.thinkingConfig = thinkingConfig;
|
|
350
|
-
} else if (model.reasoning && options.thinking && !options.thinking.enabled) config.thinkingConfig = getDisabledGoogleThinkingConfig(model);
|
|
351
|
-
if (options.signal) {
|
|
352
|
-
if (options.signal.aborted) throw new Error("Request aborted");
|
|
353
|
-
config.abortSignal = options.signal;
|
|
354
|
-
}
|
|
355
|
-
return {
|
|
356
|
-
model: model.id,
|
|
357
|
-
contents,
|
|
358
|
-
config
|
|
359
|
-
};
|
|
360
|
-
}
|
|
361
|
-
function getGoogleBudget(model, level, customBudgets) {
|
|
362
|
-
if (customBudgets?.[level] !== void 0) return customBudgets[level];
|
|
363
|
-
if (model.id.includes("2.5-pro")) return {
|
|
364
|
-
minimal: 128,
|
|
365
|
-
low: 2048,
|
|
366
|
-
medium: 8192,
|
|
367
|
-
high: 32768
|
|
368
|
-
}[level];
|
|
369
|
-
if (model.id.includes("2.5-flash")) return {
|
|
370
|
-
minimal: 128,
|
|
371
|
-
low: 2048,
|
|
372
|
-
medium: 8192,
|
|
373
|
-
high: 24576
|
|
374
|
-
}[level];
|
|
375
|
-
return -1;
|
|
376
|
-
}
|
|
377
|
-
//#endregion
|
|
378
|
-
export { stream, streamSimple };
|
package/dist/hash-DN7ukSfd.mjs
DELETED
|
@@ -1,16 +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/hash.js
|
|
2
|
-
/** Fast deterministic hash to shorten long strings */
|
|
3
|
-
function shortHash(str) {
|
|
4
|
-
let h1 = 3735928559;
|
|
5
|
-
let h2 = 1103547991;
|
|
6
|
-
for (let i = 0; i < str.length; i++) {
|
|
7
|
-
const ch = str.charCodeAt(i);
|
|
8
|
-
h1 = Math.imul(h1 ^ ch, 2654435761);
|
|
9
|
-
h2 = Math.imul(h2 ^ ch, 1597334677);
|
|
10
|
-
}
|
|
11
|
-
h1 = Math.imul(h1 ^ h1 >>> 16, 2246822507) ^ Math.imul(h2 ^ h2 >>> 13, 3266489909);
|
|
12
|
-
h2 = Math.imul(h2 ^ h2 >>> 16, 2246822507) ^ Math.imul(h1 ^ h1 >>> 13, 3266489909);
|
|
13
|
-
return (h2 >>> 0).toString(36) + (h1 >>> 0).toString(36);
|
|
14
|
-
}
|
|
15
|
-
//#endregion
|
|
16
|
-
export { shortHash as t };
|
|
@@ -1,17 +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/headers.js
|
|
2
|
-
function headersToRecord(headers) {
|
|
3
|
-
const result = {};
|
|
4
|
-
for (const [key, value] of headers.entries()) result[key] = value;
|
|
5
|
-
return result;
|
|
6
|
-
}
|
|
7
|
-
function providerHeadersToRecord(...headerSources) {
|
|
8
|
-
const merged = /* @__PURE__ */ new Map();
|
|
9
|
-
for (const source of headerSources) for (const [name, value] of Object.entries(source ?? {})) {
|
|
10
|
-
const normalizedName = name.toLowerCase();
|
|
11
|
-
merged.delete(normalizedName);
|
|
12
|
-
if (value !== null) merged.set(normalizedName, [name, value]);
|
|
13
|
-
}
|
|
14
|
-
return merged.size > 0 ? Object.fromEntries(merged.values()) : void 0;
|
|
15
|
-
}
|
|
16
|
-
//#endregion
|
|
17
|
-
export { providerHeadersToRecord as n, headersToRecord as t };
|