ripplo 0.10.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +105 -47
- package/dist/assets/rrweb-replay.js +1 -1
- package/dist/assets/rrweb.js +1 -1
- package/dist/capture-worker.js +20 -14
- package/dist/chunk-2TA4WDEE.js +4 -0
- package/dist/{chunk-5E62BCS7.js → chunk-47LLHHJH.js} +2 -2
- package/dist/chunk-4LXIRKM7.js +4 -0
- package/dist/chunk-5HFJIZLI.js +4 -0
- package/dist/chunk-5HZ2LDFS.js +83 -0
- package/dist/chunk-5VXXRMJU.js +354 -0
- package/dist/chunk-6U2LNGSV.js +51 -0
- package/dist/{chunk-LL4HUOJP.js → chunk-6WFJZ5L6.js} +1 -1
- package/dist/chunk-7JKCHASU.js +4 -0
- package/dist/{chunk-WNAVYV4P.js → chunk-AXROBTLA.js} +1 -1
- package/dist/chunk-BGY5F3IU.js +5 -0
- package/dist/{chunk-IPSXNIXC.js → chunk-C7SV6AR2.js} +4 -4
- package/dist/chunk-CI6273ZU.js +107 -0
- package/dist/chunk-D6TS77JP.js +8 -0
- package/dist/{chunk-QAR7FZO3.js → chunk-EEOTA6M4.js} +1 -1
- package/dist/{chunk-UDPKOYZT.js → chunk-EQORLKHG.js} +1 -1
- package/dist/chunk-F4P36OMG.js +9 -0
- package/dist/chunk-G6J2WIHJ.js +4 -0
- package/dist/{chunk-LOEAZGYO.js → chunk-HEOMRXZE.js} +1 -1
- package/dist/{chunk-7W237JFM.js → chunk-JS3DLVVI.js} +1 -1
- package/dist/{chunk-TPHOSZAK.js → chunk-KH4QH23U.js} +1 -1
- package/dist/{chunk-43C7VPGA.js → chunk-LWMXGWS2.js} +1 -1
- package/dist/{chunk-YQ2RBEOJ.js → chunk-PXXURBGC.js} +2 -2
- package/dist/{chunk-OAU4HUD2.js → chunk-PYDYI3AA.js} +2 -2
- package/dist/{chunk-R3DZ6JPY.js → chunk-RIASQHPG.js} +1 -1
- package/dist/chunk-ROO3KF74.js +6 -0
- package/dist/chunk-SXVWB7TZ.js +6 -0
- package/dist/{chunk-4OSYMIH6.js → chunk-UC54UNEX.js} +1 -1
- package/dist/{chunk-5X4M4MTG.js → chunk-UFXH75WD.js} +3 -3
- package/dist/chunk-WAGXAEB4.js +13 -0
- package/dist/{chunk-CEVQ5RNC.js → chunk-WCMWNWNM.js} +2 -2
- package/dist/{chunk-AGK6XOX2.js → chunk-XAMVRZJH.js} +2 -2
- package/dist/chunk-ZHDR7LXB.js +56 -0
- package/dist/chunk-ZM2UPFCR.js +7 -0
- package/dist/{cli-error-AHNJULLG.js → cli-error-6PUIWNIT.js} +1 -1
- package/dist/{compile-write-OLQOR3OK.js → compile-write-N3PWYUKE.js} +1 -1
- package/dist/daemon-SAV2CLXD.js +4 -0
- package/dist/daemon-X77GWCFM.js +152 -0
- package/dist/{daemon-lock-OAARBZ4O.js → daemon-lock-RPKO5SNE.js} +1 -1
- package/dist/dsl-loader-WPAKMON7.js +4 -0
- package/dist/dsl-typecheck-worker.js +6 -0
- package/dist/{exit-plan-gate-CJ3IXWTN.js → exit-plan-gate-44YWEKYS.js} +1 -1
- package/dist/hook.js +1 -1
- package/dist/index.js +211 -260
- package/dist/{plan-reminder-EPCNBFY3.js → plan-reminder-YX375SPX.js} +1 -1
- package/dist/post-edit-7W6AHXE6.js +4 -0
- package/dist/post-edit-analyze-PO54GIZ3.js +4 -0
- package/dist/post-edit-flag-stubs-G3G2FO6Z.js +4 -0
- package/dist/pre-bash-run-gate-MIEM2DBB.js +4 -0
- package/dist/pre-edit-C4MGURNO.js +4 -0
- package/dist/pre-edit-ripplo-skill-gate-A6ETC3QN.js +4 -0
- package/dist/pre-edit-scope-gate-M5IQSVGF.js +4 -0
- package/dist/{pre-edit-watch-gate-BUFWLXR3.js → pre-edit-watch-gate-ORQP7MSW.js} +1 -1
- package/dist/prompt-submit-YOKR2RQN.js +4 -0
- package/dist/scope-reminder-A6GVTTVE.js +4 -0
- package/dist/session-preamble-IZQPIWST.js +4 -0
- package/dist/status-HOJW4C3O.js +4 -0
- package/dist/{stop-enforce-4XV6LK7Z.js → stop-enforce-JT3SWBU4.js} +9 -9
- package/dist/tasks-reminder-TDWPD3KV.js +4 -0
- package/dist/{track-skill-load-CJ74GD3Q.js → track-skill-load-SXSDMHFO.js} +1 -1
- package/dist/{track-skill-prompt-YSB6OOQN.js → track-skill-prompt-7N4TQAD2.js} +1 -1
- package/package.json +3 -5
- package/dist/chunk-26A42N75.js +0 -55
- package/dist/chunk-44GHUVW6.js +0 -8
- package/dist/chunk-67YR3QHA.js +0 -6
- package/dist/chunk-6NKSEWP6.js +0 -224
- package/dist/chunk-6TCK75ER.js +0 -83
- package/dist/chunk-73TKORK6.js +0 -8
- package/dist/chunk-CB74TAUC.js +0 -5
- package/dist/chunk-FXCBWBN5.js +0 -4
- package/dist/chunk-GOZWOCTE.js +0 -7
- package/dist/chunk-IONMYZ3K.js +0 -4
- package/dist/chunk-LB65USNP.js +0 -73
- package/dist/chunk-M3CXHDFV.js +0 -9
- package/dist/chunk-MOI4L3EX.js +0 -4
- package/dist/chunk-N2OBRCPQ.js +0 -6
- package/dist/chunk-OWN4P2K7.js +0 -4
- package/dist/chunk-SNU66GSR.js +0 -4
- package/dist/chunk-VDAFHS7J.js +0 -7
- package/dist/chunk-VOZOP7MQ.js +0 -55
- package/dist/daemon-BJAGK2Q3.js +0 -152
- package/dist/daemon-H4P5PCVH.js +0 -4
- package/dist/dsl-loader-LXH6PUY5.js +0 -4
- package/dist/post-edit-ZVCYZ62V.js +0 -4
- package/dist/post-edit-analyze-J2H3I3IO.js +0 -4
- package/dist/post-edit-flag-stubs-E22KT2LD.js +0 -4
- package/dist/pre-bash-run-gate-B42YNDQF.js +0 -4
- package/dist/pre-edit-TEN3AFRK.js +0 -4
- package/dist/pre-edit-ripplo-skill-gate-QHUD7QGU.js +0 -4
- package/dist/pre-edit-scope-gate-2YIFSEDY.js +0 -4
- package/dist/prompt-submit-DJFWNGYC.js +0 -4
- package/dist/scope-reminder-DIDCHDAA.js +0 -4
- package/dist/session-preamble-ZYVRDSGA.js +0 -4
- package/dist/status-FDM2RK37.js +0 -4
- package/dist/tasks-reminder-SDS6RNLP.js +0 -4
package/dist/chunk-73TKORK6.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{a as n}from"./chunk-MHNGR6M7.js";import{h as o,i as a,k as i}from"./chunk-67YR3QHA.js";function c(e){return[`Compilation failed: ${s(e)}`,n("create","DSL authoring rules")].join(`
|
|
5
|
-
`)}function m(){return`${i} is up to date`}function g(e){return[`${i} is ${e==="missing"?"missing":"out of date"} \u2014 run \`npx ripplo compile\` and commit it`,n("setup")].join(`
|
|
6
|
-
`)}function x(){return`Wrote ${i}`}function s(e){switch(e.kind){case"typecheck-failed":return["TypeScript errors in .ripplo/:",...l(e.diagnostics)].join(`
|
|
7
|
-
`);case"not-ripplo":return`${e.entryPath} must default-export createRipplo({ entities, singletons, workflows }).`;case"invalid-lockfile":return["Lockfile failed schema validation (stale or hand-edited .ripplo/ripplo.lock):",...l(e.issues),"Regenerate with `npx ripplo compile`."].join(`
|
|
8
|
-
`);case"load-threw":return`.ripplo/index.ts threw while loading: ${e.message}`;case"fixture-failed":return u(e.error);case"expand-failed":return`Could not resolve tests for workflow "${e.workflow}": ${e.message}`}}function l(e,t=8){return e.length<=t?e:[...e.slice(0,t),`\u2026 and ${String(e.length-t)} more`]}function u(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 ${r(e.size)} \u2014 over the ${r(o)} per-file limit.`;case"fixtures-total-too-large":return`Fixtures total ${r(e.total)} \u2014 over the ${r(a)} limit.`}}function r(e){return`${String(Math.round(e/(1024*1024)*10)/10)} MB`}export{c as a,m as b,g as c,x as d};
|
package/dist/chunk-CB74TAUC.js
DELETED
|
@@ -1,5 +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 s,c as u}from"./chunk-TPHOSZAK.js";import{createHash as d}from"crypto";import{mkdirSync as h,readdirSync as g,readFileSync as p,writeFileSync as m}from"fs";import i from"path";var l=[".ts",".tsx",".js",".jsx"],y=new Set([".local","debug"]);function v(r){let t=d("sha256");return u(r)?(t.update(s(["rev-parse","HEAD"],r)),t.update("\0"),t.update(s(["diff","HEAD"],r)),t.update("\0"),s(["ls-files","--others","--exclude-standard"],r).split(`
|
|
5
|
-
`).filter(e=>e.length>0).filter(e=>l.some(n=>e.endsWith(n))).toSorted((e,n)=>e.localeCompare(n)).forEach(e=>{t.update(e),t.update("\0"),t.update(c(i.join(r,e))),t.update("\0")}),t.digest("hex")):S(r,t)}function A(r,t){try{return p(f(r,t),"utf8").trim()}catch{return null}}function D(r,t,o){let e=f(r,t);h(i.dirname(e),{recursive:!0}),m(e,o)}function S(r,t){let o=i.join(r,".ripplo");return x(o).filter(n=>l.some(a=>n.endsWith(a))).filter(n=>!y.has(n.split(i.sep)[0]??"")).toSorted((n,a)=>n.localeCompare(a)).forEach(n=>{t.update(n),t.update("\0"),t.update(c(i.join(o,n))),t.update("\0")}),t.digest("hex")}function x(r){try{return g(r,{recursive:!0}).filter(t=>typeof t=="string")}catch{return[]}}function c(r){try{return p(r)}catch{return Buffer.alloc(0)}}function f(r,t){return i.join(r,".ripplo",".local",`${t}.hash`)}export{v as a,A as b,D as c};
|
package/dist/chunk-FXCBWBN5.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 b,b as h,c as m,d as s,e as a,f as w,j as E,k as L,n as O}from"./chunk-67YR3QHA.js";import{q as j,t as R}from"./chunk-6TCK75ER.js";import{F as v,P as p,Q as u,W as c,X as k,ga as S,ha as g,ja as P,ka as x}from"./chunk-26A42N75.js";import{readFile as q,writeFile as I}from"fs/promises";import M from"path";import{err as y,ok as J}from"neverthrow";import F from"safe-stable-stringify";function f(e){return{...e,checks:void 0}}function C(e,o){return F(f(e))===F(f(o))}import{z as i}from"zod";function A({context:e,cwd:o}){let t=D.safeParse(s({cwd:o,key:d(e),kind:"verdicts"}));t.success&&(P(e,new Map(Object.entries(t.data.cosat))),S(e,new Map(Object.entries(t.data.subsume))))}function H({context:e,cwd:o}){let t=x(e),r=g(e);a({cwd:o,keep:8,key:d(e),kind:"verdicts",value:{cosat:Object.fromEntries(t),subsume:Object.fromEntries(r)}})}function oe({context:e,cwd:o}){let t=W.safeParse(s({cwd:o,key:d(e),kind:"lint-clean"}));return t.success?t.data.cleanLockfile:void 0}function te({cleanLockfileHash:e,context:o,cwd:t}){e!=null&&a({cwd:t,keep:8,key:d(o),kind:"lint-clean",value:{cleanLockfile:e}})}function re(e){return b(e)}var D=i.object({cosat:i.record(i.string(),i.boolean()),subsume:i.record(i.string(),i.boolean())}),W=i.object({cleanLockfile:i.string()});function d(e){return m(["model",w(e)])}import T from"safe-stable-stringify";async function he(e){let o=await O(e);return o.isOk()&&await _(e,o.value),o}async function _(e,o){let t=await z(e,o),r=p(c,t);return await I(M.join(e,L),r),E(e,r),t}var K=new WeakMap;function z(e,o){let t=K.get(o);if(t!=null)return t;let r=V(e,o).then(n=>n.match(l=>Promise.resolve(l),()=>G(e,o)));return K.set(o,r),r}function Le(e,o){return V(e,o)}function Ce(e){return e.workflows.filter(o=>o.stub).map(o=>o.name)}async function ye(e,o){let t=await B(e);return t==null?"missing":t.checks==null?"stale":C(t,o)?"match":"stale"}async function V(e,o){let t=await B(e);return t==null?y({kind:"no-lockfile"}):t.checks==null||t.checks.epoch!==h()?y({kind:"unstamped"}):C(t,o)?J(k(t)):y({kind:"dsl-drift"})}async function B(e){try{let o=await q(M.join(e,L),"utf8");return u(c,o)}catch{return null}}function G(e,o){let t=j(o);A({context:t,cwd:e});let r={...N(e,o),epoch:h()};H({context:t,cwd:e});let n={...o,checks:r};return k(u(c,p(c,n)))}function N(e,o){let t=T(f(o)),r=m(["checks",t]),n=v.safeParse(s({cwd:e,key:r,kind:"checks"}));if(n.success)return n.data;let l=R(o);return a({cwd:e,keep:4,key:r,kind:"checks",value:l}),l}export{A as a,H as b,oe as c,te as d,re as e,f,C as g,he as h,_ as i,z as j,Le as k,Ce as l,ye as m};
|
package/dist/chunk-GOZWOCTE.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{c as s}from"./chunk-LOEAZGYO.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-CJ3IXWTN.js").then(o=>o.exitPlanGateHook),"plan-reminder":()=>import("./plan-reminder-EPCNBFY3.js").then(o=>t("UserPromptSubmit",o.planReminder)),"post-edit":()=>import("./post-edit-ZVCYZ62V.js").then(o=>o.postEditHook),"post-edit-analyze":()=>import("./post-edit-analyze-J2H3I3IO.js").then(o=>t("PostToolUse",o.postEditAnalyze)),"post-edit-flag-stubs":()=>import("./post-edit-flag-stubs-E22KT2LD.js").then(o=>t("PostToolUse",o.postEditFlagStubs)),"pre-bash-run-gate":()=>import("./pre-bash-run-gate-B42YNDQF.js").then(o=>o.preBashRunGateHook),"pre-edit":()=>import("./pre-edit-TEN3AFRK.js").then(o=>o.preEditHook),"pre-edit-ripplo-skill-gate":()=>import("./pre-edit-ripplo-skill-gate-QHUD7QGU.js").then(o=>t("PreToolUse",o.preEditRipploSkillGate)),"pre-edit-scope-gate":()=>import("./pre-edit-scope-gate-2YIFSEDY.js").then(o=>t("PreToolUse",o.preEditScopeGate)),"pre-edit-watch-gate":()=>import("./pre-edit-watch-gate-BUFWLXR3.js").then(o=>t("PreToolUse",o.preEditWatchGate)),"prompt-submit":()=>import("./prompt-submit-DJFWNGYC.js").then(o=>o.promptSubmitHook),"scope-reminder":()=>import("./scope-reminder-DIDCHDAA.js").then(o=>t("UserPromptSubmit",o.scopeReminder)),"session-preamble":()=>import("./session-preamble-ZYVRDSGA.js").then(o=>o.sessionPreambleHook),"stop-enforce":()=>import("./stop-enforce-4XV6LK7Z.js").then(o=>o.stopEnforceHook),"tasks-reminder":()=>import("./tasks-reminder-SDS6RNLP.js").then(o=>t("UserPromptSubmit",o.tasksReminder)),"tasks-reminder-tool":()=>Promise.resolve(t("PostToolUse",()=>{})),"track-skill-load":()=>import("./track-skill-load-CJ74GD3Q.js").then(o=>o.trackSkillLoadHook),"track-skill-prompt":()=>import("./track-skill-prompt-YSB6OOQN.js").then(o=>t("UserPromptSubmit",o.trackSkillPrompt))},n=d;async function P(o){let e=n[o];e==null&&(process.stderr.write(`Unknown hook: ${o}
|
|
6
|
-
`),process.exit(1));let i=await m(),r=await p(await e(),i);if(r.kind==="crash"){let{renderHookCrash:a}=await import("./cli-error-AHNJULLG.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-IONMYZ3K.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{j as l}from"./chunk-IPSXNIXC.js";import{spawnSync as y}from"child_process";import{existsSync as s,readdirSync as d,readFileSync as g,realpathSync as u,statSync as m}from"fs";import i from"path";var h=2e3;function D(t){if(t!=null)try{return m(u(t)).mtimeMs}catch{return}}function W(t){return y("pnpm",["turbo","run","build","--filter=ripplo..."],{cwd:t,stdio:"inherit"}).status===0}function T(){let t=process.argv[1];if(t==null)return{kind:"fresh"};let o=u(t),r=o.includes(`${i.sep}src${i.sep}`),n=c(i.dirname(o));if(n!=null)return r?{kind:"fresh"}:k(n);let a=c(process.cwd());return a!=null&&j(a)?{kind:"foreign-binary",workspaceRoot:a}:{kind:"fresh"}}function c(t){let o=i.dirname(t);return s(i.join(t,"pnpm-workspace.yaml"))?t:o===t?void 0:c(o)}function k(t){let o=i.join(t,"packages");if(!s(o))return{kind:"fresh"};let r=d(o).map(n=>({dist:i.join(o,n,"dist"),name:n,src:i.join(o,n,"src")})).filter(n=>s(n.src)&&s(n.dist)).filter(n=>p(n.src)>p(n.dist)+h).map(n=>n.name);return r.length===0?{kind:"fresh"}:{kind:"stale",packages:r,workspaceRoot:t}}function p(t){let o=m(t);if(!o.isDirectory())return o.mtimeMs;let r=d(t).map(n=>p(i.join(t,n)));return Math.max(o.mtimeMs,...r)}function j(t){let o=i.join(t,"packages","cli","package.json");if(!s(o))return!1;let r=JSON.parse(g(o,"utf8"));return typeof r=="object"&&r!=null&&"name"in r&&r.name==="ripplo"}import{createHash as x}from"crypto";import S from"os";import R from"path";import{createMessageConnection as E,NotificationType as f,RequestType as w,RequestType0 as b,SocketMessageReader as P,SocketMessageWriter as M}from"vscode-jsonrpc/node";import{z as e}from"zod";var q="daemon.log";function H(t){let o=x("sha256").update(t).digest("hex").slice(0,16);return R.join(S.tmpdir(),`ripplo-${o}.sock`)}function V(t){return l(t,q)}function Q(t){return E(new P(t),new M(t))}var Y=e.object({all:e.boolean(),headed:e.boolean(),tests:e.array(e.string())}),Z=e.object({jobId:e.string(),total:e.number()}),I=e.enum(["no-lockfile","unstamped","dsl-drift","load-failed"]),v=e.discriminatedUnion("kind",[e.object({kind:e.literal("off")}),e.object({kind:e.literal("on")}),e.object({kind:e.literal("paused")}),e.object({kind:e.literal("blocked"),reason:I})]),C=e.object({attempts:e.number(),findings:e.number()}),ee=e.object({active:e.number(),bundleMtimeMs:e.number().optional(),explorer:v,exploring:e.number(),progress:C,queued:e.number(),sseHealth:e.object({detail:e.string().optional(),ok:e.boolean()}).optional(),version:e.string().optional()}),z=e.enum(["MAX_RUNS","OVERAGE_CAP","MAX_AGENTS","MAX_CONCURRENT_RUNS","MAX_PROJECTS","CLOUD_EXECUTOR","REVIEW_QUOTA","MEMBER_CEILING"]),A=e.discriminatedUnion("type",[e.object({code:z,type:e.literal("limit")}),e.object({detail:e.string(),type:e.literal("generic")})]),N=e.discriminatedUnion("kind",[e.object({kind:e.literal("pass")}),e.object({findingLines:e.array(e.string()),kind:e.literal("findings")}),e.object({detail:e.string(),kind:e.literal("error")}),e.object({kind:e.literal("dispatch-error"),reason:A}),e.object({detail:e.string(),kind:e.literal("dispatch-timeout")}),e.object({detail:e.string(),kind:e.literal("infra-error")})]),O=e.discriminatedUnion("kind",[e.object({kind:e.literal("test-started"),runId:e.string(),testName:e.string(),workflowName:e.string()}),e.object({kind:e.literal("test-outcome"),outcome:N,runId:e.string(),testName:e.string(),workflowName:e.string()})]),te=e.object({event:O,jobId:e.string()}),oe=e.object({failed:e.number(),jobId:e.string(),notRun:e.number(),passed:e.number()}),ne=e.discriminatedUnion("code",[e.object({code:e.literal("compile-failed"),detail:e.string(),diagnostics:e.array(e.string()).default([])}),e.object({code:e.literal("selection-conflicting-flags")}),e.object({code:e.literal("selection-nothing-selected")}),e.object({code:e.literal("selection-unknown-ids"),known:e.array(e.string()),unknown:e.array(e.string())}),e.object({code:e.literal("scope-failed"),detail:e.string()}),e.object({code:e.literal("app-unreachable"),detail:e.string(),url:e.string()}),e.object({code:e.literal("engine-unreachable"),detail:e.string(),url:e.string()}),e.object({code:e.literal("sync-failed"),detail:e.string()}),e.object({code:e.literal("bad-message")})]),re=new w("ripplo/enqueue"),ie=new b("ripplo/status"),se=new b("ripplo/shutdownIfIdle"),ae=new f("ripplo/jobEvent"),ce=new f("ripplo/jobDone");export{D as a,W as b,T as c,H as d,V as e,Q as f,Y as g,Z as h,ee as i,N as j,te as k,oe as l,ne as m,re as n,ie as o,se as p,ae as q,ce as r};
|
package/dist/chunk-LB65USNP.js
DELETED
|
@@ -1,73 +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{c as a,d as s}from"./chunk-OWN4P2K7.js";import{a as o}from"./chunk-7WZ3VIUU.js";var n=`# How Ripplo thinks
|
|
5
|
-
|
|
6
|
-
The mental model behind every Ripplo skill. Read this once and the compile errors, run findings, and explorer behavior all follow from it. Every skill assumes it.
|
|
7
|
-
|
|
8
|
-
**Done means both halves.** An app change without a passing workflow that proves it isn't done, and a workflow written against broken app behavior isn't done either. Every user-facing change ships with the workflow that demonstrates it working end to end.
|
|
9
|
-
|
|
10
|
-
## A workflow is a declaration, not a script
|
|
11
|
-
|
|
12
|
-
A workflow step says two things: what the user does, and what becomes true afterward. "Click Save, and now the success heading is visible, the url is /projects/123, and a project row exists in the database." Ripplo checks all of it \u2014 it doesn't just replay clicks and hope.
|
|
13
|
-
|
|
14
|
-
Because steps declare state instead of scripting waits and retries, Ripplo can do things a script runner can't: predict what every step should produce, compare that prediction against the live app, and reuse what one workflow proved inside every other workflow.
|
|
15
|
-
|
|
16
|
-
One vocabulary rule: you author **workflows**. A **test** is a workflow with its input parameters pinned \u2014 the compiler derives one test per \`when\` branch (or a single "main" test when there are none). Runs execute tests; you edit workflows.
|
|
17
|
-
|
|
18
|
-
A workflow is also a **user journey**: one thing the user set out to accomplish, traced as the real click path from a natural entry point, with as many mutations as the intent takes. Depth pays twice. Every step's declarations become facts, so a journey teaches Ripplo far more of the app than a goto-and-click snippet \u2014 and the explorer can only compose paths from what workflows have declared. Shallow workflows starve the model.
|
|
19
|
-
|
|
20
|
-
## Two kinds of state
|
|
21
|
-
|
|
22
|
-
- **Data** \u2014 rows in your app: users, projects, invoices. Declared as entities, seeded by worlds, asserted with \`Entity.created / updated / deleted\`. Ripplo reads your app's real state through the engine and compares.
|
|
23
|
-
- **Page state** \u2014 what's on screen right now: the url, what's visible or enabled, what a field contains, and global variables (declared with \`singleton(...)\` in the DSL, shown as "Global variables" in the dashboard \u2014 one concept, and it can live in the backend or the browser). Asserted with \`visible(...)\`, \`url.path.is(...)\`, \`text(...)\`, and friends. Locators are semantic \u2014 \`button("Save")\`, \`textbox("Email")\` \u2014 because they assert accessibility too; \`testId\` is a last resort for elements with no ARIA role.
|
|
24
|
-
|
|
25
|
-
New backend state to assert means a new \`entity(...)\` declaration plus a matching engine impl in the app \u2014 the type system flags the missing half. This is the **two-funnel** rule: all definitions flow through one \`createRipplo(...)\` in \`.ripplo/index.ts\`, all implementations through one \`createEngine(...)\` in the app \u2014 never a second call site of either.
|
|
26
|
-
|
|
27
|
-
Every assertion pins one piece of one of these. A mutation step with only page-state assertions ships the "toast said saved, DB didn't" bug as green \u2014 that's why backend assertions on mutations are mandatory.
|
|
28
|
-
|
|
29
|
-
## You can only touch what you've shown exists
|
|
30
|
-
|
|
31
|
-
A step cannot click a button no earlier step declared visible. Compile enforces this before anything runs.
|
|
32
|
-
|
|
33
|
-
This is not pedantry. Declarations are how Ripplo learns what's reachable from where \u2014 which is what lets the explorer compose paths no workflow author wrote and still know what should be on the page when it gets there. An undeclared button is invisible to the model even when it renders fine; the fix is one \`visible(...)\` on the step that first shows it.
|
|
34
|
-
|
|
35
|
-
Corollary: when the same page can show a thing or not (a collapsed group, a toggled panel), the two states need a distinguishing declaration \u2014 assert \`expanded(...)\` on the toggle, not just the disappearance. Otherwise the model sees one page asserting two contradictory things.
|
|
36
|
-
|
|
37
|
-
## Assertions become facts
|
|
38
|
-
|
|
39
|
-
What one workflow proves about a page becomes a fact \u2014 something Ripplo now knows about that page and enforces everywhere. If the settings workflow shows "at /settings, the Save button is visible," every other workflow that reaches /settings inherits that fact \u2014 and so does the explorer, on paths nobody wrote. Negations count too: "the spinner is not visible" is a fact just like "the heading is visible."
|
|
40
|
-
|
|
41
|
-
Two workflows asserting opposite things about the same page under the same conditions is a contradiction, and compile reports it before any run. One of them is wrong \u2014 usually the page has a state dimension neither workflow declared.
|
|
42
|
-
|
|
43
|
-
Facts come in three tiers, one promotion pipeline. A single workflow's assertion is **inferred**. The same consequence asserted by two or more workflows **generalizes** to a **learned** fact \u2014 the model keeps only the conditions they share, so a claim made on two URLs drops the URL and holds app-wide. Above both sits the **declared** fact: an app-wide rule you author directly with \`fact(...)\` in \`.ripplo/facts.ts\` (an invariant like "the crash screen never shows," or a permission boundary), always enforced without any workflow producing it. A more specific fact overrides a more general one. \`/ripplo:create\` covers authoring all three.
|
|
44
|
-
|
|
45
|
-
Two practical notes:
|
|
46
|
-
|
|
47
|
-
- \`text(locator, "x")\` means _contains_ \u2014 several \`text(...)\` assertions on one element can all be true at once.
|
|
48
|
-
- Exact-value checks (\`value(...)\`, \`url.query\`) are exact. A stray difference is a finding, not noise.
|
|
49
|
-
|
|
50
|
-
## What is enforced where
|
|
51
|
-
|
|
52
|
-
| Gate | When | Catches |
|
|
53
|
-
| ----------------- | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
54
|
-
| \`npx ripplo compile\` | before any run | structure, unreachable interactions, contradicting facts, unreachable \`when\` branches, stale lockfile |
|
|
55
|
-
| \`npx ripplo run\` | live, per step | every declared expectation vs the real app \u2014 page state and backend rows, with a wait window that tolerates propagation lag but fails on wrong values |
|
|
56
|
-
| explorer | in the background | learned facts and backend state on composed paths no workflow author wrote |
|
|
57
|
-
|
|
58
|
-
A failed check is a **finding** \u2014 the unit every red run and every explorer catch produces. If compile is red, the model is inconsistent \u2014 fix the declarations, don't run around it. If a run is red, read the artifacts first (\`npx ripplo explain <runId>\`, then raw \`behavior.jsonl\`), form one hypothesis, make one change, re-run once \u2014 never re-run hoping.
|
|
59
|
-
|
|
60
|
-
The explorer is not optional \u2014 it is the third gate, always running. It walks composed paths no workflow author wrote and catches bugs that only appear when actions combine, so keep it on for the whole session. A green \`npx ripplo run\` turns it on for you; \`npx ripplo explore\` shows or toggles it by hand. Its findings arrive as tasks \u2014 triage them with \`/ripplo:tasks\`, and an open finding blocks the session end just like any other task. The only real off switch is \`npx ripplo hooks pause\`.
|
|
61
|
-
|
|
62
|
-
Two different timing knobs, often confused: \`.wait("slow")\` on an assertion lengthens _how long_ Ripplo polls before calling it failed (slow page, long job). \`consistency: "eventual"\` on a field or variable tolerates _wrong in-between values_ while converging (a flickering redirect, a denormalized counter). Slow is not the same as flickering \u2014 reach for \`.wait\` first.
|
|
63
|
-
|
|
64
|
-
\`.ripplo/ripplo.lock\` is the compiled model \u2014 committed, regenerated by \`ripplo compile\`, never hand-edited.
|
|
65
|
-
|
|
66
|
-
## Scope and stubs
|
|
67
|
-
|
|
68
|
-
**Testing Scope** is the session's contract: the set of workflows this session is responsible for leaving green. Any change that could affect a flow adds its workflow to scope; a flow with no workflow yet gets a **stub** \u2014 \`workflow("Intent")\` with no body \u2014 which is a gated promise: hooks won't let the session end with it unimplemented. Scope items are removed only when genuinely out of scope, never because they're work.
|
|
69
|
-
|
|
70
|
-
## The prime directive
|
|
71
|
-
|
|
72
|
-
Never weaken a workflow to make it pass. No swapping exact text for contains, no deleting assertions, no fabricated locators, no \`testId()\` because the accessible name is missing \u2014 add the accessible name to the app. A weakened declaration doesn't just soften one workflow; it teaches Ripplo a weaker fact everywhere.
|
|
73
|
-
`;function l(e,t){return!o(e)||s(e,t)?null:(a(e,t),n)}export{l as a};
|
package/dist/chunk-M3CXHDFV.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 c}from"./chunk-OQ6KNYPG.js";import{c as p}from"./chunk-7W237JFM.js";import{c as l}from"./chunk-FEHVIHVA.js";import{a}from"./chunk-MHNGR6M7.js";import{g as t,l as u}from"./chunk-6TCK75ER.js";import{aa as d}from"./chunk-26A42N75.js";var g=3e3;async function R(e){l(e);let n=p(e).unwrapOr(void 0);if(n==null)return null;try{return await fetch(`${n.ripploServerUrl}/health`,{signal:AbortSignal.timeout(g)}),null}catch(r){return{detail:r instanceof Error?r.message:String(r),serverUrl:n.ripploServerUrl}}}function m(e){return e.includes("localhost")||e.includes("127.0.0.1")}import f from"fuse.js";function s(e){switch(e.kind){case"conflicting-flags":return"Pass either --all or test ids, not both.";case"nothing-selected":return`No tests selected \u2014 scope empty, no dirty .ripplo/workflows files. Pass test ids, add to scope (${a("run")}), or use --all.`;case"unknown-ids":{let n=e.known,r=e.unknown.flatMap(i=>b(i,n)),o=r.length>0?[`Did you mean: ${[...new Set(r)].join(", ")}`]:[];return[`Unknown ${e.unknown.length===1?"id":"ids"}: ${e.unknown.join(", ")}`,...o,"Pass a workflow slug for all its tests, or workflow/test for one. Known workflows:",...n.map(i=>` ${i}`)].join(`
|
|
5
|
-
`)}}}function A({failed:e,notRun:n,passed:r}){let o=n>0?`, ${String(n)} not run`:"";return`${String(r)} passed, ${String(e)} failed${o} (${String(r+e+n)} total)`}function N({debugDir:e,event:n}){let r=`${n.workflowName} \u2192 ${n.testName}`;if(n.kind==="test-started")return`${t.dim("run ")} ${r}`;switch(n.outcome.kind){case"pass":return`${t.good("pass")} ${r} ${t.dim(n.runId)}`;case"findings":return[`${t.bad("fail")} ${r} \u2014 ${c(n.outcome.findingLines.length,"finding")}`,...n.outcome.findingLines,u({debugDir:e,runId:n.runId}),`${t.dim("why")} npx ripplo explain ${n.runId}`].join(`
|
|
6
|
-
`);case"error":return`${t.bad("error")} ${r} \u2014 ${w(n.outcome.detail)} ${t.dim(n.runId)}`;case"dispatch-error":return`${t.bad("error")} ${r} \u2014 ${y(n.outcome.reason)}`;case"dispatch-timeout":return`${t.bad("error")} ${r} \u2014 not run: dispatch timed out (transient): ${n.outcome.detail}`;case"infra-error":return`${t.bad("error")} ${r} \u2014 not run: Ripplo server unreachable: ${n.outcome.detail}`}}var h={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:n}){return m(n)?`Ripplo server at ${n} not running (${e}). Start the dev server with \`pnpm dev\`.`:`Ripplo server at ${n} unreachable (${e}) \u2014 server-side, not your local environment.`}function _(e){switch(e.code){case"compile-failed":{let n=e.diagnostics.length===0?[]:["",...e.diagnostics];return[`Compilation failed in the daemon (${e.detail}). Run \`npx ripplo compile\` for full output.`,...n].join(`
|
|
7
|
-
`)}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 n=/401|unauthor/i.test(e.detail)?"\nAuth failure \u2014 run `npx ripplo auth login`.":"";return`Sync to the Ripplo server failed: ${e.detail}${n}`}case"bad-message":return"Daemon rejected the request \u2014 protocol mismatch, rebuild the CLI and restart the daemon."}}function M(e){switch(e.kind){case"spawn-failed":return`Failed to start \`npx ripplo daemon\`: ${$(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 $(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 w(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 y(e){return e.type==="limit"?h[e.code]:`failed to dispatch (${e.detail})`}function b(e,n){return new f(n,{includeScore:!0,threshold:.5}).search(d(e)).slice(0,3).map(o=>o.item)}export{R as a,m as b,A as c,N as d,j as e,_ as f,M as g};
|
package/dist/chunk-MOI4L3EX.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
|
-
function p(e){let t=e.workflows.filter(n=>!n.stub);if(t.length===0)return[];let a=new Set(t.flatMap(n=>s(n))),r=new Set(t.flatMap(n=>o(n)));return[...e.entities.filter(n=>!a.has(n.name)).map(n=>({entity:n.name,kind:"entity-never-given"})),...e.entities.filter(n=>a.has(n.name)&&!r.has(n.name)).map(n=>({entity:n.name,kind:"entity-never-mutated"})),...t.flatMap(n=>n.tests.flatMap(l=>y(l)))]}function s(e){return[...e.world,...e.maybe].map(t=>t.entity)}function o(e){return e.steps.flatMap(t=>t.expect.flatMap(a=>i(a))).map(t=>t.entity)}function y(e){let t=e.steps.flatMap(a=>a.expect.flatMap(r=>i(r)));return d({states:t,test:e})}function d({states:e,test:t}){let a=e.filter(r=>r.assertion.kind==="deleted").flatMap(r=>f({predicate:r,test:t})).map(({entity:r,field:n})=>({entity:r,field:n,kind:"unmatchable-delete-key",testSlug:t.slug,workflow:t.workflow}));return c(a)}function f({predicate:e,test:t}){let a=t.world.filter(r=>r.entity===e.entity);return a.length===0?[]:Object.entries(e.key).filter(([r,n])=>g(n)&&!u({field:r,setups:a})).map(([r])=>({entity:e.entity,field:r}))}function u({field:e,setups:t}){return t.some(a=>Object.keys(a.set).includes(e))}function g(e){return e===null||typeof e!="object"}function c(e){return e.filter((t,a)=>e.findIndex(r=>JSON.stringify(r)===JSON.stringify(t))===a)}function i(e){return e.kind==="state"?[e]:e.kind==="not"?i(e.predicate):e.kind==="and"?e.predicates.flatMap(t=>i(t)):e.kind==="when"?e.branches.flatMap(t=>t.consequence.flatMap(a=>i(a))):[]}export{p as a};
|
package/dist/chunk-N2OBRCPQ.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-TPHOSZAK.js";import{j as c}from"./chunk-IPSXNIXC.js";import{createHash as S}from"crypto";import{mkdirSync as b,readFileSync as v,writeFileSync as A}from"fs";import x from"path";import*as e from"zod/mini";import{createHash as P}from"crypto";import a from"picomatch";function m(t){return l(["diff","--name-only","HEAD"],t).split(`
|
|
5
|
-
`).filter(r=>r.length>0)}function g({cwd:t,ignoreGlobs:r,watchGlobs:n}){let o=a([...n]),i=a([...r]);return m(t).filter(s=>o(s)&&!i(s))}function z(t){return l(["ls-files","--others","--exclude-standard"],t).split(`
|
|
6
|
-
`).filter(r=>r.length>0)}function d({cwd:t,ignoreGlobs:r,watchGlobs:n}){let o=a([...n]),i=a([...r]);return z(t).filter(s=>o(s)&&!i(s))}var F=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()}),R=e.object({changedAppFiles:e.readonly(e.array(e.string())),scope:e.object({available:e.boolean(),items:e.readonly(e.array(F))}),tests:e._default(e.readonly(e.array(C)),[]),untrackedAppFiles:e.readonly(e.array(e.string()))});function O({cwd:t,scope:r}){let n=h(t);u(t,{...f(t),scope:r,tests:n?.tests??[]})}function T({cwd:t,tests:r}){let n=h(t);u(t,{...f(t),scope:n?.scope??{available:!1,items:[]},tests:r??n?.tests??[]})}function h(t){let r=R.safeParse(k(y(t)));return r.success?r.data:null}function k(t){try{return JSON.parse(v(t,"utf8"))}catch{return null}}function y(t){return c(t,"coverage-context.json")}function u(t,r){let n=y(t);b(x.dirname(n),{recursive:!0});let o=S("sha256").update(JSON.stringify(r)).digest("hex");A(n,JSON.stringify({...r,inputHash:o},null,2))}function f(t){let{ignorePaths:r,watchPaths:n}=p(),o={cwd:t,ignoreGlobs:r,watchGlobs:n};return{changedAppFiles:g(o),untrackedAppFiles:d(o)}}export{O as a,T as b};
|
package/dist/chunk-OWN4P2K7.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{existsSync as c,mkdirSync as g,rmSync as f,writeFileSync as l}from"fs";import t from"path";function d(r,n,i){let e=s(r,n,i);g(t.dirname(e),{recursive:!0}),l(e,"")}function u(r,n,i){return c(s(r,n,i))}function k(r,n){d(r,n,o)}function S(r,n){return u(r,n,o)}var o="__model__";function s(r,n,i){return t.join(a(r,n),i)}function a(r,n){return t.join(r,".ripplo",".local","skills-loaded",n)}export{d as a,u as b,k as c,S as d};
|
package/dist/chunk-SNU66GSR.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 a}from"./chunk-OWN4P2K7.js";import{a as s}from"./chunk-7WZ3VIUU.js";import{f as l}from"./chunk-TPHOSZAK.js";import p from"path";import*as t from"zod/mini";var n=new Set(["Edit","Write","NotebookEdit"]),d=t.looseObject({file_path:t.string()}),c="create",k=e=>{if(!n.has(e.tool_name))return;let i=d.safeParse(e.tool_input);if(!i.success)return;let{cwd:o}=e;if(!s(o)||!l(o))return;let r=p.relative(o,i.data.file_path);if(!(r.startsWith("..")||r!==".ripplo"&&!r.startsWith(".ripplo/"))&&!a(o,e.session_id,c))return{hookSpecificOutput:{hookEventName:"PreToolUse",permissionDecision:"deny",permissionDecisionReason:`Editing \`.ripplo/\` files (${r}) requires the \`/ripplo:create\` skill loaded first. Load \`/ripplo:create\` then retry \u2014 it carries the DSL builder shape, model rules, and the parallelization guidance you'll need.`}}};export{k as a};
|
package/dist/chunk-VDAFHS7J.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 o}from"./chunk-OQ6KNYPG.js";import{a as s}from"./chunk-MHNGR6M7.js";import{a as v,b as $,c as k,d as C,e as F,f as b}from"./chunk-FXCBWBN5.js";import{A as h,E as S,c as d,g as r,q as c,s as l,u as f,v as u,w as m,x as p,y as g,z as y}from"./chunk-6TCK75ER.js";import x from"safe-stable-stringify";function W({cwd:e,lockfile:i}){let n=c(i),a=F(x(b(i)));if(k({context:n,cwd:e})===a)return[];v({context:n,cwd:e});let t=A(i);return $({context:n,cwd:e}),C({cleanLockfileHash:t.length===0?a:null,context:n,cwd:e}),t}function A(e){let i=d(e),n=l(e),a=f({context:c(e),facts:n.facts});return[...m(e).map(t=>({kind:"missing-precondition",missing:t})),...u(i,n.dataRules).map(t=>({gap:t,kind:"cascade-gap"})),...a.map(t=>({conflict:t,kind:"fact-conflict"})),...p(e).map(t=>({kind:"unreachable-interaction",violation:t})),...g(e).map(t=>({kind:"redundant-assertion",redundancy:t})),...y(e).map(t=>({kind:"unmodeled-surface",surface:t})),...h(e).map(t=>({content:t,kind:"unpinned-surface-content"}))]}function E(e){return`${r.good("ok")} \u2014 no static model violations (${o(e,"test")})`}function G(e){let n=e.some(a=>a.kind==="unmodeled-surface")?[`Elements that hide together are one surface. ${s("create","surfaces")}`]:[];return[`${r.bad("fail")} \u2014 ${o(e.length,"static model violation")}:`,...e.map(a=>S(a)),...n].join(`
|
|
5
|
-
|
|
6
|
-
`)}function I(e){return[`${r.warn("warn")} \u2014 ${o(e.length,"model coverage gap")} (not blocking):`,...e.map(i=>` ${H(i)}`),`Stub the missing flows. ${s("discover")}`].join(`
|
|
7
|
-
`)}function H(e){switch(e.kind){case"entity-never-given":return`${e.entity} \u2014 declared but no test seeds it`;case"entity-never-mutated":return`${e.entity} \u2014 seeded but never asserted created/updated/deleted`;case"unmatchable-delete-key":return`test ${e.workflow}/${e.testSlug} asserts ${e.entity} deleted with literal ${e.field} but no seeded ${e.entity} sets ${e.field} \u2014 solver treats it as no-match`}}export{W as a,E as b,G as c,I as d};
|
package/dist/chunk-VOZOP7MQ.js
DELETED
|
@@ -1,55 +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{c as P}from"./chunk-7W237JFM.js";import{a as I,f as v}from"./chunk-TPHOSZAK.js";import{g as h,k as w,n as k}from"./chunk-67YR3QHA.js";import{d as a,f}from"./chunk-IPSXNIXC.js";import{_ as S,aa as m}from"./chunk-26A42N75.js";import y from"fs";import p from"path";function D(e){try{let n=A(e);if(n==null)return;let t=p.join(n,"HEAD"),o=y.readFileSync(t,"utf8").trim(),r="ref: refs/heads/";return o.startsWith(r)?o.slice(r.length):o.length===0?void 0:o.slice(0,7)}catch{return}}function A(e){let n=p.join(e,".git");if(y.statSync(n).isDirectory())return n;let o=y.readFileSync(n,"utf8").trim(),r="gitdir:";if(!o.startsWith(r))return;let s=o.slice(r.length).trim();if(s.length!==0)return p.resolve(e,s)}import E from"crypto";import{readFile as R}from"fs/promises";import x from"path";import{graphql as g}from"gql.tada";import{err as L,ok as T}from"neverthrow";var C=g(`
|
|
5
|
-
mutation SyncDevSession(
|
|
6
|
-
$projectId: String!
|
|
7
|
-
$cwd: String!
|
|
8
|
-
$branch: String
|
|
9
|
-
$lockfileContent: String
|
|
10
|
-
$fixtures: [SyncDevFixtureInput!]
|
|
11
|
-
$entities: [SyncDevEntityInput!]!
|
|
12
|
-
$singletons: [SyncDevSingletonInput!]
|
|
13
|
-
$workflows: [SyncDevWorkflowInput!]!
|
|
14
|
-
) {
|
|
15
|
-
syncDevSession(
|
|
16
|
-
projectId: $projectId
|
|
17
|
-
cwd: $cwd
|
|
18
|
-
branch: $branch
|
|
19
|
-
lockfileContent: $lockfileContent
|
|
20
|
-
fixtures: $fixtures
|
|
21
|
-
entities: $entities
|
|
22
|
-
singletons: $singletons
|
|
23
|
-
workflows: $workflows
|
|
24
|
-
) {
|
|
25
|
-
id
|
|
26
|
-
hooksPaused
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
`);async function ie(e,n){let t=await k(e);if(t.isErr())return L({error:t.error,kind:"compilation-failed"});let o=await u({config:n,cwd:e,lockfile:t.value});return T({devSessionId:o.devSessionId,lockfile:t.value})}async function u(e){let n=S(e.lockfile);return _({config:e.config,cwd:e.cwd,fixtures:e.lockfile.fixtures,payload:n})}var F=g(`
|
|
30
|
-
query DevSessionSyncState($projectId: String!, $cwd: String!) {
|
|
31
|
-
project(id: $projectId) {
|
|
32
|
-
devSession(cwd: $cwd) {
|
|
33
|
-
id
|
|
34
|
-
hooksPaused
|
|
35
|
-
lockfileHash
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
`),W=g(`
|
|
40
|
-
mutation AnnounceDevSessionActive($projectId: String!, $cwd: String!) {
|
|
41
|
-
announceDevSessionActive(projectId: $projectId, cwd: $cwd)
|
|
42
|
-
}
|
|
43
|
-
`);async function se(e){let n=await O(e.cwd);if(n!=null){let o=(await a({config:e.config,document:F,variables:{cwd:e.cwd,projectId:e.config.projectId}}).catch(()=>null))?.project?.devSession;if(o!=null&&o.lockfileHash===n)return await a({config:e.config,document:W,variables:{cwd:e.cwd,projectId:e.config.projectId}}).catch(()=>null),{devSessionId:o.id,hooksPaused:o.hooksPaused}}return u(e)}async function O(e){let n=await $(e);return n==null?null:E.createHash("sha256").update(n).digest("hex")}async function _({config:e,cwd:n,fixtures:t,payload:o}){let r=D(n),s=await $(n),l=await H(n,t),c=await a({config:e,document:C,variables:{branch:r??null,cwd:n,entities:o.entities.map(i=>({description:i.description,name:i.name})),fixtures:l,lockfileContent:s,projectId:e.projectId,singletons:o.singletons.map(i=>({defaultValue:i.defaultValue,description:i.description,name:i.name,type:i.type})),workflows:o.workflows.map(i=>({entities:[...i.entities],expectedOutcome:i.expectedOutcome,name:i.name,slug:i.slug,sourcePath:i.sourcePath,spec:JSON.stringify(i.spec)}))}});if(c.syncDevSession==null)throw new Error("syncDevSession returned null");return{devSessionId:c.syncDevSession.id,hooksPaused:c.syncDevSession.hooksPaused}}async function H(e,n){let t=Object.entries(n);return Promise.all(t.map(async([o,r])=>({contentBase64:(await R(x.join(e,h,o))).toString("base64"),sha256:r.sha256})))}async function $(e){try{return await R(x.join(e,w),"utf8")}catch{return null}}import{graphql as q}from"gql.tada";var B=q(`
|
|
44
|
-
mutation AutoScopeAddDirty($projectId: String!, $cwd: String!, $workflowSlugs: [String!]!) {
|
|
45
|
-
addDirtyTestsToScope(projectId: $projectId, cwd: $cwd, workflowSlugs: $workflowSlugs) {
|
|
46
|
-
__typename
|
|
47
|
-
... on MutationAddDirtyTestsToScopeSuccess {
|
|
48
|
-
data {
|
|
49
|
-
id
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
`);async function ge({cwd:e,editedPath:n,lockfile:t,requireHooks:o,syncFirst:r}){if(o&&!v(e))return{addedSlugs:[]};let s=new Set(X(e)),l=t.workflows.filter(d=>d.sourcePath!=null&&G({dirtySet:s,editedPath:n,sourcePath:d.sourcePath})).map(d=>m(d.name));if(l.length===0)return{addedSlugs:[]};let c=P(e).unwrapOr(void 0);return c==null?{addedSlugs:[]}:r&&!await M({cfg:c,cwd:e,lockfile:t})?{addedSlugs:[]}:{addedSlugs:await V({cfg:c,slugs:l})?l:[]}}async function M({cfg:e,cwd:n,lockfile:t}){return await u({config:e,cwd:n,lockfile:t}).catch(r=>(f.warn("auto-sync failed: %s",r instanceof Error?r.message:String(r)),null))!=null}async function V({cfg:e,slugs:n}){let o=(await a({config:e,document:B,variables:{cwd:e.cwd,projectId:e.projectId,workflowSlugs:[...n]}}).catch(r=>(f.warn("auto-scope failed: %s",r instanceof Error?r.message:String(r)),null)))?.addDirtyTestsToScope;return o?.__typename!=="MutationAddDirtyTestsToScopeSuccess"?!1:o.data.length>0}function G({dirtySet:e,editedPath:n,sourcePath:t}){return e.has(t)||n!=null&&n.endsWith(t)}var j=".ripplo/workflows/",b=" -> ";function X(e){let n;try{n=I(["status","--porcelain","-uall","--",".ripplo/workflows"],e)}catch{return[]}return n.split(`
|
|
55
|
-
`).map(t=>t.slice(3).trim()).map(t=>t.includes(b)?t.split(b)[1]:t).filter(t=>t!=null).filter(t=>t.startsWith(j)&&t.endsWith(".ts")).map(t=>t.slice(j.length)).filter(t=>t!=="index.ts"&&!t.endsWith("/index.ts"))}export{D as a,ie as b,u as c,se as d,O as e,ge as f};
|
package/dist/daemon-BJAGK2Q3.js
DELETED
|
@@ -1,152 +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,C as Xe,D as Ye,E as Ze,G as er,H as N,I as B,J as rr,K as nr,L as K,M as tr,e as Pe,i as Ue,j as We,k as $e,l as Me,m as Oe,n as _e,o as Fe,p as je,r as C,s as L,t as Ne,u as j,v as ze,w as Je,x as Ge,z as Ve}from"./chunk-6NKSEWP6.js";import{a as Be,c as Ke,d as Qe,e as h}from"./chunk-VOZOP7MQ.js";import{c as S}from"./chunk-7W237JFM.js";import{e as Ie}from"./chunk-TPHOSZAK.js";import{c as le}from"./chunk-FEHVIHVA.js";import{b as me}from"./chunk-LL4HUOJP.js";import{e as Re,f as Ee}from"./chunk-R3DZ6JPY.js";import{d as Te}from"./chunk-IONMYZ3K.js";import{a as de}from"./chunk-R4ZTRVDQ.js";import{a as P}from"./chunk-73TKORK6.js";import"./chunk-MHNGR6M7.js";import{j as be,k as T}from"./chunk-FXCBWBN5.js";import{l as k,m as fe,n as E}from"./chunk-67YR3QHA.js";import{a as oe,c as ie,d as u,f as s,g as ae,h as F,i as se}from"./chunk-IPSXNIXC.js";import"./chunk-LOEAZGYO.js";import{b as Ce,c as Le,d as Ae,e as De,f as qe,h as He}from"./chunk-5X4M4MTG.js";import{F as ge,I,J as Se,K as ke,M as he,N as we,Q as ve,X as xe,a as ye}from"./chunk-6TCK75ER.js";import{P as ce,W as ue,aa as pe}from"./chunk-26A42N75.js";import"./chunk-NNH3YVVO.js";import"./chunk-KMZ3L5YA.js";import so from"path";import{createClient as lo}from"graphql-sse";import{graphql as re}from"gql.tada";import qn,{AbortError as Hn}from"p-retry";import{graphql as yn}from"gql.tada";import{print as gn}from"graphql";async function or({config:e,cwd:r,headed:n,pool:t,runId:o,signal:i,testSlug:a,workClass:l,workflowSlug:d}){let c=await k(r);if(c.isErr())return await A({config:e,ownerToken:null,reason:`lockfile:${c.error.kind}`,runId:o}),{kind:"dispatch-error",reason:{detail:`lockfile:${c.error.kind}`,type:"generic"}};let p=mn(c.value,{testSlug:a,workflowSlug:d});if(p==null)return await A({config:e,ownerToken:null,reason:`no-test:${d}/${a}`,runId:o}),{kind:"dispatch-error",reason:{detail:`no-test:${d}/${a}`,type:"generic"}};let f=await C({headed:n,workClass:l,task:()=>t.execute({headed:n,runId:o,testRef:p},i)});return!f.serverNotified&&f.outcome.kind==="error"&&await A({config:e,ownerToken:null,reason:f.outcome.detail,runId:o}),f.outcome}function mn(e,{testSlug:r,workflowSlug:n}){let o=e.workflows.find(i=>pe(i.name)===n)?.tests.find(i=>i.slug===r);return o==null?void 0:ye(o)}var Sn=6e4,kn=yn(`
|
|
5
|
-
subscription RunRequestedWatch($devSessionId: String!) {
|
|
6
|
-
runRequested(devSessionId: $devSessionId) {
|
|
7
|
-
runId
|
|
8
|
-
testSlug
|
|
9
|
-
workflowId
|
|
10
|
-
workflowSlug
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
`);async function ir(e){let r=Math.min(1e3*2**e,Sn)+xn();await new Promise(n=>setTimeout(n,r))}function ar({claim:e,cwd:r,devSessionId:n,onSubscriptionDead:t,pool:o,sseClient:i,sseHealth:a}){let l=new Set,d=hn(r);return i.subscribe({query:gn(kn),variables:{devSessionId:n}},{complete:()=>{s.warn("runRequested SSE completed unexpectedly; re-registering session"),t("stream completed")},error:c=>{let p=c instanceof Error?c.message:String(c);s.warn("runRequested SSE failed: %s; re-registering session",p),t(p)},next:c=>{wn({claim:e,dispatchConfig:d,event:c.data?.runRequested,inFlightRunIds:l,pool:o})}},{connected:()=>{a.onConnected()},connecting:c=>{a.onConnecting(c),c&&s.debug("runRequested SSE reconnecting")}})}function hn(e){return le(e),{config:S(e).match(r=>r,r=>{s.error({failure:r},"failed to load env for run dispatch")}),cwd:e}}function wn({claim:e,dispatchConfig:r,event:n,inFlightRunIds:t,pool:o}){if(n==null)return;if(t.has(n.runId)){s.warn({runId:n.runId,workflowSlug:n.workflowSlug},"duplicate runRequested event; skipping dispatch");return}if(r.config==null){s.error({runId:n.runId},"run dispatch skipped, env failed to load at startup");return}t.add(n.runId),process.stdout.write(`ripplo: run ${n.workflowSlug}
|
|
14
|
-
`);let i=vn(e(n.runId),n);i.started(),or({config:r.config,cwd:r.cwd,headed:i.headed,pool:o,runId:n.runId,signal:i.signal,testSlug:n.testSlug,workClass:i.workClass,workflowSlug:n.workflowSlug}).then(a=>{i.finished(a)}).catch(a=>{s.error({err:a,runId:n.runId,workflowSlug:n.workflowSlug},"run execution failed; daemon continuing"),i.finished({detail:a instanceof Error?a.message:String(a),kind:"error"})}).finally(()=>{t.delete(n.runId)})}function vn(e,r){return e==null?(s.debug({runId:r.runId,workflowSlug:r.workflowSlug},"dispatching unclaimed run (externally triggered or replayed)"),{headed:!1,signal:new AbortController().signal,workClass:"p0-ui",finished:()=>{},started:()=>{}}):{headed:e.headed,signal:Je(e.token),workClass:"p1-cli",finished:n=>{e.finished(r.runId,n)},started:()=>{e.started(r.runId)}}}function xn(){return Math.floor(Math.random()*2700)+300}import{graphql as Q}from"gql.tada";import{print as bn}from"graphql";var Rn=Q(`
|
|
15
|
-
subscription TeleportRequestedWatch($devSessionId: String!) {
|
|
16
|
-
teleportRequested(devSessionId: $devSessionId) {
|
|
17
|
-
runId
|
|
18
|
-
stepIndex
|
|
19
|
-
kind
|
|
20
|
-
testSlug
|
|
21
|
-
workflowSlug
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
`),En=Q(`
|
|
25
|
-
query TeleportRunRepro($id: String!) {
|
|
26
|
-
run(id: $id) {
|
|
27
|
-
id
|
|
28
|
-
reproJson
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
`),Pn=Q(`
|
|
32
|
-
mutation ReportTeleportResult($devSessionId: String!, $runId: String!, $status: String!) {
|
|
33
|
-
reportTeleportResult(devSessionId: $devSessionId, runId: $runId, status: $status)
|
|
34
|
-
}
|
|
35
|
-
`);function sr({cwd:e,devSessionId:r,onSubscriptionDead:n,sseClient:t}){let o=new Set,i=t.subscribe({query:bn(Rn),variables:{devSessionId:r}},{complete:()=>{s.warn("teleportRequested SSE completed unexpectedly; re-registering session"),n("stream completed")},error:a=>{let l=a instanceof Error?a.message:String(a);s.warn("teleportRequested SSE failed: %s; re-registering session",l),n(l)},next:a=>{In({cwd:e,devSessionId:r,event:a.data?.teleportRequested,running:o})}});return()=>{o.forEach(a=>{a.abort()}),o.clear(),i()}}function In({cwd:e,devSessionId:r,event:n,running:t}){if(n==null)return;let o=new AbortController;t.add(o),Tn({cwd:e,devSessionId:r,event:n,signal:o.signal}).catch(i=>{s.error({err:i},"teleport failed; daemon continuing")}).finally(()=>{t.delete(o)})}async function Tn({cwd:e,devSessionId:r,event:n,signal:t}){let o=d=>Cn({cwd:e,devSessionId:r,runId:n.runId,status:d}),i=await Ln(e,n);if(i==null){s.warn({runId:n.runId},"teleport could not resolve target"),await o("unplannable");return}process.stdout.write(`ripplo: teleport ${Dn(n)} step ${String(n.stepIndex+1)}
|
|
36
|
-
`);let l=await er({cwd:e,onReady:()=>{o("opened")},signal:t,step:n.stepIndex+1,target:i});l.kind==="done"&&l.result.kind==="handed-over"||(s.warn({kind:l.kind,runId:n.runId},"teleport could not open"),await o(l.kind==="unplannable"?"unplannable":"error"))}async function Cn({cwd:e,devSessionId:r,runId:n,status:t}){let o=S(e).match(i=>i,()=>null);o!=null&&await u({config:o,document:Pn,variables:{devSessionId:r,runId:n,status:t}}).catch(()=>null)}async function Ln(e,r){if(r.kind==="explore"){let n=await An(e,r.runId);return n==null?null:{kind:"explore",repro:n}}return r.testSlug==null||r.workflowSlug==null?null:{kind:"test",ref:`${r.workflowSlug}/${r.testSlug}`}}async function An(e,r){let n=S(e).match(o=>o,()=>null);if(n==null)return null;let t=await u({config:n,document:En,variables:{id:r}}).catch(()=>null);return t?.run?.reproJson==null?null:I.parse(JSON.parse(t.run.reproJson))}function Dn(e){return e.kind==="explore"?"explore finding":`${String(e.workflowSlug)}/${String(e.testSlug)}`}function lr({claim:e,config:r,cwd:n,initialId:t,pool:o,sseClient:i,sseHealth:a}){let l=t,d=null,c=m=>{y(m)},p=()=>{let m=ar({claim:e,cwd:n,devSessionId:l,onSubscriptionDead:c,pool:o,sseClient:i,sseHealth:a}),g=sr({cwd:n,devSessionId:l,onSubscriptionDead:c,sseClient:i});return()=>{m(),g()}},f=p(),M=async m=>{a.markUnhealthy(m);let g=await E(n);if(g.isErr()){s.error("re-register: compile failed: %s",P(g.error));return}let O=await z(()=>Ke({config:r,cwd:n,lockfile:g.value}),{config:r,label:"re-register sync"});f(),l=O.devSessionId,f=p(),s.info("re-registered dev session as %s",l)},y=m=>(d!=null||(d=M(m).finally(()=>{d=null})),d);return{getId:()=>l,reregister:()=>y("dev session ended server-side"),stop:()=>{f()}}}function z(e,{config:r,label:n}){let t=r.ripploServerUrl.includes("localhost")||r.ripploServerUrl.includes("127.0.0.1");return qn(async()=>{try{return await e()}catch(o){if(Un({config:r,error:o}),!(o instanceof oe)){let i=o instanceof Error?o.message:String(o);throw s.error("%s failed: %s",n,i),new Hn(i)}throw o}},{factor:2,maxTimeout:t?2e3:1e4,minTimeout:t?100:1e3,retries:1/0,onFailedAttempt:({attemptNumber:o,error:i})=>{s.warn("%s attempt %d failed \u2014 retrying: %s",n,o,i.message)}})}function Un({config:e,error:r}){let n=ie(r);n==="UNAUTHENTICATED"&&(process.stderr.write(`ripplo: ${Ae()}
|
|
37
|
-
`),process.exit(1)),n==="FORBIDDEN"&&(process.stderr.write(`ripplo: ${Le({projectId:e.projectId,serverUrl:e.ripploServerUrl})}
|
|
38
|
-
`),process.exit(1))}import{createHash as Wn}from"crypto";import dr from"fs";function cr(){return J===void 0&&(J=$n()),J}var J;function $n(){let e=process.argv[1];if(e==null)return null;try{let r=dr.readFileSync(dr.realpathSync(e));return Wn("sha256").update(r).digest("hex")}catch{return null}}import{graphql as ur}from"gql.tada";var Mn=ur(`
|
|
39
|
-
query OpenFindingsForRetire($projectId: String!) {
|
|
40
|
-
exploreFindings(projectId: $projectId, status: open) {
|
|
41
|
-
signature
|
|
42
|
-
reproRun {
|
|
43
|
-
reproJson
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
`),On=ur(`
|
|
48
|
-
mutation RetireStaleFinding($projectId: String!, $signature: String!) {
|
|
49
|
-
retireStaleFinding(projectId: $projectId, signature: $signature)
|
|
50
|
-
}
|
|
51
|
-
`);async function pr({config:e,cwd:r,lockfile:n}){let o=(await u({config:e,document:Mn,variables:{projectId:e.projectId}})).exploreFindings,i=await T(r,n);if(i.isErr())return s.info({block:i.error.kind},"skipping finding retire until next compile"),!1;let a=await _n(o,i.value);return a.length===0||(await Promise.all(a.map(l=>jn(e,l))),s.info({count:a.length},"retired findings whose trail no longer replays")),!0}async function _n(e,r){return(await Promise.all(e.map(async t=>await Fn(t,r)?t.signature:null))).filter(t=>t!=null)}async function Fn(e,r){let n=e.reproRun?.reproJson;if(n==null)return!1;let t=I.safeParse(JSON.parse(n));return t.success?(await xe(r,t.data)).kind==="unplannable":!1}function jn(e,r){return u({config:e,document:On,variables:{projectId:e.projectId,signature:r}})}var Nn=6e4;function fr(e){let r={retiredKey:null,running:!1,stopped:!1},n=async()=>{if(!(r.running||r.stopped)){r.running=!0;try{r.retiredKey=await Bn(e,r.retiredKey)}catch(o){s.warn({err:o},"retire stale findings failed \u2014 retrying on next tick")}finally{r.running=!1}}},t={timer:setTimeout(function o(){n(),r.stopped||(t.timer=setTimeout(o,Nn))},0)};return()=>{r.stopped=!0,clearTimeout(t.timer)}}async function Bn({config:e,cwd:r},n){let t=await h(r),o=cr();if(t==null||o==null)return n;let i=`${t}@${o}`;if(i===n)return n;let a=await k(r);return a.isErr()?n:await pr({config:e,cwd:r,lockfile:a.value})?i:n}import{Agent as Kn,fetch as Qn}from"undici";var zn=3e4;function mr(e=zn){let r=new Kn({bodyTimeout:e});return(n,t)=>Qn(n,{...t,dispatcher:r})}function yr(){let e=!0,r,n=null,t=()=>{n!=null&&(clearTimeout(n),n=null)};return{markUnhealthy:o=>{e=!1,r=o,t()},onConnected:()=>{t(),n=setTimeout(()=>{e=!0,r=void 0,n=null},1e4)},onConnecting:()=>{t()},snapshot:()=>({detail:r,ok:e})}}import Jn from"fs";import hr from"net";import{err as wr,ok as Gn}from"neverthrow";async function vr({cwd:e,onConnection:r}){se(e);let n=Te(e),t=await gr({onConnection:r,socketPath:n});return t.isOk()||t.error.kind!=="stale-candidate"?t.map(Sr(n)).mapErr(kr(n)):await Vn(n)?wr({kind:"already-running",socketPath:n}):(xr(n),(await gr({onConnection:r,socketPath:n})).map(Sr(n)).mapErr(kr(n)))}function Vn(e){return new Promise(r=>{let n=hr.connect(e);n.once("connect",()=>{n.destroy(),r(!0)}),n.once("error",()=>{r(!1)})})}async function gr(e){let r=await Xn(e);return r.kind==="listening"?Gn(r.server):wr(r.error)}function Xn({onConnection:e,socketPath:r}){return new Promise(n=>{let t=hr.createServer(e);t.once("error",o=>{n({error:o.code==="EADDRINUSE"?{kind:"stale-candidate"}:{kind:"listen-failed",message:o.message},kind:"failed"})}),t.listen(r,()=>{n({kind:"listening",server:t})})})}function Sr(e){return r=>({socketPath:e,close:()=>{r.close(),xr(e)}})}function xr(e){Jn.rmSync(e,{force:!0})}function kr(e){return r=>r.kind==="stale-candidate"?{kind:"already-running",socketPath:e}:{kind:"bind-failed",message:r.message}}import{randomInt as st,randomUUID as lt}from"crypto";function br(){return{attempts:0,backoffUntil:0,consecutiveErrors:0,desired:{active:!1,localWorkers:rr,maxTrailLength:nr},executorLocal:!0,findings:0,lastUnhealthyReportAt:null,loading:!1,lockfile:{kind:"loading"},prevInteractiveActive:0,stopped:!1,trails:new Map}}function Rr(e,r){if(e.stopped)return{effects:[],state:e};switch(r.kind){case"tick":return G(e,r.now,r.queue);case"desired-changed":return G({...e,desired:r.desired},r.now,r.queue);case"executor-changed":return{effects:[],state:{...e,executorLocal:r.local}};case"load-settled":return Zn(e,r.outcome);case"trail-started":return{effects:[],state:{...e,trails:new Map([...e.trails,[r.id,{startedAt:r.now}]])}};case"trail-settled":return et(e,r);case"stopped":return{effects:[{ids:[...e.trails.keys()],kind:"abort"}],state:{...e,stopped:!0,trails:new Map}}}}function Er(e,r,n){return K(Ir(e),Tr(e,r,n)).health}function G(e,r,n){let t=Yn(e,r,n),o={...e,...t,prevInteractiveActive:n.active},i=K(Ir(o),Tr(o,r,n)),a=o.lockfile.kind!=="ready"&&!o.loading;return{effects:[...a?[{kind:"load"}]:[],...i.abortIds.length>0?[{ids:i.abortIds,kind:"abort"}]:[],...i.launchCount>0?[{count:i.launchCount,kind:"launch",maxTrailLength:o.desired.maxTrailLength}]:[]],state:{...o,loading:o.loading||a}}}function Yn(e,r,n){return n.active<e.prevInteractiveActive?{backoffUntil:Math.max(e.backoffUntil,r+B)}:{backoffUntil:e.backoffUntil}}function Zn(e,r){return r.kind==="blocked"?{effects:[],state:{...e,loading:!1,lockfile:{kind:"blocked",reason:r.reason}}}:{effects:[],state:{...e,consecutiveErrors:0,lastUnhealthyReportAt:null,loading:!1,lockfile:{kind:"ready"}}}}function et(e,r){let n=new Map([...e.trails].filter(([i])=>i!==r.id)),t=rt({...e,trails:n},r.settled,r.now),o=G(t.state,r.now,r.queue);return{effects:[...t.effects,...o.effects],state:o.state}}function rt(e,r,n){switch(r.kind){case"aborted":case"crashed":return{effects:[],state:e};case"app-unreachable":return Pr({category:"driver",now:n,state:e,subject:"app-unreachable"});case"error":return nt(e,r.error,n);case"done":return ot(e,r.result)}}function nt(e,r,n){if(r.source==="lockfile-stale")return{effects:[{kind:"reload"}],state:{...e,loading:!0,lockfile:{kind:"loading"}}};let t=Se(r);return t==="trail"?{effects:[],state:{...e,consecutiveErrors:0,lastUnhealthyReportAt:null}}:Pr({category:t,now:n,state:e,subject:tt(r)})}function tt(e){switch(e.source){case"transport":case"config":return`${e.source}: ${e.detail}`;case"runtime":return`runtime: ${e.kind}`;case"empty-trail":case"bad-assign":case"lockfile-stale":return e.source}}function ot(e,r){let n=r.kind==="finding";return{effects:[{finding:n,kind:"report",result:r}],state:{...e,attempts:e.attempts+1,consecutiveErrors:0,findings:e.findings+(n?1:0),lastUnhealthyReportAt:null}}}var it=6,at=2e4;function Pr({category:e,now:r,state:n,subject:t}){let o=n.consecutiveErrors+1;if(o<it)return{effects:[],state:{...n,consecutiveErrors:o}};let i=e==="driver"?Math.max(n.backoffUntil,r+B):n.backoffUntil,a=n.lastUnhealthyReportAt==null||r-n.lastUnhealthyReportAt>=at;return{effects:a?[{kind:"report-unhealthy",subject:t}]:[],state:{...n,backoffUntil:i,consecutiveErrors:o,lastUnhealthyReportAt:a?r:n.lastUnhealthyReportAt}}}function Ir(e){return{enabled:e.desired.active,executorLocal:e.executorLocal,maxTrailLength:e.desired.maxTrailLength,workers:e.desired.localWorkers}}function Tr(e,r,n){return{backoffActive:r<e.backoffUntil,headedActive:n.headedActive>0,interactiveActive:n.active,interactiveQueued:n.queued,lockfile:e.lockfile,poolSize:n.poolSize,trails:[...e.trails.entries()].map(([t,o])=>({ageMs:r-o.startedAt,id:t}))}}function Lr(e){let r=dt(e),n=pt(()=>{r.dispatch(x())});return j(()=>{r.dispatch(x())}),r.dispatch(x()),{notifyQueueChange:()=>{r.dispatch({kind:"executor-changed",local:e.executorIsLocal()}),r.dispatch(x())},setDesired:t=>{r.dispatch({desired:t,kind:"desired-changed",now:Date.now(),queue:D()})},status:()=>ut(r.current()),stop:()=>{n(),j(null),r.dispatch({kind:"stopped"})}}}function dt(e){let r={draining:!1,queue:[],runtime:ct(e)},n=i=>{r.runtime=i(r.runtime)},t=i=>{r.queue.push(i),!r.draining&&(r.draining=!0,o(),r.draining=!1)},o=()=>{let i=r.queue.shift();if(i==null)return;let a=Rr(r.runtime.state,i);n(l=>({...l,state:a.state})),a.effects.forEach(l=>{ft({commit:n,dispatch:t,effect:l,params:e,runtime:r.runtime})}),o()};return{dispatch:t,current:()=>r.runtime}}function ct(e){return{controllers:new Map,prepared:null,state:{...br(),executorLocal:e.executorIsLocal()}}}function ut(e){return{explorer:Er(e.state,Date.now(),D()),exploring:e.state.trails.size,progress:{attempts:e.state.attempts,findings:e.state.findings}}}function D(){let e=Ne();return{active:e.active,headedActive:e.headedActive,poolSize:e.poolSize,queued:e.queued}}function x(){return{kind:"tick",now:Date.now(),queue:D()}}function pt(e){let r={timer:setTimeout(function n(){e(),r.timer=setTimeout(n,N)},N)};return()=>{clearTimeout(r.timer)}}function ft({commit:e,dispatch:r,effect:n,params:t,runtime:o}){switch(n.kind){case"load":case"reload":{mt(t.cwd,o.prepared).then(({outcome:i,prepared:a})=>{e(l=>({...l,prepared:a})),r({kind:"load-settled",now:Date.now(),outcome:i}),r(x())});return}case"abort":{n.ids.forEach(i=>{o.controllers.get(i)?.abort()});return}case"launch":{Array.from({length:n.count}).forEach(()=>{yt({commit:e,dispatch:r,maxTrailLength:n.maxTrailLength,params:t,prepared:o.prepared})});return}case"report":{t.report({attempts:1,findings:n.finding?1:0,result:n.result}),n.finding&&s.info("exploration finding recorded");return}case"report-unhealthy":s.warn("exploration unhealthy after repeated infra errors (last: %s)",n.subject),t.reportUnhealthy()}}async function mt(e,r){let n=await h(e);if(n==null)return{outcome:{kind:"blocked",reason:"no-lockfile"},prepared:null};if(r?.rawHash===n)return{outcome:{kind:"ready",rawHash:n},prepared:r};let{result:t}=await fe(e);if(t.isErr())return{outcome:{kind:"blocked",reason:"load-failed"},prepared:null};let o=await T(e,t.value);if(o.isErr())return{outcome:{kind:"blocked",reason:o.error.kind},prepared:null};let i=await he(o.value);return i==null?{outcome:{kind:"blocked",reason:"load-failed"},prepared:null}:{outcome:{kind:"ready",rawHash:n},prepared:{exploration:i,rawHash:n}}}function yt({commit:e,dispatch:r,maxTrailLength:n,params:t,prepared:o}){if(o==null)return;let i=we({lockfileHash:o.rawHash,prepared:o.exploration,random:gt,strategy:{...ge("even"),maxAttemptLength:n}});if(i==null)return;let a=`explore:${lt()}`,l=new AbortController;e(d=>({...d,controllers:new Map([...d.controllers,[a,l]])})),r({id:a,kind:"trail-started",now:Date.now()}),C({headed:!1,workClass:"p3-explore",task:()=>St({assign:i,params:t,signal:l.signal})}).catch(d=>(s.debug({err:d},"exploration trail crashed"),{kind:"crashed"})).then(d=>{e(c=>({...c,controllers:new Map([...c.controllers].filter(([p])=>p!==a))})),r({id:a,kind:"trail-settled",now:Date.now(),queue:D(),settled:d})})}var Cr=2**31;function gt(){return st(Cr)/Cr}async function St({assign:e,params:r,signal:n}){let t=await r.executeTrail(e,n);return t.kind==="aborted"?{kind:"aborted"}:t.kind==="error"?kt(r,t.error):{kind:"done",result:t}}async function kt(e,r){let n=await Pe(e.appUrl);return n!=null?(s.debug("exploration app probe failed: %s",n),{kind:"app-unreachable"}):(s.debug({error:r},"exploration trail error"),{error:r,kind:"error"})}import{graphql as Ht}from"gql.tada";import{connect as wt}from"net";import vt from"ssh2";import{WebSocket as Dr,createWebSocketStream as xt}from"ws";var ht="ripplo-";function V(e){return Object.entries(e).map(([r,n])=>`${ht}${r}.${n}`)}var{Server:bt,utils:Ar}=vt;function qr(){let e=Ar.generateKeyPairSync("ed25519"),r=Ar.parseKey(e.private);if(r instanceof Error)throw r;return{fingerprint:r.getPublicSSH().toString("base64"),privateKey:e.private}}function Hr(e){return new Promise((r,n)=>{let t={closers:new Set,stopped:!1},o=new Dr(e.relayUrl,V({grant:e.grant,role:"daemon-control"}));o.on("open",()=>{s.info("cloud-executor relay control up"),r({stop:Rt(o,t)})}),o.on("message",i=>{Et(e,t,i)}),o.on("close",(i,a)=>{t.stopped||s.warn({code:i,reason:a.toString()},"relay control closed"),qt(e,t)}),o.on("error",i=>{n(i instanceof Error?i:new Error(String(i)))})})}function Rt(e,r){return()=>(r.stopped=!0,r.closers.forEach(n=>{n()}),e.close(),Promise.resolve())}function Et(e,r,n){let t=Pt(n);t!=null&&Tt(e,r,t.pipeId)}function Pt(e){try{let r=JSON.parse(It(e));return typeof r=="object"&&r!=null&&"signal"in r&&r.signal==="open-data"&&"pipeId"in r&&typeof r.pipeId=="string"?{pipeId:r.pipeId}:null}catch{return null}}function It(e){return Buffer.isBuffer(e)?e.toString("utf8"):Array.isArray(e)?Buffer.concat(e).toString("utf8"):Buffer.from(e).toString("utf8")}function Tt(e,r,n){if(r.stopped)return;let t=new Dr(e.relayUrl,V({pipeId:n,role:"daemon-data"}));t.on("open",()=>{Ct(e,r,t)}),t.on("error",o=>{s.warn({err:o},"cloud-executor relay data pipe error")})}function Ct(e,r,n){let t=xt(n);t.on("error",()=>{});let o=new bt({hostKeys:[e.hostKey.privateKey]},a=>{a.on("error",l=>{s.warn({err:l},"cloud-executor ssh connection error")}),a.on("authentication",l=>{At(l,e.secret)}),a.on("ready",()=>{a.on("tcpip",(l,d,c)=>{Dt({accept:l,allowedPorts:e.allowedPorts,deny:d,destPort:c.destPort})})})}),i=()=>{n.close()};r.closers.add(i),n.on("close",()=>r.closers.delete(i)),Lt(o,t)}function Lt(e,r){e.injectSocket(r)}function At(e,r){if(e.method==="password"&&e.password===r){e.accept();return}if(e.method==="none"){e.reject(["password"]);return}e.reject()}function Dt({accept:e,allowedPorts:r,deny:n,destPort:t}){if(!r.includes(t)){n();return}let o=!1,i=wt({autoSelectFamily:!0,host:"localhost",port:t},()=>{o=!0;let a=e();a.on("error",()=>{}),i.pipe(a).pipe(i)});i.on("error",()=>{o||n()})}function qt(e,r){r.stopped||(r.stopped=!0,r.closers.forEach(n=>{n()}),e.onFatal())}var Ut=Ht(`
|
|
52
|
-
mutation EnterCloudMode(
|
|
53
|
-
$devSessionId: String!
|
|
54
|
-
$localUrl: String!
|
|
55
|
-
$engineUrl: String!
|
|
56
|
-
$hostKeyFingerprint: String!
|
|
57
|
-
) {
|
|
58
|
-
enterCloudMode(
|
|
59
|
-
devSessionId: $devSessionId
|
|
60
|
-
localUrl: $localUrl
|
|
61
|
-
engineUrl: $engineUrl
|
|
62
|
-
hostKeyFingerprint: $hostKeyFingerprint
|
|
63
|
-
) {
|
|
64
|
-
__typename
|
|
65
|
-
... on RelaySession {
|
|
66
|
-
generation
|
|
67
|
-
grant
|
|
68
|
-
relayUrl
|
|
69
|
-
secret
|
|
70
|
-
session
|
|
71
|
-
}
|
|
72
|
-
... on DevSessionEndedError {
|
|
73
|
-
message
|
|
74
|
-
}
|
|
75
|
-
... on TunnelNotConfiguredError {
|
|
76
|
-
message
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
`),q=class extends Error{failure;constructor(r){super(r.kind),this.failure=r}};async function Wr({config:e,devSessionId:r,onFatal:n}){let t=qr(),i=(await u({config:e,document:Ut,variables:{devSessionId:r,engineUrl:e.engineUrl,hostKeyFingerprint:t.fingerprint,localUrl:e.appUrl}})).enterCloudMode;if(i==null)throw new q({kind:"empty-response"});if(i.__typename!=="RelaySession")throw new q({kind:"server-error",typename:i.__typename});let a=await Hr({allowedPorts:[...new Set([Ur(e.appUrl),Ur(e.engineUrl)])],grant:i.grant,hostKey:t,onFatal:n,relayUrl:i.relayUrl,secret:i.secret});return s.info({session:i.session},"cloud-executor relay up"),{stop:a.stop}}function Ur(e){let r=new URL(e);return r.port.length>0?Number(r.port):r.protocol==="https:"?443:80}var $r=[1e3,3e3,8e3,15e3];function Mr(){return{attempt:0,desired:"local",devSessionId:null,stopped:!1,tunnel:"down"}}function Or(e,r){if(e.stopped)return{effects:[],state:e};switch(r.kind){case"requested":return $t(e,r.mode);case"connected":return X({...e,devSessionId:r.devSessionId},[]);case"tunnel-started":return Mt(e);case"tunnel-failed":case"tunnel-fatal":return Ot(e);case"retry-due":return e.tunnel==="down"?X(e,[]):{effects:[],state:e};case"stopped":return{effects:e.tunnel==="down"?[]:[{kind:"stop-tunnel"}],state:{...e,desired:"local",stopped:!0,tunnel:"down"}}}}function Wt(e){let r=Math.min(e,$r.length-1),n=$r[r];if(n==null)throw new Error("executor retry ladder is empty");return n}function $t(e,r){return r===e.desired?{effects:[],state:e}:X({...e,attempt:0,desired:r},[{kind:"notify-changed"}])}function X(e,r){return H(e)&&e.tunnel==="down"&&e.devSessionId!=null?{effects:[...r,{devSessionId:e.devSessionId,kind:"start-tunnel"}],state:{...e,tunnel:"starting"}}:!H(e)&&e.tunnel!=="down"?{effects:[...r,{kind:"stop-tunnel"}],state:{...e,tunnel:"down"}}:{effects:r,state:e}}function H(e){return e.desired==="cloud"&&e.devSessionId!=null&&!e.stopped}function Mt(e){return H(e)?{effects:[],state:{...e,attempt:0,tunnel:"up"}}:{effects:[{kind:"stop-tunnel"}],state:{...e,tunnel:"down"}}}function Ot(e){let r={...e,tunnel:"down"};return H(r)?{effects:[{delayMs:Wt(r.attempt),kind:"schedule-retry"}],state:{...r,attempt:r.attempt+1}}:{effects:[],state:r}}function jr(e){let r={draining:!1,io:Promise.resolve(),queue:[],retryTimer:null,state:Mr(),tunnel:null},n=t=>{r.queue.push(t),!r.draining&&(r.draining=!0,Nr(r,n,e),r.draining=!1)};return{connect:t=>{n({devSessionId:t,kind:"connected"})},current:()=>r.state.desired,request:t=>{n({kind:"requested",mode:t})},stop:async()=>{n({kind:"stopped"}),await r.io.catch(()=>{})}}}function Nr(e,r,n){let t=e.queue.shift();if(t==null)return;let o=Or(e.state,t);e.state=o.state,o.effects.forEach(i=>{_t({cell:e,dispatch:r,effect:i,params:n})}),Nr(e,r,n)}function _t({cell:e,dispatch:r,effect:n,params:t}){switch(n.kind){case"start-tunnel":{_r(e,()=>Ft({cell:e,devSessionId:n.devSessionId,dispatch:r,params:t}));return}case"stop-tunnel":{let o=e.tunnel;e.tunnel=null,Fr(e),o!=null&&_r(e,async()=>{await o.stop(),s.info("executor switched to local")});return}case"schedule-retry":{Fr(e),s.warn({delayMs:n.delayMs},"cloud tunnel down; retrying \u2014 switch with npx ripplo executor local"),e.retryTimer=setTimeout(()=>{e.retryTimer=null,r({kind:"retry-due"})},n.delayMs);return}case"notify-changed":t.onChanged()}}async function Ft({cell:e,devSessionId:r,dispatch:n,params:t}){try{let o=await Wr({config:t.config,devSessionId:r,onFatal:()=>{e.tunnel=null,n({kind:"tunnel-fatal"})}});e.tunnel=o,s.info("executor switched to cloud"),n({kind:"tunnel-started"})}catch(o){s.warn({err:o},"cloud tunnel failed to start; retrying in background"),n({kind:"tunnel-failed"})}}function _r(e,r){e.io=e.io.then(r).catch(n=>{s.warn({err:n},"executor io failed")})}function Fr(e){e.retryTimer!=null&&(clearTimeout(e.retryTimer),e.retryTimer=null)}import{readdir as jt}from"fs/promises";import{existsSync as Br}from"fs";import Y from"path";async function Kr({config:e,cwd:r}){let n=Y.join(r,".ripplo","debug");await(await jt(n,{withFileTypes:!0}).catch(()=>[])).filter(i=>i.isDirectory()).map(i=>i.name).filter(i=>!i.startsWith("replay-")&&!i.startsWith("explore-")&&!Br(Y.join(n,i,ae))&&Br(Y.join(n,i,"behavior.jsonl"))).reduce((i,a)=>i.then(()=>Ve({config:e,debugDir:n,runId:a}).catch(()=>{})),Promise.resolve(void 0))}import{fork as Nt}from"child_process";import Qr from"os";import{CancellationTokenSource as zr,ResponseError as Jr}from"vscode-jsonrpc/node";function Gr(e,r){return()=>{let n=Nt(e,["run-worker"],{cwd:r,detached:!0,stdio:["ignore","inherit","inherit","ipc"]});return{connection:je(n),kill:()=>{Bt(n)},onExit:t=>{n.once("exit",t)}}}}function Vr(e){let r={closed:!1,devSessionId:e.devSessionId,lockfileProvider:e.lockfileProvider,nextId:0,size:e.initialSize,spawn:e.spawn,waiters:[],workers:[]};return en(r),{close:async()=>{r.closed=!0,await Promise.all([...r.workers].map(n=>Z(n,r)))},execute:(n,t)=>zt(n,t,r),exploreTrail:(n,t)=>Gt(n,t,r),routeSpan:(n,t)=>{let o=r.workers.find(i=>i.runId===n);o?.worker.connection.sendNotification(_e,{runId:n,span:t})},setSize:n=>{Xt(n,r)}}}function Bt(e){let r=e.pid;if(r!=null)try{process.kill(-r,"SIGKILL")}catch{e.kill("SIGKILL")}}var Kt=1e4,Qt=1e4,Xr=-32800;async function zt(e,r,n){let t=await Yr(n);if(t.runId=e.runId,!t.alive)return U(t,n),{outcome:{detail:"worker-exit",kind:"error"},serverNotified:!1};let o=new zr,i=()=>{o.cancel()};r.aborted&&o.cancel(),r.addEventListener("abort",i,{once:!0});try{let a=await t.worker.connection.sendRequest($e,e,o.token),l=Ue.safeParse(a);return l.success?l.data:{outcome:{detail:"bad-outcome-frame",kind:"error"},serverNotified:!1}}catch(a){return Jt(a,t)}finally{r.removeEventListener("abort",i),o.dispose(),U(t,n)}}async function Yr(e){let r=e.workers.find(n=>n.alive&&n.runId===void 0);if(r!=null)return r.runId="pending",await r.ready,r;if(e.workers.length<e.size){let n=Zr(e);return n.runId="pending",await n.ready,n}return new Promise(n=>{e.waiters.push(t=>{t.runId="pending",n(t)})})}function Zr(e){let r=e.spawn(),n={resolve:()=>{}},t={alive:!0,id:e.nextId,ready:new Promise(o=>{n.resolve=o,r.connection.onNotification(We,o)}),runId:void 0,worker:r};return e.nextId+=1,r.connection.onRequest(Me,()=>e.lockfileProvider()),r.onExit(()=>{t.alive=!1,e.workers=e.workers.filter(o=>o!==t),r.connection.dispose(),n.resolve()}),e.workers.push(t),t}function U(e,r){if(e.runId=void 0,!e.alive||r.closed)return;if(r.workers.length>r.size){Z(e,r);return}let n=r.waiters.shift();n?.(e)}async function Z(e,r){if(r.workers=r.workers.filter(o=>o!==e),!e.alive)return;let n=new Promise(o=>{e.worker.onExit(o)});await e.ready,await e.worker.connection.sendNotification(Fe).catch(()=>{});let t=setTimeout(()=>{e.worker.kill()},Kt);await n,clearTimeout(t)}function Jt(e,r){return e instanceof Jr&&e.code===Xr?{outcome:{detail:"aborted",kind:"error"},serverNotified:!1}:r.alive?{outcome:{detail:e instanceof Error?e.message:String(e),kind:"error"},serverNotified:!1}:{outcome:{detail:"worker-exit",kind:"error"},serverNotified:!1}}async function Gt(e,r,n){let t=await Yr(n);if(t.runId="explore",!t.alive)return U(t,n),{error:{detail:"worker-dead",source:"transport"},kind:"error"};let o=new zr,i={cancel:()=>{}},a=()=>{o.cancel();let l=setTimeout(()=>{t.worker.kill()},Qt);i.cancel=()=>{clearTimeout(l)}};r.aborted&&a(),r.addEventListener("abort",a,{once:!0});try{let l=await t.worker.connection.sendRequest(Oe,{assign:e,devSessionId:n.devSessionId},o.token),d=ke.safeParse(l);return d.success?d.data:{error:{detail:"bad-result",source:"transport"},kind:"error"}}catch(l){return Vt(l)}finally{i.cancel(),r.removeEventListener("abort",a),o.dispose(),U(t,n)}}function Vt(e){return e instanceof Jr&&e.code===Xr?{kind:"aborted"}:{error:{detail:e instanceof Error?e.message.slice(0,120):"unknown",source:"transport"},kind:"error"}}function Xt(e,r){r.size=e,e>Qr.availableParallelism()&&s.warn({cores:Qr.availableParallelism(),size:e},"worker pool size exceeds available cores");let n=r.workers.filter(o=>o.alive&&o.runId===void 0),t=r.workers.length-e;n.slice(0,Math.max(0,t)).forEach(o=>{Z(o,r)}),en(r)}function en(e){e.closed||Array.from({length:Math.max(0,e.size-e.workers.length)}).forEach(()=>{Zr(e)})}import W from"fs";import Yt from"p-retry";import{graphql as b}from"gql.tada";import{print as $}from"graphql";var Zt=b(`
|
|
81
|
-
query DaemonExploration($devSessionId: String!) {
|
|
82
|
-
exploration(devSessionId: $devSessionId) {
|
|
83
|
-
active
|
|
84
|
-
localWorkers
|
|
85
|
-
maxTrailLength
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
`),eo=b(`
|
|
89
|
-
subscription WatchExplorationChanged($devSessionId: String!) {
|
|
90
|
-
explorationChanged(devSessionId: $devSessionId) {
|
|
91
|
-
exploration {
|
|
92
|
-
active
|
|
93
|
-
localWorkers
|
|
94
|
-
maxTrailLength
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
`);function rn({config:e,devSessionId:r,exploration:n,sseClient:t}){return Yt(()=>ro({config:e,devSessionId:r,exploration:n}),{factor:2,minTimeout:500,retries:6}).catch(o=>{s.warn({err:o},"initial exploration state read failed \u2014 explorer stays off")}),t.subscribe({query:$(eo),variables:{devSessionId:r}},{complete:()=>{},error:o=>{s.error(o,"exploration subscription error")},next:o=>{nn(n,o.data?.explorationChanged.exploration)}})}async function ro({config:e,devSessionId:r,exploration:n}){let t=await u({config:e,document:Zt,variables:{devSessionId:r}});nn(n,t.exploration)}function nn(e,r){r!=null&&e.setDesired({active:r.active,localWorkers:r.localWorkers,maxTrailLength:r.maxTrailLength})}var no=b(`
|
|
99
|
-
subscription HooksPausedWatch($projectId: String!) {
|
|
100
|
-
hooksPausedRequested(projectId: $projectId) {
|
|
101
|
-
paused
|
|
102
|
-
projectId
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
`),to=b(`
|
|
106
|
-
subscription WatchLocalConcurrencyChanged {
|
|
107
|
-
myMaxLocalConcurrentRunsChanged
|
|
108
|
-
}
|
|
109
|
-
`);function tn({pool:e,sseClient:r}){return r.subscribe({query:$(to)},{complete:()=>{},error:n=>{s.error(n,"localConcurrency subscription error")},next:n=>{let t=n.data?.myMaxLocalConcurrentRunsChanged;t!=null&&(L(t),e.setSize(t))}})}var oo=b(`
|
|
110
|
-
subscription WatchExecutorChangeRequested($devSessionId: String!) {
|
|
111
|
-
executorChangeRequested(devSessionId: $devSessionId) {
|
|
112
|
-
executor
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
`);function on({config:e,devSessionId:r,sseClient:n,switcher:t}){return t.connect(r),io({config:e,switcher:t}),ao({devSessionId:r,sseClient:n,switcher:t})}async function io({config:e,switcher:r}){let n=await tr(e);if(n.isErr()){s.warn({error:n.error},"initial executor fetch failed, staying local");return}r.request(n.value)}function ao({devSessionId:e,sseClient:r,switcher:n}){return r.subscribe({query:$(oo),variables:{devSessionId:e}},{complete:()=>{},error:t=>{s.error(t,"executor subscription error")},next:t=>{let o=t.data?.executorChangeRequested?.executor;o!=null&&n.request(o)}})}function an({cwd:e,projectId:r,sseClient:n}){return n.subscribe({query:$(no),variables:{projectId:r}},{complete:()=>{},error:t=>{s.error(t,"hooksPaused subscription error")},next:t=>{let o=t.data?.hooksPausedRequested?.paused;o!=null&&ee({cwd:e,paused:o})}})}function ee({cwd:e,paused:r}){let n=Ie(e);if(r&&!W.existsSync(n)){W.writeFileSync(n,"");return}!r&&W.existsSync(n)&&W.unlinkSync(n)}var co=6e4,sn=500,uo=15e3,po=re(`
|
|
116
|
-
mutation HeartbeatDevSessionWatch($id: String!) {
|
|
117
|
-
heartbeatDevSession(id: $id) {
|
|
118
|
-
__typename
|
|
119
|
-
... on DevSession {
|
|
120
|
-
id
|
|
121
|
-
}
|
|
122
|
-
... on DevSessionEndedError {
|
|
123
|
-
message
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
`),fo=re(`
|
|
128
|
-
query WatchLocalConcurrency {
|
|
129
|
-
currentUser {
|
|
130
|
-
id
|
|
131
|
-
maxLocalConcurrentRuns
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
`),mo=re(`
|
|
135
|
-
mutation EndDevSessionWatch($projectId: String!, $cwd: String!, $devSessionId: String) {
|
|
136
|
-
endDevSession(projectId: $projectId, cwd: $cwd, devSessionId: $devSessionId) {
|
|
137
|
-
__typename
|
|
138
|
-
... on DevSession {
|
|
139
|
-
id
|
|
140
|
-
}
|
|
141
|
-
... on NoActiveDevSessionError {
|
|
142
|
-
message
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
`);async function is(){To();let e=Po(process.cwd()),r=e.cwd,n=xo(r),t={current:null},o={handler:()=>{}},i=jr({config:e,onChanged:()=>{o.handler()}}),a={handler:()=>{}},l=Ro(),d=yr(),c=Ge({config:e,cwd:r,executor:i.current,ready:l.promise,explorationStatus:()=>t.current?.status()??yo(),onShutdownRequest:()=>{a.handler()},sseHealth:()=>d.snapshot()}),p=await Eo({cwd:r,ipc:c,releasePid:n}),f=await E(r);f.isErr()&&(process.stderr.write(`ripplo: ${P(f.error)}
|
|
147
|
-
`),process.exit(1));let M=f.value,y=await z(()=>Qe({config:e,cwd:r,lockfile:M}),{config:e,label:"initial sync"}),m=await h(r);m!=null&&ze(m);let g=fr({config:e,cwd:r}),O=await Lo(e);ee({cwd:r,paused:y.hooksPaused});let ne=Be(r);ne!=null&&s.info("watching branch %s in %s",ne,r);let te=lo({fetchFn:mr(),headers:{Authorization:`Bearer ${e.token}`},retry:ir,retryAttempts:1/0,url:`${e.ripploServerUrl}/graphql`});Kr({config:e,cwd:r}).catch(()=>{});let w=vo({cwd:r,devSessionId:y.devSessionId,initialConcurrency:O}),R=So({config:e,devSessionId:y.devSessionId,pool:w,executorIsLocal:()=>i.current()==="local"});t.current=R,o.handler=R.notifyQueueChange;let ln=await ko({cwd:r,pool:w}),_=lr({claim:c.claim,config:e,cwd:r,initialId:y.devSessionId,pool:w,sseClient:te,sseHealth:d}),dn=go({config:e,devSessionId:y.devSessionId,executorSwitch:i,exploration:R,pool:w,sseClient:te}),cn=wo({config:e,session:_}),un=Io();l.resolve(),ho(y.devSessionId);let pn=async()=>{cn(),un(),g(),R.stop(),p.close(),_.stop(),dn(),await w.close(),await i.stop(),await ln.stop().catch(()=>{}),await Promise.race([u({config:e,document:mo,variables:{cwd:e.cwd,devSessionId:_.getId(),projectId:e.projectId}}).catch(()=>{}),new Promise(fn=>setTimeout(fn,3e3))]),n()},v=()=>{pn().finally(()=>process.exit(0))};a.handler=v,process.on("SIGINT",v),process.on("SIGTERM",v),process.on("SIGHUP",v),process.on("SIGBREAK",v),await new Promise(()=>{})}function yo(){return{explorer:{kind:"off"},exploring:0,progress:{attempts:0,findings:0}}}function go({config:e,devSessionId:r,executorSwitch:n,exploration:t,pool:o,sseClient:i}){let a=[on({config:e,devSessionId:r,sseClient:i,switcher:n}),an({cwd:e.cwd,projectId:e.projectId,sseClient:i}),tn({pool:o,sseClient:i}),rn({config:e,devSessionId:r,exploration:t,sseClient:i})];return()=>{a.forEach(l=>{l()})}}function So({config:e,devSessionId:r,executorIsLocal:n,pool:t}){return Lr({appUrl:e.appUrl,cwd:e.cwd,executorIsLocal:n,executeTrail:(o,i)=>t.exploreTrail(o,i),report:o=>{Ye({attempts:o.attempts,config:e,devSessionId:r,findings:o.findings,trail:Xe(o.result)}).catch(i=>{s.warn({error:i},"exploration progress report failed")})},reportUnhealthy:()=>{Ze(e,r).catch(o=>{s.warn({error:o},"exploration unhealthy report failed")})}})}function ko({cwd:e,pool:r}){return ve({localDir:so.join(e,".ripplo",".local"),writePortFile:!0,onRrwebBatch:()=>{},onSpan:n=>{let t=n.attributes["ripplo.run"];t!=null&&r.routeSpan(t,n)}})}function ho(e){process.stdout.write(`${De({devSessionId:e,version:de()})}
|
|
148
|
-
`)}function wo({config:e,session:r}){let n=async()=>{try{let o=await u({config:e,document:po,variables:{id:r.getId()}});o.heartbeatDevSession?.__typename==="DevSessionEndedError"&&(s.warn("dev session ended server-side (%s); re-registering",o.heartbeatDevSession.message),await r.reregister())}catch(o){s.warn("heartbeat failed: %s",o instanceof Error?o.message:String(o))}},t=setInterval(()=>{n()},uo);return()=>{clearInterval(t)}}function vo({cwd:e,devSessionId:r,initialConcurrency:n}){return Vr({devSessionId:r,initialSize:n,spawn:Gr(Ao(),e),lockfileProvider:async()=>{let t=await k(e);if(t.isErr())return{unavailable:`daemon-load-failed:${t.error.kind}`};let o=await be(e,t.value);return{lockfileJson:ce(ue,o)}}})}function xo(e){try{return Ee({cwd:e,onCompromised:bo})}catch(r){throw r instanceof Re&&(process.stderr.write(`${qe({cwd:r.cwd,pid:r.pid})}
|
|
149
|
-
`),process.exit(1)),r}}function bo(){s.error("daemon lock compromised; shutting down"),process.stderr.write(`${He()}
|
|
150
|
-
`),process.exit(1)}function Ro(){let e={handler:()=>{}};return{promise:new Promise(n=>{e.handler=n}),resolve:()=>{e.handler()}}}async function Eo({cwd:e,ipc:r,releasePid:n}){return(await vr({cwd:e,onConnection:r.handleConnection})).match(o=>o,o=>{process.stderr.write(`${Ce(o)}
|
|
151
|
-
`),n(),process.exit(1)})}function Po(e){return S(e).match(r=>r,r=>{process.stderr.write(`${me(r)}
|
|
152
|
-
`),process.exit(1)})}function Io(){F({maxRuns:sn});let e=setInterval(()=>{F({maxRuns:sn})},co);return()=>{clearInterval(e)}}function To(){process.on("unhandledRejection",e=>{s.error({err:e},"unhandledRejection in watch; continuing")}),process.on("uncaughtException",e=>{s.error({err:e},"uncaughtException in watch; continuing")})}var Co=4;async function Lo(e){try{let n=(await u({config:e,document:fo,variables:void 0})).currentUser?.maxLocalConcurrentRuns;if(n!=null)return L(n),n}catch(r){s.warn({err:r},"failed to fetch local concurrency setting; using default")}return Co}function Ao(){let e=process.argv[1];if(e==null)throw new Error("cli entry unavailable");return e}export{is as runDaemon};
|
package/dist/daemon-H4P5PCVH.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,b,c,d,e,f,g,h,i,j,k,l}from"./chunk-5X4M4MTG.js";import"./chunk-6TCK75ER.js";import"./chunk-26A42N75.js";import"./chunk-NNH3YVVO.js";import"./chunk-KMZ3L5YA.js";export{b as renderDaemonBindError,h as renderDaemonLockCompromised,f as renderDaemonLockHeld,e as renderDaemonReady,i as renderDaemonStatus,g as renderDaemonStopResult,k as renderDaemonVersionNote,j as renderExplorationProgress,d as renderNotSignedIn,c as renderProjectAccessDenied,a as renderTunnelProvisionFailed,l as wireOutcome};
|
|
@@ -1,4 +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{k as a,l as b,m as c,n as d}from"./chunk-67YR3QHA.js";import"./chunk-26A42N75.js";import"./chunk-KMZ3L5YA.js";export{a as LOCKFILE_RELATIVE_PATH,d as loadRipplo,b as loadRipploCached,c as loadRipploCachedWithFingerprint};
|
|
@@ -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 t}from"./chunk-44GHUVW6.js";import"./chunk-CB74TAUC.js";import{a as e}from"./chunk-UDPKOYZT.js";import"./chunk-N2OBRCPQ.js";import"./chunk-JJ4QQPAV.js";import"./chunk-MOI4L3EX.js";import"./chunk-VDAFHS7J.js";import"./chunk-OQ6KNYPG.js";import"./chunk-VOZOP7MQ.js";import"./chunk-7W237JFM.js";import"./chunk-7WZ3VIUU.js";import"./chunk-TPHOSZAK.js";import"./chunk-FEHVIHVA.js";import{b as o}from"./chunk-KOKEEAEF.js";import"./chunk-R3DZ6JPY.js";import"./chunk-73TKORK6.js";import"./chunk-MHNGR6M7.js";import"./chunk-FXCBWBN5.js";import"./chunk-67YR3QHA.js";import"./chunk-IPSXNIXC.js";import"./chunk-LOEAZGYO.js";import"./chunk-6TCK75ER.js";import"./chunk-26A42N75.js";import"./chunk-NNH3YVVO.js";import"./chunk-KMZ3L5YA.js";var r=o({event:"PostToolUse",handlers:[t,e],note:i=>({hookSpecificOutput:{additionalContext:i,hookEventName:"PostToolUse"}})});export{r as postEditHook};
|
|
@@ -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}from"./chunk-44GHUVW6.js";import"./chunk-CB74TAUC.js";import"./chunk-MOI4L3EX.js";import"./chunk-VDAFHS7J.js";import"./chunk-OQ6KNYPG.js";import"./chunk-VOZOP7MQ.js";import"./chunk-7W237JFM.js";import"./chunk-7WZ3VIUU.js";import"./chunk-TPHOSZAK.js";import"./chunk-FEHVIHVA.js";import"./chunk-R3DZ6JPY.js";import"./chunk-73TKORK6.js";import"./chunk-MHNGR6M7.js";import"./chunk-FXCBWBN5.js";import"./chunk-67YR3QHA.js";import"./chunk-IPSXNIXC.js";import"./chunk-LOEAZGYO.js";import"./chunk-6TCK75ER.js";import"./chunk-26A42N75.js";import"./chunk-NNH3YVVO.js";import"./chunk-KMZ3L5YA.js";export{a as postEditAnalyze};
|
|
@@ -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}from"./chunk-UDPKOYZT.js";import"./chunk-N2OBRCPQ.js";import"./chunk-JJ4QQPAV.js";import"./chunk-7WZ3VIUU.js";import"./chunk-TPHOSZAK.js";import"./chunk-R3DZ6JPY.js";import"./chunk-FXCBWBN5.js";import"./chunk-67YR3QHA.js";import"./chunk-IPSXNIXC.js";import"./chunk-LOEAZGYO.js";import"./chunk-6TCK75ER.js";import"./chunk-26A42N75.js";import"./chunk-NNH3YVVO.js";import"./chunk-KMZ3L5YA.js";export{a as postEditFlagStubs};
|
|
@@ -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 h}from"./chunk-OWN4P2K7.js";import{a as c}from"./chunk-7WZ3VIUU.js";import{f}from"./chunk-TPHOSZAK.js";import{c as y}from"./chunk-KOKEEAEF.js";import"./chunk-R3DZ6JPY.js";import"./chunk-IPSXNIXC.js";import"./chunk-LOEAZGYO.js";import"./chunk-NNH3YVVO.js";import"./chunk-KMZ3L5YA.js";import{parse as m}from"shell-quote";import*as l from"zod/mini";var R=l.looseObject({command:l.string()}),k="run",S=new Set(["tail","head","less","more","wc","sort","uniq","awk","sed","grep"]),H=y("PreToolUse",e=>{if(e.tool_name!=="Bash")return;let n=R.safeParse(e.tool_input);if(!n.success)return;let r=x(n.data.command),o=b(r),s=g(r,"compile");if(o==null&&s==null)return;let{cwd:t}=e;if(!c(t)||!f(t))return;let a=E({cwd:t,gate:o,pipedCompile:s,sessionId:e.session_id,tokens:r});return a==null?void 0:O(a)});function E({cwd:e,gate:n,pipedCompile:r,sessionId:o,tokens:s}){if(n!=null&&!h(e,o,n.skill))return n.reason;let t=n?.kind==="run"?g(s,"run"):null;return t!=null?`Don't pipe \`ripplo run\` through \`${t}\` \u2014 buffering filters hide live progress, and killing the pipeline mid-run orphans the run on the server. Redirect to a file instead (\`npx ripplo run <id> > /tmp/run.log 2>&1\` and Read it), or use \`run_in_background: true\`.`:r!=null?`Don't pipe \`ripplo compile\` through \`${r}\` \u2014 the piped process holds stdio open and the command hangs long after compile finishes. Run \`npx ripplo compile\` bare, its output is already short.`:null}var P=new Set(["comment","resolve","clarify","dismiss","start"]);function b(e){return v(e)?null:w(e)?{kind:"tasks",reason:"Changing a task with `ripplo tasks` requires the `/ripplo:tasks` skill loaded first. Load `/ripplo:tasks` then retry \u2014 it carries how to route the request and the proof bar for app changes: a run that exercises the broken condition, plus the exact frame and element that prove the fix.",skill:"tasks"}:A(e)?{kind:"replay",reason:"Running `ripplo explore replay` requires the `/ripplo:tasks` skill loaded first. Load `/ripplo:tasks` then retry \u2014 it carries the finding-triage loop and the add-vs-weaken guardrail for resolving findings.",skill:"tasks"}:I(e)?{kind:"run",reason:"Running `ripplo run` requires the `/ripplo:run` skill loaded first. Load `/ripplo:run` then retry \u2014 it carries the artifact-read order, the no-grep-piping guidance, the failure decision tree, and the caught-bug filing contract.",skill:k}:null}function w(e){return e.some((n,r)=>{let o=e[r+2];return n==="ripplo"&&e[r+1]==="tasks"&&typeof o=="string"&&P.has(o)})}function A(e){return e.some((n,r)=>n==="ripplo"&&e[r+1]==="replay")}function I(e){return e.some((n,r)=>n==="ripplo"&&e[r+1]==="run")}var _=new Set(["--help","-h","--version"]);function v(e){return e.some(n=>typeof n=="string"&&_.has(n))}function x(e){try{return m(e)}catch{return[]}}function u(e,n){return typeof e=="object"&&"op"in e&&n.has(e.op)}var D=new Set(["|"]),T=new Set([";","&&","||","&"]),L=new Set([">",">>","&>","1>"]);function g(e,n){let r=e.findIndex((i,p)=>i==="ripplo"&&e[p+1]===n);if(r===-1)return null;let o=e.slice(r+1),s=o.findIndex(i=>u(i,T)),t=s===-1?o:o.slice(0,s);if(t.some(i=>u(i,L)))return null;let a=t.find((i,p)=>{let d=t[p-1];return d!=null&&u(d,D)&&typeof i=="string"&&S.has(i)});return typeof a=="string"?a:null}function O(e){return{hookSpecificOutput:{hookEventName:"PreToolUse",permissionDecision:"deny",permissionDecisionReason:e}}}export{g as bufferingAfter,H as preBashRunGateHook};
|
|
@@ -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 t}from"./chunk-SNU66GSR.js";import{a as i}from"./chunk-YQ2RBEOJ.js";import"./chunk-JJ4QQPAV.js";import"./chunk-OWN4P2K7.js";import{a as e}from"./chunk-43C7VPGA.js";import"./chunk-7W237JFM.js";import"./chunk-7WZ3VIUU.js";import"./chunk-TPHOSZAK.js";import"./chunk-FEHVIHVA.js";import{b as o}from"./chunk-KOKEEAEF.js";import"./chunk-R3DZ6JPY.js";import"./chunk-MHNGR6M7.js";import"./chunk-67YR3QHA.js";import"./chunk-IPSXNIXC.js";import"./chunk-LOEAZGYO.js";import"./chunk-26A42N75.js";import"./chunk-NNH3YVVO.js";import"./chunk-KMZ3L5YA.js";var d=o({event:"PreToolUse",handlers:[e,t,i],note:r=>({hookSpecificOutput:{additionalContext:r,hookEventName:"PreToolUse"}})});export{d as preEditHook};
|
|
@@ -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}from"./chunk-SNU66GSR.js";import"./chunk-OWN4P2K7.js";import"./chunk-7WZ3VIUU.js";import"./chunk-TPHOSZAK.js";import"./chunk-R3DZ6JPY.js";import"./chunk-IPSXNIXC.js";import"./chunk-LOEAZGYO.js";import"./chunk-NNH3YVVO.js";import"./chunk-KMZ3L5YA.js";export{a as preEditRipploSkillGate};
|
|
@@ -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}from"./chunk-YQ2RBEOJ.js";import"./chunk-JJ4QQPAV.js";import"./chunk-7W237JFM.js";import"./chunk-7WZ3VIUU.js";import"./chunk-TPHOSZAK.js";import"./chunk-FEHVIHVA.js";import"./chunk-R3DZ6JPY.js";import"./chunk-MHNGR6M7.js";import"./chunk-IPSXNIXC.js";import"./chunk-LOEAZGYO.js";import"./chunk-NNH3YVVO.js";import"./chunk-KMZ3L5YA.js";export{a as preEditScopeGate};
|
|
@@ -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 e}from"./chunk-OAU4HUD2.js";import{a as r}from"./chunk-WNAVYV4P.js";import"./chunk-LB65USNP.js";import{a as i}from"./chunk-AGK6XOX2.js";import{a as t}from"./chunk-4OSYMIH6.js";import"./chunk-CB74TAUC.js";import"./chunk-N2OBRCPQ.js";import"./chunk-JJ4QQPAV.js";import"./chunk-OWN4P2K7.js";import"./chunk-5E62BCS7.js";import"./chunk-OQ6KNYPG.js";import"./chunk-7W237JFM.js";import"./chunk-7WZ3VIUU.js";import"./chunk-TPHOSZAK.js";import"./chunk-FEHVIHVA.js";import{b as o}from"./chunk-KOKEEAEF.js";import"./chunk-R3DZ6JPY.js";import"./chunk-MHNGR6M7.js";import"./chunk-IPSXNIXC.js";import"./chunk-LOEAZGYO.js";import"./chunk-NNH3YVVO.js";import"./chunk-KMZ3L5YA.js";var a=o({event:"UserPromptSubmit",handlers:[t,e,r,i],note:m=>({hookSpecificOutput:{additionalContext:m,hookEventName:"UserPromptSubmit"}})});export{a as promptSubmitHook};
|
|
@@ -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}from"./chunk-OAU4HUD2.js";import"./chunk-CB74TAUC.js";import"./chunk-N2OBRCPQ.js";import"./chunk-JJ4QQPAV.js";import"./chunk-7W237JFM.js";import"./chunk-7WZ3VIUU.js";import"./chunk-TPHOSZAK.js";import"./chunk-FEHVIHVA.js";import"./chunk-R3DZ6JPY.js";import"./chunk-MHNGR6M7.js";import"./chunk-IPSXNIXC.js";import"./chunk-LOEAZGYO.js";import"./chunk-NNH3YVVO.js";import"./chunk-KMZ3L5YA.js";export{a as scopeReminder};
|