@probnaya/057-cli 0.1.1 → 0.2.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/README.md +2 -2
- package/dist/assets/index-BQEdszeO.js +658 -0
- package/dist/index.html +1 -1
- package/dist-server/057.mjs +1 -1
- package/package.json +1 -1
- package/dist/assets/index-BInsdRgV.js +0 -658
package/dist/index.html
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32.png">
|
|
9
9
|
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16.png">
|
|
10
10
|
<!-- No web fonts. 057 makes no external request; see the type stack in src/ui/tokens.ts. -->
|
|
11
|
-
<script type="module" crossorigin src="/assets/index-
|
|
11
|
+
<script type="module" crossorigin src="/assets/index-BQEdszeO.js"></script>
|
|
12
12
|
<link rel="stylesheet" crossorigin href="/assets/index-57shDcHR.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
package/dist-server/057.mjs
CHANGED
|
@@ -66,7 +66,7 @@ CREATE INDEX IF NOT EXISTS claims_event ON claims(event_id);
|
|
|
66
66
|
(SELECT id FROM events WHERE subject_type = ? AND subject_id = ?)`),fe=t.prepare("DELETE FROM events WHERE subject_type = ? AND subject_id = ?");let q=0,U=0,x=0;t.exec("BEGIN");try{for(const{type:N,id:F}of R.values()){x+=Number(P.run(N,F).changes);const ne=Number(fe.run(N,F).changes);yt.includes(N)?q+=ne:U+=ne}t.exec("COMMIT")}catch(N){throw t.exec("ROLLBACK"),N}return q+U>0&&y.checkpoint(),{processEvents:q,otherEvents:U,claims:x,subjects:R.size,retainedByDependents:_,processBefore:h,otherBefore:l}},checkpoint(){try{t.exec("PRAGMA wal_checkpoint(TRUNCATE)")}catch{}},sizeBytes(){const[d,m,h]=je(e).map(oo);return{db:d,wal:m,shm:h,total:d+m+h}},health(){const d=o.size;return d===0?{ok:!0,malformedRows:0,columns:[],since:null}:{ok:!1,malformedRows:d,columns:[...r].sort(),since:a,remedy:`${d} stored row(s) could not be read as JSON and lost their ${[...r].sort().join("/")} channel. Everything else is being used normally and nothing has been deleted. Run \`057 compact\` to rewrite the store; if the count keeps growing, back the store up and run \`057 reset\` to start a new one.`}},compact(){t.exec("VACUUM"),y.checkpoint(),We(e)},close(){y.checkpoint(),t.close()}};return y}function oo(e){try{return Ne(e).size}catch{return 0}}function Te(e,t,s){if(e!=null)try{const n=JSON.parse(String(e));if(n&&typeof n=="object")return n;t&&s?.(t);return}catch{t&&s?.(t);return}}function ro(e,t){const s=e,n=t?o=>t(o,String(s.id)):void 0;return{id:String(s.id),source:{id:String(s.source_id),instance:String(s.source_instance)},occurredAt:Number(s.occurred_at),observedAt:Number(s.observed_at),clock:s.clock,kind:s.kind,subject:{type:s.subject_type,id:String(s.subject_id)},core:Te(s.core,"core",n),attrs:Te(s.attrs,"attrs",n),basis:s.basis,assumption:s.assumption?String(s.assumption):void 0,stratum:s.stratum?s.stratum:void 0,provenance:Te(s.provenance,"provenance",n)}}const _e="os",io=(e,t)=>`os:${e}:${t.pid}:${t.startedAt}`,ao=e=>`The process was present in one ${Math.round(e/1e3)}s snapshot and absent from the next, so it exited somewhere in that window. The recorded instant is the last moment it was observed alive — a lower bound on the true exit. A process that started and exited entirely within one interval is never observed at all.`,co=250,uo=8*1024*1024;function lo(e,t,s){const n={source:{id:_e,instance:s.host},observedAt:s.observedAt,clock:"wall",stratum:"machine"},o=[],r=new Map;for(const a of t){const i=io(s.host,a);r.set(i,a);const u={ns:"os.process",parts:[s.host,a.pid],validFrom:a.startedAt,validTo:s.observedAt};if(!e.has(i)){o.push({...n,occurredAt:a.startedAt,kind:"began",subject:{type:"process",id:i},claims:[u],basis:"measured",core:{machineId:s.machineId,label:po(a.command),executor:a.command,measures:{[O.cpuMs]:a.cpuMs}},attrs:{"os.pid":a.pid,"os.ppid":a.ppid,"os.command":a.command,"os.rssBytes":a.rssBytes}});continue}const p=e.get(i),c=a.cpuMs-p.cpuMs>=co,f=Math.abs(a.rssBytes-p.rssBytes)>=uo;(c||f)&&o.push({...n,occurredAt:s.observedAt,seq:`obs:${s.observedAt}`,kind:"observed",subject:{type:"process",id:i},claims:[u],basis:"measured",core:{measures:{[O.cpuMs]:a.cpuMs}},attrs:{"os.rssBytes":a.rssBytes}})}for(const[a,i]of e)r.has(a)||o.push({...n,occurredAt:s.observedAt-s.intervalMs,kind:"ended",subject:{type:"process",id:a},basis:"inferred",assumption:ao(s.intervalMs),core:{outcome:"completed",measures:{[O.cpuMs]:i.cpuMs}},attrs:{"os.pid":i.pid}});return{envelopes:o,next:r}}function po(e){return(e.split("/").pop()??e).toUpperCase()}const fo=ys(gs);function mo(){return Tt().replace(/\.local$/i,"")}function ho(e){const t=[];for(const s of e.split(`
|
|
67
67
|
`)){const n=s.trim();if(!n)continue;const o=n.match(/^(\d+)\s+(\d+)\s+(\w{3}\s+\w{3}\s+\d+\s+[\d:]+\s+\d{4})\s+([\d:.]+)\s+(\d+)\s+(.*)$/);if(!o)continue;const[,r,a,i,u,p,c]=o,f=Date.parse(i);Number.isFinite(f)&&t.push({pid:Number(r),ppid:Number(a),startedAt:f,cpuMs:bo(u),rssBytes:Number(p)*1024,command:c.trim()})}return t}function bo(e){const[t,s]=e.includes("-")?e.split("-"):["0",e],n=s.split(":").map(Number);let o=0;for(const r of n)o=o*60+(Number.isFinite(r)?r:0);return Math.round((o+Number(t)*86400)*1e3)}async function go(){const{stdout:e}=await fo("ps",["-Ao","pid=,ppid=,lstart=,time=,rss=,comm="],{maxBuffer:8388608});return ho(e)}const At=5e3;function yo(e,t){const s=mo();let n=new Map,o=null,r=0,a=null,i,u=!1;async function p(){if(u)return[];u=!0;try{const c=Date.now(),f=await go(),{envelopes:E,next:g}=lo(n,f,{machineId:t,host:s,observedAt:c,intervalMs:At}),y=E.map(G);return e.append(y),n=g,r++,a=c,i=void 0,y}catch(c){return i=c instanceof Error?c.message:String(c),[]}finally{u=!1}}return{sample:p,start(){o||(p(),o=setInterval(()=>{p()},At),o.unref?.())},stop(){o&&clearInterval(o),o=null},get running(){return o!==null},stats(){return{samples:r,tracked:n.size,lastSampleAt:a,lastError:i}}}}const Qt={info:e=>console.log(e),warn:e=>console.warn(e),error:e=>console.error(e)},vo=36e5,wo=15e3,Ao=3;function Ye(e={}){const t=e.log??Qt,s=e.path??ze(),n=e.retention??zt(),o=no(s),r=o.stats();t.info(r.events>0?`[057] store ${s}: opened with ${r.events} events`:`[057] store ${s}: NEW EMPTY STORE — if history existed before, it was lost, not carried`);const a=Kt();a&&t.warn(`[057] a store from a previous layout exists at ${a} and is NOT in use. Run 057 with O57_STORE=${a} to keep using it, or move it to ${s}.`);const i=se();o.append([G({source:{id:"host",instance:i.id},occurredAt:0,observedAt:Date.now(),clock:"wall",kind:"began",stratum:"machine",subject:{type:"machine",id:i.id},basis:"measured",core:{machineName:i.name,machineKind:i.kind},seq:"host"})]);const u=yo(o,i.id),p=new Map;function c(l){for(const b of l){const A=p.get(b.id)??{consecutiveFailures:0,totalFailures:0,failing:!1};b.ok?(A.consecutiveFailures=0,A.failing=!1,A.lastSuccessAt=Date.now()):(A.consecutiveFailures++,A.totalFailures++,A.lastFailureAt=Date.now(),A.lastError=b.error,A.consecutiveFailures>=Ao&&!A.failing&&(A.failing=!0,t.warn(`[057] source ${b.id} has failed ${A.consecutiveFailures} collection rounds in a row: ${b.error??"unknown error"}`))),p.set(b.id,A)}}const f=Et(s);let E=null;function g(l){return E||(E=l,t.error(`[057] ${l.message} — ${l.remedy}`),u.stop()),E}function y(){if(E)return E;if(s===":memory:")return null;if(!C(s))return g({kind:"unlinked",message:`the store at ${s} no longer exists on disk; captured events are going to an orphaned file and will be lost`,remedy:"Stop 057 and start it again. It will open a new store at the same path.",since:Date.now()});const l=Et(s);return f!==null&&l!==null&&l!==f?g({kind:"replaced",message:`the store at ${s} was replaced by a different file while 057 was running; captured events are going to the old one`,remedy:"Stop 057 and start it again so it opens the file that is actually there.",since:Date.now()}):null}e.observe!==!1&&u.start();const d=o.sweep(n);d.processEvents+d.otherEvents>0&&t.info(`[057] retention: removed ${d.processEvents} process and ${d.otherEvents} semantic events (${Me(n)})`);const m=setInterval(()=>{if(!E)try{o.sweep(n),We(s)}catch(l){t.warn(`[057] retention sweep failed: ${String(l)}`)}},vo);m.unref?.();const h=setInterval(()=>{y()},wo);return h.unref?.(),{store:o,machine:i,os:u,path:s,retention:n,fault:()=>E,sweep:l=>o.sweep(n,l),checkStore:y,recordCollection:c,collectionHealth:()=>Object.fromEntries(p),stop(){clearInterval(m),clearInterval(h),u.stop(),o.close()}}}function Et(e){try{return Ne(e).ino}catch{return null}}const Eo=[{id:_t,collect:(e,t)=>Ps(e,t)},{id:Ue,collect:(e,t)=>Ks(e,t)},{id:le,collect:(e,t)=>cn(e,t)},{id:ke,collect:(e,t)=>yn(e,t)},{id:ge,collect:(e,t)=>_n(e,t)},{id:Ie,collect:(e,t)=>Dn(e,t)}],kt=10*365*24*36e5,Ee=2e5,ko=24*36e5;function So(e,t,s){const n=t.startsWith("/api/");if(s){const i=(e.headers.host??"").toLowerCase(),u=i.startsWith("[")?i.slice(0,i.indexOf("]")+1):i.split(":")[0];if(!s.includes(u))return`refusing a request for host "${i}"; 057 answers only on ${s.join(", ")}`}const o=e.headers.origin;if(typeof o=="string"&&o!=="null"){const i=(e.headers.host??"").toLowerCase();let u="";try{u=new URL(o).host.toLowerCase()}catch{return"refusing a request with an unparseable Origin"}if(u!==i)return`refusing a cross-origin request from ${o}`}const r=e.headers["sec-fetch-site"],a=String(e.headers["sec-fetch-dest"]??"");if(Io.has(a))return`refusing to be embedded as ${a}`;if(typeof r=="string"&&r!==""){if(r!=="same-origin"&&r!=="none")return`refusing a ${r} request`;if(r==="none"&&n)return"refusing a directly-navigated API request"}else if(n&&t==="/api/collect")return"refusing a state-changing request that carries no fetch metadata";return null}const Io=new Set(["iframe","frame","embed","object","fencedframe"]);function Ke(e){e.setHeader("x-frame-options","DENY"),e.setHeader("content-security-policy","frame-ancestors 'none'")}function To(e,t){const s=(r,a)=>{const i=e.get(r);if(i===null||i==="")return a;const u=Number(i);return Number.isSafeInteger(u)?u:null},n=s("from",t-864e5),o=s("to",t);return n===null||o===null?{error:"from and to must be integer epoch millis"}:o<n?{error:"to must not precede from"}:o>t+ko?{error:"to is too far in the future"}:o-n>kt?{error:`window must not exceed ${kt} ms`}:{from:n,to:o}}function H(e,t,s){e.statusCode=t,e.setHeader("content-type","application/json"),e.setHeader("cache-control","no-store"),e.setHeader("x-content-type-options","nosniff"),Ke(e),e.end(JSON.stringify(s))}function Zt(e,t,s,n){const o=e.query(t,s,n),r=new Set,a=new Set,i=c=>{const f=`${c.subject.type}:${c.subject.id}`;c.kind==="began"?r.add(f):a.add(f),c.core?.sessionId&&a.add(`session:${c.core.sessionId}`),c.core?.machineId&&a.add(`machine:${c.core.machineId}`)};for(const c of o)i(c);const u=[];for(let c=0;c<4;c++){const f=[...a].filter(g=>!r.has(g));if(f.length===0)break;const E=e.begansFor(f);if(E.length===0)break;for(const g of E)u.push(g.occurredAt<t?{...g,occurredAt:t}:g),i(g),r.add(`${g.subject.type}:${g.subject.id}`)}return{events:[...u,...o].sort((c,f)=>c.occurredAt-f.occurredAt||St(c)-St(f)),relationships:$s(e,t,s).relationships}}function _o(e,t,s){const n=performance.now(),{events:o,relationships:r}=Zt(e,t,s),a=performance.now()-n,i=performance.now(),u=Pn(t,s);Vn(u,o),Gn(u,s);const p=performance.now()-i,c=performance.now(),f=Yn(u,r),E=performance.now()-c;return{world:f,meta:{events:o.length,readMs:Math.round(a*10)/10,deriveMs:Math.round(p*10)/10,serializeMs:Math.round(E*10)/10}}}function St(e){if(e.kind==="ended")return 5;switch(e.subject.type){case"machine":return 0;case"session":return 1;case"execution":case"process":return e.kind==="began"?2:3;default:return 4}}function Ro(e){const t=e.problems.filter(s=>s.path.includes("/sessions/")).length;return{identity:e.identityAvailable?t===0?"available":e.registryEntries>0?"partial":"failed":"unavailable","stored-semantics":e.storedAvailable?e.transcriptsFailed===0?"available":e.transcriptsRead>0?"partial":"failed":"unavailable","live-semantics":"unavailable"}}function Le(e){return{"stored-semantics":e.storedAvailable?e.failed===0?"available":e.read>0?"partial":"failed":"unavailable","live-semantics":"unavailable"}}function $o(e){return e.error?"failed":e.available?"observing":e.present?"installed-no-data":"not-installed"}function Oo(e){const t=e.home??e.globalStorage;if(typeof t=="string")return t;const s=e.roots;return Array.isArray(s)?s.join(", "):void 0}function ae(e){return{available:e.available,present:e.present??!1,presence:$o(e),origin:Oo(e),error:e.error}}function No(e){const{runtime:t,log:s}=e;return async function(o,r){const a=o.url??"";if(!a.startsWith("/api/"))return!1;const i=new URL(a,"http://localhost"),u=So(o,i.pathname,e.allowedHosts);if(u)return s.warn(`[057] ${u}`),H(r,403,{error:u}),!0;const p=t.store,c=Date.now(),f=To(i.searchParams,c);if("error"in f)return H(r,400,{error:f.error}),!0;const{from:E,to:g}=f;try{if(i.pathname==="/api/state"){const[y,d,m,h,l,b]=await Promise.all([Bs().catch(x=>({available:!1,error:String(x)})),Qs().catch(x=>({available:!1,error:String(x)})),un().catch(x=>({available:!1,error:String(x)})),vn().catch(x=>({available:!1,error:String(x)})),Rn().catch(x=>({available:!1,error:String(x)})),Fn().catch(x=>({available:!1,error:String(x)}))]),[A,v,S,R]=await Promise.all([Dt(E,g).catch(()=>null),Pt(E,g).catch(()=>null),Wt(E,g).catch(()=>null),Gt(E,g).catch(()=>null)]),I={strata:{"stored-semantics":"failed"}},$={"claude-code":A?{strata:Ro(A),registryEntries:A.registryEntries,transcriptsRead:A.transcriptsRead,transcriptsFailed:A.transcriptsFailed,problems:A.problems.slice(0,20)}:{strata:{identity:"failed"}},codex:v?{strata:Le({storedAvailable:v.storedAvailable,read:v.rolloutsRead,failed:v.rolloutsFailed}),rolloutsRead:v.rolloutsRead,rolloutsFailed:v.rolloutsFailed,problems:v.problems.slice(0,20)}:I,cursor:S?{strata:Le({storedAvailable:S.storedAvailable,read:S.composersRead,failed:S.composersFailed}),composersRead:S.composersRead,composersFailed:S.composersFailed,problems:S.problems.slice(0,20)}:I,gemini:R?{strata:Le({storedAvailable:R.storedAvailable,read:R.sessionsRead,failed:R.sessionsFailed}),sessionsRead:R.sessionsRead,sessionsFailed:R.sessionsFailed,problems:R.problems.slice(0,20)}:I},w={deepseek:ae(y),"0x2f":ae(d),"claude-code":ae(m),codex:ae(h),cursor:ae(l),gemini:ae(b)},k=t.collectionHealth();for(const[x,N]of Object.entries(w)){const F=k[x];F?.failing&&(N.presence="failed",N.error??=F.lastError)}const T=t.os.stats(),P=Object.values(w).filter(x=>x.available).length>0?"observing":T.samples>0?"os-only":"empty",fe=Object.entries(k).filter(([,x])=>x.failing).map(([x])=>x),q=p.health(),U={ok:fe.length===0&&q.ok&&!t.fault()&&!T.lastError,failingSources:fe,collection:k,store:q,os:T.lastError?{failing:!0,lastError:T.lastError}:{failing:!1}};return H(r,200,{machine:t.machine,mode:P,fault:t.fault()??void 0,health:U,store:{...p.stats(),path:p.path,schemaVersion:p.schemaVersion,bytes:p.sizeBytes(),retention:{...t.retention,description:Me(t.retention)}},os:{...T,running:t.os.running,source:_e},sources:w,observation:$}),!0}if(i.pathname==="/api/collect"){const y=t.checkStore();if(y)return H(r,503,{error:y.message,fault:y}),!0;const d=await Rs(p,Eo,E,g);t.recordCollection(d.sources);const m=await t.os.sample();return t.recordCollection([{id:_e,ok:!t.os.stats().lastError,error:t.os.stats().lastError}]),H(r,200,{...d,sources:[...d.sources,{id:_e,ok:!t.os.stats().lastError,collected:m.length,inserted:m.length,duplicate:0,error:t.os.stats().lastError,ms:0}]}),!0}if(i.pathname==="/api/world")return H(r,200,{from:E,to:g,now:c,..._o(p,E,g)}),!0;if(i.pathname==="/api/detail"){const y=i.searchParams.get("type")??"",d=i.searchParams.get("id")??"";if(!rt.includes(y)||!d)return H(r,400,{error:"detail needs type=<entity type> and id"}),!0;if(d.length>512)return H(r,400,{error:"id is too long"}),!0;const m=p.subjectEvents(y,d);return H(r,200,{type:y,id:d,events:m.slice(0,Ee),truncated:m.length>Ee}),!0}if(i.pathname==="/api/events"){const y=i.searchParams.get("subject"),d=y?y.split(",").filter(h=>rt.includes(h)):void 0,m=Zt(p,E,g,d);return H(r,200,{from:E,to:g,now:c,events:m.events.slice(0,Ee),truncated:m.events.length>Ee,relationships:m.relationships}),!0}return H(r,404,{error:"unknown endpoint"}),!0}catch(y){return s.error(`[057] ${String(y)}`),H(r,500,{error:String(y)}),!0}}}const Qe=5057,ye="127.0.0.1",Mo=["localhost","127.0.0.1","[::1]","::1"],jo=10,xo={".html":"text/html; charset=utf-8",".js":"text/javascript; charset=utf-8",".css":"text/css; charset=utf-8",".json":"application/json; charset=utf-8",".svg":"image/svg+xml",".woff2":"font/woff2",".png":"image/png",".ico":"image/vnd.microsoft.icon"};function It(e,t,s){let n;try{n=decodeURIComponent(t)}catch{return!1}if(n.includes("\0"))return!1;const o=ve(e,`.${ls(n)}`);if(o!==e&&!o.startsWith(e+ps)||!C(o)||!Ne(o).isFile())return!1;const r=xo[fs(o).toLowerCase()]??"application/octet-stream";return s.statusCode=200,s.setHeader("content-type",r),s.setHeader("x-content-type-options","nosniff"),Ke(s),s.setHeader("cache-control",t.startsWith("/assets/")?"public, max-age=31536000, immutable":"no-store"),rs(o).pipe(s),!0}function Co(e,t,s,n){return new Promise((o,r)=>{let a=n,i=t;const u=p=>{if(p.code==="EADDRINUSE"&&a>1){a--,i++,e.listen(i,s);return}e.off("error",u),r(p)};e.on("error",u),e.once("listening",()=>{e.off("error",u);const p=e.address();o(typeof p=="object"&&p?p.port:i)}),e.listen(i,s)})}function Do(e,t){const s=String(e.headers["sec-fetch-dest"]??"");if(Fo.has(s))return`refusing to be embedded as ${s}`;const n=e.headers["sec-fetch-site"];return typeof n=="string"&&n!==""&&n!=="same-origin"&&n!=="none"?`refusing a ${n} request for ${t}`:null}const Fo=new Set(["iframe","frame","embed","object","fencedframe"]);async function Lo(e){const t=e.log??Qt,s=ve(e.root),n=e.host??ye,o=n===ye||n==="::1"||n==="localhost",r=e.runtime??Ye({path:e.storePath,log:t,retention:e.retention,observe:e.observe}),a=No({runtime:r,log:t,allowedHosts:o?Mo:null}),i=cs((c,f)=>{(async()=>{try{if(await a(c,f))return;if(c.method!=="GET"&&c.method!=="HEAD"){f.statusCode=405,f.setHeader("allow","GET, HEAD"),f.end();return}const E=new URL(c.url??"/","http://localhost").pathname,g=Do(c,E);if(g){t.warn(`[057] ${g}`),f.statusCode=403,f.setHeader("content-type","text/plain; charset=utf-8"),Ke(f),f.end(`${g}
|
|
68
68
|
`);return}if(It(s,E==="/"?"/index.html":E,f)||!E.startsWith("/assets/")&&It(s,"/index.html",f))return;f.statusCode=404,f.setHeader("content-type","text/plain; charset=utf-8"),f.end(`not found
|
|
69
|
-
`)}catch(E){t.error(`[057] request failed: ${String(E)}`),f.headersSent||(f.statusCode=500),f.end()}})()}),u=await Co(i,e.port??Qe,n,jo).catch(c=>{throw r.stop(),c});return{url:`http://${o?"localhost":n}:${u}`,port:u,host:n,runtime:r,server:i,close(){return new Promise(c=>{i.close(()=>{r.stop(),c()}),i.closeAllConnections?.()})}}}function Uo(e){return ve(ms(new URL(".",e)),"..","dist")}const es="0.
|
|
69
|
+
`)}catch(E){t.error(`[057] request failed: ${String(E)}`),f.headersSent||(f.statusCode=500),f.end()}})()}),u=await Co(i,e.port??Qe,n,jo).catch(c=>{throw r.stop(),c});return{url:`http://${o?"localhost":n}:${u}`,port:u,host:n,runtime:r,server:i,close(){return new Promise(c=>{i.close(()=>{r.stop(),c()}),i.closeAllConnections?.()})}}}function Uo(e){return ve(ms(new URL(".",e)),"..","dist")}const es="0.2.0";function Po(e){const t={command:"serve",open:!1,yes:!1},s=[...e],n=s[0];if(n&&!n.startsWith("-"))if(n==="status"||n==="compact"||n==="reset")t.command=n,s.shift();else return{...t,command:"help",error:`unknown command: ${n}`};for(;s.length;){const o=s.shift(),[r,a]=o.includes("=")?Bo(o,"="):[o,void 0],i=()=>a??s.shift();switch(r){case"-h":case"--help":t.command="help";break;case"-v":case"--version":t.command="version";break;case"--open":t.open=!0;break;case"--yes":case"-y":t.yes=!0;break;case"--port":{const u=i(),p=Number(u);if(!Number.isInteger(p)||p<0||p>65535)return{...t,command:"help",error:`--port needs a port number, got ${u}`};t.port=p;break}case"--host":{const u=i();if(!u)return{...t,command:"help",error:"--host needs a value"};t.host=u;break}case"--store":{const u=i();if(!u)return{...t,command:"help",error:"--store needs a path"};t.store=u;break}default:return{...t,command:"help",error:`unknown option: ${r}`}}}return t}function Bo(e,t){const s=e.indexOf(t);return[e.slice(0,s),e.slice(s+1)]}const Ho=`057 — a spatial interface for observing the shape of a computational workday
|
|
70
70
|
|
|
71
71
|
057 observe this machine and serve the interface
|
|
72
72
|
057 status where the store is, what it holds, what is observed
|