@rulemetric/cli 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base-command.js +13 -52
- package/dist/base-command.js.map +7 -1
- package/dist/chunk-2AM54TUK.js +59 -0
- package/dist/chunk-2AM54TUK.js.map +7 -0
- package/dist/chunk-3TIMQ3O6.js +96 -0
- package/dist/chunk-3TIMQ3O6.js.map +7 -0
- package/dist/chunk-4BHDHHKL.js +48 -0
- package/dist/chunk-4BHDHHKL.js.map +7 -0
- package/dist/chunk-4D537GXE.js +99 -0
- package/dist/chunk-4D537GXE.js.map +7 -0
- package/dist/chunk-4SCZK7AL.js +129 -0
- package/dist/chunk-4SCZK7AL.js.map +7 -0
- package/dist/chunk-4WFE4PFP.js +61 -0
- package/dist/chunk-4WFE4PFP.js.map +7 -0
- package/dist/chunk-52WIYRZH.js +73 -0
- package/dist/chunk-52WIYRZH.js.map +7 -0
- package/dist/chunk-7FAA3YNB.js +1549 -0
- package/dist/chunk-7FAA3YNB.js.map +7 -0
- package/dist/chunk-7NYKWN7U.js +12 -0
- package/dist/chunk-7NYKWN7U.js.map +7 -0
- package/dist/chunk-AULP2OWH.js +99 -0
- package/dist/chunk-AULP2OWH.js.map +7 -0
- package/dist/chunk-B5KNTGMJ.js +1788 -0
- package/dist/chunk-B5KNTGMJ.js.map +7 -0
- package/dist/chunk-BD7CY42U.js +23 -0
- package/dist/chunk-BD7CY42U.js.map +7 -0
- package/dist/chunk-BO76WKJR.js +42 -0
- package/dist/chunk-BO76WKJR.js.map +7 -0
- package/dist/chunk-BRD5RUGM.js +53 -0
- package/dist/chunk-BRD5RUGM.js.map +7 -0
- package/dist/chunk-BT6Z6545.js +43 -0
- package/dist/chunk-BT6Z6545.js.map +7 -0
- package/dist/chunk-BZDKEQKU.js +39 -0
- package/dist/chunk-BZDKEQKU.js.map +7 -0
- package/dist/chunk-CROYS75W.js +161 -0
- package/dist/chunk-CROYS75W.js.map +7 -0
- package/dist/chunk-DGHWRQXL.js +17 -0
- package/dist/chunk-DGHWRQXL.js.map +7 -0
- package/dist/chunk-DQ3KELXD.js +74 -0
- package/dist/chunk-DQ3KELXD.js.map +7 -0
- package/dist/chunk-DTFXCHHI.js +108 -0
- package/dist/chunk-DTFXCHHI.js.map +7 -0
- package/dist/chunk-DU73QUS3.js +75 -0
- package/dist/chunk-DU73QUS3.js.map +7 -0
- package/dist/chunk-EHZJ6OXD.js +307 -0
- package/dist/chunk-EHZJ6OXD.js.map +7 -0
- package/dist/chunk-EJOI2ZGU.js +109 -0
- package/dist/chunk-EJOI2ZGU.js.map +7 -0
- package/dist/chunk-EKJ2CABV.js +76 -0
- package/dist/chunk-EKJ2CABV.js.map +7 -0
- package/dist/chunk-EKP32DLN.js +16 -0
- package/dist/chunk-EKP32DLN.js.map +7 -0
- package/dist/chunk-EOOP6WTC.js +148 -0
- package/dist/chunk-EOOP6WTC.js.map +7 -0
- package/dist/chunk-ERPMDAO3.js +20 -0
- package/dist/chunk-ERPMDAO3.js.map +7 -0
- package/dist/chunk-FTJRMUID.js +96 -0
- package/dist/chunk-FTJRMUID.js.map +7 -0
- package/dist/chunk-FZKLLNDS.js +228 -0
- package/dist/chunk-FZKLLNDS.js.map +7 -0
- package/dist/chunk-GQCISMAH.js +157 -0
- package/dist/chunk-GQCISMAH.js.map +7 -0
- package/dist/chunk-IGXX624H.js +55 -0
- package/dist/chunk-IGXX624H.js.map +7 -0
- package/dist/chunk-IJGF2ETG.js +68 -0
- package/dist/chunk-IJGF2ETG.js.map +7 -0
- package/dist/chunk-IWYCRLEK.js +220 -0
- package/dist/chunk-IWYCRLEK.js.map +7 -0
- package/dist/chunk-J7N3DLH6.js +117 -0
- package/dist/chunk-J7N3DLH6.js.map +7 -0
- package/dist/chunk-JX5UI6RW.js +99 -0
- package/dist/chunk-JX5UI6RW.js.map +7 -0
- package/dist/chunk-K3BFZ7KG.js +154 -0
- package/dist/chunk-K3BFZ7KG.js.map +7 -0
- package/dist/chunk-KHJUQFIK.js +51 -0
- package/dist/chunk-KHJUQFIK.js.map +7 -0
- package/dist/chunk-KRBQLMOP.js +41 -0
- package/dist/chunk-KRBQLMOP.js.map +7 -0
- package/dist/chunk-KZRFUXGF.js +145 -0
- package/dist/chunk-KZRFUXGF.js.map +7 -0
- package/dist/chunk-L674RNKQ.js +492 -0
- package/dist/chunk-L674RNKQ.js.map +7 -0
- package/dist/chunk-N52AHNBH.js +47 -0
- package/dist/chunk-N52AHNBH.js.map +7 -0
- package/dist/chunk-NIDLJO6F.js +228 -0
- package/dist/chunk-NIDLJO6F.js.map +7 -0
- package/dist/chunk-NSBPE2FW.js +17 -0
- package/dist/chunk-NSBPE2FW.js.map +7 -0
- package/dist/chunk-OGVORIFM.js +70 -0
- package/dist/chunk-OGVORIFM.js.map +7 -0
- package/dist/chunk-OQSQC7VB.js +77 -0
- package/dist/chunk-OQSQC7VB.js.map +7 -0
- package/dist/chunk-PHLMIZKM.js +153 -0
- package/dist/chunk-PHLMIZKM.js.map +7 -0
- package/dist/chunk-PQU7GZ7A.js +92 -0
- package/dist/chunk-PQU7GZ7A.js.map +7 -0
- package/dist/chunk-PXVQLD7S.js +196 -0
- package/dist/chunk-PXVQLD7S.js.map +7 -0
- package/dist/chunk-QD6X4L4L.js +79 -0
- package/dist/chunk-QD6X4L4L.js.map +7 -0
- package/dist/chunk-QJQS6TUN.js +44 -0
- package/dist/chunk-QJQS6TUN.js.map +7 -0
- package/dist/chunk-QJXAULRC.js +191 -0
- package/dist/chunk-QJXAULRC.js.map +7 -0
- package/dist/chunk-QN34TGD3.js +83 -0
- package/dist/chunk-QN34TGD3.js.map +7 -0
- package/dist/chunk-R5MFHGHR.js +122 -0
- package/dist/chunk-R5MFHGHR.js.map +7 -0
- package/dist/chunk-RH7NHVSK.js +16 -0
- package/dist/chunk-RH7NHVSK.js.map +7 -0
- package/dist/chunk-RJ7BHDLM.js +121 -0
- package/dist/chunk-RJ7BHDLM.js.map +7 -0
- package/dist/chunk-RQ2TMLKG.js +142 -0
- package/dist/chunk-RQ2TMLKG.js.map +7 -0
- package/dist/chunk-S56LOTGQ.js +63 -0
- package/dist/chunk-S56LOTGQ.js.map +7 -0
- package/dist/chunk-UF73WX2J.js +49 -0
- package/dist/chunk-UF73WX2J.js.map +7 -0
- package/dist/chunk-W53GKIZQ.js +50 -0
- package/dist/chunk-W53GKIZQ.js.map +7 -0
- package/dist/chunk-WA4MWYRW.js +254 -0
- package/dist/chunk-WA4MWYRW.js.map +7 -0
- package/dist/chunk-WFULKPEQ.js +269 -0
- package/dist/chunk-WFULKPEQ.js.map +7 -0
- package/dist/chunk-XC6M4CSW.js +44 -0
- package/dist/chunk-XC6M4CSW.js.map +7 -0
- package/dist/chunk-XPUEGHXN.js +243 -0
- package/dist/chunk-XPUEGHXN.js.map +7 -0
- package/dist/chunk-XZXS2W24.js +148 -0
- package/dist/chunk-XZXS2W24.js.map +7 -0
- package/dist/chunk-YBNW7ARH.js +167 -0
- package/dist/chunk-YBNW7ARH.js.map +7 -0
- package/dist/chunk-YNIH3KMU.js +121 -0
- package/dist/chunk-YNIH3KMU.js.map +7 -0
- package/dist/commands/antigravity/backfill.js +135 -0
- package/dist/commands/antigravity/backfill.js.map +7 -0
- package/dist/commands/auth/create-key.js +48 -33
- package/dist/commands/auth/create-key.js.map +7 -1
- package/dist/commands/auth/login.js +58 -46
- package/dist/commands/auth/login.js.map +7 -1
- package/dist/commands/auth/logout.js +28 -13
- package/dist/commands/auth/logout.js.map +7 -1
- package/dist/commands/auth/revoke-key.js +32 -18
- package/dist/commands/auth/revoke-key.js.map +7 -1
- package/dist/commands/auth/status.js +40 -22
- package/dist/commands/auth/status.js.map +7 -1
- package/dist/commands/catalog/index.js +50 -34
- package/dist/commands/catalog/index.js.map +7 -1
- package/dist/commands/catalog/recommend.js +41 -26
- package/dist/commands/catalog/recommend.js.map +7 -1
- package/dist/commands/convert.js +72 -54
- package/dist/commands/convert.js.map +7 -1
- package/dist/commands/converters.js +52 -38
- package/dist/commands/converters.js.map +7 -1
- package/dist/commands/crons/list.js +50 -24
- package/dist/commands/crons/list.js.map +7 -1
- package/dist/commands/crons/run.js +72 -47
- package/dist/commands/crons/run.js.map +7 -1
- package/dist/commands/dashboard.js +45 -24
- package/dist/commands/dashboard.js.map +7 -1
- package/dist/commands/eval-targets/create.js +51 -39
- package/dist/commands/eval-targets/create.js.map +7 -1
- package/dist/commands/eval-targets/list.js +52 -35
- package/dist/commands/eval-targets/list.js.map +7 -1
- package/dist/commands/evals/agent.js +292 -0
- package/dist/commands/evals/agent.js.map +7 -0
- package/dist/commands/evals/benchmark.js +70 -51
- package/dist/commands/evals/benchmark.js.map +7 -1
- package/dist/commands/evals/compare.js +90 -78
- package/dist/commands/evals/compare.js.map +7 -1
- package/dist/commands/evals/create.js +64 -50
- package/dist/commands/evals/create.js.map +7 -1
- package/dist/commands/evals/optimize-description.js +225 -222
- package/dist/commands/evals/optimize-description.js.map +7 -1
- package/dist/commands/evals/optimize.js +206 -196
- package/dist/commands/evals/optimize.js.map +7 -1
- package/dist/commands/evals/run.js +178 -164
- package/dist/commands/evals/run.js.map +7 -1
- package/dist/commands/gateway/ensure.js +33 -19
- package/dist/commands/gateway/ensure.js.map +7 -1
- package/dist/commands/hooks/install.js +335 -275
- package/dist/commands/hooks/install.js.map +7 -1
- package/dist/commands/hooks/run.js +72 -53
- package/dist/commands/hooks/run.js.map +7 -1
- package/dist/commands/hooks/uninstall.js +117 -94
- package/dist/commands/hooks/uninstall.js.map +7 -1
- package/dist/commands/import.js +63 -53
- package/dist/commands/import.js.map +7 -1
- package/dist/commands/instructions/create.js +71 -58
- package/dist/commands/instructions/create.js.map +7 -1
- package/dist/commands/instructions/delete.js +53 -36
- package/dist/commands/instructions/delete.js.map +7 -1
- package/dist/commands/instructions/fork.js +33 -19
- package/dist/commands/instructions/fork.js.map +7 -1
- package/dist/commands/instructions/get.js +66 -49
- package/dist/commands/instructions/get.js.map +7 -1
- package/dist/commands/instructions/list.js +63 -46
- package/dist/commands/instructions/list.js.map +7 -1
- package/dist/commands/instructions/promote.js +41 -27
- package/dist/commands/instructions/promote.js.map +7 -1
- package/dist/commands/instructions/pull.js +37 -21
- package/dist/commands/instructions/pull.js.map +7 -1
- package/dist/commands/instructions/upstream.js +36 -21
- package/dist/commands/instructions/upstream.js.map +7 -1
- package/dist/commands/instructions/versions.js +51 -33
- package/dist/commands/instructions/versions.js.map +7 -1
- package/dist/commands/launcher.js +39 -0
- package/dist/commands/launcher.js.map +7 -0
- package/dist/commands/org/current.js +74 -68
- package/dist/commands/org/current.js.map +7 -1
- package/dist/commands/org/list.js +50 -36
- package/dist/commands/org/list.js.map +7 -1
- package/dist/commands/org/switch.js +69 -51
- package/dist/commands/org/switch.js.map +7 -1
- package/dist/commands/packs/add-instruction.js +36 -22
- package/dist/commands/packs/add-instruction.js.map +7 -1
- package/dist/commands/packs/apply.js +38 -24
- package/dist/commands/packs/apply.js.map +7 -1
- package/dist/commands/packs/create.js +47 -33
- package/dist/commands/packs/create.js.map +7 -1
- package/dist/commands/packs/fork.js +33 -19
- package/dist/commands/packs/fork.js.map +7 -1
- package/dist/commands/packs/get.js +54 -35
- package/dist/commands/packs/get.js.map +7 -1
- package/dist/commands/packs/list.js +64 -47
- package/dist/commands/packs/list.js.map +7 -1
- package/dist/commands/packs/remove-instruction.js +34 -20
- package/dist/commands/packs/remove-instruction.js.map +7 -1
- package/dist/commands/proxy/env.js +126 -116
- package/dist/commands/proxy/env.js.map +7 -1
- package/dist/commands/proxy/logs.js +83 -74
- package/dist/commands/proxy/logs.js.map +7 -1
- package/dist/commands/proxy/restart.js +34 -36
- package/dist/commands/proxy/restart.js.map +7 -1
- package/dist/commands/proxy/setup.js +432 -375
- package/dist/commands/proxy/setup.js.map +7 -1
- package/dist/commands/proxy/start.js +289 -289
- package/dist/commands/proxy/start.js.map +7 -1
- package/dist/commands/proxy/status.js +74 -64
- package/dist/commands/proxy/status.js.map +7 -1
- package/dist/commands/proxy/stop.js +81 -75
- package/dist/commands/proxy/stop.js.map +7 -1
- package/dist/commands/research/backfill.js +58 -0
- package/dist/commands/research/backfill.js.map +7 -0
- package/dist/commands/research/tail-transcript.js +69 -0
- package/dist/commands/research/tail-transcript.js.map +7 -0
- package/dist/commands/service/install.js +639 -405
- package/dist/commands/service/install.js.map +7 -1
- package/dist/commands/service/status.js +178 -111
- package/dist/commands/service/status.js.map +7 -1
- package/dist/commands/service/uninstall.js +85 -110
- package/dist/commands/service/uninstall.js.map +7 -1
- package/dist/commands/sessions/analyze.js +46 -25
- package/dist/commands/sessions/analyze.js.map +7 -1
- package/dist/commands/sessions/end.js +81 -79
- package/dist/commands/sessions/end.js.map +7 -1
- package/dist/commands/sessions/import.js +44 -27
- package/dist/commands/sessions/import.js.map +7 -1
- package/dist/commands/sessions/list.js +46 -33
- package/dist/commands/sessions/list.js.map +7 -1
- package/dist/commands/sessions/start.js +88 -87
- package/dist/commands/sessions/start.js.map +7 -1
- package/dist/commands/signals/report.js +42 -34
- package/dist/commands/signals/report.js.map +7 -1
- package/dist/commands/skills/export-approved.js +44 -30
- package/dist/commands/skills/export-approved.js.map +7 -1
- package/dist/commands/skills/install.js +99 -84
- package/dist/commands/skills/install.js.map +7 -1
- package/dist/commands/skills/list.js +59 -42
- package/dist/commands/skills/list.js.map +7 -1
- package/dist/commands/skills/publish.js +95 -78
- package/dist/commands/skills/publish.js.map +7 -1
- package/dist/commands/skills/search.js +68 -53
- package/dist/commands/skills/search.js.map +7 -1
- package/dist/commands/skills/update.js +52 -39
- package/dist/commands/skills/update.js.map +7 -1
- package/dist/commands/suggestions/accept.js +82 -59
- package/dist/commands/suggestions/accept.js.map +7 -1
- package/dist/commands/suggestions/dismiss.js +44 -26
- package/dist/commands/suggestions/dismiss.js.map +7 -1
- package/dist/commands/suggestions/list.js +59 -39
- package/dist/commands/suggestions/list.js.map +7 -1
- package/dist/commands/suggestions/refresh.js +26 -11
- package/dist/commands/suggestions/refresh.js.map +7 -1
- package/dist/cursor-BGQJ4CWI.js +134 -0
- package/dist/cursor-BGQJ4CWI.js.map +7 -0
- package/dist/dashboard/Dashboard.js +229 -126
- package/dist/dashboard/Dashboard.js.map +7 -1
- package/dist/dashboard/data.js +13 -137
- package/dist/dashboard/data.js.map +7 -1
- package/dist/dashboard/launcher/ActiveJobsList.js +10 -0
- package/dist/dashboard/launcher/ActiveJobsList.js.map +7 -0
- package/dist/dashboard/launcher/LauncherOverlay.js +14 -0
- package/dist/dashboard/launcher/LauncherOverlay.js.map +7 -0
- package/dist/dashboard/launcher/NewLaunchForm.js +10 -0
- package/dist/dashboard/launcher/NewLaunchForm.js.map +7 -0
- package/dist/dashboard/launcher/api.js +14 -0
- package/dist/dashboard/launcher/api.js.map +7 -0
- package/dist/dashboard/launcher/tool-labels.js +10 -0
- package/dist/dashboard/launcher/tool-labels.js.map +7 -0
- package/dist/dashboard/launcher/types.js +1 -0
- package/dist/dashboard/launcher/types.js.map +7 -0
- package/dist/dashboard/launcher/useLaunchJobs.js +9 -0
- package/dist/dashboard/launcher/useLaunchJobs.js.map +7 -0
- package/dist/dashboard/panels/friction.js +10 -22
- package/dist/dashboard/panels/friction.js.map +7 -1
- package/dist/dashboard/panels/insights.js +10 -109
- package/dist/dashboard/panels/insights.js.map +7 -1
- package/dist/dashboard/panels/instructions.js +10 -17
- package/dist/dashboard/panels/instructions.js.map +7 -1
- package/dist/dashboard/panels/outcomes.js +9 -28
- package/dist/dashboard/panels/outcomes.js.map +7 -1
- package/dist/dashboard/panels/overview.js +10 -20
- package/dist/dashboard/panels/overview.js.map +7 -1
- package/dist/dashboard/panels/shared.js +18 -61
- package/dist/dashboard/panels/shared.js.map +7 -1
- package/dist/dashboard/types.js +23 -26
- package/dist/dashboard/types.js.map +7 -1
- package/dist/dist-CSUYFYKI.js +52 -0
- package/dist/dist-CSUYFYKI.js.map +7 -0
- package/dist/index.js +8 -2
- package/dist/index.js.map +7 -1
- package/dist/lib/active-org-refresh.js +15 -108
- package/dist/lib/active-org-refresh.js.map +7 -1
- package/dist/lib/active-org.js +15 -95
- package/dist/lib/active-org.js.map +7 -1
- package/dist/lib/agent-loop.js +44 -0
- package/dist/lib/agent-loop.js.map +7 -0
- package/dist/lib/antigravity-transcript.js +22 -0
- package/dist/lib/antigravity-transcript.js.map +7 -0
- package/dist/lib/api-client.js +21 -92
- package/dist/lib/api-client.js.map +7 -1
- package/dist/lib/auth.js +26 -137
- package/dist/lib/auth.js.map +7 -1
- package/dist/lib/detect-languages.js +8 -113
- package/dist/lib/detect-languages.js.map +7 -1
- package/dist/lib/detect-tmux.js +9 -0
- package/dist/lib/detect-tmux.js.map +7 -0
- package/dist/lib/eval-analyzer.js +9 -89
- package/dist/lib/eval-analyzer.js.map +7 -1
- package/dist/lib/eval-benchmark.js +12 -92
- package/dist/lib/eval-benchmark.js.map +7 -1
- package/dist/lib/eval-conversation-handler.js +13 -200
- package/dist/lib/eval-conversation-handler.js.map +7 -1
- package/dist/lib/eval-executor.js +8 -83
- package/dist/lib/eval-executor.js.map +7 -1
- package/dist/lib/eval-grader.js +9 -123
- package/dist/lib/eval-grader.js.map +7 -1
- package/dist/lib/eval-meta-judge.js +9 -116
- package/dist/lib/eval-meta-judge.js.map +7 -1
- package/dist/lib/eval-trigger-tester.js +11 -96
- package/dist/lib/eval-trigger-tester.js.map +7 -1
- package/dist/lib/eval-worktree.js +8 -87
- package/dist/lib/eval-worktree.js.map +7 -1
- package/dist/lib/gateway-entry.js +20 -18
- package/dist/lib/gateway-entry.js.map +7 -1
- package/dist/lib/gateway-lifecycle.js +22 -97
- package/dist/lib/gateway-lifecycle.js.map +7 -1
- package/dist/lib/gateway.js +12 -216
- package/dist/lib/gateway.js.map +7 -1
- package/dist/lib/handlers/cron-close-stale-sessions.js +18 -7
- package/dist/lib/handlers/cron-close-stale-sessions.js.map +7 -1
- package/dist/lib/handlers/cron-data-integrity-audit.js +21 -15
- package/dist/lib/handlers/cron-data-integrity-audit.js.map +7 -1
- package/dist/lib/handlers/cron-refresh-skills.js +7 -90
- package/dist/lib/handlers/cron-refresh-skills.js.map +7 -1
- package/dist/lib/handlers/cron-suggest-instructions.js +14 -158
- package/dist/lib/handlers/cron-suggest-instructions.js.map +7 -1
- package/dist/lib/handlers/process-announcement.js +11 -0
- package/dist/lib/handlers/process-announcement.js.map +7 -0
- package/dist/lib/handlers/process-changelog.js +11 -0
- package/dist/lib/handlers/process-changelog.js.map +7 -0
- package/dist/lib/handlers/process-conversation.js +14 -35
- package/dist/lib/handlers/process-conversation.js.map +7 -1
- package/dist/lib/handlers/process-eval.js +15 -207
- package/dist/lib/handlers/process-eval.js.map +7 -1
- package/dist/lib/handlers/process-insights.js +14 -300
- package/dist/lib/handlers/process-insights.js.map +7 -1
- package/dist/lib/handlers/process-launch.js +16 -41
- package/dist/lib/handlers/process-launch.js.map +7 -1
- package/dist/lib/handlers/process-run-cleanup.js +13 -0
- package/dist/lib/handlers/process-run-cleanup.js.map +7 -0
- package/dist/lib/handlers/process-send-message.js +10 -0
- package/dist/lib/handlers/process-send-message.js.map +7 -0
- package/dist/lib/handlers/process-session-goal.js +11 -0
- package/dist/lib/handlers/process-session-goal.js.map +7 -0
- package/dist/lib/hooks-config.js +52 -544
- package/dist/lib/hooks-config.js.map +7 -1
- package/dist/lib/insights-prompts.js +12 -145
- package/dist/lib/insights-prompts.js.map +7 -1
- package/dist/lib/job-helpers.js +1 -0
- package/dist/lib/job-helpers.js.map +7 -0
- package/dist/lib/llm-client.js +16 -274
- package/dist/lib/llm-client.js.map +7 -1
- package/dist/lib/manual-tasks.js +22 -0
- package/dist/lib/manual-tasks.js.map +7 -0
- package/dist/lib/output.js +12 -36
- package/dist/lib/output.js.map +7 -1
- package/dist/lib/permanent-job-error.js +10 -23
- package/dist/lib/permanent-job-error.js.map +7 -1
- package/dist/lib/provider-aggregator.js +57 -55
- package/dist/lib/provider-aggregator.js.map +7 -1
- package/dist/lib/research-client.js +12 -0
- package/dist/lib/research-client.js.map +7 -0
- package/dist/lib/skills-loader.js +8 -51
- package/dist/lib/skills-loader.js.map +7 -1
- package/dist/lib/statusline-shim.js +16 -0
- package/dist/lib/statusline-shim.js.map +7 -0
- package/dist/lib/terminal-target-heartbeat.js +15 -0
- package/dist/lib/terminal-target-heartbeat.js.map +7 -0
- package/dist/lib/tmux.js +16 -0
- package/dist/lib/tmux.js.map +7 -0
- package/dist/lib/transcript-rate-limit-watcher.js +22 -0
- package/dist/lib/transcript-rate-limit-watcher.js.map +7 -0
- package/dist/lib/types.js +8 -7
- package/dist/lib/types.js.map +7 -1
- package/dist/lib/version-check.js +10 -106
- package/dist/lib/version-check.js.map +7 -1
- package/dist/lib/which.js +8 -0
- package/dist/lib/which.js.map +7 -0
- package/dist/lib/worktree.js +17 -0
- package/dist/lib/worktree.js.map +7 -0
- package/dist/opencode-IQ7X5YMJ.js +190 -0
- package/dist/opencode-IQ7X5YMJ.js.map +7 -0
- package/oclif.manifest.json +299 -66
- package/package.json +28 -10
- package/dist/base-command.d.ts +0 -12
- package/dist/base-command.d.ts.map +0 -1
- package/dist/commands/auth/create-key.d.ts +0 -11
- package/dist/commands/auth/create-key.d.ts.map +0 -1
- package/dist/commands/auth/login.d.ts +0 -11
- package/dist/commands/auth/login.d.ts.map +0 -1
- package/dist/commands/auth/logout.d.ts +0 -7
- package/dist/commands/auth/logout.d.ts.map +0 -1
- package/dist/commands/auth/revoke-key.d.ts +0 -10
- package/dist/commands/auth/revoke-key.d.ts.map +0 -1
- package/dist/commands/auth/status.d.ts +0 -7
- package/dist/commands/auth/status.d.ts.map +0 -1
- package/dist/commands/catalog/index.d.ts +0 -11
- package/dist/commands/catalog/index.d.ts.map +0 -1
- package/dist/commands/catalog/recommend.d.ts +0 -9
- package/dist/commands/catalog/recommend.d.ts.map +0 -1
- package/dist/commands/convert.d.ts +0 -15
- package/dist/commands/convert.d.ts.map +0 -1
- package/dist/commands/converters.d.ts +0 -12
- package/dist/commands/converters.d.ts.map +0 -1
- package/dist/commands/crons/list.d.ts +0 -7
- package/dist/commands/crons/list.d.ts.map +0 -1
- package/dist/commands/crons/run.d.ts +0 -13
- package/dist/commands/crons/run.d.ts.map +0 -1
- package/dist/commands/dashboard.d.ts +0 -10
- package/dist/commands/dashboard.d.ts.map +0 -1
- package/dist/commands/eval-targets/create.d.ts +0 -14
- package/dist/commands/eval-targets/create.d.ts.map +0 -1
- package/dist/commands/eval-targets/list.d.ts +0 -10
- package/dist/commands/eval-targets/list.d.ts.map +0 -1
- package/dist/commands/evals/benchmark.d.ts +0 -13
- package/dist/commands/evals/benchmark.d.ts.map +0 -1
- package/dist/commands/evals/compare.d.ts +0 -15
- package/dist/commands/evals/compare.d.ts.map +0 -1
- package/dist/commands/evals/create.d.ts +0 -17
- package/dist/commands/evals/create.d.ts.map +0 -1
- package/dist/commands/evals/listen.d.ts +0 -37
- package/dist/commands/evals/listen.d.ts.map +0 -1
- package/dist/commands/evals/listen.js +0 -188
- package/dist/commands/evals/listen.js.map +0 -1
- package/dist/commands/evals/listen.test.d.ts +0 -2
- package/dist/commands/evals/listen.test.d.ts.map +0 -1
- package/dist/commands/evals/listen.test.js +0 -48
- package/dist/commands/evals/listen.test.js.map +0 -1
- package/dist/commands/evals/optimize-description.d.ts +0 -22
- package/dist/commands/evals/optimize-description.d.ts.map +0 -1
- package/dist/commands/evals/optimize.d.ts +0 -22
- package/dist/commands/evals/optimize.d.ts.map +0 -1
- package/dist/commands/evals/run.d.ts +0 -21
- package/dist/commands/evals/run.d.ts.map +0 -1
- package/dist/commands/gateway/ensure.d.ts +0 -7
- package/dist/commands/gateway/ensure.d.ts.map +0 -1
- package/dist/commands/hooks/install.d.ts +0 -16
- package/dist/commands/hooks/install.d.ts.map +0 -1
- package/dist/commands/hooks/run.d.ts +0 -11
- package/dist/commands/hooks/run.d.ts.map +0 -1
- package/dist/commands/hooks/uninstall.d.ts +0 -7
- package/dist/commands/hooks/uninstall.d.ts.map +0 -1
- package/dist/commands/import.d.ts +0 -17
- package/dist/commands/import.d.ts.map +0 -1
- package/dist/commands/instructions/create.d.ts +0 -17
- package/dist/commands/instructions/create.d.ts.map +0 -1
- package/dist/commands/instructions/delete.d.ts +0 -13
- package/dist/commands/instructions/delete.d.ts.map +0 -1
- package/dist/commands/instructions/fork.d.ts +0 -10
- package/dist/commands/instructions/fork.d.ts.map +0 -1
- package/dist/commands/instructions/get.d.ts +0 -15
- package/dist/commands/instructions/get.d.ts.map +0 -1
- package/dist/commands/instructions/list.d.ts +0 -12
- package/dist/commands/instructions/list.d.ts.map +0 -1
- package/dist/commands/instructions/promote.d.ts +0 -14
- package/dist/commands/instructions/promote.d.ts.map +0 -1
- package/dist/commands/instructions/pull.d.ts +0 -9
- package/dist/commands/instructions/pull.d.ts.map +0 -1
- package/dist/commands/instructions/upstream.d.ts +0 -9
- package/dist/commands/instructions/upstream.d.ts.map +0 -1
- package/dist/commands/instructions/versions.d.ts +0 -12
- package/dist/commands/instructions/versions.d.ts.map +0 -1
- package/dist/commands/org/current.d.ts +0 -7
- package/dist/commands/org/current.d.ts.map +0 -1
- package/dist/commands/org/list.d.ts +0 -7
- package/dist/commands/org/list.d.ts.map +0 -1
- package/dist/commands/org/switch.d.ts +0 -13
- package/dist/commands/org/switch.d.ts.map +0 -1
- package/dist/commands/packs/add-instruction.d.ts +0 -11
- package/dist/commands/packs/add-instruction.d.ts.map +0 -1
- package/dist/commands/packs/apply.d.ts +0 -13
- package/dist/commands/packs/apply.d.ts.map +0 -1
- package/dist/commands/packs/create.d.ts +0 -13
- package/dist/commands/packs/create.d.ts.map +0 -1
- package/dist/commands/packs/fork.d.ts +0 -10
- package/dist/commands/packs/fork.d.ts.map +0 -1
- package/dist/commands/packs/get.d.ts +0 -10
- package/dist/commands/packs/get.d.ts.map +0 -1
- package/dist/commands/packs/list.d.ts +0 -22
- package/dist/commands/packs/list.d.ts.map +0 -1
- package/dist/commands/packs/remove-instruction.d.ts +0 -11
- package/dist/commands/packs/remove-instruction.d.ts.map +0 -1
- package/dist/commands/proxy/env.d.ts +0 -14
- package/dist/commands/proxy/env.d.ts.map +0 -1
- package/dist/commands/proxy/logs.d.ts +0 -11
- package/dist/commands/proxy/logs.d.ts.map +0 -1
- package/dist/commands/proxy/restart.d.ts +0 -11
- package/dist/commands/proxy/restart.d.ts.map +0 -1
- package/dist/commands/proxy/setup.d.ts +0 -23
- package/dist/commands/proxy/setup.d.ts.map +0 -1
- package/dist/commands/proxy/start.d.ts +0 -17
- package/dist/commands/proxy/start.d.ts.map +0 -1
- package/dist/commands/proxy/status.d.ts +0 -7
- package/dist/commands/proxy/status.d.ts.map +0 -1
- package/dist/commands/proxy/stop.d.ts +0 -8
- package/dist/commands/proxy/stop.d.ts.map +0 -1
- package/dist/commands/service/install.d.ts +0 -33
- package/dist/commands/service/install.d.ts.map +0 -1
- package/dist/commands/service/install.test.d.ts +0 -2
- package/dist/commands/service/install.test.d.ts.map +0 -1
- package/dist/commands/service/install.test.js +0 -345
- package/dist/commands/service/install.test.js.map +0 -1
- package/dist/commands/service/status.d.ts +0 -6
- package/dist/commands/service/status.d.ts.map +0 -1
- package/dist/commands/service/uninstall.d.ts +0 -6
- package/dist/commands/service/uninstall.d.ts.map +0 -1
- package/dist/commands/sessions/analyze.d.ts +0 -10
- package/dist/commands/sessions/analyze.d.ts.map +0 -1
- package/dist/commands/sessions/end.d.ts +0 -9
- package/dist/commands/sessions/end.d.ts.map +0 -1
- package/dist/commands/sessions/import.d.ts +0 -13
- package/dist/commands/sessions/import.d.ts.map +0 -1
- package/dist/commands/sessions/list.d.ts +0 -11
- package/dist/commands/sessions/list.d.ts.map +0 -1
- package/dist/commands/sessions/start.d.ts +0 -11
- package/dist/commands/sessions/start.d.ts.map +0 -1
- package/dist/commands/signals/report.d.ts +0 -10
- package/dist/commands/signals/report.d.ts.map +0 -1
- package/dist/commands/signals/report.test.d.ts +0 -2
- package/dist/commands/signals/report.test.d.ts.map +0 -1
- package/dist/commands/signals/report.test.js +0 -65
- package/dist/commands/signals/report.test.js.map +0 -1
- package/dist/commands/skills/export-approved.d.ts +0 -10
- package/dist/commands/skills/export-approved.d.ts.map +0 -1
- package/dist/commands/skills/install.d.ts +0 -15
- package/dist/commands/skills/install.d.ts.map +0 -1
- package/dist/commands/skills/list.d.ts +0 -11
- package/dist/commands/skills/list.d.ts.map +0 -1
- package/dist/commands/skills/publish.d.ts +0 -17
- package/dist/commands/skills/publish.d.ts.map +0 -1
- package/dist/commands/skills/search.d.ts +0 -17
- package/dist/commands/skills/search.d.ts.map +0 -1
- package/dist/commands/skills/update.d.ts +0 -10
- package/dist/commands/skills/update.d.ts.map +0 -1
- package/dist/commands/suggestions/accept.d.ts +0 -16
- package/dist/commands/suggestions/accept.d.ts.map +0 -1
- package/dist/commands/suggestions/accept.test.d.ts +0 -2
- package/dist/commands/suggestions/accept.test.d.ts.map +0 -1
- package/dist/commands/suggestions/accept.test.js +0 -52
- package/dist/commands/suggestions/accept.test.js.map +0 -1
- package/dist/commands/suggestions/dismiss.d.ts +0 -10
- package/dist/commands/suggestions/dismiss.d.ts.map +0 -1
- package/dist/commands/suggestions/list.d.ts +0 -10
- package/dist/commands/suggestions/list.d.ts.map +0 -1
- package/dist/commands/suggestions/refresh.d.ts +0 -7
- package/dist/commands/suggestions/refresh.d.ts.map +0 -1
- package/dist/dashboard/Dashboard.d.ts +0 -3
- package/dist/dashboard/Dashboard.d.ts.map +0 -1
- package/dist/dashboard/data.d.ts +0 -11
- package/dist/dashboard/data.d.ts.map +0 -1
- package/dist/dashboard/panels/friction.d.ts +0 -7
- package/dist/dashboard/panels/friction.d.ts.map +0 -1
- package/dist/dashboard/panels/insights.d.ts +0 -8
- package/dist/dashboard/panels/insights.d.ts.map +0 -1
- package/dist/dashboard/panels/instructions.d.ts +0 -9
- package/dist/dashboard/panels/instructions.d.ts.map +0 -1
- package/dist/dashboard/panels/outcomes.d.ts +0 -7
- package/dist/dashboard/panels/outcomes.d.ts.map +0 -1
- package/dist/dashboard/panels/overview.d.ts +0 -8
- package/dist/dashboard/panels/overview.d.ts.map +0 -1
- package/dist/dashboard/panels/shared.d.ts +0 -17
- package/dist/dashboard/panels/shared.d.ts.map +0 -1
- package/dist/dashboard/types.d.ts +0 -80
- package/dist/dashboard/types.d.ts.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +0 -1
- package/dist/lib/active-org-refresh.d.ts +0 -22
- package/dist/lib/active-org-refresh.d.ts.map +0 -1
- package/dist/lib/active-org-refresh.test.d.ts +0 -2
- package/dist/lib/active-org-refresh.test.d.ts.map +0 -1
- package/dist/lib/active-org-refresh.test.js +0 -190
- package/dist/lib/active-org-refresh.test.js.map +0 -1
- package/dist/lib/active-org.d.ts +0 -43
- package/dist/lib/active-org.d.ts.map +0 -1
- package/dist/lib/active-org.test.d.ts +0 -2
- package/dist/lib/active-org.test.d.ts.map +0 -1
- package/dist/lib/active-org.test.js +0 -147
- package/dist/lib/active-org.test.js.map +0 -1
- package/dist/lib/api-client.d.ts +0 -17
- package/dist/lib/api-client.d.ts.map +0 -1
- package/dist/lib/api-client.test.d.ts +0 -2
- package/dist/lib/api-client.test.d.ts.map +0 -1
- package/dist/lib/api-client.test.js +0 -161
- package/dist/lib/api-client.test.js.map +0 -1
- package/dist/lib/auth.d.ts +0 -27
- package/dist/lib/auth.d.ts.map +0 -1
- package/dist/lib/auth.test.d.ts +0 -2
- package/dist/lib/auth.test.d.ts.map +0 -1
- package/dist/lib/auth.test.js +0 -110
- package/dist/lib/auth.test.js.map +0 -1
- package/dist/lib/cron-registry.d.ts +0 -47
- package/dist/lib/cron-registry.d.ts.map +0 -1
- package/dist/lib/cron-registry.js +0 -102
- package/dist/lib/cron-registry.js.map +0 -1
- package/dist/lib/cron-registry.test.d.ts +0 -2
- package/dist/lib/cron-registry.test.d.ts.map +0 -1
- package/dist/lib/cron-registry.test.js +0 -136
- package/dist/lib/cron-registry.test.js.map +0 -1
- package/dist/lib/cron-runner.d.ts +0 -16
- package/dist/lib/cron-runner.d.ts.map +0 -1
- package/dist/lib/cron-runner.js +0 -68
- package/dist/lib/cron-runner.js.map +0 -1
- package/dist/lib/detect-languages.d.ts +0 -7
- package/dist/lib/detect-languages.d.ts.map +0 -1
- package/dist/lib/detect-languages.test.d.ts +0 -2
- package/dist/lib/detect-languages.test.d.ts.map +0 -1
- package/dist/lib/detect-languages.test.js +0 -29
- package/dist/lib/detect-languages.test.js.map +0 -1
- package/dist/lib/eval-analyzer.d.ts +0 -23
- package/dist/lib/eval-analyzer.d.ts.map +0 -1
- package/dist/lib/eval-benchmark.d.ts +0 -17
- package/dist/lib/eval-benchmark.d.ts.map +0 -1
- package/dist/lib/eval-conversation-handler.d.ts +0 -9
- package/dist/lib/eval-conversation-handler.d.ts.map +0 -1
- package/dist/lib/eval-executor.d.ts +0 -21
- package/dist/lib/eval-executor.d.ts.map +0 -1
- package/dist/lib/eval-executor.test.d.ts +0 -2
- package/dist/lib/eval-executor.test.d.ts.map +0 -1
- package/dist/lib/eval-executor.test.js +0 -8
- package/dist/lib/eval-executor.test.js.map +0 -1
- package/dist/lib/eval-grader.d.ts +0 -38
- package/dist/lib/eval-grader.d.ts.map +0 -1
- package/dist/lib/eval-grader.test.d.ts +0 -2
- package/dist/lib/eval-grader.test.d.ts.map +0 -1
- package/dist/lib/eval-grader.test.js +0 -8
- package/dist/lib/eval-grader.test.js.map +0 -1
- package/dist/lib/eval-meta-judge.d.ts +0 -28
- package/dist/lib/eval-meta-judge.d.ts.map +0 -1
- package/dist/lib/eval-trigger-tester.d.ts +0 -19
- package/dist/lib/eval-trigger-tester.d.ts.map +0 -1
- package/dist/lib/eval-worktree.d.ts +0 -11
- package/dist/lib/eval-worktree.d.ts.map +0 -1
- package/dist/lib/eval-worktree.test.d.ts +0 -2
- package/dist/lib/eval-worktree.test.d.ts.map +0 -1
- package/dist/lib/eval-worktree.test.js +0 -68
- package/dist/lib/eval-worktree.test.js.map +0 -1
- package/dist/lib/gateway-entry.d.ts +0 -3
- package/dist/lib/gateway-entry.d.ts.map +0 -1
- package/dist/lib/gateway-lifecycle.d.ts +0 -9
- package/dist/lib/gateway-lifecycle.d.ts.map +0 -1
- package/dist/lib/gateway.d.ts +0 -11
- package/dist/lib/gateway.d.ts.map +0 -1
- package/dist/lib/graphile-worker-runner.d.ts +0 -124
- package/dist/lib/graphile-worker-runner.d.ts.map +0 -1
- package/dist/lib/graphile-worker-runner.js +0 -526
- package/dist/lib/graphile-worker-runner.js.map +0 -1
- package/dist/lib/graphile-worker-runner.test.d.ts +0 -2
- package/dist/lib/graphile-worker-runner.test.d.ts.map +0 -1
- package/dist/lib/graphile-worker-runner.test.js +0 -153
- package/dist/lib/graphile-worker-runner.test.js.map +0 -1
- package/dist/lib/handlers/cron-close-stale-sessions.d.ts +0 -3
- package/dist/lib/handlers/cron-close-stale-sessions.d.ts.map +0 -1
- package/dist/lib/handlers/cron-data-integrity-audit.d.ts +0 -3
- package/dist/lib/handlers/cron-data-integrity-audit.d.ts.map +0 -1
- package/dist/lib/handlers/cron-refresh-skills.d.ts +0 -3
- package/dist/lib/handlers/cron-refresh-skills.d.ts.map +0 -1
- package/dist/lib/handlers/cron-refresh-skills.test.d.ts +0 -2
- package/dist/lib/handlers/cron-refresh-skills.test.d.ts.map +0 -1
- package/dist/lib/handlers/cron-refresh-skills.test.js +0 -114
- package/dist/lib/handlers/cron-refresh-skills.test.js.map +0 -1
- package/dist/lib/handlers/cron-regenerate-insights.d.ts +0 -3
- package/dist/lib/handlers/cron-regenerate-insights.d.ts.map +0 -1
- package/dist/lib/handlers/cron-regenerate-insights.js +0 -6
- package/dist/lib/handlers/cron-regenerate-insights.js.map +0 -1
- package/dist/lib/handlers/cron-suggest-instructions.d.ts +0 -3
- package/dist/lib/handlers/cron-suggest-instructions.d.ts.map +0 -1
- package/dist/lib/handlers/cron-suggest-instructions.test.d.ts +0 -2
- package/dist/lib/handlers/cron-suggest-instructions.test.d.ts.map +0 -1
- package/dist/lib/handlers/cron-suggest-instructions.test.js +0 -80
- package/dist/lib/handlers/cron-suggest-instructions.test.js.map +0 -1
- package/dist/lib/handlers/process-conversation.d.ts +0 -35
- package/dist/lib/handlers/process-conversation.d.ts.map +0 -1
- package/dist/lib/handlers/process-eval.d.ts +0 -32
- package/dist/lib/handlers/process-eval.d.ts.map +0 -1
- package/dist/lib/handlers/process-insights.d.ts +0 -39
- package/dist/lib/handlers/process-insights.d.ts.map +0 -1
- package/dist/lib/handlers/process-launch.d.ts +0 -29
- package/dist/lib/handlers/process-launch.d.ts.map +0 -1
- package/dist/lib/hooks-config.d.ts +0 -119
- package/dist/lib/hooks-config.d.ts.map +0 -1
- package/dist/lib/hooks-config.test.d.ts +0 -2
- package/dist/lib/hooks-config.test.d.ts.map +0 -1
- package/dist/lib/hooks-config.test.js +0 -231
- package/dist/lib/hooks-config.test.js.map +0 -1
- package/dist/lib/insights-prompts.d.ts +0 -13
- package/dist/lib/insights-prompts.d.ts.map +0 -1
- package/dist/lib/llm-client.d.ts +0 -26
- package/dist/lib/llm-client.d.ts.map +0 -1
- package/dist/lib/llm-client.test.d.ts +0 -2
- package/dist/lib/llm-client.test.d.ts.map +0 -1
- package/dist/lib/llm-client.test.js +0 -62
- package/dist/lib/llm-client.test.js.map +0 -1
- package/dist/lib/mirror-writer-db.d.ts +0 -12
- package/dist/lib/mirror-writer-db.d.ts.map +0 -1
- package/dist/lib/mirror-writer-db.js +0 -51
- package/dist/lib/mirror-writer-db.js.map +0 -1
- package/dist/lib/mirror-writer.d.ts +0 -35
- package/dist/lib/mirror-writer.d.ts.map +0 -1
- package/dist/lib/mirror-writer.js +0 -27
- package/dist/lib/mirror-writer.js.map +0 -1
- package/dist/lib/mirror-writer.test.d.ts +0 -2
- package/dist/lib/mirror-writer.test.d.ts.map +0 -1
- package/dist/lib/mirror-writer.test.js +0 -47
- package/dist/lib/mirror-writer.test.js.map +0 -1
- package/dist/lib/output.d.ts +0 -4
- package/dist/lib/output.d.ts.map +0 -1
- package/dist/lib/output.test.d.ts +0 -2
- package/dist/lib/output.test.d.ts.map +0 -1
- package/dist/lib/output.test.js +0 -71
- package/dist/lib/output.test.js.map +0 -1
- package/dist/lib/permanent-job-error.d.ts +0 -17
- package/dist/lib/permanent-job-error.d.ts.map +0 -1
- package/dist/lib/permanent-job-error.test.d.ts +0 -2
- package/dist/lib/permanent-job-error.test.d.ts.map +0 -1
- package/dist/lib/permanent-job-error.test.js +0 -29
- package/dist/lib/permanent-job-error.test.js.map +0 -1
- package/dist/lib/provider-aggregator.d.ts +0 -24
- package/dist/lib/provider-aggregator.d.ts.map +0 -1
- package/dist/lib/provider-aggregator.test.d.ts +0 -2
- package/dist/lib/provider-aggregator.test.d.ts.map +0 -1
- package/dist/lib/provider-aggregator.test.js +0 -103
- package/dist/lib/provider-aggregator.test.js.map +0 -1
- package/dist/lib/skills-loader.d.ts +0 -6
- package/dist/lib/skills-loader.d.ts.map +0 -1
- package/dist/lib/types.d.ts +0 -48
- package/dist/lib/types.d.ts.map +0 -1
- package/dist/lib/version-check.d.ts +0 -11
- package/dist/lib/version-check.d.ts.map +0 -1
- package/dist/test-helpers.d.ts +0 -58
- package/dist/test-helpers.d.ts.map +0 -1
- package/dist/test-helpers.js +0 -58
- package/dist/test-helpers.js.map +0 -1
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/commands/suggestions/list.ts"],
|
|
4
|
+
"sourcesContent": ["import { Flags } from '@oclif/core';\nimport { printTable } from '@oclif/table';\nimport { normalizeProjectPath } from '@rulemetric/core/paths';\nimport { BaseCommand } from '../../base-command.js';\nimport { apiGet } from '../../lib/api-client.js';\n\ninterface SuggestionItem {\n id: string;\n instructionId: string;\n instructionScope: string;\n score: number;\n reason: string;\n generatedAt: string;\n isStale: boolean;\n name: string;\n description: string | null;\n tags: string[] | null;\n}\n\ninterface SuggestionsResponse {\n suggestions: SuggestionItem[];\n}\n\nexport default class SuggestionsList extends BaseCommand {\n static override description = 'List instruction suggestions for a project';\n\n static override examples = [\n '<%= config.bin %> suggestions list',\n '<%= config.bin %> suggestions list --project /path/to/project',\n ];\n\n static override flags = {\n project: Flags.string({\n char: 'p',\n description: 'Project path (defaults to current directory)',\n }),\n };\n\n async run(): Promise<void> {\n const { flags } = await this.parse(SuggestionsList);\n this.requireAuth();\n\n const projectPath = normalizeProjectPath(flags.project ?? process.cwd());\n const encoded = encodeURIComponent(projectPath);\n const result = await apiGet<SuggestionsResponse>(\n `/api/instruction-suggestions?projectPath=${encoded}&limit=10`,\n );\n\n if (result.suggestions.length === 0) {\n this.log(\n 'No suggestions for this project. The cron runs daily at 04:30; trigger now with: rulemetric suggestions refresh',\n );\n return;\n }\n\n printTable({\n data: result.suggestions.map((s) => ({\n ID: s.id,\n Scope: s.instructionScope,\n Name: s.name,\n Score: s.score.toFixed(2),\n Reason: s.reason.length > 60 ? s.reason.slice(0, 59) + '\u2026' : s.reason,\n })),\n columns: ['ID', 'Scope', 'Name', 'Score', 'Reason'],\n });\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;AAAA,SAAS,aAAa;AACtB,SAAS,kBAAkB;AAsB3B,IAAqB,kBAArB,MAAqB,yBAAwB,YAAY;AAAA,EACrD,OAAgB,cAAc;AAAA,EAE9B,OAAgB,WAAW;AAAA,IACvB;AAAA,IACA;AAAA,EACJ;AAAA,EAEA,OAAgB,QAAQ;AAAA,IACpB,SAAS,MAAM,OAAO;AAAA,MAClB,MAAM;AAAA,MACN,aAAa;AAAA,IACjB,CAAC;AAAA,EACL;AAAA,EAEA,MAAM,MAAqB;AACvB,UAAM,EAAE,MAAM,IAAI,MAAM,KAAK,MAAM,gBAAe;AAClD,SAAK,YAAY;AAEjB,UAAM,cAAc,qBAAqB,MAAM,WAAW,QAAQ,IAAI,CAAC;AACvE,UAAM,UAAU,mBAAmB,WAAW;AAC9C,UAAM,SAAS,MAAM;AAAA,MACjB,4CAA4C,OAAO;AAAA,IACvD;AAEA,QAAI,OAAO,YAAY,WAAW,GAAG;AACjC,WAAK;AAAA,QACD;AAAA,MACJ;AACA;AAAA,IACJ;AAEA,eAAW;AAAA,MACP,MAAM,OAAO,YAAY,IAAI,CAAC,OAAO;AAAA,QACjC,IAAI,EAAE;AAAA,QACN,OAAO,EAAE;AAAA,QACT,MAAM,EAAE;AAAA,QACR,OAAO,EAAE,MAAM,QAAQ,CAAC;AAAA,QACxB,QAAQ,EAAE,OAAO,SAAS,KAAK,EAAE,OAAO,MAAM,GAAG,EAAE,IAAI,WAAM,EAAE;AAAA,MACnE,EAAE;AAAA,MACF,SAAS,CAAC,MAAM,SAAS,QAAQ,SAAS,QAAQ;AAAA,IACtD,CAAC;AAAA,EACL;AACJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,11 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import {
|
|
2
|
+
BaseCommand
|
|
3
|
+
} from "../../chunk-S56LOTGQ.js";
|
|
4
|
+
import "../../chunk-OGVORIFM.js";
|
|
5
|
+
import "../../chunk-2AM54TUK.js";
|
|
6
|
+
import "../../chunk-EJOI2ZGU.js";
|
|
7
|
+
import "../../chunk-KZRFUXGF.js";
|
|
8
|
+
import "../../chunk-EKJ2CABV.js";
|
|
9
|
+
import "../../chunk-NSBPE2FW.js";
|
|
10
|
+
|
|
11
|
+
// src/commands/suggestions/refresh.ts
|
|
12
|
+
var SuggestionsRefresh = class extends BaseCommand {
|
|
13
|
+
static description = "Information about refreshing instruction suggestions";
|
|
14
|
+
static examples = [
|
|
15
|
+
"<%= config.bin %> suggestions refresh"
|
|
16
|
+
];
|
|
17
|
+
async run() {
|
|
18
|
+
this.log(
|
|
19
|
+
"The suggestion cron runs daily at 04:30. To force a recompute now, restart the worker (`rulemetric service restart`) and the cron will fire on its registered schedule."
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
SuggestionsRefresh as default
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=refresh.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/commands/suggestions/refresh.ts"],
|
|
4
|
+
"sourcesContent": ["import { BaseCommand } from '../../base-command.js';\n\nexport default class SuggestionsRefresh extends BaseCommand {\n static override description = 'Information about refreshing instruction suggestions';\n\n static override examples = [\n '<%= config.bin %> suggestions refresh',\n ];\n\n async run(): Promise<void> {\n this.log(\n 'The suggestion cron runs daily at 04:30. To force a recompute now, restart the worker (`rulemetric service restart`) and the cron will fire on its registered schedule.',\n );\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;AAEA,IAAqB,qBAArB,cAAgD,YAAY;AAAA,EACxD,OAAgB,cAAc;AAAA,EAE9B,OAAgB,WAAW;AAAA,IACvB;AAAA,EACJ;AAAA,EAEA,MAAM,MAAqB;AACvB,SAAK;AAAA,MACD;AAAA,IACJ;AAAA,EACJ;AACJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__require
|
|
3
|
+
} from "./chunk-NSBPE2FW.js";
|
|
4
|
+
|
|
5
|
+
// ../../packages/session/dist/providers/cursor.js
|
|
6
|
+
import { existsSync } from "fs";
|
|
7
|
+
import { join } from "path";
|
|
8
|
+
import { homedir } from "os";
|
|
9
|
+
var Database = null;
|
|
10
|
+
function loadSqlite() {
|
|
11
|
+
if (Database)
|
|
12
|
+
return true;
|
|
13
|
+
try {
|
|
14
|
+
Database = __require("better-sqlite3");
|
|
15
|
+
return true;
|
|
16
|
+
} catch {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
var CURSOR_DEFAULT_MODEL = "claude-sonnet-4-5";
|
|
21
|
+
var modelDisplayNames = {
|
|
22
|
+
"claude-4.5-opus-high-thinking": "Opus 4.5 (Thinking)",
|
|
23
|
+
"claude-4-opus": "Opus 4",
|
|
24
|
+
"claude-4-sonnet-thinking": "Sonnet 4 (Thinking)",
|
|
25
|
+
"claude-4.5-sonnet-thinking": "Sonnet 4.5 (Thinking)",
|
|
26
|
+
"claude-4.6-sonnet": "Sonnet 4.6",
|
|
27
|
+
"composer-1": "Composer 1",
|
|
28
|
+
"gpt-5": "GPT-5",
|
|
29
|
+
"gpt-4.1": "GPT-4.1",
|
|
30
|
+
"default": "Auto (Sonnet est.)"
|
|
31
|
+
};
|
|
32
|
+
function getCursorDbPath() {
|
|
33
|
+
if (process.platform === "darwin") {
|
|
34
|
+
return join(homedir(), "Library", "Application Support", "Cursor", "User", "globalStorage", "state.vscdb");
|
|
35
|
+
}
|
|
36
|
+
if (process.platform === "win32") {
|
|
37
|
+
return join(homedir(), "AppData", "Roaming", "Cursor", "User", "globalStorage", "state.vscdb");
|
|
38
|
+
}
|
|
39
|
+
return join(homedir(), ".config", "Cursor", "User", "globalStorage", "state.vscdb");
|
|
40
|
+
}
|
|
41
|
+
function resolveModel(raw) {
|
|
42
|
+
if (!raw || raw === "default")
|
|
43
|
+
return CURSOR_DEFAULT_MODEL;
|
|
44
|
+
return raw;
|
|
45
|
+
}
|
|
46
|
+
var BUBBLE_QUERY = `
|
|
47
|
+
SELECT
|
|
48
|
+
json_extract(value, '$.tokenCount.inputTokens') as input_tokens,
|
|
49
|
+
json_extract(value, '$.tokenCount.outputTokens') as output_tokens,
|
|
50
|
+
json_extract(value, '$.modelInfo.modelName') as model,
|
|
51
|
+
json_extract(value, '$.createdAt') as created_at,
|
|
52
|
+
json_extract(value, '$.conversationId') as conversation_id,
|
|
53
|
+
substr(json_extract(value, '$.text'), 1, 500) as user_text
|
|
54
|
+
FROM cursorDiskKV
|
|
55
|
+
WHERE key LIKE 'bubbleId:%'
|
|
56
|
+
AND json_extract(value, '$.tokenCount.inputTokens') > 0
|
|
57
|
+
ORDER BY json_extract(value, '$.createdAt') ASC
|
|
58
|
+
`;
|
|
59
|
+
function createParser(source, seenKeys) {
|
|
60
|
+
return {
|
|
61
|
+
async *parse() {
|
|
62
|
+
if (!loadSqlite() || !Database)
|
|
63
|
+
return;
|
|
64
|
+
let db;
|
|
65
|
+
try {
|
|
66
|
+
db = new Database(source.path, { readonly: true });
|
|
67
|
+
} catch {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
try {
|
|
71
|
+
const stmt = db.prepare(BUBBLE_QUERY);
|
|
72
|
+
const rows = stmt.all();
|
|
73
|
+
for (const row of rows) {
|
|
74
|
+
const inputTokens = row.input_tokens ?? 0;
|
|
75
|
+
const outputTokens = row.output_tokens ?? 0;
|
|
76
|
+
if (inputTokens === 0 && outputTokens === 0)
|
|
77
|
+
continue;
|
|
78
|
+
const createdAt = row.created_at ?? "";
|
|
79
|
+
const conversationId = row.conversation_id ?? "unknown";
|
|
80
|
+
const dedupKey = `cursor:${conversationId}:${createdAt}:${inputTokens}:${outputTokens}`;
|
|
81
|
+
if (seenKeys.has(dedupKey))
|
|
82
|
+
continue;
|
|
83
|
+
seenKeys.add(dedupKey);
|
|
84
|
+
const model = resolveModel(row.model);
|
|
85
|
+
yield {
|
|
86
|
+
provider: "cursor",
|
|
87
|
+
model: row.model ?? "default",
|
|
88
|
+
inputTokens,
|
|
89
|
+
outputTokens,
|
|
90
|
+
cacheCreationInputTokens: 0,
|
|
91
|
+
cacheReadInputTokens: 0,
|
|
92
|
+
cachedInputTokens: 0,
|
|
93
|
+
reasoningTokens: 0,
|
|
94
|
+
costUSD: 0,
|
|
95
|
+
tools: [],
|
|
96
|
+
bashCommands: [],
|
|
97
|
+
timestamp: createdAt,
|
|
98
|
+
speed: "standard",
|
|
99
|
+
deduplicationKey: dedupKey,
|
|
100
|
+
userMessage: row.user_text ?? "",
|
|
101
|
+
sessionId: conversationId
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
} finally {
|
|
105
|
+
db.close();
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
var cursor = {
|
|
111
|
+
name: "cursor",
|
|
112
|
+
displayName: "Cursor",
|
|
113
|
+
modelDisplayName(model) {
|
|
114
|
+
return modelDisplayNames[model] ?? model;
|
|
115
|
+
},
|
|
116
|
+
toolDisplayName(rawTool) {
|
|
117
|
+
return rawTool;
|
|
118
|
+
},
|
|
119
|
+
async discoverSessions() {
|
|
120
|
+
if (!loadSqlite())
|
|
121
|
+
return [];
|
|
122
|
+
const dbPath = getCursorDbPath();
|
|
123
|
+
if (!existsSync(dbPath))
|
|
124
|
+
return [];
|
|
125
|
+
return [{ path: dbPath, project: "cursor", provider: "cursor" }];
|
|
126
|
+
},
|
|
127
|
+
createSessionParser(source, seenKeys) {
|
|
128
|
+
return createParser(source, seenKeys);
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
export {
|
|
132
|
+
cursor
|
|
133
|
+
};
|
|
134
|
+
//# sourceMappingURL=cursor-BGQJ4CWI.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../packages/session/src/providers/cursor.ts"],
|
|
4
|
+
"sourcesContent": ["import { existsSync } from 'fs';\nimport { join } from 'path';\nimport { homedir } from 'os';\n\nimport type { Provider, SessionSource, SessionParser, ParsedProviderCall } from './types.js';\n\n// Lazy-loaded \u2014 requires better-sqlite3\nlet Database: typeof import('better-sqlite3') | null = null;\n\nfunction loadSqlite(): boolean {\n if (Database) return true;\n try {\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n Database = require('better-sqlite3');\n return true;\n } catch {\n return false;\n }\n}\n\nconst CURSOR_DEFAULT_MODEL = 'claude-sonnet-4-5';\n\nconst modelDisplayNames: Record<string, string> = {\n 'claude-4.5-opus-high-thinking': 'Opus 4.5 (Thinking)',\n 'claude-4-opus': 'Opus 4',\n 'claude-4-sonnet-thinking': 'Sonnet 4 (Thinking)',\n 'claude-4.5-sonnet-thinking': 'Sonnet 4.5 (Thinking)',\n 'claude-4.6-sonnet': 'Sonnet 4.6',\n 'composer-1': 'Composer 1',\n 'gpt-5': 'GPT-5',\n 'gpt-4.1': 'GPT-4.1',\n 'default': 'Auto (Sonnet est.)',\n};\n\ntype BubbleRow = {\n input_tokens: number | null;\n output_tokens: number | null;\n model: string | null;\n created_at: string | null;\n conversation_id: string | null;\n user_text: string | null;\n};\n\nfunction getCursorDbPath(): string {\n if (process.platform === 'darwin') {\n return join(homedir(), 'Library', 'Application Support', 'Cursor', 'User', 'globalStorage', 'state.vscdb');\n }\n if (process.platform === 'win32') {\n return join(homedir(), 'AppData', 'Roaming', 'Cursor', 'User', 'globalStorage', 'state.vscdb');\n }\n return join(homedir(), '.config', 'Cursor', 'User', 'globalStorage', 'state.vscdb');\n}\n\nfunction resolveModel(raw: string | null): string {\n if (!raw || raw === 'default') return CURSOR_DEFAULT_MODEL;\n return raw;\n}\n\nconst BUBBLE_QUERY = `\n SELECT\n json_extract(value, '$.tokenCount.inputTokens') as input_tokens,\n json_extract(value, '$.tokenCount.outputTokens') as output_tokens,\n json_extract(value, '$.modelInfo.modelName') as model,\n json_extract(value, '$.createdAt') as created_at,\n json_extract(value, '$.conversationId') as conversation_id,\n substr(json_extract(value, '$.text'), 1, 500) as user_text\n FROM cursorDiskKV\n WHERE key LIKE 'bubbleId:%'\n AND json_extract(value, '$.tokenCount.inputTokens') > 0\n ORDER BY json_extract(value, '$.createdAt') ASC\n`;\n\nfunction createParser(source: SessionSource, seenKeys: Set<string>): SessionParser {\n return {\n async *parse(): AsyncGenerator<ParsedProviderCall> {\n if (!loadSqlite() || !Database) return;\n\n let db: InstanceType<typeof import('better-sqlite3')>;\n try {\n db = new Database!(source.path, { readonly: true });\n } catch {\n return;\n }\n\n try {\n const stmt = db.prepare(BUBBLE_QUERY);\n const rows = stmt.all() as BubbleRow[];\n\n for (const row of rows) {\n const inputTokens = row.input_tokens ?? 0;\n const outputTokens = row.output_tokens ?? 0;\n if (inputTokens === 0 && outputTokens === 0) continue;\n\n const createdAt = row.created_at ?? '';\n const conversationId = row.conversation_id ?? 'unknown';\n const dedupKey = `cursor:${conversationId}:${createdAt}:${inputTokens}:${outputTokens}`;\n\n if (seenKeys.has(dedupKey)) continue;\n seenKeys.add(dedupKey);\n\n const model = resolveModel(row.model);\n\n yield {\n provider: 'cursor',\n model: row.model ?? 'default',\n inputTokens,\n outputTokens,\n cacheCreationInputTokens: 0,\n cacheReadInputTokens: 0,\n cachedInputTokens: 0,\n reasoningTokens: 0,\n costUSD: 0,\n tools: [],\n bashCommands: [],\n timestamp: createdAt,\n speed: 'standard',\n deduplicationKey: dedupKey,\n userMessage: row.user_text ?? '',\n sessionId: conversationId,\n };\n }\n } finally {\n db.close();\n }\n },\n };\n}\n\nexport const cursor: Provider = {\n name: 'cursor',\n displayName: 'Cursor',\n\n modelDisplayName(model: string): string {\n return modelDisplayNames[model] ?? model;\n },\n\n toolDisplayName(rawTool: string): string {\n return rawTool;\n },\n\n async discoverSessions(): Promise<SessionSource[]> {\n if (!loadSqlite()) return [];\n const dbPath = getCursorDbPath();\n if (!existsSync(dbPath)) return [];\n return [{ path: dbPath, project: 'cursor', provider: 'cursor' }];\n },\n\n createSessionParser(source: SessionSource, seenKeys: Set<string>): SessionParser {\n return createParser(source, seenKeys);\n },\n};\n"],
|
|
5
|
+
"mappings": ";;;;;AAAA,SAAS,kBAAkB;AAC3B,SAAS,YAAY;AACrB,SAAS,eAAe;AAKxB,IAAI,WAAmD;AAEvD,SAAS,aAAU;AACjB,MAAI;AAAU,WAAO;AACrB,MAAI;AAEF,eAAW,UAAQ,gBAAgB;AACnC,WAAO;EACT,QAAQ;AACN,WAAO;EACT;AACF;AAEA,IAAM,uBAAuB;AAE7B,IAAM,oBAA4C;EAChD,iCAAiC;EACjC,iBAAiB;EACjB,4BAA4B;EAC5B,8BAA8B;EAC9B,qBAAqB;EACrB,cAAc;EACd,SAAS;EACT,WAAW;EACX,WAAW;;AAYb,SAAS,kBAAe;AACtB,MAAI,QAAQ,aAAa,UAAU;AACjC,WAAO,KAAK,QAAO,GAAI,WAAW,uBAAuB,UAAU,QAAQ,iBAAiB,aAAa;EAC3G;AACA,MAAI,QAAQ,aAAa,SAAS;AAChC,WAAO,KAAK,QAAO,GAAI,WAAW,WAAW,UAAU,QAAQ,iBAAiB,aAAa;EAC/F;AACA,SAAO,KAAK,QAAO,GAAI,WAAW,UAAU,QAAQ,iBAAiB,aAAa;AACpF;AAEA,SAAS,aAAa,KAAkB;AACtC,MAAI,CAAC,OAAO,QAAQ;AAAW,WAAO;AACtC,SAAO;AACT;AAEA,IAAM,eAAe;;;;;;;;;;;;;AAcrB,SAAS,aAAa,QAAuB,UAAqB;AAChE,SAAO;IACL,OAAO,QAAK;AACV,UAAI,CAAC,WAAU,KAAM,CAAC;AAAU;AAEhC,UAAI;AACJ,UAAI;AACF,aAAK,IAAI,SAAU,OAAO,MAAM,EAAE,UAAU,KAAI,CAAE;MACpD,QAAQ;AACN;MACF;AAEA,UAAI;AACF,cAAM,OAAO,GAAG,QAAQ,YAAY;AACpC,cAAM,OAAO,KAAK,IAAG;AAErB,mBAAW,OAAO,MAAM;AACtB,gBAAM,cAAc,IAAI,gBAAgB;AACxC,gBAAM,eAAe,IAAI,iBAAiB;AAC1C,cAAI,gBAAgB,KAAK,iBAAiB;AAAG;AAE7C,gBAAM,YAAY,IAAI,cAAc;AACpC,gBAAM,iBAAiB,IAAI,mBAAmB;AAC9C,gBAAM,WAAW,UAAU,cAAc,IAAI,SAAS,IAAI,WAAW,IAAI,YAAY;AAErF,cAAI,SAAS,IAAI,QAAQ;AAAG;AAC5B,mBAAS,IAAI,QAAQ;AAErB,gBAAM,QAAQ,aAAa,IAAI,KAAK;AAEpC,gBAAM;YACJ,UAAU;YACV,OAAO,IAAI,SAAS;YACpB;YACA;YACA,0BAA0B;YAC1B,sBAAsB;YACtB,mBAAmB;YACnB,iBAAiB;YACjB,SAAS;YACT,OAAO,CAAA;YACP,cAAc,CAAA;YACd,WAAW;YACX,OAAO;YACP,kBAAkB;YAClB,aAAa,IAAI,aAAa;YAC9B,WAAW;;QAEf;MACF;AACE,WAAG,MAAK;MACV;IACF;;AAEJ;AAEO,IAAM,SAAmB;EAC9B,MAAM;EACN,aAAa;EAEb,iBAAiB,OAAa;AAC5B,WAAO,kBAAkB,KAAK,KAAK;EACrC;EAEA,gBAAgB,SAAe;AAC7B,WAAO;EACT;EAEA,MAAM,mBAAgB;AACpB,QAAI,CAAC,WAAU;AAAI,aAAO,CAAA;AAC1B,UAAM,SAAS,gBAAe;AAC9B,QAAI,CAAC,WAAW,MAAM;AAAG,aAAO,CAAA;AAChC,WAAO,CAAC,EAAE,MAAM,QAAQ,SAAS,UAAU,UAAU,SAAQ,CAAE;EACjE;EAEA,oBAAoB,QAAuB,UAAqB;AAC9D,WAAO,aAAa,QAAQ,QAAQ;EACtC;;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,138 +1,241 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import {
|
|
11
|
-
|
|
1
|
+
import {
|
|
2
|
+
OutcomesPanel
|
|
3
|
+
} from "../chunk-BRD5RUGM.js";
|
|
4
|
+
import {
|
|
5
|
+
Overview
|
|
6
|
+
} from "../chunk-IJGF2ETG.js";
|
|
7
|
+
import {
|
|
8
|
+
FrictionPanel
|
|
9
|
+
} from "../chunk-XC6M4CSW.js";
|
|
10
|
+
import {
|
|
11
|
+
InsightsPanel
|
|
12
|
+
} from "../chunk-4SCZK7AL.js";
|
|
13
|
+
import {
|
|
14
|
+
InstructionsPanel
|
|
15
|
+
} from "../chunk-BT6Z6545.js";
|
|
16
|
+
import "../chunk-DQ3KELXD.js";
|
|
17
|
+
import {
|
|
18
|
+
loadApiInsights,
|
|
19
|
+
loadLinkedInstructions,
|
|
20
|
+
loadLocalStats
|
|
21
|
+
} from "../chunk-RJ7BHDLM.js";
|
|
22
|
+
import {
|
|
23
|
+
LauncherOverlay
|
|
24
|
+
} from "../chunk-CROYS75W.js";
|
|
25
|
+
import "../chunk-DTFXCHHI.js";
|
|
26
|
+
import "../chunk-KHJUQFIK.js";
|
|
27
|
+
import "../chunk-N52AHNBH.js";
|
|
28
|
+
import "../chunk-QD6X4L4L.js";
|
|
29
|
+
import "../chunk-RH7NHVSK.js";
|
|
30
|
+
import {
|
|
31
|
+
DIM,
|
|
32
|
+
ORANGE,
|
|
33
|
+
PERIODS,
|
|
34
|
+
PERIOD_LABELS
|
|
35
|
+
} from "../chunk-QJQS6TUN.js";
|
|
36
|
+
import "../chunk-B5KNTGMJ.js";
|
|
37
|
+
import {
|
|
38
|
+
readActiveOrg
|
|
39
|
+
} from "../chunk-EKJ2CABV.js";
|
|
40
|
+
import "../chunk-NSBPE2FW.js";
|
|
41
|
+
|
|
42
|
+
// src/dashboard/Dashboard.tsx
|
|
43
|
+
import { useState, useEffect, useCallback, useRef } from "react";
|
|
44
|
+
import { render, Box, Text, useInput, useApp } from "ink";
|
|
45
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
46
|
+
var MIN_WIDE = 90;
|
|
12
47
|
function getLayout() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
48
|
+
const termWidth = process.stdout.columns || 80;
|
|
49
|
+
const dashWidth = Math.min(160, termWidth);
|
|
50
|
+
const wide = dashWidth >= MIN_WIDE;
|
|
51
|
+
const halfWidth = wide ? Math.floor(dashWidth / 2) : dashWidth;
|
|
52
|
+
const barWidth = Math.max(6, Math.min(10, halfWidth - 34));
|
|
53
|
+
return { dashWidth, wide, halfWidth, barWidth };
|
|
19
54
|
}
|
|
20
55
|
function PeriodTabs({ active, providerName }) {
|
|
21
|
-
|
|
56
|
+
return /* @__PURE__ */ jsxs(Box, { justifyContent: "space-between", paddingX: 1, children: [
|
|
57
|
+
/* @__PURE__ */ jsx(Box, { gap: 1, children: PERIODS.map((p) => /* @__PURE__ */ jsx(Text, { bold: active === p, color: active === p ? ORANGE : DIM, children: active === p ? `[ ${PERIOD_LABELS[p]} ]` : ` ${PERIOD_LABELS[p]} ` }, p)) }),
|
|
58
|
+
providerName && /* @__PURE__ */ jsx(Text, { color: ORANGE, bold: true, children: providerName })
|
|
59
|
+
] });
|
|
22
60
|
}
|
|
23
61
|
function StatusBar({ width, insightsFocused = false }) {
|
|
24
|
-
|
|
62
|
+
return /* @__PURE__ */ jsx(Box, { borderStyle: "round", borderColor: DIM, width, justifyContent: "center", paddingX: 1, children: /* @__PURE__ */ jsxs(Text, { children: [
|
|
63
|
+
/* @__PURE__ */ jsx(Text, { color: ORANGE, bold: true, children: "<" }),
|
|
64
|
+
/* @__PURE__ */ jsx(Text, { color: ORANGE, children: ">" }),
|
|
65
|
+
/* @__PURE__ */ jsx(Text, { dimColor: true, children: " switch " }),
|
|
66
|
+
/* @__PURE__ */ jsx(Text, { color: ORANGE, bold: true, children: "q" }),
|
|
67
|
+
/* @__PURE__ */ jsx(Text, { dimColor: true, children: " quit " }),
|
|
68
|
+
/* @__PURE__ */ jsx(Text, { color: ORANGE, bold: true, children: "s" }),
|
|
69
|
+
/* @__PURE__ */ jsxs(Text, { dimColor: true, children: [
|
|
70
|
+
" ",
|
|
71
|
+
insightsFocused ? "back" : "suggestions",
|
|
72
|
+
" "
|
|
73
|
+
] }),
|
|
74
|
+
/* @__PURE__ */ jsx(Text, { color: ORANGE, bold: true, children: "1" }),
|
|
75
|
+
/* @__PURE__ */ jsx(Text, { dimColor: true, children: "-" }),
|
|
76
|
+
/* @__PURE__ */ jsx(Text, { color: ORANGE, bold: true, children: "5" }),
|
|
77
|
+
/* @__PURE__ */ jsx(Text, { dimColor: true, children: " period " }),
|
|
78
|
+
/* @__PURE__ */ jsx(Text, { color: ORANGE, bold: true, children: "r" }),
|
|
79
|
+
/* @__PURE__ */ jsx(Text, { dimColor: true, children: " refresh " }),
|
|
80
|
+
/* @__PURE__ */ jsx(Text, { color: ORANGE, bold: true, children: "n" }),
|
|
81
|
+
/* @__PURE__ */ jsx(Text, { dimColor: true, children: " new session " }),
|
|
82
|
+
/* @__PURE__ */ jsx(Text, { color: ORANGE, bold: true, children: "l" }),
|
|
83
|
+
/* @__PURE__ */ jsx(Text, { dimColor: true, children: " launcher" })
|
|
84
|
+
] }) });
|
|
25
85
|
}
|
|
26
86
|
function Row({ wide, width, children }) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return _jsx(_Fragment, { children: children });
|
|
87
|
+
if (wide) return /* @__PURE__ */ jsx(Box, { width, children });
|
|
88
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
30
89
|
}
|
|
31
|
-
function InteractiveDashboard({ initialLocal, initialApi, initialInstructions, initialPeriod }) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
setApi(newApi);
|
|
50
|
-
setInstructions(newInstructions);
|
|
51
|
-
setLoading(false);
|
|
52
|
-
}, []);
|
|
53
|
-
// Auto-refresh every 30s
|
|
54
|
-
useEffect(() => {
|
|
55
|
-
const id = setInterval(reload, 30_000);
|
|
56
|
-
return () => clearInterval(id);
|
|
57
|
-
}, [reload]);
|
|
58
|
-
const switchPeriod = useCallback((np) => {
|
|
59
|
-
if (np === period)
|
|
60
|
-
return;
|
|
61
|
-
setPeriod(np);
|
|
62
|
-
if (debounceRef.current)
|
|
63
|
-
clearTimeout(debounceRef.current);
|
|
64
|
-
debounceRef.current = setTimeout(reload, 300);
|
|
65
|
-
}, [period, reload]);
|
|
66
|
-
useInput((input, key) => {
|
|
67
|
-
if (input === 'q') {
|
|
68
|
-
if (insightsFocused) {
|
|
69
|
-
setInsightsFocused(false);
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
exit();
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
if (input === 's') {
|
|
76
|
-
setInsightsFocused(f => !f);
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
if (key.escape && insightsFocused) {
|
|
80
|
-
setInsightsFocused(false);
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
// When insights is focused, let it handle up/down/enter
|
|
84
|
-
if (insightsFocused)
|
|
85
|
-
return;
|
|
86
|
-
if (input === 'r') {
|
|
87
|
-
reload();
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
if (input === 'n') {
|
|
91
|
-
import('@rulemetric/session').then(({ getLauncher }) => {
|
|
92
|
-
getLauncher('claude_code').launch({ projectPath: process.cwd(), mode: 'interactive' });
|
|
93
|
-
});
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
const idx = PERIODS.indexOf(period);
|
|
97
|
-
if (key.leftArrow)
|
|
98
|
-
switchPeriod(PERIODS[(idx - 1 + PERIODS.length) % PERIODS.length]);
|
|
99
|
-
else if (key.rightArrow || key.tab)
|
|
100
|
-
switchPeriod(PERIODS[(idx + 1) % PERIODS.length]);
|
|
101
|
-
else if (input === '1')
|
|
102
|
-
switchPeriod('today');
|
|
103
|
-
else if (input === '2')
|
|
104
|
-
switchPeriod('week');
|
|
105
|
-
else if (input === '3')
|
|
106
|
-
switchPeriod('30days');
|
|
107
|
-
else if (input === '4')
|
|
108
|
-
switchPeriod('month');
|
|
109
|
-
else if (input === '5')
|
|
110
|
-
switchPeriod('all');
|
|
111
|
-
});
|
|
112
|
-
const { dashWidth, wide, halfWidth, barWidth } = layout;
|
|
113
|
-
const pw = wide ? halfWidth : dashWidth;
|
|
114
|
-
if (loading) {
|
|
115
|
-
return (_jsxs(Box, { flexDirection: "column", width: dashWidth, children: [_jsx(PeriodTabs, { active: period }), _jsx(Box, { borderStyle: "round", borderColor: ORANGE, paddingX: 1, width: dashWidth, children: _jsxs(Text, { dimColor: true, children: ["Loading ", PERIOD_LABELS[period], "..."] }) }), _jsx(StatusBar, { width: dashWidth })] }));
|
|
116
|
-
}
|
|
117
|
-
return (_jsxs(Box, { flexDirection: "column", width: dashWidth, children: [_jsx(PeriodTabs, { active: period }), _jsx(Overview, { local: local, api: api, label: PERIOD_LABELS[period], width: dashWidth }), _jsxs(Row, { wide: wide, width: dashWidth, children: [_jsx(OutcomesPanel, { api: api, width: pw, barWidth: barWidth }), _jsx(FrictionPanel, { api: api, width: pw, barWidth: barWidth })] }), _jsx(InstructionsPanel, { instructions: instructions, width: dashWidth, barWidth: barWidth }), _jsx(InsightsPanel, { api: api, width: dashWidth, focused: insightsFocused }), _jsx(StatusBar, { width: dashWidth, insightsFocused: insightsFocused })] }));
|
|
118
|
-
}
|
|
119
|
-
export async function renderDashboard(period = 'week') {
|
|
120
|
-
// Load data in parallel — local files + API
|
|
121
|
-
const [local, api, instructions] = await Promise.all([
|
|
122
|
-
loadLocalStats(),
|
|
123
|
-
loadApiInsights(),
|
|
124
|
-
loadLinkedInstructions(),
|
|
90
|
+
function InteractiveDashboard({ initialLocal, initialApi, initialInstructions, initialPeriod, initialLauncherFocused = false }) {
|
|
91
|
+
const { exit } = useApp();
|
|
92
|
+
const [period, setPeriod] = useState(initialPeriod);
|
|
93
|
+
const [local, setLocal] = useState(initialLocal);
|
|
94
|
+
const [api, setApi] = useState(initialApi);
|
|
95
|
+
const [instructions, setInstructions] = useState(initialInstructions);
|
|
96
|
+
const [loading, setLoading] = useState(false);
|
|
97
|
+
const [insightsFocused, setInsightsFocused] = useState(false);
|
|
98
|
+
const [launcherFocused, setLauncherFocused] = useState(initialLauncherFocused);
|
|
99
|
+
const activeOrgSlug = readActiveOrg()?.orgSlug ?? null;
|
|
100
|
+
const debounceRef = useRef(null);
|
|
101
|
+
const layout = getLayout();
|
|
102
|
+
const reload = useCallback(async () => {
|
|
103
|
+
setLoading(true);
|
|
104
|
+
const [newLocal, newApi, newInstructions] = await Promise.all([
|
|
105
|
+
loadLocalStats(),
|
|
106
|
+
loadApiInsights(),
|
|
107
|
+
loadLinkedInstructions()
|
|
125
108
|
]);
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
109
|
+
setLocal(newLocal);
|
|
110
|
+
setApi(newApi);
|
|
111
|
+
setInstructions(newInstructions);
|
|
112
|
+
setLoading(false);
|
|
113
|
+
}, []);
|
|
114
|
+
useEffect(() => {
|
|
115
|
+
const id = setInterval(reload, 3e4);
|
|
116
|
+
return () => clearInterval(id);
|
|
117
|
+
}, [reload]);
|
|
118
|
+
const switchPeriod = useCallback((np) => {
|
|
119
|
+
if (np === period) return;
|
|
120
|
+
setPeriod(np);
|
|
121
|
+
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
122
|
+
debounceRef.current = setTimeout(reload, 300);
|
|
123
|
+
}, [period, reload]);
|
|
124
|
+
useInput((input, key) => {
|
|
125
|
+
if (launcherFocused) return;
|
|
126
|
+
if (input === "q") {
|
|
127
|
+
if (insightsFocused) {
|
|
128
|
+
setInsightsFocused(false);
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
exit();
|
|
132
|
+
return;
|
|
130
133
|
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
const { unmount } = render(_jsxs(Box, { flexDirection: "column", width: layout.dashWidth, children: [_jsx(Overview, { local: local, api: api, label: PERIOD_LABELS[period], width: layout.dashWidth }), _jsx(OutcomesPanel, { api: api, width: layout.dashWidth, barWidth: layout.barWidth }), _jsx(FrictionPanel, { api: api, width: layout.dashWidth, barWidth: layout.barWidth }), _jsx(InstructionsPanel, { instructions: instructions, width: layout.dashWidth, barWidth: layout.barWidth }), _jsx(InsightsPanel, { api: api, width: layout.dashWidth })] }), { patchConsole: false });
|
|
135
|
-
unmount();
|
|
134
|
+
if (input === "s") {
|
|
135
|
+
setInsightsFocused((f) => !f);
|
|
136
|
+
return;
|
|
136
137
|
}
|
|
138
|
+
if (key.escape && insightsFocused) {
|
|
139
|
+
setInsightsFocused(false);
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
if (input === "l" && !insightsFocused) {
|
|
143
|
+
setLauncherFocused(true);
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
if (insightsFocused) return;
|
|
147
|
+
if (input === "r") {
|
|
148
|
+
reload();
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
if (input === "n") {
|
|
152
|
+
import("../dist-CSUYFYKI.js").then(({ getLauncher }) => {
|
|
153
|
+
getLauncher("claude_code").launch({ projectPath: process.cwd(), mode: "interactive" });
|
|
154
|
+
});
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
const idx = PERIODS.indexOf(period);
|
|
158
|
+
if (key.leftArrow) switchPeriod(PERIODS[(idx - 1 + PERIODS.length) % PERIODS.length]);
|
|
159
|
+
else if (key.rightArrow || key.tab) switchPeriod(PERIODS[(idx + 1) % PERIODS.length]);
|
|
160
|
+
else if (input === "1") switchPeriod("today");
|
|
161
|
+
else if (input === "2") switchPeriod("week");
|
|
162
|
+
else if (input === "3") switchPeriod("30days");
|
|
163
|
+
else if (input === "4") switchPeriod("month");
|
|
164
|
+
else if (input === "5") switchPeriod("all");
|
|
165
|
+
});
|
|
166
|
+
const { dashWidth, wide, halfWidth, barWidth } = layout;
|
|
167
|
+
const pw = wide ? halfWidth : dashWidth;
|
|
168
|
+
if (loading) {
|
|
169
|
+
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", width: dashWidth, children: [
|
|
170
|
+
/* @__PURE__ */ jsx(PeriodTabs, { active: period }),
|
|
171
|
+
/* @__PURE__ */ jsx(Box, { borderStyle: "round", borderColor: ORANGE, paddingX: 1, width: dashWidth, children: /* @__PURE__ */ jsxs(Text, { dimColor: true, children: [
|
|
172
|
+
"Loading ",
|
|
173
|
+
PERIOD_LABELS[period],
|
|
174
|
+
"..."
|
|
175
|
+
] }) }),
|
|
176
|
+
/* @__PURE__ */ jsx(StatusBar, { width: dashWidth })
|
|
177
|
+
] });
|
|
178
|
+
}
|
|
179
|
+
if (launcherFocused) {
|
|
180
|
+
return /* @__PURE__ */ jsx(Box, { flexDirection: "column", width: dashWidth, children: /* @__PURE__ */ jsx(
|
|
181
|
+
LauncherOverlay,
|
|
182
|
+
{
|
|
183
|
+
onClose: () => setLauncherFocused(false),
|
|
184
|
+
activeOrg: activeOrgSlug,
|
|
185
|
+
defaultProjectPath: process.cwd(),
|
|
186
|
+
width: dashWidth
|
|
187
|
+
}
|
|
188
|
+
) });
|
|
189
|
+
}
|
|
190
|
+
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", width: dashWidth, children: [
|
|
191
|
+
/* @__PURE__ */ jsx(PeriodTabs, { active: period }),
|
|
192
|
+
/* @__PURE__ */ jsx(Overview, { local, api, label: PERIOD_LABELS[period], width: dashWidth }),
|
|
193
|
+
/* @__PURE__ */ jsxs(Row, { wide, width: dashWidth, children: [
|
|
194
|
+
/* @__PURE__ */ jsx(OutcomesPanel, { api, width: pw, barWidth }),
|
|
195
|
+
/* @__PURE__ */ jsx(FrictionPanel, { api, width: pw, barWidth })
|
|
196
|
+
] }),
|
|
197
|
+
/* @__PURE__ */ jsx(InstructionsPanel, { instructions, width: dashWidth, barWidth }),
|
|
198
|
+
/* @__PURE__ */ jsx(InsightsPanel, { api, width: dashWidth, focused: insightsFocused }),
|
|
199
|
+
/* @__PURE__ */ jsx(StatusBar, { width: dashWidth, insightsFocused })
|
|
200
|
+
] });
|
|
201
|
+
}
|
|
202
|
+
async function renderDashboard(period = "week", options = {}) {
|
|
203
|
+
const [local, api, instructions] = await Promise.all([
|
|
204
|
+
loadLocalStats(),
|
|
205
|
+
loadApiInsights(),
|
|
206
|
+
loadLinkedInstructions()
|
|
207
|
+
]);
|
|
208
|
+
const isTTY = process.stdin.isTTY && process.stdout.isTTY;
|
|
209
|
+
if (isTTY) {
|
|
210
|
+
const { waitUntilExit } = render(
|
|
211
|
+
/* @__PURE__ */ jsx(
|
|
212
|
+
InteractiveDashboard,
|
|
213
|
+
{
|
|
214
|
+
initialLocal: local,
|
|
215
|
+
initialApi: api,
|
|
216
|
+
initialInstructions: instructions,
|
|
217
|
+
initialPeriod: period,
|
|
218
|
+
initialLauncherFocused: options.openLauncher ?? false
|
|
219
|
+
}
|
|
220
|
+
)
|
|
221
|
+
);
|
|
222
|
+
await waitUntilExit();
|
|
223
|
+
} else {
|
|
224
|
+
const layout = getLayout();
|
|
225
|
+
const { unmount } = render(
|
|
226
|
+
/* @__PURE__ */ jsxs(Box, { flexDirection: "column", width: layout.dashWidth, children: [
|
|
227
|
+
/* @__PURE__ */ jsx(Overview, { local, api, label: PERIOD_LABELS[period], width: layout.dashWidth }),
|
|
228
|
+
/* @__PURE__ */ jsx(OutcomesPanel, { api, width: layout.dashWidth, barWidth: layout.barWidth }),
|
|
229
|
+
/* @__PURE__ */ jsx(FrictionPanel, { api, width: layout.dashWidth, barWidth: layout.barWidth }),
|
|
230
|
+
/* @__PURE__ */ jsx(InstructionsPanel, { instructions, width: layout.dashWidth, barWidth: layout.barWidth }),
|
|
231
|
+
/* @__PURE__ */ jsx(InsightsPanel, { api, width: layout.dashWidth })
|
|
232
|
+
] }),
|
|
233
|
+
{ patchConsole: false }
|
|
234
|
+
);
|
|
235
|
+
unmount();
|
|
236
|
+
}
|
|
137
237
|
}
|
|
138
|
-
|
|
238
|
+
export {
|
|
239
|
+
renderDashboard
|
|
240
|
+
};
|
|
241
|
+
//# sourceMappingURL=Dashboard.js.map
|