eser 4.1.41 → 4.1.42
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/chunks/approve-ZVP5ZFYD.js +2 -0
- package/chunks/block-XMEV54BW.js +2 -0
- package/chunks/cancel-NOMB4RWW.js +2 -0
- package/chunks/{chunk-5Y5VGPYR.js → chunk-B25CIV35.js} +1 -1
- package/chunks/{chunk-DRCKMHUI.js → chunk-B2ANQEQO.js} +1 -1
- package/chunks/{chunk-6SSSHLEY.js → chunk-CDVYNW34.js} +1 -1
- package/chunks/{chunk-OM5GSS2H.js → chunk-EWECBFQO.js} +3 -3
- package/chunks/chunk-HCCAYXSB.js +82 -0
- package/chunks/{chunk-ENNZWOEX.js → chunk-M7KYQS2M.js} +1 -1
- package/chunks/{chunk-OEUVCV5C.js → chunk-VW5QFRLO.js} +1 -1
- package/chunks/chunk-XV76AD7Z.js +17 -0
- package/chunks/concern-MIS5NE4U.js +2 -0
- package/chunks/done-JBMAE4OV.js +2 -0
- package/chunks/init-5LKHWDV5.js +2 -0
- package/chunks/invoke-hook-PYVXULCH.js +11 -0
- package/chunks/{mod-JWUOEEMP.js → mod-QZTTX5HQ.js} +1 -1
- package/chunks/next-L3D5GIYW.js +9 -0
- package/chunks/{purge-565VM3XK.js → purge-VATLMK3Y.js} +1 -1
- package/chunks/reopen-DD4BEUJ3.js +2 -0
- package/chunks/reset-H2L4XUQ6.js +2 -0
- package/chunks/{rule-SMPE3A72.js → rule-PC5PQJCD.js} +1 -1
- package/chunks/run-MSWGAMLB.js +4 -0
- package/chunks/spec-5F7ZXCOG.js +2 -0
- package/chunks/status-XECKZKHG.js +2 -0
- package/chunks/{sync-EIMJAEA7.js → sync-55L47P6M.js} +1 -1
- package/chunks/{system-5OWRHFDI.js → system-QR52LT5S.js} +1 -1
- package/chunks/watch-F6CO73RC.js +9 -0
- package/chunks/wontfix-GSHTDPN7.js +2 -0
- package/eser.js +1 -1
- package/package.json +1 -1
- package/chunks/approve-RQVNTLFH.js +0 -2
- package/chunks/block-3NE7YTL7.js +0 -2
- package/chunks/cancel-W5FDMXFI.js +0 -2
- package/chunks/chunk-3PBNSBPA.js +0 -12
- package/chunks/chunk-H7FWYKMD.js +0 -82
- package/chunks/concern-BWZV4KBS.js +0 -2
- package/chunks/done-44REMKQ4.js +0 -2
- package/chunks/init-RIVFJ2HP.js +0 -2
- package/chunks/invoke-hook-CPYBTKLO.js +0 -11
- package/chunks/next-QNLI4Z6Y.js +0 -9
- package/chunks/reopen-T5ZROS7Y.js +0 -2
- package/chunks/reset-EDANY7W4.js +0 -2
- package/chunks/run-VPRSGIHR.js +0 -4
- package/chunks/spec-WGXL4BOE.js +0 -2
- package/chunks/status-65FD7MJB.js +0 -2
- package/chunks/watch-Y3ARCBAW.js +0 -9
- package/chunks/wontfix-FSTUJ7T6.js +0 -2
package/chunks/watch-Y3ARCBAW.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as C,c as E}from"./chunk-V3NJTF2Y.js";import{a as M,c as S}from"./chunk-TYLYMZQC.js";import{d as T,l as y,s as b}from"./chunk-OM5GSS2H.js";import"./chunk-2XNFZXHY.js";import{a as x,b as k}from"./chunk-FFWPJP7A.js";import{i as m}from"./chunk-6VHZQNHX.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";var D=async e=>{let s=await T(e),l=await y(e),d=await L(e),o=null,h=null,a=0,c=0;if(s.spec!==null){let i=await M(e,s.spec);if(i!==null){a=i.tasks.length,c=s.execution.completedTasks.length;let n=S(i.tasks,s.execution.completedTasks);n!==null&&(o=n.id,h=n.title)}}let $=null;return s.lastCalledAt!==null&&($=Math.floor((Date.now()-new Date(s.lastCalledAt).getTime())/1e3)),{spec:s.spec,phase:s.phase,iteration:s.execution.iteration,activeTaskId:o,activeTaskTitle:h,totalTasks:a,completedTaskCount:c,lastProgress:s.execution.lastProgress,lastCalledAt:s.lastCalledAt,modifiedFiles:s.execution.modifiedFiles,debt:s.execution.debt,concerns:l?.concerns??[],maxIterations:l?.maxIterationsBeforeRestart??15,awaitingStatusReport:s.execution.awaitingStatusReport,verificationPassed:s.execution.lastVerification?.passed??null,decisionsCount:s.decisions.length,discoveryAnswered:s.discovery.answers.length,discoveryTotal:6,trackedFiles:d,timeSinceUpdate:$}},L=async e=>{let s=`${e}/.eser/.state/files-changed.jsonl`;try{let d=(await m.fs.readTextFile(s)).trim().split(`
|
|
3
|
-
`).filter(Boolean),o=[];for(let h of d)try{let a=JSON.parse(h);o.includes(a.file)||o.push(a.file)}catch{}return o}catch{return[]}},I="\x1B[2J\x1B[H",F="\x1B[1m",r="\x1B[2m",t="\x1B[0m",p="\x1B[32m",f="\x1B[33m",w="\x1B[31m",v="\x1B[36m",O=e=>{switch(e){case"COMPLETED":return p;case"BLOCKED":return w;case"EXECUTING":return v;default:return f}},R=(e,s,l)=>{if(s===0)return"\u2591".repeat(l);let d=Math.min(e/s,1),o=Math.round(d*l);return"\u2588".repeat(o)+"\u2591".repeat(l-o)},P=e=>e===null?"never":e<60?`${e}s ago`:e<3600?`${Math.floor(e/60)}m ago`:`${Math.floor(e/3600)}h ago`,A=e=>{let s=[],d="\u2500".repeat(52);s.push(`${r}\u256D${d}\u256E${t}`),s.push(`${r}\u2502${t} ${F}noskills watch${t} \u2014 ${e.spec??"no active spec"}${r}${" ".repeat(Math.max(0,34-(e.spec?.length??15)))}\u2502${t}`);let o=O(e.phase);if(s.push(`${r}\u2502${t} Phase: ${o}${e.phase}${t}${" ".repeat(Math.max(0,42-e.phase.length))}${r}\u2502${t}`),e.phase==="DISCOVERY"||e.phase==="DISCOVERY_REVIEW")s.push(`${r}\u2502${t} Discovery: ${e.discoveryAnswered}/${e.discoveryTotal} questions answered${" ".repeat(Math.max(0,14))}${r}\u2502${t}`);else if(e.phase==="SPEC_DRAFT")s.push(`${r}\u2502${t} ${f}Awaiting approval${t}${" ".repeat(Math.max(0,33))}${r}\u2502${t}`);else if(e.phase==="EXECUTING"||e.phase==="BLOCKED"){let a=R(e.completedTaskCount,e.totalTasks,12),c=e.totalTasks>0?Math.round(e.completedTaskCount/e.totalTasks*100):0,$=`${a} ${e.completedTaskCount}/${e.totalTasks} tasks (${c}%)`;if(s.push(`${r}\u2502${t} Progress: ${p}${$}${t}${" ".repeat(Math.max(0,40-$.length))}${r}\u2502${t}`),s.push(`${r}\u2502${t} Iteration: ${e.iteration}${" ".repeat(Math.max(0,38-String(e.iteration).length))}${r}\u2502${t}`),e.activeTaskId!==null){let n=`${e.activeTaskId}${e.activeTaskTitle!==null?` (${e.activeTaskTitle})`:""}`.slice(0,36);s.push(`${r}\u2502${t} Active task: ${v}${n}${t}${" ".repeat(Math.max(0,36-n.length))}${r}\u2502${t}`)}if(e.phase==="BLOCKED"){let i=(e.lastProgress??"unknown").replace(/^BLOCKED:\s*/,"");s.push(`${r}\u2502${t} ${w}BLOCKED: ${i.slice(0,40)}${t}${" ".repeat(Math.max(0,40-i.slice(0,40).length))}${r}\u2502${t}`),s.push(`${r}\u2502${t} ${f}Human input needed${t}${" ".repeat(Math.max(0,32))}${r}\u2502${t}`)}}else e.phase==="COMPLETED"&&s.push(`${r}\u2502${t} ${p}Complete!${t} ${e.iteration} iterations, ${e.decisionsCount} decisions${" ".repeat(Math.max(0,17-String(e.iteration).length-String(e.decisionsCount).length))}${r}\u2502${t}`);if(s.push(`${r}\u2502${"".padEnd(52)}\u2502${t}`),s.push(`${r}\u2502${t} Last update: ${P(e.timeSinceUpdate)}${" ".repeat(Math.max(0,36-P(e.timeSinceUpdate).length))}${r}\u2502${t}`),e.lastProgress!==null){let a=e.lastProgress.slice(0,48);s.push(`${r}\u2502${t} ${r}${a}${t}${" ".repeat(Math.max(0,50-a.length))}${r}\u2502${t}`)}if(e.awaitingStatusReport&&s.push(`${r}\u2502${t} ${f}Status report pending${t}${" ".repeat(Math.max(0,29))}${r}\u2502${t}`),e.verificationPassed===!1&&s.push(`${r}\u2502${t} ${w}Verification failed${t}${" ".repeat(Math.max(0,31))}${r}\u2502${t}`),s.push(`${r}\u2502${"".padEnd(52)}\u2502${t}`),e.debt!==null&&e.debt.items.length>0){s.push(`${r}\u2502${t} Debt: ${e.debt.items.length} item(s)${" ".repeat(Math.max(0,34))}${r}\u2502${t}`);for(let a of e.debt.items.slice(0,3)){let c=a.text.slice(0,44);s.push(`${r}\u2502${t} \u2514\u2500 ${c}${" ".repeat(Math.max(0,46-c.length))}${r}\u2502${t}`)}e.debt.items.length>3&&s.push(`${r}\u2502${t} \u2514\u2500 ... and ${e.debt.items.length-3} more${" ".repeat(Math.max(0,32))}${r}\u2502${t}`)}if(e.trackedFiles.length>0||e.modifiedFiles.length>0){let a=e.trackedFiles.length>0?e.trackedFiles:e.modifiedFiles;s.push(`${r}\u2502${t} Files changed: ${a.length}${" ".repeat(Math.max(0,34-String(a.length).length))}${r}\u2502${t}`);for(let c of a.slice(0,5)){let $=c.length>44?"..."+c.slice(-41):c;s.push(`${r}\u2502${t} \u2514\u2500 ${$}${" ".repeat(Math.max(0,46-$.length))}${r}\u2502${t}`)}a.length>5&&s.push(`${r}\u2502${t} \u2514\u2500 ... and ${a.length-5} more${" ".repeat(Math.max(0,32))}${r}\u2502${t}`)}if(s.push(`${r}\u2502${"".padEnd(52)}\u2502${t}`),e.concerns.length>0){let a=e.concerns.join(", ").slice(0,38);s.push(`${r}\u2502${t} Concerns: ${a}${" ".repeat(Math.max(0,40-a.length))}${r}\u2502${t}`)}let h=e.iteration>=e.maxIterations?`${w}RESTART RECOMMENDED${t}`:`${p}ok${t} (${e.iteration}/${e.maxIterations})`;return s.push(`${r}\u2502${t} Context: ${h}${" ".repeat(Math.max(0,41-h.replace(/\x1b\[[0-9;]*m/g,"").length))}${r}\u2502${t}`),s.push(`${r}\u2570${d}\u256F${t}`),s.push(` ${r}watching .eser/.state/ for changes... (ctrl+c to stop)${t}`),s.join(`
|
|
4
|
-
`)},W=e=>JSON.stringify({ts:new Date().toISOString(),phase:e.phase,spec:e.spec,iteration:e.iteration,activeTask:e.activeTaskId,tasks:{completed:e.completedTaskCount,total:e.totalTasks},progress:e.lastProgress,debt:e.debt?.items.length??0,filesChanged:e.trackedFiles.length>0?e.trackedFiles:e.modifiedFiles,timeSinceUpdate:e.timeSinceUpdate,verificationPassed:e.verificationPassed}),V=async e=>{let s=m.process.cwd(),l=C(e);if(!await b(s)){let i=new TextEncoder,n=m.process.stdout.getWriter();return await n.write(i.encode(`noskills not initialized.
|
|
5
|
-
`)),n.releaseLock(),k({exitCode:1})}let d=`${s}/.eser/.state`,o="",h=async()=>{let i=await D(s),n=l==="json"?W(i):l==="markdown"?E(i,"markdown"):A(i);if(l==="json"){let g=new TextEncoder,u=m.process.stdout.getWriter();await u.write(g.encode(n+`
|
|
6
|
-
`)),u.releaseLock()}else if(l==="markdown"){let g=new TextEncoder,u=m.process.stdout.getWriter();await u.write(g.encode(n+`
|
|
7
|
-
---
|
|
8
|
-
`)),u.releaseLock()}else if(n!==o){let g=new TextEncoder,u=m.process.stdout.getWriter();await u.write(g.encode(I+n+`
|
|
9
|
-
`)),u.releaseLock(),o=n}return i.phase==="COMPLETED"};if(await h())return x(void 0);let c=1e3,$=0;for(;;){await new Promise(i=>setTimeout(i,c));try{let n=(await m.fs.stat(`${d}/state.json`)).mtime?.getTime()??0;if(n>$&&($=n,await new Promise(u=>setTimeout(u,100)),await h()))break}catch{}}return x(void 0)};export{D as buildSnapshot,V as main,W as renderJsonLine,A as renderTerminal};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as A,d as C}from"./chunk-OEUVCV5C.js";import{k}from"./chunk-6SSSHLEY.js";import{c as h,e as x,f as g,g as S}from"./chunk-OM5GSS2H.js";import"./chunk-2XNFZXHY.js";import{f as d,h as u,k as w}from"./chunk-MBG7SPPO.js";import{d as m,f as i,g as f}from"./chunk-YVN2NZL4.js";import{a as l,b as a}from"./chunk-FFWPJP7A.js";import{i as p}from"./chunk-6VHZQNHX.js";import"./chunk-6E6JUBFH.js";import"./chunk-BQT5RJZB.js";import"./chunk-5WJ6AUNY.js";var F=async c=>{let e=d({renderer:w.ansi(),sink:u.stdout()}),t=p.process.cwd(),D=g(c),n=(c??[]).filter(o=>!o.startsWith("--spec=")).join(" ");if(n.length===0)return e.writeln(i('A reason is required: noskills wontfix "reason text"')),await e.close(),a({exitCode:1});let s=await x(t,D);if(s.phase==="IDLE"||s.phase==="UNINITIALIZED"||s.phase==="COMPLETED")return e.writeln(i(`Cannot mark as won't fix in phase: ${s.phase}`)),await e.close(),a({exitCode:1});if(s.spec!==null){let o=`${t}/${h.specDir(s.spec)}`;try{await p.fs.stat(o)}catch{return e.writeln(i(`Active spec '${s.spec}' directory not found.`)),e.writeln(m("Run `noskills reset` to return to IDLE.")),await e.close(),a({exitCode:1})}}let r=k(s,"wontfix",n);return await S(t,r),r.spec!==null&&(await A(t,r.spec,"wontfix"),await C(t,r.spec,"wontfix")),e.writeln(f("\u2714"),` Spec marked as won't fix: ${n}`),await e.close(),l(void 0)};export{F as main};
|