ripplo 0.9.3 → 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 (61) hide show
  1. package/dist/{chunk-T4GHICK4.js → chunk-2A6KSSUD.js} +1 -1
  2. package/dist/{chunk-4W6WIT7T.js → chunk-3M2E253R.js} +1 -1
  3. package/dist/{chunk-XWUIRXMS.js → chunk-3OI2UH3H.js} +1 -1
  4. package/dist/{chunk-I2M24U3N.js → chunk-3PF5QK56.js} +1 -1
  5. package/dist/chunk-52IE2PAQ.js +48 -0
  6. package/dist/{chunk-L7GWKDGD.js → chunk-6FU7HD6D.js} +1 -1
  7. package/dist/{chunk-2TO6W5BR.js → chunk-74ZADYZC.js} +2 -2
  8. package/dist/{chunk-PPMW4GUY.js → chunk-77DJHICC.js} +1 -1
  9. package/dist/{chunk-WZBLSDNV.js → chunk-B6OQ2JE2.js} +1 -1
  10. package/dist/{chunk-4H7EIC6W.js → chunk-CUXFU3MF.js} +1 -1
  11. package/dist/{chunk-TBCRT6EC.js → chunk-ESTPIODD.js} +1 -1
  12. package/dist/{chunk-I5BHCICM.js → chunk-GAOLASGV.js} +1 -1
  13. package/dist/{chunk-ZQHKESUR.js → chunk-GYH4P7SC.js} +1 -1
  14. package/dist/{chunk-ELECJABM.js → chunk-IA7TU3WW.js} +1 -1
  15. package/dist/{chunk-RAN55ZC6.js → chunk-IDPYM454.js} +1 -1
  16. package/dist/{chunk-DBIXYJRB.js → chunk-INURHJF4.js} +1 -1
  17. package/dist/{chunk-727NNPVM.js → chunk-JIMLVUPS.js} +14 -14
  18. package/dist/{chunk-SBDRIIVW.js → chunk-JNLHZVZJ.js} +2 -2
  19. package/dist/{chunk-LEFXRK53.js → chunk-KQWFJRIP.js} +1 -1
  20. package/dist/{chunk-T5VLZ43M.js → chunk-N45RSC6N.js} +1 -1
  21. package/dist/{chunk-PLQGRHHV.js → chunk-NBSDY7QG.js} +1 -1
  22. package/dist/{chunk-ONNK7JT4.js → chunk-NJFCO7FT.js} +1 -1
  23. package/dist/{chunk-OIJBIBIN.js → chunk-PPB7QGV2.js} +1 -1
  24. package/dist/{chunk-G3UFH3WS.js → chunk-QIXJ7Z2L.js} +1 -1
  25. package/dist/{chunk-ZNUC2RLT.js → chunk-T46B2OPT.js} +1 -1
  26. package/dist/{chunk-BLH6XVEC.js → chunk-TRQDCBKV.js} +1 -1
  27. package/dist/{chunk-66LUQG5T.js → chunk-VXJACUXK.js} +1 -1
  28. package/dist/{chunk-ML7WCYPY.js → chunk-XBN6AJVQ.js} +1 -1
  29. package/dist/{chunk-2ZOIED3H.js → chunk-ZYDCN5K2.js} +1 -1
  30. package/dist/{cli-error-TM2YODR3.js → cli-error-MEC67EVT.js} +1 -1
  31. package/dist/{compile-write-TTEHFTNY.js → compile-write-F7D273JN.js} +1 -1
  32. package/dist/{daemon-M52H2YF7.js → daemon-3CCSJNDP.js} +14 -14
  33. package/dist/{daemon-6B4OSRBS.js → daemon-QRMX6RPX.js} +1 -1
  34. package/dist/{daemon-lock-LTQMLU4Q.js → daemon-lock-67AFXXED.js} +1 -1
  35. package/dist/{dsl-loader-Z54ZM7C6.js → dsl-loader-A2EMKCRL.js} +1 -1
  36. package/dist/{exit-plan-gate-BNAUL4FC.js → exit-plan-gate-WPHQII5J.js} +1 -1
  37. package/dist/hook.js +1 -1
  38. package/dist/index.js +198 -188
  39. package/dist/{plan-reminder-2ABA3SFH.js → plan-reminder-6E4CHEAZ.js} +1 -1
  40. package/dist/post-edit-VHZDDVV5.js +4 -0
  41. package/dist/post-edit-analyze-YAVEMK4O.js +4 -0
  42. package/dist/post-edit-flag-stubs-PMMITC7F.js +4 -0
  43. package/dist/{pre-bash-run-gate-PWLARIYK.js → pre-bash-run-gate-WOGQZARU.js} +1 -1
  44. package/dist/pre-edit-R77BLLLQ.js +4 -0
  45. package/dist/{pre-edit-ripplo-skill-gate-JD4BDCA3.js → pre-edit-ripplo-skill-gate-FXNQWVME.js} +1 -1
  46. package/dist/{pre-edit-scope-gate-NZO4HVGT.js → pre-edit-scope-gate-ADO3NRVS.js} +1 -1
  47. package/dist/{pre-edit-watch-gate-MR7YQGEV.js → pre-edit-watch-gate-6MMET2NZ.js} +1 -1
  48. package/dist/{prompt-submit-AMSKMHWO.js → prompt-submit-WMYBXZQN.js} +1 -1
  49. package/dist/scope-reminder-XTXZHPLU.js +4 -0
  50. package/dist/solve-worker.js +1 -1
  51. package/dist/status-PUV7KG33.js +4 -0
  52. package/dist/{stop-enforce-P6YWEHWE.js → stop-enforce-56SKN4RO.js} +1 -1
  53. package/dist/{tasks-reminder-VKRJRDNC.js → tasks-reminder-PICFLMC2.js} +1 -1
  54. package/package.json +3 -3
  55. package/dist/chunk-PE5WVWI5.js +0 -48
  56. package/dist/post-edit-XBVQBSKV.js +0 -4
  57. package/dist/post-edit-analyze-KDA7T37Z.js +0 -4
  58. package/dist/post-edit-flag-stubs-SX2Y7OHG.js +0 -4
  59. package/dist/pre-edit-FTNMDZZO.js +0 -4
  60. package/dist/scope-reminder-CBY4I5SG.js +0 -4
  61. package/dist/status-2IFILDIA.js +0 -4
@@ -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{C as i,f as t}from"./chunk-PPMW4GUY.js";function m(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 g(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 f({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{C as i,f as t}from"./chunk-77DJHICC.js";function m(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 g(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 f({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 h(){return"Not signed in. Run `npx ripplo auth login`, then start the daemon again."}function x({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 k({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 y(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 $(){return"ripplo daemon: lock compromised \u2014 another daemon likely took over this project. Shutting down."}function w(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}`,s=`${String(n.active)} active, ${String(n.queued)} queued`,p=l(n.explorer,n.exploring),o=`daemon: running (${r} | ${s} | ${p} | ${d(n.progress)})`;if(n.sseHealth!=null&&!n.sseHealth.ok){let a=n.sseHealth.detail==null?"":`: ${n.sseHealth.detail}`;return`${o}
6
6
  daemon: cannot subscribe to run dispatch${a} \u2014 server-side, restarting the daemon will not help`}return o}function d(e){return e.attempts===0?"explore: idle":`explore: ${String(e.attempts)} attempts, ${String(e.findings)} findings`}function b(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 v(e){switch(e.kind){case"pass":return{kind:"pass"};case"findings":return{findingLines:e.contradictions.map(n=>i({contradiction:n,evidencePath:`.ripplo/debug/${e.runId}/behavior.jsonl`})),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 l(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 ${u(e.reason)}`}}function u(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"}}export{m as a,g as b,f as c,h as d,x as e,k as f,y as g,$ as h,w as i,d as j,b as k,v 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{c as o}from"./chunk-DBIXYJRB.js";import{i as e}from"./chunk-PE5WVWI5.js";import m from"fs";import p from"fs";import i from"path";import{execFileSync as a}from"child_process";var f=256*1024*1024;function n(r,t){return a("git",[...r],{cwd:t,encoding:"utf8",maxBuffer:f,stdio:["ignore","pipe","pipe"]})}function E(r,t){try{return n(r,t)}catch{return""}}var g=["MERGE_HEAD","rebase-merge","rebase-apply","CHERRY_PICK_HEAD","REVERT_HEAD"];function d(r){return u(r)!=null}function s(r){let t=u(r);return t==null?!1:g.some(l=>p.existsSync(i.join(t,l)))}function u(r){try{let t=n(["rev-parse","--git-dir"],r).trim();return t.length===0?null:i.isAbsolute(t)?t:i.resolve(r,t)}catch{return null}}function c(r){return e(r,"hooks-paused")}function v(r){return m.existsSync(c(r))||s(r)?!1:o(r)}export{n as a,E as b,d as c,s as d,c as e,v as f};
4
+ import{c as o}from"./chunk-INURHJF4.js";import{j as e}from"./chunk-52IE2PAQ.js";import m from"fs";import p from"fs";import i from"path";import{execFileSync as a}from"child_process";var f=256*1024*1024;function n(r,t){return a("git",[...r],{cwd:t,encoding:"utf8",maxBuffer:f,stdio:["ignore","pipe","pipe"]})}function E(r,t){try{return n(r,t)}catch{return""}}var g=["MERGE_HEAD","rebase-merge","rebase-apply","CHERRY_PICK_HEAD","REVERT_HEAD"];function d(r){return u(r)!=null}function s(r){let t=u(r);return t==null?!1:g.some(l=>p.existsSync(i.join(t,l)))}function u(r){try{let t=n(["rev-parse","--git-dir"],r).trim();return t.length===0?null:i.isAbsolute(t)?t:i.resolve(r,t)}catch{return null}}function c(r){return e(r,"hooks-paused")}function v(r){return m.existsSync(c(r))||s(r)?!1:o(r)}export{n as a,E as b,d as c,s as d,c as e,v as f};
@@ -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 l}from"./chunk-JJ4QQPAV.js";import{c}from"./chunk-LEFXRK53.js";import{a as p}from"./chunk-7WZ3VIUU.js";import{f as d}from"./chunk-4W6WIT7T.js";import{b as a}from"./chunk-MHNGR6M7.js";import{e as s}from"./chunk-PE5WVWI5.js";import f from"path";import u from"picomatch";import{graphql as m}from"gql.tada";import*as n from"zod/mini";var h=new Set(["Edit","Write","NotebookEdit"]),g=n.looseObject({file_path:n.string()}),S=m(`
4
+ import{a as l}from"./chunk-JJ4QQPAV.js";import{c}from"./chunk-KQWFJRIP.js";import{a as p}from"./chunk-7WZ3VIUU.js";import{f as d}from"./chunk-3M2E253R.js";import{b as a}from"./chunk-MHNGR6M7.js";import{e as s}from"./chunk-52IE2PAQ.js";import f from"path";import u from"picomatch";import{graphql as m}from"gql.tada";import*as n from"zod/mini";var h=new Set(["Edit","Write","NotebookEdit"]),g=n.looseObject({file_path:n.string()}),S=m(`
5
5
  query PreEditScopeGate($projectId: String!, $cwd: String!) {
6
6
  project(id: $projectId) {
7
7
  id
@@ -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 d,b as f,c as g}from"./chunk-T5VLZ43M.js";import{a as w}from"./chunk-I5BHCICM.js";import{c as u}from"./chunk-LEFXRK53.js";import{a as c}from"./chunk-7WZ3VIUU.js";import{f as m}from"./chunk-4W6WIT7T.js";import{a as i}from"./chunk-MHNGR6M7.js";import{e as a}from"./chunk-PE5WVWI5.js";import{graphql as h}from"gql.tada";var S=h(`
4
+ import{a as d,b as f,c as g}from"./chunk-N45RSC6N.js";import{a as w}from"./chunk-GAOLASGV.js";import{c as u}from"./chunk-KQWFJRIP.js";import{a as c}from"./chunk-7WZ3VIUU.js";import{f as m}from"./chunk-3M2E253R.js";import{a as i}from"./chunk-MHNGR6M7.js";import{e as a}from"./chunk-52IE2PAQ.js";import{graphql as h}from"gql.tada";var S=h(`
5
5
  query ScopeReminder($projectId: String!, $cwd: String!) {
6
6
  project(id: $projectId) {
7
7
  id
@@ -0,0 +1,48 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __ripploCreateRequire } from "node:module";
3
+ const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
4
+ import{b as E}from"./chunk-CJUKILIO.js";import{a as $}from"./chunk-NNH3YVVO.js";import{b as U}from"./chunk-KMZ3L5YA.js";var F=15e3,G=3,L=300,f=class extends Error{detail;serverUrl;constructor({detail:r,serverUrl:t}){super(`Failed to connect to Ripplo server at ${t}. Check the server is running and reachable. Details: ${r}`),this.name="GqlConnectionError",this.detail=r,this.serverUrl=t}},u=class extends Error{errors;constructor(r){super(r.map(t=>t.message).join(", ")),this.name="GqlRequestError",this.errors=r}};function N(e){if(e instanceof u)return e.errors[0]?.extensions?.code}var j={attempts:G,timeoutMs:F},V={attempts:1,timeoutMs:3e3};async function x(e){return T(e,j)}async function W(e){return T(e,V)}async function T(e,r){let{print:t}=await import("graphql"),n=t(e.document),o=JSON.stringify({query:n,variables:e.variables}),i=`${e.config.ripploServerUrl}/graphql`,c=await B({init:{body:o,headers:{Authorization:`Bearer ${e.config.token}`,"Content-Type":"application/json",...E()},method:"POST"},policy:r,serverUrl:e.config.ripploServerUrl,url:i}),s=await J({res:c,url:i});if(!Q(s))throw new Error("Invalid GraphQL response");if(X(s))throw new u(s.errors);if(s.data==null)throw new Error("No data returned from server");return s.data}async function B({init:e,policy:r,serverUrl:t,url:n}){let o=1,i=await b({init:e,timeoutMs:r.timeoutMs,url:n});for(;i.retryable&&o<r.attempts;)await K(H(o)),o+=1,i=await b({init:e,timeoutMs:r.timeoutMs,url:n});if(i.response!=null)return i.response;throw new f({detail:i.detail,serverUrl:t})}async function b({init:e,timeoutMs:r,url:t}){try{let n=await fetch(t,{...e,signal:AbortSignal.timeout(r)});return{detail:"",response:n,retryable:n.status>=500}}catch(n){return{detail:n instanceof Error?n.message:String(n),response:void 0,retryable:!0}}}function H(e){return L*3**(e-1)*(.5+Math.random())}function K(e){return new Promise(r=>{setTimeout(r,e)})}async function J({res:e,url:r}){let t=await e.text();if(t.length===0)throw new Error(`Empty response from Ripplo server at ${r} (status ${String(e.status)}). The server may have restarted or the request was rejected before a body was sent.`);try{return JSON.parse(t)}catch{throw new Error(`Non-JSON response from Ripplo server at ${r} (status ${String(e.status)}): ${t.slice(0,200)}`)}}function Q(e){return typeof e=="object"&&e!=null&&("data"in e||"errors"in e)}function X(e){return Array.isArray(e.errors)&&e.errors.length>0}import Y from"pino";import z from"pino-pretty";var y=Y({level:process.env.LOG_LEVEL??"info"},z({ignore:"pid,hostname"}));import{readdir as Z,rm as ee,stat as re}from"fs/promises";import{existsSync as k}from"fs";import w from"path";var v=".uploaded";var C=w.join(process.cwd(),".ripplo","debug"),D=360*60*1e3;async function te({maxRuns:e}){try{let t=(await Z(C,{withFileTypes:!0})).filter(a=>a.isDirectory()),n=Date.now(),o=await Promise.all(t.map(async a=>{let m=w.join(C,a.name),O=await re(m);return{dirPath:m,mtime:O.mtimeMs,pendingUpload:ne(m)}})),i=o.filter(a=>n-a.mtime>D),c=o.filter(a=>n-a.mtime<=D&&!a.pendingUpload).toSorted((a,m)=>m.mtime-a.mtime).slice(e),s=[...i,...c];if(s.length===0)return;await Promise.allSettled(s.map(a=>ee(a.dirPath,{force:!0,recursive:!0}))),y.debug("Pruned %d old debug run(s)",s.length)}catch{y.warn("Debug run pruning failed, ignoring")}}function ne(e){return k(w.join(e,"behavior.jsonl"))&&!k(w.join(e,v))}import l from"fs";import oe from"os";import g from"path";var ie=".local",ae=".ripplo";function h(e){return g.join(e,".ripplo",ie)}function se(e){let r=h(e);l.existsSync(r)||l.mkdirSync(r,{recursive:!0});let t=g.join(r,".gitignore");return l.existsSync(t)||l.writeFileSync(t,`*
5
+ `),r}function le(e,r){return g.join(h(e),r)}function P(){return g.join(oe.homedir(),ae)}function S(){let e=P();return l.existsSync(e)?l.chmodSync(e,448):l.mkdirSync(e,{mode:448,recursive:!0}),e}function A(e){return g.join(P(),e)}import{Agent as de,RetryAgent as ce,setGlobalDispatcher as me}from"undici";var ue=1500,ge=4e3,pe=3,fe=50,ye=100,I=!1;function we(){if(I)return;I=!0;let e=new de({connections:ye,keepAliveMaxTimeout:ge,keepAliveTimeout:ue}),r=new ce(e,{errorCodes:["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT","UND_ERR_REQ_CONTENT_LENGTH_MISMATCH","UND_ERR_SOCKET"],maxRetries:pe,methods:["GET","POST","HEAD","OPTIONS","PUT","DELETE"],minTimeout:fe});me(r)}import{graphql as p}from"gql.tada";var We=p(`
6
+ query AgentReviewContextWorker($reviewId: String!) {
7
+ agentReview(id: $reviewId) {
8
+ id
9
+ runId
10
+ agentProfile {
11
+ id
12
+ name
13
+ description
14
+ output
15
+ successCriteria
16
+ }
17
+ }
18
+ }
19
+ `);var Be=p(`
20
+ mutation StartAgentReviewWorker($reviewId: String!) {
21
+ startAgentReview(reviewId: $reviewId)
22
+ }
23
+ `);var He=p(`
24
+ mutation CompleteAgentReviewWorker(
25
+ $reviewId: String!
26
+ $markdown: String!
27
+ $shortSummary: String!
28
+ $verdict: AgentReviewVerdict!
29
+ $comments: [AgentReviewCommentInput!]!
30
+ ) {
31
+ completeAgentReview(
32
+ reviewId: $reviewId
33
+ markdown: $markdown
34
+ shortSummary: $shortSummary
35
+ verdict: $verdict
36
+ comments: $comments
37
+ )
38
+ }
39
+ `);var Ke=p(`
40
+ mutation UpdateAgentReviewProgressWorker($reviewId: String!, $text: String!) {
41
+ updateAgentReviewProgress(reviewId: $reviewId, text: $text)
42
+ }
43
+ `);var Je=p(`
44
+ mutation FailAgentReviewWorker($reviewId: String!, $reason: String!) {
45
+ failAgentReview(reviewId: $reviewId, reason: $reason)
46
+ }
47
+ `);import d from"fs";import _ from"path";function Re(e){let r=process.env.RIPPLO_TOKEN;if(r!=null&&r.trim().length>0)return r.trim();let t=R(e);if(!d.existsSync(t))return null;let n=d.readFileSync(t,"utf8").trim();return n.length===0?null:n}function ve({serverUrl:e,token:r}){S();let t=R(e);d.mkdirSync(_.dirname(t),{mode:448,recursive:!0}),d.writeFileSync(t,r+`
48
+ `,{mode:384})}function he(e){let r=R(e);return d.existsSync(r)?(d.unlinkSync(r),!0):!1}function R(e){return A(_.join("tokens",Pe(e)))}function Pe(e){return new URL(e).host.replaceAll(/[^a-zA-Z0-9.]/g,"_")}var M=U($(),1);import q from"crypto";function Se({body:e,secret:r}){let t=new M.Webhook(r),n=`msg_${q.randomUUID()}`,o=new Date,i=t.sign(n,o,e),c=Math.floor(o.getTime()/1e3);return{"webhook-id":n,"webhook-signature":i,"webhook-timestamp":String(c)}}function Ae(){return`whsec_${q.randomBytes(24).toString("base64")}`}export{f as a,u as b,N as c,x as d,W as e,y as f,v as g,te as h,se as i,le as j,Re as k,ve as l,he as m,R as n,we as o,Se as p,Ae as q};
@@ -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 a}from"./chunk-OWN4P2K7.js";import{a as s}from"./chunk-7WZ3VIUU.js";import{f as l}from"./chunk-4W6WIT7T.js";import p from"path";import*as t from"zod/mini";var n=new Set(["Edit","Write","NotebookEdit"]),d=t.looseObject({file_path:t.string()}),c="create",k=e=>{if(!n.has(e.tool_name))return;let i=d.safeParse(e.tool_input);if(!i.success)return;let{cwd:o}=e;if(!s(o)||!l(o))return;let r=p.relative(o,i.data.file_path);if(!(r.startsWith("..")||r!==".ripplo"&&!r.startsWith(".ripplo/"))&&!a(o,e.session_id,c))return{hookSpecificOutput:{hookEventName:"PreToolUse",permissionDecision:"deny",permissionDecisionReason:`Editing \`.ripplo/\` files (${r}) requires the \`/ripplo:create\` skill loaded first. Load \`/ripplo:create\` then retry \u2014 it carries the DSL builder shape, model rules, and the parallelization guidance you'll need.`}}};export{k as a};
4
+ import{b as a}from"./chunk-OWN4P2K7.js";import{a as s}from"./chunk-7WZ3VIUU.js";import{f as l}from"./chunk-3M2E253R.js";import p from"path";import*as t from"zod/mini";var n=new Set(["Edit","Write","NotebookEdit"]),d=t.looseObject({file_path:t.string()}),c="create",k=e=>{if(!n.has(e.tool_name))return;let i=d.safeParse(e.tool_input);if(!i.success)return;let{cwd:o}=e;if(!s(o)||!l(o))return;let r=p.relative(o,i.data.file_path);if(!(r.startsWith("..")||r!==".ripplo"&&!r.startsWith(".ripplo/"))&&!a(o,e.session_id,c))return{hookSpecificOutput:{hookEventName:"PreToolUse",permissionDecision:"deny",permissionDecisionReason:`Editing \`.ripplo/\` files (${r}) requires the \`/ripplo:create\` skill loaded first. Load \`/ripplo:create\` then retry \u2014 it carries the DSL builder shape, model rules, and the parallelization guidance you'll need.`}}};export{k as a};
@@ -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-2ABA3SFH.js").then(o=>t("UserPromptSubmit",o.planReminder)),"post-edit":()=>import("./post-edit-XBVQBSKV.js").then(o=>o.postEditHook),"post-edit-analyze":()=>import("./post-edit-analyze-KDA7T37Z.js").then(o=>t("PostToolUse",o.postEditAnalyze)),"post-edit-flag-stubs":()=>import("./post-edit-flag-stubs-SX2Y7OHG.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-FTNMDZZO.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-MR7YQGEV.js").then(o=>t("PreToolUse",o.preEditWatchGate)),"prompt-submit":()=>import("./prompt-submit-AMSKMHWO.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-P6YWEHWE.js").then(o=>o.stopEnforceHook),"tasks-reminder":()=>import("./tasks-reminder-VKRJRDNC.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
- `),process.exit(1));let i=await m(),r=await p(await e(),i);if(r.kind==="crash"){let{renderHookCrash:a}=await import("./cli-error-TM2YODR3.js");process.stderr.write(`${a(o,r.error)}
5
+ `))}var d={"exit-plan-gate":()=>import("./exit-plan-gate-WPHQII5J.js").then(o=>o.exitPlanGateHook),"plan-reminder":()=>import("./plan-reminder-6E4CHEAZ.js").then(o=>t("UserPromptSubmit",o.planReminder)),"post-edit":()=>import("./post-edit-VHZDDVV5.js").then(o=>o.postEditHook),"post-edit-analyze":()=>import("./post-edit-analyze-YAVEMK4O.js").then(o=>t("PostToolUse",o.postEditAnalyze)),"post-edit-flag-stubs":()=>import("./post-edit-flag-stubs-PMMITC7F.js").then(o=>t("PostToolUse",o.postEditFlagStubs)),"pre-bash-run-gate":()=>import("./pre-bash-run-gate-WOGQZARU.js").then(o=>o.preBashRunGateHook),"pre-edit":()=>import("./pre-edit-R77BLLLQ.js").then(o=>o.preEditHook),"pre-edit-ripplo-skill-gate":()=>import("./pre-edit-ripplo-skill-gate-FXNQWVME.js").then(o=>t("PreToolUse",o.preEditRipploSkillGate)),"pre-edit-scope-gate":()=>import("./pre-edit-scope-gate-ADO3NRVS.js").then(o=>t("PreToolUse",o.preEditScopeGate)),"pre-edit-watch-gate":()=>import("./pre-edit-watch-gate-6MMET2NZ.js").then(o=>t("PreToolUse",o.preEditWatchGate)),"prompt-submit":()=>import("./prompt-submit-WMYBXZQN.js").then(o=>o.promptSubmitHook),"scope-reminder":()=>import("./scope-reminder-XTXZHPLU.js").then(o=>t("UserPromptSubmit",o.scopeReminder)),"session-preamble":()=>import("./session-preamble-ZYVRDSGA.js").then(o=>o.sessionPreambleHook),"stop-enforce":()=>import("./stop-enforce-56SKN4RO.js").then(o=>o.stopEnforceHook),"tasks-reminder":()=>import("./tasks-reminder-PICFLMC2.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
+ `),process.exit(1));let i=await m(),r=await p(await e(),i);if(r.kind==="crash"){let{renderHookCrash:a}=await import("./cli-error-MEC67EVT.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};