@rulemetric/cli 0.7.3 → 0.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base-command.js +1 -14
- package/dist/chunk-2TC6WCUT.js +34 -0
- package/dist/chunk-2UC3ULIG.js +1 -0
- package/dist/chunk-3AV3GTMP.js +1 -0
- package/dist/chunk-4Z5ECCJE.js +1 -0
- package/dist/chunk-5RBLIVBF.js +1 -0
- package/dist/chunk-67QCYUJU.js +1 -0
- package/dist/chunk-6QKI756T.js +2 -0
- package/dist/chunk-6V4WM73L.js +1 -0
- package/dist/chunk-6XEC6474.js +1 -0
- package/dist/chunk-72XLQE3X.js +2 -0
- package/dist/chunk-7DFNBRLY.js +61 -0
- package/dist/chunk-7XQ4VPLC.js +2 -0
- package/dist/chunk-AHRHCERJ.js +1 -0
- package/dist/chunk-ARNZQBMX.js +1 -0
- package/dist/chunk-CADKBP3D.js +58 -0
- package/dist/chunk-CDI5CCHU.js +1 -0
- package/dist/chunk-CNQ5DTNC.js +1 -0
- package/dist/chunk-CRAKDQ4H.js +1 -0
- package/dist/chunk-DNF4HDI6.js +14 -0
- package/dist/chunk-DSO2U4Y6.js +56 -0
- package/dist/chunk-DT4GKEP5.js +5 -0
- package/dist/chunk-DVN7GFJG.js +1 -0
- package/dist/chunk-E4SFUPYR.js +15 -0
- package/dist/chunk-EUHNCVJQ.js +33 -0
- package/dist/chunk-F2VP4B4J.js +1 -0
- package/dist/chunk-FEHM5OKW.js +1 -0
- package/dist/chunk-FHVBTDBM.js +69 -0
- package/dist/chunk-GBMF3TP6.js +1 -0
- package/dist/chunk-GY5IJ4RS.js +1 -0
- package/dist/chunk-HOHD5HY2.js +5 -0
- package/dist/chunk-HP2BUPGS.js +24 -0
- package/dist/{chunk-OQBBVTDG.js → chunk-I2DZGJRR.js} +6 -71
- package/dist/chunk-I4YJ7NTX.js +1 -0
- package/dist/chunk-IY5NXR3N.js +1 -0
- package/dist/chunk-IZTIYR5Q.js +2 -0
- package/dist/chunk-KKDHD4XA.js +2 -0
- package/dist/chunk-LQRYQE6Q.js +4 -0
- package/dist/chunk-M6AJDVCL.js +5 -0
- package/dist/chunk-MGHFDHHM.js +1 -0
- package/dist/chunk-ML36XQW7.js +1 -0
- package/dist/chunk-MODXEGCU.js +1 -0
- package/dist/chunk-MVM6OGAF.js +4 -0
- package/dist/chunk-N7ODX6PO.js +1 -0
- package/dist/chunk-NBTC5FNV.js +1 -0
- package/dist/chunk-NJ5UED3H.js +1 -0
- package/dist/chunk-NVKX36YN.js +3 -0
- package/dist/chunk-NVOTOQBA.js +1 -0
- package/dist/chunk-O7ZMHCMG.js +31 -0
- package/dist/chunk-OMXUK4M6.js +1 -0
- package/dist/chunk-PZS2KOU7.js +1 -0
- package/dist/chunk-RSKQRVPJ.js +1 -0
- package/dist/chunk-RTEATXTP.js +1 -0
- package/dist/chunk-RTWRHIKY.js +7 -0
- package/dist/chunk-RVO4HV3M.js +1 -0
- package/dist/chunk-SBILN45P.js +1 -0
- package/dist/chunk-SZ62CP55.js +1 -0
- package/dist/chunk-T3W5N3BP.js +2 -0
- package/dist/chunk-TDD7IOV2.js +1 -0
- package/dist/chunk-TIQ7DQ3M.js +1 -0
- package/dist/chunk-TU2AR6XO.js +1 -0
- package/dist/chunk-UF6US7VU.js +1 -0
- package/dist/chunk-V5QFOF4F.js +9 -0
- package/dist/chunk-V5U3E4BZ.js +1 -0
- package/dist/chunk-VAFAH6QL.js +1 -0
- package/dist/chunk-VMWY7KHH.js +1 -0
- package/dist/chunk-VUGRXM7R.js +1 -0
- package/dist/{chunk-XZXS2W24.js → chunk-VWEXKDWG.js} +10 -56
- package/dist/chunk-W2MV25SB.js +1 -0
- package/dist/chunk-WJ3H73G6.js +1 -0
- package/dist/chunk-WJUQBMTF.js +9 -0
- package/dist/chunk-WLVQJH4E.js +1 -0
- package/dist/chunk-WPJ2BND4.js +1 -0
- package/dist/chunk-WSCK4WNK.js +1 -0
- package/dist/chunk-Y65CSJFF.js +3 -0
- package/dist/chunk-ZL4MZMUK.js +34 -0
- package/dist/chunk-ZLLER3HP.js +1 -0
- package/dist/chunk-ZXF5NE54.js +1 -0
- package/dist/commands/antigravity/backfill.js +2 -136
- package/dist/commands/auth/create-key.js +1 -52
- package/dist/commands/auth/login.js +1 -85
- package/dist/commands/auth/logout.js +1 -29
- package/dist/commands/auth/revoke-key.js +1 -33
- package/dist/commands/auth/signup.js +1 -89
- package/dist/commands/auth/status.js +1 -42
- package/dist/commands/catalog/index.js +2 -52
- package/dist/commands/catalog/recommend.js +3 -43
- package/dist/commands/convert.js +1 -75
- package/dist/commands/converters.js +1 -54
- package/dist/commands/crons/list.js +1 -41
- package/dist/commands/crons/run.js +2 -76
- package/dist/commands/dashboard.js +1 -46
- package/dist/commands/diagnostics.js +1 -117
- package/dist/commands/eval-targets/create.js +1 -53
- package/dist/commands/eval-targets/list.js +1 -54
- package/dist/commands/evals/agent.js +3 -310
- package/dist/commands/evals/benchmark.js +6 -73
- package/dist/commands/evals/compare.js +13 -96
- package/dist/commands/evals/create.js +1 -67
- package/dist/commands/evals/optimize-description.js +25 -239
- package/dist/commands/evals/optimize.js +5 -211
- package/dist/commands/evals/run.js +3 -183
- package/dist/commands/gateway/ensure.js +1 -104
- package/dist/commands/hooks/emit-instructions.js +1 -25
- package/dist/commands/hooks/install.js +1 -442
- package/dist/commands/hooks/run.js +3 -81
- package/dist/commands/hooks/uninstall.js +2 -156
- package/dist/commands/import.js +1 -66
- package/dist/commands/instructions/create.js +1 -74
- package/dist/commands/instructions/delete.js +1 -55
- package/dist/commands/instructions/fork.js +1 -34
- package/dist/commands/instructions/get.js +1 -68
- package/dist/commands/instructions/list.js +1 -65
- package/dist/commands/instructions/promote.js +1 -42
- package/dist/commands/instructions/pull.js +1 -39
- package/dist/commands/instructions/upstream.js +1 -38
- package/dist/commands/instructions/versions.js +1 -53
- package/dist/commands/launcher.js +1 -40
- package/dist/commands/org/current.js +1 -77
- package/dist/commands/org/list.js +1 -52
- package/dist/commands/org/switch.js +1 -71
- package/dist/commands/packs/add-instruction.js +1 -37
- package/dist/commands/packs/apply.js +1 -39
- package/dist/commands/packs/create.js +1 -50
- package/dist/commands/packs/fork.js +1 -34
- package/dist/commands/packs/get.js +3 -56
- package/dist/commands/packs/list.js +1 -66
- package/dist/commands/packs/remove-instruction.js +1 -35
- package/dist/commands/proxy/env.js +3 -131
- package/dist/commands/proxy/logs.js +3 -85
- package/dist/commands/proxy/restart.js +1 -35
- package/dist/commands/proxy/setup.js +15 -454
- package/dist/commands/proxy/start.js +10 -333
- package/dist/commands/proxy/status.js +1 -78
- package/dist/commands/proxy/stop.js +1 -94
- package/dist/commands/research/backfill.js +1 -59
- package/dist/commands/research/tail-transcript.js +1 -70
- package/dist/commands/service/install.js +57 -796
- package/dist/commands/service/status.js +1 -180
- package/dist/commands/service/uninstall.js +1 -119
- package/dist/commands/sessions/analyze.js +3 -48
- package/dist/commands/sessions/end.js +2 -85
- package/dist/commands/sessions/import.js +1 -46
- package/dist/commands/sessions/list.js +1 -48
- package/dist/commands/sessions/start.js +3 -90
- package/dist/commands/setup.js +3 -150
- package/dist/commands/skills/export-approved.js +1 -46
- package/dist/commands/skills/install.js +4 -107
- package/dist/commands/skills/list.js +4 -65
- package/dist/commands/skills/publish.js +2 -98
- package/dist/commands/skills/search.js +3 -72
- package/dist/commands/skills/update.js +3 -55
- package/dist/commands/suggestions/accept.js +8 -84
- package/dist/commands/suggestions/dismiss.js +1 -45
- package/dist/commands/suggestions/list.js +1 -61
- package/dist/commands/suggestions/refresh.js +1 -27
- package/dist/cursor-T7AMCMKS.js +13 -0
- package/dist/dashboard/Dashboard.js +1 -243
- package/dist/dashboard/data.js +1 -15
- package/dist/dashboard/launcher/ActiveJobsList.js +1 -10
- package/dist/dashboard/launcher/LauncherOverlay.js +1 -16
- package/dist/dashboard/launcher/NewLaunchForm.js +1 -10
- package/dist/dashboard/launcher/api.js +1 -16
- package/dist/dashboard/launcher/tool-labels.js +1 -10
- package/dist/dashboard/launcher/types.js +0 -1
- package/dist/dashboard/launcher/useLaunchJobs.js +1 -11
- package/dist/dashboard/panels/friction.js +1 -10
- package/dist/dashboard/panels/insights.js +1 -10
- package/dist/dashboard/panels/instructions.js +1 -10
- package/dist/dashboard/panels/outcomes.js +1 -10
- package/dist/dashboard/panels/overview.js +1 -10
- package/dist/dashboard/panels/shared.js +1 -19
- package/dist/dashboard/types.js +1 -24
- package/dist/dist-FAVALJ5C.js +1 -0
- package/dist/index.js +1 -8
- package/dist/lib/active-org-refresh.js +1 -15
- package/dist/lib/active-org.js +1 -16
- package/dist/lib/agent-loop.js +1 -47
- package/dist/lib/antigravity-transcript.js +1 -22
- package/dist/lib/api-client.js +1 -23
- package/dist/lib/auth.js +1 -30
- package/dist/lib/capture-hosts.js +1 -8
- package/dist/lib/detect-languages.js +1 -8
- package/dist/lib/detect-tmux.js +1 -9
- package/dist/lib/diagnostics.js +1 -12
- package/dist/lib/editor-proxy-pins.js +1 -14
- package/dist/lib/ensure-api-key.js +1 -11
- package/dist/lib/eval-analyzer.js +1 -9
- package/dist/lib/eval-benchmark.js +1 -12
- package/dist/lib/eval-conversation-handler.js +1 -13
- package/dist/lib/eval-executor.js +1 -8
- package/dist/lib/eval-grader.js +1 -9
- package/dist/lib/eval-meta-judge.js +1 -9
- package/dist/lib/eval-trigger-tester.js +1 -11
- package/dist/lib/eval-worktree.js +1 -8
- package/dist/lib/gateway-entry.js +1 -61
- package/dist/lib/gateway-identity.js +1 -16
- package/dist/lib/gateway-lifecycle.js +1 -32
- package/dist/lib/gateway.js +1 -14
- package/dist/lib/handlers/cron-refresh-pricing.js +1 -0
- package/dist/lib/handlers/cron-refresh-skills.js +1 -8
- package/dist/lib/handlers/cron-suggest-instructions.js +1 -16
- package/dist/lib/handlers/process-announcement.js +1 -11
- package/dist/lib/handlers/process-changelog.js +1 -11
- package/dist/lib/handlers/process-conversation.js +1 -14
- package/dist/lib/handlers/process-eval.js +1 -15
- package/dist/lib/handlers/process-insights.js +1 -15
- package/dist/lib/handlers/process-launch.js +1 -16
- package/dist/lib/handlers/process-run-cleanup.js +1 -13
- package/dist/lib/handlers/process-send-message.js +1 -10
- package/dist/lib/handlers/process-session-goal.js +1 -12
- package/dist/lib/hooks-config.js +1 -81
- package/dist/lib/insights-prompts.js +1 -12
- package/dist/lib/instruction-snapshot.js +1 -8
- package/dist/lib/job-helpers.js +0 -1
- package/dist/lib/llm-client.js +1 -20
- package/dist/lib/manual-tasks-meta.js +1 -8
- package/dist/lib/manual-tasks.js +1 -80
- package/dist/lib/output.js +1 -12
- package/dist/lib/permanent-job-error.js +1 -10
- package/dist/lib/pid-identity.js +1 -14
- package/dist/lib/proxy-respawn.js +1 -12
- package/dist/lib/research-client.js +1 -12
- package/dist/lib/setup-steps.js +1 -33
- package/dist/lib/skills-loader.js +1 -8
- package/dist/lib/statusline-shim.js +1 -20
- package/dist/lib/telemetry.js +1 -16
- package/dist/lib/terminal-target-heartbeat.js +1 -15
- package/dist/lib/tmux.js +1 -16
- package/dist/lib/transcript-rate-limit-watcher.js +1 -22
- package/dist/lib/types.js +1 -8
- package/dist/lib/version-check.js +1 -12
- package/dist/lib/which.js +1 -8
- package/dist/lib/worktree.js +1 -17
- package/dist/opencode-QRJ3BH23.js +1 -0
- package/oclif.manifest.json +135 -135
- package/package.json +9 -8
- package/dist/base-command.js.map +0 -7
- package/dist/chunk-2HK7RGZB.js +0 -82
- package/dist/chunk-2HK7RGZB.js.map +0 -7
- package/dist/chunk-2ORJWTNZ.js +0 -307
- package/dist/chunk-2ORJWTNZ.js.map +0 -7
- package/dist/chunk-37LN5O7M.js +0 -59
- package/dist/chunk-37LN5O7M.js.map +0 -7
- package/dist/chunk-3S7223UR.js +0 -81
- package/dist/chunk-3S7223UR.js.map +0 -7
- package/dist/chunk-3TIMQ3O6.js +0 -96
- package/dist/chunk-3TIMQ3O6.js.map +0 -7
- package/dist/chunk-42GFSAJP.js +0 -32
- package/dist/chunk-42GFSAJP.js.map +0 -7
- package/dist/chunk-4BHDHHKL.js +0 -48
- package/dist/chunk-4BHDHHKL.js.map +0 -7
- package/dist/chunk-4D537GXE.js +0 -99
- package/dist/chunk-4D537GXE.js.map +0 -7
- package/dist/chunk-4LYCDS2N.js +0 -139
- package/dist/chunk-4LYCDS2N.js.map +0 -7
- package/dist/chunk-4SCZK7AL.js +0 -129
- package/dist/chunk-4SCZK7AL.js.map +0 -7
- package/dist/chunk-4XAWK6S2.js +0 -161
- package/dist/chunk-4XAWK6S2.js.map +0 -7
- package/dist/chunk-52WIYRZH.js +0 -73
- package/dist/chunk-52WIYRZH.js.map +0 -7
- package/dist/chunk-5BAOGNUH.js +0 -79
- package/dist/chunk-5BAOGNUH.js.map +0 -7
- package/dist/chunk-5EDMGK3W.js +0 -39
- package/dist/chunk-5EDMGK3W.js.map +0 -7
- package/dist/chunk-6NBS5XFS.js +0 -99
- package/dist/chunk-6NBS5XFS.js.map +0 -7
- package/dist/chunk-7LVVKQMZ.js +0 -98
- package/dist/chunk-7LVVKQMZ.js.map +0 -7
- package/dist/chunk-7NNFYWKK.js +0 -243
- package/dist/chunk-7NNFYWKK.js.map +0 -7
- package/dist/chunk-7NYKWN7U.js +0 -12
- package/dist/chunk-7NYKWN7U.js.map +0 -7
- package/dist/chunk-BO76WKJR.js +0 -42
- package/dist/chunk-BO76WKJR.js.map +0 -7
- package/dist/chunk-BRD5RUGM.js +0 -53
- package/dist/chunk-BRD5RUGM.js.map +0 -7
- package/dist/chunk-BT6Z6545.js +0 -43
- package/dist/chunk-BT6Z6545.js.map +0 -7
- package/dist/chunk-BZDKEQKU.js +0 -39
- package/dist/chunk-BZDKEQKU.js.map +0 -7
- package/dist/chunk-DGHWRQXL.js +0 -17
- package/dist/chunk-DGHWRQXL.js.map +0 -7
- package/dist/chunk-DIQUV5FR.js +0 -257
- package/dist/chunk-DIQUV5FR.js.map +0 -7
- package/dist/chunk-DMX5YOTM.js +0 -167
- package/dist/chunk-DMX5YOTM.js.map +0 -7
- package/dist/chunk-DNKSVWMD.js +0 -108
- package/dist/chunk-DNKSVWMD.js.map +0 -7
- package/dist/chunk-DQ3KELXD.js +0 -74
- package/dist/chunk-DQ3KELXD.js.map +0 -7
- package/dist/chunk-DUJSRBLP.js +0 -122
- package/dist/chunk-DUJSRBLP.js.map +0 -7
- package/dist/chunk-E3BIT53W.js +0 -154
- package/dist/chunk-E3BIT53W.js.map +0 -7
- package/dist/chunk-EARWG4EV.js +0 -22
- package/dist/chunk-EARWG4EV.js.map +0 -7
- package/dist/chunk-EI5BHWXA.js +0 -1662
- package/dist/chunk-EI5BHWXA.js.map +0 -7
- package/dist/chunk-EJ3YAFDP.js +0 -37
- package/dist/chunk-EJ3YAFDP.js.map +0 -7
- package/dist/chunk-EKJ2CABV.js +0 -76
- package/dist/chunk-EKJ2CABV.js.map +0 -7
- package/dist/chunk-EKP32DLN.js +0 -16
- package/dist/chunk-EKP32DLN.js.map +0 -7
- package/dist/chunk-EYPAAGN5.js +0 -51
- package/dist/chunk-EYPAAGN5.js.map +0 -7
- package/dist/chunk-F5N6CLJJ.js +0 -1995
- package/dist/chunk-F5N6CLJJ.js.map +0 -7
- package/dist/chunk-GIUBARWS.js +0 -99
- package/dist/chunk-GIUBARWS.js.map +0 -7
- package/dist/chunk-GQNJO2P2.js +0 -102
- package/dist/chunk-GQNJO2P2.js.map +0 -7
- package/dist/chunk-IJGF2ETG.js +0 -68
- package/dist/chunk-IJGF2ETG.js.map +0 -7
- package/dist/chunk-ILYDELUE.js +0 -46
- package/dist/chunk-ILYDELUE.js.map +0 -7
- package/dist/chunk-J6QFW4LD.js +0 -55
- package/dist/chunk-J6QFW4LD.js.map +0 -7
- package/dist/chunk-J7N3DLH6.js +0 -117
- package/dist/chunk-J7N3DLH6.js.map +0 -7
- package/dist/chunk-JFDWKLQC.js +0 -23
- package/dist/chunk-JFDWKLQC.js.map +0 -7
- package/dist/chunk-JULOLTZS.js +0 -61
- package/dist/chunk-JULOLTZS.js.map +0 -7
- package/dist/chunk-KJKBDQ4D.js +0 -220
- package/dist/chunk-KJKBDQ4D.js.map +0 -7
- package/dist/chunk-KRBQLMOP.js +0 -41
- package/dist/chunk-KRBQLMOP.js.map +0 -7
- package/dist/chunk-LXKPNATC.js +0 -624
- package/dist/chunk-LXKPNATC.js.map +0 -7
- package/dist/chunk-NSBPE2FW.js +0 -17
- package/dist/chunk-NSBPE2FW.js.map +0 -7
- package/dist/chunk-OCKHW72U.js +0 -55
- package/dist/chunk-OCKHW72U.js.map +0 -7
- package/dist/chunk-OKWCKCPE.js +0 -414
- package/dist/chunk-OKWCKCPE.js.map +0 -7
- package/dist/chunk-OO7JDFS4.js +0 -157
- package/dist/chunk-OO7JDFS4.js.map +0 -7
- package/dist/chunk-OQBBVTDG.js.map +0 -7
- package/dist/chunk-OQSQC7VB.js +0 -77
- package/dist/chunk-OQSQC7VB.js.map +0 -7
- package/dist/chunk-PED7L5GX.js +0 -92
- package/dist/chunk-PED7L5GX.js.map +0 -7
- package/dist/chunk-QJQS6TUN.js +0 -44
- package/dist/chunk-QJQS6TUN.js.map +0 -7
- package/dist/chunk-QN34TGD3.js +0 -83
- package/dist/chunk-QN34TGD3.js.map +0 -7
- package/dist/chunk-QSN77T7C.js +0 -250
- package/dist/chunk-QSN77T7C.js.map +0 -7
- package/dist/chunk-R56PH7YE.js +0 -78
- package/dist/chunk-R56PH7YE.js.map +0 -7
- package/dist/chunk-RAXRZYOB.js +0 -299
- package/dist/chunk-RAXRZYOB.js.map +0 -7
- package/dist/chunk-RH7NHVSK.js +0 -16
- package/dist/chunk-RH7NHVSK.js.map +0 -7
- package/dist/chunk-RMTT4KDY.js +0 -191
- package/dist/chunk-RMTT4KDY.js.map +0 -7
- package/dist/chunk-RQ2TMLKG.js +0 -142
- package/dist/chunk-RQ2TMLKG.js.map +0 -7
- package/dist/chunk-SO3T35U7.js +0 -80
- package/dist/chunk-SO3T35U7.js.map +0 -7
- package/dist/chunk-UKMLICWS.js +0 -51
- package/dist/chunk-UKMLICWS.js.map +0 -7
- package/dist/chunk-VA5FFOS7.js +0 -243
- package/dist/chunk-VA5FFOS7.js.map +0 -7
- package/dist/chunk-W2YERO7E.js +0 -170
- package/dist/chunk-W2YERO7E.js.map +0 -7
- package/dist/chunk-W53GKIZQ.js +0 -50
- package/dist/chunk-W53GKIZQ.js.map +0 -7
- package/dist/chunk-WA4MWYRW.js +0 -254
- package/dist/chunk-WA4MWYRW.js.map +0 -7
- package/dist/chunk-XC6M4CSW.js +0 -44
- package/dist/chunk-XC6M4CSW.js.map +0 -7
- package/dist/chunk-XK42ZBDE.js +0 -23
- package/dist/chunk-XK42ZBDE.js.map +0 -7
- package/dist/chunk-XUV6DDBF.js +0 -124
- package/dist/chunk-XUV6DDBF.js.map +0 -7
- package/dist/chunk-XZXS2W24.js.map +0 -7
- package/dist/chunk-Y3WD5CSW.js +0 -49
- package/dist/chunk-Y3WD5CSW.js.map +0 -7
- package/dist/chunk-Y4BJXXYV.js +0 -148
- package/dist/chunk-Y4BJXXYV.js.map +0 -7
- package/dist/chunk-YNIH3KMU.js +0 -121
- package/dist/chunk-YNIH3KMU.js.map +0 -7
- package/dist/chunk-ZUJBM6HE.js +0 -125
- package/dist/chunk-ZUJBM6HE.js.map +0 -7
- package/dist/commands/antigravity/backfill.js.map +0 -7
- package/dist/commands/auth/create-key.js.map +0 -7
- package/dist/commands/auth/login.js.map +0 -7
- package/dist/commands/auth/logout.js.map +0 -7
- package/dist/commands/auth/revoke-key.js.map +0 -7
- package/dist/commands/auth/signup.js.map +0 -7
- package/dist/commands/auth/status.js.map +0 -7
- package/dist/commands/catalog/index.js.map +0 -7
- package/dist/commands/catalog/recommend.js.map +0 -7
- package/dist/commands/convert.js.map +0 -7
- package/dist/commands/converters.js.map +0 -7
- package/dist/commands/crons/list.js.map +0 -7
- package/dist/commands/crons/run.js.map +0 -7
- package/dist/commands/dashboard.js.map +0 -7
- package/dist/commands/diagnostics.js.map +0 -7
- package/dist/commands/eval-targets/create.js.map +0 -7
- package/dist/commands/eval-targets/list.js.map +0 -7
- package/dist/commands/evals/agent.js.map +0 -7
- package/dist/commands/evals/benchmark.js.map +0 -7
- package/dist/commands/evals/compare.js.map +0 -7
- package/dist/commands/evals/create.js.map +0 -7
- package/dist/commands/evals/optimize-description.js.map +0 -7
- package/dist/commands/evals/optimize.js.map +0 -7
- package/dist/commands/evals/run.js.map +0 -7
- package/dist/commands/gateway/ensure.js.map +0 -7
- package/dist/commands/hooks/emit-instructions.js.map +0 -7
- package/dist/commands/hooks/install.js.map +0 -7
- package/dist/commands/hooks/run.js.map +0 -7
- package/dist/commands/hooks/uninstall.js.map +0 -7
- package/dist/commands/import.js.map +0 -7
- package/dist/commands/instructions/create.js.map +0 -7
- package/dist/commands/instructions/delete.js.map +0 -7
- package/dist/commands/instructions/fork.js.map +0 -7
- package/dist/commands/instructions/get.js.map +0 -7
- package/dist/commands/instructions/list.js.map +0 -7
- package/dist/commands/instructions/promote.js.map +0 -7
- package/dist/commands/instructions/pull.js.map +0 -7
- package/dist/commands/instructions/upstream.js.map +0 -7
- package/dist/commands/instructions/versions.js.map +0 -7
- package/dist/commands/launcher.js.map +0 -7
- package/dist/commands/org/current.js.map +0 -7
- package/dist/commands/org/list.js.map +0 -7
- package/dist/commands/org/switch.js.map +0 -7
- package/dist/commands/packs/add-instruction.js.map +0 -7
- package/dist/commands/packs/apply.js.map +0 -7
- package/dist/commands/packs/create.js.map +0 -7
- package/dist/commands/packs/fork.js.map +0 -7
- package/dist/commands/packs/get.js.map +0 -7
- package/dist/commands/packs/list.js.map +0 -7
- package/dist/commands/packs/remove-instruction.js.map +0 -7
- package/dist/commands/proxy/env.js.map +0 -7
- package/dist/commands/proxy/logs.js.map +0 -7
- package/dist/commands/proxy/restart.js.map +0 -7
- package/dist/commands/proxy/setup.js.map +0 -7
- package/dist/commands/proxy/start.js.map +0 -7
- package/dist/commands/proxy/status.js.map +0 -7
- package/dist/commands/proxy/stop.js.map +0 -7
- package/dist/commands/research/backfill.js.map +0 -7
- package/dist/commands/research/tail-transcript.js.map +0 -7
- package/dist/commands/service/install.js.map +0 -7
- package/dist/commands/service/status.js.map +0 -7
- package/dist/commands/service/uninstall.js.map +0 -7
- package/dist/commands/sessions/analyze.js.map +0 -7
- package/dist/commands/sessions/end.js.map +0 -7
- package/dist/commands/sessions/import.js.map +0 -7
- package/dist/commands/sessions/list.js.map +0 -7
- package/dist/commands/sessions/start.js.map +0 -7
- package/dist/commands/setup.js.map +0 -7
- package/dist/commands/skills/export-approved.js.map +0 -7
- package/dist/commands/skills/install.js.map +0 -7
- package/dist/commands/skills/list.js.map +0 -7
- package/dist/commands/skills/publish.js.map +0 -7
- package/dist/commands/skills/search.js.map +0 -7
- package/dist/commands/skills/update.js.map +0 -7
- package/dist/commands/suggestions/accept.js.map +0 -7
- package/dist/commands/suggestions/dismiss.js.map +0 -7
- package/dist/commands/suggestions/list.js.map +0 -7
- package/dist/commands/suggestions/refresh.js.map +0 -7
- package/dist/cursor-BGQJ4CWI.js +0 -134
- package/dist/cursor-BGQJ4CWI.js.map +0 -7
- package/dist/dashboard/Dashboard.js.map +0 -7
- package/dist/dashboard/data.js.map +0 -7
- package/dist/dashboard/launcher/ActiveJobsList.js.map +0 -7
- package/dist/dashboard/launcher/LauncherOverlay.js.map +0 -7
- package/dist/dashboard/launcher/NewLaunchForm.js.map +0 -7
- package/dist/dashboard/launcher/api.js.map +0 -7
- package/dist/dashboard/launcher/tool-labels.js.map +0 -7
- package/dist/dashboard/launcher/types.js.map +0 -7
- package/dist/dashboard/launcher/useLaunchJobs.js.map +0 -7
- package/dist/dashboard/panels/friction.js.map +0 -7
- package/dist/dashboard/panels/insights.js.map +0 -7
- package/dist/dashboard/panels/instructions.js.map +0 -7
- package/dist/dashboard/panels/outcomes.js.map +0 -7
- package/dist/dashboard/panels/overview.js.map +0 -7
- package/dist/dashboard/panels/shared.js.map +0 -7
- package/dist/dashboard/types.js.map +0 -7
- package/dist/dist-UNYP5PJR.js +0 -56
- package/dist/dist-UNYP5PJR.js.map +0 -7
- package/dist/index.js.map +0 -7
- package/dist/lib/active-org-refresh.js.map +0 -7
- package/dist/lib/active-org.js.map +0 -7
- package/dist/lib/agent-loop.js.map +0 -7
- package/dist/lib/antigravity-transcript.js.map +0 -7
- package/dist/lib/api-client.js.map +0 -7
- package/dist/lib/auth.js.map +0 -7
- package/dist/lib/capture-hosts.js.map +0 -7
- package/dist/lib/detect-languages.js.map +0 -7
- package/dist/lib/detect-tmux.js.map +0 -7
- package/dist/lib/diagnostics.js.map +0 -7
- package/dist/lib/editor-proxy-pins.js.map +0 -7
- package/dist/lib/ensure-api-key.js.map +0 -7
- package/dist/lib/eval-analyzer.js.map +0 -7
- package/dist/lib/eval-benchmark.js.map +0 -7
- package/dist/lib/eval-conversation-handler.js.map +0 -7
- package/dist/lib/eval-executor.js.map +0 -7
- package/dist/lib/eval-grader.js.map +0 -7
- package/dist/lib/eval-meta-judge.js.map +0 -7
- package/dist/lib/eval-trigger-tester.js.map +0 -7
- package/dist/lib/eval-worktree.js.map +0 -7
- package/dist/lib/gateway-entry.js.map +0 -7
- package/dist/lib/gateway-identity.js.map +0 -7
- package/dist/lib/gateway-lifecycle.js.map +0 -7
- package/dist/lib/gateway.js.map +0 -7
- package/dist/lib/handlers/cron-refresh-skills.js.map +0 -7
- package/dist/lib/handlers/cron-suggest-instructions.js.map +0 -7
- package/dist/lib/handlers/process-announcement.js.map +0 -7
- package/dist/lib/handlers/process-changelog.js.map +0 -7
- package/dist/lib/handlers/process-conversation.js.map +0 -7
- package/dist/lib/handlers/process-eval.js.map +0 -7
- package/dist/lib/handlers/process-insights.js.map +0 -7
- package/dist/lib/handlers/process-launch.js.map +0 -7
- package/dist/lib/handlers/process-run-cleanup.js.map +0 -7
- package/dist/lib/handlers/process-send-message.js.map +0 -7
- package/dist/lib/handlers/process-session-goal.js.map +0 -7
- package/dist/lib/hooks-config.js.map +0 -7
- package/dist/lib/insights-prompts.js.map +0 -7
- package/dist/lib/instruction-snapshot.js.map +0 -7
- package/dist/lib/job-helpers.js.map +0 -7
- package/dist/lib/llm-client.js.map +0 -7
- package/dist/lib/manual-tasks-meta.js.map +0 -7
- package/dist/lib/manual-tasks.js.map +0 -7
- package/dist/lib/output.js.map +0 -7
- package/dist/lib/permanent-job-error.js.map +0 -7
- package/dist/lib/pid-identity.js.map +0 -7
- package/dist/lib/proxy-respawn.js.map +0 -7
- package/dist/lib/research-client.js.map +0 -7
- package/dist/lib/setup-steps.js.map +0 -7
- package/dist/lib/skills-loader.js.map +0 -7
- package/dist/lib/statusline-shim.js.map +0 -7
- package/dist/lib/telemetry.js.map +0 -7
- package/dist/lib/terminal-target-heartbeat.js.map +0 -7
- package/dist/lib/tmux.js.map +0 -7
- package/dist/lib/transcript-rate-limit-watcher.js.map +0 -7
- package/dist/lib/types.js.map +0 -7
- package/dist/lib/version-check.js.map +0 -7
- package/dist/lib/which.js.map +0 -7
- package/dist/lib/worktree.js.map +0 -7
- package/dist/opencode-IQ7X5YMJ.js +0 -190
- package/dist/opencode-IQ7X5YMJ.js.map +0 -7
|
@@ -1,73 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
} from "../../chunk-2HK7RGZB.js";
|
|
8
|
-
import "../../chunk-R56PH7YE.js";
|
|
9
|
-
import "../../chunk-GQNJO2P2.js";
|
|
10
|
-
import "../../chunk-37LN5O7M.js";
|
|
11
|
-
import "../../chunk-EKJ2CABV.js";
|
|
12
|
-
import {
|
|
13
|
-
apiGet
|
|
14
|
-
} from "../../chunk-ZUJBM6HE.js";
|
|
15
|
-
import "../../chunk-W2YERO7E.js";
|
|
16
|
-
import "../../chunk-NSBPE2FW.js";
|
|
17
|
-
|
|
18
|
-
// src/commands/evals/benchmark.ts
|
|
19
|
-
import { Args, Flags } from "@oclif/core";
|
|
20
|
-
var EvalBenchmarkCommand = class _EvalBenchmarkCommand extends BaseCommand {
|
|
21
|
-
static description = "Aggregate eval runs into a benchmark for a target";
|
|
22
|
-
static examples = [
|
|
23
|
-
"<%= config.bin %> evals benchmark <target-id>",
|
|
24
|
-
"<%= config.bin %> evals benchmark <target-id> --iteration 2"
|
|
25
|
-
];
|
|
26
|
-
static args = {
|
|
27
|
-
targetId: Args.string({ description: "Eval target ID", required: true })
|
|
28
|
-
};
|
|
29
|
-
static flags = {
|
|
30
|
-
iteration: Flags.integer({ description: "Filter runs by iteration", default: 1 })
|
|
31
|
-
};
|
|
32
|
-
async run() {
|
|
33
|
-
const { args, flags } = await this.parse(_EvalBenchmarkCommand);
|
|
34
|
-
this.requireAuth();
|
|
35
|
-
const target = await apiGet(`/api/eval-targets/${args.targetId}`);
|
|
36
|
-
this.log(`Aggregating benchmark for "${target.name}" v${target.version}, iteration ${flags.iteration}`);
|
|
37
|
-
const result = await aggregateBenchmark(args.targetId, flags.iteration);
|
|
38
|
-
if (result.totalRuns === 0) {
|
|
39
|
-
this.error("No completed runs found. Run evals first with `rulemetric evals run`.");
|
|
40
|
-
}
|
|
41
|
-
this.log(`
|
|
42
|
-
Aggregated ${result.totalRuns} runs
|
|
43
|
-
`);
|
|
44
|
-
for (const [config, stats] of Object.entries(result.runSummary)) {
|
|
45
|
-
if (config === "delta") {
|
|
46
|
-
this.log(`
|
|
47
|
-
Delta (with_target - without_target):`);
|
|
48
|
-
for (const [metric, value] of Object.entries(stats)) {
|
|
49
|
-
this.log(` ${metric}: ${value}`);
|
|
50
|
-
}
|
|
51
|
-
continue;
|
|
52
|
-
}
|
|
53
|
-
this.log(`${config}:`);
|
|
54
|
-
for (const [metric, stat] of Object.entries(stats)) {
|
|
55
|
-
const s = stat;
|
|
56
|
-
this.log(` ${metric}: mean=${s.mean} stddev=${s.stddev} [${s.min}, ${s.max}]`);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
if (result.notes.length > 0) {
|
|
60
|
-
this.log("\nNotes:");
|
|
61
|
-
for (const note of result.notes) {
|
|
62
|
-
this.log(` - ${note}`);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
const benchmark = await postBenchmark(args.targetId, flags.iteration, result);
|
|
66
|
-
this.log(`
|
|
67
|
-
Benchmark saved: ${benchmark.id}`);
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
export {
|
|
71
|
-
EvalBenchmarkCommand as default
|
|
72
|
-
};
|
|
73
|
-
//# sourceMappingURL=benchmark.js.map
|
|
1
|
+
import{a as u,b as f}from"../../chunk-RVO4HV3M.js";import{a as d}from"../../chunk-LQRYQE6Q.js";import"../../chunk-IZTIYR5Q.js";import"../../chunk-CRAKDQ4H.js";import"../../chunk-WPJ2BND4.js";import"../../chunk-3AV3GTMP.js";import{d as l}from"../../chunk-TIQ7DQ3M.js";import"../../chunk-M6AJDVCL.js";import{a as m}from"../../chunk-ZLLER3HP.js";import{Args as b,Flags as $}from"@oclif/core";var o=class h extends d{static{m(this,"EvalBenchmarkCommand")}static description="Aggregate eval runs into a benchmark for a target";static examples=["<%= config.bin %> evals benchmark <target-id>","<%= config.bin %> evals benchmark <target-id> --iteration 2"];static args={targetId:b.string({description:"Eval target ID",required:!0})};static flags={iteration:$.integer({description:"Filter runs by iteration",default:1})};async run(){let{args:i,flags:a}=await this.parse(h);this.requireAuth();let g=await l(`/api/eval-targets/${i.targetId}`);this.log(`Aggregating benchmark for "${g.name}" v${g.version}, iteration ${a.iteration}`);let t=await u(i.targetId,a.iteration);t.totalRuns===0&&this.error("No completed runs found. Run evals first with `rulemetric evals run`."),this.log(`
|
|
2
|
+
Aggregated ${t.totalRuns} runs
|
|
3
|
+
`);for(let[e,c]of Object.entries(t.runSummary)){if(e==="delta"){this.log(`
|
|
4
|
+
Delta (with_target - without_target):`);for(let[n,s]of Object.entries(c))this.log(` ${n}: ${s}`);continue}this.log(`${e}:`);for(let[n,s]of Object.entries(c)){let r=s;this.log(` ${n}: mean=${r.mean} stddev=${r.stddev} [${r.min}, ${r.max}]`)}}if(t.notes.length>0){this.log(`
|
|
5
|
+
Notes:`);for(let e of t.notes)this.log(` - ${e}`)}let v=await f(i.targetId,a.iteration,t);this.log(`
|
|
6
|
+
Benchmark saved: ${v.id}`)}};export{o as default};
|
|
@@ -1,90 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
BaseCommand
|
|
6
|
-
} from "../../chunk-2HK7RGZB.js";
|
|
7
|
-
import "../../chunk-R56PH7YE.js";
|
|
8
|
-
import "../../chunk-GQNJO2P2.js";
|
|
9
|
-
import "../../chunk-37LN5O7M.js";
|
|
10
|
-
import "../../chunk-EKJ2CABV.js";
|
|
11
|
-
import {
|
|
12
|
-
apiGet
|
|
13
|
-
} from "../../chunk-ZUJBM6HE.js";
|
|
14
|
-
import "../../chunk-W2YERO7E.js";
|
|
15
|
-
import "../../chunk-NSBPE2FW.js";
|
|
16
|
-
|
|
17
|
-
// src/commands/evals/compare.ts
|
|
18
|
-
import { Args, Flags } from "@oclif/core";
|
|
19
|
-
var EvalCompareCommand = class _EvalCompareCommand extends BaseCommand {
|
|
20
|
-
static description = "Blind A/B comparison between two eval target versions";
|
|
21
|
-
static examples = [
|
|
22
|
-
"<%= config.bin %> evals compare <target-a> <target-b>"
|
|
23
|
-
];
|
|
24
|
-
static args = {
|
|
25
|
-
targetA: Args.string({ description: "First eval target ID", required: true }),
|
|
26
|
-
targetB: Args.string({ description: "Second eval target ID", required: true })
|
|
27
|
-
};
|
|
28
|
-
static flags = {
|
|
29
|
-
model: Flags.string({ description: "Model for execution and comparison" }),
|
|
30
|
-
timeout: Flags.integer({ description: "Timeout per eval in ms", default: 12e4 })
|
|
31
|
-
};
|
|
32
|
-
async run() {
|
|
33
|
-
const { args, flags } = await this.parse(_EvalCompareCommand);
|
|
34
|
-
this.requireAuth();
|
|
35
|
-
const [targetA, targetB] = await Promise.all([
|
|
36
|
-
apiGet(`/api/eval-targets/${args.targetA}`),
|
|
37
|
-
apiGet(`/api/eval-targets/${args.targetB}`)
|
|
38
|
-
]);
|
|
39
|
-
const evals = await apiGet(`/api/eval-targets/${args.targetA}/evals`);
|
|
40
|
-
if (evals.length === 0) {
|
|
41
|
-
this.error("No evals found for target A. Create some first.");
|
|
42
|
-
}
|
|
43
|
-
this.log(`Comparing "${targetA.name}" v${targetA.version} vs "${targetB.name}" v${targetB.version}`);
|
|
44
|
-
this.log(`Running ${evals.length} eval(s)...
|
|
45
|
-
`);
|
|
46
|
-
const isSwapped = Math.random() > 0.5;
|
|
47
|
-
const contentA = isSwapped ? targetB.content : targetA.content;
|
|
48
|
-
const contentB = isSwapped ? targetA.content : targetB.content;
|
|
49
|
-
const labelA = isSwapped ? targetB.name : targetA.name;
|
|
50
|
-
const labelB = isSwapped ? targetA.name : targetB.name;
|
|
51
|
-
const comparisons = [];
|
|
52
|
-
for (const eval_ of evals) {
|
|
53
|
-
this.log(`[${eval_.name}] Running A...`);
|
|
54
|
-
const resultA = await executeEval({
|
|
55
|
-
prompt: eval_.prompt,
|
|
56
|
-
targetContent: contentA,
|
|
57
|
-
timeout: flags.timeout,
|
|
58
|
-
model: flags.model
|
|
59
|
-
});
|
|
60
|
-
this.log(`[${eval_.name}] Running B...`);
|
|
61
|
-
const resultB = await executeEval({
|
|
62
|
-
prompt: eval_.prompt,
|
|
63
|
-
targetContent: contentB,
|
|
64
|
-
timeout: flags.timeout,
|
|
65
|
-
model: flags.model
|
|
66
|
-
});
|
|
67
|
-
comparisons.push({
|
|
68
|
-
evalName: eval_.name,
|
|
69
|
-
outputA: resultA.output,
|
|
70
|
-
outputB: resultB.output
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
this.log("\nRunning blind comparison...");
|
|
74
|
-
const comparisonPrompt = comparisons.map((c) => `
|
|
75
|
-
## Eval: ${c.evalName}
|
|
1
|
+
import{a as i}from"../../chunk-MGHFDHHM.js";import{a as u}from"../../chunk-LQRYQE6Q.js";import"../../chunk-IZTIYR5Q.js";import"../../chunk-CRAKDQ4H.js";import"../../chunk-WPJ2BND4.js";import"../../chunk-3AV3GTMP.js";import{d as a}from"../../chunk-TIQ7DQ3M.js";import"../../chunk-M6AJDVCL.js";import{a as p}from"../../chunk-ZLLER3HP.js";import{Args as c,Flags as v}from"@oclif/core";var m=class d extends u{static{p(this,"EvalCompareCommand")}static description="Blind A/B comparison between two eval target versions";static examples=["<%= config.bin %> evals compare <target-a> <target-b>"];static args={targetA:c.string({description:"First eval target ID",required:!0}),targetB:c.string({description:"Second eval target ID",required:!0})};static flags={model:v.string({description:"Model for execution and comparison"}),timeout:v.integer({description:"Timeout per eval in ms",default:12e4})};async run(){let{args:s,flags:e}=await this.parse(d);this.requireAuth();let[o,n]=await Promise.all([a(`/api/eval-targets/${s.targetA}`),a(`/api/eval-targets/${s.targetB}`)]),l=await a(`/api/eval-targets/${s.targetA}/evals`);l.length===0&&this.error("No evals found for target A. Create some first."),this.log(`Comparing "${o.name}" v${o.version} vs "${n.name}" v${n.version}`),this.log(`Running ${l.length} eval(s)...
|
|
2
|
+
`);let r=Math.random()>.5,h=r?n.content:o.content,f=r?o.content:n.content,A=r?n.name:o.name,w=r?o.name:n.name,g=[];for(let t of l){this.log(`[${t.name}] Running A...`);let b=await i({prompt:t.prompt,targetContent:h,timeout:e.timeout,model:e.model});this.log(`[${t.name}] Running B...`);let E=await i({prompt:t.prompt,targetContent:f,timeout:e.timeout,model:e.model});g.push({evalName:t.name,outputA:b.output,outputB:E.output})}this.log(`
|
|
3
|
+
Running blind comparison...`);let B=g.map(t=>`
|
|
4
|
+
## Eval: ${t.evalName}
|
|
76
5
|
|
|
77
6
|
### Output A
|
|
78
|
-
${
|
|
7
|
+
${t.outputA}
|
|
79
8
|
|
|
80
9
|
### Output B
|
|
81
|
-
${
|
|
82
|
-
`).join(
|
|
83
|
-
|
|
84
|
-
|
|
10
|
+
${t.outputB}
|
|
11
|
+
`).join(`
|
|
12
|
+
---
|
|
13
|
+
`),$=await i({prompt:`Compare these two sets of outputs. For each eval, determine which output (A or B) is better.
|
|
85
14
|
Then provide an overall winner with reasoning.
|
|
86
15
|
|
|
87
|
-
${
|
|
16
|
+
${B}
|
|
88
17
|
|
|
89
18
|
Respond with JSON:
|
|
90
19
|
{
|
|
@@ -97,18 +26,6 @@ Respond with JSON:
|
|
|
97
26
|
"strengths_winner": ["..."],
|
|
98
27
|
"weaknesses_loser": ["..."]
|
|
99
28
|
}
|
|
100
|
-
}`,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
});
|
|
104
|
-
this.log("\n=== Comparison Results ===\n");
|
|
105
|
-
this.log(`A = "${labelA}" | B = "${labelB}"`);
|
|
106
|
-
if (isSwapped) this.log("(Labels were swapped for blind comparison)");
|
|
107
|
-
this.log("");
|
|
108
|
-
this.log(comparatorResult.output);
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
export {
|
|
112
|
-
EvalCompareCommand as default
|
|
113
|
-
};
|
|
114
|
-
//# sourceMappingURL=compare.js.map
|
|
29
|
+
}`,timeout:e.timeout,model:e.model});this.log(`
|
|
30
|
+
=== Comparison Results ===
|
|
31
|
+
`),this.log(`A = "${A}" | B = "${w}"`),r&&this.log("(Labels were swapped for blind comparison)"),this.log(""),this.log($.output)}};export{m as default};
|
|
@@ -1,67 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BaseCommand
|
|
3
|
-
} from "../../chunk-2HK7RGZB.js";
|
|
4
|
-
import "../../chunk-R56PH7YE.js";
|
|
5
|
-
import "../../chunk-GQNJO2P2.js";
|
|
6
|
-
import "../../chunk-37LN5O7M.js";
|
|
7
|
-
import "../../chunk-EKJ2CABV.js";
|
|
8
|
-
import {
|
|
9
|
-
apiPost
|
|
10
|
-
} from "../../chunk-ZUJBM6HE.js";
|
|
11
|
-
import "../../chunk-W2YERO7E.js";
|
|
12
|
-
import "../../chunk-NSBPE2FW.js";
|
|
13
|
-
|
|
14
|
-
// src/commands/evals/create.ts
|
|
15
|
-
import { Args, Flags } from "@oclif/core";
|
|
16
|
-
import { readFileSync } from "node:fs";
|
|
17
|
-
var EvalCreate = class _EvalCreate extends BaseCommand {
|
|
18
|
-
static description = "Create test cases (evals) for an eval target";
|
|
19
|
-
static examples = [
|
|
20
|
-
'<%= config.bin %> evals create <target-id> --name "ts-check" --prompt "Write a function to add two numbers"',
|
|
21
|
-
"<%= config.bin %> evals create <target-id> --from-file evals.json"
|
|
22
|
-
];
|
|
23
|
-
static args = {
|
|
24
|
-
targetId: Args.string({ description: "Eval target ID", required: true })
|
|
25
|
-
};
|
|
26
|
-
static flags = {
|
|
27
|
-
name: Flags.string({ char: "n", description: "Eval name" }),
|
|
28
|
-
prompt: Flags.string({ char: "p", description: "Test prompt" }),
|
|
29
|
-
"expected-output": Flags.string({ description: "Expected output description" }),
|
|
30
|
-
expectations: Flags.string({ char: "e", description: "Assertion (repeatable)", multiple: true }),
|
|
31
|
-
"from-file": Flags.string({ description: "Bulk create from JSON file" })
|
|
32
|
-
};
|
|
33
|
-
async run() {
|
|
34
|
-
const { args, flags } = await this.parse(_EvalCreate);
|
|
35
|
-
this.requireAuth();
|
|
36
|
-
if (flags["from-file"]) {
|
|
37
|
-
const data = JSON.parse(readFileSync(flags["from-file"], "utf-8"));
|
|
38
|
-
const evalsArray = Array.isArray(data) ? data : data.evals;
|
|
39
|
-
for (const evalItem of evalsArray) {
|
|
40
|
-
const result2 = await apiPost(`/api/eval-targets/${args.targetId}/evals`, {
|
|
41
|
-
name: evalItem.name,
|
|
42
|
-
prompt: evalItem.prompt,
|
|
43
|
-
expectedOutput: evalItem.expectedOutput ?? "",
|
|
44
|
-
expectations: evalItem.expectations ?? [],
|
|
45
|
-
files: evalItem.files ?? []
|
|
46
|
-
});
|
|
47
|
-
this.log(`Created eval: ${result2.name} (${result2.id})`);
|
|
48
|
-
}
|
|
49
|
-
this.log(`Created ${evalsArray.length} evals.`);
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
if (!flags.name || !flags.prompt) {
|
|
53
|
-
this.error("Provide --name and --prompt, or use --from-file for bulk creation");
|
|
54
|
-
}
|
|
55
|
-
const result = await apiPost(`/api/eval-targets/${args.targetId}/evals`, {
|
|
56
|
-
name: flags.name,
|
|
57
|
-
prompt: flags.prompt,
|
|
58
|
-
expectedOutput: flags["expected-output"] ?? "",
|
|
59
|
-
expectations: flags.expectations ?? []
|
|
60
|
-
});
|
|
61
|
-
this.log(`Created eval: ${result.name} (${result.id})`);
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
export {
|
|
65
|
-
EvalCreate as default
|
|
66
|
-
};
|
|
67
|
-
//# sourceMappingURL=create.js.map
|
|
1
|
+
import{a as m}from"../../chunk-LQRYQE6Q.js";import"../../chunk-IZTIYR5Q.js";import"../../chunk-CRAKDQ4H.js";import"../../chunk-WPJ2BND4.js";import"../../chunk-3AV3GTMP.js";import{e as i}from"../../chunk-TIQ7DQ3M.js";import"../../chunk-M6AJDVCL.js";import{a as l}from"../../chunk-ZLLER3HP.js";import{Args as g,Flags as r}from"@oclif/core";import{readFileSync as u}from"node:fs";var s=class d extends m{static{l(this,"EvalCreate")}static description="Create test cases (evals) for an eval target";static examples=['<%= config.bin %> evals create <target-id> --name "ts-check" --prompt "Write a function to add two numbers"',"<%= config.bin %> evals create <target-id> --from-file evals.json"];static args={targetId:g.string({description:"Eval target ID",required:!0})};static flags={name:r.string({char:"n",description:"Eval name"}),prompt:r.string({char:"p",description:"Test prompt"}),"expected-output":r.string({description:"Expected output description"}),expectations:r.string({char:"e",description:"Assertion (repeatable)",multiple:!0}),"from-file":r.string({description:"Bulk create from JSON file"})};async run(){let{args:o,flags:e}=await this.parse(d);if(this.requireAuth(),e["from-file"]){let a=JSON.parse(u(e["from-file"],"utf-8")),p=Array.isArray(a)?a:a.evals;for(let t of p){let c=await i(`/api/eval-targets/${o.targetId}/evals`,{name:t.name,prompt:t.prompt,expectedOutput:t.expectedOutput??"",expectations:t.expectations??[],files:t.files??[]});this.log(`Created eval: ${c.name} (${c.id})`)}this.log(`Created ${p.length} evals.`);return}(!e.name||!e.prompt)&&this.error("Provide --name and --prompt, or use --from-file for bulk creation");let n=await i(`/api/eval-targets/${o.targetId}/evals`,{name:e.name,prompt:e.prompt,expectedOutput:e["expected-output"]??"",expectations:e.expectations??[]});this.log(`Created eval: ${n.name} (${n.id})`)}};export{s as default};
|
|
@@ -1,169 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
import "../../chunk-EKJ2CABV.js";
|
|
15
|
-
import {
|
|
16
|
-
apiGet,
|
|
17
|
-
apiPost,
|
|
18
|
-
apiPut
|
|
19
|
-
} from "../../chunk-ZUJBM6HE.js";
|
|
20
|
-
import "../../chunk-W2YERO7E.js";
|
|
21
|
-
import "../../chunk-NSBPE2FW.js";
|
|
22
|
-
|
|
23
|
-
// src/commands/evals/optimize-description.ts
|
|
24
|
-
import { Args, Flags } from "@oclif/core";
|
|
25
|
-
var EvalOptimizeDescriptionCommand = class _EvalOptimizeDescriptionCommand extends BaseCommand {
|
|
26
|
-
static description = "Optimize eval target description for better triggering accuracy";
|
|
27
|
-
static examples = [
|
|
28
|
-
"<%= config.bin %> evals optimize-description <target-id>",
|
|
29
|
-
"<%= config.bin %> evals optimize-description <target-id> --queries 10"
|
|
30
|
-
];
|
|
31
|
-
static args = {
|
|
32
|
-
targetId: Args.string({ description: "Eval target ID", required: true })
|
|
33
|
-
};
|
|
34
|
-
static flags = {
|
|
35
|
-
"max-iterations": Flags.integer({ description: "Maximum optimization iterations", default: 5 }),
|
|
36
|
-
model: Flags.string({ description: "Model for trigger testing and improvement" }),
|
|
37
|
-
queries: Flags.integer({ description: "Number of trigger queries to generate", default: 20 }),
|
|
38
|
-
"runs-per-query": Flags.integer({ description: "Runs per query for reliability", default: 3 }),
|
|
39
|
-
"poll-interval": Flags.integer({ description: "Ms between approval polls", default: 5e3 }),
|
|
40
|
-
timeout: Flags.integer({ description: "Timeout per eval in ms", default: 12e4 })
|
|
41
|
-
};
|
|
42
|
-
async run() {
|
|
43
|
-
const { args, flags } = await this.parse(_EvalOptimizeDescriptionCommand);
|
|
44
|
-
this.requireAuth();
|
|
45
|
-
const target = await apiGet(`/api/eval-targets/${args.targetId}`);
|
|
46
|
-
this.log(`Optimizing description for "${target.name}" v${target.version}`);
|
|
47
|
-
this.log(`Current description: "${target.description}"`);
|
|
48
|
-
this.log("");
|
|
49
|
-
this.log("Generating trigger queries...");
|
|
50
|
-
const queries = await this.generateTriggerQueries(target, flags.queries, flags);
|
|
51
|
-
const triggerEval = await apiPost(`/api/eval-targets/${args.targetId}/trigger-evals`, {
|
|
52
|
-
queries
|
|
53
|
-
});
|
|
54
|
-
this.log(`
|
|
55
|
-
Generated ${queries.length} trigger queries.`);
|
|
56
|
-
this.log(`Review and approve them at:`);
|
|
57
|
-
this.log(` http://localhost:5174/eval-targets/${args.targetId}`);
|
|
58
|
-
this.log(` (Triggers tab \u2192 click to review)`);
|
|
59
|
-
this.log("\nWaiting for approval...");
|
|
60
|
-
let approved = false;
|
|
61
|
-
while (!approved) {
|
|
62
|
-
await new Promise((resolve) => setTimeout(resolve, flags["poll-interval"]));
|
|
63
|
-
const sets = await apiGet(
|
|
64
|
-
`/api/eval-targets/${args.targetId}/trigger-evals?status=approved`
|
|
65
|
-
);
|
|
66
|
-
const current = sets.find((s) => s.id === triggerEval.id);
|
|
67
|
-
if (current) {
|
|
68
|
-
approved = true;
|
|
69
|
-
queries.length = 0;
|
|
70
|
-
queries.push(...current.queries);
|
|
71
|
-
this.log("Trigger queries approved!");
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
const indices = queries.map((_, i) => i).sort(() => Math.random() - 0.5);
|
|
75
|
-
const splitIdx = Math.ceil(indices.length * 0.6);
|
|
76
|
-
const trainIndices = indices.slice(0, splitIdx);
|
|
77
|
-
const testIndices = indices.slice(splitIdx);
|
|
78
|
-
await apiPut(`/api/trigger-evals/${triggerEval.id}`, {
|
|
79
|
-
trainIndices,
|
|
80
|
-
testIndices
|
|
81
|
-
});
|
|
82
|
-
const trainQueries = trainIndices.map((i) => queries[i]);
|
|
83
|
-
const testQueries = testIndices.map((i) => queries[i]);
|
|
84
|
-
this.log(`
|
|
85
|
-
Split: ${trainQueries.length} train, ${testQueries.length} test`);
|
|
86
|
-
let currentDescription = target.description;
|
|
87
|
-
let bestDescription = currentDescription;
|
|
88
|
-
let bestTestScore = 0;
|
|
89
|
-
for (let iteration = 1; iteration <= flags["max-iterations"]; iteration++) {
|
|
90
|
-
this.log(`
|
|
91
|
-
=== Iteration ${iteration} ===`);
|
|
92
|
-
this.log(`Description: "${currentDescription}"`);
|
|
93
|
-
this.log("Testing train set...");
|
|
94
|
-
const trainResults = await this.testQuerySet(trainQueries, target, currentDescription, flags);
|
|
95
|
-
const trainScore = computeTriggerScore(trainResults);
|
|
96
|
-
this.log(`Train accuracy: ${(trainScore * 100).toFixed(1)}%`);
|
|
97
|
-
this.printTriggerResults(trainResults);
|
|
98
|
-
this.log("Testing test set...");
|
|
99
|
-
const testResults = await this.testQuerySet(testQueries, target, currentDescription, flags);
|
|
100
|
-
const testScore = computeTriggerScore(testResults);
|
|
101
|
-
this.log(`Test accuracy: ${(testScore * 100).toFixed(1)}%`);
|
|
102
|
-
await apiPost("/api/optimization-runs", {
|
|
103
|
-
evalTargetId: target.id,
|
|
104
|
-
type: "description",
|
|
105
|
-
iteration,
|
|
106
|
-
inputVersion: target.version,
|
|
107
|
-
trainScore,
|
|
108
|
-
testScore,
|
|
109
|
-
analysis: {
|
|
110
|
-
description: currentDescription,
|
|
111
|
-
trainResults: trainResults.map((r) => ({ query: r.query, shouldTrigger: r.shouldTrigger, didTrigger: r.didTrigger, correct: r.correct })),
|
|
112
|
-
testResults: testResults.map((r) => ({ query: r.query, shouldTrigger: r.shouldTrigger, didTrigger: r.didTrigger, correct: r.correct }))
|
|
113
|
-
},
|
|
114
|
-
status: "completed"
|
|
115
|
-
});
|
|
116
|
-
if (testScore > bestTestScore) {
|
|
117
|
-
bestTestScore = testScore;
|
|
118
|
-
bestDescription = currentDescription;
|
|
119
|
-
}
|
|
120
|
-
if (trainScore >= 1) {
|
|
121
|
-
this.log("Perfect train score. Stopping.");
|
|
122
|
-
break;
|
|
123
|
-
}
|
|
124
|
-
this.log("Generating improved description...");
|
|
125
|
-
const failures = trainResults.filter((r) => !r.correct);
|
|
126
|
-
currentDescription = await this.improveDescription(target, currentDescription, failures, flags);
|
|
127
|
-
}
|
|
128
|
-
this.log(`
|
|
129
|
-
=== Optimization Complete ===`);
|
|
130
|
-
this.log(`Best test accuracy: ${(bestTestScore * 100).toFixed(1)}%`);
|
|
131
|
-
this.log(`
|
|
132
|
-
Before: "${target.description}"`);
|
|
133
|
-
this.log(`After: "${bestDescription}"`);
|
|
134
|
-
if (bestDescription !== target.description) {
|
|
135
|
-
await apiPut(`/api/eval-targets/${target.id}`, {
|
|
136
|
-
description: bestDescription
|
|
137
|
-
});
|
|
138
|
-
this.log("\nDescription updated.");
|
|
139
|
-
} else {
|
|
140
|
-
this.log("\nNo improvement found. Description unchanged.");
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
async generateTriggerQueries(target, count, flags) {
|
|
144
|
-
let sessionSeed = "";
|
|
145
|
-
try {
|
|
146
|
-
const sessions = await apiGet("/api/sessions?limit=10");
|
|
147
|
-
if (sessions.length > 0) {
|
|
148
|
-
sessionSeed = "\n\nReal user prompts from recent sessions (use as inspiration for realistic queries):\n" + sessions.slice(0, 5).map((s) => `- Session ${s.id}`).join("\n");
|
|
149
|
-
}
|
|
150
|
-
} catch {
|
|
151
|
-
}
|
|
152
|
-
const shouldTriggerCount = Math.ceil(count / 2);
|
|
153
|
-
const shouldNotTriggerCount = count - shouldTriggerCount;
|
|
154
|
-
const prompt = `Generate ${count} trigger eval queries for a skill/instruction.
|
|
1
|
+
import{a as O,b as S}from"../../chunk-EUHNCVJQ.js";import{a as w}from"../../chunk-MGHFDHHM.js";import{a as N}from"../../chunk-LQRYQE6Q.js";import"../../chunk-IZTIYR5Q.js";import"../../chunk-CRAKDQ4H.js";import"../../chunk-WPJ2BND4.js";import"../../chunk-3AV3GTMP.js";import{d as y,e as $,f as b}from"../../chunk-TIQ7DQ3M.js";import"../../chunk-M6AJDVCL.js";import{a as D}from"../../chunk-ZLLER3HP.js";import{Args as C,Flags as T}from"@oclif/core";var x=class k extends N{static{D(this,"EvalOptimizeDescriptionCommand")}static description="Optimize eval target description for better triggering accuracy";static examples=["<%= config.bin %> evals optimize-description <target-id>","<%= config.bin %> evals optimize-description <target-id> --queries 10"];static args={targetId:C.string({description:"Eval target ID",required:!0})};static flags={"max-iterations":T.integer({description:"Maximum optimization iterations",default:5}),model:T.string({description:"Model for trigger testing and improvement"}),queries:T.integer({description:"Number of trigger queries to generate",default:20}),"runs-per-query":T.integer({description:"Runs per query for reliability",default:3}),"poll-interval":T.integer({description:"Ms between approval polls",default:5e3}),timeout:T.integer({description:"Timeout per eval in ms",default:12e4})};async run(){let{args:i,flags:t}=await this.parse(k);this.requireAuth();let e=await y(`/api/eval-targets/${i.targetId}`);this.log(`Optimizing description for "${e.name}" v${e.version}`),this.log(`Current description: "${e.description}"`),this.log(""),this.log("Generating trigger queries...");let r=await this.generateTriggerQueries(e,t.queries,t),n=await $(`/api/eval-targets/${i.targetId}/trigger-evals`,{queries:r});this.log(`
|
|
2
|
+
Generated ${r.length} trigger queries.`),this.log("Review and approve them at:"),this.log(` http://localhost:5174/eval-targets/${i.targetId}`),this.log(" (Triggers tab \u2192 click to review)"),this.log(`
|
|
3
|
+
Waiting for approval...`);let a=!1;for(;!a;){await new Promise(h=>setTimeout(h,t["poll-interval"]));let d=(await y(`/api/eval-targets/${i.targetId}/trigger-evals?status=approved`)).find(h=>h.id===n.id);d&&(a=!0,r.length=0,r.push(...d.queries),this.log("Trigger queries approved!"))}let g=r.map((u,d)=>d).sort(()=>Math.random()-.5),p=Math.ceil(g.length*.6),s=g.slice(0,p),o=g.slice(p);await b(`/api/trigger-evals/${n.id}`,{trainIndices:s,testIndices:o});let c=s.map(u=>r[u]),I=o.map(u=>r[u]);this.log(`
|
|
4
|
+
Split: ${c.length} train, ${I.length} test`);let m=e.description,v=m,q=0;for(let u=1;u<=t["max-iterations"];u++){this.log(`
|
|
5
|
+
=== Iteration ${u} ===`),this.log(`Description: "${m}"`),this.log("Testing train set...");let d=await this.testQuerySet(c,e,m,t),h=S(d);this.log(`Train accuracy: ${(h*100).toFixed(1)}%`),this.printTriggerResults(d),this.log("Testing test set...");let R=await this.testQuerySet(I,e,m,t),f=S(R);if(this.log(`Test accuracy: ${(f*100).toFixed(1)}%`),await $("/api/optimization-runs",{evalTargetId:e.id,type:"description",iteration:u,inputVersion:e.version,trainScore:h,testScore:f,analysis:{description:m,trainResults:d.map(l=>({query:l.query,shouldTrigger:l.shouldTrigger,didTrigger:l.didTrigger,correct:l.correct})),testResults:R.map(l=>({query:l.query,shouldTrigger:l.shouldTrigger,didTrigger:l.didTrigger,correct:l.correct}))},status:"completed"}),f>q&&(q=f,v=m),h>=1){this.log("Perfect train score. Stopping.");break}this.log("Generating improved description...");let Q=d.filter(l=>!l.correct);m=await this.improveDescription(e,m,Q,t)}this.log(`
|
|
6
|
+
=== Optimization Complete ===`),this.log(`Best test accuracy: ${(q*100).toFixed(1)}%`),this.log(`
|
|
7
|
+
Before: "${e.description}"`),this.log(`After: "${v}"`),v!==e.description?(await b(`/api/eval-targets/${e.id}`,{description:v}),this.log(`
|
|
8
|
+
Description updated.`)):this.log(`
|
|
9
|
+
No improvement found. Description unchanged.`)}async generateTriggerQueries(i,t,e){let r="";try{let s=await y("/api/sessions?limit=10");s.length>0&&(r=`
|
|
10
|
+
|
|
11
|
+
Real user prompts from recent sessions (use as inspiration for realistic queries):
|
|
12
|
+
`+s.slice(0,5).map(o=>`- Session ${o.id}`).join(`
|
|
13
|
+
`))}catch{}let n=Math.ceil(t/2),a=t-n,g=`Generate ${t} trigger eval queries for a skill/instruction.
|
|
155
14
|
|
|
156
15
|
## Skill Name
|
|
157
|
-
${
|
|
16
|
+
${i.name}
|
|
158
17
|
|
|
159
18
|
## Skill Description
|
|
160
|
-
${
|
|
19
|
+
${i.description}
|
|
161
20
|
|
|
162
21
|
## Skill Content (first 1000 chars)
|
|
163
|
-
${
|
|
164
|
-
${
|
|
22
|
+
${i.content.slice(0,1e3)}
|
|
23
|
+
${r}
|
|
165
24
|
|
|
166
|
-
Generate ${
|
|
25
|
+
Generate ${n} should-trigger queries and ${a} should-not-trigger queries.
|
|
167
26
|
|
|
168
27
|
Rules:
|
|
169
28
|
- Queries must be realistic \u2014 what a real user would actually type
|
|
@@ -176,81 +35,20 @@ Respond with ONLY a valid JSON array:
|
|
|
176
35
|
[
|
|
177
36
|
{"query": "realistic user prompt...", "should_trigger": true},
|
|
178
37
|
{"query": "another prompt...", "should_trigger": false}
|
|
179
|
-
]
|
|
180
|
-
|
|
181
|
-
prompt,
|
|
182
|
-
timeout: flags.timeout,
|
|
183
|
-
model: flags.model
|
|
184
|
-
});
|
|
185
|
-
try {
|
|
186
|
-
let jsonStr = result.output.trim();
|
|
187
|
-
const jsonMatch = jsonStr.match(/```(?:json)?\s*([\s\S]*?)```/);
|
|
188
|
-
if (jsonMatch) jsonStr = jsonMatch[1].trim();
|
|
189
|
-
const arrMatch = jsonStr.match(/\[[\s\S]*\]/);
|
|
190
|
-
if (arrMatch) jsonStr = arrMatch[0];
|
|
191
|
-
return JSON.parse(jsonStr);
|
|
192
|
-
} catch {
|
|
193
|
-
return [
|
|
194
|
-
{ query: `Help me use ${target.name}`, should_trigger: true },
|
|
195
|
-
{ query: "Write a hello world program", should_trigger: false }
|
|
196
|
-
];
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
async testQuerySet(queries, target, description, flags) {
|
|
200
|
-
const results = [];
|
|
201
|
-
for (const q of queries) {
|
|
202
|
-
const runs = [];
|
|
203
|
-
for (let run = 0; run < flags["runs-per-query"]; run++) {
|
|
204
|
-
const result = await testTrigger({
|
|
205
|
-
query: q.query,
|
|
206
|
-
shouldTrigger: q.should_trigger,
|
|
207
|
-
skillName: target.name,
|
|
208
|
-
skillDescription: description,
|
|
209
|
-
skillContent: target.content,
|
|
210
|
-
model: flags.model,
|
|
211
|
-
timeout: flags.timeout
|
|
212
|
-
});
|
|
213
|
-
runs.push(result);
|
|
214
|
-
}
|
|
215
|
-
const triggerCount = runs.filter((r) => r.didTrigger).length;
|
|
216
|
-
const didTrigger = triggerCount > flags["runs-per-query"] / 2;
|
|
217
|
-
results.push({
|
|
218
|
-
query: q.query,
|
|
219
|
-
shouldTrigger: q.should_trigger,
|
|
220
|
-
didTrigger,
|
|
221
|
-
correct: didTrigger === q.should_trigger,
|
|
222
|
-
confidence: runs.reduce((sum, r) => sum + r.confidence, 0) / runs.length,
|
|
223
|
-
evidence: runs[0].evidence
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
return results;
|
|
227
|
-
}
|
|
228
|
-
printTriggerResults(results) {
|
|
229
|
-
for (const r of results) {
|
|
230
|
-
const status = r.correct ? "OK" : "FAIL";
|
|
231
|
-
const expected = r.shouldTrigger ? "should trigger" : "should NOT trigger";
|
|
232
|
-
const actual = r.didTrigger ? "triggered" : "did NOT trigger";
|
|
233
|
-
this.log(` [${status}] ${expected} / ${actual}: "${r.query.slice(0, 60)}..."`);
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
async improveDescription(target, currentDescription, failures, flags) {
|
|
237
|
-
const failureText = failures.map((f) => {
|
|
238
|
-
const expected = f.shouldTrigger ? "SHOULD trigger but DID NOT" : "SHOULD NOT trigger but DID";
|
|
239
|
-
return `- ${expected}: "${f.query}"`;
|
|
240
|
-
}).join("\n");
|
|
241
|
-
const prompt = `You are optimizing a skill description for better triggering accuracy.
|
|
38
|
+
]`,p=await w({prompt:g,timeout:e.timeout,model:e.model});try{let s=p.output.trim(),o=s.match(/```(?:json)?\s*([\s\S]*?)```/);o&&(s=o[1].trim());let c=s.match(/\[[\s\S]*\]/);return c&&(s=c[0]),JSON.parse(s)}catch{return[{query:`Help me use ${i.name}`,should_trigger:!0},{query:"Write a hello world program",should_trigger:!1}]}}async testQuerySet(i,t,e,r){let n=[];for(let a of i){let g=[];for(let o=0;o<r["runs-per-query"];o++){let c=await O({query:a.query,shouldTrigger:a.should_trigger,skillName:t.name,skillDescription:e,skillContent:t.content,model:r.model,timeout:r.timeout});g.push(c)}let s=g.filter(o=>o.didTrigger).length>r["runs-per-query"]/2;n.push({query:a.query,shouldTrigger:a.should_trigger,didTrigger:s,correct:s===a.should_trigger,confidence:g.reduce((o,c)=>o+c.confidence,0)/g.length,evidence:g[0].evidence})}return n}printTriggerResults(i){for(let t of i){let e=t.correct?"OK":"FAIL",r=t.shouldTrigger?"should trigger":"should NOT trigger",n=t.didTrigger?"triggered":"did NOT trigger";this.log(` [${e}] ${r} / ${n}: "${t.query.slice(0,60)}..."`)}}async improveDescription(i,t,e,r){let n=e.map(p=>`- ${p.shouldTrigger?"SHOULD trigger but DID NOT":"SHOULD NOT trigger but DID"}: "${p.query}"`).join(`
|
|
39
|
+
`),a=`You are optimizing a skill description for better triggering accuracy.
|
|
242
40
|
|
|
243
41
|
## Skill Name
|
|
244
|
-
${
|
|
42
|
+
${i.name}
|
|
245
43
|
|
|
246
44
|
## Current Description
|
|
247
|
-
${
|
|
45
|
+
${t}
|
|
248
46
|
|
|
249
47
|
## Skill Content (first 500 chars)
|
|
250
|
-
${
|
|
48
|
+
${i.content.slice(0,500)}
|
|
251
49
|
|
|
252
50
|
## Failures
|
|
253
|
-
${
|
|
51
|
+
${n}
|
|
254
52
|
|
|
255
53
|
Propose an improved description that:
|
|
256
54
|
- Fixes the trigger failures above
|
|
@@ -258,16 +56,4 @@ Propose an improved description that:
|
|
|
258
56
|
- Uses specific keywords and contexts for when to trigger
|
|
259
57
|
- Includes "Use PROACTIVELY" phrasing for important trigger contexts
|
|
260
58
|
|
|
261
|
-
Respond with ONLY the new description text (no JSON, no explanation, just the description string).`;
|
|
262
|
-
const result = await executeEval({
|
|
263
|
-
prompt,
|
|
264
|
-
timeout: flags.timeout,
|
|
265
|
-
model: flags.model
|
|
266
|
-
});
|
|
267
|
-
return result.output.trim().replace(/^["']|["']$/g, "");
|
|
268
|
-
}
|
|
269
|
-
};
|
|
270
|
-
export {
|
|
271
|
-
EvalOptimizeDescriptionCommand as default
|
|
272
|
-
};
|
|
273
|
-
//# sourceMappingURL=optimize-description.js.map
|
|
59
|
+
Respond with ONLY the new description text (no JSON, no explanation, just the description string).`;return(await w({prompt:a,timeout:r.timeout,model:r.model})).output.trim().replace(/^["']|["']$/g,"")}};export{x as default};
|