ripplo 0.15.2 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -142
- package/dist/index.js +56 -664
- package/package.json +8 -45
- package/dist/assets/browser-trace.js +0 -1
- package/dist/assets/rrweb.js +0 -54
- package/dist/capture-worker.js +0 -13892
- package/dist/chunk-3BPQWAUL.js +0 -4
- package/dist/chunk-47LLHHJH.js +0 -9
- package/dist/chunk-5HFJIZLI.js +0 -4
- package/dist/chunk-5RKZ44OU.js +0 -4
- package/dist/chunk-7WZ3VIUU.js +0 -4
- package/dist/chunk-AXROBTLA.js +0 -4
- package/dist/chunk-BFAWQ5U2.js +0 -61
- package/dist/chunk-BGY5F3IU.js +0 -5
- package/dist/chunk-BIB4JJKD.js +0 -84
- package/dist/chunk-C7SV6AR2.js +0 -48
- package/dist/chunk-CI6273ZU.js +0 -107
- package/dist/chunk-FEHVIHVA.js +0 -5
- package/dist/chunk-G6J2WIHJ.js +0 -4
- package/dist/chunk-HEOMRXZE.js +0 -4
- package/dist/chunk-HN55QF5N.js +0 -405
- package/dist/chunk-JJ4QQPAV.js +0 -4
- package/dist/chunk-JQ2CRYVX.js +0 -4
- package/dist/chunk-JS3DLVVI.js +0 -4
- package/dist/chunk-KH4QH23U.js +0 -4
- package/dist/chunk-KMZ3L5YA.js +0 -4
- package/dist/chunk-KOKEEAEF.js +0 -6
- package/dist/chunk-LCCJPRT5.js +0 -5
- package/dist/chunk-MHNGR6M7.js +0 -4
- package/dist/chunk-NNH3YVVO.js +0 -4
- package/dist/chunk-OQ6KNYPG.js +0 -4
- package/dist/chunk-PYDYI3AA.js +0 -23
- package/dist/chunk-Q2TF5WLS.js +0 -6
- package/dist/chunk-QEE4CNMY.js +0 -6
- package/dist/chunk-R4ZTRVDQ.js +0 -4
- package/dist/chunk-RIASQHPG.js +0 -4
- package/dist/chunk-RLB66SU3.js +0 -4
- package/dist/chunk-SXVWB7TZ.js +0 -6
- package/dist/chunk-T6WA2F3S.js +0 -16
- package/dist/chunk-TZPYILZK.js +0 -4
- package/dist/chunk-VHFITVRX.js +0 -13
- package/dist/chunk-W3CXPVVB.js +0 -7
- package/dist/chunk-WB3HHOCG.js +0 -11
- package/dist/chunk-XA6BMQTW.js +0 -8
- package/dist/chunk-XAMVRZJH.js +0 -23
- package/dist/chunk-Y52M43LO.js +0 -8
- package/dist/chunk-YD4VBOBY.js +0 -4
- package/dist/chunk-YRU6BOIP.js +0 -9
- package/dist/chunk-ZSD6QDYB.js +0 -56
- package/dist/cli-error-UYWIDE4L.js +0 -4
- package/dist/compile-write-QNV2EA5B.js +0 -4
- package/dist/daemon-D4UCHMHS.js +0 -175
- package/dist/daemon-LZTY7W4M.js +0 -4
- package/dist/daemon-lock-RPKO5SNE.js +0 -4
- package/dist/dsl-loader-G2CRA252.js +0 -4
- package/dist/dsl-typecheck-worker.js +0 -6
- package/dist/exit-plan-gate-44YWEKYS.js +0 -4
- package/dist/hook.js +0 -5
- package/dist/plan-reminder-EDDIUY43.js +0 -4
- package/dist/post-edit-4CM5P2G2.js +0 -4
- package/dist/post-edit-analyze-HKOTNA2H.js +0 -4
- package/dist/post-edit-flag-stubs-2HZMK4NQ.js +0 -4
- package/dist/pre-bash-run-gate-CDFNAIK3.js +0 -4
- package/dist/pre-edit-JZX36QX6.js +0 -4
- package/dist/pre-edit-ripplo-skill-gate-A6ETC3QN.js +0 -4
- package/dist/pre-edit-scope-gate-HNIQ7KOQ.js +0 -4
- package/dist/pre-edit-watch-gate-T2TWL66C.js +0 -4
- package/dist/prompt-submit-GVZHK3CI.js +0 -4
- package/dist/scope-reminder-A6GVTTVE.js +0 -4
- package/dist/session-preamble-IZQPIWST.js +0 -4
- package/dist/status-CNSPYNYP.js +0 -4
- package/dist/stop-enforce-NKKP2X4U.js +0 -64
- package/dist/tasks-reminder-TDWPD3KV.js +0 -4
- package/dist/track-skill-load-SXSDMHFO.js +0 -4
- package/dist/track-skill-prompt-7N4TQAD2.js +0 -4
package/dist/chunk-Q2TF5WLS.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __ripploCreateRequire } from "node:module";
|
|
3
|
-
const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
|
|
4
|
-
import{D as i,e as t}from"./chunk-BIB4JJKD.js";function f(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 g({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
|
-
`)}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 w(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 y(){return"ripplo daemon: lock compromised \u2014 another daemon likely took over this project. Shutting down."}function $(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`,a=l(n.explorer,n.exploring),o=`daemon: running (${r} | ${s} | ${a} | ${p(n.progress)})`;if(n.sseHealth!=null&&!n.sseHealth.ok){let d=n.sseHealth.detail==null?"":`: ${n.sseHealth.detail}`;return`${o}
|
|
6
|
-
daemon: cannot subscribe to run dispatch${d} \u2014 server-side, restarting the daemon will not help`}return o}function p(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 S(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: ${u(e.reason)}`;case"waiting":return"explorer: waiting for more workflow coverage \u2014 run npx ripplo explore analyze";case"blocked":return`explorer: blocked \u2014 ${c(e.reason)}`}}function u(e){return e==="interactive-runs"?"paused while your runs execute \u2014 resumes when they finish":e==="loading"?"paused while the model loads":"paused for a short cooldown \u2014 resumes on its own"}function c(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"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";case"model-empty":return"no workflow interactions can be explored, run npx ripplo explore analyze"}}export{f as a,g as b,h as c,x as d,k as e,w as f,y as g,$ as h,p as i,b as j,S as k};
|
package/dist/chunk-QEE4CNMY.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __ripploCreateRequire } from "node:module";
|
|
3
|
-
const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
|
|
4
|
-
import{a as o}from"./chunk-OQ6KNYPG.js";import{a as r}from"./chunk-MHNGR6M7.js";import{a as h,c as y,d as F,e as k,f as C,g as b}from"./chunk-5RKZ44OU.js";import{A as p,B as u,C as g,G as S,f as a,t as c,v as d,w as s,x as f,y as l,z as m}from"./chunk-BIB4JJKD.js";import A from"safe-stable-stringify";function z({cwd:i,lockfile:e}){let t=b(A(h(e)));if(k({cwd:i})===t)return[];y({cwd:i});let n=H(e);return F({cwd:i}),C({cleanLockfileHash:n.length===0?t:null,cwd:i}),n}function H(i){let e=c(i),t=d({facts:e.facts});return[...s(i).map(n=>({effect:n,kind:"possible-noop-effect"})),...f(i).map(n=>({consequence:n,kind:"undecided-action-consequence"})),...t.map(n=>({conflict:n,kind:"fact-conflict"})),...l(i).map(n=>({kind:"unreachable-interaction",violation:n})),...m(i).map(n=>({kind:"redundant-assertion",redundancy:n})),...p(i).map(n=>({kind:"unmodeled-surface",surface:n})),...g(i).map(n=>({content:n,kind:"unpinned-surface-content"})),...u(i).map(n=>({binding:n,kind:"stringified-binding"}))]}function q(i){return`${a.good("ok")} \u2014 no static model violations (${o(i,"test")})`}function E(i){let t=i.some(n=>n.kind==="unmodeled-surface")?[`Elements that hide together are one surface. ${r("create","surfaces")}`]:[];return[`${a.bad("fail")} \u2014 ${o(i.length,"static model violation")}:`,...i.map(n=>S(n)),...t].join(`
|
|
5
|
-
|
|
6
|
-
`)}export{z as a,q as b,E as c};
|
package/dist/chunk-R4ZTRVDQ.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __ripploCreateRequire } from "node:module";
|
|
3
|
-
const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
|
|
4
|
-
import{readFileSync as o}from"fs";import*as r from"zod/mini";var n=r.object({version:r.string()});function s(){let e=o(new URL("../package.json",import.meta.url),"utf8");return n.parse(JSON.parse(e)).version}export{s as a};
|
package/dist/chunk-RIASQHPG.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __ripploCreateRequire } from "node:module";
|
|
3
|
-
const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
|
|
4
|
-
import{i as s,j as a}from"./chunk-C7SV6AR2.js";import d from"fs";import{setTimeout as p}from"timers/promises";import{checkSync as m,lockSync as f}from"proper-lockfile";var y="dev.pid",l=15e3,h=1e4,k=250;function g(n){return u(i(n))}async function b(n){let r=g(n);if(r==null||!c(n))return{kind:"not-running"};try{process.kill(r,"SIGTERM")}catch{return{kind:"not-running"}}let e=Date.now()+h;for(;Date.now()<e;){if(!c(n))return{kind:"stopped",pid:r};await p(k)}return{kind:"timeout",pid:r}}function c(n){try{return m(i(n),{realpath:!1,stale:l})}catch{return!1}}function i(n){return a(n,y)}var o=class extends Error{pid;cwd;constructor({cwd:r,pid:e}){super("dev-lock-held"),this.name="DevLockHeldError",this.pid=e,this.cwd=r}};function E({cwd:n,onCompromised:r}){s(n);let e=i(n),t=w({cwd:n,onCompromised:r,path:e});return d.writeFileSync(e,String(process.pid)),()=>{try{t()}catch{}}}function w({cwd:n,onCompromised:r,path:e}){try{return f(e,{realpath:!1,stale:l,onCompromised:()=>{r()}})}catch(t){throw D(t)?new o({cwd:n,pid:u(e)}):t}}function D(n){if(!(n instanceof Error)||!("code"in n))return!1;let{code:r}=n;return r==="ELOCKED"}function u(n){try{let r=d.readFileSync(n,"utf8").trim(),e=Number.parseInt(r,10);return Number.isFinite(e)&&e>0?e:null}catch{return null}}export{g as a,b,c,i as d,o as e,E as f};
|
package/dist/chunk-RLB66SU3.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __ripploCreateRequire } from "node:module";
|
|
3
|
-
const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
|
|
4
|
-
import{Oa as $,U as M,V as _,qa as z,ra as I,sa as g}from"./chunk-ZSD6QDYB.js";import w from"fs";import s from"path";import{createHash as ve}from"crypto";import{pathToFileURL as Me}from"url";import{build as _e}from"esbuild";import{err as l,ok as F,ResultAsync as ze}from"neverthrow";import b from"fs";import{execFile as se}from"child_process";import{promisify as ae}from"util";import{fileURLToPath as C}from"url";import{z as L}from"zod";var ce=ae(se),le=L.object({diagnostics:L.array(L.string()),ok:L.boolean()});async function H(e){let r=de(),{stdout:n}=await ce(process.execPath,[...r.args,e],{maxBuffer:10*1024*1024}),t=JSON.parse(n);return le.parse(t)}function de(){let e=C(new URL("dsl-typecheck-worker.js",import.meta.url));if(b.existsSync(e))return{args:[e]};let r=C(new URL("../../dist/dsl-typecheck-worker.js",import.meta.url));if(b.existsSync(r))return{args:[r]};let n=C(new URL("../dsl-typecheck-worker.ts",import.meta.url));if(b.existsSync(n))return{args:["--experimental-strip-types",n]};throw new Error("DSL typecheck worker missing")}import ge from"safe-stable-stringify";import{err as he,ok as K,Result as ke}from"neverthrow";import{z as xe}from"zod";import k from"fs";import U from"path";import{z as u}from"zod";import{createHash as ue}from"crypto";function c(e){return ue("sha256").update(e).digest("base64")}var fe="fd5",pe="fold5";function T(){return`${String(g.currentVersion)}:${fe}:${pe}`}function x(e){return c([T(),...e].join("\0"))}function R({cwd:e,key:r,kind:n}){return D(e,n)?.entries.find(([o])=>o===r)?.[1]}function P({cwd:e,keep:r,key:n,kind:t,value:o}){let p=(D(e,t)?.entries??[]).filter(([a])=>a!==n),S=[n,o],v=[...p,S].slice(-r),y=N(e,t),d={entries:v,epoch:T()};k.mkdirSync(U.dirname(y),{recursive:!0}),k.writeFileSync(y,JSON.stringify(d)),h=new Map([...h,[y,{signature:B(y),store:d}]])}var ye=u.object({entries:u.array(u.tuple([u.string(),u.unknown()])),epoch:u.string()}),h=new Map;function D(e,r){let n=N(e,r),t=B(n),o=h.get(n);if(o!=null&&o.signature===t)return o.store;let i=me({signature:t,storePath:n});return h=new Map([...h,[n,{signature:t,store:i}]]),i}function me({signature:e,storePath:r}){if(e!=null)try{let n=ye.safeParse(JSON.parse(k.readFileSync(r,"utf8")));return!n.success||n.data.epoch!==T()?void 0:n.data}catch{return}}function B(e){if(!k.existsSync(e))return;let r=k.statSync(e);return`${String(r.mtimeMs)}:${String(r.size)}`}function N(e,r){return U.join(e,".ripplo",".local","cache",`${r}.json`)}async function J(e,r){let n=await V({cwd:r,workflows:e.workflows});return ke.combine(n).map(t=>({...e,workflows:[...t]}))}var Ee=xe.array(z),X=4;async function V({cwd:e,workflows:r}){if(r.length===0)return[];let n=r.slice(0,X),t=await Promise.all(n.map(i=>we({cwd:e,workflow:i}))),o=await V({cwd:e,workflows:r.slice(X)});return[...t,...o]}async function we({cwd:e,workflow:r}){let n=x(["expand",Se(r)]),t=Ee.safeParse(R({cwd:e,key:n,kind:"expand"}));if(t.success)return K({...r,tests:t.data});try{let o=await $({workflow:r});return P({cwd:e,keep:2e3,key:n,kind:"expand",value:o.tests}),K(o)}catch(o){let i=o instanceof Error?o.message:String(o);return he({kind:"expand-failed",message:i,workflow:r.name})}}function Se(e){let r=ge({...e,tests:[]});if(r==null)throw new Error("solver: workflow is not serializable");return r}import{createHash as Le}from"crypto";import G from"fs/promises";import j from"path";import{err as f,ok as A,Result as Re}from"neverthrow";var Pe=".ripplo/fixtures",Fe=10*1024*1024,be=50*1024*1024;async function Y(e,r){let n=Ce(r);if(n.length===0)return A({});let t=j.join(e,Pe),o=await Promise.all(n.map(i=>Te({fixturesRoot:t,name:i})));return Re.combine(o).andThen(je)}function Ce(e){let n=e.workflows.flatMap(t=>[...t.steps,...t.tests.flatMap(o=>o.steps)]).flatMap(t=>t.action.kind==="upload"?t.action.files:[]);return[...new Set(n)].toSorted((t,o)=>t.localeCompare(o))}async function Te({fixturesRoot:e,name:r}){if(r.includes("..")||j.isAbsolute(r))return f({kind:"fixture-invalid-name",name:r});let n=j.join(e,r),t=await G.lstat(n).catch(()=>null);if(t==null)return f({kind:"fixture-missing",name:r,path:n});if(t.isSymbolicLink())return f({kind:"fixture-symlink",name:r});if(!t.isFile())return f({kind:"fixture-not-file",name:r});let o=await G.readFile(n);if(o.byteLength>Fe)return f({kind:"fixture-too-large",name:r,size:o.byteLength});let i=Le("sha256").update(o).digest("hex");return A([r,{sha256:i,size:o.byteLength}])}function je(e){let r=e.reduce((n,[,t])=>n+t.size,0);return r>be?f({kind:"fixtures-total-too-large",total:r}):A(Object.fromEntries(e))}import Z from"fs";import Ae from"path";import{z as O}from"zod";function q({cwd:e,fingerprint:r}){let n=ee(e);if(n==null||n.fingerprint!==c(r))return;let t=Ae.join(e,".ripplo","ripplo.lock");if(!Z.existsSync(t))return;let o=Z.readFileSync(t,"utf8");if(c(o)===n.lockfileHash)try{let i=_(g,o);return Oe(i)?void 0:i}catch{return}}function Oe(e){return e.workflows.some(({sourcePath:r})=>r?.startsWith(".local/")===!0)}function Q({cwd:e,fingerprint:r,lockfile:n}){re(e,{fingerprint:c(r),lockfileHash:c(M(g,n))})}function jr(e,r){let n=ee(e);n!=null&&re(e,{...n,lockfileHash:c(r)})}var We=O.object({fingerprint:O.string(),lockfileHash:O.string()});function ee(e){let r=We.safeParse(R({cwd:e,key:x(["load"]),kind:"load"}));return r.success?r.data:void 0}function re(e,r){P({cwd:e,keep:1,key:x(["load"]),kind:"load",value:r})}var Br=".ripplo/ripplo.lock",E;async function Nr(e){let{result:r}=await Ie(e);return r}async function Ie(e){let r=te(s.join(e,".ripplo"));if(E!=null&&E.fingerprint===r&&E.result.isOk())return{fingerprint:r,result:E.result};let n=await $e(e);return E={fingerprint:r,result:n},{fingerprint:r,result:n}}async function $e(e){let r=s.join(e,".ripplo"),n=s.join(r,"index.ts"),t=te(r),o=q({cwd:e,fingerprint:t});if(o!=null)return F(o);let i=Xe(n);i.catch(()=>{});let p=await He(r);if(p.isErr())return l(p.error);let S=p.value;if(!S.ok)return l({diagnostics:S.diagnostics,kind:"typecheck-failed"});let d=await(await Je(n,i)).andThen(a=>Ye({entryPath:n,exported:a})).match(async a=>(await Y(e,a)).map(m=>({...a,fixtures:m})).mapErr(m=>({error:m,kind:"fixture-failed"})).asyncAndThen(m=>new ze(J(m,e)).mapErr(ie=>ie)),a=>Promise.resolve(l(a)));return d.isOk()&&Q({cwd:e,fingerprint:t,lockfile:d.value}),d}async function He(e){try{return F(await H(e))}catch(r){return l(ne(r))}}function ne(e){return Ue(e)?{kind:"authoring-error",message:e.message}:{kind:"load-threw",message:Ge(e)}}function Ue(e){return e instanceof Error&&e.name==="RipploAuthoringError"}var De=new Set([".local",".turbo","debug","node_modules","ripplo.lock"]);function te(e){let r=s.join(e,"..","node_modules","@ripplo","testing");return[...W(e),...Ne(s.join(r,"package.json")),...Ke(r)].toSorted((n,t)=>n.localeCompare(t)).join("|")}function W(e){return Be(e).flatMap(r=>{if(De.has(r.name))return[];let n=s.join(e,r.name);if(r.isDirectory())return W(n);let t=oe(n);return t==null?[]:[`${n}:${String(t.mtimeMs)}:${String(t.size)}`]})}function Be(e){try{return w.readdirSync(e,{withFileTypes:!0})}catch{return[]}}function oe(e){try{return w.statSync(e)}catch{return}}function Ne(e){let r=oe(e);return r==null?[]:[`${e}:${String(r.mtimeMs)}:${String(r.size)}`]}function Ke(e){let r=s.join(e,"src");return w.existsSync(r)?W(r):[]}async function Xe(e){let n=(await _e({bundle:!0,entryPoints:[e],format:"esm",logLevel:"silent",platform:"node",sourcemap:"inline",target:"node22",write:!1})).outputFiles[0];if(n==null)throw new Error("dsl bundle produced no output");return n.text}async function Je(e,r){try{let n=await r;process.setSourceMapsEnabled(!0);let t=await import(Ve(e,n)),o=t!=null&&typeof t=="object"&&"default"in t?Reflect.get(t,"default"):t;return F(o)}catch(n){return l(ne(n))}}function Ve(e,r){let n=s.join(s.dirname(e),".local");w.mkdirSync(n,{recursive:!0});let t=ve("sha256").update(r).digest("hex").slice(0,16),o=s.join(n,`dsl-bundle-${t}.mjs`);return w.writeFileSync(o,r),Me(o).href}function Ge(e){return e instanceof Error?e.message:String(e)}function Ye({entryPath:e,exported:r}){if(r==null||typeof r!="object"||!("lockfile"in r))return l({entryPath:e,kind:"not-ripplo"});let n=I.safeParse(Reflect.get(r,"lockfile"));return n.success?F(n.data):l({issues:n.error.issues.map(t=>`${t.path.join(".")}: ${t.message}`),kind:"invalid-lockfile"})}export{c as a,T as b,x as c,R as d,P as e,Pe as f,Fe as g,be as h,jr as i,Br as j,Nr as k,Ie as l,$e as m,te as n};
|
package/dist/chunk-SXVWB7TZ.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __ripploCreateRequire } from "node:module";
|
|
3
|
-
const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
|
|
4
|
-
import{a as p}from"./chunk-JJ4QQPAV.js";import{b as l}from"./chunk-KH4QH23U.js";import{j as c}from"./chunk-C7SV6AR2.js";import{createHash as S}from"crypto";import{mkdirSync as b,readFileSync as v,writeFileSync as A}from"fs";import F from"path";import*as e from"zod/mini";import a from"picomatch";function m(t){return l(["diff","--name-only","HEAD"],t).split(`
|
|
5
|
-
`).filter(n=>n.length>0)}function g({cwd:t,ignoreGlobs:n,watchGlobs:r}){let o=a([...r]),i=a([...n]);return m(t).filter(s=>o(s)&&!i(s))}function z(t){return l(["ls-files","--others","--exclude-standard"],t).split(`
|
|
6
|
-
`).filter(n=>n.length>0)}function d({cwd:t,ignoreGlobs:n,watchGlobs:r}){let o=a([...r]),i=a([...n]);return z(t).filter(s=>o(s)&&!i(s))}var x=e.object({label:e.nullable(e.string()),slug:e.nullable(e.string()),status:e.enum(["intent","stub","implemented"])}),C=e.object({intent:e.string(),name:e.string(),sourcePath:e.nullable(e.string()),stub:e.boolean()}),k=e.object({changedAppFiles:e.readonly(e.array(e.string())),scope:e.object({available:e.boolean(),items:e.readonly(e.array(x))}),tests:e._default(e.readonly(e.array(C)),[]),untrackedAppFiles:e.readonly(e.array(e.string()))});function O({cwd:t,scope:n}){let r=y(t);u(t,{...f(t),scope:n,tests:r?.tests??[]})}function T({cwd:t,tests:n}){let r=y(t);u(t,{...f(t),scope:r?.scope??{available:!1,items:[]},tests:n??r?.tests??[]})}function y(t){let n=k.safeParse(I(h(t)));return n.success?n.data:null}function I(t){try{return JSON.parse(v(t,"utf8"))}catch{return null}}function h(t){return c(t,"coverage-context.json")}function u(t,n){let r=h(t);b(F.dirname(r),{recursive:!0});let o=S("sha256").update(JSON.stringify(n)).digest("hex");A(r,JSON.stringify({...n,inputHash:o},null,2))}function f(t){let{ignorePaths:n,watchPaths:r}=p(),o={cwd:t,ignoreGlobs:n,watchGlobs:r};return{changedAppFiles:g(o),untrackedAppFiles:d(o)}}export{O as a,T as b};
|
package/dist/chunk-T6WA2F3S.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __ripploCreateRequire } from "node:module";
|
|
3
|
-
const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
|
|
4
|
-
import{a as u}from"./chunk-JJ4QQPAV.js";import{c as d}from"./chunk-JS3DLVVI.js";import{b as p}from"./chunk-MHNGR6M7.js";import{a as c}from"./chunk-7WZ3VIUU.js";import{f as a}from"./chunk-KH4QH23U.js";import{e as s}from"./chunk-C7SV6AR2.js";import g from"path";import h from"picomatch";import{graphql as b}from"gql.tada";import*as i from"zod/mini";import{existsSync as S,readdirSync as k}from"fs";import l from"path";function f(e){let o=l.join(e,".ripplo","workflows");return S(o)?m(o,0)>0:!1}function m(e,o){return k(e,{withFileTypes:!0}).reduce((t,r)=>{if(r.isDirectory())return t+m(l.join(e,r.name),o+1);let n=o===0&&r.name==="index.ts";return r.name.endsWith(".ts")&&!n&&r.name!=="givens.ts"?t+1:t},0)}var w=new Set(["Edit","Write","NotebookEdit"]),P=i.looseObject({file_path:i.string()}),y=b(`
|
|
5
|
-
query PreEditScopeGate($projectId: String!, $cwd: String!) {
|
|
6
|
-
project(id: $projectId) {
|
|
7
|
-
id
|
|
8
|
-
devSession(cwd: $cwd) {
|
|
9
|
-
id
|
|
10
|
-
scopeItems {
|
|
11
|
-
id
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
`),N=async e=>{if(!w.has(e.tool_name))return;let o=P.safeParse(e.tool_input);if(!o.success)return;let{cwd:t}=e;if(!j(t))return;let r=g.relative(t,o.data.file_path);if(!v(r))return;let n=await R(t);return n.populated?n.degradedReason!=null?{hookSpecificOutput:{additionalContext:`Scope check skipped (${n.degradedReason}) \u2014 edit allowed through, but the scope guardrail isn't enforcing on this edit.`,hookEventName:"PreToolUse"}}:void 0:{hookSpecificOutput:{hookEventName:"PreToolUse",permissionDecision:"deny",permissionDecisionReason:`Scope is empty but this edit touches app code (${r}). Stub a test or \`npx ripplo scope add <test-id>\` before proceeding. Hook re-fires until scope is populated \u2014 if this change genuinely needs no coverage, pause hooks with \`npx ripplo hooks pause\`. ${p(["run","create"])}`}}};function j(e){return c(e)&&a(e)&&f(e)}function v(e){return e.startsWith("..")||e===".ripplo"||e.startsWith(".ripplo/")?!1:!E(e)&&I(e)}function E(e){let o=e.split(g.sep);return o.includes("test")||o.includes("ripplo")}function I(e){let{ignorePaths:o,watchPaths:t}=u(),r=h([...t]),n=h([...o]);return r(e)&&!n(e)}async function R(e){let o=d(e).unwrapOr(void 0);if(o==null)return{degradedReason:"no project config \u2014 `npx ripplo init` not run here",populated:!0};let t=await s({config:o,document:y,variables:{cwd:o.cwd,projectId:o.projectId}}).catch(()=>null);return t==null?{degradedReason:"server unreachable",populated:!0}:{degradedReason:null,populated:(t.project?.devSession?.scopeItems??[]).length>0}}export{N as a};
|
package/dist/chunk-TZPYILZK.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __ripploCreateRequire } from "node:module";
|
|
3
|
-
const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
|
|
4
|
-
import{a as S,d as u,e as y,f as E,h as w,i as C,k as b,l as g,m as R,n as h,o as v,p as m,q as M,r as N}from"./chunk-JQ2CRYVX.js";import{a as D}from"./chunk-R4ZTRVDQ.js";import{i as P}from"./chunk-C7SV6AR2.js";import{spawn as L}from"child_process";import q from"fs";import V from"net";import{setTimeout as p}from"timers/promises";import{err as d,ok as f}from"neverthrow";import{ResponseError as j}from"vscode-jsonrpc/node";var I=12e4,_=300,x=5e3;async function an({cliEntry:o,cwd:n}){let e=u(n),t=await s(e);return t!=null?A({cliEntry:o,connection:l(t,!1),cwd:n}):T({cliEntry:o,cwd:n,versionNote:void 0})}async function sn({cliEntry:o,cwd:n}){let e=await s(u(n));return e==null?d({kind:"not-running"}):A({cliEntry:o,connection:l(e,!1),cwd:n})}async function T({cliEntry:o,cwd:n,versionNote:e}){let t=H({cliEntry:o,cwd:n});if(t!=null)return d(t);let r=await Q(u(n));return r==null?d({deadlineMs:I,kind:"connect-timeout",logPath:y(n)}):f({...l(r,!0),versionNote:e})}async function A({cliEntry:o,connection:n,cwd:e}){let t=await O(n);if(t==null||t.version===D()&&!G(t))return f(n);let r={daemonVersion:t.version};return await J(n)?(n.socket.destroy(),await B(u(e))?T({cliEntry:o,cwd:e,versionNote:{...r,kind:"restarted"}}):d({kind:"connection-lost"})):f({...n,versionNote:{...r,kind:"stale-busy"}})}var U=1e3;function G(o){let n=S(process.argv[1]);return n==null||o.bundleMtimeMs==null?!1:n>o.bundleMtimeMs+U}async function J(o){try{return await o.rpc.sendRequest(m)}catch{return!1}}var K=1e4;async function B(o){let n=Date.now()+K,e=await s(o);for(;e!=null&&Date.now()<n;)e.destroy(),await p(_),e=await s(o);return e?.destroy(),e==null}async function cn({connection:o,onEvent:n,request:e,token:t}){let r=await F({connection:o,onEvent:n,request:e,token:t});return r.kind==="transport"?d(r.error):f(r)}async function un(o){let n=await s(u(o));if(n==null)return!1;let e=l(n,!1);try{return await e.rpc.sendRequest(m)}catch{return!1}finally{n.destroy()}}async function dn(o){try{await o.rpc.sendRequest(m)}catch{}}async function ln(o){let n=await s(u(o));if(n==null)return{kind:"not-running"};let e=l(n,!1),t=await Promise.race([O(e),p(x).then(()=>null)]);return n.destroy(),t==null?{kind:"unresponsive",timeoutMs:x}:{kind:"running",status:t}}async function O(o){try{let n=await o.rpc.sendRequest(v),e=C.safeParse(n);return e.success?e.data:null}catch{return null}}function F({connection:o,onEvent:n,request:e,token:t}){let{rpc:r}=o;return new Promise(k=>{let i=a=>{k(a)};r.onNotification(M,a=>{let c=b.safeParse(a);if(!c.success){i({error:{kind:"bad-frame"},kind:"transport"});return}n(c.data.event)}),r.onNotification(N,a=>{let c=g.safeParse(a);if(!c.success){i({error:{kind:"bad-frame"},kind:"transport"});return}i({failed:c.data.failed,kind:"done",notRun:c.data.notRun,passed:c.data.passed})}),r.onClose(()=>{i({error:{kind:"connection-lost"},kind:"transport"})}),r.sendRequest(h,e,t).then(a=>{w.safeParse(a).success||i({error:{kind:"bad-frame"},kind:"transport"})}).catch(a=>{i(z(a))})})}function z(o){if(o instanceof j){let n=R.safeParse(o.data);return n.success?{error:n.data,kind:"daemon-error"}:{error:{kind:"bad-frame"},kind:"transport"}}return{error:{kind:"connection-lost"},kind:"transport"}}function l(o,n){let e=E(o);return e.listen(),{rpc:e,socket:o,spawned:n,versionNote:void 0}}function s(o){return new Promise(n=>{let e=V.connect(o);e.once("connect",()=>{n(e)}),e.once("error",()=>{n(null)})})}function H({cliEntry:o,cwd:n}){try{P(n);let e=q.openSync(y(n),"a");return L(process.execPath,[o,"daemon"],{cwd:n,detached:!0,stdio:["ignore",e,e]}).unref(),q.closeSync(e),null}catch(e){return{kind:"spawn-failed",message:e instanceof Error?e.message:String(e)}}}async function Q(o){let n=Date.now()+I,e=await s(o);for(;e==null&&Date.now()<n;)await p(_),e=await s(o);return e}export{an as a,sn as b,cn as c,un as d,dn as e,ln as f};
|
package/dist/chunk-VHFITVRX.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __ripploCreateRequire } from "node:module";
|
|
3
|
-
const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
|
|
4
|
-
import{a as t}from"./chunk-MHNGR6M7.js";import{g as o,h as a,j as i}from"./chunk-RLB66SU3.js";function h(e){return e.kind==="authoring-error"?["Compilation failed",e.message,t("create","DSL authoring rules")].join(`
|
|
5
|
-
|
|
6
|
-
`):[`Compilation failed: ${l(e)}`,t("create","DSL authoring rules")].join(`
|
|
7
|
-
`)}function x(){return`${i} is up to date`}function $(e){return[`${i} is ${e==="missing"?"missing":"out of date"} \u2014 run \`npx ripplo compile\` and commit it`,t("setup")].join(`
|
|
8
|
-
`)}function L(){return`Wrote ${i}`}function l(e){switch(e.kind){case"typecheck-failed":return["TypeScript errors in .ripplo/:",...e.diagnostics].join(`
|
|
9
|
-
`);case"not-ripplo":return`${e.entryPath} must default-export createRipplo({ state, workflows }).`;case"invalid-lockfile":return["Lockfile failed schema validation (stale or hand-edited .ripplo/ripplo.lock):",...e.issues,"Regenerate with `npx ripplo compile`."].join(`
|
|
10
|
-
`);case"load-threw":return u(e.message);case"authoring-error":return e.message;case"fixture-failed":return p(e.error);case"expand-failed":return`Could not resolve tests for workflow "${e.workflow}": ${e.message}`}}var s="state-selection-condition-requires-closed";function u(e){return e===s?["A state condition queries a collection whose full contents are unknown.","Add closed(record) for every collection used by that condition so the solver can prove the result.",`Diagnostic code: ${e}`].join(`
|
|
11
|
-
`):c(e)?["Ripplo rejected the workflow model while loading .ripplo/index.ts.",`${d(e)} Load /ripplo:create for the matching DSL rule.`,`Diagnostic code: ${e}`].join(`
|
|
12
|
-
`):[".ripplo/index.ts could not be loaded:",e].join(`
|
|
13
|
-
`)}function c(e){return/^[a-z][a-z0-9]*(?:-[a-z0-9]+)+$/u.test(e)}function d(e){let r=e.replaceAll("-"," ");return`${r.charAt(0).toUpperCase()}${r.slice(1)}.`}function p(e){switch(e.kind){case"fixture-missing":return`Fixture "${e.name}" not found at ${e.path}.`;case"fixture-invalid-name":return`Invalid fixture name "${e.name}" \u2014 bare name under .ripplo/fixtures/, no .. or absolute paths.`;case"fixture-symlink":return`Fixture "${e.name}" is a symlink \u2014 only regular files allowed.`;case"fixture-not-file":return`Fixture "${e.name}" is not a regular file.`;case"fixture-too-large":return`Fixture "${e.name}" is ${n(e.size)} \u2014 over the ${n(o)} per-file limit.`;case"fixtures-total-too-large":return`Fixtures total ${n(e.total)} \u2014 over the ${n(a)} limit.`}}function n(e){return`${String(Math.round(e/(1024*1024)*10)/10)} MB`}export{h as a,x as b,$ as c,L as d};
|
package/dist/chunk-W3CXPVVB.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __ripploCreateRequire } from "node:module";
|
|
3
|
-
const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
|
|
4
|
-
import{a as p,c as t}from"./chunk-KOKEEAEF.js";import{a as s}from"./chunk-HEOMRXZE.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-44YWEKYS.js").then(o=>o.exitPlanGateHook),"plan-reminder":()=>import("./plan-reminder-EDDIUY43.js").then(o=>t("UserPromptSubmit",o.planReminder)),"post-edit":()=>import("./post-edit-4CM5P2G2.js").then(o=>o.postEditHook),"post-edit-analyze":()=>import("./post-edit-analyze-HKOTNA2H.js").then(o=>t("PostToolUse",o.postEditAnalyze)),"post-edit-flag-stubs":()=>import("./post-edit-flag-stubs-2HZMK4NQ.js").then(o=>t("PostToolUse",o.postEditFlagStubs)),"pre-bash-run-gate":()=>import("./pre-bash-run-gate-CDFNAIK3.js").then(o=>o.preBashRunGateHook),"pre-edit":()=>import("./pre-edit-JZX36QX6.js").then(o=>o.preEditHook),"pre-edit-ripplo-skill-gate":()=>import("./pre-edit-ripplo-skill-gate-A6ETC3QN.js").then(o=>t("PreToolUse",o.preEditRipploSkillGate)),"pre-edit-scope-gate":()=>import("./pre-edit-scope-gate-HNIQ7KOQ.js").then(o=>t("PreToolUse",o.preEditScopeGate)),"pre-edit-watch-gate":()=>import("./pre-edit-watch-gate-T2TWL66C.js").then(o=>t("PreToolUse",o.preEditWatchGate)),"prompt-submit":()=>import("./prompt-submit-GVZHK3CI.js").then(o=>o.promptSubmitHook),"scope-reminder":()=>import("./scope-reminder-A6GVTTVE.js").then(o=>t("UserPromptSubmit",o.scopeReminder)),"session-preamble":()=>import("./session-preamble-IZQPIWST.js").then(o=>o.sessionPreambleHook),"stop-enforce":()=>import("./stop-enforce-NKKP2X4U.js").then(o=>o.stopEnforceHook),"tasks-reminder":()=>import("./tasks-reminder-TDWPD3KV.js").then(o=>t("UserPromptSubmit",o.tasksReminder)),"tasks-reminder-tool":()=>Promise.resolve(t("PostToolUse",()=>{})),"track-skill-load":()=>import("./track-skill-load-SXSDMHFO.js").then(o=>o.trackSkillLoadHook),"track-skill-prompt":()=>import("./track-skill-prompt-7N4TQAD2.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-UYWIDE4L.js");process.stderr.write(`${a(o,r.error)}
|
|
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};
|
package/dist/chunk-WB3HHOCG.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __ripploCreateRequire } from "node:module";
|
|
3
|
-
const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
|
|
4
|
-
import{a as o}from"./chunk-VHFITVRX.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
|
-
`);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
|
-
`);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
|
-
`);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(`
|
|
8
|
-
`);case"gitdir-unrecognized":return`Unrecognized .git file at ${e.marker} \u2014 expected a directory or a "gitdir:" pointer (worktree). Is the repo corrupted?`;case"gitdir-empty":return`Empty gitdir pointer at ${e.marker} \u2014 the worktree's .git file points nowhere. Re-create the worktree.`;case"oauth-device-code-failed":return[`Could not start sign-in (device-code request failed): ${e.description}`,"Is the Ripplo server reachable? Check RIPPLO_SERVER_URL and retry."].join(`
|
|
9
|
-
`);case"oauth-authorization-failed":return[`Sign-in failed (${e.code}): ${e.description}`,e.code==="expired_token"?"The approval window expired \u2014 run `npx ripplo auth login` again.":"Run `npx ripplo auth login` to retry."].join(`
|
|
10
|
-
`);case"compilation-failed":return o(e.error)}}function g(e,i){let n=i instanceof Error?i.message:String(i);return`ripplo hook "${e}" crashed and was skipped \u2014 ${n}`}function s(e){let i=e.missingEnvFiles.length===0?[]:["Declared env files not found:",...e.missingEnvFiles.map(n=>` ${n}`),"In a git worktree? Env files aren't copied from the main checkout \u2014 recreate them, or symlink to a shared file outside the working tree."];return["Env config invalid:",...e.issues.map(n=>` ${n}`),"Add the missing values to the env files declared in .ripplo/project.json.",...i].join(`
|
|
11
|
-
`)}export{u as a,a as b,g as c};
|
package/dist/chunk-XA6BMQTW.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __ripploCreateRequire } from "node:module";
|
|
3
|
-
const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
|
|
4
|
-
import{g as m}from"./chunk-BFAWQ5U2.js";import{a as f,c as k}from"./chunk-QEE4CNMY.js";import{a as h}from"./chunk-OQ6KNYPG.js";import{a as y}from"./chunk-VHFITVRX.js";import{a as s}from"./chunk-MHNGR6M7.js";import{h as d,i as p}from"./chunk-5RKZ44OU.js";import{o as u}from"./chunk-BIB4JJKD.js";import{a as c}from"./chunk-7WZ3VIUU.js";import{f as l}from"./chunk-KH4QH23U.js";import*as a from"zod/mini";var S=a.looseObject({file_path:a.string()}),H=async e=>{let n=S.safeParse(e.tool_input);if(!n.success||!/\/\.ripplo\/.*\.ts$/.test(n.data.file_path))return;let{cwd:o}=e;if(!c(o))return;if(!l(o))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 d(o);if(r.isErr())return{decision:"block",reason:`${y(r.error)}
|
|
5
|
-
${s("create","DSL authoring rules")}`};let t=await b({cwd:o,filePath:n.data.file_path,lockfile:r.value});if("block"in t)return{decision:"block",reason:t.block};let{addedSlugs:i}=await m({cwd:o,editedPath:n.data.file_path,lockfile:r.value,requireHooks:!0,syncFirst:!0});return z(P({addedSlugs:i,elsewhere:t.elsewhere}))};function P({addedSlugs:e,elsewhere:n}){return[...e.length>0?[`Auto-scoped ${e.join(", ")} (dirty tests).`]:[],...n>0?[g(n).trimStart()]:[]]}async function b({cwd:e,filePath:n,lockfile:o}){let r=f({cwd:e,lockfile:o});await p(e,o);let t=A(r,o,n),i=r.length-t.length;return t.length===0?{elsewhere:i}:{block:`${k(t)}${g(i)}
|
|
6
|
-
${s("create")}`}}function A(e,n,o){let r=new Set(u(n).filter(({workflow:t})=>t.sourcePath!=null&&o.endsWith(t.sourcePath)).map(({ref:t})=>t));return r.size===0?e:e.filter(t=>{let i=w(t);return i==null||r.has(i)})}function w(e){return e.kind==="unreachable-interaction"?e.violation.test:e.kind==="redundant-assertion"?e.redundancy.test:e.kind==="undecided-action-consequence"?e.consequence.test:null}function g(e){return e===0?"":`
|
|
7
|
-
${h(e,"finding")} in other files \u2014 \`npx ripplo compile\` for the full list.`}function z(e){if(e.length!==0)return{hookSpecificOutput:{additionalContext:e.join(`
|
|
8
|
-
`),hookEventName:"PostToolUse"}}}export{H as a};
|
package/dist/chunk-XAMVRZJH.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
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 l,c as m}from"./chunk-BGY5F3IU.js";import{c as p}from"./chunk-47LLHHJH.js";import{c as u}from"./chunk-JS3DLVVI.js";import{a as d}from"./chunk-7WZ3VIUU.js";import{f as i}from"./chunk-KH4QH23U.js";import{e as a}from"./chunk-C7SV6AR2.js";import{createHash as g}from"crypto";import{graphql as k}from"gql.tada";var c="tasks-reminder",y=k(`
|
|
5
|
-
query TasksReminder($projectId: String!, $cwd: String!) {
|
|
6
|
-
project(id: $projectId) {
|
|
7
|
-
id
|
|
8
|
-
devSession(cwd: $cwd) {
|
|
9
|
-
id
|
|
10
|
-
tasks(status: open) {
|
|
11
|
-
id
|
|
12
|
-
kind
|
|
13
|
-
status
|
|
14
|
-
title
|
|
15
|
-
updatedAt
|
|
16
|
-
messages {
|
|
17
|
-
body
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
`),q=async r=>{let t=await h(r.cwd);if(t!=null)return{hookSpecificOutput:{additionalContext:t,hookEventName:"UserPromptSubmit"}}};async function h(r){if(!d(r)||!i(r))return null;let t=u(r).unwrapOr(void 0);if(t==null)return null;let e=await a({config:t,document:y,variables:{cwd:t.cwd,projectId:t.projectId}}).catch(()=>null);if(e==null)return null;let n=e.project?.devSession?.tasks??[],o=S(n);if(l(r,c)===o||(m(r,c,o),n.length===0))return null;let f=n.map(s=>({id:s.id,kind:s.kind,lastMessage:s.messages?.[0]?.body??null,status:s.status,title:s.title}));return p(f)}function S(r){let t=g("sha256");return r.map(e=>`${e.id}:${String(e.updatedAt)}`).toSorted((e,n)=>e.localeCompare(n)).forEach(e=>{t.update(e),t.update("\0")}),t.digest("hex")}export{q as a};
|
package/dist/chunk-Y52M43LO.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __ripploCreateRequire } from "node:module";
|
|
3
|
-
const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
|
|
4
|
-
import{h as u}from"./chunk-Q2TF5WLS.js";import{f as a}from"./chunk-TZPYILZK.js";import{a as i}from"./chunk-VHFITVRX.js";import{l as n}from"./chunk-5RKZ44OU.js";import{m as e}from"./chunk-RLB66SU3.js";async function x(m){let o=process.cwd(),r=await e(o);r.isErr()&&(process.stderr.write(`${i(r.error)}
|
|
5
|
-
`),process.exit(1));let s=n(r.value),t=await a(o);if(m.format==="summary"){s.length>0&&process.stdout.write(`stub workflows: ${s.join(", ")}
|
|
6
|
-
`),process.stdout.write(`${u(t)}
|
|
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)}
|
|
8
|
-
`)}export{x as a};
|
package/dist/chunk-YD4VBOBY.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
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 u}from"./chunk-SXVWB7TZ.js";import{a as f}from"./chunk-JJ4QQPAV.js";import{l as c}from"./chunk-5RKZ44OU.js";import{m as p}from"./chunk-RLB66SU3.js";import{a as m}from"./chunk-7WZ3VIUU.js";import{f as l}from"./chunk-KH4QH23U.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)||!l(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 p(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=c(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};
|
package/dist/chunk-YRU6BOIP.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __ripploCreateRequire } from "node:module";
|
|
3
|
-
const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
|
|
4
|
-
import{a as g}from"./chunk-OQ6KNYPG.js";import{c as d}from"./chunk-JS3DLVVI.js";import{c as u}from"./chunk-FEHVIHVA.js";import{a}from"./chunk-MHNGR6M7.js";import{f as t,k as c}from"./chunk-BIB4JJKD.js";import{Ma as l}from"./chunk-ZSD6QDYB.js";var f=3e3;async function U(e){u(e);let r=d(e).unwrapOr(void 0);if(r==null)return null;try{return await fetch(`${r.ripploServerUrl}/health`,{signal:AbortSignal.timeout(f)}),null}catch(n){return{detail:n instanceof Error?n.message:String(n),serverUrl:r.ripploServerUrl}}}function p(e){return e.includes("localhost")||e.includes("127.0.0.1")}import C from"fuse.js";function m(e){let r=h(e.activity),n=E(e);return n.length===0?r:`${r} \u2014 ${n}`}function h(e){switch(e.kind){case"waitingForRunner":return $(e);case"settingUpState":{let r=e.activeSources.length===0?"":` from ${e.activeSources.join(", ")}`;return`${S(e.stage)}${r}`}case"signingIn":return"Signing in the test user";case"startingBrowser":return"Starting the test browser";case"executingStep":return`${`Step ${String(e.stepIndex+1)} of ${String(e.stepCount)}`}: ${y(e.stage)}`;case"finishing":return e.stage==="cleaningUp"?"Cleaning up the test state":"Saving the run result";case"uploadingReplay":return"Uploading the replay"}}function $(e){let r=e.capacity==null?"":` (${String(e.capacity.active)} of ${String(e.capacity.limit)} runners active)`;switch(e.reason){case"cloudCapacity":return`Waiting for cloud capacity${r}`;case"runnerStarting":return"Starting a test runner";case"localRunnerBusy":return"Waiting for an available local runner"}}function S(e){switch(e){case"clearing":return"Clearing existing test state";case"materializing":return"Creating the starting state";case"verifying":return"Verifying the starting state"}}function y(e){switch(e.kind){case"performingAction":return k(e.action);case"waitingForApp":return`Waiting for the app at ${e.path}`;case"readingState":return"Reading application state";case"verifyingEffects":return"Verifying the declared state changes";case"checkingExpectations":return w(e.remaining)}}function k(e){switch(e.kind){case"goto":return`Opening ${e.path}`;case"fill":return`Filling ${e.target}`;case"clear":return`Clearing ${e.target}`;case"click":return`Clicking ${e.target}`;case"dblclick":return`Double-clicking ${e.target}`;case"select":return`Selecting an option in ${e.target}`;case"check":return`Checking ${e.target}`;case"uncheck":return`Unchecking ${e.target}`;case"hover":return`Hovering over ${e.target}`;case"upload":return`Uploading a file through ${e.target}`;case"press":return e.target==null?`Pressing ${e.key}`:`Pressing ${e.key} in ${e.target}`;case"drag":return`Dragging ${e.source} to ${e.target}`;case"actor":return"Switching the signed-in user"}}function w(e){if(e.length===0)return"All expectations passed";let r=e.map(n=>R(n)).join("; ");return`Checking ${String(e.length)} ${e.length===1?"expectation":"expectations"}: ${r}`}function R(e){let r=e.negated?"not ":"";return e.kind==="browser"?`${r}${e.subject}`:`${r}${e.check} ${e.target}`}function E(e){let r=b(e.retry);return[e.deadlineAt==null?null:`${String(Math.max(0,Math.ceil((Date.parse(e.deadlineAt)-Date.now())/1e3)))}s until timeout`,r].filter(i=>i!=null).join(", ")}function b(e){return e==null?null:e.limit==null?`attempt ${String(e.attempt)}`:`attempt ${String(e.attempt)} of ${String(e.limit)}`}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 r=e.known,n=e.unknown.flatMap(o=>I(o,r)),i=n.length>0?[`Did you mean: ${[...new Set(n)].join(", ")}`]:[];return[`Unknown ${e.unknown.length===1?"id":"ids"}: ${e.unknown.join(", ")}`,...i,"Pass a workflow slug for all its tests, or workflow/test for one. Known workflows:",...r.map(o=>` ${o}`)].join(`
|
|
5
|
-
`)}}}function W({failed:e,notRun:r,passed:n}){let i=r>0?`, ${String(r)} not run`:"";return`${String(n)} passed, ${String(e)} failed${i} (${String(n+e+r)} total)`}function X({debugDir:e,event:r}){let n=`${r.workflowName} \u2192 ${r.testName}`;if(r.kind==="run-progress")return`${t.dim("progress")} ${n} \u2014 ${m(r.signal)}`;if(r.kind==="test-started")return`${t.dim("run ")} ${n}`;switch(r.outcome.kind){case"pass":return`${t.good("pass")} ${n} ${t.dim(r.runId)}`;case"findings":return[`${t.bad("fail")} ${n} \u2014 ${g(r.outcome.findingLines.length,"finding")}`,...r.outcome.findingLines,c({debugDir:e,runId:r.runId}),`${t.dim("why")} npx ripplo explain ${r.runId}`].join(`
|
|
6
|
-
`);case"error":return`${t.bad("error")} ${n} \u2014 ${P(r.outcome.detail)} ${t.dim(r.runId)}`;case"dispatch-error":return`${t.bad("error")} ${n} \u2014 ${v(r.outcome.reason)}`;case"dispatch-timeout":return`${t.bad("error")} ${n} \u2014 not run: dispatch timed out (transient): ${r.outcome.detail}`;case"infra-error":return`${t.bad("error")} ${n} \u2014 not run: Ripplo server unreachable: ${r.outcome.detail}`}}var x={CLOUD_EXECUTOR:"cloud runs are not included on your plan \u2014 upgrade to run in the cloud",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",MEMBER_CEILING:"member ceiling reached for the target plan \u2014 remove members or pick a bigger plan",OVERAGE_CAP:"overage cap reached \u2014 raise the cap or upgrade",REVIEW_QUOTA:"review quota reached for your plan \u2014 set an overage cap or upgrade"};function J({detail:e,serverUrl:r}){return p(r)?`Ripplo server at ${r} not running (${e}). Start the dev server with \`pnpm dev\`.`:`Ripplo server at ${r} unreachable (${e}) \u2014 server-side, not your local environment.`}function V(e){switch(e.code){case"compile-failed":{let r=e.diagnostics.length===0?[]:["",...e.diagnostics];return[`Compilation failed in the daemon (${e.detail}). Run \`npx ripplo compile\` for full output.`,...r].join(`
|
|
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}
|
|
8
|
-
Check the dev session is live (\`npx ripplo doctor\`, ${a("start")}), or pass test ids / --all.`;case"sync-failed":{let r=/401|unauthor/i.test(e.detail)?"\nAuth failure \u2014 run `npx ripplo auth login`.":"";return`Sync to the Ripplo server failed: ${e.detail}${r}`}case"bad-message":return"Daemon rejected the request \u2014 protocol mismatch, rebuild the CLI and restart the daemon."}}function B(e){switch(e.kind){case"spawn-failed":return`Failed to start \`npx ripplo daemon\`: ${A(e.message)}`;case"connect-timeout":return[`Daemon did not come up within ${String(Math.round(e.deadlineMs/1e3))}s.`,`Check ${e.logPath} for startup errors.`,"Common causes: a stale daemon (`npx ripplo daemon stop`, then start it again), another daemon holding the dev lock, or the Ripplo server unreachable."].join(`
|
|
9
|
-
`);case"connection-lost":return"Lost the daemon connection mid-run \u2014 it crashed or was killed. Check .ripplo/.local/daemon.log, restart `npx ripplo daemon`.";case"not-running":return"No ripplo daemon running for this directory. Start it with `npx ripplo daemon` as a background process, separate from your app's dev server.";case"bad-frame":return"Malformed frame from the daemon \u2014 version mismatch, rebuild the CLI and restart the daemon."}}function A(e){return e.includes("ENOENT")?`${e} \u2014 node or the CLI entry not found on PATH.`:e.includes("EACCES")?`${e} \u2014 permission denied executing the CLI entry.`:e}function P(e){return e==="worker-exit"?"run worker exited before reporting \u2014 usually a stale build. Run `pnpm build`, then `npx ripplo daemon stop` and start it again, then rerun.":e}function v(e){return e.type==="limit"?x[e.code]:`failed to dispatch (${e.detail})`}function I(e,r){return new C(r,{includeScore:!0,threshold:.5}).search(l(e)).slice(0,3).map(i=>i.item)}export{U as a,p as b,m as c,W as d,X as e,J as f,V as g,B as h};
|