@rulemetric/cli 0.7.44 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -0
- package/dist/base-command.js +1 -1
- package/dist/{chunk-4Q72B377.js → chunk-2B7Y6JNB.js} +1 -1
- package/dist/{chunk-Z2MZOQCD.js → chunk-3AZV7ZPJ.js} +1 -1
- package/dist/chunk-3DGL2ZY3.js +1 -0
- package/dist/chunk-3PUOJ6F2.js +45 -0
- package/dist/{chunk-QFVGUZDO.js → chunk-4PWGV2OW.js} +9 -8
- package/dist/{chunk-5ZACMVV3.js → chunk-5EDINFHF.js} +1 -1
- package/dist/{chunk-FAXV5AAG.js → chunk-6M74HH6Y.js} +1 -1
- package/dist/chunk-7FZB65VH.js +1 -0
- package/dist/{chunk-4VZLIGMS.js → chunk-AFYZYXQ3.js} +1 -1
- package/dist/{chunk-TU2AR6XO.js → chunk-B22HYCBV.js} +1 -1
- package/dist/{chunk-RJLAAKEN.js → chunk-BPP7AEFW.js} +1 -1
- package/dist/{chunk-MOAJLSYV.js → chunk-C2275MFP.js} +1 -1
- package/dist/{chunk-T4ZIK6RS.js → chunk-CBUTNIJA.js} +1 -1
- package/dist/{chunk-ULMEKK7C.js → chunk-CDDICCY2.js} +1 -1
- package/dist/chunk-DZ3FBQYD.js +17 -0
- package/dist/{chunk-5KD2N2MH.js → chunk-E2NVNLFD.js} +1 -1
- package/dist/{chunk-NIRD7ETU.js → chunk-EQHKCGSX.js} +1 -1
- package/dist/chunk-FP6QAPNK.js +1 -0
- package/dist/chunk-FWTYR36W.js +1 -0
- package/dist/chunk-G7V4ZZZ3.js +1 -0
- package/dist/chunk-GF76D2DU.js +1 -0
- package/dist/chunk-HOQPVOMF.js +2 -0
- package/dist/{chunk-ATA4J4ZG.js → chunk-HYDGERWD.js} +1 -1
- package/dist/chunk-IVDTORX5.js +1 -0
- package/dist/{chunk-4L2ZEIRE.js → chunk-JPUH3V67.js} +1 -1
- package/dist/chunk-K4B24SMJ.js +1 -0
- package/dist/chunk-KGURGIZ2.js +1 -0
- package/dist/{chunk-2DXBC2JQ.js → chunk-KHWG7ZG4.js} +1 -1
- package/dist/{chunk-KGQ5W54Y.js → chunk-KWNIKGAE.js} +1 -1
- package/dist/{chunk-H7VP4SDO.js → chunk-L54TWWBY.js} +1 -1
- package/dist/{chunk-5XUN743A.js → chunk-LLIHRQPH.js} +1 -1
- package/dist/chunk-MMPZIZYZ.js +10 -0
- package/dist/chunk-MO57LGGK.js +1 -0
- package/dist/{chunk-LLNQZ4SZ.js → chunk-PKLXZYBY.js} +1 -1
- package/dist/{chunk-5RUEROLC.js → chunk-PQN2GAG4.js} +1 -1
- package/dist/chunk-QAV4HW7D.js +1 -0
- package/dist/{chunk-YW3JQKGY.js → chunk-QTZPLAYC.js} +1 -1
- package/dist/chunk-QWPWY3SW.js +1 -0
- package/dist/chunk-R6JXE273.js +13 -0
- package/dist/chunk-RZTVYUX4.js +11 -0
- package/dist/{chunk-HXZM2UHO.js → chunk-S62MK372.js} +1 -1
- package/dist/{chunk-BLCMXTIK.js → chunk-SANYAPBK.js} +1 -1
- package/dist/{chunk-AI6FMGKM.js → chunk-SYTQDPPN.js} +1 -1
- package/dist/chunk-TZA4HAVF.js +1 -0
- package/dist/{chunk-6VKQT2J3.js → chunk-UUZB4IKU.js} +1 -1
- package/dist/{chunk-QY3UKLDE.js → chunk-VA5DPQB4.js} +1 -1
- package/dist/{chunk-AF3ITIZ4.js → chunk-VFYT3SC5.js} +2 -2
- package/dist/{chunk-O2BKBW7Z.js → chunk-WKDXH7NO.js} +1 -1
- package/dist/{chunk-NBTC5FNV.js → chunk-X23L2MF6.js} +1 -1
- package/dist/{chunk-W76EQSEV.js → chunk-X3RTCN6S.js} +1 -1
- package/dist/{chunk-EN43UYBN.js → chunk-X3VL5H24.js} +1 -1
- package/dist/{chunk-YQ56FQEO.js → chunk-XFAFMYIP.js} +1 -1
- package/dist/{chunk-IQCE4VBP.js → chunk-YFQ4FOAS.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/convert.js +1 -1
- package/dist/commands/converters.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 -0
- 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/import.js +1 -1
- package/dist/commands/instructions/create.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 -0
- 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/tail-transcript.js +1 -1
- package/dist/commands/service/install.js +6 -6
- 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 -11
- package/dist/commands/suggestions/auto.js +1 -0
- 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 -0
- package/dist/dashboard/Dashboard.js +1 -1
- package/dist/dashboard/data.js +1 -1
- package/dist/dashboard/launcher/ActiveJobsList.js +1 -1
- package/dist/dashboard/launcher/LauncherOverlay.js +1 -1
- package/dist/dashboard/launcher/NewLaunchForm.js +1 -1
- package/dist/dashboard/launcher/api.js +1 -1
- package/dist/dashboard/launcher/useLaunchJobs.js +1 -1
- package/dist/lib/active-org-refresh.js +1 -1
- package/dist/lib/agent-loop.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-analyzer.js +1 -1
- package/dist/lib/eval-benchmark.js +1 -1
- package/dist/lib/eval-candidate-run.js +1 -1
- package/dist/lib/eval-conversation-handler.js +1 -1
- package/dist/lib/eval-executor.js +1 -1
- package/dist/lib/eval-failure-classifier.js +1 -0
- package/dist/lib/eval-grader.js +1 -1
- package/dist/lib/eval-meta-judge.js +1 -1
- package/dist/lib/eval-quota-gate.js +1 -0
- package/dist/lib/eval-resume.js +1 -0
- package/dist/lib/eval-run-batch.js +1 -1
- package/dist/lib/eval-trigger-tester.js +1 -1
- package/dist/lib/evolution-enrolment.js +1 -0
- package/dist/lib/handlers/cron-auto-accept-suggestions.js +1 -0
- package/dist/lib/handlers/cron-eval-autorun.js +1 -1
- package/dist/lib/handlers/cron-instruction-evolution.js +1 -1
- package/dist/lib/handlers/cron-instruction-training.js +1 -0
- package/dist/lib/handlers/cron-refresh-pricing.js +1 -1
- package/dist/lib/handlers/cron-suggest-instructions.js +1 -1
- package/dist/lib/handlers/distill-memories.js +1 -1
- package/dist/lib/handlers/process-changelog.js +1 -1
- package/dist/lib/handlers/process-conversation.js +1 -1
- package/dist/lib/handlers/process-eval.js +1 -1
- package/dist/lib/handlers/process-insights.js +1 -1
- package/dist/lib/handlers/process-judge-review.js +1 -1
- package/dist/lib/handlers/process-launch.js +1 -1
- package/dist/lib/handlers/process-memory-ab.js +1 -1
- package/dist/lib/handlers/process-run-cleanup.js +1 -1
- package/dist/lib/handlers/process-session-goal.js +1 -1
- package/dist/lib/insights-prompts.js +1 -1
- package/dist/lib/instruction-proposer.js +1 -1
- package/dist/lib/judge-review-runner.js +1 -1
- package/dist/lib/manual-tasks.js +1 -1
- package/dist/lib/project-context.js +1 -0
- package/dist/lib/research-client.js +1 -1
- package/dist/lib/retraction.js +1 -0
- package/dist/lib/setup-steps.js +1 -1
- package/dist/lib/suggestion-accept.js +1 -0
- package/dist/lib/telemetry.js +1 -1
- package/dist/lib/terminal-target-heartbeat.js +1 -1
- package/oclif.manifest.json +237 -1
- package/package.json +9 -5
- package/dist/chunk-2RCWYVEU.js +0 -1
- package/dist/chunk-5R5RGKOW.js +0 -38
- package/dist/chunk-ATL4WZBF.js +0 -1
- package/dist/chunk-DBELYMDA.js +0 -1
- package/dist/chunk-FFI3C3B3.js +0 -1
- package/dist/chunk-HMMO27U4.js +0 -1
- package/dist/chunk-I7QSMY3Z.js +0 -1
- package/dist/chunk-KLEF5D3A.js +0 -1
- package/dist/chunk-O7PSLZO6.js +0 -15
- package/dist/chunk-RMDLJN4L.js +0 -8
- package/dist/chunk-V2IEFHT7.js +0 -1
- package/dist/index.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-CBUTNIJA.js";import"../../chunk-JPUH3V67.js";import"../../chunk-CDY7TQFZ.js";import"../../chunk-XRTZU7IZ.js";import"../../chunk-B3BHB26P.js";import"../../chunk-N7ODX6PO.js";import"../../chunk-PJ3WHQ67.js";import"../../chunk-G5BXZT6F.js";import"../../chunk-TZA4HAVF.js";import"../../chunk-QAV4HW7D.js";import"../../chunk-3PUOJ6F2.js";import"../../chunk-JZ5Z2BRO.js";import"../../chunk-ZLLER3HP.js";export{a as processMemoryAb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-X3RTCN6S.js";import"../../chunk-6QKI756T.js";import"../../chunk-5RBLIVBF.js";import"../../chunk-7DFNBRLY.js";import"../../chunk-N7ODX6PO.js";import"../../chunk-QAV4HW7D.js";import"../../chunk-3PUOJ6F2.js";import"../../chunk-JZ5Z2BRO.js";import"../../chunk-ZLLER3HP.js";export{a as processRunCleanup};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-S62MK372.js";import"../../chunk-B3BHB26P.js";import"../../chunk-N7ODX6PO.js";import"../../chunk-PJ3WHQ67.js";import"../../chunk-QAV4HW7D.js";import"../../chunk-3PUOJ6F2.js";import"../../chunk-JZ5Z2BRO.js";import"../../chunk-ZLLER3HP.js";export{a as processSessionGoal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c}from"../chunk-
|
|
1
|
+
import{a,b,c,d}from"../chunk-4PWGV2OW.js";import"../chunk-ZLLER3HP.js";export{c as AT_A_GLANCE_PROMPT,d as FACET_GENERATION_PROMPT,b as RECOMMENDATION_PROMPTS,a as renderGeneratorMemory};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i}from"../chunk-RZTVYUX4.js";import"../chunk-B3BHB26P.js";import"../chunk-N7ODX6PO.js";import"../chunk-PJ3WHQ67.js";import"../chunk-ZLLER3HP.js";export{a as FILE_CONTENT_BEGIN,b as FILE_CONTENT_END,d as MAX_GROWTH_FACTOR,c as MIN_RETAINED_FRACTION,g as buildProposerData,e as buildProposerSystemPrompt,f as describePriorDecision,h as parseProposalResponse,i as proposeInstructionEdit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d}from"../chunk-
|
|
1
|
+
import{a,b,c,d}from"../chunk-SYTQDPPN.js";import"../chunk-6UEFCMR2.js";import"../chunk-NTKO4H2K.js";import"../chunk-JPUH3V67.js";import"../chunk-CDY7TQFZ.js";import"../chunk-XRTZU7IZ.js";import"../chunk-B3BHB26P.js";import"../chunk-N7ODX6PO.js";import"../chunk-PJ3WHQ67.js";import"../chunk-TZA4HAVF.js";import"../chunk-QAV4HW7D.js";import"../chunk-3PUOJ6F2.js";import"../chunk-JZ5Z2BRO.js";import"../chunk-ZLLER3HP.js";export{c as JudgeReviewSkip,b as llmExpectationIndexes,a as reviewMatchesReviewer,d as runJudgeReviewPass};
|
package/dist/lib/manual-tasks.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as l}from"../chunk-
|
|
1
|
+
import{a as l}from"../chunk-VFYT3SC5.js";import"../chunk-FP6QAPNK.js";import{a as u}from"../chunk-UF6US7VU.js";import{e as g}from"../chunk-3DGL2ZY3.js";import"../chunk-HOQPVOMF.js";import"../chunk-GIRPEMTW.js";import"../chunk-MODXEGCU.js";import"../chunk-B3BHB26P.js";import"../chunk-N7ODX6PO.js";import"../chunk-PJ3WHQ67.js";import{a as i}from"../chunk-GY5IJ4RS.js";import"../chunk-QAV4HW7D.js";import"../chunk-3PUOJ6F2.js";import"../chunk-JZ5Z2BRO.js";import{a as o}from"../chunk-ZLLER3HP.js";var c={cron_check_changelog:o(async(r,e)=>{let s=await l({logger:{info:o(t=>e.logger.info(t),"info"),warn:o(t=>e.logger.warn(t),"warn")}});e.logger.info(`[cron_check_changelog] result: created=${s.createdCount} skipped=${s.skippedCount}`)},"cron_check_changelog"),cron_suggest_instructions:o((r,e)=>g(r,e),"cron_suggest_instructions"),cron_refresh_skills:o((r,e)=>u(r,e),"cron_refresh_skills")},p=i.map(r=>{let e=c[r.name];if(!e)throw new Error(`manual-tasks: no handler registered for "${r.name}"`);return{...r,handler:e}});async function m(r){let e=p.find(n=>n.name===r);if(!e)return{name:r,durationMs:0,ok:!1,error:`Unknown task: ${r}`,logs:[]};let s=[],t={logger:{info:o(n=>s.push({level:"info",message:n}),"info"),warn:o(n=>s.push({level:"warn",message:n}),"warn"),error:o(n=>s.push({level:"error",message:n}),"error")},job:{attempts:0}},a=Date.now();try{return await e.handler({},t),{name:r,durationMs:Date.now()-a,ok:!0,logs:s}}catch(n){return{name:r,durationMs:Date.now()-a,ok:!1,error:n instanceof Error?n.message:String(n),logs:s}}}o(m,"runManualTask");export{p as MANUAL_TASKS,m as runManualTask};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c}from"../chunk-HOQPVOMF.js";import"../chunk-ZLLER3HP.js";export{a as firstProseLine,b as rankDependencies,c as readProjectContext};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../chunk-
|
|
1
|
+
import{a,b}from"../chunk-PKLXZYBY.js";import"../chunk-QAV4HW7D.js";import"../chunk-3PUOJ6F2.js";import"../chunk-JZ5Z2BRO.js";import"../chunk-ZLLER3HP.js";export{a as postObservation,b as postObservations};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e}from"../chunk-R6JXE273.js";import"../chunk-3PUOJ6F2.js";import"../chunk-ZLLER3HP.js";export{e as applyRetraction,a as backupPathFor,c as candidateSkillPaths,b as pathFromContextIdentity,d as planRetraction};
|
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-3AZV7ZPJ.js";import"../chunk-3QXRLIGC.js";import"../chunk-HFGO5762.js";import"../chunk-QWCEZEDO.js";import"../chunk-KKDHD4XA.js";import"../chunk-SZ62CP55.js";import"../chunk-NTKO4H2K.js";import"../chunk-B3BHB26P.js";import"../chunk-N7ODX6PO.js";import"../chunk-PJ3WHQ67.js";import"../chunk-QAV4HW7D.js";import"../chunk-3PUOJ6F2.js";import"../chunk-JZ5Z2BRO.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d}from"../chunk-MMPZIZYZ.js";import"../chunk-QAV4HW7D.js";import"../chunk-3PUOJ6F2.js";import"../chunk-JZ5Z2BRO.js";import"../chunk-ZLLER3HP.js";export{d as acceptSuggestion,a as appendToCLAUDEmd,c as fetchSuggestion,b as removeFromCLAUDEmd};
|
package/dist/lib/telemetry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d}from"../chunk-
|
|
1
|
+
import{a,b,c,d}from"../chunk-UUZB4IKU.js";import"../chunk-QAV4HW7D.js";import"../chunk-3PUOJ6F2.js";import"../chunk-JZ5Z2BRO.js";import"../chunk-ZLLER3HP.js";export{d as emitErrorBeacon,c as emitSetupEvent,b as getDeviceId,a as telemetryDisabled};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c}from"../chunk-
|
|
1
|
+
import{a,b,c}from"../chunk-LLIHRQPH.js";import"../chunk-N7ODX6PO.js";import"../chunk-QAV4HW7D.js";import"../chunk-3PUOJ6F2.js";import"../chunk-JZ5Z2BRO.js";import"../chunk-ZLLER3HP.js";export{a as probeAndReport,b as runOneHeartbeatCycle,c as startTerminalTargetHeartbeat};
|
package/oclif.manifest.json
CHANGED
|
@@ -1161,6 +1161,56 @@
|
|
|
1161
1161
|
"list.js"
|
|
1162
1162
|
]
|
|
1163
1163
|
},
|
|
1164
|
+
"experiments:list": {
|
|
1165
|
+
"aliases": [],
|
|
1166
|
+
"args": {},
|
|
1167
|
+
"description": "Show instructions under randomised test and what each sample supports",
|
|
1168
|
+
"examples": [
|
|
1169
|
+
"<%= config.bin %> experiments list",
|
|
1170
|
+
"<%= config.bin %> experiments list --project /path/to/project",
|
|
1171
|
+
"<%= config.bin %> experiments list --all"
|
|
1172
|
+
],
|
|
1173
|
+
"flags": {
|
|
1174
|
+
"api-url": {
|
|
1175
|
+
"description": "Override API base URL",
|
|
1176
|
+
"env": "RULEMETRIC_API_URL",
|
|
1177
|
+
"hidden": true,
|
|
1178
|
+
"name": "api-url",
|
|
1179
|
+
"hasDynamicHelp": false,
|
|
1180
|
+
"multiple": false,
|
|
1181
|
+
"type": "option"
|
|
1182
|
+
},
|
|
1183
|
+
"project": {
|
|
1184
|
+
"char": "p",
|
|
1185
|
+
"description": "Project path (defaults to current directory)",
|
|
1186
|
+
"name": "project",
|
|
1187
|
+
"hasDynamicHelp": false,
|
|
1188
|
+
"multiple": false,
|
|
1189
|
+
"type": "option"
|
|
1190
|
+
},
|
|
1191
|
+
"all": {
|
|
1192
|
+
"description": "Every project, not just this one",
|
|
1193
|
+
"name": "all",
|
|
1194
|
+
"allowNo": false,
|
|
1195
|
+
"type": "boolean"
|
|
1196
|
+
}
|
|
1197
|
+
},
|
|
1198
|
+
"hasDynamicHelp": false,
|
|
1199
|
+
"hiddenAliases": [],
|
|
1200
|
+
"id": "experiments:list",
|
|
1201
|
+
"pluginAlias": "@rulemetric/cli",
|
|
1202
|
+
"pluginName": "@rulemetric/cli",
|
|
1203
|
+
"pluginType": "core",
|
|
1204
|
+
"strict": true,
|
|
1205
|
+
"enableJsonFlag": false,
|
|
1206
|
+
"isESM": true,
|
|
1207
|
+
"relativePath": [
|
|
1208
|
+
"dist",
|
|
1209
|
+
"commands",
|
|
1210
|
+
"experiments",
|
|
1211
|
+
"list.js"
|
|
1212
|
+
]
|
|
1213
|
+
},
|
|
1164
1214
|
"evals:agent": {
|
|
1165
1215
|
"aliases": [],
|
|
1166
1216
|
"args": {},
|
|
@@ -2557,6 +2607,90 @@
|
|
|
2557
2607
|
"restore.js"
|
|
2558
2608
|
]
|
|
2559
2609
|
},
|
|
2610
|
+
"instructions:retract": {
|
|
2611
|
+
"aliases": [],
|
|
2612
|
+
"args": {
|
|
2613
|
+
"id": {
|
|
2614
|
+
"description": "Instruction ID (omit when using --kind/--target)",
|
|
2615
|
+
"name": "id",
|
|
2616
|
+
"required": false
|
|
2617
|
+
}
|
|
2618
|
+
},
|
|
2619
|
+
"description": "Remove an instruction, skill, hook or MCP server from disk (dry-run by default)",
|
|
2620
|
+
"examples": [
|
|
2621
|
+
"<%= config.bin %> instructions retract <instruction-id>",
|
|
2622
|
+
"<%= config.bin %> instructions retract <instruction-id> --apply",
|
|
2623
|
+
"<%= config.bin %> instructions retract --kind skill --target agent-browser",
|
|
2624
|
+
"<%= config.bin %> instructions retract --kind mcp --target supabase --apply",
|
|
2625
|
+
"<%= config.bin %> instructions retract --kind hook --target \"doomed-tool\" --apply"
|
|
2626
|
+
],
|
|
2627
|
+
"flags": {
|
|
2628
|
+
"api-url": {
|
|
2629
|
+
"description": "Override API base URL",
|
|
2630
|
+
"env": "RULEMETRIC_API_URL",
|
|
2631
|
+
"hidden": true,
|
|
2632
|
+
"name": "api-url",
|
|
2633
|
+
"hasDynamicHelp": false,
|
|
2634
|
+
"multiple": false,
|
|
2635
|
+
"type": "option"
|
|
2636
|
+
},
|
|
2637
|
+
"apply": {
|
|
2638
|
+
"description": "Actually write. Without this, nothing is modified.",
|
|
2639
|
+
"name": "apply",
|
|
2640
|
+
"allowNo": false,
|
|
2641
|
+
"type": "boolean"
|
|
2642
|
+
},
|
|
2643
|
+
"force": {
|
|
2644
|
+
"description": "Proceed without a randomised verdict (observational evidence only)",
|
|
2645
|
+
"name": "force",
|
|
2646
|
+
"allowNo": false,
|
|
2647
|
+
"type": "boolean"
|
|
2648
|
+
},
|
|
2649
|
+
"kind": {
|
|
2650
|
+
"description": "Retract something that is not an instruction row",
|
|
2651
|
+
"name": "kind",
|
|
2652
|
+
"hasDynamicHelp": false,
|
|
2653
|
+
"multiple": false,
|
|
2654
|
+
"options": [
|
|
2655
|
+
"claude-md",
|
|
2656
|
+
"memory",
|
|
2657
|
+
"skill",
|
|
2658
|
+
"hook",
|
|
2659
|
+
"mcp"
|
|
2660
|
+
],
|
|
2661
|
+
"type": "option"
|
|
2662
|
+
},
|
|
2663
|
+
"target": {
|
|
2664
|
+
"description": "File path, skill name, MCP server name, or hook command substring",
|
|
2665
|
+
"name": "target",
|
|
2666
|
+
"hasDynamicHelp": false,
|
|
2667
|
+
"multiple": false,
|
|
2668
|
+
"type": "option"
|
|
2669
|
+
},
|
|
2670
|
+
"heading": {
|
|
2671
|
+
"description": "Markdown heading to remove (defaults to the instruction name)",
|
|
2672
|
+
"name": "heading",
|
|
2673
|
+
"hasDynamicHelp": false,
|
|
2674
|
+
"multiple": false,
|
|
2675
|
+
"type": "option"
|
|
2676
|
+
}
|
|
2677
|
+
},
|
|
2678
|
+
"hasDynamicHelp": false,
|
|
2679
|
+
"hiddenAliases": [],
|
|
2680
|
+
"id": "instructions:retract",
|
|
2681
|
+
"pluginAlias": "@rulemetric/cli",
|
|
2682
|
+
"pluginName": "@rulemetric/cli",
|
|
2683
|
+
"pluginType": "core",
|
|
2684
|
+
"strict": true,
|
|
2685
|
+
"enableJsonFlag": false,
|
|
2686
|
+
"isESM": true,
|
|
2687
|
+
"relativePath": [
|
|
2688
|
+
"dist",
|
|
2689
|
+
"commands",
|
|
2690
|
+
"instructions",
|
|
2691
|
+
"retract.js"
|
|
2692
|
+
]
|
|
2693
|
+
},
|
|
2560
2694
|
"instructions:upstream": {
|
|
2561
2695
|
"aliases": [],
|
|
2562
2696
|
"args": {
|
|
@@ -4539,6 +4673,68 @@
|
|
|
4539
4673
|
"accept.js"
|
|
4540
4674
|
]
|
|
4541
4675
|
},
|
|
4676
|
+
"suggestions:auto": {
|
|
4677
|
+
"aliases": [],
|
|
4678
|
+
"args": {},
|
|
4679
|
+
"description": "Show or change automatic adoption of high-confidence suggestions into CLAUDE.md",
|
|
4680
|
+
"examples": [
|
|
4681
|
+
"<%= config.bin %> suggestions auto",
|
|
4682
|
+
"<%= config.bin %> suggestions auto --off",
|
|
4683
|
+
"<%= config.bin %> suggestions auto --on",
|
|
4684
|
+
"<%= config.bin %> suggestions auto --off --project <project-id>"
|
|
4685
|
+
],
|
|
4686
|
+
"flags": {
|
|
4687
|
+
"api-url": {
|
|
4688
|
+
"description": "Override API base URL",
|
|
4689
|
+
"env": "RULEMETRIC_API_URL",
|
|
4690
|
+
"hidden": true,
|
|
4691
|
+
"name": "api-url",
|
|
4692
|
+
"hasDynamicHelp": false,
|
|
4693
|
+
"multiple": false,
|
|
4694
|
+
"type": "option"
|
|
4695
|
+
},
|
|
4696
|
+
"on": {
|
|
4697
|
+
"description": "Enable automatic adoption",
|
|
4698
|
+
"exclusive": [
|
|
4699
|
+
"off"
|
|
4700
|
+
],
|
|
4701
|
+
"name": "on",
|
|
4702
|
+
"allowNo": false,
|
|
4703
|
+
"type": "boolean"
|
|
4704
|
+
},
|
|
4705
|
+
"off": {
|
|
4706
|
+
"description": "Disable automatic adoption",
|
|
4707
|
+
"exclusive": [
|
|
4708
|
+
"on"
|
|
4709
|
+
],
|
|
4710
|
+
"name": "off",
|
|
4711
|
+
"allowNo": false,
|
|
4712
|
+
"type": "boolean"
|
|
4713
|
+
},
|
|
4714
|
+
"project": {
|
|
4715
|
+
"description": "Apply to one project only (overrides the account default)",
|
|
4716
|
+
"name": "project",
|
|
4717
|
+
"hasDynamicHelp": false,
|
|
4718
|
+
"multiple": false,
|
|
4719
|
+
"type": "option"
|
|
4720
|
+
}
|
|
4721
|
+
},
|
|
4722
|
+
"hasDynamicHelp": false,
|
|
4723
|
+
"hiddenAliases": [],
|
|
4724
|
+
"id": "suggestions:auto",
|
|
4725
|
+
"pluginAlias": "@rulemetric/cli",
|
|
4726
|
+
"pluginName": "@rulemetric/cli",
|
|
4727
|
+
"pluginType": "core",
|
|
4728
|
+
"strict": true,
|
|
4729
|
+
"enableJsonFlag": false,
|
|
4730
|
+
"isESM": true,
|
|
4731
|
+
"relativePath": [
|
|
4732
|
+
"dist",
|
|
4733
|
+
"commands",
|
|
4734
|
+
"suggestions",
|
|
4735
|
+
"auto.js"
|
|
4736
|
+
]
|
|
4737
|
+
},
|
|
4542
4738
|
"suggestions:dismiss": {
|
|
4543
4739
|
"aliases": [],
|
|
4544
4740
|
"args": {
|
|
@@ -4655,7 +4851,47 @@
|
|
|
4655
4851
|
"suggestions",
|
|
4656
4852
|
"refresh.js"
|
|
4657
4853
|
]
|
|
4854
|
+
},
|
|
4855
|
+
"suggestions:undo": {
|
|
4856
|
+
"aliases": [],
|
|
4857
|
+
"args": {
|
|
4858
|
+
"instructionId": {
|
|
4859
|
+
"description": "Instruction ID from the rulemetric:start marker in CLAUDE.md",
|
|
4860
|
+
"name": "instructionId",
|
|
4861
|
+
"required": true
|
|
4862
|
+
}
|
|
4863
|
+
},
|
|
4864
|
+
"description": "Remove an adopted instruction from CLAUDE.md and stop it being re-proposed",
|
|
4865
|
+
"examples": [
|
|
4866
|
+
"<%= config.bin %> suggestions undo <instruction-id>"
|
|
4867
|
+
],
|
|
4868
|
+
"flags": {
|
|
4869
|
+
"api-url": {
|
|
4870
|
+
"description": "Override API base URL",
|
|
4871
|
+
"env": "RULEMETRIC_API_URL",
|
|
4872
|
+
"hidden": true,
|
|
4873
|
+
"name": "api-url",
|
|
4874
|
+
"hasDynamicHelp": false,
|
|
4875
|
+
"multiple": false,
|
|
4876
|
+
"type": "option"
|
|
4877
|
+
}
|
|
4878
|
+
},
|
|
4879
|
+
"hasDynamicHelp": false,
|
|
4880
|
+
"hiddenAliases": [],
|
|
4881
|
+
"id": "suggestions:undo",
|
|
4882
|
+
"pluginAlias": "@rulemetric/cli",
|
|
4883
|
+
"pluginName": "@rulemetric/cli",
|
|
4884
|
+
"pluginType": "core",
|
|
4885
|
+
"strict": true,
|
|
4886
|
+
"enableJsonFlag": false,
|
|
4887
|
+
"isESM": true,
|
|
4888
|
+
"relativePath": [
|
|
4889
|
+
"dist",
|
|
4890
|
+
"commands",
|
|
4891
|
+
"suggestions",
|
|
4892
|
+
"undo.js"
|
|
4893
|
+
]
|
|
4658
4894
|
}
|
|
4659
4895
|
},
|
|
4660
|
-
"version": "0.
|
|
4896
|
+
"version": "0.9.0"
|
|
4661
4897
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rulemetric/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -50,6 +50,9 @@
|
|
|
50
50
|
},
|
|
51
51
|
"capture": {
|
|
52
52
|
"description": "Control what the worker captures"
|
|
53
|
+
},
|
|
54
|
+
"experiments": {
|
|
55
|
+
"description": "Instructions under randomised test and their verdicts"
|
|
53
56
|
}
|
|
54
57
|
}
|
|
55
58
|
},
|
|
@@ -77,9 +80,9 @@
|
|
|
77
80
|
"postgres": "^3.4.0",
|
|
78
81
|
"react": "^19.0.0",
|
|
79
82
|
"zod": "^3.24.0",
|
|
80
|
-
"@rulemetric/
|
|
81
|
-
"@rulemetric/
|
|
82
|
-
"@rulemetric/
|
|
83
|
+
"@rulemetric/hooks": "0.9.0",
|
|
84
|
+
"@rulemetric/skills-registry": "0.9.0",
|
|
85
|
+
"@rulemetric/proxy": "0.9.0"
|
|
83
86
|
},
|
|
84
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.",
|
|
85
88
|
"optionalDependencies": {
|
|
@@ -98,8 +101,8 @@
|
|
|
98
101
|
"typescript": "^5.9.0",
|
|
99
102
|
"vitest": "^3.2.0",
|
|
100
103
|
"@rulemetric/api": "0.0.1",
|
|
101
|
-
"@rulemetric/core": "0.0.1",
|
|
102
104
|
"@rulemetric/db": "0.0.1",
|
|
105
|
+
"@rulemetric/core": "0.0.1",
|
|
103
106
|
"@rulemetric/effectiveness": "0.0.1",
|
|
104
107
|
"@rulemetric/email": "0.0.1",
|
|
105
108
|
"@rulemetric/session": "0.2.1",
|
|
@@ -112,6 +115,7 @@
|
|
|
112
115
|
"test": "vitest run",
|
|
113
116
|
"test:e2e": "vitest run --config vitest.e2e.config.ts",
|
|
114
117
|
"test:unit": "vitest run --config vitest.config.ts",
|
|
118
|
+
"mutation-audit": "node scripts/mutation-audit.mjs",
|
|
115
119
|
"type-check": "tsc --noEmit",
|
|
116
120
|
"postbuild": "oclif manifest",
|
|
117
121
|
"worker:restart": "pnpm build && launchctl unload ~/Library/LaunchAgents/com.rulemetric.worker.plist 2>/dev/null; launchctl load ~/Library/LaunchAgents/com.rulemetric.worker.plist && echo 'worker restarted with fresh dist'"
|
package/dist/chunk-2RCWYVEU.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as Z}from"./chunk-RMDLJN4L.js";import{b as B,i as V,j as X,k as J,l as Y,m as z,n as K}from"./chunk-BL4BN6RU.js";import{e as Q}from"./chunk-DBELYMDA.js";import{d as G,e as S,f as W}from"./chunk-G5BXZT6F.js";import{e as $,f as q}from"./chunk-KLEF5D3A.js";import{a as c}from"./chunk-ZLLER3HP.js";import{createHash as ie}from"node:crypto";var _=c(e=>ie("sha256").update(e).digest("hex"),"sha256"),ee=1.3,H=4,le=20;function ue(e,r){if(!e.configured||r<=0)return H;let n=Math.ceil(e.minPairs*ee/r);return Math.min(le,Math.max(H,n))}c(ue,"passCapFor");function ce(e,r=10,n=H){if(e<=0)return{passes:0,expectedPairs:0,feasible:!1,reason:"no live cases"};let s=Math.ceil(r*ee),t=Math.min(n,Math.ceil(s/e)),a=t*e;return a<r?{passes:t,expectedPairs:a,feasible:!1,reason:`${e} live case(s) x ${n} passes = ${e*n} pairs at best, below the ${r} a controlled verdict requires \u2014 add cases rather than replaying these`}:{passes:t,expectedPairs:a,feasible:!0}}c(ce,"planPasses");var pe=60,de=c(e=>typeof e=="object"&&e!==null&&typeof e.withScore=="number"&&typeof e.withoutScore=="number","isPair");function ge(e,r,n){let s=[...e].sort((t,a)=>Date.parse(a.createdAt)-Date.parse(t.createdAt));for(let t of s){if(t.applied)continue;let a=t.gates?.accumulation;if(!a||typeof a!="object"||a.priorContentHash!==r||a.targetPairs!==n||typeof a.candidateContentHash!="string"||!Array.isArray(a.pairs))continue;let p=a.pairs.filter(de);if(p.length===a.pairs.length&&!(p.length>=n))return{promotionId:t.id,candidateContentHash:a.candidateContentHash,pairs:p,runs:typeof a.runs=="number"?a.runs:1}}return null}c(ge,"findOpenAccumulation");function me(e,r){let n=r.accumulate??(e.autoEvolveAccumulate===!0||e.autoEvolveAccumulate==="true"),s=r.accumulateTargetPairs??e.autoEvolveAccumulateTarget,t=typeof s=="string"?Number.parseInt(s,10):s,a=typeof t=="number"&&Number.isInteger(t)&&t>0?t:pe;return{enabled:n,targetPairs:a}}c(me,"readAccumulateConfig");function fe(e){let r=e.accumulateEnabled&&e.pairCount<e.targetPairs;return{apply:e.consented&&!r,peeking:r}}c(fe,"resolveApply");async function Ae(e,r){let n=c(o=>r?.logger?.info?.(o)??console.log(o),"log"),{evalTargetId:s}=e,t=`[cron_instruction_evolution] ${s}`,a=await $(`/api/eval-targets/${s}`),p=a.metadata??{};if(X(p))return n(`${t}: PAUSED (metadata.autoEvolvePaused) \u2014 no model budget spent. Opt-in is intact.`),{skipped:"paused"};let y=be(p);if(y==null)return n(`${t}: refusing \u2014 metadata.immutableSections is unset. Set it (use [] to explicitly protect nothing) before letting the loop edit this target unattended.`),{skipped:"immutable-sections-unset"};let f=(await $(`/api/eval-targets/${s}/evals`)).filter(o=>!o.retiredAt);if(f.length===0)return{skipped:"no-live-cases"};let R=V(p);R.note&&n(`${t}: ${R.note}`);let d=ce(f.length,R.minPairs,ue(R,f.length));if(!d.feasible)return n(`${t}: cannot reach a sufficient verdict \u2014 ${d.reason}`),{skipped:"cannot-reach-min-n",reason:d.reason};let te=J({liveCases:f.length,passes:d.passes});n(`${t}: budget for this run \u2014 ${K(te)}`);let E=await $(`/api/eval-targets/${s}/judge-calibration`);if(!E.powerCheck.adequate){let o=(E.powerCheck.reasons??[]).join("; ");return n(`${t}: not adequately powered, skipping before spending budget \u2014 ${o}`),{skipped:"not-adequate",reason:o}}let M=W,ne=Date.now()-M*24*60*60*1e3,T=await $(`/api/eval-targets/${s}/promotions?limit=200`),O=T.promotions.filter(o=>o.applied&&Date.parse(o.createdAt)>=ne).length;if(O>=S)return n(`${t}: change budget looks exhausted (${O}/${S} applied in ${M}d), skipping before spending budget`),{skipped:"budget-exhausted"};let A=G();if(!A.green)return n(`${t}: A/A canary is RED \u2014 halting. ${A.failures.join(" | ")}`),{skipped:"canary-red",reason:A.failures.join(" | ")};let L=a.content,k=_(L),l=me(p,e),b=l.enabled?ge(T.promotions,k,l.targetPairs):null,v,x,w=[],C=0,N=B;if(b){let o=await $(`/api/promotions/${b.promotionId}`);if(_(o.toContent)!==b.candidateContentHash)return n(`${t}: stored candidate does not match its recorded hash \u2014 refusing to continue`),{skipped:"accumulation-hash-mismatch",reason:b.promotionId};v=o.toContent,x=o.proposalRationale??"",w=b.pairs,C=b.runs,N=0,n(`${t}: continuing accumulation ${b.promotionId} \u2014 ${w.length}/${l.targetPairs} pair(s) carried from ${C} prior run(s)`)}else{let o=E.caseDiscrimination?.cases??[],u=await Z({currentContent:a.content,targetType:a.type,targetName:a.name,immutableSections:y,evidence:{nonDiscriminating:o.filter(i=>!i.discriminating).map(i=>`${i.name??i.assertion??"unnamed"} \u2014 ${i.note}`),weakest:o.filter(i=>i.discriminating&&i.withPassRate<i.withoutPassRate).map(i=>({name:i.name??i.assertion??"unnamed",withPassRate:i.withPassRate,withoutPassRate:i.withoutPassRate})),notes:[]}});if(!u.ok)return n(`${t}: no usable proposal \u2014 ${u.reason}`),{skipped:"no-proposal",reason:u.reason};v=u.proposal.candidateContent,x=u.proposal.rationale}n(`${t}: measuring ${f.length} case(s) x ${d.passes} pass(es) = up to ${d.expectedPairs} pairs, candidate vs prior version`);let h=[],j=[],ae=Date.now(),U=0,I=0;for(let o=1;o<=d.passes;o++){let u=await Q({cases:f,candidateContent:v,priorVersionContent:L,concurrency:e.concurrency??2,runNumber:o,opts:{targetId:s,targetVersion:a.version??1,iteration:1,timeout:e.timeout??24e4,model:e.model,graderModel:e.graderModel,skipGrading:!1,targetType:a.type,targetName:a.name},onLog:n});h.push(...u.pairs),j.push(...u.results),U+=u.completed,I+=u.failed,n(`${t}: pass ${o}/${d.passes} \u2014 ${u.pairs.length} pair(s), running total ${h.length}`)}let P=[...w,...h],D=h.length>0,g=Y({runs:j,plannedPairs:d.expectedPairs,usablePairs:h.length,verdictPairs:D?P.length:h.length,proposalCalls:N,passes:d.passes,liveCases:f.length,wallMs:Date.now()-ae});if(n(`${t}: ${U} completed, ${I} failed, ${h.length} usable pair(s) \u2014 spent ~${g.modelCalls} model calls (${g.proposalCalls} proposal + ${g.executorCalls} executor + >=${g.graderCalls} grader) in ${(g.wallMs/6e4).toFixed(1)} min`+(D?`; the ${g.verdictPairs} pair(s) behind this verdict resolve +/-${z(g.mde)} at 80% power`:"")),!D)return{skipped:"no-pairs",reason:`${I} run(s) failed or were ungradeable`,cost:g};l.enabled&&n(`${t}: accumulated ${P.length}/${l.targetPairs} pair(s) over ${C+1} run(s) on one candidate`);let F=e.apply??(p.autoEvolveApply===!0||p.autoEvolveApply==="true"),{apply:oe,peeking:re}=fe({consented:F,accumulateEnabled:l.enabled,pairCount:P.length,targetPairs:l.targetPairs});F&&re&&n(`${t}: interim readout at ${P.length}/${l.targetPairs} pairs \u2014 recording the decision but not acting until the target is reached`);let m=await q(`/api/eval-targets/${s}/promotions`,{candidateContent:v,proposalSource:"llm",proposalRationale:x,pairs:P,canaryGreen:A.green,measuredAgainstContentHash:k,immutableSections:y,apply:oe,measurementCost:g,...l.enabled?{accumulation:{candidateContentHash:_(v),priorContentHash:k,targetPairs:l.targetPairs,carriedPairs:w.length,runs:C+1}}:{}});return n(`${t}: ${m.decision}${m.applied?" (APPLIED)":""} \u2014 ${m.rationale}`+(m.refusals.length>0?` | refusals: ${m.refusals.join("; ")}`:"")),{decision:m.decision,applied:m.applied,nPairs:P.length,promotionId:m.id,cost:g,...l.enabled?{carriedPairs:w.length,accumulationRuns:C+1}:{}}}c(Ae,"cronInstructionEvolution");function be(e){let r=e.immutableSections;return r==null||!Array.isArray(r)?null:r.filter(n=>typeof n=="string")}c(be,"readImmutableSections");export{ee as a,H as b,le as c,ue as d,ce as e,pe as f,ge as g,me as h,fe as i,Ae as j,be as k};
|
package/dist/chunk-5R5RGKOW.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./chunk-ZLLER3HP.js";function b(n){if(!n||typeof n!="object")return n;let c=n,r=c.project_areas;if(r!==void 0&&!Array.isArray(r)){let o=r&&typeof r=="object"?r.areas:void 0;c.project_areas=Array.isArray(o)?o:void 0}return n}e(b,"normalizeRecommendations");import{z as s}from"zod";var w=["org","team","project","personal"],v=s.object({name:s.string().min(1),description:s.string().min(1),type:s.literal("instruction").default("instruction"),scope:s.enum(w),version:s.string().min(1),tags:s.array(s.string()).optional(),compatibility:s.array(s.string()).optional(),slots:s.record(s.string(),s.string()).optional(),metadata:s.record(s.string(),s.unknown()).optional()});import{z as a}from"zod";var y=a.object({name:a.string().min(1),description:a.string().min(1),type:a.literal("prompt"),version:a.string().min(1),tags:a.array(a.string()).optional(),variables:a.array(a.string()).optional(),metadata:a.record(a.string(),a.unknown()).optional()});function f(n,c){let r=c.map(o=>`- ID: ${o.id}
|
|
2
|
-
Name: ${o.name}
|
|
3
|
-
Description: ${o.description}
|
|
4
|
-
Tags: ${o.tags.join(", ")}
|
|
5
|
-
Preview: ${o.contentPreview}`).join(`
|
|
6
|
-
|
|
7
|
-
`);return`You are an expert at matching AI coding instructions to software projects.
|
|
8
|
-
|
|
9
|
-
## Project
|
|
10
|
-
- Name: ${n.name}
|
|
11
|
-
- Description: ${n.description??"No description"}
|
|
12
|
-
- Languages: ${n.languages.join(", ")||"Unknown"}
|
|
13
|
-
- Topics: ${n.topics.join(", ")||"None"}
|
|
14
|
-
- Dependencies: ${n.dependencies.join(", ")||"None"}
|
|
15
|
-
|
|
16
|
-
## Available Instructions
|
|
17
|
-
|
|
18
|
-
${r}
|
|
19
|
-
|
|
20
|
-
## Task
|
|
21
|
-
|
|
22
|
-
Analyze the project and recommend which instructions would be most useful. Consider:
|
|
23
|
-
1. Language and framework alignment
|
|
24
|
-
2. Project purpose and what standards/practices would help
|
|
25
|
-
3. Security, testing, and quality needs based on the project type
|
|
26
|
-
|
|
27
|
-
Return your response as JSON in this exact format:
|
|
28
|
-
{
|
|
29
|
-
"recommendations": [
|
|
30
|
-
{ "instructionId": "<id>", "score": <0.0-1.0>, "reason": "<one sentence explanation>" }
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
Only include instructions with a relevance score >= 0.5. Order by score descending. Return valid JSON only, no markdown fences.`}e(f,"buildRecommendationPrompt");var x=32e3,T={name:"x".repeat(64),description:"x".repeat(256),languages:["TypeScript","Python","Go"],topics:["x".repeat(32)],dependencies:["x".repeat(32)]};function _(n,c={}){if(n.length===0)return[];let r=c.charBudget??x,o=f(T,[]).length,l=[],i=[],d=0;for(let u of n){let p=k(u);i.length>0&&o+d+p>r&&(l.push(i),i=[],d=0),i.push(u),d+=p}return i.length>0&&l.push(i),l}e(_,"batchCandidatesForPrompt");function k(n){return`- ID: ${n.id}
|
|
35
|
-
Name: ${n.name}
|
|
36
|
-
Description: ${n.description}
|
|
37
|
-
Tags: ${n.tags.join(", ")}
|
|
38
|
-
Preview: ${n.contentPreview}`.length+2}e(k,"renderedSize");var C=["Added","Changed","Fixed","Removed","Deprecated","Security"],S=/^##\s+\[([^\]]+)\](?:\s*[-–]\s*(\d{4}-\d{2}-\d{2}))?\s*$/,I=/^###\s+(.+?)\s*$/,P=/^[-*]\s+(.*\S)\s*$/,L=/^ {2,}(\S.*)$/;function O(n){let c=n.split(/\r?\n/),r=[],o=null,l=null,i=null;for(let d of c){let u=d.match(S);if(u){o&&r.push(o);let m=u[1].trim();o={version:m,date:u[2]??null,unreleased:m.toLowerCase()==="unreleased",sections:{}},l=null,i=null;continue}if(!o)continue;let p=d.match(I);if(p){let m=p[1].trim();C.includes(m)?(l=m,o.sections[l]||(o.sections[l]=[]),i=o.sections[l]):(l=null,i=null);continue}if(!l||!i)continue;let h=d.match(P);if(h){i.push(h[1]);continue}let g=d.match(L);if(g&&i.length>0){i[i.length-1]+=" "+g[1].trim();continue}}return o&&r.push(o),{entries:r}}e(O,"parseChangelog");function j(n){return n.entries.filter(c=>c.unreleased?!1:Object.values(c.sections).some(r=>r&&r.length>0))}e(j,"announceableEntries");import ue from"gray-matter";import{z as R}from"zod";var he=R.object({type:R.enum(["instruction","prompt"])});export{b as a,f as b,_ as c,O as d,j as e};
|
package/dist/chunk-ATL4WZBF.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as $}from"./chunk-L2CFSMBC.js";import{a as v}from"./chunk-4L2ZEIRE.js";import{c as f}from"./chunk-HMMO27U4.js";import{f as p}from"./chunk-KLEF5D3A.js";import{a as m}from"./chunk-ZLLER3HP.js";async function x(c,e,s=()=>{}){let{eval_:r,configuration:i,targetContent:g,runNumber:o}=c;s(`[${i}] ${r.name} run#${o} \u2014 executing...`);let n=$({targetType:e.targetType,targetContent:g,targetName:e.targetName}),d={methodology:n.methodology,delivery:n.delivery,isolated:n.isWorktree,...n.leakedFiles.length?{leakedFiles:n.leakedFiles}:{}};n.isWorktree||s(`[${i}] ${r.name} run#${o} \u2014 \u26A0 no git worktree; running without repo context`),n.leakedFiles.length&&s(`[${i}] ${r.name} run#${o} \u2014 \u26A0 CONTAMINATED: ${n.leakedFiles.join(", ")} survived the strip`);try{let a=await f({prompt:r.prompt,targetContent:n.systemPrompt,workDir:n.workDir,timeout:e.timeout,model:e.model});if(a.error)return s(`[${i}] ${r.name} run#${o} \u2014 FAILED: ${a.error}`),{evalId:r.id,evalTargetId:e.targetId,evalTargetVersion:e.targetVersion,configuration:i,runNumber:o,iteration:e.iteration,status:"failed",outputs:{error:a.error,...d},timing:{duration_ms:a.durationMs,total_tokens:a.totalTokens},grading:{}};s(`[${i}] ${r.name} run#${o} \u2014 completed in ${(a.durationMs/1e3).toFixed(1)}s`);let u={};if(!e.skipGrading&&r.expectations.length>0){s(`[${i}] ${r.name} run#${o} \u2014 grading...`);let t=await v({prompt:r.prompt,output:a.output,expectations:r.expectations,model:e.graderModel??e.model,timeout:e.timeout});u=t,s(`[${i}] ${r.name} run#${o} \u2014 grading done: pass_rate=${t.summary.pass_rate==null?"n/a (all assertions errored)":`${(t.summary.pass_rate*100).toFixed(0)}%`}`)}return{evalId:r.id,evalTargetId:e.targetId,evalTargetVersion:e.targetVersion,configuration:i,runNumber:o,iteration:e.iteration,status:"completed",outputs:{transcript:a.output,...d},timing:{duration_ms:a.durationMs,total_tokens:a.totalTokens,total_duration_seconds:a.durationMs/1e3},grading:u}}finally{n.cleanup()}}m(x,"executeAndGradeCase");async function _(c){let{cases:e,targetContent:s,concurrency:r,runNumber:i,opts:g,skipBaseline:o,onLog:n=m(()=>{},"onLog")}=c,d=o?["with_target"]:["with_target","without_target"],a=[];for(let t of e)for(let l of d)a.push({eval_:t,configuration:l,targetContent:l==="with_target"?s:void 0,runNumber:i});let u=[];for(let t=0;t<a.length;t+=Math.max(1,r)){let l=a.slice(t,t+Math.max(1,r)),k=await Promise.all(l.map(b=>x(b,g,n)));u.push(...k)}for(let t of u)try{await p("/api/eval-runs",t)}catch(l){n(` \u26A0 failed to post a run result: ${l instanceof Error?l.message:String(l)}`)}try{await p(`/api/eval-targets/${g.targetId}/label-state`,{})}catch(t){n(` \u26A0 label-state notification skipped: ${t instanceof Error?t.message:String(t)}`)}return{completed:u.filter(t=>t.status==="completed").length,failed:u.filter(t=>t.status==="failed").length,results:u}}m(_,"runBatchAndPost");export{x as a,_ as b};
|
package/dist/chunk-DBELYMDA.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as h}from"./chunk-ATL4WZBF.js";import{f as C}from"./chunk-KLEF5D3A.js";import{a as l}from"./chunk-ZLLER3HP.js";var R="with_candidate",b="with_prior_version";function y(n){let r=n.filter(e=>e.configuration===R),i=[];for(let e of r){let o=n.find(s=>s.configuration===b&&s.evalId===e.evalId&&s.runNumber===e.runNumber);if(!o)continue;let a=v(e),d=v(o);a==null||d==null||i.push({withScore:a,withoutScore:d})}return i}l(y,"pairCandidateRuns");function v(n){return n.status!=="completed"?null:n.grading?.summary?.pass_rate??null}l(v,"evidenceOf");function x(n,r,i,e){let o=[];for(let a of n)o.push({eval_:a,configuration:R,targetContent:r,runNumber:e}),o.push({eval_:a,configuration:b,targetContent:i,runNumber:e});return o}l(x,"buildCandidateQueue");async function I(n){let{cases:r,candidateContent:i,priorVersionContent:e,concurrency:o,runNumber:a,opts:d,onLog:s=l(()=>{},"onLog")}=n,p=x(r,i,e,a),u=[],m=Math.max(1,o);for(let t=0;t<p.length;t+=m){let c=p.slice(t,t+m);u.push(...await Promise.all(c.map(E=>h(E,d,s))))}for(let t of u)try{await C("/api/eval-runs",t)}catch(c){s(` \u26A0 failed to post a run result: ${c instanceof Error?c.message:String(c)}`)}let f=y(u),g=r.length-f.length;return g>0&&s(` \u26A0 ${g}/${r.length} case(s) produced no usable pair (failed or ungradeable arm)`),{completed:u.filter(t=>t.status==="completed").length,failed:u.filter(t=>t.status==="failed").length,results:u,pairs:f}}l(I,"runCandidateBatchAndPost");export{R as a,b,y as c,x as d,I as e};
|
package/dist/chunk-FFI3C3B3.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as P}from"./chunk-5XUN743A.js";import{a as M}from"./chunk-T4ZIK6RS.js";import{a as T}from"./chunk-W76EQSEV.js";import{a as y}from"./chunk-RSKQRVPJ.js";import{a as R}from"./chunk-HXZM2UHO.js";import{d as k}from"./chunk-V2IEFHT7.js";import{b as H}from"./chunk-YW3JQKGY.js";import{a as A}from"./chunk-O2BKBW7Z.js";import{a as E}from"./chunk-KGQ5W54Y.js";import{a as I}from"./chunk-O7PSLZO6.js";import{a as L}from"./chunk-MOAJLSYV.js";import{b as S}from"./chunk-BLCMXTIK.js";import{b as h}from"./chunk-5RBLIVBF.js";import{a as N}from"./chunk-EN43UYBN.js";import{a as x}from"./chunk-FAXV5AAG.js";import{a as _}from"./chunk-UF6US7VU.js";import{j as b}from"./chunk-2RCWYVEU.js";import{d as w}from"./chunk-NTKO4H2K.js";import{b as f,e as v,f as g}from"./chunk-KLEF5D3A.js";import{a as s}from"./chunk-ZLLER3HP.js";var O={process_eval:E,process_insights:I,process_launch:S,process_send_message:y,process_conversation:A,process_session_goal:R,distill_memories:H,memory_ab:M,process_run_cleanup:T,cron_suggest_instructions:k,cron_refresh_skills:_,cron_refresh_pricing:x,cron_eval_autorun:N,cron_instruction_evolution:b,process_judge_review:L},C=Object.keys(O),$=new Set([]);function F(e=process.env){return e.DATABASE_URL?C:C.filter(n=>!$.has(n))}s(F,"availableCapabilities");var J=3e4,U=3e4,K=3e4,D=250,V=5e3,G=`thin-agent-${process.pid}`,p=null;function q(e,n,r,l){let c;try{let d=w();c={claude:d.claudeBin!=null,codex:d.codexBin!=null,codexModel:d.codexConfiguredModel}}catch{}let i=s(d=>{g("/api/workers/heartbeat",{workerType:"cli-worker",clientName:G,clientVersion:l,workerVersion:"0.1.0",currentJobId:null,inFlightCount:0,lastError:null,status:d,metadata:{capabilities:e,mode:"thin-agent",llmEngines:c}}).then(u=>{let t=u?.advisory;t&&t.message!==p?(p=t.message,a(r,{event:"worker_advisory",code:t.code,message:t.message})):t||(p=null)}).catch(u=>{a(r,{event:"presence_heartbeat_error",error:u instanceof Error?u.message:String(u)})})},"send");i("alive");let o=setInterval(()=>i("alive"),K);n.addEventListener("abort",()=>{clearInterval(o),i("shutting_down")},{once:!0})}s(q,"startPresenceHeartbeat");function a(e,n){try{e(JSON.stringify({ts:new Date().toISOString(),...n}))}catch{e(`[agent-loop] log_error event=${n.event}`)}}s(a,"structuredLog");function B(e,n){return n.aborted?Promise.resolve(!1):e<=0?Promise.resolve(!0):new Promise(r=>{let l=setTimeout(()=>{n.removeEventListener("abort",c),r(!0)},e),c=s(()=>{clearTimeout(l),n.removeEventListener("abort",c),r(!1)},"onAbort");n.addEventListener("abort",c,{once:!0})})}s(B,"abortableSleep");async function Q(e,n){let r=`capabilities=${encodeURIComponent(e.join(","))}&waitMs=${n}`,l=await v(`/api/work/next?${r}`);return l==null||typeof l=="string"?null:l}s(Q,"pollForWork");function X(e,n){return{logger:{info:s(r=>n(r),"info"),warn:s(r=>n(r),"warn"),error:s(r=>n(r),"error")},job:{attempts:e}}}s(X,"makeHelpers");async function z(e,n,r){let l=O[e.kind],c=Date.now();if(a(r,{event:"claim",jobId:e.id,kind:e.kind,attempts:e.attempts}),!l){let o=`unknown kind: ${e.kind}`;a(r,{event:"fail",jobId:e.id,kind:e.kind,terminal:!0,error:o}),await g(`/api/work/${e.id}/fail`,{leaseToken:e.leaseToken,error:o,terminal:!0}).catch(()=>{});return}let i=setInterval(()=>{a(r,{event:"heartbeat",jobId:e.id}),g(`/api/work/${e.id}/heartbeat`,{leaseToken:e.leaseToken}).catch(o=>{a(r,{event:"heartbeat_error",jobId:e.id,error:o instanceof Error?o.message:String(o)})})},n);try{let o=X(e.attempts,r),d=await l(e.payload,o)??{};clearInterval(i),a(r,{event:"complete",jobId:e.id,kind:e.kind,durationMs:Date.now()-c}),await g(`/api/work/${e.id}/complete`,{leaseToken:e.leaseToken,result:d})}catch(o){clearInterval(i);let d=h(o),u=o instanceof Error?o.message:String(o);a(r,{event:"fail",jobId:e.id,kind:e.kind,durationMs:Date.now()-c,terminal:d,error:u}),await g(`/api/work/${e.id}/fail`,{leaseToken:e.leaseToken,error:u,terminal:d}).catch(t=>{a(r,{event:"fail_post_error",jobId:e.id,error:t instanceof Error?t.message:String(t)})})}}s(z,"runOne");async function ke(e){let n=e.log??(()=>{}),r=e.pollWaitMs??J,l=e.heartbeatIntervalMs??U,c=e.capabilities??F(),i=D;a(n,{event:"agent_start",capabilities:c,pollWaitMs:r,heartbeatIntervalMs:l}),q(c,e.signal,n,e.version),P({signal:e.signal,log:n}).catch(t=>{a(n,{event:"tt_heartbeat_fatal",error:t instanceof Error?t.message:String(t)})});let o=5*6e4,d=0,u=s(()=>{if(!e.readInstalledVersion||!e.version)return!1;let t=Date.now();if(t-d<o)return!1;d=t;let m=e.readInstalledVersion();return!!(m&&m!==e.version)},"versionDrifted");for(;!e.signal.aborted;){if(u()){a(n,{event:"agent_version_drift",bootVersion:e.version,installedVersion:e.readInstalledVersion?.()??null}),e.onVersionDrift?.();break}let t=null;try{t=await Q(c,r)}catch(m){let W=m instanceof f?m.statusCode:void 0;if(a(n,{event:"poll_error",status:W,error:m instanceof Error?m.message:String(m)}),!await B(i,e.signal))break;i=Math.min(i*2,V);continue}if(!t){if(a(n,{event:"poll_204"}),!await B(i,e.signal))break;i=Math.min(i*2,V);continue}i=D,await z(t,l,n)}a(n,{event:"agent_stop"})}s(ke,"runAgentLoop");export{O as a,C as b,F as c,Q as d,ke as e};
|
package/dist/chunk-HMMO27U4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as m}from"./chunk-ZLLER3HP.js";import{spawn as y}from"node:child_process";function O(r){try{let t=JSON.parse(r),i=t.result??t.content??r,a=t.usage?.total_tokens??(t.usage?.input_tokens??0)+(t.usage?.output_tokens??0),s;if(t.modelUsage&&typeof t.modelUsage=="object"){let o=-1;for(let[n,c]of Object.entries(t.modelUsage)){let u=typeof c?.outputTokens=="number"?c.outputTokens:0;u>o&&(o=u,s=n)}}return{output:i,totalTokens:a,model:s}}catch{return{output:r,totalTokens:0}}}m(O,"parseClaudeJsonOutput");function D(r){let{prompt:t,targetContent:i,systemPrompt:a,model:s}=r,o=["-p",t,"--output-format","json","--settings",JSON.stringify({disableAllHooks:!0})],n=i??a;return n&&o.push("--system-prompt",n),s&&o.push("--model",s),o}m(D,"buildClaudeArgs");async function S(r){let{prompt:t,targetContent:i,systemPrompt:a,workDir:s=process.cwd(),timeout:o=12e4,model:n}=r,c=D({prompt:t,targetContent:i,systemPrompt:a,model:n}),u=Date.now();return new Promise(d=>{let l={...process.env};delete l.CLAUDECODE,delete l.HTTPS_PROXY;let E=["/opt/homebrew/bin","/usr/local/bin"],f=(l.PATH??"").split(":").filter(Boolean),T=E.filter(e=>!f.includes(e));T.length&&(l.PATH=[...f,...T].join(":"));let p=y("claude",c,{cwd:s,env:l,stdio:["ignore","pipe","pipe"]}),g="",k="";p.stdout.on("data",e=>{g+=e.toString()}),p.stderr.on("data",e=>{k+=e.toString()});let x=setTimeout(()=>{p.kill("SIGTERM"),d({output:g,exitCode:null,durationMs:Date.now()-u,totalTokens:0,error:`Timed out after ${o}ms`})},o);p.on("close",e=>{clearTimeout(x);let b=Date.now()-u,{output:P,totalTokens:C,model:w}=O(g);d({output:P,exitCode:e,durationMs:b,totalTokens:C,model:w,error:e!==0?k||`Exit code ${e}`:void 0})}),p.on("error",e=>{clearTimeout(x),d({output:"",exitCode:null,durationMs:Date.now()-u,totalTokens:0,error:`Failed to spawn claude: ${e.message}`})})})}m(S,"executeEval");export{O as a,D as b,S as c};
|