@nodaro/sdk 2.28.0 → 2.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -2
- package/dist/chunk-2DZWWIJ4.cjs +32 -0
- package/dist/chunk-2DZWWIJ4.cjs.map +1 -0
- package/dist/chunk-34PU2DAT.cjs +118 -0
- package/dist/chunk-34PU2DAT.cjs.map +1 -0
- package/dist/chunk-37Y5QAVA.js +3 -0
- package/dist/chunk-37Y5QAVA.js.map +1 -0
- package/dist/chunk-37YCKZX4.cjs +4 -0
- package/dist/chunk-37YCKZX4.cjs.map +1 -0
- package/dist/chunk-3B47IHB3.cjs +65 -0
- package/dist/chunk-3B47IHB3.cjs.map +1 -0
- package/dist/chunk-3BELHJBN.cjs +4 -0
- package/dist/chunk-3BELHJBN.cjs.map +1 -0
- package/dist/chunk-3PPSGM5X.js +3 -0
- package/dist/chunk-3PPSGM5X.js.map +1 -0
- package/dist/chunk-3QBH2VE2.cjs +80 -0
- package/dist/chunk-3QBH2VE2.cjs.map +1 -0
- package/dist/chunk-3QFTP5P5.js +102 -0
- package/dist/chunk-3QFTP5P5.js.map +1 -0
- package/dist/chunk-43FVH6LJ.cjs +123 -0
- package/dist/chunk-43FVH6LJ.cjs.map +1 -0
- package/dist/chunk-43NO4SGC.cjs +4 -0
- package/dist/chunk-43NO4SGC.cjs.map +1 -0
- package/dist/chunk-45CK55BH.cjs +4 -0
- package/dist/chunk-45CK55BH.cjs.map +1 -0
- package/dist/chunk-4NLVBYMW.js +280 -0
- package/dist/chunk-4NLVBYMW.js.map +1 -0
- package/dist/chunk-4WRDR4GN.js +102 -0
- package/dist/chunk-4WRDR4GN.js.map +1 -0
- package/dist/chunk-4WWSHV5G.cjs +4 -0
- package/dist/chunk-4WWSHV5G.cjs.map +1 -0
- package/dist/chunk-53SXNN3A.js +80 -0
- package/dist/chunk-53SXNN3A.js.map +1 -0
- package/dist/chunk-5ALNFATQ.cjs +27 -0
- package/dist/chunk-5ALNFATQ.cjs.map +1 -0
- package/dist/chunk-5UQNMNUE.cjs +4 -0
- package/dist/chunk-5UQNMNUE.cjs.map +1 -0
- package/dist/chunk-5WAI7VGO.js +184 -0
- package/dist/chunk-5WAI7VGO.js.map +1 -0
- package/dist/chunk-65E3JBFZ.js +52 -0
- package/dist/chunk-65E3JBFZ.js.map +1 -0
- package/dist/chunk-6JFNBAKV.js +3 -0
- package/dist/chunk-6JFNBAKV.js.map +1 -0
- package/dist/chunk-6OC6OKLY.cjs +4 -0
- package/dist/chunk-6OC6OKLY.cjs.map +1 -0
- package/dist/chunk-6OGGJQVA.js +25 -0
- package/dist/chunk-6OGGJQVA.js.map +1 -0
- package/dist/chunk-7A7HYFGM.js +3 -0
- package/dist/chunk-7A7HYFGM.js.map +1 -0
- package/dist/chunk-7ISSKQ6S.cjs +106 -0
- package/dist/chunk-7ISSKQ6S.cjs.map +1 -0
- package/dist/chunk-7LSFG2AF.js +194 -0
- package/dist/chunk-7LSFG2AF.js.map +1 -0
- package/dist/chunk-7MYKT2L4.cjs +4 -0
- package/dist/chunk-7MYKT2L4.cjs.map +1 -0
- package/dist/chunk-7QOCWJKD.cjs +25 -0
- package/dist/chunk-7QOCWJKD.cjs.map +1 -0
- package/dist/chunk-A2ZAFAWC.cjs +4 -0
- package/dist/chunk-A2ZAFAWC.cjs.map +1 -0
- package/dist/chunk-A3S55XGF.cjs +54 -0
- package/dist/chunk-A3S55XGF.cjs.map +1 -0
- package/dist/chunk-A3THLBFG.js +3 -0
- package/dist/chunk-A3THLBFG.js.map +1 -0
- package/dist/chunk-AJVSMNPZ.js +78 -0
- package/dist/chunk-AJVSMNPZ.js.map +1 -0
- package/dist/chunk-ALSLZG3U.js +124 -0
- package/dist/chunk-ALSLZG3U.js.map +1 -0
- package/dist/chunk-ALUUBPDG.cjs +4 -0
- package/dist/chunk-ALUUBPDG.cjs.map +1 -0
- package/dist/chunk-AO3W45LT.cjs +4 -0
- package/dist/chunk-AO3W45LT.cjs.map +1 -0
- package/dist/chunk-AUDHV3OE.js +3 -0
- package/dist/chunk-AUDHV3OE.js.map +1 -0
- package/dist/chunk-BAL576G2.cjs +4 -0
- package/dist/chunk-BAL576G2.cjs.map +1 -0
- package/dist/chunk-BFMKPELU.cjs +212 -0
- package/dist/chunk-BFMKPELU.cjs.map +1 -0
- package/dist/chunk-BKP6F2IX.js +3 -0
- package/dist/chunk-BKP6F2IX.js.map +1 -0
- package/dist/chunk-BLA44UCM.js +32 -0
- package/dist/chunk-BLA44UCM.js.map +1 -0
- package/dist/chunk-BPWUWUZ3.cjs +20 -0
- package/dist/chunk-BPWUWUZ3.cjs.map +1 -0
- package/dist/chunk-BRV7Z4GD.cjs +17 -0
- package/dist/chunk-BRV7Z4GD.cjs.map +1 -0
- package/dist/chunk-BU5A6K4C.js +122 -0
- package/dist/chunk-BU5A6K4C.js.map +1 -0
- package/dist/chunk-C22RJDW3.js +3 -0
- package/dist/chunk-C22RJDW3.js.map +1 -0
- package/dist/chunk-CGNVHN4V.js +3 -0
- package/dist/chunk-CGNVHN4V.js.map +1 -0
- package/dist/chunk-CJFIOVBA.js +3 -0
- package/dist/chunk-CJFIOVBA.js.map +1 -0
- package/dist/chunk-CJLLIVSB.cjs +4 -0
- package/dist/chunk-CJLLIVSB.cjs.map +1 -0
- package/dist/chunk-CK3AMMSC.js +194 -0
- package/dist/chunk-CK3AMMSC.js.map +1 -0
- package/dist/chunk-COCKKMNP.cjs +205 -0
- package/dist/chunk-COCKKMNP.cjs.map +1 -0
- package/dist/chunk-CR5E2SF3.cjs +212 -0
- package/dist/chunk-CR5E2SF3.cjs.map +1 -0
- package/dist/chunk-CRCPRZFN.js +3 -0
- package/dist/chunk-CRCPRZFN.js.map +1 -0
- package/dist/chunk-CYRFD6KR.cjs +4 -0
- package/dist/chunk-CYRFD6KR.cjs.map +1 -0
- package/dist/chunk-D3PW7AHZ.js +3 -0
- package/dist/chunk-D3PW7AHZ.js.map +1 -0
- package/dist/chunk-DKEYSJCE.cjs +82 -0
- package/dist/chunk-DKEYSJCE.cjs.map +1 -0
- package/dist/chunk-DPSMVOM3.js +15 -0
- package/dist/chunk-DPSMVOM3.js.map +1 -0
- package/dist/chunk-E2ZXHS6E.js +20 -0
- package/dist/chunk-E2ZXHS6E.js.map +1 -0
- package/dist/chunk-E37CVHWW.js +33 -0
- package/dist/chunk-E37CVHWW.js.map +1 -0
- package/dist/chunk-E5BM4BLO.js +78 -0
- package/dist/chunk-E5BM4BLO.js.map +1 -0
- package/dist/chunk-EHRWTYGR.cjs +4 -0
- package/dist/chunk-EHRWTYGR.cjs.map +1 -0
- package/dist/chunk-EJSGJDZY.js +212 -0
- package/dist/chunk-EJSGJDZY.js.map +1 -0
- package/dist/chunk-ELSOVJPF.js +3 -0
- package/dist/chunk-ELSOVJPF.js.map +1 -0
- package/dist/chunk-ERLXU47J.js +29 -0
- package/dist/chunk-ERLXU47J.js.map +1 -0
- package/dist/chunk-ES2E65HT.js +3 -0
- package/dist/chunk-ES2E65HT.js.map +1 -0
- package/dist/chunk-EXLAHZKF.js +3 -0
- package/dist/chunk-EXLAHZKF.js.map +1 -0
- package/dist/chunk-FHEYAW5H.js +3 -0
- package/dist/chunk-FHEYAW5H.js.map +1 -0
- package/dist/chunk-GA4LZZKQ.cjs +104 -0
- package/dist/chunk-GA4LZZKQ.cjs.map +1 -0
- package/dist/chunk-GAZJ2PA3.js +3 -0
- package/dist/chunk-GAZJ2PA3.js.map +1 -0
- package/dist/chunk-GB6C5OEZ.cjs +32 -0
- package/dist/chunk-GB6C5OEZ.cjs.map +1 -0
- package/dist/chunk-GD24ZRFD.js +3 -0
- package/dist/chunk-GD24ZRFD.js.map +1 -0
- package/dist/chunk-GI7LROLL.cjs +4 -0
- package/dist/chunk-GI7LROLL.cjs.map +1 -0
- package/dist/chunk-GRFLPEM2.cjs +16 -0
- package/dist/chunk-GRFLPEM2.cjs.map +1 -0
- package/dist/chunk-GVIFLUYZ.cjs +40 -0
- package/dist/chunk-GVIFLUYZ.cjs.map +1 -0
- package/dist/chunk-H7VQTG4M.js +35 -0
- package/dist/chunk-H7VQTG4M.js.map +1 -0
- package/dist/chunk-HAKYPZLB.cjs +242 -0
- package/dist/chunk-HAKYPZLB.cjs.map +1 -0
- package/dist/chunk-HFBR6G36.js +3 -0
- package/dist/chunk-HFBR6G36.js.map +1 -0
- package/dist/chunk-HGCVWOGK.cjs +209 -0
- package/dist/chunk-HGCVWOGK.cjs.map +1 -0
- package/dist/chunk-HLHR3R4P.js +3 -0
- package/dist/chunk-HLHR3R4P.js.map +1 -0
- package/dist/chunk-HRXXGGSJ.js +3 -0
- package/dist/chunk-HRXXGGSJ.js.map +1 -0
- package/dist/chunk-I3TYBAOX.js +3 -0
- package/dist/chunk-I3TYBAOX.js.map +1 -0
- package/dist/chunk-I4A5VJRL.js +352 -0
- package/dist/chunk-I4A5VJRL.js.map +1 -0
- package/dist/chunk-I6CXC345.js +102 -0
- package/dist/chunk-I6CXC345.js.map +1 -0
- package/dist/chunk-IGOPUMEX.cjs +4 -0
- package/dist/chunk-IGOPUMEX.cjs.map +1 -0
- package/dist/chunk-IHKIYVZQ.js +30 -0
- package/dist/chunk-IHKIYVZQ.js.map +1 -0
- package/dist/chunk-IMC2M5YM.cjs +12 -0
- package/dist/chunk-IMC2M5YM.cjs.map +1 -0
- package/dist/chunk-IQ6KWSXP.js +3 -0
- package/dist/chunk-IQ6KWSXP.js.map +1 -0
- package/dist/chunk-IS26FJO7.cjs +4 -0
- package/dist/chunk-IS26FJO7.cjs.map +1 -0
- package/dist/chunk-J4WFSKY6.js +50 -0
- package/dist/chunk-J4WFSKY6.js.map +1 -0
- package/dist/chunk-J5LGGCAS.cjs +126 -0
- package/dist/chunk-J5LGGCAS.cjs.map +1 -0
- package/dist/chunk-JDEZHITT.js +43 -0
- package/dist/chunk-JDEZHITT.js.map +1 -0
- package/dist/chunk-JGS6YBDW.js +260 -0
- package/dist/chunk-JGS6YBDW.js.map +1 -0
- package/dist/chunk-JMOKD6ZP.js +46 -0
- package/dist/chunk-JMOKD6ZP.js.map +1 -0
- package/dist/chunk-JOX5BJ6K.cjs +4 -0
- package/dist/chunk-JOX5BJ6K.cjs.map +1 -0
- package/dist/chunk-JTAW54UM.js +116 -0
- package/dist/chunk-JTAW54UM.js.map +1 -0
- package/dist/chunk-K4RQOSJH.js +203 -0
- package/dist/chunk-K4RQOSJH.js.map +1 -0
- package/dist/chunk-KAIE6WJB.cjs +4 -0
- package/dist/chunk-KAIE6WJB.cjs.map +1 -0
- package/dist/chunk-KEDPGWIK.cjs +4 -0
- package/dist/chunk-KEDPGWIK.cjs.map +1 -0
- package/dist/chunk-KG4R454Z.js +18 -0
- package/dist/chunk-KG4R454Z.js.map +1 -0
- package/dist/chunk-KGKCAGRD.cjs +22 -0
- package/dist/chunk-KGKCAGRD.cjs.map +1 -0
- package/dist/chunk-KNMW722T.cjs +48 -0
- package/dist/chunk-KNMW722T.cjs.map +1 -0
- package/dist/chunk-KTTL7BND.cjs +4 -0
- package/dist/chunk-KTTL7BND.cjs.map +1 -0
- package/dist/chunk-KXEWTYS4.cjs +80 -0
- package/dist/chunk-KXEWTYS4.cjs.map +1 -0
- package/dist/chunk-KZQKFBRN.js +3 -0
- package/dist/chunk-KZQKFBRN.js.map +1 -0
- package/dist/chunk-LAWYFC4G.cjs +37 -0
- package/dist/chunk-LAWYFC4G.cjs.map +1 -0
- package/dist/chunk-LHP2CWHD.js +228 -0
- package/dist/chunk-LHP2CWHD.js.map +1 -0
- package/dist/chunk-LHRQXWI5.js +3 -0
- package/dist/chunk-LHRQXWI5.js.map +1 -0
- package/dist/chunk-LKH5M44B.cjs +114 -0
- package/dist/chunk-LKH5M44B.cjs.map +1 -0
- package/dist/chunk-LLNNHLCE.cjs +4 -0
- package/dist/chunk-LLNNHLCE.cjs.map +1 -0
- package/dist/chunk-LWZLWSXD.cjs +4 -0
- package/dist/chunk-LWZLWSXD.cjs.map +1 -0
- package/dist/chunk-M6Y5TOYE.js +3 -0
- package/dist/chunk-M6Y5TOYE.js.map +1 -0
- package/dist/chunk-MBFUMWI5.cjs +31 -0
- package/dist/chunk-MBFUMWI5.cjs.map +1 -0
- package/dist/chunk-MEKI37WI.js +3 -0
- package/dist/chunk-MEKI37WI.js.map +1 -0
- package/dist/chunk-MQ74AKA2.cjs +200 -0
- package/dist/chunk-MQ74AKA2.cjs.map +1 -0
- package/dist/chunk-N6GLZOE4.cjs +282 -0
- package/dist/chunk-N6GLZOE4.cjs.map +1 -0
- package/dist/chunk-NBVARNVA.cjs +38 -0
- package/dist/chunk-NBVARNVA.cjs.map +1 -0
- package/dist/chunk-NCCBS6GU.js +42 -0
- package/dist/chunk-NCCBS6GU.js.map +1 -0
- package/dist/chunk-NGKODS3J.cjs +52 -0
- package/dist/chunk-NGKODS3J.cjs.map +1 -0
- package/dist/chunk-NJVSKUL2.cjs +4 -0
- package/dist/chunk-NJVSKUL2.cjs.map +1 -0
- package/dist/chunk-NLQQHJ25.cjs +104 -0
- package/dist/chunk-NLQQHJ25.cjs.map +1 -0
- package/dist/chunk-NNHWH7ER.js +181 -0
- package/dist/chunk-NNHWH7ER.js.map +1 -0
- package/dist/chunk-NX67YIF3.js +3 -0
- package/dist/chunk-NX67YIF3.js.map +1 -0
- package/dist/chunk-OA6FWYZF.cjs +4 -0
- package/dist/chunk-OA6FWYZF.cjs.map +1 -0
- package/dist/chunk-OJDBSKC2.js +3 -0
- package/dist/chunk-OJDBSKC2.js.map +1 -0
- package/dist/chunk-OLPA44QJ.js +3 -0
- package/dist/chunk-OLPA44QJ.js.map +1 -0
- package/dist/chunk-OMH7ATOQ.js +3 -0
- package/dist/chunk-OMH7ATOQ.js.map +1 -0
- package/dist/chunk-OPR4TULG.js +3 -0
- package/dist/chunk-OPR4TULG.js.map +1 -0
- package/dist/chunk-OSX2GVZ2.cjs +34 -0
- package/dist/chunk-OSX2GVZ2.cjs.map +1 -0
- package/dist/chunk-OXQKE5EG.cjs +282 -0
- package/dist/chunk-OXQKE5EG.cjs.map +1 -0
- package/dist/chunk-P6E4QDJN.js +30 -0
- package/dist/chunk-P6E4QDJN.js.map +1 -0
- package/dist/chunk-PEMLIAPZ.cjs +64 -0
- package/dist/chunk-PEMLIAPZ.cjs.map +1 -0
- package/dist/chunk-PGYQ754I.js +3 -0
- package/dist/chunk-PGYQ754I.js.map +1 -0
- package/dist/chunk-PHKYIWE4.cjs +16 -0
- package/dist/chunk-PHKYIWE4.cjs.map +1 -0
- package/dist/chunk-PMTM26LL.js +3 -0
- package/dist/chunk-PMTM26LL.js.map +1 -0
- package/dist/chunk-PY4OEKNX.cjs +4 -0
- package/dist/chunk-PY4OEKNX.cjs.map +1 -0
- package/dist/chunk-PZS2EXDR.cjs +4 -0
- package/dist/chunk-PZS2EXDR.cjs.map +1 -0
- package/dist/chunk-QITJGSFA.js +210 -0
- package/dist/chunk-QITJGSFA.js.map +1 -0
- package/dist/chunk-QRHJEITQ.cjs +4 -0
- package/dist/chunk-QRHJEITQ.cjs.map +1 -0
- package/dist/chunk-QUFU5RJ7.cjs +4 -0
- package/dist/chunk-QUFU5RJ7.cjs.map +1 -0
- package/dist/chunk-QVQCKOBM.js +3 -0
- package/dist/chunk-QVQCKOBM.js.map +1 -0
- package/dist/chunk-R63TTR35.cjs +200 -0
- package/dist/chunk-R63TTR35.cjs.map +1 -0
- package/dist/chunk-RA42NMWV.cjs +4 -0
- package/dist/chunk-RA42NMWV.cjs.map +1 -0
- package/dist/chunk-RAZN6C5R.cjs +12 -0
- package/dist/chunk-RAZN6C5R.cjs.map +1 -0
- package/dist/chunk-REUFPWM7.cjs +233 -0
- package/dist/chunk-REUFPWM7.cjs.map +1 -0
- package/dist/chunk-RHETJOUM.cjs +4 -0
- package/dist/chunk-RHETJOUM.cjs.map +1 -0
- package/dist/chunk-RJIJVVXS.js +3 -0
- package/dist/chunk-RJIJVVXS.js.map +1 -0
- package/dist/chunk-RKVRCNMB.js +3 -0
- package/dist/chunk-RKVRCNMB.js.map +1 -0
- package/dist/chunk-SBV5MWEL.cjs +53 -0
- package/dist/chunk-SBV5MWEL.cjs.map +1 -0
- package/dist/chunk-SFB4YLCS.js +121 -0
- package/dist/chunk-SFB4YLCS.js.map +1 -0
- package/dist/chunk-SLPD47SR.js +3 -0
- package/dist/chunk-SLPD47SR.js.map +1 -0
- package/dist/chunk-SS3B6PHT.cjs +35 -0
- package/dist/chunk-SS3B6PHT.cjs.map +1 -0
- package/dist/chunk-SUCHGNYT.js +3 -0
- package/dist/chunk-SUCHGNYT.js.map +1 -0
- package/dist/chunk-SYVNY3AH.cjs +44 -0
- package/dist/chunk-SYVNY3AH.cjs.map +1 -0
- package/dist/chunk-T3SYREY4.js +29 -0
- package/dist/chunk-T3SYREY4.js.map +1 -0
- package/dist/chunk-T7N7DFQJ.js +198 -0
- package/dist/chunk-T7N7DFQJ.js.map +1 -0
- package/dist/chunk-TRCENAIY.cjs +4 -0
- package/dist/chunk-TRCENAIY.cjs.map +1 -0
- package/dist/chunk-TVENC6PH.js +186 -0
- package/dist/chunk-TVENC6PH.js.map +1 -0
- package/dist/chunk-U4T3Z3K7.cjs +325 -0
- package/dist/chunk-U4T3Z3K7.cjs.map +1 -0
- package/dist/chunk-UI2NXUML.cjs +187 -0
- package/dist/chunk-UI2NXUML.cjs.map +1 -0
- package/dist/chunk-UIFFNTUX.js +3 -0
- package/dist/chunk-UIFFNTUX.js.map +1 -0
- package/dist/chunk-V4GPQ6Y2.js +3 -0
- package/dist/chunk-V4GPQ6Y2.js.map +1 -0
- package/dist/chunk-VGTRKXF2.js +93 -0
- package/dist/chunk-VGTRKXF2.js.map +1 -0
- package/dist/chunk-VGWOIWRQ.cjs +202 -0
- package/dist/chunk-VGWOIWRQ.cjs.map +1 -0
- package/dist/chunk-VLCNNA76.cjs +4 -0
- package/dist/chunk-VLCNNA76.cjs.map +1 -0
- package/dist/chunk-VPAUN75Q.js +3 -0
- package/dist/chunk-VPAUN75Q.js.map +1 -0
- package/dist/chunk-VT237QF2.js +3 -0
- package/dist/chunk-VT237QF2.js.map +1 -0
- package/dist/chunk-VV4TZG5S.js +321 -0
- package/dist/chunk-VV4TZG5S.js.map +1 -0
- package/dist/chunk-VYK6MBL4.cjs +4 -0
- package/dist/chunk-VYK6MBL4.cjs.map +1 -0
- package/dist/chunk-W33CKW6Q.cjs +4 -0
- package/dist/chunk-W33CKW6Q.cjs.map +1 -0
- package/dist/chunk-W5VHATSR.cjs +31 -0
- package/dist/chunk-W5VHATSR.cjs.map +1 -0
- package/dist/chunk-W7YI5UT3.js +3 -0
- package/dist/chunk-W7YI5UT3.js.map +1 -0
- package/dist/chunk-WEQWU2IC.js +34 -0
- package/dist/chunk-WEQWU2IC.js.map +1 -0
- package/dist/chunk-WK4VXPPZ.cjs +104 -0
- package/dist/chunk-WK4VXPPZ.cjs.map +1 -0
- package/dist/chunk-WSA4LMWR.cjs +96 -0
- package/dist/chunk-WSA4LMWR.cjs.map +1 -0
- package/dist/chunk-WUIEZ6Z4.cjs +360 -0
- package/dist/chunk-WUIEZ6Z4.cjs.map +1 -0
- package/dist/chunk-WUKIJJG2.cjs +45 -0
- package/dist/chunk-WUKIJJG2.cjs.map +1 -0
- package/dist/chunk-WVFAQBS7.js +29 -0
- package/dist/chunk-WVFAQBS7.js.map +1 -0
- package/dist/chunk-X7RDNMN7.js +3 -0
- package/dist/chunk-X7RDNMN7.js.map +1 -0
- package/dist/chunk-X7XP5WBP.cjs +4 -0
- package/dist/chunk-X7XP5WBP.cjs.map +1 -0
- package/dist/chunk-XQAIEPAZ.js +104 -0
- package/dist/chunk-XQAIEPAZ.js.map +1 -0
- package/dist/chunk-XWKNE6DH.cjs +4 -0
- package/dist/chunk-XWKNE6DH.cjs.map +1 -0
- package/dist/chunk-Y6V6CBY5.js +23 -0
- package/dist/chunk-Y6V6CBY5.js.map +1 -0
- package/dist/chunk-Y6VDCZPB.js +62 -0
- package/dist/chunk-Y6VDCZPB.js.map +1 -0
- package/dist/chunk-YDRXBRW2.cjs +184 -0
- package/dist/chunk-YDRXBRW2.cjs.map +1 -0
- package/dist/chunk-YFS2LMG4.cjs +124 -0
- package/dist/chunk-YFS2LMG4.cjs.map +1 -0
- package/dist/chunk-YN6CBIIB.js +63 -0
- package/dist/chunk-YN6CBIIB.js.map +1 -0
- package/dist/chunk-YOJ2XNQX.cjs +4 -0
- package/dist/chunk-YOJ2XNQX.cjs.map +1 -0
- package/dist/chunk-YOOZB4RL.js +3 -0
- package/dist/chunk-YOOZB4RL.js.map +1 -0
- package/dist/chunk-YVU2M7MI.js +34 -0
- package/dist/chunk-YVU2M7MI.js.map +1 -0
- package/dist/chunk-YXBZRB5H.cjs +4 -0
- package/dist/chunk-YXBZRB5H.cjs.map +1 -0
- package/dist/chunk-Z3ZKFI2M.js +43 -0
- package/dist/chunk-Z3ZKFI2M.js.map +1 -0
- package/dist/chunk-Z5GLY4R3.js +112 -0
- package/dist/chunk-Z5GLY4R3.js.map +1 -0
- package/dist/chunk-Z5OMWAQX.js +3 -0
- package/dist/chunk-Z5OMWAQX.js.map +1 -0
- package/dist/chunk-Z7LGWNI7.js +38 -0
- package/dist/chunk-Z7LGWNI7.js.map +1 -0
- package/dist/chunk-ZCWKX4V6.cjs +38 -0
- package/dist/chunk-ZCWKX4V6.cjs.map +1 -0
- package/dist/chunk-ZE5RISBZ.cjs +4 -0
- package/dist/chunk-ZE5RISBZ.cjs.map +1 -0
- package/dist/chunk-ZH4F2P2G.js +3 -0
- package/dist/chunk-ZH4F2P2G.js.map +1 -0
- package/dist/chunk-ZJGFLJ2Z.cjs +4 -0
- package/dist/chunk-ZJGFLJ2Z.cjs.map +1 -0
- package/dist/chunk-ZKBHD27K.cjs +4 -0
- package/dist/chunk-ZKBHD27K.cjs.map +1 -0
- package/dist/chunk-ZQPLRNKX.cjs +4 -0
- package/dist/chunk-ZQPLRNKX.cjs.map +1 -0
- package/dist/chunk-ZQQABQMH.cjs +31 -0
- package/dist/chunk-ZQQABQMH.cjs.map +1 -0
- package/dist/chunk-ZXJQSFIA.js +200 -0
- package/dist/chunk-ZXJQSFIA.js.map +1 -0
- package/dist/developer-apps-zSQXWmEG.d.cts +294 -0
- package/dist/developer-apps-zSQXWmEG.d.ts +294 -0
- package/dist/entries/apps.cjs +13 -0
- package/dist/entries/apps.cjs.map +1 -0
- package/dist/entries/apps.d.cts +300 -0
- package/dist/entries/apps.d.ts +300 -0
- package/dist/entries/apps.js +4 -0
- package/dist/entries/apps.js.map +1 -0
- package/dist/entries/audio.cjs +13 -0
- package/dist/entries/audio.cjs.map +1 -0
- package/dist/entries/audio.d.cts +200 -0
- package/dist/entries/audio.d.ts +200 -0
- package/dist/entries/audio.js +4 -0
- package/dist/entries/audio.js.map +1 -0
- package/dist/entries/billing.cjs +13 -0
- package/dist/entries/billing.cjs.map +1 -0
- package/dist/entries/billing.d.cts +208 -0
- package/dist/entries/billing.d.ts +208 -0
- package/dist/entries/billing.js +4 -0
- package/dist/entries/billing.js.map +1 -0
- package/dist/entries/catalogs.cjs +13 -0
- package/dist/entries/catalogs.cjs.map +1 -0
- package/dist/entries/catalogs.d.cts +82 -0
- package/dist/entries/catalogs.d.ts +82 -0
- package/dist/entries/catalogs.js +4 -0
- package/dist/entries/catalogs.js.map +1 -0
- package/dist/entries/characters.cjs +45 -0
- package/dist/entries/characters.cjs.map +1 -0
- package/dist/entries/characters.d.cts +741 -0
- package/dist/entries/characters.d.ts +741 -0
- package/dist/entries/characters.js +4 -0
- package/dist/entries/characters.js.map +1 -0
- package/dist/entries/client.cjs +78 -0
- package/dist/entries/client.cjs.map +1 -0
- package/dist/entries/client.d.cts +147 -0
- package/dist/entries/client.d.ts +147 -0
- package/dist/entries/client.js +53 -0
- package/dist/entries/client.js.map +1 -0
- package/dist/entries/collections.cjs +13 -0
- package/dist/entries/collections.cjs.map +1 -0
- package/dist/entries/collections.d.cts +77 -0
- package/dist/entries/collections.d.ts +77 -0
- package/dist/entries/collections.js +4 -0
- package/dist/entries/collections.js.map +1 -0
- package/dist/entries/community.cjs +13 -0
- package/dist/entries/community.cjs.map +1 -0
- package/dist/entries/community.d.cts +87 -0
- package/dist/entries/community.d.ts +87 -0
- package/dist/entries/community.js +4 -0
- package/dist/entries/community.js.map +1 -0
- package/dist/entries/competitors.cjs +13 -0
- package/dist/entries/competitors.cjs.map +1 -0
- package/dist/entries/competitors.d.cts +96 -0
- package/dist/entries/competitors.d.ts +96 -0
- package/dist/entries/competitors.js +4 -0
- package/dist/entries/competitors.js.map +1 -0
- package/dist/entries/copilot.cjs +15 -0
- package/dist/entries/copilot.cjs.map +1 -0
- package/dist/entries/copilot.d.cts +296 -0
- package/dist/entries/copilot.d.ts +296 -0
- package/dist/entries/copilot.js +6 -0
- package/dist/entries/copilot.js.map +1 -0
- package/dist/entries/core.cjs +26 -0
- package/dist/entries/core.cjs.map +1 -0
- package/dist/entries/core.d.cts +3 -0
- package/dist/entries/core.d.ts +3 -0
- package/dist/entries/core.js +5 -0
- package/dist/entries/core.js.map +1 -0
- package/dist/entries/creatures.cjs +29 -0
- package/dist/entries/creatures.cjs.map +1 -0
- package/dist/entries/creatures.d.cts +594 -0
- package/dist/entries/creatures.d.ts +594 -0
- package/dist/entries/creatures.js +4 -0
- package/dist/entries/creatures.js.map +1 -0
- package/dist/entries/credits.cjs +13 -0
- package/dist/entries/credits.cjs.map +1 -0
- package/dist/entries/credits.d.cts +229 -0
- package/dist/entries/credits.d.ts +229 -0
- package/dist/entries/credits.js +4 -0
- package/dist/entries/credits.js.map +1 -0
- package/dist/entries/developer-apps.cjs +13 -0
- package/dist/entries/developer-apps.cjs.map +1 -0
- package/dist/entries/developer-apps.d.cts +3 -0
- package/dist/entries/developer-apps.d.ts +3 -0
- package/dist/entries/developer-apps.js +4 -0
- package/dist/entries/developer-apps.js.map +1 -0
- package/dist/entries/edit.cjs +34 -0
- package/dist/entries/edit.cjs.map +1 -0
- package/dist/entries/edit.d.cts +705 -0
- package/dist/entries/edit.d.ts +705 -0
- package/dist/entries/edit.js +5 -0
- package/dist/entries/edit.js.map +1 -0
- package/dist/entries/errors.cjs +93 -0
- package/dist/entries/errors.cjs.map +1 -0
- package/dist/entries/errors.d.cts +338 -0
- package/dist/entries/errors.d.ts +338 -0
- package/dist/entries/errors.js +4 -0
- package/dist/entries/errors.js.map +1 -0
- package/dist/entries/executions.cjs +21 -0
- package/dist/entries/executions.cjs.map +1 -0
- package/dist/entries/executions.d.cts +120 -0
- package/dist/entries/executions.d.ts +120 -0
- package/dist/entries/executions.js +4 -0
- package/dist/entries/executions.js.map +1 -0
- package/dist/entries/gallery.cjs +13 -0
- package/dist/entries/gallery.cjs.map +1 -0
- package/dist/entries/gallery.d.cts +85 -0
- package/dist/entries/gallery.d.ts +85 -0
- package/dist/entries/gallery.js +4 -0
- package/dist/entries/gallery.js.map +1 -0
- package/dist/entries/jobs.cjs +13 -0
- package/dist/entries/jobs.cjs.map +1 -0
- package/dist/entries/jobs.d.cts +252 -0
- package/dist/entries/jobs.d.ts +252 -0
- package/dist/entries/jobs.js +4 -0
- package/dist/entries/jobs.js.map +1 -0
- package/dist/entries/library.cjs +13 -0
- package/dist/entries/library.cjs.map +1 -0
- package/dist/entries/library.d.cts +109 -0
- package/dist/entries/library.d.ts +109 -0
- package/dist/entries/library.js +4 -0
- package/dist/entries/library.js.map +1 -0
- package/dist/entries/llm.cjs +13 -0
- package/dist/entries/llm.cjs.map +1 -0
- package/dist/entries/llm.d.cts +98 -0
- package/dist/entries/llm.d.ts +98 -0
- package/dist/entries/llm.js +4 -0
- package/dist/entries/llm.js.map +1 -0
- package/dist/entries/locations.cjs +25 -0
- package/dist/entries/locations.cjs.map +1 -0
- package/dist/entries/locations.d.cts +573 -0
- package/dist/entries/locations.d.ts +573 -0
- package/dist/entries/locations.js +4 -0
- package/dist/entries/locations.js.map +1 -0
- package/dist/entries/media.cjs +15 -0
- package/dist/entries/media.cjs.map +1 -0
- package/dist/entries/media.d.cts +548 -0
- package/dist/entries/media.d.ts +548 -0
- package/dist/entries/media.js +6 -0
- package/dist/entries/media.js.map +1 -0
- package/dist/entries/models.cjs +13 -0
- package/dist/entries/models.cjs.map +1 -0
- package/dist/entries/models.d.cts +92 -0
- package/dist/entries/models.d.ts +92 -0
- package/dist/entries/models.js +4 -0
- package/dist/entries/models.js.map +1 -0
- package/dist/entries/moodboards.cjs +21 -0
- package/dist/entries/moodboards.cjs.map +1 -0
- package/dist/entries/moodboards.d.cts +77 -0
- package/dist/entries/moodboards.d.ts +77 -0
- package/dist/entries/moodboards.js +4 -0
- package/dist/entries/moodboards.js.map +1 -0
- package/dist/entries/node-presets.cjs +13 -0
- package/dist/entries/node-presets.cjs.map +1 -0
- package/dist/entries/node-presets.d.cts +217 -0
- package/dist/entries/node-presets.d.ts +217 -0
- package/dist/entries/node-presets.js +4 -0
- package/dist/entries/node-presets.js.map +1 -0
- package/dist/entries/nodes.cjs +22 -0
- package/dist/entries/nodes.cjs.map +1 -0
- package/dist/entries/nodes.d.cts +18 -0
- package/dist/entries/nodes.d.ts +18 -0
- package/dist/entries/nodes.js +5 -0
- package/dist/entries/nodes.js.map +1 -0
- package/dist/entries/oauth.cjs +13 -0
- package/dist/entries/oauth.cjs.map +1 -0
- package/dist/entries/oauth.d.cts +69 -0
- package/dist/entries/oauth.d.ts +69 -0
- package/dist/entries/oauth.js +4 -0
- package/dist/entries/oauth.js.map +1 -0
- package/dist/entries/objects.cjs +29 -0
- package/dist/entries/objects.cjs.map +1 -0
- package/dist/entries/objects.d.cts +544 -0
- package/dist/entries/objects.d.ts +544 -0
- package/dist/entries/objects.js +4 -0
- package/dist/entries/objects.js.map +1 -0
- package/dist/entries/organizations.cjs +21 -0
- package/dist/entries/organizations.cjs.map +1 -0
- package/dist/entries/organizations.d.cts +164 -0
- package/dist/entries/organizations.d.ts +164 -0
- package/dist/entries/organizations.js +4 -0
- package/dist/entries/organizations.js.map +1 -0
- package/dist/entries/palettes.cjs +21 -0
- package/dist/entries/palettes.cjs.map +1 -0
- package/dist/entries/palettes.d.cts +69 -0
- package/dist/entries/palettes.d.ts +69 -0
- package/dist/entries/palettes.js +4 -0
- package/dist/entries/palettes.js.map +1 -0
- package/dist/entries/picker-catalogs.cjs +13 -0
- package/dist/entries/picker-catalogs.cjs.map +1 -0
- package/dist/entries/picker-catalogs.d.cts +148 -0
- package/dist/entries/picker-catalogs.d.ts +148 -0
- package/dist/entries/picker-catalogs.js +4 -0
- package/dist/entries/picker-catalogs.js.map +1 -0
- package/dist/entries/pipelines.cjs +13 -0
- package/dist/entries/pipelines.cjs.map +1 -0
- package/dist/entries/pipelines.d.cts +255 -0
- package/dist/entries/pipelines.d.ts +255 -0
- package/dist/entries/pipelines.js +4 -0
- package/dist/entries/pipelines.js.map +1 -0
- package/dist/entries/projects.cjs +13 -0
- package/dist/entries/projects.cjs.map +1 -0
- package/dist/entries/projects.d.cts +49 -0
- package/dist/entries/projects.d.ts +49 -0
- package/dist/entries/projects.js +4 -0
- package/dist/entries/projects.js.map +1 -0
- package/dist/entries/prompt-helper.cjs +13 -0
- package/dist/entries/prompt-helper.cjs.map +1 -0
- package/dist/entries/prompt-helper.d.cts +73 -0
- package/dist/entries/prompt-helper.d.ts +73 -0
- package/dist/entries/prompt-helper.js +4 -0
- package/dist/entries/prompt-helper.js.map +1 -0
- package/dist/entries/recast.cjs +17 -0
- package/dist/entries/recast.cjs.map +1 -0
- package/dist/entries/recast.d.cts +229 -0
- package/dist/entries/recast.d.ts +229 -0
- package/dist/entries/recast.js +4 -0
- package/dist/entries/recast.js.map +1 -0
- package/dist/entries/reduce.cjs +13 -0
- package/dist/entries/reduce.cjs.map +1 -0
- package/dist/entries/reduce.d.cts +56 -0
- package/dist/entries/reduce.d.ts +56 -0
- package/dist/entries/reduce.js +4 -0
- package/dist/entries/reduce.js.map +1 -0
- package/dist/entries/saved-posts.cjs +13 -0
- package/dist/entries/saved-posts.cjs.map +1 -0
- package/dist/entries/saved-posts.d.cts +33 -0
- package/dist/entries/saved-posts.d.ts +33 -0
- package/dist/entries/saved-posts.js +4 -0
- package/dist/entries/saved-posts.js.map +1 -0
- package/dist/entries/scene3d.cjs +17 -0
- package/dist/entries/scene3d.cjs.map +1 -0
- package/dist/entries/scene3d.d.cts +131 -0
- package/dist/entries/scene3d.d.ts +131 -0
- package/dist/entries/scene3d.js +4 -0
- package/dist/entries/scene3d.js.map +1 -0
- package/dist/entries/sessions.cjs +13 -0
- package/dist/entries/sessions.cjs.map +1 -0
- package/dist/entries/sessions.d.cts +122 -0
- package/dist/entries/sessions.d.ts +122 -0
- package/dist/entries/sessions.js +4 -0
- package/dist/entries/sessions.js.map +1 -0
- package/dist/entries/shots.cjs +13 -0
- package/dist/entries/shots.cjs.map +1 -0
- package/dist/entries/shots.d.cts +78 -0
- package/dist/entries/shots.d.ts +78 -0
- package/dist/entries/shots.js +4 -0
- package/dist/entries/shots.js.map +1 -0
- package/dist/entries/studio.cjs +22 -0
- package/dist/entries/studio.cjs.map +1 -0
- package/dist/entries/studio.d.cts +281 -0
- package/dist/entries/studio.d.ts +281 -0
- package/dist/entries/studio.js +5 -0
- package/dist/entries/studio.js.map +1 -0
- package/dist/entries/templates.cjs +13 -0
- package/dist/entries/templates.cjs.map +1 -0
- package/dist/entries/templates.d.cts +110 -0
- package/dist/entries/templates.d.ts +110 -0
- package/dist/entries/templates.js +4 -0
- package/dist/entries/templates.js.map +1 -0
- package/dist/entries/tutorials.cjs +13 -0
- package/dist/entries/tutorials.cjs.map +1 -0
- package/dist/entries/tutorials.d.cts +63 -0
- package/dist/entries/tutorials.d.ts +63 -0
- package/dist/entries/tutorials.js +4 -0
- package/dist/entries/tutorials.js.map +1 -0
- package/dist/entries/uploads.cjs +13 -0
- package/dist/entries/uploads.cjs.map +1 -0
- package/dist/entries/uploads.d.cts +44 -0
- package/dist/entries/uploads.d.ts +44 -0
- package/dist/entries/uploads.js +4 -0
- package/dist/entries/uploads.js.map +1 -0
- package/dist/entries/video-pro.cjs +13 -0
- package/dist/entries/video-pro.cjs.map +1 -0
- package/dist/entries/video-pro.d.cts +60 -0
- package/dist/entries/video-pro.d.ts +60 -0
- package/dist/entries/video-pro.js +4 -0
- package/dist/entries/video-pro.js.map +1 -0
- package/dist/entries/voices.cjs +13 -0
- package/dist/entries/voices.cjs.map +1 -0
- package/dist/entries/voices.d.cts +498 -0
- package/dist/entries/voices.d.ts +498 -0
- package/dist/entries/voices.js +4 -0
- package/dist/entries/voices.js.map +1 -0
- package/dist/entries/webhooks.cjs +21 -0
- package/dist/entries/webhooks.cjs.map +1 -0
- package/dist/entries/webhooks.d.cts +64 -0
- package/dist/entries/webhooks.d.ts +64 -0
- package/dist/entries/webhooks.js +4 -0
- package/dist/entries/webhooks.js.map +1 -0
- package/dist/entries/workflows.cjs +13 -0
- package/dist/entries/workflows.cjs.map +1 -0
- package/dist/entries/workflows.d.cts +393 -0
- package/dist/entries/workflows.d.ts +393 -0
- package/dist/entries/workflows.js +4 -0
- package/dist/entries/workflows.js.map +1 -0
- package/dist/entries/workspaces.cjs +13 -0
- package/dist/entries/workspaces.cjs.map +1 -0
- package/dist/entries/workspaces.d.cts +124 -0
- package/dist/entries/workspaces.d.ts +124 -0
- package/dist/entries/workspaces.js +4 -0
- package/dist/entries/workspaces.js.map +1 -0
- package/dist/index.cjs +501 -4618
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +66 -9651
- package/dist/index.d.ts +66 -9651
- package/dist/index.js +100 -4511
- package/dist/index.js.map +1 -1
- package/dist/nodes-BPvrAoUs.d.cts +1264 -0
- package/dist/nodes-C2zu3uqn.d.ts +1264 -0
- package/dist/studio-productions-DUHvdSvk.d.cts +572 -0
- package/dist/studio-productions-vbCNSbtf.d.ts +572 -0
- package/dist/webhooks-BJawEIz8.d.ts +198 -0
- package/dist/webhooks-Dn_DtNTD.d.cts +198 -0
- package/package.json +253 -3
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkKNMW722T_cjs = require('./chunk-KNMW722T.cjs');
|
|
4
|
+
|
|
5
|
+
// src/resources/copilot.ts
|
|
6
|
+
var COPILOT_FRAME_TYPES = /* @__PURE__ */ new Set([
|
|
7
|
+
"metadata",
|
|
8
|
+
"token",
|
|
9
|
+
"tool_call",
|
|
10
|
+
"workflow_updated",
|
|
11
|
+
"workflow_created",
|
|
12
|
+
"run_proposed",
|
|
13
|
+
"memory_saved",
|
|
14
|
+
"usage",
|
|
15
|
+
"done",
|
|
16
|
+
"error"
|
|
17
|
+
]);
|
|
18
|
+
function isCopilotFrame(value) {
|
|
19
|
+
if (typeof value !== "object" || value === null) return false;
|
|
20
|
+
const type = value.type;
|
|
21
|
+
return typeof type === "string" && COPILOT_FRAME_TYPES.has(type);
|
|
22
|
+
}
|
|
23
|
+
var CopilotResource = class {
|
|
24
|
+
constructor(client) {
|
|
25
|
+
this.client = client;
|
|
26
|
+
}
|
|
27
|
+
client;
|
|
28
|
+
/**
|
|
29
|
+
* Open a conversation (`POST /v1/copilot/threads`) — on `workflowId`, or on
|
|
30
|
+
* a workflow the server creates from `prompt`. Re-opening a workflow that
|
|
31
|
+
* already has an active thread answers THAT thread rather than a second one.
|
|
32
|
+
*/
|
|
33
|
+
create(input) {
|
|
34
|
+
return this.client.request("POST", "/v1/copilot/threads", { body: input });
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The active thread for a workflow (`GET /v1/copilot/threads?workflowId=…`),
|
|
38
|
+
* or `null` when the user has none open on it.
|
|
39
|
+
*/
|
|
40
|
+
list(params) {
|
|
41
|
+
return this.client.request("GET", "/v1/copilot/threads", { query: { workflowId: params.workflowId } });
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* One thread with its messages (`GET /v1/copilot/threads/:id`). `after` reads
|
|
45
|
+
* only what followed that sequence number (the panel's catch-up); `limit`
|
|
46
|
+
* caps the page at the server's own ceiling.
|
|
47
|
+
*/
|
|
48
|
+
get(id, opts = {}) {
|
|
49
|
+
return this.client.request("GET", `/v1/copilot/threads/${encodeURIComponent(id)}`, {
|
|
50
|
+
query: { ...opts.after !== void 0 ? { after: opts.after } : {}, ...opts.limit !== void 0 ? { limit: opts.limit } : {} }
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Close a conversation (`DELETE /v1/copilot/threads/:id`). Archival, not
|
|
55
|
+
* deletion — the messages stay readable. Refused while a turn is running.
|
|
56
|
+
*/
|
|
57
|
+
archive(id) {
|
|
58
|
+
return this.client.request("DELETE", `/v1/copilot/threads/${encodeURIComponent(id)}`);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Stop the running turn (`POST /v1/copilot/threads/:id/cancel`). Answers the
|
|
62
|
+
* turn it asked to stop; the turn's own stream ends with a `done` frame.
|
|
63
|
+
*/
|
|
64
|
+
cancel(id) {
|
|
65
|
+
return this.client.request("POST", `/v1/copilot/threads/${encodeURIComponent(id)}/cancel`);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Send one message and iterate the turn's frames
|
|
69
|
+
* (`POST /v1/copilot/threads/:id/messages`, server-sent events).
|
|
70
|
+
*
|
|
71
|
+
* Deliberately NOT routed through `client.request`: that path arms an abort
|
|
72
|
+
* timer around the whole exchange, and a turn legitimately runs for minutes —
|
|
73
|
+
* inheriting `timeoutMs` would cut the assistant off mid-answer. The caller
|
|
74
|
+
* owns the lifetime instead: pass `signal` to end the stream, or stop
|
|
75
|
+
* iterating (the reader cancels the body, which ends the request).
|
|
76
|
+
*
|
|
77
|
+
* A frame kind this package does not model is skipped rather than thrown, so
|
|
78
|
+
* a newer server cannot break an older caller.
|
|
79
|
+
*/
|
|
80
|
+
async *stream(threadId, opts) {
|
|
81
|
+
const url = `${this.client.baseUrl}/v1/copilot/threads/${encodeURIComponent(threadId)}/messages`;
|
|
82
|
+
const token = await this.client.auth.getToken();
|
|
83
|
+
const res = await this.client.fetch(url, {
|
|
84
|
+
method: "POST",
|
|
85
|
+
headers: {
|
|
86
|
+
"Content-Type": "application/json",
|
|
87
|
+
...token ? { Authorization: `Bearer ${token}` } : {}
|
|
88
|
+
},
|
|
89
|
+
body: JSON.stringify({
|
|
90
|
+
message: opts.message,
|
|
91
|
+
...opts.baseVersion !== void 0 ? { baseVersion: opts.baseVersion } : {},
|
|
92
|
+
...opts.tier ? { tier: opts.tier } : {}
|
|
93
|
+
}),
|
|
94
|
+
signal: opts.signal
|
|
95
|
+
});
|
|
96
|
+
for await (const value of chunkKNMW722T_cjs.readSseStream(res, { label: "copilot stream" })) {
|
|
97
|
+
if (isCopilotFrame(value)) yield value;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
exports.CopilotResource = CopilotResource;
|
|
103
|
+
//# sourceMappingURL=chunk-NLQQHJ25.cjs.map
|
|
104
|
+
//# sourceMappingURL=chunk-NLQQHJ25.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resources/copilot.ts"],"names":["readSseStream"],"mappings":"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","file":"chunk-NLQQHJ25.cjs","sourcesContent":["import type { NodaroClientCore } from \"../core.js\"\nimport { readSseStream } from \"../sse.js\"\n\n/**\n * The assistant's conversation surface (`/v1/copilot/*`) — threads, and one\n * turn as a live stream.\n *\n * A thread is the conversation; a TURN is one message and everything the\n * assistant does in answer to it. `stream` is the only method that spends: it\n * POSTs the message and yields the turn's frames as they arrive, so a caller\n * renders prose, tool activity and proposals live instead of waiting for a\n * finished answer.\n *\n * Two shapes here are deliberately TOLERANT of a deployment that predates a\n * field, because the SDK ships ahead of every instance it talks to:\n * - `surface` is optional on both {@link CopilotThread} and the `metadata`\n * frame — absent is a value (\"this deployment does not say\"), never a\n * default this package invents.\n * - An event kind this package does not model is IGNORED, not thrown: a\n * newer server may emit frames a caller was built before.\n */\n\n/** How this thread runs what it proposes: ask first, or run within a budget. */\nexport type CopilotRunMode = \"ask\" | \"auto\"\n\n/** The thread's model rung. Absent from a server that predates it. */\nexport type CopilotModelTier = \"economy\" | \"standard\" | \"premium\"\n\n/**\n * Which product the conversation belongs to.\n *\n * NO deployment sends this today — nothing in the platform emits it yet — and\n * it is typed here so that the day one does, a caller reads what the server\n * said. That is why it is OPTIONAL everywhere it appears: absent is a value\n * (\"this deployment does not say\"), never a default this package invents.\n */\nexport type CopilotSurface = \"studio\" | \"workflow\"\n\nexport interface CopilotThread {\n id: string\n workflowId: string\n runMode: CopilotRunMode\n /** See {@link CopilotSurface} — absent means the server did not say. */\n surface?: CopilotSurface\n /** Whether this thread may build nodes that publish to connected accounts. */\n allowPublishing?: boolean\n modelTier?: CopilotModelTier\n autoRunLimitCredits: number\n userTurnCount: number\n lastMessageAt: string | null\n createdAt: string\n /** Only on {@link CopilotResource.get} — derived from a live turn. */\n status?: \"running\" | \"idle\"\n activeTurnId?: string | null\n}\n\n/** The workflow a thread was opened on, as `create` answers it. */\nexport interface CopilotThreadWorkflow {\n id: string\n projectId: string\n name: string\n version: number\n}\n\nexport type CopilotMessagePart =\n | { kind: \"text\"; text: string }\n | { kind: \"tool_call\"; id: string; name: string; label: string; status: \"finished\" | \"failed\" }\n\nexport interface CopilotMessage {\n id: string\n seq: number\n turnId: string\n role: \"user\" | \"assistant\"\n createdAt: string\n parts: CopilotMessagePart[]\n}\n\n/** Open a thread on an existing workflow, or on one this call creates. */\nexport interface CreateCopilotThreadInput {\n /** The workflow to work on. Give this OR `prompt`. */\n workflowId?: string\n /** Start from nothing: the server creates a workflow seeded by this prompt. */\n prompt?: string\n /** Name for a workflow created by `prompt` (defaults to the prompt's head). */\n name?: string\n}\n\nexport interface CopilotStreamOptions {\n /** The user's turn. */\n message: string\n /** The workflow version this message was composed against — a newer one 409s. */\n baseVersion?: number\n /** The composer's echo of the thread's rung; the thread row stays authoritative. */\n tier?: CopilotModelTier\n /**\n * Ends the stream. The client's request timeout is NOT applied to a turn.\n *\n * Aborting REJECTS the iteration — with the platform's raw `AbortError`, not\n * a `NodaroError` — whether it fires before the first frame or between two of\n * them. Wrap the loop in `try`/`catch` if a cancelled turn is an ordinary\n * ending in your UI. (`media.downloadVideoProgress` behaves the same way.)\n */\n signal?: AbortSignal\n}\n\nexport interface CopilotToolCallFrameData {\n id: string\n name: string\n label: string\n status: \"started\" | \"finished\" | \"failed\"\n summary?: string\n}\n\nexport interface CopilotWorkflowUpdateFrameData {\n workflowId: string\n version: number\n updatedAt?: string\n note?: string | null\n addedNodeIds: string[]\n updatedNodeIds: string[]\n removedNodeIds: string[]\n addedNodeTypes: string[]\n nodeCount: number\n edgeCount: number\n adjustments: string[]\n}\n\n/** A file the turn wired onto a node — named on the run card, never counted. */\nexport interface CopilotWiredAsset {\n id: string\n kind: string\n filename: string\n nodeId: string\n}\n\nexport interface CopilotRunProposalNode {\n id: string\n type: string\n graphVersion: number\n label: string\n}\n\nexport interface CopilotRunProposalFrameData {\n workflowId: string\n addedNodeTypes: string[]\n wiredAssets?: CopilotWiredAsset[]\n note: string | null\n /** Present when ONE node was proposed rather than the whole graph. */\n node?: CopilotRunProposalNode | null\n}\n\n/** A workflow the turn created — a different one from the open canvas. */\nexport interface CopilotWorkflowCreatedFrameData {\n workflowId: string\n name: string\n projectId: string\n}\n\n/** One thing the assistant saved to memory this turn. */\nexport interface CopilotMemorySavedFrameData {\n id: string\n content: string\n}\n\nexport interface CopilotMetadataFrameData {\n threadId: string\n turnId: string\n jobId: string\n model: string\n baseVersion: number | null\n runMode: CopilotRunMode\n autoRunLimitCredits: number\n allowPublishing?: boolean\n modelTier?: CopilotModelTier\n /** See {@link CopilotSurface} — absent means the server did not say. */\n surface?: CopilotSurface\n}\n\n/**\n * One frame of a turn.\n *\n * The union covers the frame KINDS; a frame's `data` is passed through\n * untouched, so a field this package does not model still reaches the caller\n * rather than being stripped on the way.\n */\nexport type CopilotStreamFrame =\n | { type: \"metadata\"; data: CopilotMetadataFrameData }\n | { type: \"token\"; data: { text: string } }\n | { type: \"tool_call\"; data: CopilotToolCallFrameData }\n | { type: \"workflow_updated\"; data: CopilotWorkflowUpdateFrameData }\n | { type: \"workflow_created\"; data: CopilotWorkflowCreatedFrameData }\n | { type: \"run_proposed\"; data: CopilotRunProposalFrameData }\n | { type: \"memory_saved\"; data: CopilotMemorySavedFrameData }\n | { type: \"usage\"; data: { inputTokens: number; outputTokens: number; cacheReadTokens: number; creditsCharged: number | null } }\n | { type: \"done\"; data: { turnId: string; messageId: string | null; status: \"completed\" | \"capped\" | \"cancelled\"; finalVersion: number | null } }\n | { type: \"error\"; data: { code: string; message: string } }\n\n/** The kinds above, as the wire spells them — the whole of what `stream` yields. */\nconst COPILOT_FRAME_TYPES: ReadonlySet<string> = new Set([\n \"metadata\",\n \"token\",\n \"tool_call\",\n \"workflow_updated\",\n \"workflow_created\",\n \"run_proposed\",\n \"memory_saved\",\n \"usage\",\n \"done\",\n \"error\",\n])\n\nfunction isCopilotFrame(value: unknown): value is CopilotStreamFrame {\n if (typeof value !== \"object\" || value === null) return false\n const type = (value as { type?: unknown }).type\n return typeof type === \"string\" && COPILOT_FRAME_TYPES.has(type)\n}\n\nexport class CopilotResource {\n constructor(private client: NodaroClientCore) {}\n\n /**\n * Open a conversation (`POST /v1/copilot/threads`) — on `workflowId`, or on\n * a workflow the server creates from `prompt`. Re-opening a workflow that\n * already has an active thread answers THAT thread rather than a second one.\n */\n create(input: CreateCopilotThreadInput): Promise<{ data: { thread: CopilotThread; workflow: CopilotThreadWorkflow } }> {\n return this.client.request(\"POST\", \"/v1/copilot/threads\", { body: input })\n }\n\n /**\n * The active thread for a workflow (`GET /v1/copilot/threads?workflowId=…`),\n * or `null` when the user has none open on it.\n */\n list(params: { workflowId: string }): Promise<{ data: { thread: CopilotThread | null } }> {\n return this.client.request(\"GET\", \"/v1/copilot/threads\", { query: { workflowId: params.workflowId } })\n }\n\n /**\n * One thread with its messages (`GET /v1/copilot/threads/:id`). `after` reads\n * only what followed that sequence number (the panel's catch-up); `limit`\n * caps the page at the server's own ceiling.\n */\n get(\n id: string,\n opts: { after?: number; limit?: number } = {},\n ): Promise<{ data: { thread: CopilotThread; messages: CopilotMessage[] } }> {\n return this.client.request(\"GET\", `/v1/copilot/threads/${encodeURIComponent(id)}`, {\n query: { ...(opts.after !== undefined ? { after: opts.after } : {}), ...(opts.limit !== undefined ? { limit: opts.limit } : {}) },\n })\n }\n\n /**\n * Close a conversation (`DELETE /v1/copilot/threads/:id`). Archival, not\n * deletion — the messages stay readable. Refused while a turn is running.\n */\n archive(id: string): Promise<{ data: { archived: true } }> {\n return this.client.request(\"DELETE\", `/v1/copilot/threads/${encodeURIComponent(id)}`)\n }\n\n /**\n * Stop the running turn (`POST /v1/copilot/threads/:id/cancel`). Answers the\n * turn it asked to stop; the turn's own stream ends with a `done` frame.\n */\n cancel(id: string): Promise<{ data: { cancelling: true; turnId: string } }> {\n return this.client.request(\"POST\", `/v1/copilot/threads/${encodeURIComponent(id)}/cancel`)\n }\n\n /**\n * Send one message and iterate the turn's frames\n * (`POST /v1/copilot/threads/:id/messages`, server-sent events).\n *\n * Deliberately NOT routed through `client.request`: that path arms an abort\n * timer around the whole exchange, and a turn legitimately runs for minutes —\n * inheriting `timeoutMs` would cut the assistant off mid-answer. The caller\n * owns the lifetime instead: pass `signal` to end the stream, or stop\n * iterating (the reader cancels the body, which ends the request).\n *\n * A frame kind this package does not model is skipped rather than thrown, so\n * a newer server cannot break an older caller.\n */\n async *stream(threadId: string, opts: CopilotStreamOptions): AsyncGenerator<CopilotStreamFrame, void, undefined> {\n const url = `${this.client.baseUrl}/v1/copilot/threads/${encodeURIComponent(threadId)}/messages`\n const token = await this.client.auth.getToken()\n const res = await this.client.fetch(url, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n ...(token ? { Authorization: `Bearer ${token}` } : {}),\n },\n body: JSON.stringify({\n message: opts.message,\n ...(opts.baseVersion !== undefined ? { baseVersion: opts.baseVersion } : {}),\n ...(opts.tier ? { tier: opts.tier } : {}),\n }),\n signal: opts.signal,\n })\n for await (const value of readSseStream<unknown>(res, { label: \"copilot stream\" })) {\n if (isCopilotFrame(value)) yield value\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { SCENE3D_V2_LIMITS } from '@nodaro/shared/scene3d';
|
|
2
|
+
|
|
3
|
+
// src/resources/scene3d-types.ts
|
|
4
|
+
var SCENE3D_DELIVERY_ASSET_USAGE = {
|
|
5
|
+
poster: "poster",
|
|
6
|
+
"validation-report": "validation",
|
|
7
|
+
"shot-still": "shot-still",
|
|
8
|
+
/** The recipe a run that never compiled was refused for. See {@link Scene3DDeliveryAsset}. */
|
|
9
|
+
"source-json": "checkpoint"
|
|
10
|
+
};
|
|
11
|
+
function newIdempotencyKey() {
|
|
12
|
+
const random = globalThis.crypto?.randomUUID?.();
|
|
13
|
+
return `sdk-pro3d-${random ?? `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 12)}`}`;
|
|
14
|
+
}
|
|
15
|
+
var Scene3DResource = class {
|
|
16
|
+
/** Every operation runs a platform node, so the client must carry `nodes` too. */
|
|
17
|
+
constructor(client) {
|
|
18
|
+
this.client = client;
|
|
19
|
+
}
|
|
20
|
+
client;
|
|
21
|
+
capabilities() {
|
|
22
|
+
return this.client.request("GET", "/v1/3d-scene/capabilities");
|
|
23
|
+
}
|
|
24
|
+
/** Current access to both the delivery and its source is required on every read. */
|
|
25
|
+
getDelivery(jobId) {
|
|
26
|
+
return this.client.request("GET", `/v1/3d-scene/deliveries/${encodeURIComponent(jobId)}`);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The bytes of one descriptor the delivery listed.
|
|
30
|
+
*
|
|
31
|
+
* Checked against {@link SCENE3D_DELIVERY_ASSET_USAGE} rather than a hardcoded pair, which
|
|
32
|
+
* is why a `shot-still` now works: the route has served stills since they existed, and this
|
|
33
|
+
* guard refused them. `source-json` — the recipe a refused run was kept for — is on the same
|
|
34
|
+
* map; the server still decides whether THIS caller may read it.
|
|
35
|
+
*/
|
|
36
|
+
deliveryAssetBytes(jobId, asset, options) {
|
|
37
|
+
if (SCENE3D_DELIVERY_ASSET_USAGE[asset.kind] !== asset.usage) {
|
|
38
|
+
throw new Error("This asset is not available through the delivery endpoint");
|
|
39
|
+
}
|
|
40
|
+
if (!Number.isSafeInteger(asset.byteLength) || asset.byteLength < 1 || asset.byteLength > SCENE3D_V2_LIMITS.maxRendererAssetBytes) {
|
|
41
|
+
throw new Error("Invalid scene delivery asset byte length");
|
|
42
|
+
}
|
|
43
|
+
return this.client.requestBytes("GET", `/v1/3d-scene/deliveries/${encodeURIComponent(jobId)}/assets/${encodeURIComponent(asset.assetId)}`, {
|
|
44
|
+
signal: options?.signal,
|
|
45
|
+
maxBytes: asset.byteLength
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The recipe a 3D Render Pro run was refused for, parsed — or `null` when there is none.
|
|
50
|
+
*
|
|
51
|
+
* The one thing such a run leaves behind. Its recipe never compiled, so there is no scene
|
|
52
|
+
* revision, no poster and no `.blend`: `output_data` carries a `deliveryId`, the compiler's
|
|
53
|
+
* reasons, and `validation.sourceRetained` saying whether the recipe itself was kept. This
|
|
54
|
+
* fetches it in one call — delivery, then the `source-json` descriptor's bytes.
|
|
55
|
+
*
|
|
56
|
+
* `null` means the delivery has no retained recipe to hand back: no pass ever cleared
|
|
57
|
+
* admission, or this caller holds less than `edit` on the job's workflow and the descriptor
|
|
58
|
+
* is therefore not listed for them.
|
|
59
|
+
*
|
|
60
|
+
* Read it to see what was attempted and to inform the next prompt. There is no input that
|
|
61
|
+
* takes a recipe back: a refused run published no revision, so there is no `{kind:"scene"}`
|
|
62
|
+
* source to re-run it from.
|
|
63
|
+
*/
|
|
64
|
+
async retainedRecipe(jobId, options) {
|
|
65
|
+
const delivery = await this.getDelivery(jobId);
|
|
66
|
+
const asset = delivery.assets.find((item) => item.kind === "source-json");
|
|
67
|
+
if (!asset) return null;
|
|
68
|
+
const bytes = await this.deliveryAssetBytes(jobId, asset, options);
|
|
69
|
+
return JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(bytes));
|
|
70
|
+
}
|
|
71
|
+
/** Persist deterministic overlays without an LLM or a generation charge. */
|
|
72
|
+
applyEdits(revisionId, params) {
|
|
73
|
+
return this.client.request("POST", `/v1/3d-scene/revisions/${encodeURIComponent(revisionId)}/edits`, { body: params });
|
|
74
|
+
}
|
|
75
|
+
/** Asset access is scoped to an exact retained revision, with fresh authentication. */
|
|
76
|
+
assetBytes(revisionId, asset, options) {
|
|
77
|
+
if (!["glb", "camera-track-json", "poster", "validation-report"].includes(asset.kind)) {
|
|
78
|
+
throw new Error("This asset is not available through the playback endpoint");
|
|
79
|
+
}
|
|
80
|
+
if (!Number.isSafeInteger(asset.byteLength) || asset.byteLength < 1 || asset.byteLength > SCENE3D_V2_LIMITS.maxRendererAssetBytes) {
|
|
81
|
+
throw new Error("Invalid scene asset byte length");
|
|
82
|
+
}
|
|
83
|
+
return this.client.requestBytes("GET", `/v1/3d-scene/revisions/${encodeURIComponent(revisionId)}/assets/${encodeURIComponent(asset.assetId)}`, {
|
|
84
|
+
signal: options?.signal,
|
|
85
|
+
maxBytes: asset.byteLength
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
/** The editable native file has its own authorization lane. */
|
|
89
|
+
sourceBytes(revisionId, options) {
|
|
90
|
+
return this.client.requestBytes("GET", `/v1/3d-scene/revisions/${encodeURIComponent(revisionId)}/source`, {
|
|
91
|
+
signal: options?.signal,
|
|
92
|
+
maxBytes: SCENE3D_V2_LIMITS.maxBlendSourceBytes
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
generate(params) {
|
|
96
|
+
return this.client.nodes.run("generate-3d-scene", params);
|
|
97
|
+
}
|
|
98
|
+
generateAndWait(params, options) {
|
|
99
|
+
return this.client.nodes.runAndWait("generate-3d-scene", params, options);
|
|
100
|
+
}
|
|
101
|
+
edit(params) {
|
|
102
|
+
return this.client.nodes.run("edit-3d-scene", params);
|
|
103
|
+
}
|
|
104
|
+
editAndWait(params, options) {
|
|
105
|
+
return this.client.nodes.runAndWait("edit-3d-scene", params, options);
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Price a 3D Render Pro request WITHOUT starting it.
|
|
109
|
+
*
|
|
110
|
+
* Takes the same body a run takes, minus the `quoteId`, and answers a
|
|
111
|
+
* ceiling (`maxCredits`), a `breakdown` to show, and the
|
|
112
|
+
* `normalizedInputHash` admission re-checks. It reserves nothing and spends
|
|
113
|
+
* nothing — a quote is a price, not a purchase.
|
|
114
|
+
*/
|
|
115
|
+
quotePro(params) {
|
|
116
|
+
return this.client.request("POST", "/v1/pro-3d-render/quote", { body: params });
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Submit a quoted 3D Render Pro run.
|
|
120
|
+
*
|
|
121
|
+
* Requires the `quoteId` from {@link quotePro}: no run starts at a price
|
|
122
|
+
* nobody showed. Sends an `Idempotency-Key` — a fresh one per call unless you
|
|
123
|
+
* supply your own, which you should when retrying a call that timed out.
|
|
124
|
+
*
|
|
125
|
+
* Availability is a property of the deployment: `capabilities().pro` says
|
|
126
|
+
* whether this install can serve it, and which controls you may offer.
|
|
127
|
+
*/
|
|
128
|
+
runPro(params, options) {
|
|
129
|
+
return this.client.nodes.run("pro-3d-render", params, {
|
|
130
|
+
idempotencyKey: options?.idempotencyKey ?? newIdempotencyKey()
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Quote if needed, run, and wait — the whole operation in one call.
|
|
135
|
+
*
|
|
136
|
+
* Two HTTP requests at most, still ONE paid job: when `quoteId` is absent
|
|
137
|
+
* this quotes the identical body first, so the run is admitted against a
|
|
138
|
+
* hash of exactly what was priced. Pass a `quoteId` to run against a quote
|
|
139
|
+
* you already showed the user.
|
|
140
|
+
*
|
|
141
|
+
* Resolves with the settled result — `videoUrl` (the MP4) and `scenePlan`
|
|
142
|
+
* (the exact composition it was rendered from), plus the revision, poster,
|
|
143
|
+
* validation and renderer metadata. A run that AUTHORED also reports its own
|
|
144
|
+
* account of the answer — `metadata.summary`, `repairPasses`,
|
|
145
|
+
* `admissionRetries`, `mechanicalPasses` (repairs the engine applied from
|
|
146
|
+
* the compiler's own remedy with no planner call, counted APART from
|
|
147
|
+
* `repairPasses` on their own quoted allowance), `restoredAssertions`, and
|
|
148
|
+
* any `SCENE_AUTHORING_ASSUMPTION` warnings. A
|
|
149
|
+
* completed result whose `metadata.review` is present passed every mandatory
|
|
150
|
+
* assertion but did NOT get the visual reviewer's approval: `verdict:
|
|
151
|
+
* "refused"` means it objected, each objection also a `SCENE_REVIEW_REFUSED`
|
|
152
|
+
* warning; `verdict: "unavailable"` means the review produced no usable
|
|
153
|
+
* verdict in `attempts` asks (`reason: "provider"` — never reached its
|
|
154
|
+
* provider; `"unusable"` — it answered, unusably), so nobody judged the scene and
|
|
155
|
+
* `SCENE_REVIEW_UNAVAILABLE` leads the warnings. Re-render that same
|
|
156
|
+
* `scenePlan` later with {@link render}, or with a `{kind:'scene'}` source;
|
|
157
|
+
* that costs no authoring.
|
|
158
|
+
*/
|
|
159
|
+
async renderProAndWait(params, options) {
|
|
160
|
+
const quoteId = typeof params.quoteId === "string" ? params.quoteId : (await this.quotePro(params)).quoteId;
|
|
161
|
+
return this.client.nodes.runAndWait("pro-3d-render", { ...params, quoteId }, {
|
|
162
|
+
...options,
|
|
163
|
+
idempotencyKey: options?.idempotencyKey ?? newIdempotencyKey()
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Uses the supplied immutable revision; never starts authoring or a rebuild.
|
|
168
|
+
*
|
|
169
|
+
* Priced by the plan's frame size — see {@link RenderScene3DParams}.
|
|
170
|
+
*/
|
|
171
|
+
render(params) {
|
|
172
|
+
return this.client.nodes.run("render-video", params);
|
|
173
|
+
}
|
|
174
|
+
renderAndWait(params, options) {
|
|
175
|
+
return this.client.nodes.runAndWait("render-video", params, options);
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
export { SCENE3D_DELIVERY_ASSET_USAGE, Scene3DResource };
|
|
180
|
+
//# sourceMappingURL=chunk-NNHWH7ER.js.map
|
|
181
|
+
//# sourceMappingURL=chunk-NNHWH7ER.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resources/scene3d-types.ts","../src/resources/scene3d.ts"],"names":[],"mappings":"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","file":"chunk-NNHWH7ER.js","sourcesContent":["import type { Scene3DPlan, Scene3DPlanV2, Scene3DReference, Scene3DEditOperation, Scene3DV2EditOperation, Scene3DJobOutputAny as Scene3DWireJobOutput, Pro3DRenderCapabilities, Pro3DRenderEngine, Pro3DRenderJobOutput as Pro3DRenderWireOutput, Pro3DRenderQuality, Pro3DRenderQuote as Pro3DRenderWireQuote, Pro3DRenderSource, Pro3DRenderStyle } from \"@nodaro/shared/scene3d\"\nimport type { GenerationSessionParams } from \"./nodes.js\"\n\n/** Reuse newRevisionId for transport retries of the same immutable edit. */\nexport interface RetainedScene3DEditParams {\n newRevisionId: string\n expectedContentHash: string\n operations: readonly Scene3DV2EditOperation[]\n lockedObjectIds?: readonly string[]\n}\nexport interface RetainedScene3DEditResult { scenePlan: Scene3DPlanV2; changeSummary: string }\n\n/**\n * The kind of bytes a delivery descriptor names, and the usage it is pinned under.\n *\n * PAIRED, not two free enums: the platform refuses a pin whose usage is not the one its kind is\n * defined to have, and a client that checks only one of the two would accept a mis-pinned\n * artifact the server would then refuse. {@link SCENE3D_DELIVERY_ASSET_USAGE} is the map both\n * halves are read from.\n */\nexport const SCENE3D_DELIVERY_ASSET_USAGE = {\n poster: \"poster\",\n \"validation-report\": \"validation\",\n \"shot-still\": \"shot-still\",\n /** The recipe a run that never compiled was refused for. See {@link Scene3DDeliveryAsset}. */\n \"source-json\": \"checkpoint\",\n} as const\n\nexport type Scene3DDeliveryAssetKind = keyof typeof SCENE3D_DELIVERY_ASSET_USAGE\n\n/**\n * One artifact a delivery pins, as a descriptor: opaque ids and digests only.\n *\n * Four kinds, and two of them are conditional:\n *\n * - `poster` and `validation-report` are on every delivery;\n * - `shot-still` appears once per shot on a render that produced a contact sheet, and carries\n * its own shot identity (`shotIndex`, `frame`, and the frame size);\n * - `source-json` appears on ONE shape only — a `refused-authoring` delivery, published by a\n * 3D Render Pro run whose recipe the compiler refused on every pass. It is the planner's last\n * admitted recipe, and it is the only thing such a run leaves that names what was attempted.\n * Reading it needs `edit` on the job's workflow (the same access the `.blend` export costs);\n * a reader with less simply does not see the descriptor.\n */\nexport interface Scene3DDeliveryAsset {\n assetId: string\n kind: Scene3DDeliveryAssetKind\n usage: (typeof SCENE3D_DELIVERY_ASSET_USAGE)[Scene3DDeliveryAssetKind]\n byteLength: number\n sha256: string\n viaRevisionId: string | null\n /** Set on a `shot-still` and absent on every other kind — never `null`. */\n shotIndex?: number\n frame?: number\n width?: number\n height?: number\n}\n\n/** Export evidence is retained separately from the immutable scene it rendered. */\nexport interface Scene3DDelivery {\n deliveryId: string\n /**\n * Null on a `refused-authoring` delivery and on that alone.\n *\n * A Pro run whose recipe the compiler refused on every pass still retains the refusal\n * report, but nothing was ever compiled, so no scene revision was published. The field is\n * null rather than absent so the shape stays one shape; read `sourceKind` to tell why.\n */\n sceneRevisionId: string | null\n /**\n * What this delivery was made from. Absent when read from a deployment that predates the\n * refused lane, where every delivery necessarily had a scene behind it.\n */\n sourceKind?: \"retained-revision\" | \"job-output\" | \"refused-authoring\"\n /** Null when there is no plan to hash — see `sceneRevisionId`. */\n sourcePlanSha256: string | null\n sourceContentHash: string | null\n sourceJobId: string | null\n workflowId: string | null\n mode: \"authored\" | \"render-only\"\n createdAt: string\n access: \"view\" | \"edit\" | \"own\"\n assets: Scene3DDeliveryAsset[]\n}\n\nexport type Scene3DAuthoringEngine = \"basic\" | \"blender-cloud\" | \"blender-local\"\n\nexport interface Scene3DCapabilities {\n basic: { available: boolean; sceneSchemaVersions: number[] }\n advanced: null | {\n version: string\n engines: Array<Exclude<Scene3DAuthoringEngine, \"basic\">>\n sceneSchemaVersions: number[]\n maxRepairPasses: number\n }\n /**\n * What this deployment can serve for `pro-3d-render`, including which\n * quality profiles, engines and aspect ratios a client may OFFER. Optional so\n * a client of this version reads an older backend without throwing; absent\n * means the node is unavailable.\n */\n pro?: Pro3DRenderCapabilities\n}\n\ninterface Scene3DEngineParams {\n /** Basic is the default. Discover optional engines through scene3d.capabilities(). */\n engine?: Scene3DAuthoringEngine\n acceptedSceneSchemaVersions?: readonly number[]\n localConnectionId?: string\n quoteId?: string\n maxRepairPasses?: number\n}\n\n/** Structured authoring inputs; reference roles are interpreted by the platform. */\nexport interface GenerateScene3DParams extends Record<string, unknown>, Scene3DEngineParams, GenerationSessionParams {\n /** Existing GLBs selected by immutable revision/artifact IDs. Requires an import-capable advanced engine. */\n inputAssets?: readonly import(\"@nodaro/shared/scene3d\").Scene3DInputAsset[]\n prompt: string\n durationSeconds?: number\n fps?: number\n aspectRatio?: string\n references?: readonly Scene3DReference[]\n llmModel?: string\n reasoningEffort?: string\n workflowId?: string\n nodeId?: string\n}\n\n/** Editing creates a new revision and never mutates the supplied scene. */\nexport interface EditScene3DParams extends Record<string, unknown>, Scene3DEngineParams, GenerationSessionParams {\n scenePlan: Scene3DPlan\n expectedRevisionId: string\n /** Replace the complete reference set, including clearing it with an empty list. Default: merge by id. */\n replaceReferences?: boolean\n /** Supply an instruction or deterministic operations, never both. */\n prompt?: string\n operations?: readonly (Scene3DEditOperation | Scene3DV2EditOperation)[]\n references?: readonly Scene3DReference[]\n lockedObjectIds?: readonly string[]\n selectedObjectIds?: readonly string[]\n llmModel?: string\n reasoningEffort?: string\n workflowId?: string\n nodeId?: string\n}\n\n/**\n * 3D Render Pro — ONE durable operation producing a composition and its MP4.\n *\n * `source` is a strict discriminated union, not a bag of optionals:\n * - `{kind:'prompt', prompt, references?}` authors a new scene;\n * - `{kind:'scene', revisionId, sourceJobId}` with NO `editPrompt` is the\n * render-only export — it spends no authoring or build credits, and OMIT\n * the field rather than sending `\"\"`, which would buy an authoring pass;\n * - `{kind:'local-export', exportId, connectionId}` uses a paired desktop.\n *\n * There is no model or effort field: the planner is fixed and server-owned.\n *\n * `durationSeconds` / `fps` / `aspectRatio` on a `scene` source are an EXPLICIT\n * re-time request. Omit them to keep the source's own timing; a conflicting\n * override is rejected rather than silently applied.\n */\nexport interface Pro3DRenderParams extends Record<string, unknown> {\n source: Pro3DRenderSource\n /** Optional. An unknown or unavailable engine is rejected, never downgraded. */\n engine?: Pro3DRenderEngine\n /** Names a paired desktop for a local run. */\n localConnectionId?: string\n durationSeconds?: number\n fps?: number\n aspectRatio?: string\n quality?: Pro3DRenderQuality\n style?: Pro3DRenderStyle\n /** Correction budget, 0-2. Each pass is paid work. */\n maxRepairPasses?: number\n /**\n * Which scene-schema versions THIS client can render. A prompt or\n * local-export source mints v2, so omitting 2 is refused for free; a scene\n * source inherits its revision's version and is left to the server.\n */\n acceptedSceneSchemaVersions?: readonly number[]\n workflowId?: string\n nodeId?: string\n /** Keep every artifact of this run out of publicly-readable storage. */\n forcePrivate?: boolean\n}\n\n/** A run additionally carries the quote it was priced under. */\nexport interface Pro3DRenderRunParams extends Pro3DRenderParams {\n quoteId: string\n}\n\n/** The quote's answer. `maxCredits` is a ceiling; quoting spends nothing. */\nexport type Pro3DRenderQuote = Readonly<Pro3DRenderWireQuote> & Readonly<Record<string, unknown>>\n\n/** Per-call transport controls for the paid run. */\nexport interface Pro3DRenderRunOptions {\n /**\n * The `Idempotency-Key` the run is submitted under. Reuse the same value when\n * retrying a call that timed out, so the run is not started twice; the SDK\n * generates a fresh one per call when this is omitted, because two deliberate\n * calls are two runs.\n */\n idempotencyKey?: string\n}\n\n/**\n * Render the exact scene revision through the existing render-video node.\n *\n * The price follows the plan's OWN `width`/`height`, not any node setting: a\n * frame up to 1920 px on its longest side settles under `render-video`, a\n * larger one under `render-video:3d-large` (1.5x) or, above 5.12 megapixels,\n * `render-video:3d-xlarge` (2.5x). Read the current numbers from the\n * model-cost API for those three identifiers.\n */\nexport interface RenderScene3DParams extends Record<string, unknown>, GenerationSessionParams {\n planType: \"3d-scene\"\n plan: Scene3DPlan\n workflowId?: string\n nodeId?: string\n}\n\n/**\n * Preserve the shared wire contract while allowing additive job metadata.\n *\n * A scene authored by an ADVANCED engine additionally reports what the run knows about its own\n * answer, every field optional and all of them absent on the deterministic Basic lane:\n * `validation.warnings[]` entries coded `SCENE_AUTHORING_ASSUMPTION` (the planner's\n * assumptions), `metadata.summary` (its description of what it authored), `repairPasses`\n * (repairs actually run — `0` when the scene was accepted first time), `admissionRetries`\n * (pre-build planner retries, which spend no repair pass), `mechanicalPasses` (repairs the engine\n * applied from the compiler's own remedy with no planner call, counted APART from `repairPasses`\n * on their own quoted allowance, each with a `REMEDY_AUTO_APPLIED` warning) and\n * `restoredAssertions` (mandatory assertions put back after a planner answer re-shaped one the\n * feedback had not named, each a `ASSERTION_RESTORED` warning).\n *\n * A scene that passed every mandatory assertion but did not get the visual reviewer's approval\n * is delivered anyway, and `metadata.review` carries a verdict saying why. `verdict: \"refused\"`\n * is the ADVISORY delivery — the reviewer objected once the repair budget was spent — with one\n * `SCENE_REVIEW_REFUSED` warning per objection. `verdict: \"unavailable\"` is the UNREVIEWED\n * delivery: the review produced no usable verdict after `attempts` asks — `reason: \"provider\"`\n * when it never reached its provider, `\"unusable\"` when the provider answered with nothing usable\n * (`Scene3DReviewUnavailableReason` in `@nodaro/shared`) — so nobody judged the scene, and\n * `validation.warnings[]` LEADS with `SCENE_REVIEW_UNAVAILABLE` (any objections under it came from\n * review batches that answered usably first, and are not the whole verdict).\n *\n * `validation.status` stays `\"passed\"` on both, so `metadata.review` being present is the only\n * reliable test — use `scene3DReviewVerdictOf` from `@nodaro/shared` rather than reading it by\n * hand, and `scene3DReviewNote` rather than writing the sentence yourself: a message that says\n * the reviewer refused a scene nobody reviewed invents an opinion.\n */\nexport type Scene3DJobOutput = Readonly<Scene3DWireJobOutput> & Readonly<Record<string, unknown>>\n\n/**\n * The settled 3D Render Pro result, plus any additive job metadata.\n *\n * On a run that AUTHORED, the result reports the run's own account of its answer:\n * `validation.warnings[]` entries coded `SCENE_AUTHORING_ASSUMPTION`, `metadata.summary`,\n * `repairPasses` (`0` when accepted first time), `admissionRetries` (pre-build planner retries,\n * which spend no repair pass), `mechanicalPasses` (repairs the engine authored itself from the\n * compiler's own remedy, counted APART from `repairPasses` because they buy their own quoted\n * allowance rather than spending one of your repairs) and `restoredAssertions`. A render-only\n * export authored nothing, so it carries no summary and omits the counts rather than claiming `0`.\n *\n * The one case where `mechanicalPasses` IS a subset of `repairPasses` is a run quoted before that\n * allowance existed — its quote carries no `mechanical` line. The discriminant is the quote, not\n * the result, so read the quote you were given rather than deriving it from the two counts.\n *\n * A completed result may also be published without the visual reviewer's approval, and then\n * `metadata.review` holds a verdict saying which way. `{ verdict: \"refused\", objections[],\n * observed? }` is the ADVISORY delivery: every mandatory assertion passed, the reviewer still\n * objected, and the scene was published once the repair budget was spent, with one\n * `SCENE_REVIEW_REFUSED` warning per objection. `{ verdict: \"unavailable\", reason, attempts,\n * objections[], observed? }` is the UNREVIEWED delivery: the review produced no usable verdict in\n * `attempts` asks — `reason: \"provider\"` when it never reached its provider, `\"unusable\"` when the\n * provider answered with nothing usable — so the assertion-passing scene was delivered with no\n * verdict on it and `validation.warnings[]` LEADS with `SCENE_REVIEW_UNAVAILABLE`. Objections on\n * that arm are whatever review batches answered usably first — real, but not the whole verdict.\n *\n * `validation.status` is `\"passed\"` on both, so test for `metadata.review` — via\n * `scene3DReviewVerdictOf` from `@nodaro/shared` — rather than for the status or the warnings,\n * and render it with `scene3DReviewNote` rather than assuming a refusal.\n */\nexport type Pro3DRenderJobOutput = Readonly<Pro3DRenderWireOutput> & Readonly<Record<string, unknown>>\n","import { SCENE3D_V2_LIMITS, type Scene3DAssetRef } from \"@nodaro/shared/scene3d\"\nimport type { NodaroClientCore } from \"../core.js\"\nimport type { RunNodeResult, RunAndWaitOptions, NodeJobOutput, NodesResource } from \"./nodes.js\"\nimport type { EditScene3DParams, GenerateScene3DParams, Pro3DRenderJobOutput, Pro3DRenderParams, Pro3DRenderQuote, Pro3DRenderRunOptions, Pro3DRenderRunParams, RenderScene3DParams, Scene3DCapabilities, Scene3DJobOutput } from \"./scene3d-types.js\"\nimport type { RetainedScene3DEditParams, RetainedScene3DEditResult } from \"./scene3d-types.js\"\nimport { SCENE3D_DELIVERY_ASSET_USAGE } from \"./scene3d-types.js\"\nimport type { Scene3DDelivery, Scene3DDeliveryAsset } from \"./scene3d-types.js\"\n\n/**\n * A fresh per-call retry token.\n *\n * Random rather than derived from the request: two deliberate calls with the\n * same parameters are two runs, and collapsing them would silently swallow the\n * second. A caller who wants retry safety passes its own key.\n */\nfunction newIdempotencyKey(): string {\n const random = globalThis.crypto?.randomUUID?.()\n return `sdk-pro3d-${random ?? `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 12)}`}`\n}\n\n/** Scene authoring and render-only export through the same platform nodes. */\nexport class Scene3DResource {\n /** Every operation runs a platform node, so the client must carry `nodes` too. */\n constructor(private client: NodaroClientCore & { readonly nodes: NodesResource }) {}\n\n capabilities(): Promise<Scene3DCapabilities> {\n return this.client.request(\"GET\", \"/v1/3d-scene/capabilities\")\n }\n\n /** Current access to both the delivery and its source is required on every read. */\n getDelivery(jobId: string): Promise<Scene3DDelivery> {\n return this.client.request(\"GET\", `/v1/3d-scene/deliveries/${encodeURIComponent(jobId)}`)\n }\n\n /**\n * The bytes of one descriptor the delivery listed.\n *\n * Checked against {@link SCENE3D_DELIVERY_ASSET_USAGE} rather than a hardcoded pair, which\n * is why a `shot-still` now works: the route has served stills since they existed, and this\n * guard refused them. `source-json` — the recipe a refused run was kept for — is on the same\n * map; the server still decides whether THIS caller may read it.\n */\n deliveryAssetBytes(jobId: string, asset: Scene3DDeliveryAsset, options?: { signal?: AbortSignal }): Promise<ArrayBuffer> {\n if (SCENE3D_DELIVERY_ASSET_USAGE[asset.kind] !== asset.usage) {\n throw new Error(\"This asset is not available through the delivery endpoint\")\n }\n if (!Number.isSafeInteger(asset.byteLength) || asset.byteLength < 1 || asset.byteLength > SCENE3D_V2_LIMITS.maxRendererAssetBytes) {\n throw new Error(\"Invalid scene delivery asset byte length\")\n }\n return this.client.requestBytes(\"GET\", `/v1/3d-scene/deliveries/${encodeURIComponent(jobId)}/assets/${encodeURIComponent(asset.assetId)}`, {\n signal: options?.signal, maxBytes: asset.byteLength,\n })\n }\n\n /**\n * The recipe a 3D Render Pro run was refused for, parsed — or `null` when there is none.\n *\n * The one thing such a run leaves behind. Its recipe never compiled, so there is no scene\n * revision, no poster and no `.blend`: `output_data` carries a `deliveryId`, the compiler's\n * reasons, and `validation.sourceRetained` saying whether the recipe itself was kept. This\n * fetches it in one call — delivery, then the `source-json` descriptor's bytes.\n *\n * `null` means the delivery has no retained recipe to hand back: no pass ever cleared\n * admission, or this caller holds less than `edit` on the job's workflow and the descriptor\n * is therefore not listed for them.\n *\n * Read it to see what was attempted and to inform the next prompt. There is no input that\n * takes a recipe back: a refused run published no revision, so there is no `{kind:\"scene\"}`\n * source to re-run it from.\n */\n async retainedRecipe(jobId: string, options?: { signal?: AbortSignal }): Promise<unknown | null> {\n const delivery = await this.getDelivery(jobId)\n const asset = delivery.assets.find((item) => item.kind === \"source-json\")\n if (!asset) return null\n const bytes = await this.deliveryAssetBytes(jobId, asset, options)\n return JSON.parse(new TextDecoder(\"utf-8\", { fatal: true }).decode(bytes)) as unknown\n }\n\n /** Persist deterministic overlays without an LLM or a generation charge. */\n applyEdits(revisionId: string, params: RetainedScene3DEditParams): Promise<RetainedScene3DEditResult> {\n return this.client.request(\"POST\", `/v1/3d-scene/revisions/${encodeURIComponent(revisionId)}/edits`, { body: params })\n }\n\n /** Asset access is scoped to an exact retained revision, with fresh authentication. */\n assetBytes(revisionId: string, asset: Scene3DAssetRef, options?: { signal?: AbortSignal }): Promise<ArrayBuffer> {\n if (![\"glb\", \"camera-track-json\", \"poster\", \"validation-report\"].includes(asset.kind)) {\n throw new Error(\"This asset is not available through the playback endpoint\")\n }\n if (!Number.isSafeInteger(asset.byteLength) || asset.byteLength < 1 || asset.byteLength > SCENE3D_V2_LIMITS.maxRendererAssetBytes) {\n throw new Error(\"Invalid scene asset byte length\")\n }\n return this.client.requestBytes(\"GET\", `/v1/3d-scene/revisions/${encodeURIComponent(revisionId)}/assets/${encodeURIComponent(asset.assetId)}`, {\n signal: options?.signal, maxBytes: asset.byteLength,\n })\n }\n\n /** The editable native file has its own authorization lane. */\n sourceBytes(revisionId: string, options?: { signal?: AbortSignal }): Promise<ArrayBuffer> {\n return this.client.requestBytes(\"GET\", `/v1/3d-scene/revisions/${encodeURIComponent(revisionId)}/source`, {\n signal: options?.signal, maxBytes: SCENE3D_V2_LIMITS.maxBlendSourceBytes,\n })\n }\n\n generate(params: GenerateScene3DParams): Promise<RunNodeResult> {\n return this.client.nodes.run(\"generate-3d-scene\", params)\n }\n\n generateAndWait(params: GenerateScene3DParams, options?: RunAndWaitOptions): Promise<Scene3DJobOutput> {\n return this.client.nodes.runAndWait(\"generate-3d-scene\", params, options)\n }\n\n edit(params: EditScene3DParams): Promise<RunNodeResult> {\n return this.client.nodes.run(\"edit-3d-scene\", params)\n }\n\n editAndWait(params: EditScene3DParams, options?: RunAndWaitOptions): Promise<Scene3DJobOutput> {\n return this.client.nodes.runAndWait(\"edit-3d-scene\", params, options)\n }\n\n /**\n * Price a 3D Render Pro request WITHOUT starting it.\n *\n * Takes the same body a run takes, minus the `quoteId`, and answers a\n * ceiling (`maxCredits`), a `breakdown` to show, and the\n * `normalizedInputHash` admission re-checks. It reserves nothing and spends\n * nothing — a quote is a price, not a purchase.\n */\n quotePro(params: Pro3DRenderParams): Promise<Pro3DRenderQuote> {\n return this.client.request(\"POST\", \"/v1/pro-3d-render/quote\", { body: params })\n }\n\n /**\n * Submit a quoted 3D Render Pro run.\n *\n * Requires the `quoteId` from {@link quotePro}: no run starts at a price\n * nobody showed. Sends an `Idempotency-Key` — a fresh one per call unless you\n * supply your own, which you should when retrying a call that timed out.\n *\n * Availability is a property of the deployment: `capabilities().pro` says\n * whether this install can serve it, and which controls you may offer.\n */\n runPro(params: Pro3DRenderRunParams, options?: Pro3DRenderRunOptions): Promise<RunNodeResult> {\n return this.client.nodes.run(\"pro-3d-render\", params, {\n idempotencyKey: options?.idempotencyKey ?? newIdempotencyKey(),\n })\n }\n\n /**\n * Quote if needed, run, and wait — the whole operation in one call.\n *\n * Two HTTP requests at most, still ONE paid job: when `quoteId` is absent\n * this quotes the identical body first, so the run is admitted against a\n * hash of exactly what was priced. Pass a `quoteId` to run against a quote\n * you already showed the user.\n *\n * Resolves with the settled result — `videoUrl` (the MP4) and `scenePlan`\n * (the exact composition it was rendered from), plus the revision, poster,\n * validation and renderer metadata. A run that AUTHORED also reports its own\n * account of the answer — `metadata.summary`, `repairPasses`,\n * `admissionRetries`, `mechanicalPasses` (repairs the engine applied from\n * the compiler's own remedy with no planner call, counted APART from\n * `repairPasses` on their own quoted allowance), `restoredAssertions`, and\n * any `SCENE_AUTHORING_ASSUMPTION` warnings. A\n * completed result whose `metadata.review` is present passed every mandatory\n * assertion but did NOT get the visual reviewer's approval: `verdict:\n * \"refused\"` means it objected, each objection also a `SCENE_REVIEW_REFUSED`\n * warning; `verdict: \"unavailable\"` means the review produced no usable\n * verdict in `attempts` asks (`reason: \"provider\"` — never reached its\n * provider; `\"unusable\"` — it answered, unusably), so nobody judged the scene and\n * `SCENE_REVIEW_UNAVAILABLE` leads the warnings. Re-render that same\n * `scenePlan` later with {@link render}, or with a `{kind:'scene'}` source;\n * that costs no authoring.\n */\n async renderProAndWait(\n params: Pro3DRenderParams | Pro3DRenderRunParams,\n options?: RunAndWaitOptions & Pro3DRenderRunOptions,\n ): Promise<Pro3DRenderJobOutput> {\n const quoteId =\n typeof (params as Pro3DRenderRunParams).quoteId === \"string\"\n ? (params as Pro3DRenderRunParams).quoteId\n : (await this.quotePro(params)).quoteId\n return this.client.nodes.runAndWait(\"pro-3d-render\", { ...params, quoteId }, {\n ...options,\n idempotencyKey: options?.idempotencyKey ?? newIdempotencyKey(),\n })\n }\n\n /**\n * Uses the supplied immutable revision; never starts authoring or a rebuild.\n *\n * Priced by the plan's frame size — see {@link RenderScene3DParams}.\n */\n render(params: RenderScene3DParams): Promise<RunNodeResult> {\n return this.client.nodes.run(\"render-video\", params)\n }\n\n renderAndWait(params: RenderScene3DParams, options?: RunAndWaitOptions): Promise<NodeJobOutput> {\n return this.client.nodes.runAndWait(\"render-video\", params, options)\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-NX67YIF3.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-OA6FWYZF.cjs"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-OJDBSKC2.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-OLPA44QJ.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-OMH7ATOQ.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-OPR4TULG.js"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/resources/picker-catalogs.ts
|
|
4
|
+
var PickerCatalogsResource = class {
|
|
5
|
+
constructor(client) {
|
|
6
|
+
this.client = client;
|
|
7
|
+
}
|
|
8
|
+
client;
|
|
9
|
+
/** List every parameter-picker node type + its option count. Cached publicly 5 min. */
|
|
10
|
+
list() {
|
|
11
|
+
return this.client.request("GET", "/v1/picker-catalogs");
|
|
12
|
+
}
|
|
13
|
+
/** Fill pickers from a free-text description (Cine "AI Fill"): returns the
|
|
14
|
+
* same pickerJson shape as describe-to-picker, keyed by picker node type. */
|
|
15
|
+
analyzeText(params) {
|
|
16
|
+
return this.client.request("POST", "/v1/text-to-picker", { body: params });
|
|
17
|
+
}
|
|
18
|
+
/** Get one picker's catalog of valid values. */
|
|
19
|
+
get(nodeType, opts = {}) {
|
|
20
|
+
const qs = new URLSearchParams();
|
|
21
|
+
if (opts.detail) qs.set("detail", opts.detail);
|
|
22
|
+
if (opts.category) qs.set("category", opts.category);
|
|
23
|
+
if (opts.field) qs.set("field", opts.field);
|
|
24
|
+
const query = qs.toString();
|
|
25
|
+
return this.client.request(
|
|
26
|
+
"GET",
|
|
27
|
+
`/v1/picker-catalogs/${encodeURIComponent(nodeType)}${query ? `?${query}` : ""}`
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
exports.PickerCatalogsResource = PickerCatalogsResource;
|
|
33
|
+
//# sourceMappingURL=chunk-OSX2GVZ2.cjs.map
|
|
34
|
+
//# sourceMappingURL=chunk-OSX2GVZ2.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resources/picker-catalogs.ts"],"names":[],"mappings":";;;AAiIO,IAAM,yBAAN,MAA6B;AAAA,EAClC,YAAoB,MAAA,EAA0B;AAA1B,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAAA,EAA2B;AAAA,EAA3B,MAAA;AAAA;AAAA,EAGpB,IAAA,GAAkD;AAChD,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAQ,KAAA,EAAO,qBAAqB,CAAA;AAAA,EACzD;AAAA;AAAA;AAAA,EAIA,YAAY,MAAA,EAAyD;AACnE,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAQ,MAAA,EAAQ,sBAAsB,EAAE,IAAA,EAAM,QAAQ,CAAA;AAAA,EAC3E;AAAA;AAAA,EAGA,GAAA,CAAI,QAAA,EAAkB,IAAA,GAAgC,EAAC,EAAqC;AAC1F,IAAA,MAAM,EAAA,GAAK,IAAI,eAAA,EAAgB;AAC/B,IAAA,IAAI,KAAK,MAAA,EAAQ,EAAA,CAAG,GAAA,CAAI,QAAA,EAAU,KAAK,MAAM,CAAA;AAC7C,IAAA,IAAI,KAAK,QAAA,EAAU,EAAA,CAAG,GAAA,CAAI,UAAA,EAAY,KAAK,QAAQ,CAAA;AACnD,IAAA,IAAI,KAAK,KAAA,EAAO,EAAA,CAAG,GAAA,CAAI,OAAA,EAAS,KAAK,KAAK,CAAA;AAC1C,IAAA,MAAM,KAAA,GAAQ,GAAG,QAAA,EAAS;AAC1B,IAAA,OAAO,KAAK,MAAA,CAAO,OAAA;AAAA,MACjB,KAAA;AAAA,MACA,CAAA,oBAAA,EAAuB,mBAAmB,QAAQ,CAAC,GAAG,KAAA,GAAQ,CAAA,CAAA,EAAI,KAAK,CAAA,CAAA,GAAK,EAAE,CAAA;AAAA,KAChF;AAAA,EACF;AACF","file":"chunk-OSX2GVZ2.cjs","sourcesContent":["import type { CharacterMotionMetadata } from \"@nodaro/shared/types\"\nimport type { NodaroClientCore } from \"../core.js\"\n\n/**\n * Picker-catalog types. Mirrors `@nodaro/shared`'s `ProjectedPickerCatalog` /\n * `PickerCatalogSummary` so the SDK stays dependency-free (same convention as\n * `NodeDescriptor` mirroring node-registry).\n */\nexport interface PickerOption {\n id: string\n label: string\n description?: string\n category?: string\n /** The prompt fragment this id injects downstream. Present only when detail=\"full\". */\n promptHint?: string\n /**\n * Short professional term injected by compact hint mode; `label` is for\n * display. Present at BOTH detail levels — a thin client renders `label`\n * and injects `term`. Empty for a no-op (\"auto\"/\"none\") entry that injects\n * nothing.\n */\n term?: string\n icon?: string\n /** Authored Character Motion prerequisites and sequence state. Missing means unknown. */\n motion?: CharacterMotionMetadata\n /**\n * Per-option parameters — node-data fields that apply only while THIS option\n * is picked (the Transition catalog's `wipe` → `wipeDirection`). Same shape\n * as a catalog's `dimensions`, at both detail levels; `auto` leads each list\n * and means \"send nothing\". Absent on every other option.\n */\n params?: PickerDimension[]\n /**\n * Absolute URL of the option's picture — a photo, 3D emoji, flag or (Nodaro\n * Cloud only) rendered look preview — on the installation's own host, or the\n * Nodaro CDN for look previews. Absent when the option has no picture. Use it\n * as given: file names carry a content hash, so it can be cached for good.\n */\n imageUrl?: string\n}\n\nexport interface PickerDimension {\n field: string\n label: string\n options: PickerOption[]\n}\n\n/** A topic a multi-dim catalog's settings are grouped under in the editor (person, styling). */\nexport interface PickerCatalogSection {\n /** English topic name, e.g. \"Identity\", \"Beauty & Hair\". */\n label: string\n /** Node-data fields of the settings in this topic, in display order. */\n fields: string[]\n /** Absolute URL of the topic's round picture. Absent when it has none. */\n imageUrl?: string\n}\n\nexport interface PickerCatalog {\n nodeType: string\n label: string\n catalogId: string\n kind: \"single\" | \"multi\"\n /** single only — the node-data field the chosen id writes to. */\n valueField?: string\n defaultValue?: string\n categoryOrder?: string[]\n categoryLabels?: Record<string, string>\n /** single-dim catalogs. */\n options?: PickerOption[]\n /** multi-dim catalogs. */\n fields?: string[]\n /** Per-field option lists. Multi-dim catalogs always carry these; a\n * single-dim catalog carries them when it has secondary parameter\n * fields beside its main picker (transition position/duration/intensity). */\n dimensions?: PickerDimension[]\n detail?: \"compact\" | \"full\"\n /** person and styling: the topics their settings are grouped under, in order, each with its picture. */\n sections?: PickerCatalogSection[]\n}\n\nexport interface PickerCatalogSummary {\n nodeType: string\n label: string\n catalogId: string\n kind: \"single\" | \"multi\"\n valueField?: string\n fields?: string[]\n optionCount: number\n /** How many of those options carry an `imageUrl` (0 = no pictures). Absent from servers that predate pictures. */\n imageCount?: number\n}\n\nexport interface GetPickerCatalogOptions {\n /** \"compact\" (default) = id, label, category, term, icon, imageUrl; \"full\" additionally includes description + promptHint. */\n detail?: \"compact\" | \"full\"\n /** single-dim: filter to one category. */\n category?: string\n /** multi-dim: only this dimension field. */\n field?: string\n}\n\n/** Input for `analyzeText` (POST /v1/text-to-picker). */\nexport interface TextToPickerParams {\n /** Free-text scene/shot description to analyze. */\n text: string\n /** Picker node types to fill. Omit for ALL analyzable pickers (the server\n * fans the analysis out per family and merges). */\n targetPickers?: string[]\n /** Extra guidance appended to the analyzer system prompt. */\n instructions?: string\n /** Originating client app slug (e.g. \"cine\") — attribution only. */\n origin?: string\n llmModel?: string\n reasoningEffort?: string\n}\n\nexport interface TextToPickerResult {\n jobId: string\n /** pickerType → dimension → chosen catalog id(s) — same shape as\n * describe-to-picker; hydrate pickers from it verbatim. */\n pickerJson: Record<string, Record<string, string | string[]>>\n /** Catalog-coverage feedback (attributes the text described that no\n * catalog id represents well). Surface as \"we couldn't infer X\". */\n gaps?: {\n missingItems: Array<{ picker: string; dimension: string; observed: string }>\n missingCategories: Array<{ picker: string; suggestedDimension: string; observed: string }>\n }\n}\n\nexport class PickerCatalogsResource {\n constructor(private client: NodaroClientCore) {}\n\n /** List every parameter-picker node type + its option count. Cached publicly 5 min. */\n list(): Promise<{ data: PickerCatalogSummary[] }> {\n return this.client.request(\"GET\", \"/v1/picker-catalogs\")\n }\n\n /** Fill pickers from a free-text description (Cine \"AI Fill\"): returns the\n * same pickerJson shape as describe-to-picker, keyed by picker node type. */\n analyzeText(params: TextToPickerParams): Promise<TextToPickerResult> {\n return this.client.request(\"POST\", \"/v1/text-to-picker\", { body: params })\n }\n\n /** Get one picker's catalog of valid values. */\n get(nodeType: string, opts: GetPickerCatalogOptions = {}): Promise<{ data: PickerCatalog }> {\n const qs = new URLSearchParams()\n if (opts.detail) qs.set(\"detail\", opts.detail)\n if (opts.category) qs.set(\"category\", opts.category)\n if (opts.field) qs.set(\"field\", opts.field)\n const query = qs.toString()\n return this.client.request(\n \"GET\",\n `/v1/picker-catalogs/${encodeURIComponent(nodeType)}${query ? `?${query}` : \"\"}`,\n )\n }\n}\n"]}
|