ripplo 0.12.0 → 0.14.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.
Files changed (40) hide show
  1. package/dist/{chunk-3VL4ORWB.js → chunk-3ZQRLG7C.js} +1 -1
  2. package/dist/{chunk-RYR5R3FA.js → chunk-56MARCN3.js} +1 -1
  3. package/dist/{chunk-ZW76MTLE.js → chunk-6JXOIP2T.js} +1 -1
  4. package/dist/{chunk-7JKAV7AT.js → chunk-75T33SK5.js} +1 -1
  5. package/dist/chunk-AVBTPZUU.js +360 -0
  6. package/dist/{chunk-QK7AEQ3B.js → chunk-B5HDXHPI.js} +2 -2
  7. package/dist/{chunk-ORWKDV2H.js → chunk-BQ25IGJS.js} +1 -1
  8. package/dist/{chunk-BTNSUORZ.js → chunk-EOBWMMVC.js} +1 -1
  9. package/dist/{chunk-SVM5ORF6.js → chunk-GTB7NYDE.js} +1 -1
  10. package/dist/{chunk-UAWFWSKD.js → chunk-LEYSGMW2.js} +1 -1
  11. package/dist/{chunk-3FTGPUK3.js → chunk-NIC2DOQW.js} +1 -1
  12. package/dist/{chunk-KAD7UO53.js → chunk-NXKOUVSC.js} +21 -21
  13. package/dist/chunk-PVRM4YWS.js +83 -0
  14. package/dist/{chunk-XBAVNTRQ.js → chunk-PWDBRLJP.js} +1 -1
  15. package/dist/{chunk-2UJUWE7A.js → chunk-Q7FIZGKZ.js} +1 -1
  16. package/dist/{chunk-7GY5ANXL.js → chunk-R3FZ2JEW.js} +1 -1
  17. package/dist/{chunk-6UJNBCPU.js → chunk-U4LFIMDP.js} +1 -1
  18. package/dist/{chunk-JMJXM477.js → chunk-ULIHURY6.js} +1 -1
  19. package/dist/{chunk-77BRFU6M.js → chunk-ZGWV564Y.js} +1 -1
  20. package/dist/{cli-error-PG24CNXE.js → cli-error-N7X2CREI.js} +1 -1
  21. package/dist/{compile-write-LMAPZGYL.js → compile-write-XMVD5PX2.js} +1 -1
  22. package/dist/{daemon-HTI5DVL2.js → daemon-DARMT5AV.js} +1 -1
  23. package/dist/{daemon-SIPLLQJP.js → daemon-ZUDQ7ERI.js} +1 -1
  24. package/dist/{dsl-loader-I6F73IFP.js → dsl-loader-SSXMC5EE.js} +1 -1
  25. package/dist/hook.js +1 -1
  26. package/dist/index.js +180 -180
  27. package/dist/{plan-reminder-MR2UFQZE.js → plan-reminder-K7HOFGJN.js} +1 -1
  28. package/dist/{post-edit-76WC4SU3.js → post-edit-OI6DDU25.js} +1 -1
  29. package/dist/post-edit-analyze-6V5YI3CR.js +4 -0
  30. package/dist/{post-edit-flag-stubs-UJ2SZJVQ.js → post-edit-flag-stubs-IKIH5DAH.js} +1 -1
  31. package/dist/{pre-edit-YGDITCNZ.js → pre-edit-IOWNUOZY.js} +1 -1
  32. package/dist/{pre-edit-watch-gate-4V2KYSIF.js → pre-edit-watch-gate-N7FI5HBA.js} +1 -1
  33. package/dist/{prompt-submit-ARRJRLMC.js → prompt-submit-ZU466ET5.js} +1 -1
  34. package/dist/status-OSHZ3JGU.js +4 -0
  35. package/dist/{stop-enforce-BLX3ZEDG.js → stop-enforce-4UUK36YU.js} +1 -1
  36. package/package.json +4 -4
  37. package/dist/chunk-RJ6MN3PT.js +0 -360
  38. package/dist/chunk-SQ4SBMKG.js +0 -83
  39. package/dist/post-edit-analyze-5F5VSL4T.js +0 -4
  40. package/dist/status-VWZXTEWF.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 o}from"./chunk-BTNSUORZ.js";import{a as t}from"./chunk-MHNGR6M7.js";var r=class extends Error{failure;constructor(i){super(i.kind),this.name="CliError",this.failure=i}};function u(e){return e instanceof r?a(e.failure):e instanceof Error?e.message:String(e)}function a(e){switch(e.kind){case"project-file-missing":return[`Missing ${e.path} \u2014 this directory is not a Ripplo project.`,"Run `npx ripplo init` to create it (or cd into the project root).",t("setup")].join(`
4
+ import{a as o}from"./chunk-EOBWMMVC.js";import{a as t}from"./chunk-MHNGR6M7.js";var r=class extends Error{failure;constructor(i){super(i.kind),this.name="CliError",this.failure=i}};function u(e){return e instanceof r?a(e.failure):e instanceof Error?e.message:String(e)}function a(e){switch(e.kind){case"project-file-missing":return[`Missing ${e.path} \u2014 this directory is not a Ripplo project.`,"Run `npx ripplo init` to create it (or cd into the project root).",t("setup")].join(`
5
5
  `);case"project-file-invalid":return[`${e.path} is invalid:`,...e.issues.map(i=>` ${i}`),"Fix the file by hand or re-run `npx ripplo init`."].join(`
6
6
  `);case"not-authenticated":return["Not signed in. Run `npx ripplo auth login`.","(Claude Code: run it yourself in the background \u2014 the user just approves in the browser.)"].join(`
7
7
  `);case"env-invalid":return s(e);case"playwright-install-failed":return["Playwright browser install failed \u2014 Chromium is still missing.","Run `npx playwright install chromium` and check its output for network, proxy, or disk-space errors."].join(`
@@ -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{a as i}from"./chunk-MHNGR6M7.js";import{m as p}from"./chunk-ORWKDV2H.js";import{a}from"./chunk-7WZ3VIUU.js";import{e as s}from"./chunk-KH4QH23U.js";import{c as n}from"./chunk-RIASQHPG.js";import l from"fs";import d from"path";import*as r from"zod/mini";var c=new Set(["Edit","Write","NotebookEdit"]),u=r.looseObject({file_path:r.string()}),D=async t=>{if(!c.has(t.tool_name))return;let e=m(t);if(e==null)return;let{cwd:o}=t;return l.existsSync(s(o))||n(o)?void 0:(await p(o)).isErr()?{hookSpecificOutput:{additionalContext:`\`ripplo daemon\` isn't running and the DSL isn't compiling, so this edit is allowed through without dev-mode guardrails. Run \`npx ripplo compile\` to see the errors, or \`/ripplo:start\` to bring the daemon up. ${i("create","DSL authoring rules")}`,hookEventName:"PreToolUse"}}:{hookSpecificOutput:{hookEventName:"PreToolUse",permissionDecision:"deny",permissionDecisionReason:`\`ripplo daemon\` is not running \u2014 this edit to \`${e}\` won't sync and dev-mode guardrails won't fire. Run \`/ripplo:start\`, then retry (\`npx ripplo doctor\` checks the daemon and dev server). If the daemon can't start, the user can bypass with \`npx ripplo hooks pause\`. ${i("start")}`}}};function m(t){let e=u.safeParse(t.tool_input);if(!e.success||!a(t.cwd))return null;let o=d.relative(t.cwd,e.data.file_path);return o.startsWith("..")||o!==".ripplo"&&!o.startsWith(".ripplo/")?null:o}export{D as a};
4
+ import{a as i}from"./chunk-MHNGR6M7.js";import{m as p}from"./chunk-BQ25IGJS.js";import{a}from"./chunk-7WZ3VIUU.js";import{e as s}from"./chunk-KH4QH23U.js";import{c as n}from"./chunk-RIASQHPG.js";import l from"fs";import d from"path";import*as r from"zod/mini";var c=new Set(["Edit","Write","NotebookEdit"]),u=r.looseObject({file_path:r.string()}),D=async t=>{if(!c.has(t.tool_name))return;let e=m(t);if(e==null)return;let{cwd:o}=t;return l.existsSync(s(o))||n(o)?void 0:(await p(o)).isErr()?{hookSpecificOutput:{additionalContext:`\`ripplo daemon\` isn't running and the DSL isn't compiling, so this edit is allowed through without dev-mode guardrails. Run \`npx ripplo compile\` to see the errors, or \`/ripplo:start\` to bring the daemon up. ${i("create","DSL authoring rules")}`,hookEventName:"PreToolUse"}}:{hookSpecificOutput:{hookEventName:"PreToolUse",permissionDecision:"deny",permissionDecisionReason:`\`ripplo daemon\` is not running \u2014 this edit to \`${e}\` won't sync and dev-mode guardrails won't fire. Run \`/ripplo:start\`, then retry (\`npx ripplo doctor\` checks the daemon and dev server). If the daemon can't start, the user can bypass with \`npx ripplo hooks pause\`. ${i("start")}`}}};function m(t){let e=u.safeParse(t.tool_input);if(!e.success||!a(t.cwd))return null;let o=d.relative(t.cwd,e.data.file_path);return o.startsWith("..")||o!==".ripplo"&&!o.startsWith(".ripplo/")?null:o}export{D 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{b as u}from"./chunk-SXVWB7TZ.js";import{a as f}from"./chunk-JJ4QQPAV.js";import{l as c}from"./chunk-SVM5ORF6.js";import{m as p}from"./chunk-ORWKDV2H.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};
4
+ import{b as u}from"./chunk-SXVWB7TZ.js";import{a as f}from"./chunk-JJ4QQPAV.js";import{l as c}from"./chunk-GTB7NYDE.js";import{m as p}from"./chunk-BQ25IGJS.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};
@@ -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{U as d}from"./chunk-KAD7UO53.js";import{j as p}from"./chunk-C7SV6AR2.js";import{spawnSync as k}from"child_process";import{existsSync as c,readdirSync as m,readFileSync as j,realpathSync as f,statSync as g}from"fs";import i from"path";var S=2e3;function x(t){if(t!=null)try{return g(f(t)).mtimeMs}catch{return}}function B(t){return k("pnpm",["turbo","run","build","--filter=ripplo..."],{cwd:t,stdio:"inherit"}).status===0}function X(){let t=process.argv[1];return t==null?{kind:"fresh"}:R({cwd:process.cwd(),scriptPath:f(t)})}function R({cwd:t,scriptPath:n}){let o=l(i.dirname(n));if(o!=null&&u(o))return n.includes(`${i.sep}src${i.sep}`)?{kind:"fresh"}:E({bundlePath:n,root:o});let r=l(t);return r!=null&&u(r)?{kind:"foreign-binary",workspaceRoot:r}:{kind:"fresh"}}function l(t){let n=i.dirname(t);return c(i.join(t,"pnpm-workspace.yaml"))?t:n===t?void 0:l(n)}function u(t){let n=i.join(t,"packages","cli","package.json"),o=w(n);return typeof o=="object"&&o!=null&&"name"in o&&o.name==="ripplo"}function w(t){try{return JSON.parse(j(t,"utf8"))}catch{return}}function E({bundlePath:t,root:n}){let o=x(t),r=i.join(n,"packages");if(o==null||!c(r))return{kind:"fresh"};let a=m(r).map(s=>({name:s,src:i.join(r,s,"src")})).filter(s=>c(s.src)).filter(s=>b(s.src)>o+S).map(s=>s.name);return a.length===0?{kind:"fresh"}:{kind:"stale",packages:a,workspaceRoot:n}}function b(t){let n=g(t);if(!n.isDirectory())return n.mtimeMs;let o=m(t).map(r=>b(i.join(t,r)));return Math.max(n.mtimeMs,...o)}import{createHash as P}from"crypto";import M from"os";import I from"path";import{createMessageConnection as q,NotificationType as y,RequestType as v,RequestType0 as h,SocketMessageReader as A,SocketMessageWriter as N}from"vscode-jsonrpc/node";import{z as e}from"zod";var C="daemon.log";function ee(t){let n=P("sha256").update(t).digest("hex").slice(0,16);return I.join(M.tmpdir(),`ripplo-${n}.sock`)}function te(t){return p(t,C)}function ne(t){return q(new A(t),new N(t))}var oe=e.object({all:e.boolean(),headed:e.boolean(),tests:e.array(e.string())}),re=e.object({jobId:e.string(),total:e.number()}),z=e.enum(["no-lockfile","unstamped","dsl-drift","load-failed","model-empty"]),F=e.discriminatedUnion("kind",[e.object({kind:e.literal("off")}),e.object({kind:e.literal("on")}),e.object({kind:e.literal("paused"),reason:e.enum(["interactive-runs","cooldown","loading"]).optional()}),e.object({kind:e.literal("waiting")}),e.object({kind:e.literal("blocked"),reason:z})]),O=e.object({attempts:e.number(),findings:e.number()}),ie=e.object({active:e.number(),bundleMtimeMs:e.number().optional(),explorer:F,exploring:e.number(),progress:O,queued:e.number(),sseHealth:e.object({detail:e.string().optional(),ok:e.boolean()}).optional(),version:e.string().optional()}),L=e.enum(["MAX_RUNS","OVERAGE_CAP","MAX_AGENTS","MAX_CONCURRENT_RUNS","MAX_PROJECTS","CLOUD_EXECUTOR","REVIEW_QUOTA","MEMBER_CEILING"]),U=e.discriminatedUnion("type",[e.object({code:L,type:e.literal("limit")}),e.object({detail:e.string(),type:e.literal("generic")})]),_=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:U}),e.object({detail:e.string(),kind:e.literal("dispatch-timeout")}),e.object({detail:e.string(),kind:e.literal("infra-error")})]),W=e.discriminatedUnion("kind",[e.object({kind:e.literal("run-progress"),runId:e.string(),signal:d,testName:e.string(),workflowName:e.string()}),e.object({kind:e.literal("test-started"),runId:e.string(),testName:e.string(),workflowName:e.string()}),e.object({kind:e.literal("test-outcome"),outcome:_,runId:e.string(),testName:e.string(),workflowName:e.string()})]),se=e.object({event:W,jobId:e.string()}),ae=e.object({failed:e.number(),jobId:e.string(),notRun:e.number(),passed:e.number()}),ce=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")})]),le=new v("ripplo/enqueue"),pe=new h("ripplo/status"),de=new h("ripplo/shutdownIfIdle"),ue=new y("ripplo/jobEvent"),me=new y("ripplo/jobDone");export{x as a,B as b,X as c,ee as d,te as e,ne as f,oe as g,re as h,ie as i,_ as j,se as k,ae as l,ce as m,le as n,pe as o,de as p,ue as q,me as r};
4
+ import{W as d}from"./chunk-NXKOUVSC.js";import{j as p}from"./chunk-C7SV6AR2.js";import{spawnSync as k}from"child_process";import{existsSync as c,readdirSync as m,readFileSync as j,realpathSync as f,statSync as g}from"fs";import i from"path";var S=2e3;function x(t){if(t!=null)try{return g(f(t)).mtimeMs}catch{return}}function B(t){return k("pnpm",["turbo","run","build","--filter=ripplo..."],{cwd:t,stdio:"inherit"}).status===0}function X(){let t=process.argv[1];return t==null?{kind:"fresh"}:R({cwd:process.cwd(),scriptPath:f(t)})}function R({cwd:t,scriptPath:n}){let o=l(i.dirname(n));if(o!=null&&u(o))return n.includes(`${i.sep}src${i.sep}`)?{kind:"fresh"}:E({bundlePath:n,root:o});let r=l(t);return r!=null&&u(r)?{kind:"foreign-binary",workspaceRoot:r}:{kind:"fresh"}}function l(t){let n=i.dirname(t);return c(i.join(t,"pnpm-workspace.yaml"))?t:n===t?void 0:l(n)}function u(t){let n=i.join(t,"packages","cli","package.json"),o=w(n);return typeof o=="object"&&o!=null&&"name"in o&&o.name==="ripplo"}function w(t){try{return JSON.parse(j(t,"utf8"))}catch{return}}function E({bundlePath:t,root:n}){let o=x(t),r=i.join(n,"packages");if(o==null||!c(r))return{kind:"fresh"};let a=m(r).map(s=>({name:s,src:i.join(r,s,"src")})).filter(s=>c(s.src)).filter(s=>b(s.src)>o+S).map(s=>s.name);return a.length===0?{kind:"fresh"}:{kind:"stale",packages:a,workspaceRoot:n}}function b(t){let n=g(t);if(!n.isDirectory())return n.mtimeMs;let o=m(t).map(r=>b(i.join(t,r)));return Math.max(n.mtimeMs,...o)}import{createHash as P}from"crypto";import M from"os";import I from"path";import{createMessageConnection as q,NotificationType as y,RequestType as v,RequestType0 as h,SocketMessageReader as A,SocketMessageWriter as N}from"vscode-jsonrpc/node";import{z as e}from"zod";var C="daemon.log";function ee(t){let n=P("sha256").update(t).digest("hex").slice(0,16);return I.join(M.tmpdir(),`ripplo-${n}.sock`)}function te(t){return p(t,C)}function ne(t){return q(new A(t),new N(t))}var oe=e.object({all:e.boolean(),headed:e.boolean(),tests:e.array(e.string())}),re=e.object({jobId:e.string(),total:e.number()}),z=e.enum(["no-lockfile","unstamped","dsl-drift","load-failed","model-empty"]),F=e.discriminatedUnion("kind",[e.object({kind:e.literal("off")}),e.object({kind:e.literal("on")}),e.object({kind:e.literal("paused"),reason:e.enum(["interactive-runs","cooldown","loading"]).optional()}),e.object({kind:e.literal("waiting")}),e.object({kind:e.literal("blocked"),reason:z})]),O=e.object({attempts:e.number(),findings:e.number()}),ie=e.object({active:e.number(),bundleMtimeMs:e.number().optional(),explorer:F,exploring:e.number(),progress:O,queued:e.number(),sseHealth:e.object({detail:e.string().optional(),ok:e.boolean()}).optional(),version:e.string().optional()}),L=e.enum(["MAX_RUNS","OVERAGE_CAP","MAX_AGENTS","MAX_CONCURRENT_RUNS","MAX_PROJECTS","CLOUD_EXECUTOR","REVIEW_QUOTA","MEMBER_CEILING"]),U=e.discriminatedUnion("type",[e.object({code:L,type:e.literal("limit")}),e.object({detail:e.string(),type:e.literal("generic")})]),_=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:U}),e.object({detail:e.string(),kind:e.literal("dispatch-timeout")}),e.object({detail:e.string(),kind:e.literal("infra-error")})]),W=e.discriminatedUnion("kind",[e.object({kind:e.literal("run-progress"),runId:e.string(),signal:d,testName:e.string(),workflowName:e.string()}),e.object({kind:e.literal("test-started"),runId:e.string(),testName:e.string(),workflowName:e.string()}),e.object({kind:e.literal("test-outcome"),outcome:_,runId:e.string(),testName:e.string(),workflowName:e.string()})]),se=e.object({event:W,jobId:e.string()}),ae=e.object({failed:e.number(),jobId:e.string(),notRun:e.number(),passed:e.number()}),ce=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")})]),le=new v("ripplo/enqueue"),pe=new h("ripplo/status"),de=new h("ripplo/shutdownIfIdle"),ue=new y("ripplo/jobEvent"),me=new y("ripplo/jobDone");export{x as a,B as b,X as c,ee as d,te as e,ne as f,oe as g,re as h,ie as i,_ as j,se as k,ae as l,ce as m,le as n,pe as o,de as p,ue as q,me as r};
@@ -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{h as u}from"./chunk-ZW76MTLE.js";import{f as a}from"./chunk-77BRFU6M.js";import{a as i}from"./chunk-BTNSUORZ.js";import{l as n}from"./chunk-SVM5ORF6.js";import{m as e}from"./chunk-ORWKDV2H.js";async function x(m){let o=process.cwd(),r=await e(o);r.isErr()&&(process.stderr.write(`${i(r.error)}
4
+ import{h as u}from"./chunk-6JXOIP2T.js";import{f as a}from"./chunk-ZGWV564Y.js";import{a as i}from"./chunk-EOBWMMVC.js";import{l as n}from"./chunk-GTB7NYDE.js";import{m as e}from"./chunk-BQ25IGJS.js";async function x(m){let o=process.cwd(),r=await e(o);r.isErr()&&(process.stderr.write(`${i(r.error)}
5
5
  `),process.exit(1));let s=n(r.value),t=await a(o);if(m.format==="summary"){s.length>0&&process.stdout.write(`stub workflows: ${s.join(", ")}
6
6
  `),process.stdout.write(`${u(t)}
7
7
  `);return}let p={daemon:t.kind==="running"?{active:t.status.active,explorer:t.status.explorer,exploring:t.status.exploring,progress:t.status.progress,queued:t.status.queued,running:!0}:{running:t.kind==="unresponsive",state:t.kind},tests:s.map(d=>({id:d,implemented:!1}))};process.stdout.write(`${JSON.stringify(p,null,2)}
@@ -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{a as S,d as u,e as y,f as E,h as w,i as C,k as b,l as g,m as R,n as h,o as v,p as m,q as M,r as N}from"./chunk-6UJNBCPU.js";import{a as D}from"./chunk-R4ZTRVDQ.js";import{i as P}from"./chunk-C7SV6AR2.js";import{spawn as L}from"child_process";import q from"fs";import V from"net";import{setTimeout as p}from"timers/promises";import{err as d,ok as f}from"neverthrow";import{ResponseError as j}from"vscode-jsonrpc/node";var I=12e4,_=300,x=5e3;async function an({cliEntry:o,cwd:n}){let e=u(n),t=await s(e);return t!=null?A({cliEntry:o,connection:l(t,!1),cwd:n}):T({cliEntry:o,cwd:n,versionNote:void 0})}async function sn({cliEntry:o,cwd:n}){let e=await s(u(n));return e==null?d({kind:"not-running"}):A({cliEntry:o,connection:l(e,!1),cwd:n})}async function T({cliEntry:o,cwd:n,versionNote:e}){let t=H({cliEntry:o,cwd:n});if(t!=null)return d(t);let r=await Q(u(n));return r==null?d({deadlineMs:I,kind:"connect-timeout",logPath:y(n)}):f({...l(r,!0),versionNote:e})}async function A({cliEntry:o,connection:n,cwd:e}){let t=await O(n);if(t==null||t.version===D()&&!G(t))return f(n);let r={daemonVersion:t.version};return await J(n)?(n.socket.destroy(),await B(u(e))?T({cliEntry:o,cwd:e,versionNote:{...r,kind:"restarted"}}):d({kind:"connection-lost"})):f({...n,versionNote:{...r,kind:"stale-busy"}})}var U=1e3;function G(o){let n=S(process.argv[1]);return n==null||o.bundleMtimeMs==null?!1:n>o.bundleMtimeMs+U}async function J(o){try{return await o.rpc.sendRequest(m)}catch{return!1}}var K=1e4;async function B(o){let n=Date.now()+K,e=await s(o);for(;e!=null&&Date.now()<n;)e.destroy(),await p(_),e=await s(o);return e?.destroy(),e==null}async function cn({connection:o,onEvent:n,request:e,token:t}){let r=await F({connection:o,onEvent:n,request:e,token:t});return r.kind==="transport"?d(r.error):f(r)}async function un(o){let n=await s(u(o));if(n==null)return!1;let e=l(n,!1);try{return await e.rpc.sendRequest(m)}catch{return!1}finally{n.destroy()}}async function dn(o){try{await o.rpc.sendRequest(m)}catch{}}async function ln(o){let n=await s(u(o));if(n==null)return{kind:"not-running"};let e=l(n,!1),t=await Promise.race([O(e),p(x).then(()=>null)]);return n.destroy(),t==null?{kind:"unresponsive",timeoutMs:x}:{kind:"running",status:t}}async function O(o){try{let n=await o.rpc.sendRequest(v),e=C.safeParse(n);return e.success?e.data:null}catch{return null}}function F({connection:o,onEvent:n,request:e,token:t}){let{rpc:r}=o;return new Promise(k=>{let i=a=>{k(a)};r.onNotification(M,a=>{let c=b.safeParse(a);if(!c.success){i({error:{kind:"bad-frame"},kind:"transport"});return}n(c.data.event)}),r.onNotification(N,a=>{let c=g.safeParse(a);if(!c.success){i({error:{kind:"bad-frame"},kind:"transport"});return}i({failed:c.data.failed,kind:"done",notRun:c.data.notRun,passed:c.data.passed})}),r.onClose(()=>{i({error:{kind:"connection-lost"},kind:"transport"})}),r.sendRequest(h,e,t).then(a=>{w.safeParse(a).success||i({error:{kind:"bad-frame"},kind:"transport"})}).catch(a=>{i(z(a))})})}function z(o){if(o instanceof j){let n=R.safeParse(o.data);return n.success?{error:n.data,kind:"daemon-error"}:{error:{kind:"bad-frame"},kind:"transport"}}return{error:{kind:"connection-lost"},kind:"transport"}}function l(o,n){let e=E(o);return e.listen(),{rpc:e,socket:o,spawned:n,versionNote:void 0}}function s(o){return new Promise(n=>{let e=V.connect(o);e.once("connect",()=>{n(e)}),e.once("error",()=>{n(null)})})}function H({cliEntry:o,cwd:n}){try{P(n);let e=q.openSync(y(n),"a");return L(process.execPath,[o,"daemon"],{cwd:n,detached:!0,stdio:["ignore",e,e]}).unref(),q.closeSync(e),null}catch(e){return{kind:"spawn-failed",message:e instanceof Error?e.message:String(e)}}}async function Q(o){let n=Date.now()+I,e=await s(o);for(;e==null&&Date.now()<n;)await p(_),e=await s(o);return e}export{an as a,sn as b,cn as c,un as d,dn as e,ln as f};
4
+ import{a as S,d as u,e as y,f as E,h as w,i as C,k as b,l as g,m as R,n as h,o as v,p as m,q as M,r as N}from"./chunk-U4LFIMDP.js";import{a as D}from"./chunk-R4ZTRVDQ.js";import{i as P}from"./chunk-C7SV6AR2.js";import{spawn as L}from"child_process";import q from"fs";import V from"net";import{setTimeout as p}from"timers/promises";import{err as d,ok as f}from"neverthrow";import{ResponseError as j}from"vscode-jsonrpc/node";var I=12e4,_=300,x=5e3;async function an({cliEntry:o,cwd:n}){let e=u(n),t=await s(e);return t!=null?A({cliEntry:o,connection:l(t,!1),cwd:n}):T({cliEntry:o,cwd:n,versionNote:void 0})}async function sn({cliEntry:o,cwd:n}){let e=await s(u(n));return e==null?d({kind:"not-running"}):A({cliEntry:o,connection:l(e,!1),cwd:n})}async function T({cliEntry:o,cwd:n,versionNote:e}){let t=H({cliEntry:o,cwd:n});if(t!=null)return d(t);let r=await Q(u(n));return r==null?d({deadlineMs:I,kind:"connect-timeout",logPath:y(n)}):f({...l(r,!0),versionNote:e})}async function A({cliEntry:o,connection:n,cwd:e}){let t=await O(n);if(t==null||t.version===D()&&!G(t))return f(n);let r={daemonVersion:t.version};return await J(n)?(n.socket.destroy(),await B(u(e))?T({cliEntry:o,cwd:e,versionNote:{...r,kind:"restarted"}}):d({kind:"connection-lost"})):f({...n,versionNote:{...r,kind:"stale-busy"}})}var U=1e3;function G(o){let n=S(process.argv[1]);return n==null||o.bundleMtimeMs==null?!1:n>o.bundleMtimeMs+U}async function J(o){try{return await o.rpc.sendRequest(m)}catch{return!1}}var K=1e4;async function B(o){let n=Date.now()+K,e=await s(o);for(;e!=null&&Date.now()<n;)e.destroy(),await p(_),e=await s(o);return e?.destroy(),e==null}async function cn({connection:o,onEvent:n,request:e,token:t}){let r=await F({connection:o,onEvent:n,request:e,token:t});return r.kind==="transport"?d(r.error):f(r)}async function un(o){let n=await s(u(o));if(n==null)return!1;let e=l(n,!1);try{return await e.rpc.sendRequest(m)}catch{return!1}finally{n.destroy()}}async function dn(o){try{await o.rpc.sendRequest(m)}catch{}}async function ln(o){let n=await s(u(o));if(n==null)return{kind:"not-running"};let e=l(n,!1),t=await Promise.race([O(e),p(x).then(()=>null)]);return n.destroy(),t==null?{kind:"unresponsive",timeoutMs:x}:{kind:"running",status:t}}async function O(o){try{let n=await o.rpc.sendRequest(v),e=C.safeParse(n);return e.success?e.data:null}catch{return null}}function F({connection:o,onEvent:n,request:e,token:t}){let{rpc:r}=o;return new Promise(k=>{let i=a=>{k(a)};r.onNotification(M,a=>{let c=b.safeParse(a);if(!c.success){i({error:{kind:"bad-frame"},kind:"transport"});return}n(c.data.event)}),r.onNotification(N,a=>{let c=g.safeParse(a);if(!c.success){i({error:{kind:"bad-frame"},kind:"transport"});return}i({failed:c.data.failed,kind:"done",notRun:c.data.notRun,passed:c.data.passed})}),r.onClose(()=>{i({error:{kind:"connection-lost"},kind:"transport"})}),r.sendRequest(h,e,t).then(a=>{w.safeParse(a).success||i({error:{kind:"bad-frame"},kind:"transport"})}).catch(a=>{i(z(a))})})}function z(o){if(o instanceof j){let n=R.safeParse(o.data);return n.success?{error:n.data,kind:"daemon-error"}:{error:{kind:"bad-frame"},kind:"transport"}}return{error:{kind:"connection-lost"},kind:"transport"}}function l(o,n){let e=E(o);return e.listen(),{rpc:e,socket:o,spawned:n,versionNote:void 0}}function s(o){return new Promise(n=>{let e=V.connect(o);e.once("connect",()=>{n(e)}),e.once("error",()=>{n(null)})})}function H({cliEntry:o,cwd:n}){try{P(n);let e=q.openSync(y(n),"a");return L(process.execPath,[o,"daemon"],{cwd:n,detached:!0,stdio:["ignore",e,e]}).unref(),q.closeSync(e),null}catch(e){return{kind:"spawn-failed",message:e instanceof Error?e.message:String(e)}}}async function Q(o){let n=Date.now()+I,e=await s(o);for(;e==null&&Date.now()<n;)await p(_),e=await s(o);return e}export{an as a,sn as b,cn as c,un as d,dn as e,ln as f};
@@ -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{a,b,c}from"./chunk-XBAVNTRQ.js";import"./chunk-BTNSUORZ.js";import"./chunk-MHNGR6M7.js";import"./chunk-ORWKDV2H.js";import"./chunk-KAD7UO53.js";import"./chunk-KMZ3L5YA.js";export{b as renderCliFailure,c as renderHookCrash,a as renderTopLevelError};
4
+ import{a,b,c}from"./chunk-PWDBRLJP.js";import"./chunk-EOBWMMVC.js";import"./chunk-MHNGR6M7.js";import"./chunk-BQ25IGJS.js";import"./chunk-NXKOUVSC.js";import"./chunk-KMZ3L5YA.js";export{b as renderCliFailure,c as renderHookCrash,a as renderTopLevelError};
@@ -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{h as a,i as b,j as c,k as d,l as e,m as f}from"./chunk-SVM5ORF6.js";import"./chunk-SQ4SBMKG.js";import"./chunk-ORWKDV2H.js";import"./chunk-KAD7UO53.js";import"./chunk-NNH3YVVO.js";import"./chunk-KMZ3L5YA.js";export{a as compileAndWrite,f as lockfileModelStatus,c as stampedLockfile,d as stampedLockfileFromDisk,e as stubbedWorkflows,b as writeStampedLockfile};
4
+ import{h as a,i as b,j as c,k as d,l as e,m as f}from"./chunk-GTB7NYDE.js";import"./chunk-PVRM4YWS.js";import"./chunk-BQ25IGJS.js";import"./chunk-NXKOUVSC.js";import"./chunk-NNH3YVVO.js";import"./chunk-KMZ3L5YA.js";export{a as compileAndWrite,f as lockfileModelStatus,c as stampedLockfile,d as stampedLockfileFromDisk,e as stubbedWorkflows,b as writeStampedLockfile};
@@ -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{a,b,c,d,e,f,g,h,i,j,k}from"./chunk-ZW76MTLE.js";import"./chunk-SQ4SBMKG.js";import"./chunk-KAD7UO53.js";import"./chunk-NNH3YVVO.js";import"./chunk-KMZ3L5YA.js";export{a as renderDaemonBindError,g as renderDaemonLockCompromised,e as renderDaemonLockHeld,d as renderDaemonReady,h as renderDaemonStatus,f as renderDaemonStopResult,j as renderDaemonVersionNote,i as renderExplorationProgress,c as renderNotSignedIn,b as renderProjectAccessDenied,k as wireOutcome};
4
+ import{a,b,c,d,e,f,g,h,i,j,k}from"./chunk-6JXOIP2T.js";import"./chunk-PVRM4YWS.js";import"./chunk-NXKOUVSC.js";import"./chunk-NNH3YVVO.js";import"./chunk-KMZ3L5YA.js";export{a as renderDaemonBindError,g as renderDaemonLockCompromised,e as renderDaemonLockHeld,d as renderDaemonReady,h as renderDaemonStatus,f as renderDaemonStopResult,j as renderDaemonVersionNote,i as renderExplorationProgress,c as renderNotSignedIn,b as renderProjectAccessDenied,k as wireOutcome};
@@ -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 rr,C as nr,D as L,H as or,I as tr,J as ir,K as ar,M as sr,N as lr,P as B,Q as q,R as dr,S as cr,T as K,e as We,i as _e,j as Ge,k as Ne,l as ze,m as Be,o as Ke,p as Qe,q as Je,r as Ve,s as Xe,u as A,v as D,w as Ye,x as z,y as Ze,z as er}from"./chunk-RJ6MN3PT.js";import{a as Me,b as Oe,c as Ue,d as $e,e as je,g as Fe}from"./chunk-ZW76MTLE.js";import{d as qe}from"./chunk-6UJNBCPU.js";import{b as He}from"./chunk-XBAVNTRQ.js";import{a as Ae,c as De,d as Le,e as h}from"./chunk-3FTGPUK3.js";import{a as C}from"./chunk-BTNSUORZ.js";import{c as y}from"./chunk-JS3DLVVI.js";import{a as se}from"./chunk-R4ZTRVDQ.js";import{c as ae}from"./chunk-FEHVIHVA.js";import"./chunk-MHNGR6M7.js";import{j as Ce,k as T}from"./chunk-SVM5ORF6.js";import{G as ve,I as we,J as xe,M as I,N as be,O as Re,R as Ee,S as Pe,X as Ie,aa as Te,m as ke}from"./chunk-SQ4SBMKG.js";import{k as S,l as he,m as P}from"./chunk-ORWKDV2H.js";import{Ca as Se,S as ye,oa as ge}from"./chunk-KAD7UO53.js";import{e as me}from"./chunk-KH4QH23U.js";import{e as pe,f as fe}from"./chunk-RIASQHPG.js";import{a as le,c as de,d as f,f as s,g as ce,h as N,i as ue}from"./chunk-C7SV6AR2.js";import"./chunk-HEOMRXZE.js";import"./chunk-NNH3YVVO.js";import"./chunk-KMZ3L5YA.js";import{randomUUID as Et}from"crypto";import Pt from"path";import{createClient as It}from"graphql-sse";import Tt,{AbortError as Ct}from"p-retry";import{graphql as Sn}from"gql.tada";import{graphql as En}from"gql.tada";import{print as Pn}from"graphql";async function ur({config:e,cwd:r,headed:n,pool:o,runId:t,signal:i,testSlug:a,workClass:l,workflowSlug:d}){let c=await S(r);if(c.isErr())return await L({config:e,ownerToken:null,reason:`lockfile:${c.error.kind}`,runId:t}),{kind:"dispatch-error",reason:{detail:`lockfile:${c.error.kind}`,type:"generic"}};let u=Rn(c.value,{testSlug:a,workflowSlug:d});if(u==null)return await L({config:e,ownerToken:null,reason:`no-test:${d}/${a}`,runId:t}),{kind:"dispatch-error",reason:{detail:`no-test:${d}/${a}`,type:"generic"}};let p=await A({headed:n,workClass:l,task:()=>o.execute({headed:n,runId:t,testRef:u},i)});return!p.serverNotified&&p.outcome.kind==="error"&&await L({config:e,ownerToken:null,reason:p.outcome.detail,runId:t}),p.outcome}function Rn(e,{testSlug:r,workflowSlug:n}){let t=e.workflows.find(i=>Se(i.name)===n)?.tests.find(i=>i.slug===r);return t==null?void 0:ke(t)}var In=6e4,Tn=En(`
4
+ import{A as rr,C as nr,D as L,H as or,I as tr,J as ir,K as ar,M as sr,N as lr,P as B,Q as q,R as dr,S as cr,T as K,e as We,i as _e,j as Ge,k as Ne,l as ze,m as Be,o as Ke,p as Qe,q as Je,r as Ve,s as Xe,u as A,v as D,w as Ye,x as z,y as Ze,z as er}from"./chunk-AVBTPZUU.js";import{a as Me,b as Oe,c as Ue,d as $e,e as je,g as Fe}from"./chunk-6JXOIP2T.js";import{d as qe}from"./chunk-U4LFIMDP.js";import{b as He}from"./chunk-PWDBRLJP.js";import{a as Ae,c as De,d as Le,e as h}from"./chunk-NIC2DOQW.js";import{a as C}from"./chunk-EOBWMMVC.js";import{c as y}from"./chunk-JS3DLVVI.js";import{a as se}from"./chunk-R4ZTRVDQ.js";import{c as ae}from"./chunk-FEHVIHVA.js";import"./chunk-MHNGR6M7.js";import{j as Ce,k as T}from"./chunk-GTB7NYDE.js";import{H as ve,J as we,K as xe,N as I,O as be,P as Re,S as Ee,T as Pe,Y as Ie,ba as Te,n as ke}from"./chunk-PVRM4YWS.js";import{k as S,l as he,m as P}from"./chunk-BQ25IGJS.js";import{Ma as Se,U as ye,sa as ge}from"./chunk-NXKOUVSC.js";import{e as me}from"./chunk-KH4QH23U.js";import{e as pe,f as fe}from"./chunk-RIASQHPG.js";import{a as le,c as de,d as f,f as s,g as ce,h as N,i as ue}from"./chunk-C7SV6AR2.js";import"./chunk-HEOMRXZE.js";import"./chunk-NNH3YVVO.js";import"./chunk-KMZ3L5YA.js";import{randomUUID as Et}from"crypto";import Pt from"path";import{createClient as It}from"graphql-sse";import Tt,{AbortError as Ct}from"p-retry";import{graphql as Sn}from"gql.tada";import{graphql as En}from"gql.tada";import{print as Pn}from"graphql";async function ur({config:e,cwd:r,headed:n,pool:o,runId:t,signal:i,testSlug:a,workClass:l,workflowSlug:d}){let c=await S(r);if(c.isErr())return await L({config:e,ownerToken:null,reason:`lockfile:${c.error.kind}`,runId:t}),{kind:"dispatch-error",reason:{detail:`lockfile:${c.error.kind}`,type:"generic"}};let u=Rn(c.value,{testSlug:a,workflowSlug:d});if(u==null)return await L({config:e,ownerToken:null,reason:`no-test:${d}/${a}`,runId:t}),{kind:"dispatch-error",reason:{detail:`no-test:${d}/${a}`,type:"generic"}};let p=await A({headed:n,workClass:l,task:()=>o.execute({headed:n,runId:t,testRef:u},i)});return!p.serverNotified&&p.outcome.kind==="error"&&await L({config:e,ownerToken:null,reason:p.outcome.detail,runId:t}),p.outcome}function Rn(e,{testSlug:r,workflowSlug:n}){let t=e.workflows.find(i=>Se(i.name)===n)?.tests.find(i=>i.slug===r);return t==null?void 0:ke(t)}var In=6e4,Tn=En(`
5
5
  subscription RunRequestedWatch($devSessionId: String!) {
6
6
  runRequested(devSessionId: $devSessionId) {
7
7
  runId
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __ripploCreateRequire } from "node:module";
3
3
  const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
4
- import{j as a,k as b,l as c,m as d,n as e}from"./chunk-ORWKDV2H.js";import"./chunk-KAD7UO53.js";import"./chunk-KMZ3L5YA.js";export{a as LOCKFILE_RELATIVE_PATH,d as loadRipplo,b as loadRipploCached,c as loadRipploCachedWithFingerprint,e as ripploFingerprint};
4
+ import{j as a,k as b,l as c,m as d,n as e}from"./chunk-BQ25IGJS.js";import"./chunk-NXKOUVSC.js";import"./chunk-KMZ3L5YA.js";export{a as LOCKFILE_RELATIVE_PATH,d as loadRipplo,b as loadRipploCached,c as loadRipploCachedWithFingerprint,e as ripploFingerprint};
package/dist/hook.js CHANGED
@@ -1,5 +1,5 @@
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 r,c as s}from"./chunk-QK7AEQ3B.js";import{a as i}from"./chunk-R4ZTRVDQ.js";import{c as o}from"./chunk-FEHVIHVA.js";import"./chunk-KOKEEAEF.js";import{b as e}from"./chunk-HEOMRXZE.js";import"./chunk-KMZ3L5YA.js";r();o(process.cwd());e(i());s(process.argv[2]??"").catch(async t=>{let{renderTopLevelError:p}=await import("./cli-error-PG24CNXE.js");process.stderr.write(`${p(t)}
4
+ import{a as r,c as s}from"./chunk-B5HDXHPI.js";import{a as i}from"./chunk-R4ZTRVDQ.js";import{c as o}from"./chunk-FEHVIHVA.js";import"./chunk-KOKEEAEF.js";import{b as e}from"./chunk-HEOMRXZE.js";import"./chunk-KMZ3L5YA.js";r();o(process.cwd());e(i());s(process.argv[2]??"").catch(async t=>{let{renderTopLevelError:p}=await import("./cli-error-N7X2CREI.js");process.stderr.write(`${p(t)}
5
5
  `),process.exit(1)});