1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8755],{28755:(t,n,e)=>{e.r(n),e.d(n,{READ_ONLY_SIM_TERMINAL_TOOLS:()=>a,executeSimTerminalTool:()=>c,makeRunCommandExecutor:()=>r,simTerminalToolLabel:()=>m});let o=/[\x00-\x1F]/,a=new Set;function r(t){return async(n,e)=>{var a;if("run_command"!==n)return{content:'Unknown tool "'.concat(n,'".'),isError:!0,summary:"Unknown tool",detail:""};let r="string"==typeof e.command?e.command:"";if(!r.trim())return{content:"run_command requires a non-empty string `command`.",isError:!0,summary:"Bad input",detail:""};if(r.length>512)return{content:"Command too long (max ".concat(512," chars). Send one short command."),isError:!0,summary:"Too long",detail:""};if(o.test(r))return{content:"Command must be a single line with no control characters.",isError:!0,summary:"Invalid command",detail:""};let m="string"==typeof e.explanation?e.explanation.trim().slice(0,500):void 0,c=await t(r,m||void 0);return{content:"step"===c.outcome?"Command ran. Output:\n".concat(c.output||"(no output)").concat(c.nextState.done?"\nAll steps complete.":""):"sandbox"===c.outcome?"Command ran (read-only, no step advanced). Output:\n".concat(c.output||"(no output)"):"Command did not match the current step (nothing advanced).",isError:!1,summary:"step"===c.outcome?c.nextState.done?"Completed":"Advanced":"sandbox"===c.outcome?"Ran (read-only)":"No match",detail:null!=(a=c.output)?a:"",..."step"===c.outcome&&c.nextState.done?{allTestsPassed:!0}:{}}}}function m(t,n){if("run_command"!==t)return"".concat(t,"()");let e="string"==typeof n.command?n.command.replace(/\s+/g," ").trim():"";return"$ ".concat(e.length>60?e.slice(0,57)+"â¦":e)}async function c(t,n,e){return t?t.isLessonComplete()?{content:"Not executed: the terminal is locked because all steps are complete. Submit your work, or Reset to start over.",isError:!0,summary:"Terminal locked",detail:""}:r(t.run)(n,e):{content:"Not executed: the terminal is not ready.",isError:!0,summary:"No terminal",detail:""}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.