ripplo 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +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-3HAQCJRK.js +4 -0
- package/dist/{chunk-5E62BCS7.js → chunk-47LLHHJH.js} +2 -2
- package/dist/chunk-4YAC72LW.js +7 -0
- package/dist/chunk-5HFJIZLI.js +4 -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-CEVQ5RNC.js → chunk-7RREARGA.js} +2 -2
- 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-DY7ZW6QZ.js +9 -0
- package/dist/chunk-E6ZBZIIS.js +4 -0
- package/dist/chunk-G6J2WIHJ.js +4 -0
- package/dist/{chunk-4OSYMIH6.js → chunk-GYBY7EOO.js} +1 -1
- package/dist/{chunk-LOEAZGYO.js → chunk-HEOMRXZE.js} +1 -1
- package/dist/chunk-IK3ROREL.js +6 -0
- package/dist/{chunk-7W237JFM.js → chunk-JS3DLVVI.js} +1 -1
- package/dist/{chunk-TPHOSZAK.js → chunk-KH4QH23U.js} +1 -1
- package/dist/{chunk-QAR7FZO3.js → chunk-LEFODI2H.js} +1 -1
- package/dist/{chunk-43C7VPGA.js → chunk-LWMXGWS2.js} +1 -1
- package/dist/chunk-O45YB6YY.js +354 -0
- 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-S2K5KILQ.js +8 -0
- package/dist/chunk-SXVWB7TZ.js +6 -0
- package/dist/{chunk-5X4M4MTG.js → chunk-UH5CQF5R.js} +3 -3
- package/dist/{chunk-UDPKOYZT.js → chunk-VKAZQPJJ.js} +1 -1
- package/dist/chunk-WAGXAEB4.js +13 -0
- package/dist/chunk-WBKSJU63.js +83 -0
- package/dist/{chunk-AGK6XOX2.js → chunk-XAMVRZJH.js} +2 -2
- package/dist/chunk-ZHDR7LXB.js +56 -0
- package/dist/{cli-error-AHNJULLG.js → cli-error-6PUIWNIT.js} +1 -1
- package/dist/{compile-write-OLQOR3OK.js → compile-write-KUUFWSI4.js} +1 -1
- package/dist/daemon-2ZTZXQW6.js +4 -0
- package/dist/daemon-GP3EIISA.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 +207 -260
- package/dist/{plan-reminder-EPCNBFY3.js → plan-reminder-PP5DQAQZ.js} +1 -1
- package/dist/post-edit-R7KN424T.js +4 -0
- package/dist/post-edit-analyze-UURDL3AH.js +4 -0
- package/dist/post-edit-flag-stubs-I7AUGN4D.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-6KNOFK4W.js +4 -0
- package/dist/scope-reminder-A6GVTTVE.js +4 -0
- package/dist/session-preamble-IZQPIWST.js +4 -0
- package/dist/status-PG4EBZRM.js +4 -0
- package/dist/{stop-enforce-4XV6LK7Z.js → stop-enforce-CO5GYI3G.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 +2 -4
- 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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __ripploCreateRequire } from "node:module";
|
|
3
3
|
const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
|
|
4
|
-
import{a as
|
|
4
|
+
import{a as f,b as g,c as w}from"./chunk-BGY5F3IU.js";import{a as d}from"./chunk-SXVWB7TZ.js";import{c as m}from"./chunk-JS3DLVVI.js";import{a as i}from"./chunk-MHNGR6M7.js";import{a as u}from"./chunk-7WZ3VIUU.js";import{f as c}from"./chunk-KH4QH23U.js";import{e as a}from"./chunk-C7SV6AR2.js";import{graphql as h}from"gql.tada";var S=h(`
|
|
5
5
|
query ScopeReminder($projectId: String!, $cwd: String!) {
|
|
6
6
|
project(id: $projectId) {
|
|
7
7
|
id
|
|
@@ -18,6 +18,6 @@ import{a as d,b as f,c as g}from"./chunk-CB74TAUC.js";import{a as w}from"./chunk
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
`),x=async t=>{let{cwd:e}=t;if(!
|
|
21
|
+
`),x=async t=>{let{cwd:e}=t;if(!u(e)||!c(e))return;let p=f(e);if(g(e,"scope-reminder")===p)return;let r=m(e).unwrapOr(void 0);if(r==null)return;let s=await a({config:r,document:S,variables:{cwd:r.cwd,projectId:r.projectId}}).catch(()=>null);w(e,"scope-reminder",p);let n=s?.project?.devSession?.scopeItems??[];return d({cwd:e,scope:{available:s!=null,items:n.map(o=>b(o))}}),s==null?{hookSpecificOutput:{additionalContext:`Ripplo scope: unknown \u2014 server unreachable, scope guardrails are not enforcing. Check the dev session (\`npx ripplo doctor\`). ${i("start")}`,hookEventName:"UserPromptSubmit"}}:{hookSpecificOutput:{additionalContext:n.length===0?`Ripplo scope: empty. ${i("run")}`:`Ripplo scope (${String(n.length)}):
|
|
22
22
|
${n.map(o=>{let l=o.workflow;return l==null?` [intent] (${o.id}) ${o.label??""}`:` [${l.spec==null?"stub":"implemented"}] (${o.id}) ${l.slug}`}).join(`
|
|
23
23
|
`)}`,hookEventName:"UserPromptSubmit"}}};function b(t){let e=t.workflow;return e==null?{label:t.label,slug:null,status:"intent"}:{label:t.label,slug:e.slug,status:e.spec==null?"stub":"implemented"}}export{x as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __ripploCreateRequire } from "node:module";
|
|
3
3
|
const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
|
|
4
|
-
import{i as s,j as a}from"./chunk-
|
|
4
|
+
import{i as s,j as a}from"./chunk-C7SV6AR2.js";import d from"fs";import{setTimeout as p}from"timers/promises";import{checkSync as m,lockSync as f}from"proper-lockfile";var y="dev.pid",l=15e3,h=1e4,k=250;function g(n){return u(i(n))}async function b(n){let r=g(n);if(r==null||!c(n))return{kind:"not-running"};try{process.kill(r,"SIGTERM")}catch{return{kind:"not-running"}}let e=Date.now()+h;for(;Date.now()<e;){if(!c(n))return{kind:"stopped",pid:r};await p(k)}return{kind:"timeout",pid:r}}function c(n){try{return m(i(n),{realpath:!1,stale:l})}catch{return!1}}function i(n){return a(n,y)}var o=class extends Error{pid;cwd;constructor({cwd:r,pid:e}){super("dev-lock-held"),this.name="DevLockHeldError",this.pid=e,this.cwd=r}};function E({cwd:n,onCompromised:r}){s(n);let e=i(n),t=w({cwd:n,onCompromised:r,path:e});return d.writeFileSync(e,String(process.pid)),()=>{try{t()}catch{}}}function w({cwd:n,onCompromised:r,path:e}){try{return f(e,{realpath:!1,stale:l,onCompromised:()=>{r()}})}catch(t){throw D(t)?new o({cwd:n,pid:u(e)}):t}}function D(n){if(!(n instanceof Error)||!("code"in n))return!1;let{code:r}=n;return r==="ELOCKED"}function u(n){try{let r=d.readFileSync(n,"utf8").trim(),e=Number.parseInt(r,10);return Number.isFinite(e)&&e>0?e:null}catch{return null}}export{g as a,b,c,i as d,o as e,E as f};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __ripploCreateRequire } from "node:module";
|
|
3
|
+
const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
|
|
4
|
+
import{g as m}from"./chunk-6U2LNGSV.js";import{a as f,c as k}from"./chunk-IK3ROREL.js";import{a as h}from"./chunk-OQ6KNYPG.js";import{a as y}from"./chunk-WAGXAEB4.js";import{a as s}from"./chunk-MHNGR6M7.js";import{h as d,i as p}from"./chunk-E6ZBZIIS.js";import{m as u}from"./chunk-WBKSJU63.js";import{a as c}from"./chunk-7WZ3VIUU.js";import{f as l}from"./chunk-KH4QH23U.js";import*as a from"zod/mini";var S=a.looseObject({file_path:a.string()}),H=async e=>{let n=S.safeParse(e.tool_input);if(!n.success||!/\/\.ripplo\/.*\.ts$/.test(n.data.file_path))return;let{cwd:o}=e;if(!c(o))return;if(!l(o))return{hookSpecificOutput:{additionalContext:"Ripplo hooks are paused \u2014 DSL compile and lockfile sync did not run for this edit. Resume with `npx ripplo hooks resume` when ready.",hookEventName:"PostToolUse"}};let r=await d(o);if(r.isErr())return{decision:"block",reason:`${y(r.error)}
|
|
5
|
+
${s("create","DSL authoring rules")}`};let t=await b({cwd:o,filePath:n.data.file_path,lockfile:r.value});if("block"in t)return{decision:"block",reason:t.block};let{addedSlugs:i}=await m({cwd:o,editedPath:n.data.file_path,lockfile:r.value,requireHooks:!0,syncFirst:!0});return z(P({addedSlugs:i,elsewhere:t.elsewhere}))};function P({addedSlugs:e,elsewhere:n}){return[...e.length>0?[`Auto-scoped ${e.join(", ")} (dirty tests).`]:[],...n>0?[g(n).trimStart()]:[]]}async function b({cwd:e,filePath:n,lockfile:o}){let r=f({cwd:e,lockfile:o});await p(e,o);let t=A(r,o,n),i=r.length-t.length;return t.length===0?{elsewhere:i}:{block:`${k(t)}${g(i)}
|
|
6
|
+
${s("create")}`}}function A(e,n,o){let r=new Set(u(n).filter(({workflow:t})=>t.sourcePath!=null&&o.endsWith(t.sourcePath)).map(({ref:t})=>t));return r.size===0?e:e.filter(t=>{let i=w(t);return i==null||r.has(i)})}function w(e){return e.kind==="unreachable-interaction"?e.violation.test:e.kind==="redundant-assertion"?e.redundancy.test:e.kind==="undecided-action-consequence"?e.consequence.test:null}function g(e){return e===0?"":`
|
|
7
|
+
${h(e,"finding")} in other files \u2014 \`npx ripplo compile\` for the full list.`}function z(e){if(e.length!==0)return{hookSpecificOutput:{additionalContext:e.join(`
|
|
8
|
+
`),hookEventName:"PostToolUse"}}}export{H as a};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __ripploCreateRequire } from "node:module";
|
|
3
|
+
const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
|
|
4
|
+
import{a as p}from"./chunk-JJ4QQPAV.js";import{b as l}from"./chunk-KH4QH23U.js";import{j as c}from"./chunk-C7SV6AR2.js";import{createHash as S}from"crypto";import{mkdirSync as b,readFileSync as v,writeFileSync as A}from"fs";import F from"path";import*as e from"zod/mini";import a from"picomatch";function m(t){return l(["diff","--name-only","HEAD"],t).split(`
|
|
5
|
+
`).filter(n=>n.length>0)}function g({cwd:t,ignoreGlobs:n,watchGlobs:r}){let o=a([...r]),i=a([...n]);return m(t).filter(s=>o(s)&&!i(s))}function z(t){return l(["ls-files","--others","--exclude-standard"],t).split(`
|
|
6
|
+
`).filter(n=>n.length>0)}function d({cwd:t,ignoreGlobs:n,watchGlobs:r}){let o=a([...r]),i=a([...n]);return z(t).filter(s=>o(s)&&!i(s))}var x=e.object({label:e.nullable(e.string()),slug:e.nullable(e.string()),status:e.enum(["intent","stub","implemented"])}),C=e.object({intent:e.string(),name:e.string(),sourcePath:e.nullable(e.string()),stub:e.boolean()}),k=e.object({changedAppFiles:e.readonly(e.array(e.string())),scope:e.object({available:e.boolean(),items:e.readonly(e.array(x))}),tests:e._default(e.readonly(e.array(C)),[]),untrackedAppFiles:e.readonly(e.array(e.string()))});function O({cwd:t,scope:n}){let r=y(t);u(t,{...f(t),scope:n,tests:r?.tests??[]})}function T({cwd:t,tests:n}){let r=y(t);u(t,{...f(t),scope:r?.scope??{available:!1,items:[]},tests:n??r?.tests??[]})}function y(t){let n=k.safeParse(I(h(t)));return n.success?n.data:null}function I(t){try{return JSON.parse(v(t,"utf8"))}catch{return null}}function h(t){return c(t,"coverage-context.json")}function u(t,n){let r=h(t);b(F.dirname(r),{recursive:!0});let o=S("sha256").update(JSON.stringify(n)).digest("hex");A(r,JSON.stringify({...n,inputHash:o},null,2))}function f(t){let{ignorePaths:n,watchPaths:r}=p(),o={cwd:t,ignoreGlobs:n,watchGlobs:r};return{changedAppFiles:g(o),untrackedAppFiles:d(o)}}export{O as a,T as b};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __ripploCreateRequire } from "node:module";
|
|
3
3
|
const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
|
|
4
|
-
import{B as i,
|
|
5
|
-
`)}function
|
|
6
|
-
daemon: cannot subscribe to run dispatch${
|
|
4
|
+
import{B as i,c as t}from"./chunk-WBKSJU63.js";function m(e){switch(e.kind){case"already-running":return`ripplo daemon: daemon already running (socket ${e.socketPath}).`;case"bind-failed":return`ripplo daemon: failed to bind IPC socket: ${e.message}`}}function g({projectId:e,serverUrl:n}){return[`Project "${e}" (from .ripplo/project.json) was not found on ${n}, or this account does not have access to it.`,"Run `npx ripplo projects list` to see your projects, then update .ripplo/project.json (or re-run `npx ripplo init --project <id>`)."].join(`
|
|
5
|
+
`)}function f(){return"Not signed in. Run `npx ripplo auth login`, then start the daemon again."}function h({devSessionId:e,version:n}){return`ripplo daemon: v${n} ready as local executor for session ${e} (switch with \`npx ripplo executor cloud\` \u2014 Ctrl-C to stop)`}function x({cwd:e,pid:n}){return`ripplo daemon: another daemon is already running for this project${n==null?"":` (pid ${String(n)})`} (cwd ${e}) \u2014 this one is exiting. Run \`npx ripplo daemon status\` to inspect it, or \`npx ripplo daemon stop\` to stop it.`}function k(e){switch(e.kind){case"not-running":return"ripplo daemon: not running.";case"stopped":return`ripplo daemon: stopped (pid ${String(e.pid)}).`;case"timeout":return`ripplo daemon: pid ${String(e.pid)} did not exit within 10s \u2014 it may be finishing a run. Check again with \`npx ripplo daemon status\`.`}}function w(){return"ripplo daemon: lock compromised \u2014 another daemon likely took over this project. Shutting down."}function y(e){if(e.kind==="not-running")return"daemon: not running";if(e.kind==="unresponsive")return`daemon: running but no reply within ${String(e.timeoutMs/1e3)}s \u2014 likely busy executing runs, retry when the batch drains`;let{status:n}=e,r=n.version==null?"version unknown (pre-0.7.8)":`v${n.version}`,s=`${String(n.active)} active, ${String(n.queued)} queued`,a=l(n.explorer,n.exploring),o=`daemon: running (${r} | ${s} | ${a} | ${d(n.progress)})`;if(n.sseHealth!=null&&!n.sseHealth.ok){let p=n.sseHealth.detail==null?"":`: ${n.sseHealth.detail}`;return`${o}
|
|
6
|
+
daemon: cannot subscribe to run dispatch${p} \u2014 server-side, restarting the daemon will not help`}return o}function d(e){return e.attempts===0?"explore: idle":`explore: ${String(e.attempts)} attempts, ${String(e.findings)} findings`}function $(e){let n=e.daemonVersion==null?"an older build":`v${e.daemonVersion}`;return e.kind==="restarted"?`ripplo: daemon was on ${n} \u2014 restarted on the current build`:`ripplo: daemon is on a stale build (${n}) with runs in flight \u2014 rerun once it drains, or npx ripplo daemon restart`}function b(e){switch(e.kind){case"pass":return{kind:"pass"};case"findings":return{findingLines:e.contradictions.map(n=>i({contradiction:n,evidencePath:`.ripplo/debug/${e.runId}/behavior.jsonl`})),kind:"findings"};case"error":return{detail:t(e.error),kind:"error"};case"dispatch-failed":return{kind:"dispatch-error",reason:{detail:e.reason,type:"generic"}}}}function l(e,n){switch(e.kind){case"off":return"explorer: off";case"on":return`explorer: on, ${String(n)} exploring`;case"paused":return"explorer: paused for active runs or a short cooldown \u2014 resumes on its own";case"waiting":return"explorer: waiting for more workflow coverage \u2014 run npx ripplo explore analyze";case"blocked":return`explorer: blocked \u2014 ${c(e.reason)}`}}function c(e){switch(e){case"no-lockfile":return"no lockfile found, run npx ripplo compile";case"unstamped":return"lockfile has no compiled checks, run npx ripplo compile";case"dsl-drift":return"workflow sources changed since the last compile, run npx ripplo compile";case"load-failed":return"workflow definitions do not compile, run npx ripplo compile for details";case"model-empty":return"no workflow interactions can be explored, run npx ripplo explore analyze"}}export{m as a,g as b,f as c,h as d,x as e,k as f,w as g,y as h,d as i,$ as j,b as k};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __ripploCreateRequire } from "node:module";
|
|
3
3
|
const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
|
|
4
|
-
import{b as u}from"./chunk-
|
|
4
|
+
import{b as u}from"./chunk-SXVWB7TZ.js";import{a as f}from"./chunk-JJ4QQPAV.js";import{l as c}from"./chunk-E6ZBZIIS.js";import{m as p}from"./chunk-7JKCHASU.js";import{a as m}from"./chunk-7WZ3VIUU.js";import{f as l}from"./chunk-KH4QH23U.js";import v from"path";import h from"picomatch";import*as s from"zod/mini";var w=s.looseObject({file_path:s.string()}),R=async n=>{let i=w.safeParse(n.tool_input);if(!i.success)return;let d=i.data.file_path,{cwd:t}=n;if(!m(t)||!l(t))return;let r=v.relative(t,d);if(r.startsWith(".."))return;let{ignorePaths:b,watchPaths:k}=f(),P=h([...k]),g=h([...b]);if(!P(r)||g(r))return;let o=await p(t);if(u({cwd:t,tests:o.isOk()?o.value.workflows.map(e=>({intent:e.intent,name:e.name,sourcePath:e.sourcePath??null,stub:e.stub})):void 0}),o.isErr())return;let a=c(o.value);if(a.length!==0)return{hookSpecificOutput:{additionalContext:`Reminder: stub workflows still unimplemented \u2014 ${a.join(", ")}. Implement with \`workflow("Intent", () => ({ given, steps }))\`.`,hookEventName:"PostToolUse"}}};export{R as a};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __ripploCreateRequire } from "node:module";
|
|
3
|
+
const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
|
|
4
|
+
import{a as t}from"./chunk-MHNGR6M7.js";import{g as o,h as a,j as i}from"./chunk-7JKCHASU.js";function h(e){return e.kind==="authoring-error"?["Compilation failed",e.message,t("create","DSL authoring rules")].join(`
|
|
5
|
+
|
|
6
|
+
`):[`Compilation failed: ${l(e)}`,t("create","DSL authoring rules")].join(`
|
|
7
|
+
`)}function x(){return`${i} is up to date`}function $(e){return[`${i} is ${e==="missing"?"missing":"out of date"} \u2014 run \`npx ripplo compile\` and commit it`,t("setup")].join(`
|
|
8
|
+
`)}function L(){return`Wrote ${i}`}function l(e){switch(e.kind){case"typecheck-failed":return["TypeScript errors in .ripplo/:",...e.diagnostics].join(`
|
|
9
|
+
`);case"not-ripplo":return`${e.entryPath} must default-export createRipplo({ state, workflows }).`;case"invalid-lockfile":return["Lockfile failed schema validation (stale or hand-edited .ripplo/ripplo.lock):",...e.issues,"Regenerate with `npx ripplo compile`."].join(`
|
|
10
|
+
`);case"load-threw":return u(e.message);case"authoring-error":return e.message;case"fixture-failed":return p(e.error);case"expand-failed":return`Could not resolve tests for workflow "${e.workflow}": ${e.message}`}}var s="state-selection-condition-requires-closed";function u(e){return e===s?["A state condition queries a collection whose full contents are unknown.","Add closed(record) for every collection used by that condition so the solver can prove the result.",`Diagnostic code: ${e}`].join(`
|
|
11
|
+
`):c(e)?["Ripplo rejected the workflow model while loading .ripplo/index.ts.",`${d(e)} Load /ripplo:create for the matching DSL rule.`,`Diagnostic code: ${e}`].join(`
|
|
12
|
+
`):[".ripplo/index.ts could not be loaded:",e].join(`
|
|
13
|
+
`)}function c(e){return/^[a-z][a-z0-9]*(?:-[a-z0-9]+)+$/u.test(e)}function d(e){let r=e.replaceAll("-"," ");return`${r.charAt(0).toUpperCase()}${r.slice(1)}.`}function p(e){switch(e.kind){case"fixture-missing":return`Fixture "${e.name}" not found at ${e.path}.`;case"fixture-invalid-name":return`Invalid fixture name "${e.name}" \u2014 bare name under .ripplo/fixtures/, no .. or absolute paths.`;case"fixture-symlink":return`Fixture "${e.name}" is a symlink \u2014 only regular files allowed.`;case"fixture-not-file":return`Fixture "${e.name}" is not a regular file.`;case"fixture-too-large":return`Fixture "${e.name}" is ${n(e.size)} \u2014 over the ${n(o)} per-file limit.`;case"fixtures-total-too-large":return`Fixtures total ${n(e.total)} \u2014 over the ${n(a)} limit.`}}function n(e){return`${String(Math.round(e/(1024*1024)*10)/10)} MB`}export{h as a,x as b,$ as c,L as d};
|