@rulemetric/cli 0.19.1 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/bin/dev.js +0 -0
  2. package/dist/base-command.js +1 -1
  3. package/dist/{chunk-6WX3AXMI.js → chunk-254I3NH2.js} +1 -1
  4. package/dist/{chunk-Z7LBSVG3.js → chunk-4EGU65H4.js} +1 -1
  5. package/dist/chunk-4K3MVOVQ.js +2 -0
  6. package/dist/{chunk-B5FBLLKT.js → chunk-4RC2SYZX.js} +1 -1
  7. package/dist/{chunk-PD4BUQ2X.js → chunk-5JYK5HWH.js} +1 -1
  8. package/dist/{chunk-75H3CKWA.js → chunk-7F3S6JQ2.js} +1 -1
  9. package/dist/chunk-A4YGEMXC.js +1 -0
  10. package/dist/{chunk-K2PI3OGV.js → chunk-D6B2DJE6.js} +1 -1
  11. package/dist/{chunk-EA3X4TAE.js → chunk-FG5EISSP.js} +1 -1
  12. package/dist/chunk-GJLZWEMQ.js +1 -0
  13. package/dist/{chunk-Q37D6V2G.js → chunk-GKWZ2DSE.js} +1 -1
  14. package/dist/{chunk-LQRXWLFJ.js → chunk-GWQ24FQP.js} +1 -1
  15. package/dist/{chunk-2RZDFKX4.js → chunk-JXUSXDS6.js} +1 -1
  16. package/dist/{chunk-ONDOPTSL.js → chunk-KIXBBZL5.js} +1 -1
  17. package/dist/chunk-LAJ4RBRB.js +1 -0
  18. package/dist/{chunk-35NZJWFC.js → chunk-LVAIQTYA.js} +1 -1
  19. package/dist/chunk-MJAIG2EY.js +7 -0
  20. package/dist/chunk-MN4GOU3T.js +1 -0
  21. package/dist/{chunk-YRGNBYZZ.js → chunk-NNUZ4CG4.js} +1 -1
  22. package/dist/{chunk-XQEI7NOC.js → chunk-NXQUM2GW.js} +1 -1
  23. package/dist/{chunk-ZVCKDNBT.js → chunk-OGMQEA3L.js} +1 -1
  24. package/dist/chunk-PWZY2P65.js +1 -0
  25. package/dist/{chunk-6XCD343D.js → chunk-QFHWFULY.js} +1 -1
  26. package/dist/{chunk-PRC5N4NB.js → chunk-SWCM7IHC.js} +1 -1
  27. package/dist/{chunk-EYRM7BT4.js → chunk-UJTMT6Z7.js} +1 -1
  28. package/dist/{chunk-OT7ZUHJF.js → chunk-UQJNUESP.js} +1 -1
  29. package/dist/chunk-W67OZWQV.js +1 -0
  30. package/dist/{chunk-RR5EE23Q.js → chunk-WGPFOHV3.js} +1 -1
  31. package/dist/{chunk-KCX2YDC3.js → chunk-XQ5ENDKO.js} +1 -1
  32. package/dist/chunk-YUSY3IHE.js +1 -0
  33. package/dist/commands/antigravity/backfill.js +1 -1
  34. package/dist/commands/auth/create-key.js +1 -1
  35. package/dist/commands/auth/login.js +1 -1
  36. package/dist/commands/auth/logout.js +1 -1
  37. package/dist/commands/auth/revoke-key.js +1 -1
  38. package/dist/commands/auth/signup.js +1 -1
  39. package/dist/commands/auth/status.js +1 -1
  40. package/dist/commands/capture/scope.js +1 -1
  41. package/dist/commands/catalog/index.js +1 -1
  42. package/dist/commands/catalog/recommend.js +1 -1
  43. package/dist/commands/crons/list.js +1 -1
  44. package/dist/commands/crons/run.js +1 -1
  45. package/dist/commands/dashboard.js +1 -1
  46. package/dist/commands/diagnostics.js +1 -1
  47. package/dist/commands/eval-targets/create.js +1 -1
  48. package/dist/commands/eval-targets/list.js +1 -1
  49. package/dist/commands/evals/agent.js +1 -1
  50. package/dist/commands/evals/auto-run.js +1 -1
  51. package/dist/commands/evals/benchmark.js +1 -1
  52. package/dist/commands/evals/compare.js +1 -1
  53. package/dist/commands/evals/create.js +1 -1
  54. package/dist/commands/evals/optimize-description.js +1 -1
  55. package/dist/commands/evals/optimize.js +1 -1
  56. package/dist/commands/evals/refine-cases.js +1 -1
  57. package/dist/commands/evals/run.js +1 -1
  58. package/dist/commands/evals/validate-judge.js +1 -1
  59. package/dist/commands/experiments/admissions.js +1 -0
  60. package/dist/commands/experiments/enroll.js +1 -1
  61. package/dist/commands/experiments/list.js +1 -1
  62. package/dist/commands/experiments/reuse.js +1 -0
  63. package/dist/commands/gateway/ensure.js +1 -1
  64. package/dist/commands/hooks/install.js +1 -1
  65. package/dist/commands/hooks/run.js +1 -1
  66. package/dist/commands/hooks/uninstall.js +1 -1
  67. package/dist/commands/instructions/create.js +1 -1
  68. package/dist/commands/instructions/dedupe.js +1 -1
  69. package/dist/commands/instructions/delete.js +1 -1
  70. package/dist/commands/instructions/fork.js +1 -1
  71. package/dist/commands/instructions/get.js +1 -1
  72. package/dist/commands/instructions/list.js +1 -1
  73. package/dist/commands/instructions/promote.js +1 -1
  74. package/dist/commands/instructions/pull.js +1 -1
  75. package/dist/commands/instructions/restore.js +1 -1
  76. package/dist/commands/instructions/retract.js +1 -1
  77. package/dist/commands/instructions/upstream.js +1 -1
  78. package/dist/commands/instructions/versions.js +1 -1
  79. package/dist/commands/launcher.js +1 -1
  80. package/dist/commands/local/down.js +1 -1
  81. package/dist/commands/local/up.js +1 -1
  82. package/dist/commands/org/current.js +1 -1
  83. package/dist/commands/org/list.js +1 -1
  84. package/dist/commands/org/switch.js +1 -1
  85. package/dist/commands/packs/add-instruction.js +1 -1
  86. package/dist/commands/packs/apply.js +1 -1
  87. package/dist/commands/packs/create.js +1 -1
  88. package/dist/commands/packs/fork.js +1 -1
  89. package/dist/commands/packs/get.js +1 -1
  90. package/dist/commands/packs/list.js +1 -1
  91. package/dist/commands/packs/remove-instruction.js +1 -1
  92. package/dist/commands/proxy/env.js +1 -1
  93. package/dist/commands/proxy/logs.js +1 -1
  94. package/dist/commands/proxy/restart.js +1 -1
  95. package/dist/commands/proxy/setup.js +1 -1
  96. package/dist/commands/proxy/start.js +1 -1
  97. package/dist/commands/proxy/status.js +1 -1
  98. package/dist/commands/proxy/stop.js +1 -1
  99. package/dist/commands/research/backfill.js +1 -1
  100. package/dist/commands/research/resume-scoped-outcomes.js +1 -1
  101. package/dist/commands/research/tail-transcript.js +1 -1
  102. package/dist/commands/service/install.js +1 -1
  103. package/dist/commands/service/status.js +1 -1
  104. package/dist/commands/service/uninstall.js +1 -1
  105. package/dist/commands/service/updates.js +1 -1
  106. package/dist/commands/sessions/analyze.js +1 -1
  107. package/dist/commands/sessions/delete.js +1 -1
  108. package/dist/commands/sessions/end.js +1 -1
  109. package/dist/commands/sessions/import.js +1 -1
  110. package/dist/commands/sessions/list.js +1 -1
  111. package/dist/commands/sessions/start.js +1 -1
  112. package/dist/commands/setup.js +1 -1
  113. package/dist/commands/skills/export-approved.js +1 -1
  114. package/dist/commands/skills/install.js +1 -1
  115. package/dist/commands/skills/list.js +1 -1
  116. package/dist/commands/skills/publish.js +1 -1
  117. package/dist/commands/skills/search.js +1 -1
  118. package/dist/commands/skills/update.js +1 -1
  119. package/dist/commands/suggestions/accept.js +1 -1
  120. package/dist/commands/suggestions/auto.js +1 -1
  121. package/dist/commands/suggestions/dismiss.js +1 -1
  122. package/dist/commands/suggestions/list.js +1 -1
  123. package/dist/commands/suggestions/refresh.js +1 -1
  124. package/dist/commands/suggestions/undo.js +1 -1
  125. package/dist/dashboard/Dashboard.js +1 -1
  126. package/dist/dashboard/launcher/LauncherOverlay.js +1 -1
  127. package/dist/harbor/cost_delta.py +0 -0
  128. package/dist/harbor/rm-batch-task/solution/solve.sh +0 -0
  129. package/dist/harbor/rm-batch-task/tests/test.sh +0 -0
  130. package/dist/harbor/rm-locality-task/solution/solve.sh +0 -0
  131. package/dist/harbor/rm-locality-task/tests/test.sh +0 -0
  132. package/dist/harbor/rm-migrations-task/solution/solve.sh +0 -0
  133. package/dist/harbor/rm-migrations-task/tests/test.sh +0 -0
  134. package/dist/harbor/rm-pagination-task/solution/solve.sh +0 -0
  135. package/dist/harbor/rm-pagination-task/tests/test.sh +0 -0
  136. package/dist/harbor/run.sh +0 -0
  137. package/dist/lib/agent-loop.js +1 -1
  138. package/dist/lib/agent-presence.js +1 -1
  139. package/dist/lib/discovery-repository.js +1 -1
  140. package/dist/lib/eval-case-generator.js +1 -1
  141. package/dist/lib/eval-conversation-handler.js +1 -1
  142. package/dist/lib/experiment-reuse.js +1 -0
  143. package/dist/lib/gateway-entry.js +0 -0
  144. package/dist/lib/instruction-proposer.js +1 -1
  145. package/dist/lib/instructions/acceptance/accept-hook.js +1 -1
  146. package/dist/lib/instructions/acceptance/suggestion-accept.js +1 -1
  147. package/dist/lib/jobs/handlers/cron-auto-accept-suggestions.js +1 -1
  148. package/dist/lib/jobs/handlers/cron-instruction-training.js +1 -1
  149. package/dist/lib/jobs/handlers/cron-refine-cases.js +1 -1
  150. package/dist/lib/jobs/handlers/cron-refresh-pricing.js +1 -1
  151. package/dist/lib/jobs/handlers/cron-suggest-instructions.js +1 -1
  152. package/dist/lib/jobs/handlers/distill-memories.js +1 -1
  153. package/dist/lib/jobs/handlers/prepare-isolated-launch.js +1 -1
  154. package/dist/lib/jobs/handlers/prepare-suggestion-live.js +1 -1
  155. package/dist/lib/jobs/handlers/process-conversation.js +1 -1
  156. package/dist/lib/jobs/handlers/process-eval.js +1 -1
  157. package/dist/lib/jobs/handlers/process-insights.js +1 -1
  158. package/dist/lib/jobs/handlers/process-launch.js +1 -1
  159. package/dist/lib/jobs/handlers/process-session-goal.js +1 -1
  160. package/dist/lib/jobs/handlers/process-suggestion-adoption.js +1 -1
  161. package/dist/lib/jobs/handlers/process-suggestion-discovery.js +1 -1
  162. package/dist/lib/jobs/handlers/process-suggestion-eval.js +1 -1
  163. package/dist/lib/llm-client.js +1 -1
  164. package/dist/lib/manual-tasks.js +1 -1
  165. package/dist/lib/study-fixture.js +1 -1
  166. package/dist/lib/suggestion-discovery.js +1 -1
  167. package/oclif.manifest.json +924 -818
  168. package/package.json +28 -28
  169. package/dist/chunk-E6O2IFOK.js +0 -1
  170. package/dist/chunk-FD272ZXG.js +0 -2
  171. package/dist/chunk-FKUFJWII.js +0 -1
  172. package/dist/chunk-IQOBKWVY.js +0 -5
  173. package/dist/chunk-JU5ZNXPK.js +0 -1
  174. package/dist/chunk-JVTSJFFI.js +0 -1
  175. package/dist/chunk-NX3PF3EQ.js +0 -1
@@ -937,120 +937,6 @@
937
937
  "list.js"
938
938
  ]
939
939
  },
940
- "experiments:enroll": {
941
- "aliases": [],
942
- "args": {},
943
- "description": "Submit a fresh work request to an eligible project experiment",
944
- "examples": [
945
- "<%= config.bin %> experiments enroll --project /repo --family parser-repair --prompt-file task.txt"
946
- ],
947
- "flags": {
948
- "api-url": {
949
- "description": "Override API base URL",
950
- "env": "RULEMETRIC_API_URL",
951
- "hidden": true,
952
- "name": "api-url",
953
- "hasDynamicHelp": false,
954
- "multiple": false,
955
- "type": "option"
956
- },
957
- "project": {
958
- "char": "p",
959
- "description": "Project path (defaults to current directory)",
960
- "name": "project",
961
- "hasDynamicHelp": false,
962
- "multiple": false,
963
- "type": "option"
964
- },
965
- "family": {
966
- "description": "Task family shown by the waiting experiment",
967
- "name": "family",
968
- "required": true,
969
- "hasDynamicHelp": false,
970
- "multiple": false,
971
- "type": "option"
972
- },
973
- "prompt-file": {
974
- "description": "UTF-8 file containing a real, fresh work request",
975
- "name": "prompt-file",
976
- "required": true,
977
- "hasDynamicHelp": false,
978
- "multiple": false,
979
- "type": "option"
980
- },
981
- "model": {
982
- "description": "Optional model constraint; must match the experiment pin",
983
- "name": "model",
984
- "hasDynamicHelp": false,
985
- "multiple": false,
986
- "type": "option"
987
- }
988
- },
989
- "hasDynamicHelp": false,
990
- "hiddenAliases": [],
991
- "id": "experiments:enroll",
992
- "pluginAlias": "@rulemetric/cli",
993
- "pluginName": "@rulemetric/cli",
994
- "pluginType": "core",
995
- "strict": true,
996
- "enableJsonFlag": false,
997
- "isESM": true,
998
- "relativePath": [
999
- "dist",
1000
- "commands",
1001
- "experiments",
1002
- "enroll.js"
1003
- ]
1004
- },
1005
- "experiments:list": {
1006
- "aliases": [],
1007
- "args": {},
1008
- "description": "List experiments with execution, metric finding, and application separately",
1009
- "examples": [
1010
- "<%= config.bin %> experiments list",
1011
- "<%= config.bin %> experiments list --all"
1012
- ],
1013
- "flags": {
1014
- "api-url": {
1015
- "description": "Override API base URL",
1016
- "env": "RULEMETRIC_API_URL",
1017
- "hidden": true,
1018
- "name": "api-url",
1019
- "hasDynamicHelp": false,
1020
- "multiple": false,
1021
- "type": "option"
1022
- },
1023
- "project": {
1024
- "char": "p",
1025
- "description": "Project path (defaults to current directory)",
1026
- "name": "project",
1027
- "hasDynamicHelp": false,
1028
- "multiple": false,
1029
- "type": "option"
1030
- },
1031
- "all": {
1032
- "description": "Every project",
1033
- "name": "all",
1034
- "allowNo": false,
1035
- "type": "boolean"
1036
- }
1037
- },
1038
- "hasDynamicHelp": false,
1039
- "hiddenAliases": [],
1040
- "id": "experiments:list",
1041
- "pluginAlias": "@rulemetric/cli",
1042
- "pluginName": "@rulemetric/cli",
1043
- "pluginType": "core",
1044
- "strict": true,
1045
- "enableJsonFlag": false,
1046
- "isESM": true,
1047
- "relativePath": [
1048
- "dist",
1049
- "commands",
1050
- "experiments",
1051
- "list.js"
1052
- ]
1053
- },
1054
940
  "evals:agent": {
1055
941
  "aliases": [],
1056
942
  "args": {},
@@ -1781,10 +1667,10 @@
1781
1667
  "validate-judge.js"
1782
1668
  ]
1783
1669
  },
1784
- "gateway:ensure": {
1670
+ "experiments:admissions": {
1785
1671
  "aliases": [],
1786
1672
  "args": {},
1787
- "description": "Ensure the gateway proxy is running (called by hooks, not for direct use)",
1673
+ "description": "Show automatic captured-task admission, exclusions and experiment links",
1788
1674
  "flags": {
1789
1675
  "api-url": {
1790
1676
  "description": "Override API base URL",
@@ -1794,12 +1680,26 @@
1794
1680
  "hasDynamicHelp": false,
1795
1681
  "multiple": false,
1796
1682
  "type": "option"
1683
+ },
1684
+ "project": {
1685
+ "description": "Canonical project checkout path",
1686
+ "name": "project",
1687
+ "hasDynamicHelp": false,
1688
+ "multiple": false,
1689
+ "type": "option"
1690
+ },
1691
+ "offset": {
1692
+ "description": "Receipt pagination offset",
1693
+ "name": "offset",
1694
+ "default": 0,
1695
+ "hasDynamicHelp": false,
1696
+ "multiple": false,
1697
+ "type": "option"
1797
1698
  }
1798
1699
  },
1799
1700
  "hasDynamicHelp": false,
1800
- "hidden": true,
1801
1701
  "hiddenAliases": [],
1802
- "id": "gateway:ensure",
1702
+ "id": "experiments:admissions",
1803
1703
  "pluginAlias": "@rulemetric/cli",
1804
1704
  "pluginName": "@rulemetric/cli",
1805
1705
  "pluginType": "core",
@@ -1809,34 +1709,62 @@
1809
1709
  "relativePath": [
1810
1710
  "dist",
1811
1711
  "commands",
1812
- "gateway",
1813
- "ensure.js"
1712
+ "experiments",
1713
+ "admissions.js"
1814
1714
  ]
1815
1715
  },
1816
- "hooks:emit-instructions": {
1716
+ "experiments:enroll": {
1817
1717
  "aliases": [],
1818
1718
  "args": {},
1819
- "description": "Print a synthetic instruction snapshot (on-disk instruction files) as JSON for zero-proxy instruction linking",
1719
+ "description": "Submit a fresh work request to an eligible project experiment",
1720
+ "examples": [
1721
+ "<%= config.bin %> experiments enroll --project /repo --family parser-repair --prompt-file task.txt"
1722
+ ],
1820
1723
  "flags": {
1821
- "project-dir": {
1822
- "description": "Project directory to scan (defaults to cwd)",
1823
- "name": "project-dir",
1724
+ "api-url": {
1725
+ "description": "Override API base URL",
1726
+ "env": "RULEMETRIC_API_URL",
1727
+ "hidden": true,
1728
+ "name": "api-url",
1824
1729
  "hasDynamicHelp": false,
1825
1730
  "multiple": false,
1826
1731
  "type": "option"
1827
1732
  },
1828
- "tool": {
1829
- "description": "Hook tool id whose instruction files to read (claude_code, codex, copilot_agent, copilot_cli, vscode_copilot)",
1830
- "name": "tool",
1733
+ "project": {
1734
+ "char": "p",
1735
+ "description": "Project path (defaults to current directory)",
1736
+ "name": "project",
1737
+ "hasDynamicHelp": false,
1738
+ "multiple": false,
1739
+ "type": "option"
1740
+ },
1741
+ "family": {
1742
+ "description": "Task family shown by the waiting experiment",
1743
+ "name": "family",
1744
+ "required": true,
1745
+ "hasDynamicHelp": false,
1746
+ "multiple": false,
1747
+ "type": "option"
1748
+ },
1749
+ "prompt-file": {
1750
+ "description": "UTF-8 file containing a real, fresh work request",
1751
+ "name": "prompt-file",
1752
+ "required": true,
1753
+ "hasDynamicHelp": false,
1754
+ "multiple": false,
1755
+ "type": "option"
1756
+ },
1757
+ "model": {
1758
+ "description": "Optional model constraint; must match the experiment pin",
1759
+ "name": "model",
1831
1760
  "hasDynamicHelp": false,
1832
1761
  "multiple": false,
1833
1762
  "type": "option"
1834
1763
  }
1835
1764
  },
1836
1765
  "hasDynamicHelp": false,
1837
- "hidden": true,
1838
1766
  "hiddenAliases": [],
1839
- "id": "hooks:emit-instructions",
1767
+ "id": "experiments:enroll",
1840
1768
  "pluginAlias": "@rulemetric/cli",
1841
1769
  "pluginName": "@rulemetric/cli",
1842
1770
  "pluginType": "core",
@@ -1846,18 +1774,17 @@
1846
1774
  "relativePath": [
1847
1775
  "dist",
1848
1776
  "commands",
1849
- "hooks",
1850
- "emit-instructions.js"
1777
+ "experiments",
1778
+ "enroll.js"
1851
1779
  ]
1852
1780
  },
1853
- "hooks:install": {
1781
+ "experiments:list": {
1854
1782
  "aliases": [],
1855
1783
  "args": {},
1856
- "description": "Install session tracking hooks and context capture proxy for Claude Code",
1784
+ "description": "List experiments with execution, metric finding, and application separately",
1857
1785
  "examples": [
1858
- "<%= config.bin %> hooks install",
1859
- "<%= config.bin %> hooks install --global",
1860
- "<%= config.bin %> hooks install --no-proxy"
1786
+ "<%= config.bin %> experiments list",
1787
+ "<%= config.bin %> experiments list --all"
1861
1788
  ],
1862
1789
  "flags": {
1863
1790
  "api-url": {
@@ -1869,42 +1796,24 @@
1869
1796
  "multiple": false,
1870
1797
  "type": "option"
1871
1798
  },
1872
- "no-proxy": {
1873
- "description": "Skip proxy/gateway configuration (hooks only)",
1874
- "name": "no-proxy",
1875
- "allowNo": false,
1876
- "type": "boolean"
1877
- },
1878
- "project-dir": {
1879
- "description": "Project directory to install hooks in (defaults to cwd)",
1880
- "name": "project-dir",
1799
+ "project": {
1800
+ "char": "p",
1801
+ "description": "Project path (defaults to current directory)",
1802
+ "name": "project",
1881
1803
  "hasDynamicHelp": false,
1882
1804
  "multiple": false,
1883
1805
  "type": "option"
1884
1806
  },
1885
- "user-hooks": {
1886
- "description": "Write user-level Cursor/Antigravity hooks (~/.cursor, ~/.gemini). Required for Cursor capture — its traffic bypasses the proxy.",
1887
- "name": "user-hooks",
1888
- "allowNo": true,
1889
- "type": "boolean"
1890
- },
1891
- "global": {
1892
- "char": "g",
1893
- "description": "Install hooks globally (~/.claude/settings.json) so all projects are tracked",
1894
- "name": "global",
1895
- "allowNo": false,
1896
- "type": "boolean"
1897
- },
1898
- "statusline-usage": {
1899
- "description": "Install the statusline shim so Claude Code pushes live rate_limits on every refresh (makes /usage rings update in real time without needing the proxy)",
1900
- "name": "statusline-usage",
1807
+ "all": {
1808
+ "description": "Every project",
1809
+ "name": "all",
1901
1810
  "allowNo": false,
1902
1811
  "type": "boolean"
1903
1812
  }
1904
1813
  },
1905
1814
  "hasDynamicHelp": false,
1906
1815
  "hiddenAliases": [],
1907
- "id": "hooks:install",
1816
+ "id": "experiments:list",
1908
1817
  "pluginAlias": "@rulemetric/cli",
1909
1818
  "pluginName": "@rulemetric/cli",
1910
1819
  "pluginType": "core",
@@ -1914,27 +1823,20 @@
1914
1823
  "relativePath": [
1915
1824
  "dist",
1916
1825
  "commands",
1917
- "hooks",
1918
- "install.js"
1826
+ "experiments",
1827
+ "list.js"
1919
1828
  ]
1920
1829
  },
1921
- "hooks:run": {
1830
+ "experiments:reuse": {
1922
1831
  "aliases": [],
1923
1832
  "args": {
1924
- "hook": {
1925
- "description": "Hook name to run",
1926
- "name": "hook",
1927
- "options": [
1928
- "session-start",
1929
- "session-end",
1930
- "user-prompt",
1931
- "post-tool-use",
1932
- "assistant-response"
1933
- ],
1833
+ "id": {
1834
+ "description": "Completed source experiment UUID",
1835
+ "name": "id",
1934
1836
  "required": true
1935
1837
  }
1936
1838
  },
1937
- "description": "Execute a hook script (called by AI tool hooks, not for direct use)",
1839
+ "description": "Run selected previously measured fixture tasks with a new bounded exploratory budget",
1938
1840
  "flags": {
1939
1841
  "api-url": {
1940
1842
  "description": "Override API base URL",
@@ -1944,18 +1846,222 @@
1944
1846
  "hasDynamicHelp": false,
1945
1847
  "multiple": false,
1946
1848
  "type": "option"
1947
- }
1948
- },
1949
- "hasDynamicHelp": false,
1950
- "hidden": true,
1951
- "hiddenAliases": [],
1952
- "id": "hooks:run",
1953
- "pluginAlias": "@rulemetric/cli",
1954
- "pluginName": "@rulemetric/cli",
1955
- "pluginType": "core",
1956
- "strict": true,
1957
- "enableJsonFlag": false,
1958
- "isESM": true,
1849
+ },
1850
+ "task": {
1851
+ "description": "Source task ID to reuse (repeat for multiple tasks)",
1852
+ "name": "task",
1853
+ "required": true,
1854
+ "hasDynamicHelp": false,
1855
+ "multiple": true,
1856
+ "type": "option"
1857
+ },
1858
+ "reason": {
1859
+ "description": "Why this additional exploratory execution is useful (at least 20 characters)",
1860
+ "name": "reason",
1861
+ "required": true,
1862
+ "hasDynamicHelp": false,
1863
+ "multiple": false,
1864
+ "type": "option"
1865
+ },
1866
+ "request-id": {
1867
+ "description": "Explicit UUID for a new budget; identical arguments otherwise recover the same request",
1868
+ "name": "request-id",
1869
+ "hasDynamicHelp": false,
1870
+ "multiple": false,
1871
+ "type": "option"
1872
+ }
1873
+ },
1874
+ "hasDynamicHelp": false,
1875
+ "hiddenAliases": [],
1876
+ "id": "experiments:reuse",
1877
+ "pluginAlias": "@rulemetric/cli",
1878
+ "pluginName": "@rulemetric/cli",
1879
+ "pluginType": "core",
1880
+ "strict": true,
1881
+ "enableJsonFlag": false,
1882
+ "isESM": true,
1883
+ "relativePath": [
1884
+ "dist",
1885
+ "commands",
1886
+ "experiments",
1887
+ "reuse.js"
1888
+ ]
1889
+ },
1890
+ "gateway:ensure": {
1891
+ "aliases": [],
1892
+ "args": {},
1893
+ "description": "Ensure the gateway proxy is running (called by hooks, not for direct use)",
1894
+ "flags": {
1895
+ "api-url": {
1896
+ "description": "Override API base URL",
1897
+ "env": "RULEMETRIC_API_URL",
1898
+ "hidden": true,
1899
+ "name": "api-url",
1900
+ "hasDynamicHelp": false,
1901
+ "multiple": false,
1902
+ "type": "option"
1903
+ }
1904
+ },
1905
+ "hasDynamicHelp": false,
1906
+ "hidden": true,
1907
+ "hiddenAliases": [],
1908
+ "id": "gateway:ensure",
1909
+ "pluginAlias": "@rulemetric/cli",
1910
+ "pluginName": "@rulemetric/cli",
1911
+ "pluginType": "core",
1912
+ "strict": true,
1913
+ "enableJsonFlag": false,
1914
+ "isESM": true,
1915
+ "relativePath": [
1916
+ "dist",
1917
+ "commands",
1918
+ "gateway",
1919
+ "ensure.js"
1920
+ ]
1921
+ },
1922
+ "hooks:emit-instructions": {
1923
+ "aliases": [],
1924
+ "args": {},
1925
+ "description": "Print a synthetic instruction snapshot (on-disk instruction files) as JSON for zero-proxy instruction linking",
1926
+ "flags": {
1927
+ "project-dir": {
1928
+ "description": "Project directory to scan (defaults to cwd)",
1929
+ "name": "project-dir",
1930
+ "hasDynamicHelp": false,
1931
+ "multiple": false,
1932
+ "type": "option"
1933
+ },
1934
+ "tool": {
1935
+ "description": "Hook tool id whose instruction files to read (claude_code, codex, copilot_agent, copilot_cli, vscode_copilot)",
1936
+ "name": "tool",
1937
+ "hasDynamicHelp": false,
1938
+ "multiple": false,
1939
+ "type": "option"
1940
+ }
1941
+ },
1942
+ "hasDynamicHelp": false,
1943
+ "hidden": true,
1944
+ "hiddenAliases": [],
1945
+ "id": "hooks:emit-instructions",
1946
+ "pluginAlias": "@rulemetric/cli",
1947
+ "pluginName": "@rulemetric/cli",
1948
+ "pluginType": "core",
1949
+ "strict": true,
1950
+ "enableJsonFlag": false,
1951
+ "isESM": true,
1952
+ "relativePath": [
1953
+ "dist",
1954
+ "commands",
1955
+ "hooks",
1956
+ "emit-instructions.js"
1957
+ ]
1958
+ },
1959
+ "hooks:install": {
1960
+ "aliases": [],
1961
+ "args": {},
1962
+ "description": "Install session tracking hooks and context capture proxy for Claude Code",
1963
+ "examples": [
1964
+ "<%= config.bin %> hooks install",
1965
+ "<%= config.bin %> hooks install --global",
1966
+ "<%= config.bin %> hooks install --no-proxy"
1967
+ ],
1968
+ "flags": {
1969
+ "api-url": {
1970
+ "description": "Override API base URL",
1971
+ "env": "RULEMETRIC_API_URL",
1972
+ "hidden": true,
1973
+ "name": "api-url",
1974
+ "hasDynamicHelp": false,
1975
+ "multiple": false,
1976
+ "type": "option"
1977
+ },
1978
+ "no-proxy": {
1979
+ "description": "Skip proxy/gateway configuration (hooks only)",
1980
+ "name": "no-proxy",
1981
+ "allowNo": false,
1982
+ "type": "boolean"
1983
+ },
1984
+ "project-dir": {
1985
+ "description": "Project directory to install hooks in (defaults to cwd)",
1986
+ "name": "project-dir",
1987
+ "hasDynamicHelp": false,
1988
+ "multiple": false,
1989
+ "type": "option"
1990
+ },
1991
+ "user-hooks": {
1992
+ "description": "Write user-level Cursor/Antigravity hooks (~/.cursor, ~/.gemini). Required for Cursor capture — its traffic bypasses the proxy.",
1993
+ "name": "user-hooks",
1994
+ "allowNo": true,
1995
+ "type": "boolean"
1996
+ },
1997
+ "global": {
1998
+ "char": "g",
1999
+ "description": "Install hooks globally (~/.claude/settings.json) so all projects are tracked",
2000
+ "name": "global",
2001
+ "allowNo": false,
2002
+ "type": "boolean"
2003
+ },
2004
+ "statusline-usage": {
2005
+ "description": "Install the statusline shim so Claude Code pushes live rate_limits on every refresh (makes /usage rings update in real time without needing the proxy)",
2006
+ "name": "statusline-usage",
2007
+ "allowNo": false,
2008
+ "type": "boolean"
2009
+ }
2010
+ },
2011
+ "hasDynamicHelp": false,
2012
+ "hiddenAliases": [],
2013
+ "id": "hooks:install",
2014
+ "pluginAlias": "@rulemetric/cli",
2015
+ "pluginName": "@rulemetric/cli",
2016
+ "pluginType": "core",
2017
+ "strict": true,
2018
+ "enableJsonFlag": false,
2019
+ "isESM": true,
2020
+ "relativePath": [
2021
+ "dist",
2022
+ "commands",
2023
+ "hooks",
2024
+ "install.js"
2025
+ ]
2026
+ },
2027
+ "hooks:run": {
2028
+ "aliases": [],
2029
+ "args": {
2030
+ "hook": {
2031
+ "description": "Hook name to run",
2032
+ "name": "hook",
2033
+ "options": [
2034
+ "session-start",
2035
+ "session-end",
2036
+ "user-prompt",
2037
+ "post-tool-use",
2038
+ "assistant-response"
2039
+ ],
2040
+ "required": true
2041
+ }
2042
+ },
2043
+ "description": "Execute a hook script (called by AI tool hooks, not for direct use)",
2044
+ "flags": {
2045
+ "api-url": {
2046
+ "description": "Override API base URL",
2047
+ "env": "RULEMETRIC_API_URL",
2048
+ "hidden": true,
2049
+ "name": "api-url",
2050
+ "hasDynamicHelp": false,
2051
+ "multiple": false,
2052
+ "type": "option"
2053
+ }
2054
+ },
2055
+ "hasDynamicHelp": false,
2056
+ "hidden": true,
2057
+ "hiddenAliases": [],
2058
+ "id": "hooks:run",
2059
+ "pluginAlias": "@rulemetric/cli",
2060
+ "pluginName": "@rulemetric/cli",
2061
+ "pluginType": "core",
2062
+ "strict": true,
2063
+ "enableJsonFlag": false,
2064
+ "isESM": true,
1959
2065
  "relativePath": [
1960
2066
  "dist",
1961
2067
  "commands",
@@ -2668,10 +2774,13 @@
2668
2774
  "versions.js"
2669
2775
  ]
2670
2776
  },
2671
- "local:down": {
2777
+ "org:current": {
2672
2778
  "aliases": [],
2673
2779
  "args": {},
2674
- "description": "Stop the local RuleMetric server and database stack. Data is preserved (restart with `rulemetric local up`); use --delete-data to also wipe the local database.",
2780
+ "description": "Show the current active organization",
2781
+ "examples": [
2782
+ "<%= config.bin %> org current"
2783
+ ],
2675
2784
  "flags": {
2676
2785
  "api-url": {
2677
2786
  "description": "Override API base URL",
@@ -2681,17 +2790,11 @@
2681
2790
  "hasDynamicHelp": false,
2682
2791
  "multiple": false,
2683
2792
  "type": "option"
2684
- },
2685
- "delete-data": {
2686
- "description": "Also delete the local database volumes (irreversible)",
2687
- "name": "delete-data",
2688
- "allowNo": false,
2689
- "type": "boolean"
2690
2793
  }
2691
2794
  },
2692
2795
  "hasDynamicHelp": false,
2693
2796
  "hiddenAliases": [],
2694
- "id": "local:down",
2797
+ "id": "org:current",
2695
2798
  "pluginAlias": "@rulemetric/cli",
2696
2799
  "pluginName": "@rulemetric/cli",
2697
2800
  "pluginType": "core",
@@ -2701,123 +2804,16 @@
2701
2804
  "relativePath": [
2702
2805
  "dist",
2703
2806
  "commands",
2704
- "local",
2705
- "down.js"
2807
+ "org",
2808
+ "current.js"
2706
2809
  ]
2707
2810
  },
2708
- "local:up": {
2811
+ "org:list": {
2709
2812
  "aliases": [],
2710
2813
  "args": {},
2711
- "description": "Run RuleMetric fully locally: start a local Supabase stack (Docker), apply migrations, and serve the API + dashboard from the @rulemetric/local runtime — all data on this machine, zero cloud contact. Downloads the runtime package on first run.",
2814
+ "description": "List organizations the current user is a member of",
2712
2815
  "examples": [
2713
- "<%= config.bin %> local up --email you@example.com --password <pw>",
2714
- "<%= config.bin %> local up --port 3000",
2715
- "<%= config.bin %> local up --foreground"
2716
- ],
2717
- "flags": {
2718
- "api-url": {
2719
- "description": "Override API base URL",
2720
- "env": "RULEMETRIC_API_URL",
2721
- "hidden": true,
2722
- "name": "api-url",
2723
- "hasDynamicHelp": false,
2724
- "multiple": false,
2725
- "type": "option"
2726
- },
2727
- "port": {
2728
- "char": "p",
2729
- "description": "Local API + dashboard port",
2730
- "name": "port",
2731
- "default": 3000,
2732
- "hasDynamicHelp": false,
2733
- "multiple": false,
2734
- "type": "option"
2735
- },
2736
- "email": {
2737
- "char": "e",
2738
- "description": "Create the first user with this email (with --password)",
2739
- "name": "email",
2740
- "hasDynamicHelp": false,
2741
- "multiple": false,
2742
- "type": "option"
2743
- },
2744
- "password": {
2745
- "description": "Password for the first user (min 8 chars)",
2746
- "name": "password",
2747
- "hasDynamicHelp": false,
2748
- "multiple": false,
2749
- "type": "option"
2750
- },
2751
- "foreground": {
2752
- "description": "Run the server in this terminal instead of installing a launchd service (works on any OS; skips user provisioning)",
2753
- "name": "foreground",
2754
- "allowNo": false,
2755
- "type": "boolean"
2756
- },
2757
- "yes": {
2758
- "char": "y",
2759
- "description": "Skip the runtime-download confirmation",
2760
- "name": "yes",
2761
- "allowNo": false,
2762
- "type": "boolean"
2763
- }
2764
- },
2765
- "hasDynamicHelp": false,
2766
- "hiddenAliases": [],
2767
- "id": "local:up",
2768
- "pluginAlias": "@rulemetric/cli",
2769
- "pluginName": "@rulemetric/cli",
2770
- "pluginType": "core",
2771
- "strict": true,
2772
- "enableJsonFlag": false,
2773
- "isESM": true,
2774
- "relativePath": [
2775
- "dist",
2776
- "commands",
2777
- "local",
2778
- "up.js"
2779
- ]
2780
- },
2781
- "org:current": {
2782
- "aliases": [],
2783
- "args": {},
2784
- "description": "Show the current active organization",
2785
- "examples": [
2786
- "<%= config.bin %> org current"
2787
- ],
2788
- "flags": {
2789
- "api-url": {
2790
- "description": "Override API base URL",
2791
- "env": "RULEMETRIC_API_URL",
2792
- "hidden": true,
2793
- "name": "api-url",
2794
- "hasDynamicHelp": false,
2795
- "multiple": false,
2796
- "type": "option"
2797
- }
2798
- },
2799
- "hasDynamicHelp": false,
2800
- "hiddenAliases": [],
2801
- "id": "org:current",
2802
- "pluginAlias": "@rulemetric/cli",
2803
- "pluginName": "@rulemetric/cli",
2804
- "pluginType": "core",
2805
- "strict": true,
2806
- "enableJsonFlag": false,
2807
- "isESM": true,
2808
- "relativePath": [
2809
- "dist",
2810
- "commands",
2811
- "org",
2812
- "current.js"
2813
- ]
2814
- },
2815
- "org:list": {
2816
- "aliases": [],
2817
- "args": {},
2818
- "description": "List organizations the current user is a member of",
2819
- "examples": [
2820
- "<%= config.bin %> org list"
2816
+ "<%= config.bin %> org list"
2821
2817
  ],
2822
2818
  "flags": {
2823
2819
  "api-url": {
@@ -2893,14 +2889,10 @@
2893
2889
  "switch.js"
2894
2890
  ]
2895
2891
  },
2896
- "research:backfill": {
2892
+ "local:down": {
2897
2893
  "aliases": [],
2898
2894
  "args": {},
2899
- "description": "Scan every ~/.claude/projects transcript for past rate-limit (429) events and POST them as observations. Opt-in seed for the usage-research dataset forward-only tail is the default capture path.",
2900
- "examples": [
2901
- "<%= config.bin %> research backfill",
2902
- "<%= config.bin %> research backfill --claude-dir /custom/.claude --dry-run"
2903
- ],
2895
+ "description": "Stop the local RuleMetric server and database stack. Data is preserved (restart with `rulemetric local up`); use --delete-data to also wipe the local database.",
2904
2896
  "flags": {
2905
2897
  "api-url": {
2906
2898
  "description": "Override API base URL",
@@ -2911,24 +2903,16 @@
2911
2903
  "multiple": false,
2912
2904
  "type": "option"
2913
2905
  },
2914
- "claude-dir": {
2915
- "description": "Override the Claude Code projects directory (defaults to ~/.claude)",
2916
- "name": "claude-dir",
2917
- "noCacheDefault": true,
2918
- "hasDynamicHelp": false,
2919
- "multiple": false,
2920
- "type": "option"
2921
- },
2922
- "dry-run": {
2923
- "description": "Print observation count without POSTing",
2924
- "name": "dry-run",
2906
+ "delete-data": {
2907
+ "description": "Also delete the local database volumes (irreversible)",
2908
+ "name": "delete-data",
2925
2909
  "allowNo": false,
2926
2910
  "type": "boolean"
2927
2911
  }
2928
2912
  },
2929
2913
  "hasDynamicHelp": false,
2930
2914
  "hiddenAliases": [],
2931
- "id": "research:backfill",
2915
+ "id": "local:down",
2932
2916
  "pluginAlias": "@rulemetric/cli",
2933
2917
  "pluginName": "@rulemetric/cli",
2934
2918
  "pluginType": "core",
@@ -2938,17 +2922,18 @@
2938
2922
  "relativePath": [
2939
2923
  "dist",
2940
2924
  "commands",
2941
- "research",
2942
- "backfill.js"
2925
+ "local",
2926
+ "down.js"
2943
2927
  ]
2944
2928
  },
2945
- "research:resume-scoped-outcomes": {
2929
+ "local:up": {
2946
2930
  "aliases": [],
2947
2931
  "args": {},
2948
- "description": "Finish uploading scoped headless outcomes whose receipt was preserved locally after the actor exited but whose capture or verification upload failed. Never re-runs the actor or re-measures the repository; ships the stored receipt and exact transcript only.",
2932
+ "description": "Run RuleMetric fully locally: start a local Supabase stack (Docker), apply migrations, and serve the API + dashboard from the @rulemetric/local runtime all data on this machine, zero cloud contact. Downloads the runtime package on first run.",
2949
2933
  "examples": [
2950
- "<%= config.bin %> research resume-scoped-outcomes",
2951
- "<%= config.bin %> research resume-scoped-outcomes --list"
2934
+ "<%= config.bin %> local up --email you@example.com --password <pw>",
2935
+ "<%= config.bin %> local up --port 3000",
2936
+ "<%= config.bin %> local up --foreground"
2952
2937
  ],
2953
2938
  "flags": {
2954
2939
  "api-url": {
@@ -2960,61 +2945,47 @@
2960
2945
  "multiple": false,
2961
2946
  "type": "option"
2962
2947
  },
2963
- "list": {
2964
- "description": "Show the outcome store without uploading anything",
2965
- "name": "list",
2966
- "allowNo": false,
2967
- "type": "boolean"
2968
- }
2969
- },
2970
- "hasDynamicHelp": false,
2971
- "hidden": true,
2972
- "hiddenAliases": [],
2973
- "id": "research:resume-scoped-outcomes",
2974
- "pluginAlias": "@rulemetric/cli",
2975
- "pluginName": "@rulemetric/cli",
2976
- "pluginType": "core",
2977
- "strict": true,
2978
- "enableJsonFlag": false,
2979
- "isESM": true,
2980
- "relativePath": [
2981
- "dist",
2982
- "commands",
2983
- "research",
2984
- "resume-scoped-outcomes.js"
2985
- ]
2986
- },
2987
- "research:tail-transcript": {
2988
- "aliases": [],
2989
- "args": {
2990
- "transcript": {
2991
- "description": "Absolute path to a Claude Code .jsonl transcript",
2992
- "name": "transcript",
2993
- "required": true
2994
- }
2995
- },
2996
- "description": "Read new lines from a Claude Code transcript since the last cached offset, POST any 429 events, and persist the new offset. Invoked by the session-end hook — safe to re-run.",
2997
- "flags": {
2998
- "api-url": {
2999
- "description": "Override API base URL",
3000
- "env": "RULEMETRIC_API_URL",
3001
- "hidden": true,
3002
- "name": "api-url",
2948
+ "port": {
2949
+ "char": "p",
2950
+ "description": "Local API + dashboard port",
2951
+ "name": "port",
2952
+ "default": 3000,
3003
2953
  "hasDynamicHelp": false,
3004
2954
  "multiple": false,
3005
2955
  "type": "option"
3006
2956
  },
3007
- "no-post": {
3008
- "description": "Parse and advance the offset without POSTing (debug)",
3009
- "name": "no-post",
2957
+ "email": {
2958
+ "char": "e",
2959
+ "description": "Create the first user with this email (with --password)",
2960
+ "name": "email",
2961
+ "hasDynamicHelp": false,
2962
+ "multiple": false,
2963
+ "type": "option"
2964
+ },
2965
+ "password": {
2966
+ "description": "Password for the first user (min 8 chars)",
2967
+ "name": "password",
2968
+ "hasDynamicHelp": false,
2969
+ "multiple": false,
2970
+ "type": "option"
2971
+ },
2972
+ "foreground": {
2973
+ "description": "Run the server in this terminal instead of installing a launchd service (works on any OS; skips user provisioning)",
2974
+ "name": "foreground",
2975
+ "allowNo": false,
2976
+ "type": "boolean"
2977
+ },
2978
+ "yes": {
2979
+ "char": "y",
2980
+ "description": "Skip the runtime-download confirmation",
2981
+ "name": "yes",
3010
2982
  "allowNo": false,
3011
2983
  "type": "boolean"
3012
2984
  }
3013
2985
  },
3014
2986
  "hasDynamicHelp": false,
3015
- "hidden": true,
3016
2987
  "hiddenAliases": [],
3017
- "id": "research:tail-transcript",
2988
+ "id": "local:up",
3018
2989
  "pluginAlias": "@rulemetric/cli",
3019
2990
  "pluginName": "@rulemetric/cli",
3020
2991
  "pluginType": "core",
@@ -3024,8 +2995,8 @@
3024
2995
  "relativePath": [
3025
2996
  "dist",
3026
2997
  "commands",
3027
- "research",
3028
- "tail-transcript.js"
2998
+ "local",
2999
+ "up.js"
3029
3000
  ]
3030
3001
  },
3031
3002
  "packs:add-instruction": {
@@ -3376,15 +3347,13 @@
3376
3347
  "remove-instruction.js"
3377
3348
  ]
3378
3349
  },
3379
- "proxy:env": {
3350
+ "research:backfill": {
3380
3351
  "aliases": [],
3381
3352
  "args": {},
3382
- "description": "Print shell env vars to route any client through the RuleMetric proxy",
3353
+ "description": "Scan every ~/.claude/projects transcript for past rate-limit (429) events and POST them as observations. Opt-in seed for the usage-research dataset — forward-only tail is the default capture path.",
3383
3354
  "examples": [
3384
- "<%= config.bin %> proxy env",
3385
- "<%= config.bin %> proxy env --shell fish",
3386
- "eval \"$(rulemetric proxy env)\"",
3387
- "rulemetric proxy env --python"
3355
+ "<%= config.bin %> research backfill",
3356
+ "<%= config.bin %> research backfill --claude-dir /custom/.claude --dry-run"
3388
3357
  ],
3389
3358
  "flags": {
3390
3359
  "api-url": {
@@ -3396,48 +3365,24 @@
3396
3365
  "multiple": false,
3397
3366
  "type": "option"
3398
3367
  },
3399
- "shell": {
3400
- "char": "s",
3401
- "description": "Shell format (posix, fish, powershell)",
3402
- "name": "shell",
3403
- "default": "posix",
3368
+ "claude-dir": {
3369
+ "description": "Override the Claude Code projects directory (defaults to ~/.claude)",
3370
+ "name": "claude-dir",
3371
+ "noCacheDefault": true,
3404
3372
  "hasDynamicHelp": false,
3405
3373
  "multiple": false,
3406
- "options": [
3407
- "posix",
3408
- "fish",
3409
- "powershell"
3410
- ],
3411
3374
  "type": "option"
3412
3375
  },
3413
- "python": {
3414
- "description": "Include Python-specific env vars (REQUESTS_CA_BUNDLE, SSL_CERT_FILE)",
3415
- "name": "python",
3416
- "allowNo": false,
3417
- "type": "boolean"
3418
- },
3419
- "node": {
3420
- "description": "Include Node.js-specific env vars (NODE_EXTRA_CA_CERTS)",
3421
- "name": "node",
3422
- "allowNo": false,
3423
- "type": "boolean"
3424
- },
3425
- "all": {
3426
- "description": "Include env vars for all runtimes",
3427
- "name": "all",
3428
- "allowNo": false,
3429
- "type": "boolean"
3430
- },
3431
- "vscode": {
3432
- "description": "Output VS Code settings.json snippet for Copilot proxy",
3433
- "name": "vscode",
3376
+ "dry-run": {
3377
+ "description": "Print observation count without POSTing",
3378
+ "name": "dry-run",
3434
3379
  "allowNo": false,
3435
3380
  "type": "boolean"
3436
3381
  }
3437
3382
  },
3438
3383
  "hasDynamicHelp": false,
3439
3384
  "hiddenAliases": [],
3440
- "id": "proxy:env",
3385
+ "id": "research:backfill",
3441
3386
  "pluginAlias": "@rulemetric/cli",
3442
3387
  "pluginName": "@rulemetric/cli",
3443
3388
  "pluginType": "core",
@@ -3447,18 +3392,17 @@
3447
3392
  "relativePath": [
3448
3393
  "dist",
3449
3394
  "commands",
3450
- "proxy",
3451
- "env.js"
3395
+ "research",
3396
+ "backfill.js"
3452
3397
  ]
3453
3398
  },
3454
- "proxy:logs": {
3399
+ "research:resume-scoped-outcomes": {
3455
3400
  "aliases": [],
3456
3401
  "args": {},
3457
- "description": "View context capture proxy logs",
3402
+ "description": "Finish uploading scoped headless outcomes whose receipt was preserved locally after the actor exited but whose capture or verification upload failed. Never re-runs the actor or re-measures the repository; ships the stored receipt and exact transcript only.",
3458
3403
  "examples": [
3459
- "<%= config.bin %> proxy logs",
3460
- "<%= config.bin %> proxy logs --follow",
3461
- "<%= config.bin %> proxy logs --lines 50"
3404
+ "<%= config.bin %> research resume-scoped-outcomes",
3405
+ "<%= config.bin %> research resume-scoped-outcomes --list"
3462
3406
  ],
3463
3407
  "flags": {
3464
3408
  "api-url": {
@@ -3470,26 +3414,17 @@
3470
3414
  "multiple": false,
3471
3415
  "type": "option"
3472
3416
  },
3473
- "follow": {
3474
- "char": "f",
3475
- "description": "Follow log output (like tail -f)",
3476
- "name": "follow",
3417
+ "list": {
3418
+ "description": "Show the outcome store without uploading anything",
3419
+ "name": "list",
3477
3420
  "allowNo": false,
3478
3421
  "type": "boolean"
3479
- },
3480
- "lines": {
3481
- "char": "n",
3482
- "description": "Number of lines to show",
3483
- "name": "lines",
3484
- "default": 30,
3485
- "hasDynamicHelp": false,
3486
- "multiple": false,
3487
- "type": "option"
3488
3422
  }
3489
3423
  },
3490
3424
  "hasDynamicHelp": false,
3425
+ "hidden": true,
3491
3426
  "hiddenAliases": [],
3492
- "id": "proxy:logs",
3427
+ "id": "research:resume-scoped-outcomes",
3493
3428
  "pluginAlias": "@rulemetric/cli",
3494
3429
  "pluginName": "@rulemetric/cli",
3495
3430
  "pluginType": "core",
@@ -3499,17 +3434,20 @@
3499
3434
  "relativePath": [
3500
3435
  "dist",
3501
3436
  "commands",
3502
- "proxy",
3503
- "logs.js"
3437
+ "research",
3438
+ "resume-scoped-outcomes.js"
3504
3439
  ]
3505
3440
  },
3506
- "proxy:restart": {
3441
+ "research:tail-transcript": {
3507
3442
  "aliases": [],
3508
- "args": {},
3509
- "description": "Restart the context capture proxy (stop + start)",
3510
- "examples": [
3511
- "<%= config.bin %> proxy restart"
3512
- ],
3443
+ "args": {
3444
+ "transcript": {
3445
+ "description": "Absolute path to a Claude Code .jsonl transcript",
3446
+ "name": "transcript",
3447
+ "required": true
3448
+ }
3449
+ },
3450
+ "description": "Read new lines from a Claude Code transcript since the last cached offset, POST any 429 events, and persist the new offset. Invoked by the session-end hook — safe to re-run.",
3513
3451
  "flags": {
3514
3452
  "api-url": {
3515
3453
  "description": "Override API base URL",
@@ -3520,25 +3458,17 @@
3520
3458
  "multiple": false,
3521
3459
  "type": "option"
3522
3460
  },
3523
- "port": {
3524
- "char": "p",
3525
- "description": "Proxy listen port",
3526
- "name": "port",
3527
- "hasDynamicHelp": false,
3528
- "multiple": false,
3529
- "type": "option"
3530
- },
3531
- "docker": {
3532
- "char": "d",
3533
- "description": "Run in Docker mode",
3534
- "name": "docker",
3461
+ "no-post": {
3462
+ "description": "Parse and advance the offset without POSTing (debug)",
3463
+ "name": "no-post",
3535
3464
  "allowNo": false,
3536
3465
  "type": "boolean"
3537
3466
  }
3538
3467
  },
3539
3468
  "hasDynamicHelp": false,
3469
+ "hidden": true,
3540
3470
  "hiddenAliases": [],
3541
- "id": "proxy:restart",
3471
+ "id": "research:tail-transcript",
3542
3472
  "pluginAlias": "@rulemetric/cli",
3543
3473
  "pluginName": "@rulemetric/cli",
3544
3474
  "pluginType": "core",
@@ -3548,18 +3478,20 @@
3548
3478
  "relativePath": [
3549
3479
  "dist",
3550
3480
  "commands",
3551
- "proxy",
3552
- "restart.js"
3481
+ "research",
3482
+ "tail-transcript.js"
3553
3483
  ]
3554
3484
  },
3555
- "proxy:setup": {
3485
+ "service:install": {
3556
3486
  "aliases": [],
3557
3487
  "args": {},
3558
- "description": "Set up context capture proxy (installs mitmproxy, configures shell)",
3488
+ "description": "Install RuleMetric services. Default (in a repo checkout): API + worker + gateway + capture proxy as launchd agents. With --worker-only: just the job worker, targeting the globally-installed CLI — no repo, no build (works from `npm i -g @rulemetric/cli`, macOS launchd or Linux systemd).",
3559
3489
  "examples": [
3560
- "<%= config.bin %> proxy setup",
3561
- "<%= config.bin %> proxy setup --shell zsh",
3562
- "<%= config.bin %> proxy setup --check"
3490
+ "<%= config.bin %> service install",
3491
+ "<%= config.bin %> service install --port 3000",
3492
+ "<%= config.bin %> service install --skip-build",
3493
+ "<%= config.bin %> service install --no-proxy",
3494
+ "<%= config.bin %> service install --worker-only"
3563
3495
  ],
3564
3496
  "flags": {
3565
3497
  "api-url": {
@@ -3571,38 +3503,53 @@
3571
3503
  "multiple": false,
3572
3504
  "type": "option"
3573
3505
  },
3574
- "shell": {
3575
- "description": "Shell to configure (auto-detected if omitted)",
3576
- "name": "shell",
3577
- "hasDynamicHelp": false,
3578
- "multiple": false,
3579
- "options": [
3580
- "zsh",
3581
- "bash",
3582
- "fish",
3583
- "powershell"
3584
- ],
3585
- "type": "option"
3586
- },
3587
3506
  "port": {
3588
3507
  "char": "p",
3589
- "description": "Proxy listen port",
3508
+ "description": "API server port",
3590
3509
  "name": "port",
3591
- "default": 8787,
3510
+ "default": 3000,
3592
3511
  "hasDynamicHelp": false,
3593
3512
  "multiple": false,
3594
3513
  "type": "option"
3595
3514
  },
3596
- "check": {
3597
- "description": "Only check prerequisites, do not install anything",
3598
- "name": "check",
3515
+ "force": {
3516
+ "char": "f",
3517
+ "description": "Overwrite existing service configuration and reclaim conflicting ports",
3518
+ "name": "force",
3519
+ "allowNo": false,
3520
+ "type": "boolean"
3521
+ },
3522
+ "skip-build": {
3523
+ "description": "Skip the pre-install workspace build (API/web/cli dist must already exist)",
3524
+ "name": "skip-build",
3525
+ "allowNo": false,
3526
+ "type": "boolean"
3527
+ },
3528
+ "no-proxy": {
3529
+ "description": "Skip gateway + mitmproxy plists (just install API + worker)",
3530
+ "name": "no-proxy",
3531
+ "allowNo": false,
3532
+ "type": "boolean"
3533
+ },
3534
+ "auto-update": {
3535
+ "dependsOn": [
3536
+ "worker-only"
3537
+ ],
3538
+ "description": "Opt this machine into automatic stable CLI updates after active worker jobs finish (requires --worker-only)",
3539
+ "name": "auto-update",
3540
+ "allowNo": false,
3541
+ "type": "boolean"
3542
+ },
3543
+ "worker-only": {
3544
+ "description": "Install ONLY the job worker as a persistent service, targeting the globally-installed CLI (no repo checkout, no build, no API/gateway/proxy). Sources auth from ~/.config/rulemetric/env. macOS (launchd) + Linux (systemd --user).",
3545
+ "name": "worker-only",
3599
3546
  "allowNo": false,
3600
3547
  "type": "boolean"
3601
3548
  }
3602
3549
  },
3603
3550
  "hasDynamicHelp": false,
3604
3551
  "hiddenAliases": [],
3605
- "id": "proxy:setup",
3552
+ "id": "service:install",
3606
3553
  "pluginAlias": "@rulemetric/cli",
3607
3554
  "pluginName": "@rulemetric/cli",
3608
3555
  "pluginType": "core",
@@ -3612,20 +3559,14 @@
3612
3559
  "relativePath": [
3613
3560
  "dist",
3614
3561
  "commands",
3615
- "proxy",
3616
- "setup.js"
3562
+ "service",
3563
+ "install.js"
3617
3564
  ]
3618
3565
  },
3619
- "proxy:start": {
3566
+ "service:status": {
3620
3567
  "aliases": [],
3621
3568
  "args": {},
3622
- "description": "Start context capture proxy",
3623
- "examples": [
3624
- "<%= config.bin %> proxy start",
3625
- "<%= config.bin %> proxy start --docker",
3626
- "<%= config.bin %> proxy start --port 9090",
3627
- "<%= config.bin %> proxy start --web"
3628
- ],
3569
+ "description": "Check the status of installed RuleMetric services (launchd on macOS; systemd --user worker on Linux)",
3629
3570
  "flags": {
3630
3571
  "api-url": {
3631
3572
  "description": "Override API base URL",
@@ -3635,45 +3576,11 @@
3635
3576
  "hasDynamicHelp": false,
3636
3577
  "multiple": false,
3637
3578
  "type": "option"
3638
- },
3639
- "port": {
3640
- "char": "p",
3641
- "description": "Proxy listen port",
3642
- "name": "port",
3643
- "default": 8788,
3644
- "hasDynamicHelp": false,
3645
- "multiple": false,
3646
- "type": "option"
3647
- },
3648
- "docker": {
3649
- "char": "d",
3650
- "description": "Run proxy in Docker (no local mitmproxy needed)",
3651
- "name": "docker",
3652
- "allowNo": false,
3653
- "type": "boolean"
3654
- },
3655
- "web": {
3656
- "description": "Launch mitmweb debug UI instead of mitmdump (local mode only)",
3657
- "name": "web",
3658
- "allowNo": false,
3659
- "type": "boolean"
3660
- },
3661
- "skip-checks": {
3662
- "description": "Skip prerequisite checks",
3663
- "name": "skip-checks",
3664
- "allowNo": false,
3665
- "type": "boolean"
3666
- },
3667
- "build": {
3668
- "description": "Force rebuild Docker image",
3669
- "name": "build",
3670
- "allowNo": false,
3671
- "type": "boolean"
3672
3579
  }
3673
3580
  },
3674
3581
  "hasDynamicHelp": false,
3675
3582
  "hiddenAliases": [],
3676
- "id": "proxy:start",
3583
+ "id": "service:status",
3677
3584
  "pluginAlias": "@rulemetric/cli",
3678
3585
  "pluginName": "@rulemetric/cli",
3679
3586
  "pluginType": "core",
@@ -3683,17 +3590,14 @@
3683
3590
  "relativePath": [
3684
3591
  "dist",
3685
3592
  "commands",
3686
- "proxy",
3687
- "start.js"
3593
+ "service",
3594
+ "status.js"
3688
3595
  ]
3689
3596
  },
3690
- "proxy:status": {
3597
+ "service:uninstall": {
3691
3598
  "aliases": [],
3692
3599
  "args": {},
3693
- "description": "Check gateway and context capture proxy status",
3694
- "examples": [
3695
- "<%= config.bin %> proxy status"
3696
- ],
3600
+ "description": "Remove RuleMetric services (macOS launchd: API/worker/gateway/proxy; Linux: the --worker-only systemd unit)",
3697
3601
  "flags": {
3698
3602
  "api-url": {
3699
3603
  "description": "Override API base URL",
@@ -3707,7 +3611,7 @@
3707
3611
  },
3708
3612
  "hasDynamicHelp": false,
3709
3613
  "hiddenAliases": [],
3710
- "id": "proxy:status",
3614
+ "id": "service:uninstall",
3711
3615
  "pluginAlias": "@rulemetric/cli",
3712
3616
  "pluginName": "@rulemetric/cli",
3713
3617
  "pluginType": "core",
@@ -3717,16 +3621,18 @@
3717
3621
  "relativePath": [
3718
3622
  "dist",
3719
3623
  "commands",
3720
- "proxy",
3721
- "status.js"
3624
+ "service",
3625
+ "uninstall.js"
3722
3626
  ]
3723
3627
  },
3724
- "proxy:stop": {
3628
+ "service:updates": {
3725
3629
  "aliases": [],
3726
3630
  "args": {},
3727
- "description": "Stop the context capture proxy",
3631
+ "description": "Show or change automatic worker updates on this machine (off by default)",
3728
3632
  "examples": [
3729
- "<%= config.bin %> proxy stop"
3633
+ "<%= config.bin %> service updates",
3634
+ "<%= config.bin %> service updates --enable",
3635
+ "<%= config.bin %> service updates --disable"
3730
3636
  ],
3731
3637
  "flags": {
3732
3638
  "api-url": {
@@ -3737,11 +3643,29 @@
3737
3643
  "hasDynamicHelp": false,
3738
3644
  "multiple": false,
3739
3645
  "type": "option"
3646
+ },
3647
+ "enable": {
3648
+ "description": "Install stable npm releases automatically after active jobs finish",
3649
+ "exclusive": [
3650
+ "disable"
3651
+ ],
3652
+ "name": "enable",
3653
+ "allowNo": false,
3654
+ "type": "boolean"
3655
+ },
3656
+ "disable": {
3657
+ "description": "Stop future automatic updates",
3658
+ "exclusive": [
3659
+ "enable"
3660
+ ],
3661
+ "name": "disable",
3662
+ "allowNo": false,
3663
+ "type": "boolean"
3740
3664
  }
3741
3665
  },
3742
3666
  "hasDynamicHelp": false,
3743
3667
  "hiddenAliases": [],
3744
- "id": "proxy:stop",
3668
+ "id": "service:updates",
3745
3669
  "pluginAlias": "@rulemetric/cli",
3746
3670
  "pluginName": "@rulemetric/cli",
3747
3671
  "pluginType": "core",
@@ -3751,20 +3675,19 @@
3751
3675
  "relativePath": [
3752
3676
  "dist",
3753
3677
  "commands",
3754
- "proxy",
3755
- "stop.js"
3678
+ "service",
3679
+ "updates.js"
3756
3680
  ]
3757
3681
  },
3758
- "service:install": {
3682
+ "proxy:env": {
3759
3683
  "aliases": [],
3760
3684
  "args": {},
3761
- "description": "Install RuleMetric services. Default (in a repo checkout): API + worker + gateway + capture proxy as launchd agents. With --worker-only: just the job worker, targeting the globally-installed CLI — no repo, no build (works from `npm i -g @rulemetric/cli`, macOS launchd or Linux systemd).",
3685
+ "description": "Print shell env vars to route any client through the RuleMetric proxy",
3762
3686
  "examples": [
3763
- "<%= config.bin %> service install",
3764
- "<%= config.bin %> service install --port 3000",
3765
- "<%= config.bin %> service install --skip-build",
3766
- "<%= config.bin %> service install --no-proxy",
3767
- "<%= config.bin %> service install --worker-only"
3687
+ "<%= config.bin %> proxy env",
3688
+ "<%= config.bin %> proxy env --shell fish",
3689
+ "eval \"$(rulemetric proxy env)\"",
3690
+ "rulemetric proxy env --python"
3768
3691
  ],
3769
3692
  "flags": {
3770
3693
  "api-url": {
@@ -3776,53 +3699,48 @@
3776
3699
  "multiple": false,
3777
3700
  "type": "option"
3778
3701
  },
3779
- "port": {
3780
- "char": "p",
3781
- "description": "API server port",
3782
- "name": "port",
3783
- "default": 3000,
3702
+ "shell": {
3703
+ "char": "s",
3704
+ "description": "Shell format (posix, fish, powershell)",
3705
+ "name": "shell",
3706
+ "default": "posix",
3784
3707
  "hasDynamicHelp": false,
3785
3708
  "multiple": false,
3786
- "type": "option"
3787
- },
3788
- "force": {
3789
- "char": "f",
3790
- "description": "Overwrite existing service configuration and reclaim conflicting ports",
3791
- "name": "force",
3792
- "allowNo": false,
3793
- "type": "boolean"
3709
+ "options": [
3710
+ "posix",
3711
+ "fish",
3712
+ "powershell"
3713
+ ],
3714
+ "type": "option"
3794
3715
  },
3795
- "skip-build": {
3796
- "description": "Skip the pre-install workspace build (API/web/cli dist must already exist)",
3797
- "name": "skip-build",
3716
+ "python": {
3717
+ "description": "Include Python-specific env vars (REQUESTS_CA_BUNDLE, SSL_CERT_FILE)",
3718
+ "name": "python",
3798
3719
  "allowNo": false,
3799
3720
  "type": "boolean"
3800
3721
  },
3801
- "no-proxy": {
3802
- "description": "Skip gateway + mitmproxy plists (just install API + worker)",
3803
- "name": "no-proxy",
3722
+ "node": {
3723
+ "description": "Include Node.js-specific env vars (NODE_EXTRA_CA_CERTS)",
3724
+ "name": "node",
3804
3725
  "allowNo": false,
3805
3726
  "type": "boolean"
3806
3727
  },
3807
- "auto-update": {
3808
- "dependsOn": [
3809
- "worker-only"
3810
- ],
3811
- "description": "Opt this machine into automatic stable CLI updates after active worker jobs finish (requires --worker-only)",
3812
- "name": "auto-update",
3728
+ "all": {
3729
+ "description": "Include env vars for all runtimes",
3730
+ "name": "all",
3813
3731
  "allowNo": false,
3814
3732
  "type": "boolean"
3815
3733
  },
3816
- "worker-only": {
3817
- "description": "Install ONLY the job worker as a persistent service, targeting the globally-installed CLI (no repo checkout, no build, no API/gateway/proxy). Sources auth from ~/.config/rulemetric/env. macOS (launchd) + Linux (systemd --user).",
3818
- "name": "worker-only",
3734
+ "vscode": {
3735
+ "description": "Output VS Code settings.json snippet for Copilot proxy",
3736
+ "name": "vscode",
3819
3737
  "allowNo": false,
3820
3738
  "type": "boolean"
3821
3739
  }
3822
3740
  },
3823
3741
  "hasDynamicHelp": false,
3824
3742
  "hiddenAliases": [],
3825
- "id": "service:install",
3743
+ "id": "proxy:env",
3826
3744
  "pluginAlias": "@rulemetric/cli",
3827
3745
  "pluginName": "@rulemetric/cli",
3828
3746
  "pluginType": "core",
@@ -3832,14 +3750,19 @@
3832
3750
  "relativePath": [
3833
3751
  "dist",
3834
3752
  "commands",
3835
- "service",
3836
- "install.js"
3753
+ "proxy",
3754
+ "env.js"
3837
3755
  ]
3838
3756
  },
3839
- "service:status": {
3757
+ "proxy:logs": {
3840
3758
  "aliases": [],
3841
3759
  "args": {},
3842
- "description": "Check the status of installed RuleMetric services (launchd on macOS; systemd --user worker on Linux)",
3760
+ "description": "View context capture proxy logs",
3761
+ "examples": [
3762
+ "<%= config.bin %> proxy logs",
3763
+ "<%= config.bin %> proxy logs --follow",
3764
+ "<%= config.bin %> proxy logs --lines 50"
3765
+ ],
3843
3766
  "flags": {
3844
3767
  "api-url": {
3845
3768
  "description": "Override API base URL",
@@ -3849,11 +3772,27 @@
3849
3772
  "hasDynamicHelp": false,
3850
3773
  "multiple": false,
3851
3774
  "type": "option"
3775
+ },
3776
+ "follow": {
3777
+ "char": "f",
3778
+ "description": "Follow log output (like tail -f)",
3779
+ "name": "follow",
3780
+ "allowNo": false,
3781
+ "type": "boolean"
3782
+ },
3783
+ "lines": {
3784
+ "char": "n",
3785
+ "description": "Number of lines to show",
3786
+ "name": "lines",
3787
+ "default": 30,
3788
+ "hasDynamicHelp": false,
3789
+ "multiple": false,
3790
+ "type": "option"
3852
3791
  }
3853
3792
  },
3854
3793
  "hasDynamicHelp": false,
3855
3794
  "hiddenAliases": [],
3856
- "id": "service:status",
3795
+ "id": "proxy:logs",
3857
3796
  "pluginAlias": "@rulemetric/cli",
3858
3797
  "pluginName": "@rulemetric/cli",
3859
3798
  "pluginType": "core",
@@ -3863,14 +3802,17 @@
3863
3802
  "relativePath": [
3864
3803
  "dist",
3865
3804
  "commands",
3866
- "service",
3867
- "status.js"
3805
+ "proxy",
3806
+ "logs.js"
3868
3807
  ]
3869
3808
  },
3870
- "service:uninstall": {
3809
+ "proxy:restart": {
3871
3810
  "aliases": [],
3872
3811
  "args": {},
3873
- "description": "Remove RuleMetric services (macOS launchd: API/worker/gateway/proxy; Linux: the --worker-only systemd unit)",
3812
+ "description": "Restart the context capture proxy (stop + start)",
3813
+ "examples": [
3814
+ "<%= config.bin %> proxy restart"
3815
+ ],
3874
3816
  "flags": {
3875
3817
  "api-url": {
3876
3818
  "description": "Override API base URL",
@@ -3880,11 +3822,26 @@
3880
3822
  "hasDynamicHelp": false,
3881
3823
  "multiple": false,
3882
3824
  "type": "option"
3825
+ },
3826
+ "port": {
3827
+ "char": "p",
3828
+ "description": "Proxy listen port",
3829
+ "name": "port",
3830
+ "hasDynamicHelp": false,
3831
+ "multiple": false,
3832
+ "type": "option"
3833
+ },
3834
+ "docker": {
3835
+ "char": "d",
3836
+ "description": "Run in Docker mode",
3837
+ "name": "docker",
3838
+ "allowNo": false,
3839
+ "type": "boolean"
3883
3840
  }
3884
3841
  },
3885
3842
  "hasDynamicHelp": false,
3886
3843
  "hiddenAliases": [],
3887
- "id": "service:uninstall",
3844
+ "id": "proxy:restart",
3888
3845
  "pluginAlias": "@rulemetric/cli",
3889
3846
  "pluginName": "@rulemetric/cli",
3890
3847
  "pluginType": "core",
@@ -3894,18 +3851,18 @@
3894
3851
  "relativePath": [
3895
3852
  "dist",
3896
3853
  "commands",
3897
- "service",
3898
- "uninstall.js"
3854
+ "proxy",
3855
+ "restart.js"
3899
3856
  ]
3900
3857
  },
3901
- "service:updates": {
3858
+ "proxy:setup": {
3902
3859
  "aliases": [],
3903
3860
  "args": {},
3904
- "description": "Show or change automatic worker updates on this machine (off by default)",
3861
+ "description": "Set up context capture proxy (installs mitmproxy, configures shell)",
3905
3862
  "examples": [
3906
- "<%= config.bin %> service updates",
3907
- "<%= config.bin %> service updates --enable",
3908
- "<%= config.bin %> service updates --disable"
3863
+ "<%= config.bin %> proxy setup",
3864
+ "<%= config.bin %> proxy setup --shell zsh",
3865
+ "<%= config.bin %> proxy setup --check"
3909
3866
  ],
3910
3867
  "flags": {
3911
3868
  "api-url": {
@@ -3917,28 +3874,38 @@
3917
3874
  "multiple": false,
3918
3875
  "type": "option"
3919
3876
  },
3920
- "enable": {
3921
- "description": "Install stable npm releases automatically after active jobs finish",
3922
- "exclusive": [
3923
- "disable"
3877
+ "shell": {
3878
+ "description": "Shell to configure (auto-detected if omitted)",
3879
+ "name": "shell",
3880
+ "hasDynamicHelp": false,
3881
+ "multiple": false,
3882
+ "options": [
3883
+ "zsh",
3884
+ "bash",
3885
+ "fish",
3886
+ "powershell"
3924
3887
  ],
3925
- "name": "enable",
3926
- "allowNo": false,
3927
- "type": "boolean"
3888
+ "type": "option"
3928
3889
  },
3929
- "disable": {
3930
- "description": "Stop future automatic updates",
3931
- "exclusive": [
3932
- "enable"
3933
- ],
3934
- "name": "disable",
3890
+ "port": {
3891
+ "char": "p",
3892
+ "description": "Proxy listen port",
3893
+ "name": "port",
3894
+ "default": 8787,
3895
+ "hasDynamicHelp": false,
3896
+ "multiple": false,
3897
+ "type": "option"
3898
+ },
3899
+ "check": {
3900
+ "description": "Only check prerequisites, do not install anything",
3901
+ "name": "check",
3935
3902
  "allowNo": false,
3936
3903
  "type": "boolean"
3937
3904
  }
3938
3905
  },
3939
3906
  "hasDynamicHelp": false,
3940
3907
  "hiddenAliases": [],
3941
- "id": "service:updates",
3908
+ "id": "proxy:setup",
3942
3909
  "pluginAlias": "@rulemetric/cli",
3943
3910
  "pluginName": "@rulemetric/cli",
3944
3911
  "pluginType": "core",
@@ -3948,22 +3915,19 @@
3948
3915
  "relativePath": [
3949
3916
  "dist",
3950
3917
  "commands",
3951
- "service",
3952
- "updates.js"
3918
+ "proxy",
3919
+ "setup.js"
3953
3920
  ]
3954
3921
  },
3955
- "sessions:analyze": {
3922
+ "proxy:start": {
3956
3923
  "aliases": [],
3957
- "args": {
3958
- "id": {
3959
- "description": "Session ID",
3960
- "name": "id",
3961
- "required": true
3962
- }
3963
- },
3964
- "description": "Trigger AI analysis on a session",
3924
+ "args": {},
3925
+ "description": "Start context capture proxy",
3965
3926
  "examples": [
3966
- "<%= config.bin %> sessions analyze <session-id>"
3927
+ "<%= config.bin %> proxy start",
3928
+ "<%= config.bin %> proxy start --docker",
3929
+ "<%= config.bin %> proxy start --port 9090",
3930
+ "<%= config.bin %> proxy start --web"
3967
3931
  ],
3968
3932
  "flags": {
3969
3933
  "api-url": {
@@ -3974,11 +3938,45 @@
3974
3938
  "hasDynamicHelp": false,
3975
3939
  "multiple": false,
3976
3940
  "type": "option"
3941
+ },
3942
+ "port": {
3943
+ "char": "p",
3944
+ "description": "Proxy listen port",
3945
+ "name": "port",
3946
+ "default": 8788,
3947
+ "hasDynamicHelp": false,
3948
+ "multiple": false,
3949
+ "type": "option"
3950
+ },
3951
+ "docker": {
3952
+ "char": "d",
3953
+ "description": "Run proxy in Docker (no local mitmproxy needed)",
3954
+ "name": "docker",
3955
+ "allowNo": false,
3956
+ "type": "boolean"
3957
+ },
3958
+ "web": {
3959
+ "description": "Launch mitmweb debug UI instead of mitmdump (local mode only)",
3960
+ "name": "web",
3961
+ "allowNo": false,
3962
+ "type": "boolean"
3963
+ },
3964
+ "skip-checks": {
3965
+ "description": "Skip prerequisite checks",
3966
+ "name": "skip-checks",
3967
+ "allowNo": false,
3968
+ "type": "boolean"
3969
+ },
3970
+ "build": {
3971
+ "description": "Force rebuild Docker image",
3972
+ "name": "build",
3973
+ "allowNo": false,
3974
+ "type": "boolean"
3977
3975
  }
3978
3976
  },
3979
3977
  "hasDynamicHelp": false,
3980
3978
  "hiddenAliases": [],
3981
- "id": "sessions:analyze",
3979
+ "id": "proxy:start",
3982
3980
  "pluginAlias": "@rulemetric/cli",
3983
3981
  "pluginName": "@rulemetric/cli",
3984
3982
  "pluginType": "core",
@@ -3988,24 +3986,16 @@
3988
3986
  "relativePath": [
3989
3987
  "dist",
3990
3988
  "commands",
3991
- "sessions",
3992
- "analyze.js"
3989
+ "proxy",
3990
+ "start.js"
3993
3991
  ]
3994
3992
  },
3995
- "sessions:delete": {
3993
+ "proxy:status": {
3996
3994
  "aliases": [],
3997
- "args": {
3998
- "ids": {
3999
- "description": "Session id(s) to delete",
4000
- "name": "ids",
4001
- "required": false
4002
- }
4003
- },
4004
- "description": "Permanently delete captured sessions and everything stored with them (events, context snapshots, offloaded blobs)",
3995
+ "args": {},
3996
+ "description": "Check gateway and context capture proxy status",
4005
3997
  "examples": [
4006
- "<%= config.bin %> sessions delete 4f9d…",
4007
- "<%= config.bin %> sessions delete 4f9d… 8a21…",
4008
- "<%= config.bin %> sessions delete --project /work/client-a --yes"
3998
+ "<%= config.bin %> proxy status"
4009
3999
  ],
4010
4000
  "flags": {
4011
4001
  "api-url": {
@@ -4016,43 +4006,30 @@
4016
4006
  "hasDynamicHelp": false,
4017
4007
  "multiple": false,
4018
4008
  "type": "option"
4019
- },
4020
- "project": {
4021
- "description": "Delete every session captured under this project path (use with --yes).",
4022
- "name": "project",
4023
- "hasDynamicHelp": false,
4024
- "multiple": false,
4025
- "type": "option"
4026
- },
4027
- "yes": {
4028
- "description": "Skip the confirmation prompt. Required for --project in non-interactive use.",
4029
- "name": "yes",
4030
- "allowNo": false,
4031
- "type": "boolean"
4032
4009
  }
4033
4010
  },
4034
4011
  "hasDynamicHelp": false,
4035
4012
  "hiddenAliases": [],
4036
- "id": "sessions:delete",
4013
+ "id": "proxy:status",
4037
4014
  "pluginAlias": "@rulemetric/cli",
4038
4015
  "pluginName": "@rulemetric/cli",
4039
4016
  "pluginType": "core",
4040
- "strict": false,
4017
+ "strict": true,
4041
4018
  "enableJsonFlag": false,
4042
4019
  "isESM": true,
4043
4020
  "relativePath": [
4044
4021
  "dist",
4045
4022
  "commands",
4046
- "sessions",
4047
- "delete.js"
4023
+ "proxy",
4024
+ "status.js"
4048
4025
  ]
4049
4026
  },
4050
- "sessions:end": {
4027
+ "proxy:stop": {
4051
4028
  "aliases": [],
4052
4029
  "args": {},
4053
- "description": "End the active capture session",
4030
+ "description": "Stop the context capture proxy",
4054
4031
  "examples": [
4055
- "<%= config.bin %> sessions end"
4032
+ "<%= config.bin %> proxy stop"
4056
4033
  ],
4057
4034
  "flags": {
4058
4035
  "api-url": {
@@ -4067,7 +4044,7 @@
4067
4044
  },
4068
4045
  "hasDynamicHelp": false,
4069
4046
  "hiddenAliases": [],
4070
- "id": "sessions:end",
4047
+ "id": "proxy:stop",
4071
4048
  "pluginAlias": "@rulemetric/cli",
4072
4049
  "pluginName": "@rulemetric/cli",
4073
4050
  "pluginType": "core",
@@ -4077,160 +4054,8 @@
4077
4054
  "relativePath": [
4078
4055
  "dist",
4079
4056
  "commands",
4080
- "sessions",
4081
- "end.js"
4082
- ]
4083
- },
4084
- "sessions:import": {
4085
- "aliases": [],
4086
- "args": {
4087
- "path": {
4088
- "description": "Path to session file",
4089
- "name": "path",
4090
- "required": true
4091
- }
4092
- },
4093
- "description": "Import a session file (JSONL, JSON)",
4094
- "examples": [
4095
- "<%= config.bin %> sessions import ~/.claude/projects/my-project/session-abc.jsonl",
4096
- "<%= config.bin %> sessions import ./copilot-export.json --tool vscode_copilot"
4097
- ],
4098
- "flags": {
4099
- "api-url": {
4100
- "description": "Override API base URL",
4101
- "env": "RULEMETRIC_API_URL",
4102
- "hidden": true,
4103
- "name": "api-url",
4104
- "hasDynamicHelp": false,
4105
- "multiple": false,
4106
- "type": "option"
4107
- },
4108
- "tool": {
4109
- "description": "Override tool detection (claude_code, cursor, vscode_copilot)",
4110
- "name": "tool",
4111
- "hasDynamicHelp": false,
4112
- "multiple": false,
4113
- "type": "option"
4114
- }
4115
- },
4116
- "hasDynamicHelp": false,
4117
- "hiddenAliases": [],
4118
- "id": "sessions:import",
4119
- "pluginAlias": "@rulemetric/cli",
4120
- "pluginName": "@rulemetric/cli",
4121
- "pluginType": "core",
4122
- "strict": true,
4123
- "enableJsonFlag": false,
4124
- "isESM": true,
4125
- "relativePath": [
4126
- "dist",
4127
- "commands",
4128
- "sessions",
4129
- "import.js"
4130
- ]
4131
- },
4132
- "sessions:list": {
4133
- "aliases": [],
4134
- "args": {},
4135
- "description": "List captured sessions",
4136
- "examples": [
4137
- "<%= config.bin %> sessions list",
4138
- "<%= config.bin %> sessions list --tool claude_code",
4139
- "<%= config.bin %> sessions list --tool codex"
4140
- ],
4141
- "flags": {
4142
- "api-url": {
4143
- "description": "Override API base URL",
4144
- "env": "RULEMETRIC_API_URL",
4145
- "hidden": true,
4146
- "name": "api-url",
4147
- "hasDynamicHelp": false,
4148
- "multiple": false,
4149
- "type": "option"
4150
- },
4151
- "tool": {
4152
- "description": "Filter by tool (claude_code, cursor, vscode_copilot, copilot_agent, rulemetric_mcp, codex, pi, opencode, antigravity)",
4153
- "name": "tool",
4154
- "hasDynamicHelp": false,
4155
- "multiple": false,
4156
- "type": "option"
4157
- },
4158
- "limit": {
4159
- "description": "Max results",
4160
- "name": "limit",
4161
- "default": 20,
4162
- "hasDynamicHelp": false,
4163
- "multiple": false,
4164
- "type": "option"
4165
- }
4166
- },
4167
- "hasDynamicHelp": false,
4168
- "hiddenAliases": [],
4169
- "id": "sessions:list",
4170
- "pluginAlias": "@rulemetric/cli",
4171
- "pluginName": "@rulemetric/cli",
4172
- "pluginType": "core",
4173
- "strict": true,
4174
- "enableJsonFlag": false,
4175
- "isESM": true,
4176
- "relativePath": [
4177
- "dist",
4178
- "commands",
4179
- "sessions",
4180
- "list.js"
4181
- ]
4182
- },
4183
- "sessions:start": {
4184
- "aliases": [],
4185
- "args": {},
4186
- "description": "Start a capture session for any LLM provider (Cortex, Groq, etc.)",
4187
- "examples": [
4188
- "<%= config.bin %> sessions start --tool cortex",
4189
- "<%= config.bin %> sessions start --tool groq --project-dir /path/to/project",
4190
- "eval \"$(rulemetric proxy env --python)\" && rulemetric sessions start --tool cortex"
4191
- ],
4192
- "flags": {
4193
- "api-url": {
4194
- "description": "Override API base URL",
4195
- "env": "RULEMETRIC_API_URL",
4196
- "hidden": true,
4197
- "name": "api-url",
4198
- "hasDynamicHelp": false,
4199
- "multiple": false,
4200
- "type": "option"
4201
- },
4202
- "tool": {
4203
- "char": "t",
4204
- "description": "LLM provider or tool name (e.g., cortex, groq, deepseek, custom_app)",
4205
- "name": "tool",
4206
- "required": true,
4207
- "hasDynamicHelp": false,
4208
- "multiple": false,
4209
- "type": "option"
4210
- },
4211
- "project-dir": {
4212
- "char": "d",
4213
- "description": "Project directory (defaults to cwd)",
4214
- "name": "project-dir",
4215
- "hasDynamicHelp": false,
4216
- "multiple": false,
4217
- "type": "option"
4218
- }
4219
- },
4220
- "hasDynamicHelp": false,
4221
- "hiddenAliases": [],
4222
- "id": "sessions:start",
4223
- "pluginAlias": "@rulemetric/cli",
4224
- "pluginName": "@rulemetric/cli",
4225
- "pluginType": "core",
4226
- "strict": true,
4227
- "enableJsonFlag": false,
4228
- "isESM": true,
4229
- "relativePath": [
4230
- "dist",
4231
- "commands",
4232
- "sessions",
4233
- "start.js"
4057
+ "proxy",
4058
+ "stop.js"
4234
4059
  ]
4235
4060
  },
4236
4061
  "skills:export-approved": {
@@ -4638,6 +4463,287 @@
4638
4463
  "update.js"
4639
4464
  ]
4640
4465
  },
4466
+ "sessions:analyze": {
4467
+ "aliases": [],
4468
+ "args": {
4469
+ "id": {
4470
+ "description": "Session ID",
4471
+ "name": "id",
4472
+ "required": true
4473
+ }
4474
+ },
4475
+ "description": "Trigger AI analysis on a session",
4476
+ "examples": [
4477
+ "<%= config.bin %> sessions analyze <session-id>"
4478
+ ],
4479
+ "flags": {
4480
+ "api-url": {
4481
+ "description": "Override API base URL",
4482
+ "env": "RULEMETRIC_API_URL",
4483
+ "hidden": true,
4484
+ "name": "api-url",
4485
+ "hasDynamicHelp": false,
4486
+ "multiple": false,
4487
+ "type": "option"
4488
+ }
4489
+ },
4490
+ "hasDynamicHelp": false,
4491
+ "hiddenAliases": [],
4492
+ "id": "sessions:analyze",
4493
+ "pluginAlias": "@rulemetric/cli",
4494
+ "pluginName": "@rulemetric/cli",
4495
+ "pluginType": "core",
4496
+ "strict": true,
4497
+ "enableJsonFlag": false,
4498
+ "isESM": true,
4499
+ "relativePath": [
4500
+ "dist",
4501
+ "commands",
4502
+ "sessions",
4503
+ "analyze.js"
4504
+ ]
4505
+ },
4506
+ "sessions:delete": {
4507
+ "aliases": [],
4508
+ "args": {
4509
+ "ids": {
4510
+ "description": "Session id(s) to delete",
4511
+ "name": "ids",
4512
+ "required": false
4513
+ }
4514
+ },
4515
+ "description": "Permanently delete captured sessions and everything stored with them (events, context snapshots, offloaded blobs)",
4516
+ "examples": [
4517
+ "<%= config.bin %> sessions delete 4f9d…",
4518
+ "<%= config.bin %> sessions delete 4f9d… 8a21…",
4519
+ "<%= config.bin %> sessions delete --project /work/client-a --yes"
4520
+ ],
4521
+ "flags": {
4522
+ "api-url": {
4523
+ "description": "Override API base URL",
4524
+ "env": "RULEMETRIC_API_URL",
4525
+ "hidden": true,
4526
+ "name": "api-url",
4527
+ "hasDynamicHelp": false,
4528
+ "multiple": false,
4529
+ "type": "option"
4530
+ },
4531
+ "project": {
4532
+ "description": "Delete every session captured under this project path (use with --yes).",
4533
+ "name": "project",
4534
+ "hasDynamicHelp": false,
4535
+ "multiple": false,
4536
+ "type": "option"
4537
+ },
4538
+ "yes": {
4539
+ "description": "Skip the confirmation prompt. Required for --project in non-interactive use.",
4540
+ "name": "yes",
4541
+ "allowNo": false,
4542
+ "type": "boolean"
4543
+ }
4544
+ },
4545
+ "hasDynamicHelp": false,
4546
+ "hiddenAliases": [],
4547
+ "id": "sessions:delete",
4548
+ "pluginAlias": "@rulemetric/cli",
4549
+ "pluginName": "@rulemetric/cli",
4550
+ "pluginType": "core",
4551
+ "strict": false,
4552
+ "enableJsonFlag": false,
4553
+ "isESM": true,
4554
+ "relativePath": [
4555
+ "dist",
4556
+ "commands",
4557
+ "sessions",
4558
+ "delete.js"
4559
+ ]
4560
+ },
4561
+ "sessions:end": {
4562
+ "aliases": [],
4563
+ "args": {},
4564
+ "description": "End the active capture session",
4565
+ "examples": [
4566
+ "<%= config.bin %> sessions end"
4567
+ ],
4568
+ "flags": {
4569
+ "api-url": {
4570
+ "description": "Override API base URL",
4571
+ "env": "RULEMETRIC_API_URL",
4572
+ "hidden": true,
4573
+ "name": "api-url",
4574
+ "hasDynamicHelp": false,
4575
+ "multiple": false,
4576
+ "type": "option"
4577
+ }
4578
+ },
4579
+ "hasDynamicHelp": false,
4580
+ "hiddenAliases": [],
4581
+ "id": "sessions:end",
4582
+ "pluginAlias": "@rulemetric/cli",
4583
+ "pluginName": "@rulemetric/cli",
4584
+ "pluginType": "core",
4585
+ "strict": true,
4586
+ "enableJsonFlag": false,
4587
+ "isESM": true,
4588
+ "relativePath": [
4589
+ "dist",
4590
+ "commands",
4591
+ "sessions",
4592
+ "end.js"
4593
+ ]
4594
+ },
4595
+ "sessions:import": {
4596
+ "aliases": [],
4597
+ "args": {
4598
+ "path": {
4599
+ "description": "Path to session file",
4600
+ "name": "path",
4601
+ "required": true
4602
+ }
4603
+ },
4604
+ "description": "Import a session file (JSONL, JSON)",
4605
+ "examples": [
4606
+ "<%= config.bin %> sessions import ~/.claude/projects/my-project/session-abc.jsonl",
4607
+ "<%= config.bin %> sessions import ./copilot-export.json --tool vscode_copilot"
4608
+ ],
4609
+ "flags": {
4610
+ "api-url": {
4611
+ "description": "Override API base URL",
4612
+ "env": "RULEMETRIC_API_URL",
4613
+ "hidden": true,
4614
+ "name": "api-url",
4615
+ "hasDynamicHelp": false,
4616
+ "multiple": false,
4617
+ "type": "option"
4618
+ },
4619
+ "tool": {
4620
+ "description": "Override tool detection (claude_code, cursor, vscode_copilot)",
4621
+ "name": "tool",
4622
+ "hasDynamicHelp": false,
4623
+ "multiple": false,
4624
+ "type": "option"
4625
+ }
4626
+ },
4627
+ "hasDynamicHelp": false,
4628
+ "hiddenAliases": [],
4629
+ "id": "sessions:import",
4630
+ "pluginAlias": "@rulemetric/cli",
4631
+ "pluginName": "@rulemetric/cli",
4632
+ "pluginType": "core",
4633
+ "strict": true,
4634
+ "enableJsonFlag": false,
4635
+ "isESM": true,
4636
+ "relativePath": [
4637
+ "dist",
4638
+ "commands",
4639
+ "sessions",
4640
+ "import.js"
4641
+ ]
4642
+ },
4643
+ "sessions:list": {
4644
+ "aliases": [],
4645
+ "args": {},
4646
+ "description": "List captured sessions",
4647
+ "examples": [
4648
+ "<%= config.bin %> sessions list",
4649
+ "<%= config.bin %> sessions list --tool claude_code",
4650
+ "<%= config.bin %> sessions list --tool codex"
4651
+ ],
4652
+ "flags": {
4653
+ "api-url": {
4654
+ "description": "Override API base URL",
4655
+ "env": "RULEMETRIC_API_URL",
4656
+ "hidden": true,
4657
+ "name": "api-url",
4658
+ "hasDynamicHelp": false,
4659
+ "multiple": false,
4660
+ "type": "option"
4661
+ },
4662
+ "tool": {
4663
+ "description": "Filter by tool (claude_code, cursor, vscode_copilot, copilot_agent, rulemetric_mcp, codex, pi, opencode, antigravity)",
4664
+ "name": "tool",
4665
+ "hasDynamicHelp": false,
4666
+ "multiple": false,
4667
+ "type": "option"
4668
+ },
4669
+ "limit": {
4670
+ "description": "Max results",
4671
+ "name": "limit",
4672
+ "default": 20,
4673
+ "hasDynamicHelp": false,
4674
+ "multiple": false,
4675
+ "type": "option"
4676
+ }
4677
+ },
4678
+ "hasDynamicHelp": false,
4679
+ "hiddenAliases": [],
4680
+ "id": "sessions:list",
4681
+ "pluginAlias": "@rulemetric/cli",
4682
+ "pluginName": "@rulemetric/cli",
4683
+ "pluginType": "core",
4684
+ "strict": true,
4685
+ "enableJsonFlag": false,
4686
+ "isESM": true,
4687
+ "relativePath": [
4688
+ "dist",
4689
+ "commands",
4690
+ "sessions",
4691
+ "list.js"
4692
+ ]
4693
+ },
4694
+ "sessions:start": {
4695
+ "aliases": [],
4696
+ "args": {},
4697
+ "description": "Start a capture session for any LLM provider (Cortex, Groq, etc.)",
4698
+ "examples": [
4699
+ "<%= config.bin %> sessions start --tool cortex",
4700
+ "<%= config.bin %> sessions start --tool groq --project-dir /path/to/project",
4701
+ "eval \"$(rulemetric proxy env --python)\" && rulemetric sessions start --tool cortex"
4702
+ ],
4703
+ "flags": {
4704
+ "api-url": {
4705
+ "description": "Override API base URL",
4706
+ "env": "RULEMETRIC_API_URL",
4707
+ "hidden": true,
4708
+ "name": "api-url",
4709
+ "hasDynamicHelp": false,
4710
+ "multiple": false,
4711
+ "type": "option"
4712
+ },
4713
+ "tool": {
4714
+ "char": "t",
4715
+ "description": "LLM provider or tool name (e.g., cortex, groq, deepseek, custom_app)",
4716
+ "name": "tool",
4717
+ "required": true,
4718
+ "hasDynamicHelp": false,
4719
+ "multiple": false,
4720
+ "type": "option"
4721
+ },
4722
+ "project-dir": {
4723
+ "char": "d",
4724
+ "description": "Project directory (defaults to cwd)",
4725
+ "name": "project-dir",
4726
+ "hasDynamicHelp": false,
4727
+ "multiple": false,
4728
+ "type": "option"
4729
+ }
4730
+ },
4731
+ "hasDynamicHelp": false,
4732
+ "hiddenAliases": [],
4733
+ "id": "sessions:start",
4734
+ "pluginAlias": "@rulemetric/cli",
4735
+ "pluginName": "@rulemetric/cli",
4736
+ "pluginType": "core",
4737
+ "strict": true,
4738
+ "enableJsonFlag": false,
4739
+ "isESM": true,
4740
+ "relativePath": [
4741
+ "dist",
4742
+ "commands",
4743
+ "sessions",
4744
+ "start.js"
4745
+ ]
4746
+ },
4641
4747
  "suggestions:accept": {
4642
4748
  "aliases": [],
4643
4749
  "args": {
@@ -4938,5 +5044,5 @@
4938
5044
  ]
4939
5045
  }
4940
5046
  },
4941
- "version": "0.19.1"
5047
+ "version": "0.21.0"
4942
5048
  }