@rulemetric/cli 0.17.2 → 0.17.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-U6AASXY3.js → chunk-3HJT572X.js} +1 -1
- package/dist/chunk-7MQZPDDZ.js +1 -0
- package/dist/{chunk-BV3JMD3A.js → chunk-7OTOAC6C.js} +1 -1
- package/dist/{chunk-BCPIY47G.js → chunk-BRYURAUN.js} +1 -1
- package/dist/{chunk-DOEPIICK.js → chunk-BTKVLLV2.js} +1 -1
- package/dist/{chunk-JGJU4JX5.js → chunk-CJ2WSSHD.js} +1 -1
- package/dist/{chunk-FTCC4OZ4.js → chunk-DTTR4EUJ.js} +1 -1
- package/dist/{chunk-FD53AP7T.js → chunk-EQ2O6DSN.js} +1 -1
- package/dist/{chunk-H4VIQHBV.js → chunk-FGGESTXG.js} +1 -1
- package/dist/chunk-FLP6WIJV.js +1 -0
- package/dist/{chunk-URUHD4OI.js → chunk-GHUW7P55.js} +1 -1
- package/dist/{chunk-QJZ4DMVQ.js → chunk-IYX65N6T.js} +1 -1
- package/dist/chunk-JLX2D3QL.js +1 -0
- package/dist/{chunk-VCWT5KZL.js → chunk-K65DDLTZ.js} +2 -2
- package/dist/{chunk-YT25HLWB.js → chunk-KIQK7NVF.js} +1 -1
- package/dist/{chunk-VBGHPAUT.js → chunk-KOIFFSYW.js} +2 -2
- package/dist/{chunk-YGFZ6BLU.js → chunk-MBP5OJKE.js} +3 -3
- package/dist/{chunk-ICLAHFKK.js → chunk-MGT5FZJ4.js} +1 -1
- package/dist/chunk-MRQIYIQE.js +1 -0
- package/dist/{chunk-UGA2NFRG.js → chunk-NAS7FIGM.js} +1 -1
- package/dist/{chunk-TL57YUJV.js → chunk-NBTH6ZKD.js} +1 -1
- package/dist/{chunk-GQYF2WVE.js → chunk-P577DWWL.js} +1 -1
- package/dist/{chunk-BQVUZ6VE.js → chunk-PMMHMRFS.js} +1 -1
- package/dist/{chunk-ULFSGFT2.js → chunk-PPQFN62M.js} +1 -1
- package/dist/{chunk-4GM4OEQY.js → chunk-PX2E644Q.js} +1 -1
- package/dist/chunk-R26SQ3BE.js +5 -0
- package/dist/{chunk-HBJMELKB.js → chunk-RITL4NU3.js} +1 -1
- package/dist/{chunk-N2PUNIWM.js → chunk-TG4C4ENM.js} +1 -1
- package/dist/{chunk-VNGJRYBD.js → chunk-UQJNUESP.js} +1 -1
- package/dist/{chunk-55HFAX5Y.js → chunk-V6L25LFD.js} +1 -1
- package/dist/commands/diagnostics.js +1 -1
- package/dist/commands/evals/agent.js +1 -1
- package/dist/commands/evals/auto-run.js +1 -1
- package/dist/commands/evals/compare.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/lib/agent-loop.js +1 -1
- package/dist/lib/eval-analyzer.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-executor.js +1 -1
- package/dist/lib/eval-grader.js +1 -1
- package/dist/lib/eval-meta-judge.js +1 -1
- package/dist/lib/eval-resume.js +1 -1
- 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 -1
- package/dist/lib/insights/generation/quality-review.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-refine-cases.js +1 -1
- package/dist/lib/jobs/handlers/prepare-suggestion-live.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-memory-ab.js +1 -1
- package/dist/lib/jobs/handlers/process-suggestion-discovery.js +1 -0
- package/dist/lib/jobs/handlers/process-suggestion-eval.js +1 -1
- package/dist/lib/judge-review-runner.js +1 -1
- package/dist/lib/measurement-llm.js +1 -1
- package/dist/lib/refine-cases.js +1 -1
- package/dist/lib/suggestion-discovery.js +1 -0
- package/oclif.manifest.json +225 -225
- package/package.json +4 -4
- package/dist/chunk-274MXEKI.js +0 -1
- package/dist/chunk-43TRZXJP.js +0 -1
- package/dist/chunk-LARY6ZFT.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../../../chunk-
|
|
1
|
+
import{a,b}from"../../../chunk-MBP5OJKE.js";import"../../../chunk-5RBLIVBF.js";import"../../../chunk-K65DDLTZ.js";import"../../../chunk-LELSVLNK.js";import"../../../chunk-A2JFQUDW.js";import"../../../chunk-LZPE6424.js";import"../../../chunk-3UKZJAFS.js";import"../../../chunk-77FH6UZP.js";import"../../../chunk-LJRE3LZ2.js";import"../../../chunk-GWQ24FQP.js";import"../../../chunk-PPAHIVG5.js";import"../../../chunk-CT7FWSIU.js";import"../../../chunk-5MXZJWQS.js";import"../../../chunk-N7ODX6PO.js";import"../../../chunk-SVZYRGO5.js";import"../../../chunk-WULEBQPI.js";import"../../../chunk-GPBN4ROE.js";import"../../../chunk-6XTLP2G7.js";import"../../../chunk-PJ3WHQ67.js";import"../../../chunk-5VWVQCNR.js";import"../../../chunk-MHLHLJ5T.js";import"../../../chunk-XQYAVSUQ.js";import"../../../chunk-PZNWH4VQ.js";import"../../../chunk-ZLLER3HP.js";export{b as fetchGeneratorMemory,a as processInsights};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../../chunk-
|
|
1
|
+
import{a}from"../../../chunk-BRYURAUN.js";import"../../../chunk-KIQK7NVF.js";import"../../../chunk-6UEFCMR2.js";import"../../../chunk-3HJT572X.js";import"../../../chunk-CDY7TQFZ.js";import"../../../chunk-FLP6WIJV.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 processJudgeReview};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../../chunk-
|
|
1
|
+
import{a}from"../../../chunk-DTTR4EUJ.js";import"../../../chunk-NAS7FIGM.js";import"../../../chunk-VZYNZS5U.js";import"../../../chunk-U2NT5OSQ.js";import"../../../chunk-KGURGIZ2.js";import"../../../chunk-GYNZ3OZF.js";import"../../../chunk-UPFH72PF.js";import"../../../chunk-3HJT572X.js";import"../../../chunk-CDY7TQFZ.js";import"../../../chunk-KFNFLMUR.js";import"../../../chunk-FLP6WIJV.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 processMemoryAb};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../../../chunk-MRQIYIQE.js";import"../../../chunk-R26SQ3BE.js";import"../../../chunk-JU5ZNXPK.js";import"../../../chunk-KOIFFSYW.js";import"../../../chunk-LZPE6424.js";import"../../../chunk-3UKZJAFS.js";import"../../../chunk-5MXZJWQS.js";import"../../../chunk-VZYNZS5U.js";import"../../../chunk-U2NT5OSQ.js";import"../../../chunk-GYNZ3OZF.js";import"../../../chunk-UPFH72PF.js";import"../../../chunk-FLP6WIJV.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 processSuggestionDiscovery};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../../chunk-
|
|
1
|
+
import{a}from"../../../chunk-PMMHMRFS.js";import"../../../chunk-GHUW7P55.js";import"../../../chunk-JU5ZNXPK.js";import"../../../chunk-5RBLIVBF.js";import"../../../chunk-CJ2WSSHD.js";import"../../../chunk-KOIFFSYW.js";import"../../../chunk-PX2E644Q.js";import"../../../chunk-UQJNUESP.js";import"../../../chunk-FLXWL4F4.js";import"../../../chunk-V6L25LFD.js";import"../../../chunk-GWQ24FQP.js";import"../../../chunk-PPAHIVG5.js";import"../../../chunk-CT7FWSIU.js";import"../../../chunk-5MXZJWQS.js";import"../../../chunk-N7ODX6PO.js";import"../../../chunk-NAS7FIGM.js";import"../../../chunk-VZYNZS5U.js";import"../../../chunk-U2NT5OSQ.js";import"../../../chunk-KGURGIZ2.js";import"../../../chunk-GYNZ3OZF.js";import"../../../chunk-UPFH72PF.js";import"../../../chunk-3HJT572X.js";import"../../../chunk-CDY7TQFZ.js";import"../../../chunk-FLP6WIJV.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 processSuggestionEval};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d}from"../chunk-
|
|
1
|
+
import{a,b,c,d}from"../chunk-KIQK7NVF.js";import"../chunk-6UEFCMR2.js";import"../chunk-3HJT572X.js";import"../chunk-CDY7TQFZ.js";import"../chunk-FLP6WIJV.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{c as JudgeReviewSkip,b as llmExpectationIndexes,a as reviewMatchesReviewer,d as runJudgeReviewPass};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../chunk-
|
|
1
|
+
import{a,b}from"../chunk-V6L25LFD.js";import"../chunk-5MXZJWQS.js";import"../chunk-FLP6WIJV.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{b as runMeasurementJson,a as runMeasurementText};
|
package/dist/lib/refine-cases.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c}from"../chunk-
|
|
1
|
+
import{a,b,c}from"../chunk-EQ2O6DSN.js";import"../chunk-BTKVLLV2.js";import"../chunk-MGT5FZJ4.js";import"../chunk-M7QSC64D.js";import"../chunk-DZRBB34J.js";import"../chunk-KR32Y5Q5.js";import"../chunk-RITL4NU3.js";import"../chunk-GYKYJJNF.js";import"../chunk-G7V4ZZZ3.js";import"../chunk-AHLVY52I.js";import"../chunk-PPQFN62M.js";import"../chunk-V6L25LFD.js";import"../chunk-GWQ24FQP.js";import"../chunk-PPAHIVG5.js";import"../chunk-CT7FWSIU.js";import"../chunk-5MXZJWQS.js";import"../chunk-N7ODX6PO.js";import"../chunk-NAS7FIGM.js";import"../chunk-VZYNZS5U.js";import"../chunk-U2NT5OSQ.js";import"../chunk-KGURGIZ2.js";import"../chunk-GYNZ3OZF.js";import"../chunk-UPFH72PF.js";import"../chunk-3HJT572X.js";import"../chunk-CDY7TQFZ.js";import"../chunk-KFNFLMUR.js";import"../chunk-FLP6WIJV.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 MAX_RETIREMENTS_PER_REFINEMENT,c as executeCaseRefinement,b as planCaseRefinement};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j}from"../chunk-R26SQ3BE.js";import"../chunk-JU5ZNXPK.js";import"../chunk-KOIFFSYW.js";import"../chunk-ZLLER3HP.js";export{f as CHANGE_AUTHOR_PROMPT,c as ChangeDraftSchema,a as DiscoverySnapshotSchema,g as TASK_AUDIT_PROMPT,e as TASK_AUTHOR_PROMPT,d as TaskAuditSchema,b as TaskDraftSchema,j as assembleDiscoveryProtocol,i as calibrateDiscoveryTask,h as validateTaskGrounding};
|
package/oclif.manifest.json
CHANGED
|
@@ -284,6 +284,96 @@
|
|
|
284
284
|
"backfill.js"
|
|
285
285
|
]
|
|
286
286
|
},
|
|
287
|
+
"capture:scope": {
|
|
288
|
+
"aliases": [],
|
|
289
|
+
"args": {},
|
|
290
|
+
"description": "Show or set which projects RuleMetric captures — the Codex sweep and hook-driven sessions each have their own scope",
|
|
291
|
+
"examples": [
|
|
292
|
+
"<%= config.bin %> <%= command.id %>",
|
|
293
|
+
"<%= config.bin %> <%= command.id %> --add ~/work/client-a --add ~/work/client-b",
|
|
294
|
+
"<%= config.bin %> <%= command.id %> --tool hooks --add ~/work/client-a",
|
|
295
|
+
"<%= config.bin %> <%= command.id %> --tool hooks --off",
|
|
296
|
+
"<%= config.bin %> <%= command.id %> --remove ~/work/client-a",
|
|
297
|
+
"<%= config.bin %> <%= command.id %> --off",
|
|
298
|
+
"<%= config.bin %> <%= command.id %> --all"
|
|
299
|
+
],
|
|
300
|
+
"flags": {
|
|
301
|
+
"api-url": {
|
|
302
|
+
"description": "Override API base URL",
|
|
303
|
+
"env": "RULEMETRIC_API_URL",
|
|
304
|
+
"hidden": true,
|
|
305
|
+
"name": "api-url",
|
|
306
|
+
"hasDynamicHelp": false,
|
|
307
|
+
"multiple": false,
|
|
308
|
+
"type": "option"
|
|
309
|
+
},
|
|
310
|
+
"tool": {
|
|
311
|
+
"description": "Which capture path to edit: \"codex\" (the worker transcript sweep, the default) or \"hooks\" (Claude Code / Cursor / Copilot / Antigravity hook sessions).",
|
|
312
|
+
"name": "tool",
|
|
313
|
+
"default": "codex",
|
|
314
|
+
"hasDynamicHelp": false,
|
|
315
|
+
"multiple": false,
|
|
316
|
+
"options": [
|
|
317
|
+
"codex",
|
|
318
|
+
"hooks"
|
|
319
|
+
],
|
|
320
|
+
"type": "option"
|
|
321
|
+
},
|
|
322
|
+
"add": {
|
|
323
|
+
"description": "Capture sessions under this path (repeatable). Implies an allowlist.",
|
|
324
|
+
"name": "add",
|
|
325
|
+
"hasDynamicHelp": false,
|
|
326
|
+
"multiple": true,
|
|
327
|
+
"type": "option"
|
|
328
|
+
},
|
|
329
|
+
"remove": {
|
|
330
|
+
"description": "Stop capturing under this path (repeatable).",
|
|
331
|
+
"name": "remove",
|
|
332
|
+
"hasDynamicHelp": false,
|
|
333
|
+
"multiple": true,
|
|
334
|
+
"type": "option"
|
|
335
|
+
},
|
|
336
|
+
"off": {
|
|
337
|
+
"description": "Turn this capture path off entirely.",
|
|
338
|
+
"exclusive": [
|
|
339
|
+
"all"
|
|
340
|
+
],
|
|
341
|
+
"name": "off",
|
|
342
|
+
"allowNo": false,
|
|
343
|
+
"type": "boolean"
|
|
344
|
+
},
|
|
345
|
+
"all": {
|
|
346
|
+
"description": "Capture every project (the default).",
|
|
347
|
+
"exclusive": [
|
|
348
|
+
"off"
|
|
349
|
+
],
|
|
350
|
+
"name": "all",
|
|
351
|
+
"allowNo": false,
|
|
352
|
+
"type": "boolean"
|
|
353
|
+
},
|
|
354
|
+
"clear": {
|
|
355
|
+
"description": "Remove this scope, restoring the default.",
|
|
356
|
+
"name": "clear",
|
|
357
|
+
"allowNo": false,
|
|
358
|
+
"type": "boolean"
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
"hasDynamicHelp": false,
|
|
362
|
+
"hiddenAliases": [],
|
|
363
|
+
"id": "capture:scope",
|
|
364
|
+
"pluginAlias": "@rulemetric/cli",
|
|
365
|
+
"pluginName": "@rulemetric/cli",
|
|
366
|
+
"pluginType": "core",
|
|
367
|
+
"strict": true,
|
|
368
|
+
"enableJsonFlag": false,
|
|
369
|
+
"isESM": true,
|
|
370
|
+
"relativePath": [
|
|
371
|
+
"dist",
|
|
372
|
+
"commands",
|
|
373
|
+
"capture",
|
|
374
|
+
"scope.js"
|
|
375
|
+
]
|
|
376
|
+
},
|
|
287
377
|
"auth:create-key": {
|
|
288
378
|
"aliases": [],
|
|
289
379
|
"args": {},
|
|
@@ -556,96 +646,6 @@
|
|
|
556
646
|
"status.js"
|
|
557
647
|
]
|
|
558
648
|
},
|
|
559
|
-
"capture:scope": {
|
|
560
|
-
"aliases": [],
|
|
561
|
-
"args": {},
|
|
562
|
-
"description": "Show or set which projects RuleMetric captures — the Codex sweep and hook-driven sessions each have their own scope",
|
|
563
|
-
"examples": [
|
|
564
|
-
"<%= config.bin %> <%= command.id %>",
|
|
565
|
-
"<%= config.bin %> <%= command.id %> --add ~/work/client-a --add ~/work/client-b",
|
|
566
|
-
"<%= config.bin %> <%= command.id %> --tool hooks --add ~/work/client-a",
|
|
567
|
-
"<%= config.bin %> <%= command.id %> --tool hooks --off",
|
|
568
|
-
"<%= config.bin %> <%= command.id %> --remove ~/work/client-a",
|
|
569
|
-
"<%= config.bin %> <%= command.id %> --off",
|
|
570
|
-
"<%= config.bin %> <%= command.id %> --all"
|
|
571
|
-
],
|
|
572
|
-
"flags": {
|
|
573
|
-
"api-url": {
|
|
574
|
-
"description": "Override API base URL",
|
|
575
|
-
"env": "RULEMETRIC_API_URL",
|
|
576
|
-
"hidden": true,
|
|
577
|
-
"name": "api-url",
|
|
578
|
-
"hasDynamicHelp": false,
|
|
579
|
-
"multiple": false,
|
|
580
|
-
"type": "option"
|
|
581
|
-
},
|
|
582
|
-
"tool": {
|
|
583
|
-
"description": "Which capture path to edit: \"codex\" (the worker transcript sweep, the default) or \"hooks\" (Claude Code / Cursor / Copilot / Antigravity hook sessions).",
|
|
584
|
-
"name": "tool",
|
|
585
|
-
"default": "codex",
|
|
586
|
-
"hasDynamicHelp": false,
|
|
587
|
-
"multiple": false,
|
|
588
|
-
"options": [
|
|
589
|
-
"codex",
|
|
590
|
-
"hooks"
|
|
591
|
-
],
|
|
592
|
-
"type": "option"
|
|
593
|
-
},
|
|
594
|
-
"add": {
|
|
595
|
-
"description": "Capture sessions under this path (repeatable). Implies an allowlist.",
|
|
596
|
-
"name": "add",
|
|
597
|
-
"hasDynamicHelp": false,
|
|
598
|
-
"multiple": true,
|
|
599
|
-
"type": "option"
|
|
600
|
-
},
|
|
601
|
-
"remove": {
|
|
602
|
-
"description": "Stop capturing under this path (repeatable).",
|
|
603
|
-
"name": "remove",
|
|
604
|
-
"hasDynamicHelp": false,
|
|
605
|
-
"multiple": true,
|
|
606
|
-
"type": "option"
|
|
607
|
-
},
|
|
608
|
-
"off": {
|
|
609
|
-
"description": "Turn this capture path off entirely.",
|
|
610
|
-
"exclusive": [
|
|
611
|
-
"all"
|
|
612
|
-
],
|
|
613
|
-
"name": "off",
|
|
614
|
-
"allowNo": false,
|
|
615
|
-
"type": "boolean"
|
|
616
|
-
},
|
|
617
|
-
"all": {
|
|
618
|
-
"description": "Capture every project (the default).",
|
|
619
|
-
"exclusive": [
|
|
620
|
-
"off"
|
|
621
|
-
],
|
|
622
|
-
"name": "all",
|
|
623
|
-
"allowNo": false,
|
|
624
|
-
"type": "boolean"
|
|
625
|
-
},
|
|
626
|
-
"clear": {
|
|
627
|
-
"description": "Remove this scope, restoring the default.",
|
|
628
|
-
"name": "clear",
|
|
629
|
-
"allowNo": false,
|
|
630
|
-
"type": "boolean"
|
|
631
|
-
}
|
|
632
|
-
},
|
|
633
|
-
"hasDynamicHelp": false,
|
|
634
|
-
"hiddenAliases": [],
|
|
635
|
-
"id": "capture:scope",
|
|
636
|
-
"pluginAlias": "@rulemetric/cli",
|
|
637
|
-
"pluginName": "@rulemetric/cli",
|
|
638
|
-
"pluginType": "core",
|
|
639
|
-
"strict": true,
|
|
640
|
-
"enableJsonFlag": false,
|
|
641
|
-
"isESM": true,
|
|
642
|
-
"relativePath": [
|
|
643
|
-
"dist",
|
|
644
|
-
"commands",
|
|
645
|
-
"capture",
|
|
646
|
-
"scope.js"
|
|
647
|
-
]
|
|
648
|
-
},
|
|
649
649
|
"catalog": {
|
|
650
650
|
"aliases": [],
|
|
651
651
|
"args": {},
|
|
@@ -3722,140 +3722,6 @@
|
|
|
3722
3722
|
"tail-transcript.js"
|
|
3723
3723
|
]
|
|
3724
3724
|
},
|
|
3725
|
-
"service:install": {
|
|
3726
|
-
"aliases": [],
|
|
3727
|
-
"args": {},
|
|
3728
|
-
"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 — no repo, no build (works from `npm i -g @rulemetric/cli`, macOS launchd or Linux systemd).",
|
|
3729
|
-
"examples": [
|
|
3730
|
-
"<%= config.bin %> service install",
|
|
3731
|
-
"<%= config.bin %> service install --port 3000",
|
|
3732
|
-
"<%= config.bin %> service install --skip-build",
|
|
3733
|
-
"<%= config.bin %> service install --no-proxy",
|
|
3734
|
-
"<%= config.bin %> service install --worker-only"
|
|
3735
|
-
],
|
|
3736
|
-
"flags": {
|
|
3737
|
-
"api-url": {
|
|
3738
|
-
"description": "Override API base URL",
|
|
3739
|
-
"env": "RULEMETRIC_API_URL",
|
|
3740
|
-
"hidden": true,
|
|
3741
|
-
"name": "api-url",
|
|
3742
|
-
"hasDynamicHelp": false,
|
|
3743
|
-
"multiple": false,
|
|
3744
|
-
"type": "option"
|
|
3745
|
-
},
|
|
3746
|
-
"port": {
|
|
3747
|
-
"char": "p",
|
|
3748
|
-
"description": "API server port",
|
|
3749
|
-
"name": "port",
|
|
3750
|
-
"default": 3000,
|
|
3751
|
-
"hasDynamicHelp": false,
|
|
3752
|
-
"multiple": false,
|
|
3753
|
-
"type": "option"
|
|
3754
|
-
},
|
|
3755
|
-
"force": {
|
|
3756
|
-
"char": "f",
|
|
3757
|
-
"description": "Overwrite existing service configuration and reclaim conflicting ports",
|
|
3758
|
-
"name": "force",
|
|
3759
|
-
"allowNo": false,
|
|
3760
|
-
"type": "boolean"
|
|
3761
|
-
},
|
|
3762
|
-
"skip-build": {
|
|
3763
|
-
"description": "Skip the pre-install workspace build (API/web/cli dist must already exist)",
|
|
3764
|
-
"name": "skip-build",
|
|
3765
|
-
"allowNo": false,
|
|
3766
|
-
"type": "boolean"
|
|
3767
|
-
},
|
|
3768
|
-
"no-proxy": {
|
|
3769
|
-
"description": "Skip gateway + mitmproxy plists (just install API + worker)",
|
|
3770
|
-
"name": "no-proxy",
|
|
3771
|
-
"allowNo": false,
|
|
3772
|
-
"type": "boolean"
|
|
3773
|
-
},
|
|
3774
|
-
"worker-only": {
|
|
3775
|
-
"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).",
|
|
3776
|
-
"name": "worker-only",
|
|
3777
|
-
"allowNo": false,
|
|
3778
|
-
"type": "boolean"
|
|
3779
|
-
}
|
|
3780
|
-
},
|
|
3781
|
-
"hasDynamicHelp": false,
|
|
3782
|
-
"hiddenAliases": [],
|
|
3783
|
-
"id": "service:install",
|
|
3784
|
-
"pluginAlias": "@rulemetric/cli",
|
|
3785
|
-
"pluginName": "@rulemetric/cli",
|
|
3786
|
-
"pluginType": "core",
|
|
3787
|
-
"strict": true,
|
|
3788
|
-
"enableJsonFlag": false,
|
|
3789
|
-
"isESM": true,
|
|
3790
|
-
"relativePath": [
|
|
3791
|
-
"dist",
|
|
3792
|
-
"commands",
|
|
3793
|
-
"service",
|
|
3794
|
-
"install.js"
|
|
3795
|
-
]
|
|
3796
|
-
},
|
|
3797
|
-
"service:status": {
|
|
3798
|
-
"aliases": [],
|
|
3799
|
-
"args": {},
|
|
3800
|
-
"description": "Check the status of installed RuleMetric services (launchd on macOS; systemd --user worker on Linux)",
|
|
3801
|
-
"flags": {
|
|
3802
|
-
"api-url": {
|
|
3803
|
-
"description": "Override API base URL",
|
|
3804
|
-
"env": "RULEMETRIC_API_URL",
|
|
3805
|
-
"hidden": true,
|
|
3806
|
-
"name": "api-url",
|
|
3807
|
-
"hasDynamicHelp": false,
|
|
3808
|
-
"multiple": false,
|
|
3809
|
-
"type": "option"
|
|
3810
|
-
}
|
|
3811
|
-
},
|
|
3812
|
-
"hasDynamicHelp": false,
|
|
3813
|
-
"hiddenAliases": [],
|
|
3814
|
-
"id": "service:status",
|
|
3815
|
-
"pluginAlias": "@rulemetric/cli",
|
|
3816
|
-
"pluginName": "@rulemetric/cli",
|
|
3817
|
-
"pluginType": "core",
|
|
3818
|
-
"strict": true,
|
|
3819
|
-
"enableJsonFlag": false,
|
|
3820
|
-
"isESM": true,
|
|
3821
|
-
"relativePath": [
|
|
3822
|
-
"dist",
|
|
3823
|
-
"commands",
|
|
3824
|
-
"service",
|
|
3825
|
-
"status.js"
|
|
3826
|
-
]
|
|
3827
|
-
},
|
|
3828
|
-
"service:uninstall": {
|
|
3829
|
-
"aliases": [],
|
|
3830
|
-
"args": {},
|
|
3831
|
-
"description": "Remove RuleMetric services (macOS launchd: API/worker/gateway/proxy; Linux: the --worker-only systemd unit)",
|
|
3832
|
-
"flags": {
|
|
3833
|
-
"api-url": {
|
|
3834
|
-
"description": "Override API base URL",
|
|
3835
|
-
"env": "RULEMETRIC_API_URL",
|
|
3836
|
-
"hidden": true,
|
|
3837
|
-
"name": "api-url",
|
|
3838
|
-
"hasDynamicHelp": false,
|
|
3839
|
-
"multiple": false,
|
|
3840
|
-
"type": "option"
|
|
3841
|
-
}
|
|
3842
|
-
},
|
|
3843
|
-
"hasDynamicHelp": false,
|
|
3844
|
-
"hiddenAliases": [],
|
|
3845
|
-
"id": "service:uninstall",
|
|
3846
|
-
"pluginAlias": "@rulemetric/cli",
|
|
3847
|
-
"pluginName": "@rulemetric/cli",
|
|
3848
|
-
"pluginType": "core",
|
|
3849
|
-
"strict": true,
|
|
3850
|
-
"enableJsonFlag": false,
|
|
3851
|
-
"isESM": true,
|
|
3852
|
-
"relativePath": [
|
|
3853
|
-
"dist",
|
|
3854
|
-
"commands",
|
|
3855
|
-
"service",
|
|
3856
|
-
"uninstall.js"
|
|
3857
|
-
]
|
|
3858
|
-
},
|
|
3859
3725
|
"sessions:analyze": {
|
|
3860
3726
|
"aliases": [],
|
|
3861
3727
|
"args": {
|
|
@@ -4137,6 +4003,140 @@
|
|
|
4137
4003
|
"start.js"
|
|
4138
4004
|
]
|
|
4139
4005
|
},
|
|
4006
|
+
"service:install": {
|
|
4007
|
+
"aliases": [],
|
|
4008
|
+
"args": {},
|
|
4009
|
+
"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 — no repo, no build (works from `npm i -g @rulemetric/cli`, macOS launchd or Linux systemd).",
|
|
4010
|
+
"examples": [
|
|
4011
|
+
"<%= config.bin %> service install",
|
|
4012
|
+
"<%= config.bin %> service install --port 3000",
|
|
4013
|
+
"<%= config.bin %> service install --skip-build",
|
|
4014
|
+
"<%= config.bin %> service install --no-proxy",
|
|
4015
|
+
"<%= config.bin %> service install --worker-only"
|
|
4016
|
+
],
|
|
4017
|
+
"flags": {
|
|
4018
|
+
"api-url": {
|
|
4019
|
+
"description": "Override API base URL",
|
|
4020
|
+
"env": "RULEMETRIC_API_URL",
|
|
4021
|
+
"hidden": true,
|
|
4022
|
+
"name": "api-url",
|
|
4023
|
+
"hasDynamicHelp": false,
|
|
4024
|
+
"multiple": false,
|
|
4025
|
+
"type": "option"
|
|
4026
|
+
},
|
|
4027
|
+
"port": {
|
|
4028
|
+
"char": "p",
|
|
4029
|
+
"description": "API server port",
|
|
4030
|
+
"name": "port",
|
|
4031
|
+
"default": 3000,
|
|
4032
|
+
"hasDynamicHelp": false,
|
|
4033
|
+
"multiple": false,
|
|
4034
|
+
"type": "option"
|
|
4035
|
+
},
|
|
4036
|
+
"force": {
|
|
4037
|
+
"char": "f",
|
|
4038
|
+
"description": "Overwrite existing service configuration and reclaim conflicting ports",
|
|
4039
|
+
"name": "force",
|
|
4040
|
+
"allowNo": false,
|
|
4041
|
+
"type": "boolean"
|
|
4042
|
+
},
|
|
4043
|
+
"skip-build": {
|
|
4044
|
+
"description": "Skip the pre-install workspace build (API/web/cli dist must already exist)",
|
|
4045
|
+
"name": "skip-build",
|
|
4046
|
+
"allowNo": false,
|
|
4047
|
+
"type": "boolean"
|
|
4048
|
+
},
|
|
4049
|
+
"no-proxy": {
|
|
4050
|
+
"description": "Skip gateway + mitmproxy plists (just install API + worker)",
|
|
4051
|
+
"name": "no-proxy",
|
|
4052
|
+
"allowNo": false,
|
|
4053
|
+
"type": "boolean"
|
|
4054
|
+
},
|
|
4055
|
+
"worker-only": {
|
|
4056
|
+
"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).",
|
|
4057
|
+
"name": "worker-only",
|
|
4058
|
+
"allowNo": false,
|
|
4059
|
+
"type": "boolean"
|
|
4060
|
+
}
|
|
4061
|
+
},
|
|
4062
|
+
"hasDynamicHelp": false,
|
|
4063
|
+
"hiddenAliases": [],
|
|
4064
|
+
"id": "service:install",
|
|
4065
|
+
"pluginAlias": "@rulemetric/cli",
|
|
4066
|
+
"pluginName": "@rulemetric/cli",
|
|
4067
|
+
"pluginType": "core",
|
|
4068
|
+
"strict": true,
|
|
4069
|
+
"enableJsonFlag": false,
|
|
4070
|
+
"isESM": true,
|
|
4071
|
+
"relativePath": [
|
|
4072
|
+
"dist",
|
|
4073
|
+
"commands",
|
|
4074
|
+
"service",
|
|
4075
|
+
"install.js"
|
|
4076
|
+
]
|
|
4077
|
+
},
|
|
4078
|
+
"service:status": {
|
|
4079
|
+
"aliases": [],
|
|
4080
|
+
"args": {},
|
|
4081
|
+
"description": "Check the status of installed RuleMetric services (launchd on macOS; systemd --user worker on Linux)",
|
|
4082
|
+
"flags": {
|
|
4083
|
+
"api-url": {
|
|
4084
|
+
"description": "Override API base URL",
|
|
4085
|
+
"env": "RULEMETRIC_API_URL",
|
|
4086
|
+
"hidden": true,
|
|
4087
|
+
"name": "api-url",
|
|
4088
|
+
"hasDynamicHelp": false,
|
|
4089
|
+
"multiple": false,
|
|
4090
|
+
"type": "option"
|
|
4091
|
+
}
|
|
4092
|
+
},
|
|
4093
|
+
"hasDynamicHelp": false,
|
|
4094
|
+
"hiddenAliases": [],
|
|
4095
|
+
"id": "service:status",
|
|
4096
|
+
"pluginAlias": "@rulemetric/cli",
|
|
4097
|
+
"pluginName": "@rulemetric/cli",
|
|
4098
|
+
"pluginType": "core",
|
|
4099
|
+
"strict": true,
|
|
4100
|
+
"enableJsonFlag": false,
|
|
4101
|
+
"isESM": true,
|
|
4102
|
+
"relativePath": [
|
|
4103
|
+
"dist",
|
|
4104
|
+
"commands",
|
|
4105
|
+
"service",
|
|
4106
|
+
"status.js"
|
|
4107
|
+
]
|
|
4108
|
+
},
|
|
4109
|
+
"service:uninstall": {
|
|
4110
|
+
"aliases": [],
|
|
4111
|
+
"args": {},
|
|
4112
|
+
"description": "Remove RuleMetric services (macOS launchd: API/worker/gateway/proxy; Linux: the --worker-only systemd unit)",
|
|
4113
|
+
"flags": {
|
|
4114
|
+
"api-url": {
|
|
4115
|
+
"description": "Override API base URL",
|
|
4116
|
+
"env": "RULEMETRIC_API_URL",
|
|
4117
|
+
"hidden": true,
|
|
4118
|
+
"name": "api-url",
|
|
4119
|
+
"hasDynamicHelp": false,
|
|
4120
|
+
"multiple": false,
|
|
4121
|
+
"type": "option"
|
|
4122
|
+
}
|
|
4123
|
+
},
|
|
4124
|
+
"hasDynamicHelp": false,
|
|
4125
|
+
"hiddenAliases": [],
|
|
4126
|
+
"id": "service:uninstall",
|
|
4127
|
+
"pluginAlias": "@rulemetric/cli",
|
|
4128
|
+
"pluginName": "@rulemetric/cli",
|
|
4129
|
+
"pluginType": "core",
|
|
4130
|
+
"strict": true,
|
|
4131
|
+
"enableJsonFlag": false,
|
|
4132
|
+
"isESM": true,
|
|
4133
|
+
"relativePath": [
|
|
4134
|
+
"dist",
|
|
4135
|
+
"commands",
|
|
4136
|
+
"service",
|
|
4137
|
+
"uninstall.js"
|
|
4138
|
+
]
|
|
4139
|
+
},
|
|
4140
4140
|
"skills:export-approved": {
|
|
4141
4141
|
"aliases": [],
|
|
4142
4142
|
"args": {},
|
|
@@ -4842,5 +4842,5 @@
|
|
|
4842
4842
|
]
|
|
4843
4843
|
}
|
|
4844
4844
|
},
|
|
4845
|
-
"version": "0.17.
|
|
4845
|
+
"version": "0.17.3"
|
|
4846
4846
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rulemetric/cli",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -80,9 +80,9 @@
|
|
|
80
80
|
"postgres": "^3.4.0",
|
|
81
81
|
"react": "^19.0.0",
|
|
82
82
|
"zod": "^3.24.0",
|
|
83
|
-
"@rulemetric/
|
|
84
|
-
"@rulemetric/
|
|
85
|
-
"@rulemetric/skills-registry": "0.17.
|
|
83
|
+
"@rulemetric/proxy": "0.17.3",
|
|
84
|
+
"@rulemetric/hooks": "0.17.3",
|
|
85
|
+
"@rulemetric/skills-registry": "0.17.3"
|
|
86
86
|
},
|
|
87
87
|
"//deps": "Worker (`evals agent`) runtime deps: the @opentelemetry/* set, @sentry/node, and postgres are STATIC top-level imports loaded at worker startup (via bundled @rulemetric/{telemetry,db}) — they MUST be runtime deps or a clean `npm i -g` crashes with ModuleLoadError. `better-sqlite3` is optionalDependencies (below): it's a native module, lazy `require()`'d inside a try/catch (packages/session providers cursor/opencode) so a missing binary degrades gracefully — making it a hard dep would break `npm i -g` on platforms without prebuilt binaries. `resend` stays a devDep: lazy `await import('resend')` guarded by RESEND_API_KEY, which end-user workers never set (provider falls back to noop). Classification verified via import-graph scan of dist/commands/evals/agent.js + per-importer static/lazy check.",
|
|
88
88
|
"optionalDependencies": {
|
package/dist/chunk-274MXEKI.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as g,f as m}from"./chunk-5VWVQCNR.js";import{a as l}from"./chunk-ZLLER3HP.js";async function f(c,p){let r=l(e=>p?.logger?.info?.(e)??console.log(e),"log"),{projectPath:o}=c,i=`[cron_instruction_training] ${o}`;if(!o)return{skipped:"no-project-path"};let n=await m("/api/instruction-experiments/settle",{projectPath:o}),a=n.settled.map(e=>e.outcome),d=a.filter(e=>e==="graduated").length;for(let e of n.settled)r(`${i}: experiment ${e.experimentId} \u2192 ${e.outcome}`);n.examined>0&&r(`${i}: examined ${n.examined} running experiment(s) \u2014 ${n.settled.length} settled (${d} graduated), ${n.stillRunning} still gathering`);let t=await g(`/api/instruction-suggestions/trialable?projectPath=${encodeURIComponent(o)}`);for(let e of t.refused)r(`${i}: not trialling "${e.name}" \u2014 ${e.reason}`);if(t.candidates.length===0)return r(`${i}: no new trial started (${t.running}/${t.limits.maxConcurrent} running, ${t.slots} slot(s) free)`),{examined:n.examined,settled:n.settled.length,graduated:d,nominated:0,running:t.running,outcomes:a};let u=0;for(let e of t.candidates)try{let s=await m(`/api/instruction-suggestions/${e.id}/test`,{});if(s.existing){r(`${i}: comparison already recorded for "${e.name}" (${s.evalJobId})`);continue}u+=1,r(`${i}: queued bounded comparison and live-study preparation for "${e.name}"`)}catch(s){r(`${i}: could not measure "${e.name}" \u2014 ${s instanceof Error?s.message:String(s)}`)}return{examined:n.examined,settled:n.settled.length,graduated:d,nominated:u,queued:u,running:t.running,outcomes:a}}l(f,"cronInstructionTraining");export{f as a};
|
package/dist/chunk-43TRZXJP.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as te}from"./chunk-5U5SHJJA.js";import{b as se}from"./chunk-IEQDLURA.js";import{d as ae,e as ie,f as le}from"./chunk-KINIFUZQ.js";import{a as G}from"./chunk-QRKMRG6W.js";import{a as x}from"./chunk-D7L7IMJQ.js";import{a as V}from"./chunk-BQVUZ6VE.js";import{a as F}from"./chunk-QJZ4DMVQ.js";import{a as $}from"./chunk-URUHD4OI.js";import{a as J}from"./chunk-YGFZ6BLU.js";import{a as X}from"./chunk-BCPIY47G.js";import{b as U}from"./chunk-NLUHMHPM.js";import{a as q}from"./chunk-FTCC4OZ4.js";import{a as Q}from"./chunk-WLLIFRRE.js";import{a as K}from"./chunk-ZYGBABMZ.js";import{b as B}from"./chunk-5RBLIVBF.js";import{a as re}from"./chunk-NSO2EBYE.js";import{e as T}from"./chunk-2C7CFCMM.js";import{b as Y}from"./chunk-WSUKOU3X.js";import{c as C}from"./chunk-A6XQSO62.js";import{a as j}from"./chunk-IPNBW7ZW.js";import{a as Z}from"./chunk-GQYF2WVE.js";import{a as ee}from"./chunk-274MXEKI.js";import{a as L}from"./chunk-ANLPPIMS.js";import{a as ne}from"./chunk-N2PUNIWM.js";import{a as z}from"./chunk-MJLW5KN2.js";import{d as P}from"./chunk-SW24KZ5C.js";import{a as oe}from"./chunk-RWQG25JU.js";import{b as A,c as W,f as o,g as E,i as O,j as b}from"./chunk-3ZHBOILE.js";import{k as N}from"./chunk-ICLAHFKK.js";import{d as M}from"./chunk-GPBN4ROE.js";import{b as y,e as H,f as D}from"./chunk-5VWVQCNR.js";import{a as l}from"./chunk-ZLLER3HP.js";var R=null,S=new Map,ge={process_eval:$,process_suggestion_eval:V,process_insights:J,process_launch:U,process_send_message:K,process_conversation:F,process_session_goal:G,distill_memories:Y,memory_ab:q,process_run_cleanup:Q,cron_refine_cases:ne,cron_retire_unused_skills:re,cron_reconcile_attribution:L,cron_suggest_instructions:T,cron_refresh_skills:P,cron_refresh_pricing:z,cron_eval_autorun:Z,process_suggestion_adoption:x,cron_auto_accept_suggestions:j,cron_instruction_training:ee,cron_instruction_evolution:N,process_judge_review:X,harbor_ab:C},de=500,ce=1e4,ue=Object.keys(ge),ke=new Set([]);function ve(e=process.env){return e.DATABASE_URL?ue:ue.filter(t=>!ke.has(t))}l(ve,"availableCapabilities");var we=3e4,he=3e4;async function be(e,t,s=M(),i){let d=[...s.claudeBin?["claude"]:[],...s.codexBin?["codex"]:[],...s.piBin?["pi"]:[]],c=`capabilities=${encodeURIComponent(e.join(","))}&waitMs=${t}&measurementProtocol=1&studyProtocol=1&scopedCollector=2&memorySnapshots=1&boundedAutorun=1&measurementEngines=${encodeURIComponent(d.join(","))}`,u=await H(`/api/work/next?${c}${i?`&launchMode=${i}`:""}`);return u==null||typeof u=="string"?null:u}l(be,"pollForWork");function Se(e,t,s){return{logger:{info:l(i=>t(i),"info"),warn:l(i=>t(i),"warn"),error:l(i=>t(i),"error")},job:{attempts:e},leaseSignal:s}}l(Se,"makeHelpers");async function Ie(e,t,s,i){let d=ge[e.kind],c=Date.now();if(o(s,{event:"claim",jobId:e.id,kind:e.kind,attempts:e.attempts}),!d){let n=`unknown kind: ${e.kind}`;o(s,{event:"fail",jobId:e.id,kind:e.kind,terminal:!0,error:n}),await D(`/api/work/${e.id}/fail`,{leaseToken:e.leaseToken,error:n,terminal:!0}).catch(()=>{});return}let u=new AbortController,m=!1,k,g=l(()=>{m||(o(s,{event:"heartbeat",jobId:e.id}),b(`/api/work/${e.id}/heartbeat`,{leaseToken:e.leaseToken},{budgetMs:Math.min(W,Math.max(0,t-1e3)),signal:i,log:s,event:"heartbeat",jobId:e.id}).then(n=>{if(!(n.ok||m)){if(O(n.error)){m=!0,k!==void 0&&clearInterval(k),o(s,{event:"lease_lost",jobId:e.id,kind:e.kind,elapsedMs:Date.now()-c,error:n.error instanceof Error?n.error.message:String(n.error)}),u.abort(new Error(`lease lost for job ${e.id} (${e.kind}); stop work`));return}o(s,{event:"heartbeat_error",jobId:e.id,attempts:n.attempts,error:n.error instanceof Error?n.error.message:String(n.error)})}}))},"beat");k=setInterval(g,t),S.set(e.id,g);let a;try{let n=Se(e.attempts,s,u.signal);a={kind:"complete",result:await d(e.payload,n)??{}}}catch(n){let v=R?.pausesSince(c)??[],_=le(v),w=n instanceof Error?n.message:String(n),r=B(n),p=!r&&ie(v);a={kind:"fail",message:_?`${_}; ${w}`:w,pausedDuringJob:!!_,terminal:r,hostSuspended:p}}try{if(m)o(s,{event:"lease_lost_stop",jobId:e.id,kind:e.kind,durationMs:Date.now()-c,handlerOutcome:a.kind,...a.kind==="fail"?{error:a.message}:{}});else if(a.kind==="complete"){o(s,{event:"complete",jobId:e.id,kind:e.kind,durationMs:Date.now()-c});let n=await b(`/api/work/${e.id}/complete`,{leaseToken:e.leaseToken,result:a.result},{budgetMs:A,signal:i,log:s,event:"complete_post",jobId:e.id});n.ok||o(s,{event:"complete_post_error",jobId:e.id,kind:e.kind,attempts:n.attempts,error:n.error instanceof Error?n.error.message:String(n.error)})}else{o(s,{event:"fail",jobId:e.id,kind:e.kind,durationMs:Date.now()-c,terminal:a.terminal,error:a.message,...a.pausedDuringJob?{pausedDuringJob:!0}:{},...a.hostSuspended?{hostSuspended:!0}:{}});let n=await b(`/api/work/${e.id}/fail`,{leaseToken:e.leaseToken,error:a.message,terminal:a.terminal,hostSuspended:a.hostSuspended},{budgetMs:A,signal:i,log:s,event:"fail_post",jobId:e.id});n.ok||o(s,{event:"fail_post_error",jobId:e.id,attempts:n.attempts,error:n.error instanceof Error?n.error.message:String(n.error)})}}finally{clearInterval(k),S.delete(e.id)}}l(Ie,"runOne");var pe=new Set(["process_launch","process_eval","process_suggestion_eval","process_conversation","process_insights","process_session_goal","distill_memories","memory_ab","cron_suggest_instructions","cron_eval_autorun","cron_instruction_evolution","process_judge_review","harbor_ab"]),me=new Set(["cron_refresh_skills"]);async function rn(e){let t=e.log??(()=>{}),s=e.pollWaitMs??we,i=e.heartbeatIntervalMs??he,d=e.capabilities??ve();o(t,{event:"agent_start",capabilities:d,pollWaitMs:s,heartbeatIntervalMs:i});try{let r=se();r.removed.length>0&&o(t,{event:"eval_worktrees_swept",removed:r.removed.length})}catch(r){o(t,{event:"eval_worktree_sweep_failed",error:r instanceof Error?r.message:String(r)})}R=ae({signal:e.signal,onPause:l(r=>{o(t,{event:"machine_pause",...r,jobIds:[...S.keys()]});for(let p of S.values())p()},"onPause")});let c=oe(d,e.signal,t,e.version,()=>R);te({signal:e.signal,log:t}).catch(r=>{o(t,{event:"tt_heartbeat_fatal",error:r instanceof Error?r.message:String(r)})});let u=5*6e4,m=0,k=l(()=>{if(!e.readInstalledVersion||!e.version)return!1;let r=Date.now();if(r-m<u)return!1;m=r;let p=e.readInstalledVersion();return!!(p&&p!==e.version)},"versionDrifted"),g=new AbortController,a=g.signal;e.signal.aborted?g.abort():e.signal.addEventListener("abort",()=>g.abort(),{once:!0});let n=l(async(r,p,_e)=>{let f=de;for(;!a.aborted;){if(k()){o(t,{event:"agent_version_drift",bootVersion:e.version,installedVersion:e.readInstalledVersion?.()??null}),g.abort(),e.onVersionDrift?.();break}let I=null;try{I=await be([...p],s,void 0,_e)}catch(h){let fe=h instanceof y?h.statusCode:void 0;if(o(t,{event:"poll_error",lane:r,status:fe,error:h instanceof Error?h.message:String(h)}),!await E(f,a))break;f=Math.min(f*2,ce);continue}if(!I){if(o(t,{event:"poll_204",lane:r}),!await E(f,a))break;f=Math.min(f*2,ce);continue}f=de,await Ie(I,i,t,a)}},"runLane"),v=d.filter(r=>pe.has(r)),_=d.filter(r=>(r==="process_launch"||!pe.has(r))&&!me.has(r)),w=d.filter(r=>me.has(r));o(t,{event:"agent_lanes",heavy:v.length,fast:_.length,background:w.length}),await Promise.all([...v.length?[n("heavy",v,"headless")]:[],..._.length?[n("fast",_,"interactive")]:[],...w.length?[n("background",w)]:[]]),await c.shutdown(),o(t,{event:"agent_stop"})}l(rn,"runAgentLoop");export{ge as a,ue as b,ve as c,be as d,rn as e};
|
package/dist/chunk-LARY6ZFT.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as T}from"./chunk-JP6ULOEX.js";import{d as k}from"./chunk-SVZYRGO5.js";import{b as f}from"./chunk-WULEBQPI.js";import{c as C,d as b}from"./chunk-GPBN4ROE.js";import{a as u}from"./chunk-ZLLER3HP.js";import{spawn as M}from"node:child_process";var m=["claude","codex","pi"],O=["--strict-mcp-config","--mcp-config",'{"mcpServers":{}}'];function L(e,t=process.env){if(e){if(m.includes(e))return e;throw new Error(`Eval engine "${String(e)}" is not known (expected one of: ${m.join(", ")})`)}let r=t.RULEMETRIC_EVAL_ENGINE?.trim().toLowerCase();if(!r)return"claude";if(m.includes(r))return r;throw new Error(`RULEMETRIC_EVAL_ENGINE="${t.RULEMETRIC_EVAL_ENGINE}" is not a known engine (expected one of: ${m.join(", ")})`)}u(L,"resolveEvalEngine");function h(e,t=process.env){return e?.trim()||t.RULEMETRIC_CODEX_MODEL?.trim()||b().codexConfiguredModel||C}u(h,"resolveCodexEvalModel");function F(e){try{let t=JSON.parse(e),r=t.result??t.content??e,i=t.usage?.total_tokens??(t.usage?.input_tokens??0)+(t.usage?.output_tokens??0)+(t.usage?.cache_creation_input_tokens??0)+(t.usage?.cache_read_input_tokens??0),n;if(t.modelUsage&&typeof t.modelUsage=="object"){let o=-1;for(let[l,d]of Object.entries(t.modelUsage)){let s=typeof d?.outputTokens=="number"?d.outputTokens:0;s>o&&(o=s,n=l)}}return{output:r,totalTokens:i,model:n,...t.usage&&typeof t.usage=="object"&&!Array.isArray(t.usage)?{usage:t.usage}:{}}}catch{return{output:e,totalTokens:0}}}u(F,"parseClaudeJsonOutput");function S(e){let{prompt:t,targetContent:r,systemPrompt:i,model:n}=e,o=["-p",t,"--output-format","json","--settings",JSON.stringify({disableAllHooks:!0,...e.writableFixture?{permissions:{blockReadsOutsideWorkingDirectories:!0},sandbox:{enabled:!0,failIfUnavailable:!0,autoAllowBashIfSandboxed:!0,allowUnsandboxedCommands:!1,excludedCommands:[],filesystem:{disabled:!1},network:{allowedDomains:[],strictAllowlist:!0}}}:{}})];o.push(...O),e.writableFixture&&o.push("--safe-mode","--restricted","--tools","Read,Write,Edit,Bash","--permission-mode","acceptEdits","--allowedTools","Read,Write,Edit,Bash");let l=r??i;return l&&o.push(e.appendTarget?"--append-system-prompt":"--system-prompt",l),n&&o.push("--model",n),o}u(S,"buildClaudeArgs");function N(e,t,r,i){let n=t.trim()||r.trim()||i.trim()||"(no output on stderr or stdout)";return`Exit code ${e}: ${n.slice(0,1e3)}`}u(N,"describeExitFailure");async function I(e){let{prompt:t,targetContent:r,systemPrompt:i,workDir:n,timeout:o,model:l}=e,d=r??i,s=await k({prompt:t,systemPrompt:d,model:h(l),writableFixture:e.writableFixture,timeout:o,workDir:n});return{output:s.output,exitCode:s.exitCode,durationMs:s.durationMs,totalTokens:s.usage?.totalTokens??0,model:s.model,engine:"codex",delivery:d?"prompt_prefix":"none",error:s.error}}u(I,"executeCodexArm");async function U(e){let t=e.targetContent??e.systemPrompt,r=await T({prompt:e.prompt,...e.appendTarget?{appendSystemPrompt:t}:{systemPrompt:t},ignoreContextFiles:e.ignoreContextFiles,model:e.model,timeout:e.timeout,workDir:e.workDir});return{output:r.output,exitCode:r.exitCode,durationMs:r.durationMs,totalTokens:r.usage?.totalTokens??0,model:r.model,provider:r.provider,costUsd:r.costUsd,engine:"pi",delivery:t?"system_prompt":"none",error:r.error}}u(U,"executePiArm");async function W(e){let{prompt:t,targetContent:r,systemPrompt:i,workDir:n=process.cwd(),timeout:o=12e4,model:l}=e,d=L(e.engine);if(d==="codex")return I({...e,workDir:n,timeout:o});if(d==="pi")return U({...e,workDir:n,timeout:o});let s=S({prompt:t,targetContent:r,systemPrompt:i,model:l,appendTarget:e.appendTarget,writableFixture:e.writableFixture}),g=r??i?"system_prompt":"none",E=Date.now();return new Promise(x=>{let _=f(),p=M("claude",s,{cwd:n,env:_,stdio:["ignore","pipe","pipe"]}),c="",v="";p.stdout.on("data",a=>{c+=a.toString()}),p.stderr.on("data",a=>{v+=a.toString()});let y=setTimeout(()=>{p.kill("SIGTERM"),x({output:c,exitCode:null,durationMs:Date.now()-E,totalTokens:0,engine:"claude",delivery:g,error:`Timed out after ${o}ms`})},o);p.on("close",a=>{clearTimeout(y);let P=Date.now()-E,{output:w,totalTokens:R,model:A,usage:D}=F(c);x({output:w,exitCode:a,durationMs:P,totalTokens:R,usage:D,model:A,engine:"claude",delivery:g,error:a!==0?N(a,v,w,c):void 0})}),p.on("error",a=>{clearTimeout(y),x({output:"",exitCode:null,durationMs:Date.now()-E,totalTokens:0,engine:"claude",delivery:g,error:`Failed to spawn claude: ${a.message}`})})})}u(W,"executeEval");export{O as a,L as b,h as c,F as d,S as e,N as f,W as g};
|