ripplo 0.9.0 → 0.9.1

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 (27) hide show
  1. package/dist/{chunk-FR4ENKCT.js → chunk-4XC5TAOG.js} +1 -1
  2. package/dist/{chunk-U27IDW6O.js → chunk-6BQADUAX.js} +2 -2
  3. package/dist/{chunk-XVMIPWJQ.js → chunk-INO3L4WS.js} +1 -1
  4. package/dist/chunk-MG43RZXH.js +83 -0
  5. package/dist/{chunk-AYDIXOW2.js → chunk-MMCOPC4L.js} +1 -1
  6. package/dist/{chunk-QQ7NFPJQ.js → chunk-NEPJCCQS.js} +1 -1
  7. package/dist/{chunk-PRD7P6EF.js → chunk-RWFS5SCW.js} +1 -1
  8. package/dist/{chunk-V4IQQT44.js → chunk-SFWAAS5H.js} +1 -1
  9. package/dist/{chunk-JXGIARTE.js → chunk-TY5K3P4F.js} +1 -1
  10. package/dist/{chunk-EA62LNKT.js → chunk-UMSBDSRS.js} +1 -1
  11. package/dist/{chunk-ZDA3E2AS.js → chunk-YODZBLYM.js} +1 -1
  12. package/dist/{compile-write-H2GLCECO.js → compile-write-4ZAIPQMG.js} +1 -1
  13. package/dist/{daemon-3J3K4BOD.js → daemon-MZWLJO75.js} +1 -1
  14. package/dist/{daemon-AS6IHTHD.js → daemon-YPXZGJAB.js} +1 -1
  15. package/dist/hook.js +1 -1
  16. package/dist/index.js +182 -175
  17. package/dist/{plan-reminder-E6AXT6OB.js → plan-reminder-45PSVOVW.js} +1 -1
  18. package/dist/{post-edit-LUPA46ZO.js → post-edit-JHJT2QTK.js} +1 -1
  19. package/dist/{post-edit-analyze-XY6C7ZFP.js → post-edit-analyze-PPFHKIYQ.js} +1 -1
  20. package/dist/{post-edit-flag-stubs-ZMKN4DJZ.js → post-edit-flag-stubs-Q3UKDZ2W.js} +1 -1
  21. package/dist/{prompt-submit-U3QOU47D.js → prompt-submit-ZCDG6T4Y.js} +1 -1
  22. package/dist/{session-preamble-IHBGHKCW.js → session-preamble-ZYVRDSGA.js} +1 -1
  23. package/dist/status-66XIDYSP.js +4 -0
  24. package/dist/{stop-enforce-ZLQKGMSF.js → stop-enforce-Q4JNBYQU.js} +1 -1
  25. package/package.json +4 -4
  26. package/dist/chunk-BR7W4UBJ.js +0 -83
  27. package/dist/status-247DEYFK.js +0 -4
@@ -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-4W6WIT7T.js";var m=async o=>{if(o.permission_mode!=="plan"||!r(o.cwd)||!n(o.cwd))return;let{loadRipplo:s}=await import("./dsl-loader-5Z2JRKY3.js"),{stubbedWorkflows:a}=await import("./compile-write-H2GLCECO.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-4W6WIT7T.js";var m=async o=>{if(o.permission_mode!=="plan"||!r(o.cwd)||!n(o.cwd))return;let{loadRipplo:s}=await import("./dsl-loader-5Z2JRKY3.js"),{stubbedWorkflows:a}=await import("./compile-write-4ZAIPQMG.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,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{b as w,c as P}from"./chunk-T5VLZ43M.js";import{a as m}from"./chunk-MOI4L3EX.js";import{a as u,c as y,d as g}from"./chunk-JXGIARTE.js";import{a as h}from"./chunk-OQ6KNYPG.js";import{f as S}from"./chunk-ZUPS6XVH.js";import{a as c}from"./chunk-7WZ3VIUU.js";import{f as k}from"./chunk-4W6WIT7T.js";import{a as l}from"./chunk-XZ2TPZLD.js";import{a as s}from"./chunk-MHNGR6M7.js";import{e as f,f as p}from"./chunk-XVMIPWJQ.js";import{e as d}from"./chunk-BR7W4UBJ.js";import{createHash as b}from"crypto";import*as a from"zod/mini";var v=a.looseObject({file_path:a.string()}),M=async e=>{let o=v.safeParse(e.tool_input);if(!o.success||!/\/\.ripplo\/.*\.ts$/.test(o.data.file_path))return;let{cwd:t}=e;if(!c(t))return;if(!k(t))return{hookSpecificOutput:{additionalContext:"Ripplo hooks are paused \u2014 DSL compile and lockfile sync did not run for this edit. Resume with `npx ripplo hooks resume` when ready.",hookEventName:"PostToolUse"}};let r=await f(t);if(r.isErr())return{decision:"block",reason:`${l(r.error)}
4
+ import{b as w,c as P}from"./chunk-T5VLZ43M.js";import{a as m}from"./chunk-MOI4L3EX.js";import{a as u,c as y,d as g}from"./chunk-TY5K3P4F.js";import{a as h}from"./chunk-OQ6KNYPG.js";import{f as S}from"./chunk-ZUPS6XVH.js";import{a as c}from"./chunk-7WZ3VIUU.js";import{f as k}from"./chunk-4W6WIT7T.js";import{a as l}from"./chunk-XZ2TPZLD.js";import{a as s}from"./chunk-MHNGR6M7.js";import{e as f,f as p}from"./chunk-INO3L4WS.js";import{e as d}from"./chunk-MG43RZXH.js";import{createHash as b}from"crypto";import*as a from"zod/mini";var v=a.looseObject({file_path:a.string()}),M=async e=>{let o=v.safeParse(e.tool_input);if(!o.success||!/\/\.ripplo\/.*\.ts$/.test(o.data.file_path))return;let{cwd:t}=e;if(!c(t))return;if(!k(t))return{hookSpecificOutput:{additionalContext:"Ripplo hooks are paused \u2014 DSL compile and lockfile sync did not run for this edit. Resume with `npx ripplo hooks resume` when ready.",hookEventName:"PostToolUse"}};let r=await f(t);if(r.isErr())return{decision:"block",reason:`${l(r.error)}
5
5
  ${s("create","DSL authoring rules")}`};let n=await N({cwd:t,filePath:o.data.file_path,lockfile:r.value});if("block"in n)return{decision:"block",reason:n.block};let{addedSlugs:i}=await S({cwd:t,editedPath:o.data.file_path,lockfile:r.value});return L(z({addedSlugs:i,cwd:t,elsewhere:n.elsewhere,lockfile:r.value}))};function z({addedSlugs:e,cwd:o,elsewhere:t,lockfile:r}){return[...e.length>0?[`Auto-scoped ${e.join(", ")} (dirty tests).`]:[],...t>0?[A(t).trimStart()]:[],...T(o,r)]}async function N({cwd:e,filePath:o,lockfile:t}){let r=await u({cwd:e,lockfile:t});await p(e,t);let n=R(r,t,o),i=r.length-n.length;return n.length===0?{elsewhere:i}:{block:`${y(n)}${A(i)}
6
6
  ${s("create")}`}}function R(e,o,t){let r=new Set(d(o).filter(({workflow:n})=>n.sourcePath!=null&&t.endsWith(n.sourcePath)).map(({ref:n})=>n));return r.size===0?e:e.filter(n=>{let i=F(n);return i==null||r.has(i)})}function F(e){return e.kind==="unreachable-interaction"?e.violation.test:e.kind==="redundant-assertion"?e.redundancy.test:e.kind==="missing-precondition"?e.missing.test:null}function A(e){return e===0?"":`
7
7
  ${h(e,"finding")} in other files \u2014 \`npx ripplo compile\` for the full list.`}function L(e){if(e.length!==0)return{hookSpecificOutput:{additionalContext:e.join(`
@@ -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{A as i,C as s,F as d,i as t}from"./chunk-BR7W4UBJ.js";function y(e){switch(e.kind){case"empty-response":return"ripplo daemon: cloud tunnel provisioning returned no result. Check server logs and retry.";case"server-error":return`ripplo daemon: cloud tunnel provisioning failed (${e.typename}). Run \`npx ripplo doctor\` to check your setup.`}}function $(e){switch(e.kind){case"already-running":return`ripplo daemon: daemon already running (socket ${e.socketPath}).`;case"bind-failed":return`ripplo daemon: failed to bind IPC socket: ${e.message}`}}function b({projectId:e,serverUrl:n}){return[`Project "${e}" (from .ripplo/project.json) was not found on ${n}, or this account does not have access to it.`,"Run `npx ripplo projects list` to see your projects, then update .ripplo/project.json (or re-run `npx ripplo init --project <id>`)."].join(`
4
+ import{A as i,C as s,F as d,i as t}from"./chunk-MG43RZXH.js";function y(e){switch(e.kind){case"empty-response":return"ripplo daemon: cloud tunnel provisioning returned no result. Check server logs and retry.";case"server-error":return`ripplo daemon: cloud tunnel provisioning failed (${e.typename}). Run \`npx ripplo doctor\` to check your setup.`}}function $(e){switch(e.kind){case"already-running":return`ripplo daemon: daemon already running (socket ${e.socketPath}).`;case"bind-failed":return`ripplo daemon: failed to bind IPC socket: ${e.message}`}}function b({projectId:e,serverUrl:n}){return[`Project "${e}" (from .ripplo/project.json) was not found on ${n}, or this account does not have access to it.`,"Run `npx ripplo projects list` to see your projects, then update .ripplo/project.json (or re-run `npx ripplo init --project <id>`)."].join(`
5
5
  `)}function w(){return"Not signed in. Run `npx ripplo auth login`, then start the daemon again."}function v({devSessionId:e,version:n}){return`ripplo daemon: v${n} ready as local executor for session ${e} (switch with \`npx ripplo executor cloud\` \u2014 Ctrl-C to stop)`}function S({cwd:e,pid:n}){return`ripplo daemon: another daemon is already running for this project${n==null?"":` (pid ${String(n)})`} (cwd ${e}) \u2014 this one is exiting. Run \`npx ripplo daemon status\` to inspect it, or \`npx ripplo daemon stop\` to stop it.`}function j(e){switch(e.kind){case"not-running":return"ripplo daemon: not running.";case"stopped":return`ripplo daemon: stopped (pid ${String(e.pid)}).`;case"timeout":return`ripplo daemon: pid ${String(e.pid)} did not exit within 10s \u2014 it may be finishing a run. Check again with \`npx ripplo daemon status\`.`}}function R(){return"ripplo daemon: lock compromised \u2014 another daemon likely took over this project. Shutting down."}function P(e){if(e.kind==="not-running")return"daemon: not running";if(e.kind==="unresponsive")return`daemon: running but no reply within ${String(e.timeoutMs/1e3)}s \u2014 likely busy executing runs, retry when the batch drains`;let{status:n}=e,r=n.version==null?"version unknown (pre-0.7.8)":`v${n.version}`,p=`${String(n.active)} active, ${String(n.queued)} queued`,l=m(n.explorer,n.exploring),o=`daemon: running (${r} | ${p} | ${l} | ${u(n.progress)})`;if(n.sseHealth!=null&&!n.sseHealth.ok){let c=n.sseHealth.detail==null?"":`: ${n.sseHealth.detail}`;return`${o}
6
6
  daemon: cannot subscribe to run dispatch${c} \u2014 server-side, restarting the daemon will not help`}return o}function u(e){return e.attempts===0?"explore: idle":`explore: ${String(e.attempts)} attempts, ${String(e.findings)} findings`}function D(e){let n=e.daemonVersion==null?"an older build":`v${e.daemonVersion}`;return e.kind==="restarted"?`ripplo: daemon was on ${n} \u2014 restarted on the current build`:`ripplo: daemon is on a stale build (${n}) with runs in flight \u2014 rerun once it drains, or npx ripplo daemon restart`}function F(e){switch(e.kind){case"pass":return{kind:"pass"};case"findings":return{findingLines:f(e.findings).map(n=>d({evidencePath:`.ripplo/debug/${e.runId}/behavior.jsonl`,finding:n})),kind:"findings"};case"error":return{detail:t(e.error),kind:"error"};case"dispatch-failed":return{kind:"dispatch-error",reason:{detail:e.reason,type:"generic"}}}}function m(e,n){switch(e.kind){case"off":return"explorer: off";case"on":return`explorer: on, ${String(n)} exploring`;case"paused":return"explorer: paused for active runs or a short cooldown \u2014 resumes on its own";case"blocked":return`explorer: blocked \u2014 ${g(e.reason)}`}}function g(e){switch(e){case"no-lockfile":return"no lockfile found, run npx ripplo compile";case"unstamped":return"lockfile has no compiled checks, run npx ripplo compile";case"expander-newer":return"lockfile predates the current CLI build, run npx ripplo compile";case"dsl-drift":return"workflow sources changed since the last compile, run npx ripplo compile";case"load-failed":return"workflow definitions do not compile, run npx ripplo compile for details"}}function f(e){let n=new Set(e.flatMap(r=>h(r)?[a(r)]:[]));return e.filter(r=>!(k(r)&&n.has(a(r))))}function h(e){return e.kind==="pending-check"&&e.source.kind==="step"}function a(e){return e.kind!=="pending-check"||e.source.kind==="data-rule"?"":`${i(e.source.check)}|${s(e.step)}`}function k(e){return e.kind==="pending-check"&&e.source.kind==="fact"}export{y as a,$ as b,b as c,w as d,v as e,S as f,j as g,R as h,P as i,u as j,D as k,F as l};
@@ -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-I5BHCICM.js";import{a as f}from"./chunk-JJ4QQPAV.js";import{a as m}from"./chunk-7WZ3VIUU.js";import{f as c}from"./chunk-4W6WIT7T.js";import{i as p}from"./chunk-XVMIPWJQ.js";import{k as l}from"./chunk-EVVF662P.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-I5BHCICM.js";import{a as f}from"./chunk-JJ4QQPAV.js";import{a as m}from"./chunk-7WZ3VIUU.js";import{f as c}from"./chunk-4W6WIT7T.js";import{i as p}from"./chunk-INO3L4WS.js";import{k as l}from"./chunk-EVVF662P.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,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 r}from"./chunk-OQ6KNYPG.js";import{a as s}from"./chunk-MHNGR6M7.js";import{a as k,b as C,c as F,d as b}from"./chunk-XVMIPWJQ.js";import{L as $,f as u,k as c,n as f,p as m,q as p,r as g,s as y,t as h,u as S,v,w as o}from"./chunk-BR7W4UBJ.js";import{E as d,L as l}from"./chunk-4F67XQYS.js";async function P({cwd:e,lockfile:n}){let i=c(n),a=b(d(l,n));if(C({context:i,cwd:e})===a)return[];k({context:i,cwd:e});let t=await x(n);return F({cleanLockfileHash:t.length===0?a:null,context:i,cwd:e}),t}async function x(e){let n=u(e),i=await f(e),a=await m({context:c(e),facts:i.facts});return[...g(e).map(t=>({kind:"missing-precondition",missing:t})),...p(n,i.dataRules).map(t=>({gap:t,kind:"cascade-gap"})),...a.map(t=>({conflict:t,kind:"fact-conflict"})),...y(e).map(t=>({kind:"unreachable-interaction",violation:t})),...h(e).map(t=>({kind:"redundant-assertion",redundancy:t})),...S(e).map(t=>({kind:"unmodeled-surface",surface:t})),...v(e).map(t=>({content:t,kind:"unpinned-surface-content"}))]}function U(e){return`${o.good("ok")} \u2014 no static model violations (${r(e,"test")})`}function O(e){let i=e.some(a=>a.kind==="unmodeled-surface")?[`Elements that hide together are one surface. ${s("create","surfaces")}`]:[];return[`${o.bad("fail")} \u2014 ${r(e.length,"static model violation")}:`,...e.map(a=>$(a)),...i].join(`
4
+ import{a as r}from"./chunk-OQ6KNYPG.js";import{a as s}from"./chunk-MHNGR6M7.js";import{a as k,b as C,c as F,d as b}from"./chunk-INO3L4WS.js";import{L as $,f as u,k as c,n as f,p as m,q as p,r as g,s as y,t as h,u as S,v,w as o}from"./chunk-MG43RZXH.js";import{E as d,L as l}from"./chunk-4F67XQYS.js";async function P({cwd:e,lockfile:n}){let i=c(n),a=b(d(l,n));if(C({context:i,cwd:e})===a)return[];k({context:i,cwd:e});let t=await x(n);return F({cleanLockfileHash:t.length===0?a:null,context:i,cwd:e}),t}async function x(e){let n=u(e),i=await f(e),a=await m({context:c(e),facts:i.facts});return[...g(e).map(t=>({kind:"missing-precondition",missing:t})),...p(n,i.dataRules).map(t=>({gap:t,kind:"cascade-gap"})),...a.map(t=>({conflict:t,kind:"fact-conflict"})),...y(e).map(t=>({kind:"unreachable-interaction",violation:t})),...h(e).map(t=>({kind:"redundant-assertion",redundancy:t})),...S(e).map(t=>({kind:"unmodeled-surface",surface:t})),...v(e).map(t=>({content:t,kind:"unpinned-surface-content"}))]}function U(e){return`${o.good("ok")} \u2014 no static model violations (${r(e,"test")})`}function O(e){let i=e.some(a=>a.kind==="unmodeled-surface")?[`Elements that hide together are one surface. ${s("create","surfaces")}`]:[];return[`${o.bad("fail")} \u2014 ${r(e.length,"static model violation")}:`,...e.map(a=>$(a)),...i].join(`
5
5
 
6
6
  `)}function E(e){return[`${o.warn("warn")} \u2014 ${r(e.length,"model coverage gap")} (not blocking):`,...e.map(n=>` ${A(n)}`),`Stub the missing flows. ${s("discover")}`].join(`
7
7
  `)}function A(e){switch(e.kind){case"entity-never-given":return`${e.entity} \u2014 declared but no test seeds it`;case"entity-never-mutated":return`${e.entity} \u2014 seeded but never asserted created/updated/deleted`;case"unmatchable-delete-key":return`test ${e.workflow}/${e.testSlug} asserts ${e.entity} deleted with literal ${e.field} but no seeded ${e.entity} sets ${e.field} \u2014 solver treats it as no-match`}}export{P as a,U as b,O as c,E as d};
@@ -2,6 +2,6 @@
2
2
  import { createRequire as __ripploCreateRequire } from "node:module";
3
3
  const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
4
4
  import{a as p,c as t}from"./chunk-KOKEEAEF.js";import{c as s}from"./chunk-CJUKILIO.js";function l(){let o=process.cwd(),e=s(o);e!=null&&e!==o&&(process.chdir(e),process.stderr.write(`ripplo: resolved .ripplo/ at ${e}
5
- `))}var d={"exit-plan-gate":()=>import("./exit-plan-gate-BNAUL4FC.js").then(o=>o.exitPlanGateHook),"plan-reminder":()=>import("./plan-reminder-E6AXT6OB.js").then(o=>t("UserPromptSubmit",o.planReminder)),"post-edit":()=>import("./post-edit-LUPA46ZO.js").then(o=>o.postEditHook),"post-edit-analyze":()=>import("./post-edit-analyze-XY6C7ZFP.js").then(o=>t("PostToolUse",o.postEditAnalyze)),"post-edit-flag-stubs":()=>import("./post-edit-flag-stubs-ZMKN4DJZ.js").then(o=>t("PostToolUse",o.postEditFlagStubs)),"pre-bash-run-gate":()=>import("./pre-bash-run-gate-PWLARIYK.js").then(o=>o.preBashRunGateHook),"pre-edit":()=>import("./pre-edit-EJO3TUNQ.js").then(o=>o.preEditHook),"pre-edit-ripplo-skill-gate":()=>import("./pre-edit-ripplo-skill-gate-JD4BDCA3.js").then(o=>t("PreToolUse",o.preEditRipploSkillGate)),"pre-edit-scope-gate":()=>import("./pre-edit-scope-gate-NZO4HVGT.js").then(o=>t("PreToolUse",o.preEditScopeGate)),"pre-edit-watch-gate":()=>import("./pre-edit-watch-gate-DZHQCMEI.js").then(o=>t("PreToolUse",o.preEditWatchGate)),"prompt-submit":()=>import("./prompt-submit-U3QOU47D.js").then(o=>o.promptSubmitHook),"scope-reminder":()=>import("./scope-reminder-CBY4I5SG.js").then(o=>t("UserPromptSubmit",o.scopeReminder)),"session-preamble":()=>import("./session-preamble-IHBGHKCW.js").then(o=>o.sessionPreambleHook),"stop-enforce":()=>import("./stop-enforce-ZLQKGMSF.js").then(o=>o.stopEnforceHook),"tasks-reminder":()=>import("./tasks-reminder-LKSUZUFD.js").then(o=>t("UserPromptSubmit",o.tasksReminder)),"tasks-reminder-tool":()=>Promise.resolve(t("PostToolUse",()=>{})),"track-skill-load":()=>import("./track-skill-load-CJ74GD3Q.js").then(o=>o.trackSkillLoadHook),"track-skill-prompt":()=>import("./track-skill-prompt-YSB6OOQN.js").then(o=>t("UserPromptSubmit",o.trackSkillPrompt))},n=d;async function P(o){let e=n[o];e==null&&(process.stderr.write(`Unknown hook: ${o}
5
+ `))}var d={"exit-plan-gate":()=>import("./exit-plan-gate-BNAUL4FC.js").then(o=>o.exitPlanGateHook),"plan-reminder":()=>import("./plan-reminder-45PSVOVW.js").then(o=>t("UserPromptSubmit",o.planReminder)),"post-edit":()=>import("./post-edit-JHJT2QTK.js").then(o=>o.postEditHook),"post-edit-analyze":()=>import("./post-edit-analyze-PPFHKIYQ.js").then(o=>t("PostToolUse",o.postEditAnalyze)),"post-edit-flag-stubs":()=>import("./post-edit-flag-stubs-Q3UKDZ2W.js").then(o=>t("PostToolUse",o.postEditFlagStubs)),"pre-bash-run-gate":()=>import("./pre-bash-run-gate-PWLARIYK.js").then(o=>o.preBashRunGateHook),"pre-edit":()=>import("./pre-edit-EJO3TUNQ.js").then(o=>o.preEditHook),"pre-edit-ripplo-skill-gate":()=>import("./pre-edit-ripplo-skill-gate-JD4BDCA3.js").then(o=>t("PreToolUse",o.preEditRipploSkillGate)),"pre-edit-scope-gate":()=>import("./pre-edit-scope-gate-NZO4HVGT.js").then(o=>t("PreToolUse",o.preEditScopeGate)),"pre-edit-watch-gate":()=>import("./pre-edit-watch-gate-DZHQCMEI.js").then(o=>t("PreToolUse",o.preEditWatchGate)),"prompt-submit":()=>import("./prompt-submit-ZCDG6T4Y.js").then(o=>o.promptSubmitHook),"scope-reminder":()=>import("./scope-reminder-CBY4I5SG.js").then(o=>t("UserPromptSubmit",o.scopeReminder)),"session-preamble":()=>import("./session-preamble-ZYVRDSGA.js").then(o=>o.sessionPreambleHook),"stop-enforce":()=>import("./stop-enforce-Q4JNBYQU.js").then(o=>o.stopEnforceHook),"tasks-reminder":()=>import("./tasks-reminder-LKSUZUFD.js").then(o=>t("UserPromptSubmit",o.tasksReminder)),"tasks-reminder-tool":()=>Promise.resolve(t("PostToolUse",()=>{})),"track-skill-load":()=>import("./track-skill-load-CJ74GD3Q.js").then(o=>o.trackSkillLoadHook),"track-skill-prompt":()=>import("./track-skill-prompt-YSB6OOQN.js").then(o=>t("UserPromptSubmit",o.trackSkillPrompt))},n=d;async function P(o){let e=n[o];e==null&&(process.stderr.write(`Unknown hook: ${o}
6
6
  `),process.exit(1));let i=await m(),r=await p(await e(),i);if(r.kind==="crash"){let{renderHookCrash:a}=await import("./cli-error-J33JDZET.js");process.stderr.write(`${a(o,r.error)}
7
7
  `),process.exit(0)}r.stdout!=null&&process.stdout.write(r.stdout),process.exit(0)}function m(){return new Promise((o,e)=>{if(process.stdin.isTTY){o("");return}let i=[];process.stdin.on("data",r=>i.push(r)),process.stdin.on("end",()=>{o(Buffer.concat(i).toString("utf8"))}),process.stdin.on("error",e)})}export{l as a,n as b,P as c};
@@ -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 c}from"./chunk-OQ6KNYPG.js";import{c as p}from"./chunk-LEFXRK53.js";import{c as l}from"./chunk-FEHVIHVA.js";import{a}from"./chunk-MHNGR6M7.js";import{I as u,w as t}from"./chunk-BR7W4UBJ.js";import{R as d}from"./chunk-4F67XQYS.js";var f=3e3;async function S(e){l(e);let n=p(e).unwrapOr(void 0);if(n==null)return null;try{return await fetch(`${n.ripploServerUrl}/health`,{signal:AbortSignal.timeout(f)}),null}catch(r){return{detail:r instanceof Error?r.message:String(r),serverUrl:n.ripploServerUrl}}}function m(e){return e.includes("localhost")||e.includes("127.0.0.1")}import g from"fuse.js";function s(e){switch(e.kind){case"conflicting-flags":return"Pass either --all or test ids, not both.";case"nothing-selected":return`No tests selected \u2014 scope empty, no dirty .ripplo/workflows files. Pass test ids, add to scope (${a("run")}), or use --all.`;case"unknown-ids":{let n=e.known,r=e.unknown.flatMap(i=>y(i,n)),o=r.length>0?[`Did you mean: ${[...new Set(r)].join(", ")}`]:[];return[`Unknown ${e.unknown.length===1?"id":"ids"}: ${e.unknown.join(", ")}`,...o,"Pass a workflow slug for all its tests, or workflow/test for one. Known workflows:",...n.map(i=>` ${i}`)].join(`
4
+ import{a as c}from"./chunk-OQ6KNYPG.js";import{c as p}from"./chunk-LEFXRK53.js";import{c as l}from"./chunk-FEHVIHVA.js";import{a}from"./chunk-MHNGR6M7.js";import{I as u,w as t}from"./chunk-MG43RZXH.js";import{R as d}from"./chunk-4F67XQYS.js";var f=3e3;async function S(e){l(e);let n=p(e).unwrapOr(void 0);if(n==null)return null;try{return await fetch(`${n.ripploServerUrl}/health`,{signal:AbortSignal.timeout(f)}),null}catch(r){return{detail:r instanceof Error?r.message:String(r),serverUrl:n.ripploServerUrl}}}function m(e){return e.includes("localhost")||e.includes("127.0.0.1")}import g from"fuse.js";function s(e){switch(e.kind){case"conflicting-flags":return"Pass either --all or test ids, not both.";case"nothing-selected":return`No tests selected \u2014 scope empty, no dirty .ripplo/workflows files. Pass test ids, add to scope (${a("run")}), or use --all.`;case"unknown-ids":{let n=e.known,r=e.unknown.flatMap(i=>y(i,n)),o=r.length>0?[`Did you mean: ${[...new Set(r)].join(", ")}`]:[];return[`Unknown ${e.unknown.length===1?"id":"ids"}: ${e.unknown.join(", ")}`,...o,"Pass a workflow slug for all its tests, or workflow/test for one. Known workflows:",...n.map(i=>` ${i}`)].join(`
5
5
  `)}}}function L({failed:e,notRun:n,passed:r}){let o=n>0?`, ${String(n)} not run`:"";return`${String(r)} passed, ${String(e)} failed${o} (${String(r+e+n)} total)`}function A({debugDir:e,event:n}){let r=`${n.workflowName} \u2192 ${n.testName}`;if(n.kind==="test-started")return`${t.dim("run ")} ${r}`;switch(n.outcome.kind){case"pass":return`${t.good("pass")} ${r} ${t.dim(n.runId)}`;case"findings":return[`${t.bad("fail")} ${r} \u2014 ${c(n.outcome.findingLines.length,"finding")}`,...n.outcome.findingLines,u({debugDir:e,runId:n.runId}),`${t.dim("why")} npx ripplo explain ${n.runId}`].join(`
6
6
  `);case"error":return`${t.bad("error")} ${r} \u2014 ${n.outcome.detail} ${t.dim(n.runId)}`;case"dispatch-error":return`${t.bad("error")} ${r} \u2014 ${w(n.outcome.reason)}`;case"dispatch-timeout":return`${t.bad("error")} ${r} \u2014 not run: dispatch timed out (transient): ${n.outcome.detail}`;case"infra-error":return`${t.bad("error")} ${r} \u2014 not run: Ripplo server unreachable: ${n.outcome.detail}`}}var h={MAX_AGENTS:"agent limit reached for your plan \u2014 upgrade to add more",MAX_CONCURRENT_RUNS:"concurrent run limit reached for your plan \u2014 upgrade or wait for runs to finish",MAX_PROJECTS:"project limit reached for your plan \u2014 upgrade to add more",MAX_RUNS:"run limit reached for your plan \u2014 enable overage or upgrade",OVERAGE_CAP:"overage cap reached \u2014 raise the cap or upgrade"};function j({detail:e,serverUrl:n}){return m(n)?`Ripplo server at ${n} not running (${e}). Start the dev server with \`pnpm dev\`.`:`Ripplo server at ${n} unreachable (${e}) \u2014 server-side, not your local environment.`}function N(e){switch(e.code){case"compile-failed":{let n=e.diagnostics.length===0?[]:["",...e.diagnostics];return[`Compilation failed in the daemon (${e.detail}). Run \`npx ripplo compile\` for full output.`,...n].join(`
7
7
  `)}case"selection-conflicting-flags":return s({kind:"conflicting-flags"});case"selection-nothing-selected":return s({kind:"nothing-selected"});case"selection-unknown-ids":return s({kind:"unknown-ids",known:e.known,unknown:e.unknown});case"app-unreachable":return`Your dev server not responding at ${e.url} (${e.detail}) \u2014 your local environment, not the Ripplo server.`;case"engine-unreachable":return`Ripplo engine not responding at ${e.url} (${e.detail}) \u2014 adapter unmounted, behind a build error, or RIPPLO_ENGINE_URL points at the wrong path.`;case"scope-failed":return`Could not resolve the dev-session scope: ${e.detail}
@@ -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}from"./chunk-XVMIPWJQ.js";import"./chunk-EVVF662P.js";import"./chunk-BR7W4UBJ.js";import"./chunk-4F67XQYS.js";import"./chunk-NNH3YVVO.js";import"./chunk-KMZ3L5YA.js";export{a as compileAndWrite,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}from"./chunk-INO3L4WS.js";import"./chunk-EVVF662P.js";import"./chunk-MG43RZXH.js";import"./chunk-4F67XQYS.js";import"./chunk-NNH3YVVO.js";import"./chunk-KMZ3L5YA.js";export{a as compileAndWrite,c as stampedLockfile,d as stampedLockfileFromDisk,e as stubbedWorkflows,b as writeStampedLockfile};
@@ -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-PRD7P6EF.js";import"./chunk-BR7W4UBJ.js";import"./chunk-4F67XQYS.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-RWFS5SCW.js";import"./chunk-MG43RZXH.js";import"./chunk-4F67XQYS.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,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 be,i as qe,j as He,k as Ue,l as We,m as $e,n as _e,o as Me,p as Oe,r as q,s as H,t as Fe,u as B,v as Ke,w as Qe,x as ze,y as Je,z as Ge}from"./chunk-U27IDW6O.js";import{d as Pe}from"./chunk-WZBLSDNV.js";import{a as je,c as Ne,d as Be,e as w}from"./chunk-ZUPS6XVH.js";import{c as k}from"./chunk-LEFXRK53.js";import{e as Ee}from"./chunk-4W6WIT7T.js";import{a as de}from"./chunk-R4ZTRVDQ.js";import{c as ie}from"./chunk-FEHVIHVA.js";import{b as pe}from"./chunk-Q6IYTHMP.js";import{a as L}from"./chunk-XZ2TPZLD.js";import"./chunk-MHNGR6M7.js";import{g as we,h as D}from"./chunk-XVMIPWJQ.js";import{a as ce,i as v,j as ue,k as T}from"./chunk-EVVF662P.js";import{e as xe,f as Re}from"./chunk-DBIXYJRB.js";import{c as te,d as u,f as s,g as N,h as oe}from"./chunk-PE5WVWI5.js";import"./chunk-CJUKILIO.js";import{b as Ie,c as Ce,d as Te,e as Le,f as Ae,h as De}from"./chunk-PRD7P6EF.js";import{$ as ve,M as me,P as A,Q as ye,R as ge,S as Se,T as ke,U as he,d as fe}from"./chunk-BR7W4UBJ.js";import{E as ae,L as se,R as le}from"./chunk-4F67XQYS.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=>le(i.name)===n)?.tests.find(i=>i.slug===r);return o==null?void 0:fe(o)}var mn=6e4,yn=pn(`
4
+ import{A as Ge,B as U,D as Ve,E as Xe,F as Ye,H as Ze,I as K,J as Q,K as er,L as rr,M as z,N as nr,e as be,i as qe,j as He,k as Ue,l as We,m as $e,n as _e,o as Me,p as Oe,r as q,s as H,t as Fe,u as B,v as Ke,w as Qe,x as ze,z as Je}from"./chunk-6BQADUAX.js";import{d as Pe}from"./chunk-WZBLSDNV.js";import{a as je,c as Ne,d as Be,e as w}from"./chunk-ZUPS6XVH.js";import{c as k}from"./chunk-LEFXRK53.js";import{e as Ee}from"./chunk-4W6WIT7T.js";import{a as de}from"./chunk-R4ZTRVDQ.js";import{c as ie}from"./chunk-FEHVIHVA.js";import{b as pe}from"./chunk-Q6IYTHMP.js";import{a as L}from"./chunk-XZ2TPZLD.js";import"./chunk-MHNGR6M7.js";import{g as we,h as D}from"./chunk-INO3L4WS.js";import{a as ce,i as v,j as ue,k as T}from"./chunk-EVVF662P.js";import{e as xe,f as Re}from"./chunk-DBIXYJRB.js";import{c as te,d as u,f as s,g as N,h as oe}from"./chunk-PE5WVWI5.js";import"./chunk-CJUKILIO.js";import{b as Ie,c as Ce,d as Te,e as Le,f as Ae,h as De}from"./chunk-RWFS5SCW.js";import{$ as ve,M as me,P as A,Q as ye,R as ge,S as Se,T as ke,U as he,d as fe}from"./chunk-MG43RZXH.js";import{E as ae,L as se,R as le}from"./chunk-4F67XQYS.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=>le(i.name)===n)?.tests.find(i=>i.slug===r);return o==null?void 0:fe(o)}var mn=6e4,yn=pn(`
5
5
  subscription RunRequestedWatch($devSessionId: String!) {
6
6
  runRequested(devSessionId: $devSessionId) {
7
7
  runId
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-EA62LNKT.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-J33JDZET.js");process.stderr.write(`${p(t)}
4
+ import{a as o,c as s}from"./chunk-UMSBDSRS.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-J33JDZET.js");process.stderr.write(`${p(t)}
5
5
  `),process.exit(1)});