ripplo 0.9.4 → 0.9.5

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 (39) hide show
  1. package/dist/{chunk-T4GHICK4.js → chunk-2A6KSSUD.js} +1 -1
  2. package/dist/{chunk-YR3N73PR.js → chunk-74ZADYZC.js} +2 -2
  3. package/dist/{chunk-PPMW4GUY.js → chunk-77DJHICC.js} +1 -1
  4. package/dist/{chunk-TBCRT6EC.js → chunk-ESTPIODD.js} +1 -1
  5. package/dist/{chunk-ZQHKESUR.js → chunk-GYH4P7SC.js} +1 -1
  6. package/dist/{chunk-MHXAGRCM.js → chunk-IA7TU3WW.js} +1 -1
  7. package/dist/{chunk-O2VP65IR.js → chunk-IDPYM454.js} +1 -1
  8. package/dist/{chunk-3KD2FTEQ.js → chunk-JIMLVUPS.js} +4 -4
  9. package/dist/{chunk-SBDRIIVW.js → chunk-JNLHZVZJ.js} +2 -2
  10. package/dist/{chunk-PLQGRHHV.js → chunk-NBSDY7QG.js} +1 -1
  11. package/dist/{chunk-2TBRW5WZ.js → chunk-NJFCO7FT.js} +1 -1
  12. package/dist/{chunk-6Z555TLR.js → chunk-PPB7QGV2.js} +1 -1
  13. package/dist/{chunk-G3UFH3WS.js → chunk-QIXJ7Z2L.js} +1 -1
  14. package/dist/{chunk-FH2BITRY.js → chunk-TRQDCBKV.js} +1 -1
  15. package/dist/{chunk-XDK6UCMD.js → chunk-VXJACUXK.js} +1 -1
  16. package/dist/{chunk-ML7WCYPY.js → chunk-XBN6AJVQ.js} +1 -1
  17. package/dist/{chunk-T6NNV7ZO.js → chunk-ZYDCN5K2.js} +1 -1
  18. package/dist/{cli-error-TM2YODR3.js → cli-error-MEC67EVT.js} +1 -1
  19. package/dist/{compile-write-TTEHFTNY.js → compile-write-F7D273JN.js} +1 -1
  20. package/dist/{daemon-5IFFVQEE.js → daemon-3CCSJNDP.js} +1 -1
  21. package/dist/{daemon-6B4OSRBS.js → daemon-QRMX6RPX.js} +1 -1
  22. package/dist/{dsl-loader-Z54ZM7C6.js → dsl-loader-A2EMKCRL.js} +1 -1
  23. package/dist/hook.js +1 -1
  24. package/dist/index.js +196 -186
  25. package/dist/{plan-reminder-H2ZU5WZF.js → plan-reminder-6E4CHEAZ.js} +1 -1
  26. package/dist/post-edit-VHZDDVV5.js +4 -0
  27. package/dist/post-edit-analyze-YAVEMK4O.js +4 -0
  28. package/dist/post-edit-flag-stubs-PMMITC7F.js +4 -0
  29. package/dist/{pre-edit-TRMRQGTZ.js → pre-edit-R77BLLLQ.js} +1 -1
  30. package/dist/{pre-edit-watch-gate-OTD6WRUN.js → pre-edit-watch-gate-6MMET2NZ.js} +1 -1
  31. package/dist/{prompt-submit-T6GURGAW.js → prompt-submit-WMYBXZQN.js} +1 -1
  32. package/dist/solve-worker.js +1 -1
  33. package/dist/status-PUV7KG33.js +4 -0
  34. package/dist/{stop-enforce-32B7BSQK.js → stop-enforce-56SKN4RO.js} +1 -1
  35. package/package.json +2 -2
  36. package/dist/post-edit-HOYXFYSH.js +0 -4
  37. package/dist/post-edit-analyze-5HS3ZV4G.js +0 -4
  38. package/dist/post-edit-flag-stubs-CDKPTQ2L.js +0 -4
  39. package/dist/status-EM4ASO7T.js +0 -4
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __ripploCreateRequire } from "node:module";
3
3
  const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
4
- import{c as k}from"./chunk-KQWFJRIP.js";import{a as P,f as I}from"./chunk-3M2E253R.js";import{e as m,h,k as w}from"./chunk-ML7WCYPY.js";import{d as c,f as d}from"./chunk-52IE2PAQ.js";import{V as g,X as S}from"./chunk-SBDRIIVW.js";import u from"fs";import f from"path";function v(e){try{let n=A(e);if(n==null)return;let t=f.join(n,"HEAD"),o=u.readFileSync(t,"utf8").trim(),i="ref: refs/heads/";return o.startsWith(i)?o.slice(i.length):o.length===0?void 0:o.slice(0,7)}catch{return}}function A(e){let n=f.join(e,".git");if(u.statSync(n).isDirectory())return n;let o=u.readFileSync(n,"utf8").trim(),i="gitdir:";if(!o.startsWith(i))return;let s=o.slice(i.length).trim();if(s.length!==0)return f.resolve(e,s)}import b from"crypto";import{readFile as D}from"fs/promises";import x from"path";import{graphql as y}from"gql.tada";import{err as E,ok as L}from"neverthrow";var T=y(`
4
+ import{c as k}from"./chunk-KQWFJRIP.js";import{a as P,f as I}from"./chunk-3M2E253R.js";import{e as m,h,k as w}from"./chunk-XBN6AJVQ.js";import{d as c,f as d}from"./chunk-52IE2PAQ.js";import{V as g,X as S}from"./chunk-JNLHZVZJ.js";import u from"fs";import f from"path";function v(e){try{let n=A(e);if(n==null)return;let t=f.join(n,"HEAD"),o=u.readFileSync(t,"utf8").trim(),i="ref: refs/heads/";return o.startsWith(i)?o.slice(i.length):o.length===0?void 0:o.slice(0,7)}catch{return}}function A(e){let n=f.join(e,".git");if(u.statSync(n).isDirectory())return n;let o=u.readFileSync(n,"utf8").trim(),i="gitdir:";if(!o.startsWith(i))return;let s=o.slice(i.length).trim();if(s.length!==0)return f.resolve(e,s)}import b from"crypto";import{readFile as D}from"fs/promises";import x from"path";import{graphql as y}from"gql.tada";import{err as E,ok as L}from"neverthrow";var T=y(`
5
5
  mutation SyncDevSession(
6
6
  $projectId: String!
7
7
  $cwd: String!
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __ripploCreateRequire } from "node:module";
3
3
  const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
4
- import{a as o}from"./chunk-PLQGRHHV.js";import{a as t}from"./chunk-MHNGR6M7.js";var r=class extends Error{failure;constructor(i){super(i.kind),this.name="CliError",this.failure=i}};function u(e){return e instanceof r?a(e.failure):e instanceof Error?e.message:String(e)}function a(e){switch(e.kind){case"project-file-missing":return[`Missing ${e.path} \u2014 this directory is not a Ripplo project.`,"Run `npx ripplo init` to create it (or cd into the project root).",t("setup")].join(`
4
+ import{a as o}from"./chunk-NBSDY7QG.js";import{a as t}from"./chunk-MHNGR6M7.js";var r=class extends Error{failure;constructor(i){super(i.kind),this.name="CliError",this.failure=i}};function u(e){return e instanceof r?a(e.failure):e instanceof Error?e.message:String(e)}function a(e){switch(e.kind){case"project-file-missing":return[`Missing ${e.path} \u2014 this directory is not a Ripplo project.`,"Run `npx ripplo init` to create it (or cd into the project root).",t("setup")].join(`
5
5
  `);case"project-file-invalid":return[`${e.path} is invalid:`,...e.issues.map(i=>` ${i}`),"Fix the file by hand or re-run `npx ripplo init`."].join(`
6
6
  `);case"not-authenticated":return["Not signed in. Run `npx ripplo auth login`.","(Claude Code: run it yourself in the background \u2014 the user just approves in the browser.)"].join(`
7
7
  `);case"env-invalid":return s(e);case"playwright-install-failed":return["Playwright browser install failed \u2014 Chromium is still missing.","Run `npx playwright install chromium` and check its output for network, proxy, or disk-space errors."].join(`
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __ripploCreateRequire } from "node:module";
3
3
  const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
4
- import{f as a}from"./chunk-CUXFU3MF.js";import{a as n}from"./chunk-PLQGRHHV.js";import{i}from"./chunk-ZQHKESUR.js";import{k as e}from"./chunk-ML7WCYPY.js";import{i as u}from"./chunk-T4GHICK4.js";async function x(m){let o=process.cwd(),r=await e(o);r.isErr()&&(process.stderr.write(`${n(r.error)}
4
+ import{f as a}from"./chunk-CUXFU3MF.js";import{a as n}from"./chunk-NBSDY7QG.js";import{i}from"./chunk-GYH4P7SC.js";import{k as e}from"./chunk-XBN6AJVQ.js";import{i as u}from"./chunk-2A6KSSUD.js";async function x(m){let o=process.cwd(),r=await e(o);r.isErr()&&(process.stderr.write(`${n(r.error)}
5
5
  `),process.exit(1));let s=i(r.value),t=await a(o);if(m.format==="summary"){s.length>0&&process.stdout.write(`stub workflows: ${s.join(", ")}
6
6
  `),process.stdout.write(`${u(t)}
7
7
  `);return}let p={daemon:t.kind==="running"?{active:t.status.active,explorer:t.status.explorer,exploring:t.status.exploring,progress:t.status.progress,queued:t.status.queued,running:!0}:{running:t.kind==="unresponsive",state:t.kind},tests:s.map(d=>({id:d,implemented:!1}))};process.stdout.write(`${JSON.stringify(p,null,2)}
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __ripploCreateRequire } from "node:module";
3
3
  const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
4
- import{b as u}from"./chunk-GAOLASGV.js";import{a as f}from"./chunk-JJ4QQPAV.js";import{a as m}from"./chunk-7WZ3VIUU.js";import{f as c}from"./chunk-3M2E253R.js";import{i as p}from"./chunk-ZQHKESUR.js";import{k as l}from"./chunk-ML7WCYPY.js";import v from"path";import h from"picomatch";import*as s from"zod/mini";var w=s.looseObject({file_path:s.string()}),R=async n=>{let i=w.safeParse(n.tool_input);if(!i.success)return;let d=i.data.file_path,{cwd:t}=n;if(!m(t)||!c(t))return;let r=v.relative(t,d);if(r.startsWith(".."))return;let{ignorePaths:b,watchPaths:k}=f(),P=h([...k]),g=h([...b]);if(!P(r)||g(r))return;let o=await l(t);if(u({cwd:t,tests:o.isOk()?o.value.workflows.map(e=>({intent:e.intent,name:e.name,sourcePath:e.sourcePath??null,stub:e.stub})):void 0}),o.isErr())return;let a=p(o.value);if(a.length!==0)return{hookSpecificOutput:{additionalContext:`Reminder: stub workflows still unimplemented \u2014 ${a.join(", ")}. Implement with \`workflow("Intent", () => ({ given, steps }))\`.`,hookEventName:"PostToolUse"}}};export{R as a};
4
+ import{b as u}from"./chunk-GAOLASGV.js";import{a as f}from"./chunk-JJ4QQPAV.js";import{a as m}from"./chunk-7WZ3VIUU.js";import{f as c}from"./chunk-3M2E253R.js";import{i as p}from"./chunk-GYH4P7SC.js";import{k as l}from"./chunk-XBN6AJVQ.js";import v from"path";import h from"picomatch";import*as s from"zod/mini";var w=s.looseObject({file_path:s.string()}),R=async n=>{let i=w.safeParse(n.tool_input);if(!i.success)return;let d=i.data.file_path,{cwd:t}=n;if(!m(t)||!c(t))return;let r=v.relative(t,d);if(r.startsWith(".."))return;let{ignorePaths:b,watchPaths:k}=f(),P=h([...k]),g=h([...b]);if(!P(r)||g(r))return;let o=await l(t);if(u({cwd:t,tests:o.isOk()?o.value.workflows.map(e=>({intent:e.intent,name:e.name,sourcePath:e.sourcePath??null,stub:e.stub})):void 0}),o.isErr())return;let a=p(o.value);if(a.length!==0)return{hookSpecificOutput:{additionalContext:`Reminder: stub workflows still unimplemented \u2014 ${a.join(", ")}. Implement with \`workflow("Intent", () => ({ given, steps }))\`.`,hookEventName:"PostToolUse"}}};export{R as a};
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __ripploCreateRequire } from "node:module";
3
3
  const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
4
- import{K as v,L,Q as j,R as g,ca as B}from"./chunk-SBDRIIVW.js";import c from"fs";import l from"path";import{createHash as Se}from"crypto";import{pathToFileURL as Re}from"url";import{build as be}from"esbuild";import{err as x,ok as C,ResultAsync as Fe}from"neverthrow";import ee from"fs";import y from"path";import u from"typescript";function A(e){let n=y.join(e,"index.ts"),t=re(e);ee.mkdirSync(y.dirname(t.tsBuildInfoFile??""),{recursive:!0});let r=u.createIncrementalCompilerHost(t),o=u.createIncrementalProgram({host:r,options:t,rootNames:[n]}),i=[...o.getSyntacticDiagnostics(),...o.getSemanticDiagnostics()];o.emit();let s=i.filter(a=>ne(a,e));if(s.length===0)return{diagnostics:[],ok:!0};let T={getCanonicalFileName:a=>a,getCurrentDirectory:()=>y.dirname(e),getNewLine:()=>`
4
+ import{K as v,L,Q as j,R as g,ca as B}from"./chunk-JNLHZVZJ.js";import c from"fs";import l from"path";import{createHash as Se}from"crypto";import{pathToFileURL as Re}from"url";import{build as be}from"esbuild";import{err as x,ok as C,ResultAsync as Fe}from"neverthrow";import ee from"fs";import y from"path";import u from"typescript";function A(e){let n=y.join(e,"index.ts"),t=re(e);ee.mkdirSync(y.dirname(t.tsBuildInfoFile??""),{recursive:!0});let r=u.createIncrementalCompilerHost(t),o=u.createIncrementalProgram({host:r,options:t,rootNames:[n]}),i=[...o.getSyntacticDiagnostics(),...o.getSemanticDiagnostics()];o.emit();let s=i.filter(a=>ne(a,e));if(s.length===0)return{diagnostics:[],ok:!0};let T={getCanonicalFileName:a=>a,getCurrentDirectory:()=>y.dirname(e),getNewLine:()=>`
5
5
  `};return{diagnostics:u.formatDiagnosticsWithColorAndContext(s,T).split(`
6
6
  `).filter(a=>a.length>0),ok:!1}}function ne(e,n){let t=e.file?.fileName;return t==null?!0:t.startsWith(n)}var te=y.join(".local","tsbuildinfo");function re(e){return{allowImportingTsExtensions:!0,allowJs:!1,esModuleInterop:!0,incremental:!0,module:u.ModuleKind.Preserve,moduleResolution:u.ModuleResolutionKind.Bundler,noEmit:!0,resolveJsonModule:!0,skipLibCheck:!0,strict:!1,target:u.ScriptTarget.ES2022,tsBuildInfoFile:y.join(e,te)}}import U from"fs";import R from"safe-stable-stringify";import{err as se,ok as N,Result as ae}from"neverthrow";import M from"safe-stable-stringify";import{createHash as oe}from"crypto";import H from"fs";function h(){return S===void 0&&(S=ie()),S}var S;function ie(){let e=process.argv[1];if(e==null)return null;try{let n=H.readFileSync(H.realpathSync(e));return oe("sha256").update(n).digest("hex")}catch{return null}}function I(e){return{...e,checks:void 0,solved:{cosat:{},subsume:{}}}}function Xe(e,n){return M(I(e))===M(I(n))}function O(e){return _(e.checks?.expanderHash,h())}function _(e,n){return e!=null&&n!=null&&e===n}function W(e){return _(e??void 0,h())}async function D(e,n){let t={entities:e.entities,singletonSchemas:e.singletons,valueSpaces:e.valueSpaces},r=le(n),o=ue(e,r),i=await Promise.all(e.workflows.map(s=>de({context:t,reusable:o,workflow:s})));return ae.combine(i).map(s=>({...e,workflows:[...s]}))}function le(e){let n=ce(e);if(!(n==null||!O(n)))return n}function ce(e){if(U.existsSync(e))try{return L(g,U.readFileSync(e,"utf8"))}catch{return}}async function de({context:e,reusable:n,workflow:t}){let r=n.get($(t));if(r!=null)return N({...t,tests:r.tests});try{return N(await B({context:e,workflow:t}))}catch(o){let i=o instanceof Error?o.message:String(o);return se({kind:"expand-failed",message:i,workflow:t.name})}}function $(e){let n=R({...e,tests:[]});if(n==null)throw new Error("solver: workflow is not serializable");return n}function ue(e,n){return n==null||R(z(n))!==R(z(e))?new Map:new Map(n.workflows.map(t=>[$(t),t]))}function z(e){return{entities:e.entities,singletons:e.singletons,valueSpaces:e.valueSpaces}}import{createHash as fe}from"crypto";import J from"fs/promises";import b from"path";import{err as f,ok as F,Result as pe}from"neverthrow";var me=".ripplo/fixtures",ge=10*1024*1024,ye=50*1024*1024;async function K(e,n){let t=he(n);if(t.length===0)return F({});let r=b.join(e,me),o=await Promise.all(t.map(i=>ke({fixturesRoot:r,name:i})));return pe.combine(o).andThen(xe)}function he(e){let t=e.workflows.flatMap(r=>[...r.steps,...r.tests.flatMap(o=>o.steps)]).flatMap(r=>r.action.kind==="upload"?r.action.files:[]);return[...new Set(t)].toSorted((r,o)=>r.localeCompare(o))}async function ke({fixturesRoot:e,name:n}){if(n.includes("..")||b.isAbsolute(n))return f({kind:"fixture-invalid-name",name:n});let t=b.join(e,n),r=await J.lstat(t).catch(()=>null);if(r==null)return f({kind:"fixture-missing",name:n,path:t});if(r.isSymbolicLink())return f({kind:"fixture-symlink",name:n});if(!r.isFile())return f({kind:"fixture-not-file",name:n});let o=await J.readFile(t);if(o.byteLength>ge)return f({kind:"fixture-too-large",name:n,size:o.byteLength});let i=fe("sha256").update(o).digest("hex");return F([n,{sha256:i,size:o.byteLength}])}function xe(e){let n=e.reduce((t,[,r])=>t+r.size,0);return n>ye?f({kind:"fixtures-total-too-large",total:n}):F(Object.fromEntries(e))}import{createHash as Le}from"crypto";import p from"fs";import P from"path";import{z as w}from"zod";function X({cwd:e,fingerprint:n}){let t=Ee(e);if(t==null||t.fingerprint!==E(n))return;let r=P.join(e,".ripplo","ripplo.lock");if(!p.existsSync(r))return;let o=p.readFileSync(r,"utf8");if(E(o)===t.lockfileHash)try{return L(g,o)}catch{return}}function V({cwd:e,fingerprint:n,lockfile:t}){let r={bundle:h(),fingerprint:E(n),lockfileHash:E(v(g,t))},o=Y(e);p.mkdirSync(P.dirname(o),{recursive:!0}),p.writeFileSync(o,JSON.stringify(r))}var we=w.object({bundle:w.string().nullable(),fingerprint:w.string(),lockfileHash:w.string()});function Ee(e){let n=Y(e);if(p.existsSync(n))try{let t=we.safeParse(JSON.parse(p.readFileSync(n,"utf8")));return!t.success||!W(t.data.bundle)?void 0:t.data}catch{return}}function Y(e){return P.join(e,".ripplo",".local","load-cache.json")}function E(e){return Le("sha256").update(e).digest("base64")}var Pe=".ripplo/ripplo.lock",k;async function Pn(e){let{result:n}=await Ce(e);return n}async function Ce(e){let n=q(l.join(e,".ripplo"));if(k!=null&&k.fingerprint===n&&k.result.isOk())return{fingerprint:n,result:k.result};let t=await Te(e);return k={fingerprint:n,result:t},{fingerprint:n,result:t}}async function Te(e){let n=l.join(e,".ripplo"),t=l.join(n,"index.ts"),r=q(n),o=X({cwd:e,fingerprint:r});if(o!=null)return C(o);let i=Be(t);i.catch(()=>{});let s=A(n);if(!s.ok)return x({diagnostics:s.diagnostics,kind:"typecheck-failed"});let a=await(await Ae(t,i)).andThen(d=>Ie({entryPath:t,exported:d})).match(async d=>(await K(e,d)).map(m=>({...d,fixtures:m})).mapErr(m=>({error:m,kind:"fixture-failed"})).asyncAndThen(m=>new Fe(D(m,l.join(e,Pe))).mapErr(Z=>Z)),d=>Promise.resolve(x(d)));return a.isOk()&&V({cwd:e,fingerprint:r,lockfile:a.value}),a}var ve=new Set([".local","debug","node_modules","ripplo.lock"]);function q(e){let n=l.join(e,"..","node_modules","@ripplo","testing","package.json");return[...G(e),...je(n)].toSorted((t,r)=>t.localeCompare(r)).join("|")}function G(e){return(c.existsSync(e)?c.readdirSync(e,{withFileTypes:!0}):[]).flatMap(t=>{if(ve.has(t.name))return[];let r=l.join(e,t.name);if(t.isDirectory())return G(r);let o=c.statSync(r);return[`${r}:${String(o.mtimeMs)}:${String(o.size)}`]})}function je(e){if(!c.existsSync(e))return[];let n=c.statSync(e);return[`${e}:${String(n.mtimeMs)}:${String(n.size)}`]}async function Be(e){let t=(await be({bundle:!0,entryPoints:[e],format:"esm",logLevel:"silent",platform:"node",sourcemap:"inline",target:"node22",write:!1})).outputFiles[0];if(t==null)throw new Error("dsl bundle produced no output");return t.text}async function Ae(e,n){try{let t=await n;process.setSourceMapsEnabled(!0);let r=await import(He(e,t)),o=r!=null&&typeof r=="object"&&"default"in r?Reflect.get(r,"default"):r;return C(o)}catch(t){return x({kind:"load-threw",message:Me(t)})}}function He(e,n){let t=l.join(l.dirname(e),".local");c.mkdirSync(t,{recursive:!0});let r=Se("sha256").update(n).digest("hex").slice(0,16),o=l.join(t,`dsl-bundle-${r}.mjs`);return c.writeFileSync(o,n),Re(o).href}function Me(e){return e instanceof Error?e.message:String(e)}function Ie({entryPath:e,exported:n}){if(n==null||typeof n!="object"||!("lockfile"in n))return x({entryPath:e,kind:"not-ripplo"});let t=j.safeParse(Reflect.get(n,"lockfile"));return t.success?C(t.data):x({issues:t.error.issues.map(r=>`${r.path.join(".")}: ${r.message}`),kind:"invalid-lockfile"})}export{h as a,Xe as b,O as c,W as d,me as e,ge as f,ye as g,Pe as h,Pn as i,Ce as j,Te as k};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __ripploCreateRequire } from "node:module";
3
3
  const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
4
- import{a as r}from"./chunk-7WZ3VIUU.js";import{f as n}from"./chunk-3M2E253R.js";var m=async o=>{if(o.permission_mode!=="plan"||!r(o.cwd)||!n(o.cwd))return;let{loadRipplo:s}=await import("./dsl-loader-Z54ZM7C6.js"),{stubbedWorkflows:a}=await import("./compile-write-TTEHFTNY.js"),t=await s(o.cwd);if(t.isErr())return;let e=a(t.value),i=['Plan must include "Tests to implement" with a .ripplo/workflows/ file per affected flow (ExitPlanMode blocks otherwise). Stub each with `workflow("Intent")` (no body).'];return e.length>0&&i.push(`Existing stubs: ${e.join(", ")}`),{hookSpecificOutput:{additionalContext:i.join(`
4
+ import{a as r}from"./chunk-7WZ3VIUU.js";import{f as n}from"./chunk-3M2E253R.js";var m=async o=>{if(o.permission_mode!=="plan"||!r(o.cwd)||!n(o.cwd))return;let{loadRipplo:s}=await import("./dsl-loader-A2EMKCRL.js"),{stubbedWorkflows:a}=await import("./compile-write-F7D273JN.js"),t=await s(o.cwd);if(t.isErr())return;let e=a(t.value),i=['Plan must include "Tests to implement" with a .ripplo/workflows/ file per affected flow (ExitPlanMode blocks otherwise). Stub each with `workflow("Intent")` (no body).'];return e.length>0&&i.push(`Existing stubs: ${e.join(", ")}`),{hookSpecificOutput:{additionalContext:i.join(`
5
5
  `),hookEventName:"UserPromptSubmit"}}};export{m as a};
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __ripploCreateRequire } from "node:module";
3
3
  const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
4
- import{a,b,c}from"./chunk-G3UFH3WS.js";import"./chunk-PLQGRHHV.js";import"./chunk-MHNGR6M7.js";import"./chunk-ML7WCYPY.js";import"./chunk-SBDRIIVW.js";import"./chunk-KMZ3L5YA.js";export{b as renderCliFailure,c as renderHookCrash,a as renderTopLevelError};
4
+ import{a,b,c}from"./chunk-QIXJ7Z2L.js";import"./chunk-NBSDY7QG.js";import"./chunk-MHNGR6M7.js";import"./chunk-XBN6AJVQ.js";import"./chunk-JNLHZVZJ.js";import"./chunk-KMZ3L5YA.js";export{b as renderCliFailure,c as renderHookCrash,a as renderTopLevelError};
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __ripploCreateRequire } from "node:module";
3
3
  const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
4
- import{e as a,f as b,g as c,h as d,i as e,j as f}from"./chunk-ZQHKESUR.js";import"./chunk-ML7WCYPY.js";import"./chunk-PPMW4GUY.js";import"./chunk-SBDRIIVW.js";import"./chunk-NNH3YVVO.js";import"./chunk-KMZ3L5YA.js";export{a as compileAndWrite,f as lockfileModelStatus,c as stampedLockfile,d as stampedLockfileFromDisk,e as stubbedWorkflows,b as writeStampedLockfile};
4
+ import{e as a,f as b,g as c,h as d,i as e,j as f}from"./chunk-GYH4P7SC.js";import"./chunk-XBN6AJVQ.js";import"./chunk-77DJHICC.js";import"./chunk-JNLHZVZJ.js";import"./chunk-NNH3YVVO.js";import"./chunk-KMZ3L5YA.js";export{a as compileAndWrite,f as lockfileModelStatus,c as stampedLockfile,d as stampedLockfileFromDisk,e as stubbedWorkflows,b as writeStampedLockfile};
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __ripploCreateRequire } from "node:module";
3
3
  const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
4
- import{A as U,C as Ve,D as Xe,E as Ye,G as Ze,H as K,I as Q,J as er,K as rr,L as z,M as nr,e as Ee,i as He,j as Ue,k as We,l as $e,m as _e,n as Me,o as Oe,p as Fe,r as q,s as H,t as je,u as B,v as Qe,w as ze,x as Je,z as Ge}from"./chunk-3KD2FTEQ.js";import{d as Ie}from"./chunk-B6OQ2JE2.js";import{a as Ne,c as Be,d as Ke,e as w}from"./chunk-6Z555TLR.js";import{c as k}from"./chunk-KQWFJRIP.js";import{e as Pe}from"./chunk-3M2E253R.js";import{a as ce}from"./chunk-R4ZTRVDQ.js";import{c as ae}from"./chunk-FEHVIHVA.js";import{b as fe}from"./chunk-G3UFH3WS.js";import{a as L}from"./chunk-PLQGRHHV.js";import"./chunk-MHNGR6M7.js";import{g as xe,h as D}from"./chunk-ZQHKESUR.js";import{a as ue,i as v,j as pe,k as T}from"./chunk-ML7WCYPY.js";import{e as Re,f as be}from"./chunk-INURHJF4.js";import{c as te,d as u,f as s,g as oe,h as N,i as ie}from"./chunk-52IE2PAQ.js";import"./chunk-CJUKILIO.js";import{b as Ce,c as Te,d as Le,e as Ae,f as De,h as qe}from"./chunk-T4GHICK4.js";import{G as ye,J as A,K as ge,L as Se,N as ke,O as he,P as ve,W as we,a as me}from"./chunk-PPMW4GUY.js";import{K as se,R as le,X as de}from"./chunk-SBDRIIVW.js";import"./chunk-NNH3YVVO.js";import"./chunk-KMZ3L5YA.js";import no from"path";import{createClient as to}from"graphql-sse";import{graphql as ne}from"gql.tada";import Ln,{AbortError as An}from"p-retry";import{graphql as pn}from"gql.tada";import{print as fn}from"graphql";async function tr({config:e,cwd:r,headed:n,pool:t,runId:o,signal:i,testSlug:a,workClass:l,workflowSlug:d}){let c=await v(r);if(c.isErr())return await U(e,o,`lockfile:${c.error.kind}`),{kind:"dispatch-error",reason:{detail:`lockfile:${c.error.kind}`,type:"generic"}};let p=un(c.value,{testSlug:a,workflowSlug:d});if(p==null)return await U(e,o,`no-test:${d}/${a}`),{kind:"dispatch-error",reason:{detail:`no-test:${d}/${a}`,type:"generic"}};let f=await q({headed:n,workClass:l,task:()=>t.execute({headed:n,runId:o,testRef:p},i)});return!f.serverNotified&&f.outcome.kind==="error"&&await U(e,o,f.outcome.detail),f.outcome}function un(e,{testSlug:r,workflowSlug:n}){let o=e.workflows.find(i=>de(i.name)===n)?.tests.find(i=>i.slug===r);return o==null?void 0:me(o)}var mn=6e4,yn=pn(`
4
+ import{A as U,C as Ve,D as Xe,E as Ye,G as Ze,H as K,I as Q,J as er,K as rr,L as z,M as nr,e as Ee,i as He,j as Ue,k as We,l as $e,m as _e,n as Me,o as Oe,p as Fe,r as q,s as H,t as je,u as B,v as Qe,w as ze,x as Je,z as Ge}from"./chunk-JIMLVUPS.js";import{d as Ie}from"./chunk-B6OQ2JE2.js";import{a as Ne,c as Be,d as Ke,e as w}from"./chunk-PPB7QGV2.js";import{c as k}from"./chunk-KQWFJRIP.js";import{e as Pe}from"./chunk-3M2E253R.js";import{a as ce}from"./chunk-R4ZTRVDQ.js";import{c as ae}from"./chunk-FEHVIHVA.js";import{b as fe}from"./chunk-QIXJ7Z2L.js";import{a as L}from"./chunk-NBSDY7QG.js";import"./chunk-MHNGR6M7.js";import{g as xe,h as D}from"./chunk-GYH4P7SC.js";import{a as ue,i as v,j as pe,k as T}from"./chunk-XBN6AJVQ.js";import{e as Re,f as be}from"./chunk-INURHJF4.js";import{c as te,d as u,f as s,g as oe,h as N,i as ie}from"./chunk-52IE2PAQ.js";import"./chunk-CJUKILIO.js";import{b as Ce,c as Te,d as Le,e as Ae,f as De,h as qe}from"./chunk-2A6KSSUD.js";import{G as ye,J as A,K as ge,L as Se,N as ke,O as he,P as ve,W as we,a as me}from"./chunk-77DJHICC.js";import{K as se,R as le,X as de}from"./chunk-JNLHZVZJ.js";import"./chunk-NNH3YVVO.js";import"./chunk-KMZ3L5YA.js";import no from"path";import{createClient as to}from"graphql-sse";import{graphql as ne}from"gql.tada";import Ln,{AbortError as An}from"p-retry";import{graphql as pn}from"gql.tada";import{print as fn}from"graphql";async function tr({config:e,cwd:r,headed:n,pool:t,runId:o,signal:i,testSlug:a,workClass:l,workflowSlug:d}){let c=await v(r);if(c.isErr())return await U(e,o,`lockfile:${c.error.kind}`),{kind:"dispatch-error",reason:{detail:`lockfile:${c.error.kind}`,type:"generic"}};let p=un(c.value,{testSlug:a,workflowSlug:d});if(p==null)return await U(e,o,`no-test:${d}/${a}`),{kind:"dispatch-error",reason:{detail:`no-test:${d}/${a}`,type:"generic"}};let f=await q({headed:n,workClass:l,task:()=>t.execute({headed:n,runId:o,testRef:p},i)});return!f.serverNotified&&f.outcome.kind==="error"&&await U(e,o,f.outcome.detail),f.outcome}function un(e,{testSlug:r,workflowSlug:n}){let o=e.workflows.find(i=>de(i.name)===n)?.tests.find(i=>i.slug===r);return o==null?void 0:me(o)}var mn=6e4,yn=pn(`
5
5
  subscription RunRequestedWatch($devSessionId: String!) {
6
6
  runRequested(devSessionId: $devSessionId) {
7
7
  runId
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __ripploCreateRequire } from "node:module";
3
3
  const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
4
- import{a,b,c,d,e,f,g,h,i,j,k,l}from"./chunk-T4GHICK4.js";import"./chunk-PPMW4GUY.js";import"./chunk-SBDRIIVW.js";import"./chunk-NNH3YVVO.js";import"./chunk-KMZ3L5YA.js";export{b as renderDaemonBindError,h as renderDaemonLockCompromised,f as renderDaemonLockHeld,e as renderDaemonReady,i as renderDaemonStatus,g as renderDaemonStopResult,k as renderDaemonVersionNote,j as renderExplorationProgress,d as renderNotSignedIn,c as renderProjectAccessDenied,a as renderTunnelProvisionFailed,l as wireOutcome};
4
+ import{a,b,c,d,e,f,g,h,i,j,k,l}from"./chunk-2A6KSSUD.js";import"./chunk-77DJHICC.js";import"./chunk-JNLHZVZJ.js";import"./chunk-NNH3YVVO.js";import"./chunk-KMZ3L5YA.js";export{b as renderDaemonBindError,h as renderDaemonLockCompromised,f as renderDaemonLockHeld,e as renderDaemonReady,i as renderDaemonStatus,g as renderDaemonStopResult,k as renderDaemonVersionNote,j as renderExplorationProgress,d as renderNotSignedIn,c as renderProjectAccessDenied,a as renderTunnelProvisionFailed,l as wireOutcome};
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __ripploCreateRequire } from "node:module";
3
3
  const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
4
- import{h as a,i as b,j as c,k as d}from"./chunk-ML7WCYPY.js";import"./chunk-SBDRIIVW.js";import"./chunk-KMZ3L5YA.js";export{a as LOCKFILE_RELATIVE_PATH,d as loadRipplo,b as loadRipploCached,c as loadRipploCachedWithFingerprint};
4
+ import{h as a,i as b,j as c,k as d}from"./chunk-XBN6AJVQ.js";import"./chunk-JNLHZVZJ.js";import"./chunk-KMZ3L5YA.js";export{a as LOCKFILE_RELATIVE_PATH,d as loadRipplo,b as loadRipploCached,c as loadRipploCachedWithFingerprint};
package/dist/hook.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __ripploCreateRequire } from "node:module";
3
3
  const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
4
- import{a as o,c as s}from"./chunk-YR3N73PR.js";import{a as i}from"./chunk-R4ZTRVDQ.js";import{c as e}from"./chunk-FEHVIHVA.js";import"./chunk-KOKEEAEF.js";import{a as r}from"./chunk-CJUKILIO.js";import"./chunk-KMZ3L5YA.js";o();e(process.cwd());r(i());s(process.argv[2]??"").catch(async t=>{let{renderTopLevelError:p}=await import("./cli-error-TM2YODR3.js");process.stderr.write(`${p(t)}
4
+ import{a as o,c as s}from"./chunk-74ZADYZC.js";import{a as i}from"./chunk-R4ZTRVDQ.js";import{c as e}from"./chunk-FEHVIHVA.js";import"./chunk-KOKEEAEF.js";import{a as r}from"./chunk-CJUKILIO.js";import"./chunk-KMZ3L5YA.js";o();e(process.cwd());r(i());s(process.argv[2]??"").catch(async t=>{let{renderTopLevelError:p}=await import("./cli-error-MEC67EVT.js");process.stderr.write(`${p(t)}
5
5
  `),process.exit(1)});