noskills 4.5.2 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -646
- package/dist/launcher.js +162 -0
- package/dist/noskills.js +38 -0
- package/package.json +33 -5
- package/chunks/ajan-bridge-BNPC757J.js +0 -1
- package/chunks/anthropic-ZKOMTKX2.js +0 -1
- package/chunks/approve-3TKOHYHH.js +0 -1
- package/chunks/ask-UB26SBWQ.js +0 -2
- package/chunks/block-Q4WAIX7X.js +0 -1
- package/chunks/browser-BGFD24RX.js +0 -1
- package/chunks/bun-WZ7BVR7Y.js +0 -1
- package/chunks/cancel-DY76ADX4.js +0 -1
- package/chunks/chunk-34RPTI4K.js +0 -29
- package/chunks/chunk-3JTDWOAJ.js +0 -2
- package/chunks/chunk-5FX4EBFY.js +0 -5
- package/chunks/chunk-5OTECUN7.js +0 -1
- package/chunks/chunk-5RLCKUIF.js +0 -2
- package/chunks/chunk-7PBHRFOZ.js +0 -3
- package/chunks/chunk-7PPUGTKL.js +0 -4
- package/chunks/chunk-AB3N327V.js +0 -1
- package/chunks/chunk-AUZWXMWA.js +0 -27
- package/chunks/chunk-BYPCI5VU.js +0 -1
- package/chunks/chunk-CH6A3LES.js +0 -91
- package/chunks/chunk-CKIZYL4O.js +0 -3
- package/chunks/chunk-CTTMQSHF.js +0 -1
- package/chunks/chunk-DEHRWREM.js +0 -1
- package/chunks/chunk-DYCGJ4RY.js +0 -4
- package/chunks/chunk-EJYSOUEA.js +0 -1
- package/chunks/chunk-ENP4P2YH.js +0 -0
- package/chunks/chunk-EROZRDGT.js +0 -2
- package/chunks/chunk-EVJYA7S3.js +0 -21
- package/chunks/chunk-FE4MKOI4.js +0 -1
- package/chunks/chunk-FYFUEK4U.js +0 -3
- package/chunks/chunk-GNMOE7H3.js +0 -48
- package/chunks/chunk-HB62UGZI.js +0 -2
- package/chunks/chunk-HISXAZ4Y.js +0 -1
- package/chunks/chunk-I4Z2RF7L.js +0 -31
- package/chunks/chunk-IFE5SYGK.js +0 -1
- package/chunks/chunk-IM73MYMS.js +0 -1
- package/chunks/chunk-J25XTDQQ.js +0 -1
- package/chunks/chunk-JYVB6UAV.js +0 -1
- package/chunks/chunk-KJLEPI7T.js +0 -1
- package/chunks/chunk-KRRPOVQG.js +0 -1
- package/chunks/chunk-LGQEWL5X.js +0 -1
- package/chunks/chunk-LJEWPIEI.js +0 -1
- package/chunks/chunk-LKZZ4JN5.js +0 -110
- package/chunks/chunk-NGCBWJML.js +0 -2
- package/chunks/chunk-NPWXEWRN.js +0 -4
- package/chunks/chunk-O4KKKYCH.js +0 -1
- package/chunks/chunk-OAWYVETM.js +0 -1
- package/chunks/chunk-ONJVI5AZ.js +0 -23
- package/chunks/chunk-OP4XAIGW.js +0 -1
- package/chunks/chunk-PSX63TYP.js +0 -2
- package/chunks/chunk-Q4TI7EYT.js +0 -5
- package/chunks/chunk-SLO22P65.js +0 -1
- package/chunks/chunk-T6NZVA6P.js +0 -7
- package/chunks/chunk-TCSIXKUD.js +0 -3
- package/chunks/chunk-VJRCTYGL.js +0 -1
- package/chunks/chunk-VXU6XZ66.js +0 -39
- package/chunks/chunk-WDKWHGJU.js +0 -146
- package/chunks/chunk-XDPATEP5.js +0 -1
- package/chunks/chunk-XDRX4ZBJ.js +0 -5
- package/chunks/chunk-Y45DQJSS.js +0 -3
- package/chunks/chunk-Y5E7ZCCX.js +0 -1
- package/chunks/chunk-YUTDPPXX.js +0 -1
- package/chunks/chunk-Z7OYXH3J.js +0 -1
- package/chunks/claude-code-OQJIUKZP.js +0 -1
- package/chunks/cmd-46ZIHXLB.js +0 -1
- package/chunks/concern-UIGVWDFS.js +0 -1
- package/chunks/config-72Z4PIJN.js +0 -1
- package/chunks/decision-ledger-5IPPTRT7.js +0 -1
- package/chunks/delegate-OV6NY434.js +0 -1
- package/chunks/deno-YM5PW6ZM.js +0 -1
- package/chunks/diagrams-CBCUA47B.js +0 -1
- package/chunks/diagrams-OX4FBDGP.js +0 -1
- package/chunks/dist-3MH5UCQU.js +0 -12
- package/chunks/done-V54GSSTY.js +0 -1
- package/chunks/followup-NL7EPIGF.js +0 -1
- package/chunks/free-KD344KRL.js +0 -1
- package/chunks/gemini-23EOEXSF.js +0 -1
- package/chunks/init-WDRNFT57.js +0 -1
- package/chunks/invoke-hook-I3NTD36Q.js +0 -13
- package/chunks/kiro-TPAAIMY6.js +0 -1
- package/chunks/learn-WBWNJEB2.js +0 -7
- package/chunks/ledger-QYK252DV.js +0 -1
- package/chunks/list-WO6RS7JX.js +0 -1
- package/chunks/loader-command-3A5FK2RF.js +0 -1
- package/chunks/loader-reactor-YZM7HO4G.js +0 -1
- package/chunks/manager-ZSPRC5R4.js +0 -3
- package/chunks/mod-7VTKN6Q5.js +0 -1
- package/chunks/mod-B6LBGYON.js +0 -1
- package/chunks/mod-MMHDQRNF.js +0 -1
- package/chunks/mod-RBGAMGZA.js +0 -1
- package/chunks/mod-SFSUQWSB.js +0 -8
- package/chunks/mod-SV4VELMH.js +0 -1
- package/chunks/multipart-parser-DKDFOZKD.js +0 -2
- package/chunks/next-QXCLZ7P3.js +0 -15
- package/chunks/node-2XIHQ2M4.js +0 -1
- package/chunks/node-BXYZKSJY.js +0 -15
- package/chunks/node-DMUOWFGA.js +0 -69
- package/chunks/node-J4GTOSL2.js +0 -1
- package/chunks/ollama-MXRDGQDF.js +0 -1
- package/chunks/openai-LE47IWMQ.js +0 -30
- package/chunks/openai-MSJF4B6H.js +0 -1
- package/chunks/opencode-ZDHKR2P6.js +0 -1
- package/chunks/pack-NS64WU6M.js +0 -5
- package/chunks/plan-export-HECAF7D4.js +0 -3
- package/chunks/purge-PSQNN42H.js +0 -4
- package/chunks/reopen-L37M5XUI.js +0 -1
- package/chunks/reset-OOTZXW6Q.js +0 -1
- package/chunks/review-QLD6WSOB.js +0 -1
- package/chunks/rule-OOANQBHB.js +0 -6
- package/chunks/run-YHCIRY7Z.js +0 -3
- package/chunks/sdk-OQIHH3OY.js +0 -1
- package/chunks/session-OWWDH7KA.js +0 -1
- package/chunks/spec-O7F525UN.js +0 -1
- package/chunks/src-HXQVVTGQ.js +0 -3
- package/chunks/status-SZZXY7V3.js +0 -1
- package/chunks/sync-3RYRGTEA.js +0 -1
- package/chunks/unstable_chmod-44MCKF3B.js +0 -1
- package/chunks/validate-UZD6JBSG.js +0 -1
- package/chunks/vertexai-CVCRCO24.js +0 -1
- package/chunks/watch-5DNM646U.js +0 -8
- package/chunks/web-662LNB3K.js +0 -1
- package/chunks/wontfix-UDCTLHNB.js +0 -1
- package/chunks/workerd-I7MLRCLJ.js +0 -1
- package/noskills.js +0 -2
|
@@ -1 +0,0 @@
|
|
|
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};
|
|
@@ -1 +0,0 @@
|
|
|
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};
|
package/chunks/pack-NS64WU6M.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
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
|
-
`)},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
|
-
`),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
|
-
`),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+`
|
|
5
|
-
`),l.push(`${p}/.folder-rules.md`)}return{name:e,version:n.manifest.version,installedAt:new Date().toISOString(),source:"builtin",rules:i,concerns:t,folderRules:l}},oe=async(r,e,n)=>{let i=n.name,t=[],l=[],u=[],c=`${r}/${y.rulesDir}`;if(await m.fs.mkdir(c,{recursive:!0}),n.rules!==void 0)for(let o of n.rules){let a=await j(e,o),s=o.replace(/^rules\//,"").replace(/\.md$/,""),d=`pack-${i}-${s}.md`;await m.fs.writeTextFile(`${c}/${d}`,a),t.push(d)}if(n.concerns!==void 0&&n.concerns.length>0){let o=`${r}/${y.concernsDir}`;await m.fs.mkdir(o,{recursive:!0});let a=await W(r);for(let s of n.concerns){let d=await j(e,s),k=JSON.parse(d),q=`${String(a).padStart(3,"0")}-${k.id}.json`;await m.fs.writeTextFile(`${o}/${q}`,d),l.push(q),a++}}if(n.folderRules!==void 0)for(let[o,a]of Object.entries(n.folderRules)){let s=await j(e,a),d=`${r}/${o}/.folder-rules.md`;await m.fs.mkdir(`${r}/${o}`,{recursive:!0}),await m.fs.writeTextFile(d,s),u.push(`${o}/.folder-rules.md`)}return{name:i,version:n.version,installedAt:new Date().toISOString(),source:e,rules:t,concerns:l,folderRules:u}},ce=async()=>{let r=P({renderer:v.ansi(),sink:S.stdout()}),{root:e}=await R(),n=await M(e),i=new Set(n.installed.map(t=>t.name));r.writeln(h("Built-in packs:"));for(let[t,l]of x){let u=Object.keys(l.ruleContents).length,c=l.concernContents.length,p=[];u>0&&p.push(`${u} rules`),c>0&&p.push(`${c} concern${c>1?"s":""}`),r.writeln(" ",h(t.padEnd(16)),f(l.manifest.description),f(` (${p.join(", ")})`))}if(r.writeln(""),r.writeln(h("Installed packs:")),n.installed.length===0)r.writeln(f(" No packs installed."));else for(let t of n.installed){let l=t.installedAt.slice(0,10);r.writeln(" ",i.has(t.name)?F(t.name.padEnd(16)):h(t.name.padEnd(16)),f(`v${t.version}`),f(` (installed ${l})`))}return await r.close(),$(void 0)},le=async r=>{let e=P({renderer:v.ansi(),sink:S.stdout()}),{root:n}=await R(),i=r?.[0];if(i===void 0||i.length===0){let a=C();return e.writeln(w("Please provide a pack name: "),h(`${a} pack install typescript`)),await e.close(),g({exitCode:1})}let t=await M(n),l=i.includes("/")||i.includes(":"),u=l?O(i)?.packPath??i:i;if(t.installed.some(a=>a.name===u))return e.writeln(w(`Pack "${u}" is already installed.`)),e.writeln(f(" Uninstall first to re-install.")),await e.close(),g({exitCode:1});let c;if(l){e.writeln(f(`Fetching pack from ${i}...`));try{let a=await Q(i);if(a.requires!==void 0){for(let s of a.requires)if(!t.installed.some(d=>d.name===s)){e.writeln(f(` Installing dependency: ${s}`));let d=b(s);if(d!==void 0){let k=await A(n,s,d);t.installed.push(k)}}}c=await oe(n,i,a)}catch(a){return e.writeln(w(`Failed to install: ${a instanceof Error?a.message:String(a)}`)),await e.close(),g({exitCode:1})}}else{let a=b(i);if(a===void 0)return e.writeln(w(`Unknown pack: ${i}`)),e.writeln(f(` Available built-in packs: ${[...x.keys()].join(", ")}`)),await e.close(),g({exitCode:1});if(a.manifest.requires!==void 0){for(let s of a.manifest.requires)if(!t.installed.some(d=>d.name===s)){e.writeln(f(` Installing dependency: ${s}`));let d=b(s);if(d!==void 0){let k=await A(n,s,d),I=[...t.installed,k];await D(n,{installed:I})}}}c=await A(n,i,a)}let p={installed:[...t.installed,c]};await D(n,p);let o=await T(n);return o!==null&&o.tools.length>0&&(await E(n,o.tools,o),e.writeln(f(" Tool files synced."))),e.writeln(F("\u2714"),` Pack "${c.name}" v${c.version} installed.`),c.rules.length>0&&e.writeln(f(` Rules: ${c.rules.join(", ")}`)),c.concerns.length>0&&e.writeln(f(` Concerns: ${c.concerns.join(", ")}`)),await e.close(),$(void 0)},de=async r=>{let e=P({renderer:v.ansi(),sink:S.stdout()}),{root:n}=await R(),i=r?.[0];if(i===void 0||i.length===0){let s=C();return e.writeln(w("Please provide a pack name: "),h(`${s} pack uninstall typescript`)),await e.close(),g({exitCode:1})}let t=await M(n),l=t.installed.find(s=>s.name===i);if(l===void 0)return e.writeln(w(`Pack "${i}" is not installed.`)),await e.close(),g({exitCode:1});let u=[];for(let s of t.installed){if(s.name===i)continue;let d=b(s.name);d?.manifest.requires!==void 0&&d.manifest.requires.includes(i)&&u.push(s.name)}u.length>0&&e.writeln(w(`Warning: pack "${i}" is required by: ${u.join(", ")}`));let c=`${n}/${y.rulesDir}`;for(let s of l.rules)try{await m.fs.remove(`${c}/${s}`)}catch{}let p=`${n}/${y.concernsDir}`;for(let s of l.concerns)try{await m.fs.remove(`${p}/${s}`)}catch{}for(let s of l.folderRules)try{await m.fs.remove(`${n}/${s}`)}catch{}let o={installed:t.installed.filter(s=>s.name!==i)};await D(n,o);let a=await T(n);return a!==null&&a.tools.length>0&&(await E(n,a.tools,a),e.writeln(f(" Tool files synced."))),e.writeln(F("\u2714"),` Pack "${i}" uninstalled.`),await e.close(),$(void 0)},ue=async r=>{let e=P({renderer:v.ansi(),sink:S.stdout()}),n=r?.[0];if(n===void 0||n.length===0){let s=C();return e.writeln(w("Please provide a pack name: "),h(`${s} pack inspect typescript`)),await e.close(),g({exitCode:1})}let i=n.includes("/")||n.includes(":"),t,l=null,u=null;if(i)try{t=await Q(n)}catch(s){return e.writeln(w(`Failed to fetch: ${s instanceof Error?s.message:String(s)}`)),await e.close(),g({exitCode:1})}else{let s=b(n);if(s===void 0)return e.writeln(w(`Unknown pack: ${n}`)),await e.close(),g({exitCode:1});t=s.manifest,l=s.ruleContents,u=s.concernContents}e.writeln(h(`Pack: ${t.name}`),f(` v${t.version}`)),e.writeln(`Description: ${t.description}`),t.author!==void 0&&e.writeln(`Author: ${t.author}`),t.tags!==void 0&&t.tags.length>0&&e.writeln(`Tags: ${t.tags.join(", ")}`),e.writeln("");let c=t.rules?.length??0;if(e.writeln(h(`Rules (${c}):`)),l!==null)for(let[s,d]of Object.entries(l))e.writeln(` - ${s}: `,f(`"${d}"`));else if(t.rules!==void 0)for(let s of t.rules){let d=s.replace(/^rules\//,"").replace(/\.md$/,"");e.writeln(` - ${d}`)}let p=t.concerns?.length??0;if(e.writeln(""),e.writeln(h(`Concerns (${p}):`)),u!==null&&u.length>0)for(let s of u)e.writeln(` - ${s.id}: ${s.name}`),s.acceptanceCriteria.length>0&&e.writeln(f(` ACs: "${s.acceptanceCriteria.join('", "')}"`));else p===0&&e.writeln(f(" none"));let o=t.folderRules!==void 0?Object.keys(t.folderRules).length:0;e.writeln(""),e.writeln(`Folder rules: ${o>0?o:"none"}`);let a=t.requires?.length??0;return e.writeln(`Dependencies: ${a>0?t.requires.join(", "):"none"}`),await e.close(),$(void 0)},pe=async r=>{let e=P({renderer:v.ansi(),sink:S.stdout()}),n=r?.[0]?.toLowerCase();if(n===void 0||n.length===0){let c=C();return e.writeln(w("Please provide a search query: "),h(`${c} pack search typescript`)),await e.close(),g({exitCode:1})}e.writeln(h("Matching packs:"));let i=!1;for(let[c,p]of x){let o=p.manifest.tags??[],a=c.includes(n),s=o.some(k=>k.includes(n)),d=p.manifest.description.toLowerCase().includes(n);(a||s||d)&&(e.writeln(" ",h(c.padEnd(16)),f(p.manifest.description),f(" [builtin]")),i=!0)}let{root:t}=await R(),u=(await T(t))?.packRegistry;if(u!==void 0)try{let c=await globalThis.fetch(u,{signal:AbortSignal.timeout(N)});if(c.ok){let p=JSON.parse(await c.text());for(let o of p.packs){let a=o.tags??[],s=o.name.includes(n),d=a.some(I=>I.includes(n)),k=o.description.toLowerCase().includes(n);(s||d||k)&&(e.writeln(" ",h(o.name.padEnd(16)),f(o.description),f(` [${o.source}]`)),i=!0)}}}catch{}return i||e.writeln(f(` No packs matching "${n}" found.`)),await e.close(),$(void 0)};export{A as installBuiltinPack,oe as installRemotePack,je as main,M as readPacksFile,D as writePacksFile};
|
|
@@ -1,3 +0,0 @@
|
|
|
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
|
-
`).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
|
-
`),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};
|
package/chunks/purge-PSQNN42H.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
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
|
-
`+r.slice(c+s.length).trimStart(),await a.fs.writeTextFile(t,r.trimEnd()+`
|
|
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
|
-
`),!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 +0,0 @@
|
|
|
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};
|
package/chunks/reset-OOTZXW6Q.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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};
|
package/chunks/rule-OOANQBHB.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
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
|
-
`,t.length>0&&(l+=`phases: [${t.join(", ")}]
|
|
3
|
-
`),r.length>0&&(l+=`applies_to: [${r.map(o=>`"${o}"`).join(", ")}]
|
|
4
|
-
`),l+=`---
|
|
5
|
-
`),l+=c+`
|
|
6
|
-
`;let E=`${i}/${j.rulesDir}/${D}.md`;await $.fs.mkdir(`${i}/${j.rulesDir}`,{recursive:!0}),await $.fs.writeTextFile(E,l);let f=[];t.length>0&&f.push(t.join(", ")),r.length>0&&f.push(r.join(", "));let L=f.length>0?` [${f.join("; ")}]`:"";return s.writeln(v("\u2714")," Rule added: ",a(c),a(L)),m!==null&&m.tools.length>0&&(await C(i,m.tools,m),s.writeln(a(" Tool files synced."))),await s.close(),h(void 0)},W=async()=>{let e=p({renderer:u.ansi(),sink:d.stdout()}),{root:s}=await x(),i=await A(s);if(e.writeln(y("Rules")),e.writeln(""),i.length===0)e.writeln(a(` No rules yet. Add one with: ${P('rule add "..."')}`));else for(let t=0;t<i.length;t++){let r=i[t],n=[];r.phases!==void 0&&r.phases.length>0?n.push(r.phases.join(", ")):n.push("all phases"),r.appliesTo!==void 0&&r.appliesTo.length>0?n.push(r.appliesTo.join(", ")):n.push("all files"),e.writeln(` ${t+1}. ${r.text} `,a(`[${n.join(", ")}]`))}return await e.close(),h(void 0)},U=async e=>{let s=p({renderer:u.ansi(),sink:d.stdout()}),i=e?.join(" ");return i===void 0||i.length===0?(s.writeln(k("Please provide the decision text to promote.")),await s.close(),w({exitCode:1})):(await s.close(),await b(e))};export{B as main};
|
package/chunks/run-YHCIRY7Z.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
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
|
-
`)},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
|
-
`;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};
|
package/chunks/sdk-OQIHH3OY.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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};
|
package/chunks/spec-O7F525UN.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
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};
|
package/chunks/src-HXQVVTGQ.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a as j,b as Ie,c as ze,d as I,e as ae,f as fe,g as Ne,h as De,i as Me,j as We,k as Ve}from"./chunk-I4Z2RF7L.js";import{b as y}from"./chunk-HISXAZ4Y.js";function Ge(r){if(!/^data:/i.test(r))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');r=r.replace(/\r?\n/g,"");let e=r.indexOf(",");if(e===-1||e<=4)throw new TypeError("malformed data: URI");let t=r.substring(5,e).split(";"),n="",o=!1,s=t[0]||"text/plain",i=s;for(let R=1;R<t.length;R++)t[R]==="base64"?o=!0:t[R]&&(i+=`;${t[R]}`,t[R].indexOf("charset=")===0&&(n=t[R].substring(8)));!t[0]&&!n.length&&(i+=";charset=US-ASCII",n="US-ASCII");let c=o?"base64":"ascii",l=unescape(r.substring(e+1)),a=Buffer.from(l,c);return a.type=s,a.typeFull=i,a.charset=n,a}var ce,le=y(()=>{ce=Ge});var U,M=y(()=>{U=class extends Error{constructor(e,t){super(e),Error.captureStackTrace(this,this.constructor),this.type=t}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}}});var p,q=y(()=>{M();p=class extends U{constructor(e,t,n){super(e,t),n&&(this.code=this.errno=n.code,this.erroredSysCall=n.syscall)}}});var W,ee,z,ue,he,de,V=y(()=>{W=Symbol.toStringTag,ee=r=>typeof r=="object"&&typeof r.append=="function"&&typeof r.delete=="function"&&typeof r.get=="function"&&typeof r.getAll=="function"&&typeof r.has=="function"&&typeof r.set=="function"&&typeof r.sort=="function"&&r[W]==="URLSearchParams",z=r=>r&&typeof r=="object"&&typeof r.arrayBuffer=="function"&&typeof r.type=="string"&&typeof r.stream=="function"&&typeof r.constructor=="function"&&/^(Blob|File)$/.test(r[W]),ue=r=>typeof r=="object"&&(r[W]==="AbortSignal"||r[W]==="EventTarget"),he=(r,e)=>{let t=new URL(e).hostname,n=new URL(r).hostname;return t===n||t.endsWith(`.${n}`)},de=(r,e)=>{let t=new URL(e).protocol,n=new URL(r).protocol;return t===n}});import v,{PassThrough as pe}from"node:stream";import{types as me,deprecate as te,promisify as Ke}from"node:util";import{Buffer as b}from"node:buffer";async function re(r){if(r[m].disturbed)throw new TypeError(`body used already for: ${r.url}`);if(r[m].disturbed=!0,r[m].error)throw r[m].error;let{body:e}=r;if(e===null)return b.alloc(0);if(!(e instanceof v))return b.alloc(0);let t=[],n=0;try{for await(let o of e){if(r.size>0&&n+o.length>r.size){let s=new p(`content size at ${r.url} over limit: ${r.size}`,"max-size");throw e.destroy(s),s}n+=o.length,t.push(o)}}catch(o){throw o instanceof U?o:new p(`Invalid response body while trying to fetch ${r.url}: ${o.message}`,"system",o)}if(e.readableEnded===!0||e._readableState.ended===!0)try{return t.every(o=>typeof o=="string")?b.from(t.join("")):b.concat(t,n)}catch(o){throw new p(`Could not create Buffer from response body for ${r.url}: ${o.message}`,"system",o)}else throw new p(`Premature close of server response while trying to fetch ${r.url}`)}var Ye,m,E,F,Je,G,ye,ge,K=y(()=>{Ie();fe();q();M();V();Ye=Ke(v.pipeline),m=Symbol("Body internals"),E=class{constructor(e,{size:t=0}={}){let n=null;e===null?e=null:ee(e)?e=b.from(e.toString()):z(e)||b.isBuffer(e)||(me.isAnyArrayBuffer(e)?e=b.from(e):ArrayBuffer.isView(e)?e=b.from(e.buffer,e.byteOffset,e.byteLength):e instanceof v||(e instanceof I?(e=ae(e),n=e.type.split("=")[1]):e=b.from(String(e))));let o=e;b.isBuffer(e)?o=v.Readable.from(e):z(e)&&(o=v.Readable.from(e.stream())),this[m]={body:e,stream:o,boundary:n,disturbed:!1,error:null},this.size=t,e instanceof v&&e.on("error",s=>{let i=s instanceof U?s:new p(`Invalid response body while trying to fetch ${this.url}: ${s.message}`,"system",s);this[m].error=i})}get body(){return this[m].stream}get bodyUsed(){return this[m].disturbed}async arrayBuffer(){let{buffer:e,byteOffset:t,byteLength:n}=await re(this);return e.slice(t,t+n)}async formData(){let e=this.headers.get("content-type");if(e.startsWith("application/x-www-form-urlencoded")){let n=new I,o=new URLSearchParams(await this.text());for(let[s,i]of o)n.append(s,i);return n}let{toFormData:t}=await import("./multipart-parser-DKDFOZKD.js");return t(this.body,e)}async blob(){let e=this.headers&&this.headers.get("content-type")||this[m].body&&this[m].body.type||"",t=await this.arrayBuffer();return new j([t],{type:e})}async json(){let e=await this.text();return JSON.parse(e)}async text(){let e=await re(this);return new TextDecoder().decode(e)}buffer(){return re(this)}};E.prototype.buffer=te(E.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer");Object.defineProperties(E.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:te(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});F=(r,e)=>{let t,n,{body:o}=r[m];if(r.bodyUsed)throw new Error("cannot clone body after it is used");return o instanceof v&&typeof o.getBoundary!="function"&&(t=new pe({highWaterMark:e}),n=new pe({highWaterMark:e}),o.pipe(t),o.pipe(n),r[m].stream=t,o=n),o},Je=te(r=>r.getBoundary(),"form-data doesn't follow the spec and requires special treatment. Use alternative package","https://github.com/node-fetch/node-fetch/issues/1167"),G=(r,e)=>r===null?null:typeof r=="string"?"text/plain;charset=UTF-8":ee(r)?"application/x-www-form-urlencoded;charset=UTF-8":z(r)?r.type||null:b.isBuffer(r)||me.isAnyArrayBuffer(r)||ArrayBuffer.isView(r)?null:r instanceof I?`multipart/form-data; boundary=${e[m].boundary}`:r&&typeof r.getBoundary=="function"?`multipart/form-data;boundary=${Je(r)}`:r instanceof v?null:"text/plain;charset=UTF-8",ye=r=>{let{body:e}=r[m];return e===null?0:z(e)?e.size:b.isBuffer(e)?e.length:e&&typeof e.getLengthSync=="function"&&e.hasKnownLength&&e.hasKnownLength()?e.getLengthSync():null},ge=async(r,{body:e})=>{e===null?r.end():await Ye(e,r)}});import{types as we}from"node:util";import J from"node:http";function be(r=[]){return new g(r.reduce((e,t,n,o)=>(n%2===0&&e.push(o.slice(n,n+2)),e),[]).filter(([e,t])=>{try{return Y(e),oe(e,String(t)),!0}catch{return!1}}))}var Y,oe,g,_=y(()=>{Y=typeof J.validateHeaderName=="function"?J.validateHeaderName:r=>{if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(r)){let e=new TypeError(`Header name must be a valid HTTP token [${r}]`);throw Object.defineProperty(e,"code",{value:"ERR_INVALID_HTTP_TOKEN"}),e}},oe=typeof J.validateHeaderValue=="function"?J.validateHeaderValue:(r,e)=>{if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(e)){let t=new TypeError(`Invalid character in header content ["${r}"]`);throw Object.defineProperty(t,"code",{value:"ERR_INVALID_CHAR"}),t}},g=class r extends URLSearchParams{constructor(e){let t=[];if(e instanceof r){let n=e.raw();for(let[o,s]of Object.entries(n))t.push(...s.map(i=>[o,i]))}else if(e!=null)if(typeof e=="object"&&!we.isBoxedPrimitive(e)){let n=e[Symbol.iterator];if(n==null)t.push(...Object.entries(e));else{if(typeof n!="function")throw new TypeError("Header pairs must be iterable");t=[...e].map(o=>{if(typeof o!="object"||we.isBoxedPrimitive(o))throw new TypeError("Each header pair must be an iterable object");return[...o]}).map(o=>{if(o.length!==2)throw new TypeError("Each header pair must be a name/value tuple");return[...o]})}}else throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence<sequence<ByteString>> or record<ByteString, ByteString>)");return t=t.length>0?t.map(([n,o])=>(Y(n),oe(n,String(o)),[String(n).toLowerCase(),String(o)])):void 0,super(t),new Proxy(this,{get(n,o,s){switch(o){case"append":case"set":return(i,c)=>(Y(i),oe(i,String(c)),URLSearchParams.prototype[o].call(n,String(i).toLowerCase(),String(c)));case"delete":case"has":case"getAll":return i=>(Y(i),URLSearchParams.prototype[o].call(n,String(i).toLowerCase()));case"keys":return()=>(n.sort(),new Set(URLSearchParams.prototype.keys.call(n)).keys());default:return Reflect.get(n,o,s)}}})}get[Symbol.toStringTag](){return this.constructor.name}toString(){return Object.prototype.toString.call(this)}get(e){let t=this.getAll(e);if(t.length===0)return null;let n=t.join(", ");return/^content-encoding$/i.test(e)&&(n=n.toLowerCase()),n}forEach(e,t=void 0){for(let n of this.keys())Reflect.apply(e,t,[this.get(n),n,this])}*values(){for(let e of this.keys())yield this.get(e)}*entries(){for(let e of this.keys())yield[e,this.get(e)]}[Symbol.iterator](){return this.entries()}raw(){return[...this.keys()].reduce((e,t)=>(e[t]=this.getAll(t),e),{})}[Symbol.for("nodejs.util.inspect.custom")](){return[...this.keys()].reduce((e,t)=>{let n=this.getAll(t);return t==="host"?e[t]=n[0]:e[t]=n.length>1?n:n[0],e},{})}};Object.defineProperties(g.prototype,["get","entries","forEach","values"].reduce((r,e)=>(r[e]={enumerable:!0},r),{}))});var _e,Z,ne=y(()=>{_e=new Set([301,302,303,307,308]),Z=r=>_e.has(r)});var T,S,Se=y(()=>{_();K();ne();T=Symbol("Response internals"),S=class r extends E{constructor(e=null,t={}){super(e,t);let n=t.status!=null?t.status:200,o=new g(t.headers);if(e!==null&&!o.has("Content-Type")){let s=G(e,this);s&&o.append("Content-Type",s)}this[T]={type:"default",url:t.url,status:n,statusText:t.statusText||"",headers:o,counter:t.counter,highWaterMark:t.highWaterMark}}get type(){return this[T].type}get url(){return this[T].url||""}get status(){return this[T].status}get ok(){return this[T].status>=200&&this[T].status<300}get redirected(){return this[T].counter>0}get statusText(){return this[T].statusText}get headers(){return this[T].headers}get highWaterMark(){return this[T].highWaterMark}clone(){return new r(F(this,this.highWaterMark),{type:this.type,url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,size:this.size,highWaterMark:this.highWaterMark})}static redirect(e,t=302){if(!Z(t))throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');return new r(null,{headers:{location:new URL(e).toString()},status:t})}static error(){let e=new r(null,{status:0,statusText:""});return e[T].type="error",e}static json(e=void 0,t={}){let n=JSON.stringify(e);if(n===void 0)throw new TypeError("data is not JSON serializable");let o=new g(t&&t.headers);return o.has("content-type")||o.set("content-type","application/json"),new r(n,{...t,headers:o})}get[Symbol.toStringTag](){return"Response"}};Object.defineProperties(S.prototype,{type:{enumerable:!0},url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}})});var Te,Re=y(()=>{Te=r=>{if(r.search)return r.search;let e=r.href.length-1,t=r.hash||(r.href[e]==="#"?"#":"");return r.href[e-t.length]==="?"?"?":""}});import{isIP as Ze}from"node:net";function xe(r,e=!1){return r==null||(r=new URL(r),/^(about|blob|data):$/.test(r.protocol))?"no-referrer":(r.username="",r.password="",r.hash="",e&&(r.pathname="",r.search=""),r)}function Le(r){if(!Ee.has(r))throw new TypeError(`Invalid referrerPolicy: ${r}`);return r}function Qe(r){if(/^(http|ws)s:$/.test(r.protocol))return!0;let e=r.host.replace(/(^\[)|(]$)/g,""),t=Ze(e);return t===4&&/^127\./.test(e)||t===6&&/^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(e)?!0:r.host==="localhost"||r.host.endsWith(".localhost")?!1:r.protocol==="file:"}function k(r){return/^about:(blank|srcdoc)$/.test(r)||r.protocol==="data:"||/^(blob|filesystem):$/.test(r.protocol)?!0:Qe(r)}function Ue(r,{referrerURLCallback:e,referrerOriginCallback:t}={}){if(r.referrer==="no-referrer"||r.referrerPolicy==="")return null;let n=r.referrerPolicy;if(r.referrer==="about:client")return"no-referrer";let o=r.referrer,s=xe(o),i=xe(o,!0);s.toString().length>4096&&(s=i),e&&(s=e(s)),t&&(i=t(i));let c=new URL(r.url);switch(n){case"no-referrer":return"no-referrer";case"origin":return i;case"unsafe-url":return s;case"strict-origin":return k(s)&&!k(c)?"no-referrer":i.toString();case"strict-origin-when-cross-origin":return s.origin===c.origin?s:k(s)&&!k(c)?"no-referrer":i;case"same-origin":return s.origin===c.origin?s:"no-referrer";case"origin-when-cross-origin":return s.origin===c.origin?s:i;case"no-referrer-when-downgrade":return k(s)&&!k(c)?"no-referrer":s;default:throw new TypeError(`Invalid referrerPolicy: ${n}`)}}function ve(r){let e=(r.get("referrer-policy")||"").split(/[,\s]+/),t="";for(let n of e)n&&Ee.has(n)&&(t=n);return t}var Ee,Pe,se=y(()=>{Ee=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]),Pe="strict-origin-when-cross-origin"});import{format as Xe}from"node:url";import{deprecate as je}from"node:util";var u,N,qe,C,Be,Ae=y(()=>{_();K();V();Re();se();u=Symbol("Request internals"),N=r=>typeof r=="object"&&typeof r[u]=="object",qe=je(()=>{},".data is not a valid RequestInit property, use .body instead","https://github.com/node-fetch/node-fetch/issues/1000 (request)"),C=class r extends E{constructor(e,t={}){let n;if(N(e)?n=new URL(e.url):(n=new URL(e),e={}),n.username!==""||n.password!=="")throw new TypeError(`${n} is an url with embedded credentials.`);let o=t.method||e.method||"GET";if(/^(delete|get|head|options|post|put)$/i.test(o)&&(o=o.toUpperCase()),!N(t)&&"data"in t&&qe(),(t.body!=null||N(e)&&e.body!==null)&&(o==="GET"||o==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body");let s=t.body?t.body:N(e)&&e.body!==null?F(e):null;super(s,{size:t.size||e.size||0});let i=new g(t.headers||e.headers||{});if(s!==null&&!i.has("Content-Type")){let a=G(s,this);a&&i.set("Content-Type",a)}let c=N(e)?e.signal:null;if("signal"in t&&(c=t.signal),c!=null&&!ue(c))throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget");let l=t.referrer==null?e.referrer:t.referrer;if(l==="")l="no-referrer";else if(l){let a=new URL(l);l=/^about:(\/\/)?client$/.test(a)?"client":a}else l=void 0;this[u]={method:o,redirect:t.redirect||e.redirect||"follow",headers:i,parsedURL:n,signal:c,referrer:l},this.follow=t.follow===void 0?e.follow===void 0?20:e.follow:t.follow,this.compress=t.compress===void 0?e.compress===void 0?!0:e.compress:t.compress,this.counter=t.counter||e.counter||0,this.agent=t.agent||e.agent,this.highWaterMark=t.highWaterMark||e.highWaterMark||16384,this.insecureHTTPParser=t.insecureHTTPParser||e.insecureHTTPParser||!1,this.referrerPolicy=t.referrerPolicy||e.referrerPolicy||""}get method(){return this[u].method}get url(){return Xe(this[u].parsedURL)}get headers(){return this[u].headers}get redirect(){return this[u].redirect}get signal(){return this[u].signal}get referrer(){if(this[u].referrer==="no-referrer")return"";if(this[u].referrer==="client")return"about:client";if(this[u].referrer)return this[u].referrer.toString()}get referrerPolicy(){return this[u].referrerPolicy}set referrerPolicy(e){this[u].referrerPolicy=Le(e)}clone(){return new r(this)}get[Symbol.toStringTag](){return"Request"}};Object.defineProperties(C.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0},referrer:{enumerable:!0},referrerPolicy:{enumerable:!0}});Be=r=>{let{parsedURL:e}=r[u],t=new g(r[u].headers);t.has("Accept")||t.set("Accept","*/*");let n=null;if(r.body===null&&/^(post|put)$/i.test(r.method)&&(n="0"),r.body!==null){let c=ye(r);typeof c=="number"&&!Number.isNaN(c)&&(n=String(c))}n&&t.set("Content-Length",n),r.referrerPolicy===""&&(r.referrerPolicy=Pe),r.referrer&&r.referrer!=="no-referrer"?r[u].referrer=Ue(r):r[u].referrer="no-referrer",r[u].referrer instanceof URL&&t.set("Referer",r.referrer),t.has("User-Agent")||t.set("User-Agent","node-fetch"),r.compress&&!t.has("Accept-Encoding")&&t.set("Accept-Encoding","gzip, deflate, br");let{agent:o}=r;typeof o=="function"&&(o=o(e));let s=Te(e),i={path:e.pathname+s,method:r.method,headers:t[Symbol.for("nodejs.util.inspect.custom")](),insecureHTTPParser:r.insecureHTTPParser,agent:o};return{parsedURL:e,options:i}}});var Q,Ce=y(()=>{M();Q=class extends U{constructor(e,t="aborted"){super(e,t)}}});import er from"node:http";import rr from"node:https";import O from"node:zlib";import $e,{PassThrough as Fe,pipeline as H}from"node:stream";import{Buffer as X}from"node:buffer";async function ke(r,e){return new Promise((t,n)=>{let o=new C(r,e),{parsedURL:s,options:i}=Be(o);if(!tr.has(s.protocol))throw new TypeError(`node-fetch cannot load ${r}. URL scheme "${s.protocol.replace(/:$/,"")}" is not supported.`);if(s.protocol==="data:"){let f=ce(o.url),P=new S(f,{headers:{"Content-Type":f.typeFull}});t(P);return}let c=(s.protocol==="https:"?rr:er).request,{signal:l}=o,a=null,R=()=>{let f=new Q("The operation was aborted.");n(f),o.body&&o.body instanceof $e.Readable&&o.body.destroy(f),!(!a||!a.body)&&a.body.emit("error",f)};if(l&&l.aborted){R();return}let D=()=>{R(),A()},B=c(s.toString(),i);l&&l.addEventListener("abort",D);let A=()=>{B.abort(),l&&l.removeEventListener("abort",D)};B.on("error",f=>{n(new p(`request to ${o.url} failed, reason: ${f.message}`,"system",f)),A()}),or(B,f=>{a&&a.body&&a.body.destroy(f)}),process.version<"v14"&&B.on("socket",f=>{let P;f.prependListener("end",()=>{P=f._eventsCount}),f.prependListener("close",h=>{if(a&&P<f._eventsCount&&!h){let L=new Error("Premature close");L.code="ERR_STREAM_PREMATURE_CLOSE",a.body.emit("error",L)}})}),B.on("response",f=>{B.setTimeout(0);let P=be(f.rawHeaders);if(Z(f.statusCode)){let d=P.get("Location"),x=null;try{x=d===null?null:new URL(d,o.url)}catch{if(o.redirect!=="manual"){n(new p(`uri requested responds with an invalid redirect URL: ${d}`,"invalid-redirect")),A();return}}switch(o.redirect){case"error":n(new p(`uri requested responds with a redirect, redirect mode is set to error: ${o.url}`,"no-redirect")),A();return;case"manual":break;case"follow":{if(x===null)break;if(o.counter>=o.follow){n(new p(`maximum redirect reached at: ${o.url}`,"max-redirect")),A();return}let w={headers:new g(o.headers),follow:o.follow,counter:o.counter+1,agent:o.agent,compress:o.compress,method:o.method,body:F(o),signal:o.signal,size:o.size,referrer:o.referrer,referrerPolicy:o.referrerPolicy};if(!he(o.url,x)||!de(o.url,x))for(let He of["authorization","www-authenticate","cookie","cookie2"])w.headers.delete(He);if(f.statusCode!==303&&o.body&&e.body instanceof $e.Readable){n(new p("Cannot follow redirect with body being a readable stream","unsupported-redirect")),A();return}(f.statusCode===303||(f.statusCode===301||f.statusCode===302)&&o.method==="POST")&&(w.method="GET",w.body=void 0,w.headers.delete("content-length"));let ie=ve(P);ie&&(w.referrerPolicy=ie),t(ke(new C(x,w))),A();return}default:return n(new TypeError(`Redirect option '${o.redirect}' is not a valid value of RequestRedirect`))}}l&&f.once("end",()=>{l.removeEventListener("abort",D)});let h=H(f,new Fe,d=>{d&&n(d)});process.version<"v12.10"&&f.on("aborted",D);let L={url:o.url,status:f.statusCode,statusText:f.statusMessage,headers:P,size:o.size,counter:o.counter,highWaterMark:o.highWaterMark},$=P.get("Content-Encoding");if(!o.compress||o.method==="HEAD"||$===null||f.statusCode===204||f.statusCode===304){a=new S(h,L),t(a);return}let Oe={flush:O.Z_SYNC_FLUSH,finishFlush:O.Z_SYNC_FLUSH};if($==="gzip"||$==="x-gzip"){h=H(h,O.createGunzip(Oe),d=>{d&&n(d)}),a=new S(h,L),t(a);return}if($==="deflate"||$==="x-deflate"){let d=H(f,new Fe,x=>{x&&n(x)});d.once("data",x=>{(x[0]&15)===8?h=H(h,O.createInflate(),w=>{w&&n(w)}):h=H(h,O.createInflateRaw(),w=>{w&&n(w)}),a=new S(h,L),t(a)}),d.once("end",()=>{a||(a=new S(h,L),t(a))});return}if($==="br"){h=H(h,O.createBrotliDecompress(),d=>{d&&n(d)}),a=new S(h,L),t(a);return}a=new S(h,L),t(a)}),ge(B,o).catch(n)})}function or(r,e){let t=X.from(`0\r
|
|
2
|
-
\r
|
|
3
|
-
`),n=!1,o=!1,s;r.on("response",i=>{let{headers:c}=i;n=c["transfer-encoding"]==="chunked"&&!c["content-length"]}),r.on("socket",i=>{let c=()=>{if(n&&!o){let a=new Error("Premature close");a.code="ERR_STREAM_PREMATURE_CLOSE",e(a)}},l=a=>{o=X.compare(a.slice(-5),t)===0,!o&&s&&(o=X.compare(s.slice(-3),t.slice(0,3))===0&&X.compare(a.slice(-2),t.slice(3))===0),s=a};i.prependListener("close",c),i.on("data",l),r.on("close",()=>{i.removeListener("close",c),i.removeListener("data",l)})})}var tr,nr=y(()=>{le();K();Se();_();Ae();q();Ce();ne();fe();V();se();Ve();tr=new Set(["data:","http:","https:"])});nr();export{Q as AbortError,j as Blob,p as FetchError,ze as File,I as FormData,g as Headers,C as Request,S as Response,De as blobFrom,Ne as blobFromSync,ke as default,Me as fileFrom,We as fileFromSync,Z as isRedirect};
|
|
@@ -1 +0,0 @@
|
|
|
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};
|
package/chunks/sync-3RYRGTEA.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
1
|
-
import"./chunk-HISXAZ4Y.js";var r=globalThis.navigator?.userAgent?.includes("Deno");function s(){return globalThis.process.getBuiltinModule("node:fs")}var c=r?Deno.errors.AlreadyExists:class extends Error{},d=r?Deno.errors.BadResource:class extends Error{},E=r?Deno.errors.BrokenPipe:class extends Error{},y=r?Deno.errors.Busy:class extends Error{},B=r?Deno.errors.Interrupted:class extends Error{},T=r?Deno.errors.InvalidData:class extends Error{},a=r?Deno.errors.NotFound:class extends Error{},P=r?Deno.errors.PermissionDenied:class extends Error{},F=r?Deno.errors.TimedOut:class extends Error{},S=r?Deno.errors.UnexpectedEof:class extends Error{},O=r?Deno.errors.WriteZero:class extends Error{};function n(e){return o=>Object.assign(new e(o.message),{stack:o.stack})}var l={EEXIST:n(c),ENOENT:n(a),EBADF:n(d)};function p(e){return e instanceof Error&&"code"in e}function i(e){return p(e)&&l[e.code]?.(e)||e}async function W(e,o){if(r)await Deno.chmod(e,o);else try{await s().promises.chmod(e,o)}catch(t){throw i(t)}}function Z(e,o){if(r)Deno.chmodSync(e,o);else try{s().chmodSync(e,o)}catch(t){throw i(t)}}export{W as chmod,Z as chmodSync};
|
|
@@ -1 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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};
|
package/chunks/watch-5DNM646U.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
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
|
-
`).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
|
-
`)},_=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
|
-
`)),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+`
|
|
5
|
-
`)),$.releaseLock()}else if(l==="markdown"){let h=new TextEncoder,$=g.process.stdout.getWriter();await $.write(h.encode(i+`
|
|
6
|
-
---
|
|
7
|
-
`)),$.releaseLock()}else if(i!==c){let h=new TextEncoder,$=g.process.stdout.getWriter();await $.write(h.encode(B+i+`
|
|
8
|
-
`)),$.releaseLock(),c=i}return r.allSpecs.length>0&&r.allSpecs.every(h=>h.phase==="COMPLETED")||r.allSpecs.length===0&&r.phase==="COMPLETED"};if(await u())return y(void 0);let p=1e3,n=0;for(;;){await new Promise(r=>setTimeout(r,p));try{let i=(await g.fs.stat(`${s}/state.json`)).mtime?.getTime()??0;if(i>n&&(n=i,await new Promise(h=>setTimeout(h,200)),await u()))break}catch{}}return y(void 0)};export{N as buildSnapshot,H as main,_ as renderJsonLine,V as renderTerminal};
|
package/chunks/web-662LNB3K.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c,d}from"./chunk-LJEWPIEI.js";import"./chunk-FE4MKOI4.js";import"./chunk-HISXAZ4Y.js";export{a as WORKERD_CAPABILITIES,c as clearEnv,d as createWorkerdRuntime,b as populateEnvFromContext};
|
package/noskills.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
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-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};
|