MCPcopy Index your code
hub / github.com/ChinaSiro/claude-code-sourcemap / z3Y

Function z3Y

package/cli.js:4171–4171  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4169
4170## Additional context
4171
4172${_}`:""}`}var DWK=y(()=>{n76()});function _3Y(){let q=g8("tengu_onyx_plover",null);return{minHours:typeof q?.minHours==="number"&&Number.isFinite(q.minHours)&&q.minHours>0?q.minHours:fWK.minHours,minSessions:typeof q?.minSessions==="number"&&Number.isFinite(q.minSessions)&&q.minSessions>0?q.minSessions:fWK.minSessions}}function z3Y(){if(xk())return!1;if(z5())return!1;if(!l3())return!1;return jp8()}function Y3Y(){return!1}function GWK(){let q=0;ZWK=async function(_,z){let Y=_3Y(),$=Y3Y();if(!$&&!z3Y())return;let A;try{A=await Am8()}catch(W){N(`[autoDream] readLastConsolidatedAt failed: ${W.message}`);return}let O=(Date.now()-A)/3600000;if(!$&&O<Y.minHours)return;let w=Date.now()-q;if(!$&&w<K3Y){N(`[autoDream] scan throttle — time-gate passed but last scan was ${Math.round(w/1000)}s ago`);return}q=Date.now();let j;try{j=await PjK(A)}catch(W){N(`[autoDream] listSessionsTouchedSince failed: ${W.message}`);return}let H=N8();if(j=j.filter((W)=>W!==H),!$&&j.length<Y.minSessions){N(`[autoDream] skip — ${j.length} sessions since last consolidation, need ${Y.minSessions}`);return}let J;if($)J=A;else{try{J=await XjK()}catch(W){N(`[autoDream] lock acquire failed: ${W.message}`);return}if(J===null)return}N(`[autoDream] firing — ${O.toFixed(1)}h since last, ${j.length} sessions to review`),d("tengu_auto_dream_fired",{hours_since:Math.round(O),sessions_since:j.length});let M=_.toolUseContext.setAppStateForTasks??_.toolUseContext.setAppState,X=new AbortController,P=DjK(M,{sessionsReviewing:j.length,priorMtime:J,abortController:X});try{let W=Vj(),D=_2(r1()),f=`
4173
4174**Tool constraints for this run:** Bash is restricted to read-only commands (\`ls\`, \`find\`, \`grep\`, \`cat\`, \`stat\`, \`wc\`, \`head\`, \`tail\`, and similar). Anything that writes, redirects to a file, or modifies state will be denied. Plan your exploration with this in mind — no need to probe.

Callers 1

GWKFunction · 0.85

Calls 4

xkFunction · 0.85
z5Function · 0.85
l3Function · 0.85
jp8Function · 0.85

Tested by

no test coverage detected