@rulemetric/cli 0.7.2 → 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 -309
- 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 -781
- 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 -46
- 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 -15
- 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 -14
- 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 -11
- 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 -17
- package/dist/lib/manual-tasks-meta.js +1 -8
- package/dist/lib/manual-tasks.js +1 -79
- 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 +8 -7
- 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-7DULPSFU.js +0 -299
- package/dist/chunk-7DULPSFU.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-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-FZKLLNDS.js +0 -228
- package/dist/chunk-FZKLLNDS.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-OK3I555A.js +0 -243
- package/dist/chunk-OK3I555A.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-PMI56ED5.js +0 -167
- package/dist/chunk-PMI56ED5.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-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-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-YOBA3NAM.js +0 -55
- package/dist/chunk-YOBA3NAM.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,85 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ensureDeviceApiKey
|
|
3
|
-
} from "../../chunk-EJ3YAFDP.js";
|
|
4
|
-
import {
|
|
5
|
-
BaseCommand
|
|
6
|
-
} from "../../chunk-2HK7RGZB.js";
|
|
7
|
-
import "../../chunk-R56PH7YE.js";
|
|
8
|
-
import {
|
|
9
|
-
emitSetupEvent
|
|
10
|
-
} from "../../chunk-GQNJO2P2.js";
|
|
11
|
-
import {
|
|
12
|
-
bootstrapActiveOrg
|
|
13
|
-
} from "../../chunk-37LN5O7M.js";
|
|
14
|
-
import "../../chunk-EKJ2CABV.js";
|
|
15
|
-
import {
|
|
16
|
-
ApiError,
|
|
17
|
-
api
|
|
18
|
-
} from "../../chunk-ZUJBM6HE.js";
|
|
19
|
-
import {
|
|
20
|
-
saveEnvFile,
|
|
21
|
-
saveToken
|
|
22
|
-
} from "../../chunk-W2YERO7E.js";
|
|
23
|
-
import "../../chunk-NSBPE2FW.js";
|
|
24
|
-
|
|
25
|
-
// src/commands/auth/login.ts
|
|
26
|
-
import { Flags } from "@oclif/core";
|
|
27
|
-
var AuthLogin = class _AuthLogin extends BaseCommand {
|
|
28
|
-
static description = "Log in to RuleMetric";
|
|
29
|
-
static examples = [
|
|
30
|
-
"<%= config.bin %> auth login",
|
|
31
|
-
"<%= config.bin %> auth login -e user@example.com"
|
|
32
|
-
];
|
|
33
|
-
static flags = {
|
|
34
|
-
email: Flags.string({ char: "e", description: "Email address" }),
|
|
35
|
-
password: Flags.string({ char: "p", description: "Password (for non-interactive use)" })
|
|
36
|
-
};
|
|
37
|
-
async run() {
|
|
38
|
-
const { flags } = await this.parse(_AuthLogin);
|
|
39
|
-
let email = flags.email;
|
|
40
|
-
let password = flags.password;
|
|
41
|
-
if (!email || !password) {
|
|
42
|
-
if (!process.stdin.isTTY) {
|
|
43
|
-
this.error(
|
|
44
|
-
"Missing credentials in a non-interactive shell. Pass --email/-e and --password/-p, or set RULEMETRIC_API_KEY (create a key at https://rulemetric.com/settings)."
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
const { input, password: passwordPrompt } = await import("@inquirer/prompts");
|
|
48
|
-
if (!email) {
|
|
49
|
-
email = await input({ message: "Email:" });
|
|
50
|
-
}
|
|
51
|
-
if (!password) {
|
|
52
|
-
password = await passwordPrompt({ message: "Password:" });
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
let data;
|
|
56
|
-
try {
|
|
57
|
-
data = await api("/auth/login", {
|
|
58
|
-
method: "POST",
|
|
59
|
-
body: { email, password },
|
|
60
|
-
timeoutMs: 2e4
|
|
61
|
-
});
|
|
62
|
-
} catch (err) {
|
|
63
|
-
if (err instanceof ApiError && err.statusCode === 401) {
|
|
64
|
-
this.error("Invalid email or password.");
|
|
65
|
-
}
|
|
66
|
-
throw err;
|
|
67
|
-
}
|
|
68
|
-
const expiresAt = data.expiresAt ?? new Date(Date.now() + 3600 * 1e3).toISOString();
|
|
69
|
-
saveToken({
|
|
70
|
-
accessToken: data.accessToken,
|
|
71
|
-
refreshToken: data.refreshToken,
|
|
72
|
-
expiresAt,
|
|
73
|
-
email: data.email
|
|
74
|
-
});
|
|
75
|
-
saveEnvFile(data.accessToken, process.env.RULEMETRIC_API_URL);
|
|
76
|
-
await bootstrapActiveOrg();
|
|
77
|
-
await ensureDeviceApiKey(this.log.bind(this), this.warn.bind(this), this.config.version);
|
|
78
|
-
void emitSetupEvent("auth_login", {}, this.config.version);
|
|
79
|
-
this.log(`Logged in as ${data.email}`);
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
export {
|
|
83
|
-
AuthLogin as default
|
|
84
|
-
};
|
|
85
|
-
//# sourceMappingURL=login.js.map
|
|
1
|
+
import{a as f}from"../../chunk-AHRHCERJ.js";import{a as g}from"../../chunk-LQRYQE6Q.js";import"../../chunk-IZTIYR5Q.js";import{c as d}from"../../chunk-CRAKDQ4H.js";import{b as l}from"../../chunk-WPJ2BND4.js";import"../../chunk-3AV3GTMP.js";import{b as m,c as p}from"../../chunk-TIQ7DQ3M.js";import{d as n,h as c}from"../../chunk-M6AJDVCL.js";import{a}from"../../chunk-ZLLER3HP.js";import{Flags as h}from"@oclif/core";var r=class w extends g{static{a(this,"AuthLogin")}static description="Log in to RuleMetric";static examples=["<%= config.bin %> auth login","<%= config.bin %> auth login -e user@example.com"];static flags={email:h.string({char:"e",description:"Email address"}),password:h.string({char:"p",description:"Password (for non-interactive use)"})};async run(){let{flags:o}=await this.parse(w),s=o.email,t=o.password;if(!s||!t){process.stdin.isTTY||this.error("Missing credentials in a non-interactive shell. Pass --email/-e and --password/-p, or set RULEMETRIC_API_KEY (create a key at https://rulemetric.com/settings).");let{input:i,password:u}=await import("@inquirer/prompts");s||(s=await i({message:"Email:"})),t||(t=await u({message:"Password:"}))}let e;try{e=await p("/auth/login",{method:"POST",body:{email:s,password:t},timeoutMs:2e4})}catch(i){throw i instanceof m&&i.statusCode===401&&this.error("Invalid email or password."),i}let v=e.expiresAt??new Date(Date.now()+3600*1e3).toISOString();n({accessToken:e.accessToken,refreshToken:e.refreshToken,expiresAt:v,email:e.email}),c(e.accessToken,process.env.RULEMETRIC_API_URL),await l(),await f(this.log.bind(this),this.warn.bind(this),this.config.version),d("auth_login",{},this.config.version),this.log(`Logged in as ${e.email}`)}};export{r as default};
|
|
@@ -1,29 +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 "../../chunk-ZUJBM6HE.js";
|
|
9
|
-
import {
|
|
10
|
-
clearEnvFile,
|
|
11
|
-
clearToken
|
|
12
|
-
} from "../../chunk-W2YERO7E.js";
|
|
13
|
-
import "../../chunk-NSBPE2FW.js";
|
|
14
|
-
|
|
15
|
-
// src/commands/auth/logout.ts
|
|
16
|
-
var AuthLogout = class _AuthLogout extends BaseCommand {
|
|
17
|
-
static description = "Log out of RuleMetric";
|
|
18
|
-
static examples = ["<%= config.bin %> auth logout"];
|
|
19
|
-
async run() {
|
|
20
|
-
await this.parse(_AuthLogout);
|
|
21
|
-
clearToken();
|
|
22
|
-
clearEnvFile();
|
|
23
|
-
this.log("Logged out successfully.");
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
export {
|
|
27
|
-
AuthLogout as default
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=logout.js.map
|
|
1
|
+
import{a as s}from"../../chunk-LQRYQE6Q.js";import"../../chunk-IZTIYR5Q.js";import"../../chunk-CRAKDQ4H.js";import"../../chunk-WPJ2BND4.js";import"../../chunk-3AV3GTMP.js";import"../../chunk-TIQ7DQ3M.js";import{f as i,j as r}from"../../chunk-M6AJDVCL.js";import{a as o}from"../../chunk-ZLLER3HP.js";var e=class t extends s{static{o(this,"AuthLogout")}static description="Log out of RuleMetric";static examples=["<%= config.bin %> auth logout"];async run(){await this.parse(t),i(),r(),this.log("Logged out successfully.")}};export{e as default};
|
|
@@ -1,33 +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
|
-
apiDelete
|
|
10
|
-
} from "../../chunk-ZUJBM6HE.js";
|
|
11
|
-
import "../../chunk-W2YERO7E.js";
|
|
12
|
-
import "../../chunk-NSBPE2FW.js";
|
|
13
|
-
|
|
14
|
-
// src/commands/auth/revoke-key.ts
|
|
15
|
-
import { Args } from "@oclif/core";
|
|
16
|
-
var AuthRevokeKey = class _AuthRevokeKey extends BaseCommand {
|
|
17
|
-
static description = "Revoke an API key";
|
|
18
|
-
static examples = [
|
|
19
|
-
"<%= config.bin %> auth revoke-key <key-id>"
|
|
20
|
-
];
|
|
21
|
-
static args = {
|
|
22
|
-
id: Args.string({ description: "API key ID to revoke", required: true })
|
|
23
|
-
};
|
|
24
|
-
async run() {
|
|
25
|
-
const { args } = await this.parse(_AuthRevokeKey);
|
|
26
|
-
await apiDelete(`/api/auth/api-keys/${args.id}`);
|
|
27
|
-
this.log(`API key ${args.id} revoked.`);
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
export {
|
|
31
|
-
AuthRevokeKey as default
|
|
32
|
-
};
|
|
33
|
-
//# sourceMappingURL=revoke-key.js.map
|
|
1
|
+
import{a}from"../../chunk-LQRYQE6Q.js";import"../../chunk-IZTIYR5Q.js";import"../../chunk-CRAKDQ4H.js";import"../../chunk-WPJ2BND4.js";import"../../chunk-3AV3GTMP.js";import{h as t}from"../../chunk-TIQ7DQ3M.js";import"../../chunk-M6AJDVCL.js";import{a as r}from"../../chunk-ZLLER3HP.js";import{Args as s}from"@oclif/core";var e=class o extends a{static{r(this,"AuthRevokeKey")}static description="Revoke an API key";static examples=["<%= config.bin %> auth revoke-key <key-id>"];static args={id:s.string({description:"API key ID to revoke",required:!0})};async run(){let{args:i}=await this.parse(o);await t(`/api/auth/api-keys/${i.id}`),this.log(`API key ${i.id} revoked.`)}};export{e as default};
|
|
@@ -1,89 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ensureDeviceApiKey
|
|
3
|
-
} from "../../chunk-EJ3YAFDP.js";
|
|
4
|
-
import {
|
|
5
|
-
BaseCommand
|
|
6
|
-
} from "../../chunk-2HK7RGZB.js";
|
|
7
|
-
import "../../chunk-R56PH7YE.js";
|
|
8
|
-
import {
|
|
9
|
-
emitSetupEvent
|
|
10
|
-
} from "../../chunk-GQNJO2P2.js";
|
|
11
|
-
import {
|
|
12
|
-
bootstrapActiveOrg
|
|
13
|
-
} from "../../chunk-37LN5O7M.js";
|
|
14
|
-
import "../../chunk-EKJ2CABV.js";
|
|
15
|
-
import {
|
|
16
|
-
ApiError,
|
|
17
|
-
api
|
|
18
|
-
} from "../../chunk-ZUJBM6HE.js";
|
|
19
|
-
import {
|
|
20
|
-
saveEnvFile,
|
|
21
|
-
saveToken
|
|
22
|
-
} from "../../chunk-W2YERO7E.js";
|
|
23
|
-
import "../../chunk-NSBPE2FW.js";
|
|
24
|
-
|
|
25
|
-
// src/commands/auth/signup.ts
|
|
26
|
-
import { Flags } from "@oclif/core";
|
|
27
|
-
var AuthSignup = class _AuthSignup extends BaseCommand {
|
|
28
|
-
static description = "Create a RuleMetric account from the CLI";
|
|
29
|
-
static examples = [
|
|
30
|
-
"<%= config.bin %> auth signup",
|
|
31
|
-
"<%= config.bin %> auth signup -e user@example.com"
|
|
32
|
-
];
|
|
33
|
-
static flags = {
|
|
34
|
-
email: Flags.string({ char: "e", description: "Email address" }),
|
|
35
|
-
password: Flags.string({ char: "p", description: "Password (min 8 chars; for non-interactive use)" })
|
|
36
|
-
};
|
|
37
|
-
async run() {
|
|
38
|
-
const { flags } = await this.parse(_AuthSignup);
|
|
39
|
-
let email = flags.email;
|
|
40
|
-
let password = flags.password;
|
|
41
|
-
if (!email || !password) {
|
|
42
|
-
if (!process.stdin.isTTY) {
|
|
43
|
-
this.error("Missing credentials in a non-interactive shell. Pass --email/-e and --password/-p.");
|
|
44
|
-
}
|
|
45
|
-
const { input, password: passwordPrompt } = await import("@inquirer/prompts");
|
|
46
|
-
if (!email) {
|
|
47
|
-
email = await input({ message: "Email:" });
|
|
48
|
-
}
|
|
49
|
-
if (!password) {
|
|
50
|
-
password = await passwordPrompt({ message: "Password (min 8 chars):" });
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
let data;
|
|
54
|
-
try {
|
|
55
|
-
data = await api("/auth/signup", {
|
|
56
|
-
method: "POST",
|
|
57
|
-
body: { email, password },
|
|
58
|
-
timeoutMs: 2e4
|
|
59
|
-
});
|
|
60
|
-
} catch (err) {
|
|
61
|
-
if (err instanceof ApiError && err.statusCode === 409) {
|
|
62
|
-
this.error(`An account with ${email} already exists. Run: rulemetric auth login -e ${email}`);
|
|
63
|
-
}
|
|
64
|
-
throw err;
|
|
65
|
-
}
|
|
66
|
-
if (data.confirmationRequired || !data.accessToken || !data.refreshToken) {
|
|
67
|
-
this.log(`Account created for ${data.email}.`);
|
|
68
|
-
this.log("Check your email and click the confirmation link, then run:");
|
|
69
|
-
this.log(` rulemetric auth login -e ${data.email}`);
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
const expiresAt = data.expiresAt ?? new Date(Date.now() + 3600 * 1e3).toISOString();
|
|
73
|
-
saveToken({
|
|
74
|
-
accessToken: data.accessToken,
|
|
75
|
-
refreshToken: data.refreshToken,
|
|
76
|
-
expiresAt,
|
|
77
|
-
email: data.email
|
|
78
|
-
});
|
|
79
|
-
saveEnvFile(data.accessToken, process.env.RULEMETRIC_API_URL);
|
|
80
|
-
await bootstrapActiveOrg();
|
|
81
|
-
await ensureDeviceApiKey(this.log.bind(this), this.warn.bind(this), this.config.version);
|
|
82
|
-
void emitSetupEvent("auth_signup", {}, this.config.version);
|
|
83
|
-
this.log(`Signed up and logged in as ${data.email}`);
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
export {
|
|
87
|
-
AuthSignup as default
|
|
88
|
-
};
|
|
89
|
-
//# sourceMappingURL=signup.js.map
|
|
1
|
+
import{a as g}from"../../chunk-AHRHCERJ.js";import{a as h}from"../../chunk-LQRYQE6Q.js";import"../../chunk-IZTIYR5Q.js";import{c as d}from"../../chunk-CRAKDQ4H.js";import{b as l}from"../../chunk-WPJ2BND4.js";import"../../chunk-3AV3GTMP.js";import{b as m,c as p}from"../../chunk-TIQ7DQ3M.js";import{d as n,h as c}from"../../chunk-M6AJDVCL.js";import{a as o}from"../../chunk-ZLLER3HP.js";import{Flags as u}from"@oclif/core";var t=class f extends h{static{o(this,"AuthSignup")}static description="Create a RuleMetric account from the CLI";static examples=["<%= config.bin %> auth signup","<%= config.bin %> auth signup -e user@example.com"];static flags={email:u.string({char:"e",description:"Email address"}),password:u.string({char:"p",description:"Password (min 8 chars; for non-interactive use)"})};async run(){let{flags:a}=await this.parse(f),i=a.email,r=a.password;if(!i||!r){process.stdin.isTTY||this.error("Missing credentials in a non-interactive shell. Pass --email/-e and --password/-p.");let{input:s,password:v}=await import("@inquirer/prompts");i||(i=await s({message:"Email:"})),r||(r=await v({message:"Password (min 8 chars):"}))}let e;try{e=await p("/auth/signup",{method:"POST",body:{email:i,password:r},timeoutMs:2e4})}catch(s){throw s instanceof m&&s.statusCode===409&&this.error(`An account with ${i} already exists. Run: rulemetric auth login -e ${i}`),s}if(e.confirmationRequired||!e.accessToken||!e.refreshToken){this.log(`Account created for ${e.email}.`),this.log("Check your email and click the confirmation link, then run:"),this.log(` rulemetric auth login -e ${e.email}`);return}let w=e.expiresAt??new Date(Date.now()+3600*1e3).toISOString();n({accessToken:e.accessToken,refreshToken:e.refreshToken,expiresAt:w,email:e.email}),c(e.accessToken,process.env.RULEMETRIC_API_URL),await l(),await g(this.log.bind(this),this.warn.bind(this),this.config.version),d("auth_signup",{},this.config.version),this.log(`Signed up and logged in as ${e.email}`)}};export{t as default};
|
|
@@ -1,42 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
formatDate
|
|
3
|
-
} from "../../chunk-BZDKEQKU.js";
|
|
4
|
-
import {
|
|
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 "../../chunk-ZUJBM6HE.js";
|
|
12
|
-
import {
|
|
13
|
-
getDefaultConfigDir,
|
|
14
|
-
isAuthenticated,
|
|
15
|
-
loadToken
|
|
16
|
-
} from "../../chunk-W2YERO7E.js";
|
|
17
|
-
import "../../chunk-NSBPE2FW.js";
|
|
18
|
-
|
|
19
|
-
// src/commands/auth/status.ts
|
|
20
|
-
var AuthStatus = class _AuthStatus extends BaseCommand {
|
|
21
|
-
static description = "Show current authentication status";
|
|
22
|
-
static examples = ["<%= config.bin %> auth status"];
|
|
23
|
-
async run() {
|
|
24
|
-
await this.parse(_AuthStatus);
|
|
25
|
-
const token = loadToken();
|
|
26
|
-
if (!token) {
|
|
27
|
-
this.log("Not logged in. Run `rulemetric auth login` to authenticate.");
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
if (!isAuthenticated()) {
|
|
31
|
-
this.log("Session expired. Run `rulemetric auth login` to re-authenticate.");
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
this.log(`Logged in as: ${token.email}`);
|
|
35
|
-
this.log(`Session expires: ${formatDate(token.expiresAt)}`);
|
|
36
|
-
this.log(`Config: ${getDefaultConfigDir()}`);
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
export {
|
|
40
|
-
AuthStatus as default
|
|
41
|
-
};
|
|
42
|
-
//# sourceMappingURL=status.js.map
|
|
1
|
+
import{a as n}from"../../chunk-W2MV25SB.js";import{a}from"../../chunk-LQRYQE6Q.js";import"../../chunk-IZTIYR5Q.js";import"../../chunk-CRAKDQ4H.js";import"../../chunk-WPJ2BND4.js";import"../../chunk-3AV3GTMP.js";import"../../chunk-TIQ7DQ3M.js";import{e as o,g as r,k as s}from"../../chunk-M6AJDVCL.js";import{a as i}from"../../chunk-ZLLER3HP.js";var e=class u extends a{static{i(this,"AuthStatus")}static description="Show current authentication status";static examples=["<%= config.bin %> auth status"];async run(){await this.parse(u);let t=o();if(!t){this.log("Not logged in. Run `rulemetric auth login` to authenticate.");return}if(!r()){this.log("Session expired. Run `rulemetric auth login` to re-authenticate.");return}this.log(`Logged in as: ${t.email}`),this.log(`Session expires: ${n(t.expiresAt)}`),this.log(`Config: ${s()}`)}};export{e as default};
|
|
@@ -1,52 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
formatScope,
|
|
4
|
-
truncate
|
|
5
|
-
} from "../../chunk-BZDKEQKU.js";
|
|
6
|
-
import {
|
|
7
|
-
BaseCommand
|
|
8
|
-
} from "../../chunk-2HK7RGZB.js";
|
|
9
|
-
import "../../chunk-R56PH7YE.js";
|
|
10
|
-
import "../../chunk-GQNJO2P2.js";
|
|
11
|
-
import "../../chunk-37LN5O7M.js";
|
|
12
|
-
import "../../chunk-EKJ2CABV.js";
|
|
13
|
-
import {
|
|
14
|
-
apiGet
|
|
15
|
-
} from "../../chunk-ZUJBM6HE.js";
|
|
16
|
-
import "../../chunk-W2YERO7E.js";
|
|
17
|
-
import "../../chunk-NSBPE2FW.js";
|
|
18
|
-
|
|
19
|
-
// src/commands/catalog/index.ts
|
|
20
|
-
import { Flags } from "@oclif/core";
|
|
21
|
-
var Catalog = class _Catalog extends BaseCommand {
|
|
22
|
-
static description = "Browse the org instruction catalog";
|
|
23
|
-
static flags = {
|
|
24
|
-
badge: Flags.string({ description: "Filter by badge", options: ["recommended", "required"] }),
|
|
25
|
-
scope: Flags.string({ description: "Filter by scope", options: ["org", "team"] }),
|
|
26
|
-
search: Flags.string({ description: "Search by name or description" })
|
|
27
|
-
};
|
|
28
|
-
async run() {
|
|
29
|
-
const { flags } = await this.parse(_Catalog);
|
|
30
|
-
this.requireAuth();
|
|
31
|
-
const params = new URLSearchParams();
|
|
32
|
-
if (flags.badge) params.set("badge", flags.badge);
|
|
33
|
-
if (flags.scope) params.set("scope", flags.scope);
|
|
34
|
-
if (flags.search) params.set("search", flags.search);
|
|
35
|
-
const results = await apiGet(`/api/catalog?${params.toString()}`);
|
|
36
|
-
if (results.length === 0) {
|
|
37
|
-
this.log("No instructions found in catalog.");
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
for (const item of results) {
|
|
41
|
-
const badgeStr = item.badge ? ` [${item.badge}]` : "";
|
|
42
|
-
const tags = item.tags?.length ? ` (${item.tags.join(", ")})` : "";
|
|
43
|
-
this.log(` ${truncate(item.name, 40)} \u2014 ${formatScope(item.scope)}${badgeStr} v${item.version}${tags} ${formatDate(item.updatedAt)}`);
|
|
44
|
-
}
|
|
45
|
-
this.log(`
|
|
46
|
-
${results.length} instruction(s) found.`);
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
export {
|
|
50
|
-
Catalog as default
|
|
51
|
-
};
|
|
52
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
import{a as g,b as d,c as p}from"../../chunk-W2MV25SB.js";import{a as c}from"../../chunk-LQRYQE6Q.js";import"../../chunk-IZTIYR5Q.js";import"../../chunk-CRAKDQ4H.js";import"../../chunk-WPJ2BND4.js";import"../../chunk-3AV3GTMP.js";import{d as n}from"../../chunk-TIQ7DQ3M.js";import"../../chunk-M6AJDVCL.js";import{a}from"../../chunk-ZLLER3HP.js";import{Flags as i}from"@oclif/core";var o=class m extends c{static{a(this,"Catalog")}static description="Browse the org instruction catalog";static flags={badge:i.string({description:"Filter by badge",options:["recommended","required"]}),scope:i.string({description:"Filter by scope",options:["org","team"]}),search:i.string({description:"Search by name or description"})};async run(){let{flags:e}=await this.parse(m);this.requireAuth();let s=new URLSearchParams;e.badge&&s.set("badge",e.badge),e.scope&&s.set("scope",e.scope),e.search&&s.set("search",e.search);let r=await n(`/api/catalog?${s.toString()}`);if(r.length===0){this.log("No instructions found in catalog.");return}for(let t of r){let l=t.badge?` [${t.badge}]`:"",f=t.tags?.length?` (${t.tags.join(", ")})`:"";this.log(` ${d(t.name,40)} \u2014 ${p(t.scope)}${l} v${t.version}${f} ${g(t.updatedAt)}`)}this.log(`
|
|
2
|
+
${r.length} instruction(s) found.`)}};export{o as default};
|
|
@@ -1,43 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
}
|
|
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/catalog/recommend.ts
|
|
15
|
-
import { Args } from "@oclif/core";
|
|
16
|
-
var CatalogRecommend = class _CatalogRecommend extends BaseCommand {
|
|
17
|
-
static description = "Get AI-powered instruction recommendations for a project";
|
|
18
|
-
static args = {
|
|
19
|
-
projectId: Args.string({ description: "ID of the project", required: true })
|
|
20
|
-
};
|
|
21
|
-
async run() {
|
|
22
|
-
const { args } = await this.parse(_CatalogRecommend);
|
|
23
|
-
this.requireAuth();
|
|
24
|
-
this.log("Analyzing project and generating recommendations...\n");
|
|
25
|
-
const result = await apiPost(`/api/projects/${args.projectId}/recommendations`, {});
|
|
26
|
-
if (result.error) {
|
|
27
|
-
this.warn(`Note: ${result.error}`);
|
|
28
|
-
}
|
|
29
|
-
if (result.recommendations.length === 0) {
|
|
30
|
-
this.log("No recommendations found.");
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
for (const rec of result.recommendations) {
|
|
34
|
-
this.log(` ${(rec.score * 100).toFixed(0)}% \u2014 ${rec.instructionId}`);
|
|
35
|
-
this.log(` ${rec.reason}
|
|
36
|
-
`);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
export {
|
|
41
|
-
CatalogRecommend as default
|
|
42
|
-
};
|
|
43
|
-
//# sourceMappingURL=recommend.js.map
|
|
1
|
+
import{a as i}from"../../chunk-LQRYQE6Q.js";import"../../chunk-IZTIYR5Q.js";import"../../chunk-CRAKDQ4H.js";import"../../chunk-WPJ2BND4.js";import"../../chunk-3AV3GTMP.js";import{e as n}from"../../chunk-TIQ7DQ3M.js";import"../../chunk-M6AJDVCL.js";import{a as t}from"../../chunk-ZLLER3HP.js";import{Args as c}from"@oclif/core";var o=class s extends i{static{t(this,"CatalogRecommend")}static description="Get AI-powered instruction recommendations for a project";static args={projectId:c.string({description:"ID of the project",required:!0})};async run(){let{args:a}=await this.parse(s);this.requireAuth(),this.log(`Analyzing project and generating recommendations...
|
|
2
|
+
`);let r=await n(`/api/projects/${a.projectId}/recommendations`,{});if(r.error&&this.warn(`Note: ${r.error}`),r.recommendations.length===0){this.log("No recommendations found.");return}for(let e of r.recommendations)this.log(` ${(e.score*100).toFixed(0)}% \u2014 ${e.instructionId}`),this.log(` ${e.reason}
|
|
3
|
+
`)}};export{o as default};
|
package/dist/commands/convert.js
CHANGED
|
@@ -1,75 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
validateUuid
|
|
3
|
-
} from "../chunk-7NYKWN7U.js";
|
|
4
|
-
import {
|
|
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
|
-
DEFAULT_API_URL,
|
|
13
|
-
apiPost
|
|
14
|
-
} from "../chunk-ZUJBM6HE.js";
|
|
15
|
-
import "../chunk-W2YERO7E.js";
|
|
16
|
-
import "../chunk-NSBPE2FW.js";
|
|
17
|
-
|
|
18
|
-
// src/commands/convert.ts
|
|
19
|
-
import * as fs from "node:fs";
|
|
20
|
-
import { Args, Flags } from "@oclif/core";
|
|
21
|
-
var Convert = class _Convert extends BaseCommand {
|
|
22
|
-
static description = "Convert an instruction to a target format";
|
|
23
|
-
static examples = [
|
|
24
|
-
"<%= config.bin %> convert <id> --format claude-md",
|
|
25
|
-
"<%= config.bin %> convert <id> -f cursorrules --score",
|
|
26
|
-
"<%= config.bin %> convert <id> -f copilot -o .github/copilot-instructions.md"
|
|
27
|
-
];
|
|
28
|
-
static args = {
|
|
29
|
-
id: Args.string({ description: "Instruction ID", required: true })
|
|
30
|
-
};
|
|
31
|
-
static flags = {
|
|
32
|
-
format: Flags.string({
|
|
33
|
-
char: "f",
|
|
34
|
-
description: "Target format (e.g., claude-md, cursorrules)",
|
|
35
|
-
required: true
|
|
36
|
-
}),
|
|
37
|
-
score: Flags.boolean({
|
|
38
|
-
description: "Include quality score",
|
|
39
|
-
default: false
|
|
40
|
-
}),
|
|
41
|
-
output: Flags.string({
|
|
42
|
-
char: "o",
|
|
43
|
-
description: "Write output to file"
|
|
44
|
-
})
|
|
45
|
-
};
|
|
46
|
-
async run() {
|
|
47
|
-
const { args, flags } = await this.parse(_Convert);
|
|
48
|
-
this.requireAuth();
|
|
49
|
-
validateUuid(args.id, "instruction ID");
|
|
50
|
-
const url = new URL(`${process.env.RULEMETRIC_API_URL ?? DEFAULT_API_URL}/api/instructions/${encodeURIComponent(args.id)}/convert`);
|
|
51
|
-
url.searchParams.set("format", flags.format);
|
|
52
|
-
url.searchParams.set("score", String(flags.score));
|
|
53
|
-
const result = await apiPost(
|
|
54
|
-
`${url.pathname}${url.search}`,
|
|
55
|
-
{}
|
|
56
|
-
);
|
|
57
|
-
if (flags.output) {
|
|
58
|
-
fs.writeFileSync(flags.output, result.output, "utf-8");
|
|
59
|
-
this.log(`Written to ${flags.output}`);
|
|
60
|
-
} else {
|
|
61
|
-
this.log(result.output);
|
|
62
|
-
}
|
|
63
|
-
if (flags.score && result.score) {
|
|
64
|
-
this.log("");
|
|
65
|
-
this.log(`Quality Score: ${result.score.overall}/100`);
|
|
66
|
-
}
|
|
67
|
-
if (result.warnings.length > 0) {
|
|
68
|
-
this.warn(`Warnings: ${result.warnings.join(", ")}`);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
export {
|
|
73
|
-
Convert as default
|
|
74
|
-
};
|
|
75
|
-
//# sourceMappingURL=convert.js.map
|
|
1
|
+
import{a as l}from"../chunk-WLVQJH4E.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{a as n,e as c}from"../chunk-TIQ7DQ3M.js";import"../chunk-M6AJDVCL.js";import{a}from"../chunk-ZLLER3HP.js";import*as d from"node:fs";import{Args as p,Flags as i}from"@oclif/core";var e=class f extends u{static{a(this,"Convert")}static description="Convert an instruction to a target format";static examples=["<%= config.bin %> convert <id> --format claude-md","<%= config.bin %> convert <id> -f cursorrules --score","<%= config.bin %> convert <id> -f copilot -o .github/copilot-instructions.md"];static args={id:p.string({description:"Instruction ID",required:!0})};static flags={format:i.string({char:"f",description:"Target format (e.g., claude-md, cursorrules)",required:!0}),score:i.boolean({description:"Include quality score",default:!1}),output:i.string({char:"o",description:"Write output to file"})};async run(){let{args:s,flags:t}=await this.parse(f);this.requireAuth(),l(s.id,"instruction ID");let o=new URL(`${process.env.RULEMETRIC_API_URL??n}/api/instructions/${encodeURIComponent(s.id)}/convert`);o.searchParams.set("format",t.format),o.searchParams.set("score",String(t.score));let r=await c(`${o.pathname}${o.search}`,{});t.output?(d.writeFileSync(t.output,r.output,"utf-8"),this.log(`Written to ${t.output}`)):this.log(r.output),t.score&&r.score&&(this.log(""),this.log(`Quality Score: ${r.score.overall}/100`)),r.warnings.length>0&&this.warn(`Warnings: ${r.warnings.join(", ")}`)}};export{e as default};
|
|
@@ -1,54 +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
|
-
apiGet
|
|
10
|
-
} from "../chunk-ZUJBM6HE.js";
|
|
11
|
-
import "../chunk-W2YERO7E.js";
|
|
12
|
-
import "../chunk-NSBPE2FW.js";
|
|
13
|
-
|
|
14
|
-
// src/commands/converters.ts
|
|
15
|
-
import { Flags } from "@oclif/core";
|
|
16
|
-
import { printTable } from "@oclif/table";
|
|
17
|
-
var Converters = class _Converters extends BaseCommand {
|
|
18
|
-
static description = "List all supported conversion formats";
|
|
19
|
-
static examples = [
|
|
20
|
-
"<%= config.bin %> converters",
|
|
21
|
-
"<%= config.bin %> converters --tier 1"
|
|
22
|
-
];
|
|
23
|
-
static enableJsonFlag = true;
|
|
24
|
-
static flags = {
|
|
25
|
-
tier: Flags.string({
|
|
26
|
-
char: "t",
|
|
27
|
-
description: "Filter by tier",
|
|
28
|
-
options: ["1", "2", "3"]
|
|
29
|
-
})
|
|
30
|
-
};
|
|
31
|
-
async run() {
|
|
32
|
-
const { flags } = await this.parse(_Converters);
|
|
33
|
-
this.requireAuth();
|
|
34
|
-
let entries = await apiGet("/api/converters");
|
|
35
|
-
if (flags.tier) {
|
|
36
|
-
const tierNum = Number.parseInt(flags.tier, 10);
|
|
37
|
-
entries = entries.filter((e) => e.tier === tierNum);
|
|
38
|
-
}
|
|
39
|
-
printTable({
|
|
40
|
-
data: entries.map((e) => ({
|
|
41
|
-
ID: e.id,
|
|
42
|
-
Name: e.name,
|
|
43
|
-
Tier: String(e.tier),
|
|
44
|
-
"Output Path": e.outputPath
|
|
45
|
-
})),
|
|
46
|
-
columns: ["ID", "Name", "Tier", "Output Path"]
|
|
47
|
-
});
|
|
48
|
-
return entries;
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
export {
|
|
52
|
-
Converters as default
|
|
53
|
-
};
|
|
54
|
-
//# sourceMappingURL=converters.js.map
|
|
1
|
+
import{a as s}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 o}from"../chunk-ZLLER3HP.js";import{Flags as m}from"@oclif/core";import{printTable as c}from"@oclif/table";var e=class n extends s{static{o(this,"Converters")}static description="List all supported conversion formats";static examples=["<%= config.bin %> converters","<%= config.bin %> converters --tier 1"];static enableJsonFlag=!0;static flags={tier:m.string({char:"t",description:"Filter by tier",options:["1","2","3"]})};async run(){let{flags:i}=await this.parse(n);this.requireAuth();let r=await a("/api/converters");if(i.tier){let t=Number.parseInt(i.tier,10);r=r.filter(p=>p.tier===t)}return c({data:r.map(t=>({ID:t.id,Name:t.name,Tier:String(t.tier),"Output Path":t.outputPath})),columns:["ID","Name","Tier","Output Path"]}),r}};export{e as default};
|
|
@@ -1,41 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
MANUAL_TASK_META
|
|
3
|
-
} from "../../chunk-JFDWKLQC.js";
|
|
4
|
-
import {
|
|
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 "../../chunk-ZUJBM6HE.js";
|
|
12
|
-
import "../../chunk-W2YERO7E.js";
|
|
13
|
-
import "../../chunk-NSBPE2FW.js";
|
|
14
|
-
|
|
15
|
-
// src/commands/crons/list.ts
|
|
16
|
-
import { printTable } from "@oclif/table";
|
|
17
|
-
var CronsList = class _CronsList extends BaseCommand {
|
|
18
|
-
static description = "List manually-runnable maintenance tasks";
|
|
19
|
-
static examples = [
|
|
20
|
-
"<%= config.bin %> crons list"
|
|
21
|
-
];
|
|
22
|
-
async run() {
|
|
23
|
-
await this.parse(_CronsList);
|
|
24
|
-
printTable({
|
|
25
|
-
data: MANUAL_TASK_META.map((t) => ({
|
|
26
|
-
Name: t.name,
|
|
27
|
-
"Scheduled by": t.scheduledBy,
|
|
28
|
-
Description: t.description
|
|
29
|
-
})),
|
|
30
|
-
columns: ["Name", "Scheduled by", "Description"]
|
|
31
|
-
});
|
|
32
|
-
this.log("");
|
|
33
|
-
this.log("Scheduled crons run in Supabase pg_cron \u2014 audit them with:");
|
|
34
|
-
this.log(` psql "$DATABASE_URL" -c 'select jobname, schedule, active from cron.job;'`);
|
|
35
|
-
this.log("Run any task above on demand with: rulemetric crons run <name>");
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
export {
|
|
39
|
-
CronsList as default
|
|
40
|
-
};
|
|
41
|
-
//# sourceMappingURL=list.js.map
|
|
1
|
+
import{a as o}from"../../chunk-GY5IJ4RS.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"../../chunk-TIQ7DQ3M.js";import"../../chunk-M6AJDVCL.js";import{a as i}from"../../chunk-ZLLER3HP.js";import{printTable as t}from"@oclif/table";var a=class s extends n{static{i(this,"CronsList")}static description="List manually-runnable maintenance tasks";static examples=["<%= config.bin %> crons list"];async run(){await this.parse(s),t({data:o.map(e=>({Name:e.name,"Scheduled by":e.scheduledBy,Description:e.description})),columns:["Name","Scheduled by","Description"]}),this.log(""),this.log("Scheduled crons run in Supabase pg_cron \u2014 audit them with:"),this.log(` psql "$DATABASE_URL" -c 'select jobname, schedule, active from cron.job;'`),this.log("Run any task above on demand with: rulemetric crons run <name>")}};export{a as default};
|
|
@@ -1,76 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
} from "../../chunk-JFDWKLQC.js";
|
|
4
|
-
import {
|
|
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 "../../chunk-ZUJBM6HE.js";
|
|
12
|
-
import "../../chunk-W2YERO7E.js";
|
|
13
|
-
import "../../chunk-NSBPE2FW.js";
|
|
14
|
-
|
|
15
|
-
// src/commands/crons/run.ts
|
|
16
|
-
import { Args, Flags } from "@oclif/core";
|
|
17
|
-
var CronsRun = class _CronsRun extends BaseCommand {
|
|
18
|
-
static description = "Run a maintenance task synchronously, right now";
|
|
19
|
-
static examples = [
|
|
20
|
-
"<%= config.bin %> crons run cron_check_changelog",
|
|
21
|
-
"<%= config.bin %> crons run cron_suggest_instructions --quiet"
|
|
22
|
-
];
|
|
23
|
-
static args = {
|
|
24
|
-
name: Args.string({
|
|
25
|
-
description: "Task name (run `rulemetric crons list` to see all)",
|
|
26
|
-
required: true
|
|
27
|
-
})
|
|
28
|
-
};
|
|
29
|
-
static flags = {
|
|
30
|
-
quiet: Flags.boolean({
|
|
31
|
-
char: "q",
|
|
32
|
-
description: "Suppress per-line log output; print summary only"
|
|
33
|
-
})
|
|
34
|
-
};
|
|
35
|
-
async run() {
|
|
36
|
-
const { args, flags } = await this.parse(_CronsRun);
|
|
37
|
-
this.requireAuth();
|
|
38
|
-
const def = MANUAL_TASK_META.find((t) => t.name === args.name);
|
|
39
|
-
if (!def) {
|
|
40
|
-
this.error(`Unknown task: ${args.name}
|
|
41
|
-
Run \`rulemetric crons list\` to see available tasks.`);
|
|
42
|
-
}
|
|
43
|
-
let runManualTask;
|
|
44
|
-
try {
|
|
45
|
-
({ runManualTask } = await import("../../lib/manual-tasks.js"));
|
|
46
|
-
} catch (err) {
|
|
47
|
-
const code = err?.code;
|
|
48
|
-
if (code === "ERR_MODULE_NOT_FOUND" || code === "MODULE_NOT_FOUND") {
|
|
49
|
-
this.error(
|
|
50
|
-
`\`crons run\` needs the worker runtime, which isn't available in this install.
|
|
51
|
-
These maintenance tasks connect to the database directly \u2014 run them from a full RuleMetric checkout with DATABASE_URL and the worker dependencies installed.`
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
throw err;
|
|
55
|
-
}
|
|
56
|
-
this.log(`\u25B6 Running ${def.name} \u2026`);
|
|
57
|
-
const startedAt = Date.now();
|
|
58
|
-
const result = await runManualTask(args.name);
|
|
59
|
-
if (!flags.quiet) {
|
|
60
|
-
for (const line of result.logs) {
|
|
61
|
-
const prefix = line.level === "error" || line.level === "warn" ? `[${line.level}]` : "";
|
|
62
|
-
this.log(` ${prefix} ${line.message}`);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
const seconds = ((result.durationMs ?? Date.now() - startedAt) / 1e3).toFixed(1);
|
|
66
|
-
if (result.ok) {
|
|
67
|
-
this.log(`\u2713 ${def.name} completed in ${seconds}s (${result.logs.length} log line${result.logs.length === 1 ? "" : "s"})`);
|
|
68
|
-
} else {
|
|
69
|
-
this.error(`\u2717 ${def.name} failed after ${seconds}s: ${result.error}`);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
export {
|
|
74
|
-
CronsRun as default
|
|
75
|
-
};
|
|
76
|
-
//# sourceMappingURL=run.js.map
|
|
1
|
+
import{a as u}from"../../chunk-GY5IJ4RS.js";import{a as c}from"../../chunk-LQRYQE6Q.js";import"../../chunk-IZTIYR5Q.js";import"../../chunk-CRAKDQ4H.js";import"../../chunk-WPJ2BND4.js";import"../../chunk-3AV3GTMP.js";import"../../chunk-TIQ7DQ3M.js";import"../../chunk-M6AJDVCL.js";import{a as l}from"../../chunk-ZLLER3HP.js";import{Args as g,Flags as f}from"@oclif/core";var i=class m extends c{static{l(this,"CronsRun")}static description="Run a maintenance task synchronously, right now";static examples=["<%= config.bin %> crons run cron_check_changelog","<%= config.bin %> crons run cron_suggest_instructions --quiet"];static args={name:g.string({description:"Task name (run `rulemetric crons list` to see all)",required:!0})};static flags={quiet:f.boolean({char:"q",description:"Suppress per-line log output; print summary only"})};async run(){let{args:s,flags:d}=await this.parse(m);this.requireAuth();let n=u.find(e=>e.name===s.name);n||this.error(`Unknown task: ${s.name}
|
|
2
|
+
Run \`rulemetric crons list\` to see available tasks.`);let o;try{({runManualTask:o}=await import("../../lib/manual-tasks.js"))}catch(e){let r=e?.code;throw(r==="ERR_MODULE_NOT_FOUND"||r==="MODULE_NOT_FOUND")&&this.error("`crons run` needs the worker runtime, which isn't available in this install.\nThese maintenance tasks connect to the database directly \u2014 run them from a full RuleMetric checkout with DATABASE_URL and the worker dependencies installed."),e}this.log(`\u25B6 Running ${n.name} \u2026`);let h=Date.now(),t=await o(s.name);if(!d.quiet)for(let e of t.logs){let r=e.level==="error"||e.level==="warn"?`[${e.level}]`:"";this.log(` ${r} ${e.message}`)}let a=((t.durationMs??Date.now()-h)/1e3).toFixed(1);t.ok?this.log(`\u2713 ${n.name} completed in ${a}s (${t.logs.length} log line${t.logs.length===1?"":"s"})`):this.error(`\u2717 ${n.name} failed after ${a}s: ${t.error}`)}};export{i as default};
|