@opsydyn/oxlint-effect 0.5.0 → 0.7.0

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/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import{definePlugin as e,defineRule as t}from"@oxlint/plugins";function n(e,t){return typeof e==`object`&&!!e&&e.type===`Identifier`&&typeof e.name==`string`&&(t===void 0||e.name===t)}function r(e,t,r){if(typeof e!=`object`||!e)return!1;let i=e;return i.type===`MemberExpression`&&i.computed!==!0&&n(i.object,t)&&n(i.property,r)}function i(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.type===`CallExpression`&&Array.isArray(t.arguments)&&typeof t.callee==`object`&&t.callee!==null&&t.callee.type===`MemberExpression`&&t.callee.computed!==!0&&n(t.callee.object,`Effect`)&&n(t.callee.property)}function a(e){return e.arguments[0]}function o(e,t){if(!i(e))return!1;let r=e.callee;return n(r.property,t)}function ee(e){if(!i(e))return!1;let t=a(e);return i(t)?i(a(t)):!1}function te(e){return i(e)?e.arguments.slice(0,2).some(e=>i(e)):!1}function s(e,t){return o(e,t)?!0:Array.isArray(e)?e.some(e=>s(e,t)):typeof e!=`object`||!e?!1:Object.values(e).some(e=>s(e,t))}function ne(e){if(o(e,`flatMap`)&&s(e.arguments,`flatMap`))return`Rule: avoid nested Effect.flatMap. Why: it hides sequencing and pushes laddered control flow. Fix: build context once (Effect.all/Effect.map) and run a single flatMap.`;if(o(e,`flatten`)&&s(a(e),`map`))return`Rule: avoid map+flatten ladders. Why: they hide sequencing. Fix: build context once (Effect.all/Effect.map) and run a single flatMap.`}const re=[`flatMap`,`zipRight`,`as`,`tap`];function ie(e){if(!o(e,`orElse`))return!1;let t=a(e);return re.some(e=>s(t,e))}function c(e){if(typeof e!=`object`||!e)return!1;let t=e;if(t.type!==`CallExpression`)return!1;if(n(t.callee,`pipe`))return!0;let r=t.callee;return typeof r==`object`&&!!r&&r.type===`MemberExpression`&&r.computed!==!0&&n(r.property,`pipe`)}function ae(e,t=new WeakSet){return c(e)?!0:Array.isArray(e)?e.some(e=>ae(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&ae(n,t)))}function oe(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.type===`CallExpression`&&Array.isArray(t.arguments)&&typeof t.callee==`object`&&t.callee!==null&&t.callee.type===`ArrowFunctionExpression`}function se(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.type===`CallExpression`&&Array.isArray(t.arguments)&&typeof t.callee==`object`&&t.callee!==null&&(t.callee.type===`ArrowFunctionExpression`||t.callee.type===`FunctionExpression`)}function l(e,t=new WeakSet){if(oe(e))return e;if(Array.isArray(e)){for(let n of e){let e=l(n,t);if(e)return e}return}if(!(typeof e!=`object`||!e)&&!t.has(e)){t.add(e);for(let[n,r]of Object.entries(e)){if(n===`parent`)continue;let e=l(r,t);if(e)return e}}}function u(e,t=new WeakSet){return Array.isArray(e)?e.flatMap(e=>u(e,t)):typeof e!=`object`||!e||t.has(e)?[]:(t.add(e),e.type===`ReturnStatement`?[e]:Object.entries(e).flatMap(([e,n])=>e===`parent`?[]:u(n,t)))}function ce(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.type===`CallExpression`&&(r(t.callee,`S`,`filter`)||r(t.callee,`Schema`,`filter`))}function le(e){if(typeof e!=`object`||!e)return[];let t=e;return t.type!==`CallExpression`||!Array.isArray(t.arguments)||ce(t)?[]:t.arguments.flatMap(e=>{if(typeof e!=`object`||!e||e.type!==`ArrowFunctionExpression`)return[];let t=e.body;return typeof t!=`object`||!t||t.type!==`BlockStatement`?[]:u(t)})}function ue(e){if(typeof e!=`object`||!e)return[];let t=e;return t.type!==`CallExpression`||!Array.isArray(t.arguments)?[]:t.arguments.flatMap(e=>typeof e!=`object`||!e||e.type!==`FunctionExpression`||e.generator===!0?[]:u(e.body))}function de(e){return typeof e==`object`&&!!e&&e.type===`FunctionExpression`&&e.generator===!0}function d(e,t){if(!o(e,t))return;let n=a(e);return de(n)?n:void 0}function fe(e,t){return d(e,t)!==void 0}function pe(e,t=new WeakSet){if(Array.isArray(e)){for(let n of e){let e=pe(n,t);if(e)return e}return}if(!(typeof e!=`object`||!e)&&!t.has(e)){if(t.add(e),e.type===`YieldExpression`&&e.delegate!==!0)return e;for(let[n,r]of Object.entries(e)){if(n===`parent`)continue;let e=pe(r,t);if(e)return e}}}function me(e){let t=d(e,`gen`);return t?pe(t.body):void 0}function he(e,t=new WeakSet){return Array.isArray(e)?e.flatMap(e=>he(e,t)):typeof e!=`object`||!e||t.has(e)?[]:(t.add(e),e.type===`YieldExpression`&&e.delegate===!0&&c(e.argument)?[e]:Object.entries(e).flatMap(([e,n])=>e===`parent`?[]:he(n,t)))}function ge(e){let t=d(e,`gen`);if(!t)return;let n=he(t.body);return n.length>=2?n[1]:void 0}function f(e,t,n=new WeakSet){return Array.isArray(e)?e.some(e=>f(e,t,n)):typeof e!=`object`||!e||n.has(e)?!1:(n.add(e),e.type===t?!0:Object.entries(e).some(([e,r])=>e!==`parent`&&f(r,t,n)))}function p(e,t,r=new WeakSet){return n(e,t)?!0:Array.isArray(e)?e.some(e=>p(e,t,r)):typeof e!=`object`||!e||r.has(e)?!1:(r.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&p(n,t,r)))}function m(e,t=new WeakSet){return i(e)?!0:Array.isArray(e)?e.some(e=>m(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&m(n,t)))}function _e(e){if(typeof e!=`object`||!e||e.type!==`VariableDeclaration`)return;let t=e.declarations;if(!Array.isArray(t)||t.length!==1)return;let r=t[0];if(!(typeof r!=`object`||!r||r.type!==`VariableDeclarator`||!n(r.id)||typeof r.init!=`object`||r.init===null||r.init.type!==`YieldExpression`||r.init.delegate!==!0))return r.id.name}function ve(e,t){if(typeof e!=`object`||!e||e.type!==`ReturnStatement`)return!1;let r=e.argument;return r!==void 0&&!n(r,t)&&!f(r,`YieldExpression`)&&!f(r,`AwaitExpression`)&&!m(r)&&!p(r,`Promise`)}function ye(e){let t=d(e,`gen`);if(!t||typeof t.body!=`object`||t.body===null)return;let n=t.body,r=Array.isArray(n.body)?n.body:[];if(r.length!==2)return;let i=_e(r[0]);return i&&ve(r[1],i)?e:void 0}const be=new Set([`andThen`,`flatMap`,`tap`,`zipRight`]);function xe(e){if(typeof e!=`object`||!e||e.type!==`CallExpression`)return[];let t=e,r=Array.isArray(t.arguments)?t.arguments:[];if(n(t.callee,`pipe`))return r.slice(1);let i=t.callee;return typeof i==`object`&&i&&i.type===`MemberExpression`&&i.computed!==!0&&n(i.property,`pipe`)?r:[]}function Se(e){if(!i(e))return!1;let t=e.callee.property;return n(t)&&be.has(t.name)}function Ce(e){if(c(e))return xe(e).filter(e=>Se(e)).length>=3?e:void 0}function h(e){return typeof e==`object`&&!!e&&e.type===`CallExpression`&&Array.isArray(e.arguments)&&n(e.callee,`flow`)}function we(e){return h(e)&&e.arguments.length>=5}function Te(e,t=new WeakSet){return typeof e==`object`&&e&&(e.type===`ArrowFunctionExpression`||e.type===`FunctionExpression`)&&e.async===!0?!0:Array.isArray(e)?e.some(e=>Te(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&Te(n,t)))}function Ee(e){return m(e)||f(e,`YieldExpression`)||f(e,`AwaitExpression`)||Te(e)||O(e)||p(e,`Promise`)||p(e,`Runtime`)}function De(e){if(h(e))return e.arguments.find(e=>Ee(e))}function Oe(e){if(!(typeof e!=`object`||!e||e.type!==`CallExpression`))return(e.arguments??[]).find(e=>h(e)&&e.arguments.length>=3)}const ke=new Set([`annotateLogs`,`as`,`catchAll`,`catchSome`,`catchTag`,`map`,`mapBoth`,`provide`,`retry`,`tap`,`tapError`,`timeout`,`timeoutFail`,`withSpan`]);function g(e){if(!i(e))return!1;let t=e.callee.property;return n(t)&&ke.has(t.name)}function Ae(e){return i(e)||c(e)}function je(e){if(!g(e))return;let t=e.arguments[0];return Ae(t)?e:void 0}function Me(e){return typeof e!=`object`||!e||e.type!==`YieldExpression`||e.delegate!==!0||!c(e.argument)?!1:xe(e.argument).some(e=>g(e))}function Ne(e,t=new WeakSet){return Array.isArray(e)?e.flatMap(e=>Ne(e,t)):typeof e!=`object`||!e||t.has(e)?[]:(t.add(e),Me(e)?[e]:Object.entries(e).flatMap(([e,n])=>e===`parent`?[]:Ne(n,t)))}function Pe(e){let t=d(e,`gen`);if(!t)return;let n=Ne(t.body);return n.length>=2?n[1]:void 0}function Fe(e){if(!c(e))return;let t=xe(e);if(!t.some(e=>g(e)))return;let n=t.filter(e=>Se(e)).length,r=t.some(e=>f(e,`IfStatement`)||f(e,`SwitchStatement`)||f(e,`ForStatement`)||f(e,`ForInStatement`)||f(e,`ForOfStatement`)||f(e,`WhileStatement`));return n>=2||r?e:void 0}function _(e,t=new Set,n=new WeakSet){if((o(e,`gen`)||Se(e))&&t.add(`workflow`),h(e)&&t.add(`pure`),g(e)&&t.add(`behavior`),(D(e,`Layer`)||r(e,`Layer`,`pipe`))&&t.add(`layer`),Array.isArray(e)){for(let r of e)_(r,t,n);return t}if(typeof e!=`object`||!e||n.has(e))return t;n.add(e);for(let[r,i]of Object.entries(e))r!==`parent`&&_(i,t,n);return t}function v(e){return typeof e==`object`&&!!e&&(e.type===`FunctionDeclaration`||e.type===`FunctionExpression`||e.type===`ArrowFunctionExpression`)}function Ie(e){if(!v(e))return;let t=e.body;return _(t).size>=3?e:void 0}function Le(e,t=new WeakSet){if(Array.isArray(e))return e.reduce((e,n)=>Math.max(e,Le(n,t)),0);if(typeof e!=`object`||!e||t.has(e))return 0;t.add(e);let n=Object.entries(e).reduce((e,[n,r])=>n===`parent`?e:Math.max(e,Le(r,t)),0);return e.type===`CallExpression`?n+1:n}function Re(e){if(typeof e!=`object`||!e||e.type!==`CallExpression`)return;let t=_(e),n=se(e)||l(e)!==void 0;return t.size>=2&&(Le(e)>=4||n)?e:void 0}function ze(e){if(typeof e!=`object`||!e||e.type!==`CallExpression`)return;let t=e;for(let e of t.arguments??[]){if(typeof e!=`object`||!e||!v(e))continue;let t=e.body;if(typeof t==`object`&&t&&t.type===`BlockStatement`&&Array.isArray(t.body)&&t.body.length>=3)return e}}function Be(e){return r(e,`Effect`,`Service`)?!0:typeof e!=`object`||!e||e.type!==`CallExpression`?!1:Be(e.callee)}function Ve(e){if(typeof e!=`object`||!e||e.type!==`CallExpression`)return;let t=e;if(Be(t.callee))return[...t.arguments??[]].reverse().find(e=>typeof e==`object`&&!!e&&e.type===`ObjectExpression`)}function y(e){if(!(typeof e!=`object`||!e||e.type!==`ClassDeclaration`))return Ve(e.superClass)}function He(e){return D(e,`Context`,`Tag`)||D(e,`Context`,`GenericTag`)}function Ue(e,t=new WeakSet){return D(e,`Layer`,`provide`)?!0:Array.isArray(e)?e.some(e=>Ue(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&Ue(n,t)))}function We(e){return H(V(e,`accessors`),!0)}function Ge(e){if(!X(Y(e)??``))return;let t=typeof e==`object`&&e?e.specifiers:void 0;return Array.isArray(t)?t.find(e=>typeof e==`object`&&!!e&&e.type===`ImportNamespaceSpecifier`):void 0}function Ke(e){return typeof e==`object`&&!!e&&e.type===`YieldExpression`&&e.delegate===!0&&n(e.argument)&&e.argument.name.endsWith(`Service`)}function b(e,t,n=new WeakSet){if(t(e))return e;if(Array.isArray(e)){for(let r of e){let e=b(r,t,n);if(e)return e}return}if(!(typeof e!=`object`||!e)&&!n.has(e)){n.add(e);for(let[r,i]of Object.entries(e)){if(r===`parent`)continue;let e=b(i,t,n);if(e)return e}}}function qe(e){if(!V(e,`dependencies`))return b(V(e,`effect`)??V(e,`scoped`),Ke)}function Je(e){if(!D(e,`Layer`))return!1;let t=e.callee.property;return n(t)&&(t.name===`provide`||t.name.startsWith(`merge`))}function Ye(e){if(typeof e!=`object`||!e||e.type!==`FunctionDeclaration`)return!1;let t=e.id;return n(t)&&/(handler|route|request)$/i.test(t.name)}function Xe(e){if(Ye(e))return b(e.body,Je)?e:void 0}function Ze(e){if(D(e,`Layer`,`provide`))return b(a(e),t=>t!==e&&D(t,`Layer`,`provide`))}function Qe(e){return o(e,`provide`)||D(e,`Layer`,`provide`)}function $e(e){let t=d(e,`gen`);return t?b(t.body,Qe):void 0}function et(e){if(D(e,`Layer`,`merge`))return e.arguments?.find(t=>b(t,t=>t!==e&&D(t,`Layer`,`merge`)))}function tt(e){return n(e)&&/(Layer|Live)$/.test(e.name)}function nt(e){if(!(typeof e!=`object`||!e||e.type!==`VariableDeclaration`))return e.declarations?.find(e=>typeof e==`object`&&!!e&&tt(e.id)&&b(e.init,Qe))}function rt(e){return v(e)?ln(fn(e),`Promise`)||w(e.body)!==void 0:!1}function it(e){return typeof e==`object`&&!!e&&e.type===`Property`&&rt(e.value)}function at(e){return b(e,it)}function ot(e){if(typeof e!=`object`||!e||e.type!==`ObjectExpression`)return!1;let t=e.properties;return Array.isArray(t)&&t.some(e=>typeof e==`object`&&!!e&&e.type===`Property`&&(v(e.value)||o(e.value,`fn`)))}function st(e){if(typeof e!=`object`||!e)return;let t=e.declaration;if(!(typeof t!=`object`||!t)&&t.type===`VariableDeclaration`){for(let e of t.declarations??[])if(typeof e==`object`&&e&&n(e.id)&&e.id.name.endsWith(`Service`)&&ot(e.init))return e}}function ct(e){return typeof e==`object`&&!!e&&(e.type===`ArrowFunctionExpression`||e.type===`FunctionExpression`)&&e.async===!0}const x=new Set([`andThen`,`catchAll`,`catchTag`,`filterOrFail`,`flatMap`,`forEach`,`map`,`orElse`,`tap`]);function lt(e){if(!i(e))return;let t=e.callee.property;if(!(!n(t)||!x.has(t.name)))return e.arguments.find(e=>ct(e))}function S(e,t=new WeakSet){if(Array.isArray(e)){for(let n of e){let e=S(n,t);if(e)return e}return}if(!(typeof e!=`object`||!e)&&!t.has(e)){if(t.add(e),e.type===`ThrowStatement`)return e;for(let[n,r]of Object.entries(e)){if(n===`parent`)continue;let e=S(r,t);if(e)return e}}}function ut(e){let t=d(e,`gen`);if(t)return S(t.body);if(!i(e))return;let r=e.callee.property;if(!(!n(r)||!x.has(r.name)))for(let t of e.arguments){let e=R(t),n=e?S(e):void 0;if(n)return n}}function C(e,t=new WeakSet){if(Array.isArray(e)){for(let n of e){let e=C(n,t);if(e)return e}return}if(!(typeof e!=`object`||!e)&&!t.has(e)){if(t.add(e),e.type===`TryStatement`)return e;for(let[n,r]of Object.entries(e)){if(n===`parent`)continue;let e=C(r,t);if(e)return e}}}function dt(e){let t=d(e,`gen`);if(t)return C(t.body);if(!i(e))return;let r=e.callee.property;if(!(!n(r)||!x.has(r.name)))for(let t of e.arguments){let e=R(t),n=e?C(e):void 0;if(n)return n}}function ft(e){return D(e,`Promise`,`all`)||D(e,`Promise`,`allSettled`)||D(e,`Promise`,`any`)||D(e,`Promise`,`race`)||D(e,`Promise`,`reject`)||D(e,`Promise`,`resolve`)}function pt(e){if(typeof e!=`object`||!e||e.type!==`CallExpression`)return!1;let t=e.callee;return typeof t==`object`&&!!t&&t.type===`MemberExpression`&&t.computed!==!0&&(n(t.property,`then`)||n(t.property,`catch`)||n(t.property,`finally`))}function w(e,t=new WeakSet){if(Array.isArray(e)){for(let n of e){let e=w(n,t);if(e)return e}return}if(!(typeof e!=`object`||!e)&&!t.has(e)){if(t.add(e),ft(e)||pt(e))return e;for(let[n,r]of Object.entries(e)){if(n===`parent`)continue;let e=w(r,t);if(e)return e}}}function mt(e){let t=d(e,`gen`);if(t)return w(t.body);if(!i(e))return;let r=e.callee.property;if(!(!n(r)||!x.has(r.name)))for(let t of e.arguments){let e=R(t),n=e?w(e):void 0;if(n)return n}}const ht=new Set([`all`,`allSettled`,`any`,`race`]);function gt(e){if(typeof e!=`object`||!e||e.type!==`CallExpression`)return!1;let t=e.callee;return typeof t==`object`&&!!t&&t.type===`MemberExpression`&&t.computed!==!0&&n(t.object,`Promise`)&&n(t.property)&&ht.has(t.property.name)}function T(e,t=new WeakSet){if(Array.isArray(e)){for(let n of e){let e=T(n,t);if(e)return e}return}if(!(typeof e!=`object`||!e)&&!t.has(e)){if(t.add(e),gt(e))return e;for(let[n,r]of Object.entries(e)){if(n===`parent`)continue;let e=T(r,t);if(e)return e}}}function _t(e){let t=d(e,`gen`);if(t)return T(t.body);if(o(e,`sync`)){let t=R(a(e));return t?T(t):void 0}if(!i(e))return;let r=e.callee.property;if(!(!n(r)||!x.has(r.name)))for(let t of e.arguments){let e=R(t),n=e?T(e):void 0;if(n)return n}}function vt(e){if(typeof e!=`object`||!e)return!1;let t=e;return(t.type===`ArrowFunctionExpression`||t.type===`FunctionExpression`)&&Array.isArray(t.params)&&t.params.length>0}function yt(e){if(!o(e,`tryPromise`))return!1;let t=a(e);return vt(t)?!0:vt(V(t,`try`))}function bt(e){return o(e,`promise`)?!0:o(e,`tryPromise`)&&!yt(e)}function xt(e){if(!o(e,`timeout`))return;let t=a(e);return bt(t)?t:void 0}const St=new Set([`crypto`,`fs`,`zlib`]);function Ct(e){if(typeof e!=`object`||!e||e.type!==`CallExpression`)return!1;let t=e.callee;if(n(t))return t.name.endsWith(`Sync`);if(typeof t!=`object`||!t||t.type!==`MemberExpression`||t.computed===!0||!n(t.object)||!n(t.property))return!1;let r=t.object.name,i=t.property.name;return St.has(r)&&i.endsWith(`Sync`)}function E(e,t=new WeakSet){if(Array.isArray(e)){for(let n of e){let e=E(n,t);if(e)return e}return}if(!(typeof e!=`object`||!e)&&!t.has(e)){if(t.add(e),Ct(e))return e;for(let[n,r]of Object.entries(e)){if(n===`parent`)continue;let e=E(r,t);if(e)return e}}}function wt(e){let t=d(e,`gen`);if(t)return E(t.body);if(o(e,`sync`)){let t=R(a(e));return t?E(t):void 0}}const Tt=new Set([`runCallback`,`runFork`,`runPromise`,`runPromiseExit`,`runSync`,`runSyncExit`]);function Et(e){if(!i(e))return!1;let t=e.callee.property;return n(t)&&Tt.has(t.name)}function Dt(e){return r(e,`Effect`,`orDie`)||r(e,`Effect`,`orDieWith`)||o(e,`orDie`)||o(e,`orDieWith`)}function Ot(e){if(Dt(e))return e;if(c(e))return I(e).find(e=>Dt(e))}function kt(e){return o(e,`succeed`)||o(e,`asVoid`)||o(e,`ignore`)||Wn(e)}function At(e){if(!o(e,`catchAll`))return;let t=R(a(e));return kt(t)?t:void 0}function jt(e){return r(e,`Effect`,`ignore`)||o(e,`ignore`)}function Mt(e){if(jt(e))return e;if(c(e))return I(e).find(e=>jt(e))}function Nt(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.type===`CallExpression`&&typeof t.callee==`object`&&t.callee!==null&&t.callee.type===`MemberExpression`&&t.callee.computed!==!0&&n(t.callee.object,`console`)&&n(t.callee.property)}function Pt(e,t){if(typeof e!=`object`||!e)return!1;let r=e;return r.type===`CallExpression`&&n(r.callee,t)}function D(e,t,r){if(typeof e!=`object`||!e)return!1;let i=e;return i.type===`CallExpression`&&typeof i.callee==`object`&&i.callee!==null&&i.callee.type===`MemberExpression`&&i.callee.computed!==!0&&n(i.callee.object,t)&&n(i.callee.property)&&(r===void 0||n(i.callee.property,r))}function Ft(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.type!==`CallExpression`||typeof t.callee!=`object`||t.callee===null||t.callee.type!==`MemberExpression`||t.callee.computed===!0||!n(t.callee.object,`Effect`)||!n(t.callee.property)?!1:t.callee.property.name.startsWith(`log`)}function O(e,t=new WeakSet){return Nt(e)?!0:Array.isArray(e)?e.some(e=>O(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&O(n,t)))}function k(e,t=new WeakSet){return Pt(e,`setState`)||D(e,`Atom`,`set`)||Pt(e,`invalidate`)||Ft(e)||Nt(e)?!0:Array.isArray(e)?e.some(e=>k(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&k(n,t)))}function A(e,t=new WeakSet){return D(e,`Ref`,`set`)||D(e,`Atom`,`set`)||D(e,`SubscriptionRef`,`set`)||D(e,`Reactivity`,`invalidate`)||D(e,`Fiber`,`interrupt`)||Ft(e)?!0:Array.isArray(e)?e.some(e=>A(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&A(n,t)))}function It(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.type!==`ObjectExpression`||!Array.isArray(t.properties)?!1:t.properties.some(e=>{if(typeof e!=`object`||!e)return!1;let t=e,r=t.key,i=t.value;return(n(r,`concurrency`)||typeof r==`object`&&!!r&&r.value===`concurrency`)&&typeof i==`object`&&!!i&&(i.type===`Literal`||i.type===`NumericLiteral`)&&i.value===1})}function Lt(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.type!==`ObjectExpression`||!Array.isArray(t.properties)?!1:t.properties.some(e=>{if(typeof e!=`object`||!e)return!1;let t=e.key;return n(t,`concurrency`)||typeof t==`object`&&!!t&&t.value===`concurrency`})}function Rt(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.type===`CallExpression`&&typeof t.callee==`object`&&t.callee!==null&&t.callee.type===`MemberExpression`&&t.callee.computed!==!0&&n(t.callee.property,`map`)}function zt(e){return o(e,`all`)&&Rt(a(e))&&!Lt(e.arguments[1])}function j(e,t=new WeakSet){if(o(e,`fork`))return e;if(Array.isArray(e)){for(let n of e){let e=j(n,t);if(e)return e}return}if(!(typeof e!=`object`||!e)&&!t.has(e)){t.add(e);for(let[n,r]of Object.entries(e)){if(n===`parent`)continue;let e=j(r,t);if(e)return e}}}function M(e,t,r=new WeakSet){if(i(e)){let r=e.callee.property;if(n(r)&&t.has(r.name))return!0}return Array.isArray(e)?e.some(e=>M(e,t,r)):typeof e!=`object`||!e||r.has(e)?!1:(r.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&M(n,t,r)))}const Bt=new Set([`acquireRelease`,`acquireUseRelease`,`ensuring`,`forkIn`,`forkScoped`,`scoped`]);function Vt(e){return!o(e,`race`)&&!o(e,`raceAll`)?!1:!M(e.arguments,Bt)}function Ht(e){return o(e,`forEach`)&&!Lt(e.arguments[2])}const Ut=new Set([`retry`]);function Wt(e){return(zt(e)||Ht(e))&&M(e.arguments,Ut)}function N(e){if(typeof e!=`object`||!e||e.type!==`VariableDeclaration`)return[];let t=e.declarations;return Array.isArray(t)?t.flatMap(e=>{if(typeof e!=`object`||!e)return[];let t=e.id;return n(t)?[t.name]:[]}):[]}function P(e,t=new Set,n=new WeakSet){if(Array.isArray(e)){for(let r of e)P(r,t,n);return t}if(typeof e!=`object`||!e||n.has(e))return t;if(n.add(e),e.type===`VariableDeclaration`)for(let n of N(e))t.add(n);for(let[r,i]of Object.entries(e))r!==`parent`&&P(i,t,n);return t}const Gt=new Set([`add`,`clear`,`delete`,`pop`,`push`,`reverse`,`set`,`shift`,`sort`,`splice`,`unshift`]);function Kt(e){if(typeof e!=`object`||!e)return;let t=e;if(t.type===`AssignmentExpression`&&n(t.left))return t.left.name;if(t.type===`UpdateExpression`&&n(t.argument))return t.argument.name;if(t.type===`CallExpression`&&typeof t.callee==`object`&&t.callee!==null&&t.callee.type===`MemberExpression`&&t.callee.computed!==!0&&n(t.callee.object)&&n(t.callee.property)&&Gt.has(t.callee.property.name))return t.callee.object.name}function F(e,t,n=P(e),r=new WeakSet){if(Array.isArray(e)){for(let i of e){let e=F(i,t,n,r);if(e)return e}return}if(typeof e!=`object`||!e||r.has(e))return;r.add(e);let i=Kt(e);if(i&&t.has(i)&&!n.has(i))return e;for(let[i,a]of Object.entries(e)){if(i===`parent`)continue;let e=F(a,t,n,r);if(e)return e}}function qt(e){if(o(e,`fork`)||o(e,`all`)||o(e,`forEach`))return e.arguments}const Jt=new Set([`all`,`forEach`,`fork`,`race`,`raceAll`]);function Yt(e,t=new WeakSet){return M(e,Jt)||D(e,`Queue`,`take`)?!0:Array.isArray(e)?e.some(e=>Yt(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&Yt(n,t)))}function Xt(e){return o(e,`uninterruptible`)&&Yt(e.arguments[0])}function Zt(e){return D(e,`Queue`,`unbounded`)||D(e,`PubSub`,`unbounded`)}function Qt(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.type===`ObjectExpression`||t.type===`ArrayExpression`||t.type===`NewExpression`&&(n(t.callee,`Map`)||n(t.callee,`Set`))||t.type===`CallExpression`&&(n(t.callee,`Map`)||n(t.callee,`Set`))}function $t(e){if(typeof e!=`object`||!e||e.type!==`VariableDeclaration`)return[];let t=e,r=Array.isArray(t.declarations)?t.declarations:[];return t.kind===`let`||t.kind===`var`?N(e):r.flatMap(e=>{if(typeof e!=`object`||!e)return[];let t=e.id;return n(t)&&Qt(e.init)?[t.name]:[]})}function en(e){if(typeof e!=`object`||!e||e.type!==`VariableDeclarator`)return;let t=e;return n(t.id)&&o(t.init,`fork`)?t.id.name:void 0}const tn=new Set([`await`,`interrupt`,`join`]);function nn(e){if(typeof e!=`object`||!e||e.type!==`CallExpression`)return;let t=e,r=t.callee;if(typeof r!=`object`||!r||r.type!==`MemberExpression`||r.computed===!0||!n(r.object,`Fiber`)||!n(r.property)||!tn.has(r.property.name)||!Array.isArray(t.arguments))return;let[i]=t.arguments;return n(i)?i.name:void 0}function rn(e){return r(e,`Effect`,`asVoid`)||D(e,`Effect`,`asVoid`)}function an(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.type!==`CallExpression`||!Array.isArray(t.arguments)||typeof t.callee!=`object`||t.callee===null||t.callee.type!==`MemberExpression`||t.callee.computed===!0||!n(t.callee.property,`pipe`)?!1:o(t.callee.object,`all`)&&t.arguments.some(e=>rn(e))}function I(e){if(typeof e!=`object`||!e||!c(e))return[];let t=e;return n(t.callee,`pipe`)?t.arguments:[t.callee.object,...t.arguments]}function on(e){let[t]=I(e);return t!==void 0&&G(t)}function sn(e){if(on(e))return!0;if(typeof e==`object`&&e&&e.type===`ArrowFunctionExpression`){let t=e.body;return i(t)||on(t)}return!1}function cn(e){return u(e).some(e=>typeof e==`object`&&!!e&&(sn(e.argument)||i(e.argument)))}function L(e,t,r){if(typeof e!=`object`||!e||e.type!==`TSTypeReference`)return!1;let i=e.typeName;return typeof i==`object`&&!!i&&i.type===`TSQualifiedName`&&n(i.left,t)&&n(i.right,r)}function ln(e,t){return typeof e==`object`&&!!e&&e.type===`TSTypeReference`&&n(e.typeName,t)}function un(e){if(typeof e!=`object`||!e)return[];let t=e.typeParameters??e.typeArguments;if(typeof t!=`object`||!t)return[];let n=t.params??t.arguments;return Array.isArray(n)?n:[]}function dn(e){return n(e,`Error`)||ln(e,`Error`)}function fn(e){if(typeof e!=`object`||!e)return;let t=e.returnType;if(!(typeof t!=`object`||!t))return t.typeAnnotation??t}function pn(e){let t=fn(e);if(!L(t,`Effect`,`Effect`))return;let[,n]=un(t);return dn(n)?t:void 0}function mn(e){if(typeof e!=`object`||!e)return;let t=e;if(t.type!==`ExportNamedDeclaration`&&t.type!==`ExportDefaultDeclaration`)return;let n=t.declaration;if(!(typeof n!=`object`||!n)){if(n.type===`FunctionDeclaration`)return pn(n);if(n.type===`VariableDeclaration`)for(let e of n.declarations??[]){if(typeof e!=`object`||!e)continue;let t=e.init;if(typeof t==`object`&&t&&(t.type===`ArrowFunctionExpression`||t.type===`FunctionExpression`)){let e=pn(t);if(e)return e}}}}function hn(e,t,n,r=new WeakSet){return L(e,t,n)?!0:Array.isArray(e)?e.some(e=>hn(e,t,n,r)):typeof e!=`object`||!e||r.has(e)?!1:(r.add(e),Object.entries(e).some(([e,i])=>e!==`parent`&&hn(i,t,n,r)))}function gn(e,t=new WeakSet){return Pt(e,`wrapGraphqlCall`)?!0:Array.isArray(e)?e.some(e=>gn(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&gn(n,t)))}function _n(e){return o(e,`flatMap`)&&n(a(e),`applyResponse`)}function vn(e,t=new WeakSet){return _n(e)?!0:Array.isArray(e)?e.some(e=>vn(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&vn(n,t)))}function yn(e,t=new WeakSet){if(o(e,`catchAll`))return e;if(Array.isArray(e)){for(let n of e){let e=yn(n,t);if(e)return e}return}if(!(typeof e!=`object`||!e)&&!t.has(e)){t.add(e);for(let[n,r]of Object.entries(e)){if(n===`parent`)continue;let e=yn(r,t);if(e)return e}}}function bn(e){let t=I(e);if(t.length===0)return;let n=yn(t);if(n)return gn(t)||vn(t)?n:void 0}const xn=new Set([`get`,`set`,`update`,`modify`,`refresh`]);function R(e){if(typeof e!=`object`||!e)return;let t=e;if(!(t.type!==`ArrowFunctionExpression`&&t.type!==`FunctionExpression`))return t.body}function Sn(e){if(typeof e!=`object`||!e)return!1;let t=e;if(t.type!==`CallExpression`||!Array.isArray(t.arguments)||typeof t.callee!=`object`||t.callee===null||t.callee.type!==`MemberExpression`||t.callee.computed===!0)return!1;let r=t.callee;return(n(r.object,`Atom`)||n(r.object,`atomRegistry`))&&n(r.property)&&xn.has(r.property.name)}function Cn(e,t=new WeakSet){if(Sn(e))return e;if(Array.isArray(e)){for(let n of e){let e=Cn(n,t);if(e)return e}return}if(!(typeof e!=`object`||!e)&&!t.has(e)){t.add(e);for(let[n,r]of Object.entries(e)){if(n===`parent`)continue;let e=Cn(r,t);if(e)return e}}}function wn(e){if(!o(e,`sync`))return;let t=R(a(e));return t?Cn(t):void 0}function Tn(e){return n(e)?/(CollectionAtom|ListAtom|Visible.*Atom|ResultsAtom|ReadStateAtom)$/.test(e.name):!1}function En(e){if(typeof e!=`object`||!e)return;let t=e;if(t.type!==`CallExpression`||!Array.isArray(t.arguments)||!(n(t.callee,`get`)||r(t.callee,`Atom`,`get`)||r(t.callee,`get`,`get`)))return;let[i]=t.arguments;return Tn(i)?i:void 0}function Dn(e,t=new WeakSet){let n=En(e);if(n)return n;if(Array.isArray(e)){for(let n of e){let e=Dn(n,t);if(e)return e}return}if(!(typeof e!=`object`||!e)&&!t.has(e)){t.add(e);for(let[n,r]of Object.entries(e)){if(n===`parent`)continue;let e=Dn(r,t);if(e)return e}}}function On(e){return o(e,`provide`)&&e.arguments.length===1}function kn(e){if(c(e))return I(e).find(e=>On(e))}function An(e,t=new WeakSet){return typeof e==`object`&&e&&e.type===`SpreadElement`?!0:Array.isArray(e)?e.some(e=>An(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&An(n,t)))}function jn(e){if(!D(e,`Ref`,`update`)&&!D(e,`Ref`,`modify`))return!1;let t=e.arguments[1];return An(R(t))}function Mn(e){return typeof e==`object`&&!!e&&e.type===`ObjectExpression`&&Array.isArray(e.properties)&&e.properties.length===0}function z(e,t=new WeakSet){return D(e,`Object`,`entries`)?!0:Array.isArray(e)?e.some(e=>z(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&z(n,t)))}function Nn(e){if(jn(e))return!0;if(D(e,`Object`,`assign`)){let t=e.arguments;return t.length>=3&&Mn(t[0])}return D(e,`Object`,`fromEntries`)?z(e.arguments[0]):D(e,`JSON`,`stringify`)||D(e,`JSON`,`parse`)}function Pn(e){return n(e)?!0:typeof e==`object`&&!!e&&e.type===`MemberExpression`}function Fn(e){return typeof e!=`object`||!e||e.type!==`VariableDeclaration`?!1:e.declarations?.some(e=>{if(typeof e!=`object`||!e)return!1;let t=e.init;return typeof t==`object`&&!!t&&t.type===`TSAsExpression`&&typeof t.typeAnnotation==`object`&&t.typeAnnotation!==null&&t.typeAnnotation.type!==`TSConstKeyword`})??!1}function In(e){if(typeof e!=`object`||!e||e.type!==`BinaryExpression`)return!1;let t=e;if(t.operator!==`===`)return!1;let n=t.left,r=t.right;return typeof n==`object`&&!!n&&n.type===`UnaryExpression`&&n.operator===`typeof`&&typeof r==`object`&&!!r&&(r.type===`Literal`||r.type===`StringLiteral`)&&r.value===`boolean`}function Ln(e){return U(e,`orElse`)&&jr(W(e.arguments[0]))}function B(e){return typeof e==`object`&&!!e&&(e.type===`Literal`||e.type===`StringLiteral`)&&typeof e.value==`string`}function Rn(e){return n(e,`undefined`)}function zn(e){return typeof e==`object`&&!!e&&e.type===`LogicalExpression`&&e.operator===`??`&&(jr(e.right)||Rn(e.right))}function Bn(e){return D(e,`Option`,`fromNullable`)&&zn(e.arguments[0])}function V(e,t){if(!(typeof e!=`object`||!e||e.type!==`ObjectExpression`))for(let r of e.properties??[]){if(typeof r!=`object`||!r)continue;let e=r.key;if(n(e,t))return r.value}}function Vn(e){if(typeof e!=`object`||!e||e.type!==`BinaryExpression`)return!1;let t=e;return t.operator===`===`&&(H(t.left,!0)||H(t.right,!0))}function Hn(e){if(!D(e,`Option`,`match`))return!1;let t=e.arguments[1],n=V(t,`onSome`),r=V(t,`onNone`);return Vn(W(n))&&H(W(r),!1)}function Un(e){return typeof e!=`object`||!e||e.type!==`VariableDeclaration`?!1:e.declarations?.some(e=>typeof e==`object`&&!!e&&B(e.init))??!1}function H(e,t){return typeof e==`object`&&!!e&&(e.type===`Literal`||e.type===`BooleanLiteral`)&&e.value===t}function Wn(e){return r(e,`Effect`,`void`)}function U(e,t){if(typeof e!=`object`||!e)return!1;let r=e;return r.type===`CallExpression`&&Array.isArray(r.arguments)&&typeof r.callee==`object`&&r.callee!==null&&r.callee.type===`MemberExpression`&&r.callee.computed!==!0&&n(r.callee.object,`Match`)&&n(r.callee.property)&&(t===void 0||n(r.callee.property,t))}function W(e){if(!(typeof e!=`object`||!e||e.type!==`ArrowFunctionExpression`))return e.body}function Gn(e){if(!U(e))return!1;let[t,r]=e.arguments;return n(e.callee.property,`when`)?(H(t,!0)||H(t,!1))&&Wn(W(r)):n(e.callee.property,`orElse`)&&Wn(W(t))}const Kn=[`flatMap`,`map`,`andThen`,`tap`,`zipRight`];function qn(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.type===`CallExpression`&&typeof t.callee==`object`&&t.callee!==null&&t.callee.type===`MemberExpression`&&t.callee.computed!==!0&&n(t.callee.object,`Stream`)&&n(t.callee.property)}function G(e,t=new WeakSet){return i(e)?!0:Array.isArray(e)?e.some(e=>G(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&G(n,t)))}function Jn(e,t=new WeakSet){return Kn.some(t=>o(e,t))||c(e)||qn(e)?!0:Array.isArray(e)?e.some(e=>Jn(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&Jn(n,t)))}function Yn(e){return G(e)&&Jn(e)}function Xn(e,t=new WeakSet){return U(e)&&Yn(n(e.callee.property,`when`)?W(e.arguments[1]):W(e.arguments[0]))?!0:Array.isArray(e)?e.some(e=>Xn(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&Xn(n,t)))}function Zn(e,t=new WeakSet){return U(e)?!0:Array.isArray(e)?e.some(e=>Zn(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&Zn(n,t)))}function Qn(e){return typeof e==`object`&&!!e&&e.type===`CallExpression`&&Array.isArray(e.arguments)&&r(e.callee,`Option`,`match`)}function $n(e){let t=W(e);return typeof t==`object`&&!!t&&t.type===`CallExpression`}function er(e,t=new WeakSet){if(o(e,`gen`))return e;if(Array.isArray(e)){for(let n of e){let e=er(n,t);if(e)return e}return}if(!(typeof e!=`object`||!e)&&!t.has(e)){t.add(e);for(let[n,r]of Object.entries(e)){if(n===`parent`)continue;let e=er(r,t);if(e)return e}}}function tr(e){if(!c(e)||typeof e!=`object`||!e)return!1;let t=e.callee.object;return typeof t==`object`&&!!t&&t.type===`CallExpression`&&r(t.callee,`Match`,`value`)}function nr(e){return tr(e)||typeof e==`object`&&!!e&&e.type===`CallExpression`&&(r(e.callee,`Option`,`match`)||r(e.callee,`Either`,`match`))}function rr(e,t=new WeakSet){return nr(e)?!0:Array.isArray(e)?e.some(e=>rr(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&rr(n,t)))}function ir(e){if(typeof e!=`object`||!e)return[];let t=e;return t.type!==`ObjectExpression`||!Array.isArray(t.properties)?[]:t.properties.map(e=>typeof e==`object`&&e?e.value:void 0).filter(e=>e!==void 0)}function ar(e){if(typeof e!=`object`||!e||e.type!==`TSTypeAliasDeclaration`)return!1;let t=e.id,r=e.typeAnnotation;return n(t)&&/(?:Id|ID)$/.test(t.name)&&(r?.type===`TSStringKeyword`||r?.type===`TSNumberKeyword`)}function or(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.type===`TSBooleanKeyword`?!0:t.type===`TSTypeAnnotation`&&typeof t.typeAnnotation==`object`&&t.typeAnnotation!==null&&t.typeAnnotation.type===`TSBooleanKeyword`}function sr(e){if(typeof e!=`object`||!e)return;let t=e;return t.type===`TSTypeAnnotation`&&typeof t.typeAnnotation==`object`&&t.typeAnnotation!==null?t.typeAnnotation:t}function cr(e){let t=sr(e);return t?.type===`TSStringKeyword`||t?.type===`TSNumberKeyword`}function lr(e){let t=sr(e);return t?.type===`TSAnyKeyword`||t?.type===`TSObjectKeyword`}function ur(e){let t=sr(e);return t?.type===`TSTypeReference`&&n(t.typeName,`Date`)}function dr(e){if(typeof e!=`object`||!e||!Array.isArray(e.params))return[];let t=/(?:id|amount|currency|account|user|order|customer|invoice|payment|price|total|quantity|transfer|fund|balance)/i;return e.params.filter(e=>n(e)&&cr(e.typeAnnotation)&&t.test(e.name))}function fr(e){return dr(e).length>=3}function pr(e){return n(e)?/^(?:is|has|should|with|allow|enable|can|use)[A-Z0-9_]/.test(e.name)&&or(e.typeAnnotation):!1}function mr(e){return typeof e!=`object`||!e||!Array.isArray(e.params)?[]:e.params.filter(pr)}function hr(e){if(n(e))return e.name;if(typeof e==`object`&&e&&typeof e.value==`string`)return e.value}function gr(e){return/(?:createdAt|updatedAt|expiresAt|expiredAt|renewedAt|startedAt|endedAt|deletedAt|timestamp|timeoutMs|durationMs|ttlMs|ttl)$/i.test(e)}function _r(e){if(typeof e!=`object`||!e||e.type!==`TSPropertySignature`)return!1;let t=e,n=hr(t.key),r=t.typeAnnotation;return n!==void 0&&gr(n)&&(cr(r)||ur(r))}function vr(e){if(typeof e!=`object`||!e)return[];let t=e;return t.type===`TSInterfaceDeclaration`&&typeof t.body==`object`&&t.body!==null&&Array.isArray(t.body.body)?t.body.body:t.type===`TSTypeLiteral`&&Array.isArray(t.members)?t.members:[]}function yr(e){return vr(e).filter(_r)}function br(e){return n(e)?/^(?:opts|options|config)$/i.test(e.name)&&lr(e.typeAnnotation):!1}function xr(e){return typeof e!=`object`||!e||!Array.isArray(e.params)?[]:e.params.filter(br)}const Sr=new Set([`==`,`===`,`!=`,`!==`,`>`,`>=`,`<`,`<=`]);function K(e,t=new WeakSet){if(Array.isArray(e))return e.reduce((e,n)=>e+K(n,t),0);if(typeof e!=`object`||!e||t.has(e))return 0;t.add(e);let n=e;return n.type===`BinaryExpression`&&Sr.has(String(n.operator))?1:n.type===`LogicalExpression`?K(n.left,t)+K(n.right,t):0}function Cr(e){return typeof e==`object`&&!!e&&e.type===`LogicalExpression`&&K(e)>=3}function wr(e){if(typeof e!=`object`||!e||e.type!==`MemberExpression`)return;let t=e;if(t.computed===!0||!n(t.object)||!n(t.property))return;let r=t.property.name;if(/(?:cancelled|canceled|shipped|approved|rejected|pending|active|inactive|enabled|disabled|locked|archived|deleted|submitted|processing|failed|complete|completed)$/i.test(r))return{objectName:t.object.name,propertyName:r}}function q(e,t=new Map,n=new WeakSet){let r=wr(e);if(r){let e=t.get(r.objectName)??new Set;return e.add(r.propertyName),t.set(r.objectName,e),t}if(Array.isArray(e)){for(let r of e)q(r,t,n);return t}if(typeof e!=`object`||!e||n.has(e))return t;n.add(e);let i=e;return i.type===`LogicalExpression`?(q(i.left,t,n),q(i.right,t,n),t):t}function Tr(e){return typeof e!=`object`||!e||e.type!==`LogicalExpression`?!1:Array.from(q(e).values()).some(e=>e.size>=2)}function Er(e){return o(e,`fail`)&&B(a(e))}function Dr(e){if(typeof e!=`object`||!e||e.type!==`ThrowStatement`)return!1;let t=e.argument;return typeof t==`object`&&!!t&&t.type===`NewExpression`&&n(t.callee,`Error`)&&Array.isArray(t.arguments)&&B(t.arguments[0])}function Or(e){return typeof e!=`object`||!e||!Array.isArray(e.params)?!1:e.params.some(e=>n(e)&&/(?:^id$|Id$|ID$)/.test(e.name)&&cr(e.typeAnnotation))}function kr(e){if(typeof e!=`object`||!e||e.type!==`FunctionDeclaration`)return!1;let t=e.id;return n(t)&&/(?:Admin|Public|Internal|External|Private|Backoffice|Panel)/.test(t.name)&&Or(e)}function Ar(e){if(typeof e!=`object`||!e||e.type!==`BinaryExpression`)return!1;let t=e;return[`==`,`===`,`!=`,`!==`].includes(String(t.operator))&&(B(t.left)||B(t.right))&&!In(t)}function J(e,t,n){e.report({message:n,node:t})}function jr(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.type===`NullLiteral`||t.type===`Literal`&&t.value===null}function Y(e){if(typeof e!=`object`||!e)return;let t=e.source;if(typeof t==`string`)return t;if(typeof t==`object`&&t){let e=t.value;if(typeof e==`string`)return e}}function X(e){return e===`effect`||e.startsWith(`effect/`)||e===`@effect-atom/atom-react`}function Mr(e,n){return t({create(t){let r=!1;return{ImportDeclaration(e){let t=Y(e);t&&X(t)&&(r=!0)},[e](e){r&&J(t,e,n)}}}})}const Nr=new Set([`useState`,`useReducer`,`useContext`,`useCallback`,`useEffect`,`useSyncExternalStore`]),Pr=t({create(e){return{CallExpression(t){let r=t.callee,i=n(r)?r.name:typeof r==`object`&&r&&r.type===`MemberExpression`&&n(r.property)?r.property.name:void 0;i&&Nr.has(i)&&J(e,r,`Rule: avoid React state hooks. Why: they bypass the atom runtime and break reactive flow. Fix: use @effect-atom/atom-react instead.`)}}}}),Fr=Mr(`IfStatement`,`Rule: avoid imperative if branching. Why: Effect code should keep branching explicit and typed. Fix: use Match.value/Match.type or Effect combinators instead.`),Ir=Mr(`SwitchStatement`,`Rule: avoid imperative switch branching. Why: Effect code should keep branching explicit and typed. Fix: use Match.value/Match.type instead.`),Lr=Mr(`ConditionalExpression`,`Rule: avoid ternary expressions. Why: they hide control flow inside expressions. Fix: use Option.match/Either.match/Match.value or data combinators, then run one Effect pipeline.`),Rr=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},ReturnStatement(n){t&&jr(n.argument)&&J(e,n,`Rule: avoid returning null. Why: null is a sentinel that forces defensive guards. Fix: use Option.none for absence or Effect.fail for errors.`)}}}}),zr=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){t&&r(n.callee,`Option`,`as`)&&J(e,n,`Rule: avoid Option.as. Why: it hides selection and encourages placeholder flows. Fix: use Option.map or Option.match and return the value explicitly.`)}}}}),Br=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},MemberExpression(n){t&&r(n,`Effect`,`never`)&&J(e,n,`Rule: avoid Effect.never. Why: it hides lifecycle and leaks resources. Fix: use Stream or explicit acquire/release lifecycles with clear teardown.`)}}}}),Vr=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t||!oe(n))return;let r=l(n.callee.body);r&&J(e,r,`Rule: avoid nested IIFEs. Why: they hide sequencing and push wrapper hacks. Fix: bind a named context with const and keep one flat pipeline with a single Match/Option decision.`)}}}}),Hr=t({create(e){return{ObjectExpression(t){ir(t).some(e=>rr(e))&&J(e,t,`Rule: avoid Match/Option/Either inside object literals. Why: it hides the decision and invites workaround scaffolding. Fix: compute the value first (context), then build the object from named values with one flat decision.`)}}}}),Ur=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){t&&se(n)&&J(e,n,`Rule: avoid immediate invocation of inline functions. Why: it hides decisions and sequencing. Fix: bind a named context with const and keep one Match/Option decision in a flat pipeline.`)}}}}),Wr=t({create(e){return{CallExpression(t){for(let n of le(t))J(e,n,`Rule: avoid block-bodied arrow callbacks with returns. Why: they hide local control flow. Fix: use expression-only callbacks and move the logic into a single pipeline (pipe/Match/Option/A.map).`)}}}}),Gr=t({create(e){return{CallExpression(t){for(let n of ue(t))J(e,n,`Rule: avoid returns inside inline callbacks. Why: they hide control flow. Prefer expression-only callbacks, but leaf-level Effect branches with local bindings may use returns when needed.`)}}}}),Kr=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){t&&fe(n,`fn`)&&J(e,n,`Rule: avoid Effect.fn generator wrappers. Why: they hide sequencing and dodge ladder rules. Fix: keep a single flat pipeline or use one Effect.gen.`)}}}}),qr=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){t&&o(n,`sync`)&&O(a(n))&&J(e,n,`Rule: avoid console.* inside Effect.sync. Why: it hides side effects. Fix: replace with Effect.log* or remove the console call.`)}}}}),Jr=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){let r=d(n,`gen`);if(!t||!r)return;let i=er(r.body);i&&J(e,i,`Rule: avoid nested Effect.gen. Why: nested generators hide sequencing. Fix: flatten to a single Effect.gen per method or a single flat pipeline.`)}}}}),Yr=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=me(n);r&&J(e,r,"Rule: use yield* inside Effect.gen. Why: plain yield returns an Effect value without delegating to the Effect interpreter. Fix: replace `yield Effect.x` with `yield* Effect.x`.")}}}}),Xr=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=ge(n);r&&J(e,r,`Rule: avoid repeated piped yields inside Effect.gen. Why: decorated effects hidden inside generator steps obscure the workflow. Fix: extract decorated effects first, then yield the named workflow steps.`)}}}}),Zr=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=ye(n);r&&J(e,r,`Rule: avoid Effect.gen for simple mapping. Why: tiny generators hide pure transformations behind workflow syntax. Fix: map the yielded effect with Effect.map or a named pure transformation.`)}}}}),Qr=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=Ce(n);r&&J(e,r,`Rule: prefer Effect.gen for workflow sequencing. Why: long flatMap/andThen/tap pipelines read like imperative workflow. Fix: move the sequential story into one Effect.gen and keep pipe for behavior decoration.`)}}}}),$r=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){t&&we(n)&&J(e,n,`Rule: avoid large anonymous flow expressions. Why: long pure transformation chains need a domain name. Fix: extract a named flow or split the transformation into named pure steps.`)}}}}),ei=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=De(n);r&&J(e,r,`Rule: avoid Effect work inside flow. Why: flow should stay a reusable pure transformation boundary. Fix: keep Effect sequencing, logging, retries, and dependency access in Effect pipelines.`)}}}}),ti=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=Oe(n);r&&J(e,r,`Rule: prefer named flow transformations. Why: non-trivial pure transformations passed inline are hard to reuse and review. Fix: extract the flow to a named const.`)}}}}),ni=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=je(n);r&&J(e,r,"Rule: prefer .pipe() for behavior decoration. Why: retry, timeout, spans, logging, recovery, DI, and value transforms decorate an existing effect. Fix: write `program.pipe(Effect.retry(policy))` instead of `Effect.retry(program, policy)`.")}}}}),ri=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=Pe(n);r&&J(e,r,`Rule: extract decorated effects before Effect.gen. Why: repeated retry/timeout/span/logging decorators inside generator yields bury behavior policy in workflow steps. Fix: name the decorated effects first, then yield the workflow story.`)}}}}),ii=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=Fe(n);r&&J(e,r,`Rule: avoid workflow sequencing inside behavior pipes. Why: behavior pipes should answer how an effect behaves, not hide the workflow story. Fix: move multi-step sequencing into Effect.gen and keep retry/timeout/spans/logging as decorators around named effects.`)}}}}),ai=t({create(e){let t=!1;function n(n){let r=Ie(n);t&&r&&J(e,r,`Rule: avoid mixing Effect style pillars in one function. Why: workflow, pure transformation, behavior decoration, and Layer wiring each need a clear boundary. Fix: extract named concepts for each pillar and compose them at the call site.`)}return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},FunctionDeclaration:n,FunctionExpression:n,ArrowFunctionExpression:n}}}),oi=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){let r=Re(n);t&&r&&J(e,r,`Rule: avoid clever Effect expressions. Why: deeply nested expressions that combine style pillars hide the domain story. Fix: extract named workflow, pure transformation, and behavior steps.`)}}}}),si=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){let r=ze(n);t&&r&&J(e,r,`Rule: prefer extracting named concepts from oversized anonymous callbacks. Why: multi-step inline callbacks hide domain intent. Fix: name the transformation, policy, or workflow step before passing it into Effect.`)}}}}),ci=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){t&&He(n)&&J(e,n,`Rule: prefer Effect.Service. Fix: replace Context.Tag service definitions.`)}}}}),li=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},ClassDeclaration(n){let r=y(n);t&&r&&Ue(r)&&J(e,r,`Rule: do not call Layer.provide inside Effect.Service. Fix: move layer wiring to app/test boundaries.`)}}}}),ui=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},ClassDeclaration(n){let r=y(n);t&&r&&!We(r)&&J(e,r,`Rule: set accessors: true. Fix: add it to Effect.Service options.`)}}}}),di=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},ClassDeclaration(n){let r=y(n),i=r?qe(r):void 0;t&&i&&J(e,i,`Rule: declare service dependencies.`)}}}}),fi=t({create(e){return{ImportDeclaration(t){let n=Ge(t);n&&J(e,n,`Rule: avoid namespace imports from Effect packages.`)}}}}),pi=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},ExportNamedDeclaration(n){let r=t?st(n):void 0;r&&J(e,r,`Rule: avoid exported manual service objects.`)}}}}),mi=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){let r=t?Ze(n):void 0;r&&J(e,r,`Rule: prefer Layer.pipe for nested layer provisioning.`)}}}}),hi=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){let r=t?$e(n):void 0;r&&J(e,r,`Rule: avoid inline layer provisioning inside programs.`)}}}}),gi=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){let r=t?et(n):void 0;r&&J(e,r,`Rule: prefer Layer.mergeAll for infrastructure layer groups.`)}}}}),_i=t({create(e){let t=!1,n=0;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},VariableDeclaration(r){let i=t?nt(r):void 0;i&&(n+=1,n>=3&&J(e,i,`Rule: group service layers by concern.`))}}}}),vi=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},FunctionDeclaration(n){let r=Xe(n);t&&r&&J(e,r,`Rule: avoid Layer composition inside request handlers.`)}}}}),yi=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},ClassDeclaration(n){let r=y(n),i=r?at(r):void 0;t&&i&&J(e,i,`Rule: return Effect from service methods.`)}}}}),bi=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){t&&Gn(n)&&J(e,n,`Rule: avoid void Match branches. Why: they hide guard-style control flow. Fix: remove the no-op branch or select a value and run one Effect pipeline outside the Match.`)}}}}),xi=t({create(e){return{CallExpression(t){tr(t)&&Xn(t.arguments)&&J(e,t,`Rule: avoid multi-step sequencing inside Match branches. Why: it hides control flow. Fix: select a value in Match, then run one Effect pipeline outside. Avoid data-encoded conditionals (Option.toArray/forEach) that only rewrap the branch.`),Qn(t)&&Yn(t.arguments)&&J(e,t,`Rule: avoid multi-step sequencing inside Option.match branches. Why: it hides control flow. Prefer selecting a value in Option.match, then run one Effect pipeline outside. Leaf-level flows with local bindings may keep Option.match but should stay linear.`)}}}}),Si=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){let r=a(n),i=W(r);t&&o(n,`sync`)&&$n(r)&&!Nt(i)&&J(e,n,`Rule: avoid Effect.sync around side effects. Why: it hides intent. Fix: use Effect.log* or an explicit pipeline step for the side effect.`)}}}}),Ci=t({create(e){return{CallExpression(t){o(t,`as`)&&k(a(t))&&J(e,t,`Rule: avoid Effect.as for side effects. Why: it hides side effects and turns them into placeholders. Fix: use explicit pipeline steps that return real values with Effect.flatMap, Effect.andThen, or Effect.tap.`),o(t,`zipRight`)&&k(a(t))&&J(e,t,`Rule: avoid Effect.zipRight for side effects. Why: it hides side effects and discards values. Fix: use explicit pipeline steps that return real values with Effect.flatMap, Effect.andThen, or Effect.tap.`)}}}}),wi=t({create(e){return{CallExpression(t){o(t,`all`)&&A(t.arguments[0])&&It(t.arguments[1])&&J(e,t,`Rule: avoid Effect.all for sequential side-effect steps. Why: it hides imperative sequencing in an array. Fix: use one explicit linear pipeline with Effect.andThen/flatMap and reserve Effect.all for real value aggregation.`),an(t)&&A(a(t.callee.object))&&J(e,t,`Rule: avoid Effect.all for sequential side-effect steps. Why: it hides imperative sequencing in an array. Fix: use one explicit linear pipeline with Effect.andThen/flatMap and reserve Effect.all for real value aggregation.`)}}}}),Ti=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=lt(n);r&&J(e,r,`Rule: avoid async callbacks in Effect combinators. Why: async callbacks return Promises and bypass Effect failure, interruption, and tracing semantics. Fix: return an Effect and compose with Effect.flatMap/fromPromise at the boundary.`)}}}}),Ei=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=ut(n);r&&J(e,r,`Rule: avoid throw inside Effect logic. Why: thrown exceptions bypass typed Effect error channels and interruption semantics. Fix: return Effect.fail with a structured tagged error.`)}}}}),Di=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=Ot(n);r&&J(e,r,`Rule: avoid Effect.orDie outside runtime boundaries. Why: converting typed failures into defects hides recoverable domain errors. Fix: keep typed errors in domain logic and reserve orDie/orDieWith for explicit application boundaries.`)}}}}),Oi=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=At(n);r&&J(e,r,`Rule: avoid swallowing errors in catchAll. Why: succeed/void recovery can hide failures without telemetry or typed recovery. Fix: log, re-fail with a structured error, or recover through an explicit domain branch.`)}}}}),ki=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=Mt(n);r&&J(e,r,`Rule: avoid Effect.ignore. Why: ignoring failable effects hides failure ownership. Fix: handle the error with typed recovery, log and re-fail, or isolate the ignore at an explicit boundary with a documented reason.`)}}}}),Ai=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=dt(n);r&&J(e,r,`Rule: avoid try/catch inside Effect logic. Why: it bypasses typed error channels and can miss interruption/cause semantics. Fix: use Effect.try, Effect.catchAll, Effect.catchTag, or typed error combinators.`)}}}}),ji=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=mt(n);r&&J(e,r,`Rule: avoid Promise APIs inside Effect logic. Why: Promise APIs bypass Effect scheduling, typed errors, cancellation, and tracing. Fix: use Effect.all, Effect.tryPromise, or move Promise interop to a boundary adapter.`)}}}}),Mi=t({create(e){return{TryStatement(t){J(e,t,`Rule: avoid try/catch in Effect files. Why: it bypasses Effect error channels and reintroduces imperative control flow. Fix: model failures in Effect and handle them with typed errors and Effect combinators.`)}}}}),Ni=t({create(e){return{VariableDeclaration(t){for(let n of t.declarations??[])sn(n.init)&&J(e,t,"Rule: avoid Effect wrapper aliases (`const x = ...Effect...`). Why: it creates wrapper choreography and bloats consts. Fix: inline the pipeline at the call site or define a real domain function that returns data, not an Effect wrapper.")},FunctionDeclaration(t){cn(t.body)&&J(e,t,"Rule: avoid Effect wrapper aliases (`function x(...) { return Effect... }`). Why: it creates wrapper choreography and bloats consts. Fix: inline the pipeline at the call site or define a real domain function that returns data, not an Effect wrapper.")}}}}),Pi=t({create(e){return{TSTypeReference(t){(L(t,`Effect`,`Effect`)||L(t,`Layer`,`Layer`))&&J(e,t,"Rule: avoid manual Effect channel tuples (`Effect.Effect<...>` / `Layer.Layer<...>`). Why: channels compose through the Effect pipeline and services; hand-written tuples desync from the real flow. Fix: drop the generic and let the return type infer from the Effect/Layer you return, or expose a service method that returns the effect directly.")}}}}),Fi=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){let r=t?bn(n):void 0;r&&J(e,r,`Rule: avoid catchAll after wrapGraphqlCall/applyResponse. Why: the envelope already surfaces structured errors. Fix: handle errors in the response mapping instead of catchAll.`)}}}}),Ii=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},ExpressionStatement(n){t&&tr(n.expression)&&Zn(n.expression.arguments)&&J(e,n.expression,`Rule: avoid Match.value(...).pipe(...) as a statement. Why: it runs side effects during render. Fix: move the side effect into an Effect runtime action or event handler, and keep Match as a pure expression.`)}}}}),Li=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){let r=t?wn(n):void 0;r&&J(e,r,`Rule: do not wrap Atom/atomRegistry ops in Effect.sync. Why: it hides side effects and breaks atom flow. Fix: call Atom.get/Atom.set/Atom.update/Atom.modify/Atom.refresh directly.`)}}}}),Ri=t({create(e){return{CallExpression(t){if(!D(t,`Atom`,`family`))return;let n=Dn(t.arguments);n&&J(e,n,`Keyed projection atom reads collection atom. Why: Atom.family should project from keyed/source atoms, not broad collection state. Fix: pass the keyed atom into the family or create a keyed source atom before reading.`)}}}}),zi=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){let r=t?kn(n):void 0;r&&J(e,r,"Rule: do not inline runtime provisioning inside local helper Effect code. Why: `yield* SomeRuntime.pipe(Effect.provide(SomeRuntimeLive))` and equivalent inline provide chains hide dependency assembly instead of owning it at an Effect.Service boundary or one exported Effect boundary. Fix: declare the live dependency on the owning service or provide it once at the exported boundary, then `yield*` the runtime or service directly inside the body.")}}}}),Bi=t({create(e){return{CallExpression(t){Nn(t)&&J(e,t,"Rule: avoid naked JS state patching/rebuild and raw JSON shortcuts in Effect transitions. Why: spread/Object.assign/fromEntries and inline JSON parse/stringify hide state intent and bypass explicit model contracts. Fix: use `effect/Record` combinators (`Record.set` / `Record.modify` / `Record.remove`) inside `Struct.evolve`, rebuild with schema constructors (`Schema.make` or field `.make`), and keep serialization at boundaries with schema encode/decode flows. Use `linting.md` guidance when available.")}}}}),Vi=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){t&&o(n,`succeed`)&&Pn(a(n))&&J(e,n,`Rule: avoid Effect.succeed(variable) as a branch placeholder. Why: it hides a decision and turns data into pseudo-control flow. Fix: select a plain value (Option/Match) and then run one Effect pipeline after the decision; if you already read the state, return it as a value. Avoid Option.toArray/forEach hacks that just re-encode the branch.`)}}}}),Hi=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},TSTypeAliasDeclaration(n){t&&hn(n.typeAnnotation,`Effect`,`Effect`)&&J(e,n.typeAnnotation,`Rule: avoid Effect.Effect type aliases. Why: they hide the service surface and make types opaque. Fix: keep Effect types on service methods or inline at the call site.`)}}}}),Ui=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},ExportNamedDeclaration(n){let r=t?mn(n):void 0;r&&J(e,r,`Rule: avoid public Effect APIs with generic Error. Why: public services need recoverable, typed error contracts. Fix: expose tagged domain errors instead of Error.`)},ExportDefaultDeclaration(n){let r=t?mn(n):void 0;r&&J(e,r,`Rule: avoid public Effect APIs with generic Error. Why: public services need recoverable, typed error contracts. Fix: expose tagged domain errors instead of Error.`)}}}}),Wi=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},VariableDeclaration(n){t&&Fn(n)&&J(e,n,"Rule: avoid `as` assertions on decoded model flow. Why: assertions hide schema drift and allow untyped overlays. Fix: decode with the correct schema type and read fields directly.")}}}}),Gi=t({create(e){let t=!1,n=!1,r=[],i=new WeakSet,a=t=>{typeof t!=`object`||!t||i.has(t)||(i.add(t),J(e,t,`Rule: avoid local unknown-to-boolean coercion helpers in services. Why: runtime coercion belongs at schema boundary, not in service flow. Fix: decode boolean optionality in schema and read typed booleans in the Effect pipeline.`))};return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},BinaryExpression(e){!t||!In(e)||(n?a(e):r.push(e))},CallExpression(e){if(!(!t||!Ln(e))){n=!0;for(let e of r)a(e)}}}}}),Ki=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){t&&Bn(n)&&J(e,n,"Rule: avoid nullish re-wrap inside Option.fromNullable. Why: `x ?? null` and `x ?? undefined` add noise and hide source shape. Fix: pass the source directly to Option.fromNullable.")}}}}),qi=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){t&&Hn(n)&&J(e,n,"Rule: avoid repeated Option boolean normalization (`onSome: value === true, onNone: false`). Why: it scatters coercion rules across services. Fix: normalize once at schema boundary and read booleans directly.")}}}}),Ji=t({create(e){return{CallExpression(t){o(t,`succeed`)&&B(a(t))&&J(e,t,`Rule: avoid returning string tokens. Why: it encodes control flow and forces defensive branching. Fix: return domain values (Option/Either/tagged unions) or real Effect results instead.`)}}}}),Yi=t({create(e){return{VariableDeclaration(t){Un(t)&&J(e,t,`Rule: avoid string status constants. Why: they encode control flow and force defensive branching. Fix: use tagged unions, Option/Either, or meaningful domain values instead of string tokens.`)}}}}),Xi=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},TSTypeAliasDeclaration(n){t&&ar(n)&&J(e,n,"Rule: avoid raw primitive domain ID aliases. Why: `type UserId = string` does not protect boundaries from swapped IDs. Fix: use Schema branded IDs or a domain constructor that validates and brands the value.")}}}}),Zi=t({create(e){let t=!1,n=n=>{if(t)for(let t of mr(n))J(e,t,"Rule: avoid boolean behavior flags in domain operations. Why: flags like `shouldNotify` hide use cases and create implicit branching. Fix: model intent with a command/tagged union or split the operation into explicit functions.")};return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},FunctionDeclaration:n,FunctionExpression:n,ArrowFunctionExpression:n}}}),Qi=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},BinaryExpression(n){t&&Ar(n)&&J(e,n,`Rule: avoid magic domain string comparisons. Why: comparing domain state to raw strings scatters status vocabulary and misses exhaustiveness. Fix: use a tagged union, Schema literal union, or Match over a named domain status.`)}}}}),$i=t({create(e){let t=!1,n=n=>{t&&fr(n)&&J(e,n,`Rule: avoid primitive-heavy domain parameters. Why: clusters of raw string/number domain values are easy to swap and have no invariant boundary. Fix: introduce branded types or a command/schema object with named validated fields.`)};return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},FunctionDeclaration:n,FunctionExpression:n,ArrowFunctionExpression:n}}}),ea=t({create(e){let t=!1,n=n=>{if(t)for(let t of yr(n))J(e,t,`Rule: avoid raw time fields in domain models. Why: number and Date fields hide units, clock ownership, and duration semantics. Fix: model durations with Effect Duration and keep raw timestamps at decode/encode boundaries.`)};return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},TSInterfaceDeclaration:n,TSTypeLiteral:n}}}),ta=t({create(e){let t=!1,n=n=>{if(t)for(let t of xr(n))J(e,t,"Rule: avoid overloaded options objects. Why: `opts`, `options`, and `config` typed as any/object hide required fields and validation. Fix: accept unknown at the boundary and decode with Schema, or use a named typed command/config model.")};return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},FunctionDeclaration:n,FunctionExpression:n,ArrowFunctionExpression:n}}}),na=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},LogicalExpression(n){t&&Cr(n)&&J(e,n,`Rule: avoid embedding domain logic in conditionals. Why: multi-clause business rules become hard to test, reuse, and audit. Fix: extract a named domain predicate or validation Effect and call that from the branch.`)}}}}),ra=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},LogicalExpression(n){t&&Tr(n)&&J(e,n,`Rule: avoid implicit state machines made from boolean flags. Why: multiple flags on one domain object allow impossible states. Fix: model the lifecycle as a tagged union or Data.TaggedEnum.`)}}}}),ia=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){t&&Er(n)&&J(e,n,`Rule: avoid ad hoc domain errors. Why: string failures hide recovery semantics and observability. Fix: use Data.TaggedError or a structured domain error union.`)},ThrowStatement(n){t&&Dr(n)&&J(e,n,`Rule: avoid ad hoc domain errors. Why: thrown string Error values bypass typed Effect error channels. Fix: return Effect.fail with a structured tagged domain error.`)}}}}),aa=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},FunctionDeclaration(n){t&&kr(n)&&J(e,n,`Rule: avoid domain meaning by folder or context naming alone. Why: admin/public/internal meaning should be represented in types or services, not inferred from helper names. Fix: encode context with branded IDs, commands, policies, or service boundaries.`)}}}}),oa=t({create(e){return{CallExpression(t){r(t.callee,`Effect`,`as`)&&J(e,t.callee,`Rule: avoid Effect.as wrappers. Why: they can hide meaningful sequencing or value flow. Fix: return the intended value directly or use explicit Effect.map/andThen.`)}}}}),sa=t({create(e){return{MemberExpression(t){r(t,`Effect`,`Do`)&&J(e,t,`Rule: avoid Effect.Do. Why: it hides sequencing behind builder state. Fix: use Effect.gen or a direct pipe.`)}}}});function ca(e,n,i){return t({create(t){return{CallExpression(a){r(a.callee,e,n)&&J(t,a.callee,i)}}}})}const la=ca(`Effect`,`bind`,`Rule: avoid Effect.bind. Why: it obscures linear data flow behind builder-style binding. Fix: use Effect.gen or a direct pipe with flatMap/map.`),ua=ca(`Runtime`,`runFork`,`Rule: avoid Runtime.runFork. Why: detached fibers hide lifetime and interruption ownership. Fix: run effects through the application runtime boundary.`),da=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){t&&Et(n)&&J(e,n.callee,`Rule: avoid running Effects outside runtime boundaries. Why: direct Effect.run* calls scatter execution ownership. Fix: return Effects from domain logic and run them at the app, CLI, worker, route, or test boundary.`)}}}}),fa=ca(`Effect`,`async`,`Rule: avoid Effect.async. Why: manual callback bridges are easy to leak or resume incorrectly. Fix: use scoped Effect APIs or a dedicated platform adapter.`),pa=t({create(e){return{CallExpression(t){ee(t)&&J(e,t,`Rule: avoid deeply nested Effect calls (Effect.xx(Effect.yy(Effect.zz(...)))). Why: they hide sequencing and spread flow. Fix: build values first, then run one flat Effect pipeline.`)}}}}),ma=t({create(e){return{VariableDeclaration(t){for(let n of t.declarations??[])ee(n.init)&&J(e,n.init,`Rule: avoid nested Effect combinators. Why: they hide sequencing and create laddered control flow. Fix: build context once (Effect.all/Effect.map) and then run a single flat pipeline.`)},ReturnStatement(t){ee(t.argument)&&J(e,t.argument,`Rule: avoid nested Effect combinators. Why: they hide sequencing and create laddered control flow. Fix: build context once (Effect.all/Effect.map) and then run a single flat pipeline.`)}}}}),ha=t({create(e){return{VariableDeclaration(t){for(let n of t.declarations??[]){let t=ne(n.init);t&&J(e,n.init,t)}},ReturnStatement(t){let n=ne(t.argument);n&&J(e,t.argument,n)}}}}),ga=t({create(e){return{CallExpression(t){c(t)&&ae(t.arguments)&&J(e,t,`Rule: avoid nested pipe() chains. Why: they hide sequencing. Fix: refactor into one flat pipeline with a single decision point.`)}}}}),_a=t({create(e){return{CallExpression(t){te(t)&&J(e,t,`Rule: avoid nested Effect call towers (Effect.fn(Effect.fn(...))). Why: it hides sequencing. Fix: build the inner Effect first, then use pipe/Effect.flatMap/Effect.andThen for a single flat pipeline.`)}}}}),va=t({create(e){return{CallExpression(t){ie(t)&&J(e,t,`Rule: avoid Effect.orElse around sequencing chains. Why: it hides error handling and splits the flow. Fix: move error handling to a single terminal decision after the pipeline.`)}}}}),ya=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){t&&zt(n)&&J(e,n,"Rule: avoid unbounded Effect.all over mapped collections. Why: it can launch work for every item at once and fail under load. Fix: pass an explicit `{ concurrency: n }` option or use a bounded batching strategy.")}}}}),ba=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},ExpressionStatement(n){t&&o(n.expression,`fork`)&&J(e,n.expression,`Rule: avoid fire-and-forget Effect.fork. Why: detached fibers hide failure, interruption, and ownership. Fix: bind the fiber and join/await/interrupt it, or use Effect.forkScoped / Effect.forkIn with an explicit scope.`)}}}}),xa=t({create(e){let t=!1,n=n=>{if(!t)return;let r=j(n.body);r&&J(e,r,`Rule: avoid Effect.fork inside loops. Why: loop-spawned fibers create unbounded concurrency and unclear ownership. Fix: use Effect.forEach / Effect.all with an explicit concurrency limit or a scoped supervisor.`)};return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},ForStatement:n,ForInStatement:n,ForOfStatement:n,WhileStatement:n,DoWhileStatement:n}}}),Sa=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){t&&Vt(n)&&J(e,n,`Rule: avoid Effect.race without loser cleanup. Why: racing effects without ensuring/scoped cleanup can leak losing work or resources. Fix: wrap raced effects with Effect.ensuring/acquireRelease or use a scoped race boundary.`)}}}}),Ca=t({create(e){let t=!1,n=new Map,r=new Set;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},VariableDeclarator(e){let t=en(e);t&&n.set(t,e)},CallExpression(e){let t=nn(e);t&&r.add(t)},"Program:exit"(){if(t)for(let[t,i]of n)r.has(t)||J(e,i,`Rule: avoid unobserved forked fibers. Why: forked fiber failures and interruption should be observed. Fix: pass the fiber to Fiber.join, Fiber.await, Fiber.interrupt, or use scoped fork APIs.`)}}}}),wa=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){t&&Wt(n)&&J(e,n,`Rule: avoid unbounded concurrent retry. Why: retry inside unbounded parallel collection effects can amplify load and create retry storms. Fix: add an explicit concurrency limit or move retry behind a bounded queue/backoff policy.`)}}}}),Ta=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=wt(n);r&&J(e,r,`Rule: avoid blocking sync calls inside Effect logic. Why: sync fs/crypto/zlib calls block the runtime worker and hide throughput costs. Fix: use Effect.async/tryPromise at a platform boundary, stream APIs, or a dedicated blocking executor.`)}}}}),Ea=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=_t(n);r&&J(e,r,`Rule: avoid Promise concurrency APIs inside Effect logic. Why: Promise.all/allSettled/race/any bypass Effect concurrency, interruption, tracing, and error channels. Fix: use Effect.all, Effect.forEach, Effect.race, or a boundary adapter with explicit cancellation ownership.`)}}}}),Da=t({create(e){let t=!1,n=new Set;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},VariableDeclaration(e){if(!(e.kind!==`let`&&e.kind!==`var`))for(let t of N(e))n.add(t)},CallExpression(r){if(!t)return;let i=qt(r);if(!i)return;let a=F(i,n);a&&J(e,a,`Rule: avoid mutating shared state across fibers. Why: outer let/var state mutated from forked or parallel work creates nondeterministic races. Fix: model shared state with Ref/SynchronizedRef/Queue or aggregate immutable results with bounded Effect.all/forEach.`)}}}}),Oa=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=xt(n);r&&J(e,r,`Rule: avoid timeout around noninterruptible Promise effects. Why: timing out Effect.promise or tryPromise without a signal leaves the underlying Promise running after interruption. Fix: use Effect.tryPromise with an AbortSignal parameter and pass it to the async API.`)}}}}),ka=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){t&&Xt(n)&&J(e,n,`Rule: avoid uninterruptible concurrent regions. Why: wrapping fork/race/all/forEach or queue work in uninterruptible blocks cancellation and can strand work under shutdown. Fix: keep only the critical section uninterruptible and leave concurrent work interruptible or scoped.`)}}}}),Aa=t({create(e){let t=!1;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},CallExpression(n){t&&Zt(n)&&J(e,n,`Rule: avoid unbounded Queue or PubSub constructors. Why: unbounded buffers hide backpressure and can fail under load. Fix: use Queue.bounded / PubSub.bounded with an explicit capacity at the owning boundary.`)}}}}),ja=t({create(e){let t=!1,n=new Set;return{ImportDeclaration(e){let n=Y(e);n&&X(n)&&(t=!0)},VariableDeclaration(e){for(let t of $t(e))n.add(t)},CallExpression(r){if(!t)return;let i=qt(r);if(!i)return;let a=F(i,n);a&&J(e,a,`Rule: avoid global mutable concurrency state. Why: module-scope mutable state touched from concurrent Effect work behaves like shared mutable global state. Fix: move ownership into Ref/SynchronizedRef/Queue/Layer state or pass immutable values through bounded effects.`)}}}}),Ma={"no-react-state":Pr,"no-if-statement":Fr,"no-switch-statement":Ir,"no-ternary":Lr,"no-return-null":Rr,"no-option-as":zr,"no-effect-never":Br,"no-arrow-ladder":Vr,"no-branch-in-object":Hr,"no-iife-wrapper":Ur,"no-return-in-arrow":Wr,"no-return-in-callback":Gr,"no-effect-fn-generator":Kr,"no-effect-sync-console":qr,"no-nested-effect-gen":Jr,"no-yield-without-star-in-effect-gen":Yr,"no-piped-yield-in-gen":Xr,"no-gen-for-mapping":Zr,"prefer-gen-for-workflow":Qr,"no-large-anonymous-flow":$r,"no-effect-in-flow":ei,"prefer-named-flow":ti,"prefer-pipe-for-behavior":ni,"prefer-decorated-effect-before-gen":ri,"no-workflow-in-behavior-pipe":ii,"no-mixed-pillar-function":ai,"no-clever-effect-expression":oi,"prefer-extracted-concept":si,"prefer-effect-service":ci,"no-layer-provide-in-service-definition":li,"require-service-accessors":ui,"require-service-dependencies":di,"no-namespace-effect-import":fi,"no-manual-service-object-export":pi,"no-layer-merge-in-request-handler":vi,"no-service-method-returning-promise":yi,"prefer-layer-pipe":mi,"no-inline-layer-provide-in-program":hi,"prefer-layer-mergeall-for-infrastructure":gi,"no-service-layer-scatter":_i,"no-match-void-branch":bi,"no-match-effect-branch":xi,"warn-effect-sync-wrapper":Si,"no-effect-side-effect-wrapper":Ci,"no-effect-all-step-sequencing":wi,"no-async-effect-combinator-callback":Ti,"no-throw-in-effect-logic":Ei,"no-or-die-outside-boundary":Di,"no-swallowed-catch-all":Oi,"no-effect-ignore":ki,"no-try-catch-in-effect-logic":Ai,"no-promise-api-in-effect-logic":ji,"no-try-catch":Mi,"no-effect-wrapper-alias":Ni,"no-manual-effect-channels":Pi,"no-wrapgraphql-catchall":Fi,"no-render-side-effects":Ii,"no-atom-registry-effect-sync":Li,"no-family-collection-read":Ri,"no-inline-runtime-provide":zi,"no-naked-object-state-update":Bi,"no-effect-succeed-variable":Vi,"no-effect-type-alias":Hi,"no-public-generic-effect-error":Ui,"no-model-overlay-cast":Wi,"no-unknown-boolean-coercion-helper":Gi,"no-fromnullable-nullish-coalesce":Ki,"no-option-boolean-normalization":qi,"no-string-sentinel-return":Ji,"no-string-sentinel-const":Yi,"no-raw-domain-id-alias":Xi,"no-boolean-domain-flag":Zi,"no-magic-domain-string":Qi,"no-raw-domain-primitive-params":$i,"no-raw-time-domain-field":ea,"no-overloaded-options-object":ta,"no-domain-logic-in-conditional":na,"no-implicit-state-machine-object":ra,"no-adhoc-domain-error":ia,"no-domain-meaning-by-folder-only":aa,"no-effect-as":oa,"no-effect-do":sa,"no-effect-bind":la,"no-runtime-runfork":ua,"no-run-effect-outside-boundary":da,"no-effect-async":fa,"prevent-dynamic-imports":t({create(e){return{ImportExpression(t){J(e,t,`Rule: avoid dynamic imports. Why: runtime module loading obscures dependency boundaries. Fix: use static imports.`)}}}}),"no-nested-effect-call":pa,"no-effect-ladder":ma,"no-flatmap-ladder":ha,"no-pipe-ladder":ga,"no-call-tower":_a,"no-effect-orElse-ladder":va,"no-unbounded-effect-all":ya,"no-fire-and-forget-fork":ba,"no-fork-in-loop":xa,"no-race-without-cleanup":Sa,"no-unobserved-fiber":Ca,"no-unbounded-concurrent-retry":wa,"no-blocking-call-in-effect":Ta,"no-promise-concurrency-in-effect":Ea,"no-shared-mutable-state-across-fibers":Da,"no-timeout-with-noninterruptible-promise":Oa,"no-uninterruptible-concurrent-region":ka,"no-unbounded-queue-or-pubsub":Aa,"no-global-mutable-concurrency-state":ja};function Z(e){return Object.fromEntries(e.map(e=>[`linteffect/${e}`,`error`]))}function Q(e){return{jsPlugins:Na,rules:e}}const Na=[{name:`linteffect`,specifier:`@opsydyn/oxlint-effect`}],Pa=Z([`no-react-state`,`no-runtime-runfork`,`no-run-effect-outside-boundary`,`no-or-die-outside-boundary`,`prevent-dynamic-imports`,`no-render-side-effects`,`no-inline-runtime-provide`]),Fa=Z([`no-effect-as`,`no-effect-do`,`no-effect-bind`,`no-effect-async`,`no-effect-ignore`,`no-effect-never`,`no-effect-fn-generator`,`no-nested-effect-gen`,`no-yield-without-star-in-effect-gen`,`no-async-effect-combinator-callback`,`no-throw-in-effect-logic`,`no-try-catch-in-effect-logic`,`no-promise-api-in-effect-logic`,`no-swallowed-catch-all`,`no-manual-effect-channels`,`no-effect-type-alias`,`no-public-generic-effect-error`]),Ia=Z([`no-unbounded-effect-all`,`no-fire-and-forget-fork`,`no-fork-in-loop`,`no-race-without-cleanup`,`no-unobserved-fiber`,`no-unbounded-concurrent-retry`,`no-blocking-call-in-effect`,`no-promise-concurrency-in-effect`,`no-shared-mutable-state-across-fibers`,`no-timeout-with-noninterruptible-promise`,`no-uninterruptible-concurrent-region`,`no-unbounded-queue-or-pubsub`,`no-global-mutable-concurrency-state`]),La=Z([`no-nested-effect-call`,`no-effect-ladder`,`no-flatmap-ladder`,`no-pipe-ladder`,`no-call-tower`,`no-effect-orElse-ladder`,`no-effect-wrapper-alias`,`warn-effect-sync-wrapper`,`no-effect-side-effect-wrapper`,`no-effect-all-step-sequencing`,`no-effect-succeed-variable`]),Ra=Z([`no-if-statement`,`no-switch-statement`,`no-ternary`,`no-try-catch`,`no-arrow-ladder`,`no-iife-wrapper`,`no-return-in-arrow`,`no-return-in-callback`,`no-return-null`,`no-branch-in-object`]),za=Z([`no-option-as`,`no-match-void-branch`,`no-match-effect-branch`,`no-model-overlay-cast`,`no-unknown-boolean-coercion-helper`,`no-fromnullable-nullish-coalesce`,`no-option-boolean-normalization`,`no-string-sentinel-return`,`no-string-sentinel-const`]),Ba=Z([`no-effect-sync-console`,`no-atom-registry-effect-sync`,`no-family-collection-read`,`no-naked-object-state-update`,`no-wrapgraphql-catchall`]),$=Z([`no-raw-domain-id-alias`,`no-boolean-domain-flag`,`no-magic-domain-string`,`no-raw-domain-primitive-params`,`no-raw-time-domain-field`,`no-overloaded-options-object`,`no-domain-logic-in-conditional`,`no-implicit-state-machine-object`,`no-adhoc-domain-error`,`no-domain-meaning-by-folder-only`]),Va=Z([`no-piped-yield-in-gen`,`no-gen-for-mapping`,`prefer-gen-for-workflow`]),Ha=Z([`no-large-anonymous-flow`,`no-effect-in-flow`,`prefer-named-flow`]),Ua=Z([`prefer-pipe-for-behavior`,`prefer-decorated-effect-before-gen`,`no-workflow-in-behavior-pipe`]),Wa=Z([`no-mixed-pillar-function`,`no-clever-effect-expression`,`prefer-extracted-concept`]),Ga=Z([`prefer-effect-service`,`no-layer-provide-in-service-definition`,`require-service-accessors`,`require-service-dependencies`,`no-namespace-effect-import`,`no-manual-service-object-export`,`no-layer-merge-in-request-handler`,`no-service-method-returning-promise`,`prefer-layer-pipe`,`no-inline-layer-provide-in-program`,`prefer-layer-mergeall-for-infrastructure`,`no-service-layer-scatter`]),Ka=Z(Object.keys(Ma)),qa={reactAndRuntimeBoundaries:Pa,effectComposition:Fa,concurrencySafety:Ia,pipelineShapeAndSequencing:La,branchingAndLocalControlFlow:Ra,optionMatchAndDataNormalization:za,atomStateAndPlatformBoundaries:Ba,domainModeling:$,effectFlow:Va,pureTransformation:Ha,behaviorDecoration:Ua,styleSeparation:Wa,serviceAndLayerArchitecture:Ga,ddd:$},Ja=Q(Ka),Ya=Q(Pa),Xa=Q(Fa),Za=Q(Ia),Qa=Q(La),$a=Q(Ra),eo=Q(za),to=Q(Ba),no=Q($),ro=no,io=Q(Va),ao=Q(Ha),oo=Q(Ua),so=Q(Wa),co=Q(Ga),lo={recommended:Ja,reactAndRuntimeBoundaries:Ya,effectComposition:Xa,concurrencySafety:Za,pipelineShapeAndSequencing:Qa,branchingAndLocalControlFlow:$a,optionMatchAndDataNormalization:eo,atomStateAndPlatformBoundaries:to,domainModeling:no,ddd:ro,effectFlow:io,pureTransformation:ao,behaviorDecoration:oo,styleSeparation:so,serviceAndLayerArchitecture:co};var uo=e({meta:{name:`linteffect`},rules:Ma});export{Ka as allRules,to as atomStateAndPlatformBoundaries,Ba as atomStateAndPlatformBoundariesRules,oo as behaviorDecoration,Ua as behaviorDecorationRules,$a as branchingAndLocalControlFlow,Ra as branchingAndLocalControlFlowRules,Za as concurrencySafety,Ia as concurrencySafetyRules,ro as ddd,uo as default,no as domainModeling,$ as domainModelingRules,Xa as effectComposition,Fa as effectCompositionRules,io as effectFlow,Va as effectFlowRules,Na as jsPlugins,eo as optionMatchAndDataNormalization,za as optionMatchAndDataNormalizationRules,Qa as pipelineShapeAndSequencing,La as pipelineShapeAndSequencingRules,lo as presets,ao as pureTransformation,Ha as pureTransformationRules,Ya as reactAndRuntimeBoundaries,Pa as reactAndRuntimeBoundariesRules,Ja as recommended,qa as ruleGroups,co as serviceAndLayerArchitecture,Ga as serviceAndLayerArchitectureRules,so as styleSeparation,Wa as styleSeparationRules};
1
+ import{definePlugin as e,defineRule as t}from"@oxlint/plugins";function n(e,t){return typeof e==`object`&&!!e&&e.type===`Identifier`&&typeof e.name==`string`&&(t===void 0||e.name===t)}function r(e,t,r){if(typeof e!=`object`||!e)return!1;let i=e;return i.type===`MemberExpression`&&i.computed!==!0&&n(i.object,t)&&n(i.property,r)}function i(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.type===`CallExpression`&&Array.isArray(t.arguments)&&typeof t.callee==`object`&&t.callee!==null&&t.callee.type===`MemberExpression`&&t.callee.computed!==!0&&n(t.callee.object,`Effect`)&&n(t.callee.property)}function a(e){return e.arguments[0]}function o(e,t){if(!i(e))return!1;let r=e.callee;return n(r.property,t)}function ee(e){if(!i(e))return!1;let t=a(e);return i(t)?i(a(t)):!1}function te(e){return i(e)?e.arguments.slice(0,2).some(e=>i(e)):!1}function s(e,t,n=new WeakSet){return o(e,t)?!0:Array.isArray(e)?e.some(e=>s(e,t,n)):typeof e!=`object`||!e||n.has(e)?!1:(n.add(e),Object.entries(e).some(([e,r])=>e!==`parent`&&s(r,t,n)))}function ne(e){if(o(e,`flatMap`)&&s(e.arguments,`flatMap`))return`Rule: avoid nested Effect.flatMap. Why: it hides sequencing and pushes laddered control flow. Fix: build context once (Effect.all/Effect.map) and run a single flatMap.`;if(o(e,`flatten`)&&s(a(e),`map`))return`Rule: avoid map+flatten ladders. Why: they hide sequencing. Fix: build context once (Effect.all/Effect.map) and run a single flatMap.`}const re=[`flatMap`,`zipRight`,`as`,`tap`];function ie(e){if(!o(e,`orElse`))return!1;let t=a(e);return re.some(e=>s(t,e))}function c(e){if(typeof e!=`object`||!e)return!1;let t=e;if(t.type!==`CallExpression`)return!1;if(n(t.callee,`pipe`))return!0;let r=t.callee;return typeof r==`object`&&!!r&&r.type===`MemberExpression`&&r.computed!==!0&&n(r.property,`pipe`)}function ae(e,t=new WeakSet){return c(e)?!0:Array.isArray(e)?e.some(e=>ae(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&ae(n,t)))}function oe(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.type===`CallExpression`&&Array.isArray(t.arguments)&&typeof t.callee==`object`&&t.callee!==null&&t.callee.type===`ArrowFunctionExpression`}function se(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.type===`CallExpression`&&Array.isArray(t.arguments)&&typeof t.callee==`object`&&t.callee!==null&&(t.callee.type===`ArrowFunctionExpression`||t.callee.type===`FunctionExpression`)}function l(e,t=new WeakSet){if(oe(e))return e;if(Array.isArray(e)){for(let n of e){let e=l(n,t);if(e)return e}return}if(!(typeof e!=`object`||!e)&&!t.has(e)){t.add(e);for(let[n,r]of Object.entries(e)){if(n===`parent`)continue;let e=l(r,t);if(e)return e}}}function u(e,t=new WeakSet){return Array.isArray(e)?e.flatMap(e=>u(e,t)):typeof e!=`object`||!e||t.has(e)?[]:(t.add(e),e.type===`ReturnStatement`?[e]:Object.entries(e).flatMap(([e,n])=>e===`parent`?[]:u(n,t)))}function ce(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.type===`CallExpression`&&(r(t.callee,`S`,`filter`)||r(t.callee,`Schema`,`filter`))}function le(e){if(typeof e!=`object`||!e)return[];let t=e;return t.type!==`CallExpression`||!Array.isArray(t.arguments)||ce(t)?[]:t.arguments.flatMap(e=>{if(typeof e!=`object`||!e||e.type!==`ArrowFunctionExpression`)return[];let t=e.body;return typeof t!=`object`||!t||t.type!==`BlockStatement`?[]:u(t)})}function ue(e){if(typeof e!=`object`||!e)return[];let t=e;return t.type!==`CallExpression`||!Array.isArray(t.arguments)?[]:t.arguments.flatMap(e=>typeof e!=`object`||!e||e.type!==`FunctionExpression`||e.generator===!0?[]:u(e.body))}function de(e){return typeof e==`object`&&!!e&&e.type===`FunctionExpression`&&e.generator===!0}function d(e,t){if(!o(e,t))return;let n=a(e);return de(n)?n:void 0}function fe(e,t){return d(e,t)!==void 0}const pe=new Set([`gen`,`sync`,`try`,`tryPromise`,`fn`]);function me(e){if(i(e)){let t=e.callee.property;if(n(t)&&pe.has(t.name))return!0}if(typeof e!=`object`||!e)return!1;let t=e;return t.type===`CallExpression`&&o(t.callee,`fn`)}function he(e){return typeof e==`object`&&!!e&&e.type===`CallExpression`&&r(e.callee,`Date`,`now`)}function ge(e,t=new WeakSet){return Array.isArray(e)?e.flatMap(e=>ge(e,t)):typeof e!=`object`||!e||t.has(e)?[]:(t.add(e),he(e)?[e]:Object.entries(e).flatMap(([e,n])=>e===`parent`?[]:ge(n,t)))}function _e(e,t=new WeakSet){if(Array.isArray(e)){for(let n of e){let e=_e(n,t);if(e)return e}return}if(!(typeof e!=`object`||!e)&&!t.has(e)){if(t.add(e),e.type===`YieldExpression`&&e.delegate!==!0)return e;for(let[n,r]of Object.entries(e)){if(n===`parent`)continue;let e=_e(r,t);if(e)return e}}}function ve(e){let t=d(e,`gen`);return t?_e(t.body):void 0}function ye(e,t=new WeakSet){return Array.isArray(e)?e.flatMap(e=>ye(e,t)):typeof e!=`object`||!e||t.has(e)?[]:(t.add(e),e.type===`YieldExpression`&&e.delegate===!0&&c(e.argument)?[e]:Object.entries(e).flatMap(([e,n])=>e===`parent`?[]:ye(n,t)))}function be(e){let t=d(e,`gen`);if(!t)return;let n=ye(t.body);return n.length>=2?n[1]:void 0}function f(e,t,n=new WeakSet){return Array.isArray(e)?e.some(e=>f(e,t,n)):typeof e!=`object`||!e||n.has(e)?!1:(n.add(e),e.type===t?!0:Object.entries(e).some(([e,r])=>e!==`parent`&&f(r,t,n)))}function p(e,t,r=new WeakSet){return n(e,t)?!0:Array.isArray(e)?e.some(e=>p(e,t,r)):typeof e!=`object`||!e||r.has(e)?!1:(r.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&p(n,t,r)))}function m(e,t=new WeakSet){return i(e)?!0:Array.isArray(e)?e.some(e=>m(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&m(n,t)))}function xe(e){if(typeof e!=`object`||!e||e.type!==`VariableDeclaration`)return;let t=e.declarations;if(!Array.isArray(t)||t.length!==1)return;let r=t[0];if(!(typeof r!=`object`||!r||r.type!==`VariableDeclarator`||!n(r.id)||typeof r.init!=`object`||r.init===null||r.init.type!==`YieldExpression`||r.init.delegate!==!0))return r.id.name}function Se(e,t){if(typeof e!=`object`||!e||e.type!==`ReturnStatement`)return!1;let r=e.argument;return r!==void 0&&!n(r,t)&&!f(r,`YieldExpression`)&&!f(r,`AwaitExpression`)&&!m(r)&&!p(r,`Promise`)}function Ce(e){let t=d(e,`gen`);if(!t||typeof t.body!=`object`||t.body===null)return;let n=t.body,r=Array.isArray(n.body)?n.body:[];if(r.length!==2)return;let i=xe(r[0]);return i&&Se(r[1],i)?e:void 0}const we=new Set([`andThen`,`flatMap`,`tap`,`zipRight`]);function Te(e){if(typeof e!=`object`||!e||e.type!==`CallExpression`)return[];let t=e,r=Array.isArray(t.arguments)?t.arguments:[];if(n(t.callee,`pipe`))return r.slice(1);let i=t.callee;return typeof i==`object`&&i&&i.type===`MemberExpression`&&i.computed!==!0&&n(i.property,`pipe`)?r:[]}function Ee(e){if(!i(e))return!1;let t=e.callee.property;return n(t)&&we.has(t.name)}function De(e){if(c(e))return Te(e).filter(e=>Ee(e)).length>=3?e:void 0}function h(e){return typeof e==`object`&&!!e&&e.type===`CallExpression`&&Array.isArray(e.arguments)&&n(e.callee,`flow`)}function Oe(e){return h(e)&&e.arguments.length>=5}function ke(e,t=new WeakSet){return typeof e==`object`&&e&&(e.type===`ArrowFunctionExpression`||e.type===`FunctionExpression`)&&e.async===!0?!0:Array.isArray(e)?e.some(e=>ke(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&ke(n,t)))}function Ae(e){return m(e)||f(e,`YieldExpression`)||f(e,`AwaitExpression`)||ke(e)||qt(e)||p(e,`Promise`)||p(e,`Runtime`)}function je(e){if(h(e))return e.arguments.find(e=>Ae(e))}function Me(e){if(!(typeof e!=`object`||!e||e.type!==`CallExpression`))return(e.arguments??[]).find(e=>h(e)&&e.arguments.length>=3)}const Ne=new Set([`annotateLogs`,`as`,`catchAll`,`catchSome`,`catchTag`,`map`,`mapBoth`,`provide`,`retry`,`tap`,`tapError`,`timeout`,`timeoutFail`,`withSpan`]);function Pe(e){if(!i(e))return!1;let t=e.callee.property;return n(t)&&Ne.has(t.name)}function Fe(e){return i(e)||c(e)}function Ie(e){if(!Pe(e))return;let t=e.arguments[0];return Fe(t)?e:void 0}function Le(e){return typeof e!=`object`||!e||e.type!==`YieldExpression`||e.delegate!==!0||!c(e.argument)?!1:Te(e.argument).some(e=>Pe(e))}function Re(e,t=new WeakSet){return Array.isArray(e)?e.flatMap(e=>Re(e,t)):typeof e!=`object`||!e||t.has(e)?[]:(t.add(e),Le(e)?[e]:Object.entries(e).flatMap(([e,n])=>e===`parent`?[]:Re(n,t)))}function ze(e){let t=d(e,`gen`);if(!t)return;let n=Re(t.body);return n.length>=2?n[1]:void 0}function Be(e){if(!c(e))return;let t=Te(e);if(!t.some(e=>Pe(e)))return;let n=t.filter(e=>Ee(e)).length,r=t.some(e=>f(e,`IfStatement`)||f(e,`SwitchStatement`)||f(e,`ForStatement`)||f(e,`ForInStatement`)||f(e,`ForOfStatement`)||f(e,`WhileStatement`));return n>=2||r?e:void 0}function g(e,t=new Set,n=new WeakSet){if((o(e,`gen`)||Ee(e))&&t.add(`workflow`),h(e)&&t.add(`pure`),Pe(e)&&t.add(`behavior`),(k(e,`Layer`)||r(e,`Layer`,`pipe`))&&t.add(`layer`),Array.isArray(e)){for(let r of e)g(r,t,n);return t}if(typeof e!=`object`||!e||n.has(e))return t;n.add(e);for(let[r,i]of Object.entries(e))r!==`parent`&&g(i,t,n);return t}function _(e){return typeof e==`object`&&!!e&&(e.type===`FunctionDeclaration`||e.type===`FunctionExpression`||e.type===`ArrowFunctionExpression`)}function Ve(e){if(!_(e))return;let t=e.body;return g(t).size>=3?e:void 0}function He(e,t=new WeakSet){if(Array.isArray(e))return e.reduce((e,n)=>Math.max(e,He(n,t)),0);if(typeof e!=`object`||!e||t.has(e))return 0;t.add(e);let n=Object.entries(e).reduce((e,[n,r])=>n===`parent`?e:Math.max(e,He(r,t)),0);return e.type===`CallExpression`?n+1:n}function Ue(e){if(typeof e!=`object`||!e||e.type!==`CallExpression`)return;let t=g(e),n=se(e)||l(e)!==void 0;return t.size>=2&&(He(e)>=4||n)?e:void 0}function We(e){if(typeof e!=`object`||!e||e.type!==`CallExpression`)return;let t=e;for(let e of t.arguments??[]){if(typeof e!=`object`||!e||!_(e))continue;let t=e.body;if(typeof t==`object`&&t&&t.type===`BlockStatement`&&Array.isArray(t.body)&&t.body.length>=3)return e}}function Ge(e){return r(e,`Effect`,`Service`)?!0:typeof e!=`object`||!e||e.type!==`CallExpression`?!1:Ge(e.callee)}function Ke(e){if(typeof e!=`object`||!e||e.type!==`CallExpression`)return;let t=e;if(Ge(t.callee))return[...t.arguments??[]].reverse().find(e=>typeof e==`object`&&!!e&&e.type===`ObjectExpression`)}function v(e){if(!(typeof e!=`object`||!e||e.type!==`ClassDeclaration`))return Ke(e.superClass)}function qe(e){return k(e,`Context`,`Tag`)||k(e,`Context`,`GenericTag`)}function Je(e,t=new WeakSet){return k(e,`Layer`,`provide`)?!0:Array.isArray(e)?e.some(e=>Je(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&Je(n,t)))}function Ye(e){return V(B(e,`accessors`),!0)}function Xe(e){if(!X(q(e)??``))return;let t=typeof e==`object`&&e?e.specifiers:void 0;return Array.isArray(t)?t.find(e=>typeof e==`object`&&!!e&&e.type===`ImportNamespaceSpecifier`):void 0}function Ze(e){return typeof e==`object`&&!!e&&e.type===`YieldExpression`&&e.delegate===!0&&n(e.argument)&&e.argument.name.endsWith(`Service`)}function y(e,t,n=new WeakSet){if(t(e))return e;if(Array.isArray(e)){for(let r of e){let e=y(r,t,n);if(e)return e}return}if(!(typeof e!=`object`||!e)&&!n.has(e)){n.add(e);for(let[r,i]of Object.entries(e)){if(r===`parent`)continue;let e=y(i,t,n);if(e)return e}}}function b(e,t,n=new WeakSet){let r=t(e)?[e]:[];return Array.isArray(e)?e.flatMap(e=>b(e,t,n)).concat(r):typeof e!=`object`||!e||n.has(e)?r:(n.add(e),Object.entries(e).reduce((e,[r,i])=>r===`parent`?e:e.concat(b(i,t,n)),r))}function Qe(e){if(!B(e,`dependencies`))return y(B(e,`effect`)??B(e,`scoped`),Ze)}function $e(e){if(!k(e,`Layer`))return!1;let t=e.callee.property;return n(t)&&(t.name===`provide`||t.name.startsWith(`merge`))}function et(e){if(typeof e!=`object`||!e||e.type!==`FunctionDeclaration`)return!1;let t=e.id;return n(t)&&/(handler|route|request)$/i.test(t.name)}function tt(e){if(et(e))return y(e.body,$e)?e:void 0}function nt(e){if(k(e,`Layer`,`provide`))return y(a(e),t=>t!==e&&k(t,`Layer`,`provide`))}function rt(e){return o(e,`provide`)||k(e,`Layer`,`provide`)}function it(e){let t=d(e,`gen`);return t?y(t.body,rt):void 0}function at(e){if(k(e,`Layer`,`merge`))return e.arguments?.find(t=>y(t,t=>t!==e&&k(t,`Layer`,`merge`)))}function ot(e){return n(e)&&/(Layer|Live)$/.test(e.name)}function st(e){if(!(typeof e!=`object`||!e||e.type!==`VariableDeclaration`))return e.declarations?.find(e=>typeof e==`object`&&!!e&&ot(e.id)&&y(e.init,rt))}function ct(e){return _(e)?Mn(L(e),`Promise`)||w(e.body)!==void 0:!1}function lt(e){return typeof e==`object`&&!!e&&e.type===`Property`&&ct(e.value)}function ut(e){return y(e,lt)}function dt(e){if(typeof e!=`object`||!e||e.type!==`ObjectExpression`)return!1;let t=e.properties;return Array.isArray(t)&&t.some(e=>typeof e==`object`&&!!e&&e.type===`Property`&&(_(e.value)||o(e.value,`fn`)))}function ft(e){if(typeof e!=`object`||!e)return;let t=e.declaration;if(!(typeof t!=`object`||!t)&&t.type===`VariableDeclaration`){for(let e of t.declarations??[])if(typeof e==`object`&&e&&n(e.id)&&e.id.name.endsWith(`Service`)&&dt(e.init))return e}}function pt(e){return typeof e==`object`&&!!e&&(e.type===`ArrowFunctionExpression`||e.type===`FunctionExpression`)&&e.async===!0}const x=new Set([`andThen`,`catchAll`,`catchTag`,`filterOrFail`,`flatMap`,`forEach`,`map`,`orElse`,`tap`]);function mt(e){if(!i(e))return;let t=e.callee.property;if(!(!n(t)||!x.has(t.name)))return e.arguments.find(e=>pt(e))}function S(e,t=new WeakSet){if(Array.isArray(e)){for(let n of e){let e=S(n,t);if(e)return e}return}if(!(typeof e!=`object`||!e)&&!t.has(e)){if(t.add(e),e.type===`ThrowStatement`)return e;for(let[n,r]of Object.entries(e)){if(n===`parent`)continue;let e=S(r,t);if(e)return e}}}function ht(e){let t=d(e,`gen`);if(t)return S(t.body);if(!i(e))return;let r=e.callee.property;if(!(!n(r)||!x.has(r.name)))for(let t of e.arguments){let e=R(t),n=e?S(e):void 0;if(n)return n}}function C(e,t=new WeakSet){if(Array.isArray(e)){for(let n of e){let e=C(n,t);if(e)return e}return}if(!(typeof e!=`object`||!e)&&!t.has(e)){if(t.add(e),e.type===`TryStatement`)return e;for(let[n,r]of Object.entries(e)){if(n===`parent`)continue;let e=C(r,t);if(e)return e}}}function gt(e){let t=d(e,`gen`);if(t)return C(t.body);if(!i(e))return;let r=e.callee.property;if(!(!n(r)||!x.has(r.name)))for(let t of e.arguments){let e=R(t),n=e?C(e):void 0;if(n)return n}}function _t(e){return k(e,`Promise`,`all`)||k(e,`Promise`,`allSettled`)||k(e,`Promise`,`any`)||k(e,`Promise`,`race`)||k(e,`Promise`,`reject`)||k(e,`Promise`,`resolve`)}function vt(e){if(typeof e!=`object`||!e||e.type!==`CallExpression`)return!1;let t=e.callee;return typeof t==`object`&&!!t&&t.type===`MemberExpression`&&t.computed!==!0&&(n(t.property,`then`)||n(t.property,`catch`)||n(t.property,`finally`))}function w(e,t=new WeakSet){if(Array.isArray(e)){for(let n of e){let e=w(n,t);if(e)return e}return}if(!(typeof e!=`object`||!e)&&!t.has(e)){if(t.add(e),_t(e)||vt(e))return e;for(let[n,r]of Object.entries(e)){if(n===`parent`)continue;let e=w(r,t);if(e)return e}}}function yt(e){let t=d(e,`gen`);if(t)return w(t.body);if(!i(e))return;let r=e.callee.property;if(!(!n(r)||!x.has(r.name)))for(let t of e.arguments){let e=R(t),n=e?w(e):void 0;if(n)return n}}const bt=new Set([`all`,`allSettled`,`any`,`race`]);function xt(e){if(typeof e!=`object`||!e||e.type!==`CallExpression`)return!1;let t=e.callee;return typeof t==`object`&&!!t&&t.type===`MemberExpression`&&t.computed!==!0&&n(t.object,`Promise`)&&n(t.property)&&bt.has(t.property.name)}function T(e,t=new WeakSet){if(Array.isArray(e)){for(let n of e){let e=T(n,t);if(e)return e}return}if(!(typeof e!=`object`||!e)&&!t.has(e)){if(t.add(e),xt(e))return e;for(let[n,r]of Object.entries(e)){if(n===`parent`)continue;let e=T(r,t);if(e)return e}}}function St(e){let t=d(e,`gen`);if(t)return T(t.body);if(o(e,`sync`)){let t=R(a(e));return t?T(t):void 0}if(!i(e))return;let r=e.callee.property;if(!(!n(r)||!x.has(r.name)))for(let t of e.arguments){let e=R(t),n=e?T(e):void 0;if(n)return n}}function Ct(e){if(typeof e!=`object`||!e)return!1;let t=e;return(t.type===`ArrowFunctionExpression`||t.type===`FunctionExpression`)&&Array.isArray(t.params)&&t.params.length>0}function wt(e){if(!o(e,`tryPromise`))return!1;let t=a(e);return Ct(t)?!0:Ct(B(t,`try`))}function Tt(e){return o(e,`promise`)?!0:o(e,`tryPromise`)&&!wt(e)}function Et(e){if(!o(e,`timeout`))return;let t=a(e);return Tt(t)?t:void 0}const Dt=new Set([`crypto`,`fs`,`zlib`]);function Ot(e){if(typeof e!=`object`||!e||e.type!==`CallExpression`)return!1;let t=e.callee;if(n(t))return t.name.endsWith(`Sync`);if(typeof t!=`object`||!t||t.type!==`MemberExpression`||t.computed===!0||!n(t.object)||!n(t.property))return!1;let r=t.object.name,i=t.property.name;return Dt.has(r)&&i.endsWith(`Sync`)}function E(e,t=new WeakSet){if(Array.isArray(e)){for(let n of e){let e=E(n,t);if(e)return e}return}if(!(typeof e!=`object`||!e)&&!t.has(e)){if(t.add(e),Ot(e))return e;for(let[n,r]of Object.entries(e)){if(n===`parent`)continue;let e=E(r,t);if(e)return e}}}function kt(e){let t=d(e,`gen`);if(t)return E(t.body);if(o(e,`sync`)){let t=R(a(e));return t?E(t):void 0}}const At=new Set([`runCallback`,`runFork`,`runPromise`,`runPromiseExit`,`runSync`,`runSyncExit`]);function jt(e){if(!i(e))return!1;let t=e.callee.property;return n(t)&&At.has(t.name)}function Mt(e){return r(e,`Effect`,`orDie`)||r(e,`Effect`,`orDieWith`)||o(e,`orDie`)||o(e,`orDieWith`)}function Nt(e){if(Mt(e))return e;if(c(e))return F(e).find(e=>Mt(e))}function Pt(e){return o(e,`succeed`)||o(e,`asVoid`)||o(e,`ignore`)||Sr(e)}function Ft(e){if(!o(e,`catchAll`))return;let t=R(a(e));return Pt(t)?t:void 0}function It(e){return r(e,`Effect`,`ignore`)||o(e,`ignore`)}function Lt(e){if(It(e))return e;if(c(e))return F(e).find(e=>It(e))}function D(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.type===`CallExpression`&&typeof t.callee==`object`&&t.callee!==null&&t.callee.type===`MemberExpression`&&t.callee.computed!==!0&&n(t.callee.object,`console`)&&n(t.callee.property)}function Rt(e){if(me(e))return b(e.arguments,D);let t=v(e);return t?b(B(t,`effect`)??B(t,`scoped`),D):[]}const zt=new Set([`catchAll`,`catchTag`,`catchTags`,`tapError`]);function Bt(e){return z(e)||typeof e==`object`&&!!e&&e.type===`TemplateLiteral`}function Vt(e){return o(e,`logError`)||o(e,`logWarning`)}function Ht(e){return typeof e==`object`&&!!e&&e.type===`ObjectExpression`}function Ut(e,t){return y(e,e=>o(e,`annotateLogs`))?!0:t.arguments.slice(1).some(e=>Ht(e)||!Bt(e))}function Wt(e){return b(e,t=>Vt(t)&&Bt(a(t))&&!Ut(e,t))}function Gt(e){if(!i(e))return[];let t=e.callee.property;return!n(t)||!zt.has(t.name)?[]:e.arguments.map(R).filter(e=>e!==void 0)}function O(e,t){if(typeof e!=`object`||!e)return!1;let r=e;return r.type===`CallExpression`&&n(r.callee,t)}function k(e,t,r){if(typeof e!=`object`||!e)return!1;let i=e;return i.type===`CallExpression`&&typeof i.callee==`object`&&i.callee!==null&&i.callee.type===`MemberExpression`&&i.callee.computed!==!0&&n(i.callee.object,t)&&n(i.callee.property)&&(r===void 0||n(i.callee.property,r))}function Kt(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.type!==`CallExpression`||typeof t.callee!=`object`||t.callee===null||t.callee.type!==`MemberExpression`||t.callee.computed===!0||!n(t.callee.object,`Effect`)||!n(t.callee.property)?!1:t.callee.property.name.startsWith(`log`)}function qt(e,t=new WeakSet){return D(e)?!0:Array.isArray(e)?e.some(e=>qt(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&qt(n,t)))}function Jt(e,t=new WeakSet){return O(e,`setState`)||k(e,`Atom`,`set`)||O(e,`invalidate`)||Kt(e)||D(e)?!0:Array.isArray(e)?e.some(e=>Jt(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&Jt(n,t)))}function A(e,t=new WeakSet){return k(e,`Ref`,`set`)||k(e,`Atom`,`set`)||k(e,`SubscriptionRef`,`set`)||k(e,`Reactivity`,`invalidate`)||k(e,`Fiber`,`interrupt`)||Kt(e)?!0:Array.isArray(e)?e.some(e=>A(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&A(n,t)))}function Yt(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.type!==`ObjectExpression`||!Array.isArray(t.properties)?!1:t.properties.some(e=>{if(typeof e!=`object`||!e)return!1;let t=e,r=t.key,i=t.value;return(n(r,`concurrency`)||typeof r==`object`&&!!r&&r.value===`concurrency`)&&typeof i==`object`&&!!i&&(i.type===`Literal`||i.type===`NumericLiteral`)&&i.value===1})}function Xt(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.type!==`ObjectExpression`||!Array.isArray(t.properties)?!1:t.properties.some(e=>{if(typeof e!=`object`||!e)return!1;let t=e.key;return n(t,`concurrency`)||typeof t==`object`&&!!t&&t.value===`concurrency`})}function Zt(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.type===`CallExpression`&&typeof t.callee==`object`&&t.callee!==null&&t.callee.type===`MemberExpression`&&t.callee.computed!==!0&&n(t.callee.property,`map`)}function Qt(e){return o(e,`all`)&&Zt(a(e))&&!Xt(e.arguments[1])}function $t(e,t=new WeakSet){if(o(e,`fork`))return e;if(Array.isArray(e)){for(let n of e){let e=$t(n,t);if(e)return e}return}if(!(typeof e!=`object`||!e)&&!t.has(e)){t.add(e);for(let[n,r]of Object.entries(e)){if(n===`parent`)continue;let e=$t(r,t);if(e)return e}}}function j(e,t,r=new WeakSet){if(i(e)){let r=e.callee.property;if(n(r)&&t.has(r.name))return!0}return Array.isArray(e)?e.some(e=>j(e,t,r)):typeof e!=`object`||!e||r.has(e)?!1:(r.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&j(n,t,r)))}const en=new Set([`sleep`,`await`,`promise`,`tryPromise`,`fork`,`forkDaemon`,`forkScoped`,`all`,`forEach`,`race`,`raceAll`]),tn=new Set([`modifyEffect`,`modifySomeEffect`,`updateEffect`,`updateAndGetEffect`]);function M(e,t=new WeakSet){if(i(e)){let t=e.callee.property;if(n(t)&&en.has(t.name))return!0}return k(e,`Queue`,`take`)||k(e,`Deferred`,`await`)?!0:Array.isArray(e)?e.some(e=>M(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&M(n,t)))}function N(e,t){if(typeof e!=`object`||!e)return!1;let r=e;return r.type===`CallExpression`&&Array.isArray(r.arguments)&&typeof r.callee==`object`&&r.callee!==null&&r.callee.type===`MemberExpression`&&r.callee.computed!==!0&&n(r.callee.property,t)}function nn(e){if(typeof e!=`object`||!e||e.type!==`CallExpression`)return;let t=e;if(Array.isArray(t.arguments)){if(typeof t.callee==`object`&&t.callee!==null&&t.callee.type===`CallExpression`){let e=t.callee;if((N(e,`withPermit`)||N(e,`withPermits`))&&t.arguments.length>0)return t.arguments[0]}if(k(t,`TSemaphore`,`withPermit`)||k(t,`TSemaphore`,`withPermits`))return t.arguments[0];if(N(t,`withPermit`)||N(t,`withPermits`))return t.arguments.at(-1)}}function rn(e){if(typeof e!=`object`||!e||e.type!==`CallExpression`)return;let t=e;if(Array.isArray(t.arguments)){if(typeof t.callee==`object`&&t.callee!==null&&t.callee.type===`CallExpression`){let e=t.callee;if(an(e,`SynchronizedRef`)&&t.arguments.length>0)return e.arguments.at(-1)}if(an(t,`SynchronizedRef`)&&t.arguments.length>1||on(t)&&!sn(t))return t.arguments.at(-1)}}function an(e,t){return[...tn].some(n=>k(e,t,n))}function on(e){return[...tn].some(t=>N(e,t))}function sn(e){return[...tn].some(t=>k(e,`SynchronizedRef`,t))}const cn=new Set([`acquireRelease`,`acquireUseRelease`,`ensuring`,`forkIn`,`forkScoped`,`scoped`]);function ln(e){return!o(e,`race`)&&!o(e,`raceAll`)?!1:!j(e.arguments,cn)}function un(e){return o(e,`forEach`)&&!Xt(e.arguments[2])}const dn=new Set([`retry`]);function fn(e){return(Qt(e)||un(e))&&j(e.arguments,dn)}function pn(e){if(typeof e!=`object`||!e||e.type!==`VariableDeclaration`)return[];let t=e.declarations;return Array.isArray(t)?t.flatMap(e=>{if(typeof e!=`object`||!e)return[];let t=e.id;return n(t)?[t.name]:[]}):[]}function mn(e,t=new Set,n=new WeakSet){if(Array.isArray(e)){for(let r of e)mn(r,t,n);return t}if(typeof e!=`object`||!e||n.has(e))return t;if(n.add(e),e.type===`VariableDeclaration`)for(let n of pn(e))t.add(n);for(let[r,i]of Object.entries(e))r!==`parent`&&mn(i,t,n);return t}const hn=new Set([`add`,`clear`,`delete`,`pop`,`push`,`reverse`,`set`,`shift`,`sort`,`splice`,`unshift`]);function gn(e){if(typeof e!=`object`||!e)return;let t=e;if(t.type===`AssignmentExpression`&&n(t.left))return t.left.name;if(t.type===`UpdateExpression`&&n(t.argument))return t.argument.name;if(t.type===`CallExpression`&&typeof t.callee==`object`&&t.callee!==null&&t.callee.type===`MemberExpression`&&t.callee.computed!==!0&&n(t.callee.object)&&n(t.callee.property)&&hn.has(t.callee.property.name))return t.callee.object.name}function P(e,t,n=mn(e),r=new WeakSet){if(Array.isArray(e)){for(let i of e){let e=P(i,t,n,r);if(e)return e}return}if(typeof e!=`object`||!e||r.has(e))return;r.add(e);let i=gn(e);if(i&&t.has(i)&&!n.has(i))return e;for(let[i,a]of Object.entries(e)){if(i===`parent`)continue;let e=P(a,t,n,r);if(e)return e}}function _n(e){if(o(e,`fork`)||o(e,`all`)||o(e,`forEach`))return e.arguments}const vn=new Set([`all`,`forEach`,`fork`,`race`,`raceAll`]);function yn(e,t=new WeakSet){return j(e,vn)||k(e,`Queue`,`take`)?!0:Array.isArray(e)?e.some(e=>yn(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&yn(n,t)))}function bn(e){return o(e,`uninterruptible`)&&yn(e.arguments[0])}function xn(e){return k(e,`Queue`,`unbounded`)||k(e,`PubSub`,`unbounded`)}function Sn(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.type===`ObjectExpression`||t.type===`ArrayExpression`||t.type===`NewExpression`&&(n(t.callee,`Map`)||n(t.callee,`Set`))||t.type===`CallExpression`&&(n(t.callee,`Map`)||n(t.callee,`Set`))}function Cn(e){if(typeof e!=`object`||!e||e.type!==`VariableDeclaration`)return[];let t=e,r=Array.isArray(t.declarations)?t.declarations:[];return t.kind===`let`||t.kind===`var`?pn(e):r.flatMap(e=>{if(typeof e!=`object`||!e)return[];let t=e.id;return n(t)&&Sn(e.init)?[t.name]:[]})}function wn(e){if(typeof e!=`object`||!e||e.type!==`VariableDeclarator`)return;let t=e;return n(t.id)&&o(t.init,`fork`)?t.id.name:void 0}const Tn=new Set([`await`,`interrupt`,`join`]);function En(e){if(typeof e!=`object`||!e||e.type!==`CallExpression`)return;let t=e,r=t.callee;if(typeof r!=`object`||!r||r.type!==`MemberExpression`||r.computed===!0||!n(r.object,`Fiber`)||!n(r.property)||!Tn.has(r.property.name)||!Array.isArray(t.arguments))return;let[i]=t.arguments;return n(i)?i.name:void 0}function Dn(e){return r(e,`Effect`,`asVoid`)||k(e,`Effect`,`asVoid`)}function On(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.type!==`CallExpression`||!Array.isArray(t.arguments)||typeof t.callee!=`object`||t.callee===null||t.callee.type!==`MemberExpression`||t.callee.computed===!0||!n(t.callee.property,`pipe`)?!1:o(t.callee.object,`all`)&&t.arguments.some(e=>Dn(e))}function F(e){if(typeof e!=`object`||!e||!c(e))return[];let t=e;return n(t.callee,`pipe`)?t.arguments:[t.callee.object,...t.arguments]}function kn(e){let[t]=F(e);return t!==void 0&&m(t)}function An(e){if(kn(e))return!0;if(typeof e==`object`&&e&&e.type===`ArrowFunctionExpression`){let t=e.body;return i(t)||kn(t)}return!1}function jn(e){return u(e).some(e=>typeof e==`object`&&!!e&&(An(e.argument)||i(e.argument)))}function I(e,t,r){if(typeof e!=`object`||!e||e.type!==`TSTypeReference`)return!1;let i=e.typeName;return typeof i==`object`&&!!i&&i.type===`TSQualifiedName`&&n(i.left,t)&&n(i.right,r)}function Mn(e,t){return typeof e==`object`&&!!e&&e.type===`TSTypeReference`&&n(e.typeName,t)}function Nn(e){if(typeof e!=`object`||!e)return[];let t=e.typeParameters??e.typeArguments;if(typeof t!=`object`||!t)return[];let n=t.params??t.arguments;return Array.isArray(n)?n:[]}function Pn(e){return n(e,`Error`)||Mn(e,`Error`)}function L(e){if(typeof e!=`object`||!e)return;let t=e.returnType;if(!(typeof t!=`object`||!t))return t.typeAnnotation??t}function Fn(e,t){return I(L(e),`Effect`,`Effect`)||I(t,`Effect`,`Effect`)}function In(e){if(typeof e!=`object`||!e)return[];let t=e.body;if(typeof t!=`object`||!t)return[];if(t.type!==`BlockStatement`)return[t];let n=(e,t=new WeakSet)=>{if(Array.isArray(e))return e.flatMap(e=>n(e,t));if(typeof e!=`object`||!e||t.has(e))return[];t.add(e);let r=e;return r.type===`ReturnStatement`?[r.argument]:r.type===`ArrowFunctionExpression`||r.type===`FunctionExpression`||r.type===`FunctionDeclaration`?[]:Object.entries(r).flatMap(([e,r])=>e===`parent`?[]:n(r,t))};return n(t)}function Ln(e){return In(e).filter(e=>i(e)||kn(e))}function Rn(e){return o(e,`withSpan`)||c(e)&&F(e).some(e=>o(e,`withSpan`))}function zn(e,t){if(!Fn(e,t))return;let n=Ln(e);return n.length===0||n.some(e=>!Rn(e))?e:void 0}function Bn(e){if(typeof e!=`object`||!e)return;let t=e.typeAnnotation;if(!(typeof t!=`object`||!t))return L(t.typeAnnotation??t)}function Vn(e){if(typeof e!=`object`||!e)return[];let t=e;if(t.type!==`ExportNamedDeclaration`&&t.type!==`ExportDefaultDeclaration`)return[];let n=t.declaration;return typeof n!=`object`||!n?[]:n.type===`FunctionDeclaration`?[{functionNode:n}]:n.type===`VariableDeclaration`?(n.declarations??[]).flatMap(e=>{if(typeof e!=`object`||!e)return[];let t=e.init;return typeof t==`object`&&t&&(t.type===`ArrowFunctionExpression`||t.type===`FunctionExpression`)?[{functionNode:t,declaredReturnType:Bn(e.id)}]:[]}):[]}function Hn(e){let t=B(e,`effect`)??B(e,`scoped`),n=d(t,`gen`),r=n?In(n).find(Ht):o(t,`succeed`)&&Ht(a(t))?a(t):void 0;if(!r)return[];let i=r.properties;return Array.isArray(i)?i.flatMap(e=>{if(typeof e!=`object`||!e||e.type!==`Property`)return[];let t=e.value;return typeof t==`object`&&t&&(t.type===`ArrowFunctionExpression`||t.type===`FunctionExpression`)?[t]:[]}):[]}function Un(e){return Ln(e).some(e=>!Rn(e))?e:void 0}function Wn(e){let t=L(e);if(!I(t,`Effect`,`Effect`))return;let[,n]=Nn(t);return Pn(n)?t:void 0}function Gn(e){if(typeof e!=`object`||!e)return;let t=e;if(t.type!==`ExportNamedDeclaration`&&t.type!==`ExportDefaultDeclaration`)return;let n=t.declaration;if(!(typeof n!=`object`||!n)){if(n.type===`FunctionDeclaration`)return Wn(n);if(n.type===`VariableDeclaration`)for(let e of n.declarations??[]){if(typeof e!=`object`||!e)continue;let t=e.init;if(typeof t==`object`&&t&&(t.type===`ArrowFunctionExpression`||t.type===`FunctionExpression`)){let e=Wn(t);if(e)return e}}}}function Kn(e,t,n,r=new WeakSet){return I(e,t,n)?!0:Array.isArray(e)?e.some(e=>Kn(e,t,n,r)):typeof e!=`object`||!e||r.has(e)?!1:(r.add(e),Object.entries(e).some(([e,i])=>e!==`parent`&&Kn(i,t,n,r)))}function qn(e,t=new WeakSet){return O(e,`wrapGraphqlCall`)?!0:Array.isArray(e)?e.some(e=>qn(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&qn(n,t)))}function Jn(e){return o(e,`flatMap`)&&n(a(e),`applyResponse`)}function Yn(e,t=new WeakSet){return Jn(e)?!0:Array.isArray(e)?e.some(e=>Yn(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&Yn(n,t)))}function Xn(e,t=new WeakSet){if(o(e,`catchAll`))return e;if(Array.isArray(e)){for(let n of e){let e=Xn(n,t);if(e)return e}return}if(!(typeof e!=`object`||!e)&&!t.has(e)){t.add(e);for(let[n,r]of Object.entries(e)){if(n===`parent`)continue;let e=Xn(r,t);if(e)return e}}}function Zn(e){let t=F(e);if(t.length===0)return;let n=Xn(t);if(n)return qn(t)||Yn(t)?n:void 0}const Qn=new Set([`get`,`set`,`update`,`modify`,`refresh`]);function R(e){if(typeof e!=`object`||!e)return;let t=e;if(!(t.type!==`ArrowFunctionExpression`&&t.type!==`FunctionExpression`))return t.body}function $n(e){if(typeof e!=`object`||!e)return!1;let t=e;if(t.type!==`CallExpression`||!Array.isArray(t.arguments)||typeof t.callee!=`object`||t.callee===null||t.callee.type!==`MemberExpression`||t.callee.computed===!0)return!1;let r=t.callee;return(n(r.object,`Atom`)||n(r.object,`atomRegistry`))&&n(r.property)&&Qn.has(r.property.name)}function er(e,t=new WeakSet){if($n(e))return e;if(Array.isArray(e)){for(let n of e){let e=er(n,t);if(e)return e}return}if(!(typeof e!=`object`||!e)&&!t.has(e)){t.add(e);for(let[n,r]of Object.entries(e)){if(n===`parent`)continue;let e=er(r,t);if(e)return e}}}function tr(e){if(!o(e,`sync`))return;let t=R(a(e));return t?er(t):void 0}function nr(e){return n(e)?/(CollectionAtom|ListAtom|Visible.*Atom|ResultsAtom|ReadStateAtom)$/.test(e.name):!1}function rr(e){if(typeof e!=`object`||!e)return;let t=e;if(t.type!==`CallExpression`||!Array.isArray(t.arguments)||!(n(t.callee,`get`)||r(t.callee,`Atom`,`get`)||r(t.callee,`get`,`get`)))return;let[i]=t.arguments;return nr(i)?i:void 0}function ir(e,t=new WeakSet){let n=rr(e);if(n)return n;if(Array.isArray(e)){for(let n of e){let e=ir(n,t);if(e)return e}return}if(!(typeof e!=`object`||!e)&&!t.has(e)){t.add(e);for(let[n,r]of Object.entries(e)){if(n===`parent`)continue;let e=ir(r,t);if(e)return e}}}function ar(e){return o(e,`provide`)&&e.arguments.length===1}function or(e){if(c(e))return F(e).find(e=>ar(e))}function sr(e,t=new WeakSet){return typeof e==`object`&&e&&e.type===`SpreadElement`?!0:Array.isArray(e)?e.some(e=>sr(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&sr(n,t)))}function cr(e){if(!k(e,`Ref`,`update`)&&!k(e,`Ref`,`modify`))return!1;let t=e.arguments[1];return sr(R(t))}function lr(e){return typeof e==`object`&&!!e&&e.type===`ObjectExpression`&&Array.isArray(e.properties)&&e.properties.length===0}function ur(e,t=new WeakSet){return k(e,`Object`,`entries`)?!0:Array.isArray(e)?e.some(e=>ur(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&ur(n,t)))}function dr(e){if(cr(e))return!0;if(k(e,`Object`,`assign`)){let t=e.arguments;return t.length>=3&&lr(t[0])}return k(e,`Object`,`fromEntries`)?ur(e.arguments[0]):k(e,`JSON`,`stringify`)||k(e,`JSON`,`parse`)}function fr(e){return n(e)?!0:typeof e==`object`&&!!e&&e.type===`MemberExpression`}function pr(e){return typeof e!=`object`||!e||e.type!==`VariableDeclaration`?!1:e.declarations?.some(e=>{if(typeof e!=`object`||!e)return!1;let t=e.init;return typeof t==`object`&&!!t&&t.type===`TSAsExpression`&&typeof t.typeAnnotation==`object`&&t.typeAnnotation!==null&&t.typeAnnotation.type!==`TSConstKeyword`})??!1}function mr(e){if(typeof e!=`object`||!e||e.type!==`BinaryExpression`)return!1;let t=e;if(t.operator!==`===`)return!1;let n=t.left,r=t.right;return typeof n==`object`&&!!n&&n.type===`UnaryExpression`&&n.operator===`typeof`&&typeof r==`object`&&!!r&&(r.type===`Literal`||r.type===`StringLiteral`)&&r.value===`boolean`}function hr(e){return H(e,`orElse`)&&li(U(e.arguments[0]))}function z(e){return typeof e==`object`&&!!e&&(e.type===`Literal`||e.type===`StringLiteral`)&&typeof e.value==`string`}function gr(e){return n(e,`undefined`)}function _r(e){return typeof e==`object`&&!!e&&e.type===`LogicalExpression`&&e.operator===`??`&&(li(e.right)||gr(e.right))}function vr(e){return k(e,`Option`,`fromNullable`)&&_r(e.arguments[0])}function B(e,t){if(!(typeof e!=`object`||!e||e.type!==`ObjectExpression`))for(let r of e.properties??[]){if(typeof r!=`object`||!r)continue;let e=r.key;if(n(e,t))return r.value}}function yr(e){if(typeof e!=`object`||!e||e.type!==`BinaryExpression`)return!1;let t=e;return t.operator===`===`&&(V(t.left,!0)||V(t.right,!0))}function br(e){if(!k(e,`Option`,`match`))return!1;let t=e.arguments[1],n=B(t,`onSome`),r=B(t,`onNone`);return yr(U(n))&&V(U(r),!1)}function xr(e){return typeof e!=`object`||!e||e.type!==`VariableDeclaration`?!1:e.declarations?.some(e=>typeof e==`object`&&!!e&&z(e.init))??!1}function V(e,t){return typeof e==`object`&&!!e&&(e.type===`Literal`||e.type===`BooleanLiteral`)&&e.value===t}function Sr(e){return r(e,`Effect`,`void`)}function H(e,t){if(typeof e!=`object`||!e)return!1;let r=e;return r.type===`CallExpression`&&Array.isArray(r.arguments)&&typeof r.callee==`object`&&r.callee!==null&&r.callee.type===`MemberExpression`&&r.callee.computed!==!0&&n(r.callee.object,`Match`)&&n(r.callee.property)&&(t===void 0||n(r.callee.property,t))}function U(e){if(!(typeof e!=`object`||!e||e.type!==`ArrowFunctionExpression`))return e.body}function Cr(e){if(!H(e))return!1;let[t,r]=e.arguments;return n(e.callee.property,`when`)?(V(t,!0)||V(t,!1))&&Sr(U(r)):n(e.callee.property,`orElse`)&&Sr(U(t))}const wr=[`flatMap`,`map`,`andThen`,`tap`,`zipRight`];function Tr(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.type===`CallExpression`&&typeof t.callee==`object`&&t.callee!==null&&t.callee.type===`MemberExpression`&&t.callee.computed!==!0&&n(t.callee.object,`Stream`)&&n(t.callee.property)}function Er(e,t=new WeakSet){return wr.some(t=>o(e,t))||c(e)||Tr(e)?!0:Array.isArray(e)?e.some(e=>Er(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&Er(n,t)))}function Dr(e){return m(e)&&Er(e)}function Or(e,t=new WeakSet){return H(e)&&Dr(n(e.callee.property,`when`)?U(e.arguments[1]):U(e.arguments[0]))?!0:Array.isArray(e)?e.some(e=>Or(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&Or(n,t)))}function kr(e,t=new WeakSet){return H(e)?!0:Array.isArray(e)?e.some(e=>kr(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&kr(n,t)))}function Ar(e){return typeof e==`object`&&!!e&&e.type===`CallExpression`&&Array.isArray(e.arguments)&&r(e.callee,`Option`,`match`)}function jr(e){let t=U(e);return typeof t==`object`&&!!t&&t.type===`CallExpression`}function Mr(e,t=new WeakSet){if(o(e,`gen`))return e;if(Array.isArray(e)){for(let n of e){let e=Mr(n,t);if(e)return e}return}if(!(typeof e!=`object`||!e)&&!t.has(e)){t.add(e);for(let[n,r]of Object.entries(e)){if(n===`parent`)continue;let e=Mr(r,t);if(e)return e}}}function Nr(e){if(!c(e)||typeof e!=`object`||!e)return!1;let t=e.callee.object;return typeof t==`object`&&!!t&&t.type===`CallExpression`&&r(t.callee,`Match`,`value`)}function Pr(e){return Nr(e)||typeof e==`object`&&!!e&&e.type===`CallExpression`&&(r(e.callee,`Option`,`match`)||r(e.callee,`Either`,`match`))}function Fr(e,t=new WeakSet){return Pr(e)?!0:Array.isArray(e)?e.some(e=>Fr(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&Fr(n,t)))}function Ir(e){if(typeof e!=`object`||!e)return[];let t=e;return t.type!==`ObjectExpression`||!Array.isArray(t.properties)?[]:t.properties.map(e=>typeof e==`object`&&e?e.value:void 0).filter(e=>e!==void 0)}function Lr(e){if(typeof e!=`object`||!e||e.type!==`TSTypeAliasDeclaration`)return!1;let t=e.id,r=e.typeAnnotation;return n(t)&&/(?:Id|ID)$/.test(t.name)&&(r?.type===`TSStringKeyword`||r?.type===`TSNumberKeyword`)}function Rr(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.type===`TSBooleanKeyword`?!0:t.type===`TSTypeAnnotation`&&typeof t.typeAnnotation==`object`&&t.typeAnnotation!==null&&t.typeAnnotation.type===`TSBooleanKeyword`}function zr(e){if(typeof e!=`object`||!e)return;let t=e;return t.type===`TSTypeAnnotation`&&typeof t.typeAnnotation==`object`&&t.typeAnnotation!==null?t.typeAnnotation:t}function Br(e){let t=zr(e);return t?.type===`TSStringKeyword`||t?.type===`TSNumberKeyword`}function Vr(e){let t=zr(e);return t?.type===`TSAnyKeyword`||t?.type===`TSObjectKeyword`}function Hr(e){let t=zr(e);return t?.type===`TSTypeReference`&&n(t.typeName,`Date`)}function Ur(e){if(typeof e!=`object`||!e||!Array.isArray(e.params))return[];let t=/(?:id|amount|currency|account|user|order|customer|invoice|payment|price|total|quantity|transfer|fund|balance)/i;return e.params.filter(e=>n(e)&&Br(e.typeAnnotation)&&t.test(e.name))}function Wr(e){return Ur(e).length>=3}function Gr(e){return n(e)?/^(?:is|has|should|with|allow|enable|can|use)[A-Z0-9_]/.test(e.name)&&Rr(e.typeAnnotation):!1}function Kr(e){return typeof e!=`object`||!e||!Array.isArray(e.params)?[]:e.params.filter(Gr)}function qr(e){if(n(e))return e.name;if(typeof e==`object`&&e&&typeof e.value==`string`)return e.value}function Jr(e){return/(?:createdAt|updatedAt|expiresAt|expiredAt|renewedAt|startedAt|endedAt|deletedAt|timestamp|timeoutMs|durationMs|ttlMs|ttl)$/i.test(e)}function Yr(e){if(typeof e!=`object`||!e||e.type!==`TSPropertySignature`)return!1;let t=e,n=qr(t.key),r=t.typeAnnotation;return n!==void 0&&Jr(n)&&(Br(r)||Hr(r))}function Xr(e){if(typeof e!=`object`||!e)return[];let t=e;return t.type===`TSInterfaceDeclaration`&&typeof t.body==`object`&&t.body!==null&&Array.isArray(t.body.body)?t.body.body:t.type===`TSTypeLiteral`&&Array.isArray(t.members)?t.members:[]}function Zr(e){return Xr(e).filter(Yr)}function Qr(e){return n(e)?/^(?:opts|options|config)$/i.test(e.name)&&Vr(e.typeAnnotation):!1}function $r(e){return typeof e!=`object`||!e||!Array.isArray(e.params)?[]:e.params.filter(Qr)}const ei=new Set([`==`,`===`,`!=`,`!==`,`>`,`>=`,`<`,`<=`]);function W(e,t=new WeakSet){if(Array.isArray(e))return e.reduce((e,n)=>e+W(n,t),0);if(typeof e!=`object`||!e||t.has(e))return 0;t.add(e);let n=e;return n.type===`BinaryExpression`&&ei.has(String(n.operator))?1:n.type===`LogicalExpression`?W(n.left,t)+W(n.right,t):0}function ti(e){return typeof e==`object`&&!!e&&e.type===`LogicalExpression`&&W(e)>=3}function ni(e){if(typeof e!=`object`||!e||e.type!==`MemberExpression`)return;let t=e;if(t.computed===!0||!n(t.object)||!n(t.property))return;let r=t.property.name;if(/(?:cancelled|canceled|shipped|approved|rejected|pending|active|inactive|enabled|disabled|locked|archived|deleted|submitted|processing|failed|complete|completed)$/i.test(r))return{objectName:t.object.name,propertyName:r}}function G(e,t=new Map,n=new WeakSet){let r=ni(e);if(r){let e=t.get(r.objectName)??new Set;return e.add(r.propertyName),t.set(r.objectName,e),t}if(Array.isArray(e)){for(let r of e)G(r,t,n);return t}if(typeof e!=`object`||!e||n.has(e))return t;n.add(e);let i=e;return i.type===`LogicalExpression`?(G(i.left,t,n),G(i.right,t,n),t):t}function ri(e){return typeof e!=`object`||!e||e.type!==`LogicalExpression`?!1:Array.from(G(e).values()).some(e=>e.size>=2)}function ii(e){return o(e,`fail`)&&z(a(e))}function ai(e){if(typeof e!=`object`||!e||e.type!==`ThrowStatement`)return!1;let t=e.argument;return typeof t==`object`&&!!t&&t.type===`NewExpression`&&n(t.callee,`Error`)&&Array.isArray(t.arguments)&&z(t.arguments[0])}function oi(e){return typeof e!=`object`||!e||!Array.isArray(e.params)?!1:e.params.some(e=>n(e)&&/(?:^id$|Id$|ID$)/.test(e.name)&&Br(e.typeAnnotation))}function si(e){if(typeof e!=`object`||!e||e.type!==`FunctionDeclaration`)return!1;let t=e.id;return n(t)&&/(?:Admin|Public|Internal|External|Private|Backoffice|Panel)/.test(t.name)&&oi(e)}function ci(e){if(typeof e!=`object`||!e||e.type!==`BinaryExpression`)return!1;let t=e;return[`==`,`===`,`!=`,`!==`].includes(String(t.operator))&&(z(t.left)||z(t.right))&&!mr(t)}function K(e,t,n){e.report({message:n,node:t})}function li(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.type===`NullLiteral`||t.type===`Literal`&&t.value===null}function q(e){if(typeof e!=`object`||!e)return;let t=e.source;if(typeof t==`string`)return t;if(typeof t==`object`&&t){let e=t.value;if(typeof e==`string`)return e}}const ui=[`bin/**`,`scripts/**`,`cli/**`,`**/main.ts`,`app/api/**/route.ts`,`server/**`,`*.test.ts`,`*.spec.ts`],di=[`**/*.test.*`,`**/*.spec.*`,`**/__tests__/**`],fi=[`**/config/**`,`**/*Config.ts`,`**/*ConfigLayer.ts`],J=[{type:`object`,properties:{boundaryPaths:{type:`array`,items:{type:`string`}}},additionalProperties:!1}],pi=[{type:`object`,properties:{boundaryPaths:{type:`array`,items:{type:`string`}},configPaths:{type:`array`,items:{type:`string`}}},additionalProperties:!1}];function mi(e){let t=e.options[0];return typeof t==`object`&&t?t:{}}function hi(e,t){let n=e[t];return Array.isArray(n)&&n.every(e=>typeof e==`string`)?n:void 0}function gi(e){return e.replace(/\\/g,`/`).replace(/^\.\/+/,``).replace(/\/{2,}/g,`/`).replace(/\/$/,``)}function _i(e){return e.replace(/[|\\{}()[\]^$+?.]/g,`\\$&`).replace(/\*/g,`[^/]*`)}function vi(e){let t=gi(e);if(t===`**`)return/^.*$/;let n=t.split(`/`),r=n[0]===`**`,i=+!!r,a=r?`(?:.*/)?`:`(?:^|.*/)`;for(let e=i;e<n.length;e+=1){let t=n[e],r=e===n.length-1;if(t===`**`){a+=r?`(?:/.*)?`:`(?:/[^/]+)*`;continue}e>i&&(a+=`/`),a+=_i(t)}return RegExp(`${a}$`)}function yi(e,t){return vi(t).test(gi(e))}function bi(e){return hi(mi(e),`boundaryPaths`)??ui}function Y(e){return bi(e).some(t=>yi(e.filename,t))}function xi(e){return di.some(t=>yi(e.filename,t))}function Si(e){return hi(mi(e),`configPaths`)??fi}function Ci(e){return Si(e).some(t=>yi(e.filename,t))}function X(e){return e===`effect`||e.startsWith(`effect/`)||e===`@effect-atom/atom-react`}function wi(e){if(!O(e,`it`)&&!O(e,`test`)&&!O(e,`specify`)&&!O(e,`bench`))return;let t=e.arguments?.at(-1);return _(t)?t:void 0}function Ti(e){let t=e.body;if(!o(t,`runPromise`)&&!(typeof t!=`object`||!t||t.type!==`BlockStatement`||!Array.isArray(t.body))){for(let e of t.body)if(typeof e==`object`&&e&&e.type===`ExpressionStatement`&&o(e.expression,`runPromise`))return e.expression}}function Ei(e,t){let n=[],r=new WeakSet;function i(e,a=!1){if(Array.isArray(e)){for(let t of e)i(t);return}if(typeof e!=`object`||!e||r.has(e))return;r.add(e);let o=e;if(!(!a&&_(o))){t(o)&&n.push(o);for(let[e,t]of Object.entries(o))e!==`parent`&&i(t)}}return i(e,!0),n}function Di(e){if(typeof e!=`object`||!e||e.type!==`MemberExpression`||e.computed===!0||!n(e.property,`rejects`))return!1;let t=e.object;if(!O(t,`expect`))return!1;let r=t.arguments;if(!Array.isArray(r))return!1;let i=r[0];return o(i,`runPromise`)}function Oi(e){return typeof e==`object`&&!!e&&e.type===`MemberExpression`&&e.computed!==!0&&n(e.property,`Default`)}function ki(e){return k(e,`Layer`,`succeed`)||k(e,`Layer`,`effect`)}function Ai(e){if(!k(e,`Layer`,`provide`))return[];let t=e.arguments;return!Array.isArray(t)||!t.some(Oi)?[]:t.filter(ki)}function ji(e){let t=q(e);if(t===`effect/Schema`)return!0;if(t!==`effect`||typeof e!=`object`||!e)return!1;let r=e.specifiers;return Array.isArray(r)&&r.some(e=>{if(typeof e!=`object`||!e)return!1;let t=e;return t.type===`ImportSpecifier`&&n(t.imported,`Schema`)})}function Mi(e,n){return t({create(t){let r=!1;return{ImportDeclaration(e){let t=q(e);t&&X(t)&&(r=!0)},[e](e){r&&K(t,e,n)}}}})}const Ni=new Set([`useState`,`useReducer`,`useContext`,`useCallback`,`useEffect`,`useSyncExternalStore`]),Pi=t({create(e){return{CallExpression(t){let r=t.callee,i=n(r)?r.name:typeof r==`object`&&r&&r.type===`MemberExpression`&&n(r.property)?r.property.name:void 0;i&&Ni.has(i)&&K(e,r,`Rule: avoid React state hooks. Why: they bypass the atom runtime and break reactive flow. Fix: use @effect-atom/atom-react instead.`)}}}}),Fi=Mi(`IfStatement`,`Rule: avoid imperative if branching. Why: Effect code should keep branching explicit and typed. Fix: use Match.value/Match.type or Effect combinators instead.`),Ii=Mi(`SwitchStatement`,`Rule: avoid imperative switch branching. Why: Effect code should keep branching explicit and typed. Fix: use Match.value/Match.type instead.`),Li=Mi(`ConditionalExpression`,`Rule: avoid ternary expressions. Why: they hide control flow inside expressions. Fix: use Option.match/Either.match/Match.value or data combinators, then run one Effect pipeline.`),Ri=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},ReturnStatement(n){t&&li(n.argument)&&K(e,n,`Rule: avoid returning null. Why: null is a sentinel that forces defensive guards. Fix: use Option.none for absence or Effect.fail for errors.`)}}}}),zi=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){t&&r(n.callee,`Option`,`as`)&&K(e,n,`Rule: avoid Option.as. Why: it hides selection and encourages placeholder flows. Fix: use Option.map or Option.match and return the value explicitly.`)}}}}),Bi=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},MemberExpression(n){t&&r(n,`Effect`,`never`)&&K(e,n,`Rule: avoid Effect.never. Why: it hides lifecycle and leaks resources. Fix: use Stream or explicit acquire/release lifecycles with clear teardown.`)}}}}),Vi=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t||!oe(n))return;let r=l(n.callee.body);r&&K(e,r,`Rule: avoid nested IIFEs. Why: they hide sequencing and push wrapper hacks. Fix: bind a named context with const and keep one flat pipeline with a single Match/Option decision.`)}}}}),Hi=t({create(e){return{ObjectExpression(t){Ir(t).some(e=>Fr(e))&&K(e,t,`Rule: avoid Match/Option/Either inside object literals. Why: it hides the decision and invites workaround scaffolding. Fix: compute the value first (context), then build the object from named values with one flat decision.`)}}}}),Ui=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){t&&se(n)&&K(e,n,`Rule: avoid immediate invocation of inline functions. Why: it hides decisions and sequencing. Fix: bind a named context with const and keep one Match/Option decision in a flat pipeline.`)}}}}),Wi=t({create(e){return{CallExpression(t){for(let n of le(t))K(e,n,`Rule: avoid block-bodied arrow callbacks with returns. Why: they hide local control flow. Fix: use expression-only callbacks and move the logic into a single pipeline (pipe/Match/Option/A.map).`)}}}}),Gi=t({create(e){return{CallExpression(t){for(let n of ue(t))K(e,n,`Rule: avoid returns inside inline callbacks. Why: they hide control flow. Prefer expression-only callbacks, but leaf-level Effect branches with local bindings may use returns when needed.`)}}}}),Ki=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){t&&fe(n,`fn`)&&K(e,n,`Rule: avoid Effect.fn generator wrappers. Why: they hide sequencing and dodge ladder rules. Fix: keep a single flat pipeline or use one Effect.gen.`)}}}}),qi=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){t&&o(n,`sync`)&&qt(a(n))&&K(e,n,`Rule: avoid console.* inside Effect.sync. Why: it hides side effects. Fix: replace with Effect.log* or remove the console call.`)}}}}),Ji=t({create(e){let t=!1,n=[],r=new WeakSet,i=e=>{for(let t of Rt(e))typeof t!=`object`||!t||r.has(t)||(r.add(t),n.push(t))};return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(e){i(e)},ClassDeclaration(e){i(e)},"Program:exit"(){if(t)for(let t of n)K(e,t,`Rule: avoid console.* in Effect flow. Why: console output bypasses Effect observability. Fix: use Effect.log* with structured context.`)}}}}),Yi=t({create(e){let t=!1,n=[],r=new WeakSet,i=e=>{for(let t of Wt(e))typeof t!=`object`||!t||r.has(t)||(r.add(t),n.push(t))};return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(e){for(let t of Gt(e))i(t)},ClassDeclaration(e){let t=v(e);t&&i(B(t,`effect`)??B(t,`scoped`))},"Program:exit"(){if(t)for(let t of n)K(e,t,`Rule: add structured context to Effect.logError or Effect.logWarning. Why: static failure messages cannot be correlated. Fix: include an error or context object, or use Effect.annotateLogs(...).`)}}}}),Xi=t({create(e){let t=!1,n=[],r=new WeakSet,i=e=>{typeof e==`object`&&e&&!r.has(e)&&(r.add(e),n.push(e))};return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},ExportNamedDeclaration(e){for(let t of Vn(e))i(zn(t.functionNode,t.declaredReturnType))},ExportDefaultDeclaration(e){for(let t of Vn(e))i(zn(t.functionNode,t.declaredReturnType))},ClassDeclaration(e){let t=v(e);if(t)for(let e of Hn(t))i(Un(e))},"Program:exit"(){if(t)for(let t of n)K(e,t,`Rule: add Effect.withSpan to public Effect operations. Why: service work needs trace boundaries. Fix: wrap the returned Effect with Effect.withSpan(...).`)}}}}),Zi=t({create(e){let t=!1,n=[];return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(t){if(!xi(e))return;let r=wi(t),i=r&&Ti(r);i&&n.push(i)},"Program:exit"(){if(t)for(let t of n)K(e,t,`Rule: do not discard Effect.runPromise in a test body. Why: the test can finish before the Effect result is observed. Fix: await or return Effect.runPromise so the test framework observes completion.`)}}}}),Qi=t({create(e){let t=!1,n=[];return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(t){if(!xi(e))return;let r=wi(t);r&&n.push(...Ei(r,Di))},"Program:exit"(){if(t)for(let t of n)K(e,t,`Rule: prefer Effect.flip for expected typed Effect failures in tests. Why: it turns the expected failure into a successful error value for structural assertions. Fix: flip the Effect, then assert the error _tag, message, and fields.`)}}}}),$i=t({create(e){let t=!1,n=[];return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(t){xi(e)&&n.push(...Ai(t))},"Program:exit"(){if(t)for(let t of n)K(e,t,`Rule: avoid a manual test layer beside an explicit service Default layer. Why: the test is already opting into the service's real default composition and the sibling mock can hide that contract. Fix: use the Default layer with its required infrastructure, or remove Default when a replacement is intentional.`)}}}}),ea=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){let r=d(n,`gen`);if(!t||!r)return;let i=Mr(r.body);i&&K(e,i,`Rule: avoid nested Effect.gen. Why: nested generators hide sequencing. Fix: flatten to a single Effect.gen per method or a single flat pipeline.`)}}}}),ta=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=ve(n);r&&K(e,r,"Rule: use yield* inside Effect.gen. Why: plain yield returns an Effect value without delegating to the Effect interpreter. Fix: replace `yield Effect.x` with `yield* Effect.x`.")}}}}),na=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=be(n);r&&K(e,r,`Rule: avoid repeated piped yields inside Effect.gen. Why: decorated effects hidden inside generator steps obscure the workflow. Fix: extract decorated effects first, then yield the named workflow steps.`)}}}}),ra=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=Ce(n);r&&K(e,r,`Rule: avoid Effect.gen for simple mapping. Why: tiny generators hide pure transformations behind workflow syntax. Fix: map the yielded effect with Effect.map or a named pure transformation.`)}}}}),ia=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=De(n);r&&K(e,r,`Rule: prefer Effect.gen for workflow sequencing. Why: long flatMap/andThen/tap pipelines read like imperative workflow. Fix: move the sequential story into one Effect.gen and keep pipe for behavior decoration.`)}}}}),aa=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){t&&Oe(n)&&K(e,n,`Rule: avoid large anonymous flow expressions. Why: long pure transformation chains need a domain name. Fix: extract a named flow or split the transformation into named pure steps.`)}}}}),oa=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=je(n);r&&K(e,r,`Rule: avoid Effect work inside flow. Why: flow should stay a reusable pure transformation boundary. Fix: keep Effect sequencing, logging, retries, and dependency access in Effect pipelines.`)}}}}),sa=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=Me(n);r&&K(e,r,`Rule: prefer named flow transformations. Why: non-trivial pure transformations passed inline are hard to reuse and review. Fix: extract the flow to a named const.`)}}}}),ca=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=Ie(n);r&&K(e,r,"Rule: prefer .pipe() for behavior decoration. Why: retry, timeout, spans, logging, recovery, DI, and value transforms decorate an existing effect. Fix: write `program.pipe(Effect.retry(policy))` instead of `Effect.retry(program, policy)`.")}}}}),la=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=ze(n);r&&K(e,r,`Rule: extract decorated effects before Effect.gen. Why: repeated retry/timeout/span/logging decorators inside generator yields bury behavior policy in workflow steps. Fix: name the decorated effects first, then yield the workflow story.`)}}}}),ua=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=Be(n);r&&K(e,r,`Rule: avoid workflow sequencing inside behavior pipes. Why: behavior pipes should answer how an effect behaves, not hide the workflow story. Fix: move multi-step sequencing into Effect.gen and keep retry/timeout/spans/logging as decorators around named effects.`)}}}}),da=t({create(e){let t=!1;function n(n){let r=Ve(n);t&&r&&K(e,r,`Rule: avoid mixing Effect style pillars in one function. Why: workflow, pure transformation, behavior decoration, and Layer wiring each need a clear boundary. Fix: extract named concepts for each pillar and compose them at the call site.`)}return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},FunctionDeclaration:n,FunctionExpression:n,ArrowFunctionExpression:n}}}),fa=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){let r=Ue(n);t&&r&&K(e,r,`Rule: avoid clever Effect expressions. Why: deeply nested expressions that combine style pillars hide the domain story. Fix: extract named workflow, pure transformation, and behavior steps.`)}}}}),pa=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){let r=We(n);t&&r&&K(e,r,`Rule: prefer extracting named concepts from oversized anonymous callbacks. Why: multi-step inline callbacks hide domain intent. Fix: name the transformation, policy, or workflow step before passing it into Effect.`)}}}}),ma=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){t&&qe(n)&&K(e,n,`Rule: prefer Effect.Service. Fix: replace Context.Tag service definitions.`)}}}}),ha=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},ClassDeclaration(n){let r=v(n);t&&r&&Je(r)&&K(e,r,`Rule: do not call Layer.provide inside Effect.Service. Fix: move layer wiring to app/test boundaries.`)}}}}),ga=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},ClassDeclaration(n){let r=v(n);t&&r&&!Ye(r)&&K(e,r,`Rule: set accessors: true. Fix: add it to Effect.Service options.`)}}}}),_a=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},ClassDeclaration(n){let r=v(n),i=r?Qe(r):void 0;t&&i&&K(e,i,`Rule: declare service dependencies.`)}}}}),va=t({create(e){return{ImportDeclaration(t){let n=Xe(t);n&&K(e,n,`Rule: avoid namespace imports from Effect packages.`)}}}}),ya=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},ExportNamedDeclaration(n){let r=t?ft(n):void 0;r&&K(e,r,`Rule: avoid exported manual service objects.`)}}}}),ba=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){let r=t?nt(n):void 0;r&&K(e,r,`Rule: prefer Layer.pipe for nested layer provisioning.`)}}}}),xa=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){let r=t?it(n):void 0;r&&K(e,r,`Rule: avoid inline layer provisioning inside programs.`)}}}}),Sa=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){let r=t?at(n):void 0;r&&K(e,r,`Rule: prefer Layer.mergeAll for infrastructure layer groups.`)}}}}),Ca=t({create(e){let t=!1,n=0;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},VariableDeclaration(r){let i=t?st(r):void 0;i&&(n+=1,n>=3&&K(e,i,`Rule: group service layers by concern.`))}}}}),wa=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},FunctionDeclaration(n){let r=tt(n);t&&r&&K(e,r,`Rule: avoid Layer composition inside request handlers.`)}}}}),Ta=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},ClassDeclaration(n){let r=v(n),i=r?ut(r):void 0;t&&i&&K(e,i,`Rule: return Effect from service methods.`)}}}}),Ea=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){t&&Cr(n)&&K(e,n,`Rule: avoid void Match branches. Why: they hide guard-style control flow. Fix: remove the no-op branch or select a value and run one Effect pipeline outside the Match.`)}}}}),Da=t({create(e){return{CallExpression(t){Nr(t)&&Or(t.arguments)&&K(e,t,`Rule: avoid multi-step sequencing inside Match branches. Why: it hides control flow. Fix: select a value in Match, then run one Effect pipeline outside. Avoid data-encoded conditionals (Option.toArray/forEach) that only rewrap the branch.`),Ar(t)&&Dr(t.arguments)&&K(e,t,`Rule: avoid multi-step sequencing inside Option.match branches. Why: it hides control flow. Prefer selecting a value in Option.match, then run one Effect pipeline outside. Leaf-level flows with local bindings may keep Option.match but should stay linear.`)}}}}),Oa=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){let r=a(n),i=U(r);t&&o(n,`sync`)&&jr(r)&&!D(i)&&K(e,n,`Rule: avoid Effect.sync around side effects. Why: it hides intent. Fix: use Effect.log* or an explicit pipeline step for the side effect.`)}}}}),ka=t({create(e){return{CallExpression(t){o(t,`as`)&&Jt(a(t))&&K(e,t,`Rule: avoid Effect.as for side effects. Why: it hides side effects and turns them into placeholders. Fix: use explicit pipeline steps that return real values with Effect.flatMap, Effect.andThen, or Effect.tap.`),o(t,`zipRight`)&&Jt(a(t))&&K(e,t,`Rule: avoid Effect.zipRight for side effects. Why: it hides side effects and discards values. Fix: use explicit pipeline steps that return real values with Effect.flatMap, Effect.andThen, or Effect.tap.`)}}}}),Aa=t({create(e){return{CallExpression(t){o(t,`all`)&&A(t.arguments[0])&&Yt(t.arguments[1])&&K(e,t,`Rule: avoid Effect.all for sequential side-effect steps. Why: it hides imperative sequencing in an array. Fix: use one explicit linear pipeline with Effect.andThen/flatMap and reserve Effect.all for real value aggregation.`),On(t)&&A(a(t.callee.object))&&K(e,t,`Rule: avoid Effect.all for sequential side-effect steps. Why: it hides imperative sequencing in an array. Fix: use one explicit linear pipeline with Effect.andThen/flatMap and reserve Effect.all for real value aggregation.`)}}}}),ja=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=mt(n);r&&K(e,r,`Rule: avoid async callbacks in Effect combinators. Why: async callbacks return Promises and bypass Effect failure, interruption, and tracing semantics. Fix: return an Effect and compose with Effect.flatMap/fromPromise at the boundary.`)}}}}),Ma=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=ht(n);r&&K(e,r,`Rule: avoid throw inside Effect logic. Why: thrown exceptions bypass typed Effect error channels and interruption semantics. Fix: return Effect.fail with a structured tagged error.`)}}}}),Na=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=Nt(n);r&&K(e,r,`Rule: avoid Effect.orDie outside runtime boundaries. Why: converting typed failures into defects hides recoverable domain errors. Fix: keep typed errors in domain logic and reserve orDie/orDieWith for explicit application boundaries.`)}}}}),Pa=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=Ft(n);r&&K(e,r,`Rule: avoid swallowing errors in catchAll. Why: succeed/void recovery can hide failures without telemetry or typed recovery. Fix: log, re-fail with a structured error, or recover through an explicit domain branch.`)}}}}),Fa=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=Lt(n);r&&K(e,r,`Rule: avoid Effect.ignore. Why: ignoring failable effects hides failure ownership. Fix: handle the error with typed recovery, log and re-fail, or isolate the ignore at an explicit boundary with a documented reason.`)}}}}),Ia=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=gt(n);r&&K(e,r,`Rule: avoid try/catch inside Effect logic. Why: it bypasses typed error channels and can miss interruption/cause semantics. Fix: use Effect.try, Effect.catchAll, Effect.catchTag, or typed error combinators.`)}}}}),La=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=yt(n);r&&K(e,r,`Rule: avoid Promise APIs inside Effect logic. Why: Promise APIs bypass Effect scheduling, typed errors, cancellation, and tracing. Fix: use Effect.all, Effect.tryPromise, or move Promise interop to a boundary adapter.`)}}}}),Ra=t({create(e){return{TryStatement(t){K(e,t,`Rule: avoid try/catch in Effect files. Why: it bypasses Effect error channels and reintroduces imperative control flow. Fix: model failures in Effect and handle them with typed errors and Effect combinators.`)}}}}),za=t({create(e){return{VariableDeclaration(t){for(let n of t.declarations??[])An(n.init)&&K(e,t,"Rule: avoid Effect wrapper aliases (`const x = ...Effect...`). Why: it creates wrapper choreography and bloats consts. Fix: inline the pipeline at the call site or define a real domain function that returns data, not an Effect wrapper.")},FunctionDeclaration(t){jn(t.body)&&K(e,t,"Rule: avoid Effect wrapper aliases (`function x(...) { return Effect... }`). Why: it creates wrapper choreography and bloats consts. Fix: inline the pipeline at the call site or define a real domain function that returns data, not an Effect wrapper.")}}}}),Ba=t({create(e){return{TSTypeReference(t){(I(t,`Effect`,`Effect`)||I(t,`Layer`,`Layer`))&&K(e,t,"Rule: avoid manual Effect channel tuples (`Effect.Effect<...>` / `Layer.Layer<...>`). Why: channels compose through the Effect pipeline and services; hand-written tuples desync from the real flow. Fix: drop the generic and let the return type infer from the Effect/Layer you return, or expose a service method that returns the effect directly.")}}}}),Va=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){let r=t?Zn(n):void 0;r&&K(e,r,`Rule: avoid catchAll after wrapGraphqlCall/applyResponse. Why: the envelope already surfaces structured errors. Fix: handle errors in the response mapping instead of catchAll.`)}}}}),Ha=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},ExpressionStatement(n){t&&Nr(n.expression)&&kr(n.expression.arguments)&&K(e,n.expression,`Rule: avoid Match.value(...).pipe(...) as a statement. Why: it runs side effects during render. Fix: move the side effect into an Effect runtime action or event handler, and keep Match as a pure expression.`)}}}}),Ua=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){let r=t?tr(n):void 0;r&&K(e,r,`Rule: do not wrap Atom/atomRegistry ops in Effect.sync. Why: it hides side effects and breaks atom flow. Fix: call Atom.get/Atom.set/Atom.update/Atom.modify/Atom.refresh directly.`)}}}}),Wa=t({create(e){return{CallExpression(t){if(!k(t,`Atom`,`family`))return;let n=ir(t.arguments);n&&K(e,n,`Keyed projection atom reads collection atom. Why: Atom.family should project from keyed/source atoms, not broad collection state. Fix: pass the keyed atom into the family or create a keyed source atom before reading.`)}}}}),Ga=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){let r=t?or(n):void 0;r&&K(e,r,"Rule: do not inline runtime provisioning inside local helper Effect code. Why: `yield* SomeRuntime.pipe(Effect.provide(SomeRuntimeLive))` and equivalent inline provide chains hide dependency assembly instead of owning it at an Effect.Service boundary or one exported Effect boundary. Fix: declare the live dependency on the owning service or provide it once at the exported boundary, then `yield*` the runtime or service directly inside the body.")}}}}),Ka=t({create(e){return{CallExpression(t){dr(t)&&K(e,t,"Rule: avoid naked JS state patching/rebuild and raw JSON shortcuts in Effect transitions. Why: spread/Object.assign/fromEntries and inline JSON parse/stringify hide state intent and bypass explicit model contracts. Fix: use `effect/Record` combinators (`Record.set` / `Record.modify` / `Record.remove`) inside `Struct.evolve`, rebuild with schema constructors (`Schema.make` or field `.make`), and keep serialization at boundaries with schema encode/decode flows. Use `linting.md` guidance when available.")}}}}),qa=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){t&&o(n,`succeed`)&&fr(a(n))&&K(e,n,`Rule: avoid Effect.succeed(variable) as a branch placeholder. Why: it hides a decision and turns data into pseudo-control flow. Fix: select a plain value (Option/Match) and then run one Effect pipeline after the decision; if you already read the state, return it as a value. Avoid Option.toArray/forEach hacks that just re-encode the branch.`)}}}}),Ja=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},TSTypeAliasDeclaration(n){t&&Kn(n.typeAnnotation,`Effect`,`Effect`)&&K(e,n.typeAnnotation,`Rule: avoid Effect.Effect type aliases. Why: they hide the service surface and make types opaque. Fix: keep Effect types on service methods or inline at the call site.`)}}}}),Ya=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},ExportNamedDeclaration(n){let r=t?Gn(n):void 0;r&&K(e,r,`Rule: avoid public Effect APIs with generic Error. Why: public services need recoverable, typed error contracts. Fix: expose tagged domain errors instead of Error.`)},ExportDefaultDeclaration(n){let r=t?Gn(n):void 0;r&&K(e,r,`Rule: avoid public Effect APIs with generic Error. Why: public services need recoverable, typed error contracts. Fix: expose tagged domain errors instead of Error.`)}}}}),Xa=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},VariableDeclaration(n){t&&pr(n)&&K(e,n,"Rule: avoid `as` assertions on decoded model flow. Why: assertions hide schema drift and allow untyped overlays. Fix: decode with the correct schema type and read fields directly.")}}}}),Za=t({create(e){let t=!1,n=!1,r=[],i=new WeakSet,a=t=>{typeof t!=`object`||!t||i.has(t)||(i.add(t),K(e,t,`Rule: avoid local unknown-to-boolean coercion helpers in services. Why: runtime coercion belongs at schema boundary, not in service flow. Fix: decode boolean optionality in schema and read typed booleans in the Effect pipeline.`))};return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},BinaryExpression(e){!t||!mr(e)||(n?a(e):r.push(e))},CallExpression(e){if(!(!t||!hr(e))){n=!0;for(let e of r)a(e)}}}}}),Qa=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){t&&vr(n)&&K(e,n,"Rule: avoid nullish re-wrap inside Option.fromNullable. Why: `x ?? null` and `x ?? undefined` add noise and hide source shape. Fix: pass the source directly to Option.fromNullable.")}}}}),$a=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){t&&br(n)&&K(e,n,"Rule: avoid repeated Option boolean normalization (`onSome: value === true, onNone: false`). Why: it scatters coercion rules across services. Fix: normalize once at schema boundary and read booleans directly.")}}}}),eo=t({create(e){return{CallExpression(t){o(t,`succeed`)&&z(a(t))&&K(e,t,`Rule: avoid returning string tokens. Why: it encodes control flow and forces defensive branching. Fix: return domain values (Option/Either/tagged unions) or real Effect results instead.`)}}}}),to=t({create(e){return{VariableDeclaration(t){xr(t)&&K(e,t,`Rule: avoid string status constants. Why: they encode control flow and force defensive branching. Fix: use tagged unions, Option/Either, or meaningful domain values instead of string tokens.`)}}}}),no=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},TSTypeAliasDeclaration(n){t&&Lr(n)&&K(e,n,"Rule: avoid raw primitive domain ID aliases. Why: `type UserId = string` does not protect boundaries from swapped IDs. Fix: use Schema branded IDs or a domain constructor that validates and brands the value.")}}}}),ro=t({create(e){let t=!1,n=n=>{if(t)for(let t of Kr(n))K(e,t,"Rule: avoid boolean behavior flags in domain operations. Why: flags like `shouldNotify` hide use cases and create implicit branching. Fix: model intent with a command/tagged union or split the operation into explicit functions.")};return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},FunctionDeclaration:n,FunctionExpression:n,ArrowFunctionExpression:n}}}),io=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},BinaryExpression(n){t&&ci(n)&&K(e,n,`Rule: avoid magic domain string comparisons. Why: comparing domain state to raw strings scatters status vocabulary and misses exhaustiveness. Fix: use a tagged union, Schema literal union, or Match over a named domain status.`)}}}}),ao=t({create(e){let t=!1,n=n=>{t&&Wr(n)&&K(e,n,`Rule: avoid primitive-heavy domain parameters. Why: clusters of raw string/number domain values are easy to swap and have no invariant boundary. Fix: introduce branded types or a command/schema object with named validated fields.`)};return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},FunctionDeclaration:n,FunctionExpression:n,ArrowFunctionExpression:n}}}),oo=t({create(e){let t=!1,n=n=>{if(t)for(let t of Zr(n))K(e,t,`Rule: avoid raw time fields in domain models. Why: number and Date fields hide units, clock ownership, and duration semantics. Fix: model durations with Effect Duration and keep raw timestamps at decode/encode boundaries.`)};return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},TSInterfaceDeclaration:n,TSTypeLiteral:n}}}),so=new Set([`fs`,`node:fs`,`fs/promises`,`node:fs/promises`]),co=new Set(`assert.assert/strict.async_hooks.buffer.child_process.cluster.console.constants.crypto.dgram.diagnostics_channel.dns.dns/promises.domain.events.fs.fs/promises.http.http2.https.inspector.inspector/promises.module.net.os.path.path/posix.path/win32.perf_hooks.process.punycode.querystring.readline.readline/promises.repl.stream.stream/consumers.stream/promises.stream/web.string_decoder.sys.timers.timers/promises.tls.trace_events.tty.url.util.util/types.v8.vm.wasi.worker_threads.zlib`.split(`.`));function lo(e){return e.startsWith(`node:`)||co.has(e)}function Z(e){return typeof e==`object`&&!!e&&(e.type===`MemberExpression`||e.type===`OptionalMemberExpression`)}function uo(e,t){return e.computed!==!0&&n(e.property,t)||e.computed===!0&&z(e.property)&&e.property.value===t}function fo(e){return Z(e)&&n(e.object,`process`)&&uo(e,`env`)}function po(e){if(!Z(e))return!1;if(fo(e.object))return!0;if(!fo(e))return!1;let t=e.parent;return!Z(t)||t.object!==e}function mo(e){if(!Z(e)||typeof e.parent!=`object`||e.parent===null)return!1;let t=e.parent;return t.type===`AssignmentExpression`&&t.left===e}const ho=t({meta:{schema:J},create(e){return{ImportDeclaration(t){let n=q(t);n&&lo(n)&&!Y(e)&&K(e,t,`Rule: avoid Node platform imports in shared code. Why: reusable modules must not require a Node runtime. Fix: move the import behind a configured application boundary or an Effect platform service.`)}}}}),go=t({meta:{schema:pi},create(e){return{MemberExpression(t){po(t)&&!mo(t)&&!Y(e)&&!Ci(e)&&K(e,t,`Rule: avoid direct process.env reads outside configuration boundaries. Why: ambient configuration leaks runtime coupling into domain code. Fix: decode environment values in a configured Config service or Layer and depend on that service.`)}}}});function _o(e){if(typeof e!=`object`||!e||e.type!==`CallExpression`||!n(e.callee,`require`))return;let t=e.arguments?.[0];if(!z(t))return;let r=t.value;return so.has(r)?r:void 0}const vo=t({create(e){let t=!1,n=0,r=[];return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0),n&&so.has(n)&&r.push({node:e,source:n})},FunctionDeclaration(){n+=1},"FunctionDeclaration:exit"(){--n},FunctionExpression(){n+=1},"FunctionExpression:exit"(){--n},ArrowFunctionExpression(){n+=1},"ArrowFunctionExpression:exit"(){--n},CallExpression(e){if(n!==0)return;let t=_o(e);t&&r.push({node:e,source:t})},"Program:exit"(){if(t)for(let{node:t,source:n}of r)K(e,t,`Rule: avoid Node fs imports or require calls in Effect code (${n}). Why: direct Node filesystem APIs make reusable Effect modules platform-specific. Fix: move filesystem work behind an Effect platform service at the application boundary.`)}}}}),yo=t({meta:{schema:J},create(e){let t=!1,n=[];return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(e){jt(e)&&n.push(e)},"Program:exit"(){if(!(!t||Y(e)))for(let t of n)K(e,t.callee,`Rule: avoid hidden Effect execution. Why: Effect.run* fixes runtime ownership inside reusable code. Fix: return the Effect and execute it from a configured application, CLI, worker, route, or test boundary.`)}}}}),bo=new Set([`try`,`tryPromise`,`mapError`,`catchAll`,`catchTag`,`catchTags`]);function xo(e,t=new WeakSet){if(jt(e))return!0;if(i(e)){let t=e.callee.property;if(n(t)&&bo.has(t.name))return!0}return Array.isArray(e)?e.some(e=>xo(e,t)):typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Object.entries(e).some(([e,n])=>e!==`parent`&&xo(n,t)))}const So=t({meta:{schema:J},create(e){return{TryStatement(t){!t.handler||!Y(e)||xo(t)||K(e,t,`Rule: map failures through Effect at application boundaries. Why: imperative try/catch hides typed failure handling and recovery policy. Fix: use Effect.try, Effect.tryPromise, mapError, catchAll, or execute a mapped Effect program.`)}}}}),Co=t({create(e){let t=!1,n=!1,i=[];return{ImportDeclaration(e){let r=q(e);r&&X(r)&&(t=!0),ji(e)&&(n=!0)},CallExpression(e){r(e.callee,`JSON`,`parse`)&&i.push(e)},"Program:exit"(){if(!(!t||n))for(let t of i)K(e,t,`Rule: avoid JSON.parse without an Effect Schema boundary. Why: parsed JSON is unknown input and unchecked casts hide malformed data. Fix: decode unknown input with Schema.decodeUnknown at the boundary.`)}}}}),wo=t({create(e){let t=!1,n=new WeakSet,r=[];return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(e){if(me(e))for(let t of ge(e.arguments))n.has(t)||(n.add(t),r.push(t))},"Program:exit"(){if(t)for(let t of r)K(e,t,`Rule: avoid Date.now inside Effect logic. Why: direct wall-clock reads make programs nondeterministic and difficult to test. Fix: obtain time through Effect Clock or DateTime at the boundary.`)}}}}),To=t({meta:{schema:J},create(e){let t=!1,r=[];return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},NewExpression(e){n(e.callee,`Date`)&&r.push(e)},"Program:exit"(){if(!(!t||Y(e)))for(let t of r)K(e,t,`Rule: avoid new Date in Effect domain logic. Why: direct wall-clock construction makes domain behaviour nondeterministic and difficult to test. Fix: obtain time through Effect Clock or model time at the boundary.`)}}}}),Eo=t({create(e){let t=!1,n=n=>{if(t)for(let t of $r(n))K(e,t,"Rule: avoid overloaded options objects. Why: `opts`, `options`, and `config` typed as any/object hide required fields and validation. Fix: accept unknown at the boundary and decode with Schema, or use a named typed command/config model.")};return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},FunctionDeclaration:n,FunctionExpression:n,ArrowFunctionExpression:n}}}),Do=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},LogicalExpression(n){t&&ti(n)&&K(e,n,`Rule: avoid embedding domain logic in conditionals. Why: multi-clause business rules become hard to test, reuse, and audit. Fix: extract a named domain predicate or validation Effect and call that from the branch.`)}}}}),Oo=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},LogicalExpression(n){t&&ri(n)&&K(e,n,`Rule: avoid implicit state machines made from boolean flags. Why: multiple flags on one domain object allow impossible states. Fix: model the lifecycle as a tagged union or Data.TaggedEnum.`)}}}}),ko=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){t&&ii(n)&&K(e,n,`Rule: avoid ad hoc domain errors. Why: string failures hide recovery semantics and observability. Fix: use Data.TaggedError or a structured domain error union.`)},ThrowStatement(n){t&&ai(n)&&K(e,n,`Rule: avoid ad hoc domain errors. Why: thrown string Error values bypass typed Effect error channels. Fix: return Effect.fail with a structured tagged domain error.`)}}}}),Ao=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},FunctionDeclaration(n){t&&si(n)&&K(e,n,`Rule: avoid domain meaning by folder or context naming alone. Why: admin/public/internal meaning should be represented in types or services, not inferred from helper names. Fix: encode context with branded IDs, commands, policies, or service boundaries.`)}}}}),jo=t({create(e){return{CallExpression(t){r(t.callee,`Effect`,`as`)&&K(e,t.callee,`Rule: avoid Effect.as wrappers. Why: they can hide meaningful sequencing or value flow. Fix: return the intended value directly or use explicit Effect.map/andThen.`)}}}}),Mo=t({create(e){return{MemberExpression(t){r(t,`Effect`,`Do`)&&K(e,t,`Rule: avoid Effect.Do. Why: it hides sequencing behind builder state. Fix: use Effect.gen or a direct pipe.`)}}}});function No(e,n,i){return t({create(t){return{CallExpression(a){r(a.callee,e,n)&&K(t,a.callee,i)}}}})}const Po=No(`Effect`,`bind`,`Rule: avoid Effect.bind. Why: it obscures linear data flow behind builder-style binding. Fix: use Effect.gen or a direct pipe with flatMap/map.`),Fo=No(`Runtime`,`runFork`,`Rule: avoid Runtime.runFork. Why: detached fibers hide lifetime and interruption ownership. Fix: run effects through the application runtime boundary.`),Io=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){t&&jt(n)&&K(e,n.callee,`Rule: avoid running Effects outside runtime boundaries. Why: direct Effect.run* calls scatter execution ownership. Fix: return Effects from domain logic and run them at the app, CLI, worker, route, or test boundary.`)}}}}),Lo=No(`Effect`,`async`,`Rule: avoid Effect.async. Why: manual callback bridges are easy to leak or resume incorrectly. Fix: use scoped Effect APIs or a dedicated platform adapter.`),Ro=t({create(e){return{CallExpression(t){ee(t)&&K(e,t,`Rule: avoid deeply nested Effect calls (Effect.xx(Effect.yy(Effect.zz(...)))). Why: they hide sequencing and spread flow. Fix: build values first, then run one flat Effect pipeline.`)}}}}),zo=t({create(e){return{VariableDeclaration(t){for(let n of t.declarations??[])ee(n.init)&&K(e,n.init,`Rule: avoid nested Effect combinators. Why: they hide sequencing and create laddered control flow. Fix: build context once (Effect.all/Effect.map) and then run a single flat pipeline.`)},ReturnStatement(t){ee(t.argument)&&K(e,t.argument,`Rule: avoid nested Effect combinators. Why: they hide sequencing and create laddered control flow. Fix: build context once (Effect.all/Effect.map) and then run a single flat pipeline.`)}}}}),Bo=t({create(e){return{VariableDeclaration(t){for(let n of t.declarations??[]){let t=ne(n.init);t&&K(e,n.init,t)}},ReturnStatement(t){let n=ne(t.argument);n&&K(e,t.argument,n)}}}}),Vo=t({create(e){return{CallExpression(t){c(t)&&ae(t.arguments)&&K(e,t,`Rule: avoid nested pipe() chains. Why: they hide sequencing. Fix: refactor into one flat pipeline with a single decision point.`)}}}}),Ho=t({create(e){return{CallExpression(t){te(t)&&K(e,t,`Rule: avoid nested Effect call towers (Effect.fn(Effect.fn(...))). Why: it hides sequencing. Fix: build the inner Effect first, then use pipe/Effect.flatMap/Effect.andThen for a single flat pipeline.`)}}}}),Uo=t({create(e){return{CallExpression(t){ie(t)&&K(e,t,`Rule: avoid Effect.orElse around sequencing chains. Why: it hides error handling and splits the flow. Fix: move error handling to a single terminal decision after the pipeline.`)}}}}),Wo=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){t&&Qt(n)&&K(e,n,"Rule: avoid unbounded Effect.all over mapped collections. Why: it can launch work for every item at once and fail under load. Fix: pass an explicit `{ concurrency: n }` option or use a bounded batching strategy.")}}}}),Go=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},ExpressionStatement(n){t&&o(n.expression,`fork`)&&K(e,n.expression,`Rule: avoid fire-and-forget Effect.fork. Why: detached fibers hide failure, interruption, and ownership. Fix: bind the fiber and join/await/interrupt it, or use Effect.forkScoped / Effect.forkIn with an explicit scope.`)}}}}),Ko=t({create(e){let t=!1,n=n=>{if(!t)return;let r=$t(n.body);r&&K(e,r,`Rule: avoid Effect.fork inside loops. Why: loop-spawned fibers create unbounded concurrency and unclear ownership. Fix: use Effect.forEach / Effect.all with an explicit concurrency limit or a scoped supervisor.`)};return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},ForStatement:n,ForInStatement:n,ForOfStatement:n,WhileStatement:n,DoWhileStatement:n}}}),qo=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){t&&ln(n)&&K(e,n,`Rule: avoid Effect.race without loser cleanup. Why: racing effects without ensuring/scoped cleanup can leak losing work or resources. Fix: wrap raced effects with Effect.ensuring/acquireRelease or use a scoped race boundary.`)}}}}),Jo=t({create(e){let t=!1,n=new Map,r=new Set;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},VariableDeclarator(e){let t=wn(e);t&&n.set(t,e)},CallExpression(e){let t=En(e);t&&r.add(t)},"Program:exit"(){if(t)for(let[t,i]of n)r.has(t)||K(e,i,`Rule: avoid unobserved forked fibers. Why: forked fiber failures and interruption should be observed. Fix: pass the fiber to Fiber.join, Fiber.await, Fiber.interrupt, or use scoped fork APIs.`)}}}}),Yo=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){t&&fn(n)&&K(e,n,`Rule: avoid unbounded concurrent retry. Why: retry inside unbounded parallel collection effects can amplify load and create retry storms. Fix: add an explicit concurrency limit or move retry behind a bounded queue/backoff policy.`)}}}}),Xo=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=kt(n);r&&K(e,r,`Rule: avoid blocking sync calls inside Effect logic. Why: sync fs/crypto/zlib calls block the runtime worker and hide throughput costs. Fix: use Effect.async/tryPromise at a platform boundary, stream APIs, or a dedicated blocking executor.`)}}}}),Zo=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=St(n);r&&K(e,r,`Rule: avoid Promise concurrency APIs inside Effect logic. Why: Promise.all/allSettled/race/any bypass Effect concurrency, interruption, tracing, and error channels. Fix: use Effect.all, Effect.forEach, Effect.race, or a boundary adapter with explicit cancellation ownership.`)}}}}),Qo=t({create(e){let t=!1,n=new Set;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},VariableDeclaration(e){if(!(e.kind!==`let`&&e.kind!==`var`))for(let t of pn(e))n.add(t)},CallExpression(r){if(!t)return;let i=_n(r);if(!i)return;let a=P(i,n);a&&K(e,a,`Rule: avoid mutating shared state across fibers. Why: outer let/var state mutated from forked or parallel work creates nondeterministic races. Fix: model shared state with Ref/SynchronizedRef/Queue or aggregate immutable results with bounded Effect.all/forEach.`)}}}}),$o=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=Et(n);r&&K(e,r,`Rule: avoid timeout around noninterruptible Promise effects. Why: timing out Effect.promise or tryPromise without a signal leaves the underlying Promise running after interruption. Fix: use Effect.tryPromise with an AbortSignal parameter and pass it to the async API.`)}}}}),es=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){t&&bn(n)&&K(e,n,`Rule: avoid uninterruptible concurrent regions. Why: wrapping fork/race/all/forEach or queue work in uninterruptible blocks cancellation and can strand work under shutdown. Fix: keep only the critical section uninterruptible and leave concurrent work interruptible or scoped.`)}}}}),ts=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){t&&xn(n)&&K(e,n,`Rule: avoid unbounded Queue or PubSub constructors. Why: unbounded buffers hide backpressure and can fail under load. Fix: use Queue.bounded / PubSub.bounded with an explicit capacity at the owning boundary.`)}}}}),ns=t({create(e){let t=!1,n=new Set;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},VariableDeclaration(e){for(let t of Cn(e))n.add(t)},CallExpression(r){if(!t)return;let i=_n(r);if(!i)return;let a=P(i,n);a&&K(e,a,`Rule: avoid global mutable concurrency state. Why: module-scope mutable state touched from concurrent Effect work behaves like shared mutable global state. Fix: move ownership into Ref/SynchronizedRef/Queue/Layer state or pass immutable values through bounded effects.`)}}}}),rs=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=nn(n);r&&M(r)&&K(e,n,`Rule: avoid suspension while holding a semaphore permit. Why: sleeping, awaiting, or forking under a permit holds capacity while unrelated work waits. Fix: narrow the permit-protected section and perform interruptible or concurrent work outside it.`)}}}}),is=t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){if(!t)return;let r=rn(n);r&&M(r)&&K(e,n,`Rule: avoid suspension while holding synchronized reference coordination. Why: effectful SynchronizedRef modifiers hold internal coordination while the callback sleeps, awaits, or starts concurrent work. Fix: compute the effect outside the modifier and commit a short synchronous state transition.`)}}}}),as={"no-react-state":Pi,"no-if-statement":Fi,"no-switch-statement":Ii,"no-ternary":Li,"no-return-null":Ri,"no-option-as":zi,"no-effect-never":Bi,"no-arrow-ladder":Vi,"no-branch-in-object":Hi,"no-iife-wrapper":Ui,"no-return-in-arrow":Wi,"no-return-in-callback":Gi,"no-effect-fn-generator":Ki,"no-effect-sync-console":qi,"no-console-in-effect-flow":Ji,"no-effect-log-without-structured-context":Yi,"require-span-on-public-service-method":Xi,"no-runpromise-in-non-async-test-body":Zi,"require-effect-flip-for-error-test":Qi,"no-test-mock-layer-when-default-available":$i,"no-nested-effect-gen":ea,"no-yield-without-star-in-effect-gen":ta,"no-piped-yield-in-gen":na,"no-gen-for-mapping":ra,"prefer-gen-for-workflow":ia,"no-large-anonymous-flow":aa,"no-effect-in-flow":oa,"prefer-named-flow":sa,"prefer-pipe-for-behavior":ca,"prefer-decorated-effect-before-gen":la,"no-workflow-in-behavior-pipe":ua,"no-mixed-pillar-function":da,"no-clever-effect-expression":fa,"prefer-extracted-concept":pa,"prefer-effect-service":ma,"no-layer-provide-in-service-definition":ha,"require-service-accessors":ga,"require-service-dependencies":_a,"no-namespace-effect-import":va,"no-manual-service-object-export":ya,"no-layer-merge-in-request-handler":wa,"no-service-method-returning-promise":Ta,"prefer-layer-pipe":ba,"no-inline-layer-provide-in-program":xa,"prefer-layer-mergeall-for-infrastructure":Sa,"no-service-layer-scatter":Ca,"no-match-void-branch":Ea,"no-json-parse-without-schema":Co,"no-date-now-in-effect":wo,"no-new-date-in-domain-logic":To,"no-match-effect-branch":Da,"warn-effect-sync-wrapper":Oa,"no-effect-side-effect-wrapper":ka,"no-effect-all-step-sequencing":Aa,"no-async-effect-combinator-callback":ja,"no-throw-in-effect-logic":Ma,"no-or-die-outside-boundary":Na,"no-swallowed-catch-all":Pa,"no-effect-ignore":Fa,"no-try-catch-in-effect-logic":Ia,"no-promise-api-in-effect-logic":La,"no-try-catch":Ra,"no-effect-wrapper-alias":za,"no-manual-effect-channels":Ba,"no-wrapgraphql-catchall":Va,"no-render-side-effects":Ha,"no-atom-registry-effect-sync":Ua,"no-family-collection-read":Wa,"no-inline-runtime-provide":Ga,"no-naked-object-state-update":Ka,"no-effect-succeed-variable":qa,"no-effect-type-alias":Ja,"no-public-generic-effect-error":Ya,"no-model-overlay-cast":Xa,"no-unknown-boolean-coercion-helper":Za,"no-fromnullable-nullish-coalesce":Qa,"no-option-boolean-normalization":$a,"no-string-sentinel-return":eo,"no-string-sentinel-const":to,"no-raw-domain-id-alias":no,"no-boolean-domain-flag":ro,"no-magic-domain-string":io,"no-raw-domain-primitive-params":ao,"no-raw-time-domain-field":oo,"no-hidden-effect-execution":yo,"no-boundary-try-catch-without-effect-map":So,"no-node-fs-in-effect-code":vo,"no-node-platform-in-shared-code":ho,"no-process-env-direct-read":go,"no-overloaded-options-object":Eo,"no-domain-logic-in-conditional":Do,"no-implicit-state-machine-object":Oo,"no-adhoc-domain-error":ko,"no-domain-meaning-by-folder-only":Ao,"no-effect-as":jo,"no-effect-do":Mo,"no-effect-bind":Po,"no-runtime-runfork":Fo,"no-run-effect-outside-boundary":Io,"no-effect-async":Lo,"prevent-dynamic-imports":t({create(e){return{ImportExpression(t){K(e,t,`Rule: avoid dynamic imports. Why: runtime module loading obscures dependency boundaries. Fix: use static imports.`)}}}}),"no-nested-effect-call":Ro,"no-effect-ladder":zo,"no-flatmap-ladder":Bo,"no-pipe-ladder":Vo,"no-call-tower":Ho,"no-effect-orElse-ladder":Uo,"no-unbounded-effect-all":Wo,"no-fire-and-forget-fork":Go,"no-fork-in-loop":Ko,"no-race-without-cleanup":qo,"no-unobserved-fiber":Jo,"no-unbounded-concurrent-retry":Yo,"no-blocking-call-in-effect":Xo,"no-promise-concurrency-in-effect":Zo,"no-shared-mutable-state-across-fibers":Qo,"no-timeout-with-noninterruptible-promise":$o,"no-uninterruptible-concurrent-region":es,"no-unbounded-queue-or-pubsub":ts,"no-global-mutable-concurrency-state":ns,"no-yield-with-held-semaphore-permit":rs,"no-yield-with-held-mutable-ref":is,"no-unscoped-background-fiber":t({create(e){let t=!1;return{ImportDeclaration(e){let n=q(e);n&&X(n)&&(t=!0)},CallExpression(n){!t||!o(n,`forkDaemon`)||s(a(n),`supervised`)||K(e,n,`Rule: avoid unscoped background fibers. Why: Effect.forkDaemon detaches work from the caller's scope and can outlive failures and shutdown. Fix: use forkScoped/forkIn or make supervisor ownership explicit in the child effect.`)}}}})},os=[`no-runpromise-in-non-async-test-body`,`require-effect-flip-for-error-test`,`no-test-mock-layer-when-default-available`],ss=[`no-yield-with-held-semaphore-permit`,`no-yield-with-held-mutable-ref`,`no-unscoped-background-fiber`];function Q(e){return Object.fromEntries(e.map(e=>[`linteffect/${e}`,`error`]))}function $(e){return{jsPlugins:cs,rules:e}}const cs=[{name:`linteffect`,specifier:`@opsydyn/oxlint-effect`}],ls=Q([`no-react-state`,`no-runtime-runfork`,`no-run-effect-outside-boundary`,`no-or-die-outside-boundary`,`prevent-dynamic-imports`,`no-render-side-effects`,`no-inline-runtime-provide`]),us=Q([`no-effect-as`,`no-effect-do`,`no-effect-bind`,`no-effect-async`,`no-effect-ignore`,`no-effect-never`,`no-effect-fn-generator`,`no-nested-effect-gen`,`no-yield-without-star-in-effect-gen`,`no-async-effect-combinator-callback`,`no-throw-in-effect-logic`,`no-try-catch-in-effect-logic`,`no-promise-api-in-effect-logic`,`no-swallowed-catch-all`,`no-manual-effect-channels`,`no-effect-type-alias`,`no-public-generic-effect-error`]),ds=Q([`no-unbounded-effect-all`,`no-fire-and-forget-fork`,`no-fork-in-loop`,`no-race-without-cleanup`,`no-unobserved-fiber`,`no-unbounded-concurrent-retry`,`no-blocking-call-in-effect`,`no-promise-concurrency-in-effect`,`no-shared-mutable-state-across-fibers`,`no-timeout-with-noninterruptible-promise`,`no-uninterruptible-concurrent-region`,`no-unbounded-queue-or-pubsub`,`no-global-mutable-concurrency-state`,...ss]),fs=Q([`no-nested-effect-call`,`no-effect-ladder`,`no-flatmap-ladder`,`no-pipe-ladder`,`no-call-tower`,`no-effect-orElse-ladder`,`no-effect-wrapper-alias`,`warn-effect-sync-wrapper`,`no-effect-side-effect-wrapper`,`no-effect-all-step-sequencing`,`no-effect-succeed-variable`]),ps=Q([`no-if-statement`,`no-switch-statement`,`no-ternary`,`no-try-catch`,`no-arrow-ladder`,`no-iife-wrapper`,`no-return-in-arrow`,`no-return-in-callback`,`no-return-null`,`no-branch-in-object`]),ms=Q([`no-option-as`,`no-match-void-branch`,`no-match-effect-branch`,`no-model-overlay-cast`,`no-unknown-boolean-coercion-helper`,`no-fromnullable-nullish-coalesce`,`no-option-boolean-normalization`,`no-string-sentinel-return`,`no-string-sentinel-const`]),hs=Q([`no-effect-sync-console`,`no-atom-registry-effect-sync`,`no-family-collection-read`,`no-naked-object-state-update`,`no-wrapgraphql-catchall`]),gs=Q([`no-raw-domain-id-alias`,`no-boolean-domain-flag`,`no-magic-domain-string`,`no-raw-domain-primitive-params`,`no-raw-time-domain-field`,`no-overloaded-options-object`,`no-domain-logic-in-conditional`,`no-implicit-state-machine-object`,`no-adhoc-domain-error`,`no-domain-meaning-by-folder-only`,`no-new-date-in-domain-logic`]),_s=Q([`no-piped-yield-in-gen`,`no-gen-for-mapping`,`prefer-gen-for-workflow`]),vs=Q([`no-large-anonymous-flow`,`no-effect-in-flow`,`prefer-named-flow`]),ys=Q([`prefer-pipe-for-behavior`,`prefer-decorated-effect-before-gen`,`no-workflow-in-behavior-pipe`]),bs=Q([`no-mixed-pillar-function`,`no-clever-effect-expression`,`prefer-extracted-concept`]),xs=Q([`prefer-effect-service`,`no-layer-provide-in-service-definition`,`require-service-accessors`,`require-service-dependencies`,`no-namespace-effect-import`,`no-manual-service-object-export`,`no-layer-merge-in-request-handler`,`no-service-method-returning-promise`,`prefer-layer-pipe`,`no-inline-layer-provide-in-program`,`prefer-layer-mergeall-for-infrastructure`,`no-service-layer-scatter`]),Ss=Q([`no-hidden-effect-execution`,`no-boundary-try-catch-without-effect-map`,`no-node-fs-in-effect-code`,`no-json-parse-without-schema`,`no-date-now-in-effect`,`no-node-platform-in-shared-code`,`no-process-env-direct-read`]),Cs=Q([`no-console-in-effect-flow`,`no-effect-log-without-structured-context`,`require-span-on-public-service-method`,...os]),ws=Q(Object.keys(as)),Ts=Q(Object.keys(as).filter(e=>![...os,...ss].includes(e))),Es={reactAndRuntimeBoundaries:ls,effectComposition:us,concurrencySafety:ds,pipelineShapeAndSequencing:fs,branchingAndLocalControlFlow:ps,optionMatchAndDataNormalization:ms,atomStateAndPlatformBoundaries:hs,domainModeling:gs,effectFlow:_s,pureTransformation:vs,behaviorDecoration:ys,styleSeparation:bs,serviceAndLayerArchitecture:xs,platformAndBoundaryHygiene:Ss,testingObservabilityAndQa:Cs,ddd:gs},Ds=$(Ts),Os=$(ls),ks=$(us),As=$(ds),js=$(fs),Ms=$(ps),Ns=$(ms),Ps=$(hs),Fs=$(gs),Is=Fs,Ls=$(_s),Rs=$(vs),zs=$(ys),Bs=$(bs),Vs=$(xs),Hs=$(Ss),Us=$(Cs),Ws={recommended:Ds,reactAndRuntimeBoundaries:Os,effectComposition:ks,concurrencySafety:As,pipelineShapeAndSequencing:js,branchingAndLocalControlFlow:Ms,optionMatchAndDataNormalization:Ns,atomStateAndPlatformBoundaries:Ps,domainModeling:Fs,ddd:Is,effectFlow:Ls,pureTransformation:Rs,behaviorDecoration:zs,styleSeparation:Bs,serviceAndLayerArchitecture:Vs,platformAndBoundaryHygiene:Hs,testingObservabilityAndQa:Us};var Gs=e({meta:{name:`linteffect`},rules:as});export{ws as allRules,Ps as atomStateAndPlatformBoundaries,hs as atomStateAndPlatformBoundariesRules,zs as behaviorDecoration,ys as behaviorDecorationRules,Ms as branchingAndLocalControlFlow,ps as branchingAndLocalControlFlowRules,As as concurrencySafety,ds as concurrencySafetyRules,Is as ddd,Gs as default,Fs as domainModeling,gs as domainModelingRules,ks as effectComposition,us as effectCompositionRules,Ls as effectFlow,_s as effectFlowRules,cs as jsPlugins,Ns as optionMatchAndDataNormalization,ms as optionMatchAndDataNormalizationRules,js as pipelineShapeAndSequencing,fs as pipelineShapeAndSequencingRules,Hs as platformAndBoundaryHygiene,Ss as platformAndBoundaryHygieneRules,Ws as presets,Rs as pureTransformation,vs as pureTransformationRules,Os as reactAndRuntimeBoundaries,ls as reactAndRuntimeBoundariesRules,Ds as recommended,Ts as recommendedRules,Es as ruleGroups,Vs as serviceAndLayerArchitecture,xs as serviceAndLayerArchitectureRules,Bs as styleSeparation,bs as styleSeparationRules,Us as testingObservabilityAndQa,Cs as testingObservabilityAndQaRules};
2
2
  //# sourceMappingURL=index.mjs.map