| 7734 | `);if(z){let w=N8();pN6(z,w)}}async function*hH6(q,K,_,z,Y,$,A,O=PO,w,j){N(`executePermissionRequestHooks called for tool: ${q}`);let H={...C$(Y,void 0,z),hook_event_name:"PermissionRequest",tool_name:q,tool_input:_,permission_suggestions:$};yield*GR({hookInput:H,toolUseID:K,matchQuery:q,signal:A,timeoutMs:O,toolUseContext:z,requestPrompt:w,toolInputSummary:j})}async function qv6(q,K,_=PO){let z={...C$(void 0),hook_event_name:"ConfigChange",source:q,file_path:K},Y=await ob({hookInput:z,timeoutMs:_,matchQuery:q});if(q==="policy_settings")return Y.map(($)=>({...$,blocked:!1}));return Y}async function LgK(q,K){let _=await ob({hookInput:q,timeoutMs:K});if(_.length>0)sE6();let z=_.flatMap(($)=>$.watchPaths??[]),Y=_.map(($)=>$.systemMessage).filter(($)=>!!$);return{results:_,watchPaths:z,systemMessages:Y}}function Yo1(q,K,_=PO){let z={...C$(void 0),hook_event_name:"CwdChanged",old_cwd:q,new_cwd:K};return LgK(z,_)}function $o1(q,K,_=PO){let z={...C$(void 0),hook_event_name:"FileChanged",file_path:q,event:K};return LgK(z,_)}function Wr6(){let q=bQ()?.InstructionsLoaded;if(q&&q.length>0)return!0;let K=sR()?.InstructionsLoaded;if(K&&K.length>0)return!0;return!1}async function Dr6(q,K,_,z){let{globs:Y,triggerFilePath:$,parentFilePath:A,timeoutMs:O=PO}=z??{},w={...C$(void 0),hook_event_name:"InstructionsLoaded",file_path:q,memory_type:K,load_reason:_,globs:Y,trigger_file_path:$,parent_file_path:A};await ob({hookInput:w,timeoutMs:O,matchQuery:_})}function RgK(q,K){if(q.blocked&&!q.succeeded)return{blockingError:{blockingError:q.output||"Elicitation blocked by hook",command:q.command}};if(!q.output.trim())return{};let _=q.output.trim();if(!_.startsWith("{"))return{};try{let z=lS6().parse(JSON.parse(_));if(rb(z))return{};if(!Cd(z))return{};if(z.decision==="block"||q.blocked)return{blockingError:{blockingError:z.reason||"Elicitation blocked by hook",command:q.command}};let Y=z.hookSpecificOutput;if(!Y||Y.hookEventName!==K)return{};if(!Y.action)return{};let A={response:{action:Y.action,content:Y.content}};if(Y.action==="decline")A.blockingError={blockingError:z.reason||(K==="Elicitation"?"Elicitation denied by hook":"Elicitation result blocked by hook"),command:q.command};return A}catch{return{}}}async function wg1({serverName:q,message:K,requestedSchema:_,permissionMode:z,signal:Y,timeoutMs:$=PO,mode:A,url:O,elicitationId:w}){let j={...C$(z),hook_event_name:"Elicitation",mcp_server_name:q,message:K,mode:A,url:O,elicitation_id:w,requested_schema:_},H=await ob({hookInput:j,matchQuery:q,signal:Y,timeoutMs:$}),J,M;for(let X of H){let P=RgK(X,"Elicitation");if(P.blockingError)M=P.blockingError;if(P.response)J=P.response}return{elicitationResponse:J,blockingError:M}}async function jg1({serverName:q,action:K,content:_,permissionMode:z,signal:Y,timeoutMs:$=PO,mode:A,elicitationId:O}){let w={...C$(z),hook_event_name:"ElicitationResult",mcp_server_name:q,elicitation_id:O,mode:A,action:K,content:_},j=await ob({hookInput:w,matchQuery:q,signal:Y,timeoutMs:$}),H,J;for(let M of j){let X=RgK(M,"ElicitationResult");if(X.blockingError)J=X.blockingError;if(X.response)H=X.response}return{elicitationResultResponse:H,blockingError:J}}async function H_7(q,K,_=5000,z=!1){if(j68())return;if(Qq8()){N("Skipping StatusLine command execution - workspace trust not accepted");return}let Y;if(fb())Y=v1("policySettings")?.statusLine;else Y=Z7()?.statusLine;if(!Y||Y.type!=="command")return;let $=K||AbortSignal.timeout(_);try{let A=g6(q),O=await hQ8(Y,"StatusLine","statusLine",A,$,vy());if(O.aborted)return;if(O.status===0){let w=O.stdout.trim().split(` |