uigraph 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.mjs +134 -56911
- 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 +56 -56
- package/dist/abort-signals-B4fc3ahg.mjs +0 -34
- 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/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,598 +0,0 @@
|
|
|
1
|
-
import { E as renderSystemMessageUpdate, T as getSystemMessageText, b as resolveTranscript, t as calculateCost, x as resolveTranscriptTools } from "./models-DBdii9gQ.mjs";
|
|
2
|
-
import { n as parseStreamingJson } from "./json-parse-B2mHg7o7.mjs";
|
|
3
|
-
import { c as appendGrammarToolInputJsonDelta, d as getJsonSchemaToolParameters, f as resolveGrammarConstrainedSampling, p as resolveJsonSchemaStrictSampling, t as transformMessages, u as getGrammarToolInput } from "./transform-messages-BClk99Vn.mjs";
|
|
4
|
-
import { t as sanitizeSurrogates } from "./sanitize-unicode-CqChtoM6.mjs";
|
|
5
|
-
import { t as shortHash } from "./hash-DN7ukSfd.mjs";
|
|
6
|
-
//#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/openai-responses-shared.js
|
|
7
|
-
function encodeTextSignatureV1(id, phase) {
|
|
8
|
-
const payload = {
|
|
9
|
-
v: 1,
|
|
10
|
-
id
|
|
11
|
-
};
|
|
12
|
-
if (phase) payload.phase = phase;
|
|
13
|
-
return JSON.stringify(payload);
|
|
14
|
-
}
|
|
15
|
-
function parseTextSignature(signature) {
|
|
16
|
-
if (!signature) return void 0;
|
|
17
|
-
if (signature.startsWith("{")) try {
|
|
18
|
-
const parsed = JSON.parse(signature);
|
|
19
|
-
if (parsed.v === 1 && typeof parsed.id === "string") {
|
|
20
|
-
if (parsed.phase === "commentary" || parsed.phase === "final_answer") return {
|
|
21
|
-
id: parsed.id,
|
|
22
|
-
phase: parsed.phase
|
|
23
|
-
};
|
|
24
|
-
return { id: parsed.id };
|
|
25
|
-
}
|
|
26
|
-
} catch {}
|
|
27
|
-
return { id: signature };
|
|
28
|
-
}
|
|
29
|
-
function convertToolResultOutput(model, content) {
|
|
30
|
-
const textResult = content.filter((c) => c.type === "text").map((c) => c.text).join("\n");
|
|
31
|
-
const images = content.filter((c) => c.type === "image");
|
|
32
|
-
const hasText = textResult.length > 0;
|
|
33
|
-
if (images.length === 0 || !model.input.includes("image")) return sanitizeSurrogates(hasText ? textResult : images.length > 0 ? "(see attached image)" : "(no tool output)");
|
|
34
|
-
const output = [];
|
|
35
|
-
if (hasText) output.push({
|
|
36
|
-
type: "input_text",
|
|
37
|
-
text: sanitizeSurrogates(textResult)
|
|
38
|
-
});
|
|
39
|
-
for (const image of images) output.push({
|
|
40
|
-
type: "input_image",
|
|
41
|
-
detail: "auto",
|
|
42
|
-
image_url: `data:${image.mimeType};base64,${image.data}`
|
|
43
|
-
});
|
|
44
|
-
return output;
|
|
45
|
-
}
|
|
46
|
-
function convertResponsesMessages(model, context, allowedToolCallProviders, options) {
|
|
47
|
-
const normalizedContext = resolveTranscript(context, options?.supportsMidConvoSystemMessages);
|
|
48
|
-
const messages = [];
|
|
49
|
-
const normalizeIdPart = (part) => {
|
|
50
|
-
const sanitized = part.replace(/[^a-zA-Z0-9_-]/g, "_");
|
|
51
|
-
return (sanitized.length > 64 ? sanitized.slice(0, 64) : sanitized).replace(/_+$/, "");
|
|
52
|
-
};
|
|
53
|
-
const buildForeignResponsesItemId = (itemId) => {
|
|
54
|
-
const normalized = `fc_${shortHash(itemId)}`;
|
|
55
|
-
return normalized.length > 64 ? normalized.slice(0, 64) : normalized;
|
|
56
|
-
};
|
|
57
|
-
const normalizeToolCallId = (id, _targetModel, source) => {
|
|
58
|
-
if (!allowedToolCallProviders.has(model.provider)) return normalizeIdPart(id);
|
|
59
|
-
if (!id.includes("|")) return normalizeIdPart(id);
|
|
60
|
-
const [callId, itemId] = id.split("|");
|
|
61
|
-
const normalizedCallId = normalizeIdPart(callId);
|
|
62
|
-
let normalizedItemId = source.provider !== model.provider || source.api !== model.api ? buildForeignResponsesItemId(itemId) : normalizeIdPart(itemId);
|
|
63
|
-
if (!normalizedItemId.startsWith("fc_")) normalizedItemId = normalizeIdPart(`fc_${normalizedItemId}`);
|
|
64
|
-
return `${normalizedCallId}|${normalizedItemId}`;
|
|
65
|
-
};
|
|
66
|
-
const transformedMessages = transformMessages(normalizedContext.messages, model, normalizeToolCallId);
|
|
67
|
-
const transcriptTools = resolveTranscriptTools(normalizedContext.messages, (options?.supportsAdditionalTools ?? false) || (options?.supportsToolSearch ?? false));
|
|
68
|
-
const appendSystemToolAdditions = (message, seed) => {
|
|
69
|
-
const tools = transcriptTools.anchorsAdditions ? message.toolsAdded ?? [] : [];
|
|
70
|
-
if (tools.length === 0) return;
|
|
71
|
-
if (options?.supportsAdditionalTools) {
|
|
72
|
-
messages.push({
|
|
73
|
-
type: "additional_tools",
|
|
74
|
-
role: "developer",
|
|
75
|
-
tools: convertResponsesTools(tools, options.toolOptions)
|
|
76
|
-
});
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
if (!options?.supportsToolSearch) return;
|
|
80
|
-
const names = tools.map((tool) => tool.name);
|
|
81
|
-
const callId = `pi_tool_load_${shortHash(`${seed}:${names.join(",")}`)}`;
|
|
82
|
-
messages.push({
|
|
83
|
-
type: "tool_search_call",
|
|
84
|
-
call_id: callId,
|
|
85
|
-
execution: "client",
|
|
86
|
-
status: "completed",
|
|
87
|
-
arguments: {
|
|
88
|
-
query: names.join(" "),
|
|
89
|
-
limit: names.length
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
messages.push({
|
|
93
|
-
type: "tool_search_output",
|
|
94
|
-
call_id: callId,
|
|
95
|
-
execution: "client",
|
|
96
|
-
status: "completed",
|
|
97
|
-
tools: convertResponsesTools(tools, {
|
|
98
|
-
...options.toolOptions,
|
|
99
|
-
toolSearchResult: true
|
|
100
|
-
})
|
|
101
|
-
});
|
|
102
|
-
};
|
|
103
|
-
const includeInitialSystemMessage = options?.includeSystemPrompt ?? true;
|
|
104
|
-
const compat = model.compat;
|
|
105
|
-
const instructionRole = model.reasoning && compat?.supportsDeveloperRole !== false ? "developer" : "system";
|
|
106
|
-
let msgIndex = 0;
|
|
107
|
-
let sourceIndex = 0;
|
|
108
|
-
for (const msg of transformedMessages) {
|
|
109
|
-
const isLeadingSystemMessage = sourceIndex++ === 0 && msg.role === "system";
|
|
110
|
-
if (msg.role === "system") {
|
|
111
|
-
if (!isLeadingSystemMessage) appendSystemToolAdditions(msg, `system:${msgIndex}`);
|
|
112
|
-
if (!isLeadingSystemMessage || includeInitialSystemMessage) {
|
|
113
|
-
const text = isLeadingSystemMessage ? getSystemMessageText(msg) : renderSystemMessageUpdate(msg);
|
|
114
|
-
if (text.length > 0) messages.push({
|
|
115
|
-
role: instructionRole,
|
|
116
|
-
content: sanitizeSurrogates(text)
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
} else if (msg.role === "user") {
|
|
120
|
-
if (typeof msg.content === "string") messages.push({
|
|
121
|
-
role: "user",
|
|
122
|
-
content: [{
|
|
123
|
-
type: "input_text",
|
|
124
|
-
text: sanitizeSurrogates(msg.content)
|
|
125
|
-
}]
|
|
126
|
-
});
|
|
127
|
-
else {
|
|
128
|
-
const content = msg.content.map((item) => {
|
|
129
|
-
if (item.type === "text") return {
|
|
130
|
-
type: "input_text",
|
|
131
|
-
text: sanitizeSurrogates(item.text)
|
|
132
|
-
};
|
|
133
|
-
return {
|
|
134
|
-
type: "input_image",
|
|
135
|
-
detail: "auto",
|
|
136
|
-
image_url: `data:${item.mimeType};base64,${item.data}`
|
|
137
|
-
};
|
|
138
|
-
});
|
|
139
|
-
if (content.length === 0) continue;
|
|
140
|
-
messages.push({
|
|
141
|
-
role: "user",
|
|
142
|
-
content
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
} else if (msg.role === "assistant") {
|
|
146
|
-
const output = [];
|
|
147
|
-
const assistantMsg = msg;
|
|
148
|
-
const isSameProviderAndApi = assistantMsg.provider === model.provider && assistantMsg.api === model.api;
|
|
149
|
-
const isSameModel = isSameProviderAndApi && assistantMsg.model === model.id;
|
|
150
|
-
const isDifferentModel = isSameProviderAndApi && assistantMsg.model !== model.id;
|
|
151
|
-
let textBlockIndex = 0;
|
|
152
|
-
for (const block of msg.content) if (block.type === "thinking") {
|
|
153
|
-
if (block.thinkingSignature) {
|
|
154
|
-
const reasoningItem = JSON.parse(block.thinkingSignature);
|
|
155
|
-
output.push(reasoningItem);
|
|
156
|
-
}
|
|
157
|
-
} else if (block.type === "text") {
|
|
158
|
-
const textBlock = block;
|
|
159
|
-
const parsedSignature = parseTextSignature(textBlock.textSignature);
|
|
160
|
-
const fallbackMessageId = textBlockIndex === 0 ? `msg_pi_${msgIndex}` : `msg_pi_${msgIndex}_${textBlockIndex}`;
|
|
161
|
-
textBlockIndex++;
|
|
162
|
-
let msgId = parsedSignature?.id;
|
|
163
|
-
if (!msgId) msgId = fallbackMessageId;
|
|
164
|
-
else if (msgId.length > 64) msgId = `msg_${shortHash(msgId)}`;
|
|
165
|
-
output.push({
|
|
166
|
-
type: "message",
|
|
167
|
-
role: "assistant",
|
|
168
|
-
content: [{
|
|
169
|
-
type: "output_text",
|
|
170
|
-
text: sanitizeSurrogates(textBlock.text),
|
|
171
|
-
annotations: []
|
|
172
|
-
}],
|
|
173
|
-
status: "completed",
|
|
174
|
-
id: msgId,
|
|
175
|
-
phase: parsedSignature?.phase
|
|
176
|
-
});
|
|
177
|
-
} else if (block.type === "toolCall") {
|
|
178
|
-
const toolCall = block;
|
|
179
|
-
const [callId, itemIdRaw] = toolCall.id.split("|");
|
|
180
|
-
const customInputProperty = options?.grammarToolInputProperties?.get(toolCall.name);
|
|
181
|
-
let itemId = itemIdRaw;
|
|
182
|
-
const itemIdPrefix = customInputProperty === void 0 ? "fc_" : "ctc_";
|
|
183
|
-
if (isDifferentModel || !itemId?.startsWith(itemIdPrefix)) itemId = void 0;
|
|
184
|
-
if (customInputProperty !== void 0) output.push({
|
|
185
|
-
type: "custom_tool_call",
|
|
186
|
-
id: itemId,
|
|
187
|
-
call_id: callId,
|
|
188
|
-
name: toolCall.name,
|
|
189
|
-
input: sanitizeSurrogates(getGrammarToolInput(toolCall.name, toolCall.arguments, customInputProperty)),
|
|
190
|
-
...isSameModel && toolCall.namespace !== void 0 ? { namespace: toolCall.namespace } : {}
|
|
191
|
-
});
|
|
192
|
-
else output.push({
|
|
193
|
-
type: "function_call",
|
|
194
|
-
id: itemId,
|
|
195
|
-
call_id: callId,
|
|
196
|
-
name: toolCall.name,
|
|
197
|
-
arguments: JSON.stringify(toolCall.arguments),
|
|
198
|
-
...isSameModel && toolCall.namespace !== void 0 ? { namespace: toolCall.namespace } : {}
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
if (output.length === 0) continue;
|
|
202
|
-
messages.push(...output);
|
|
203
|
-
} else if (msg.role === "toolResult") {
|
|
204
|
-
const [callId] = msg.toolCallId.split("|");
|
|
205
|
-
const output = convertToolResultOutput(model, msg.content);
|
|
206
|
-
if (options?.grammarToolInputProperties?.has(msg.toolName)) messages.push({
|
|
207
|
-
type: "custom_tool_call_output",
|
|
208
|
-
call_id: callId,
|
|
209
|
-
output
|
|
210
|
-
});
|
|
211
|
-
else messages.push({
|
|
212
|
-
type: "function_call_output",
|
|
213
|
-
call_id: callId,
|
|
214
|
-
output
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
if (!isLeadingSystemMessage) msgIndex++;
|
|
218
|
-
}
|
|
219
|
-
return messages;
|
|
220
|
-
}
|
|
221
|
-
function convertResponsesTools(tools, options) {
|
|
222
|
-
const defaultStrict = options?.strict === void 0 ? false : options.strict;
|
|
223
|
-
const supportsStrictMode = options?.supportsStrictMode ?? true;
|
|
224
|
-
const supportsOpenAIGrammarTools = options?.supportsOpenAIGrammarTools ?? false;
|
|
225
|
-
return tools.map((tool) => {
|
|
226
|
-
const grammar = resolveGrammarConstrainedSampling(tool, supportsOpenAIGrammarTools);
|
|
227
|
-
if (grammar) return {
|
|
228
|
-
type: "custom",
|
|
229
|
-
name: tool.name,
|
|
230
|
-
description: tool.description,
|
|
231
|
-
format: {
|
|
232
|
-
type: "grammar",
|
|
233
|
-
syntax: grammar.format,
|
|
234
|
-
definition: grammar.definition
|
|
235
|
-
},
|
|
236
|
-
...options?.toolSearchResult ? { defer_loading: true } : {}
|
|
237
|
-
};
|
|
238
|
-
const strict = resolveJsonSchemaStrictSampling(tool, supportsStrictMode) ?? defaultStrict;
|
|
239
|
-
const functionTool = {
|
|
240
|
-
type: "function",
|
|
241
|
-
name: tool.name,
|
|
242
|
-
description: tool.description,
|
|
243
|
-
parameters: getJsonSchemaToolParameters(tool, strict === true),
|
|
244
|
-
...options?.toolSearchResult ? { defer_loading: true } : {}
|
|
245
|
-
};
|
|
246
|
-
if (supportsStrictMode) functionTool.strict = strict;
|
|
247
|
-
return functionTool;
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
function getCustomToolCallInput(block) {
|
|
251
|
-
const property = block.customInput?.property;
|
|
252
|
-
if (property === void 0) return "";
|
|
253
|
-
const value = block.arguments[property];
|
|
254
|
-
return typeof value === "string" ? value : "";
|
|
255
|
-
}
|
|
256
|
-
function appendCustomToolCallInput(block, nextInput, close) {
|
|
257
|
-
const customInput = block.customInput;
|
|
258
|
-
if (!customInput) return void 0;
|
|
259
|
-
const delta = appendGrammarToolInputJsonDelta(customInput.jsonBuffer, customInput.property, nextInput, close);
|
|
260
|
-
block.arguments = { [customInput.property]: nextInput };
|
|
261
|
-
return delta;
|
|
262
|
-
}
|
|
263
|
-
async function processResponsesStream(openaiStream, output, stream, model, options) {
|
|
264
|
-
let sawTerminalResponseEvent = false;
|
|
265
|
-
const outputSlots = /* @__PURE__ */ new Map();
|
|
266
|
-
const reasoningBlocksById = /* @__PURE__ */ new Map();
|
|
267
|
-
const applyMessagePhaseStopReason = (item) => {
|
|
268
|
-
if (item.type === "message" && item.phase === "final_answer") output.stopReason = "stop";
|
|
269
|
-
};
|
|
270
|
-
const getSlot = (outputIndex, type) => {
|
|
271
|
-
const slot = outputSlots.get(outputIndex);
|
|
272
|
-
return slot?.type === type ? slot : void 0;
|
|
273
|
-
};
|
|
274
|
-
const pushToolCallDelta = (slot, delta) => {
|
|
275
|
-
if (delta === void 0) return;
|
|
276
|
-
stream.push({
|
|
277
|
-
type: "toolcall_delta",
|
|
278
|
-
contentIndex: slot.contentIndex,
|
|
279
|
-
delta,
|
|
280
|
-
partial: output
|
|
281
|
-
});
|
|
282
|
-
};
|
|
283
|
-
const createSlot = (outputIndex, item) => {
|
|
284
|
-
if (item.type === "reasoning") {
|
|
285
|
-
const block = {
|
|
286
|
-
type: "thinking",
|
|
287
|
-
thinking: ""
|
|
288
|
-
};
|
|
289
|
-
output.content.push(block);
|
|
290
|
-
const slot = {
|
|
291
|
-
type: "thinking",
|
|
292
|
-
block,
|
|
293
|
-
contentIndex: output.content.length - 1
|
|
294
|
-
};
|
|
295
|
-
outputSlots.set(outputIndex, slot);
|
|
296
|
-
stream.push({
|
|
297
|
-
type: "thinking_start",
|
|
298
|
-
contentIndex: slot.contentIndex,
|
|
299
|
-
partial: output
|
|
300
|
-
});
|
|
301
|
-
return slot;
|
|
302
|
-
}
|
|
303
|
-
if (item.type === "message") {
|
|
304
|
-
applyMessagePhaseStopReason(item);
|
|
305
|
-
const block = {
|
|
306
|
-
type: "text",
|
|
307
|
-
text: ""
|
|
308
|
-
};
|
|
309
|
-
output.content.push(block);
|
|
310
|
-
const slot = {
|
|
311
|
-
type: "text",
|
|
312
|
-
block,
|
|
313
|
-
contentIndex: output.content.length - 1
|
|
314
|
-
};
|
|
315
|
-
outputSlots.set(outputIndex, slot);
|
|
316
|
-
stream.push({
|
|
317
|
-
type: "text_start",
|
|
318
|
-
contentIndex: slot.contentIndex,
|
|
319
|
-
partial: output
|
|
320
|
-
});
|
|
321
|
-
return slot;
|
|
322
|
-
}
|
|
323
|
-
if (item.type === "function_call") {
|
|
324
|
-
const block = {
|
|
325
|
-
type: "toolCall",
|
|
326
|
-
id: `${item.call_id}|${item.id}`,
|
|
327
|
-
name: item.name,
|
|
328
|
-
arguments: {},
|
|
329
|
-
...item.namespace !== void 0 ? { namespace: item.namespace } : {},
|
|
330
|
-
partialJson: item.arguments || ""
|
|
331
|
-
};
|
|
332
|
-
output.content.push(block);
|
|
333
|
-
const slot = {
|
|
334
|
-
type: "toolCall",
|
|
335
|
-
block,
|
|
336
|
-
contentIndex: output.content.length - 1
|
|
337
|
-
};
|
|
338
|
-
outputSlots.set(outputIndex, slot);
|
|
339
|
-
stream.push({
|
|
340
|
-
type: "toolcall_start",
|
|
341
|
-
contentIndex: slot.contentIndex,
|
|
342
|
-
partial: output
|
|
343
|
-
});
|
|
344
|
-
return slot;
|
|
345
|
-
}
|
|
346
|
-
if (item.type === "custom_tool_call") {
|
|
347
|
-
const inputProperty = options?.grammarToolInputProperties?.get(item.name) ?? "input";
|
|
348
|
-
const input = item.input || "";
|
|
349
|
-
const block = {
|
|
350
|
-
type: "toolCall",
|
|
351
|
-
id: `${item.call_id}|${item.id}`,
|
|
352
|
-
name: item.name,
|
|
353
|
-
arguments: { [inputProperty]: input },
|
|
354
|
-
...item.namespace !== void 0 ? { namespace: item.namespace } : {},
|
|
355
|
-
customInput: {
|
|
356
|
-
property: inputProperty,
|
|
357
|
-
jsonBuffer: {
|
|
358
|
-
input: "",
|
|
359
|
-
started: false,
|
|
360
|
-
closed: false
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
};
|
|
364
|
-
output.content.push(block);
|
|
365
|
-
const slot = {
|
|
366
|
-
type: "toolCall",
|
|
367
|
-
block,
|
|
368
|
-
contentIndex: output.content.length - 1
|
|
369
|
-
};
|
|
370
|
-
outputSlots.set(outputIndex, slot);
|
|
371
|
-
stream.push({
|
|
372
|
-
type: "toolcall_start",
|
|
373
|
-
contentIndex: slot.contentIndex,
|
|
374
|
-
partial: output
|
|
375
|
-
});
|
|
376
|
-
return slot;
|
|
377
|
-
}
|
|
378
|
-
};
|
|
379
|
-
const getOrCreateSlot = (outputIndex, item) => {
|
|
380
|
-
return outputSlots.get(outputIndex) ?? createSlot(outputIndex, item);
|
|
381
|
-
};
|
|
382
|
-
const backfillReasoningSignatures = (responseOutput) => {
|
|
383
|
-
for (const item of responseOutput) {
|
|
384
|
-
if (item.type !== "reasoning" || !item.encrypted_content) continue;
|
|
385
|
-
const block = reasoningBlocksById.get(item.id);
|
|
386
|
-
if (!block?.thinkingSignature) continue;
|
|
387
|
-
const storedItem = JSON.parse(block.thinkingSignature);
|
|
388
|
-
if (storedItem.encrypted_content) continue;
|
|
389
|
-
block.thinkingSignature = JSON.stringify({
|
|
390
|
-
...storedItem,
|
|
391
|
-
encrypted_content: item.encrypted_content
|
|
392
|
-
});
|
|
393
|
-
}
|
|
394
|
-
};
|
|
395
|
-
const finalizeResponse = (response) => {
|
|
396
|
-
sawTerminalResponseEvent = true;
|
|
397
|
-
backfillReasoningSignatures(response.output ?? []);
|
|
398
|
-
if (response?.id) output.responseId = response.id;
|
|
399
|
-
if (response?.usage) {
|
|
400
|
-
const inputDetails = response.usage.input_tokens_details;
|
|
401
|
-
const cachedTokens = inputDetails?.cached_tokens || 0;
|
|
402
|
-
const cacheWriteTokens = inputDetails?.cache_write_tokens || 0;
|
|
403
|
-
output.usage = {
|
|
404
|
-
input: Math.max(0, (response.usage.input_tokens || 0) - cachedTokens - cacheWriteTokens),
|
|
405
|
-
output: response.usage.output_tokens || 0,
|
|
406
|
-
cacheRead: cachedTokens,
|
|
407
|
-
cacheWrite: cacheWriteTokens,
|
|
408
|
-
reasoning: response.usage.output_tokens_details?.reasoning_tokens || 0,
|
|
409
|
-
totalTokens: response.usage.total_tokens || 0,
|
|
410
|
-
cost: {
|
|
411
|
-
input: 0,
|
|
412
|
-
output: 0,
|
|
413
|
-
cacheRead: 0,
|
|
414
|
-
cacheWrite: 0,
|
|
415
|
-
total: 0
|
|
416
|
-
}
|
|
417
|
-
};
|
|
418
|
-
}
|
|
419
|
-
calculateCost(model, output.usage);
|
|
420
|
-
if (options?.applyServiceTierPricing) {
|
|
421
|
-
const serviceTier = options.resolveServiceTier ? options.resolveServiceTier(response?.service_tier, options.serviceTier) : response?.service_tier ?? options.serviceTier;
|
|
422
|
-
options.applyServiceTierPricing(output.usage, serviceTier);
|
|
423
|
-
}
|
|
424
|
-
const status = response?.status;
|
|
425
|
-
const incompleteDetails = response?.incomplete_details;
|
|
426
|
-
const incompleteReason = typeof incompleteDetails?.reason === "string" ? incompleteDetails.reason : void 0;
|
|
427
|
-
output.rawStopReason = incompleteReason ? `${status}.${incompleteReason}` : status;
|
|
428
|
-
const mappedStop = mapStopReason(status, incompleteReason);
|
|
429
|
-
output.stopReason = mappedStop.stopReason;
|
|
430
|
-
if (mappedStop.errorMessage === void 0) delete output.errorMessage;
|
|
431
|
-
else output.errorMessage = mappedStop.errorMessage;
|
|
432
|
-
if (output.content.some((b) => b.type === "toolCall") && output.stopReason === "stop") output.stopReason = "toolUse";
|
|
433
|
-
};
|
|
434
|
-
for await (const event of openaiStream) {
|
|
435
|
-
await options?.onProviderStreamEvent?.(event, model);
|
|
436
|
-
if (event.type === "response.created") output.responseId = event.response.id;
|
|
437
|
-
else if (event.type === "response.output_item.added") createSlot(event.output_index, event.item);
|
|
438
|
-
else if (event.type === "response.reasoning_summary_text.delta") {
|
|
439
|
-
const slot = getSlot(event.output_index, "thinking");
|
|
440
|
-
if (!slot) continue;
|
|
441
|
-
slot.block.thinking += event.delta;
|
|
442
|
-
stream.push({
|
|
443
|
-
type: "thinking_delta",
|
|
444
|
-
contentIndex: slot.contentIndex,
|
|
445
|
-
delta: event.delta,
|
|
446
|
-
partial: output
|
|
447
|
-
});
|
|
448
|
-
} else if (event.type === "response.reasoning_summary_part.done") {
|
|
449
|
-
const slot = getSlot(event.output_index, "thinking");
|
|
450
|
-
if (!slot) continue;
|
|
451
|
-
slot.block.thinking += "\n\n";
|
|
452
|
-
stream.push({
|
|
453
|
-
type: "thinking_delta",
|
|
454
|
-
contentIndex: slot.contentIndex,
|
|
455
|
-
delta: "\n\n",
|
|
456
|
-
partial: output
|
|
457
|
-
});
|
|
458
|
-
} else if (event.type === "response.reasoning_text.delta") {
|
|
459
|
-
const slot = getSlot(event.output_index, "thinking");
|
|
460
|
-
if (!slot) continue;
|
|
461
|
-
slot.block.thinking += event.delta;
|
|
462
|
-
stream.push({
|
|
463
|
-
type: "thinking_delta",
|
|
464
|
-
contentIndex: slot.contentIndex,
|
|
465
|
-
delta: event.delta,
|
|
466
|
-
partial: output
|
|
467
|
-
});
|
|
468
|
-
} else if (event.type === "response.output_text.delta") {
|
|
469
|
-
const slot = getSlot(event.output_index, "text");
|
|
470
|
-
if (!slot) continue;
|
|
471
|
-
slot.block.text += event.delta;
|
|
472
|
-
stream.push({
|
|
473
|
-
type: "text_delta",
|
|
474
|
-
contentIndex: slot.contentIndex,
|
|
475
|
-
delta: event.delta,
|
|
476
|
-
partial: output
|
|
477
|
-
});
|
|
478
|
-
} else if (event.type === "response.refusal.delta") {
|
|
479
|
-
const slot = getSlot(event.output_index, "text");
|
|
480
|
-
if (!slot) continue;
|
|
481
|
-
slot.block.text += event.delta;
|
|
482
|
-
stream.push({
|
|
483
|
-
type: "text_delta",
|
|
484
|
-
contentIndex: slot.contentIndex,
|
|
485
|
-
delta: event.delta,
|
|
486
|
-
partial: output
|
|
487
|
-
});
|
|
488
|
-
} else if (event.type === "response.function_call_arguments.delta") {
|
|
489
|
-
const slot = getSlot(event.output_index, "toolCall");
|
|
490
|
-
if (!slot || slot.block.partialJson === void 0) continue;
|
|
491
|
-
slot.block.partialJson += event.delta;
|
|
492
|
-
slot.block.arguments = parseStreamingJson(slot.block.partialJson);
|
|
493
|
-
pushToolCallDelta(slot, event.delta);
|
|
494
|
-
} else if (event.type === "response.function_call_arguments.done") {
|
|
495
|
-
const slot = getSlot(event.output_index, "toolCall");
|
|
496
|
-
if (!slot || slot.block.partialJson === void 0) continue;
|
|
497
|
-
const previousPartialJson = slot.block.partialJson;
|
|
498
|
-
slot.block.partialJson = event.arguments;
|
|
499
|
-
slot.block.arguments = parseStreamingJson(slot.block.partialJson);
|
|
500
|
-
if (event.arguments.startsWith(previousPartialJson)) {
|
|
501
|
-
const delta = event.arguments.slice(previousPartialJson.length);
|
|
502
|
-
if (delta.length > 0) pushToolCallDelta(slot, delta);
|
|
503
|
-
}
|
|
504
|
-
} else if (event.type === "response.custom_tool_call_input.delta") {
|
|
505
|
-
const slot = getSlot(event.output_index, "toolCall");
|
|
506
|
-
if (!slot || !slot.block.customInput) continue;
|
|
507
|
-
pushToolCallDelta(slot, appendCustomToolCallInput(slot.block, getCustomToolCallInput(slot.block) + event.delta, false));
|
|
508
|
-
} else if (event.type === "response.custom_tool_call_input.done") {
|
|
509
|
-
const slot = getSlot(event.output_index, "toolCall");
|
|
510
|
-
if (!slot || !slot.block.customInput) continue;
|
|
511
|
-
pushToolCallDelta(slot, appendCustomToolCallInput(slot.block, event.input, true));
|
|
512
|
-
} else if (event.type === "response.output_item.done") {
|
|
513
|
-
const item = event.item;
|
|
514
|
-
applyMessagePhaseStopReason(item);
|
|
515
|
-
const slot = getOrCreateSlot(event.output_index, item);
|
|
516
|
-
if (item.type === "reasoning" && slot?.type === "thinking") {
|
|
517
|
-
const summaryText = item.summary?.map((s) => s.text).join("\n\n") || "";
|
|
518
|
-
const contentText = item.content?.map((c) => c.text).join("\n\n") || "";
|
|
519
|
-
slot.block.thinking = summaryText || contentText || slot.block.thinking;
|
|
520
|
-
slot.block.thinkingSignature = JSON.stringify(item);
|
|
521
|
-
reasoningBlocksById.set(item.id, slot.block);
|
|
522
|
-
stream.push({
|
|
523
|
-
type: "thinking_end",
|
|
524
|
-
contentIndex: slot.contentIndex,
|
|
525
|
-
content: slot.block.thinking,
|
|
526
|
-
partial: output
|
|
527
|
-
});
|
|
528
|
-
outputSlots.delete(event.output_index);
|
|
529
|
-
} else if (item.type === "message" && slot?.type === "text") {
|
|
530
|
-
slot.block.text = item.content?.map((c) => c.type === "output_text" ? c.text : c.refusal).join("") || "";
|
|
531
|
-
slot.block.textSignature = encodeTextSignatureV1(item.id, item.phase ?? void 0);
|
|
532
|
-
stream.push({
|
|
533
|
-
type: "text_end",
|
|
534
|
-
contentIndex: slot.contentIndex,
|
|
535
|
-
content: slot.block.text,
|
|
536
|
-
partial: output
|
|
537
|
-
});
|
|
538
|
-
outputSlots.delete(event.output_index);
|
|
539
|
-
} else if (item.type === "function_call" && slot?.type === "toolCall" && slot.block.partialJson !== void 0) {
|
|
540
|
-
slot.block.arguments = parseStreamingJson(item.arguments || slot.block.partialJson || "{}");
|
|
541
|
-
if (item.namespace !== void 0) slot.block.namespace = item.namespace;
|
|
542
|
-
delete slot.block.partialJson;
|
|
543
|
-
stream.push({
|
|
544
|
-
type: "toolcall_end",
|
|
545
|
-
contentIndex: slot.contentIndex,
|
|
546
|
-
toolCall: slot.block,
|
|
547
|
-
partial: output
|
|
548
|
-
});
|
|
549
|
-
outputSlots.delete(event.output_index);
|
|
550
|
-
} else if (item.type === "custom_tool_call" && slot?.type === "toolCall" && slot.block.customInput) {
|
|
551
|
-
pushToolCallDelta(slot, appendCustomToolCallInput(slot.block, item.input ?? getCustomToolCallInput(slot.block), true));
|
|
552
|
-
if (item.namespace !== void 0) slot.block.namespace = item.namespace;
|
|
553
|
-
delete slot.block.customInput;
|
|
554
|
-
stream.push({
|
|
555
|
-
type: "toolcall_end",
|
|
556
|
-
contentIndex: slot.contentIndex,
|
|
557
|
-
toolCall: slot.block,
|
|
558
|
-
partial: output
|
|
559
|
-
});
|
|
560
|
-
outputSlots.delete(event.output_index);
|
|
561
|
-
}
|
|
562
|
-
} else if (event.type === "response.completed" || event.type === "response.incomplete") finalizeResponse(event.response);
|
|
563
|
-
else if (event.type === "error") throw new Error(`Error Code ${event.code}: ${event.message}` || "Unknown error");
|
|
564
|
-
else if (event.type === "response.failed") {
|
|
565
|
-
sawTerminalResponseEvent = true;
|
|
566
|
-
output.rawStopReason = event.response?.status;
|
|
567
|
-
const error = event.response?.error;
|
|
568
|
-
const details = event.response?.incomplete_details;
|
|
569
|
-
const msg = error ? `${error.code || "unknown"}: ${error.message || "no message"}` : details?.reason ? `incomplete: ${details.reason}` : "Unknown error (no error details in response)";
|
|
570
|
-
throw new Error(msg);
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
if (!sawTerminalResponseEvent) throw new Error("OpenAI Responses stream ended before a terminal response event");
|
|
574
|
-
if (output.stopReason === "toolUse") for (const block of output.content) {
|
|
575
|
-
if (block.type !== "toolCall") continue;
|
|
576
|
-
const toolCall = block;
|
|
577
|
-
if (toolCall.partialJson !== void 0 || toolCall.customInput !== void 0) throw new Error(`OpenAI Responses stream completed with an unfinished tool call: ${toolCall.name} (${toolCall.id})`);
|
|
578
|
-
}
|
|
579
|
-
}
|
|
580
|
-
function mapStopReason(status, incompleteReason) {
|
|
581
|
-
if (!status) return { stopReason: "stop" };
|
|
582
|
-
switch (status) {
|
|
583
|
-
case "completed": return { stopReason: "stop" };
|
|
584
|
-
case "incomplete":
|
|
585
|
-
if (incompleteReason === "max_output_tokens") return { stopReason: "length" };
|
|
586
|
-
return {
|
|
587
|
-
stopReason: "error",
|
|
588
|
-
errorMessage: incompleteReason ? `Response incomplete: ${incompleteReason}` : "Response incomplete without a provider reason"
|
|
589
|
-
};
|
|
590
|
-
case "failed":
|
|
591
|
-
case "cancelled": return { stopReason: "error" };
|
|
592
|
-
case "in_progress":
|
|
593
|
-
case "queued": return { stopReason: "stop" };
|
|
594
|
-
default: throw new Error(`Unhandled stop reason: ${status}`);
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
//#endregion
|
|
598
|
-
export { convertResponsesTools as n, processResponsesStream as r, convertResponsesMessages as t };
|