sliccy 3.40.1 → 3.40.3
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 +1 -1
- package/dist/node-server/_shared/index.d.ts +2 -0
- package/dist/node-server/_shared/index.d.ts.map +1 -1
- package/dist/node-server/_shared/index.js +2 -0
- package/dist/node-server/_shared/index.js.map +1 -1
- package/dist/node-server/_shared/sign-and-forward.d.ts +75 -0
- package/dist/node-server/_shared/sign-and-forward.d.ts.map +1 -0
- package/dist/node-server/_shared/sign-and-forward.js +278 -0
- package/dist/node-server/_shared/sign-and-forward.js.map +1 -0
- package/dist/node-server/_shared/sigv4.d.ts +26 -0
- package/dist/node-server/_shared/sigv4.d.ts.map +1 -0
- package/dist/node-server/{secrets/signing-s3.js → _shared/sigv4.js} +8 -16
- package/dist/node-server/_shared/sigv4.js.map +1 -0
- package/dist/node-server/secrets/sign-and-forward.d.ts +6 -26
- package/dist/node-server/secrets/sign-and-forward.js +40 -247
- package/dist/ui/assets/__vite-browser-external-CM3Eme-n.js +1 -0
- package/dist/ui/assets/adobe-9MnG5h7i.js +2 -0
- package/dist/ui/assets/{adobe-BuddmT1_.js → adobe-BCOGa4JO.js} +1 -1
- package/dist/ui/assets/agent-bridge-DrtqeACp.js +1 -0
- package/dist/ui/assets/agent-message-to-chat-BadHh_U6.js +7 -0
- package/dist/ui/assets/{anthropic-BgHKqajT.js → anthropic-DOdK4eXe.js} +4 -4
- package/dist/ui/assets/{anthropic-CtzKOYSY.js → anthropic-DVQtRZtV.js} +2 -2
- package/dist/ui/assets/{apps-DUrh4PEK.js → apps-D6zYxCJj.js} +2 -2
- package/dist/ui/assets/azure-openai-Cr3DISar.js +1 -0
- package/dist/ui/assets/azure-openai-DX23xqSp.js +1 -0
- package/dist/ui/assets/azure-openai-responses-DXY_e5sT.js +1 -0
- package/dist/ui/assets/azure-openai-responses-KQPM7_wG.js +1 -0
- package/dist/ui/assets/backend-local-CMfz45hs.js +9 -0
- package/dist/ui/assets/bedrock-camp-CWvhREqw.js +4 -0
- package/dist/ui/assets/bedrock-camp-Cg_vY0Xg.js +5 -0
- package/dist/ui/assets/biome_wasm-DEjrJMqV.js +1 -0
- package/dist/ui/assets/{bsh-watchdog-x1NhC21S.js → bsh-watchdog-DVEMoD1Q.js} +1 -1
- package/dist/ui/assets/{cdp-CIf67Kji.js → cdp-lOc6_BAx.js} +4 -4
- package/dist/ui/assets/cdp-ws-page-bridge-D_PY6ku1.js +1 -0
- package/dist/ui/assets/chunk-CMxvf4Kt.js +1 -0
- package/dist/ui/assets/chunk-aKtaBQYM.js +1 -0
- package/dist/ui/assets/clipboard-C2cR8flR.js +1 -0
- package/dist/ui/assets/clipboard-DgFtRQbq.js +1 -0
- package/dist/ui/assets/common-ewBM5he1.js +1 -0
- package/dist/ui/assets/{connect-surface-D4wcacvR.js → connect-surface-DoTyR_ZG.js} +1 -1
- package/dist/ui/assets/cost-command-CThcmGZA.js +1 -0
- package/dist/ui/assets/diagnostics-DRDFDs4d.js +1 -0
- package/dist/ui/assets/diagnostics-mI-AnKx_.js +1 -0
- package/dist/ui/assets/{dist-CUdWMJvw.js → dist-BrPNw_vU.js} +4 -4
- package/dist/ui/assets/{dist-CU640e2s.js → dist-C9EWpOKG.js} +1 -1
- package/dist/ui/assets/{dist-CrZ60vIK.js → dist-Cu5Yqq5d2.js} +1 -1
- package/dist/ui/assets/{dist-CXh0a315.js → dist-DbTbRU9p2.js} +4 -4
- package/dist/ui/assets/{es-BCqpNDbf.js → es-Do-6wb2C.js} +5 -5
- package/dist/ui/assets/{esp32-z35G3TbR.js → esp32-BTVUAltJ.js} +1 -1
- package/dist/ui/assets/esp32-CatgC_Vd.js +1 -0
- package/dist/ui/assets/{esp32c2-gLxOsZif.js → esp32c2-CpROmlB0.js} +1 -1
- package/dist/ui/assets/{esp32c2-pl5qy6El.js → esp32c2-Cvhq9547.js} +1 -1
- package/dist/ui/assets/{esp32c3-P3fd2u0V.js → esp32c3-D9lOBWYZ.js} +1 -1
- package/dist/ui/assets/esp32c3-heViyR1Q.js +1 -0
- package/dist/ui/assets/{esp32c5-B1WV7eXo.js → esp32c5-D2poFXyG.js} +1 -1
- package/dist/ui/assets/{esp32c5-VtJmrubf.js → esp32c5-KJSqwo2Q.js} +1 -1
- package/dist/ui/assets/{esp32c6-B-u1dpSJ.js → esp32c6-BMEnOhZ6.js} +1 -1
- package/dist/ui/assets/{esp32c6-roW5XaV9.js → esp32c6-Ct3LxBMw.js} +1 -1
- package/dist/ui/assets/{esp32c61-BEqxfS6j.js → esp32c61-BsudQf3e.js} +1 -1
- package/dist/ui/assets/{esp32c61-e_DudgN9.js → esp32c61-sRp43nbI.js} +1 -1
- package/dist/ui/assets/{esp32h2-BNSoMBaR.js → esp32h2-BKv-WORi.js} +1 -1
- package/dist/ui/assets/{esp32h2-DfHWoI2F.js → esp32h2-CPO25efF.js} +1 -1
- package/dist/ui/assets/{esp32p4-B28QO5xI.js → esp32p4-GHiT8voO.js} +1 -1
- package/dist/ui/assets/{esp32p4-oT03skoL.js → esp32p4-g1tFG0sh.js} +1 -1
- package/dist/ui/assets/{esp32s2-PvYKf6wY.js → esp32s2-BE2gO68i.js} +1 -1
- package/dist/ui/assets/{esp32s2-B4ccaXVM.js → esp32s2-DrH4e7iJ.js} +1 -1
- package/dist/ui/assets/{esp32s3-BEGROUfT.js → esp32s3-BHbeScNz.js} +1 -1
- package/dist/ui/assets/{esp32s3-BR5mq9LB.js → esp32s3-CjMu3q4c.js} +1 -1
- package/dist/ui/assets/esp8266-BPLrOmN4.js +1 -0
- package/dist/ui/assets/esp8266-DNz2CP4r.js +1 -0
- package/dist/ui/assets/esptool-operations-CiX8mbpu.js +12 -0
- package/dist/ui/assets/{esptool-operations-BmdDP4Te.js → esptool-operations-SV6FPHJC.js} +2 -2
- package/dist/ui/assets/{follower-sprinkle-bridge-DhhhEoEw.js → follower-sprinkle-bridge-DTufY-0i.js} +1 -1
- package/dist/ui/assets/fs-DqDo5o60.js +1 -0
- package/dist/ui/assets/github-CNn2NQAt.js +1 -0
- package/dist/ui/assets/github-DBywtHRG.js +2 -0
- package/dist/ui/assets/github-copilot-8wjbN6nq.js +1 -0
- package/dist/ui/assets/github-copilot-Dy9dkbr7.js +2 -0
- package/dist/ui/assets/google-BbVPHS50.js +1 -0
- package/dist/ui/assets/google-Dl6In6_I.js +1 -0
- package/dist/ui/assets/google-shared-BgawM9oG.js +11 -0
- package/dist/ui/assets/{google-shared-BqepQLFX.js → google-shared-BmpiIO3m.js} +3 -3
- package/dist/ui/assets/google-vertex-DGjVDVSA.js +1 -0
- package/dist/ui/assets/google-vertex-uZ8N77ah.js +1 -0
- package/dist/ui/assets/hid-device-registry-D2LsJCRr.js +1 -0
- package/dist/ui/assets/hosted-config-apply-uAym2aS5.js +1 -0
- package/dist/ui/assets/intercepted-oauth-tLpKagkf.js +1 -0
- package/dist/ui/assets/json-parse-BIGBjpLL.js +3 -0
- package/dist/ui/assets/json-parse-BUunmmNl.js +3 -0
- package/dist/ui/assets/kernel-worker-Cb8hTQlK.js +9547 -0
- package/dist/ui/assets/lick-ws-bridge-BiG3e_g1.js +1 -0
- package/dist/ui/assets/{local-llm-BSBAbQIB.js → local-llm-BazZFDj_.js} +2 -2
- package/dist/ui/assets/logger-DDBAeTLF.js +1 -0
- package/dist/ui/assets/logger-LESFN7Hj.js +1 -0
- package/dist/ui/assets/magick-wasm-DKLq0X9v.js +1 -0
- package/dist/ui/assets/main-cherry-_7zmLxgg.js +1 -0
- package/dist/ui/assets/main-yZCsVpFH.js +1813 -0
- package/dist/ui/assets/migration-run-CXbSDDok.js +1 -0
- package/dist/ui/assets/mime-types-B9LIwKG5.js +1 -0
- package/dist/ui/assets/mime-types-BG9Gw1bq.js +1 -0
- package/dist/ui/assets/{mistral-BgklU_Dp.js → mistral-CMJILYv2.js} +4 -4
- package/dist/ui/assets/{mistral-DzTfCccO.js → mistral-DGtcP1BQ.js} +4 -4
- package/dist/ui/assets/mount-C3YOm4Wn.js +1 -0
- package/dist/ui/assets/mount-id-nJcx05eu.js +1 -0
- package/dist/ui/assets/mount-picker-popup-DncaR5N8.js +1 -0
- package/dist/ui/assets/mount-table-store-CQJEV6Ij.js +1 -0
- package/dist/ui/assets/nodejs-BQ9Oov1A.js +1 -0
- package/dist/ui/assets/{nuke-command-B02fs5G-.js → nuke-command-Dmc-Sve3.js} +1 -1
- package/dist/ui/assets/oauth-Czw-MuuR.js +1 -0
- package/dist/ui/assets/oauth-bootstrap-C_DI66X8.js +2 -0
- package/dist/ui/assets/oauth-service-CFSmb2Xq.js +1 -0
- package/dist/ui/assets/oauth-service-CSJo71ct.js +1 -0
- package/dist/ui/assets/offscreen-client-Bn2ErFJg.js +1 -0
- package/dist/ui/assets/onboarding-orchestrator-DbSXIbPW.js +1 -0
- package/dist/ui/assets/openai-codex-BehcTqf4.js +1 -0
- package/dist/ui/assets/openai-codex-Df_T8mMz.js +1 -0
- package/dist/ui/assets/openai-codex-responses-Dpn8XW3b.js +7 -0
- package/dist/ui/assets/openai-codex-responses-bUy20doI.js +7 -0
- package/dist/ui/assets/openai-completions-B_5Ph3h0.js +5 -0
- package/dist/ui/assets/openai-completions-CoYClIFl.js +5 -0
- package/dist/ui/assets/openai-i4HWKCeW.js +16 -0
- package/dist/ui/assets/openai-responses-BQOBB5px.js +1 -0
- package/dist/ui/assets/openai-responses-DqkDb9a5.js +1 -0
- package/dist/ui/assets/{openai-responses-shared-CsK-8CQH.js → openai-responses-shared-CZOJCHE4.js} +4 -4
- package/dist/ui/assets/{openai-responses-shared-DYSAljRs.js → openai-responses-shared-D4pZ3bEY.js} +4 -4
- package/dist/ui/assets/openrouter-QETwrep8.js +1 -0
- package/dist/ui/assets/panel-rpc-Bcvr75SR.js +1 -0
- package/dist/ui/assets/panel-rpc-handlers-Bb_hIEUP.js +2 -0
- package/dist/ui/assets/path-utils-DU6QhF_k.js +1 -0
- package/dist/ui/assets/picker-approval-tzbkMw-e.js +9 -0
- package/dist/ui/assets/preload-helper-zJ_50EbN.js +1 -0
- package/dist/ui/assets/provider-Ba-IW-kd.js +2 -0
- package/dist/ui/assets/provider-CZ54o1eC.js +1 -0
- package/dist/ui/assets/provider-settings-CY5NYsC9.js +99 -0
- package/dist/ui/assets/provider-store-access-DV4kHL4p.js +1 -0
- package/dist/ui/assets/provider-store-access-xEJhUgjR.js +1 -0
- package/dist/ui/assets/providers-B-C_YTn6.js +1 -0
- package/dist/ui/assets/{proxied-fetch-CW9YdsrT.js → proxied-fetch-Bhc4pqzp.js} +1 -1
- package/dist/ui/assets/pyodide-BvA4c-59.js +3 -0
- package/dist/ui/assets/remote-cache-_bhYZSLy.js +1 -0
- package/dist/ui/assets/{remote-terminal-view-ChqlFNm7.js → remote-terminal-view-C1K2ToGt.js} +3 -3
- package/dist/ui/assets/{remote-vfs-client-Cc4yBMI0.js → remote-vfs-client-BwJhhtIV.js} +1 -1
- package/dist/ui/assets/secret-env-DcfTe28K.js +1 -0
- package/dist/ui/assets/slicc-editor-BdfBeQCF.js +12 -0
- package/dist/ui/assets/{spawn-7Vgp-lrm.js → spawn-D6ZYDHli.js} +1 -1
- package/dist/ui/assets/{sql-wasm-BbdRW4or.js → sql-wasm-Cu5Uk_6k.js} +1 -1
- package/dist/ui/assets/{src-BV-fJ2mM.js → src-CcMujGBk.js} +2 -2
- package/dist/ui/assets/src-CpdsjHiA.js +1 -0
- package/dist/ui/assets/store-BHgxxLww.js +1 -0
- package/dist/ui/assets/{sudo-CYttizEB.js → sudo-Dflnt4_G.js} +1 -1
- package/dist/ui/assets/tool-ui-N76-EdVc.js +1 -0
- package/dist/ui/assets/tool-ui-YOPqzMmL.js +1 -0
- package/dist/ui/assets/transform-messages-B3Q-Bwv-.js +1 -0
- package/dist/ui/assets/transform-messages-C1X1O3BY.js +1 -0
- package/dist/ui/assets/{tray-leave-runtime-BYZH2LNU.js → tray-leave-runtime-BhHEXpRy.js} +1 -1
- package/dist/ui/assets/tray-runtime-config-BRnpyDNS.js +1 -0
- package/dist/ui/assets/types-idfTVsM8.js +1 -0
- package/dist/ui/assets/{typescript-DY6vxmmv.js → typescript-qBO0Z4wm.js} +15 -15
- package/dist/ui/assets/upgrade-detection-B04kAu_0.js +1 -0
- package/dist/ui/assets/web-BMWiUYJ-.js +1 -0
- package/dist/ui/assets/{writable-vfs-client-lsN1qOSV.js → writable-vfs-client-DMYsajEE.js} +1 -1
- package/dist/ui/assets/ws-subscribers-Dzuxa2F7.js +1 -0
- package/dist/ui/assets/xai-grok-B6Nl7COG.js +1 -0
- package/dist/ui/assets/xai-grok-i7HD-5Tv.js +1 -0
- package/dist/ui/index.html +15 -1
- package/dist/ui/packages/webapp/index.html +15 -1
- package/package.json +6 -5
- package/dist/node-server/secrets/signing-s3.d.ts +0 -34
- package/dist/ui/assets/adobe-DwuDVWKR.js +0 -2
- package/dist/ui/assets/agent-bridge-CQ_WHXpS.js +0 -1
- package/dist/ui/assets/agent-message-to-chat-Bk83dal6.js +0 -7
- package/dist/ui/assets/azure-openai-589UnBaE.js +0 -1
- package/dist/ui/assets/azure-openai-BVD3rRyh.js +0 -1
- package/dist/ui/assets/azure-openai-responses-DDoPpQfz.js +0 -1
- package/dist/ui/assets/azure-openai-responses-DvPlhYRg.js +0 -1
- package/dist/ui/assets/biome_wasm-2BIO-fFD.js +0 -1
- package/dist/ui/assets/cdp-ws-page-bridge-D48c5VHQ.js +0 -1
- package/dist/ui/assets/common-DJglxtI9.js +0 -1
- package/dist/ui/assets/cost-command-Dqjx5BJ4.js +0 -1
- package/dist/ui/assets/esp32-UFl3lGuU.js +0 -1
- package/dist/ui/assets/esp32c3-CtBZCzN8.js +0 -1
- package/dist/ui/assets/esp8266-Cg5dZq5p.js +0 -1
- package/dist/ui/assets/esp8266-MLobtggU.js +0 -1
- package/dist/ui/assets/esptool-operations-PyMOLbEo.js +0 -12
- package/dist/ui/assets/github-BmiOv8pZ.js +0 -1
- package/dist/ui/assets/github-H8WCUoaG.js +0 -2
- package/dist/ui/assets/github-copilot-CFrKRCIh.js +0 -2
- package/dist/ui/assets/github-copilot-LZq-2nbm.js +0 -1
- package/dist/ui/assets/google-Bwhr3ElU.js +0 -1
- package/dist/ui/assets/google-CDEKJo6s.js +0 -1
- package/dist/ui/assets/google-shared-DUInnTRv.js +0 -11
- package/dist/ui/assets/google-vertex-DOk_o4Vo.js +0 -1
- package/dist/ui/assets/google-vertex-Dy07djME.js +0 -1
- package/dist/ui/assets/hosted-config-apply-CIYq4OE-.js +0 -1
- package/dist/ui/assets/intercepted-oauth-DYoA2kA8.js +0 -1
- package/dist/ui/assets/kernel-worker-xMdP33ug.js +0 -9678
- package/dist/ui/assets/lick-ws-bridge-DLXsmZ6H.js +0 -1
- package/dist/ui/assets/magick-wasm-BpDug9Pm.js +0 -1
- package/dist/ui/assets/main-BxzufWem.js +0 -1825
- package/dist/ui/assets/main-cherry-CV5ItRlu.js +0 -1
- package/dist/ui/assets/migration-run-195D_oov.js +0 -1
- package/dist/ui/assets/nodejs-156RsPtl.js +0 -1
- package/dist/ui/assets/oauth-DSEOvfNU.js +0 -1
- package/dist/ui/assets/oauth-bootstrap-CCTPtyS_.js +0 -2
- package/dist/ui/assets/oauth-service-Ctr2_Obu.js +0 -1
- package/dist/ui/assets/oauth-service-LEczdutD.js +0 -1
- package/dist/ui/assets/offscreen-client-Dswx1Ljm.js +0 -1
- package/dist/ui/assets/onboarding-orchestrator-8SmCagx8.js +0 -1
- package/dist/ui/assets/openai-codex-CYM3h5BG.js +0 -1
- package/dist/ui/assets/openai-codex-D-QWKpWb.js +0 -1
- package/dist/ui/assets/openai-codex-responses-CbtdwhQL.js +0 -7
- package/dist/ui/assets/openai-codex-responses-CnQXtoLP.js +0 -7
- package/dist/ui/assets/openai-completions-CbUcQcuU.js +0 -5
- package/dist/ui/assets/openai-responses-DBGxMDFy.js +0 -1
- package/dist/ui/assets/openai-responses-DomGQu-u.js +0 -1
- package/dist/ui/assets/openrouter-i7KtgZt3.js +0 -1
- package/dist/ui/assets/panel-rpc-handlers-BeUo4K-9.js +0 -2
- package/dist/ui/assets/provider-CuOCGXmD.js +0 -1
- package/dist/ui/assets/provider-U8Br2pQO.js +0 -2
- package/dist/ui/assets/provider-store-access-CRMelzXC.js +0 -1
- package/dist/ui/assets/provider-store-access-D9JW2Z9f.js +0 -1
- package/dist/ui/assets/pyodide-BQVwxCA4.js +0 -3
- package/dist/ui/assets/secret-env-mFCaJWuD.js +0 -1
- package/dist/ui/assets/slicc-editor-Bn_0-CZl.js +0 -12
- package/dist/ui/assets/store-DUcHEhum.js +0 -1
- package/dist/ui/assets/upgrade-detection-BmNgOg4g.js +0 -1
- package/dist/ui/assets/web-DRaGEaSq.js +0 -1
- package/dist/ui/assets/ws-subscribers-CxhSakhG.js +0 -1
- package/dist/ui/assets/xai-grok-C0UPkvUi.js +0 -1
- package/dist/ui/assets/xai-grok-DEapxZue.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Bt as e,Rt as t,Vt as n,b as r}from"./main-BxzufWem.js";import{t as i}from"./sanitize-unicode-DmIE6hZJ.js";import{a,c as o,i as s,l as c,n as l,o as u,r as d,s as f,t as p}from"./google-shared-DUInnTRv.js";var m=`v1`,h=`gcp-vertex-credentials`,g={THINKING_LEVEL_UNSPECIFIED:c.THINKING_LEVEL_UNSPECIFIED,MINIMAL:c.MINIMAL,LOW:c.LOW,MEDIUM:c.MEDIUM,HIGH:c.HIGH},_=0,v=(n,r,i)=>{let a=new t;return(async()=>{let t={role:`assistant`,content:[],api:`google-vertex`,provider:n.provider,model:n.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:`stop`,timestamp:Date.now()};try{let o=T(i),c=o?x(n,o,i?.headers):b(n,D(i),O(i),i?.headers),l=k(n,r,i),f=await i?.onPayload?.(l,n);f!==void 0&&(l=f);let p=await c.models.generateContentStream(l);a.push({type:`start`,partial:t});let m=null,h=t.content,g=()=>h.length-1;for await(let r of p){t.responseId||=r.responseId;let i=r.candidates?.[0];if(i?.content?.parts)for(let e of i.content.parts){if(e.text!==void 0){let n=d(e);(!m||n&&m.type!==`thinking`||!n&&m.type!==`text`)&&(m&&(m.type===`text`?a.push({type:`text_end`,contentIndex:h.length-1,content:m.text,partial:t}):a.push({type:`thinking_end`,contentIndex:g(),content:m.thinking,partial:t})),n?(m={type:`thinking`,thinking:``,thinkingSignature:void 0},t.content.push(m),a.push({type:`thinking_start`,contentIndex:g(),partial:t})):(m={type:`text`,text:``},t.content.push(m),a.push({type:`text_start`,contentIndex:g(),partial:t}))),m.type===`thinking`?(m.thinking+=e.text,m.thinkingSignature=u(m.thinkingSignature,e.thoughtSignature),a.push({type:`thinking_delta`,contentIndex:g(),delta:e.text,partial:t})):(m.text+=e.text,m.textSignature=u(m.textSignature,e.thoughtSignature),a.push({type:`text_delta`,contentIndex:g(),delta:e.text,partial:t}))}if(e.functionCall){m&&=(m.type===`text`?a.push({type:`text_end`,contentIndex:g(),content:m.text,partial:t}):a.push({type:`thinking_end`,contentIndex:g(),content:m.thinking,partial:t}),null);let n=e.functionCall.id,r={type:`toolCall`,id:!n||t.content.some(e=>e.type===`toolCall`&&e.id===n)?`${e.functionCall.name}_${Date.now()}_${++_}`:n,name:e.functionCall.name||``,arguments:e.functionCall.args??{},...e.thoughtSignature&&{thoughtSignature:e.thoughtSignature}};t.content.push(r),a.push({type:`toolcall_start`,contentIndex:g(),partial:t}),a.push({type:`toolcall_delta`,contentIndex:g(),delta:JSON.stringify(r.arguments),partial:t}),a.push({type:`toolcall_end`,contentIndex:g(),toolCall:r,partial:t})}}i?.finishReason&&(t.stopReason=s(i.finishReason),t.content.some(e=>e.type===`toolCall`)&&(t.stopReason=`toolUse`)),r.usageMetadata&&(t.usage={input:(r.usageMetadata.promptTokenCount||0)-(r.usageMetadata.cachedContentTokenCount||0),output:(r.usageMetadata.candidatesTokenCount||0)+(r.usageMetadata.thoughtsTokenCount||0),cacheRead:r.usageMetadata.cachedContentTokenCount||0,cacheWrite:0,totalTokens:r.usageMetadata.totalTokenCount||0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},e(n,t.usage))}if(m&&(m.type===`text`?a.push({type:`text_end`,contentIndex:g(),content:m.text,partial:t}):a.push({type:`thinking_end`,contentIndex:g(),content:m.thinking,partial:t})),i?.signal?.aborted)throw Error(`Request was aborted`);if(t.stopReason===`aborted`||t.stopReason===`error`)throw Error(`An unknown error occurred`);a.push({type:`done`,reason:t.stopReason,message:t}),a.end()}catch(e){for(let e of t.content)`index`in e&&delete e.index;t.stopReason=i?.signal?.aborted?`aborted`:`error`,t.errorMessage=e instanceof Error?e.message:JSON.stringify(e),a.push({type:`error`,reason:t.stopReason,error:t}),a.end()}})(),a},y=(e,t,i)=>{let a=r(e,i,void 0);if(!i?.reasoning)return v(e,t,{...a,thinking:{enabled:!1}});let o=n(e,i.reasoning),s=o===`off`?`high`:o,c=e;return A(c)||j(c)?v(e,t,{...a,thinking:{enabled:!0,level:N(s,c)}}):v(e,t,{...a,thinking:{enabled:!0,budgetTokens:P(c,s,i.thinkingBudgets)}})};function b(e,t,n,r){return new f({vertexai:!0,project:t,location:n,apiVersion:m,httpOptions:S(e,r)})}function x(e,t,n){return new f({vertexai:!0,apiKey:t,apiVersion:m,httpOptions:S(e,n)})}function S(e,t){let n={},r=C(e.baseUrl);return r&&(n.baseUrl=r,n.baseUrlResourceScope=o.COLLECTION,w(r)&&(n.apiVersion=``)),(e.headers||t)&&(n.headers={...e.headers,...t}),Object.keys(n).length>0?n:void 0}function C(e){let t=e.trim();if(!(!t||t.includes(`{location}`)))return t}function w(e){try{return new URL(e).pathname.split(`/`).some(e=>/^v\d+(?:beta\d*)?$/.test(e))}catch{return/(?:^|\/)v\d+(?:beta\d*)?(?:\/|$)/.test(e)}}function T(e){let t=e?.apiKey?.trim();if(!(!t||t===h||E(t)))return t}function E(e){return/^<[^>]+>$/.test(e)}function D(e){let t=e?.project||{}.GOOGLE_CLOUD_PROJECT||{}.GCLOUD_PROJECT;if(!t)throw Error(`Vertex AI requires a project ID. Set GOOGLE_CLOUD_PROJECT/GCLOUD_PROJECT or pass project in options.`);return t}function O(e){let t=e?.location||{}.GOOGLE_CLOUD_LOCATION;if(!t)throw Error(`Vertex AI requires a location. Set GOOGLE_CLOUD_LOCATION or pass location in options.`);return t}function k(e,t,n={}){let r=p(e,t),o={};n.temperature!==void 0&&(o.temperature=n.temperature),n.maxTokens!==void 0&&(o.maxOutputTokens=n.maxTokens);let s={...Object.keys(o).length>0&&o,...t.systemPrompt&&{systemInstruction:i(t.systemPrompt)},...t.tools&&t.tools.length>0&&{tools:l(t.tools)}};if(t.tools&&t.tools.length>0&&n.toolChoice?s.toolConfig={functionCallingConfig:{mode:a(n.toolChoice)}}:s.toolConfig=void 0,n.thinking?.enabled&&e.reasoning){let e={includeThoughts:!0};n.thinking.level===void 0?n.thinking.budgetTokens!==void 0&&(e.thinkingBudget=n.thinking.budgetTokens):e.thinkingLevel=g[n.thinking.level],s.thinkingConfig=e}else e.reasoning&&n.thinking&&!n.thinking.enabled&&(s.thinkingConfig=M(e));if(n.signal){if(n.signal.aborted)throw Error(`Request aborted`);s.abortSignal=n.signal}return{model:e.id,contents:r,config:s}}function A(e){return/gemini-3(?:\.\d+)?-pro/.test(e.id.toLowerCase())}function j(e){return/gemini-3(?:\.\d+)?-flash/.test(e.id.toLowerCase())}function M(e){let t=e;return A(t)?{thinkingLevel:c.LOW}:j(t)?{thinkingLevel:c.MINIMAL}:{thinkingBudget:0}}function N(e,t){if(A(t))switch(e){case`minimal`:case`low`:return`LOW`;case`medium`:case`high`:return`HIGH`}switch(e){case`minimal`:return`MINIMAL`;case`low`:return`LOW`;case`medium`:return`MEDIUM`;case`high`:return`HIGH`}}function P(e,t,n){return n?.[t]===void 0?e.id.includes(`2.5-pro`)?{minimal:128,low:2048,medium:8192,high:32768}[t]:e.id.includes(`2.5-flash`)?{minimal:128,low:2048,medium:8192,high:24576}[t]:-1:n[t]}export{v as streamGoogleVertex,y as streamSimpleGoogleVertex};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{P as e,Q as t,Y as n,Z as r,l as i}from"./kernel-worker-xMdP33ug.js";import{a,c as o,i as s,l as c,n as l,o as u,r as d,s as f,t as p}from"./google-shared-BqepQLFX.js";const m={THINKING_LEVEL_UNSPECIFIED:c.THINKING_LEVEL_UNSPECIFIED,MINIMAL:c.MINIMAL,LOW:c.LOW,MEDIUM:c.MEDIUM,HIGH:c.HIGH};let h=0;const g=(e,t,i)=>{let a=new n;return(async()=>{let n={role:`assistant`,content:[],api:`google-vertex`,provider:e.provider,model:e.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:`stop`,timestamp:Date.now()};try{let o=C(i),c=o?y(e,o,i?.headers):v(e,T(i),E(i),i?.headers),l=D(e,t,i),f=await i?.onPayload?.(l,e);f!==void 0&&(l=f);let p=await c.models.generateContentStream(l);a.push({type:`start`,partial:n});let m=null,g=n.content,_=()=>g.length-1;for await(let t of p){n.responseId||=t.responseId;let i=t.candidates?.[0];if(i?.content?.parts)for(let e of i.content.parts){if(e.text!==void 0){let t=d(e);(!m||t&&m.type!==`thinking`||!t&&m.type!==`text`)&&(m&&(m.type===`text`?a.push({type:`text_end`,contentIndex:g.length-1,content:m.text,partial:n}):a.push({type:`thinking_end`,contentIndex:_(),content:m.thinking,partial:n})),t?(m={type:`thinking`,thinking:``,thinkingSignature:void 0},n.content.push(m),a.push({type:`thinking_start`,contentIndex:_(),partial:n})):(m={type:`text`,text:``},n.content.push(m),a.push({type:`text_start`,contentIndex:_(),partial:n}))),m.type===`thinking`?(m.thinking+=e.text,m.thinkingSignature=u(m.thinkingSignature,e.thoughtSignature),a.push({type:`thinking_delta`,contentIndex:_(),delta:e.text,partial:n})):(m.text+=e.text,m.textSignature=u(m.textSignature,e.thoughtSignature),a.push({type:`text_delta`,contentIndex:_(),delta:e.text,partial:n}))}if(e.functionCall){m&&=(m.type===`text`?a.push({type:`text_end`,contentIndex:_(),content:m.text,partial:n}):a.push({type:`thinking_end`,contentIndex:_(),content:m.thinking,partial:n}),null);let t=e.functionCall.id,r={type:`toolCall`,id:!t||n.content.some(e=>e.type===`toolCall`&&e.id===t)?`${e.functionCall.name}_${Date.now()}_${++h}`:t,name:e.functionCall.name||``,arguments:e.functionCall.args??{},...e.thoughtSignature&&{thoughtSignature:e.thoughtSignature}};n.content.push(r),a.push({type:`toolcall_start`,contentIndex:_(),partial:n}),a.push({type:`toolcall_delta`,contentIndex:_(),delta:JSON.stringify(r.arguments),partial:n}),a.push({type:`toolcall_end`,contentIndex:_(),toolCall:r,partial:n})}}i?.finishReason&&(n.stopReason=s(i.finishReason),n.content.some(e=>e.type===`toolCall`)&&(n.stopReason=`toolUse`)),t.usageMetadata&&(n.usage={input:(t.usageMetadata.promptTokenCount||0)-(t.usageMetadata.cachedContentTokenCount||0),output:(t.usageMetadata.candidatesTokenCount||0)+(t.usageMetadata.thoughtsTokenCount||0),cacheRead:t.usageMetadata.cachedContentTokenCount||0,cacheWrite:0,totalTokens:t.usageMetadata.totalTokenCount||0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},r(e,n.usage))}if(m&&(m.type===`text`?a.push({type:`text_end`,contentIndex:_(),content:m.text,partial:n}):a.push({type:`thinking_end`,contentIndex:_(),content:m.thinking,partial:n})),i?.signal?.aborted)throw Error(`Request was aborted`);if(n.stopReason===`aborted`||n.stopReason===`error`)throw Error(`An unknown error occurred`);a.push({type:`done`,reason:n.stopReason,message:n}),a.end()}catch(e){for(let e of n.content)`index`in e&&delete e.index;n.stopReason=i?.signal?.aborted?`aborted`:`error`,n.errorMessage=e instanceof Error?e.message:JSON.stringify(e),a.push({type:`error`,reason:n.stopReason,error:n}),a.end()}})(),a},_=(n,r,i)=>{let a=e(n,i,void 0);if(!i?.reasoning)return g(n,r,{...a,thinking:{enabled:!1}});let o=t(n,i.reasoning),s=o===`off`?`high`:o,c=n;return O(c)||k(c)?g(n,r,{...a,thinking:{enabled:!0,level:j(s,c)}}):g(n,r,{...a,thinking:{enabled:!0,budgetTokens:M(c,s,i.thinkingBudgets)}})};function v(e,t,n,r){return new f({vertexai:!0,project:t,location:n,apiVersion:`v1`,httpOptions:b(e,r)})}function y(e,t,n){return new f({vertexai:!0,apiKey:t,apiVersion:`v1`,httpOptions:b(e,n)})}function b(e,t){let n={},r=x(e.baseUrl);return r&&(n.baseUrl=r,n.baseUrlResourceScope=o.COLLECTION,S(r)&&(n.apiVersion=``)),(e.headers||t)&&(n.headers={...e.headers,...t}),Object.keys(n).length>0?n:void 0}function x(e){let t=e.trim();if(!(!t||t.includes(`{location}`)))return t}function S(e){try{return new URL(e).pathname.split(`/`).some(e=>/^v\d+(?:beta\d*)?$/.test(e))}catch{return/(?:^|\/)v\d+(?:beta\d*)?(?:\/|$)/.test(e)}}function C(e){let t=e?.apiKey?.trim();if(!(!t||t===`gcp-vertex-credentials`||w(t)))return t}function w(e){return/^<[^>]+>$/.test(e)}function T(e){let t=e?.project||{}.GOOGLE_CLOUD_PROJECT||{}.GCLOUD_PROJECT;if(!t)throw Error(`Vertex AI requires a project ID. Set GOOGLE_CLOUD_PROJECT/GCLOUD_PROJECT or pass project in options.`);return t}function E(e){let t=e?.location||{}.GOOGLE_CLOUD_LOCATION;if(!t)throw Error(`Vertex AI requires a location. Set GOOGLE_CLOUD_LOCATION or pass location in options.`);return t}function D(e,t,n={}){let r=p(e,t),o={};n.temperature!==void 0&&(o.temperature=n.temperature),n.maxTokens!==void 0&&(o.maxOutputTokens=n.maxTokens);let s={...Object.keys(o).length>0&&o,...t.systemPrompt&&{systemInstruction:i(t.systemPrompt)},...t.tools&&t.tools.length>0&&{tools:l(t.tools)}};if(t.tools&&t.tools.length>0&&n.toolChoice?s.toolConfig={functionCallingConfig:{mode:a(n.toolChoice)}}:s.toolConfig=void 0,n.thinking?.enabled&&e.reasoning){let e={includeThoughts:!0};n.thinking.level===void 0?n.thinking.budgetTokens!==void 0&&(e.thinkingBudget=n.thinking.budgetTokens):e.thinkingLevel=m[n.thinking.level],s.thinkingConfig=e}else e.reasoning&&n.thinking&&!n.thinking.enabled&&(s.thinkingConfig=A(e));if(n.signal){if(n.signal.aborted)throw Error(`Request aborted`);s.abortSignal=n.signal}return{model:e.id,contents:r,config:s}}function O(e){return/gemini-3(?:\.\d+)?-pro/.test(e.id.toLowerCase())}function k(e){return/gemini-3(?:\.\d+)?-flash/.test(e.id.toLowerCase())}function A(e){let t=e;return O(t)?{thinkingLevel:c.LOW}:k(t)?{thinkingLevel:c.MINIMAL}:{thinkingBudget:0}}function j(e,t){if(O(t))switch(e){case`minimal`:case`low`:return`LOW`;case`medium`:case`high`:return`HIGH`}switch(e){case`minimal`:return`MINIMAL`;case`low`:return`LOW`;case`medium`:return`MEDIUM`;case`high`:return`HIGH`}}function M(e,t,n){return n?.[t]===void 0?e.id.includes(`2.5-pro`)?{minimal:128,low:2048,medium:8192,high:32768}[t]:e.id.includes(`2.5-flash`)?{minimal:128,low:2048,medium:8192,high:24576}[t]:-1:n[t]}export{g as streamGoogleVertex,_ as streamSimpleGoogleVertex};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ct as e}from"./main-BxzufWem.js";var t=e(`hosted-config`);async function n(e,t){let n=new Set(e.map(e=>e.providerId));for(let n of e)n.kind===`oauth`?await t.saveOAuthAccount({providerId:n.providerId,accessToken:n.accessToken,refreshToken:n.refreshToken,tokenExpiresAt:n.tokenExpiresAt,userName:n.userName,baseUrl:n.baseUrl}):t.addAccount(n.providerId,n.apiKey,n.baseUrl,n.deployment,n.apiVersion);let r=new Set(t.previouslyManaged());for(let e of t.currentProviderIds())r.has(e)&&!n.has(e)&&await t.removeAccount(e)}async function r(e,n,r=5e3){await Promise.all(e.map(async e=>{if(e.kind!==`oauth`||!e.accessToken)return;let i=n.getRefreshModels(e.providerId);if(i)try{await Promise.race([i(e.accessToken),new Promise(e=>setTimeout(e,r))])}catch(n){t.warn(`prewarm: refreshModels failed; cone boots with cold model metadata`,{providerId:e.providerId,error:n instanceof Error?n.message:String(n)})}}))}export{n as applyHostedAccounts,r as prewarmHostedModels};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{yt as e}from"./kernel-worker-xMdP33ug.js";var t=e({applyRewrites:()=>o,createInterceptingOAuthLauncher:()=>s,parseInterceptOAuthConfig:()=>n});function n(e){if(typeof e!=`object`||!e||Array.isArray(e))return{ok:!1,error:`expected a JSON object`};let t=e;if(typeof t.authorizeUrl!=`string`||t.authorizeUrl.length===0)return{ok:!1,error:`authorizeUrl must be a non-empty string`};if(typeof t.redirectUriPattern!=`string`||t.redirectUriPattern.length===0)return{ok:!1,error:`redirectUriPattern must be a non-empty string`};if(t.onCapture!==void 0&&t.onCapture!==`close`&&t.onCapture!==`leave`)return{ok:!1,error:`onCapture must be "close" or "leave"`};if(t.timeoutMs!==void 0&&(typeof t.timeoutMs!=`number`||t.timeoutMs<=0))return{ok:!1,error:`timeoutMs must be a positive number`};let n=r(t.rewrite);return n.ok?{ok:!0,config:{authorizeUrl:t.authorizeUrl,redirectUriPattern:t.redirectUriPattern,rewrite:n.rewrites,onCapture:t.onCapture,timeoutMs:t.timeoutMs}}:n}function r(e){if(e===void 0)return{ok:!0,rewrites:void 0};if(!Array.isArray(e))return{ok:!1,error:`rewrite must be an array`};let t=[];for(let n=0;n<e.length;n++){let r=e[n];if(typeof r!=`object`||!r)return{ok:!1,error:`rewrite[${n}] must be an object`};let i=r;if(typeof i.match!=`string`||i.match.length===0)return{ok:!1,error:`rewrite[${n}].match must be a non-empty string`};if(i.replaceUrl!==void 0&&typeof i.replaceUrl!=`string`)return{ok:!1,error:`rewrite[${n}].replaceUrl must be a string when present`};if(i.appendParams!==void 0){if(typeof i.appendParams!=`object`||i.appendParams===null||Array.isArray(i.appendParams))return{ok:!1,error:`rewrite[${n}].appendParams must be an object`};for(let[e,t]of Object.entries(i.appendParams))if(typeof t!=`string`)return{ok:!1,error:`rewrite[${n}].appendParams.${e} must be a string`}}t.push({match:i.match,appendParams:i.appendParams,replaceUrl:i.replaceUrl})}return{ok:!0,rewrites:t}}function i(e,t){return t.endsWith(`*`)?e.startsWith(t.slice(0,-1)):e===t||e.startsWith(`${t}?`)||e.startsWith(`${t}#`)}function a(e){return e.endsWith(`*`)?e:`${e}*`}function o(e,t){if(!t||t.length===0)return e;let n=e;for(let e of t)if(n.includes(e.match)){if(e.replaceUrl){n=e.replaceUrl;continue}if(e.appendParams)try{let t=new URL(n);for(let[n,r]of Object.entries(e.appendParams))t.searchParams.set(n,r);n=t.toString()}catch{}}return n}function s(e){return async t=>{let n=t.timeoutMs??12e4,r=t.rewrite??[],s=t.onCapture??`close`,c,l,u=!1,d=null,f=async()=>{if(l){try{await e.send(`Fetch.disable`,{},l)}catch{}try{await e.send(`Target.detachFromTarget`,{sessionId:l})}catch{}}if(c&&s===`close`)try{await e.send(`Target.closeTarget`,{targetId:c})}catch{}};return await new Promise(s=>{let p=async t=>{u||(u=!0,clearTimeout(h),e.off(`Fetch.requestPaused`,m),await f(),s(t))},m=n=>{let a=n;if(!a?.request?.url||!l||(typeof n.sessionId==`string`?n.sessionId:void 0)!==l)return;if(i(a.request.url,t.redirectUriPattern)){d=a.request.url,e.send(`Fetch.failRequest`,{requestId:a.requestId,errorReason:`Aborted`},l).catch(()=>{}),p(d);return}let s=o(a.request.url,r);if(s!==a.request.url){e.send(`Fetch.continueRequest`,{requestId:a.requestId,url:s},l).catch(e=>{console.warn(`[intercepted-oauth] continueRequest (rewrite) failed:`,e instanceof Error?e.message:String(e))});return}e.send(`Fetch.continueRequest`,{requestId:a.requestId},l).catch(()=>{})},h=setTimeout(()=>{p(null)},n);(async()=>{try{c=(await e.send(`Target.createTarget`,{url:`about:blank`})).targetId,l=(await e.send(`Target.attachToTarget`,{targetId:c,flatten:!0})).sessionId,e.on(`Fetch.requestPaused`,m),await e.send(`Fetch.enable`,{patterns:[{urlPattern:a(t.redirectUriPattern),requestStage:`Request`},...r.map(e=>({urlPattern:`*${e.match}*`,requestStage:`Request`}))]},l),await e.send(`Page.navigate`,{url:t.authorizeUrl},l)}catch(e){console.error(`[intercepted-oauth] setup failed:`,e instanceof Error?e.message:String(e)),p(null)}})()})}}export{t as n,s as t};
|