@rulemetric/cli 0.17.1 → 0.17.2
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/base-command.js +1 -1
- package/dist/{chunk-LMNUO32P.js → chunk-274MXEKI.js} +1 -1
- package/dist/{chunk-RAIXY6YA.js → chunk-2C7CFCMM.js} +1 -1
- package/dist/{chunk-433HK3QQ.js → chunk-3EZZGA72.js} +1 -1
- package/dist/{chunk-3WNQ52TW.js → chunk-3ZHBOILE.js} +1 -1
- package/dist/chunk-43TRZXJP.js +1 -0
- package/dist/chunk-4LVSD2XZ.js +2 -0
- package/dist/{chunk-TDDJOSFQ.js → chunk-5LTJNYCP.js} +1 -1
- package/dist/{chunk-GPWLS64K.js → chunk-5U5SHJJA.js} +1 -1
- package/dist/{chunk-Z7UN4R7T.js → chunk-5VWVQCNR.js} +1 -1
- package/dist/{chunk-JEZ5ZTKR.js → chunk-7J7H7YFQ.js} +1 -1
- package/dist/{chunk-PHBPHZSZ.js → chunk-7N55TWYQ.js} +1 -1
- package/dist/{chunk-GLBWNB2N.js → chunk-A2JFQUDW.js} +1 -1
- package/dist/{chunk-FZMO7XSN.js → chunk-A6XQSO62.js} +1 -1
- package/dist/{chunk-N7P3HUPD.js → chunk-ANLPPIMS.js} +1 -1
- package/dist/{chunk-R7URROQD.js → chunk-AZRGURHR.js} +1 -1
- package/dist/{chunk-FXQS7AEZ.js → chunk-AZWY2DOT.js} +1 -1
- package/dist/{chunk-V2G6E53W.js → chunk-BCPIY47G.js} +1 -1
- package/dist/chunk-BDWQ6J4V.js +1 -0
- package/dist/chunk-BOYWPUV2.js +12 -0
- package/dist/{chunk-HB4RUEEE.js → chunk-BQVUZ6VE.js} +1 -1
- package/dist/{chunk-DANMUHNW.js → chunk-C3XWDYZJ.js} +1 -1
- package/dist/{chunk-JQ2ZCUEC.js → chunk-CAQLSYOK.js} +1 -1
- package/dist/chunk-D7L7IMJQ.js +1 -0
- package/dist/{chunk-52OHAULM.js → chunk-DOEPIICK.js} +1 -1
- package/dist/{chunk-CEM7JMUW.js → chunk-DZRBB34J.js} +1 -1
- package/dist/{chunk-UPJVMMDK.js → chunk-EKTNI6RV.js} +1 -1
- package/dist/{chunk-LMQDS47I.js → chunk-ENW5SUQJ.js} +1 -1
- package/dist/{chunk-QH7JB4UQ.js → chunk-FD53AP7T.js} +1 -1
- package/dist/{chunk-ZZZ7ECPT.js → chunk-FTCC4OZ4.js} +1 -1
- package/dist/{chunk-5CVP5NFH.js → chunk-GBSIOACS.js} +1 -1
- package/dist/{chunk-M2CPTQZL.js → chunk-GQYF2WVE.js} +1 -1
- package/dist/chunk-GWQ24FQP.js +9 -0
- package/dist/{chunk-YVEI7XR6.js → chunk-H4VIQHBV.js} +1 -1
- package/dist/{chunk-ANHFE6US.js → chunk-HBJMELKB.js} +1 -1
- package/dist/{chunk-UDNEOJWY.js → chunk-HNPC5U3C.js} +1 -1
- package/dist/{chunk-YSY25OGG.js → chunk-ICLAHFKK.js} +1 -1
- package/dist/{chunk-WM437XV6.js → chunk-IPNBW7ZW.js} +1 -1
- package/dist/{chunk-EOTSCWFS.js → chunk-JCZOEIL7.js} +1 -1
- package/dist/chunk-JGJU4JX5.js +1 -0
- package/dist/{chunk-L3AXNCWC.js → chunk-KR32Y5Q5.js} +1 -1
- package/dist/chunk-LELSVLNK.js +1 -0
- package/dist/chunk-LZPE6424.js +5 -0
- package/dist/chunk-MHLHLJ5T.js +48 -0
- package/dist/{chunk-FPEC6DJV.js → chunk-MJLW5KN2.js} +1 -1
- package/dist/{chunk-ACJ2DBOE.js → chunk-N2PUNIWM.js} +1 -1
- package/dist/{chunk-G2226CG6.js → chunk-NLUHMHPM.js} +1 -1
- package/dist/{chunk-CWVXTLXZ.js → chunk-NMCQ7JZZ.js} +1 -1
- package/dist/{chunk-57YXM7AI.js → chunk-NSO2EBYE.js} +1 -1
- package/dist/{chunk-CXSDZ473.js → chunk-OWXGXKK7.js} +1 -1
- package/dist/{chunk-4XRPSKIJ.js → chunk-QJZ4DMVQ.js} +1 -1
- package/dist/{chunk-BLGICIV4.js → chunk-QRKMRG6W.js} +1 -1
- package/dist/chunk-RQBN7WNS.js +28 -0
- package/dist/{chunk-2K4TF5RM.js → chunk-RRBFKVCI.js} +1 -1
- package/dist/{chunk-DB4ZM5N3.js → chunk-RWQG25JU.js} +1 -1
- package/dist/{chunk-TDRUVE4J.js → chunk-TBLUJ6AW.js} +1 -1
- package/dist/{chunk-MOQTSJNZ.js → chunk-TQFHRD5B.js} +1 -1
- package/dist/{chunk-AXTEV56C.js → chunk-UGA2NFRG.js} +1 -1
- package/dist/{chunk-YX2IGS72.js → chunk-ULFSGFT2.js} +1 -1
- package/dist/{chunk-6YSTU453.js → chunk-UROUVE3D.js} +1 -1
- package/dist/{chunk-TFJAT263.js → chunk-URUHD4OI.js} +1 -1
- package/dist/chunk-VCWT5KZL.js +8 -0
- package/dist/{chunk-AZB34RT6.js → chunk-VNGJRYBD.js} +1 -1
- package/dist/{chunk-AZK4Y5DB.js → chunk-WLLIFRRE.js} +1 -1
- package/dist/{chunk-LEUXIXIS.js → chunk-WSUKOU3X.js} +1 -1
- package/dist/{chunk-WDLAPZPN.js → chunk-XAGNGQL3.js} +1 -1
- package/dist/{chunk-VF54EOLZ.js → chunk-XCN2YPWI.js} +1 -1
- package/dist/chunk-YGFZ6BLU.js +15 -0
- package/dist/{chunk-TZC4CYPD.js → chunk-YLEXR62G.js} +1 -1
- package/dist/{chunk-7V6LLVAY.js → chunk-YT25HLWB.js} +1 -1
- package/dist/{chunk-3IAZMJA4.js → chunk-ZJABRHIP.js} +1 -1
- package/dist/commands/antigravity/backfill.js +1 -1
- package/dist/commands/auth/create-key.js +1 -1
- package/dist/commands/auth/login.js +1 -1
- package/dist/commands/auth/logout.js +1 -1
- package/dist/commands/auth/revoke-key.js +1 -1
- package/dist/commands/auth/signup.js +1 -1
- package/dist/commands/auth/status.js +1 -1
- package/dist/commands/capture/scope.js +1 -1
- package/dist/commands/catalog/index.js +1 -1
- package/dist/commands/catalog/recommend.js +1 -1
- package/dist/commands/crons/list.js +1 -1
- package/dist/commands/crons/run.js +1 -1
- package/dist/commands/dashboard.js +1 -1
- package/dist/commands/diagnostics.js +1 -1
- package/dist/commands/eval-targets/create.js +1 -1
- package/dist/commands/eval-targets/list.js +1 -1
- package/dist/commands/evals/agent.js +1 -1
- package/dist/commands/evals/auto-run.js +1 -1
- package/dist/commands/evals/benchmark.js +1 -1
- package/dist/commands/evals/compare.js +1 -1
- package/dist/commands/evals/create.js +1 -1
- package/dist/commands/evals/optimize-description.js +1 -1
- package/dist/commands/evals/optimize.js +1 -1
- package/dist/commands/evals/refine-cases.js +1 -1
- package/dist/commands/evals/run.js +1 -1
- package/dist/commands/evals/validate-judge.js +1 -1
- package/dist/commands/experiments/list.js +1 -1
- package/dist/commands/gateway/ensure.js +1 -1
- package/dist/commands/hooks/install.js +1 -1
- package/dist/commands/hooks/run.js +1 -1
- package/dist/commands/hooks/uninstall.js +1 -1
- package/dist/commands/instructions/create.js +1 -1
- package/dist/commands/instructions/dedupe.js +1 -1
- package/dist/commands/instructions/delete.js +1 -1
- package/dist/commands/instructions/fork.js +1 -1
- package/dist/commands/instructions/get.js +1 -1
- package/dist/commands/instructions/list.js +1 -1
- package/dist/commands/instructions/promote.js +1 -1
- package/dist/commands/instructions/pull.js +1 -1
- package/dist/commands/instructions/restore.js +1 -1
- package/dist/commands/instructions/retract.js +1 -1
- package/dist/commands/instructions/upstream.js +1 -1
- package/dist/commands/instructions/versions.js +1 -1
- package/dist/commands/launcher.js +1 -1
- package/dist/commands/local/down.js +1 -1
- package/dist/commands/local/up.js +1 -1
- package/dist/commands/org/current.js +1 -1
- package/dist/commands/org/list.js +1 -1
- package/dist/commands/org/switch.js +1 -1
- package/dist/commands/packs/add-instruction.js +1 -1
- package/dist/commands/packs/apply.js +1 -1
- package/dist/commands/packs/create.js +1 -1
- package/dist/commands/packs/fork.js +1 -1
- package/dist/commands/packs/get.js +1 -1
- package/dist/commands/packs/list.js +1 -1
- package/dist/commands/packs/remove-instruction.js +1 -1
- package/dist/commands/proxy/env.js +1 -1
- package/dist/commands/proxy/logs.js +1 -1
- package/dist/commands/proxy/restart.js +1 -1
- package/dist/commands/proxy/setup.js +1 -1
- package/dist/commands/proxy/start.js +1 -1
- package/dist/commands/proxy/status.js +1 -1
- package/dist/commands/proxy/stop.js +1 -1
- package/dist/commands/research/backfill.js +1 -1
- package/dist/commands/research/resume-scoped-outcomes.js +1 -1
- package/dist/commands/research/tail-transcript.js +1 -1
- package/dist/commands/service/install.js +1 -1
- package/dist/commands/service/status.js +1 -1
- package/dist/commands/service/uninstall.js +1 -1
- package/dist/commands/sessions/analyze.js +1 -1
- package/dist/commands/sessions/delete.js +1 -1
- package/dist/commands/sessions/end.js +1 -1
- package/dist/commands/sessions/import.js +1 -1
- package/dist/commands/sessions/list.js +1 -1
- package/dist/commands/sessions/start.js +1 -1
- package/dist/commands/setup.js +1 -1
- package/dist/commands/skills/export-approved.js +1 -1
- package/dist/commands/skills/install.js +1 -1
- package/dist/commands/skills/list.js +1 -1
- package/dist/commands/skills/publish.js +1 -1
- package/dist/commands/skills/search.js +1 -1
- package/dist/commands/skills/update.js +1 -1
- package/dist/commands/suggestions/accept.js +1 -1
- package/dist/commands/suggestions/auto.js +1 -1
- package/dist/commands/suggestions/dismiss.js +1 -1
- package/dist/commands/suggestions/list.js +1 -1
- package/dist/commands/suggestions/refresh.js +1 -1
- package/dist/commands/suggestions/undo.js +1 -1
- package/dist/dashboard/Dashboard.js +1 -1
- package/dist/dashboard/data.js +1 -1
- package/dist/dashboard/launcher/LauncherOverlay.js +1 -1
- package/dist/dashboard/launcher/api.js +1 -1
- package/dist/dashboard/launcher/useLaunchJobs.js +1 -1
- package/dist/dashboard/panels/measurement.js +1 -1
- package/dist/dist-ZJY72TUD.js +1 -0
- package/dist/lib/active-org-refresh.js +1 -1
- package/dist/lib/agent-loop.js +1 -1
- package/dist/lib/agent-presence.js +1 -1
- package/dist/lib/antigravity-transcript.js +1 -1
- package/dist/lib/api-client.js +1 -1
- package/dist/lib/ensure-api-key.js +1 -1
- package/dist/lib/ensure-fresh-token.js +1 -1
- package/dist/lib/eval-benchmark.js +1 -1
- package/dist/lib/eval-candidate-run.js +1 -1
- package/dist/lib/eval-case-generator.js +1 -1
- package/dist/lib/eval-conversation-handler.js +1 -1
- package/dist/lib/eval-resume.js +1 -1
- package/dist/lib/eval-run-batch.js +1 -1
- package/dist/lib/evolution-enrolment.js +1 -1
- package/dist/lib/insights/generation/installed-asks.js +1 -1
- package/dist/lib/insights/generation/project-evidence.js +1 -1
- package/dist/lib/insights/generation/quality-review.js +1 -0
- package/dist/lib/insights/nomination/nominate.js +1 -1
- package/dist/lib/instruction-proposer.js +1 -1
- package/dist/lib/instruction-restoration.js +1 -1
- package/dist/lib/instructions/acceptance/accept-events.js +1 -1
- package/dist/lib/instructions/acceptance/accept-hook.js +1 -1
- package/dist/lib/instructions/acceptance/hook-install.js +1 -1
- package/dist/lib/instructions/acceptance/reverse-applications.js +1 -1
- package/dist/lib/instructions/acceptance/suggestion-accept.js +1 -1
- package/dist/lib/jobs/handlers/cron-auto-accept-suggestions.js +1 -1
- package/dist/lib/jobs/handlers/cron-eval-autorun.js +1 -1
- package/dist/lib/jobs/handlers/cron-instruction-evolution.js +1 -1
- package/dist/lib/jobs/handlers/cron-instruction-training.js +1 -1
- package/dist/lib/jobs/handlers/cron-reconcile-attribution.js +1 -1
- package/dist/lib/jobs/handlers/cron-refine-cases.js +1 -1
- package/dist/lib/jobs/handlers/cron-refresh-pricing.js +1 -1
- package/dist/lib/jobs/handlers/cron-retire-unused-skills.js +1 -1
- package/dist/lib/jobs/handlers/cron-suggest-instructions.js +1 -1
- package/dist/lib/jobs/handlers/distill-memories.js +1 -1
- package/dist/lib/jobs/handlers/finalize-scoped-launch.js +1 -1
- package/dist/lib/jobs/handlers/harbor-ab.js +1 -1
- package/dist/lib/jobs/handlers/prepare-suggestion-live.js +1 -1
- package/dist/lib/jobs/handlers/process-changelog.js +1 -1
- package/dist/lib/jobs/handlers/process-conversation.js +1 -1
- package/dist/lib/jobs/handlers/process-eval.js +1 -1
- package/dist/lib/jobs/handlers/process-insights.js +1 -1
- package/dist/lib/jobs/handlers/process-judge-review.js +1 -1
- package/dist/lib/jobs/handlers/process-launch.js +1 -1
- package/dist/lib/jobs/handlers/process-memory-ab.js +1 -1
- package/dist/lib/jobs/handlers/process-run-cleanup.js +1 -1
- package/dist/lib/jobs/handlers/process-session-goal.js +1 -1
- package/dist/lib/jobs/handlers/process-suggestion-adoption.js +1 -0
- package/dist/lib/jobs/handlers/process-suggestion-eval.js +1 -1
- package/dist/lib/jobs/shed-retry.js +1 -1
- package/dist/lib/judge-review-runner.js +1 -1
- package/dist/lib/llm-client.js +1 -1
- package/dist/lib/manual-tasks.js +1 -1
- package/dist/lib/projects/workspace/worktree.js +1 -1
- package/dist/lib/refine-cases.js +1 -1
- package/dist/lib/research-client.js +1 -1
- package/dist/lib/retraction.js +1 -1
- package/dist/lib/setup-steps.js +1 -1
- package/dist/lib/telemetry.js +1 -1
- package/dist/lib/terminal-target-heartbeat.js +1 -1
- package/dist/lib/transcript-sync.js +1 -1
- package/dist/lib/work-report.js +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +4 -4
- package/dist/chunk-26XE3JCL.js +0 -9
- package/dist/chunk-2IQBXE6F.js +0 -1
- package/dist/chunk-CQD2R3BA.js +0 -3
- package/dist/chunk-GLZBTGN5.js +0 -15
- package/dist/chunk-HTAHNQZJ.js +0 -1
- package/dist/chunk-J4W6GNCF.js +0 -2
- package/dist/chunk-KSKC5SEQ.js +0 -12
- package/dist/chunk-RCJTCLZO.js +0 -1
- package/dist/chunk-VFWQ2W4B.js +0 -1
- package/dist/chunk-WWL4HNXM.js +0 -28
- package/dist/chunk-X6CF5KTW.js +0 -48
- package/dist/dist-WGZCHQTC.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d,g as c,h as p}from"../../chunk-NVKX36YN.js";import{b as l}from"../../chunk-
|
|
1
|
+
import{d,g as c,h as p}from"../../chunk-NVKX36YN.js";import{b as l}from"../../chunk-7J7H7YFQ.js";import{a as f}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 n}from"../../chunk-ZLLER3HP.js";import{Args as v,Flags as g}from"@oclif/core";import w from"node:path";var r=class h extends f{static{n(this,"ResearchTailTranscript")}static description="Read new lines from a Claude Code transcript since the last cached offset, POST any 429 events, and persist the new offset. Invoked by the session-end hook \u2014 safe to re-run.";static hidden=!0;static args={transcript:v.string({description:"Absolute path to a Claude Code .jsonl transcript",required:!0})};static flags={"no-post":g.boolean({description:"Parse and advance the offset without POSTing (debug)",default:!1})};async run(){let{args:u,flags:m}=await this.parse(h),e=w.resolve(u.transcript);try{this.requireAuth()}catch{return}let s=await c(),o=s[e]??0,{observations:a,newOffset:i}=await d(e,o);if(a.length>0&&!m["no-post"])try{let t=await l(a);process.env.RULEMETRIC_DEBUG&&this.log(`tail-transcript: posted ${t.posted}, failed ${t.failed}`)}catch(t){process.env.RULEMETRIC_DEBUG&&this.warn(`tail-transcript POST error: ${String(t)}`)}i!==o&&(s[e]=i,await p(s))}};export{r as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as D}from"../../chunk-MMM4B3KH.js";import{a as B}from"../../chunk-6XEC6474.js";import"../../chunk-N7ODX6PO.js";import{a as M}from"../../chunk-
|
|
1
|
+
import{a as D}from"../../chunk-MMM4B3KH.js";import{a as B}from"../../chunk-6XEC6474.js";import"../../chunk-N7ODX6PO.js";import{a as M}from"../../chunk-TQFHRD5B.js";import"../../chunk-IZTIYR5Q.js";import{c as U}from"../../chunk-5LTJNYCP.js";import"../../chunk-3EZZGA72.js";import{b as x}from"../../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 $}from"../../chunk-ZLLER3HP.js";import{Flags as E}from"@oclif/core";import{existsSync as g,mkdirSync as w,readFileSync as I,writeFileSync as N}from"node:fs";import{execSync as K,execFileSync as h,spawnSync as W}from"node:child_process";import{homedir as y,userInfo as Z}from"node:os";import{dirname as P,join as o}from"node:path";var H="com.rulemetric.api",L=o(y(),"Library","LaunchAgents",`${H}.plist`),F="com.rulemetric.worker",v=o(y(),"Library","LaunchAgents",`${F}.plist`),X="com.rulemetric.gateway",G=o(y(),"Library","LaunchAgents",`${X}.plist`),q="com.rulemetric.proxy",V=o(y(),"Library","LaunchAgents",`${q}.plist`),tt="com.rulemetric.worker.restart",C=o(y(),"Library","LaunchAgents",`${tt}.plist`),T=o(y(),".config","rulemetric"),p=o(T,"logs"),et=8787,Y=8788,J=o(y(),".config","systemd","user"),A="rulemetric-worker.service",O=o(J,A),j=class S extends M{static{$(this,"ServiceInstall")}static description="Install RuleMetric services. Default (in a repo checkout): API + worker + gateway + capture proxy as launchd agents. With --worker-only: just the job worker, targeting the globally-installed CLI \u2014 no repo, no build (works from `npm i -g @rulemetric/cli`, macOS launchd or Linux systemd).";static examples=["<%= config.bin %> service install","<%= config.bin %> service install --port 3000","<%= config.bin %> service install --skip-build","<%= config.bin %> service install --no-proxy","<%= config.bin %> service install --worker-only"];static flags={port:E.integer({char:"p",default:3e3,description:"API server port"}),force:E.boolean({char:"f",default:!1,description:"Overwrite existing service configuration and reclaim conflicting ports"}),"skip-build":E.boolean({default:!1,description:"Skip the pre-install workspace build (API/web/cli dist must already exist)"}),"no-proxy":E.boolean({default:!1,description:"Skip gateway + mitmproxy plists (just install API + worker)"}),"worker-only":E.boolean({default:!1,description:"Install ONLY the job worker as a persistent service, targeting the globally-installed CLI (no repo checkout, no build, no API/gateway/proxy). Sources auth from ~/.config/rulemetric/env. macOS (launchd) + Linux (systemd --user)."})};async run(){let{flags:r}=await this.parse(S),t=r.port,e=r["skip-build"],s=r["no-proxy"];if(r["worker-only"]){await this.runWorkerOnly(r.force);return}if(process.platform!=="darwin"&&this.error("The full service install is macOS-only (launchd). For just the job worker on Linux (or a clean npm install), use: rulemetric service install --worker-only"),g(L)&&!r.force){this.log(`Service already installed at ${L}`),this.log("Use --force to overwrite, or run: rulemetric service status");return}try{if((await fetch(`http://localhost:${t}/health`)).ok&&!r.force){this.warn(`Port ${t} is already in use (API may be running via start.sh or in another terminal).`),this.warn("Stop it first with scripts/dev/stop.sh, or use --force to take over the port.");return}}catch{}let i=this.findProjectRoot();i||this.error("Could not find RuleMetric project root. Run this command from within the momento-mori repo, or set RULEMETRIC_PROJECT_ROOT.");let n=o(i,".env.local");g(n)||this.error(`.env.local not found at ${n}. The API needs Supabase credentials to start.`);let a=this.guardAlwaysOnDatabaseUrl(this.loadEnvVars(i)),c=this.findBinary("node"),d=this.findBinary("pnpm");(!c||!d)&&this.error("Could not find node or pnpm. Ensure they are in your PATH.");let u=null;if(s||(u=this.findBinary("mitmdump"),u||this.error(`mitmdump not found in PATH. Install with: pipx install mitmproxy (or brew install mitmproxy), then re-run.
|
|
2
2
|
Or skip the capture proxy with --no-proxy.`)),e)this.log("[..] Skipping pre-install build (--skip-build)");else{this.log("[..] Building workspace artifacts (api, web, cli) via turbo...");let R=W(d,["exec","turbo","run","build",...["--filter","@rulemetric/api...","--filter","@rulemetric/web...","--filter","@rulemetric/cli"]],{cwd:i,stdio:"inherit"});R.status!==0&&this.error(`Workspace build failed (exit ${R.status}). Fix the build first, or use --skip-build if dist/ already exists.`),this.log("[OK] Build complete")}let f=o(i,"apps","api","dist","index.js");g(f)||this.error(`API entry not found at ${f}. Re-run without --skip-build, or: pnpm --filter @rulemetric/api... build`);let k=o(i,"apps","web","dist","index.html");if(g(k)||this.warn(`Web bundle not found at ${k}. Dashboard at :${t} will 404 until you build apps/web.`),!s){let b=o(i,"apps","cli","dist","lib","gateway-entry.js");g(b)||this.error(`Gateway entry not found at ${b}. Re-run without --skip-build, or: pnpm --filter @rulemetric/cli build`)}r.force&&this.killStaleProcess(t,null,"API on :"+t),s||(this.killStaleProcess(et,o(T,"gateway.pid"),"gateway"),this.killStaleProcess(Y,o(T,"proxy.pid"),"mitmproxy")),w(o(y(),"Library","LaunchAgents"),{recursive:!0}),w(p,{recursive:!0});let m=K("id -u",{encoding:"utf-8"}).trim(),z=this.buildPlist({port:t,projectRoot:i,nodePath:c,pnpmPath:d,envVars:a});this.bootoutAndWrite(m,L,z,"API"),this.bootstrapPlist(m,L,"API"),this.log(`[..] Waiting for API on :${t}...`),await this.waitForApi(t,15)?(this.log(`[OK] RuleMetric API running on :${t}`),g(k)&&this.log(`[OK] Dashboard available at http://localhost:${t}`)):(this.warn("API did not respond within 15s. Check logs:"),this.log(` tail -f ${p}/api-stdout.log`),this.log(` tail -f ${p}/api-stderr.log`)),this.log(""),this.log("Installing worker service..."),this.killStaleAgents();let Q=this.buildWorkerPlist({cliBin:o(i,"apps","cli","bin","run.js"),cliDist:o(i,"apps","cli","dist"),workingDir:i,nodePath:c,pnpmPath:d,envVars:a});if(this.bootoutAndWrite(m,v,Q,"Worker"),this.bootstrapPlist(m,v,"Worker"),!s){this.log(""),this.log("Installing gateway + capture proxy services...");let b=this.buildGatewayPlist({projectRoot:i,nodePath:c});this.bootoutAndWrite(m,G,b,"Gateway"),this.bootstrapPlist(m,G,"Gateway");let R=this.buildProxyPlist({projectRoot:i,mitmdumpPath:u,envVars:a});this.bootoutAndWrite(m,V,R,"Proxy"),this.bootstrapPlist(m,V,"Proxy")}if(g(C)){try{h("launchctl",["bootout",`gui/${m}`,C],{encoding:"utf-8"})}catch{}try{h("rm",["-f",C]),this.log("[OK] Removed stale daily worker-restart agent (no longer needed on agent path)")}catch{}}this.log(""),s?this.log("Installed: API + worker. Gateway/proxy skipped (--no-proxy)."):this.log("Installed: API + worker + gateway + capture proxy."),this.log("All services start at login, restart on crash, and pick up rebuilds via WatchPaths."),this.log(""),this.log("NOTE: Env vars are baked in at install time. If you change"),this.log(".env.local or credentials, re-run: rulemetric service install --force"),this.log(""),this.log("Manage with:"),this.log(" rulemetric service status \u2014 check if running"),this.log(" rulemetric service uninstall \u2014 remove all services"),await x();let _=await B();this.log(""),_.available?this.log(`[OK] tmux found${_.version?` (v${_.version})`:""} \u2014 live send enabled`):this.log("[!!] tmux not found \u2014 live send will fall back to opening Terminal. Install with: brew install tmux")}async runWorkerOnly(r){let t=process.platform;t!=="darwin"&&t!=="linux"&&this.error(`--worker-only supports macOS (launchd) and Linux (systemd) only; detected '${t}'.`);let e=this.findBinary("node");e||this.error("Could not find `node` in PATH.");let s=o(this.config.root,"bin","run.js");g(s)||this.error(`Could not locate the installed CLI entry at ${s}. Reinstall the CLI (e.g. npm i -g @rulemetric/cli) and re-run.`);let i=o(this.config.root,"dist"),n=this.loadGlobalWorkerEnv();if(!n.RULEMETRIC_API_KEY&&!n.RULEMETRIC_ACCESS_TOKEN&&this.error("Not authenticated \u2014 no RULEMETRIC_API_KEY/RULEMETRIC_ACCESS_TOKEN in ~/.config/rulemetric/env.\nRun `rulemetric auth login` first, then re-run `rulemetric service install --worker-only`."),n.RULEMETRIC_API_URL||(n.RULEMETRIC_API_URL="https://rulemetric.com"),w(p,{recursive:!0}),this.killStaleAgents(),t==="darwin"){if(g(v)&&!r){this.log(`Worker already installed at ${v}.`),this.log("Use --force to overwrite, or run: rulemetric service status");return}w(o(y(),"Library","LaunchAgents"),{recursive:!0});let a=K("id -u",{encoding:"utf-8"}).trim(),c=this.buildWorkerPlist({cliBin:s,cliDist:i,workingDir:y(),nodePath:e,nodeEnv:"production",envVars:n});this.bootoutAndWrite(a,v,c,"Worker"),this.bootstrapPlist(a,v,"Worker"),this.log(""),this.log("[OK] Worker installed (launchd). Starts at login, restarts on crash."),this.log(` Logs: tail -f ${o(p,"worker-stdout.log")}`)}else{if(g(O)&&!r){this.log(`Worker already installed at ${O}.`),this.log(`Use --force to overwrite, or: systemctl --user status ${A}`);return}w(J,{recursive:!0});let a=this.buildWorkerSystemdUnit({cliBin:s,nodePath:e,envVars:n});N(O,a,{mode:384}),this.log(`[OK] Wrote ${O}`);try{h("systemctl",["--user","daemon-reload"]),h("systemctl",["--user","enable","--now",A]),this.log("[OK] Worker enabled + started (systemctl --user).");try{h("loginctl",["enable-linger",Z().username]),this.log("[OK] Enabled linger \u2014 worker survives logout/reboot.")}catch{this.log("[!!] Could not enable linger (worker will stop on logout)."),this.log(' Run: sudo loginctl enable-linger "$USER"')}this.log(` Logs: journalctl --user -u ${A} -f`)}catch(c){this.warn(`Wrote the unit but \`systemctl --user\` failed: ${c instanceof Error?c.message:String(c)}`),this.log(`Enable it manually: systemctl --user daemon-reload && systemctl --user enable --now ${A}`)}}this.log(""),this.log("Manage with:"),this.log(" rulemetric service status \u2014 check if running"),this.log(" rulemetric service uninstall \u2014 remove the worker"),await x(),U("worker_started",{mode:"worker-only"},this.config.version)}loadGlobalWorkerEnv(){let r={},t=o(T,"env");if(g(t))for(let e of I(t,"utf-8").split(`
|
|
3
3
|
`)){let s=e.trim();if(!s||s.startsWith("#"))continue;let i=s.indexOf("=");i>0&&(r[s.slice(0,i)]=s.slice(i+1))}return Object.fromEntries(Object.entries(r).filter(([e])=>D.has(e)))}buildWorkerSystemdUnit(r){let{cliBin:t,nodePath:e,envVars:s}=r,i={...s,NODE_ENV:"production",PATH:[...new Set([P(e),o(y(),".local","bin"),"/opt/homebrew/bin","/usr/local/bin","/usr/bin","/bin"])].join(":"),PG_POOL_MAX:s.PG_POOL_MAX??"3",PG_IDLE_TIMEOUT:s.PG_IDLE_TIMEOUT??"10"},n=Object.entries(i).map(([a,c])=>`Environment="${a}=${c.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`).join(`
|
|
4
4
|
`);return`[Unit]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as b}from"../../chunk-6XEC6474.js";import"../../chunk-N7ODX6PO.js";import{a as w}from"../../chunk-
|
|
1
|
+
import{a as b}from"../../chunk-6XEC6474.js";import"../../chunk-N7ODX6PO.js";import{a as w}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 T}from"../../chunk-ZLLER3HP.js";import{existsSync as c,readFileSync as A}from"node:fs";import{execFileSync as x,execSync as M}from"node:child_process";import{homedir as l}from"node:os";import{join as a}from"node:path";var k="com.rulemetric.api",g=a(l(),"Library","LaunchAgents",`${k}.plist`),u="com.rulemetric.worker",o=a(l(),"Library","LaunchAgents",`${u}.plist`),v="com.rulemetric.gateway",E=a(l(),"Library","LaunchAgents",`${v}.plist`),L="com.rulemetric.proxy",R=a(l(),"Library","LaunchAgents",`${L}.plist`),_=a(l(),".config","rulemetric","logs"),y=8787,$=8788,p="rulemetric-worker.service",W=a(l(),".config","systemd","user",p),P=class extends w{static{T(this,"ServiceStatus")}static description="Check the status of installed RuleMetric services (launchd on macOS; systemd --user worker on Linux)";async run(){if(process.platform!=="darwin"){if(process.platform==="linux"){this.reportLinuxWorkerStatus();return}this.error(`Service status supports macOS (launchd) and Linux (systemd --user, worker-only installs) only; detected '${process.platform}'.`)}if(!c(g)){if(c(o)){this.reportWorkerOnlyStatus();return}this.log("Service: not installed"),this.log("Run: rulemetric service install (repo checkout) or rulemetric service install --worker-only");return}let t=this.readServiceState(k,g),e=this.readApiPort(g),r=await this.probeApiHealth(e),d=await this.probeDashboard(e),s=this.readServiceState(u,o),h=this.readWorkerMode(),i=this.readServiceState(v,E),S=this.isPortListening(y),n=this.readServiceState(L,R),m=this.isPortListening($),O=`${r} (port ${e})${d?" \u2014 dashboard served":""}`;this.log(`API: ${this.fmtState(t)} \u2014 ${O}`);let I=h==="listen"?" [mode: listen \u2014 DEPRECATED, run `rulemetric service install --force` to upgrade]":"";this.log(`Worker: ${this.fmtState(s)}${I}`),this.log(`Gateway: ${this.fmtState(i)} \u2014 ${S?`listening :${y}`:`NOT listening :${y}`}`),this.log(`Proxy: ${this.fmtState(n)} \u2014 ${m?`listening :${$}`:`NOT listening :${$}`}`);let f=await b();this.log(`Tmux: ${f.available?f.version?`v${f.version}`:"available":"not found"}`),this.log(""),this.log(`Plists: ${g}`),this.log(` ${o}`),i.installed&&this.log(` ${E}`),n.installed&&this.log(` ${R}`),this.log(`Logs: ${_}/{api,worker,gateway,proxy}-{stdout,stderr}.log`);let D=t.launchdStatus==="running"&&r==="healthy"&&s.launchdStatus==="running"&&(!i.installed||i.launchdStatus==="running"&&S)&&(!n.installed||n.launchdStatus==="running"&&m);this.log(""),D?this.log("All good \u2014 sessions tracked, jobs processed, capture pipeline live."):(t.launchdStatus!=="running"&&(this.log("API is not running. Try:"),this.log(` launchctl kickstart gui/$(id -u)/${k}`)),s.installed&&s.launchdStatus!=="running"&&(this.log("Worker is not running. Try:"),this.log(` launchctl kickstart gui/$(id -u)/${u}`)),i.installed&&(i.launchdStatus!=="running"||!S)&&(this.log("Gateway is not running. Try:"),this.log(` launchctl kickstart gui/$(id -u)/${v}`)),n.installed&&(n.launchdStatus!=="running"||!m)&&(this.log("Proxy is not running. Try:"),this.log(` launchctl kickstart gui/$(id -u)/${L}`)),(!i.installed||!n.installed)&&this.log("Gateway/proxy not installed. Run: rulemetric service install --force"))}reportWorkerOnlyStatus(){let t=this.readServiceState(u,o),r=this.readWorkerMode()==="listen"?" [mode: listen \u2014 DEPRECATED, run `rulemetric service install --worker-only --force` to upgrade]":"";this.log(`Worker: ${this.fmtState(t)}${r} (worker-only install)`),this.log(""),this.log(`Plist: ${o}`),this.log(`Logs: ${_}/worker-{stdout,stderr}.log`),this.log(""),t.launchdStatus==="running"?this.log("All good \u2014 jobs processed by the background worker."):(this.log("Worker is not running. Try:"),this.log(` launchctl kickstart gui/$(id -u)/${u}`))}reportLinuxWorkerStatus(){if(!c(W)){this.log("Service: not installed"),this.log("Run: rulemetric service install --worker-only");return}let t;try{t=x("systemctl",["--user","is-active",p],{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).trim()}catch(e){t=(e.stdout??"").toString().trim()||"not loaded"}this.log(`Worker: ${t} (systemd --user, worker-only install)`),this.log(""),this.log(`Unit: ${W}`),this.log(`Logs: journalctl --user -u ${p} -f`),this.log(""),t==="active"?this.log("All good \u2014 jobs processed by the background worker."):(this.log("Worker is not running. Try:"),this.log(` systemctl --user restart ${p}`))}readServiceState(t,e){if(!c(e))return{installed:!1,launchdStatus:"not installed",pid:null};try{let d=M(`launchctl list ${t} 2>/dev/null`,{encoding:"utf-8"}),s=d.match(/"PID"\s*=\s*(\d+)/),h=d.match(/"LastExitStatus"\s*=\s*(\d+)/);if(s)return{installed:!0,launchdStatus:"running",pid:s[1]};if(h){let i=h[1];return{installed:!0,launchdStatus:i==="0"?"stopped (clean exit)":`stopped (exit ${i})`,pid:null}}return{installed:!0,launchdStatus:"loaded",pid:null}}catch{return{installed:!0,launchdStatus:"not loaded",pid:null}}}fmtState(t){return t.installed?`${t.launchdStatus}${t.pid?` (PID ${t.pid})`:""}`:"not installed"}readApiPort(t){try{let r=A(t,"utf-8").match(/<key>PORT<\/key>\s*<string>(\d+)<\/string>/);if(r)return Number.parseInt(r[1])}catch{}return 3e3}readWorkerMode(){if(!c(o))return null;try{let e=A(o,"utf-8").match(/<string>evals<\/string>\s*<string>(listen|agent)<\/string>/);if(e)return e[1]}catch{}return null}async probeApiHealth(t){try{let e=await fetch(`http://localhost:${t}/health`);return e.ok?"healthy":`unhealthy (${e.status})`}catch{return"unreachable"}}async probeDashboard(t){try{let e=await fetch(`http://localhost:${t}/`);return e.ok?(e.headers.get("content-type")??"").includes("text/html"):!1}catch{return!1}}isPortListening(t){try{return x("lsof",["-ti",`:${t}`,"-sTCP:LISTEN"],{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).trim().length>0}catch{return!1}}};export{P as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u}from"../../chunk-
|
|
1
|
+
import{a as u}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 n}from"../../chunk-ZLLER3HP.js";import{existsSync as m,unlinkSync as d}from"node:fs";import{execSync as g,execFileSync as s}from"node:child_process";import{homedir as y}from"node:os";import{join as p}from"node:path";var v=[{label:"com.rulemetric.api",description:"API"},{label:"com.rulemetric.worker",description:"Worker"},{label:"com.rulemetric.gateway",description:"Gateway"},{label:"com.rulemetric.proxy",description:"Proxy"},{label:"com.rulemetric.worker.restart",description:"Worker restart agent"}];function h(a){return p(y(),"Library","LaunchAgents",`${a}.plist`)}n(h,"plistPathFor");var l="rulemetric-worker.service",i=p(y(),".config","systemd","user",l),c=class extends u{static{n(this,"ServiceUninstall")}static description="Remove RuleMetric services (macOS launchd: API/worker/gateway/proxy; Linux: the --worker-only systemd unit)";async run(){if(process.platform==="linux"){this.uninstallLinuxWorker();return}process.platform!=="darwin"&&this.error("Service uninstall supports macOS (launchd) and Linux (systemd) only.");let r=v.filter(t=>m(h(t.label)));if(r.length===0){this.log("No RuleMetric services are installed.");return}let o=g("id -u",{encoding:"utf-8"}).trim();for(let t of r){let e=h(t.label);this.stopService(o,e,t.label,t.description),this.removePlist(e,t.description)}this.log(""),this.log("All RuleMetric services removed. They will no longer start automatically."),this.log("Use scripts/dev/start.sh (dev) or `rulemetric service install` (always-on) to bring them back.")}stopService(r,o,t,e){try{s("launchctl",["bootout",`gui/${r}`,o],{encoding:"utf-8"}),this.log(`[OK] ${e} stopped`);return}catch{}try{s("launchctl",["unload",o],{encoding:"utf-8"}),this.log(`[OK] ${e} stopped (legacy)`);return}catch{try{g(`launchctl list ${t} 2>&1`,{encoding:"utf-8"}).includes("PID")?(this.warn(`${e} appears to still be running. Try manually:`),this.warn(` launchctl bootout gui/${r} "${o}"`)):this.log(`[OK] ${e} was not running`)}catch{this.log(`[OK] ${e} was not running`)}}}removePlist(r,o){try{d(r),this.log(`[OK] Removed ${r}`)}catch(t){this.warn(`Could not remove ${o} plist: ${t.message}. Try: rm "${r}"`)}}uninstallLinuxWorker(){if(!m(i)){this.log("No RuleMetric worker is installed (no systemd unit found).");return}try{s("systemctl",["--user","disable","--now",l],{encoding:"utf-8"}),this.log("[OK] Worker stopped + disabled (systemctl --user)")}catch(r){this.warn(`Could not disable the worker unit: ${r.message}`),this.warn(` systemctl --user disable --now ${l}`)}try{d(i),this.log(`[OK] Removed ${i}`)}catch(r){this.warn(`Could not remove ${i}: ${r.message}. Try: rm "${i}"`)}try{s("systemctl",["--user","daemon-reload"],{encoding:"utf-8"})}catch{}this.log(""),this.log("RuleMetric worker removed. It will no longer start automatically.")}};export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-WLVQJH4E.js";import{a as o}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-WLVQJH4E.js";import{a as o}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{f as r}from"../../chunk-5VWVQCNR.js";import"../../chunk-MHLHLJ5T.js";import"../../chunk-XQYAVSUQ.js";import"../../chunk-PZNWH4VQ.js";import{a as t}from"../../chunk-ZLLER3HP.js";import{Args as l}from"@oclif/core";var s=class n extends o{static{t(this,"SessionsAnalyze")}static description="Trigger AI analysis on a session";static examples=["<%= config.bin %> sessions analyze <session-id>"];static args={id:l.string({description:"Session ID",required:!0})};async run(){let{args:i}=await this.parse(n);this.requireAuth(),a(i.id,"session ID");let e=await r(`/api/sessions/${i.id}/analyze`,{});this.log(`Analysis queued (job ${e.jobId}, status: ${e.status}).`),this.log("A running worker picks it up automatically \u2014 start one with `rulemetric evals agent`"),this.log("(or install it persistently: `rulemetric service install --worker-only`)."),this.log("Results appear on the session once processed \u2014 see the session detail page in the dashboard.")}};export{s as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u}from"../../chunk-
|
|
1
|
+
import{a as u}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{e as f,i as g}from"../../chunk-5VWVQCNR.js";import"../../chunk-MHLHLJ5T.js";import"../../chunk-XQYAVSUQ.js";import"../../chunk-PZNWH4VQ.js";import{a as h}from"../../chunk-ZLLER3HP.js";import{Args as w,Flags as b}from"@oclif/core";var a=class m extends u{static{h(this,"SessionsDelete")}static description="Permanently delete captured sessions and everything stored with them (events, context snapshots, offloaded blobs)";static examples=["<%= config.bin %> sessions delete 4f9d\u2026","<%= config.bin %> sessions delete 4f9d\u2026 8a21\u2026","<%= config.bin %> sessions delete --project /work/client-a --yes"];static args={ids:w.string({description:"Session id(s) to delete",required:!1})};static strict=!1;static flags={project:b.string({description:"Delete every session captured under this project path (use with --yes)."}),yes:b.boolean({description:"Skip the confirmation prompt. Required for --project in non-interactive use.",default:!1})};async run(){let{argv:v,flags:o}=await this.parse(m);this.requireAuth();let n=v.map(t=>t.trim()).filter(Boolean);n.length===0&&!o.project&&this.error("Nothing to delete. Pass one or more session ids, or --project <path> for a bulk scrub."),n.length>0&&o.project&&this.error("Pass either session ids or --project, not both.");let s=n;if(o.project){s=[];let t=0,e=100;for(;;){let r=await f(`/api/sessions?projectPath=${encodeURIComponent(o.project)}&hideEmpty=false&limit=${e}&offset=${t}`);if(s.push(...r.map($=>$.id)),r.length<e)break;t+=e}if(s.length===0){this.log(`No sessions found under ${o.project}. Nothing to delete.`);return}this.log(`${s.length} session(s) captured under ${o.project}.`)}if(!o.yes){process.stdin.isTTY||this.error(`Refusing to delete ${s.length} session(s) without --yes in a non-interactive shell.`);let{createInterface:t}=await import("node:readline/promises"),e=t({input:process.stdin,output:process.stdout}),r=await e.question(`Permanently delete ${s.length} session(s) and all captured content? This cannot be undone. [y/N] `);if(e.close(),r.trim().toLowerCase()!=="y"){this.log("Aborted \u2014 nothing deleted.");return}}let d=0,c=0,p=0,l=0,i=0;for(let t of s)try{let e=await g(`/api/sessions/${t}`);d+=e.eventsDeleted??0,c+=e.snapshotsDeleted??0,p+=e.blobsDeleted??0,l+=e.blobsFailed??0,this.log(`deleted ${t} (${e.eventsDeleted??0} events, ${e.snapshotsDeleted??0} snapshots)`)}catch(e){i+=1,this.warn(`failed to delete ${t}: ${e.message}`)}this.log(""),this.log(`Deleted ${s.length-i}/${s.length} session(s): ${d} events, ${c} snapshots, ${p} storage blob(s) removed.`),l>0&&this.warn(`${l} storage blob(s) could not be removed (rows are gone; blobs are orphaned).`),i>0&&this.error(`${i} session(s) failed to delete \u2014 see warnings above.`)}};export{a as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as d}from"../../chunk-
|
|
1
|
+
import{a as d}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{f as m}from"../../chunk-5VWVQCNR.js";import"../../chunk-MHLHLJ5T.js";import"../../chunk-XQYAVSUQ.js";import"../../chunk-PZNWH4VQ.js";import{a as l}from"../../chunk-ZLLER3HP.js";import{readdirSync as f,readFileSync as h,unlinkSync as p,statSync as S}from"node:fs";import{tmpdir as g}from"node:os";import{join as r}from"node:path";var v=[".log",".seq",".ctxhash",".pid",".lock"],c=class u extends d{static{l(this,"SessionsEnd")}static description="End the active capture session";static examples=["<%= config.bin %> sessions end"];async run(){await this.parse(u),this.requireAuth();let i=r(g(),"rulemetric"),s=this.findActiveSession(i);s||this.error("No active session found. Start one with: rulemetric sessions start --tool <name>");try{await m(`/api/sessions/${s.rwSessionId}/close`,{})}catch(e){this.error(`Could not end session ${s.rwSessionId} via API: ${e.message}. Local session files were left in place \u2014 fix the connection/auth issue and retry.`)}this.cleanupSessionFiles(i,s.externalId),this.log(`Session ended: ${s.rwSessionId}`)}findActiveSession(i){let s;try{s=f(i)}catch{return null}let e=[];for(let t of s){if(v.some(o=>t.endsWith(o)))continue;let n=r(i,t);try{let o=S(n);if(!o.isFile())continue;let a=h(n,"utf-8").trim();if(!a)continue;e.push({externalId:t,rwSessionId:a.split(`
|
|
2
2
|
`)[0].trim(),path:n,mtime:o.mtimeMs})}catch{continue}}return e.length===0?null:(e.sort((t,n)=>n.mtime-t.mtime),e[0])}cleanupSessionFiles(i,s){let e=r(i,s);for(let t of["",".seq",".ctxhash",".log"])try{p(e+t)}catch{}}};export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"../../chunk-
|
|
1
|
+
import{a as n}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{f as r}from"../../chunk-5VWVQCNR.js";import"../../chunk-MHLHLJ5T.js";import"../../chunk-XQYAVSUQ.js";import"../../chunk-PZNWH4VQ.js";import{a as i}from"../../chunk-ZLLER3HP.js";import*as o from"node:fs";import{Args as l,Flags as d}from"@oclif/core";var e=class a extends n{static{i(this,"SessionsImport")}static description="Import a session file (JSONL, JSON)";static examples=["<%= config.bin %> sessions import ~/.claude/projects/my-project/session-abc.jsonl","<%= config.bin %> sessions import ./copilot-export.json --tool vscode_copilot"];static args={path:l.string({description:"Path to session file",required:!0})};static flags={tool:d.string({description:"Override tool detection (claude_code, cursor, vscode_copilot)"})};async run(){let{args:t,flags:c}=await this.parse(a);this.requireAuth(),o.existsSync(t.path)||this.error(`File not found: ${t.path}`);let p=o.readFileSync(t.path,"utf-8"),s=await r("/api/sessions/import",{content:p,tool:c.tool});this.log(`Imported session ${s.id} (${s.tool}, ${s.eventCount} events)`)}};export{e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as l}from"../../chunk-
|
|
1
|
+
import{a as l}from"../../chunk-RQBN7WNS.js";import{a}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{e as r}from"../../chunk-5VWVQCNR.js";import"../../chunk-MHLHLJ5T.js";import"../../chunk-XQYAVSUQ.js";import"../../chunk-PZNWH4VQ.js";import{a as n}from"../../chunk-ZLLER3HP.js";import{Flags as c}from"@oclif/core";var o=class d extends a{static{n(this,"SessionsList")}static description="List captured sessions";static examples=["<%= config.bin %> sessions list","<%= config.bin %> sessions list --tool claude_code","<%= config.bin %> sessions list --tool codex"];static flags={tool:c.string({description:`Filter by tool (${l.join(", ")})`}),limit:c.integer({description:"Max results",default:20})};async run(){let{flags:e}=await this.parse(d);this.requireAuth();let s=new URLSearchParams;e.tool&&s.set("tool",e.tool),s.set("limit",String(e.limit));let i=await r(`/api/sessions?${s}`);if(i.length===0){this.log("No sessions found.");return}for(let t of i){let p=t.projectPath?.split("/").pop()??"\u2014",m=t.analysis?.adherenceScore!=null?`${t.analysis.adherenceScore}%`:"\u2014",u=new Date(t.startedAt).toLocaleDateString();this.log(`${t.id.slice(0,8)} ${t.tool.padEnd(15)} ${p.padEnd(20)} ${String(t.eventCount).padStart(5)} events ${m.padStart(4)} adherence ${u}`)}}};export{o as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as g}from"../../chunk-
|
|
1
|
+
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{a as m}from"../../chunk-3AV3GTMP.js";import{f as p}from"../../chunk-5VWVQCNR.js";import"../../chunk-MHLHLJ5T.js";import"../../chunk-XQYAVSUQ.js";import"../../chunk-PZNWH4VQ.js";import{a as d}from"../../chunk-ZLLER3HP.js";import{Flags as h}from"@oclif/core";import{randomUUID as w}from"node:crypto";import{mkdirSync as j,writeFileSync as u}from"node:fs";import{tmpdir as S}from"node:os";import{join as f}from"node:path";import{execSync as v}from"node:child_process";var i=class x extends g{static{d(this,"SessionsStart")}static description="Start a capture session for any LLM provider (Cortex, Groq, etc.)";static examples=["<%= config.bin %> sessions start --tool cortex","<%= config.bin %> sessions start --tool groq --project-dir /path/to/project",'eval "$(rulemetric proxy env --python)" && rulemetric sessions start --tool cortex'];static flags={tool:h.string({char:"t",required:!0,description:"LLM provider or tool name (e.g., cortex, groq, deepseek, custom_app)"}),"project-dir":h.string({char:"d",description:"Project directory (defaults to cwd)"})};async run(){let{flags:r}=await this.parse(x);this.requireAuth();let t=r["project-dir"]??process.cwd(),s=w(),o="";try{o=v("git branch --show-current 2>/dev/null",{cwd:t,encoding:"utf-8"}).trim()}catch{}let e="";try{e=v("git remote get-url origin 2>/dev/null",{cwd:t,encoding:"utf-8"}).trim()}catch{}let n={};e&&(n.gitRemote=e);let y=m(),c=await p("/api/sessions",{tool:r.tool,externalSessionId:s,projectPath:t,gitBranch:o,metadata:n,orgId:y?.orgId??null}),a=f(S(),"rulemetric");j(a,{recursive:!0});let l=f(a,s);u(l,c.id+`
|
|
2
2
|
`),u(l+".seq",`0
|
|
3
3
|
`),this.log(`Session started: ${c.id}`),this.log(` Tool: ${r.tool}`),this.log(` Project: ${t}`),o&&this.log(` Branch: ${o}`),this.log(""),this.log("The proxy will now capture LLM traffic for this session."),this.log("When done, run: rulemetric sessions end")}};export{i as default};
|
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-YLEXR62G.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 as e}from"../../chunk-
|
|
1
|
+
import{a as e}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{e as r}from"../../chunk-5VWVQCNR.js";import"../../chunk-MHLHLJ5T.js";import"../../chunk-XQYAVSUQ.js";import"../../chunk-PZNWH4VQ.js";import{a as o}from"../../chunk-ZLLER3HP.js";import*as a from"node:fs";import*as n from"node:path";import{Flags as m}from"@oclif/core";var t=class p extends e{static{o(this,"SkillsExportApproved")}static description="Export approved community submissions as community-skills.json for registry merge";static examples=["<%= config.bin %> skills export-approved","<%= config.bin %> skills export-approved --output ./community-skills.json"];static flags={output:m.string({description:"Output file path",default:"packages/skills-registry/community-skills.json"})};async run(){let{flags:l}=await this.parse(p);this.requireAuth();let s=await r("/api/skills/submissions/approved");if(s.length===0){this.log("No approved submissions to export.");return}let i=n.resolve(l.output);a.writeFileSync(i,JSON.stringify(s,null,2)),this.log(`Exported ${s.length} approved skills to ${i}`)}};export{t as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as p}from"../../chunk-CDI5CCHU.js";import{a as s,b as l,g}from"../../chunk-UPFH72PF.js";import{a as c}from"../../chunk-
|
|
1
|
+
import{a as p}from"../../chunk-CDI5CCHU.js";import{a as s,b as l,g}from"../../chunk-UPFH72PF.js";import{a as c}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 d}from"../../chunk-ZLLER3HP.js";import*as o from"node:path";import{Args as u,Flags as r}from"@oclif/core";var a=class h extends c{static{d(this,"SkillsInstall")}static description="Install a skill from the registry into your project";static examples=["<%= config.bin %> skills install tdd-workflow","<%= config.bin %> skills install tdd-workflow --preview","<%= config.bin %> skills install tdd-workflow --force"];static args={id:u.string({description:"Skill ID to install",required:!0})};static flags={tool:r.string({description:"Deprecated and ignored \u2014 skills install to every agent path at once",options:["claude_code","cursor","copilot"],hidden:!0}),preview:r.boolean({description:"Preview content without writing",default:!1}),dir:r.string({description:"Project directory",default:"."}),force:r.boolean({description:"Replace an existing skill directory at the Claude Code path",default:!1})};async run(){let{args:n,flags:e}=await this.parse(h),i=(await p(this)).get(n.id);if(i||this.error(`Skill "${n.id}" not found. Try: rulemetric skills search`),i.kind==="supporting"&&this.warn(`"${n.id}" is supporting material for another skill (${i.source.path}), not a standalone skill. Installing it gives you that one file.`),e.preview){this.log(`
|
|
2
2
|
${i.name}`),this.log(`${"\u2500".repeat(i.name.length)}`),this.log(`Category: ${i.category}`),this.log(`Tools: ${i.tools.join(", ")}`),this.log(`Source: ${i.source.url}
|
|
3
3
|
`),this.log(i.content.slice(0,2e3)),i.content.length>2e3&&this.log(`
|
|
4
4
|
... (${i.content.length-2e3} more characters)`);return}e.tool&&this.warn("--tool is ignored: a skill now installs to every agent path at once.");let f=o.resolve(e.dir),t=g({dir:f,name:i.id,content:i.content,description:i.description,force:e.force});this.log(`Installed "${i.name}" as ${t.dirName}`),this.log(` ${o.join(s,t.dirName,"SKILL.md")} (Cursor, Codex, Copilot, Gemini CLI, Cline, Amp, Warp, Zed, OpenCode)`),t.linkKind==="symlink"?this.log(` ${o.join(l,t.dirName)} -> ${o.join(s,t.dirName)} (Claude Code)`):t.linkKind==="copy"&&this.log(` ${o.join(l,t.dirName)} (Claude Code \u2014 copy, not a link)`);for(let m of t.warnings)this.warn(m);this.log(` Source: ${i.source.url}`)}};export{a as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as n}from"../../chunk-CDI5CCHU.js";import{a}from"../../chunk-
|
|
1
|
+
import{a as n}from"../../chunk-CDI5CCHU.js";import{a}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 r}from"../../chunk-ZLLER3HP.js";import{Flags as g}from"@oclif/core";var e=class s extends a{static{r(this,"SkillsList")}static description="List skills in the registry";static examples=["<%= config.bin %> skills list","<%= config.bin %> skills list --stats"];static flags={stats:g.boolean({description:"Show registry statistics",default:!1}),limit:g.integer({description:"Max skills to show",default:30})};async run(){let{flags:t}=await this.parse(s),i=await n(this);if(t.stats){this.log(`Skills Registry Statistics
|
|
2
2
|
`),this.log(` Total skills: ${i.size}`),this.log(` Categories: ${i.categories().join(", ")}`),this.log(` Tools: ${i.tools().join(", ")}`),this.log(` Top tags: ${i.tags().slice(0,15).join(", ")}`);return}let o=i.search({limit:t.limit});if(o.length===0){this.log("Registry is empty. Run: rulemetric skills update");return}this.log(`Showing ${o.length} of ${i.size} skills (sorted by popularity):
|
|
3
3
|
`);for(let l of o){let h=l.popularity?.stars?`${u(l.popularity.stars)} stars`:"";this.log(` ${c(l.id,40)} ${c(l.category,14)} ${h}`)}this.log(`
|
|
4
4
|
Search: rulemetric skills search <query>`),this.log("Install: rulemetric skills install <id>")}};function u(s){return s>=1e3?`${(s/1e3).toFixed(1)}k`:String(s)}r(u,"formatStars");function c(s,t){return s.length>t?s.slice(0,t-1)+"\u2026":s.padEnd(t)}r(c,"pad");export{e as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as h}from"../../chunk-
|
|
1
|
+
import{a as h}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{f as d}from"../../chunk-5VWVQCNR.js";import"../../chunk-MHLHLJ5T.js";import"../../chunk-XQYAVSUQ.js";import"../../chunk-PZNWH4VQ.js";import{a as p}from"../../chunk-ZLLER3HP.js";import*as a from"node:fs";import*as i from"node:path";import{Args as k,Flags as o}from"@oclif/core";var c=class f extends h{static{p(this,"SkillsPublish")}static description="Submit a skill file to the RuleMetric skills registry";static examples=["<%= config.bin %> skills publish ./my-skill.md","<%= config.bin %> skills publish ./my-skill.md --category workflow --tool claude_code"];static args={file:k.string({description:"Path to skill file (.md)",required:!0})};static flags={name:o.string({description:"Skill name (defaults to filename)"}),description:o.string({description:"One-line description"}),category:o.string({description:"Skill category",options:["workflow","language","framework","tool","security","testing","architecture","devops","documentation","performance","other"],default:"other"}),tool:o.string({description:"Primary tool this skill targets",options:["claude_code","cursor","copilot","windsurf","universal"],default:"universal"}),tags:o.string({description:"Comma-separated tags",default:""})};async run(){let{args:u,flags:e}=await this.parse(f);this.requireAuth();let s=i.resolve(u.file);a.existsSync(s)||this.error(`File not found: ${s}`);let l=a.readFileSync(s,"utf-8");l.trim().length<20&&this.error("Skill content is too short (minimum 20 characters)");let g=i.basename(s,i.extname(s)),r=e.name??g.replace(/[-_]+/g," ").replace(/\b\w/g,t=>t.toUpperCase()),m=g.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,""),n=e.tags?e.tags.split(",").map(t=>t.trim()).filter(Boolean):[];this.log(`Publishing skill: ${r} (${m})`),this.log(` Category: ${e.category}`),this.log(` Tool: ${e.tool}`),n.length>0&&this.log(` Tags: ${n.join(", ")}`),this.log(` Content: ${l.length} characters
|
|
2
2
|
`);let y={id:m,name:r,description:e.description??`Community skill: ${r}`,category:e.category,tools:[e.tool],tags:n,content:l};try{let t=await d("/api/skills/publish",y);this.log(`Published! ${t.message??`Skill "${r}" submitted to the registry.`}`)}catch(t){throw t instanceof Error&&this.error(`Failed to publish: ${t.message}`),t}}};export{c as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as n}from"../../chunk-CDI5CCHU.js";import{a}from"../../chunk-
|
|
1
|
+
import{a as n}from"../../chunk-CDI5CCHU.js";import{a}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 e}from"../../chunk-ZLLER3HP.js";import{Args as m,Flags as o}from"@oclif/core";var l=class r extends a{static{e(this,"SkillsSearch")}static description="Search the community skills registry";static examples=['<%= config.bin %> skills search "tdd"',"<%= config.bin %> skills search --tool cursor --category testing","<%= config.bin %> skills search --language python"];static args={query:m.string({description:"Search term",required:!1})};static flags={tool:o.string({description:"Filter by tool",options:["claude_code","cursor","copilot","windsurf","cline","universal"]}),category:o.string({description:"Filter by category",options:["workflow","language","framework","tool","security","testing","architecture","devops","documentation","performance"]}),language:o.string({description:"Filter by programming language"}),framework:o.string({description:"Filter by framework"}),limit:o.integer({description:"Max results",default:20})};async run(){let{args:g,flags:i}=await this.parse(r),s=(await n(this)).search({query:g.query,tool:i.tool,category:i.category,language:i.language,framework:i.framework,limit:i.limit});if(s.length===0){this.log("No skills found matching your criteria."),this.log(`
|
|
2
2
|
Try a broader search or run: rulemetric skills list`);return}this.log(`Found ${s.length} skill${s.length===1?"":"s"}:
|
|
3
3
|
`);for(let t of s){let c=t.popularity?.stars?` (${p(t.popularity.stars)} stars)`:"",u=t.kind==="supporting"?" [supporting file]":"",d=t.tools.join(", ");this.log(` ${t.id}`),this.log(` ${t.name}${u} \u2014 ${t.description}`),this.log(` tools: ${d} category: ${t.category}${c}`),t.tags.length>0&&this.log(` tags: ${t.tags.join(", ")}`),this.log("")}this.log("Run: rulemetric skills install <id> to install a skill")}};function p(r){return r>=1e3?`${(r/1e3).toFixed(1)}k`:String(r)}e(p,"formatStars");export{l as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as n}from"../../chunk-
|
|
1
|
+
import{a as n}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 e}from"../../chunk-ZLLER3HP.js";import*as s from"node:fs";import*as r from"node:path";import*as m from"node:os";import{Flags as h}from"@oclif/core";import{fetchAllSources as y,TIER_1_SOURCES as c,TIER_2_SOURCES as S}from"@rulemetric/skills-registry";var i=r.join(m.homedir(),".config","rulemetric"),f=r.join(i,"skills-registry.json"),t=class g extends n{static{e(this,"SkillsUpdate")}static description="Fetch latest skills from GitHub sources and update local registry";static examples=["<%= config.bin %> skills update","<%= config.bin %> skills update --all"];static flags={all:h.boolean({description:"Include Tier 2 (niche) sources",default:!1})};async run(){let{flags:o}=await this.parse(g),l=o.all?[...c,...S]:c;this.log(`Fetching skills from ${l.length} sources${o.all?" (Tier 1 + 2)":""}...
|
|
2
2
|
`);let a=await y(l,{onProgress:e((p,u)=>{this.log(` ${p}: ${u} skills`)},"onProgress")}),d={version:"1.0.0",generatedAt:new Date().toISOString(),skills:a.entries};s.existsSync(i)||s.mkdirSync(i,{recursive:!0}),s.writeFileSync(f,JSON.stringify(d)),this.log(`
|
|
3
3
|
Updated registry: ${a.entries.length} skills cached at ${f}`)}};export{t as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-WLVQJH4E.js";import{h as r}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-WLVQJH4E.js";import{h as r}from"../../chunk-BOYWPUV2.js";import"../../chunk-ENW5SUQJ.js";import"../../chunk-C3XWDYZJ.js";import"../../chunk-CAQLSYOK.js";import"../../chunk-LJRE3LZ2.js";import{a as o}from"../../chunk-MODXEGCU.js";import"../../chunk-OZQNSELV.js";import"../../chunk-HFGO5762.js";import"../../chunk-VS5ROGDP.js";import"../../chunk-GYNZ3OZF.js";import"../../chunk-UPFH72PF.js";import{a as i}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 s}from"../../chunk-ZLLER3HP.js";import{Args as m,Flags as p}from"@oclif/core";var e=class c extends i{static{s(this,"SuggestionsAccept")}static description="Accept a suggestion and append the instruction to CLAUDE.md";static examples=["<%= config.bin %> suggestions accept <id>"];static args={id:m.string({description:"Suggestion UUID from `suggestions list`",required:!0})};static flags={force:p.boolean({description:"Add the rule even if this project already says the same thing in other words",default:!1})};async run(){let{args:t,flags:d}=await this.parse(c);this.requireAuth(),a(t.id,"suggestion ID");let n=await r({suggestionId:t.id,dir:process.cwd(),projectPath:o(process.cwd()),actor:"human",force:d.force});for(let g of n.messages)this.log(g)}};export{e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as p}from"../../chunk-
|
|
1
|
+
import{a as p}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{e as u,h as l}from"../../chunk-5VWVQCNR.js";import"../../chunk-MHLHLJ5T.js";import"../../chunk-XQYAVSUQ.js";import"../../chunk-PZNWH4VQ.js";import{a as c}from"../../chunk-ZLLER3HP.js";import{Flags as t}from"@oclif/core";var d=class r extends p{static{c(this,"SuggestionsAuto")}static description="Show or change automatic adoption of high-confidence suggestions into CLAUDE.md";static examples=["<%= config.bin %> suggestions auto","<%= config.bin %> suggestions auto --off","<%= config.bin %> suggestions auto --on","<%= config.bin %> suggestions auto --off --project <project-id>"];static flags={on:t.boolean({description:"Enable automatic adoption",exclusive:["off"]}),off:t.boolean({description:"Disable automatic adoption",exclusive:["on"]}),project:t.string({description:"Apply to one project only (overrides the account default)"}),"max-per-window":t.integer({description:"How many rules the loop may adopt per project per window (0 stops it adopting)"}),"max-per-run":t.integer({description:"How many rules one nightly run may adopt"}),"window-days":t.integer({description:"Length of the budget window, in days"}),"min-score":t.string({description:"Minimum suggestion score the loop may adopt (0\u20131)"}),reset:t.boolean({description:"Clear the budget overrides at this level and fall back to the shipped defaults"})};async run(){let{flags:e}=await this.parse(r);this.requireAuth();let i=e.reset?{minScore:null,maxPerRun:null,maxPerWindow:null,windowDays:null}:{...e["min-score"]!==void 0?{minScore:Number(e["min-score"])}:{},...e["max-per-run"]!==void 0?{maxPerRun:e["max-per-run"]}:{},...e["max-per-window"]!==void 0?{maxPerWindow:e["max-per-window"]}:{},...e["window-days"]!==void 0?{windowDays:e["window-days"]}:{}},n=Object.keys(i).length>0;if(e.on||e.off||n){let s=e.on||e.off?!!e.on:void 0,g=await l("/api/settings/auto-accept",{...s!==void 0?{enabled:s}:{},...n?{limits:i}:{},...e.project?{projectId:e.project}:{}});if(n){let a=g.limits;this.log(`Budget for ${e.project?`project ${e.project}`:"your account"}: ${a.maxPerRun} per night, ${a.maxPerWindow} per ${a.windowDays} days, score >= ${a.minScore}.`)}if(s===void 0)return;let m=e.project?`project ${e.project}`:"your account";this.log(`Automatic adoption is now ${s?"ON":"OFF"} for ${m}.`),s||(this.log("Already-adopted rules stay in CLAUDE.md \u2014 remove one with:"),this.log(" rulemetric suggestions undo <instruction-id>"));return}let o=await u("/api/settings/auto-accept"+(e.project?`?projectId=${encodeURIComponent(e.project)}`:""));this.log(`Automatic adoption: ${o.effective?"ON":"OFF"} (from ${o.source})`),this.log(` account default: ${o.accountDefault?"on":"off"}`),e.project&&this.log(` project override: ${o.projectOverride===null?"none":o.projectOverride?"on":"off"}`),this.log(""),this.log("When on, the nightly loop may add \u2014 and only add \u2014 suggestions that:"),this.log(` \u2022 score >= ${o.limits.minScore} (already injected into every session)`),this.log(` \u2022 are '${o.limits.kind}' proposals; removals and trims always wait for you`),this.log(" \u2022 contain no unfilled placeholders"),this.log(` \u2022 at most ${o.limits.maxPerRun} per night, ${o.limits.maxPerWindow} per ${o.limits.windowDays} days \u2014 per PROJECT, counting every checkout of it (${f(o.limits.source)})`),this.log(""),this.log("Change the budget: rulemetric suggestions auto --max-per-window 20"),this.log("Back to defaults: rulemetric suggestions auto --reset"),this.log(""),this.log("Every adopted rule is a tagged block in CLAUDE.md; undo one with:"),this.log(" rulemetric suggestions undo <instruction-id>"),this.log("Turn it off entirely with: rulemetric suggestions auto --off")}};function f(r){let e=new Set(Object.values(r));if(e.size===1){let i=[...e][0];return i==="default"?"shipped defaults":`set on your ${i}`}return Object.entries(r).map(([i,n])=>`${i}: ${n}`).join(", ")}c(f,"describeSource");export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-WLVQJH4E.js";import{a as r}from"../../chunk-MODXEGCU.js";import{a as o}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-WLVQJH4E.js";import{a as r}from"../../chunk-MODXEGCU.js";import{a as o}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{f as t}from"../../chunk-5VWVQCNR.js";import"../../chunk-MHLHLJ5T.js";import"../../chunk-XQYAVSUQ.js";import"../../chunk-PZNWH4VQ.js";import{a as e}from"../../chunk-ZLLER3HP.js";import{Args as m}from"@oclif/core";var s=class n extends o{static{e(this,"SuggestionsDismiss")}static description="Dismiss a suggestion so it will not re-surface for 30 days";static examples=["<%= config.bin %> suggestions dismiss <id>"];static args={id:m.string({description:"Suggestion UUID from `suggestions list`",required:!0})};async run(){let{args:i}=await this.parse(n);this.requireAuth(),a(i.id,"suggestion ID");let d=r(process.cwd());await t(`/api/instruction-suggestions/${encodeURIComponent(i.id)}/events`,{eventType:"dismissed",projectPath:d}),this.log("Dismissed. Won't re-surface for 30 days.")}};export{s as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as u}from"../../chunk-MODXEGCU.js";import{a as g}from"../../chunk-
|
|
1
|
+
import{a as u}from"../../chunk-MODXEGCU.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{e as d}from"../../chunk-5VWVQCNR.js";import"../../chunk-MHLHLJ5T.js";import"../../chunk-XQYAVSUQ.js";import"../../chunk-PZNWH4VQ.js";import{a}from"../../chunk-ZLLER3HP.js";import{Flags as j}from"@oclif/core";import{printTable as v}from"@oclif/table";var r=class p extends g{static{a(this,"SuggestionsList")}static description="List instruction suggestions for a project";static examples=["<%= config.bin %> suggestions list","<%= config.bin %> suggestions list --project /path/to/project"];static flags={project:j.string({char:"p",description:"Project path (defaults to current directory)"})};async run(){let{flags:m}=await this.parse(p);this.requireAuth();let l=u(m.project??process.cwd()),f=encodeURIComponent(l),s=await d(`/api/instruction-suggestions?projectPath=${f}&limit=10&groupByKind=true`);if(s.suggestions.length===0){this.log("No suggestions for this project. They are recomputed daily at 04:30 UTC by a server-side cron and run on your background worker \u2014 make sure one is running (`rulemetric evals agent`, or `rulemetric service install --worker-only`).");return}v({data:s.suggestions.map(e=>({ID:e.id,Action:(e.kind??"add")==="add"?"add":(e.kind??"add").toUpperCase(),Scope:e.instructionScope,Name:e.name,Tokens:e.estimatedTokens?String(e.estimatedTokens):"-",Score:e.score.toFixed(2),Reason:e.reason.length>60?e.reason.slice(0,59)+"\u2026":e.reason})),columns:["ID","Action","Scope","Name","Tokens","Score","Reason"]});let o=s.suggestions.filter(e=>e.kind==="remove");if(o.length>0){let e=o.reduce((h,k)=>h+(k.estimatedTokens??0),0);this.log(`
|
|
2
2
|
${o.length} retirement proposal(s) \u2014 accepting one archives the instruction (reversible: rulemetric instructions restore <instruction-id>).`+(e>0?` Together they cost roughly ${e} tokens of context per session.`:""))}let t=s.stats??{},i=(t.surfaced??0)+(t.surfaced_with_content??0)+(t.proxy_injected??0),n=(t.accepted??0)+(t.promoted??0),c=t.dismissed??0;i+n+c>0&&this.log(`
|
|
3
3
|
Lifetime for this project: ${i} surfaced \xB7 ${n} accepted \xB7 ${c} dismissed`)}};export{r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as i}from"../../chunk-
|
|
1
|
+
import{a as i}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 r}from"../../chunk-ZLLER3HP.js";var e=class extends i{static{r(this,"SuggestionsRefresh")}static description="Information about refreshing instruction suggestions";static examples=["<%= config.bin %> suggestions refresh"];async run(){this.log("Suggestions are recomputed automatically: a server-side cron enqueues a job daily at 04:30 UTC, and your background worker picks it up \u2014 there is no manual trigger."),this.log("Just make sure a worker is running: `rulemetric evals agent` (foreground), or install it persistently with `rulemetric service install --worker-only`.")}};export{e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as f,c as g}from"../../chunk-
|
|
1
|
+
import{a as f,c as g}from"../../chunk-UROUVE3D.js";import{a as l}from"../../chunk-WLVQJH4E.js";import{d as p}from"../../chunk-BOYWPUV2.js";import"../../chunk-ENW5SUQJ.js";import"../../chunk-C3XWDYZJ.js";import"../../chunk-CAQLSYOK.js";import"../../chunk-LJRE3LZ2.js";import{a as m}from"../../chunk-MODXEGCU.js";import"../../chunk-OZQNSELV.js";import"../../chunk-HFGO5762.js";import"../../chunk-VS5ROGDP.js";import{d as u}from"../../chunk-GYNZ3OZF.js";import"../../chunk-UPFH72PF.js";import{a as d}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{f as a}from"../../chunk-5VWVQCNR.js";import"../../chunk-MHLHLJ5T.js";import"../../chunk-XQYAVSUQ.js";import"../../chunk-PZNWH4VQ.js";import{a as c}from"../../chunk-ZLLER3HP.js";import{relative as h}from"node:path";import{Args as P}from"@oclif/core";var o=class I extends d{static{c(this,"SuggestionsUndo")}static description="Remove an adopted instruction from this project's agent instruction files and stop it being re-proposed";static examples=["<%= config.bin %> suggestions undo <instruction-id>"];static args={instructionId:P.string({description:"Instruction ID from the rulemetric:start marker in the instruction file",required:!0})};async run(){let{args:r}=await this.parse(I);this.requireAuth(),l(r.instructionId,"instruction ID");let e=m(process.cwd()),i=process.cwd(),v=u(i).map(t=>h(i,t.path)),w=p(i,r.instructionId).map(t=>h(i,t.path)),A=await f({dir:process.cwd(),instructionId:r.instructionId,projectPath:e}),n=null,s=null;try{n=(await a("/api/instruction-suggestions/undo",{projectPath:e,instructionId:r.instructionId})).name}catch(t){s=t instanceof Error?t.message:String(t)}for(let t of g({stripped:w,searched:v,reversals:A,name:n,instructionId:r.instructionId,dismissalError:s}))this.log(t);s&&this.exit(1)}};export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as R}from"../chunk-4Z5ECCJE.js";import{a as O}from"../chunk-DVN7GFJG.js";import{a as E}from"../chunk-O2SDD2WW.js";import{a as M}from"../chunk-GBMF3TP6.js";import{a as U}from"../chunk-
|
|
1
|
+
import{a as R}from"../chunk-4Z5ECCJE.js";import{a as O}from"../chunk-DVN7GFJG.js";import{a as E}from"../chunk-O2SDD2WW.js";import{a as M}from"../chunk-GBMF3TP6.js";import{a as U}from"../chunk-XCN2YPWI.js";import{a as D}from"../chunk-WSCK4WNK.js";import"../chunk-ARNZQBMX.js";import{a as B,b as S,c as F}from"../chunk-OWXGXKK7.js";import{a as z}from"../chunk-TBLUJ6AW.js";import"../chunk-EKTNI6RV.js";import"../chunk-X23L2MF6.js";import"../chunk-B22HYCBV.js";import"../chunk-ZXF5NE54.js";import{a as u,b as T,d as a,e as v}from"../chunk-NJ5UED3H.js";import"../chunk-NMCQ7JZZ.js";import"../chunk-RQBN7WNS.js";import{a as G}from"../chunk-3AV3GTMP.js";import"../chunk-5VWVQCNR.js";import"../chunk-MHLHLJ5T.js";import"../chunk-XQYAVSUQ.js";import"../chunk-PZNWH4VQ.js";import{a as b}from"../chunk-ZLLER3HP.js";import{useState as h,useEffect as lt,useCallback as H,useRef as dt}from"react";import{render as J,Box as c,Text as e,useInput as ct,useApp as ut}from"ink";import{Fragment as wt,jsx as t,jsxs as f}from"react/jsx-runtime";var ht=90;function V(){let s=process.stdout.columns||80,n=Math.min(160,s),r=n>=ht,d=r?Math.floor(n/2):n,x=Math.max(6,Math.min(10,d-34));return{dashWidth:n,wide:r,halfWidth:d,barWidth:x}}b(V,"getLayout");function K({active:s,providerName:n}){return f(c,{justifyContent:"space-between",paddingX:1,children:[t(c,{gap:1,children:u.map(r=>t(e,{bold:s===r,color:s===r?a:v,children:s===r?`[ ${T[r]} ]`:` ${T[r]} `},r))}),n&&t(e,{color:a,bold:!0,children:n})]})}b(K,"PeriodTabs");function Q({width:s,insightsFocused:n=!1}){return t(c,{borderStyle:"round",borderColor:v,width:s,justifyContent:"center",paddingX:1,children:f(e,{children:[t(e,{color:a,bold:!0,children:"<"}),t(e,{color:a,children:">"}),t(e,{dimColor:!0,children:" switch "}),t(e,{color:a,bold:!0,children:"q"}),t(e,{dimColor:!0,children:" quit "}),t(e,{color:a,bold:!0,children:"s"}),f(e,{dimColor:!0,children:[" ",n?"back":"suggestions"," "]}),t(e,{color:a,bold:!0,children:"1"}),t(e,{dimColor:!0,children:"-"}),t(e,{color:a,bold:!0,children:"5"}),t(e,{dimColor:!0,children:" period "}),t(e,{color:a,bold:!0,children:"r"}),t(e,{dimColor:!0,children:" refresh "}),t(e,{color:a,bold:!0,children:"n"}),t(e,{dimColor:!0,children:" new session "}),t(e,{color:a,bold:!0,children:"m"}),t(e,{dimColor:!0,children:" measurement "}),t(e,{color:a,bold:!0,children:"l"}),t(e,{dimColor:!0,children:" launcher"})]})})}b(Q,"StatusBar");function ft({wide:s,width:n,children:r}){return s?t(c,{width:n,children:r}):t(wt,{children:r})}b(ft,"Row");function mt({initialLocal:s,initialApi:n,initialInstructions:r,initialPeriod:d,initialLauncherFocused:x=!1}){let{exit:j}=ut(),[o,L]=h(d),[Z,tt]=h(s),[W,et]=h(n),[ot,it]=h(r),[rt,k]=h(!1),[Y,_]=h(!1),[m,I]=h(!1),[q,N]=h(x),nt=G()?.orgSlug??null,y=dt(null),st=V(),g=H(async()=>{k(!0);let[i,p,P]=await Promise.all([B(),S(),F()]);tt(i),et(p),it(P),k(!1)},[]);lt(()=>{let i=setInterval(g,3e4);return()=>clearInterval(i)},[g]);let w=H(i=>{i!==o&&(L(i),y.current&&clearTimeout(y.current),y.current=setTimeout(g,300))},[o,g]);ct((i,p)=>{if(q||Y)return;if(i==="q"){if(m){I(!1);return}j();return}if(i==="s"){I(A=>!A);return}if(p.escape&&m){I(!1);return}if(i==="m"&&!m){_(!0);return}if(i==="l"&&!m){N(!0);return}if(m)return;if(i==="r"){g();return}if(i==="n"){import("../dist-ZJY72TUD.js").then(({getLauncher:A})=>{A("claude_code").launch({projectPath:process.cwd(),mode:"interactive"})});return}let P=u.indexOf(o);p.leftArrow?w(u[(P-1+u.length)%u.length]):p.rightArrow||p.tab?w(u[(P+1)%u.length]):i==="1"?w("today"):i==="2"?w("week"):i==="3"?w("30days"):i==="4"?w("month"):i==="5"&&w("all")});let{dashWidth:l,wide:X,halfWidth:at,barWidth:C}=st,$=X?at:l;return Y?t(U,{width:l,onClose:()=>_(!1)}):rt?f(c,{flexDirection:"column",width:l,children:[t(K,{active:o}),t(c,{borderStyle:"round",borderColor:a,paddingX:1,width:l,children:f(e,{dimColor:!0,children:["Loading ",T[o],"..."]})}),t(Q,{width:l})]}):q?t(c,{flexDirection:"column",width:l,children:t(z,{onClose:()=>N(!1),activeOrg:nt,defaultProjectPath:process.cwd(),width:l})}):f(c,{flexDirection:"column",width:l,children:[t(K,{active:o}),t(R,{local:Z,api:W,label:T[o],width:l}),f(ft,{wide:X,width:l,children:[t(D,{api:W,width:$,barWidth:C}),t(O,{api:W,width:$,barWidth:C})]}),t(M,{instructions:ot,width:l,barWidth:C}),t(E,{api:W,width:l,focused:m}),t(Q,{width:l,insightsFocused:m})]})}b(mt,"InteractiveDashboard");async function Bt(s="week",n={}){let[r,d,x]=await Promise.all([B(),S(),F()]);if(process.stdin.isTTY&&process.stdout.isTTY){let{waitUntilExit:o}=J(t(mt,{initialLocal:r,initialApi:d,initialInstructions:x,initialPeriod:s,initialLauncherFocused:n.openLauncher??!1}));await o()}else{let o=V(),{unmount:L}=J(f(c,{flexDirection:"column",width:o.dashWidth,children:[t(R,{local:r,api:d,label:T[s],width:o.dashWidth}),t(D,{api:d,width:o.dashWidth,barWidth:o.barWidth}),t(O,{api:d,width:o.dashWidth,barWidth:o.barWidth}),t(M,{instructions:x,width:o.dashWidth,barWidth:o.barWidth}),t(E,{api:d,width:o.dashWidth})]}),{patchConsole:!1});L()}}b(Bt,"renderDashboard");export{Bt as renderDashboard};
|
package/dist/dashboard/data.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c}from"../chunk-
|
|
1
|
+
import{a,b,c}from"../chunk-OWXGXKK7.js";import"../chunk-RQBN7WNS.js";import"../chunk-5VWVQCNR.js";import"../chunk-MHLHLJ5T.js";import"../chunk-XQYAVSUQ.js";import"../chunk-PZNWH4VQ.js";import"../chunk-ZLLER3HP.js";export{b as loadApiInsights,c as loadLinkedInstructions,a as loadLocalStats};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-TBLUJ6AW.js";import"../../chunk-EKTNI6RV.js";import"../../chunk-X23L2MF6.js";import"../../chunk-B22HYCBV.js";import"../../chunk-ZXF5NE54.js";import"../../chunk-NJ5UED3H.js";import"../../chunk-NMCQ7JZZ.js";import"../../chunk-5VWVQCNR.js";import"../../chunk-MHLHLJ5T.js";import"../../chunk-XQYAVSUQ.js";import"../../chunk-PZNWH4VQ.js";import"../../chunk-ZLLER3HP.js";export{a as LauncherOverlay};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d}from"../../chunk-
|
|
1
|
+
import{a,b,c,d}from"../../chunk-NMCQ7JZZ.js";import"../../chunk-5VWVQCNR.js";import"../../chunk-MHLHLJ5T.js";import"../../chunk-XQYAVSUQ.js";import"../../chunk-PZNWH4VQ.js";import"../../chunk-ZLLER3HP.js";export{c as cancelLaunchJob,b as createLaunchJob,a as fetchLaunchJobs,d as listLaunchers};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-EKTNI6RV.js";import"../../chunk-NMCQ7JZZ.js";import"../../chunk-5VWVQCNR.js";import"../../chunk-MHLHLJ5T.js";import"../../chunk-XQYAVSUQ.js";import"../../chunk-PZNWH4VQ.js";import"../../chunk-ZLLER3HP.js";export{a as useLaunchJobs};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-XCN2YPWI.js";import"../../chunk-NJ5UED3H.js";import"../../chunk-5VWVQCNR.js";import"../../chunk-MHLHLJ5T.js";import"../../chunk-XQYAVSUQ.js";import"../../chunk-PZNWH4VQ.js";import"../../chunk-ZLLER3HP.js";export{a as MeasurementPanel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y}from"./chunk-RQBN7WNS.js";import"./chunk-ZLLER3HP.js";export{h as CODEX_PARSER_VERSION,c as ClaudeCodeAdapter,j as CodexAdapter,f as CopilotAgentAdapter,d as CursorAdapter,k as PiAdapter,g as RuleMetricMcpAdapter,b as SESSION_EVENT_TYPES,a as SESSION_TOOLS,e as VSCodeCopilotAdapter,u as buildTmuxAttachCommand,t as buildTmuxHasSessionArgs,r as buildTmuxLaunchArgs,s as buildTmuxSendKeysArgs,m as detectTool,o as discoverAllSessions,i as freshCodexState,l as getAdapter,n as getAllProviders,w as getAvailableLaunchers,v as getLauncher,p as getProvider,x as sanitizeBranch,q as sanitizeTmuxName,y as worktreePathFor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c}from"../chunk-
|
|
1
|
+
import{a,b,c}from"../chunk-XAGNGQL3.js";import"../chunk-3AV3GTMP.js";import"../chunk-5VWVQCNR.js";import"../chunk-MHLHLJ5T.js";import"../chunk-XQYAVSUQ.js";import"../chunk-PZNWH4VQ.js";import"../chunk-ZLLER3HP.js";export{c as _resetRefreshAttempt,b as bootstrapActiveOrg,a as maybeRefreshActiveOrg};
|
package/dist/lib/agent-loop.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e}from"../chunk-43TRZXJP.js";import"../chunk-5U5SHJJA.js";import"../chunk-IEQDLURA.js";import"../chunk-KINIFUZQ.js";import"../chunk-QRKMRG6W.js";import"../chunk-D7L7IMJQ.js";import"../chunk-BQVUZ6VE.js";import"../chunk-QJZ4DMVQ.js";import"../chunk-URUHD4OI.js";import"../chunk-JU5ZNXPK.js";import"../chunk-YGFZ6BLU.js";import"../chunk-BCPIY47G.js";import"../chunk-NLUHMHPM.js";import"../chunk-FTCC4OZ4.js";import"../chunk-WLLIFRRE.js";import"../chunk-RRBFKVCI.js";import"../chunk-ZYGBABMZ.js";import"../chunk-5RBLIVBF.js";import"../chunk-NSO2EBYE.js";import"../chunk-3ZHVP3KE.js";import"../chunk-2C7CFCMM.js";import"../chunk-HOQPVOMF.js";import"../chunk-WSUKOU3X.js";import"../chunk-A6XQSO62.js";import"../chunk-MOJY6S5J.js";import"../chunk-JGJU4JX5.js";import"../chunk-VBGHPAUT.js";import"../chunk-IPNBW7ZW.js";import"../chunk-GQYF2WVE.js";import"../chunk-274MXEKI.js";import"../chunk-ANLPPIMS.js";import"../chunk-AZRGURHR.js";import"../chunk-N2PUNIWM.js";import"../chunk-MJLW5KN2.js";import"../chunk-SW24KZ5C.js";import"../chunk-VCWT5KZL.js";import"../chunk-LELSVLNK.js";import"../chunk-A2JFQUDW.js";import"../chunk-LZPE6424.js";import"../chunk-3UKZJAFS.js";import"../chunk-77FH6UZP.js";import"../chunk-H4VIQHBV.js";import"../chunk-4GM4OEQY.js";import"../chunk-GIRPEMTW.js";import"../chunk-DQYYHX6K.js";import"../chunk-RWQG25JU.js";import"../chunk-3ZHBOILE.js";import"../chunk-PIVEJTNF.js";import"../chunk-BOYWPUV2.js";import"../chunk-ENW5SUQJ.js";import"../chunk-C3XWDYZJ.js";import"../chunk-CAQLSYOK.js";import"../chunk-RQBN7WNS.js";import"../chunk-ZJABRHIP.js";import"../chunk-XFOG2PDJ.js";import"../chunk-SIGZEQ3K.js";import"../chunk-AZWY2DOT.js";import"../chunk-LJRE3LZ2.js";import"../chunk-FD53AP7T.js";import"../chunk-DOEPIICK.js";import"../chunk-VNGJRYBD.js";import"../chunk-FLXWL4F4.js";import"../chunk-YT25HLWB.js";import"../chunk-6UEFCMR2.js";import"../chunk-MODXEGCU.js";import"../chunk-RBSEE2Z6.js";import"../chunk-TL57YUJV.js";import"../chunk-ICLAHFKK.js";import"../chunk-M7QSC64D.js";import"../chunk-DZRBB34J.js";import"../chunk-KR32Y5Q5.js";import"../chunk-HBJMELKB.js";import"../chunk-GYKYJJNF.js";import"../chunk-G7V4ZZZ3.js";import"../chunk-AHLVY52I.js";import"../chunk-ULFSGFT2.js";import"../chunk-55HFAX5Y.js";import"../chunk-GWQ24FQP.js";import"../chunk-PPAHIVG5.js";import"../chunk-CT7FWSIU.js";import"../chunk-5MXZJWQS.js";import"../chunk-N7ODX6PO.js";import"../chunk-OZQNSELV.js";import"../chunk-HFGO5762.js";import"../chunk-VS5ROGDP.js";import"../chunk-UGA2NFRG.js";import"../chunk-VZYNZS5U.js";import"../chunk-U2NT5OSQ.js";import"../chunk-KGURGIZ2.js";import"../chunk-GYNZ3OZF.js";import"../chunk-UPFH72PF.js";import"../chunk-U6AASXY3.js";import"../chunk-CDY7TQFZ.js";import"../chunk-KFNFLMUR.js";import"../chunk-LARY6ZFT.js";import"../chunk-JP6ULOEX.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"../chunk-MHLHLJ5T.js";import"../chunk-XQYAVSUQ.js";import"../chunk-PZNWH4VQ.js";import"../chunk-ZLLER3HP.js";export{b as CAPABILITIES,a as HANDLERS,c as availableCapabilities,d as pollForWork,e as runAgentLoop};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-RWQG25JU.js";import"../chunk-3ZHBOILE.js";import"../chunk-PIVEJTNF.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{a as startPresenceHeartbeat};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g}from"../chunk-HNPC5U3C.js";import"../chunk-5VWVQCNR.js";import"../chunk-MHLHLJ5T.js";import"../chunk-XQYAVSUQ.js";import"../chunk-PZNWH4VQ.js";import"../chunk-ZLLER3HP.js";export{d as classifyRecord,e as emitRecordsAsEvents,c as extractUserPrompt,b as findMaxStepIndex,a as readNewRecords,g as stateApi,f as tailAntigravityTranscript};
|
package/dist/lib/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i}from"../chunk-5VWVQCNR.js";import"../chunk-MHLHLJ5T.js";import"../chunk-XQYAVSUQ.js";import"../chunk-PZNWH4VQ.js";import"../chunk-ZLLER3HP.js";export{b as ApiError,a as DEFAULT_API_URL,d as api,i as apiDelete,e as apiGet,h as apiPatch,f as apiPost,g as apiPut,c as getBaseUrl};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-JCZOEIL7.js";import"../chunk-5LTJNYCP.js";import"../chunk-5VWVQCNR.js";import"../chunk-MHLHLJ5T.js";import"../chunk-XQYAVSUQ.js";import"../chunk-PZNWH4VQ.js";import"../chunk-ZLLER3HP.js";export{a as ensureDeviceApiKey};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-3EZZGA72.js";import"../chunk-5VWVQCNR.js";import"../chunk-MHLHLJ5T.js";import"../chunk-XQYAVSUQ.js";import"../chunk-PZNWH4VQ.js";import"../chunk-ZLLER3HP.js";export{a as ensureFreshToken};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c}from"../chunk-
|
|
1
|
+
import{a,b,c}from"../chunk-7N55TWYQ.js";import"../chunk-KFNFLMUR.js";import"../chunk-5VWVQCNR.js";import"../chunk-MHLHLJ5T.js";import"../chunk-XQYAVSUQ.js";import"../chunk-PZNWH4VQ.js";import"../chunk-ZLLER3HP.js";export{b as aggregateBenchmark,c as postBenchmark,a as summarizeRuns};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i}from"../chunk-ULFSGFT2.js";import"../chunk-UGA2NFRG.js";import"../chunk-VZYNZS5U.js";import"../chunk-U2NT5OSQ.js";import"../chunk-KGURGIZ2.js";import"../chunk-GYNZ3OZF.js";import"../chunk-UPFH72PF.js";import"../chunk-U6AASXY3.js";import"../chunk-CDY7TQFZ.js";import"../chunk-LARY6ZFT.js";import"../chunk-JP6ULOEX.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"../chunk-MHLHLJ5T.js";import"../chunk-XQYAVSUQ.js";import"../chunk-PZNWH4VQ.js";import"../chunk-ZLLER3HP.js";export{a as CANDIDATE_ARM,b as PRIOR_VERSION_ARM,f as accountForFailures,g as attributeShortfall,h as buildCandidateQueue,d as measurementBatchKey,c as observedExecutionKey,e as pairCandidateRuns,i as runCandidateBatchAndPost};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../chunk-
|
|
1
|
+
import{a,b}from"../chunk-VNGJRYBD.js";import"../chunk-FLXWL4F4.js";import"../chunk-55HFAX5Y.js";import"../chunk-GWQ24FQP.js";import"../chunk-PPAHIVG5.js";import"../chunk-CT7FWSIU.js";import"../chunk-5MXZJWQS.js";import"../chunk-N7ODX6PO.js";import"../chunk-LARY6ZFT.js";import"../chunk-JP6ULOEX.js";import"../chunk-SVZYRGO5.js";import"../chunk-WULEBQPI.js";import"../chunk-GPBN4ROE.js";import"../chunk-6XTLP2G7.js";import"../chunk-PJ3WHQ67.js";import"../chunk-XQYAVSUQ.js";import"../chunk-ZLLER3HP.js";export{a as buildFeedbackBlock,b as generateEvalCases};
|