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 • 995 B
JavaScript
const e=/^(warn|warning|error):\s+/,t=[/^!,\s+/,e,/\b(?:possible\s+)?unhandled (?:promise )?rejection\b/],n=[`open debugger to view warnings`,`getsnapshot should be cached to avoid an infinite loop`,`unique "key" prop`,`unique 'key' prop`,`virtualizedlists should never be nested`,`failed prop type`];function r(e){return a(e.label?.trim())&&u(e.rect)}function i(e,t){let n=e.label?.trim();return!n||!r(e)?!1:t.some(e=>e.label?.trim()===n&&l(e))}function a(e){let r=e?.trim().toLowerCase();return r?n.some(e=>r.includes(e))||t.some(e=>e.test(r)):!1}function o(r){let i=r?.trim().toLowerCase();return!i||!a(i)?!1:n.some(e=>i.includes(e))||t.some(t=>t!==e&&t.test(i))}function s(e){return/^dismiss(?:\s*\([^)]*\))?$/i.test(e)}function c(e){return/^minimi[sz]e(?:\b|\s|\()/i.test(e)}function l(e){return e.rect?e.rect.width>=120&&e.rect.height>=36&&e.rect.height<=180:!1}function u(e){return e?e.x<=1&&e.y<=1&&e.width>=300&&e.height>=600:!1}export{i as a,r as i,o as n,s as o,a as r,c as s,l as t};