Lines 1-22javascript
2import { createRequire as __cr } from 'module'; const require = __cr(import.meta.url);
3import{spawn as tn,spawnSync as Dr,execSync as Or}from"node:child_process";import{fileURLToPath as en}from"node:url";import{existsSync as nn}from"node:fs";import{resolve as Tr,dirname as Ur,join as Wr}from"node:path";import{homedir as on}from"node:os";import{join as Z}from"node:path";import{randomBytes as sn}from"node:crypto";import{readFileSync as an,writeFileSync as Oe,mkdirSync as Te,chmodSync as cn,existsSync as Ue}from"node:fs";var H=(process.env.SUPERCLAWD_BACKEND||"real").toLowerCase(),k=H==="mock",B=process.env.SUPERCLAWD_MCP_API_URL||"https://mcp-api.superclawd.com",ee=process.env.SUP ...
4`,{mode:384});try{cn(Q,384)}catch{}}function Ne(){return P()?.preferences?.skipPermissions===!0}function un(){return P()?.preferences?.notifications===!0}function Ge(){return P()?.preferences?.chooseWorkspaceAtStartup!==!1}function we(e){let t=P()??{};G({...t,credentials:{...t.credentials,workspace:e}})}function ne(){let e=P();e?.credentials?.workspace&&G({...e,credentials:{...e.credentials,workspace:""}})}function je(){return P()?.preferences?.experimental===!0}function Fe(){return P()?.preferences?.keepAwake===!0}function Ke(){return P()?.preferences?.privateMemory!==!1}function Ye(){return ...
HighChild Process
Package source references child process execution.
dist/index.jsView on unpkg · L2 HighSame File Env Network Execution
A single source file combines environment access, network access, and code or shell execution; review context before blocking.
dist/index.jsView on unpkg · L2 5`)}catch{}}function He(e,t){Ue(Be(e))||pn(e,{notifications:un(),...t?{workspace:t}:{}})}function qe(){Ue(Q)||G({credentials:{keyId:"",secret:"",workspace:""},preferences:{notifications:!1,skipPermissions:!1,chooseWorkspaceAtStartup:!
6`)};function dn(){try{switch(process.platform){case"darwin":return Se("caffeinate",["-i","-w",String(process.pid)],{stdio:"ignore"});case"linux":return Se("systemd-inhibit",["--what=sleep:idle","--who=SuperClawd","--why=SuperClawd session running","--mode=block","cat"],{stdio:["pipe","ignore","ignore"]});case"win32":{let e=[`$p = Add-Type -MemberDefinition '[DllImport("kernel32.dll")] public static extern uint SetThreadExecutionState(uint e);' -Name P -Namespace W -PassThru;`,"$p::SetThreadExecutionState(0x80000000 -bor 0x00000001) | Out-Null;","[void][Console]::In.ReadToEnd();"].join(" ");ret ...
HighCommand Output Exfiltration
Source combines command execution, command-output handling, and outbound requests; review data flow before blocking.
dist/index.jsView on unpkg · L2 7`);let r=Qe("npm install -g superclawd@latest",{stdio:"inherit",shell:!0});if(r.status!==0)return process.stderr.write(`
HighSandbox Evasion Gated Capability
Source gates dangerous network, credential, or execution behavior behind CI, host, platform, time, or geo fingerprint checks.
dist/index.jsView on unpkg · L2 8\u2717 Couldn't auto-update to ${n} (npm exited ${r.status??"?"}).
9 SuperClawd won't launch an outdated version. Update manually, then re-run:
10 npm install -g superclawd@latest
11`),{exitCode:1};let o=Qe("superclawd",t,{stdio:"inherit",env:{...process.env,SUPERCLAWD_UPDATED:"1"}});return o.error?(process.stderr.write(`
12\u2713 Updated to ${n}. Re-run your command.
13`),{exitCode:0}):{exitCode:o.status??0}}import{randomUUID as et}from"node:crypto";function tt(e){let t={"content-type":"application/json","x-mcp-key-id":e.keyId,"x-mcp-secret":e.secret,"x-workspace-slug":e.workspace,"x-request-id":et()};return process.env.SUPERCLAWD_EXPERIMENTAL==="true"&&(t["x-experimental"
141. Tests pass and cover new behavior.
152. No secrets or debug logging left in.
163. Public APIs documented.
174. Changelog updated.`}],at=[{name:"error-codes",description:"Canonical list of this platform's error codes.",content:`E1001 invalid_input
20E2001 upstream_unavailable`}];var ct=[{id:"workflow-deploy-001",name:"production-deploy",description:"deploying to production, cutting a release, or shipping to prod",itemCount:6,content:`Production deploy workflow:
211. Confirm CI is green on main.
222. Bump version + update changelog.
Long lines were clipped for display.