UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

3 lines • 690 B
import{l as normalizeOptionalString}from"./string-coerce-CpTFcSwY.mjs";import{_ as resolveClawHubAuthToken,a as isClawHubTelemetryDisabled,b as withClawHubResponse,n as createClawHubError}from"./clawhub-client-BqChQ9oR.mjs"; //!src/infra/clawhub-telemetry.ts async function reportClawHubInstallTelemetry(e,t){const n=normalizeOptionalString(e.token)??await resolveClawHubAuthToken();if(!n||isClawHubTelemetryDisabled())return;const r=t();if(!r)return;await withClawHubResponse({...e,path:`/api/cli/telemetry/install`,method:`POST`,token:n,json:r},async({response:t,url:n,hasToken:r})=>{if(!t.ok)throw await createClawHubError(t,n,r,e.timeoutMs)})}export{reportClawHubInstallTelemetry as t};