noskills 4.5.1 → 4.5.2
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/{ajan-bridge-T5M4DPDT.js → ajan-bridge-BNPC757J.js} +1 -1
- package/chunks/{anthropic-TS7EMQML.js → anthropic-ZKOMTKX2.js} +1 -1
- package/chunks/{approve-HEW3VFYH.js → approve-3TKOHYHH.js} +1 -1
- package/chunks/{ask-AXHTCVD6.js → ask-UB26SBWQ.js} +1 -1
- package/chunks/{block-VN76CXZW.js → block-Q4WAIX7X.js} +1 -1
- package/chunks/{cancel-7WRAST62.js → cancel-DY76ADX4.js} +1 -1
- package/chunks/{chunk-4PF2MT7S.js → chunk-34RPTI4K.js} +7 -7
- package/chunks/chunk-3JTDWOAJ.js +2 -0
- package/chunks/{chunk-GQTHILPL.js → chunk-5FX4EBFY.js} +1 -1
- package/chunks/chunk-5OTECUN7.js +1 -0
- package/chunks/{chunk-6YSS6PEL.js → chunk-7PBHRFOZ.js} +1 -1
- package/chunks/{chunk-7GC46XEU.js → chunk-AB3N327V.js} +1 -1
- package/chunks/{chunk-KMLNG3EC.js → chunk-BYPCI5VU.js} +1 -1
- package/chunks/{chunk-QKWJ72HI.js → chunk-CKIZYL4O.js} +1 -1
- package/chunks/{chunk-S4MUTKHT.js → chunk-DYCGJ4RY.js} +1 -1
- package/chunks/{chunk-UE56BMAW.js → chunk-EVJYA7S3.js} +1 -1
- package/chunks/{chunk-LN4NDYT6.js → chunk-FYFUEK4U.js} +1 -1
- package/chunks/chunk-GNMOE7H3.js +48 -0
- package/chunks/chunk-HB62UGZI.js +2 -0
- package/chunks/{chunk-EIMBEXUJ.js → chunk-IM73MYMS.js} +1 -1
- package/chunks/{chunk-KM64FL2X.js → chunk-J25XTDQQ.js} +1 -1
- package/chunks/{chunk-JL3MAFYQ.js → chunk-LGQEWL5X.js} +1 -1
- package/chunks/{chunk-5DZHAHXW.js → chunk-LKZZ4JN5.js} +1 -1
- package/chunks/{chunk-DBKXMYLF.js → chunk-NPWXEWRN.js} +1 -1
- package/chunks/{chunk-PKEQKXZW.js → chunk-ONJVI5AZ.js} +1 -1
- package/chunks/{chunk-EIGFDYGQ.js → chunk-OP4XAIGW.js} +1 -1
- package/chunks/{chunk-W4TQLLUK.js → chunk-T6NZVA6P.js} +1 -1
- package/chunks/{chunk-5PBNUBBY.js → chunk-TCSIXKUD.js} +1 -1
- package/chunks/{chunk-KRKOWSYW.js → chunk-WDKWHGJU.js} +5 -7
- package/chunks/{chunk-PRQ5CRIG.js → chunk-XDPATEP5.js} +1 -1
- package/chunks/{chunk-CML74SNT.js → chunk-Y45DQJSS.js} +1 -1
- package/chunks/{chunk-RAQY37P6.js → chunk-YUTDPPXX.js} +1 -1
- package/chunks/claude-code-OQJIUKZP.js +1 -0
- package/chunks/{concern-QSENGU6C.js → concern-UIGVWDFS.js} +1 -1
- package/chunks/{config-S3UXTJN2.js → config-72Z4PIJN.js} +1 -1
- package/chunks/{decision-ledger-GY2W6VWL.js → decision-ledger-5IPPTRT7.js} +1 -1
- package/chunks/{delegate-WKXIER7E.js → delegate-OV6NY434.js} +1 -1
- package/chunks/{diagrams-A7W2EBYV.js → diagrams-OX4FBDGP.js} +1 -1
- package/chunks/{done-WR3UFYJT.js → done-V54GSSTY.js} +1 -1
- package/chunks/{followup-5EGZEF5Q.js → followup-NL7EPIGF.js} +1 -1
- package/chunks/{free-KJQHRYZA.js → free-KD344KRL.js} +1 -1
- package/chunks/{gemini-IWP24T63.js → gemini-23EOEXSF.js} +1 -1
- package/chunks/{init-437SU6XH.js → init-WDRNFT57.js} +1 -1
- package/chunks/{invoke-hook-LMCWNF65.js → invoke-hook-I3NTD36Q.js} +1 -1
- package/chunks/kiro-TPAAIMY6.js +1 -0
- package/chunks/{learn-ZTYKBZER.js → learn-WBWNJEB2.js} +1 -1
- package/chunks/{ledger-FOOPJ2UO.js → ledger-QYK252DV.js} +1 -1
- package/chunks/{list-HNGIOVBK.js → list-WO6RS7JX.js} +1 -1
- package/chunks/{manager-2MOLEJ4Q.js → manager-ZSPRC5R4.js} +1 -1
- package/chunks/{mod-AJIRKRAH.js → mod-B6LBGYON.js} +1 -1
- package/chunks/{mod-6EZYRKWV.js → mod-MMHDQRNF.js} +1 -1
- package/chunks/{mod-7X5TKHKC.js → mod-RBGAMGZA.js} +1 -1
- package/chunks/{mod-TGOMO3CJ.js → mod-SV4VELMH.js} +1 -1
- package/chunks/{next-Y6FOPM4Z.js → next-QXCLZ7P3.js} +1 -1
- package/chunks/node-2XIHQ2M4.js +1 -0
- package/chunks/node-BXYZKSJY.js +15 -0
- package/chunks/node-DMUOWFGA.js +69 -0
- package/chunks/ollama-MXRDGQDF.js +1 -0
- package/chunks/openai-LE47IWMQ.js +30 -0
- package/chunks/{openai-YES2XJDU.js → openai-MSJF4B6H.js} +1 -1
- package/chunks/opencode-ZDHKR2P6.js +1 -0
- package/chunks/{pack-KUT53Z24.js → pack-NS64WU6M.js} +1 -1
- package/chunks/{plan-export-PG2BVRQZ.js → plan-export-HECAF7D4.js} +1 -1
- package/chunks/{purge-JGNJNEET.js → purge-PSQNN42H.js} +1 -1
- package/chunks/{reopen-RPDXN3CF.js → reopen-L37M5XUI.js} +1 -1
- package/chunks/{reset-RBCQO2RF.js → reset-OOTZXW6Q.js} +1 -1
- package/chunks/{review-VMS5MYOV.js → review-QLD6WSOB.js} +1 -1
- package/chunks/{rule-IB4VKSBC.js → rule-OOANQBHB.js} +1 -1
- package/chunks/{run-62PWXVII.js → run-YHCIRY7Z.js} +1 -1
- package/chunks/{sdk-FR7Z4YSC.js → sdk-OQIHH3OY.js} +1 -1
- package/chunks/{session-Q43KMFL2.js → session-OWWDH7KA.js} +1 -1
- package/chunks/{spec-4RKLPOEM.js → spec-O7F525UN.js} +1 -1
- package/chunks/{status-OGLFEFF7.js → status-SZZXY7V3.js} +1 -1
- package/chunks/{sync-H35O5DN5.js → sync-3RYRGTEA.js} +1 -1
- package/chunks/{validate-JX7UTAK5.js → validate-UZD6JBSG.js} +1 -1
- package/chunks/{vertexai-WF5CKMYI.js → vertexai-CVCRCO24.js} +1 -1
- package/chunks/{watch-SOZDHLSC.js → watch-5DNM646U.js} +1 -1
- package/chunks/{web-3VGRM3W4.js → web-662LNB3K.js} +1 -1
- package/chunks/{wontfix-RBOGLLWJ.js → wontfix-UDCTLHNB.js} +1 -1
- package/noskills.js +1 -1
- package/package.json +1 -1
- package/chunks/chunk-3ZJ3UGQL.js +0 -48
- package/chunks/chunk-575Y3OEG.js +0 -1
- package/chunks/chunk-IGDFEGCH.js +0 -2
- package/chunks/claude-code-DIWRQKZA.js +0 -1
- package/chunks/kiro-THWCXS5L.js +0 -1
- package/chunks/node-AZK2C657.js +0 -12
- package/chunks/node-GQQ42DT2.js +0 -68
- package/chunks/ollama-2KAMCXVL.js +0 -1
- package/chunks/openai-HHE35TAX.js +0 -31
- package/chunks/opencode-S4M7WJTO.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"./chunk-
|
|
1
|
+
import{a,b}from"./chunk-DYCGJ4RY.js";import"./chunk-JYVB6UAV.js";import"./chunk-OAWYVETM.js";import"./chunk-HISXAZ4Y.js";export{a as OpenAIModel,b as openaiFactory};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b}from"./chunk-LGQEWL5X.js";import"./chunk-Y45DQJSS.js";import"./chunk-JYVB6UAV.js";import"./chunk-HB62UGZI.js";import"./chunk-ENP4P2YH.js";import"./chunk-3JTDWOAJ.js";import"./chunk-34RPTI4K.js";import"./chunk-OAWYVETM.js";import"./chunk-Y5E7ZCCX.js";import"./chunk-LJEWPIEI.js";import"./chunk-FE4MKOI4.js";import"./chunk-HISXAZ4Y.js";export{a as OpenCodeModel,b as openCodeFactory};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{c as h,d as f,f as w,g as F,o as P,q as S,r as v}from"./chunk-VXU6XZ66.js";import{f as E}from"./chunk-LKZZ4JN5.js";import{b as C}from"./chunk-IFE5SYGK.js";import{E as R,f as y,o as T}from"./chunk-WDKWHGJU.js";import{a as $,b as g}from"./chunk-OAWYVETM.js";import{i as m}from"./chunk-Y5E7ZCCX.js";import"./chunk-LJEWPIEI.js";import"./chunk-FE4MKOI4.js";import"./chunk-HISXAZ4Y.js";var U=r=>{let e=r;if(typeof e?.name!="string"||e.name.length===0)throw new Error("Pack manifest must have a non-empty 'name' field");if(typeof e?.version!="string"||e.version.length===0)throw new Error("Pack manifest must have a non-empty 'version' field");if(typeof e?.description!="string"||e.description.length===0)throw new Error("Pack manifest must have a non-empty 'description' field");return e},B=()=>({installed:[]});var L={name:"typescript",version:"1.0.0",description:"TypeScript best practices",tags:["typescript","types"],rules:["rules/use-strict-types.md","rules/no-any.md","rules/prefer-const.md"],concerns:["concerns/ts-quality.json"]};var _={id:"ts-quality",name:"TypeScript Quality",description:"Enforces TypeScript best practices",extras:[{questionId:"verification",text:"Does the code pass strict TypeScript checks (noEmit, strict mode)?"}],specSections:[],reminders:["Run tsc --noEmit before reporting task complete"],acceptanceCriteria:["TypeScript strict mode passes with zero errors"]};var J={name:"react",version:"1.0.0",description:"React component conventions",tags:["react","frontend"],rules:["rules/component-structure.md","rules/prefer-function-components.md","rules/state-management.md"]};var z={name:"security",version:"1.0.0",description:"Security audit rules",tags:["security","audit"],rules:["rules/no-secrets-in-code.md","rules/validate-input.md","rules/no-eval.md"],concerns:["concerns/security-audit.json"]};var H={id:"security-audit",name:"Security Audit",description:"Security-focused review for every spec",extras:[{questionId:"verification",text:"Has the change been reviewed for injection, XSS, CSRF, and auth bypass?"},{questionId:"scope_boundary",text:"What security boundaries must NOT be crossed?"}],specSections:[{id:"security-review",title:"Security Review",placeholder:"_Summarize the security review: injection (SQL/XSS/command), auth bypass, CSRF, hardcoded secrets, missing input validation. File:line reference for each finding. CRITICAL findings block merge._",condition:null,position:"after:scope-boundary"}],conductRules:{DISCOVERY:["For any auth or session question, ask about token storage, expiry, rotation, and revocation \u2014 all four.","For any input that crosses a trust boundary, ask about validation and sanitization strategy.","Surface threat-model implications proactively \u2014 do not wait for the user to ask."]},reminders:["Check for hardcoded secrets, unsanitized input, and missing auth checks"],acceptanceCriteria:["No hardcoded secrets","All user input validated","Auth checks present on protected routes"]};var ne={"use-strict-types":"Prefer explicit types over inference for function params and returns","no-any":"Never use 'any'. Use 'unknown' when type is genuinely unknown.","prefer-const":"Use const by default, let only when reassignment is needed"},te={"component-structure":"One component per file. Name file same as component.","prefer-function-components":"Use function components with hooks. No class components.","state-management":"Keep state as close to where it's used as possible."},se={"no-secrets-in-code":"Never hardcode API keys, passwords, or tokens","validate-input":"Validate and sanitize all user input at API boundaries","no-eval":"Never use eval(), new Function(), or equivalent dynamic code execution"},re={manifest:L,ruleContents:ne,concernContents:[_]},ie={manifest:J,ruleContents:te,concernContents:[]},ae={manifest:z,ruleContents:se,concernContents:[H]},x=new Map([["typescript",re],["react",ie],["security",ae]]);var K=".eser/packs.json",N=3e4,je=async r=>{let e=r?.[0];if(e==="list")return await ce();if(e==="install")return await le(r?.slice(1));if(e==="uninstall")return await de(r?.slice(1));if(e==="inspect")return await ue(r?.slice(1));if(e==="search")return await pe(r?.slice(1));let n=C(),i=P({renderer:v.ansi(),sink:S.stdout()});return i.writeln(`Usage: ${n} pack <list | install <name> | uninstall <name> | inspect <name> | search <query>>`),await i.close(),$(void 0)},M=async r=>{let e=`${r}/${K}`;try{let n=await m.fs.readTextFile(e);return JSON.parse(n)}catch{return B()}},D=async(r,e)=>{let n=`${r}/${K}`;await m.fs.mkdir(`${r}/.eser`,{recursive:!0}),await m.fs.writeTextFile(n,JSON.stringify(e,null,2)+`
|
|
2
2
|
`)},b=r=>x.get(r),O=r=>{let e=r.replace(/^github:/,"").replace(/^gh:/,""),n=e.indexOf("#");if(n===-1)return null;let i=e.slice(0,n),t=e.slice(n+1),l=i.indexOf("/");if(l===-1)return null;let u=i.slice(0,l),c=i.slice(l+1);return u.length===0||c.length===0||t.length===0?null:{owner:u,repo:c,ref:"main",packPath:t}},Q=async r=>{let e=O(r);if(e===null)throw new Error(`Invalid pack specifier: ${r}. Expected format: github:owner/repo#pack-name`);let n=`https://raw.githubusercontent.com/${e.owner}/${e.repo}/${e.ref}/packs/${e.packPath}/pack.json`,i=await globalThis.fetch(n,{signal:AbortSignal.timeout(N)});if(!i.ok)throw new Error(`Could not fetch pack from ${r}. HTTP ${i.status}`);let t=JSON.parse(await i.text());return U(t)},j=async(r,e)=>{let n=O(r);if(n===null)throw new Error(`Invalid pack specifier: ${r}`);let i=`https://raw.githubusercontent.com/${n.owner}/${n.repo}/${n.ref}/packs/${n.packPath}/${e}`,t=await globalThis.fetch(i,{signal:AbortSignal.timeout(N)});if(!t.ok)throw new Error(`Could not fetch ${e} from ${r}. HTTP ${t.status}`);return await t.text()},W=async r=>{let e=`${r}/${y.concernsDir}`,n=0;try{for await(let i of m.fs.readDir(e))if(i.isFile&&i.name.endsWith(".json")){let t=i.name.match(/^(\d+)-/);if(t!==null){let l=parseInt(t[1],10);l>n&&(n=l)}}}catch{}return n+1},A=async(r,e,n)=>{let i=[],t=[],l=[],u=`${r}/${y.rulesDir}`;await m.fs.mkdir(u,{recursive:!0});for(let[p,o]of Object.entries(n.ruleContents)){let a=`pack-${e}-${p}.md`;await m.fs.writeTextFile(`${u}/${a}`,o+`
|
|
3
3
|
`),i.push(a)}if(n.concernContents.length>0){let p=`${r}/${y.concernsDir}`;await m.fs.mkdir(p,{recursive:!0});let o=await W(r);for(let a of n.concernContents){let d=`${String(o).padStart(3,"0")}-${a.id}.json`;await m.fs.writeTextFile(`${p}/${d}`,JSON.stringify(a,null,2)+`
|
|
4
4
|
`),t.push(d),o++}}if(n.folderRuleContents!==void 0)for(let[p,o]of Object.entries(n.folderRuleContents)){let a=`${r}/${p}/.folder-rules.md`;await m.fs.mkdir(`${r}/${p}`,{recursive:!0}),await m.fs.writeTextFile(a,o+`
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as P}from"./chunk-EROZRDGT.js";import{E as w,h as m,j as S}from"./chunk-
|
|
1
|
+
import{a as P}from"./chunk-EROZRDGT.js";import{E as w,h as m,j as S}from"./chunk-WDKWHGJU.js";import{a as h,b as n}from"./chunk-OAWYVETM.js";import{i as u}from"./chunk-Y5E7ZCCX.js";import"./chunk-LJEWPIEI.js";import"./chunk-FE4MKOI4.js";import"./chunk-HISXAZ4Y.js";var E=new Set(["SPEC_PROPOSAL","SPEC_APPROVED","EXECUTING"]),O=async g=>{let{root:o}=await w(),a=S(g);if(!a.ok)return console.error(a.error),n({exitCode:1});let i=a.spec,t;try{t=await m(o,i)}catch(s){return console.error(s instanceof Error?s.message:String(s)),n({exitCode:1})}if(!E.has(t.phase))return console.error(`Spec must be in SPEC_PROPOSAL, SPEC_APPROVED, or EXECUTING to export a plan (current: ${t.phase}).`),n({exitCode:1});let c=await P(o,i),y=new Set(t.execution.completedTasks),e=[];if(e.push(`# Plan: ${i}`),e.push(`Generated by noskills ${new Date().toISOString()} from spec/${i}`),e.push(""),e.push("## Summary"),e.push(t.specDescription?.trim()??"(not yet defined)"),e.push(""),e.push("## Tasks"),c!==null&&c.tasks.length>0)for(let s of c.tasks){let r=y.has(s.id)?"x":" ";e.push(`- [${r}] ${s.title}`)}else e.push("(not yet defined)");e.push(""),e.push("## Acceptance Criteria");let f=t.customACs??[];if(f.length>0)for(let s of f)e.push(`- ${s.text}`);else e.push("(not yet defined)");e.push(""),e.push("## Out of Scope");let p=t.discovery.answers.find(s=>s.questionId==="scope_boundary");if(p!==void 0&&p.answer.trim().length>0){let s=p.answer.split(`
|
|
2
2
|
`).map(r=>r.trim()).filter(r=>r.length>0);for(let r of s)e.push(`- ${r}`)}else e.push("(not yet defined)");e.push(""),e.push("## Verification");let l=t.discovery.answers.find(s=>s.questionId==="verification");l!==void 0&&l.answer.trim().length>0?e.push(l.answer.trim()):e.push("(not yet defined)"),e.push("");let C=e.join(`
|
|
3
3
|
`),d=`${o}/.claude/plan.md`;try{await u.fs.mkdir(`${o}/.claude`,{recursive:!0}),await u.fs.writeTextFile(d,C),console.log(`Written: ${d}`)}catch(s){return console.error(`Failed to write plan.md: ${s instanceof Error?s.message:String(s)}`),n({exitCode:1})}return h(void 0)};export{O as main};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as k,b as C,f as v,n as o}from"./chunk-AUZWXMWA.js";import{a as D,b as P}from"./chunk-KJLEPI7T.js";import"./chunk-Z7OYXH3J.js";import
|
|
1
|
+
import{a as k,b as C,f as v,n as o}from"./chunk-AUZWXMWA.js";import"./chunk-VXU6XZ66.js";import{a as D,b as P}from"./chunk-KJLEPI7T.js";import"./chunk-Z7OYXH3J.js";import{e as E,f as l,n as R,s as x}from"./chunk-WDKWHGJU.js";import"./chunk-ENP4P2YH.js";import"./chunk-3JTDWOAJ.js";import"./chunk-34RPTI4K.js";import{a as g,b as $}from"./chunk-OAWYVETM.js";import{i as a}from"./chunk-Y5E7ZCCX.js";import"./chunk-LJEWPIEI.js";import"./chunk-FE4MKOI4.js";import{e as j}from"./chunk-HISXAZ4Y.js";var S=j(E(),1);var Y=async e=>{let t=a.process.cwd(),n=D(e),s=C({target:n==="agent"?"non-interactive":"interactive"}),u=P(e).includes("--force");if(!u&&n==="agent")return o.error(s,"Purge requires `--force` flag in agent mode."),$({exitCode:1});if(u)return o.step(s,"Purging noskills content..."),await q(t,s),o.success(s,"Purge complete."),g(void 0);let d=(await N(t)).filter(i=>i.exists);if(d.length===0)return o.info(s,"Nothing to remove."),g(void 0);let p=[];for(let i of d){let y=await v(s,{message:i.message});if(k(y))return o.info(s,"Aborted."),g(void 0);p.push({id:i.id,confirmed:y===!0})}let f=p.filter(i=>i.confirmed),I=p.filter(i=>!i.confirmed);if(f.length===0)return o.info(s,"Nothing selected for removal."),g(void 0);let T=new Set(f.map(i=>i.id)),w=[];for(let i of f)await H(t,i.id)?o.step(s,` Removed ${h(i.id)}`):(w.push(i.id),o.step(s,` Failed to remove ${h(i.id)}`));for(let i of I)o.step(s,` Kept ${h(i.id)}`);T.size>0&&await b(t);let M=f.length-w.length;return o.success(s,`Purge complete (${M} of ${d.length} categories removed).`),g(void 0)},N=async e=>{let[t,n,s,r]=await Promise.all([O(e),L(e),J(e),U(e)]);return[t,n,s,r]},O=async e=>{let t=await x(e),n=t.map(s=>s.id).join(", ");return{id:"concerns",exists:t.length>0,message:`Remove concerns? (${n})`}},L=async e=>{let t=await R(e),n=0;try{for await(let c of a.fs.readDir(`${e}/${l.specsDir}`))c.isDirectory&&n++}catch{}let s=Math.max(t.length,n);if(s===0)return{id:"specs",exists:!1,message:""};let r=t.map(c=>`${c.name} ${c.state.phase}`).join(", ");return{id:"specs",exists:!0,message:t.length>0?`Remove specs? (${s} specs: ${r})`:`Remove specs? (${s} spec directories)`}},J=async e=>{let t=0;try{for await(let n of a.fs.readDir(`${e}/${l.rulesDir}`))n.isFile&&t++}catch{}return{id:"rules",exists:t>0,message:`Remove rules? (${t} active rules)`}},U=async e=>{let t=!1,n=!1,s=!1;try{let c=await a.fs.readTextFile(`${e}/.claude/settings.json`);t=JSON.parse(c).hooks!==void 0}catch{}try{n=(await a.fs.readTextFile(`${e}/CLAUDE.md`)).includes("<!-- noskills:start -->")}catch{}let r=[`${e}/.claude/agents/noskills-executor.md`,`${e}/.claude/agents/noskills-verifier.md`];for(let c of r)try{await a.fs.stat(c),s=!0;break}catch{}return{id:"agent-integration",exists:t||n||s,message:"Remove agent integration? (.claude/settings.json, CLAUDE.md, .claude/agents/noskills-*.md)"}},h=e=>({concerns:"concerns",specs:"specs",rules:"rules","agent-integration":"agent integration"})[e],H=(e,t)=>{switch(t){case"concerns":return m(`${e}/${l.concernsDir}`);case"specs":return z([`${e}/${l.specsDir}`,`${e}/${l.progressesDir}`]);case"rules":return m(`${e}/${l.rulesDir}`);case"agent-integration":return A(e)}},q=async(e,t)=>{await m(`${e}/${l.concernsDir}`)&&o.step(t," Removed `.eser/concerns/`"),await m(`${e}/${l.specsDir}`)&&o.step(t," Removed `.eser/specs/`"),await m(`${e}/${l.rulesDir}`)&&o.step(t," Removed `.eser/rules/`"),await m(`${e}/${l.progressesDir}`)&&o.step(t," Removed `.eser/.state/progresses/`"),await b(e)&&o.step(t," Removed noskills section from `manifest.yml`"),await A(e)&&o.step(t," Removed agent integration")},m=async e=>{try{await a.fs.stat(e);let{rmSync:t}=await import("node:fs");return t(e,{recursive:!0,force:!0}),!0}catch{return!1}},z=async e=>{let t=!1;for(let n of e)await m(n)&&(t=!0);return t},F=async e=>{try{await a.fs.stat(e);let{unlinkSync:t}=await import("node:fs");return t(e),!0}catch{return!1}},b=async e=>{let t=`${e}/${l.manifestFile}`;try{let n=await a.fs.readTextFile(t),s=S.parseDocument(n);return s.has("noskills")?(s.delete("noskills"),await a.fs.writeTextFile(t,s.toString()),!0):!1}catch{return!1}},B=async e=>{let t=`${e}/CLAUDE.md`,n="<!-- noskills:start -->",s="<!-- noskills:end -->";try{let r=await a.fs.readTextFile(t),u=r.indexOf(n),c=r.indexOf(s);return u!==-1&&c!==-1?(r=r.slice(0,u).trimEnd()+`
|
|
2
2
|
`+r.slice(c+s.length).trimStart(),await a.fs.writeTextFile(t,r.trimEnd()+`
|
|
3
3
|
`),!0):!1}catch{return!1}},K=async e=>{let t=`${e}/.claude/settings.json`;try{let n=await a.fs.readTextFile(t),s=JSON.parse(n);return s.hooks!==void 0?(delete s.hooks,await a.fs.writeTextFile(t,JSON.stringify(s,null,2)+`
|
|
4
4
|
`),!0):!1}catch{return!1}},A=async e=>{let t=!1;await K(e)&&(t=!0),await B(e)&&(t=!0);let n=[`${e}/.claude/agents/noskills-executor.md`,`${e}/.claude/agents/noskills-verifier.md`];for(let r of n)await F(r)&&(t=!0);let s=[`${e}/.cursorrules`,`${e}/.windsurfrules`,`${e}/.kiro/steering/conventions.md`,`${e}/.github/copilot-instructions.md`];for(let r of s)await F(r)&&(t=!0);return t};export{Y as main};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as C}from"./chunk-5RLCKUIF.js";import{r as g,y}from"./chunk-
|
|
1
|
+
import{d as c,f as t,g as l,o as m,q as d,r as u}from"./chunk-VXU6XZ66.js";import{h as C}from"./chunk-5RLCKUIF.js";import{r as g,y}from"./chunk-EVJYA7S3.js";import"./chunk-XDRX4ZBJ.js";import"./chunk-IFE5SYGK.js";import"./chunk-VJRCTYGL.js";import"./chunk-O4KKKYCH.js";import"./chunk-ONJVI5AZ.js";import{E as S,h as w,j as f,u as h}from"./chunk-WDKWHGJU.js";import{a as p,b as r}from"./chunk-OAWYVETM.js";import"./chunk-Y5E7ZCCX.js";import"./chunk-LJEWPIEI.js";import"./chunk-FE4MKOI4.js";import"./chunk-HISXAZ4Y.js";var A=async E=>{let e=m({renderer:u.ansi(),sink:d.stdout()}),{root:n}=await S(),a=f(E);if(!a.ok)return e.writeln(t(a.error)),await e.close(),r({exitCode:1});let s;try{s=await w(n,a.spec)}catch(o){let v=o instanceof Error?o.message:String(o);return e.writeln(t(v)),await e.close(),r({exitCode:1})}if(s.phase!=="COMPLETED")return e.writeln(t(`Cannot reopen in phase: ${s.phase}`)),e.writeln(c("Only COMPLETED specs can be reopened.")),await e.close(),r({exitCode:1});let k=await C(n),i=g(s);return i=y(i,"COMPLETED","DISCOVERY",k,"reopened"),await h(n,i),e.writeln(l("\u2714")," Spec reopened. Discovery answers preserved \u2014 run `noskills next` to revise."),await e.close(),p(void 0)};export{A as main};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{d as a,f as n,g as d,o as u,q as w,r as f}from"./chunk-VXU6XZ66.js";import{K as v}from"./chunk-EVJYA7S3.js";import"./chunk-XDRX4ZBJ.js";import"./chunk-IFE5SYGK.js";import"./chunk-VJRCTYGL.js";import"./chunk-O4KKKYCH.js";import"./chunk-ONJVI5AZ.js";import{E as I,f as h,h as g,j as y,k as S,m as k}from"./chunk-WDKWHGJU.js";import{a as c,b as l}from"./chunk-OAWYVETM.js";import{i as m}from"./chunk-Y5E7ZCCX.js";import"./chunk-LJEWPIEI.js";import"./chunk-FE4MKOI4.js";import"./chunk-HISXAZ4Y.js";var F=async A=>{let e=u({renderer:f.ansi(),sink:w.stdout()}),{root:i}=await I(),o=y(A);if(!o.ok)return e.writeln(n(o.error)),await e.close(),l({exitCode:1});let s;try{s=await g(i,o.spec)}catch(r){let R=r instanceof Error?r.message:String(r);return e.writeln(n(R)),await e.close(),l({exitCode:1})}if(s.phase==="IDLE"||s.phase==="UNINITIALIZED")return e.writeln(a("Already idle. Nothing to reset.")),await e.close(),c(void 0);if(s.spec!==null){let r=`${i}/${h.specDir(s.spec)}`;try{await m.fs.stat(r)}catch{e.writeln(n(`Active spec '${s.spec}' directory not found.`)),e.writeln(a("Resetting to idle anyway."))}}let t=s.spec,p=v(s);return await S(i,p),t!==null&&await k(i,t,p),e.writeln(d("\u2714")," Reset to idle."),t!==null&&e.writeln(a(`Spec "${t}" state cleared. Files in .eser/specs/${t}/ preserved.`)),await e.close(),c(void 0)};export{F as main};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as M}from"./chunk-
|
|
1
|
+
import{a as M}from"./chunk-NPWXEWRN.js";import{c as q,d as c,f as d,g as p,h as v,o as I,q as S,r as $}from"./chunk-VXU6XZ66.js";import{h as P}from"./chunk-5RLCKUIF.js";import{I as D}from"./chunk-EVJYA7S3.js";import"./chunk-XDRX4ZBJ.js";import"./chunk-IFE5SYGK.js";import{b as x}from"./chunk-VJRCTYGL.js";import"./chunk-O4KKKYCH.js";import"./chunk-ONJVI5AZ.js";import{E as T,h as E,j as k,m as b,o as A,s as C}from"./chunk-WDKWHGJU.js";import{a as w,b as g}from"./chunk-OAWYVETM.js";import"./chunk-Y5E7ZCCX.js";import"./chunk-LJEWPIEI.js";import"./chunk-FE4MKOI4.js";import"./chunk-HISXAZ4Y.js";var J=async f=>{let t=I({renderer:$.ansi(),sink:S.stdout()}),{root:r}=await T(),i=k(f);if(!i.ok)return t.writeln(d(i.error)),await t.close(),g({exitCode:1});let u;try{u=await E(r,i.spec)}catch(e){let s=e instanceof Error?e.message:String(e);return t.writeln(d(s)),await t.close(),g({exitCode:1})}let o=await P(r),h=u.discovery.delegations??[],n=h.filter(e=>e.delegatedTo===o.name&&e.status==="pending"),l=h.filter(e=>e.delegatedTo===o.name&&e.status==="answered");if(n.length===0&&l.length===0)return t.writeln(c("No delegations for you on this spec.")),await t.close(),w(void 0);let N=await C(r),R=await A(r),W=N.filter(e=>R?.concerns.includes(e.id)??!1),F=x(W),y=new Map(F.map(e=>[e.id,e.text]));if(t.writeln(q(`Spec: ${i.spec}`)),t.writeln(""),n.length>0){t.writeln(v(`You have ${n.length} pending delegation(s):`)),t.writeln("");for(let e=0;e<n.length;e++){let s=n[e],Q=y.get(s.questionId)??s.questionId;t.writeln(` ${e+1}. `,d("[PENDING]"),` ${Q}`),t.writeln(c(` Delegated by: ${s.delegatedBy} (${s.delegatedAt.slice(0,10)})`))}}if(l.length>0){t.writeln(""),t.writeln(p(`${l.length} answered delegation(s):`));for(let e of l){let s=y.get(e.questionId)??e.questionId;t.writeln(" ",p("\u2714"),` ${s}`),t.writeln(c(` Answer: ${e.answer?.slice(0,80)??""}`))}}let m=null,a=null;for(let e of f??[])e.startsWith("--answer=")&&(m=e.slice(9)),e.startsWith("--question=")&&(a=parseInt(e.slice(11),10)-1);if(m!==null&&a!==null&&a>=0&&a<n.length){let e=n[a],s=D(u,e.questionId,m,o.name);await b(r,i.spec,s),await M(r,{ts:new Date().toISOString(),type:"delegation-answered",spec:i.spec,user:o.name,question:e.questionId}),t.writeln(""),t.writeln(p("\u2714"),` Answered: ${e.questionId}`)}return await t.close(),w(void 0)};export{J as main};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{c as y,d as a,f as k,g as v,o as p,q as d,r as u}from"./chunk-VXU6XZ66.js";import{a as A,f as C}from"./chunk-LKZZ4JN5.js";import{b as T,c as P}from"./chunk-IFE5SYGK.js";import{E as x,f as j,o as R}from"./chunk-WDKWHGJU.js";import{a as h,b as w}from"./chunk-OAWYVETM.js";import{i as $}from"./chunk-Y5E7ZCCX.js";import"./chunk-LJEWPIEI.js";import"./chunk-FE4MKOI4.js";import"./chunk-HISXAZ4Y.js";var B=async e=>{let s=e?.[0];if(s==="add")return await b(e?.slice(1));if(s==="list")return await W();if(s==="promote")return await U(e?.slice(1));let i=T(),t=p({renderer:u.ansi(),sink:d.stdout()});return t.writeln(`Usage: ${i} rule <add "rule text" | list | promote "decision">`),await t.close(),h(void 0)},b=async e=>{let s=p({renderer:u.ansi(),sink:d.stdout()}),{root:i}=await x(),t=[],r=[],n=[];if(e!==void 0)for(let o of e)o.startsWith("--phases=")?t=o.slice(9).split(",").map(g=>g.trim()):o.startsWith("--applies-to=")?r=o.slice(13).split(",").map(g=>g.trim().replace(/^["']|["']$/g,"")):o.startsWith("-")||n.push(o);let c=n.join(" "),m=await R(i);if(c.length===0)return s.writeln(k("Please provide a rule: "),y(`${P('rule add "Use Deno Tests for all tests"')}`)),await s.close(),w({exitCode:1});let D=c.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"").slice(0,50),l="";(t.length>0||r.length>0)&&(l+=`---
|
|
2
2
|
`,t.length>0&&(l+=`phases: [${t.join(", ")}]
|
|
3
3
|
`),r.length>0&&(l+=`applies_to: [${r.map(o=>`"${o}"`).join(", ")}]
|
|
4
4
|
`),l+=`---
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{b as Z,c as P}from"./chunk-
|
|
1
|
+
import{b as Z,c as P}from"./chunk-T6NZVA6P.js";import{a as G,b as L,g as U}from"./chunk-AUZWXMWA.js";import{c as T,d as o,f as l,g as O,h as x,k as A,o as F,q as M,r as N}from"./chunk-VXU6XZ66.js";import{b as Q,e as Y}from"./chunk-LKZZ4JN5.js";import{N as J,a as H,n as q}from"./chunk-EVJYA7S3.js";import"./chunk-XDRX4ZBJ.js";import{b as S,c as K}from"./chunk-IFE5SYGK.js";import"./chunk-VJRCTYGL.js";import"./chunk-O4KKKYCH.js";import"./chunk-ONJVI5AZ.js";import{D as j,E as z,f as V,g as C,h as _,i as B,k as v,o as W,s as X}from"./chunk-WDKWHGJU.js";import"./chunk-ENP4P2YH.js";import"./chunk-3JTDWOAJ.js";import"./chunk-34RPTI4K.js";import{a as I,b as h,c as D}from"./chunk-OAWYVETM.js";import"./chunk-Y5E7ZCCX.js";import"./chunk-LJEWPIEI.js";import"./chunk-FE4MKOI4.js";import"./chunk-HISXAZ4Y.js";var oe="claude-sonnet-5",be=async t=>{let e=F({renderer:N.ansi(),sink:M.stdout()}),{root:n}=await z(),i=t?.includes("--unattended")??!1,a=ee(t,"--max-turns")??10,u=ee(t,"--max-iterations")??50;if(!await j(n))return e.writeln(l(`noskills not initialized. Run: ${K("init")}`)),await e.close(),h({exitCode:1});let E=B(t),p=await _(n,E);if(p.phase!=="EXECUTING"&&p.phase!=="SPEC_APPROVED")return e.writeln(l(`Cannot run from phase: ${p.phase}`)),e.writeln(o("Must be in SPEC_APPROVED or EXECUTING to start.")),await e.close(),h({exitCode:1});if(p.phase==="SPEC_APPROVED"){e.writeln(o("Starting execution from approved spec..."));let s=q(p);await v(n,s)}let f=await W(n);if(f===null)return e.writeln(l("Config not found.")),await e.close(),h({exitCode:1});e.writeln(T(`${S()} run`)),e.writeln(o(`Mode: ${i?"unattended":"interactive"}, max-turns: ${a}, max-iterations: ${u}`)),e.writeln("");let w=0,c=0;await P(n,"acp");try{for(;w<u;){w++;let s=await C(n);if(s.phase==="COMPLETED"){e.writeln(""),e.writeln(O("\u2714")," Spec completed!"),e.writeln(` Iterations: ${s.execution.iteration}`),e.writeln(` Decisions: ${s.decisions.length}`);break}if(s.phase==="BLOCKED"){let r=s.execution.lastProgress??"Unknown";if(e.writeln(""),e.writeln(x("\u26A0")," Execution blocked: ",o(r)),i){await ce(n,r,w),e.writeln(o("Logged to .eser/.state/progresses/blocked.log. Resolve and re-run.")),c=1;break}let m=L(),d=await U(m,{message:"Enter resolution (or leave empty to stop):"});if(G(d)||d===""){e.writeln(o("Stopped by user."));break}let g=H(s,"EXECUTING");await v(n,{...g,execution:{...g.execution,lastProgress:`Resolved: ${d}`}});continue}if(s.phase!=="EXECUTING"){e.writeln(l(`Unexpected phase: ${s.phase}. Stopping.`)),c=1;break}let te=(await X(n)).filter(r=>f.concerns.includes(r.id)),ne=await Q(n),ie=Y(f.tools),se=await J(s,te,ne,f,void 0,void 0,void 0,ie),re=le(se);e.writeln(A(`\u2500\u2500 Iteration ${w}`),o(` (execution: ${s.execution.iteration}, debt: ${s.execution.debt?.items.length??0})`)),s.execution.lastProgress!==null&&e.writeln(o(` Last: ${s.execution.lastProgress}`)),s.execution.lastVerification?.passed===!1&&e.writeln(l(" Verification failed \u2014 agent will fix")),s.execution.debt!==null&&e.writeln(x(` Debt: ${s.execution.debt.items.length} items`)),e.writeln(o(" Spawning agent..."));let $;try{let[r,m]=await Promise.all([import("./mod-SV4VELMH.js"),import("./mod-MMHDQRNF.js")]),d=await m.factoryFor("claude-code");if(d===void 0)throw new Error("no claude-code provider available");let g=new r.Registry({factories:[d]});await g.addModel("default",{provider:"claude-code",model:oe,properties:{maxTurns:a,cwd:n}});let y=g.getDefault();if(y===null)throw new Error("failed to initialise the claude-code model");let k=await y.generateText({messages:[r.textMessage("user",re)]});if(await y.close(),D(k)){let ae=k.error;e.writeln(l(` Agent turn failed: ${ae.message??"unknown error"}`)),c=1;break}$=k.value.stopReason}catch(r){let m=r instanceof Error?r.message:String(r);e.writeln(l(` Failed to run the agent: ${m}`),o(" Is the claude CLI installed?")),c=1;break}let b=await Z(n);if(b===null){e.writeln(l(" Could not record the iteration (state unreadable).")),c=1;break}e.writeln(o(` Agent finished (${$}). Iteration ${b.iteration}: ${b.gitStat||"no file changes"}`)),$!=="end_turn"&&e.writeln(x(` Turn ended early: ${$}`));let R=await C(n);if(f.autoCommit===!0&&f.allowGit!==!1)try{let r=await import("./mod-RBGAMGZA.js");if((await r.exec`git diff --name-only`.noThrow().text()).trim().length>0){await r.exec`git add -A`.noThrow().text();let d=`noskills: iteration ${R.execution.iteration} \u2014 ${R.execution.lastProgress??"progress"}`;await r.exec`git commit -m ${d}`.noThrow().text(),e.writeln(o(" Auto-committed."))}}catch{e.writeln(o(" Auto-commit failed (non-fatal)."))}}}finally{await P(n,null)}return w>=u&&(e.writeln(""),e.writeln(x("\u26A0"),` Max iterations (${u}) reached. Stopping.`),c=2),await e.close(),c!==0?h({exitCode:c}):I(void 0)},le=t=>{let e=[];if(e.push(t.meta.resumeHint),e.push(""),t.meta.spec!==null&&(e.push(`Working on spec: ${t.meta.spec}`),e.push("")),"instruction"in t&&(e.push(t.instruction),e.push("")),"previousIterationDebt"in t){let i=t.previousIterationDebt;if(i!==void 0){e.push(`DEBT from iteration ${i.fromIteration} (address first):`);for(let a of i.items)e.push(`- ${a}`);e.push("")}}if("statusReportRequired"in t){let i=t.statusReport;if(i!==void 0){e.push("Report against these acceptance criteria:");for(let a of i.criteria)e.push(`- ${a}`);e.push("")}}if("verificationFailed"in t&&t.verificationFailed===!0&&(e.push("Test output:"),e.push(("verificationOutput"in t?t.verificationOutput:"")??""),e.push("")),t.behavioral.rules.length>0){e.push("Rules:");for(let i of t.behavioral.rules)e.push(`- ${i}`);e.push("")}if("context"in t){let i=t.context;if(i.concernReminders.length>0){e.push("Reminders:");for(let a of i.concernReminders)e.push(`- ${a}`);e.push("")}}let n=S();return e.push(`When done, report progress: ${n} next --answer="your progress"`),e.push(`If blocked, run: ${n} block "reason"`),e.push(`When all tasks are complete: ${n} done`),e.join(`
|
|
2
2
|
`)},ee=(t,e)=>{if(t===void 0)return null;let n=`${e}=`;for(let i of t)if(i.startsWith(n)){let a=parseInt(i.slice(n.length),10);if(!isNaN(a)&&a>0)return a}return null},ce=async(t,e,n)=>{let i=`${t}/${V.progressesDir}/blocked.log`,a=`[${new Date().toISOString()}] iteration=${n} reason=${e}
|
|
3
3
|
`;try{let{appendFileSync:u,mkdirSync:E}=await import("node:fs"),{dirname:p}=await import("node:path");E(p(i),{recursive:!0}),u(i,a)}catch{}};export{be as main};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{D as s,E as t,F as u,G as v,H as w,c as a,d as b,e as c,f as d,g as e,h as f,i as g,j as h,k as i,l as j,m as k,n as l,o as m,p as n,q as o,u as p,v as q,w as r}from"./chunk-GNMOE7H3.js";import"./chunk-HISXAZ4Y.js";export{t as AI_PROMPT,d as APIConnectionError,e as APIConnectionTimeoutError,b as APIError,p as APIPromise,c as APIUserAbortError,v as Anthropic,a as AnthropicError,h as AuthenticationError,g as BadRequestError,u as BaseAnthropic,o as BetaFallbackState,k as ConflictError,s as HUMAN_PROMPT,n as InternalServerError,j as NotFoundError,q as PagePromise,i as PermissionDeniedError,m as RateLimitError,f as RetryableError,l as UnprocessableEntityError,w as betaRefusalFallbackMiddleware,v as default,r as toFile};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{c as a,d as i,f as d,g as v,o as m,q as f,r as w}from"./chunk-VXU6XZ66.js";import{b as I,c as R}from"./chunk-IFE5SYGK.js";import{A as C,B as N,C as $,D as x,E as h,h as b,n as O,v as P,x as y,y as A}from"./chunk-WDKWHGJU.js";import{a as u,b as g}from"./chunk-OAWYVETM.js";import{i as E}from"./chunk-Y5E7ZCCX.js";import"./chunk-LJEWPIEI.js";import"./chunk-FE4MKOI4.js";import"./chunk-HISXAZ4Y.js";var G=async t=>{let s=t?.[0];if(s==="start")return await D(t?.slice(1));if(s==="end")return await M(t?.slice(1));if(s==="list")return await j();if(s==="gc")return await _();let n=I(),e=m({renderer:w.ansi(),sink:f.stdout()});return e.writeln(`Usage: ${n} session <start | end | list | gc>`),e.writeln(""),e.writeln(i(" start --spec=<name> Bind to a spec")),e.writeln(i(" start --free Idle mode (no spec, no enforcement)")),e.writeln(i(" start --auto Auto-detect spec or idle")),e.writeln(i(" end [--id=<id>] End current/specific session")),e.writeln(i(" list Show active sessions")),e.writeln(i(" gc Remove stale sessions")),await e.close(),u(void 0)},D=async t=>{let s=m({renderer:w.ansi(),sink:f.stdout()}),{root:n}=await h();if(!await x(n))return s.writeln(d("noskills is not initialized.")," Run: ",a(R("init"))),await s.close(),g({exitCode:1});let e=null,o=!1,c=!1;for(let r of t??[])r.startsWith("--spec=")?e=r.slice(7):r==="--free"?o=!0:r==="--auto"&&(c=!0);if(c){let p=(await O(n)).filter(L=>L.state.phase!=="COMPLETED"&&L.state.phase!=="IDLE");p.length===1?e=p[0].name:o=!0}if(e===null&&!o)return s.writeln(d("Specify --spec=<name>, --free, or --auto.")),s.writeln(i(`Example: ${I()} session start --spec=my-feature`)),await s.close(),g({exitCode:1});let l=null;if(e!==null)try{l=(await b(n,e)).phase}catch(r){let p=r instanceof Error?r.message:String(r);return s.writeln(d(`Error: ${p}`)),await s.close(),g({exitCode:1})}let S=$(),k={id:S,spec:e,mode:o?"free":"spec",phase:o?null:l,pid:0,startedAt:new Date().toISOString(),lastActiveAt:new Date().toISOString(),tool:"claude-code",projectRoot:n};return await P(n,k),s.writeln(v("Session started.")),s.writeln(" ID: ",a(S)),s.writeln(" Mode: ",a(o?"free":"spec")),e!==null&&(s.writeln(" Spec: ",a(e)),l!==null&&s.writeln(" Phase: ",i(l))),s.writeln(""),s.writeln("Run:"),s.writeln(a(` export NOSKILLS_SESSION=${S}`)),s.writeln(a(` export NOSKILLS_PROJECT_ROOT=${n}`)),await s.close(),u(void 0)},M=async t=>{let s=m({renderer:w.ansi(),sink:f.stdout()}),{root:n}=await h(),e=null;for(let c of t??[])c.startsWith("--id=")&&(e=c.slice(5));return e===null&&(e=E.env.get("NOSKILLS_SESSION")??null),e===null?(s.writeln(d("No session specified. Use --id=<id> or set NOSKILLS_SESSION env var.")),await s.close(),g({exitCode:1})):(await A(n,e)?s.writeln(v("Session ended: "),i(e)):s.writeln(d(`Session not found: ${e}`)),await s.close(),u(void 0))},j=async()=>{let t=m({renderer:w.ansi(),sink:f.stdout()}),{root:s}=await h(),n=await y(s);if(t.writeln(a("Sessions")),t.writeln(""),n.length===0)t.writeln(i(` No active sessions. Start one with: ${R("session start --spec=<name>")}`));else for(let e of n){let o=N(e),c=Date.now()-new Date(e.lastActiveAt).getTime(),l=Math.floor(c/6e4),S=l<60?`${l}min ago`:`${Math.floor(l/60)}h ago`,k=e.mode==="free"?"free":`spec:${e.spec??"?"}`,r=e.phase??"\u2014",p=o?d(" (stale)"):"";t.writeln(" ",a(e.id)," ",i(k.padEnd(25))," ",i(r.padEnd(18))," ",i(S),p)}return await t.close(),u(void 0)},_=async()=>{let t=m({renderer:w.ansi(),sink:f.stdout()}),{root:s}=await h(),n=await C(s);if(n.length===0)t.writeln(i("No stale sessions to remove."));else{t.writeln(v(`Removed ${n.length} stale session(s):`));for(let e of n)t.writeln(" ",i(e))}return await t.close(),u(void 0)};export{G as main};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as re}from"./chunk-DBKXMYLF.js";import{a as ie,d as G}from"./chunk-7PPUGTKL.js";import{g as z,h as N}from"./chunk-5RLCKUIF.js";import{A as K,L as ne,b as j,g as _,h as q,q as Y,s as ee,y as te,z as se}from"./chunk-UE56BMAW.js";import"./chunk-XDRX4ZBJ.js";import{b as g,c as T}from"./chunk-IFE5SYGK.js";import{c as f,d as c,f as p,g as R,h as O,k as B,o as v,q as y,r as $}from"./chunk-VXU6XZ66.js";import"./chunk-VJRCTYGL.js";import{i as H}from"./chunk-PKEQKXZW.js";import"./chunk-O4KKKYCH.js";import{D as M,E as P,b as F,f as C,h as b,i as V,m as k,n as J,o as Q,s as Z}from"./chunk-KRKOWSYW.js";import{a as u,b as d}from"./chunk-OAWYVETM.js";import{i as D}from"./chunk-Y5E7ZCCX.js";import"./chunk-LJEWPIEI.js";import"./chunk-FE4MKOI4.js";import"./chunk-HISXAZ4Y.js";var ae=new Set(["new","list","help","next","approve","done","block","reset","cancel","wontfix","reopen","revisit","split","ac","task","note","review","delegate","followup","plan-export","ledger"]),ue=new Set(["a","an","the","and","or","but","in","on","at","to","for","of","with","by","from","is","it","its","this","that","as","be","are","was","were","been","being","have","has","had","do","does","did","will","would","could","should","may","might","shall","can","i","we","you","they","our","my","so","if","not","no","all"]),we=n=>n.replace(/(?:~|\.{1,2})?\/(?:[\w@.-]+\/)*[\w@.-]+/g," ").replace(/(?:[\w@.-]+\/){2,}[\w@.-]+/g," ").replace(/\s+/g," ").trim(),me=n=>{let a=we(n).toLowerCase().replace(/[^a-z0-9\s-]/g,"").split(/\s+/).filter(o=>o.length>0&&!ue.has(o)).slice(0,6).join("-");return a.length>50&&(a=a.slice(0,50).replace(/-[^-]*$/,"")),a=a.replace(/^-+|-+$/g,""),a||"spec"},fe=n=>n.includes(" ")||n.length>50,he=new Map([["next",()=>import("./next-Y6FOPM4Z.js")],["approve",()=>import("./approve-HEW3VFYH.js")],["done",()=>import("./done-WR3UFYJT.js")],["block",()=>import("./block-VN76CXZW.js")],["reset",()=>import("./reset-RBCQO2RF.js")],["cancel",()=>import("./cancel-7WRAST62.js")],["wontfix",()=>import("./wontfix-RBOGLLWJ.js")],["reopen",()=>import("./reopen-RPDXN3CF.js")],["review",()=>import("./review-VMS5MYOV.js")],["delegate",()=>import("./delegate-WKXIER7E.js")],["followup",()=>import("./followup-5EGZEF5Q.js")],["learn",()=>import("./learn-ZTYKBZER.js")],["plan-export",()=>import("./plan-export-PG2BVRQZ.js")],["ledger",()=>import("./ledger-FOOPJ2UO.js")]]);var je=async n=>{let t=n?.[0];if(t==="new")return await ge(n?.slice(1));if(t==="list")return await Se(n?.slice(1));if(t==="help"||t===void 0){let l=g(),r=v({renderer:$.ansi(),sink:y.stdout()});return r.writeln(`Usage: ${l} spec <new "description" | list | <name> <command>>`),r.writeln(""),r.writeln(c(" Commands for a spec:")),r.writeln(c(" next, approve, done, block, reset, cancel, wontfix, reopen, revisit, split, ac, task, note, ledger")),r.writeln(""),r.writeln(c(" Examples:")),r.writeln(c(` ${l} spec new "Add photo upload support" # name auto-generated`)),r.writeln(c(` ${l} spec new my-feature "Add upload support" # explicit name`)),r.writeln(c(` ${l} spec my-feature next`)),r.writeln(c(` ${l} spec my-feature next --answer="approve"`)),await r.close(),u(void 0)}let e=t,s=n?.[1];if(s===void 0)return await(await import("./status-OGLFEFF7.js")).main([`--spec=${e}`]);if(s==="split")return await ye([`--spec=${e}`,...n?.slice(2)??[]]);if(s==="revisit")return await $e([`--spec=${e}`,...n?.slice(2)??[]]);if(s==="ac")return await Ce(e,n?.slice(2));if(s==="task")return await ke(e,n?.slice(2));if(s==="note")return await xe(e,n?.slice(2));let a=he.get(s);if(a!==void 0)return await(await a()).main([`--spec=${e}`,...n?.slice(2)??[]]);let o=v({renderer:$.ansi(),sink:y.stdout()});return o.writeln(p(`Unknown command: spec ${e} ${s}`)),o.writeln(c(" Valid: next, approve, done, block, reset, cancel, wontfix, reopen, revisit, split, ac, task, note, ledger")),await o.close(),d({exitCode:1})},ge=async n=>{let t=v({renderer:$.ansi(),sink:y.stdout()}),{root:e}=await P();if(!await M(e))return t.writeln(p("noskills is not initialized.")," Run: ",f(T("init"))),await t.close(),d({exitCode:1});let s=null,a=[];if(n!==void 0){let h=!1,S=[];for(let E of n)E.startsWith("--name=")?(s=E.slice(7),h=!0):E.startsWith("-")||S.push(E);if(h)a.push(...S);else if(S.length>=1){let E=S[0];fe(E)?a.push(...S):(s=E,a.push(...S.slice(1)))}}let o=null;if(n!==void 0)for(let h of n)h.startsWith("--from-plan=")&&(o=h.slice(12));let l=a.join(" ");if((s===null||s.length===0)&&l.length>0){s=me(l);let h=s,S=2;for(;;){if(ae.has(h)){h=`${s}-${S}`,S++;continue}let E=`${e}/${C.specDir(h)}`;try{await D.fs.stat(E),h=`${s}-${S}`,S++}catch{break}}s=h}if(s===null||s.length===0){let h={phase:"IDLE",action:"spec-new-interactive",instruction:"Ask the user what they want to build. Accept any input \u2014 one sentence, detailed requirements, meeting notes, a Linear task. Then call spec new again with their description.",prompt:"What do you want to build?"};return await t.close(),await G(h,"json"),u(void 0)}if(ae.has(s))return t.writeln(p(`"${s}" is a reserved name.`),c(" Choose a different spec name.")),await t.close(),d({exitCode:1});let r=/^[a-z0-9][a-z0-9-]*[a-z0-9]$/;if(s.length>50||s.length>1&&!r.test(s)||s.length===1&&!/^[a-z0-9]$/.test(s))return t.writeln(p("Invalid spec name: "),f(s)),t.writeln(c("Must be lowercase, hyphens, numbers only. Max 50 chars. Regex: /^[a-z0-9][a-z0-9-]*[a-z0-9]$/")),await t.close(),d({exitCode:1});if(l.length===0)return t.writeln(p("Please provide a description: "),f(`${g()} spec new "Add photo upload support"`)),await t.close(),d({exitCode:1});if(o!==null)try{if((await D.fs.stat(o)).size>50*1024)return t.writeln(p("Plan file too large. Maximum 50KB.")),await t.close(),d({exitCode:1})}catch{return t.writeln(p(`Plan file not found: ${o}`)),await t.close(),d({exitCode:1})}let i=`spec/${s}`,w=`${e}/${C.specDir(s)}`;try{return await D.fs.stat(w),t.writeln(p(`Spec "${s}" already exists.`),c(` Use a different --name or run \`${g()} reset --spec=${s}\` first.`)),await t.close(),d({exitCode:1})}catch{}let A=F(),m=j(A,s,i,l),x=await N(e),L=te(m,"IDLE","DISCOVERY",x);o!==null&&(L={...m,discovery:{...m.discovery,planPath:o}}),await D.fs.mkdir(`${e}/${C.specDir(s)}`,{recursive:!0});let I=await Z(e),U=await Q(e),oe=I.filter(h=>U?.concerns.includes(h.id)??!1),le=new Date,ce={name:x?.name??"unknown",email:x?.email??""},W=H({specName:s,activeConcerns:oe,classification:null,creator:ce,now:le}),pe=`${e}/${C.specFile(s)}`;await D.fs.writeTextFile(pe,W.content);let de={...L,specState:{path:C.specFile(s),status:"draft",metadata:W.metadata,placeholders:W.placeholders}};return await k(e,s,de),await re(e,{ts:new Date().toISOString(),type:"spec-created",spec:s,user:x?.name??"unknown",description:l??""}),t.writeln(R("\u2714")," Spec started: ",f(s)),t.writeln(" Directory: ",c(C.specDir(s))),t.writeln(" Branch: ",c(i)),t.writeln(" Phase: ",O("DISCOVERY")),o!==null&&t.writeln(" Plan: ",c(o)),t.writeln(""),t.writeln("Run ",f(T(`next --spec=${s}`))," to begin discovery questions."),await t.close(),u(void 0)},Se=async n=>{let{root:t}=await P(),e=ie(n),s=await J(t),a=`${t}/${C.specsDir}`,o=new Set(s.map(i=>i.name)),l=[];for(let i of s)l.push({name:i.name,phase:i.state.phase,iteration:i.state.execution.iteration});try{for await(let i of D.fs.readDir(a))i.isDirectory&&!o.has(i.name)&&l.push({name:i.name,phase:"IDLE",iteration:0})}catch{}if(e==="json")return await G(l,"json"),u(void 0);let r=v({renderer:$.ansi(),sink:y.stdout()});if(r.writeln(f("Specs")),r.writeln(""),l.length===0)r.writeln(c(" No specs yet."));else for(let i of l){let w=i.phase==="COMPLETED"?R(i.phase):i.phase==="EXECUTING"?B(i.phase):i.phase==="BLOCKED"?p(i.phase):O(i.phase),A=i.phase==="EXECUTING"?c(` iteration ${i.iteration}`):"";r.writeln(" ",c("\u25CB")," ",i.name," ",w,A)}return await r.close(),u(void 0)},ve=n=>{let t=[],e=0;for(;e<n.length;)if(n[e]==="--into"&&e+1<n.length){let s=n[e+1],a=s;e+2<n.length&&!n[e+2].startsWith("-")?(a=n[e+2],e+=3):e+=2,t.push({name:s,description:a})}else e+=1;return t},ye=async n=>{let t=v({renderer:$.ansi(),sink:y.stdout()}),{root:e}=await P();if(!await M(e))return t.writeln(p("noskills is not initialized.")," Run: ",f(T("init"))),await t.close(),d({exitCode:1});let s=V(n??[]);if(s===null)return t.writeln(p("Error: --spec=<name> is required.")),t.writeln(c("Example: "),f(`${g()} spec split --spec=parent --into name1 "desc1" --into name2 "desc2"`)),await t.close(),d({exitCode:1});let a;try{a=await b(e,s)}catch(i){let w=i instanceof Error?i.message:String(i);return t.writeln(p(`Error: ${w}`)),await t.close(),d({exitCode:1})}if(a.phase!=="DISCOVERY"&&a.phase!=="DISCOVERY_REFINEMENT")return t.writeln(p(`Cannot split spec in phase ${a.phase}. Must be in DISCOVERY or DISCOVERY_REFINEMENT.`)),await t.close(),d({exitCode:1});let o=ve(n??[]);if(o.length<2){let i=ne(a.discovery.answers);if(!i.detected||i.proposals.length<2)return t.writeln(p("Error: at least 2 --into entries required, or discovery answers must contain 2+ independent areas.")),await t.close(),d({exitCode:1});let w=[];for(let m of i.proposals){let x=`${e}/${C.specDir(m.name)}`;await D.fs.mkdir(x,{recursive:!0});let X=a.discovery.answers.filter(U=>m.relevantAnswers.includes(U.questionId)),I=j(F(),m.name,`spec/${m.name}`);for(let U of X)I=_(I,U.questionId,U.answer);I=q(I),await k(e,m.name,I),w.push(m.name)}let A=Y(a,"cancelled",`Split into: ${w.join(", ")}`);await k(e,s,A),t.writeln(R("Split complete."),` Created ${w.length} sub-specs:`);for(let m of w)t.writeln(" ",c("\u25CB")," ",f(m));return t.writeln("",c(`Parent spec "${s}" cancelled.`)),await t.close(),u(void 0)}let l=[];for(let i of o){let w=`${e}/${C.specDir(i.name)}`;await D.fs.mkdir(w,{recursive:!0});let m=j(F(),i.name,`spec/${i.name}`);for(let x of a.discovery.answers)m=_(m,x.questionId,x.answer);m=q(m),await k(e,i.name,m),l.push(i.name)}let r=Y(a,"cancelled",`Split into: ${l.join(", ")}`);await k(e,s,r),t.writeln(R("Split complete."),` Created ${l.length} sub-specs:`);for(let i of l)t.writeln(" ",c("\u25CB")," ",f(i));return t.writeln("",c(`Parent spec "${s}" cancelled.`)),await t.close(),u(void 0)},$e=async n=>{let t=v({renderer:$.ansi(),sink:y.stdout()}),{root:e}=await P();if(!await M(e))return t.writeln(p("noskills is not initialized.")," Run: ",f(T("init"))),await t.close(),d({exitCode:1});let s=V(n??[]);if(s===null)return t.writeln(p("Error: --spec=<name> is required.")),t.writeln(c("Example: "),f(`${g()} spec revisit --spec=my-spec "reason for revisit"`)),await t.close(),d({exitCode:1});let a=(n??[]).find(i=>!i.startsWith("--")&&i!==s);if(a===void 0||a.trim().length===0)return t.writeln(p('Error: Reason is required: noskills spec revisit --spec=X "reason"')),await t.close(),d({exitCode:1});let o;try{o=await b(e,s)}catch(i){let w=i instanceof Error?i.message:String(i);return t.writeln(p(`Error: ${w}`)),await t.close(),d({exitCode:1})}if(o.phase==="DISCOVERY"||o.phase==="DISCOVERY_REFINEMENT"||o.phase==="SPEC_PROPOSAL"||o.phase==="SPEC_APPROVED")return t.writeln(p("Already in planning phase, no need to revisit.")),await t.close(),d({exitCode:1});if(o.phase==="COMPLETED")return t.writeln(p(`Spec is completed. Use \`${g()} reopen --spec=${s}\` instead.`)),await t.close(),d({exitCode:1});if(o.phase==="IDLE")return t.writeln(p("No active spec to revisit.")),await t.close(),d({exitCode:1});let l=o.execution.completedTasks.length,r=ee(o,a.trim());return await k(e,s,r),t.writeln(R("Revisit complete.")),t.writeln(" Phase: ",f("DISCOVERY"),c(` (revisited from ${o.phase})`)),l>0&&t.writeln(" Previous progress: ",f(`${l} tasks completed`)),t.writeln(" Reason: ",c(`"${a.trim()}"`)),t.writeln(" Discovery answers preserved \u2014 revise or re-approve."),await t.close(),u(void 0)},Ce=async(n,t)=>{let e=v({renderer:$.ansi(),sink:y.stdout()}),{root:s}=await P(),a=t?.[0];if(n===void 0||a===void 0)return e.writeln(`Usage: ${g()} spec <name> ac <add "text" | list>`),await e.close(),u(void 0);if(a==="add"){let o=(t?.slice(1)??[]).filter(w=>!w.startsWith("-")).join(" ");if(o.length===0)return e.writeln(p("Please provide AC text.")),await e.close(),d({exitCode:1});let l=await b(s,n),r=await N(s);l.phase==="EXECUTING"&&e.writeln(O("Warning: Adding ACs during execution is scope creep."));let i=se(l,o,r);return await k(s,n,i),e.writeln(R("AC added: "),`"${o}"`,c(` (by ${z(r)})`)),await e.close(),u(void 0)}if(a==="list"){let l=(await b(s,n)).customACs??[];if(e.writeln(f(`Custom ACs for ${n}`)),e.writeln(""),l.length===0)e.writeln(c(" No custom ACs."));else for(let r of l)e.writeln(` - ${r.text}`,c(` -- ${r.user}, ${r.addedInPhase}`));return await e.close(),u(void 0)}return e.writeln(`Usage: ${g()} spec <name> ac <add "text" | list>`),await e.close(),u(void 0)},ke=async(n,t)=>{let e=v({renderer:$.ansi(),sink:y.stdout()}),{root:s}=await P(),a=t?.[0];if(n===void 0||a===void 0)return e.writeln(`Usage: ${g()} spec <name> task <add "text" | list>`),await e.close(),u(void 0);if(a==="add"){let o=(t?.slice(1)??[]).filter(w=>!w.startsWith("-")).join(" ");if(o.length===0)return e.writeln(p("Please provide task text.")),await e.close(),d({exitCode:1});let l=await b(s,n);if(l.phase==="EXECUTING"||l.phase==="BLOCKED")return e.writeln(p("Cannot add tasks during execution. Use `spec revisit` to go back to discovery.")),await e.close(),d({exitCode:1});let r=await N(s),i=K(l,`[TASK] ${o}`,r);return await k(s,n,i),e.writeln(R("Task added: "),`"${o}"`,c(` (by ${z(r)})`)),await e.close(),u(void 0)}if(a==="list"){let l=((await b(s,n)).specNotes??[]).filter(r=>r.text.startsWith("[TASK] "));if(e.writeln(f(`Custom tasks for ${n}`)),e.writeln(""),l.length===0)e.writeln(c(" No custom tasks."));else for(let r of l)e.writeln(` - ${r.text.replace("[TASK] ","")}`,c(` -- ${r.user}, ${r.phase}`));return await e.close(),u(void 0)}return e.writeln(`Usage: ${g()} spec <name> task <add "text" | list>`),await e.close(),u(void 0)},xe=async(n,t)=>{let e=v({renderer:$.ansi(),sink:y.stdout()}),{root:s}=await P(),a=t?.[0];if(n===void 0||a===void 0)return e.writeln(`Usage: ${g()} spec <name> note <add "text" | list>`),await e.close(),u(void 0);if(a==="add"){let o=(t?.slice(1)??[]).filter(w=>!w.startsWith("-")).join(" ");if(o.length===0)return e.writeln(p("Please provide note text.")),await e.close(),d({exitCode:1});let l=await b(s,n),r=await N(s),i=K(l,o,r);return await k(s,n,i),e.writeln(R("Note added: "),`"${o}"`,c(` (by ${z(r)})`)),await e.close(),u(void 0)}if(a==="list"){let l=((await b(s,n)).specNotes??[]).filter(r=>!r.text.startsWith("[TASK] "));if(e.writeln(f(`Notes for ${n}`)),e.writeln(""),l.length===0)e.writeln(c(" No notes."));else for(let r of l)e.writeln(` - ${r.text}`,c(` -- ${r.user}, ${r.phase}`));return await e.close(),u(void 0)}return e.writeln(`Usage: ${g()} spec <name> note <add "text" | list>`),await e.close(),u(void 0)};export{ae as RESERVED_NAMES,fe as looksLikeDescription,je as main,me as slugFromDescription};
|
|
1
|
+
import{a as re}from"./chunk-NPWXEWRN.js";import{c as f,d as c,f as p,g as R,h as O,k as B,o as v,q as y,r as $}from"./chunk-VXU6XZ66.js";import{g as z,h as N}from"./chunk-5RLCKUIF.js";import{a as ie,d as G}from"./chunk-7PPUGTKL.js";import{A as K,L as ne,b as j,g as _,h as q,q as Y,s as ee,y as te,z as se}from"./chunk-EVJYA7S3.js";import"./chunk-XDRX4ZBJ.js";import{b as g,c as T}from"./chunk-IFE5SYGK.js";import"./chunk-VJRCTYGL.js";import"./chunk-O4KKKYCH.js";import{i as H}from"./chunk-ONJVI5AZ.js";import{D as M,E as P,b as F,f as C,h as b,i as V,m as k,n as J,o as Q,s as Z}from"./chunk-WDKWHGJU.js";import{a as u,b as d}from"./chunk-OAWYVETM.js";import{i as D}from"./chunk-Y5E7ZCCX.js";import"./chunk-LJEWPIEI.js";import"./chunk-FE4MKOI4.js";import"./chunk-HISXAZ4Y.js";var ae=new Set(["new","list","help","next","approve","done","block","reset","cancel","wontfix","reopen","revisit","split","ac","task","note","review","delegate","followup","plan-export","ledger"]),ue=new Set(["a","an","the","and","or","but","in","on","at","to","for","of","with","by","from","is","it","its","this","that","as","be","are","was","were","been","being","have","has","had","do","does","did","will","would","could","should","may","might","shall","can","i","we","you","they","our","my","so","if","not","no","all"]),we=n=>n.replace(/(?:~|\.{1,2})?\/(?:[\w@.-]+\/)*[\w@.-]+/g," ").replace(/(?:[\w@.-]+\/){2,}[\w@.-]+/g," ").replace(/\s+/g," ").trim(),me=n=>{let a=we(n).toLowerCase().replace(/[^a-z0-9\s-]/g,"").split(/\s+/).filter(o=>o.length>0&&!ue.has(o)).slice(0,6).join("-");return a.length>50&&(a=a.slice(0,50).replace(/-[^-]*$/,"")),a=a.replace(/^-+|-+$/g,""),a||"spec"},fe=n=>n.includes(" ")||n.length>50,he=new Map([["next",()=>import("./next-QXCLZ7P3.js")],["approve",()=>import("./approve-3TKOHYHH.js")],["done",()=>import("./done-V54GSSTY.js")],["block",()=>import("./block-Q4WAIX7X.js")],["reset",()=>import("./reset-OOTZXW6Q.js")],["cancel",()=>import("./cancel-DY76ADX4.js")],["wontfix",()=>import("./wontfix-UDCTLHNB.js")],["reopen",()=>import("./reopen-L37M5XUI.js")],["review",()=>import("./review-QLD6WSOB.js")],["delegate",()=>import("./delegate-OV6NY434.js")],["followup",()=>import("./followup-NL7EPIGF.js")],["learn",()=>import("./learn-WBWNJEB2.js")],["plan-export",()=>import("./plan-export-HECAF7D4.js")],["ledger",()=>import("./ledger-QYK252DV.js")]]);var je=async n=>{let t=n?.[0];if(t==="new")return await ge(n?.slice(1));if(t==="list")return await Se(n?.slice(1));if(t==="help"||t===void 0){let l=g(),r=v({renderer:$.ansi(),sink:y.stdout()});return r.writeln(`Usage: ${l} spec <new "description" | list | <name> <command>>`),r.writeln(""),r.writeln(c(" Commands for a spec:")),r.writeln(c(" next, approve, done, block, reset, cancel, wontfix, reopen, revisit, split, ac, task, note, ledger")),r.writeln(""),r.writeln(c(" Examples:")),r.writeln(c(` ${l} spec new "Add photo upload support" # name auto-generated`)),r.writeln(c(` ${l} spec new my-feature "Add upload support" # explicit name`)),r.writeln(c(` ${l} spec my-feature next`)),r.writeln(c(` ${l} spec my-feature next --answer="approve"`)),await r.close(),u(void 0)}let e=t,s=n?.[1];if(s===void 0)return await(await import("./status-SZZXY7V3.js")).main([`--spec=${e}`]);if(s==="split")return await ye([`--spec=${e}`,...n?.slice(2)??[]]);if(s==="revisit")return await $e([`--spec=${e}`,...n?.slice(2)??[]]);if(s==="ac")return await Ce(e,n?.slice(2));if(s==="task")return await ke(e,n?.slice(2));if(s==="note")return await xe(e,n?.slice(2));let a=he.get(s);if(a!==void 0)return await(await a()).main([`--spec=${e}`,...n?.slice(2)??[]]);let o=v({renderer:$.ansi(),sink:y.stdout()});return o.writeln(p(`Unknown command: spec ${e} ${s}`)),o.writeln(c(" Valid: next, approve, done, block, reset, cancel, wontfix, reopen, revisit, split, ac, task, note, ledger")),await o.close(),d({exitCode:1})},ge=async n=>{let t=v({renderer:$.ansi(),sink:y.stdout()}),{root:e}=await P();if(!await M(e))return t.writeln(p("noskills is not initialized.")," Run: ",f(T("init"))),await t.close(),d({exitCode:1});let s=null,a=[];if(n!==void 0){let h=!1,S=[];for(let E of n)E.startsWith("--name=")?(s=E.slice(7),h=!0):E.startsWith("-")||S.push(E);if(h)a.push(...S);else if(S.length>=1){let E=S[0];fe(E)?a.push(...S):(s=E,a.push(...S.slice(1)))}}let o=null;if(n!==void 0)for(let h of n)h.startsWith("--from-plan=")&&(o=h.slice(12));let l=a.join(" ");if((s===null||s.length===0)&&l.length>0){s=me(l);let h=s,S=2;for(;;){if(ae.has(h)){h=`${s}-${S}`,S++;continue}let E=`${e}/${C.specDir(h)}`;try{await D.fs.stat(E),h=`${s}-${S}`,S++}catch{break}}s=h}if(s===null||s.length===0){let h={phase:"IDLE",action:"spec-new-interactive",instruction:"Ask the user what they want to build. Accept any input \u2014 one sentence, detailed requirements, meeting notes, a Linear task. Then call spec new again with their description.",prompt:"What do you want to build?"};return await t.close(),await G(h,"json"),u(void 0)}if(ae.has(s))return t.writeln(p(`"${s}" is a reserved name.`),c(" Choose a different spec name.")),await t.close(),d({exitCode:1});let r=/^[a-z0-9][a-z0-9-]*[a-z0-9]$/;if(s.length>50||s.length>1&&!r.test(s)||s.length===1&&!/^[a-z0-9]$/.test(s))return t.writeln(p("Invalid spec name: "),f(s)),t.writeln(c("Must be lowercase, hyphens, numbers only. Max 50 chars. Regex: /^[a-z0-9][a-z0-9-]*[a-z0-9]$/")),await t.close(),d({exitCode:1});if(l.length===0)return t.writeln(p("Please provide a description: "),f(`${g()} spec new "Add photo upload support"`)),await t.close(),d({exitCode:1});if(o!==null)try{if((await D.fs.stat(o)).size>50*1024)return t.writeln(p("Plan file too large. Maximum 50KB.")),await t.close(),d({exitCode:1})}catch{return t.writeln(p(`Plan file not found: ${o}`)),await t.close(),d({exitCode:1})}let i=`spec/${s}`,w=`${e}/${C.specDir(s)}`;try{return await D.fs.stat(w),t.writeln(p(`Spec "${s}" already exists.`),c(` Use a different --name or run \`${g()} reset --spec=${s}\` first.`)),await t.close(),d({exitCode:1})}catch{}let A=F(),m=j(A,s,i,l),x=await N(e),L=te(m,"IDLE","DISCOVERY",x);o!==null&&(L={...m,discovery:{...m.discovery,planPath:o}}),await D.fs.mkdir(`${e}/${C.specDir(s)}`,{recursive:!0});let I=await Z(e),U=await Q(e),oe=I.filter(h=>U?.concerns.includes(h.id)??!1),le=new Date,ce={name:x?.name??"unknown",email:x?.email??""},W=H({specName:s,activeConcerns:oe,classification:null,creator:ce,now:le}),pe=`${e}/${C.specFile(s)}`;await D.fs.writeTextFile(pe,W.content);let de={...L,specState:{path:C.specFile(s),status:"draft",metadata:W.metadata,placeholders:W.placeholders}};return await k(e,s,de),await re(e,{ts:new Date().toISOString(),type:"spec-created",spec:s,user:x?.name??"unknown",description:l??""}),t.writeln(R("\u2714")," Spec started: ",f(s)),t.writeln(" Directory: ",c(C.specDir(s))),t.writeln(" Branch: ",c(i)),t.writeln(" Phase: ",O("DISCOVERY")),o!==null&&t.writeln(" Plan: ",c(o)),t.writeln(""),t.writeln("Run ",f(T(`next --spec=${s}`))," to begin discovery questions."),await t.close(),u(void 0)},Se=async n=>{let{root:t}=await P(),e=ie(n),s=await J(t),a=`${t}/${C.specsDir}`,o=new Set(s.map(i=>i.name)),l=[];for(let i of s)l.push({name:i.name,phase:i.state.phase,iteration:i.state.execution.iteration});try{for await(let i of D.fs.readDir(a))i.isDirectory&&!o.has(i.name)&&l.push({name:i.name,phase:"IDLE",iteration:0})}catch{}if(e==="json")return await G(l,"json"),u(void 0);let r=v({renderer:$.ansi(),sink:y.stdout()});if(r.writeln(f("Specs")),r.writeln(""),l.length===0)r.writeln(c(" No specs yet."));else for(let i of l){let w=i.phase==="COMPLETED"?R(i.phase):i.phase==="EXECUTING"?B(i.phase):i.phase==="BLOCKED"?p(i.phase):O(i.phase),A=i.phase==="EXECUTING"?c(` iteration ${i.iteration}`):"";r.writeln(" ",c("\u25CB")," ",i.name," ",w,A)}return await r.close(),u(void 0)},ve=n=>{let t=[],e=0;for(;e<n.length;)if(n[e]==="--into"&&e+1<n.length){let s=n[e+1],a=s;e+2<n.length&&!n[e+2].startsWith("-")?(a=n[e+2],e+=3):e+=2,t.push({name:s,description:a})}else e+=1;return t},ye=async n=>{let t=v({renderer:$.ansi(),sink:y.stdout()}),{root:e}=await P();if(!await M(e))return t.writeln(p("noskills is not initialized.")," Run: ",f(T("init"))),await t.close(),d({exitCode:1});let s=V(n??[]);if(s===null)return t.writeln(p("Error: --spec=<name> is required.")),t.writeln(c("Example: "),f(`${g()} spec split --spec=parent --into name1 "desc1" --into name2 "desc2"`)),await t.close(),d({exitCode:1});let a;try{a=await b(e,s)}catch(i){let w=i instanceof Error?i.message:String(i);return t.writeln(p(`Error: ${w}`)),await t.close(),d({exitCode:1})}if(a.phase!=="DISCOVERY"&&a.phase!=="DISCOVERY_REFINEMENT")return t.writeln(p(`Cannot split spec in phase ${a.phase}. Must be in DISCOVERY or DISCOVERY_REFINEMENT.`)),await t.close(),d({exitCode:1});let o=ve(n??[]);if(o.length<2){let i=ne(a.discovery.answers);if(!i.detected||i.proposals.length<2)return t.writeln(p("Error: at least 2 --into entries required, or discovery answers must contain 2+ independent areas.")),await t.close(),d({exitCode:1});let w=[];for(let m of i.proposals){let x=`${e}/${C.specDir(m.name)}`;await D.fs.mkdir(x,{recursive:!0});let X=a.discovery.answers.filter(U=>m.relevantAnswers.includes(U.questionId)),I=j(F(),m.name,`spec/${m.name}`);for(let U of X)I=_(I,U.questionId,U.answer);I=q(I),await k(e,m.name,I),w.push(m.name)}let A=Y(a,"cancelled",`Split into: ${w.join(", ")}`);await k(e,s,A),t.writeln(R("Split complete."),` Created ${w.length} sub-specs:`);for(let m of w)t.writeln(" ",c("\u25CB")," ",f(m));return t.writeln("",c(`Parent spec "${s}" cancelled.`)),await t.close(),u(void 0)}let l=[];for(let i of o){let w=`${e}/${C.specDir(i.name)}`;await D.fs.mkdir(w,{recursive:!0});let m=j(F(),i.name,`spec/${i.name}`);for(let x of a.discovery.answers)m=_(m,x.questionId,x.answer);m=q(m),await k(e,i.name,m),l.push(i.name)}let r=Y(a,"cancelled",`Split into: ${l.join(", ")}`);await k(e,s,r),t.writeln(R("Split complete."),` Created ${l.length} sub-specs:`);for(let i of l)t.writeln(" ",c("\u25CB")," ",f(i));return t.writeln("",c(`Parent spec "${s}" cancelled.`)),await t.close(),u(void 0)},$e=async n=>{let t=v({renderer:$.ansi(),sink:y.stdout()}),{root:e}=await P();if(!await M(e))return t.writeln(p("noskills is not initialized.")," Run: ",f(T("init"))),await t.close(),d({exitCode:1});let s=V(n??[]);if(s===null)return t.writeln(p("Error: --spec=<name> is required.")),t.writeln(c("Example: "),f(`${g()} spec revisit --spec=my-spec "reason for revisit"`)),await t.close(),d({exitCode:1});let a=(n??[]).find(i=>!i.startsWith("--")&&i!==s);if(a===void 0||a.trim().length===0)return t.writeln(p('Error: Reason is required: noskills spec revisit --spec=X "reason"')),await t.close(),d({exitCode:1});let o;try{o=await b(e,s)}catch(i){let w=i instanceof Error?i.message:String(i);return t.writeln(p(`Error: ${w}`)),await t.close(),d({exitCode:1})}if(o.phase==="DISCOVERY"||o.phase==="DISCOVERY_REFINEMENT"||o.phase==="SPEC_PROPOSAL"||o.phase==="SPEC_APPROVED")return t.writeln(p("Already in planning phase, no need to revisit.")),await t.close(),d({exitCode:1});if(o.phase==="COMPLETED")return t.writeln(p(`Spec is completed. Use \`${g()} reopen --spec=${s}\` instead.`)),await t.close(),d({exitCode:1});if(o.phase==="IDLE")return t.writeln(p("No active spec to revisit.")),await t.close(),d({exitCode:1});let l=o.execution.completedTasks.length,r=ee(o,a.trim());return await k(e,s,r),t.writeln(R("Revisit complete.")),t.writeln(" Phase: ",f("DISCOVERY"),c(` (revisited from ${o.phase})`)),l>0&&t.writeln(" Previous progress: ",f(`${l} tasks completed`)),t.writeln(" Reason: ",c(`"${a.trim()}"`)),t.writeln(" Discovery answers preserved \u2014 revise or re-approve."),await t.close(),u(void 0)},Ce=async(n,t)=>{let e=v({renderer:$.ansi(),sink:y.stdout()}),{root:s}=await P(),a=t?.[0];if(n===void 0||a===void 0)return e.writeln(`Usage: ${g()} spec <name> ac <add "text" | list>`),await e.close(),u(void 0);if(a==="add"){let o=(t?.slice(1)??[]).filter(w=>!w.startsWith("-")).join(" ");if(o.length===0)return e.writeln(p("Please provide AC text.")),await e.close(),d({exitCode:1});let l=await b(s,n),r=await N(s);l.phase==="EXECUTING"&&e.writeln(O("Warning: Adding ACs during execution is scope creep."));let i=se(l,o,r);return await k(s,n,i),e.writeln(R("AC added: "),`"${o}"`,c(` (by ${z(r)})`)),await e.close(),u(void 0)}if(a==="list"){let l=(await b(s,n)).customACs??[];if(e.writeln(f(`Custom ACs for ${n}`)),e.writeln(""),l.length===0)e.writeln(c(" No custom ACs."));else for(let r of l)e.writeln(` - ${r.text}`,c(` -- ${r.user}, ${r.addedInPhase}`));return await e.close(),u(void 0)}return e.writeln(`Usage: ${g()} spec <name> ac <add "text" | list>`),await e.close(),u(void 0)},ke=async(n,t)=>{let e=v({renderer:$.ansi(),sink:y.stdout()}),{root:s}=await P(),a=t?.[0];if(n===void 0||a===void 0)return e.writeln(`Usage: ${g()} spec <name> task <add "text" | list>`),await e.close(),u(void 0);if(a==="add"){let o=(t?.slice(1)??[]).filter(w=>!w.startsWith("-")).join(" ");if(o.length===0)return e.writeln(p("Please provide task text.")),await e.close(),d({exitCode:1});let l=await b(s,n);if(l.phase==="EXECUTING"||l.phase==="BLOCKED")return e.writeln(p("Cannot add tasks during execution. Use `spec revisit` to go back to discovery.")),await e.close(),d({exitCode:1});let r=await N(s),i=K(l,`[TASK] ${o}`,r);return await k(s,n,i),e.writeln(R("Task added: "),`"${o}"`,c(` (by ${z(r)})`)),await e.close(),u(void 0)}if(a==="list"){let l=((await b(s,n)).specNotes??[]).filter(r=>r.text.startsWith("[TASK] "));if(e.writeln(f(`Custom tasks for ${n}`)),e.writeln(""),l.length===0)e.writeln(c(" No custom tasks."));else for(let r of l)e.writeln(` - ${r.text.replace("[TASK] ","")}`,c(` -- ${r.user}, ${r.phase}`));return await e.close(),u(void 0)}return e.writeln(`Usage: ${g()} spec <name> task <add "text" | list>`),await e.close(),u(void 0)},xe=async(n,t)=>{let e=v({renderer:$.ansi(),sink:y.stdout()}),{root:s}=await P(),a=t?.[0];if(n===void 0||a===void 0)return e.writeln(`Usage: ${g()} spec <name> note <add "text" | list>`),await e.close(),u(void 0);if(a==="add"){let o=(t?.slice(1)??[]).filter(w=>!w.startsWith("-")).join(" ");if(o.length===0)return e.writeln(p("Please provide note text.")),await e.close(),d({exitCode:1});let l=await b(s,n),r=await N(s),i=K(l,o,r);return await k(s,n,i),e.writeln(R("Note added: "),`"${o}"`,c(` (by ${z(r)})`)),await e.close(),u(void 0)}if(a==="list"){let l=((await b(s,n)).specNotes??[]).filter(r=>!r.text.startsWith("[TASK] "));if(e.writeln(f(`Notes for ${n}`)),e.writeln(""),l.length===0)e.writeln(c(" No notes."));else for(let r of l)e.writeln(` - ${r.text}`,c(` -- ${r.user}, ${r.phase}`));return await e.close(),u(void 0)}return e.writeln(`Usage: ${g()} spec <name> note <add "text" | list>`),await e.close(),u(void 0)};export{ae as RESERVED_NAMES,fe as looksLikeDescription,je as main,me as slugFromDescription};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as k,e as O}from"./chunk-
|
|
1
|
+
import{c as i,d as r,f as c,g as C,h as p,k as y,o as d,q as u,r as m}from"./chunk-VXU6XZ66.js";import{b as k,e as O}from"./chunk-LKZZ4JN5.js";import{a as S,d as w}from"./chunk-7PPUGTKL.js";import{N as R}from"./chunk-EVJYA7S3.js";import"./chunk-XDRX4ZBJ.js";import{c as h}from"./chunk-IFE5SYGK.js";import{a as f}from"./chunk-VJRCTYGL.js";import"./chunk-O4KKKYCH.js";import"./chunk-ONJVI5AZ.js";import{D as v,E as P,h as I,i as b,o as x,s as D}from"./chunk-WDKWHGJU.js";import{a as l,b as E}from"./chunk-OAWYVETM.js";import"./chunk-Y5E7ZCCX.js";import"./chunk-LJEWPIEI.js";import"./chunk-FE4MKOI4.js";import"./chunk-HISXAZ4Y.js";var K=async g=>{let{root:n}=await P(),o=S(g);if(!await v(n)){if(o==="json")await w({error:"noskills is not initialized"},o);else{let s=d({renderer:m.ansi(),sink:u.stdout()});s.writeln(c("noskills is not initialized.")," Run: ",i(h("init"))),await s.close()}return E({exitCode:1})}let N=b(g),e=await I(n,N),t=await x(n),T={phase:e.phase,spec:e.spec,branch:e.branch,discovery:e.phase==="DISCOVERY"||e.phase==="DISCOVERY_REFINEMENT"?{answered:e.discovery.answers.length,total:f.length}:void 0,execution:e.phase==="EXECUTING"||e.phase==="BLOCKED"?{iteration:e.execution.iteration,lastProgress:e.execution.lastProgress,debt:e.execution.debt?.items.length??0,verificationPassed:e.execution.lastVerification?.passed??null}:void 0,concerns:t?.concerns??[],tools:t?.tools??[],decisions:e.decisions.length};if(o==="json"){let a=(await D(n)).filter(V=>t!==null&&t.concerns.includes(V.id)),F=await k(n),j=O(t?.tools??[]),$=await R(e,a,F,t,void 0,void 0,void 0,j);return await w({...T,...$},"json"),l(void 0)}{let s=d({renderer:m.ansi(),sink:u.stdout()});s.writeln(i(`${h("status")}`)),s.writeln("");let a=e.phase==="COMPLETED"?C(e.phase):e.phase==="BLOCKED"?c(e.phase):e.phase==="EXECUTING"?y(e.phase):p(e.phase);s.writeln(" Phase: ",a),e.spec!==null&&s.writeln(" Spec: ",i(e.spec)),e.branch!==null&&s.writeln(" Branch: ",e.branch),(e.phase==="DISCOVERY"||e.phase==="DISCOVERY_REFINEMENT")&&s.writeln(` Discovery: ${e.discovery.answers.length}/${f.length} questions answered`),e.phase==="EXECUTING"&&(s.writeln(` Iteration: ${e.execution.iteration}`),e.execution.lastProgress!==null&&s.writeln(" Progress: ",r(e.execution.lastProgress)),e.execution.debt!==null&&s.writeln(p(` Debt: ${e.execution.debt.items.length} items`))),t!==null&&(s.writeln(""),t.concerns.length>0&&s.writeln(" Concerns: ",r(t.concerns.join(", "))),t.tools.length>0&&s.writeln(" Tools: ",r(t.tools.join(", ")))),e.decisions.length>0&&(s.writeln(""),s.writeln(` Decisions: ${e.decisions.length}`)),await s.close()}return l(void 0)};export{K as main};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as t,o as i,q as r,r as n}from"./chunk-VXU6XZ66.js";import"./chunk-Y5E7ZCCX.js";import"./chunk-LJEWPIEI.js";import"./chunk-FE4MKOI4.js";import"./chunk-HISXAZ4Y.js";var l=async e=>{let s=i({renderer:n.ansi(),sink:r.stdout()});return s.writeln(t("`sync` has been merged into `init`. Running `noskills init`...")),s.writeln(""),await s.close(),await(await import("./init-
|
|
1
|
+
import{d as t,o as i,q as r,r as n}from"./chunk-VXU6XZ66.js";import"./chunk-Y5E7ZCCX.js";import"./chunk-LJEWPIEI.js";import"./chunk-FE4MKOI4.js";import"./chunk-HISXAZ4Y.js";var l=async e=>{let s=i({renderer:n.ansi(),sink:r.stdout()});return s.writeln(t("`sync` has been merged into `init`. Running `noskills init`...")),s.writeln(""),await s.close(),await(await import("./init-WDRNFT57.js")).main(e)};export{l as main};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{c,d as r,f as o,g as u,h as p,o as m,q as f,r as w}from"./chunk-VXU6XZ66.js";import{b as a}from"./chunk-IFE5SYGK.js";import{f as g}from"./chunk-ONJVI5AZ.js";import{E as h,l as v}from"./chunk-WDKWHGJU.js";import{a as d,b as i}from"./chunk-OAWYVETM.js";import"./chunk-Y5E7ZCCX.js";import"./chunk-LJEWPIEI.js";import"./chunk-FE4MKOI4.js";import"./chunk-HISXAZ4Y.js";var D=async $=>{let e=m({renderer:w.ansi(),sink:f.stdout()}),{root:S}=await h(),s=($??[])[0]??null;if(s===null)return e.writeln(o("Error: spec name is required.")),e.writeln(r(`Usage: ${a()} validate <spec-name>`)),await e.close(),i({exitCode:1});let l;try{l=await v(S,s)}catch{return e.writeln(o(`Spec "${s}" not found.`)),e.writeln(r(`Run \`${a()} spec list\` to see available specs.`)),await e.close(),i({exitCode:1})}if(l===null)return e.writeln(o(`No state found for spec "${s}".`)),await e.close(),i({exitCode:1});let n=g(l.specState),x=l.specState.placeholders.filter(t=>t.status!=="conditional-hidden");if(n.canAdvance)return e.writeln(u("\u2713")," ",c(s),`: all ${x.length} sections resolved`),await e.close(),d(void 0);if(e.writeln(o("\u2717")," ",c(s),`: ${n.unresolvedSections.length} unresolved, ${n.pendingDecisions.length} pending decisions`),n.unresolvedSections.length>0){e.writeln(""),e.writeln(p("Unresolved sections:"));for(let t of n.unresolvedSections)e.writeln(" - ",t.sectionTitle)}if(n.pendingDecisions.length>0){e.writeln(""),e.writeln(p("Pending decisions:"));for(let t of n.pendingDecisions)e.writeln(" - ",`${t.section}: ${t.question}`,r(` (waiting for ${t.waitingFor.join(", ")})`))}return e.writeln(""),e.writeln(r(`Run \`${a()} spec ${s} next\` to fill remaining sections.`)),await e.close(),i({exitCode:1})};export{D as main};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"./chunk-
|
|
1
|
+
import{a,b}from"./chunk-OP4XAIGW.js";import"./chunk-PSX63TYP.js";import"./chunk-EJYSOUEA.js";import"./chunk-JYVB6UAV.js";import"./chunk-OAWYVETM.js";import"./chunk-HISXAZ4Y.js";export{a as VertexAIModel,b as vertexaiFactory};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as F,c as R}from"./chunk-EROZRDGT.js";import{a as O,c as I}from"./chunk-7PPUGTKL.js";import{D as v,E as L,f as E,g as x,n as P,o as D}from"./chunk-WDKWHGJU.js";import{a as y,b as C}from"./chunk-OAWYVETM.js";import{i as g}from"./chunk-Y5E7ZCCX.js";import"./chunk-LJEWPIEI.js";import"./chunk-FE4MKOI4.js";import"./chunk-HISXAZ4Y.js";var N=async e=>{let t=await x(e),d=await D(e),l=await W(e),s=null,c=null,u=0,a=0;if(t.spec!==null){let i=await F(e,t.spec);if(i!==null){u=i.tasks.length,a=t.execution.completedTasks.length;let f=R(i.tasks,t.execution.completedTasks);f!==null&&(s=f.id,c=f.title)}}let p=null;t.lastCalledAt!==null&&(p=Math.floor((Date.now()-new Date(t.lastCalledAt).getTime())/1e3));let r=(await P(e)).map(i=>({name:i.name,phase:i.state.phase,iteration:i.state.execution.iteration}));return{spec:t.spec,phase:t.phase,iteration:t.execution.iteration,activeTaskId:s,activeTaskTitle:c,totalTasks:u,completedTaskCount:a,lastProgress:t.execution.lastProgress,lastCalledAt:t.lastCalledAt,modifiedFiles:t.execution.modifiedFiles,debt:t.execution.debt,concerns:d?.concerns??[],maxIterations:d?.maxIterationsBeforeRestart??15,awaitingStatusReport:t.execution.awaitingStatusReport,verificationPassed:t.execution.lastVerification?.passed??null,decisionsCount:t.decisions.length,discoveryAnswered:t.discovery.answers.length,discoveryTotal:6,trackedFiles:l,timeSinceUpdate:p,allSpecs:r}},W=async e=>{let t=`${e}/${E.progressesDir}/files-changed.jsonl`;try{let l=(await g.fs.readTextFile(t)).trim().split(`
|
|
2
2
|
`).filter(Boolean),s=[];for(let c of l)try{let u=JSON.parse(c);s.includes(u.file)||s.push(u.file)}catch{}return s}catch{return[]}},B="\x1B[2J\x1B[H",b="\x1B[1m",m="\x1B[2m",o="\x1B[0m",T="\x1B[32m",k="\x1B[33m",w="\x1B[31m",A="\x1B[36m",S=e=>{switch(e){case"COMPLETED":return T;case"BLOCKED":return w;case"EXECUTING":return A;default:return k}},M=(e,t,d)=>{if(t===0)return"\u2591".repeat(d);let l=Math.min(e/t,1),s=Math.round(l*d);return"\u2588".repeat(s)+"\u2591".repeat(d-s)},U=e=>e===null?"never":e<60?`${e}s ago`:e<3600?`${Math.floor(e/60)}m ago`:`${Math.floor(e/3600)}h ago`,j=e=>e.replace(/\x1b\[[0-9;]*m/g,""),K=(e,t)=>{let d=j(e).length;return e+" ".repeat(Math.max(0,t-d))},V=e=>{let t=[],l="\u2500".repeat(54),s=a=>`${m}\u2502${o} ${K(a,52)}${m}\u2502${o}`,c=()=>`${m}\u2502${"".padEnd(54)}\u2502${o}`;if(t.push(`${m}\u256D${l}\u256E${o}`),t.push(s(`${b}noskills watch${o}`)),t.push(c()),t.push(s(`${b}Specs:${o}`)),e.allSpecs.length>0)for(let a of e.allSpecs){let p=S(a.phase),n=a.name.slice(0,18).padEnd(18),r=`${p}${a.phase}${o}`.padEnd(a.phase.length+10);if(a.phase==="EXECUTING"||a.phase==="BLOCKED"){let i=M(e.completedTaskCount,e.totalTasks,10),f=e.totalTasks>0?Math.round(e.completedTaskCount/e.totalTasks*100):0;t.push(s(` ${n} ${r} ${i} ${e.completedTaskCount}/${e.totalTasks} (${f}%)`))}else a.phase==="COMPLETED"?t.push(s(` ${n} ${r} done`)):t.push(s(` ${n} ${r}`))}else if(e.spec!==null){let a=S(e.phase);t.push(s(` ${e.spec} ${a}${e.phase}${o}`))}else t.push(s(` ${m}No specs yet${o}`));if(t.push(c()),e.phase==="DISCOVERY"||e.phase==="DISCOVERY_REFINEMENT")t.push(s(`Phase: ${S(e.phase)}${e.phase}${o} Discovery: ${e.discoveryAnswered}/${e.discoveryTotal} questions answered`));else if(e.phase==="SPEC_PROPOSAL")t.push(s(`Phase: ${k}${e.phase}${o} ${k}Awaiting approval${o}`));else if(e.phase==="SPEC_APPROVED")t.push(s(`Phase: ${k}${e.phase}${o} ${T}Ready to start${o}`));else if(e.phase==="EXECUTING"||e.phase==="BLOCKED"){if(e.spec!==null&&t.push(s(`${b}${e.spec}${o} (iteration ${e.iteration}):`)),e.activeTaskId!==null){let n=`${e.activeTaskId}${e.activeTaskTitle!==null?` (${e.activeTaskTitle})`:""}`;t.push(s(` Active task: ${A}${n.slice(0,36)}${o}`))}let a=M(e.completedTaskCount,e.totalTasks,12),p=e.totalTasks>0?Math.round(e.completedTaskCount/e.totalTasks*100):0;if(t.push(s(` Progress: ${T}${a} ${e.completedTaskCount}/${e.totalTasks} tasks (${p}%)${o}`)),t.push(s(` Iteration: ${e.iteration}`)),t.push(s(` Last update: ${U(e.timeSinceUpdate)}`)),e.lastProgress!==null&&t.push(s(` ${m}${e.lastProgress.slice(0,50)}${o}`)),e.phase==="BLOCKED"){let n=(e.lastProgress??"unknown").replace(/^BLOCKED:\s*/,"");t.push(s(` ${w}BLOCKED: ${n.slice(0,40)}${o}`)),t.push(s(` ${k}Human input needed${o}`))}if(e.awaitingStatusReport&&t.push(s(` ${k}Status report pending${o}`)),e.verificationPassed===!1&&t.push(s(` ${w}Verification failed${o}`)),t.push(c()),e.debt!==null&&e.debt.items.length>0){t.push(s(` Debt: ${e.debt.items.length} item(s)`));for(let n of e.debt.items.slice(0,3))t.push(s(` \u2514\u2500 ${n.text.slice(0,44)}`));e.debt.items.length>3&&t.push(s(` \u2514\u2500 ... and ${e.debt.items.length-3} more`))}if(e.trackedFiles.length>0||e.modifiedFiles.length>0){let n=e.trackedFiles.length>0?e.trackedFiles:e.modifiedFiles;t.push(s(` Files changed: ${n.length}`));for(let r of n.slice(0,5)){let i=r.length>44?"..."+r.slice(-41):r;t.push(s(` \u2514\u2500 ${i}`))}n.length>5&&t.push(s(` \u2514\u2500 ... and ${n.length-5} more`))}}else e.phase==="COMPLETED"?t.push(s(`${T}Complete!${o} ${e.iteration} iterations, ${e.decisionsCount} decisions`)):e.phase==="IDLE"&&t.push(s(`${m}No active spec \u2014 work freely${o}`));t.push(c()),e.concerns.length>0&&t.push(s(`Concerns: ${e.concerns.join(", ").slice(0,40)}`));let u=e.iteration>=e.maxIterations?`${w}RESTART RECOMMENDED${o}`:`${T}ok${o} (${e.iteration}/${e.maxIterations})`;return t.push(s(`Context: ${u}`)),t.push(`${m}\u2570${l}\u256F${o}`),t.push(` ${m}watching .eser/.state/progresses/ ... ctrl+c to stop${o}`),t.join(`
|
|
3
3
|
`)},_=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}),H=async e=>{let{root:t}=await L(),l=e!==void 0&&e.some(r=>r==="-o"||r.startsWith("--output"))?O(e):"ansi";if(!await v(t)){let r=new TextEncoder,i=g.process.stdout.getWriter();return await i.write(r.encode(`noskills not initialized.
|
|
4
4
|
`)),i.releaseLock(),C({exitCode:1})}let s=`${t}/${E.progressesDir}`,c="",u=async()=>{let r=await N(t),i=l==="json"?_(r):l==="markdown"?I(r,"markdown"):V(r);if(l==="json"){let h=new TextEncoder,$=g.process.stdout.getWriter();await $.write(h.encode(i+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as l,E as a}from"./chunk-
|
|
1
|
+
import{D as l,E as a}from"./chunk-WDKWHGJU.js";import{a as n,b as s}from"./chunk-OAWYVETM.js";import"./chunk-Y5E7ZCCX.js";import"./chunk-LJEWPIEI.js";import"./chunk-FE4MKOI4.js";import"./chunk-HISXAZ4Y.js";var u=async p=>{let{root:t}=await a();if(!await l(t))return console.error("noskills is not initialized. Run: noskills init"),s({exitCode:1});let r=3e3,o=!1;for(let e of p??[])e.startsWith("--port=")&&(r=parseInt(e.slice(7),10)),e==="--open"&&(o=!0);let c="@eserstack/noskills-web",i;try{i=(await import(c)).startServer}catch{return console.error("@eserstack/noskills-web is not installed. Run: pnpm install"),s({exitCode:1})}return await i({root:t,port:r,open:o}),n(void 0)};export{u as main};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as P}from"./chunk-
|
|
1
|
+
import{a as P}from"./chunk-NPWXEWRN.js";import{d as f,f as n,g as u,o as w,q as h,r as S}from"./chunk-VXU6XZ66.js";import{a as T,d as L}from"./chunk-FYFUEK4U.js";import{h as I}from"./chunk-5RLCKUIF.js";import{K as A,q as v,y as D}from"./chunk-EVJYA7S3.js";import"./chunk-XDRX4ZBJ.js";import"./chunk-IFE5SYGK.js";import"./chunk-VJRCTYGL.js";import"./chunk-O4KKKYCH.js";import"./chunk-ONJVI5AZ.js";import{E as C,f as g,h as x,j as E,k,m as y}from"./chunk-WDKWHGJU.js";import{a as m,b as i}from"./chunk-OAWYVETM.js";import{i as d}from"./chunk-Y5E7ZCCX.js";import"./chunk-LJEWPIEI.js";import"./chunk-FE4MKOI4.js";import"./chunk-HISXAZ4Y.js";var z=async c=>{let e=w({renderer:S.ansi(),sink:h.stdout()}),{root:r}=await C(),p=E(c);if(!p.ok)return e.writeln(n(p.error)),await e.close(),i({exitCode:1});let o=(c??[]).filter(a=>!a.startsWith("--spec=")).join(" ");if(o.length===0)return e.writeln(n('A reason is required: noskills wontfix "reason text"')),await e.close(),i({exitCode:1});let t;try{t=await x(r,p.spec)}catch(a){let $=a instanceof Error?a.message:String(a);return e.writeln(n($)),await e.close(),i({exitCode:1})}if(t.phase==="IDLE"||t.phase==="UNINITIALIZED"||t.phase==="COMPLETED")return e.writeln(n(`Cannot mark as won't fix in phase: ${t.phase}`)),await e.close(),i({exitCode:1});if(t.spec!==null){let a=`${r}/${g.specDir(t.spec)}`;try{await d.fs.stat(a)}catch{return e.writeln(n(`Active spec '${t.spec}' directory not found.`)),e.writeln(f("Run `noskills reset` to return to idle.")),await e.close(),i({exitCode:1})}}let l=await I(r),s=v(t,"wontfix",o);s=D(s,t.phase,"COMPLETED",l,o),s.spec!==null&&await y(r,s.spec,s);let U=A(s);return await k(r,U),s.spec!==null&&(await T(r,s.spec,"wontfix"),await L(r,s.spec,"wontfix")),await P(r,{ts:new Date().toISOString(),type:"phase-change",spec:t.spec??"unknown",user:l.name,from:t.phase,to:"COMPLETED",reason:"wontfix"}),e.writeln(u("\u2714"),` Spec marked as won't fix: ${o}`),await e.close(),m(void 0)};export{z as main};
|
package/noskills.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as t}from"./chunks/chunk-CH6A3LES.js";import{e as s}from"./chunks/chunk-OAWYVETM.js";import{i as o}from"./chunks/chunk-Y5E7ZCCX.js";import"./chunks/chunk-LJEWPIEI.js";import"./chunks/chunk-FE4MKOI4.js";import"./chunks/chunk-HISXAZ4Y.js";var i=new t({description:"noskills \u2014 state-machine orchestrator for AI agents",modules:{init:{description:"Initialize noskills in project",load:()=>import("./chunks/init-
|
|
2
|
+
import{a as t}from"./chunks/chunk-CH6A3LES.js";import{e as s}from"./chunks/chunk-OAWYVETM.js";import{i as o}from"./chunks/chunk-Y5E7ZCCX.js";import"./chunks/chunk-LJEWPIEI.js";import"./chunks/chunk-FE4MKOI4.js";import"./chunks/chunk-HISXAZ4Y.js";var i=new t({description:"noskills \u2014 state-machine orchestrator for AI agents",modules:{init:{description:"Initialize noskills in project",load:()=>import("./chunks/init-WDRNFT57.js")},status:{description:"Show current state",load:()=>import("./chunks/status-SZZXY7V3.js")},spec:{description:"Manage specs (new, list)",load:()=>import("./chunks/spec-O7F525UN.js")},validate:{description:"Read-only completeness check for a spec (CI-friendly)",load:()=>import("./chunks/validate-UZD6JBSG.js")},ledger:{description:"Read-only decision ledger + maturity summary for a spec",load:()=>import("./chunks/ledger-QYK252DV.js")},next:{description:"Get next instruction for agent",load:()=>import("./chunks/next-QXCLZ7P3.js")},approve:{description:"Approve phase transition",load:()=>import("./chunks/approve-3TKOHYHH.js")},block:{description:"Mark spec as blocked",load:()=>import("./chunks/block-Q4WAIX7X.js")},reset:{description:"Reset current spec state",load:()=>import("./chunks/reset-OOTZXW6Q.js")},done:{description:"Mark spec execution as complete",load:()=>import("./chunks/done-V54GSSTY.js")},free:{description:"Show idle mode info (noskills starts permissive by default)",load:()=>import("./chunks/free-KD344KRL.js")},cancel:{description:"Cancel current spec",load:()=>import("./chunks/cancel-DY76ADX4.js")},wontfix:{description:"Mark spec as won't fix (requires reason)",load:()=>import("./chunks/wontfix-UDCTLHNB.js")},reopen:{description:"Reopen a completed spec for revision",load:()=>import("./chunks/reopen-L37M5XUI.js")},concern:{description:"Manage concerns (add, remove, list)",load:()=>import("./chunks/concern-UIGVWDFS.js")},run:{description:"Autonomous execution loop (Ralph loop)",load:()=>import("./chunks/run-YHCIRY7Z.js")},watch:{description:"Live dashboard for monitoring agent progress",load:()=>import("./chunks/watch-5DNM646U.js")},web:{description:"Start web interface (browser dashboard)",load:()=>import("./chunks/web-662LNB3K.js")},sync:{description:"Regenerate tool-specific files (redirects to init)",load:()=>import("./chunks/sync-3RYRGTEA.js")},learn:{description:"Manage cross-session learnings (list, remove)",load:()=>import("./chunks/learn-WBWNJEB2.js")},diagrams:{description:"Diagram registry and staleness checks (scan, list, check, verify)",load:()=>import("./chunks/diagrams-OX4FBDGP.js")},purge:{description:"Remove all noskills content (specs, rules, concerns, hooks)",load:()=>import("./chunks/purge-PSQNN42H.js")},"invoke-hook":{description:"Internal hook handlers (called by agents)",load:()=>import("./chunks/invoke-hook-I3NTD36Q.js")},rule:{description:"Manage rules (add, list, promote)",load:()=>import("./chunks/rule-OOANQBHB.js")},config:{description:"Manage configuration (set-user, get-user, clear-user)",load:()=>import("./chunks/config-72Z4PIJN.js")},pack:{description:"Manage packs (list, install, uninstall, inspect, search)",load:()=>import("./chunks/pack-NS64WU6M.js")},session:{description:"Manage sessions for multi-instance support",load:()=>import("./chunks/session-OWWDH7KA.js")},manager:{description:"Multi-spec TUI with tab management",load:()=>import("./chunks/manager-ZSPRC5R4.js")},mgr:{description:"Alias for manager",load:()=>import("./chunks/manager-ZSPRC5R4.js")}}});var r={name:"@eserstack/noskills",version:"4.5.2",type:"module",exports:{".":"./main.ts","./mod":"./mod.ts","./module":"./module.ts","./dashboard":"./dashboard/mod.ts","./persistence":"./state/persistence.ts","./session":"./manager/session-binding.ts","./go-noskills":"./go-noskills.ts"},dependencies:{"@eserstack/agents":"workspace:*","@eserstack/ai":"workspace:*","@eserstack/ajan":"workspace:*","@eserstack/codebase":"workspace:*","@eserstack/mux":"workspace:*","@eserstack/primitives":"workspace:*","@eserstack/shell":"workspace:*","@eserstack/standards":"workspace:*","@eserstack/streams":"workspace:*",esbuild:"^0.28.2",yaml:"^2.9.1"},devDependencies:{"@std/assert":"npm:@jsr/std__assert@^1.0.19","@std/testing":"npm:@jsr/std__testing@^1.0.20"}};var p=i.toCommand("noskills",r.version),c=async()=>await p.parse();if(import.meta.main){let a=await c();s(a,{ok:()=>{},fail:e=>{e.message!==void 0&&console.error(e.message),o.process.setExitCode(e.exitCode)}})}export{c as main};
|