@vibeflow-tools/cli 0.10.0 → 0.12.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.
Files changed (214) hide show
  1. package/CHANGELOG.md +121 -23
  2. package/dist/chunk-22ZK3AD6.js +6 -0
  3. package/dist/chunk-2CI62NHU.js +8 -0
  4. package/dist/chunk-2FTOVVDE.js +10 -0
  5. package/dist/chunk-2HKRXAUP.js +10 -0
  6. package/dist/chunk-2L7GDWKA.js +8 -0
  7. package/dist/chunk-32Z32W7T.js +2 -0
  8. package/dist/chunk-3V7HLRIS.js +6 -0
  9. package/dist/chunk-4KWRHSXU.js +10 -0
  10. package/dist/chunk-ACDVAO4P.js +6 -0
  11. package/dist/chunk-BBIA4IIO.js +2 -0
  12. package/dist/chunk-BOPGIKZN.js +8 -0
  13. package/dist/chunk-BUQI2W5H.js +2 -0
  14. package/dist/chunk-BZDBSBRV.js +2 -0
  15. package/dist/chunk-CKNX42Z3.js +10 -0
  16. package/dist/chunk-CQ524DVH.js +2 -0
  17. package/dist/chunk-D4FZTZHO.js +8 -0
  18. package/dist/chunk-EAYTSVCN.js +2 -0
  19. package/dist/chunk-EDJNSJXJ.js +10 -0
  20. package/dist/chunk-ES3JTCZ7.js +8 -0
  21. package/dist/chunk-EZX6HYC3.js +8 -0
  22. package/dist/chunk-FYRJDWDC.js +2 -0
  23. package/dist/chunk-GN436FFO.js +10 -0
  24. package/dist/chunk-GQQIUROY.js +2 -0
  25. package/dist/chunk-GTZDS3U3.js +6 -0
  26. package/dist/chunk-I3WFKPN7.js +8 -0
  27. package/dist/chunk-ICO6AZHJ.js +10 -0
  28. package/dist/chunk-IJ67OEKX.js +2 -0
  29. package/dist/chunk-ILUMCOF2.js +2 -0
  30. package/dist/chunk-JAWQQLJC.js +8 -0
  31. package/dist/chunk-JQTURVVN.js +2 -0
  32. package/dist/chunk-KZZ4ADHY.js +6 -0
  33. package/dist/chunk-L6EJ7QTO.js +6 -0
  34. package/dist/chunk-LYJHU4LP.js +10 -0
  35. package/dist/chunk-N5PXJMOU.js +6 -0
  36. package/dist/chunk-NHVKGOSV.js +10 -0
  37. package/dist/chunk-O4LGEPMQ.js +8 -0
  38. package/dist/chunk-P63ZVL36.js +2 -0
  39. package/dist/chunk-PFOVGF7M.js +10 -0
  40. package/dist/chunk-PGGJRQCO.js +2 -0
  41. package/dist/chunk-PN5C7EHL.js +8 -0
  42. package/dist/chunk-PWP474PZ.js +2 -0
  43. package/dist/chunk-PYMUW2HM.js +8 -0
  44. package/dist/chunk-Q7MEW67Z.js +8 -0
  45. package/dist/chunk-QJMBWTAZ.js +8 -0
  46. package/dist/chunk-R5NQALFI.js +2 -0
  47. package/dist/chunk-RBBUTBE3.js +6 -0
  48. package/dist/chunk-RRQ5P63N.js +2 -0
  49. package/dist/chunk-SQPWTIQO.js +2 -0
  50. package/dist/chunk-TCTUG3QV.js +8 -0
  51. package/dist/chunk-TTWEWSD3.js +6 -0
  52. package/dist/chunk-WARORREB.js +2 -0
  53. package/dist/chunk-WHXU37AT.js +10 -0
  54. package/dist/chunk-WKEMBLJR.js +2 -0
  55. package/dist/chunk-WVRMKUU5.js +6 -0
  56. package/dist/chunk-WZ2QQDYW.js +2 -0
  57. package/dist/chunk-X3VLCXWS.js +6 -0
  58. package/dist/chunk-X4CQRMD4.js +6 -0
  59. package/dist/chunk-X4RGF6JJ.js +2 -0
  60. package/dist/chunk-XHZXHACL.js +2 -0
  61. package/dist/chunk-XJ35INCK.js +10 -0
  62. package/dist/chunk-XYZECVJ4.js +8 -0
  63. package/dist/chunk-YMBPKWZ4.js +2 -0
  64. package/dist/chunk-ZHA4Y2KB.js +8 -0
  65. package/dist/cli/chunk-22ZK3AD6.js +6 -0
  66. package/dist/cli/chunk-2CI62NHU.js +8 -0
  67. package/dist/cli/chunk-2FTOVVDE.js +10 -0
  68. package/dist/cli/chunk-2HKRXAUP.js +10 -0
  69. package/dist/cli/chunk-2L7GDWKA.js +8 -0
  70. package/dist/cli/chunk-32Z32W7T.js +2 -0
  71. package/dist/cli/chunk-3V7HLRIS.js +6 -0
  72. package/dist/cli/chunk-4KWRHSXU.js +10 -0
  73. package/dist/cli/chunk-ACDVAO4P.js +6 -0
  74. package/dist/cli/chunk-BBIA4IIO.js +2 -0
  75. package/dist/cli/chunk-BOPGIKZN.js +8 -0
  76. package/dist/cli/chunk-BUQI2W5H.js +2 -0
  77. package/dist/cli/chunk-BZDBSBRV.js +2 -0
  78. package/dist/cli/chunk-CKNX42Z3.js +10 -0
  79. package/dist/cli/chunk-CQ524DVH.js +2 -0
  80. package/dist/cli/chunk-D4FZTZHO.js +8 -0
  81. package/dist/cli/chunk-EAYTSVCN.js +2 -0
  82. package/dist/cli/chunk-EDJNSJXJ.js +10 -0
  83. package/dist/cli/chunk-ES3JTCZ7.js +8 -0
  84. package/dist/cli/chunk-EZX6HYC3.js +8 -0
  85. package/dist/cli/chunk-FYRJDWDC.js +2 -0
  86. package/dist/cli/chunk-GN436FFO.js +10 -0
  87. package/dist/cli/chunk-GQQIUROY.js +2 -0
  88. package/dist/cli/chunk-GTZDS3U3.js +6 -0
  89. package/dist/cli/chunk-I3WFKPN7.js +8 -0
  90. package/dist/cli/chunk-ICO6AZHJ.js +10 -0
  91. package/dist/cli/chunk-IJ67OEKX.js +2 -0
  92. package/dist/cli/chunk-ILUMCOF2.js +2 -0
  93. package/dist/cli/chunk-JAWQQLJC.js +8 -0
  94. package/dist/cli/chunk-JQTURVVN.js +2 -0
  95. package/dist/cli/chunk-KZZ4ADHY.js +6 -0
  96. package/dist/cli/chunk-L6EJ7QTO.js +6 -0
  97. package/dist/cli/chunk-LYJHU4LP.js +10 -0
  98. package/dist/cli/chunk-N5PXJMOU.js +6 -0
  99. package/dist/cli/chunk-NHVKGOSV.js +10 -0
  100. package/dist/cli/chunk-O4LGEPMQ.js +8 -0
  101. package/dist/cli/chunk-P63ZVL36.js +2 -0
  102. package/dist/cli/chunk-PFOVGF7M.js +10 -0
  103. package/dist/cli/chunk-PGGJRQCO.js +2 -0
  104. package/dist/cli/chunk-PN5C7EHL.js +8 -0
  105. package/dist/cli/chunk-PWP474PZ.js +2 -0
  106. package/dist/cli/chunk-PYMUW2HM.js +8 -0
  107. package/dist/cli/chunk-Q7MEW67Z.js +8 -0
  108. package/dist/cli/chunk-QJMBWTAZ.js +8 -0
  109. package/dist/cli/chunk-R5NQALFI.js +2 -0
  110. package/dist/cli/chunk-RBBUTBE3.js +6 -0
  111. package/dist/cli/chunk-RRQ5P63N.js +2 -0
  112. package/dist/cli/chunk-SQPWTIQO.js +2 -0
  113. package/dist/cli/chunk-TCTUG3QV.js +8 -0
  114. package/dist/cli/chunk-TTWEWSD3.js +6 -0
  115. package/dist/cli/chunk-WARORREB.js +2 -0
  116. package/dist/cli/chunk-WHXU37AT.js +10 -0
  117. package/dist/cli/chunk-WKEMBLJR.js +2 -0
  118. package/dist/cli/chunk-WVRMKUU5.js +6 -0
  119. package/dist/cli/chunk-WZ2QQDYW.js +2 -0
  120. package/dist/cli/chunk-X3VLCXWS.js +6 -0
  121. package/dist/cli/chunk-X4CQRMD4.js +6 -0
  122. package/dist/cli/chunk-X4RGF6JJ.js +2 -0
  123. package/dist/cli/chunk-XHZXHACL.js +2 -0
  124. package/dist/cli/chunk-XJ35INCK.js +10 -0
  125. package/dist/cli/chunk-XYZECVJ4.js +8 -0
  126. package/dist/cli/chunk-YMBPKWZ4.js +2 -0
  127. package/dist/cli/chunk-ZHA4Y2KB.js +8 -0
  128. package/dist/cli/comments-5LRGOYLT.js +2 -0
  129. package/dist/cli/comments-D3SKM2F4.js +2 -0
  130. package/dist/cli/comments-GGE2X2EE.js +2 -0
  131. package/dist/cli/comments-GZ6HQMHL.js +2 -0
  132. package/dist/cli/comments-LHSMBKJ3.js +2 -0
  133. package/dist/cli/comments-M5HDNHXR.js +2 -0
  134. package/dist/cli/comments-MJP5KLEE.js +2 -0
  135. package/dist/cli/comments-TQHWMRB4.js +2 -0
  136. package/dist/cli/comments-VSWJW47E.js +2 -0
  137. package/dist/cli/files-3GGL6AHA.js +2 -0
  138. package/dist/cli/files-4M7AX2IR.js +2 -0
  139. package/dist/cli/files-4O3JKNKY.js +2 -0
  140. package/dist/cli/files-7GFBKISD.js +2 -0
  141. package/dist/cli/files-7H73XU4Z.js +2 -0
  142. package/dist/cli/files-BMMCSJZ3.js +2 -0
  143. package/dist/cli/files-CZEVX3KX.js +2 -0
  144. package/dist/cli/files-F2EISWAF.js +2 -0
  145. package/dist/cli/files-FL23FKMK.js +2 -0
  146. package/dist/cli/files-FW2FWYFX.js +2 -0
  147. package/dist/cli/files-GQPP5SSP.js +2 -0
  148. package/dist/cli/files-QO35EIJI.js +2 -0
  149. package/dist/cli/files-R6BRCQQX.js +2 -0
  150. package/dist/cli/files-RNEVXCMZ.js +2 -0
  151. package/dist/cli/files-TGBQRRBH.js +2 -0
  152. package/dist/cli/files-WH4W5IPG.js +2 -0
  153. package/dist/cli/files-XKVCQQMI.js +2 -0
  154. package/dist/cli/git-NH6PGXOM.js +2 -0
  155. package/dist/cli/index.js +67 -55
  156. package/dist/cli/push-25YMX4RZ.js +2 -0
  157. package/dist/cli/push-26JSGYHL.js +2 -0
  158. package/dist/cli/push-5NNA77B2.js +2 -0
  159. package/dist/cli/push-7M34G4OW.js +2 -0
  160. package/dist/cli/push-AARMGHSL.js +2 -0
  161. package/dist/cli/push-EVBLKP53.js +2 -0
  162. package/dist/cli/push-HG6EPV6P.js +2 -0
  163. package/dist/cli/push-RFYHMZBR.js +2 -0
  164. package/dist/cli/push-RQJQM7U7.js +2 -0
  165. package/dist/cli/push-S4G36KHW.js +2 -0
  166. package/dist/cli/push-S5XSREE5.js +2 -0
  167. package/dist/cli/push-SWN2KN2R.js +2 -0
  168. package/dist/cli/review-gate-QR2E4REN.js +2 -0
  169. package/dist/cli/settings-KKHPB344.js +2 -0
  170. package/dist/cli/settings-PYRZJJ4H.js +2 -0
  171. package/dist/cli/tasks-3HXDHCPS.js +2 -0
  172. package/dist/cli/tasks-5X5AAK2N.js +2 -0
  173. package/dist/cli/tasks-MUL5SYJQ.js +2 -0
  174. package/dist/cli/tasks-N3AEGAEB.js +2 -0
  175. package/dist/cli/tasks-NSLXFEXZ.js +2 -0
  176. package/dist/cli/tasks-OJTUAWAN.js +2 -0
  177. package/dist/cli/tasks-SV7ZVS7W.js +2 -0
  178. package/dist/cli/tasks-VCU3JVNJ.js +2 -0
  179. package/dist/cli/verify-44MRXSPT.js +2 -0
  180. package/dist/cli/verify-AXMQ27UT.js +2 -0
  181. package/dist/cli/verify-BJ62CQI3.js +2 -0
  182. package/dist/cli/verify-DEG2BZOB.js +2 -0
  183. package/dist/cli/verify-DGL7A4WD.js +2 -0
  184. package/dist/cli/verify-GP427VCE.js +2 -0
  185. package/dist/cli/verify-QUCASFYP.js +2 -0
  186. package/dist/cli/verify-RY7B6C2P.js +2 -0
  187. package/dist/cli/verify-TTAW3GG6.js +2 -0
  188. package/dist/cli/verify-VLVCMBBW.js +2 -0
  189. package/dist/cli/verify-XL7JI7LN.js +2 -0
  190. package/dist/cli/verify-ZOAIUNRD.js +2 -0
  191. package/dist/cli/workspace-AJAVENKA.js +2 -0
  192. package/dist/client/kanban-browser.js +17 -11
  193. package/dist/client/kanban.css +1 -1
  194. package/dist/client/overlay-browser.js +6 -6
  195. package/dist/files-3GGL6AHA.js +2 -0
  196. package/dist/files-4M7AX2IR.js +2 -0
  197. package/dist/files-4O3JKNKY.js +2 -0
  198. package/dist/files-7GFBKISD.js +2 -0
  199. package/dist/files-7H73XU4Z.js +2 -0
  200. package/dist/files-BMMCSJZ3.js +2 -0
  201. package/dist/files-CZEVX3KX.js +2 -0
  202. package/dist/files-F2EISWAF.js +2 -0
  203. package/dist/files-FL23FKMK.js +2 -0
  204. package/dist/files-FW2FWYFX.js +2 -0
  205. package/dist/files-GQPP5SSP.js +2 -0
  206. package/dist/files-QO35EIJI.js +2 -0
  207. package/dist/files-R6BRCQQX.js +2 -0
  208. package/dist/files-RNEVXCMZ.js +2 -0
  209. package/dist/files-TGBQRRBH.js +2 -0
  210. package/dist/files-WH4W5IPG.js +2 -0
  211. package/dist/files-XKVCQQMI.js +2 -0
  212. package/dist/index.js +67 -55
  213. package/dist/workspace-AJAVENKA.js +2 -0
  214. package/package.json +2 -1
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env node
2
+ import{a as U}from"./chunk-BZDBSBRV.js";import{g as b,k as R,m as I}from"./chunk-BBIA4IIO.js";import{c as st}from"./chunk-WKEMBLJR.js";import{g as ot,l as nt,o as rt}from"./chunk-Q7MEW67Z.js";import{d as tt,h as et}from"./chunk-XHZXHACL.js";import c from"chalk";import{resolve as wt,join as N}from"path";import{readFileSync as z}from"fs";import{statSync as Nt,readdirSync as Tt,unlinkSync as At}from"fs";import M from"crypto";var vt="vibeflow-auth-v1",xt=1440*60*1e3;function it(t){return M.scryptSync(t,vt,32)}function jt(t,e){let o=it(e),n=M.randomBytes(16),r=M.createCipheriv("aes-256-gcm",o,n),s=JSON.stringify(t),i=Buffer.concat([r.update(s),r.final()]),y=r.getAuthTag();return{version:1,createdAt:new Date().toISOString(),expiresAt:new Date(Date.now()+xt).toISOString(),iv:n.toString("hex"),tag:y.toString("hex"),data:i.toString("hex")}}function at(t,e){if(new Date(t.expiresAt)<new Date)return null;try{let o=it(e),n=M.createDecipheriv("aes-256-gcm",o,Buffer.from(t.iv,"hex"));n.setAuthTag(Buffer.from(t.tag,"hex"));let r=Buffer.concat([n.update(Buffer.from(t.data,"hex")),n.final()]);return JSON.parse(r.toString())}catch{return null}}function bt(t,e){return Math.abs(t.x-e.x)>2||Math.abs(t.y-e.y)>2||Math.abs(t.width-e.width)>2||Math.abs(t.height-e.height)>2}function H(t,e){let o=!!e.outerHTML,n=t.outerHTML!==e.outerHTML,r={},s=new Set([...Object.keys(t.computedStyles),...Object.keys(e.computedStyles)]);for(let l of s){let E=t.computedStyles[l],x=e.computedStyles[l];E!==x&&(r[l]=[E??"",x??""])}let i=bt(t.position.boundingBox,e.position.boundingBox),y=new Set(t.consoleErrors),g=e.consoleErrors.filter(l=>!y.has(l));return{selectorResolves:o,htmlChanged:n,stylesChanged:r,positionChanged:i,newConsoleErrors:g}}function ct(t,e){let o=[];if(t.selectorResolves){t.htmlChanged&&o.push("HTML changed");let n=Object.keys(t.stylesChanged).length;if(n>0){let r=Object.keys(t.stylesChanged).slice(0,5).join(", "),s=n>5?` (+${n-5} more)`:"";o.push(`${n} style property change(s): ${r}${s}`)}t.positionChanged&&o.push("position shifted"),t.newConsoleErrors.length>0&&o.push(`${t.newConsoleErrors.length} new console error(s)`),o.length===0&&o.push("no structural changes detected")}else o.push(`Selector "${e}" no longer resolves`);return o.join("; ")}import{readFileSync as lt,writeFileSync as Ht,mkdirSync as Jt,existsSync as ft}from"fs";import{join as gt,basename as Rt}from"path";import{execSync as Ct}from"child_process";var G={port:3700};function Ot(t){return gt(t,tt,et)}function ut(t){let e=Ot(t);if(!ft(e))return{...G};let o=lt(e,"utf-8"),n;try{n=JSON.parse(o)}catch{return{...G}}return{...G,...n}}function Wt(t){let e=gt(t,"package.json");if(ft(e))try{let o=JSON.parse(lt(e,"utf-8"));if(o.name)return o.name}catch{}return Rt(t)}function zt(t){try{return Ct("git branch --show-current",{cwd:t,encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).trim()||null}catch{return null}}var W=["display","visibility","opacity","position","overflow","overflow-x","overflow-y","width","min-width","max-width","height","min-height","max-height","margin","margin-top","margin-right","margin-bottom","margin-left","padding","padding-top","padding-right","padding-bottom","padding-left","border","border-width","border-style","border-color","border-radius","background-color","background-image","color","font-size","font-weight","font-style","font-family","line-height","letter-spacing","text-align","text-decoration","text-overflow","white-space","flex-direction","flex-wrap","flex","justify-content","align-items","gap","row-gap","column-gap","grid-template-columns","grid-template-rows","z-index","box-shadow","transform","transition","cursor","user-select","pointer-events","top","left","right","bottom"];function dt(t){let e=[],o=t;for(;o&&o!==document.documentElement;){let n=o.parentElement;if(!n)break;let r=Array.from(n.children).indexOf(o);e.unshift(r),o=n}return e.join("/")}function ht(t){let e=t.tagName.toLowerCase(),o=t.getAttribute("data-task-id");if(o)return`${e}.task-card[data-task-id=${o}]`;let n=t.getAttribute("data-status");if(n&&t.classList.contains("column-scroll"))return`${e}.column-scroll[data-status=${n}]`;let r=t.getAttribute("data-column-id");if(r)return`${e}[data-column-id=${r}]`;let s=Array.from(t.classList).slice(0,2),i=e;s.length&&(i+="."+s.join("."));let y=t.parentElement;if(y){let g=Array.from(y.children).filter(l=>l.tagName===t.tagName);if(g.length>1){let l=g.indexOf(t)+1;i+=`:nth-of-type(${l})`}}return i}function mt(t,e=W){let o=window.getComputedStyle(t),n={};for(let r of e)n[r]=o.getPropertyValue(r);return n}function pt(t,e=200){return t.replace(/\s+/g," ").trim().slice(0,e)}function yt(t){let e=new Map;for(let o of t){let n=o.tagName.toLowerCase(),r=Array.from(o.classList).slice(0,2).join("."),s=r?`${n}.${r}`:n;e.set(s,(e.get(s)||0)+1)}return Array.from(e.entries()).map(([o,n])=>`${o} \xD7${n}`).slice(0,10)}var p=class extends Error{constructor(o,n,r){super(n);this.code=o;this.suggestion=r;this.name="VerifyError"}code;suggestion};async function Pt(){try{return await import("playwright")}catch{throw new p("E_PLAYWRIGHT_MISSING","Playwright is not installed.","Run: npx playwright install chromium")}}async function kt(t,e,o={}){let n=wt(t),r=ot(n,e);if(!r)throw new p("E_NOT_FOUND",`Task not found: ${e}`,"Run 'vibeflow tasks' to see available task IDs.");let s=nt(r);if(!s)throw new p("E_NOT_FOUND",`Task not found: ${e}`);let i,y=s.baselineElementFile||"baseline-element.json",g=I(n,e,y);if(g)try{i=JSON.parse(z(g,"utf-8"))}catch{}if(!i&&s.baseline&&(i=s.baseline),!i)throw new p("E_NO_BASELINE","Task has no baseline. Re-annotate to capture one.");let l=[],E={},x={};if(s.authStateEnc&&s.author)try{let m=JSON.parse(s.authStateEnc),f=at(m,s.author);if(!f)throw new p("E_AUTH_EXPIRED","Auth state expired. Re-annotate to capture fresh cookies.");l=f.cookies,E=f.localStorage,x=f.sessionStorage}catch(m){throw m instanceof p?m:new p("E_AUTH_CORRUPT","Auth state corrupted. Re-annotate.")}let v=o.url??s.url;if(!v)throw new p("E_NO_URL","Task has no URL. Cannot verify without a target URL.","Re-annotate the element with a URL, or use --url to override.");let C=ut(n).port??3700,A=v.startsWith("http")?v:`http://localhost:${C}${v.startsWith("/")?v:"/"+v}`,S=s.cssSelector??s.selector;if(!S||S==="/")throw new p("E_NO_SELECTOR","Task has no CSS selector. Cannot verify without a selector.");let j=await Pt(),$;try{$=await j.chromium.launch({headless:!0})}catch(m){let f=m instanceof Error?m.message:String(m);throw f.includes("not found")||f.includes("not installed")||f.includes("Executable doesn't exist")?new p("E_PLAYWRIGHT_MISSING","Chromium is not installed.","Run: npx playwright install chromium"):new p("E_PLAYWRIGHT_CRASH",`Verification failed: ${f}`,"Try again.")}let k;try{let m=i.position?.viewport;k=await $.newContext({viewport:m?{width:m.width,height:m.height}:void 0,deviceScaleFactor:m?.dpr,userAgent:i.browser||void 0}),l.length>0&&await k.addCookies(l.map(a=>({name:a.name,value:a.value,domain:a.domain,path:a.path,expires:a.expires,httpOnly:a.httpOnly,secure:a.secure,sameSite:a.sameSite})));let f=await k.newPage(),T=[];f.on("console",a=>{a.type()==="error"&&T.push(a.text())}),f.on("pageerror",a=>{T.push(a.message)});try{await f.goto(A,{waitUntil:"networkidle",timeout:15e3})}catch(a){let u=a instanceof Error?a.message:String(a);throw u.includes("ERR_CONNECTION_REFUSED")||u.includes("ECONNREFUSED")?new p("E_APP_NOT_RUNNING",`Cannot connect to ${A}. Is the dev server running?`):new p("E_NAVIGATION_FAILED",`Failed to navigate to ${A}: ${u}`)}try{Object.keys(E).length>0&&await f.evaluate(a=>{for(let[u,d]of Object.entries(a))window.localStorage.setItem(u,d)},E),Object.keys(x).length>0&&await f.evaluate(a=>{for(let[u,d]of Object.entries(a))window.sessionStorage.setItem(u,d)},x)}catch{}let P=0;try{await f.waitForSelector(S,{timeout:1e4}),P=await f.locator(S).count()}catch{let a={outerHTML:"",computedStyles:{},selector:S,position:i.position,browser:i.browser,consoleErrors:T,capturedAt:new Date().toISOString()},u=H(i,a);return K(s.id,s.description,i,a,u,[],S)}if(P>1){let a={outerHTML:"",computedStyles:{},selector:S,position:i.position,browser:i.browser,consoleErrors:T,capturedAt:new Date().toISOString()},u=H(i,a),d=`Selector matches ${P} elements. The selector may need to be more specific.`;return K(s.id,s.description,i,a,u,[],S,d)}let L=await Lt(f,S,i,T),_=null,B=s.baselineFile||"baseline-page.json",F=I(n,e,B);if(F)try{_=JSON.parse(z(F,"utf-8"))}catch{}let h=H(i,L),O=await _t(n,e,i,L,h,T,f,S);if(_&&_.elements){let a=I(n,e,"verify-all-styles.json");if(a)try{let u=JSON.parse(z(a,"utf-8"));if(u&&u.elements){let d={},St=Object.entries(u.elements);for(let[Y,X]of St){let J=_.elements[Y]?.after;if(J){X.baseline=J;let V={};for(let[q,Q]of Object.entries(X.after)){let Z=J[q];Z!==Q&&(V[q]=[Z,Q])}Object.keys(V).length>0&&(d[Y]=V)}}R(n,e,"verify-all-styles.json",Buffer.from(JSON.stringify(u,null,2)));let Et=JSON.stringify({totalChanged:Object.keys(d).length,elements:d},null,2);R(n,e,"verify-page-diff.json",Buffer.from(Et)),O.push(N(b(n,e),"verify-page-diff.json"))}}catch{}}let D=K(s.id,s.description,i,L,h,O,S);return rt(n,e,{verified:D.ok}),D}finally{await k?.close(),await $?.close()}}async function Lt(t,e,o,n){let r=t.locator(e).first(),s=await r.evaluate(l=>l.outerHTML).catch(()=>""),i=await r.evaluate(l=>{let E=window.getComputedStyle(l),x={};for(let v=0;v<E.length;v++){let w=E[v];x[w]=E.getPropertyValue(w)}return x}).catch(()=>({})),g={boundingBox:await r.boundingBox().catch(()=>null)??o.position.boundingBox,scrollPosition:await t.evaluate(()=>({x:window.scrollX,y:window.scrollY})),viewport:await t.evaluate(()=>({width:window.innerWidth,height:window.innerHeight,dpr:window.devicePixelRatio})),stackingContext:o.position.stackingContext};return{outerHTML:s,computedStyles:i,selector:e,position:g,browser:o.browser,consoleErrors:n,capturedAt:new Date().toISOString()}}async function _t(t,e,o,n,r,s,i,y){let g=[],l=b(t,e);try{let w=Tt(l);for(let C of w)(C.startsWith("verify-")||C==="baseline.json")&&At(N(l,C))}catch{}let E=JSON.stringify(n,null,2);R(t,e,"verify-after.json",Buffer.from(E)),g.push(N(b(t,e),"verify-after.json"));let x=JSON.stringify(r,null,2);R(t,e,"verify-diff.json",Buffer.from(x)),g.push(N(b(t,e),"verify-diff.json"));let v=s.length>0?s.join(`
3
+ `):"(no console errors)";if(R(t,e,"verify-console.txt",Buffer.from(v)),g.push(N(b(t,e),"verify-console.txt")),i){try{let w=await i.content();R(t,e,"verify-page.html",Buffer.from(w)),g.push(N(b(t,e),"verify-page.html"))}catch{}try{let C=await i.evaluate(({buildKeyFn:A,buildSelectorFn:S,filterStylesFn:j,childSignatureFn:$,normalizeTextFn:k,styles:m,maxElements:f})=>{let T={},P=0,L=!1,_=document.createTreeWalker(document.body,NodeFilter.SHOW_ELEMENT,{acceptNode(h){if(P>=f)return NodeFilter.FILTER_REJECT;let O=h;return O.classList.length>0||O.hasAttribute("data-task-id")||O.hasAttribute("data-status")||O.hasAttribute("data-column-id")?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}}),B=[],F;for(;F=_.nextNode();)B.push(F);for(let h of B){if(P>=f){L=!0;break}let O=A(h),D=Array.from(h.children),a={};for(let d of Array.from(h.attributes))d.name.startsWith("data-")&&(a[d.name.slice(5)]=d.value);let u={x:0,y:0,width:0,height:0};try{let d=h.getBoundingClientRect();u={x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height)}}catch{}T[O]={key:O,selector:S(h),tag:h.tagName.toLowerCase(),classes:Array.from(h.classList),dataAttrs:a,parentKey:h.parentElement?A(h.parentElement):"",childCount:D.length,childSignature:$(D),text:k(h.textContent??""),position:u,baseline:j(h,m),after:j(h,m)},P++}return{version:1,capturedAt:new Date().toISOString(),truncated:L,elements:T}},{buildKeyFn:dt,buildSelectorFn:ht,filterStylesFn:mt,childSignatureFn:yt,normalizeTextFn:pt,styles:W,maxElements:1e3});if(C){let A=JSON.stringify(C,null,2);R(t,e,"verify-all-styles.json",Buffer.from(A)),g.push(N(b(t,e),"verify-all-styles.json"))}}catch{}try{let w=await i.screenshot({fullPage:!1});R(t,e,"verify-screenshot.png",w),g.push(N(b(t,e),"verify-screenshot.png"))}catch{}if(y)try{let w=await i.locator(y).first().evaluate(C=>C.outerHTML);R(t,e,"verify-element.html",Buffer.from(w)),g.push(N(b(t,e),"verify-element.html"))}catch{}}if(o){let w=JSON.stringify(o,null,2);R(t,e,"baseline.json",Buffer.from(w)),g.push(N(b(t,e),"baseline.json"))}return g}function K(t,e,o,n,r,s,i,y){let g=r.selectorResolves&&r.newConsoleErrors.length===0,l=y??ct(r,i);return{taskId:t,ok:g,taskDescription:e,baseline:{selector:o.selector,url:"",capturedAt:o.capturedAt,snapshot:o},after:{snapshot:n,consoleErrors:n.consoleErrors},diff:r,evidenceFiles:s,verdict:l}}async function ce(t,e,o){let n=wt(t);try{let r=await kt(n,e,o);await $t(n,e,r),o.json?console.log(JSON.stringify(r,null,2)):Ft(r)}catch(r){if(r instanceof p)o.json?process.stderr.write(JSON.stringify({ok:!1,error:{code:r.code,message:r.message,suggestion:r.suggestion}})+`
4
+ `):(process.stderr.write(c.red(`\u2717 ${r.message}
5
+ `)),r.suggestion&&process.stderr.write(c.dim(` ${r.suggestion}
6
+ `))),process.exitCode=U.GENERAL;else{let s=r instanceof Error?r.message:String(r);o.json?process.stderr.write(JSON.stringify({ok:!1,error:{code:"E_UNKNOWN",message:s}})+`
7
+ `):process.stderr.write(c.red(`\u2717 Verification failed: ${s}
8
+ `)),process.exitCode=U.GENERAL}}}async function $t(t,e,o){let n=`**Verification ${o.ok?"\u2705 passed":"\u26A0\uFE0F issues detected"}**
9
+
10
+ ${o.verdict}`;st(t,e,"agent",n,void 0,"system")}function Ft(t){let e=t.ok?c.green("\u2705"):c.yellow("\u26A0\uFE0F");console.log(),console.log(` ${e} Evidences collected for task ${t.taskId}`),console.log(c.dim("\u2500".repeat(60))),console.log(c.dim(` Verdict: ${t.verdict}`)),console.log();let o=t.diff;if(o.selectorResolves){o.htmlChanged?console.log(c.cyan(" \u2713 HTML changed")):console.log(c.dim(" \xB7 HTML unchanged"));let n=Object.keys(o.stylesChanged).length;if(n>0){console.log(c.cyan(` \u2713 ${n} style property change(s):`));for(let[r,[s,i]]of Object.entries(o.stylesChanged).slice(0,8))console.log(c.dim(` ${r}: ${s} \u2192 ${i}`));n>8&&console.log(c.dim(` ... and ${n-8} more`))}if(o.positionChanged&&console.log(c.cyan(" \u2713 Position shifted")),o.newConsoleErrors.length>0){console.log(c.yellow(` \u26A0 ${o.newConsoleErrors.length} new console error(s):`));for(let r of o.newConsoleErrors.slice(0,3))console.log(c.dim(` ${r.slice(0,120)}`))}}else console.log(c.red(" \u26A0 Target element not found \u2014 the fix may have renamed/removed it."));if(t.evidenceFiles.length>0){console.log(c.cyan(` Evidence files (${t.evidenceFiles.length}):`));for(let n of t.evidenceFiles){let r=n.split("/").pop()??n;try{let i=(Nt(n).size/1024).toFixed(1);console.log(c.dim(` ${r} (${i} KB)`))}catch{console.log(c.dim(` ${r}`))}}}console.log(),console.log(c.cyan(" Explore evidence (agent tools):")),console.log(c.dim(` vibeflow verify style_query ${t.taskId} <property>`)),console.log(c.dim(` vibeflow verify style_diff ${t.taskId} [--filter <pattern>]`)),console.log(c.dim(` vibeflow verify element_info ${t.taskId}`)),console.log(c.dim(` vibeflow verify html_diff ${t.taskId}`)),console.log(),console.log(c.cyan(" Review evidences:")),console.log(c.dim(" 1. Check if the fix is confirmed (styles match expectations)")),console.log(c.dim(` 2. If confirmed \u2192 vibeflow tasks --edit ${t.taskId} --set-status review --comment "Verified: <what you confirmed>"`)),console.log(c.dim(" 3. If not sure \u2192 leave a comment explaining uncertainty")),console.log(c.dim(` 4. If wrong \u2192 vibeflow tasks --edit ${t.taskId} --set-status in-progress`)),console.log(),t.ok||(console.log(c.yellow(" \u26A0 Verification failed \u2014 move to in-progress and fix:")),console.log(c.dim(` vibeflow tasks --edit ${t.taskId} --set-status in-progress`)))}export{jt as a,ut as b,Wt as c,zt as d,p as e,kt as f,ce as g,$t as h};
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ import{readdirSync as J,writeFileSync as q,readFileSync as V,unlinkSync as x,statSync as F,mkdirSync as G,existsSync as l}from"fs";import{join as m,basename as R}from"path";var g=".vibeflow",C="tasks",S="tasks/files",v="tasks/screenshots",ee="config.json";import{existsSync as f,readFileSync as w,writeFileSync as z,mkdirSync as p,readdirSync as h,unlinkSync as E,renameSync as A}from"fs";import{join as u,extname as I}from"path";import{randomBytes as K}from"crypto";var j=["backlog","todo","in-progress","review","done"];function M(){return K(15).toString("hex")}function k(e){return u(e,g,C)}function H(e){let s=u(e,g),n=u(s,"files"),i=u(s,S),r=u(s,"screenshots"),t=u(s,v);if(f(n)){p(i,{recursive:!0});for(let o of h(n)){let a=u(n,o),c=u(i,o);if(!f(c))try{A(a,c)}catch{}}}if(f(r)){p(t,{recursive:!0});for(let o of h(r)){let a=u(r,o),c=u(t,o);if(!f(c))try{A(a,c)}catch{}}}}function oe(e){H(e),p(k(e),{recursive:!0}),p(u(e,g,v),{recursive:!0})}function D(e){return e.slice(0,10)}function U(e,s,n){let i=k(e);return n?u(i,D(n),`${s}.json`):u(i,`${s}.json`)}function T(e,s){let n=k(e);if(!f(n))return null;for(let i of h(n,{withFileTypes:!0}))if(i.isDirectory()){let r=u(n,i.name,`${s}.json`);if(f(r))return r}else if(i.name===`${s}.json`)return u(n,i.name);return null}function W(e){let s=(()=>{if(typeof e.type!="string")return;let n=e.type.trim();if(!(!n||n==="[object Object]"))return n})();return{id:String(e.id??""),title:String(e.title??"Untitled"),description:String(e.description??""),status:j.includes(e.status)?e.status:"todo",url:e.url?String(e.url):void 0,selector:(()=>{let n=String(e.selector??"/");return e.file&&!e.cssSelector&&n.startsWith(String(e.file))?e.url?String(e.url):"/":n})(),cssSelector:e.cssSelector&&String(e.cssSelector)!==String(e.selector??"/")?String(e.cssSelector):void 0,file:e.file?String(e.file):void 0,line:e.line!=null?Number(e.line):void 0,col:e.col!=null?Number(e.col):void 0,component:e.component?String(e.component):void 0,type:s,priority:e.priority?String(e.priority):void 0,...e.reportBack===!0&&{reportBack:!0},agent:e.agent?String(e.agent):void 0,model:e.model?String(e.model):void 0,author:e.author?String(e.author):void 0,commits:Array.isArray(e.commits)?e.commits.map(n=>({sha:String(n.sha??""),message:String(n.message??""),timestamp:String(n.timestamp??new Date().toISOString())})):void 0,created:String(e.created??new Date().toISOString()),updated:e.updated?String(e.updated):void 0,comments:Array.isArray(e.comments)?e.comments.map(n=>({...n,text:n.text??n.content??""})):[],files:Array.isArray(e.files)?e.files.map(n=>typeof n=="string"?{name:n,addedAt:new Date().toISOString()}:{name:String(n.name??""),addedAt:String(n.addedAt??new Date().toISOString()),linkedPath:n.linkedPath?String(n.linkedPath):void 0,mimeType:n.mimeType?String(n.mimeType):void 0}).filter(n=>n.name):[],screenshot:e.screenshot?String(e.screenshot):void 0,annotatedElementText:e.annotatedElementText?String(e.annotatedElementText):void 0,tags:Array.isArray(e.tags)?e.tags.filter(n=>typeof n=="string"&&n.length>0):void 0,sortKey:e.sortKey?String(e.sortKey):void 0}}function L(e,s){let n=u(k(e),D(s.created));p(n,{recursive:!0});let i=u(n,`${s.id}.json`),r=i+".tmp";z(r,JSON.stringify(s,null,2),"utf-8"),A(r,i)}function O(e){return e.replace(/\\(n|t|r|\\)/g,(s,n)=>{switch(n){case"n":return`
3
+ `;case"t":return" ";case"r":return"\r";case"\\":return"\\";default:return n}})}function ae(e,s){let n=(()=>{let r=(s.priority??"").trim().toLowerCase();return r==="critical"?"Critical":r==="high"?"High":r==="low"?"Low":"Medium"})(),i={...s,title:O(s.title??"").trim(),description:O(s.description??"").trim(),priority:n,id:M(),created:new Date().toISOString(),comments:[],files:[]};return L(e,i),i}function y(e){try{let s=w(e,"utf-8");if(e.endsWith(".json")){let n=JSON.parse(s);return!n||typeof n!="object"||!("id"in n)?null:W(n)}return null}catch{return null}}function N(e){let s=k(e);if(!f(s))return[];let n=[];for(let i of h(s,{withFileTypes:!0}))if(i.isDirectory()){let r=u(s,i.name);for(let t of h(r))if(I(t)===".json"){let o=u(r,t),a=y(o);a&&n.push({task:a,filePath:o})}}else if(I(i.name)===".json"){let r=u(s,i.name),t=y(r);t&&n.push({task:t,filePath:r})}return n}function ue(e){return N(e).map(({task:s})=>s)}function ce(e){return N(e).map(({task:s,filePath:n})=>({...s,filePath:n}))}function B(e,s,n){let i=T(e,s),r=i?y(i):null;if(!r)return null;let t={...r,...n,updated:new Date().toISOString()};if(L(e,t),i&&i!==U(e,s,t.created))try{E(i)}catch{}return t}function le(e,s){let n=T(e,s);return n?(E(n),!0):!1}function me(e,s,n){return{id:e.id,status:e.status,title:e.title,description:e.description,...e.url&&{url:e.url},selector:e.selector,...e.file&&{file:e.file},...e.line!=null&&{line:e.line},...e.col!=null&&{col:e.col},...e.component&&{component:e.component},...e.type&&{type:e.type},...e.priority&&{priority:e.priority},...s&&s.length>0&&{structuredComments:s},...n&&n.length>0&&{linkedFiles:n},...e.reportBack&&{reportBack:!0},created:e.created}}function fe(e,s,n,i,r){let t=[];if(t.push(`[${e.status}] ${e.title}`),t.push(` id: ${e.id}`),t.push(` file: ${s}`),e.file&&t.push(` source: ${e.file}${e.line!=null?`:${e.line}`:""}${e.col!=null?`:${e.col}`:""}`),e.component&&t.push(` component: ${e.component}`),t.push(` selector: ${e.selector??"/"}`),e.cssSelector&&t.push(` css: ${e.cssSelector}`),e.url&&t.push(` url: ${e.url}`),e.commits&&e.commits.length>0)if(e.commits.length===1)t.push(` commit: ${e.commits[0].sha}`);else{t.push(` commits (${e.commits.length}):`);for(let o of e.commits)t.push(` ${o.sha.slice(0,8)} ${o.timestamp} ${o.message.slice(0,60)}`)}if(t.push(` created: ${e.created}`),e.type&&t.push(` type: ${e.type}`),e.priority&&t.push(` priority: ${e.priority}`),e.author&&t.push(` author: ${e.author}`),e.description){t.push(" description:");for(let o of e.description.split(`
4
+ `))t.push(` ${o}`)}if(e.annotatedElementText&&t.push(` element text: ${e.annotatedElementText}`),n.length>0){t.push(` comments (${n.length}):`);for(let o of n){let a=o.updatedAt?` (edited ${o.updatedAt})`:"";t.push(` [${o.author??"user"}] ${o.createdAt}${a}`);for(let c of o.text.split(`
5
+ `))t.push(` ${c}`)}}if(i.length>0){t.push(` linked files (${i.length}):`);for(let o of i){t.push(` - ${o.name} ${o.url}`);let a=o.linkedPath??u(r,".vibeflow","files",e.id,o.name);if(/\.(md|txt)$/i.test(o.name)&&o.size<1e5&&f(a))try{let c=w(a,"utf-8");t.push(" \u250C\u2500\u2500 content \u2500\u2500");for(let _ of c.split(`
6
+ `))t.push(` \u2502 ${_}`);t.push(" \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500")}catch{}}}return t.join(`
7
+ `)}function de(e){let{autoCommit:s,autoPush:n,autoComment:i,createBranch:r}=e,t=[];if(t.push("Agent instructions (concise):"),t.push(" Discover: vibeflow tasks --status todo | vibeflow tasks --type Research | vibeflow tasks --user <email> | vibeflow tasks --tag <tag>"),t.push(" Auto-claim: vibeflow tasks --next (picks highest-priority todo task and sets it in-progress automatically)"),t.push(" Details: vibeflow tasks --get <id> (full task info with comments and files)"),t.push(' Create: vibeflow tasks --add --title "..." --description "..."'),t.push(""),t.push(" Workflow:"),r?(t.push(" \u26A0 Create a branch FIRST, before any implementation:"),t.push(" 1. git checkout -b <short-name> (e.g. fix/annotation-errors, feat/eye-toggle, chore/cleanup-extension)"),t.push(" Branch name rules: lowercase, kebab-case, 2-5 words, prefix fix/feat/chore/docs."),t.push(" Describe the WORK done (not dates). Bad: agent/2026-04-16. Good: fix/bug-errors-visibility."),t.push(" 2. vibeflow tasks --edit <id> --set-status in-progress \u2190 CLAIM TASK"),t.push(" 3. <implement the change>")):(t.push(" \u26A0 IMMEDIATELY set in-progress BEFORE any implementation work:"),t.push(" 1. vibeflow tasks --edit <id> --set-status in-progress \u2190 DO THIS FIRST"),t.push(" (if you used --next: task is already in-progress \u2014 skip to step 2)"),t.push(" 2. <implement the change>")),s){t.push(r?" 4. git add <files> (stage your changes first)":" 3. git add <files> (stage your changes first)");let o=["--set-status review"];s&&o.push('--commit-message "<one-line summary>"'),i&&o.push('--comment "<report>"'),t.push(` ${r?"5":"4"}. vibeflow tasks --edit <id> ${o.join(" ")}`),t.push(" CLI will commit staged changes and link the commit SHA automatically.")}else{t.push(r?' 4. git add <files> && vibeflow tasks --commit --task <id> --message "<one-line summary>"':' 3. git add <files> && vibeflow tasks --commit --task <id> --message "<one-line summary>"');let o=["--set-status review"];i&&o.push('--comment "<report>"'),t.push(` ${r?"5":"4"}. vibeflow tasks --edit <id> ${o.join(" ")}`)}return i&&(t.push(""),t.push(" Comment format (--comment):"),t.push(" \xB7 Plain text for concise one-liners."),t.push(" \xB7 Markdown for multi-section reports. Use **bold**, bullet lists, code fences."),t.push(" \xB7 Must cover: what changed, why, key decisions, anything future agents should know."),t.push(" \xB7 For long reports, attach a .md file and reference it in the comment.")),t.push(""),s&&t.push(" [setting] Auto-commit ON: provide --commit-message when setting status to review; CLI commits."),n&&t.push(" [setting] Auto-push ON: CLI pushes after the commit automatically."),i&&t.push(" [setting] Auto-comment ON: --comment is required when setting status to review."),r&&t.push(" [setting] Create branch ON: all work goes on a dedicated branch created before implementation."),e.hasResearchTasks&&(t.push(" Research tasks: NEVER generate code \u2014 research only."),t.push(" Attach a .md report before marking Research tasks as review."),t.push(" CLI ENFORCES: cannot mark Research as review without an attached .md report."),t.push(" Create the report file locally first, then upload when marking as review:"),t.push(' vibeflow tasks --edit <id> --set-status review --report-file ./report.md --comment "..."'),t.push(" The file is saved next to the task and deleted from the original path automatically."),t.push(" Report must include: findings, options considered (with pros/cons), recommendation, sources.")),e.hasBugTasks&&(t.push(" Bug tasks: Reproduce the bug first, then include in the comment:"),t.push(" \xB7 Symptom: what the user sees"),t.push(" \xB7 Trigger: exact steps to reproduce"),t.push(" \xB7 Root cause: the specific code/logic that caused it"),t.push(" \xB7 Fix: what was changed and why it works"),t.push(" \xB7 Evidence: paste the relevant error message or stack trace")),t.push(" BLOCKED? If a task is unclear or missing context:"),t.push(' vibeflow tasks --edit <id> --comment "Blocked: <reason>. Need: <what is needed>."'),t.push(" Then pick the next task: vibeflow tasks --next"),t.push(" Do not guess at unclear requirements \u2014 leave a comment and move on."),t.push(" CRITICAL: NEVER edit .vibeflow/ task files directly."),t.push(" All task operations (status, comments, commits) must go through CLI commands."),t.push(" CRITICAL: Set in-progress BEFORE reading/planning. Other agents may pick the same task."),t.push(" The in-progress transition signals ownership. Skip it and another agent may duplicate your work."),t.push(" Sequence: discover tasks \u2192 pick one \u2192 set in-progress \u2192 THEN read details and implement."),t.push(' CRITICAL: NEVER set a task status to "done".'),t.push(' When your implementation is complete, set the status to "review" \u2014 not "done".'),t.push(" Only humans can mark tasks as done after reviewing the work."),t.push(" The CLI will warn you and still allow the change \u2014 but agents must not use it."),t.push(""),t.join(`
8
+ `)}var P=".linked.json";function d(e,s){return m(e,g,S,s)}function Y(e,s){G(d(e,s),{recursive:!0})}function Q(e,s){let n=m(d(e,s),P);if(!l(n))return[];try{return JSON.parse(V(n,"utf-8"))}catch{return[]}}function X(e,s){let n=T(e,s),i=n?y(n):null;return!i?.files||i.files.length===0?[]:i.files}function $(e,s,n){B(e,s,{files:n})}function b(e,s){let n=X(e,s),i=m(d(e,s),P);if(!l(i))return n;let r=Q(e,s);if(r.length===0){try{x(i)}catch{}return n}let t=n.slice(),o=!1;for(let a of r)t.find(c=>c.linkedPath===a.path||c.name===a.name&&c.linkedPath)||(t.push({name:a.name,linkedPath:a.path,addedAt:new Date().toISOString()}),o=!0);o&&$(e,s,t);try{x(i)}catch{}return t}function Z(e,s){let n=d(e,s),i=b(e,s),r=new Map;for(let t of i){if(t.linkedPath&&l(t.linkedPath)){let a=F(t.linkedPath);r.set(t.name,{name:t.name,size:a.size,url:`/api/tasks/${s}/files/${encodeURIComponent(t.name)}`,linkedPath:t.linkedPath,createdAt:a.mtime.toISOString()});continue}let o=m(n,t.name);if(l(o)){let a=F(o);r.set(t.name,{name:t.name,size:a.size,url:`/api/tasks/${s}/files/${encodeURIComponent(t.name)}`,createdAt:a.mtime.toISOString()})}}if(l(n))for(let t of J(n,{withFileTypes:!0})){if(!t.isFile()||t.name===P||r.has(t.name))continue;let o=m(n,t.name),a=F(o);r.set(t.name,{name:t.name,size:a.size,url:`/api/tasks/${s}/files/${encodeURIComponent(t.name)}`,createdAt:a.mtime.toISOString()})}return Array.from(r.values())}function Te(e,s,n,i){let r=R(n);Y(e,s),q(m(d(e,s),r),i);let t=b(e,s);return t.find(o=>o.name===r&&!o.linkedPath)||(t.push({name:r,addedAt:new Date().toISOString()}),$(e,s,t)),{name:r,size:i.length,url:`/api/tasks/${s}/files/${encodeURIComponent(r)}`}}function xe(e,s,n){let i=R(n),r=b(e,s),t=r.findIndex(a=>a.name===i);if(t!==-1){let[a]=r.splice(t,1);if($(e,s,r),a&&!a.linkedPath){let c=m(d(e,s),i);l(c)&&x(c)}return!0}let o=m(d(e,s),i);return l(o)?(x(o),!0):!1}function be(e,s,n){let i=R(n),r=b(e,s).find(o=>o.name===i&&o.linkedPath);if(r?.linkedPath&&l(r.linkedPath))return r.linkedPath;let t=m(d(e,s),i);return l(t)?t:null}function ve(e,s){return Z(e,s).length}export{g as a,C as b,S as c,v as d,ee as e,M as f,oe as g,U as h,T as i,O as j,ae as k,y as l,ue as m,ce as n,B as o,le as p,me as q,fe as r,de as s,d as t,Y as u,Z as v,Te as w,xe as x,be as y,ve as z};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{d as i}from"./chunk-XHZXHACL.js";import{existsSync as s,readFileSync as c,writeFileSync as u,mkdirSync as l,renameSync as f}from"fs";import{join as r}from"path";import S from"os";var p="settings.json";function m(){return r(S.homedir(),".vibeflow","settings.json")}function b(t){return r(t,i,p)}function P(){try{return JSON.parse(c(m(),"utf-8"))}catch{return{}}}function O(t){let e=r(S.homedir(),".vibeflow");s(e)||l(e,{recursive:!0});let n=m(),o=n+".tmp";u(o,JSON.stringify(t,null,2),"utf-8"),f(o,n)}function d(t){let e=P(),n=b(t);if(!s(n))return e;try{let o=JSON.parse(c(n,"utf-8"));return{...e,...o}}catch{return e}}function N(t,e){let n=r(t,i);s(n)||l(n,{recursive:!0});let o=b(t),a={...d(t),...e},g=o+".tmp";return u(g,JSON.stringify(a,null,2),"utf-8"),f(g,o),a}export{P as a,O as b,d as c,N as d};
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ import{a as q}from"./chunk-X4RGF6JJ.js";import{existsSync as l,readFileSync as L,writeFileSync as v,mkdirSync as f,readdirSync as p,unlinkSync as m,renameSync as y,openSync as B,statSync as _}from"fs";import{join as u,extname as T}from"path";import{randomBytes as U}from"crypto";var E=["backlog","todo","in-progress","review","done"];function A(e){let i=(e??"Medium").trim().toLowerCase();return i==="critical"?0:i==="high"?1:i==="low"?3:2}function $(e,i){let n=A(e.priority),r=A(i.priority);return n!==r?n-r:new Date(e.created).getTime()-new Date(i.created).getTime()}var d=".vibeflow",R="tasks",C="tasks/files",k="tasks/screenshots",ne="config.json";import{openSync as J,statSync as H,unlinkSync as O,mkdirSync as N,existsSync as V}from"fs";import{join as I}from"path";var F=new Map;function S(e,i){let n=I(e,d,"tasks",".locks");try{V(n)||N(n,{recursive:!0})}catch{}return I(n,`${i}.lock`)}function W(e,i,n){let r=Date.now()+i,{dirname:o}=q("path");for(;;)try{J(e,"wx");return}catch(t){if(t.code==="ENOENT"){try{N(o(e),{recursive:!0})}catch{}continue}if(t.code!=="EEXIST")throw t;try{let c=H(e);if(Date.now()-c.mtimeMs>n){try{O(e)}catch{}continue}}catch{continue}if(Date.now()>=r)throw new Error(`Failed to acquire lock ${e} within ${i}ms`);if(r-Date.now()<=0)throw new Error(`Failed to acquire lock ${e} within ${i}ms`);let a=Date.now()+Math.min(10,r-Date.now());for(;Date.now()<a;);}}function z(e){try{O(e)}catch{}}async function ae(e,i,n){let r=n?.timeoutMs??5e3,o=n?.staleMs??1e4,s=(F.get(e)??Promise.resolve()).then(async()=>{W(e,r,o);try{return await i()}finally{z(e)}});return F.set(e,s.catch(()=>{})),s}function X(){return U(15).toString("hex")}function h(e){return u(e,d,R)}function G(e){let i=u(e,d),n=u(i,"files"),r=u(i,C),o=u(i,"screenshots"),t=u(i,k);if(l(n)){f(r,{recursive:!0});for(let s of p(n)){let a=u(n,s),c=u(r,s);if(!l(c))try{y(a,c)}catch{}}}if(l(o)){f(t,{recursive:!0});for(let s of p(o)){let a=u(o,s),c=u(t,s);if(!l(c))try{y(a,c)}catch{}}}}function pe(e){G(e),f(h(e),{recursive:!0}),f(u(e,d,k),{recursive:!0})}function w(e){return e.slice(0,10)}function Y(e,i,n){let r=h(e);return n?u(r,w(n),`${i}.json`):u(r,`${i}.json`)}function j(e,i){let n=h(e);if(!l(n))return null;for(let r of p(n,{withFileTypes:!0}))if(r.isDirectory()){let o=u(n,r.name,`${i}.json`);if(l(o))return o}else if(r.name===`${i}.json`)return u(n,r.name);return null}function Q(e){return{...e,text:e.text??e.content??""}}function Z(e){let i=(()=>{if(typeof e.type!="string")return;let n=e.type.trim();if(!(!n||n==="[object Object]"))return n})();return{id:String(e.id??""),title:String(e.title??"Untitled"),description:String(e.description??""),status:E.includes(e.status)?e.status:"todo",url:e.url?String(e.url):void 0,selector:(()=>{let n=String(e.selector??"/");return e.file&&!e.cssSelector&&n.startsWith(String(e.file))?e.url?String(e.url):"/":n})(),cssSelector:e.cssSelector&&String(e.cssSelector)!==String(e.selector??"/")?String(e.cssSelector):void 0,file:e.file?String(e.file):void 0,line:e.line==null?void 0:Number(e.line),col:e.col==null?void 0:Number(e.col),component:e.component?String(e.component):void 0,type:i,priority:e.priority?String(e.priority):void 0,...e.reportBack===!0&&{reportBack:!0},agent:e.agent?String(e.agent):void 0,model:e.model?String(e.model):void 0,author:e.author?String(e.author):void 0,commits:Array.isArray(e.commits)?e.commits.map(n=>({sha:String(n.sha??""),message:String(n.message??""),timestamp:String(n.timestamp??new Date().toISOString())})):void 0,created:String(e.created??new Date().toISOString()),updated:e.updated?String(e.updated):void 0,comments:Array.isArray(e.comments)?e.comments.map(n=>Q(n)):[],files:Array.isArray(e.files)?e.files.map(n=>typeof n=="string"?{name:n,addedAt:new Date().toISOString()}:{name:String(n.name??""),addedAt:String(n.addedAt??new Date().toISOString()),linkedPath:n.linkedPath?String(n.linkedPath):void 0,mimeType:n.mimeType?String(n.mimeType):void 0}).filter(n=>n.name):[],screenshot:e.screenshot?String(e.screenshot):void 0,annotatedElementText:e.annotatedElementText?String(e.annotatedElementText):void 0,tags:Array.isArray(e.tags)?e.tags.filter(n=>typeof n=="string"&&n.length>0):void 0,sortKey:e.sortKey?String(e.sortKey):void 0,verified:e.verified===!0,branchName:e.branchName?String(e.branchName):void 0,baseline:e.baseline&&typeof e.baseline=="object"?e.baseline:void 0,authStateEnc:e.authStateEnc?String(e.authStateEnc):void 0}}function M(e,i){let n=u(h(e),w(i.created));f(n,{recursive:!0});let r=u(n,`${i.id}.json`),o=r+".tmp";v(o,JSON.stringify(i,null,2),"utf-8"),y(o,r)}function ee(e,i){let n=e+".tmp";v(n,JSON.stringify(i,null,2),"utf-8"),y(n,e)}function P(e){return e.replace(/\\(n|t|r|\\)/g,(i,n)=>{switch(n){case"n":return`
3
+ `;case"t":return" ";case"r":return"\r";case"\\":return"\\";default:return n}})}function he(e,i){let n=(()=>{let o=(i.priority??"").trim().toLowerCase();return o==="critical"?"Critical":o==="high"?"High":o==="low"?"Low":"Medium"})(),r={...i,title:P(i.title??"").trim(),description:P(i.description??"").trim(),priority:n,id:X(),created:new Date().toISOString(),comments:[],files:[]};return M(e,r),r}function g(e){try{let i=L(e,"utf-8");if(e.endsWith(".json")){let n=JSON.parse(i);return!n||typeof n!="object"||!("id"in n)?null:Z(n)}return null}catch{return null}}function K(e){let i=h(e);if(!l(i))return[];let n=[];for(let r of p(i,{withFileTypes:!0}))if(r.isDirectory()){let o=u(i,r.name);for(let t of p(o))if(T(t)===".json"){let s=u(o,t),a=g(s);a&&n.push({task:a,filePath:s})}}else if(T(r.name)===".json"){let o=u(i,r.name),t=g(o);t&&n.push({task:t,filePath:o})}return n}function ge(e){return K(e).map(({task:i})=>i)}function te(e){return K(e).map(({task:i,filePath:n})=>({...i,filePath:n}))}function ye(e,i,n){let r=S(e,i),o=null,t=Date.now()+5e3;for(;Date.now()<t;)try{B(r,"wx");break}catch(s){if(s.code!=="EEXIST")throw s;try{let c=_(r);if(Date.now()-c.mtimeMs>1e4){try{m(r)}catch{}continue}}catch{continue}let a=Date.now();for(;Date.now()-a<10&&Date.now()<t;);}try{let s=j(e,i),a=s?g(s):null;if(!a)return null;let c={...a,...n,updated:new Date().toISOString()};if(M(e,c),s&&s!==Y(e,i,c.created))try{m(s)}catch{}o=c}finally{try{m(r)}catch{}}return o}function ke(e,i){let n=j(e,i);return n?(m(n),!0):!1}function Se(e,i={}){let n=S(e,"claim"),r=null,o=Date.now()+5e3;for(;Date.now()<o;)try{B(n,"wx");break}catch(t){if(t.code!=="EEXIST")throw t;try{let a=_(n);if(Date.now()-a.mtimeMs>1e4){try{m(n)}catch{}continue}}catch{continue}let s=Date.now();for(;Date.now()-s<10&&Date.now()<o;);}try{let s=te(e).filter(a=>a.status==="todo");i.type&&(s=s.filter(a=>a.type===i.type)),i.user&&(s=s.filter(a=>a.author===i.user)),i.tag&&i.tag.length>0&&(s=s.filter(a=>a.tags&&i.tag.every(c=>a.tags.includes(c)))),s.sort($);for(let a of s){let c=g(a.filePath);if(!c||c.status!=="todo")continue;let x={status:"in-progress",updated:new Date().toISOString()};i.author&&(x.author=i.author);let D={...c,...x};ee(a.filePath,D),r=D;break}}finally{try{m(n)}catch{}}return r}function Te(e,i,n){return{id:e.id,status:e.status,title:e.title,description:e.description,...e.url&&{url:e.url},selector:e.selector,...e.file&&{file:e.file},...e.line!=null&&{line:e.line},...e.col!=null&&{col:e.col},...e.component&&{component:e.component},...e.type&&{type:e.type},...e.priority&&{priority:e.priority},...i&&i.length>0&&{structuredComments:i},...n&&n.length>0&&{linkedFiles:n},...e.reportBack&&{reportBack:!0},created:e.created}}function ve(e,i,n,r,o){let t=[];if(t.push(`[${e.status}] ${e.title}`),t.push(` id: ${e.id}`),t.push(` file: ${i}`),e.file&&t.push(` source: ${e.file}${e.line==null?"":`:${e.line}`}${e.col==null?"":`:${e.col}`}`),e.component&&t.push(` component: ${e.component}`),t.push(` selector: ${e.selector??"/"}`),e.cssSelector&&t.push(` css: ${e.cssSelector}`),e.url&&t.push(` url: ${e.url}`),e.commits&&e.commits.length>0)if(e.commits.length===1)t.push(` commit: ${e.commits[0].sha}`);else{t.push(` commits (${e.commits.length}):`);for(let s of e.commits)t.push(` ${s.sha.slice(0,8)} ${s.timestamp} ${s.message.slice(0,60)}`)}if(t.push(` created: ${e.created}`),e.type&&t.push(` type: ${e.type}`),e.priority&&t.push(` priority: ${e.priority}`),e.author&&t.push(` author: ${e.author}`),e.description){t.push(" description:");for(let s of e.description.split(`
4
+ `))t.push(` ${s}`)}if(e.annotatedElementText&&t.push(` element text: ${e.annotatedElementText}`),n.length>0){t.push(` comments (${n.length}):`);for(let s of n){let a=s.updatedAt?` (edited ${s.updatedAt})`:"";t.push(` [${s.author??"user"}] ${s.createdAt}${a}`);for(let c of s.text.split(`
5
+ `))t.push(` ${c}`)}}if(r.length>0){t.push(` linked files (${r.length}):`);for(let s of r){t.push(` - ${s.name} ${s.url}`);let a=s.linkedPath??u(o,".vibeflow","files",e.id,s.name);if(/\.(md|txt)$/i.test(s.name)&&s.size<1e5&&l(a))try{let c=L(a,"utf-8");t.push(" \u250C\u2500\u2500 content \u2500\u2500");for(let b of c.split(`
6
+ `))t.push(` \u2502 ${b}`);t.push(" \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500")}catch{}}}return t.join(`
7
+ `)}function we(e){let{autoCommit:i,autoPush:n,autoComment:r,createBranch:o}=e,t=[];if(t.push("Agent instructions (concise):"),t.push(" Discover: vibeflow tasks --status todo | vibeflow tasks --type Research | vibeflow tasks --user <email> | vibeflow tasks --tag <tag>"),t.push(" Auto-claim: vibeflow tasks --next (picks highest-priority todo task and sets it in-progress automatically)"),t.push(" Details: vibeflow tasks --get <id> (full task info with comments and files)"),t.push(' Create: vibeflow tasks --add --title "..." --description "..."'),t.push(""),t.push(" Workflow:"),o?(t.push(" \u26A0 Create a branch FIRST, before any implementation:"),t.push(" 1. git checkout -b <short-name> (e.g. fix/annotation-errors, feat/eye-toggle, chore/cleanup-extension)"),t.push(" Branch name rules: lowercase, kebab-case, 2-5 words, prefix fix/feat/chore/docs."),t.push(" Describe the WORK done (not dates). Bad: agent/2026-04-16. Good: fix/bug-errors-visibility."),t.push(" 2. vibeflow tasks --edit <id> --set-status in-progress \u2190 CLAIM TASK"),t.push(" 3. <implement the change>")):(t.push(" \u26A0 IMMEDIATELY set in-progress BEFORE any implementation work:"),t.push(" 1. vibeflow tasks --edit <id> --set-status in-progress \u2190 DO THIS FIRST"),t.push(" (if you used --next: task is already in-progress \u2014 skip to step 2)"),t.push(" 2. <implement the change>")),e.requireVerifyBeforeReview)if(i){t.push(o?" 4. git add <files> (stage your changes first)":" 3. git add <files> (stage your changes first)"),t.push(` ${o?"5":"4"}. vibeflow verify <id> (verify the fix \u2014 check the evidences it produces)`),t.push(" If verification fails, set task back to in-progress and fix.");let a=["--set-status review"];i&&a.push('--commit-message "<one-line summary>"'),r&&a.push('--comment "<report>"'),t.push(` ${o?"6":"5"}. vibeflow tasks --edit <id> ${a.join(" ")}`),t.push(" CLI will commit staged changes and link the commit SHA automatically.")}else{t.push(o?' 4. git add <files> && vibeflow tasks --commit --task <id> --message "<one-line summary>"':' 3. git add <files> && vibeflow tasks --commit --task <id> --message "<one-line summary>"'),t.push(` ${o?"5":"4"}. vibeflow verify <id> (verify the fix \u2014 check the evidences it produces)`),t.push(" If verification fails, set task back to in-progress and fix.");let a=["--set-status review"];r&&a.push('--comment "<report>"'),t.push(` ${o?"6":"5"}. vibeflow tasks --edit <id> ${a.join(" ")}`)}else{if(i){t.push(o?" 4. git add <files> (stage your changes first)":" 3. git add <files> (stage your changes first)");let c=["--set-status review"];i&&c.push('--commit-message "<one-line summary>"'),r&&c.push('--comment "<report>"'),t.push(` ${o?"5":"4"}. vibeflow tasks --edit <id> ${c.join(" ")}`),t.push(" CLI will commit staged changes and link the commit SHA automatically.")}else{t.push(o?' 4. git add <files> && vibeflow tasks --commit --task <id> --message "<one-line summary>"':' 3. git add <files> && vibeflow tasks --commit --task <id> --message "<one-line summary>"');let c=["--set-status review"];r&&c.push('--comment "<report>"'),t.push(` ${o?"5":"4"}. vibeflow tasks --edit <id> ${c.join(" ")}`)}let a=o?"6":"5";t.push(` ${a}. vibeflow verify <id> (verify the fix \u2014 check the evidences it produces)`),t.push(" If verification fails, set task back to in-progress and fix.")}return r&&(t.push(""),t.push(" Comment format (--comment):"),t.push(" \xB7 Plain text for concise one-liners."),t.push(" \xB7 Markdown for multi-section reports. Use **bold**, bullet lists, code fences."),t.push(" \xB7 Must cover: what changed, why, key decisions, anything future agents should know."),t.push(" \xB7 For long reports, attach a .md file and reference it in the comment.")),t.push(""),i&&t.push(" [setting] Auto-commit ON: provide --commit-message when setting status to review; CLI commits."),n&&t.push(" [setting] Auto-push ON: CLI pushes after the commit automatically."),r&&t.push(" [setting] Auto-comment ON: --comment is required when setting status to review."),o&&t.push(" [setting] Create branch ON: all work goes on a dedicated branch created before implementation."),e.requireVerifyBeforeReview&&t.push(" [setting] Verify gate ON: run vibeflow verify before setting status to review (skipped for tasks without URL/selector)."),e.hasResearchTasks&&(t.push(" Research tasks: NEVER generate code \u2014 research only."),t.push(" Attach a .md report before marking Research tasks as review."),t.push(" CLI ENFORCES: cannot mark Research as review without an attached .md report."),t.push(" Create the report file locally first, then upload when marking as review:"),t.push(' vibeflow tasks --edit <id> --set-status review --report-file ./report.md --comment "..."'),t.push(" The file is saved next to the task and deleted from the original path automatically."),t.push(" Report must include: findings, options considered (with pros/cons), recommendation, sources.")),e.hasBugTasks&&(t.push(" Bug tasks: Reproduce the bug first, then include in the comment:"),t.push(" \xB7 Symptom: what the user sees"),t.push(" \xB7 Trigger: exact steps to reproduce"),t.push(" \xB7 Root cause: the specific code/logic that caused it"),t.push(" \xB7 Fix: what was changed and why it works"),t.push(" \xB7 Evidence: paste the relevant error message or stack trace")),t.push(" BLOCKED? If a task is unclear or missing context:"),t.push(' vibeflow tasks --edit <id> --comment "Blocked: <reason>. Need: <what is needed>."'),t.push(" Then pick the next task: vibeflow tasks --next"),t.push(" Do not guess at unclear requirements \u2014 leave a comment and move on."),t.push(" CRITICAL: NEVER edit .vibeflow/ task files directly."),t.push(" All task operations (status, comments, commits) must go through CLI commands."),t.push(" CRITICAL: Set in-progress BEFORE reading/planning. Other agents may pick the same task."),t.push(" The in-progress transition signals ownership. Skip it and another agent may duplicate your work."),t.push(" Sequence: discover tasks \u2192 pick one \u2192 set in-progress \u2192 THEN read details and implement."),t.push(' CRITICAL: NEVER set a task status to "done".'),t.push(' When your implementation is complete, set the status to "review" \u2014 not "done".'),t.push(" Only humans can mark tasks as done after reviewing the work."),t.push(" The CLI will warn you and still allow the change \u2014 but agents must not use it."),t.push(""),t.join(`
8
+ `)}function be(e){let i=h(e);if(!l(i))return 0;let n=0;for(let r of p(i,{withFileTypes:!0})){if(r.isDirectory()||T(r.name)!==".json")continue;let o=u(i,r.name),t=g(o);if(!t)continue;let s=u(i,w(t.created)),a=u(s,r.name);o!==a&&(f(s,{recursive:!0}),v(a,JSON.stringify(t,null,2),"utf-8"),m(o),n++)}return n}export{E as a,A as b,d as c,R as d,C as e,k as f,ne as g,S as h,ae as i,X as j,h as k,pe as l,Y as m,j as n,M as o,ee as p,P as q,he as r,g as s,ge as t,te as u,ye as v,ke as w,Se as x,Te as y,ve as z,we as A,be as B};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a,b,c,d,e}from"./chunk-WARORREB.js";import"./chunk-JAWQQLJC.js";import"./chunk-X4RGF6JJ.js";export{c as addComment,e as deleteComment,a as listComments,b as normalizeCommentText,d as updateComment};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a,b,c,d,e,f}from"./chunk-JQTURVVN.js";import"./chunk-EZX6HYC3.js";export{c as addComment,e as deleteComment,f as getCommentCount,a as listComments,b as normalizeCommentText,d as updateComment};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a,b,c,d,e}from"./chunk-RRQ5P63N.js";import"./chunk-O4LGEPMQ.js";import"./chunk-X4RGF6JJ.js";export{c as addComment,e as deleteComment,a as listComments,b as normalizeCommentText,d as updateComment};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a,b,c,d,e}from"./chunk-PGGJRQCO.js";import"./chunk-EZX6HYC3.js";export{c as addComment,e as deleteComment,a as listComments,b as normalizeCommentText,d as updateComment};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a,b,c,d,e}from"./chunk-EAYTSVCN.js";import"./chunk-2CI62NHU.js";import"./chunk-X4RGF6JJ.js";export{c as addComment,e as deleteComment,a as listComments,b as normalizeCommentText,d as updateComment};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a,b,c,d,e}from"./chunk-WZ2QQDYW.js";import"./chunk-ZHA4Y2KB.js";import"./chunk-X4RGF6JJ.js";export{c as addComment,e as deleteComment,a as listComments,b as normalizeCommentText,d as updateComment};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a,b,c,d,e}from"./chunk-SQPWTIQO.js";import"./chunk-QJMBWTAZ.js";import"./chunk-X4RGF6JJ.js";export{c as addComment,e as deleteComment,a as listComments,b as normalizeCommentText,d as updateComment};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a,b,c,d,e}from"./chunk-WKEMBLJR.js";import"./chunk-Q7MEW67Z.js";import"./chunk-XHZXHACL.js";export{c as addComment,e as deleteComment,a as listComments,b as normalizeCommentText,d as updateComment};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a,b,c,d,e}from"./chunk-CQ524DVH.js";import"./chunk-PN5C7EHL.js";export{c as addComment,e as deleteComment,a as listComments,b as normalizeCommentText,d as updateComment};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a,b,c,d,e,f,g,h,i}from"./chunk-PWP474PZ.js";import"./chunk-2CI62NHU.js";import"./chunk-X4RGF6JJ.js";export{f as deleteFile,b as ensureFilesDir,h as getFileCount,g as getFilePath,a as getFilesDir,d as listFiles,i as migrateAllLegacyLinkedRefs,c as readTaskFileRefs,e as saveFile};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{s as a,t as b,u as c,v as d,w as e,x as f,y as g}from"./chunk-BOPGIKZN.js";export{e as deleteFile,b as ensureFilesDir,g as getFileCount,f as getFilePath,a as getFilesDir,c as listFiles,d as saveFile};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{t as a,u as b,v as c,w as d,x as e,y as f,z as g}from"./chunk-2L7GDWKA.js";export{e as deleteFile,b as ensureFilesDir,g as getFileCount,f as getFilePath,a as getFilesDir,c as listFiles,d as saveFile};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a,b,c,d,e,f,g}from"./chunk-ILUMCOF2.js";import"./chunk-EZX6HYC3.js";export{e as deleteFile,b as ensureFilesDir,g as getFileCount,f as getFilePath,a as getFilesDir,c as listFiles,d as saveFile};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"./chunk-IJ67OEKX.js";import"./chunk-PN5C7EHL.js";export{c as ALLOWED_FILE_EXTENSIONS,a as MAX_FILENAME_LENGTH,b as MAX_FILE_SIZE,l as deleteFile,h as ensureFilesDir,n as getFileCount,m as getFilePath,g as getFilesDir,e as isAllowedFileExtension,d as isValidFilename,j as listFiles,o as migrateAllLegacyLinkedRefs,i as readTaskFileRefs,k as saveFile,f as validateFilename};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{t as a,u as b,v as c,w as d,x as e,y as f,z as g}from"./chunk-D4FZTZHO.js";export{e as deleteFile,b as ensureFilesDir,g as getFileCount,f as getFilePath,a as getFilesDir,c as listFiles,d as saveFile};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{t as a,u as b,v as c,w as d,x as e,y as f,z as g}from"./chunk-XYZECVJ4.js";export{e as deleteFile,b as ensureFilesDir,g as getFileCount,f as getFilePath,a as getFilesDir,c as listFiles,d as saveFile};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{t as a,u as b,v as c,w as d,x as e,y as f,z as g}from"./chunk-PYMUW2HM.js";export{e as deleteFile,b as ensureFilesDir,g as getFileCount,f as getFilePath,a as getFilesDir,c as listFiles,d as saveFile};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a,b,c,d,e,f,g,h,i}from"./chunk-R5NQALFI.js";import"./chunk-JAWQQLJC.js";import"./chunk-X4RGF6JJ.js";export{f as deleteFile,b as ensureFilesDir,h as getFileCount,g as getFilePath,a as getFilesDir,d as listFiles,i as migrateAllLegacyLinkedRefs,c as readTaskFileRefs,e as saveFile};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{t as a,u as b,v as c,w as d,x as e,y as f,z as g}from"./chunk-ES3JTCZ7.js";export{e as deleteFile,b as ensureFilesDir,g as getFileCount,f as getFilePath,a as getFilesDir,c as listFiles,d as saveFile};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a,b,c,d,e,f,g,h,i}from"./chunk-BUQI2W5H.js";import"./chunk-O4LGEPMQ.js";import"./chunk-X4RGF6JJ.js";export{f as deleteFile,b as ensureFilesDir,h as getFileCount,g as getFilePath,a as getFilesDir,d as listFiles,i as migrateAllLegacyLinkedRefs,c as readTaskFileRefs,e as saveFile};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a,b,c,d,e,f,g,h,i}from"./chunk-32Z32W7T.js";import"./chunk-ZHA4Y2KB.js";import"./chunk-X4RGF6JJ.js";export{f as deleteFile,b as ensureFilesDir,h as getFileCount,g as getFilePath,a as getFilesDir,d as listFiles,i as migrateAllLegacyLinkedRefs,c as readTaskFileRefs,e as saveFile};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"./chunk-BBIA4IIO.js";import"./chunk-Q7MEW67Z.js";import"./chunk-XHZXHACL.js";export{c as ALLOWED_FILE_EXTENSIONS,a as MAX_FILENAME_LENGTH,b as MAX_FILE_SIZE,l as deleteFile,h as ensureFilesDir,n as getFileCount,m as getFilePath,g as getFilesDir,e as isAllowedFileExtension,d as isValidFilename,j as listFiles,o as migrateAllLegacyLinkedRefs,i as readTaskFileRefs,k as saveFile,f as validateFilename};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{s as a,t as b,u as c,v as d,w as e,x as f,y as g}from"./chunk-TCTUG3QV.js";export{e as deleteFile,b as ensureFilesDir,g as getFileCount,f as getFilePath,a as getFilesDir,c as listFiles,d as saveFile};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{t as a,u as b,v as c,w as d,x as e,y as f,z as g}from"./chunk-I3WFKPN7.js";export{e as deleteFile,b as ensureFilesDir,g as getFileCount,f as getFilePath,a as getFilesDir,c as listFiles,d as saveFile};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a,b,c,d,e,f,g,h,i}from"./chunk-GQQIUROY.js";import"./chunk-QJMBWTAZ.js";import"./chunk-X4RGF6JJ.js";export{f as deleteFile,b as ensureFilesDir,h as getFileCount,g as getFilePath,a as getFilesDir,d as listFiles,i as migrateAllLegacyLinkedRefs,c as readTaskFileRefs,e as saveFile};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"./chunk-P63ZVL36.js";import"./chunk-ZHA4Y2KB.js";import"./chunk-X4RGF6JJ.js";export{c as ALLOWED_FILE_EXTENSIONS,a as MAX_FILENAME_LENGTH,b as MAX_FILE_SIZE,l as deleteFile,h as ensureFilesDir,n as getFileCount,m as getFilePath,g as getFilesDir,e as isAllowedFileExtension,d as isValidFilename,j as listFiles,o as migrateAllLegacyLinkedRefs,i as readTaskFileRefs,k as saveFile,f as validateFilename};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{g as s,l as m,o as a}from"./chunk-Q7MEW67Z.js";import"./chunk-XHZXHACL.js";import{execFileSync as g,execSync as f}from"child_process";function l(r,i,e){try{let t=`${e} [proto:${i}]`;g("git",["commit","-m",t],{cwd:r,stdio:"inherit"});let o=f("git rev-parse HEAD",{cwd:r}).toString().trim(),n=s(r,i),c=n?m(n)?.commits??[]:[];return a(r,i,{commits:[...c,{sha:o,message:e,timestamp:new Date().toISOString()}]}),{ok:!0,sha:o}}catch(t){return{ok:!1,error:t instanceof Error?t.message:String(t)}}}export{l as commitTaskChanges};