ripplo 0.7.54 → 0.7.55

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.
@@ -0,0 +1,274 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __ripploCreateRequire } from "node:module";
3
+ const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
4
+ import{c as on}from"./chunk-ZPCVY23H.js";import{A as ln,E as dn,F as cn,G as un,H as pn,I as fn,a as C,b as F,c as He,d as We,e as Ve,f as $,g as Be,i as M,w as an,x as sn}from"./chunk-3JC4ZODN.js";import{b as Ue,e as u,f as p,i as Le,j as Ne}from"./chunk-PXYDLKAG.js";import{N as ze,O as Ge,P as w,Q as Ye,S as Xe,U as Ze,a as A,b as I,c as qe,da as en,ea as nn,ha as rn,ia as tn,j as _e,k as j,l as g,q as Ke,r as ae,s as h,t as P,u as Je,v as Qe,x as D}from"./chunk-OUOQU2Q2.js";import mn from"fs";import q from"path";import{config as wr}from"dotenv";import{z as L}from"zod";import{err as vr,ok as Rn}from"neverthrow";import U from"fs";import de from"path";import{err as se,ok as yn}from"neverthrow";import{z as O}from"zod";var Rr=de.join(".ripplo","project.json"),le=[".env",".env.local"],hr=O.object({envFiles:O.array(O.string().min(1)).optional(),projectId:O.string().min(1)});function gn(e){return de.join(e,Rr)}function ce(e){let n=gn(e);return U.existsSync(n)?kr(n).andThen(r=>{let t=hr.safeParse(r);return t.success?yn({envFiles:t.data.envFiles??le,projectId:t.data.projectId}):se({issues:t.error.issues.map(o=>`${o.path.join(".")}: ${o.message}`),kind:"project-file-invalid",path:n})}):se({kind:"project-file-missing",path:n})}function ue(e){return ce(e).match(n=>n,()=>{})}function kr(e){try{return yn(JSON.parse(U.readFileSync(e,"utf8")))}catch(n){return se({issues:[n instanceof Error?n.message:String(n)],kind:"project-file-invalid",path:e})}}function gi({cwd:e,envFiles:n,projectId:r}){let t=gn(e);U.mkdirSync(de.dirname(t),{recursive:!0});let o={projectId:r};n!=null&&!Sr(n)&&(o.envFiles=[...n]),U.writeFileSync(t,JSON.stringify(o,null,2)+`
5
+ `)}function Sr(e){return e.length!==le.length?!1:e.every((n,r)=>n===le[r])}function xi(e){let r=ue(e)?.envFiles??[".env",".env.local"],t=q.join(e,".ripplo");r.forEach(o=>{let i=q.resolve(t,o);mn.existsSync(i)&&wr({override:!0,path:i,quiet:!0})}),N=void 0}var xr=L.object({RIPPLO_APP_URL:L.url(),RIPPLO_ENGINE_URL:L.url(),RIPPLO_WEBHOOK_SECRET:L.string().min(1)}),N;function _(){return N!=null?Rn(N):br().map(e=>(N=e,e))}function Er(e){let r=ue(e)?.envFiles??[],t=q.join(e,".ripplo");return r.map(o=>q.resolve(t,o)).filter(o=>!mn.existsSync(o))}function br(){let e=xr.safeParse(process.env);if(!e.success)return vr({issues:e.error.issues.map(r=>`${r.path.join(".")}: ${r.message}`),kind:"env-invalid",missingEnvFiles:Er(process.cwd())});let n=e.data;return Rn({appUrl:n.RIPPLO_APP_URL,engineUrl:n.RIPPLO_ENGINE_URL,webhookSecret:n.RIPPLO_WEBHOOK_SECRET})}var H=class extends Error{failure;constructor(n){super(n.kind),this.name="CliError",this.failure=n}};function Ci(e){return e instanceof H?pe(e.failure):e instanceof Error?e.message:String(e)}function pe(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).",Be("setup")].join(`
6
+ `);case"project-file-invalid":return[`${e.path} is invalid:`,...e.issues.map(n=>` ${n}`),"Fix the file by hand or re-run `npx ripplo init`."].join(`
7
+ `);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(`
8
+ `);case"env-invalid":return Ir(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(`
9
+ `);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(`
10
+ `);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(`
11
+ `);case"compilation-failed":return M(e.error)}}function Ir(e){let n=e.missingEnvFiles.length===0?[]:["Declared env files not found:",...e.missingEnvFiles.map(r=>` ${r}`),"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(r=>` ${r}`),"Add the missing values to the env files declared in .ripplo/project.json.",...n].join(`
12
+ `)}import{err as Cr,ok as Ar}from"neverthrow";import{z as fe}from"zod";var Pr="https://ripplo.ai";function kn(){return wn().RIPPLO_SERVER_URL}function Sn(){return wn().RIPPLO_PROJECT_ID}var Tr=fe.object({RIPPLO_PROJECT_ID:fe.string().min(1).optional(),RIPPLO_SERVER_URL:fe.string().min(1).default(Pr)}),hn;function wn(){return hn??=Tr.parse(process.env),hn}import vn from"fs";import ye from"path";function xn(e){let n=vn.realpathSync(e),r=n,t=ye.dirname(r);for(;t!==r;){if(vn.existsSync(ye.join(r,".git")))return r;r=t,t=ye.dirname(r)}return n}function W(e){return ce(e).andThen(n=>_().andThen(r=>{let t=kn(),o=Ne(t);return o==null?Cr({kind:"not-authenticated"}):Ar({appUrl:r.appUrl,cwd:xn(e),engineUrl:r.engineUrl,projectId:Sn()??n.projectId,ripploServerUrl:t,token:o,webhookSecret:r.webhookSecret})}))}import jr from"p-queue";var Fr=4,$r={"p0-ui":3,"p1-cli":2,"p2-cover":1,"p3-explore":0},V=new jr({concurrency:Fr}),k={headedActive:0,interactiveActive:0,interactiveQueued:0},En={current:null};function Vi({headed:e,task:n,workClass:r}){let t=$r[r];return r==="p3-explore"?V.add(n,{priority:t}):(k.interactiveQueued+=1,B(),V.add(()=>Mr({headed:e,task:n}),{priority:t}))}function Bi(e){!Number.isFinite(e)||e<1||(V.concurrency=Math.floor(e),B())}function ge(){return{active:k.interactiveActive,headedActive:k.headedActive,poolSize:V.concurrency,queued:k.interactiveQueued}}function Ki(e){En.current=e}async function Mr({headed:e,task:n}){k.interactiveQueued-=1,k.interactiveActive+=1,k.headedActive+=e?1:0,B();try{return await n()}finally{k.interactiveActive-=1,k.headedActive-=e?1:0,B()}}function B(){En.current?.()}import me from"fs";import Re from"path";function bn(e){try{let n=Dr(e);if(n==null)return;let r=Re.join(n,"HEAD"),t=me.readFileSync(r,"utf8").trim(),o="ref: refs/heads/";return t.startsWith(o)?t.slice(o.length):t.length===0?void 0:t.slice(0,7)}catch{return}}function Dr(e){let n=Re.join(e,".git");if(me.statSync(n).isDirectory())return n;let t=me.readFileSync(n,"utf8").trim(),o="gitdir:";if(!t.startsWith(o))return;let i=t.slice(o.length).trim();if(i.length!==0)return Re.resolve(e,i)}import Or from"crypto";import{readFile as In}from"fs/promises";import Pn from"path";import{graphql as he}from"gql.tada";import{err as Ur,ok as Lr}from"neverthrow";var Nr=he(`
13
+ mutation SyncDevSession(
14
+ $projectId: String!
15
+ $cwd: String!
16
+ $branch: String
17
+ $lockfileContent: String
18
+ $fixtures: [SyncDevFixtureInput!]
19
+ $preconditions: [SyncDevPreconditionInput!]!
20
+ $singletons: [SyncDevSingletonInput!]
21
+ $workflows: [SyncDevWorkflowInput!]!
22
+ ) {
23
+ syncDevSession(
24
+ projectId: $projectId
25
+ cwd: $cwd
26
+ branch: $branch
27
+ lockfileContent: $lockfileContent
28
+ fixtures: $fixtures
29
+ preconditions: $preconditions
30
+ singletons: $singletons
31
+ workflows: $workflows
32
+ ) {
33
+ id
34
+ hooksPaused
35
+ }
36
+ }
37
+ `);async function sa(e,n){let r=await $(e);if(r.isErr())return Ur({error:r.error,kind:"compilation-failed"});let t=await v({config:n,cwd:e,lockfile:r.value});return Lr({devSessionId:t.devSessionId,lockfile:r.value})}async function v(e){let n=_e(e.lockfile);return Hr({config:e.config,cwd:e.cwd,fixtures:e.lockfile.fixtures,payload:n})}var qr=he(`
38
+ query DevSessionSyncState($projectId: String!, $cwd: String!) {
39
+ project(id: $projectId) {
40
+ devSession(cwd: $cwd) {
41
+ id
42
+ hooksPaused
43
+ lockfileHash
44
+ }
45
+ }
46
+ }
47
+ `),_r=he(`
48
+ mutation AnnounceDevSessionActive($projectId: String!, $cwd: String!) {
49
+ announceDevSessionActive(projectId: $projectId, cwd: $cwd)
50
+ }
51
+ `);async function la(e){let n=await ke(e.cwd);if(n!=null){let t=(await u({config:e.config,document:qr,variables:{cwd:e.cwd,projectId:e.config.projectId}}).catch(()=>null))?.project?.devSession;if(t!=null&&t.lockfileHash===n)return await u({config:e.config,document:_r,variables:{cwd:e.cwd,projectId:e.config.projectId}}).catch(()=>null),{devSessionId:t.id,hooksPaused:t.hooksPaused}}return v(e)}async function ke(e){let n=await Tn(e);return n==null?null:Or.createHash("sha256").update(n).digest("hex")}async function Hr({config:e,cwd:n,fixtures:r,payload:t}){let o=bn(n),i=await Tn(n),l=await Wr(n,r),a=await u({config:e,document:Nr,variables:{branch:o??null,cwd:n,fixtures:l,lockfileContent:i,preconditions:t.preconditions.map(s=>({depends:[...s.depends],description:s.description,name:s.name,returns:[...s.returns]})),projectId:e.projectId,singletons:t.singletons.map(s=>({defaultValue:s.defaultValue,description:s.description,name:s.name,type:s.type})),workflows:t.workflows.map(s=>({expectedOutcome:s.expectedOutcome,name:s.name,preconditions:[...s.preconditions],requiresKeys:s.requiresKeys.map(c=>({namespace:c.namespace,preconditionName:c.preconditionName})),slug:s.slug,sourcePath:s.sourcePath,spec:JSON.stringify(s.spec)}))}});if(a.syncDevSession==null)throw new Error("syncDevSession returned null");return{devSessionId:a.syncDevSession.id,hooksPaused:a.syncDevSession.hooksPaused}}async function Wr(e,n){let r=Object.entries(n);return Promise.all(r.map(async([t,o])=>({contentBase64:(await In(Pn.join(e,F,t))).toString("base64"),sha256:o.sha256})))}async function Tn(e){try{return await In(Pn.join(e,He),"utf8")}catch{return null}}import{randomUUID as ht}from"crypto";import{createId as kt}from"@paralleldrive/cuid2";import{CancellationTokenSource as St,ResponseError as wt}from"vscode-jsonrpc/node";import{graphql as Vr}from"gql.tada";var Br=Vr(`
52
+ mutation DaemonCreateRun(
53
+ $id: String
54
+ $workflowId: String!
55
+ $testId: String
56
+ $clientVersion: String
57
+ $executor: RunExecutor
58
+ $target: RunTarget
59
+ $lockfileHash: String
60
+ ) {
61
+ createRun(
62
+ id: $id
63
+ workflowId: $workflowId
64
+ testId: $testId
65
+ executor: $executor
66
+ target: $target
67
+ clientVersion: $clientVersion
68
+ lockfileHash: $lockfileHash
69
+ ) {
70
+ __typename
71
+ ... on MutationCreateRunSuccess {
72
+ data {
73
+ id
74
+ }
75
+ }
76
+ ... on LimitExceededError {
77
+ code
78
+ }
79
+ }
80
+ }
81
+ `);async function Cn(e){try{let r=(await u({config:e.config,document:Br,variables:Kr(e)})).createRun;return r==null?K({detail:"create-run-null",type:"generic"}):r.__typename==="MutationCreateRunSuccess"?null:r.__typename==="LimitExceededError"?K({code:r.code,type:"limit"}):K({detail:r.__typename,type:"generic"})}catch(n){return Jr(n)}}function Kr({executor:e,lockfileHash:n,runId:r,target:t}){return{clientVersion:C(),executor:e,id:r,lockfileHash:n,target:e==="cloud"?"tunnel":void 0,testId:t.testId,workflowId:t.workflowId}}function K(e){return{kind:"dispatch-error",reason:e}}function Jr(e){return e instanceof Ue?{detail:e.message,kind:"infra-error"}:K({detail:e instanceof Error?e.message:String(e),type:"generic"})}import{graphql as Qr}from"gql.tada";async function An(e,n){let t=(await u({config:e,document:zr,variables:{cwd:n,projectId:e.projectId}})).project?.devSession?.workflows??[];return new Map(t.flatMap(o=>o.tests.map(i=>[`${o.slug}/${i.slug}`,{testId:i.id,workflowId:o.id}])))}var zr=Qr(`
82
+ query DaemonWorkflows($projectId: String!, $cwd: String!) {
83
+ project(id: $projectId) {
84
+ id
85
+ devSession(cwd: $cwd) {
86
+ id
87
+ workflows {
88
+ id
89
+ slug
90
+ tests {
91
+ id
92
+ slug
93
+ }
94
+ }
95
+ }
96
+ }
97
+ }
98
+ `);import{CancellationTokenSource as Gr}from"vscode-jsonrpc/node";function Se(e){return`${e.workflowSlug}/${e.testSlug}`}function jn(e){let{headed:n,inflight:r,jobId:t,lockfileHashValue:o,onExpire:i,runId:l,selection:a,timeoutMs:s}=e,c=Se(a),d=`${c}@${o}@${String(n)}`,f=r.get(d);if(f!=null)return f.jobIds.add(t),null;let y={cancellation:new Gr,claimed:!1,claimKey:c,headed:n,inflightKey:d,jobIds:new Set([t]),runId:l,testName:a.testName,timer:null,workflowName:a.workflowName};return y.timer=setTimeout(()=>{J(r,y),i(y)},s),r.set(d,y),y}function J(e,n){n.timer!=null&&(clearTimeout(n.timer),n.timer=null),e.delete(n.inflightKey)}function we(e,n){let r=[...e.values()].find(t=>t.runId===n&&!t.claimed);return r==null?null:(r.claimed=!0,r.timer!=null&&(clearTimeout(r.timer),r.timer=null),r)}function Fn(e,n){[...e.values()].filter(r=>r.jobIds.has(n)).forEach(r=>{r.jobIds.delete(n),r.jobIds.size===0&&(J(e,r),r.cancellation.cancel())})}import{err as ve,ok as $n}from"neverthrow";function Dn({all:e,ids:n,lockfile:r}){if(e&&n.length>0)return ve({kind:"conflicting-flags"});if(e)return $n(r.workflows.filter(i=>!i.stub).flatMap(i=>i.tests.map(l=>h(l))));if(n.length===0)return ve({kind:"nothing-selected"});let t=n.map(i=>({id:i,refs:Xr(r,i)})),o=t.filter(i=>i.refs.length===0).map(i=>i.id);return o.length>0?ve({kind:"unknown-ids",known:Yr(r),unknown:o}):$n([...new Set(t.flatMap(i=>i.refs))])}function On(e,n){let r=new Map(P(e).map(t=>[t.ref,{testName:t.test.name,testSlug:t.test.slug,workflowName:t.workflow.name,workflowSlug:g(t.workflow.name)}]));return n.map(t=>{let o=r.get(t);if(o==null)throw new Error(`selectionsFor: ref not in lockfile: ${t}`);return o})}function Yr(e){return e.workflows.map(n=>g(n.name))}function Xr(e,n){let r=e.workflows.find(t=>t.name===n||g(t.name)===g(n));return r!=null?r.tests.map(t=>h(t)):P(e).filter(t=>t.ref===n||Mn(t.ref)===Mn(n)).map(t=>t.ref)}function Mn(e){let n=e.lastIndexOf("/");return n===-1?g(e):`${g(e.slice(0,n))}/${g(e.slice(n+1))}`}import{err as be,ok as _n}from"neverthrow";import{graphql as Hn}from"gql.tada";import{graphql as at}from"gql.tada";import{execFileSync as Zr}from"child_process";var et=256*1024*1024;function Q(e,n){return Zr("git",[...e],{cwd:n,encoding:"utf8",maxBuffer:et,stdio:["ignore","pipe","pipe"]})}import ot from"fs";import nt from"fs";import xe from"path";var rt=["MERGE_HEAD","rebase-merge","rebase-apply","CHERRY_PICK_HEAD","REVERT_HEAD"];function Un(e){let n=tt(e);return n==null?!1:rt.some(r=>nt.existsSync(xe.join(n,r)))}function tt(e){try{let n=Q(["rev-parse","--git-dir"],e).trim();return n.length===0?null:xe.isAbsolute(n)?n:xe.resolve(e,n)}catch{return null}}function it(e){return Le(e,"hooks-paused")}function Ln(e){return ot.existsSync(it(e))||Un(e)?!1:on(e)}var st=at(`
99
+ mutation AutoScopeAddDirty($projectId: String!, $cwd: String!, $workflowSlugs: [String!]!) {
100
+ addDirtyTestsToScope(projectId: $projectId, cwd: $cwd, workflowSlugs: $workflowSlugs) {
101
+ __typename
102
+ ... on MutationAddDirtyTestsToScopeSuccess {
103
+ data {
104
+ id
105
+ }
106
+ }
107
+ }
108
+ }
109
+ `);async function _a({cwd:e,lockfile:n}){if(!Ln(e))return{addedSlugs:[]};let r=Ee(e);if(r.length===0)return{addedSlugs:[]};let t=new Set(r),o=n.workflows.filter(s=>s.sourcePath!=null&&t.has(s.sourcePath)).map(s=>g(s.name));if(o.length===0)return{addedSlugs:[]};let i=W(e).unwrapOr(void 0);return i==null?{addedSlugs:[]}:await v({config:i,cwd:e,lockfile:n}).catch(s=>(p.warn("auto-sync failed: %s",s instanceof Error?s.message:String(s)),null))==null?{addedSlugs:[]}:{addedSlugs:await lt({cfg:i,slugs:o})?o:[]}}async function lt({cfg:e,slugs:n}){let t=(await u({config:e,document:st,variables:{cwd:e.cwd,projectId:e.projectId,workflowSlugs:[...n]}}).catch(o=>(p.warn("auto-scope failed: %s",o instanceof Error?o.message:String(o)),null)))?.addDirtyTestsToScope;return t?.__typename!=="MutationAddDirtyTestsToScopeSuccess"?!1:t.data.length>0}var Nn=".ripplo/workflows/",qn=" -> ";function Ee(e){let n;try{n=Q(["status","--porcelain","-uall","--",".ripplo/workflows"],e)}catch{return[]}return n.split(`
110
+ `).map(r=>r.slice(3).trim()).map(r=>r.includes(qn)?r.split(qn)[1]:r).filter(r=>r!=null).filter(r=>r.startsWith(Nn)&&r.endsWith(".ts")).map(r=>r.slice(Nn.length)).filter(r=>r!=="index.ts"&&!r.endsWith("/index.ts"))}async function Wn({config:e,cwd:n,lockfile:r}){await ct({config:e,cwd:n,lockfile:r});let t=await pt(e);if(t.isErr())return be(t.error);let o=new Map(r.workflows.filter(l=>!l.stub).map(l=>[g(l.name),l])),i=[...new Set(t.value)].flatMap(l=>{let a=o.get(l);return a==null?[]:a.tests.map(s=>h(s))});return i.length===0?be({kind:"scope-empty"}):_n(i)}var dt=Hn(`
111
+ mutation AddDirtyTestsToScope($projectId: String!, $cwd: String!, $workflowSlugs: [String!]!) {
112
+ addDirtyTestsToScope(projectId: $projectId, cwd: $cwd, workflowSlugs: $workflowSlugs) {
113
+ __typename
114
+ }
115
+ }
116
+ `);async function ct({config:e,cwd:n,lockfile:r}){let t=new Set(Ee(n)),o=r.workflows.filter(i=>i.sourcePath!=null&&t.has(i.sourcePath)).map(i=>g(i.name));o.length!==0&&await u({config:e,document:dt,variables:{cwd:e.cwd,projectId:e.projectId,workflowSlugs:o}}).catch(i=>{p.warn({err:i},"auto-scope of dirty tests failed")})}var ut=Hn(`
117
+ query ScopeSelection($projectId: String!, $cwd: String!) {
118
+ project(id: $projectId) {
119
+ id
120
+ devSession(cwd: $cwd) {
121
+ id
122
+ scopeItems {
123
+ id
124
+ workflow {
125
+ id
126
+ slug
127
+ }
128
+ }
129
+ }
130
+ }
131
+ }
132
+ `);async function pt(e){try{let r=(await u({config:e,document:ut,variables:{cwd:e.cwd,projectId:e.projectId}})).project?.devSession?.scopeItems??[];return _n(r.flatMap(t=>t.workflow==null?[]:[t.workflow.slug]))}catch(n){return be({detail:n instanceof Error?n.message:String(n),kind:"scope-fetch-failed"})}}import{graphql as ft}from"gql.tada";var yt=2e3,gt=ft(`
133
+ query DaemonCloudRunStatus($runId: String!) {
134
+ run(id: $runId) {
135
+ status
136
+ failureReason
137
+ }
138
+ }
139
+ `);function Bn({config:e,onComplete:n,onStarted:r,runId:t,signal:o}){let i=!1,l,a=!1,s=async()=>{if(i||o.aborted)return;let c=await mt(e,t).catch(()=>"unknown");if(!(i||o.aborted)){if(!a&&(c==="running"||Vn(c))&&(a=!0,r()),Vn(c)){i=!0,n(Rt(c));return}l=setTimeout(()=>{s()},yt)}};return s(),{stop:()=>{i=!0,l!=null&&clearTimeout(l)}}}async function mt(e,n){let t=(await u({config:e,document:gt,variables:{runId:n}})).run?.status;return t??"unknown"}function Vn(e){return e==="passed"||e==="failed"||e==="cancelled"||e==="unready"}function Rt(e){return e==="passed"?{kind:"pass"}:e==="failed"?{detail:"failed",kind:"error"}:e==="cancelled"?{detail:"cancelled",kind:"error"}:e==="unready"?{detail:"unready",kind:"error"}:{detail:"unknown",kind:"error"}}var vt=12e4,xt=-32099,Ie=new Set,Kn=new Map;function ys(e){Ie.add(e)}function Et(e){let n=new AbortController;return e.isCancellationRequested?(n.abort(),n.signal):(e.onCancellationRequested(()=>{n.abort()}),n.signal)}function gs(e){let n={...e,inflight:new Map,jobs:new Map};return{claim:r=>Ct(n,r),handleConnection:r=>{bt(n,r)},idle:()=>zn(n)}}function bt(e,n){let r=an(n);r.onRequest(dn,(t,o)=>It({connection:r,ctx:e,params:t,token:o})),r.onRequest(cn,()=>{let t=ge();return{active:t.active,queued:t.queued,sseHealth:e.sseHealth(),version:C(),...e.explorationStatus()}}),r.onRequest(un,()=>{let t=zn(e);return t&&e.onShutdownRequest(),t}),r.onClose(()=>{Pt(e,r)}),r.onError(t=>{p.warn({err:t},"ipc connection error")}),n.on("error",t=>{p.warn({err:t},"ipc socket error")}),r.listen()}function zn(e){let n=ge();return e.jobs.size===0&&n.active===0&&n.queued===0}async function It({connection:e,ctx:n,params:r,token:t}){let o=sn.safeParse(r);if(!o.success)throw Jn({code:"bad-message"});await n.ready;let i=await jt({config:n.config,cwd:n.cwd,message:o.data});if(i.kind==="error")throw Jn(i.error);let l=ht(),a=new St;return t.onCancellationRequested(()=>{Gn(n,l)}),n.jobs.set(l,{cancellation:a,connection:e,failed:0,notRun:0,passed:0,total:i.selections.length}),qt({ctx:n,headed:o.data.headed,jobId:l,lockfileHashValue:i.lockfileHashValue,selections:i.selections,targetsByClaimKey:i.targetsByClaimKey,token:a.token}).catch(s=>{p.error({err:s},"ipc dispatch failed")}),{jobId:l,total:i.selections.length}}function Jn(e){return new wt(xt,e.code,e)}function Gn(e,n){let r=e.jobs.get(n);r!=null&&(r.cancellation.cancel(),e.jobs.delete(n),Fn(e.inflight,n))}function Pt(e,n){[...e.jobs.entries()].filter(([,r])=>r.connection===n).forEach(([r])=>{Gn(e,r)})}function Yn(e,n,r){let t=e.jobs.get(n);t!=null&&(Qn(()=>t.connection.sendNotification(pn,{event:r,jobId:n})),r.kind==="test-outcome"&&(Tt(t,r.outcome.kind),t.passed+t.failed+t.notRun>=t.total&&(Qn(()=>t.connection.sendNotification(fn,{failed:t.failed,jobId:n,notRun:t.notRun,passed:t.passed})),e.jobs.delete(n))))}function Qn(e){Promise.resolve().then(e).catch(n=>{p.warn({err:n},"ipc notification failed")})}function Tt(e,n){if(n==="pass"){e.passed+=1;return}if(n==="dispatch-error"||n==="dispatch-timeout"||n==="infra-error"){e.notRun+=1;return}e.failed+=1}function x(e,n,r){n.jobIds.forEach(t=>{Yn(e,t,r)})}function Ct(e,n){let r=we(e.inflight,n);return r==null?null:{headed:r.headed,token:r.cancellation.token,finished:(t,o)=>{e.inflight.delete(r.inflightKey),x(e,r,{kind:"test-outcome",outcome:o,runId:r.runId,testName:r.testName,workflowName:r.workflowName})},started:()=>{x(e,r,{kind:"test-started",runId:r.runId,testName:r.testName,workflowName:r.workflowName})}}}function At(e){return e.kind==="typecheck-failed"?e.diagnostics.slice(0,5):e.kind==="invalid-lockfile"?e.issues.slice(0,5):e.kind==="load-threw"?[e.message]:[]}async function jt({config:e,cwd:n,message:r}){return(await We(n)).match(o=>Ft({config:e,cwd:n,lockfile:o,message:r}),o=>Promise.resolve({error:{code:"compile-failed",detail:o.kind,diagnostics:[...At(o)]},kind:"error"}))}async function Ft({config:e,cwd:n,lockfile:r,message:t}){let o=await Dt(e.appUrl);if(o!=null)return{error:{code:"app-unreachable",detail:o,url:e.appUrl},kind:"error"};let i=await ke(n);if(i==null)return{error:{code:"sync-failed",detail:"lockfile-missing"},kind:"error"};if(!Ie.has(i)){let a=await Ot({config:e,cwd:n,lockfile:r});if(a!=null)return{error:{code:"sync-failed",detail:a},kind:"error"};Ie.add(i)}return(await Ut({config:e,cwd:n,lockfile:r,message:t})).match(async a=>({kind:"ready",lockfileHashValue:i,selections:On(r,a),targetsByClaimKey:await $t({config:e,cwd:n,hash:i})}),a=>Promise.resolve({error:a,kind:"error"}))}async function $t({config:e,cwd:n,hash:r}){let t=Kn.get(r);if(t!=null)return t;let o=await An(e,n);return Kn.set(r,o),o}var Mt=2e3;async function Dt(e){try{return await fetch(e,{method:"HEAD",signal:AbortSignal.timeout(Mt)}),null}catch(n){return n instanceof Error?n.message:String(n)}}async function Ot(e){try{return await v(e),null}catch(n){return n instanceof Error?n.message:String(n)}}async function Ut({config:e,cwd:n,lockfile:r,message:t}){return!t.all&&t.tests.length===0?(await Wn({config:e,cwd:n,lockfile:r})).mapErr(Lt):Dn({all:t.all,ids:t.tests,lockfile:r}).mapErr(Nt)}function Lt(e){return e.kind==="scope-empty"?{code:"selection-nothing-selected"}:{code:"scope-failed",detail:e.detail}}function Nt(e){switch(e.kind){case"conflicting-flags":return{code:"selection-conflicting-flags"};case"nothing-selected":return{code:"selection-nothing-selected"};case"unknown-ids":return{code:"selection-unknown-ids",known:[...e.known],unknown:[...e.unknown]}}}async function qt(e){await e.selections.reduce((n,r)=>n.then(()=>_t(e,r)),Promise.resolve())}async function _t(e,n){let{ctx:r,headed:t,jobId:o,lockfileHashValue:i,targetsByClaimKey:l,token:a}=e;if(a.isCancellationRequested)return;let s=Se(n),c=l.get(s);if(c==null){Yn(r,o,{kind:"test-outcome",outcome:{kind:"dispatch-error",reason:{detail:"test-not-found",type:"generic"}},runId:"",testName:n.testName,workflowName:n.workflowName});return}let d=jn({headed:t,inflight:r.inflight,jobId:o,lockfileHashValue:i,runId:kt(),selection:n,timeoutMs:vt,onExpire:m=>{x(r,m,{kind:"test-outcome",outcome:{detail:"dispatch-timeout",kind:"dispatch-timeout"},runId:"",testName:m.testName,workflowName:m.workflowName})}});if(d==null)return;let f=r.executor(),y=await Ht({ctx:r,executor:f,lockfileHashValue:i,run:d,target:c});if(y!=null){J(r.inflight,d),x(r,d,{kind:"test-outcome",outcome:y,runId:"",testName:n.testName,workflowName:n.workflowName});return}f==="cloud"&&Wt(r,d)}function Ht({ctx:e,executor:n,lockfileHashValue:r,run:t,target:o}){return Cn({config:e.config,executor:n,lockfileHash:r,runId:t.runId,target:o})}function Wt(e,n){let r=we(e.inflight,n.runId);r!=null&&Bn({config:e.config,runId:r.runId,signal:Et(r.cancellation.token),onComplete:t=>{e.inflight.delete(r.inflightKey),x(e,r,{kind:"test-outcome",outcome:t,runId:r.runId,testName:r.testName,workflowName:r.workflowName})},onStarted:()=>{x(e,r,{kind:"test-started",runId:r.runId,testName:r.testName,workflowName:r.workflowName})}})}import Vt from"fs";import Bt from"path";async function xs(e){let n=Bt.join(e,".ripplo","index.ts");if(!Vt.existsSync(n))return{appUrl:void 0,engineUrl:void 0,errors:[{message:".ripplo/index.ts not found",path:""}],valid:!1,warnings:[]};let r=await $(e);return r.isErr()?{appUrl:void 0,engineUrl:void 0,errors:[{message:M(r.error),path:".ripplo/"}],valid:!1,warnings:[]}:_().match(t=>({appUrl:t.appUrl,engineUrl:t.engineUrl,errors:[],valid:!0,warnings:[]}),t=>({appUrl:void 0,engineUrl:void 0,errors:[{message:pe(t),path:""}],valid:!1,warnings:[]}))}async function Es(e){try{await fetch(e,{method:"HEAD",signal:AbortSignal.timeout(5e3)});return}catch{return`appUrl (${e}) is not responding. Make sure your dev server is running on that port.`}}async function bs({appUrl:e,engineUrl:n}){let r=n.startsWith("http://")||n.startsWith("https://")?n:`${e}${n}`;try{return(await fetch(`${r}/setup`,{body:JSON.stringify({}),headers:{"Content-Type":"application/json"},method:"PUT",signal:AbortSignal.timeout(5e3)})).ok?"Engine endpoint accepted an unsigned request \u2014 webhook signature verification may be missing.":void 0}catch{return}}import{createMessageConnection as Xn,IPCMessageReader as Zn,IPCMessageWriter as er,NotificationType as Kt,NotificationType0 as nr,RequestType as rr,RequestType0 as Jt}from"vscode-jsonrpc/node";import{z as R}from"zod";var js=R.object({headed:R.boolean(),runId:R.string().min(1),testRef:R.string().min(1)}),Fs=R.object({lockfileJson:R.string().optional(),unavailable:R.string().optional()}),$s=R.object({runId:R.string().min(1),span:qe}),Ms=R.object({outcome:ln,serverNotified:R.boolean()}),Ds=new nr("worker/ready"),Os=new rr("worker/run"),Us=new Jt("worker/lockfile"),Ls=new rr("worker/exploreTrail"),Ns=new Kt("worker/span"),qs=new nr("worker/shutdown");function _s(e){let n=Xn(new Zn(e),new er(e));return n.listen(),n}function Hs(){let e=Xn(new Zn(process),new er(process));return e.listen(),e}import{gzipSync as ro}from"zlib";import{appendFileSync as to,existsSync as G,readFileSync as sr,writeFileSync as ar}from"fs";import S from"path";import{graphql as Te}from"gql.tada";function z(e){return[e.kind,e.target,e.value].filter(n=>n.length>0).join(" ")}function tr(e,n){return{kind:"finding",payload:Yt(e),source:"verifier",step:n.step,stepIndex:n.stepIndex,timeNanos:n.timeNanos}}var Qt={"no-effect":"noEffect","required-state-unsatisfied":"requiredStateUnsatisfied",unresolvable:"unresolvable"},zt={"data-rule":"dataRule",fact:"fact",step:"step"},Gt={aborted:"aborted","action-failed":"actionFailed","app-not-ready":"appNotReady","check-failed":"checkFailed","client-mount-missing":"clientMountMissing","conflicting-sessions":"conflictingSessions","driver-launch":"driverLaunch","engine-decode":"engineDecode","engine-http":"engineHttp","engine-network":"engineNetwork","engine-unreachable":"engineUnreachable","setup-missing-row":"setupMissingRow","state-identity":"stateIdentity"};function Yt(e){return e.kind==="consistency"?{kind:"mismatch",mismatch:no(e.mismatch),pending:e.pending,wait:e.budget,waitMs:ae[e.budget]}:e.kind==="pending-check"?{...Xt(e.source),kind:"pendingCheck",source:zt[e.source.kind],wait:e.budget,waitMs:ae[e.budget]}:e.kind==="unrunnable"?{kind:"unrunnable",reason:Qt[e.reason]}:e.kind==="impossible-action"?{action:Zt(e.step.action),kind:"impossibleAction",subject:ir(e.step.action)}:e.kind==="lift-visibility"?{declaredIndex:e.declaredIndex,kind:"liftVisibility",subject:I(e.locator),visibleIndex:e.visibleIndex}:{errorKind:Gt[e.error.kind],kind:"driverError",message:eo(e.error)}}function Xt(e){return"check"in e?or(e.check,!1):{checkKind:null,expected:null,negated:!1,subject:Ge(e.dataRule)}}function or(e,n){return e.kind==="not"?or(e.inner,!n):e.kind==="browser"?{checkKind:"browser",expected:e.value??null,negated:n,subject:Ke(e.key)}:e.kind==="value"||e.kind==="text"?{checkKind:e.kind,expected:e.value,negated:n,subject:I(e.locator)}:{checkKind:e.kind,expected:null,negated:n,subject:I(e.locator)}}function Zt(e){return`${e.kind} ${ir(e)}`.trim()}function ir(e){return e.locator==null?e.url??"":I(e.locator)}function eo(e){return"message"in e?e.message:"detail"in e?e.detail:null}function no(e){if(e.kind==="wrong-value")return{actual:w(e.sut),entity:e.entity,expected:w(e.snapshot),field:e.field,key:e.key,kind:"wrongValue"};if(e.kind==="expected-change"){let n=e.direction==null?"change":e.direction.replace(/d$/,"");return{actual:w(e.value),entity:e.entity,expected:`${n} from ${w(e.from)}`,field:e.field,key:e.key,kind:"expectedChange"}}return e.kind==="scalar-mismatch"?{actual:w(e.sut),expected:Ye(e.want),kind:"scalarMismatch",subject:ze(e.subject)}:e.kind==="missing-row"?{entity:e.entity,key:e.key,kind:"missingRow"}:{entity:e.entity,key:e.key,kind:"unexpectedRow"}}function X({config:e,fixturesDir:n,headed:r}){return{baseUrl:e.appUrl,engineUrl:e.engineUrl,fixturesDir:n,generate:A,headed:r,secret:e.webhookSecret}}async function Ce(e){let n=Z(e);await Ae(e.config,e.runId,n)}function Z({debugDir:e,events:n,recordingOptional:r,runId:t,stepSources:o}){let i=je(n),l=po(e,t);if(l==null&&!r)throw new Error("recording-missing");let a=i.map((c,d)=>xo({aliases:[...go(n),...mo(i)],generated:Ro(n),generatedSingletons:ho(n),origin:l==null?uo(i):l.origin,record:c,rrwebEvents:l==null?[]:l.events,sourceTest:o?.[d]??null})),s=i.flatMap(c=>c.findings.map(d=>tr(d,{step:z(j(c.source,c.index)),stepIndex:c.index,timeNanos:lr(c)})));return oo({debugDir:e,events:[...a,...s],runId:t}),i}function oo({debugDir:e,events:n,runId:r}){if(n.length===0)return;let t=S.join(e,r,"behavior.jsonl");if(!G(t))return;let o=n.map(i=>JSON.stringify(i)).join(`
140
+ `);to(t,`${o}
141
+ `)}function lr(e){return String(BigInt(Math.max(0,Math.round(e.endMs)))*1000000n)}async function Ae(e,n,r){let t=r.filter(l=>l.findings.length>0).length,o=r.length-t,i=r.reduce((l,a)=>l+Math.max(0,a.endMs-a.startMs),0);await u({config:e,document:Io,variables:{items:[{duration:i,failCount:t,firstFailedStepTitle:io(r),passCount:o,runId:n,status:t>0?"failed":"passed"}]}})}function io(e){let n=e.filter(r=>r.findings.length>0).toSorted((r,t)=>r.index-t.index).at(0);return n==null?null:z(j(n.source,n.index))}function je(e){return e.flatMap(n=>n.kind==="step"?[{annotations:n.annotations,endMs:n.endMs,findings:n.findings,index:n.index,source:n.source,startMs:n.startMs,state:n.state,url:n.url}]:[])}async function dr(e,n){await u({config:e,document:Po,variables:{runIds:[n]}})}var Y=".uploaded";async function ao({config:e,debugDir:n,runId:r}){let t=S.join(n,r),o=S.join(t,"behavior.jsonl");if(G(S.join(t,Y)))return;if(!G(o)){p.warn({runId:r},"behavior upload skipped: behavior.jsonl missing on disk");return}await[0,1e3,3e3].reduce((l,a)=>l.then(async s=>s?!0:(await new Promise(c=>setTimeout(c,a)),so({behaviorPath:o,config:e,runDir:t,runId:r}))),Promise.resolve(!1))}async function so({behaviorPath:e,config:n,runDir:r,runId:t}){try{let o=await u({config:n,document:bo,variables:{runId:t}}),i=await fetch(o.debugArtifactUploadUrl,{body:ro(sr(e)),headers:{"content-type":co},method:"PUT"});return i.ok?(await dr(n,t),ar(S.join(r,Y),""),!0):(p.warn({runId:t,status:i.status},"behavior upload PUT failed"),!1)}catch(o){return lo(o)?(p.warn({runId:t},"behavior upload refused by server; run unknown \u2014 not retrying"),ar(S.join(r,Y),""),!0):(p.warn({error:o,runId:t},"behavior upload failed"),!1)}}function lo(e){if(typeof e!="object"||e==null||!("errors"in e))return!1;let{errors:n}=e;return Array.isArray(n)&&n.some(r=>{if(typeof r!="object"||r==null||!("extensions"in r))return!1;let{extensions:t}=r;return typeof t=="object"&&t!=null&&"code"in t&&t.code==="FORBIDDEN"})}var co="application/x-ndjson";function uo(e){return e.reduce((n,r)=>Math.min(n,r.startMs),e[0]?.startMs??0)}function po(e,n){let r=S.join(e,n,"behavior.jsonl");if(!G(r))return null;let t=sr(r,"utf8").split(`
142
+ `).filter(i=>i.length>0).map(i=>fo(i)).flatMap(i=>yo(i)?[i.event]:[]),o=t[0];return o==null?null:{events:t,origin:o.timestamp}}function fo(e){return JSON.parse(e)}function yo(e){return typeof e=="object"&&e!=null&&Reflect.get(e,"kind")==="rrweb"}function go(e){return e.flatMap(n=>n.kind==="world"?n.aliases:[])}function mo(e){return e.flatMap(n=>{let r=ko(n.source);return r.flatMap(t=>{let i=r.filter(a=>a.entity===t.entity).indexOf(t),l=n.state.rows.filter(a=>a.status==="created"&&a.entity===t.entity).at(i);return l==null?[]:[{alias:t.as,entity:t.entity,key:l.key}]})})}function Ro(e){return new Set(e.flatMap(n=>n.kind==="world"?n.generated.map(r=>cr(r)):[]))}function cr({entity:e,field:n,key:r}){return`${e} ${r} ${n}`}function ho(e){return new Set(e.flatMap(n=>n.kind==="world"?n.generatedSingletons:[]))}function ko(e){return e==null?[]:e.expect.flatMap(n=>Pe(n))}function Pe(e){return e.kind==="state"&&e.assertion.kind==="created"?[{as:e.assertion.as,entity:e.entity}]:e.kind==="and"?e.predicates.flatMap(n=>Pe(n)):e.kind==="when"?e.branches.flatMap(n=>n.consequence.flatMap(r=>Pe(r))):[]}var So=3,wo=0;function vo({endMs:e,rrwebEvents:n,startMs:r}){let t=n.find(o=>o.type===So&&o.data?.source===wo&&o.timestamp>=r&&o.timestamp<=e);return t==null?r:t.timestamp}function xo({aliases:e,generated:n,generatedSingletons:r,origin:t,record:o,rrwebEvents:i,sourceTest:l}){let a=j(o.source,o.index),s=vo({endMs:o.endMs,rrwebEvents:i,startMs:o.startMs});return{annotations:[...o.annotations.map(d=>({ephemeral:d.ephemeral,kind:d.kind,label:d.label,outcome:d.outcome,recordingStartMs:Math.max(0,(d.kind==="action"?s:d.atMs)-t),rrwebIds:[...d.rrwebIds],url:d.url,value:d.value??null}))],duration:Math.max(0,o.endMs-o.startMs),kind:"step",nodeType:a.kind,pageUrl:o.url,recordingEndMs:Math.max(0,o.endMs-t),recordingStartMs:Math.max(0,s-t),source:"verifier",sourceTest:l,stateRows:o.state.rows.map(d=>Eo({aliases:e,generated:n,row:d})),stateSingletons:o.state.singletons.map(d=>({changed:d.changed,generated:r.has(d.name),name:d.name,value:d.value==null?null:String(d.value)})),stepIndex:o.index,timeNanos:lr(o),title:z(a)}}function Eo({aliases:e,generated:n,row:r}){let t=e.find(o=>o.entity===r.entity&&o.key===r.key);return{entity:r.entity,fields:r.fields.map(o=>({changed:o.changed,field:o.field,generated:n.has(cr({entity:r.entity,field:o.field,key:r.key})),value:o.value==null?null:String(o.value)})),key:r.key,label:t?.alias??r.key,status:r.status}}var bo=Te(`
143
+ mutation DebugArtifactUploadUrl($runId: String!) {
144
+ debugArtifactUploadUrl(runId: $runId)
145
+ }
146
+ `),Io=Te(`
147
+ mutation CompleteRunsBatch($items: [CompleteRunItem!]!) {
148
+ completeRunsBatch(items: $items) {
149
+ id
150
+ status
151
+ }
152
+ }
153
+ `),Po=Te(`
154
+ mutation MarkRunArtifactsUploadedBatch($runIds: [String!]!) {
155
+ markRunArtifactsUploadedBatch(runIds: $runIds)
156
+ }
157
+ `);import{graphql as E}from"gql.tada";function To(e){let n=e.trail;if(!(n==null||!Co(e.kind)))return{baseLabel:n.baseLabel,baseState:n.baseState,durationMs:n.durationMs,outcome:e.kind,runId:e.runId,signature:n.signature,steps:n.steps}}function Co(e){return e==="clean"||e==="flaky"||e==="finding"}async function Fe({baseState:e,category:n,config:r,debugDir:t,devSessionId:o,events:i,lockfileHash:l,reproJson:a,runId:s,signature:c,spec:d,stepSources:f,summary:y,workflowSlug:m}){await u({config:r,document:Mo,variables:{devSessionId:o??null,lockfileHash:l??null,projectId:r.projectId,reproJson:a,runId:s,spec:d??null,workflowSlug:m??null}}),await Ce({config:r,debugDir:t,events:i,recordingOptional:!0,runId:s,stepSources:f}),await u({config:r,document:Do,variables:{baseState:e,category:n,projectId:r.projectId,reproRunId:s,signature:c,summary:y}})}async function ee(e,n,r){return(await u({config:e,document:Oo,variables:{lockfileHash:r,projectId:e.projectId,signature:n}})).exploreFindingExists}async function Ao({attempts:e,config:n,devSessionId:r,findings:t,trail:o}){await u({config:n,document:Fo,variables:{attempts:e,devSessionId:r,findings:t,trail:o==null?null:{baseLabel:o.baseLabel,baseState:o.baseState,durationMs:o.durationMs,findingRunId:o.runId??null,findingSignature:o.signature??null,outcome:o.outcome,steps:o.steps.map(i=>({test:i.test,text:i.text}))}}})}async function jo(e,n){return(await u({config:e,document:$o,variables:{devSessionId:n}}).catch(t=>(p.warn({error:t},"reportExploreUnhealthy failed"),null)))?.reportExploreUnhealthy??!1}var Fo=E(`
158
+ mutation RecordExplorationProgress(
159
+ $devSessionId: String!
160
+ $attempts: Int!
161
+ $findings: Int!
162
+ $trail: ExploreTrailInput
163
+ ) {
164
+ recordExplorationProgress(
165
+ devSessionId: $devSessionId
166
+ attempts: $attempts
167
+ findings: $findings
168
+ trail: $trail
169
+ )
170
+ }
171
+ `),$o=E(`
172
+ mutation ReportExploreUnhealthy($devSessionId: String!) {
173
+ reportExploreUnhealthy(devSessionId: $devSessionId)
174
+ }
175
+ `),Mo=E(`
176
+ mutation CreateExploreRun(
177
+ $projectId: String!
178
+ $runId: String!
179
+ $devSessionId: String
180
+ $lockfileHash: String
181
+ $spec: String
182
+ $reproJson: String
183
+ $workflowSlug: String
184
+ ) {
185
+ createExploreRun(
186
+ projectId: $projectId
187
+ runId: $runId
188
+ devSessionId: $devSessionId
189
+ lockfileHash: $lockfileHash
190
+ spec: $spec
191
+ reproJson: $reproJson
192
+ workflowSlug: $workflowSlug
193
+ ) {
194
+ id
195
+ }
196
+ }
197
+ `),Do=E(`
198
+ mutation SubmitExploreFinding(
199
+ $projectId: String!
200
+ $signature: String!
201
+ $summary: String!
202
+ $baseState: String!
203
+ $category: ExploreFindingCategory!
204
+ $reproRunId: String!
205
+ ) {
206
+ submitExploreFinding(
207
+ projectId: $projectId
208
+ signature: $signature
209
+ summary: $summary
210
+ baseState: $baseState
211
+ category: $category
212
+ reproRunId: $reproRunId
213
+ ) {
214
+ id
215
+ }
216
+ }
217
+ `),sl=E(`
218
+ mutation SetExploreFindingStatus(
219
+ $projectId: String!
220
+ $signature: String!
221
+ $status: ExploreFindingStatus!
222
+ ) {
223
+ setExploreFindingStatus(projectId: $projectId, signature: $signature, status: $status)
224
+ }
225
+ `),Oo=E(`
226
+ query ExploreFindingExists($projectId: String!, $signature: String!, $lockfileHash: String!) {
227
+ exploreFindingExists(projectId: $projectId, signature: $signature, lockfileHash: $lockfileHash)
228
+ }
229
+ `);import No from"path";import{graphql as qo}from"gql.tada";import{graphql as ne}from"gql.tada";function $e(e){switch(e.kind){case"app-not-ready":return"appNotReady";case"client-mount-missing":return"appNotReady";case"engine-network":case"engine-http":return"backendUnreachable";case"engine-unreachable":return"engineUnreachable";case"engine-decode":case"state-identity":case"setup-missing-row":case"conflicting-sessions":case"driver-launch":case"action-failed":case"check-failed":case"aborted":return null}}async function Me(e,n,r){await u({config:e,document:Uo,variables:{reason:r,runId:n}}).catch(t=>{p.error(t,"failRun submission failed")})}async function De(e,n,r){await u({config:e,document:Lo,variables:{cause:r,runId:n}}).catch(t=>{p.error(t,"markRunUnready submission failed")})}var ul=ne(`
230
+ mutation ReleaseRun($runId: String!) {
231
+ releaseRun(runId: $runId)
232
+ }
233
+ `),pl=ne(`
234
+ mutation HeartbeatRun($runId: String!) {
235
+ heartbeatRun(runId: $runId)
236
+ }
237
+ `),Uo=ne(`
238
+ mutation FailRun($runId: String!, $reason: String!) {
239
+ failRun(runId: $runId, reason: $reason)
240
+ }
241
+ `),Lo=ne(`
242
+ mutation MarkRunUnready($runId: String!, $cause: RunUnreadyCause!) {
243
+ markRunUnready(runId: $runId, cause: $cause)
244
+ }
245
+ `);async function _o({config:e,cwd:n,errorSettle:r,fixturesDir:t,headed:o,lockfile:i,onPhase:l,runId:a,session:s,signal:c,test:d}){if(!await Wo(e,a))return{outcome:{kind:"dispatch-failed",reason:"already-claimed",runId:a},persisted:Promise.resolve()};let y=No.join(n,".ripplo","debug"),m=[];return(await s.runOnce({capture:!0,lockfile:i,onPhase:l,options:X({config:e,fixturesDir:t,headed:o}),params:void 0,runId:a,sequence:void 0,test:d,onEvent:b=>{m.push(b)}},c)).match(async b=>{let Oe=je(m),oe=Oe.flatMap(mr=>mr.findings),ie=Ho(oe);if(ie!=null)return Z({config:e,debugDir:y,events:m,recordingOptional:!0,runId:a,stepSources:void 0}),await ur({config:e,error:ie,errorSettle:r,runId:a}),{outcome:{error:ie,kind:"error",runId:a},persisted:Promise.resolve()};await Ae(e,a,Oe),Z({config:e,debugDir:y,events:m,recordingOptional:!0,runId:a,stepSources:void 0});let gr=Promise.resolve();return{outcome:oe.length>0?{findings:oe,kind:"findings",runId:a}:{kind:"pass",runId:a},persisted:gr}},async b=>(await ur({config:e,error:b,errorSettle:r,runId:a}),{outcome:{error:b,kind:"error",runId:a},persisted:Promise.resolve()}))}async function ur({config:e,error:n,errorSettle:r,runId:t}){if(r==="defer")return;let o=$e(n);if(o!=null){await De(e,t,o);return}await Me(e,t,D(n))}function Ho(e){let n=e.find(r=>r.kind==="driver-error"&&Qe(r.error));return n!=null&&n.kind==="driver-error"?n.error:void 0}async function Wo(e,n){return((await u({config:e,document:Vo,variables:{runIds:[n]}})).startRunsBatch??[]).some(t=>t.id===n)}var Vo=qo(`
246
+ mutation StartRunsBatch($runIds: [String!]!) {
247
+ startRunsBatch(runIds: $runIds) {
248
+ id
249
+ }
250
+ }
251
+ `);import{randomUUID as Bo}from"crypto";async function Ko({assign:e,config:n,debugDir:r,devSessionId:t,fixturesDir:o,headed:i,lockfile:l,report:a,session:s,signal:c}){let d=Je(l);if(e.stepRuns.length===0)return{kind:"error",reason:"empty-trail"};let f=ri(d,e.stepRuns),y=await rn({baseState:{name:h(e.baseStateTest),test:e.baseStateTest},corpus:d,lockfile:l,options:X({config:n,fixturesDir:o,headed:i}),seenSignature:a?T=>ee(n,T,e.lockfileHash):void 0,session:s,stepRuns:e.stepRuns,runIdFor:T=>`explore-${Bo()}-${String(T)}`},c),m=a?await Xo({baseStateTest:e.baseStateTest,config:n,debugDir:r,devSessionId:t,lockfileHash:e.lockfileHash,outcome:y,reproJson:Go(d,e),stepSources:Yo(f)}):!1;return zo(y,f.length),ti(y,m,Jo(f,e,y))}function Jo(e,n,r){if(r.kind==="error"||r.kind==="aborted")return;let t=r.timing.confirm;return{baseLabel:n.baseStateTest.intent,baseState:h(n.baseStateTest),durationMs:Math.round(re(r.timing.detect)+(t==null?0:re(t))),signature:r.kind==="finding"||r.kind==="seen"?r.signature:void 0,steps:Qo(e.slice(0,r.ranCount))}}function Qo(e){return e.flatMap(n=>{let r=n.label.split("#")[0]??n.label;return n.actions.map(t=>({test:r,text:t}))})}function re(e){return e.engineMs+e.worldMs+e.browserMs+e.driveMs+e.teardownMs}function zo(e,n){if(e.kind==="error"){p.info({detail:D(e.error),kind:e.kind,reason:e.error.kind,steps:n},"explore trail");return}if(e.kind==="aborted"||e.kind==="seen"){p.info({kind:e.kind,steps:n},"explore trail");return}let r=e.timing.detect,t=e.timing.confirm;p.info({browserMs:r.browserMs,confirmMs:t==null?void 0:re(t),detectMs:re(r),driveMs:r.driveMs,engineMs:r.engineMs,kind:e.kind,steps:n,teardownMs:r.teardownMs,worldMs:r.worldMs},"explore trail")}function Go(e,n){let r=n.stepRuns.flatMap(o=>{let i=e[o.idx];return i==null?[]:[{index:i.index,params:o.params,test:i.test}]}),t={baseStateRef:h(n.baseStateTest),steps:r};return JSON.stringify(t)}function Yo(e){return e.flatMap(n=>{let r=n.label.split("#")[0]??n.label;return n.actions.map(()=>r)})}async function Xo({baseStateTest:e,config:n,debugDir:r,devSessionId:t,lockfileHash:o,outcome:i,reproJson:l,stepSources:a}){return i.kind!=="finding"||i.captureEvents.length===0?!1:await ee(n,i.signature,o)?(p.info({devSessionId:t,signature:i.signature},"explore finding already reported, skipping duplicate"),!1):(await Fe({baseState:i.baseState,category:Zo(i.verifierLayer),config:n,debugDir:r,devSessionId:t,events:i.captureEvents,lockfileHash:o,reproJson:l,runId:i.runId,signature:i.signature,spec:ni(e,i.captureEvents),stepSources:a,summary:ei(i.captureEvents,i.title),workflowSlug:i.sourceTest?.split("/")[0]}).catch(s=>{p.warn({error:s},"explore finding report failed")}),!0)}function Zo(e){return e==="data-rule"?"dataRule":e==="model-drift"?"modelDrift":e}function ei(e,n){let r=e.flatMap(t=>t.kind==="step"?[...t.findings]:[]).at(0);if(r!=null)return Xe(r);if(n!=null)return n;throw new Error("explore finding has no findings to summarize")}function ni(e,n){let r=n.flatMap(o=>o.kind==="step"?[o.source]:[]),t={absent:e.absent,actor:e.actor,exclusive:e.exclusive,intent:e.intent,maybe:[],name:e.name,params:e.params,singletons:e.singletons,steps:r,stub:!1,tests:[],world:e.world};return JSON.stringify(t)}function ri(e,n){return n.flatMap(r=>{let t=e[r.idx];return t==null?[]:[{actions:[...t.nav,...t.steps].map(o=>Ze(o.action)),label:`${t.test}#${String(t.index)}`}]})}function ti(e,n,r){return e.kind==="error"?{kind:e.kind,reason:`runtime:${e.error.kind}`}:e.kind==="finding"?{kind:e.kind,runId:n?e.runId:void 0,trail:r}:{kind:e.kind,trail:r}}import oi from"path";import{randomUUID as ii}from"crypto";async function Hl({cwd:e,onReady:n,signal:r,step:t,target:o}){let i=W(e).match(f=>({config:f}),f=>({failure:f}));if("failure"in i)return{failure:i.failure,kind:"config-failed"};let l=i.config,a=await Ve(e);if(a.result.isErr())return{error:a.result.error,kind:"compile-failed"};let s=a.result.value,c=await ai(s,o);return c.kind!=="ok"?c:(await en({lockfile:s,onReady:n,options:si(l),runId:`teleport-${ii()}`,sequence:c.sequence,stopAfterStep:t,test:c.test},r)).match(f=>({kind:"done",result:f}),f=>({error:f,kind:"run-failed"}))}async function ai(e,n){if(n.kind==="explore"){let t=await tn(e,n.repro);return t.kind==="unplannable"?{kind:"unplannable"}:{kind:"ok",sequence:t.sequence,test:t.baseTest}}let r=P(e).find(t=>t.ref===n.ref);return r==null?{kind:"no-test",ref:n.ref}:{kind:"ok",sequence:nn(e,r.test,void 0),test:r.test}}function si(e){return{baseUrl:e.appUrl,engineUrl:e.engineUrl,fixturesDir:oi.join(e.cwd,F),generate:A,headed:!0,secret:e.webhookSecret}}import{graphql as pr}from"gql.tada";import{err as te,ok as fr}from"neverthrow";var li=pr(`
252
+ query ExecutorSession($projectId: String!, $cwd: String!) {
253
+ project(id: $projectId) {
254
+ id
255
+ devSession(cwd: $cwd) {
256
+ id
257
+ executor
258
+ }
259
+ }
260
+ }
261
+ `),di=pr(`
262
+ mutation SetDevSessionExecutor($devSessionId: String!, $executor: RunExecutor!) {
263
+ setDevSessionExecutor(devSessionId: $devSessionId, executor: $executor) {
264
+ __typename
265
+ ... on DevSession {
266
+ id
267
+ executor
268
+ }
269
+ ... on DevSessionEndedError {
270
+ message
271
+ }
272
+ }
273
+ }
274
+ `);async function Jl(e){return(await yr(e)).map(r=>r.executor)}async function Ql(e,n){let r=await yr(e);if(r.isErr())return te(r.error);let o=(await u({config:e,document:di,variables:{devSessionId:r.value.id,executor:n}})).setDevSessionExecutor;return o==null?te({kind:"empty-response"}):o.__typename!=="DevSession"?te({kind:"session-ended"}):fr(o.executor)}async function yr(e){let r=(await u({config:e,document:li,variables:{cwd:e.cwd,projectId:e.projectId}})).project?.devSession;return r==null?te({kind:"no-session"}):fr({executor:r.executor,id:r.id})}export{gi as a,xi as b,_ as c,Er as d,Ci as e,pe as f,kn as g,wn as h,W as i,Q as j,Un as k,xs as l,Es as m,bs as n,it as o,Ln as p,js as q,$s as r,Ms as s,Ds as t,Os as u,Us as v,Ls as w,Ns as x,qs as y,_s as z,Hs as A,Vi as B,Bi as C,ge as D,Ki as E,bn as F,sa as G,v as H,la as I,ke as J,_a as K,ys as L,Et as M,gs as N,Y as O,ao as P,Me as Q,_o as R,To as S,Ao as T,jo as U,Ko as V,Hl as W,Jl as X,Ql as Y};
@@ -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 E,C,D as He,E as F,F as Me,H as Ue,I as _e,J as I,L as qe,M as Fe,N as Oe,O as $e,P as Ne,Q as T,S as je,T as Be,U as Ke,W as ze,X as Je,Y as O,b as ee,f as ae,i as k,m as Se,o as ve,s as Ee,t as Ce,u as Ie,v as Te,w as Ae,x as We,y as Le,z as De}from"./chunk-UGMLNICX.js";import{e as ye,f as ge}from"./chunk-ZPCVY23H.js";import{a as re,d as P,e as ie,f as _,i as q,s as R,u as he}from"./chunk-BJ4KWIQU.js";import{d as X,e as y,f as l,g as U,h as Z}from"./chunk-PXYDLKAG.js";import{$ as pe,X as ce,Z as de,_ as ue,aa as fe,ba as me,f as oe,i as ne,l as te,la as ke,ma as we,na as xe,oa as be,pa as Pe,ra as Re,s as le,w as se}from"./chunk-IBYVXKWZ.js";import"./chunk-63TU4VJ7.js";import Tn from"path";import{createClient as An}from"graphql-sse";import Wn,{AbortError as Ln}from"p-retry";import{graphql as V}from"gql.tada";import{graphql as Yr}from"gql.tada";import{print as Xr}from"graphql";async function Qe({config:e,cwd:r,headed:o,pool:n,runId:t,signal:i,testSlug:a,workClass:s,workflowSlug:c}){let d=await P(r);if(d.isErr())return await T(e,t,`lockfile:${d.error.kind}`),{kind:"dispatch-error",reason:{detail:`lockfile:${d.error.kind}`,type:"generic"}};let p=Vr(d.value,{testSlug:a,workflowSlug:c});if(p==null)return await T(e,t,`no-test:${c}/${a}`),{kind:"dispatch-error",reason:{detail:`no-test:${c}/${a}`,type:"generic"}};let u=await E({headed:o,workClass:s,task:()=>n.execute({headed:o,runId:t,testRef:p},i)});return!u.serverNotified&&u.outcome.kind==="error"&&await T(e,t,u.outcome.detail),u.outcome}function Vr(e,{testSlug:r,workflowSlug:o}){let t=e.workflows.find(i=>te(i.name)===o)?.tests.find(i=>i.slug===r);return t==null?void 0:le(t)}var Zr=6e4,eo=Yr(`
4
+ import{B as E,C,D as He,E as F,F as Me,H as Ue,I as _e,J as I,L as qe,M as Fe,N as Oe,O as $e,P as Ne,Q as T,S as je,T as Be,U as Ke,W as ze,X as Je,Y as O,b as ee,f as ae,i as k,m as Se,o as ve,s as Ee,t as Ce,u as Ie,v as Te,w as Ae,x as We,y as Le,z as De}from"./chunk-Q6NPLTSY.js";import{e as ye,f as ge}from"./chunk-ZPCVY23H.js";import{a as re,d as P,e as ie,f as _,i as q,s as R,u as he}from"./chunk-3JC4ZODN.js";import{d as X,e as y,f as l,g as U,h as Z}from"./chunk-PXYDLKAG.js";import{$ as pe,X as ce,Z as de,_ as ue,aa as fe,ba as me,f as oe,i as ne,l as te,la as ke,ma as we,na as xe,oa as be,pa as Pe,ra as Re,s as le,w as se}from"./chunk-OUOQU2Q2.js";import"./chunk-63TU4VJ7.js";import Tn from"path";import{createClient as An}from"graphql-sse";import Wn,{AbortError as Ln}from"p-retry";import{graphql as V}from"gql.tada";import{graphql as Yr}from"gql.tada";import{print as Xr}from"graphql";async function Qe({config:e,cwd:r,headed:o,pool:n,runId:t,signal:i,testSlug:a,workClass:s,workflowSlug:c}){let d=await P(r);if(d.isErr())return await T(e,t,`lockfile:${d.error.kind}`),{kind:"dispatch-error",reason:{detail:`lockfile:${d.error.kind}`,type:"generic"}};let p=Vr(d.value,{testSlug:a,workflowSlug:c});if(p==null)return await T(e,t,`no-test:${c}/${a}`),{kind:"dispatch-error",reason:{detail:`no-test:${c}/${a}`,type:"generic"}};let u=await E({headed:o,workClass:s,task:()=>n.execute({headed:o,runId:t,testRef:p},i)});return!u.serverNotified&&u.outcome.kind==="error"&&await T(e,t,u.outcome.detail),u.outcome}function Vr(e,{testSlug:r,workflowSlug:o}){let t=e.workflows.find(i=>te(i.name)===o)?.tests.find(i=>i.slug===r);return t==null?void 0:le(t)}var Zr=6e4,eo=Yr(`
5
5
  subscription RunRequestedWatch($devSessionId: String!) {
6
6
  runRequested(devSessionId: $devSessionId) {
7
7
  runId
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __ripploCreateRequire } from "node:module";
3
3
  const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
4
- import{ka as a,la as b,ma as c,na as d,oa as e,pa as f,qa as g,ra as h,sa as i,ta as j,ua as k,va as l}from"./chunk-IBYVXKWZ.js";import"./chunk-63TU4VJ7.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{ka as a,la as b,ma as c,na as d,oa as e,pa as f,qa as g,ra as h,sa as i,ta as j,ua as k,va as l}from"./chunk-OUOQU2Q2.js";import"./chunk-63TU4VJ7.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};
package/dist/index.js CHANGED
@@ -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 Wn,b as Hn,c as je,d as qn,e as Bn,f as Vn,g as lr}from"./chunk-36KDCDCR.js";import{A as nr,G as fe,K as rr,M as pt,O as or,P as Te,R as ir,V as sr,W as ar,X as dr,Y as cr,a as Zt,b as z,c as en,d as tn,e as dn,f as P,g as I,h as cn,i as g,j as J,k as _n,l as Fn,m as ut,n as Un,o as me,p as v,q as Kn,r as Jn,t as Qn,u as Xn,v as Yn,w as Zn,x as er,y as tr}from"./chunk-UGMLNICX.js";import{c as Ae}from"./chunk-ZPCVY23H.js";import{a as $,b as pe,c as F,e as rn,f as L,g as u,h as on,i as A,j as sn,k as an,l as ln,m as Mn,n as Ln,o as Nn,p as On,q as oe,r as Ie,s as Dn,t as K}from"./chunk-BJ4KWIQU.js";import{a as Ht,b as qt,c as Bt,d as Vt,e as c,f as Z,h as zt,i as Gt,j as T,k as Kt,l as Jt,m as lt,n as Qt,o as Xt,p as Yt}from"./chunk-PXYDLKAG.js";import{A as gn,B as dt,C as hn,D as yn,F as kn,G as wn,H as bn,I as vn,J as Sn,K as p,L as Rn,M as xn,R as Cn,T as $n,V as ct,W as Pn,Y as En,Z as In,a as nn,ca as An,d as ee,e as te,f as ne,fa as Ee,g as Pe,ga as jn,i as M,ja as Tn,l as G,t as re,u as un,ua as zn,va as Gn,x as pn,y as mn,z as fn}from"./chunk-IBYVXKWZ.js";import"./chunk-63TU4VJ7.js";import gf from"update-notifier";import hf from"yargs";import{hideBin as yf}from"yargs/helpers";function Me({current:e,latest:t}){return t==null?`ripplo v${e} (latest: unknown)`:t===e?`ripplo v${e} (latest)`:`ripplo v${e} (latest: v${t} \u2014 run \`npx ripplo update\`)`}function ur(){return"Update available {currentVersion} \u2192 {latestVersion}\nRun `npx ripplo update`"}import{graphql as ja}from"gql.tada";import{exec as ba}from"child_process";import{createAuthClient as ka}from"better-auth/client";import{deviceAuthorizationClient as wa}from"better-auth/client/plugins";function pr({baseURL:e}){return ka({baseURL:e,fetchOptions:{headers:{"User-Agent":"Ripplo CLI"}},plugins:[wa()]})}import{err as mr,ok as va}from"neverthrow";var Sa=5e3,fr="ripplo-cli";async function gr({onDeviceCode:e,url:t}){let n=t??cn().RIPPLO_SERVER_URL,r=pr({baseURL:n}),o=await r.device.code({client_id:fr});if(o.error!=null)return mr({description:o.error.error_description,kind:"oauth-device-code-failed"});let{device_code:i,user_code:s,verification_uri_complete:a}=o.data;return e({userCode:s,verificationUrl:a}),Ea(a),(await Ra({authClient:r,deviceCode:i})).map(l=>(Kt({serverUrl:n,token:l}),l))}async function Ra({authClient:e,deviceCode:t}){for(;;){await $a(Sa);let n=await e.device.token({client_id:fr,device_code:t,grant_type:"urn:ietf:params:oauth:grant-type:device_code"});if(n.data?.access_token!=null)return va(n.data.access_token);if(n.error==null)continue;if(!Ca(n.error.error))return mr({code:n.error.error,description:n.error.error_description,kind:"oauth-authorization-failed"})}}var xa=new Set(["authorization_pending","slow_down"]);function Ca(e){return xa.has(e)}function $a(e){return new Promise(t=>{setTimeout(t,e)})}function Pa(){return process.platform==="darwin"?"open":process.platform==="win32"?"start":"xdg-open"}function Ea(e){let t=Pa();ba(`${t} "${e}"`,()=>{})}function D({serverUrl:e,token:t}){return{appUrl:"",cwd:process.cwd(),engineUrl:"",projectId:"",ripploServerUrl:e,token:t,webhookSecret:""}}import Ia from"fs";import Aa from"path";function h(e){return Ia.existsSync(Aa.join(e,".ripplo"))}var Ta=ja(`
4
+ import{a as Wn,b as Hn,c as je,d as qn,e as Bn,f as Vn,g as lr}from"./chunk-2AFQ4C6G.js";import{A as nr,G as fe,K as rr,M as pt,O as or,P as Te,R as ir,V as sr,W as ar,X as dr,Y as cr,a as Zt,b as z,c as en,d as tn,e as dn,f as P,g as I,h as cn,i as g,j as J,k as _n,l as Fn,m as ut,n as Un,o as me,p as v,q as Kn,r as Jn,t as Qn,u as Xn,v as Yn,w as Zn,x as er,y as tr}from"./chunk-Q6NPLTSY.js";import{c as Ae}from"./chunk-ZPCVY23H.js";import{a as $,b as pe,c as F,e as rn,f as L,g as u,h as on,i as A,j as sn,k as an,l as ln,m as Mn,n as Ln,o as Nn,p as On,q as oe,r as Ie,s as Dn,t as K}from"./chunk-3JC4ZODN.js";import{a as Ht,b as qt,c as Bt,d as Vt,e as c,f as Z,h as zt,i as Gt,j as T,k as Kt,l as Jt,m as lt,n as Qt,o as Xt,p as Yt}from"./chunk-PXYDLKAG.js";import{A as gn,B as dt,C as hn,D as yn,F as kn,G as wn,H as bn,I as vn,J as Sn,K as p,L as Rn,M as xn,R as Cn,T as $n,V as ct,W as Pn,Y as En,Z as In,a as nn,ca as An,d as ee,e as te,f as ne,fa as Ee,g as Pe,ga as jn,i as M,ja as Tn,l as G,t as re,u as un,ua as zn,va as Gn,x as pn,y as mn,z as fn}from"./chunk-OUOQU2Q2.js";import"./chunk-63TU4VJ7.js";import gf from"update-notifier";import hf from"yargs";import{hideBin as yf}from"yargs/helpers";function Me({current:e,latest:t}){return t==null?`ripplo v${e} (latest: unknown)`:t===e?`ripplo v${e} (latest)`:`ripplo v${e} (latest: v${t} \u2014 run \`npx ripplo update\`)`}function ur(){return"Update available {currentVersion} \u2192 {latestVersion}\nRun `npx ripplo update`"}import{graphql as ja}from"gql.tada";import{exec as ba}from"child_process";import{createAuthClient as ka}from"better-auth/client";import{deviceAuthorizationClient as wa}from"better-auth/client/plugins";function pr({baseURL:e}){return ka({baseURL:e,fetchOptions:{headers:{"User-Agent":"Ripplo CLI"}},plugins:[wa()]})}import{err as mr,ok as va}from"neverthrow";var Sa=5e3,fr="ripplo-cli";async function gr({onDeviceCode:e,url:t}){let n=t??cn().RIPPLO_SERVER_URL,r=pr({baseURL:n}),o=await r.device.code({client_id:fr});if(o.error!=null)return mr({description:o.error.error_description,kind:"oauth-device-code-failed"});let{device_code:i,user_code:s,verification_uri_complete:a}=o.data;return e({userCode:s,verificationUrl:a}),Ea(a),(await Ra({authClient:r,deviceCode:i})).map(l=>(Kt({serverUrl:n,token:l}),l))}async function Ra({authClient:e,deviceCode:t}){for(;;){await $a(Sa);let n=await e.device.token({client_id:fr,device_code:t,grant_type:"urn:ietf:params:oauth:grant-type:device_code"});if(n.data?.access_token!=null)return va(n.data.access_token);if(n.error==null)continue;if(!Ca(n.error.error))return mr({code:n.error.error,description:n.error.error_description,kind:"oauth-authorization-failed"})}}var xa=new Set(["authorization_pending","slow_down"]);function Ca(e){return xa.has(e)}function $a(e){return new Promise(t=>{setTimeout(t,e)})}function Pa(){return process.platform==="darwin"?"open":process.platform==="win32"?"start":"xdg-open"}function Ea(e){let t=Pa();ba(`${t} "${e}"`,()=>{})}function D({serverUrl:e,token:t}){return{appUrl:"",cwd:process.cwd(),engineUrl:"",projectId:"",ripploServerUrl:e,token:t,webhookSecret:""}}import Ia from"fs";import Aa from"path";function h(e){return Ia.existsSync(Aa.join(e,".ripplo"))}var Ta=ja(`
5
5
  query AuthViewer {
6
6
  currentUser {
7
7
  name
@@ -323,7 +323,7 @@ Verify the dev session is live (\`npx ripplo doctor\`, ${u("start")}), or pass t
323
323
  }
324
324
  }
325
325
  `);function kc(e){return e[0]===gc&&e[1]===hc?cc(e):e}async function de(e,t){let n=bc.join(e,".ripplo","debug",t,"behavior.jsonl");return wc(n)?vc(void 0):(await Ye(e,t)).map(()=>{})}import{existsSync as yo,readFileSync as ko}from"fs";import wo from"path";import{err as Sc,ok as Rc}from"neverthrow";var bo=" \u203A ",xc=4e3,Cc=5,vo="fact ",So="step ",$c="data rule ";async function Ro(e,t){let n=wo.join(e,".ripplo","debug",t,"behavior.jsonl");if(!yo(n))return Sc({kind:"run-not-found",runId:t});let r=Pc(ko(n,"utf8")),o=Hc(e),i=o==null?[]:await hn(o),s=[...r.assertions.filter(a=>a.outcome!=="passed").map(a=>Mc({assertion:a,facts:i,lockfile:o,run:r})),...r.findings.map(a=>Ac({event:a,facts:i,lockfile:o,run:r}))];return Rc({durationMs:Math.max(0,r.lastTs-r.firstTs),failures:s,lockfileLoaded:o!=null,runId:t})}function Pc(e){let t=e.split(`
326
- `).filter(s=>s.trim().length>0).flatMap(s=>{let a=ee(s);return a==null?[]:[a]}),n=t.filter(s=>s.kind==="assertion"),r=t.filter(s=>s.kind==="finding"),o=t.flatMap(s=>Ec(s)),i=t.map(s=>te(s.timeNanos));return{assertions:n,causes:o,findings:r,firstTs:i.length===0?0:Math.min(...i),lastTs:i.length===0?0:Math.max(...i)}}function Ec(e){let t=Ic(e);return t==null?[]:[{detail:t,timestamp:te(e.timeNanos)}]}function Ic(e){return e.kind==="network"?{kind:"network",method:e.method,status:e.status,traceId:e.traceId,url:e.url}:e.kind==="console"?e.level==="error"||e.level==="warning"?{kind:"console",level:e.level,text:e.text}:null:e.kind==="error"?{kind:"error",message:e.message}:e.kind==="span"?{durationMs:e.durationMs,kind:"span",name:e.name,statusCode:e.status.code,traceId:e.traceId}:null}function Ac({event:e,facts:t,lockfile:n,run:r}){let o=te(e.timeNanos),i=e.payload,s=i.kind==="mismatch"?"fact":"unknown",a=i.kind==="mismatch"||i.kind==="pendingCheck";return{browserMismatch:void 0,causes:Po(r.causes,o),label:jc(i),outcome:"failed",pending:i.kind==="mismatch"?i.pending:void 0,ruleKind:s,rules:$o({check:xo(i),facts:t,lockfile:n,ruleKind:s}),runWorkflow:e.step.split(bo)[0]??e.step,snapshotAt:o,step:e.step,wait:a?i.wait:void 0,waitMs:a?i.waitMs:void 0}}function xo(e){return e.kind==="mismatch"?Co(e.mismatch):e.kind==="unrunnable"?e.reason:e.kind==="impossibleAction"?e.action:e.kind==="driverError"?e.errorKind:e.subject}function Co(e){return e.kind==="scalarMismatch"?e.subject:e.kind==="missingRow"||e.kind==="unexpectedRow"?`${e.entity} [${e.key}]`:`${e.entity}.${e.field} [${e.key}]`}function jc(e){return e.kind==="mismatch"?Tc(e.mismatch):e.kind==="pendingCheck"&&e.expected!=null?`${e.kind} ${e.subject}: expected ${e.expected}`:`${e.kind} ${xo(e)}`}function Tc(e){let t=Co(e);return e.kind==="missingRow"||e.kind==="unexpectedRow"?`${e.kind} ${t}`:`${e.kind} ${t}: expected ${e.expected}, got ${e.actual}`}function Mc({assertion:e,facts:t,lockfile:n,run:r}){let o=Lc(e.label),i=te(e.timeNanos);return{browserMismatch:void 0,causes:Po(r.causes,i),label:e.label,outcome:e.outcome==="error"?"error":"failed",pending:void 0,ruleKind:o,rules:$o({check:Nc(e.label,o),facts:t,lockfile:n,ruleKind:o}),runWorkflow:e.step.split(bo)[0]??e.step,snapshotAt:i,step:e.step,wait:e.wait,waitMs:e.waitMs}}function Lc(e){return e.startsWith(vo)?"fact":e.startsWith($c)?"data-rule":e.startsWith(So)?"step":"unknown"}function Nc(e,t){return t==="fact"?e.slice(vo.length):t==="step"?e.slice(So.length):e}function $o({check:e,facts:t,lockfile:n,ruleKind:r}){return r!=="fact"||n==null?[]:t.filter(o=>ct(o.consequence)===e).map(o=>({consequence:ct(o.consequence),origins:Oc(o.origin,n),provenance:Fc(o.origin),url:Rn(o.when),when:xn(o.when)}))}function Oc(e,t){let n=re(t),r=Dc(e).flatMap(o=>{let i=n.find(s=>s.ref===o);return i==null?[]:[{intent:i.workflow.intent,sourcePath:i.workflow.sourcePath}]});return _c(r)}function Dc(e){return e==null?[]:e.kind==="generalized"?mn(e):[e.test]}function _c(e){return[...new Map(e.map(t=>[t.intent,t])).values()]}function Fc(e){return e!=null&&e.kind==="generalized"?"learned":"inferred"}function Po(e,t){let n=e.filter(r=>r.timestamp<=t&&r.timestamp>=t-xc).toSorted((r,o)=>o.timestamp-r.timestamp);return Uc(n).toSorted((r,o)=>Number(ho(o.detail))-Number(ho(r.detail))).slice(0,Cc).map(r=>({deltaMs:t-r.timestamp,detail:r.detail}))}function Uc(e){return e.reduce((t,n)=>{let r=Wc(n.detail);return t.keys.has(r)?t:{keys:new Set([...t.keys,r]),out:[...t.out,n]}},{keys:new Set,out:[]}).out}function Wc(e){return e.kind==="network"?`net ${e.method} ${String(e.status)} ${e.url.split("?")[0]??""}`:e.kind==="console"?`console ${e.text}`:e.kind==="error"?`err ${e.message}`:`span ${e.name} ${e.statusCode}`}function ho(e){return e.kind==="network"?e.status>=400:e.kind==="span"?e.statusCode==="error":!0}function Hc(e){let t=wo.join(e,".ripplo","ripplo.lock");if(!yo(t))return null;try{return Pe(M,ko(t,"utf8"))}catch{return null}}var Eo=" \u203A ",qc=["fact ","data rule ","step "];function jo(e){if(e.failures.length===0)return`${p.good("ok")} \u2014 ${e.runId}: no failing checks.`;let t=`${e.runId} \u2014 ${w(e.failures.length,"failing check")}`,n=e.lockfileLoaded?[]:[p.dim("(no lockfile \u2014 provenance unavailable)")],r=Bc(e.failures).map(o=>Vc(o,e.runId));return[t,...n,"",...r,u("fuzz")].join(`
326
+ `).filter(s=>s.trim().length>0).flatMap(s=>{let a=ee(s);return a==null?[]:[a]}),n=t.filter(s=>s.kind==="assertion"),r=t.filter(s=>s.kind==="finding"),o=t.flatMap(s=>Ec(s)),i=t.map(s=>te(s.timeNanos));return{assertions:n,causes:o,findings:r,firstTs:i.length===0?0:Math.min(...i),lastTs:i.length===0?0:Math.max(...i)}}function Ec(e){let t=Ic(e);return t==null?[]:[{detail:t,timestamp:te(e.timeNanos)}]}function Ic(e){return e.kind==="network"?{kind:"network",method:e.method,status:e.status,traceId:e.traceId,url:e.url}:e.kind==="console"?e.level==="error"||e.level==="warning"?{kind:"console",level:e.level,text:e.text}:null:e.kind==="error"?{kind:"error",message:e.message}:e.kind==="span"?{durationMs:e.durationMs,kind:"span",name:e.name,statusCode:e.status.code,traceId:e.traceId}:null}function Ac({event:e,facts:t,lockfile:n,run:r}){let o=te(e.timeNanos),i=e.payload,s=i.kind==="mismatch"?"fact":"unknown",a=i.kind==="mismatch"||i.kind==="pendingCheck";return{browserMismatch:void 0,causes:Po(r.causes,o),label:jc(i),outcome:"failed",pending:i.kind==="mismatch"?i.pending:void 0,ruleKind:s,rules:$o({check:xo(i),facts:t,lockfile:n,ruleKind:s}),runWorkflow:e.step.split(bo)[0]??e.step,snapshotAt:o,step:e.step,wait:a?i.wait:void 0,waitMs:a?i.waitMs:void 0}}function xo(e){return e.kind==="mismatch"?Co(e.mismatch):e.kind==="unrunnable"?e.reason:e.kind==="impossibleAction"?e.action:e.kind==="driverError"?e.errorKind:e.subject}function Co(e){return e.kind==="scalarMismatch"?e.subject:e.kind==="missingRow"||e.kind==="unexpectedRow"?`${e.entity} [${e.key}]`:`${e.entity}.${e.field} [${e.key}]`}function jc(e){return e.kind==="mismatch"?Tc(e.mismatch):e.kind==="pendingCheck"&&e.expected!=null?`${e.kind} ${e.subject}: expected ${e.expected}`:`${e.kind} ${xo(e)}`}function Tc(e){let t=Co(e);return e.kind==="missingRow"||e.kind==="unexpectedRow"?`${e.kind} ${t}`:`${e.kind} ${t}: expected ${e.expected}, got ${e.actual}`}function Mc({assertion:e,facts:t,lockfile:n,run:r}){let o=Lc(e.label),i=te(e.timeNanos);return{browserMismatch:void 0,causes:Po(r.causes,i),label:e.label,outcome:e.outcome==="error"?"error":"failed",pending:void 0,ruleKind:o,rules:$o({check:Nc(e.label,o),facts:t,lockfile:n,ruleKind:o}),runWorkflow:e.step.split(bo)[0]??e.step,snapshotAt:i,step:e.step,wait:e.wait,waitMs:e.waitMs}}function Lc(e){return e.startsWith(vo)?"fact":e.startsWith($c)?"data-rule":e.startsWith(So)?"step":"unknown"}function Nc(e,t){return t==="fact"?e.slice(vo.length):t==="step"?e.slice(So.length):e}function $o({check:e,facts:t,lockfile:n,ruleKind:r}){return r!=="fact"||n==null?[]:t.filter(o=>ct(o.consequence)===e).map(o=>({consequence:ct(o.consequence),origins:Oc(o.origin,n),provenance:Fc(o.origin),url:Rn(o.when),when:xn(o.when)}))}function Oc(e,t){let n=re(t),r=Dc(e).flatMap(o=>{let i=n.find(s=>s.ref===o);return i==null?[]:[{intent:i.workflow.intent,sourcePath:i.workflow.sourcePath}]});return _c(r)}function Dc(e){return e==null?[]:e.kind==="declared"?[]:e.kind==="generalized"?mn(e):[e.test]}function _c(e){return[...new Map(e.map(t=>[t.intent,t])).values()]}function Fc(e){return e!=null&&e.kind==="generalized"?"learned":"inferred"}function Po(e,t){let n=e.filter(r=>r.timestamp<=t&&r.timestamp>=t-xc).toSorted((r,o)=>o.timestamp-r.timestamp);return Uc(n).toSorted((r,o)=>Number(ho(o.detail))-Number(ho(r.detail))).slice(0,Cc).map(r=>({deltaMs:t-r.timestamp,detail:r.detail}))}function Uc(e){return e.reduce((t,n)=>{let r=Wc(n.detail);return t.keys.has(r)?t:{keys:new Set([...t.keys,r]),out:[...t.out,n]}},{keys:new Set,out:[]}).out}function Wc(e){return e.kind==="network"?`net ${e.method} ${String(e.status)} ${e.url.split("?")[0]??""}`:e.kind==="console"?`console ${e.text}`:e.kind==="error"?`err ${e.message}`:`span ${e.name} ${e.statusCode}`}function ho(e){return e.kind==="network"?e.status>=400:e.kind==="span"?e.statusCode==="error":!0}function Hc(e){let t=wo.join(e,".ripplo","ripplo.lock");if(!yo(t))return null;try{return Pe(M,ko(t,"utf8"))}catch{return null}}var Eo=" \u203A ",qc=["fact ","data rule ","step "];function jo(e){if(e.failures.length===0)return`${p.good("ok")} \u2014 ${e.runId}: no failing checks.`;let t=`${e.runId} \u2014 ${w(e.failures.length,"failing check")}`,n=e.lockfileLoaded?[]:[p.dim("(no lockfile \u2014 provenance unavailable)")],r=Bc(e.failures).map(o=>Vc(o,e.runId));return[t,...n,"",...r,u("fuzz")].join(`
327
327
  `)}function To(e){return`${p.bad("fail")} \u2014 no artifacts for ${e.runId}. Run \`npx ripplo pull ${e.runId}\` first.`}function Bc(e){return[...new Set(e.map(n=>n.step))].map(n=>({failures:e.filter(r=>r.step===n),step:n}))}function Vc(e,t){let n=e.failures[0];if(n==null)return"";let r=zc(e,t);if(r!=null)return r;let o=[...new Set(e.failures.map(s=>Lo(s.label)))].join(", "),i=p.dim(`(${n.runWorkflow})`);return[`${p.bad("\u2717")} ${Kc(e.step)} ${i}`,` ${p.dim("failed")} ${o}`,...Jc(e),...eu(n),...tu(n.causes),` ${p.dim("frame")} npx ripplo snapshot ${t} --at ${String(n.snapshotAt)}`,""].join(`
328
328
  `)}function zc(e,t){let n=e.failures[0],r=e.failures.flatMap(l=>l.browserMismatch==null?[]:[l.browserMismatch])[0],o=Mo(e.failures.flatMap(l=>l.rules));if(n==null||r==null||o.length===0)return null;let i=Lo(e.failures.find(l=>l.rules.length>0)?.label??n.label),s=[...new Set(o.map(l=>l.url))].join(", "),a=p.dim(`(${n.runWorkflow})`);return[`${p.bad("\u2717")} ${i} ${p.warn("(wrong page)")} ${a}`,` ${p.dim("rule learned for url")} ${s}`,` ${p.dim("browser was actually at")} ${r.actual}`,` ${p.warn("\u21B3 declare the navigation: add url.path`...` to the step that caused it")}`,` ${p.dim("frame")} npx ripplo snapshot ${t} --at ${String(n.snapshotAt)}`,""].join(`
329
329
  `)}function Mo(e){let t=e.map(n=>[Gc(n),n]);return[...new Map(t).values()]}function Gc(e){return`${e.url}|${e.when}|${e.origins.map(t=>t.intent).join(",")}`}function Lo(e){let t=qc.find(n=>e.startsWith(n));return t==null?e:e.slice(t.length)}function Kc(e){let t=e.split(Eo);return t.length<2?e:t.slice(1).join(Eo)}function Jc(e){let t=Mo(e.failures.flatMap(n=>n.rules));return t.length===0?[]:[...t.flatMap(n=>Qc(n)),...Zc(e,t)]}function Qc(e){let t=e.origins.length===0?p.dim("origin not in lockfile"):e.origins.map(n=>Xc(n)).join(", ");return[` ${p.dim(Yc(e.provenance))}`,` ${p.dim("from")} ${t}`,` ${p.dim("at")} ${e.url} ${p.dim("\u2014 holds only when")} ${e.when}`]}function Xc(e){if(e.sourcePath==null)return e.intent;let t=p.dim(`(${e.sourcePath})`);return`${e.intent} ${t}`}function Yc(e){return e==="learned"?"learned \u2014 kept only the conditions these flows share, so it checks anywhere they hold":"inferred \u2014 asserted in another flow that reaches this same state"}function Zc(e,t){let n=new Set(t.flatMap(o=>o.origins.map(i=>i.intent)));return e.failures.some(o=>n.has(o.runWorkflow))||n.size===0?[]:[` ${p.warn("\u21B3 learned from another flow \u2014 likely a fact scoped too broadly")}`]}function eu(e){if(e.waitMs==null||e.wait==null)return[];let t=`${String(Math.round(e.waitMs/1e3))}s`,n=e.pending===!0?" \u2014 value never changed (write may be slow or dropped)":"";return[` ${p.dim("waited")} up to ${t} (wait: ${e.wait})${n}`]}function tu(e){if(e.length===0)return[];let t=nu(e),n=e.flatMap(r=>ru(r,t));return n.length===0?[]:[` ${p.dim("nearby")} ${n.join(" \xB7 ")}`]}function nu(e){let t=e.flatMap(n=>n.detail.kind==="span"&&n.detail.traceId!=null?[[n.detail.traceId,n.detail]]:[]);return new Map(t)}function ru(e,t){let n=e.detail;if(n.kind==="span"&&n.traceId!=null&&t.has(n.traceId))return[];if(n.kind==="network"&&n.traceId!=null){let r=t.get(n.traceId),o=r==null?"":` \u21B9 ${Et(r)}`;return[Ao(n,`${Et(n)}${o}`)]}return[Ao(n,Et(n))]}function Et(e){return e.kind==="network"?`${e.method} ${String(e.status)} ${ou(e.url)}`:e.kind==="console"?`console.${e.level} ${Io(e.text)}`:e.kind==="error"?`error ${Io(e.message)}`:`span ${e.name} ${e.statusCode} ${String(Math.round(e.durationMs))}ms`}function ou(e){let t=e.split("?")[0]??e;return t.length>60?`\u2026${t.slice(-57)}`:t}function Io(e){let t=e.replaceAll(/\s+/g," ").trim();return t.length>100?`${t.slice(0,97)}\u2026`:t}function Ao(e,t){return iu(e)?p.bad(t):t}function iu(e){return e.kind==="network"?e.status>=400:e.kind==="console"?e.level==="error":e.kind==="error"||e.statusCode==="error"}function No(e){return`Saved behavior.jsonl to ${e.path}`}function ce(e){switch(e.kind){case"config":return`Can't read project config (${e.detail}). Run this from your project root.`;case"request-failed":return"Couldn't reach the server. Check you're signed in with `npx ripplo auth`.";case"not-found":return"No run with that id.";case"not-uploaded":return"This run has no uploaded artifacts yet \u2014 it may still be running, or predates artifact upload.";case"download-failed":return`Download failed (HTTP ${String(e.status)}). The link may have expired \u2014 try again.`}}async function Oo({json:e,runId:t}){let n=await de(process.cwd(),t);n.isErr()&&(process.stderr.write(`${ce(n.error)}
@@ -420,7 +420,7 @@ ${e.findings.map(r=>Cn({evidencePath:void 0,finding:r})).join(`
420
420
  `);return}Vu(e)}function Vu(e){let t=`ripplo@${e}`,n=_u("npm",["install","-g",t],{stdio:"inherit"});if(n.status!==0){let r=`exit ${String(n.status)}`;process.stderr.write(`${Ii(r)}
421
421
  `),process.exit(1)}process.stdout.write(`${At({evicted:0,latest:e,mode:"global"})}
422
422
  `)}async function zu(e){if((await Vn(e)).kind==="not-running")return;let n=await qn(e);process.stdout.write(`${Ai(n)}
423
- `)}async function Ti({action:e}){if(e==="status"){let{statusCommand:n}=await import("./status-QZDTM3TV.js");await n({format:"summary"});return}if(e==="stop"||e==="restart"){let n=await Gu();(e==="stop"||!n)&&process.exit(n?0:1)}Ku();let{runDaemon:t}=await import("./daemon-UJWCVIPV.js");await t()}async function Gu(){let{stopDevDaemon:e}=await import("./daemon-lock-6NG7JHQO.js"),{renderDaemonStopResult:t}=await import("./daemon-OLCA67M3.js"),n=await e(process.cwd());return process.stdout.write(`${t(n)}
423
+ `)}async function Ti({action:e}){if(e==="status"){let{statusCommand:n}=await import("./status-K7LW3M23.js");await n({format:"summary"});return}if(e==="stop"||e==="restart"){let n=await Gu();(e==="stop"||!n)&&process.exit(n?0:1)}Ku();let{runDaemon:t}=await import("./daemon-4H2AMVM3.js");await t()}async function Gu(){let{stopDevDaemon:e}=await import("./daemon-lock-6NG7JHQO.js"),{renderDaemonStopResult:t}=await import("./daemon-MIKO7PSF.js"),n=await e(process.cwd());return process.stdout.write(`${t(n)}
424
424
  `),n.kind!=="timeout"}function Ku(){let e=Ke(Ge());e!=null&&process.stderr.write(`${e}
425
425
  `)}function Mi(e){return`executor: ${e}`}function Li(e){return e==="cloud"?"executor set to cloud \u2014 the daemon is bringing the tunnel up, the next run dispatches to the cloud fleet":"executor set to local \u2014 the next run executes on this machine"}function Ni(e){switch(e.kind){case"no-session":return"No active dev session for this directory. Start `npx ripplo daemon` first.";case"session-ended":return"The dev session ended before the switch landed. Check `npx ripplo daemon status` and try again.";case"empty-response":return"The server returned no result for the switch. Try again."}}async function Oi({mode:e}){let t=g(process.cwd()).match(r=>r,r=>{process.stderr.write(`${P(r)}
426
426
  `),process.exit(1)});(e==null?await dr(t):await cr(t,e)).match(r=>{process.stdout.write(`${e==null?Mi(r):Li(r)}
@@ -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{g as a}from"./chunk-36KDCDCR.js";import"./chunk-BJ4KWIQU.js";import"./chunk-PXYDLKAG.js";import"./chunk-IBYVXKWZ.js";import"./chunk-63TU4VJ7.js";export{a as statusCommand};
4
+ import{g as a}from"./chunk-2AFQ4C6G.js";import"./chunk-3JC4ZODN.js";import"./chunk-PXYDLKAG.js";import"./chunk-OUOQU2Q2.js";import"./chunk-63TU4VJ7.js";export{a as statusCommand};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ripplo",
3
- "version": "0.7.54",
3
+ "version": "0.7.55",
4
4
  "description": "CLI for Ripplo — AI-powered end-to-end testing",
5
5
  "type": "module",
6
6
  "homepage": "https://ripplo.ai",
@@ -69,12 +69,12 @@
69
69
  "vitest": "^4.1.4",
70
70
  "@ripplo/core": "^0.0.0",
71
71
  "@ripplo/eslint-config": "0.0.0",
72
- "@ripplo/solver": "^0.0.0",
73
- "@ripplo/run-report": "0.0.0",
74
72
  "@ripplo/runtime": "^0.0.0",
73
+ "@ripplo/graphql": "^0.0.0",
74
+ "@ripplo/solver": "^0.0.0",
75
75
  "@ripplo/spec": "^0.0.0",
76
- "@ripplo/rrweb-bundle": "0.0.0",
77
- "@ripplo/graphql": "^0.0.0"
76
+ "@ripplo/run-report": "0.0.0",
77
+ "@ripplo/rrweb-bundle": "0.0.0"
78
78
  },
79
79
  "scripts": {
80
80
  "dev": "tsx watch src/index.ts",