@rulemetric/cli 0.18.0 → 0.18.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/dist/{chunk-YLEXR62G.js → chunk-LSZ32DUR.js} +5 -5
- package/dist/{chunk-B45MMFZ4.js → chunk-O7ZQEKND.js} +6 -6
- package/dist/commands/setup.js +1 -1
- package/dist/lib/jobs/handlers/process-changelog.js +1 -1
- package/dist/lib/manual-tasks.js +1 -1
- package/dist/lib/setup-steps.js +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +6 -6
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import{e as d}from"./chunk-QWCEZEDO.js";import{a as R,g as v,h as T,j as I,m as C}from"./chunk-OZQNSELV.js";import{d as g}from"./chunk-GPBN4ROE.js";import{e as _}from"./chunk-5VWVQCNR.js";import{g as m,l as k}from"./chunk-PZNWH4VQ.js";import{a as i}from"./chunk-ZLLER3HP.js";import{execSync as j}from"node:child_process";import{existsSync as p,readFileSync as y}from"node:fs";import{homedir as f}from"node:os";import{join as a}from"node:path";var P=["install","auth","hooks","worker"],O=["judge"],M=[...P,...O];function $(){return{projectPath:process.cwd(),configDir:k()}}i($,"defaultContext");var A=a(f(),".mitmproxy","mitmproxy-ca-cert.pem");function S(e){if(!e)return"";if(e.length<=8)return"*".repeat(e.length);let t=e.slice(0,4),n=e.slice(-4);return`${t}${"*".repeat(Math.max(4,e.length-8))}${n}`}i(S,"maskToken");function te(e,t){let n=e===null?[]:e.replace(/\n$/,"").split(`
|
|
2
2
|
`),o=t===null?[]:t.replace(/\n$/,"").split(`
|
|
3
|
-
`),
|
|
4
|
-
`)}i(te,"renderDiff");function x(e,t){let n=a(e,"env");if(!p(n))return null;try{let
|
|
5
|
-
`);return{id:"auth",title:"Authenticate",command:"rulemetric auth login",artifacts:[{path:t,kind:"file",before:n,after:
|
|
3
|
+
`),r=[],u=Math.max(n.length,o.length);for(let c=0;c<u;c++){let l=n[c],s=o[c];l===s?r.push(` ${l}`):(l!==void 0&&r.push(`-${l}`),s!==void 0&&r.push(`+${s}`))}return r.join(`
|
|
4
|
+
`)}i(te,"renderDiff");function x(e,t){let n=a(e,"env");if(!p(n))return null;try{let r=y(n,"utf-8").match(new RegExp(`^${t}=(.+)$`,"m"));return r?r[1]:null}catch{return null}}i(x,"readEnvValue");async function b(){if(!m())return!1;try{return(await Promise.race([_("/api/setup/status"),new Promise((t,n)=>setTimeout(()=>n(new Error("setup/status timeout")),2500))]))?.workerActive===!0}catch{return!1}}i(b,"workerActive");function E(e,t){let n=a(e,".claude",t),o={},r=null;if(p(n))try{r=y(n,"utf-8").replace(/\n$/,""),o=JSON.parse(r)}catch{o={}}return{settings:o,before:r}}i(E,"readProjectSettings");function D(e){let{settings:t,before:n}=E(e,"settings.local.json");return v(t),{before:n,after:JSON.stringify(t,null,2)}}i(D,"projectHooksSettings");function N(e){let{settings:t,before:n}=E(e,"settings.local.json"),o={...t.env??{}};return o.HTTPS_PROXY=`http://localhost:${d}`,o.NO_PROXY=I,o.NODE_EXTRA_CA_CERTS=A,{before:n,after:JSON.stringify({...t,env:o},null,2)}}i(N,"projectProxyEnvSettings");function U(e){let{settings:t,before:n}=E(e,"settings.json");if(n===null)return null;let{removed:o}=C(t,d);return o?{before:n,after:JSON.stringify(t,null,2)}:null}i(U,"projectSharedSettingsMigration");var Y=a(f(),"Library","LaunchAgents","com.rulemetric.worker.plist"),G=a(f(),".config","systemd","user","rulemetric-worker.service");function h(e){j(e,{stdio:"inherit"})}i(h,"runCommand");var L=[{id:"install",title:"Install the CLI",command:"npm install -g @rulemetric/cli",async detect(){return m()||await b()},async plan(){return{id:"install",title:"Install the CLI",command:"npm install -g @rulemetric/cli",artifacts:[{path:"npm install -g @rulemetric/cli",kind:"command",before:null,after:"rulemetric --version # verifies the binary is on PATH"}]}},async apply(){h("npm install -g @rulemetric/cli")}},{id:"auth",title:"Authenticate",command:"rulemetric auth login",async detect(){return m()},async plan(e){let t=a(e.configDir,"env"),n=null;if(p(t))try{n=X(y(t,"utf-8"))}catch{n="(unreadable)"}let o=x(e.configDir,"RULEMETRIC_ACCESS_TOKEN"),u=[`RULEMETRIC_ACCESS_TOKEN=${S(o||"<token-from-login>")}`],c=x(e.configDir,"RULEMETRIC_API_KEY");c&&u.push(`RULEMETRIC_API_KEY=${S(c)}`);let l=process.env.RULEMETRIC_API_URL;l&&u.push(`RULEMETRIC_API_URL=${l}`);let s=u.join(`
|
|
5
|
+
`);return{id:"auth",title:"Authenticate",command:"rulemetric auth login",artifacts:[{path:t,kind:"file",before:n,after:s,masked:!0},{path:a(e.configDir,"auth.json"),kind:"file",before:p(a(e.configDir,"auth.json"))?"(existing session tokens)":null,after:"{ accessToken, refreshToken, expiresAt, email } \u2014 OAuth session tokens (secret)",masked:!0}]}},async apply(){h("rulemetric auth login")}},{id:"hooks",title:"Install hooks + capture proxy",command:process.env.RULEMETRIC_SETUP_NO_PROXY==="1"||process.env.RULEMETRIC_SETUP_NO_PROXY==="true"?"rulemetric hooks install --no-proxy":"rulemetric hooks install",async detect(e){for(let t of new Set([e.projectPath,f()]))for(let n of["settings.local.json","settings.json"]){let o=a(t,".claude",n);if(p(o))try{let r=JSON.parse(y(o,"utf-8"));if(T(r))return!0}catch{}}return!1},async plan(e){let t=a(e.projectPath,".claude","settings.local.json"),{before:n,after:o}=D(e.projectPath),r=[{path:t,kind:"file",before:n,after:o},{path:"what these hooks capture",kind:"service",before:null,after:"session-end reimports the FULL transcript to the API; post-tool-use records each tool call and snapshots the working tree to a LOCAL shadow git ref (paper-trail, never pushed); user-prompt posts prompt text. All scoped to sessions in this project."},{path:`${t} (proxy env block)`,kind:"file",...N(e.projectPath)},{path:"system keychain \u2014 mitmproxy root CA",kind:"service",before:p(A)?"(CA generated; trust state unchanged)":"(no CA yet)",after:"Installs + trusts the mitmproxy CA (requires sudo). This lets the proxy DECRYPT Claude Code HTTPS request/response bodies \u2014 the capability that powers rendered-system-prompt / instruction linking. Decline the sudo prompt and setup stays hooks-only (still fully onboarded)."},{path:"launchctl setenv HTTPS_PROXY (machine-wide, all GUI apps)",kind:"command",before:null,after:`http://localhost:${d} \u2014 routes every GUI app's HTTPS through the local gateway (only when the CA is trusted AND :${d} is live)`},{path:"VS Code + Cursor user settings (http.proxy)",kind:"file",before:null,after:`http.proxy \u2192 http://localhost:${d} (+ http.proxyStrictSSL=false)`},{path:`gateway process on :${d}`,kind:"service",before:null,after:"started (routes Claude Code \u2192 mitmproxy \u2192 Anthropic; falls back to direct if mitmproxy is down)"}],u=U(e.projectPath);u&&r.push({path:`${a(e.projectPath,".claude","settings.json")} (removes RuleMetric machine-local state left by an older install \u2014 see the local-file artifacts above for where it moves)`,kind:"file",...u});for(let c of R(e.projectPath).filter(l=>l==="cursor"||l==="copilot_agent"))r.push({path:`${e.projectPath} (${c} workspace proxy config)`,kind:"file",before:null,after:`proxy \u2192 http://localhost:${d}`});for(let[c,l,s]of[["Cursor",a(f(),".cursor"),a(f(),".cursor","hooks.json")],["Antigravity/Gemini",a(f(),".gemini"),a(f(),".gemini","config","hooks.json")]])p(l)&&r.push({path:`${s} (${c} user hooks)`,kind:"file",before:p(s)?"(existing config)":null,after:"adds RuleMetric session-capture hooks for this tool"});return{id:"hooks",title:"Install hooks + capture proxy",command:"rulemetric hooks install",artifacts:r}},async apply(){let e=process.env.RULEMETRIC_SETUP_NO_PROXY==="1"||process.env.RULEMETRIC_SETUP_NO_PROXY==="true";h(e?"rulemetric hooks install --no-proxy":"rulemetric hooks install")}},{id:"worker",title:"Run the worker",command:"rulemetric service install --worker-only",async detect(){return b()},async plan(){let e=process.platform==="darwin",t=e?Y:G,n=p(t)?`(service already installed at ${t})`:null,o=e?["Label: com.rulemetric.worker","ProgramArguments: <node> <cli>/bin/run.js evals agent","RunAtLoad: true, KeepAlive: true"].join(`
|
|
6
6
|
`):["[Service]","ExecStart=<node> <cli>/bin/run.js evals agent","Restart=on-failure"].join(`
|
|
7
7
|
`);return{id:"worker",title:"Run the worker",command:"rulemetric service install --worker-only",artifacts:[{path:t,kind:"service",before:n,after:o}]}},async apply(){h("rulemetric service install --worker-only")}},{id:"judge",title:"Second LLM engine for cross-vendor eval grading (optional)",command:"npm install -g @openai/codex",optional:!0,async detect(){let e=g();return e.claudeBin!=null&&e.codexBin!=null},async plan(){let e=g();return{id:"judge",title:"Second LLM engine for cross-vendor eval grading (optional)",command:"npm install -g @openai/codex",artifacts:[{path:"installed LLM engines",kind:"command",before:[`claude CLI: ${e.claudeBin??"not found"}`,`codex CLI: ${e.codexBin??"not found"}`].join(`
|
|
8
8
|
`),after:["claude CLI + codex CLI both installed.","Hand labels + one judge already give calibrated verdicts; a second","engine additionally unlocks cross-vendor judge validation","(`rulemetric evals validate-judge`)."].join(`
|
|
9
9
|
`)}]}},async apply(){let e=g();if(e.claudeBin!=null&&e.codexBin!=null){console.log("[OK] Both engines already installed \u2014 nothing to do.");return}let t=e.codexBin==null?"codex":"claude";console.log(`[..] Second GRADING engine not detected (missing: ${t} CLI).`),t==="codex"?(console.log(" This is about GRADING EVALS with a second vendor, not about capturing"),console.log(" your Codex sessions. Codex capture needs no setup: the worker imports"),console.log(" ~/.codex/sessions automatically. Nothing is missing for that."),console.log(" Optional install: npm install -g @openai/codex")):console.log(" Install it yourself when ready: npm install -g @anthropic-ai/claude-code"),console.log(" Then re-run: rulemetric setup judge --show")}}],H=new Map(L.map(e=>[e.id,e]));function ne(e){let t=H.get(e);if(!t)throw new Error(`Unknown setup step: ${e}`);return t}i(ne,"getStep");function oe(e){return M.includes(e)}i(oe,"isStepId");var K=new Set(["RULEMETRIC_API_URL","RULEMETRIC_USER_ID","RULEMETRIC_CLIENT_NAME","RESEND_FROM_EMAIL","SENTRY_DSN","PG_POOL_MAX","PG_IDLE_TIMEOUT","PG_STATEMENT_TIMEOUT_MS","NODE_ENV"]);function X(e){return e.replace(/\n$/,"").split(`
|
|
10
|
-
`).map(t=>{let n=t.match(/^([A-Z0-9_]+)=(.+)$/);if(!n)return t;let[,o,
|
|
11
|
-
`)}i(X,"maskEnvFile");async function re(e=$()){let t=[];for(let
|
|
10
|
+
`).map(t=>{let n=t.match(/^([A-Z0-9_]+)=(.+)$/);if(!n)return t;let[,o,r]=n;return K.has(o)?t:`${o}=${S(r)}`}).join(`
|
|
11
|
+
`)}i(X,"maskEnvFile");async function re(e=$()){let t=[];for(let s of L){let w=await s.detect(e);t.push({id:s.id,done:w})}let n=new Set(P),o=t.find(s=>s.id==="install");o&&!o.done&&(o.done=t.some(s=>s.id!=="install"&&n.has(s.id)&&s.done));let r=new Set(P),u=t.filter(s=>r.has(s.id)),c=u.find(s=>!s.done)?.id??null,l=u.every(s=>s.done);return{steps:t,coreComplete:l,currentStepId:c}}i(re,"computeStatus");export{P as a,O as b,M as c,$ as d,S as e,te as f,L as g,ne as h,oe as i,re as j};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as f,b as k}from"./chunk-BDWQ6J4V.js";import{e as _,f as S}from"./chunk-MHLHLJ5T.js";import{a as o}from"./chunk-ZLLER3HP.js";import*as m from"node:fs/promises";import*as
|
|
1
|
+
import{a as f,b as k}from"./chunk-BDWQ6J4V.js";import{e as _,f as S}from"./chunk-MHLHLJ5T.js";import{a as o}from"./chunk-ZLLER3HP.js";import*as m from"node:fs/promises";import*as $ from"node:path";import{eq as j}from"drizzle-orm";import{randomBytes as Y}from"node:crypto";var C="#0d9488",h="#1a1a1a",x="#666666",A="#f5f5f7",N="#ffffff",D="#e5e5e9",I=["Added","Changed","Fixed","Removed","Deprecated","Security"];function U(e){let t=["January","February","March","April","May","June","July","August","September","October","November","December"],[n,r,a]=e.split("-").map(d=>parseInt(d,10));return!n||!r||!a||r<1||r>12?e:`${t[r-1]} ${a}, ${n}`}o(U,"formatIsoDate");function c(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}o(c,"escapeHtml");function z(e){let t=[];for(let n of I){let r=e[n];r&&r.length>0&&t.push({name:n,items:r})}return t}o(z,"orderedSections");function v(e){let{version:t,date:n,sections:r,unsubscribeUrl:a,productUrl:d,recipientName:u}=e,l=U(n),s=`What's new in RuleMetric \u2014 ${l}`,y=u?`Hi ${u},`:"Hi there,",i=z(r),p=new Date().getUTCFullYear(),b=i.map(({name:w,items:R})=>{let E=R.map(O=>` <li style="margin:0 0 6px 0;font-size:15px;line-height:1.5;color:${h};">${c(O)}</li>`).join(`
|
|
2
2
|
`);return` <h3 style="margin:24px 0 8px 0;font-size:16px;line-height:1.3;font-weight:600;color:${h};">${w}</h3>
|
|
3
3
|
<ul style="margin:0 0 8px 0;padding-left:20px;">
|
|
4
4
|
${E}
|
|
@@ -25,7 +25,7 @@ ${E}
|
|
|
25
25
|
<h1 style="margin:0 0 8px 0;font-size:22px;line-height:1.3;font-weight:600;color:${h};">
|
|
26
26
|
What's new \u2014 ${c(l)}
|
|
27
27
|
</h1>
|
|
28
|
-
<p style="margin:0 0 8px 0;font-size:13px;line-height:1.5;color:${
|
|
28
|
+
<p style="margin:0 0 8px 0;font-size:13px;line-height:1.5;color:${x};">
|
|
29
29
|
Release ${c(t)}
|
|
30
30
|
</p>
|
|
31
31
|
<p style="margin:16px 0 0 0;font-size:15px;line-height:1.5;color:${h};">
|
|
@@ -43,16 +43,16 @@ ${b}
|
|
|
43
43
|
</tr>
|
|
44
44
|
<tr>
|
|
45
45
|
<td style="padding:16px 32px 24px 32px;border-top:1px solid ${D};">
|
|
46
|
-
<p style="margin:0 0 8px 0;font-size:12px;line-height:1.5;color:${
|
|
46
|
+
<p style="margin:0 0 8px 0;font-size:12px;line-height:1.5;color:${x};">
|
|
47
47
|
You're receiving this because you signed up for RuleMetric product updates. If you'd rather not hear about new releases, you can unsubscribe at any time.
|
|
48
48
|
</p>
|
|
49
49
|
<p style="margin:0 0 4px 0;font-size:12px;line-height:1.5;">
|
|
50
50
|
<a href="${c(a)}" style="color:${C};text-decoration:underline;">Unsubscribe</a>
|
|
51
51
|
</p>
|
|
52
|
-
<p style="margin:0 0 12px 0;font-size:12px;line-height:1.5;color:${
|
|
52
|
+
<p style="margin:0 0 12px 0;font-size:12px;line-height:1.5;color:${x};word-break:break-all;">
|
|
53
53
|
${c(a)}
|
|
54
54
|
</p>
|
|
55
|
-
<p style="margin:0;font-size:11px;line-height:1.5;color:${
|
|
55
|
+
<p style="margin:0;font-size:11px;line-height:1.5;color:${x};">
|
|
56
56
|
RuleMetric \u2022 ${p}
|
|
57
57
|
</p>
|
|
58
58
|
</td>
|
|
@@ -63,4 +63,4 @@ ${b}
|
|
|
63
63
|
</table>
|
|
64
64
|
</body>
|
|
65
65
|
</html>`,g=[`What's new in RuleMetric \u2014 ${l}`,`Release ${t}`,"",y,"","Here's what shipped in the latest RuleMetric release.",""];for(let{name:w,items:R}of i){g.push(`${w}:`);for(let E of R)g.push(` - ${E}`);g.push("")}g.push("--","You're receiving this because you signed up for RuleMetric product updates.",`Unsubscribe: ${a}`,"",`RuleMetric \u2022 ${p}`);let T=g.join(`
|
|
66
|
-
`);return{subject:s,html:M,text:T}}o(v,"renderChangelogAnnouncement");async function
|
|
66
|
+
`);return{subject:s,html:M,text:T}}o(v,"renderChangelogAnnouncement");async function L(e){let t=e;for(let n=0;n<50;n++){try{return await m.stat($.join(t,"pnpm-workspace.yaml")),t}catch{}let r=$.dirname(t);if(r===t)return null;t=r}return null}o(L,"findRepoRoot");async function P(e){if(e)try{return await m.readFile(e,"utf-8")}catch{return null}let t=await L(process.cwd())??process.cwd(),n=$.join(t,"CHANGELOG.md");try{return await m.readFile(n,"utf-8")}catch{return null}}o(P,"readChangelog");var B="https://rulemetric.com";function F(e){let t=e.date??new Date().toISOString().slice(0,10),n=v({version:e.version,date:t,sections:e.sections,unsubscribeUrl:"{{unsubscribe_url}}",recipientName:"{{recipient_name}}",productUrl:B});return{version:e.version,releaseDate:t,subject:n.subject,htmlBody:n.html,textBody:n.text,sections:e.sections}}o(F,"renderRow");async function we(e={}){let t=e.db??k(),n=e.logger??{info:o(s=>console.log(s),"info"),warn:o(s=>console.warn(s),"warn")},r=await P(e.changelogPath);if(r===null)return n.info("[cron_check_changelog] CHANGELOG.md not found; nothing to do"),{createdCount:0,skippedCount:0};let a=_(r),d=S(a);if(d.length===0)return n.info("[cron_check_changelog] No announceable entries; nothing to do"),{createdCount:0,skippedCount:0};let u=0,l=0;for(let s of d){if((await t.select({id:f.id}).from(f).where(j(f.version,s.version)).limit(1)).length>0){l++;continue}let i=F(s);try{await t.insert(f).values({version:i.version,releaseDate:i.releaseDate,subject:i.subject,htmlBody:i.htmlBody,textBody:i.textBody,sections:i.sections,status:"draft"}),u++,n.info(`[cron_check_changelog] Created draft announcement for ${i.version}`)}catch(p){let b=p instanceof Error?p.message:String(p);if(/duplicate key|unique/i.test(b)){l++;continue}throw p}}return n.info(`[cron_check_changelog] Done: created ${u}, skipped ${l}`),{createdCount:u,skippedCount:l}}o(we,"processChangelog");export{we as a};
|
package/dist/commands/setup.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{c as l,d as h,f as m,g as p,h as f,i as y,j as r}from"../chunk-
|
|
1
|
+
import{c as l,d as h,f as m,g as p,h as f,i as y,j as r}from"../chunk-LSZ32DUR.js";import"../chunk-QWCEZEDO.js";import"../chunk-KKDHD4XA.js";import"../chunk-SZ62CP55.js";import"../chunk-OZQNSELV.js";import"../chunk-HFGO5762.js";import"../chunk-VS5ROGDP.js";import"../chunk-GPBN4ROE.js";import"../chunk-6XTLP2G7.js";import"../chunk-PJ3WHQ67.js";import{a as g}from"../chunk-TQFHRD5B.js";import"../chunk-IZTIYR5Q.js";import"../chunk-5LTJNYCP.js";import"../chunk-3EZZGA72.js";import"../chunk-XAGNGQL3.js";import"../chunk-3AV3GTMP.js";import"../chunk-5VWVQCNR.js";import"../chunk-MHLHLJ5T.js";import"../chunk-XQYAVSUQ.js";import"../chunk-PZNWH4VQ.js";import{a as u}from"../chunk-ZLLER3HP.js";import{Args as b,Flags as c}from"@oclif/core";import*as w from"node:readline/promises";var d=class v extends g{static{u(this,"Setup")}static description="Agentic, transparent setup: plan / show diffs / apply the four core onboarding steps";static examples=["<%= config.bin %> setup # interactive walk (TTY)","<%= config.bin %> setup plan # read-only: every remaining artifact + diff","<%= config.bin %> setup hooks --show # print one step's diff","<%= config.bin %> setup hooks --apply # apply one step","<%= config.bin %> setup --json # machine-readable status (exit 0 iff complete)"];static args={target:b.string({description:`"plan" or a step id (${l.join(", ")})`,required:!1})};static flags={json:c.boolean({description:"Machine-readable output",default:!1}),show:c.boolean({description:"Print the step diff (read-only)",default:!1}),apply:c.boolean({description:"Apply the step",default:!1})};async run(){let{args:t,flags:e}=await this.parse(v),i=h();if(t.target==="plan"){await this.runPlan(i,e.json);return}if(t.target&&y(t.target)){if(e.apply){await f(t.target).apply(i);return}let n=await f(t.target).plan(i);this.printPlan(n);return}if(t.target&&this.error(`Unknown target "${t.target}". Use "plan" or one of: ${l.join(", ")}.`),e.json){let n=await r(i);this.log(JSON.stringify(n,null,2)),n.coreComplete||this.exit(1);return}await this.runInteractive(i)}async runPlan(t,e){let i=await r(t),n=p.filter(s=>!i.steps.find(a=>a.id===s.id)?.done),o=[];for(let s of n)o.push(await s.plan(t));if(e){this.log(JSON.stringify({...i,plans:o},null,2));return}if(o.length===0){this.log("[OK] All core steps complete \u2014 nothing to install.");return}this.log(`The following steps would be applied:
|
|
2
2
|
`);for(let s of o)this.printPlan(s),this.log("")}printPlan(t){this.log(`[..] ${t.title} (${t.id})`),t.command&&this.log(` command: ${t.command}`);for(let e of t.artifacts){this.log(` ${e.kind}: ${e.path}${e.masked?" (secret masked)":""}`);let i=m(e.before,e.after);for(let n of i.split(`
|
|
3
3
|
`))this.log(` ${n}`)}}async runInteractive(t){if(!process.stdin.isTTY){this.log("Not a TTY \u2014 interactive walk needs a terminal."),this.log("Use one of:"),this.log(" rulemetric setup plan \u2014 see every remaining artifact + diff"),this.log(" rulemetric setup <step> --show \u2014 print one step diff"),this.log(" rulemetric setup <step> --apply \u2014 apply one step"),this.log(" rulemetric setup --json \u2014 machine-readable status");return}let e=await r(t),i=p.filter(o=>!e.steps.find(s=>s.id===o.id)?.done);if(i.length===0){this.log("[OK] All core steps complete.");return}let n=w.createInterface({input:process.stdin,output:process.stdout});try{for(let o of i){let s=await o.plan(t);this.printPlan(s);let a=(await n.question(`Apply "${s.title}"? [y/N] `)).trim().toLowerCase();a==="y"||a==="yes"?(await o.apply(t),this.log(`[OK] Applied ${s.title}.`)):this.log(`[..] Skipped ${s.title}.`),this.log("")}}finally{n.close()}}};export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../../chunk-
|
|
1
|
+
import{a}from"../../../chunk-O7ZQEKND.js";import"../../../chunk-BDWQ6J4V.js";import"../../../chunk-MHLHLJ5T.js";import"../../../chunk-XQYAVSUQ.js";import"../../../chunk-ZLLER3HP.js";export{a as processChangelog};
|
package/dist/lib/manual-tasks.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as m}from"../chunk-
|
|
1
|
+
import{a as m}from"../chunk-O7ZQEKND.js";import"../chunk-BDWQ6J4V.js";import{d as k}from"../chunk-SW24KZ5C.js";import{e as p}from"../chunk-2C7CFCMM.js";import"../chunk-HOQPVOMF.js";import{c as h}from"../chunk-A6XQSO62.js";import"../chunk-MOJY6S5J.js";import{a as d}from"../chunk-ANLPPIMS.js";import"../chunk-AZRGURHR.js";import"../chunk-GIRPEMTW.js";import"../chunk-PIVEJTNF.js";import"../chunk-ZJABRHIP.js";import"../chunk-XFOG2PDJ.js";import"../chunk-SIGZEQ3K.js";import"../chunk-MODXEGCU.js";import{a as f}from"../chunk-4VN5PG2S.js";import"../chunk-GWQ24FQP.js";import"../chunk-PPAHIVG5.js";import"../chunk-CT7FWSIU.js";import"../chunk-5MXZJWQS.js";import"../chunk-N7ODX6PO.js";import"../chunk-SVZYRGO5.js";import"../chunk-WULEBQPI.js";import"../chunk-GPBN4ROE.js";import"../chunk-6XTLP2G7.js";import"../chunk-PJ3WHQ67.js";import"../chunk-5VWVQCNR.js";import{A as c,B as g,z as u}from"../chunk-MHLHLJ5T.js";import{f as l}from"../chunk-XQYAVSUQ.js";import"../chunk-PZNWH4VQ.js";import{a}from"../chunk-ZLLER3HP.js";var b={cron_check_changelog:a(async(r,n)=>{let t=await m({logger:{info:a(e=>n.logger.info(e),"info"),warn:a(e=>n.logger.warn(e),"warn")}});n.logger.info(`[cron_check_changelog] result: created=${t.createdCount} skipped=${t.skippedCount}`)},"cron_check_changelog"),cron_suggest_instructions:a((r,n)=>p(r,n),"cron_suggest_instructions"),cron_reconcile_attribution:a((r,n)=>d(r,n).then(()=>{}),"cron_reconcile_attribution"),cron_refresh_skills:a((r,n)=>k(r,n),"cron_refresh_skills"),harbor_ab:a(async(r,n)=>{let t=r.measurement,e=t?l.parse(t):null;for(let s of u("proven")){let i=c(s,e);if(i){n.logger.warn(i);continue}let o=await h(g(s,"manual",e),n);n.logger.info(`[harbor_ab] ${s.task}: ${o.decision} \u2014 ${o.reason}`)}},"harbor_ab")},w=f.map(r=>{let n=b[r.name];if(!n)throw new Error(`manual-tasks: no handler registered for "${r.name}"`);return{...r,handler:n}});async function v(r,n={}){let t=w.find(o=>o.name===r);if(!t)return{name:r,durationMs:0,ok:!1,error:`Unknown task: ${r}`,logs:[]};let e=[],s={logger:{info:a(o=>e.push({level:"info",message:o}),"info"),warn:a(o=>e.push({level:"warn",message:o}),"warn"),error:a(o=>e.push({level:"error",message:o}),"error")},job:{attempts:0}},i=Date.now();try{return await t.handler(n,s),{name:r,durationMs:Date.now()-i,ok:!0,logs:e}}catch(o){return{name:r,durationMs:Date.now()-i,ok:!1,error:o instanceof Error?o.message:String(o),logs:e}}}a(v,"runManualTask");export{w as MANUAL_TASKS,v as runManualTask};
|
package/dist/lib/setup-steps.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j}from"../chunk-LSZ32DUR.js";import"../chunk-QWCEZEDO.js";import"../chunk-KKDHD4XA.js";import"../chunk-SZ62CP55.js";import"../chunk-OZQNSELV.js";import"../chunk-HFGO5762.js";import"../chunk-VS5ROGDP.js";import"../chunk-GPBN4ROE.js";import"../chunk-6XTLP2G7.js";import"../chunk-PJ3WHQ67.js";import"../chunk-5VWVQCNR.js";import"../chunk-MHLHLJ5T.js";import"../chunk-XQYAVSUQ.js";import"../chunk-PZNWH4VQ.js";import"../chunk-ZLLER3HP.js";export{c as ALL_STEP_IDS,a as CORE_STEP_IDS,b as OPTIONAL_STEP_IDS,g as STEPS,j as computeStatus,d as defaultContext,h as getStep,i as isStepId,e as maskToken,f as renderDiff};
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rulemetric/cli",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -80,9 +80,9 @@
|
|
|
80
80
|
"postgres": "^3.4.0",
|
|
81
81
|
"react": "^19.0.0",
|
|
82
82
|
"zod": "^3.24.0",
|
|
83
|
-
"@rulemetric/hooks": "0.18.
|
|
84
|
-
"@rulemetric/proxy": "0.18.
|
|
85
|
-
"@rulemetric/skills-registry": "0.18.
|
|
83
|
+
"@rulemetric/hooks": "0.18.1",
|
|
84
|
+
"@rulemetric/proxy": "0.18.1",
|
|
85
|
+
"@rulemetric/skills-registry": "0.18.1"
|
|
86
86
|
},
|
|
87
87
|
"//deps": "Worker (`evals agent`) runtime deps: the @opentelemetry/* set, @sentry/node, and postgres are STATIC top-level imports loaded at worker startup (via bundled @rulemetric/{telemetry,db}) — they MUST be runtime deps or a clean `npm i -g` crashes with ModuleLoadError. `better-sqlite3` is optionalDependencies (below): it's a native module, lazy `require()`'d inside a try/catch (packages/session providers cursor/opencode) so a missing binary degrades gracefully — making it a hard dep would break `npm i -g` on platforms without prebuilt binaries. `resend` stays a devDep: lazy `await import('resend')` guarded by RESEND_API_KEY, which end-user workers never set (provider falls back to noop). Classification verified via import-graph scan of dist/commands/evals/agent.js + per-importer static/lazy check.",
|
|
88
88
|
"optionalDependencies": {
|
|
@@ -105,12 +105,12 @@
|
|
|
105
105
|
"@rulemetric/contracts": "0.0.1",
|
|
106
106
|
"@rulemetric/api": "0.0.1",
|
|
107
107
|
"@rulemetric/core": "0.0.1",
|
|
108
|
-
"@rulemetric/db": "0.0.1",
|
|
109
108
|
"@rulemetric/effectiveness": "0.0.1",
|
|
110
109
|
"@rulemetric/email": "0.0.1",
|
|
111
110
|
"@rulemetric/session": "0.2.1",
|
|
112
111
|
"@rulemetric/telemetry": "0.0.1",
|
|
113
|
-
"@rulemetric/typescript-config": "0.0.0"
|
|
112
|
+
"@rulemetric/typescript-config": "0.0.0",
|
|
113
|
+
"@rulemetric/db": "0.0.1"
|
|
114
114
|
},
|
|
115
115
|
"scripts": {
|
|
116
116
|
"build": "node scripts/build.mjs",
|