@antseed/gateway-console 0.1.11 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{Activity-UaQeZdKk.js → Activity-DATDm05n.js} +1 -1
- package/dist/assets/Audit-DoUfhCFC.js +1 -0
- package/dist/assets/{BrandIcon-dTKznfCA.js → BrandIcon-_kk81WuK.js} +1 -1
- package/dist/assets/{ChainGate-DpChfDOP.js → ChainGate-Bp0uTPIx.js} +1 -1
- package/dist/assets/{ChannelClose-DpNV5MqB.js → ChannelClose-BR31CpqA.js} +1 -1
- package/dist/assets/{Charts-C65ZE2xP.js → Charts-kvs4OmQ5.js} +1 -1
- package/dist/assets/{Chat-BbM_y6mh.js → Chat-DXeiNUvp.js} +3 -3
- package/dist/assets/{ConnectWallet-CLv0c-JB.js → ConnectWallet-BgF0sOSn.js} +1 -1
- package/dist/assets/{DataTable-BkJdorEh.js → DataTable-DsVQCeW0.js} +1 -1
- package/dist/assets/{KeyHolder-Cjko0nrs.js → KeyHolder-DxMTzn2W.js} +1 -1
- package/dist/assets/Keys-BjYvx7sT.js +1 -0
- package/dist/assets/{Logs-DIPNoSb8.js → Logs-oKL9uKOU.js} +1 -1
- package/dist/assets/Members-T-UrNdtc.js +1 -0
- package/dist/assets/{Migrate-DDHZ-rux.js → Migrate-Cf0OtMIJ.js} +1 -1
- package/dist/assets/ModelDetails-Cui5mNEy.js +1 -0
- package/dist/assets/Models-PTbGWvAC.js +1 -0
- package/dist/assets/{OperatorActions-BuEpaCiH.js → OperatorActions-CnSuoVIH.js} +1 -1
- package/dist/assets/{OperatorGateAlert-grMRoFdV.js → OperatorGateAlert-B6C_5PEr.js} +1 -1
- package/dist/assets/{Overview-BU9HCltc.js → Overview-CJl9bY9L.js} +1 -1
- package/dist/assets/{PeerPicker-CfsXTUyK.js → PeerPicker-C_8PqMUU.js} +1 -1
- package/dist/assets/PolicyEditor-DAaebg1f.js +1 -0
- package/dist/assets/PolicyField-CHfrLOyB.js +1 -0
- package/dist/assets/Presets-wZYcL1FD.js +4 -0
- package/dist/assets/Providers-BAhStRFF.js +1 -0
- package/dist/assets/{RequestLog-DJl6FJhq.js → RequestLog-Bqg0utI3.js} +1 -1
- package/dist/assets/{Rewards-BOfJumNk.js → Rewards-DlbuI--y.js} +2 -2
- package/dist/assets/{RewardsClaim-DHvgMfZ4.js → RewardsClaim-CAnaSpmX.js} +1 -1
- package/dist/assets/Routing-BlkYS_0B.js +1 -0
- package/dist/assets/{Segmented-D3e0aBDU.js → Segmented-C2AVrIR7.js} +1 -1
- package/dist/assets/{SelectField-Cl4acfcI.js → SelectField-DjRyrny7.js} +1 -1
- package/dist/assets/Settings-yiWxbHdt.js +7 -0
- package/dist/assets/SidePanel-DHP0GHL-.js +1 -0
- package/dist/assets/{Staking-1D2HNu5P.js → Staking-Bmp79Jmy.js} +1 -1
- package/dist/assets/{StakingDashboard-C5Ib_AUs.js → StakingDashboard-Ijg1EDMe.js} +1 -1
- package/dist/assets/Switch-DClkimeN.js +1 -0
- package/dist/assets/{Tabs-Cv10NtDy.js → Tabs-DOfs9pV6.js} +1 -1
- package/dist/assets/{TextAreaField-Dbr655cs.js → TextAreaField-BzOoHz0q.js} +1 -1
- package/dist/assets/{UsageByModel-BfvCLwo9.js → UsageByModel-Ck9YsQAj.js} +1 -1
- package/dist/assets/{VerificationLinks-CERoRvCR.js → VerificationLinks-CgB1oqeh.js} +1 -1
- package/dist/assets/{Wallet-CVS_hzu0.js → Wallet-CqvNVXRO.js} +7 -7
- package/dist/assets/{WalletConfirm-C8Kazsh7.js → WalletConfirm-Ca7r5H8h.js} +1 -1
- package/dist/assets/{WalletFunding-BbhXB813.js → WalletFunding-CClRgkd3.js} +1 -1
- package/dist/assets/{WalletSignIn-Tzs38aME.js → WalletSignIn-OeYy6k9J.js} +1 -1
- package/dist/assets/Workspaces-DdMaBlC2.js +1 -0
- package/dist/assets/{add-CdcnAnIQ.js → add-BIV9ozpT.js} +1 -1
- package/dist/assets/{all-wallets-CaMIS0WH.js → all-wallets-DTcdqYms.js} +1 -1
- package/dist/assets/{app-store-BJlWsf36.js → app-store-sivsgaWo.js} +1 -1
- package/dist/assets/{apple-sOU-w3fg.js → apple-CnEh2Z0o.js} +1 -1
- package/dist/assets/{arrow-bottom-CTOfZJ7E.js → arrow-bottom-CV61GKUR.js} +1 -1
- package/dist/assets/{arrow-bottom-circle-B6IrOSiK.js → arrow-bottom-circle-DFzyOmM2.js} +1 -1
- package/dist/assets/{arrow-left-D0Qm9EWX.js → arrow-left-C15ZaZSP.js} +1 -1
- package/dist/assets/{arrow-right-XMSWQLiv.js → arrow-right-91Gw6L2M.js} +1 -1
- package/dist/assets/{arrow-top-Bym-ayRK.js → arrow-top-DPQixVIo.js} +1 -1
- package/dist/assets/{bank-NJF8WYDR.js → bank-9Hiz5n1N.js} +1 -1
- package/dist/assets/{basic-bO70Xvle.js → basic-BSP1_xZI.js} +1 -1
- package/dist/assets/{browser-ucjw1tpv.js → browser-CyasGPFE.js} +1 -1
- package/dist/assets/{bundle-full-idGWmtvy.js → bundle-full-C3z6oPNG.js} +1 -1
- package/dist/assets/{card-DcpyI2qX.js → card-DuAFw0fG.js} +1 -1
- package/dist/assets/{ccip-DBXxv0FH.js → ccip-CnjHj1RZ.js} +1 -1
- package/dist/assets/{checkmark-RFLSeCgj.js → checkmark-Did8RFKg.js} +1 -1
- package/dist/assets/{checkmark-bold-Dl1q9Kby.js → checkmark-bold-WTuNIh6X.js} +1 -1
- package/dist/assets/{chevron-bottom-ilycsYd4.js → chevron-bottom-YjhZRIXC.js} +1 -1
- package/dist/assets/{chevron-left-DFK2Xbq1.js → chevron-left-C9RIiMNF.js} +1 -1
- package/dist/assets/{chevron-right-Ew8XV9m9.js → chevron-right-n1LdC3Bu.js} +1 -1
- package/dist/assets/{chevron-top-CxoXH2-q.js → chevron-top-BukRfdTL.js} +1 -1
- package/dist/assets/{chrome-store-ClmhY3B0.js → chrome-store-BkN1NWnM.js} +1 -1
- package/dist/assets/{clock-CCiukNBf.js → clock-D1bJyWIM.js} +1 -1
- package/dist/assets/{close-B0KBYbXe.js → close-DL88TIDj.js} +1 -1
- package/dist/assets/code-block-DwCsSJzh.js +3 -0
- package/dist/assets/{coinPlaceholder-D2ugxr3r.js → coinPlaceholder-CfwG-TTk.js} +1 -1
- package/dist/assets/{compass-CutyEYmW.js → compass-ZpTR_nrR.js} +1 -1
- package/dist/assets/{copy-CJ0RBt1e.js → copy-judiAK2Z.js} +1 -1
- package/dist/assets/{core-BCJdIbrO.js → core-CA5S1nbm.js} +3 -3
- package/dist/assets/cursor-DvOm1Cji.js +3 -0
- package/dist/assets/{cursor-transparent-BQ_jwSfb.js → cursor-transparent-BmGrLznf.js} +1 -1
- package/dist/assets/{desktop-CsfFLaEs.js → desktop-BuMTjH7M.js} +1 -1
- package/dist/assets/{disconnect-B62slDXp.js → disconnect-De2ZlK-6.js} +1 -1
- package/dist/assets/{discord-B8GwtWtL.js → discord-BNL_ltCn.js} +1 -1
- package/dist/assets/{en_US-Y4ZOVFV4-sKQksBWU.js → en_US-Y4ZOVFV4-B7L59ik1.js} +4 -4
- package/dist/assets/{etherscan-BT9zhNhd.js → etherscan-HbcRO2IH.js} +1 -1
- package/dist/assets/{exclamation-triangle-BSoPK6uq.js → exclamation-triangle-x5ImWOJX.js} +1 -1
- package/dist/assets/{extension-CQxJq6bp.js → extension-rfKIvpqo.js} +1 -1
- package/dist/assets/{external-link-BnfAKGN2.js → external-link-7kjdDR71.js} +1 -1
- package/dist/assets/{facebook-DiAqdu4i.js → facebook-BclEg-_B.js} +1 -1
- package/dist/assets/{farcaster-B1y2in5M.js → farcaster-D2oH1JNb.js} +1 -1
- package/dist/assets/{filters-BkVUp9NW.js → filters-JMxKoXjp.js} +1 -1
- package/dist/assets/{github-IRwi-GM-.js → github-MlVki9qk.js} +1 -1
- package/dist/assets/{google-k2ysL2bi.js → google-D65ws424.js} +1 -1
- package/dist/assets/{help-circle-DLj9trmu.js → help-circle-BK3cKTQP.js} +1 -1
- package/dist/assets/highlighted-body-KQOG7T2V-CAY_ZWoa.js +1 -0
- package/dist/assets/{id-BY4HWjv7.js → id-B-GhJWbg.js} +1 -1
- package/dist/assets/{image-BtUeZe1t.js → image-CiFhN0rj.js} +1 -1
- package/dist/assets/{index-DiB9Y59V.js → index-B3lQX3LL.js} +3 -3
- package/dist/assets/{index-DYK1gWhP.css → index-B5U62otb.css} +1 -1
- package/dist/assets/{index-cESr4Zze.js → index-BJa4Qaxt.js} +11 -11
- package/dist/assets/{index-BXwAwVaO.js → index-ByQIfYvU.js} +1 -1
- package/dist/assets/{index-DsRX2D_O.js → index-DNDRe5Tn.js} +1 -1
- package/dist/assets/{index-Cmb-H95F.js → index-DuaHPDzN.js} +1 -1
- package/dist/assets/{index.es-DP9EmOYi.js → index.es-B6D0HpEZ.js} +3 -3
- package/dist/assets/{info-circle-ecoA_B_t.js → info-circle-xhU8sugp.js} +1 -1
- package/dist/assets/{info-BaKj81_D.js → info-exBeWZDh.js} +1 -1
- package/dist/assets/{lightbulb-DGQG-WWk.js → lightbulb-gxTCeOnq.js} +1 -1
- package/dist/assets/{limits-D2JvFgaN.js → limits-CFW9YnA7.js} +1 -1
- package/dist/assets/{mail-BvEbsX3q.js → mail-DmWSDPhy.js} +1 -1
- package/dist/assets/{mermaid-MCJ5UELQ-B8uOykea.js → mermaid-MCJ5UELQ-sIadr4pS.js} +3 -3
- package/dist/assets/{metamask-sdk-BYmYI1f3.js → metamask-sdk-DY00rxTf.js} +1 -1
- package/dist/assets/{mobile-CwlM4JMX.js → mobile-B3BxvHa9.js} +1 -1
- package/dist/assets/{more-CT36TpLm.js → more-BjVWPgrZ.js} +1 -1
- package/dist/assets/{network-placeholder-DG1Vvm-U.js → network-placeholder-YeNSVIJz.js} +1 -1
- package/dist/assets/{nftPlaceholder-D6USOn7p.js → nftPlaceholder-DbHcJNrA.js} +1 -1
- package/dist/assets/{off-BNSO7pY1.js → off-CtPqpcbp.js} +1 -1
- package/dist/assets/{play-store-PUfM0qU0.js → play-store-D9paBHV6.js} +1 -1
- package/dist/assets/{plus-C8fnGfp3.js → plus-D60mJLP4.js} +1 -1
- package/dist/assets/{qr-code-CjdrQ0pR.js → qr-code-D7sh4LqT.js} +1 -1
- package/dist/assets/{recycle-horizontal-BMxBgeB4.js → recycle-horizontal-G2tc-boO.js} +1 -1
- package/dist/assets/{refresh-C2D196Fq.js → refresh-DbRsPfeH.js} +1 -1
- package/dist/assets/{reown-logo-CLN2ORKJ.js → reown-logo-C7-J6a93.js} +1 -1
- package/dist/assets/{search-C9voC8dq.js → search-Cifbb1kp.js} +1 -1
- package/dist/assets/selection-GKCY6QaK.js +1 -0
- package/dist/assets/{send-BAxcrGbA.js → send-C7VNtheK.js} +1 -1
- package/dist/assets/{sendTransaction-Cmz5eiPq.js → sendTransaction-OKix18Wz.js} +1 -1
- package/dist/assets/stored-C5eGF9Ho.js +1 -0
- package/dist/assets/{swapHorizontal-CHCTyoP7.js → swapHorizontal-_un_Nt7W.js} +1 -1
- package/dist/assets/{swapHorizontalBold-LQsONWBk.js → swapHorizontalBold-DipkGXtT.js} +1 -1
- package/dist/assets/{swapHorizontalMedium-BxrBEjrx.js → swapHorizontalMedium-BwrG3AId.js} +1 -1
- package/dist/assets/{swapHorizontalRoundedBold-CEHDoSv1.js → swapHorizontalRoundedBold-CzxQhZjN.js} +1 -1
- package/dist/assets/{swapVertical-DMylrYB1.js → swapVertical-DVrrmwGq.js} +1 -1
- package/dist/assets/{telegram-BhVfpln1.js → telegram-CM4CyaZC.js} +1 -1
- package/dist/assets/{three-dots-nkXRRS-E.js → three-dots-BCalKpaE.js} +1 -1
- package/dist/assets/{twitch-CYroZH_7.js → twitch-CfAHmkC8.js} +1 -1
- package/dist/assets/{twitterIcon-DpHUqlyA.js → twitterIcon-1tyE-UqP.js} +1 -1
- package/dist/assets/{usage-8BBeTlF-.js → usage-CckQzwRu.js} +1 -1
- package/dist/assets/{useInfiniteQuery-zD1WIYBy.js → useInfiniteQuery-Bq7y7uuf.js} +1 -1
- package/dist/assets/{useTx-DsLsc5bB.js → useTx-B3hhNYvk.js} +1 -1
- package/dist/assets/{verify-DARDbLiQ.js → verify-CepTEVee.js} +1 -1
- package/dist/assets/{verify-filled-EsNi41IB.js → verify-filled-DgTBeCbs.js} +1 -1
- package/dist/assets/{w3m-modal-CIUN4uxE.js → w3m-modal-Cz6YrUSP.js} +1 -1
- package/dist/assets/{waitForCallsStatus-DlpsNYx1.js → waitForCallsStatus-Bb1t_wzE.js} +1 -1
- package/dist/assets/{wallet-B2vgeP1E.js → wallet-CEqn1yNE.js} +1 -1
- package/dist/assets/{wallet-placeholder-DQsissb3.js → wallet-placeholder-Dy7Awuau.js} +1 -1
- package/dist/assets/{walletconnect-DylNgC0Z.js → walletconnect-IC3BdQZa.js} +1 -1
- package/dist/assets/{warning-circle-CVEgsVb4.js → warning-circle-Csh8khJG.js} +1 -1
- package/dist/assets/{writeContract-Cqg_OlRQ.js → writeContract-D27zB12y.js} +1 -1
- package/dist/assets/{x-DSURRh6S.js → x-fLBvtS6t.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/dist/assets/Audit-Cd26xOlL.js +0 -1
- package/dist/assets/Disclosure-DMLE7rCw.js +0 -1
- package/dist/assets/Keys-DLKN6Sna.js +0 -1
- package/dist/assets/Members-CgP9OTz9.js +0 -1
- package/dist/assets/ModelDetails-CkDNU2Px.js +0 -1
- package/dist/assets/Models-DXbiNymT.js +0 -1
- package/dist/assets/PolicyEditor-ptFDJhFh.js +0 -1
- package/dist/assets/PolicyField-CHhm50jF.js +0 -1
- package/dist/assets/Presets-szQETQLM.js +0 -4
- package/dist/assets/Providers-B6xbFeNU.js +0 -1
- package/dist/assets/Routing-DFuhPfzU.js +0 -1
- package/dist/assets/Settings--0bbw1dn.js +0 -7
- package/dist/assets/SidePanel-D0rNElh3.js +0 -1
- package/dist/assets/Switch-B2AEvyu7.js +0 -1
- package/dist/assets/Workspaces-DGgrOEZk.js +0 -1
- package/dist/assets/code-block-DxUcjw4S.js +0 -3
- package/dist/assets/cursor-Bg_hT9DN.js +0 -3
- package/dist/assets/highlighted-body-KQOG7T2V-CJM-VU3I.js +0 -1
- package/dist/assets/selection-HN8SZ52c.js +0 -1
- package/dist/assets/stored-CETnaQtE.js +0 -1
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{F as re,G as ne,b as ge,bs as xe,r as d,bI as ae,q as U,f as E,ag as ve,a6 as be,al as K,g as fe,j as t,ah as D,aa as ye,T as O,B as y,o as $,D as ie,e as Se,P as je,bJ as we,Q as z,aC as ke,l as A,X as le,M as Pe,v as M,u as Re,V as Ce,t as Q,b3 as Ne,au as W,bc as Me,at as Ie,E as Ue,I as G,C as J,b2 as qe,$ as Te}from"./index-cESr4Zze.js";import{P as Y}from"./PeerPicker-CfsXTUyK.js";import{S as X}from"./PolicyEditor-ptFDJhFh.js";import{S as Oe}from"./Segmented-D3e0aBDU.js";import{S as I}from"./Switch-B2AEvyu7.js";import{D as F}from"./Disclosure-DMLE7rCw.js";import{T as oe}from"./TextAreaField-Dbr655cs.js";import{T as Ee,a as Ae}from"./Tabs-Cv10NtDy.js";import{D as Fe}from"./DataTable-BkJdorEh.js";import{S as B}from"./SelectField-Cl4acfcI.js";import"./roving-DkptacxO.js";function De(e){return Object.entries(e).map(([s,r])=>`${s}: ${r}`).join(`
|
|
2
|
-
`)}function $e(e){const s={};for(const[r,n]of e.split(`
|
|
3
|
-
`).entries()){if(!n.trim())continue;const c=n.indexOf(":");if(c<=0)throw new Error(`Line ${r+1}: use "Name: value".`);const u=n.slice(0,c).trim();if(!/^[A-Za-z0-9!#$%&'*+.^_`|~-]+$/.test(u))throw new Error(`Line ${r+1}: "${u}" is not a valid header name.`);s[u]=n.slice(c+1).trim()}return s}const ce="••••";function _e(e){return e.split(`
|
|
4
|
-
`).map(s=>{const r=s.indexOf(":");return r>0&&s.slice(r+1).trim()===ce?s.slice(0,r).trim():null}).filter(s=>!!s)}function Z(e){return e.split(`
|
|
5
|
-
`).map(s=>{const r=s.indexOf(":");return r>0&&s.slice(r+1).trim()===ce?`${s.slice(0,r)}: `:s}).join(`
|
|
6
|
-
`)}function Le(e,s){if(!e||!s)return!1;try{return new URL(e).origin!==new URL(s).origin}catch{return e!==s}}function Be(e){const s={},r=(n,c,u)=>{const a=e[n].trim();if(a===""){c&&(s[n]="Required.");return}const h=Number(a);!Number.isFinite(h)||h<0?s[n]="Use a number of 0 or more.":u!==void 0&&h>u&&(s[n]=`At most ${u}.`)};return r("input",!0),r("output",!0),r("cached",!1),r("reputation",!0,100),s}function w(e,s={}){const r=e.trim();if(r==="")return s.required?"Required.":void 0;const n=Number(r),c=s.min??0;if(!Number.isFinite(n))return"Use a number.";if(s.integer&&!Number.isInteger(n))return"Use a whole number.";if(n<c)return`Use ${c} or more.`;if(s.max!==void 0&&n>s.max)return`At most ${s.max}.`}function V(e){return e.split(/[\n,]/).map(s=>s.trim()).filter(Boolean)}function ee(e){const s=e.find(r=>!/^(?:0x)?[0-9a-f]{40}$/i.test(r));return s?`"${s}" is not a 40-character hex seller id.`:void 0}function te(e){const s=e.find(r=>!/^https?:\/\/\S+$/.test(r));return s?`"${s}" is not an http(s) URL.`:void 0}function ue(e,s){return e.some(r=>r===s||s.startsWith(`${r}.`)||r.startsWith(`${s}.`))}function Ve(){return t.jsxs("span",{className:"gc-override",children:[t.jsx("span",{className:"gc-attention","aria-hidden":"true"}),"Overridden by the buyer's environment or start flags"]})}function se(e){const s=e.routingPreferences,r=n=>n===null?"":String(n);return{allowMode:s.allowedPeerIds.length>0?"only":"any",allowedPeerIds:[...s.allowedPeerIds],blockedPeerIds:[...s.blockedPeerIds],minTrustScore:String(s.minTrustScore),minReputation:String(e.minPeerReputation),preferFree:s.preferFreePeers,softInputCap:String(s.maxInputUsdPerMillion),maxInput:String(e.maxPricing.inputUsdPerMillion),maxOutput:String(e.maxPricing.outputUsdPerMillion),maxCached:r(e.maxPricing.cachedInputUsdPerMillion),verify:e.verifier.enabled,requireVerified:e.verifier.require,verifiers:e.verifier.prefer.join(", "),sampleRate:r(e.evidence.sampleRate),maxSampleBytes:r(e.evidence.maxSampleBytes),autoSweep:e.payments.autoSweep,maxPerRequest:String(e.payments.maxPerRequestUsdc),maxReserve:String(e.payments.maxReserveUsdc),rpcUrl:e.payments.rpcUrl??"",fallbackRpcUrls:e.payments.fallbackRpcUrls.join(`
|
|
7
|
-
`),peerRefreshMs:String(e.network.peerRefreshIntervalMs),metadataTimeoutMs:String(e.network.metadataFetchTimeoutMs),requestTimeoutMs:String(e.network.requestTimeoutMs),maxStreamMs:String(e.network.maxStreamDurationMs),perServiceMetadata:!e.network.disableMetadataV2Services}}function ze(e){const s=Be({input:e.maxInput,output:e.maxOutput,cached:e.maxCached,reputation:e.minReputation}),r={maxInput:s.input,maxOutput:s.output,maxCached:s.cached,softInputCap:w(e.softInputCap,{required:!0}),allowedPeerIds:e.allowMode==="only"?ee(e.allowedPeerIds):void 0,blockedPeerIds:ee(e.blockedPeerIds),sampleRate:w(e.sampleRate,{max:1}),maxSampleBytes:w(e.maxSampleBytes,{min:1,integer:!0}),maxPerRequest:w(e.maxPerRequest,{required:!0,min:1e-6}),maxReserve:w(e.maxReserve,{required:!0,min:1e-6}),rpcUrl:e.rpcUrl.trim()?te([e.rpcUrl.trim()]):void 0,fallbackRpcUrls:te(V(e.fallbackRpcUrls)),peerRefreshMs:w(e.peerRefreshMs,{required:!0,min:1e3,integer:!0}),metadataTimeoutMs:w(e.metadataTimeoutMs,{required:!0,min:100,integer:!0}),requestTimeoutMs:w(e.requestTimeoutMs,{required:!0,min:1,integer:!0}),maxStreamMs:w(e.maxStreamMs,{required:!0,min:1,integer:!0})};return Object.fromEntries(Object.entries(r).filter(([,n])=>n))}function He(e){const s=r=>r.trim()?Number(r):null;return{routingPreferences:{minTrustScore:Number(e.minTrustScore),maxInputUsdPerMillion:Number(e.softInputCap),preferFreePeers:e.preferFree,allowedPeerIds:e.allowMode==="only"?e.allowedPeerIds:[],blockedPeerIds:e.blockedPeerIds},maxPricing:{inputUsdPerMillion:Number(e.maxInput),outputUsdPerMillion:Number(e.maxOutput),cachedInputUsdPerMillion:s(e.maxCached)},minPeerReputation:Number(e.minReputation),verifier:{enabled:e.verify,require:e.verify&&e.requireVerified,prefer:e.verify?V(e.verifiers):[]},evidence:{sampleRate:s(e.sampleRate),maxSampleBytes:s(e.maxSampleBytes)},payments:{autoSweep:e.autoSweep,maxPerRequestUsdc:Number(e.maxPerRequest),maxReserveUsdc:Number(e.maxReserve),rpcUrl:e.rpcUrl.trim()||null,fallbackRpcUrls:V(e.fallbackRpcUrls)},network:{peerRefreshIntervalMs:Number(e.peerRefreshMs),metadataFetchTimeoutMs:Number(e.metadataTimeoutMs),requestTimeoutMs:Number(e.requestTimeoutMs),maxStreamDurationMs:Number(e.maxStreamMs),disableMetadataV2Services:!e.perServiceMetadata}}}const Ke=["allowMode","allowedPeerIds","blockedPeerIds","minTrustScore","preferFree","softInputCap"];function L(e,s){return Object.keys(s).filter(r=>JSON.stringify(e[r])!==JSON.stringify(s[r]))}function Qe(e){const s=r=>r.trim()&&Number.isFinite(Number(r))?Number(r):void 0;return{...e.allowMode==="only"&&e.allowedPeerIds.length>0?{allowedPeerIds:e.allowedPeerIds}:{},...e.blockedPeerIds.length>0?{blockedPeerIds:e.blockedPeerIds}:{},...s(e.minTrustScore)?{minTrustScore:s(e.minTrustScore)}:{},...s(e.minReputation)?{minReputation:s(e.minReputation)}:{},...s(e.maxInput)!==void 0?{maxInputUsdPerMillion:s(e.maxInput)}:{},...s(e.maxOutput)!==void 0?{maxOutputUsdPerMillion:s(e.maxOutput)}:{},...s(e.maxCached)!==void 0?{maxCachedInputUsdPerMillion:s(e.maxCached)}:{}}}function We({buyer:e}){const s=re(),r=ne(),n=ge(),c=xe(),u=d.useMemo(()=>se(e),[e]),[a,h]=d.useState(u),[k,P]=d.useState(u),[v,S]=d.useState(null),[b,p]=d.useState(!1),[j,g]=d.useState(!1),l=(i,R)=>h(C=>({...C,[i]:R})),m=i=>{h(i),P(i),S(null)},o=ze(a),q=L(k,a);d.useEffect(()=>{L(k,u).length!==0&&(q.length===0||L(u,a).length===0?m(u):S(u))},[u]);const _=q.some(i=>!Ke.includes(i)),N=i=>ue(e.overrides,i)?t.jsx(Ve,{}):void 0,H=(i,R)=>N(i)??R,f=ae({mutationFn:()=>E.settings.updateBuyer(He(a)),onSuccess:i=>{const{restartRequired:R,...C}=i;s.setQueryData(U.settings,C),m(se(C.buyer)),s.invalidateQueries({queryKey:U.buyerLimits}),p(!1),g(R===!0),r(_?R?"Saved. Restart the buyer to apply them.":"Saved. The buyer is restarting.":"Saved. The buyer applies these at once.")}}),T=d.useMemo(()=>!n.data||n.data.length===0?null:{matched:ve(be(Qe(a)),n.data,c.data??[]).length,total:n.data.length},[a,n.data,c.data]),de=`${K(Number(a.maxInput))} in · ${K(Number(a.maxOutput))} out`,me=a.verify?a.requireVerified?"Required":"On":"Off",pe=`${a.autoSweep?"Auto-sweep on":"Auto-sweep off"} · ${fe(Number(a.maxPerRequest))} per request`,x=(i,R,C={})=>t.jsx(O,{size:"sm",className:C.className??"gc-num",label:R,inputMode:"decimal",placeholder:C.placeholder,value:a[i],error:o[i],hint:C.hint,onChange:he=>l(i,he.target.value)});return t.jsxs("div",{className:"gc-stack",children:[t.jsxs("div",{className:"gc-policy",children:[T&&(T.matched===0?t.jsxs(D,{tone:"warning",title:"No seller matches these settings",children:["None of the ",T.total," sellers this gateway sees passes them, so every request will fail."]}):t.jsxs("p",{className:"gc-muted","aria-live":"polite",children:["Matches ",T.matched," of ",T.total," sellers. Every key can only narrow this."]})),t.jsxs("div",{className:"gc-policy__cols",children:[t.jsxs("section",{className:"gc-policy__section",children:[t.jsx("h3",{children:"Sellers"}),t.jsx(Oe,{label:"Which sellers may serve",value:a.allowMode,onChange:i=>l("allowMode",i),options:[{value:"any",label:"Any seller"},{value:"only",label:"Only these"}]}),a.allowMode==="only"&&t.jsxs(t.Fragment,{children:[t.jsx(Y,{label:"Allowed sellers",value:a.allowedPeerIds,onChange:i=>l("allowedPeerIds",i),peers:n.data}),o.allowedPeerIds&&t.jsx("p",{className:"gc-warn",children:o.allowedPeerIds}),a.allowedPeerIds.length===0&&t.jsx("p",{className:"gc-fineprint",children:"With no sellers listed, any seller may serve."})]}),t.jsx(Y,{label:"Blocked sellers",value:a.blockedPeerIds,onChange:i=>l("blockedPeerIds",i),peers:n.data}),o.blockedPeerIds&&t.jsx("p",{className:"gc-warn",children:o.blockedPeerIds}),t.jsx("p",{className:"gc-fineprint",children:"Blocked here means blocked for every key."})]}),t.jsxs("section",{className:"gc-policy__section",children:[t.jsx("h3",{children:"Quality and ranking"}),t.jsx(X,{label:"Minimum trust score",clearable:!1,value:a.minTrustScore,onChange:i=>l("minTrustScore",i),hint:"Keys can raise it, not lower it."}),(ye(n.data)||a.minReputation!=="0")&&t.jsx(X,{label:"Minimum reputation",clearable:!1,value:a.minReputation,onChange:i=>l("minReputation",i),hint:H("minPeerReputation","Applies to pinned sellers too.")}),t.jsx("div",{className:"gc-policy__switches",children:t.jsx(I,{checked:a.preferFree,onChange:i=>l("preferFree",i),label:"Free sellers first"})}),x("softInputCap","Soft input price limit $/M",{hint:"Pricier sellers rank lower; none is excluded.",className:"gc-num gc-num--wide"})]})]}),t.jsxs("div",{className:"gc-policy__advanced",children:[t.jsxs(F,{title:"Price caps",summary:de,children:[t.jsx("p",{className:"gc-fineprint",children:"Hard limits for every request, pinned sellers included."}),t.jsxs("div",{className:"gc-policy__caps",children:[x("maxInput","Input $/M",{hint:N("maxPricing.inputUsdPerMillion")}),x("maxOutput","Output $/M",{hint:N("maxPricing.outputUsdPerMillion")}),x("maxCached","Cached input $/M",{placeholder:"Same as input"})]})]}),t.jsxs(F,{title:"Verification",summary:me,children:[N("verifier"),t.jsxs("div",{className:"gc-policy__switches",children:[t.jsx(I,{checked:a.verify,onChange:i=>l("verify",i),label:"Verify sellers"}),t.jsx(I,{checked:a.verify&&a.requireVerified,disabled:!a.verify,onChange:i=>l("requireVerified",i),label:"Require verification"})]}),t.jsx(O,{size:"sm",label:"Verifiers",value:a.verifiers,disabled:!a.verify,placeholder:"Seller's trusted default",hint:"Ordered, comma-separated verifier ids, e.g. TEE attestation.",onChange:i=>l("verifiers",i.target.value)}),t.jsxs("div",{className:"gc-policy__caps",children:[x("sampleRate","Evidence sample rate",{placeholder:"Default",hint:"Share of responses kept, 0 to 1."}),x("maxSampleBytes","Largest sample (bytes)",{placeholder:"Default",className:"gc-num gc-num--wide"})]})]}),t.jsxs(F,{title:"Payments",summary:pe,children:[t.jsx(I,{checked:a.autoSweep,onChange:i=>l("autoSweep",i),label:"Sweep deposits automatically",description:"Move USDC that arrives in the workspace wallets into their deposits."}),t.jsxs("div",{className:"gc-policy__caps",children:[x("maxPerRequest","Max per request (USDC)",{className:"gc-num gc-num--wide"}),x("maxReserve","Max channel reserve (USDC)",{className:"gc-num gc-num--wide"})]}),t.jsx(O,{size:"sm",label:"Base RPC URL",value:a.rpcUrl,error:o.rpcUrl,placeholder:"Chain default",hint:H("payments.rpcUrl","Your own endpoint avoids public rate limits. Saved URLs show without their path; leave them as they are to keep them."),onChange:i=>l("rpcUrl",i.target.value)}),t.jsx(oe,{label:"Fallback RPC URLs",rows:2,mono:!0,value:a.fallbackRpcUrls,error:o.fallbackRpcUrls,hint:"One per line, tried in order.",onChange:i=>l("fallbackRpcUrls",i.target.value)})]}),t.jsxs(F,{title:"Network and timeouts",summary:`Refresh ${Math.round(Number(a.peerRefreshMs)/1e3)} s`,children:[t.jsxs("div",{className:"gc-policy__caps",children:[x("peerRefreshMs","Peer refresh (ms)",{className:"gc-num gc-num--wide"}),x("metadataTimeoutMs","Metadata timeout (ms)",{className:"gc-num gc-num--wide",hint:N("network.metadataFetchTimeoutMs")}),x("requestTimeoutMs","Response start timeout (ms)",{className:"gc-num gc-num--wide"}),x("maxStreamMs","Longest stream (ms)",{className:"gc-num gc-num--wide",hint:N("network.maxStreamDurationMs")})]}),t.jsx(I,{checked:a.perServiceMetadata,onChange:i=>l("perServiceMetadata",i),label:"Per-service attribution in signed metadata",description:N("network.disableMetadataV2Services")??"Tells sellers which service each request used."})]})]})]}),j&&t.jsxs(D,{tone:"warning",title:"Restart the buyer to apply",children:["Saved, but this buyer was not restarted automatically. Restart it (for example ",t.jsx("code",{children:"systemctl restart antseed-buyer"}),", or stop and start ",t.jsx("code",{children:"antseed buyer start"}),") to use the new settings."]}),v&&t.jsx(D,{tone:"warning",title:"Changed elsewhere",action:t.jsxs("div",{className:"gc-inline gc-inline--wrap",children:[t.jsx(y,{size:"sm",variant:"outline",onClick:()=>m(v),children:"Reload"}),t.jsx(y,{size:"sm",variant:"ghost",onClick:()=>{P(v),S(null)},children:"Keep editing"})]}),children:"Someone saved the buyer settings while you were editing them. Reload to see their version (your edits are dropped), or keep editing and save to replace it."}),!b&&f.error?t.jsx($,{error:f.error,title:"Could not save"}):null,t.jsxs("div",{className:"gc-actions",children:[t.jsx("span",{className:"gc-fineprint gc-actions__note",children:q.length===0?"No changes.":_?"Saving restarts the buyer.":"Applies at once, without a restart."}),t.jsx(y,{variant:"ghost",disabled:q.length===0||f.isPending,onClick:()=>m(v??k),children:"Reset"}),t.jsx(y,{disabled:q.length===0||Object.keys(o).length>0||f.isPending,onClick:()=>_?p(!0):f.mutate(),children:f.isPending?"Saving…":"Save"})]}),t.jsx(ie,{isOpen:b,busy:f.isPending,error:f.error,onClose:()=>{p(!1),f.reset()},onConfirm:()=>f.mutate(),title:"Restart the buyer?",confirmLabel:"Save and restart",tone:"primary",body:"These changes need a buyer restart. Requests in flight finish first; new requests wait a few seconds while it reconnects."})]})}const Ge=["general","buyer","observability","tokens","auth"];function Je(){const e=ke();return t.jsx(A,{title:"Gateway",children:t.jsx(z,{query:e,children:s=>t.jsx(le,{items:[["Public URL",s.publicUrl?t.jsx(Pe,{children:s.publicUrl},"u"):t.jsx("span",{className:"gc-muted",children:"Not set. Clients use this console's address."})],["Buyer",s.buyer.reachable?t.jsx(M,{tone:"success",children:"Connected"},"b"):t.jsx(M,{tone:"danger",children:"Unreachable"},"b")],["Sellers seen",String(s.buyer.peers)],["Spend feed",s.spendFeed],["USDC top-ups (x402)",s.x402?"On":"Off"]]})})})}function Ye({settings:e}){const s=e.buyer;return t.jsx(A,{title:"Buyer",description:t.jsxs(t.Fragment,{children:["The top of every routing policy: workspaces, members, keys and presets can only narrow it. Saved to the config file of the buyer on port ",s.proxyPort,ue(s.overrides,"proxyPort")?" (set by its start flags)":"","."]}),children:t.jsx(We,{buyer:s})})}function Xe({settings:e}){const s=re(),r=ne(),n=e.observability,[c,u]=d.useState(n.otlpEndpoint??""),[a,h]=d.useState(De(n.otlpHeaders)),[k,P]=d.useState(n.logContent),[v,S]=d.useState(n.retentionDays===null?"":String(n.retentionDays)),b=c.trim()&&!/^https?:\/\/\S+$/.test(c.trim())?"Use an http:// or https:// URL.":void 0,p=Le(n.otlpEndpoint,c.trim()||null)?_e(a):[],j=p.length?`Enter the value of ${p.join(", ")} again: saved values are not sent to a new endpoint.`:void 0,g=ae({mutationFn:()=>{if(b)throw new Error(b);if(j)throw new Error(j);const l=v===""?null:Number(v);return E.settings.setObservability({otlpEndpoint:c.trim()||null,otlpHeaders:$e(a),logContent:k,retentionDays:l})},onSuccess:l=>{const{restartRequired:m,...o}=l;s.setQueryData(U.settings,o),r(m?"Observability saved. Restart the gateway to apply it.":"Observability saved")},onError:l=>{Te(l,"otlp_headers_required")&&h(Z(a))}});return t.jsx(A,{title:"Observability",description:"Send one OpenTelemetry trace per request, and choose what the request log keeps.",children:t.jsxs("form",{className:"gc-stack",onSubmit:l=>{l.preventDefault(),g.mutate()},children:[t.jsx(O,{label:"OTLP/HTTP endpoint",placeholder:"https://otel.example.com/v1/traces",value:c,error:b,onChange:l=>u(l.target.value)}),t.jsx(oe,{label:"Headers",rows:3,mono:!0,placeholder:"Authorization: Bearer …",value:a,onChange:l=>h(l.target.value),error:j,hint:"One per line, as Name: value. Saved values show as ••••; leave them as they are to keep them (for the same endpoint only)."}),p.length>0&&t.jsx("div",{children:t.jsx(y,{size:"sm",variant:"outline",onClick:()=>h(Z(a)),children:"Clear saved values to re-enter them"})}),t.jsx(I,{checked:k,onChange:P,label:"Store request and response bodies",description:"Off by default. Bodies can contain personal data; only turn this on if you need it."}),t.jsx(B,{label:"Keep the request log for",value:v,onChange:S,options:[{value:"7",label:"7 days"},{value:"30",label:"30 days"},{value:"90",label:"90 days"},{value:"365",label:"1 year"},{value:"",label:"Forever"}]}),g.error?t.jsx($,{error:g.error,title:"Could not save"}):null,t.jsx("div",{className:"gc-actions",children:t.jsx(y,{type:"submit",disabled:g.isPending,children:g.isPending?"Saving…":"Save"})})]})})}function Ze(){const{me:e}=Re(),s=e.member.orgRole==="owner",r=Ce(),[n,c]=d.useState(!1),[u,a]=d.useState(""),[h,k]=d.useState("read"),[P,v]=d.useState("90"),[S,b]=d.useState(null),[p,j]=d.useState(null),g=Q({mutationFn:()=>E.adminTokens.create(u.trim(),h,P==="never"?null:Number(P)),onSuccess:m=>{c(!1),a(""),b(m.secret)},invalidate:[U.adminTokens]}),l=Q({mutationFn:m=>E.adminTokens.revoke(m.id),onSuccess:()=>j(null),invalidate:[U.adminTokens]});return t.jsxs(A,{flush:!0,title:"Management tokens",description:t.jsxs(t.Fragment,{children:["For scripts and CI. Send as ",t.jsx("code",{children:"Authorization: Bearer …"})," to ",t.jsx("code",{children:"/console/api"}),"."]}),actions:t.jsx(y,{size:"sm",leadingIcon:t.jsx(G.plus,{size:14}),onClick:()=>c(!0),children:"New token"}),children:[t.jsx(z,{query:r,children:m=>t.jsx(Fe,{label:"Management tokens",rows:m,rowKey:o=>o.id,rowLabel:o=>o.label,actions:o=>[{label:"Revoke",tone:"danger",onSelect:()=>j(o)}],empty:t.jsx(Ue,{icon:t.jsx(G.keys,{size:18}),title:"No management tokens"}),columns:[{key:"label",header:"Name",render:o=>t.jsx(Ne,{name:o.label,hint:o.hint})},{key:"scope",header:"Scope",render:o=>o.scope==="admin"?t.jsx(M,{tone:"warning",children:"Admin"}):t.jsx(M,{children:"Read only"})},{key:"created",header:"Created",secondary:!0,optional:!0,render:o=>W(o.createdAt)},{key:"expires",header:"Expires",secondary:!0,render:o=>t.jsx(Me,{at:o.expiresAt,format:W})},{key:"used",header:"Last used",secondary:!0,optional:!0,render:o=>Ie(o.lastUsedAt)}]})}),t.jsx(J,{isOpen:n,onClose:()=>c(!1),title:"New management token",children:t.jsxs("form",{className:"gc-stack",onSubmit:m=>{m.preventDefault(),g.mutate()},children:[t.jsx(O,{label:"Name",required:!0,value:u,onChange:m=>a(m.target.value),placeholder:"e.g. Terraform"}),t.jsx(B,{label:"Scope",value:h,onChange:m=>k(m),options:[{value:"read",label:"Read only (GET requests)"},{value:"admin",label:"Admin (everything an org admin can do)"}]}),t.jsx(B,{label:"Expires after",value:P,onChange:v,options:[{value:"30",label:"30 days"},{value:"90",label:"90 days"},{value:"365",label:"1 year"},...s?[{value:"never",label:"Never"}]:[]],hint:"Short-lived tokens limit the damage if one leaks."}),g.error?t.jsx($,{error:g.error,title:"Could not create the token"}):null,t.jsxs("div",{className:"gc-actions",children:[t.jsx(y,{variant:"ghost",onClick:()=>c(!1),children:"Cancel"}),t.jsx(y,{type:"submit",disabled:g.isPending||!u.trim(),children:"Create token"})]})]})}),t.jsx(J,{isOpen:S!==null,onClose:()=>b(null),title:"Token created",children:S&&t.jsxs("div",{className:"gc-stack",children:[t.jsx(qe,{secret:S}),t.jsx("div",{className:"gc-actions",children:t.jsx(y,{onClick:()=>b(null),children:"Done"})})]})}),t.jsx(ie,{isOpen:p!==null,busy:l.isPending,error:l.error,onClose:()=>j(null),onConfirm:()=>p&&l.mutate(p),title:"Revoke this token?",confirmLabel:"Revoke",body:`Anything using ${(p==null?void 0:p.label)??"this token"} loses access immediately.`})]})}function et({settings:e}){const s=e.auth,r=n=>n?t.jsx(M,{tone:"success",children:"On"}):t.jsx(M,{children:"Off"});return t.jsx(A,{title:"Sign-in methods",description:"Configured on the gateway host with environment variables. Read only here.",children:t.jsxs("div",{className:"gc-stack",children:[t.jsx(le,{items:[["Passkeys",r(s.passkey)],["Wallet (Sign-In with Ethereum)",r(s.wallet)],["OpenID Connect",s.oidc?t.jsx(M,{tone:"success",children:s.oidc.label},"o"):r(!1)],["Cloudflare Access",r(s.cloudflareAccess)],["API key view for key holders",r(s.apiKeyLogin)]]}),t.jsx(D,{tone:"info",title:"Using your own identity provider",children:"Set the OpenID Connect issuer, client id and secret in the gateway's environment and restart it, or put the console behind Cloudflare Access and enable trusted Access headers. The gateway docs list the exact variables. Antseed runs no sign-in service of its own."})]})})}function tt({tab:e,settings:s}){return e==="buyer"?t.jsx(Ye,{settings:s}):e==="observability"?t.jsx(Xe,{settings:s}):t.jsx(et,{settings:s})}function pt(){const[e,s]=d.useState(()=>{const n=new URLSearchParams(window.location.search).get("tab");return Ge.includes(n)?n:"general"}),r=Se({queryKey:U.settings,queryFn:E.settings.get});return d.useEffect(()=>{var n;(n=window.scrollTo)==null||n.call(window,0,0)},[e]),t.jsxs("div",{className:"gc-page",children:[t.jsx(je,{title:"Settings"}),t.jsx(Ee,{id:"gc-settings",label:"Settings sections",value:e,onChange:s,tabs:[{id:"general",label:"General"},{id:"buyer",label:"Buyer"},{id:"observability",label:"Observability"},{id:"tokens",label:"Management tokens"},{id:"auth",label:"Sign-in"}]}),t.jsxs(Ae,{tabsId:"gc-settings",tab:e,className:"gc-stack",children:[e==="general"&&t.jsxs(t.Fragment,{children:[t.jsx(Je,{}),t.jsx(we,{})]}),e==="tokens"&&t.jsx(Ze,{}),(e==="buyer"||e==="observability"||e==="auth")&&t.jsx(z,{query:r,children:n=>t.jsx(tt,{tab:e,settings:n})}),r.error&&e==="general"?t.jsx($,{error:r.error}):null]})]})}export{pt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{bk as c,al as l,r as o,j as n,W as u}from"./index-cESr4Zze.js";const m={text:"Text",image:"Image",video:"Video",decision:"Decision"},g={toolUse:"Tool use",reasoning:"Reasoning",structuredOutput:"Structured output",vision:"Vision"};function p(i,s){const t=s.trim().toLowerCase(),r=i??[];return r.find(a=>a.id.toLowerCase()===t)??r.find(a=>a.aliases.some(e=>e.toLowerCase()===t))??null}function f(i){if(i.usdPerImage)return i.usdPerImage.max===0?"Free":`${c(i.usdPerImage)} per image`;const{inputUsdPerMillion:s,outputUsdPerMillion:t}=i;return s===null&&t===null?i.free?"Free":"No price advertised":(s??0)===0&&(t??0)===0?"Free":`${l(s)} in · ${l(t)} out /M`}function x({list:i,panel:s,onClose:t,closeLabel:r="Close panel"}){const a=o.useRef(null);s&&(a.current=s);const e=s??a.current;return n.jsxs(n.Fragment,{children:[i,n.jsx(u,{isOpen:s!==null,onClose:t,closeLabel:r,className:"gc-side-panel",title:(e==null?void 0:e.title)??"",subtitle:e==null?void 0:e.subtitle,eyebrow:e==null?void 0:e.eyebrow,actions:e==null?void 0:e.actions,children:e==null?void 0:e.body})]})}function _({title:i,actions:s,children:t}){return n.jsxs("section",{className:"gc-panel-section",children:[n.jsxs("div",{className:"gc-panel-section__head",children:[n.jsx("h3",{className:"gc-panel-section__title",children:i}),s&&n.jsx("div",{className:"gc-panel-section__actions",children:s})]}),t]})}function j({title:i,meta:s,badges:t,actions:r,selected:a}){return n.jsxs("li",{className:a?"gc-panel-row gc-panel-row--on":"gc-panel-row",children:[n.jsxs("div",{className:"gc-panel-row__main",children:[n.jsx("div",{className:"gc-panel-row__title",children:i}),s&&n.jsx("div",{className:"gc-panel-row__meta",children:s}),t]}),r&&n.jsx("div",{className:"gc-panel-row__actions",children:r})]})}export{g as C,m as M,_ as P,x as S,j as a,p as f,f as p};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,j as s}from"./index-cESr4Zze.js";function _({checked:a,onChange:r,label:l,description:t,disabled:n,className:o}){const c=e.useId(),i=e.useId();return s.jsxs("div",{className:["as-switch",o].filter(Boolean).join(" "),children:[s.jsx("button",{id:c,type:"button",role:"switch","aria-checked":a,"aria-describedby":t?i:void 0,disabled:n,className:a?"as-switch__track as-switch__track--on":"as-switch__track",onClick:()=>r(!a),children:s.jsx("span",{className:"as-switch__thumb"})}),s.jsxs("label",{htmlFor:c,className:"as-switch__text",children:[s.jsx("span",{className:"as-switch__label",children:l}),t&&s.jsx("span",{id:i,className:"as-switch__desc",children:t})]})]})}export{_ as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as S,n as W,p as L,s as I,r as p,t as A,j as s,P as O,B as b,I as z,l as B,Q as F,v as w,M as C,w as N,x as M,y as D,z as E,A as T,C as q,D as V,q as f,f as v,T as P,o as R}from"./index-cESr4Zze.js";import{u as K,a as Q,P as _}from"./PolicyField-CHhm50jF.js";import{l as G,d as H,L as U}from"./limits-D2JvFgaN.js";import{D as J}from"./DataTable-BkJdorEh.js";import"./PolicyEditor-ptFDJhFh.js";import"./PeerPicker-CfsXTUyK.js";import"./SelectField-Cl4acfcI.js";import"./Segmented-D3e0aBDU.js";import"./roving-DkptacxO.js";import"./Switch-B2AEvyu7.js";import"./Disclosure-DMLE7rCw.js";function X({initial:r,onDone:d}){const{viewer:g}=S(),h=W(g),[i,k]=p.useState((r==null?void 0:r.name)??""),[y,x]=p.useState(G(r==null?void 0:r.limits)),[m,c]=p.useState(""),n=K(r==null?void 0:r.routingPolicy),o=Q(),l=A({mutationFn:()=>{const t={name:i.trim(),limits:H(y),routingPolicy:n.build()};return o.save([t.routingPolicy],e=>{if(r){const{limits:a,...j}=t;return v.workspaces.update(r.id,h?{...j,limits:a}:j,e)}return v.workspaces.create(m.trim()?{...t,buyerIdentity:m.trim()}:t,e)})},onSuccess:d,invalidate:[f.group("workspaces"),f.me],toast:r?"Workspace saved":"Workspace created"}),u=r?"Save":"Create workspace";return s.jsxs("form",{className:"gc-stack",onSubmit:t=>{t.preventDefault(),l.mutate()},children:[s.jsx(P,{label:"Name",required:!0,value:i,onChange:t=>k(t.target.value)}),!r&&s.jsx(P,{label:"Buyer identity (optional)",value:m,onChange:t=>c(t.target.value),hint:"Leave blank to create a new wallet for this workspace. Enter an existing identity name to reuse its wallet."}),h?s.jsxs("div",{children:[s.jsx("div",{className:"as-field__label gc-label-row",children:"Workspace budgets (USD)"}),s.jsx(U,{idPrefix:"ws-limit",value:y,onChange:x})]}):s.jsxs("p",{className:"gc-muted",children:["Budgets: ",E(r==null?void 0:r.limits),". Organization admins set them."]}),s.jsx(_,{draft:n.draft,setDraft:n.setDraft}),l.error?s.jsx(R,{error:l.error,title:"Could not save"}):null,s.jsxs("div",{className:"gc-actions",children:[s.jsx(b,{variant:"ghost",onClick:d,children:"Cancel"}),s.jsx(b,{type:"submit",disabled:l.isPending||!i.trim(),children:l.isPending?"Saving…":u})]}),o.dialog]})}function ie(){const{viewer:r,setWorkspaceId:d,workspace:g,me:h}=S(),i=W(r),k=t=>i||h.workspaces.some(e=>e.workspace.id===t.id&&e.role==="admin"),y=L(),x=I(),m=t=>{var e;return(e=x.data)==null?void 0:e.find(a=>a.workspaceId===t.id)},[c,n]=p.useState(null),[o,l]=p.useState(null),u=A({mutationFn:t=>v.workspaces.remove(t.id),onSuccess:()=>l(null),invalidate:[f.group("workspaces"),f.me]});return s.jsxs("div",{className:"gc-page",children:[s.jsx(O,{title:"Workspaces",description:"Each workspace has its own wallet, budgets, routing policy, members and keys.",actions:i&&s.jsx(b,{variant:"brand",leadingIcon:s.jsx(z.plus,{size:14}),onClick:()=>n("new"),children:"New workspace"})}),s.jsx(B,{flush:!0,children:s.jsx(F,{query:y,children:t=>s.jsx(J,{label:"Workspaces",rows:t,rowKey:e=>e.id,rowLabel:e=>e.name,onRowClick:e=>k(e)&&n(e),actions:e=>[e.id!==g.id&&{label:"Open",onSelect:()=>d(e.id)},{label:"Members",onSelect:()=>{d(e.id),D("members")}},k(e)&&{label:"Edit",onSelect:()=>n(e)},i&&!e.isDefault&&{label:"Delete",tone:"danger",onSelect:()=>l(e)}],columns:[{key:"name",header:"Name",sortValue:e=>e.name,render:e=>s.jsxs("span",{className:"gc-strong",children:[e.name," ",e.isDefault&&s.jsx(w,{children:"Default"})," ",e.id===g.id&&s.jsx(w,{tone:"info",children:"Open"})]})},{key:"wallet",header:"Wallet",secondary:!0,render:e=>e.walletAddress?s.jsx(C,{title:e.walletAddress,children:N(e.walletAddress)}):s.jsx("span",{className:"gc-muted",children:e.buyerIdentity})},{key:"operator",header:"Authorized wallet",secondary:!0,render:e=>{const a=m(e);return a?a.relation===null?s.jsx("span",{className:"gc-muted",title:"The wallet or the chain could not be read",children:"unknown"}):M(a)?s.jsxs("span",{className:"gc-inline",children:[s.jsx(w,{tone:"warning",children:"Not set"}),a.canAuthorize&&s.jsx(b,{variant:"link",size:"sm",onClick:j=>{j.stopPropagation(),d(e.id),D("wallet")},children:"Authorize"})]}):a.relation==="self"?s.jsx("span",{className:"gc-muted",children:"Workspace wallet"}):s.jsx(C,{title:a.operator??void 0,children:N(a.operator)}):s.jsx("span",{className:"gc-muted",children:x.isLoading?"…":"—"})}},{key:"members",header:"Members",align:"right",secondary:!0,sortValue:e=>e.memberCount,render:e=>e.memberCount},{key:"keys",header:"Keys",align:"right",sortValue:e=>e.keyCount,render:e=>e.keyCount},{key:"limits",header:"Budgets",secondary:!0,optional:!0,render:e=>s.jsx("span",{className:"gc-muted",children:E(e.limits)})},{key:"policy",header:"Routing",secondary:!0,optional:!0,render:e=>s.jsx("span",{className:"gc-muted",children:T(e.routingPolicy)})}]})})}),s.jsx(q,{isOpen:c!==null,onClose:()=>n(null),size:"lg",title:c==="new"?"New workspace":"Edit workspace",children:c!==null&&s.jsx(X,{initial:c==="new"?null:c,onDone:()=>n(null)})}),s.jsx(V,{isOpen:o!==null,busy:u.isPending,error:u.error,onClose:()=>{l(null),u.reset()},onConfirm:()=>o&&u.mutate(o),title:"Delete this workspace?",confirmLabel:"Delete workspace",body:s.jsxs(s.Fragment,{children:["Deleting ",s.jsx("strong",{children:o==null?void 0:o.name})," is only possible once it has no active keys and no balance. Withdraw funds and revoke keys first."]})})]})}export{ie as default};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{j as n,r as c}from"./index-cESr4Zze.js";import{c as f}from"./Chat-BbM_y6mh.js";import{c as C}from"./bundle-full-idGWmtvy.js";import"./SidePanel-D0rNElh3.js";import"./selection-HN8SZ52c.js";import"./ModelDetails-CkDNU2Px.js";import"./Tabs-Cv10NtDy.js";import"./roving-DkptacxO.js";import"./stored-CETnaQtE.js";import"./Disclosure-DMLE7rCw.js";import"./VerificationLinks-CERoRvCR.js";import"./SelectField-Cl4acfcI.js";import"./clsx-B-dksMZM.js";const j=e=>e&&e&1,v=e=>e&&e&2,N=e=>e&&e&4,T=e=>e.map((t,s)=>({key:`line-${s}`,tokens:t.map((o,r)=>({key:`line-${s}-${r}`,token:o}))})),w=({token:e})=>n.jsx("span",{className:"dark:!bg-[var(--shiki-dark-bg)] dark:!text-[var(--shiki-dark)]",style:{backgroundColor:e.bgColor,color:e.color,fontStyle:j(e.fontStyle)?"italic":void 0,fontWeight:v(e.fontStyle)?"bold":void 0,textDecoration:N(e.fontStyle)?"underline":void 0,...e.htmlStyle},children:e.content}),S=f("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-8","before:mr-4","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),B=({keyedLine:e,showLineNumbers:t})=>n.jsx("span",{className:t?S:"block",children:e.tokens.length===0?`
|
|
2
|
-
`:e.tokens.map(({token:s,key:o})=>n.jsx(w,{token:s},o))}),k=new Map,g=new Map,h=new Map,M=(e,t)=>{const s=e.slice(0,100),o=e.length>100?e.slice(-100):"";return`${t}:${e.length}:${s}:${o}`},L=e=>{const t=k.get(e);if(t)return t;const s=C({langs:[e],themes:["github-light","github-dark"]});return k.set(e,s),s},$=e=>({bg:"transparent",fg:"inherit",tokens:e.split(`
|
|
3
|
-
`).map(t=>t===""?[]:[{color:"inherit",content:t}])}),p=(e,t,s)=>{var i;const o=M(e,t),r=g.get(o);return r||(s&&(h.has(o)||h.set(o,new Set),(i=h.get(o))==null||i.add(s)),L(t).then(a=>{const u=a.getLoadedLanguages().includes(t)?t:"text",l=a.codeToTokens(e,{lang:u,themes:{dark:"github-dark",light:"github-light"}}),d={bg:l.bg??"transparent",fg:l.fg??"inherit",tokens:l.tokens};g.set(o,d);const b=h.get(o);if(b){for(const y of b)y(d);h.delete(o)}}).catch(a=>{console.error("Failed to highlight code:",a),h.delete(o)}),null)},x=c.memo(({tokenized:e,showLineNumbers:t,className:s})=>{const o=c.useMemo(()=>({backgroundColor:e.bg,color:e.fg}),[e.bg,e.fg]),r=c.useMemo(()=>T(e.tokens),[e.tokens]);return n.jsx("pre",{className:f("dark:!bg-[var(--shiki-dark-bg)] dark:!text-[var(--shiki-dark)] m-0 p-4 text-sm",s),style:o,children:n.jsx("code",{className:f("font-mono text-sm",t&&"[counter-increment:line_0] [counter-reset:line]"),children:r.map(i=>n.jsx(B,{keyedLine:i,showLineNumbers:t},i.key))})})},(e,t)=>e.tokenized===t.tokenized&&e.showLineNumbers===t.showLineNumbers&&e.className===t.className);x.displayName="CodeBlockBody";const E=({className:e,language:t,style:s,...o})=>n.jsx("div",{className:f("group relative w-full overflow-hidden rounded-md border bg-background text-foreground",e),"data-language":t,style:{containIntrinsicSize:"auto 200px",contentVisibility:"auto",...s},...o}),R=({code:e,language:t,showLineNumbers:s=!1})=>{const o=c.useMemo(()=>$(e),[e]),r=c.useMemo(()=>p(e,t)??o,[e,t,o]),[i,a]=c.useState(null),m=c.useRef({code:e,language:t});(m.current.code!==e||m.current.language!==t)&&(m.current={code:e,language:t},a(null)),c.useEffect(()=>{let l=!1;return p(e,t,d=>{l||a(d)}),()=>{l=!0}},[e,t]);const u=i??r;return n.jsx("div",{className:"relative overflow-auto",children:n.jsx(x,{showLineNumbers:s,tokenized:u})})},J=({code:e,language:t,showLineNumbers:s=!1,className:o,children:r,...i})=>n.jsxs(E,{className:o,language:t,...i,children:[r,n.jsx(R,{code:e,language:t,showLineNumbers:s})]});export{J as CodeBlock};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{w as o}from"./core-BCJdIbrO.js";import"./index-cESr4Zze.js";import"./index.es-DP9EmOYi.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-sKQksBWU.js";import"./clsx-B-dksMZM.js";import"./index-BhwNCc8y.js";const n=o` <svg fill="none" viewBox="0 0 13 4">
|
|
2
|
-
<path fill="currentColor" d="M.5 0h12L8.9 3.13a3.76 3.76 0 0 1-4.8 0L.5 0Z" />
|
|
3
|
-
</svg>`;export{n as cursorSvg};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{S as d,F as H,a as N}from"./mermaid-MCJ5UELQ-B8uOykea.js";import{r as o,j}from"./index-cESr4Zze.js";import"./bundle-full-idGWmtvy.js";import"./clsx-B-dksMZM.js";import"./Chat-BbM_y6mh.js";import"./SidePanel-D0rNElh3.js";import"./selection-HN8SZ52c.js";import"./ModelDetails-CkDNU2Px.js";import"./Tabs-Cv10NtDy.js";import"./roving-DkptacxO.js";import"./stored-CETnaQtE.js";import"./Disclosure-DMLE7rCw.js";import"./VerificationLinks-CERoRvCR.js";import"./SelectField-Cl4acfcI.js";var q=({code:m,isIncomplete:a=!1,language:e,maxHeight:n,raw:t,className:u,startLine:g,lineNumbers:c,...h})=>{let{shikiTheme:s}=o.useContext(d),r=H(),[x,i]=o.useState(t);return o.useEffect(()=>{if(!r){i(t);return}let p=!0,l=r.highlight({code:m,isIncomplete:a,language:e,themes:s},f=>{p&&i(f)});return l&&i(l),()=>{p=!1}},[m,a,e,s,r,t]),j.jsx(N,{className:u,language:e,lineNumbers:c,maxHeight:n,result:x,startLine:g,...h})};export{q as HighlightedCodeBlockBody};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{at as n,g as o,aw as i,ax as l}from"./index-cESr4Zze.js";function f(e,t){switch(e){case"expected-cost":return t>1?`Ranked by the expected cost of a good answer: price plus waiting time, divided by the success rate this gateway has seen. The ${t} sellers within 30% of the best share the traffic, cheaper and more reliable ones more often.`:"Ranked by the expected cost of a good answer: price plus waiting time, divided by the success rate this gateway has seen. The best seller takes the traffic; no other is close enough to share it.";case"trust":return"Ranked by trust score, highest first. Sellers failing lately go after the healthy ones, and cooling-down sellers last.";case"price":return"Your routing policy sorts by price: cheapest first. Failing and cooling-down sellers still go last.";case"latency":return"Your routing policy sorts by speed: fastest first token first. Failing and cooling-down sellers still go last."}}function a(e){return`${Math.round(e*100)}%`}function u(e){const t=e>=10?Math.round(e):Math.round(e*10)/10;return`${t} recent request${t===1?"":"s"}`}function h(e){if(e.record==="none")return"No requests yet: assumed 80% success until it has answered some.";const t=`${a(e.successRate)} success over ${u(e.observations)}`;return e.record==="other-models"?`${t} on its other models (counted at half weight)`:t}function p(e,t=Date.now()){const r=e.lastFailureReason?`: ${e.lastFailureReason}`:"",s=e.lastFailureAt?`, ${n(e.lastFailureAt,t)}`:"";return e.coolingDown?`Cooling down after failures in a row${r}${s}. Tried last.`:e.failing?`Failing lately${r}${s}. Tried after the healthy sellers.`:null}function d(e){const t=[];return e.ordering==="expected-cost"&&t.push(`${o(e.expectedCostUsd)} expected per good answer`),t.push(h(e)),e.firstTokenMs!==null&&t.push(`${i(e.firstTokenMs)} first token`),e.tokensPerSecond!==null&&t.push(l(e.tokensPerSecond)),e.sharesTraffic&&e.trafficShare!==null&&t.push(`takes ~${a(e.trafficShare)} of the traffic`),e.channel==="open"?t.push("payment channel open"):e.channel==="new"&&t.push("first request opens a payment channel (~5 s)"),e.maxConcurrency!==null&&e.inFlight>=e.maxConcurrency?t.push(`at capacity (${e.inFlight}/${e.maxConcurrency} in flight): tried after sellers with room`):e.inFlight>0&&t.push(`${e.inFlight}${e.maxConcurrency!==null?`/${e.maxConcurrency}`:""} in flight`),t}function g(e){const t=`#${e.rank} of ${e.of} eligible seller${e.of===1?"":"s"}`;switch(e.pick){case"spread":return`Drawn from the ${e.poolSize} sellers sharing this model's traffic (${t}).`;case"best":return`The best seller for this model on its own (${t}).`;case"conversation":return`The seller this conversation stays on, so its prompt cache keeps working (${t}).`;case"exploration":return`A probe: one request in twenty tries a seller with no recent record, so routing keeps learning (${t}).`;case"failover":return`${e.attempt===1?"The seller before it":`The ${e.attempt} sellers before it`} failed this request, so it went to the next one (${t}).`;case"order":return e.attempt>0?`${e.attempt===1?"The seller before it":`The ${e.attempt} sellers before it`} could not take this request (${t}).`:e.routeChainPosition!==null?`Seller #${e.routeChainPosition} in your routing policy's route for this model (${t}).`:e.ordering==="trust"?`The most trusted healthy seller (${t}).`:`First in the order your routing policy sets (${t}).`}}export{p as h,f as o,g as p,h as r,d as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as v,n as b,t as F,q as L,f as D,j as s,L as O,B as f,v as i,O as w,bl as N,w as R}from"./index-cESr4Zze.js";import{o as q,h as z,s as B}from"./selection-HN8SZ52c.js";import{P as y,a as P}from"./SidePanel-D0rNElh3.js";import{D as A}from"./Disclosure-DMLE7rCw.js";function C(n){return n.displayName??R(n.peerId,8,4)}function $({preview:n,loading:o,pin:t,title:j="Seller selection",explainSkipped:c,skippedOpen:S=!1}){var x;const{viewer:k}=v(),I=b(k),p=F({mutationFn:r=>D.network.resetSellerHistory(r),invalidate:[L.group("routing"),["chat-route-preview"]],toast:"History cleared: the seller starts fresh."});if(o)return s.jsx(y,{title:j,children:s.jsx(O,{rows:3})});if(!n)return null;const h=n.candidates.filter(r=>r.eligible).sort((r,e)=>(r.rank??1e9)-(e.rank??1e9)),g=n.candidates.filter(r=>!r.eligible),u=((x=h[0])==null?void 0:x.selection)??null,d=(t==null?void 0:t.peerId)??null;return s.jsxs(y,{title:j,children:[n.modelAllowed?h.length===0?s.jsx("p",{className:"gc-fineprint",children:"No seller passes your routing settings for this model right now."}):s.jsxs("p",{className:"gc-fineprint",children:[d?"Pinned: every request goes to the pinned seller. Without the pin, automatic routing works like this. ":"",u?q(u.ordering,u.poolSize):"Sellers in the order automatic routing tries them; the next one takes over when one fails."]}):s.jsx("p",{className:"gc-fineprint",children:"Your routing policy does not allow this model: requests for it are refused."}),h.length>0&&s.jsx("ol",{className:"gc-panel-rows","aria-label":"Sellers in routing order",children:h.map(r=>{const e=r.selection,m=e?z(e):null,a=d!==null&&d===r.peerId.toLowerCase();return s.jsx(P,{selected:a,title:s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"gc-muted",children:["#",r.rank]})," ",s.jsx(w,{to:N("providers",r.peerId),children:C(r)})]}),meta:e?B(e).map(l=>s.jsx("span",{children:l},l)):r.reasons.map(l=>s.jsx("span",{children:l},l)),badges:((e==null?void 0:e.sharesTraffic)||m||(e==null?void 0:e.stale)||(e==null?void 0:e.channel)==="free"||(e==null?void 0:e.routeChainPosition))&&s.jsxs("div",{className:"gc-stack gc-stack--tight",children:[s.jsxs("div",{className:"gc-badges",children:[(e==null?void 0:e.routeChainPosition)!=null&&s.jsxs(i,{children:["Route #",e.routeChainPosition]}),(e==null?void 0:e.sharesTraffic)&&s.jsx(i,{children:"Shares traffic"}),(e==null?void 0:e.channel)==="free"&&s.jsx(i,{tone:"success",children:"Free"}),e!=null&&e.coolingDown?s.jsx(i,{tone:"warning",children:"Cooling down"}):e!=null&&e.failing?s.jsx(i,{tone:"warning",children:"Failing"}):null,(e==null?void 0:e.stale)&&!e.failing&&!e.coolingDown&&s.jsx(i,{children:e.record==="none"?"New":"Not seen lately"})]}),m&&s.jsx("span",{className:"gc-fineprint",children:m})]}),actions:s.jsxs(s.Fragment,{children:[I&&e&&(e.failing||e.coolingDown)&&s.jsx(f,{size:"sm",variant:"ghost",disabled:p.isPending,title:"Forget what this gateway has seen of the seller, so routing gives it a fresh start",onClick:()=>p.mutate(r.peerId),children:"Reset history"}),t&&s.jsx(f,{size:"sm",variant:a?"outline":"ghost","aria-pressed":a,onClick:()=>t.onChange(a?null:r.peerId.toLowerCase()),children:a?"Pinned":"Pin"})]})},r.peerId)})}),g.length>0&&s.jsx(A,{title:"Not used",summary:`${g.length} seller${g.length===1?"":"s"}`,defaultOpen:S,children:s.jsx("ul",{className:"gc-panel-rows","aria-label":"Sellers automatic routing skips",children:g.map(r=>s.jsx(P,{title:s.jsx(w,{to:N("providers",r.peerId),children:C(r)}),meta:s.jsx("span",{children:r.reasons.join(" · ")||"not eligible"}),badges:c==null?void 0:c(r),actions:t&&s.jsx(f,{size:"sm",variant:"ghost",title:"Pinning skips your routing settings' ranking, not the hard limits",onClick:()=>t.onChange(r.peerId.toLowerCase()),children:"Pin"})},r.peerId))})})]})}function E(n,o){try{const t=localStorage.getItem(n);return t?JSON.parse(t):o}catch{return o}}function M(n,o){try{localStorage.setItem(n,JSON.stringify(o))}catch{}}export{$ as S,E as l,M as s};
|