agent-device
Version:
Open source device layer for AI coding agents: a CLI, MCP server, and typed Node.js API to control mobile, web, TV, and desktop apps on devices and simulators, locally or in the cloud.
1 lines • 670 B
JavaScript
import{r as e}from"./rolldown-runtime.js";import{n as t}from"./plugin-inventory.js";import{r as n}from"./store-legacy.js";import r from"node:crypto";var i=e({providerCredentialFingerprint:()=>a});function a(e,t,n,r){let i=o(e.trim(),t,n,r);return i?s(Object.fromEntries(i.map(e=>[e,t[e]?.trim()?t[e]:void 0]))):void 0}function o(e,r,i,a){return a&&t(a,e,i)||n(r).find(t=>t.agentDevicePlugin.provider===e)?.agentDevicePlugin.credentialVariables}function s(e){let t=Object.entries(e).filter(e=>e[1]!==void 0).sort(([e],[t])=>e.localeCompare(t));if(t.length!==0)return`v1:${r.createHash(`sha256`).update(JSON.stringify(t)).digest(`hex`).slice(0,16)}`}export{a as n,i as t};