@rulemetric/cli 0.19.1 → 0.20.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 (157) hide show
  1. package/dist/base-command.js +1 -1
  2. package/dist/{chunk-35NZJWFC.js → chunk-25JPYUEV.js} +1 -1
  3. package/dist/{chunk-Z7LBSVG3.js → chunk-4EGU65H4.js} +1 -1
  4. package/dist/{chunk-B5FBLLKT.js → chunk-4RC2SYZX.js} +1 -1
  5. package/dist/{chunk-PD4BUQ2X.js → chunk-4W5BF4ZN.js} +1 -1
  6. package/dist/chunk-6NTW62L4.js +1 -0
  7. package/dist/{chunk-75H3CKWA.js → chunk-7F3S6JQ2.js} +1 -1
  8. package/dist/chunk-BXXC3VXB.js +7 -0
  9. package/dist/{chunk-NX3PF3EQ.js → chunk-D6CXQBMN.js} +1 -1
  10. package/dist/{chunk-Q37D6V2G.js → chunk-GKWZ2DSE.js} +1 -1
  11. package/dist/{chunk-LQRXWLFJ.js → chunk-GWQ24FQP.js} +1 -1
  12. package/dist/{chunk-HEO56SKT.js → chunk-HN2MRF25.js} +1 -1
  13. package/dist/{chunk-DRX65ZLX.js → chunk-IULEYP4V.js} +1 -1
  14. package/dist/chunk-JES2CV5Z.js +1 -0
  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-2EXQM3UF.js → chunk-KUD7LWJJ.js} +1 -1
  18. package/dist/{chunk-VGBATQZ3.js → chunk-KYJ6WAPX.js} +1 -1
  19. package/dist/chunk-LAJ4RBRB.js +1 -0
  20. package/dist/chunk-LDFGM37E.js +2 -0
  21. package/dist/{chunk-YRGNBYZZ.js → chunk-NNUZ4CG4.js} +1 -1
  22. package/dist/chunk-P2N4KRAR.js +1 -0
  23. package/dist/{chunk-6WX3AXMI.js → chunk-RAOV3MFF.js} +1 -1
  24. package/dist/{chunk-PRC5N4NB.js → chunk-SWCM7IHC.js} +1 -1
  25. package/dist/{chunk-EYRM7BT4.js → chunk-UJTMT6Z7.js} +1 -1
  26. package/dist/{chunk-OT7ZUHJF.js → chunk-UQJNUESP.js} +1 -1
  27. package/dist/{chunk-RR5EE23Q.js → chunk-WGPFOHV3.js} +1 -1
  28. package/dist/chunk-XLFVX7N7.js +1 -0
  29. package/dist/{chunk-ZVCKDNBT.js → chunk-YL62YV7G.js} +1 -1
  30. package/dist/commands/antigravity/backfill.js +1 -1
  31. package/dist/commands/auth/create-key.js +1 -1
  32. package/dist/commands/auth/login.js +1 -1
  33. package/dist/commands/auth/logout.js +1 -1
  34. package/dist/commands/auth/revoke-key.js +1 -1
  35. package/dist/commands/auth/signup.js +1 -1
  36. package/dist/commands/auth/status.js +1 -1
  37. package/dist/commands/capture/scope.js +1 -1
  38. package/dist/commands/catalog/index.js +1 -1
  39. package/dist/commands/catalog/recommend.js +1 -1
  40. package/dist/commands/crons/list.js +1 -1
  41. package/dist/commands/crons/run.js +1 -1
  42. package/dist/commands/dashboard.js +1 -1
  43. package/dist/commands/diagnostics.js +1 -1
  44. package/dist/commands/eval-targets/create.js +1 -1
  45. package/dist/commands/eval-targets/list.js +1 -1
  46. package/dist/commands/evals/agent.js +1 -1
  47. package/dist/commands/evals/auto-run.js +1 -1
  48. package/dist/commands/evals/benchmark.js +1 -1
  49. package/dist/commands/evals/compare.js +1 -1
  50. package/dist/commands/evals/create.js +1 -1
  51. package/dist/commands/evals/optimize-description.js +1 -1
  52. package/dist/commands/evals/optimize.js +1 -1
  53. package/dist/commands/evals/refine-cases.js +1 -1
  54. package/dist/commands/evals/run.js +1 -1
  55. package/dist/commands/evals/validate-judge.js +1 -1
  56. package/dist/commands/experiments/enroll.js +1 -1
  57. package/dist/commands/experiments/list.js +1 -1
  58. package/dist/commands/experiments/reuse.js +1 -0
  59. package/dist/commands/gateway/ensure.js +1 -1
  60. package/dist/commands/hooks/install.js +1 -1
  61. package/dist/commands/hooks/run.js +1 -1
  62. package/dist/commands/hooks/uninstall.js +1 -1
  63. package/dist/commands/instructions/create.js +1 -1
  64. package/dist/commands/instructions/dedupe.js +1 -1
  65. package/dist/commands/instructions/delete.js +1 -1
  66. package/dist/commands/instructions/fork.js +1 -1
  67. package/dist/commands/instructions/get.js +1 -1
  68. package/dist/commands/instructions/list.js +1 -1
  69. package/dist/commands/instructions/promote.js +1 -1
  70. package/dist/commands/instructions/pull.js +1 -1
  71. package/dist/commands/instructions/restore.js +1 -1
  72. package/dist/commands/instructions/retract.js +1 -1
  73. package/dist/commands/instructions/upstream.js +1 -1
  74. package/dist/commands/instructions/versions.js +1 -1
  75. package/dist/commands/launcher.js +1 -1
  76. package/dist/commands/local/down.js +1 -1
  77. package/dist/commands/local/up.js +1 -1
  78. package/dist/commands/org/current.js +1 -1
  79. package/dist/commands/org/list.js +1 -1
  80. package/dist/commands/org/switch.js +1 -1
  81. package/dist/commands/packs/add-instruction.js +1 -1
  82. package/dist/commands/packs/apply.js +1 -1
  83. package/dist/commands/packs/create.js +1 -1
  84. package/dist/commands/packs/fork.js +1 -1
  85. package/dist/commands/packs/get.js +1 -1
  86. package/dist/commands/packs/list.js +1 -1
  87. package/dist/commands/packs/remove-instruction.js +1 -1
  88. package/dist/commands/proxy/env.js +1 -1
  89. package/dist/commands/proxy/logs.js +1 -1
  90. package/dist/commands/proxy/restart.js +1 -1
  91. package/dist/commands/proxy/setup.js +1 -1
  92. package/dist/commands/proxy/start.js +1 -1
  93. package/dist/commands/proxy/status.js +1 -1
  94. package/dist/commands/proxy/stop.js +1 -1
  95. package/dist/commands/research/backfill.js +1 -1
  96. package/dist/commands/research/resume-scoped-outcomes.js +1 -1
  97. package/dist/commands/research/tail-transcript.js +1 -1
  98. package/dist/commands/service/install.js +1 -1
  99. package/dist/commands/service/status.js +1 -1
  100. package/dist/commands/service/uninstall.js +1 -1
  101. package/dist/commands/service/updates.js +1 -1
  102. package/dist/commands/sessions/analyze.js +1 -1
  103. package/dist/commands/sessions/delete.js +1 -1
  104. package/dist/commands/sessions/end.js +1 -1
  105. package/dist/commands/sessions/import.js +1 -1
  106. package/dist/commands/sessions/list.js +1 -1
  107. package/dist/commands/sessions/start.js +1 -1
  108. package/dist/commands/setup.js +1 -1
  109. package/dist/commands/skills/export-approved.js +1 -1
  110. package/dist/commands/skills/install.js +1 -1
  111. package/dist/commands/skills/list.js +1 -1
  112. package/dist/commands/skills/publish.js +1 -1
  113. package/dist/commands/skills/search.js +1 -1
  114. package/dist/commands/skills/update.js +1 -1
  115. package/dist/commands/suggestions/accept.js +1 -1
  116. package/dist/commands/suggestions/auto.js +1 -1
  117. package/dist/commands/suggestions/dismiss.js +1 -1
  118. package/dist/commands/suggestions/list.js +1 -1
  119. package/dist/commands/suggestions/refresh.js +1 -1
  120. package/dist/commands/suggestions/undo.js +1 -1
  121. package/dist/dashboard/Dashboard.js +1 -1
  122. package/dist/dashboard/data.js +1 -1
  123. package/dist/{dist-TNM2RNPT.js → dist-D2HLWE5I.js} +1 -1
  124. package/dist/lib/agent-loop.js +1 -1
  125. package/dist/lib/discovery-repository.js +1 -1
  126. package/dist/lib/eval-case-generator.js +1 -1
  127. package/dist/lib/eval-conversation-handler.js +1 -1
  128. package/dist/lib/experiment-reuse.js +1 -0
  129. package/dist/lib/instruction-proposer.js +1 -1
  130. package/dist/lib/jobs/handlers/cron-refine-cases.js +1 -1
  131. package/dist/lib/jobs/handlers/cron-refresh-pricing.js +1 -1
  132. package/dist/lib/jobs/handlers/cron-suggest-instructions.js +1 -1
  133. package/dist/lib/jobs/handlers/distill-memories.js +1 -1
  134. package/dist/lib/jobs/handlers/prepare-isolated-launch.js +1 -1
  135. package/dist/lib/jobs/handlers/prepare-suggestion-live.js +1 -1
  136. package/dist/lib/jobs/handlers/process-conversation.js +1 -1
  137. package/dist/lib/jobs/handlers/process-eval.js +1 -1
  138. package/dist/lib/jobs/handlers/process-insights.js +1 -1
  139. package/dist/lib/jobs/handlers/process-launch.js +1 -1
  140. package/dist/lib/jobs/handlers/process-run-cleanup.js +1 -1
  141. package/dist/lib/jobs/handlers/process-session-goal.js +1 -1
  142. package/dist/lib/jobs/handlers/process-suggestion-discovery.js +1 -1
  143. package/dist/lib/jobs/handlers/process-suggestion-eval.js +1 -1
  144. package/dist/lib/llm-client.js +1 -1
  145. package/dist/lib/manual-tasks.js +1 -1
  146. package/dist/lib/projects/workspace/worktree.js +1 -1
  147. package/dist/lib/study-fixture.js +1 -1
  148. package/dist/lib/suggestion-discovery.js +1 -1
  149. package/dist/lib/transcript-sync.js +1 -1
  150. package/oclif.manifest.json +657 -597
  151. package/package.json +9 -9
  152. package/dist/chunk-FD272ZXG.js +0 -2
  153. package/dist/chunk-IQOBKWVY.js +0 -5
  154. package/dist/chunk-JU5ZNXPK.js +0 -1
  155. package/dist/chunk-JVTSJFFI.js +0 -1
  156. package/dist/chunk-KCX2YDC3.js +0 -1
  157. /package/dist/{chunk-OLOECA5V.js → chunk-4XIYUMTD.js} +0 -0
@@ -1051,6 +1051,98 @@
1051
1051
  "list.js"
1052
1052
  ]
1053
1053
  },
1054
+ "experiments:reuse": {
1055
+ "aliases": [],
1056
+ "args": {
1057
+ "id": {
1058
+ "description": "Completed source experiment UUID",
1059
+ "name": "id",
1060
+ "required": true
1061
+ }
1062
+ },
1063
+ "description": "Run selected previously measured fixture tasks with a new bounded exploratory budget",
1064
+ "flags": {
1065
+ "api-url": {
1066
+ "description": "Override API base URL",
1067
+ "env": "RULEMETRIC_API_URL",
1068
+ "hidden": true,
1069
+ "name": "api-url",
1070
+ "hasDynamicHelp": false,
1071
+ "multiple": false,
1072
+ "type": "option"
1073
+ },
1074
+ "task": {
1075
+ "description": "Source task ID to reuse (repeat for multiple tasks)",
1076
+ "name": "task",
1077
+ "required": true,
1078
+ "hasDynamicHelp": false,
1079
+ "multiple": true,
1080
+ "type": "option"
1081
+ },
1082
+ "reason": {
1083
+ "description": "Why this additional exploratory execution is useful (at least 20 characters)",
1084
+ "name": "reason",
1085
+ "required": true,
1086
+ "hasDynamicHelp": false,
1087
+ "multiple": false,
1088
+ "type": "option"
1089
+ },
1090
+ "request-id": {
1091
+ "description": "Explicit UUID for a new budget; identical arguments otherwise recover the same request",
1092
+ "name": "request-id",
1093
+ "hasDynamicHelp": false,
1094
+ "multiple": false,
1095
+ "type": "option"
1096
+ }
1097
+ },
1098
+ "hasDynamicHelp": false,
1099
+ "hiddenAliases": [],
1100
+ "id": "experiments:reuse",
1101
+ "pluginAlias": "@rulemetric/cli",
1102
+ "pluginName": "@rulemetric/cli",
1103
+ "pluginType": "core",
1104
+ "strict": true,
1105
+ "enableJsonFlag": false,
1106
+ "isESM": true,
1107
+ "relativePath": [
1108
+ "dist",
1109
+ "commands",
1110
+ "experiments",
1111
+ "reuse.js"
1112
+ ]
1113
+ },
1114
+ "gateway:ensure": {
1115
+ "aliases": [],
1116
+ "args": {},
1117
+ "description": "Ensure the gateway proxy is running (called by hooks, not for direct use)",
1118
+ "flags": {
1119
+ "api-url": {
1120
+ "description": "Override API base URL",
1121
+ "env": "RULEMETRIC_API_URL",
1122
+ "hidden": true,
1123
+ "name": "api-url",
1124
+ "hasDynamicHelp": false,
1125
+ "multiple": false,
1126
+ "type": "option"
1127
+ }
1128
+ },
1129
+ "hasDynamicHelp": false,
1130
+ "hidden": true,
1131
+ "hiddenAliases": [],
1132
+ "id": "gateway:ensure",
1133
+ "pluginAlias": "@rulemetric/cli",
1134
+ "pluginName": "@rulemetric/cli",
1135
+ "pluginType": "core",
1136
+ "strict": true,
1137
+ "enableJsonFlag": false,
1138
+ "isESM": true,
1139
+ "relativePath": [
1140
+ "dist",
1141
+ "commands",
1142
+ "gateway",
1143
+ "ensure.js"
1144
+ ]
1145
+ },
1054
1146
  "evals:agent": {
1055
1147
  "aliases": [],
1056
1148
  "args": {},
@@ -1781,38 +1873,6 @@
1781
1873
  "validate-judge.js"
1782
1874
  ]
1783
1875
  },
1784
- "gateway:ensure": {
1785
- "aliases": [],
1786
- "args": {},
1787
- "description": "Ensure the gateway proxy is running (called by hooks, not for direct use)",
1788
- "flags": {
1789
- "api-url": {
1790
- "description": "Override API base URL",
1791
- "env": "RULEMETRIC_API_URL",
1792
- "hidden": true,
1793
- "name": "api-url",
1794
- "hasDynamicHelp": false,
1795
- "multiple": false,
1796
- "type": "option"
1797
- }
1798
- },
1799
- "hasDynamicHelp": false,
1800
- "hidden": true,
1801
- "hiddenAliases": [],
1802
- "id": "gateway:ensure",
1803
- "pluginAlias": "@rulemetric/cli",
1804
- "pluginName": "@rulemetric/cli",
1805
- "pluginType": "core",
1806
- "strict": true,
1807
- "enableJsonFlag": false,
1808
- "isESM": true,
1809
- "relativePath": [
1810
- "dist",
1811
- "commands",
1812
- "gateway",
1813
- "ensure.js"
1814
- ]
1815
- },
1816
1876
  "hooks:emit-instructions": {
1817
1877
  "aliases": [],
1818
1878
  "args": {},
@@ -2668,10 +2728,16 @@
2668
2728
  "versions.js"
2669
2729
  ]
2670
2730
  },
2671
- "local:down": {
2731
+ "proxy:env": {
2672
2732
  "aliases": [],
2673
2733
  "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.",
2734
+ "description": "Print shell env vars to route any client through the RuleMetric proxy",
2735
+ "examples": [
2736
+ "<%= config.bin %> proxy env",
2737
+ "<%= config.bin %> proxy env --shell fish",
2738
+ "eval \"$(rulemetric proxy env)\"",
2739
+ "rulemetric proxy env --python"
2740
+ ],
2675
2741
  "flags": {
2676
2742
  "api-url": {
2677
2743
  "description": "Override API base URL",
@@ -2682,16 +2748,48 @@
2682
2748
  "multiple": false,
2683
2749
  "type": "option"
2684
2750
  },
2685
- "delete-data": {
2686
- "description": "Also delete the local database volumes (irreversible)",
2687
- "name": "delete-data",
2751
+ "shell": {
2752
+ "char": "s",
2753
+ "description": "Shell format (posix, fish, powershell)",
2754
+ "name": "shell",
2755
+ "default": "posix",
2756
+ "hasDynamicHelp": false,
2757
+ "multiple": false,
2758
+ "options": [
2759
+ "posix",
2760
+ "fish",
2761
+ "powershell"
2762
+ ],
2763
+ "type": "option"
2764
+ },
2765
+ "python": {
2766
+ "description": "Include Python-specific env vars (REQUESTS_CA_BUNDLE, SSL_CERT_FILE)",
2767
+ "name": "python",
2768
+ "allowNo": false,
2769
+ "type": "boolean"
2770
+ },
2771
+ "node": {
2772
+ "description": "Include Node.js-specific env vars (NODE_EXTRA_CA_CERTS)",
2773
+ "name": "node",
2774
+ "allowNo": false,
2775
+ "type": "boolean"
2776
+ },
2777
+ "all": {
2778
+ "description": "Include env vars for all runtimes",
2779
+ "name": "all",
2780
+ "allowNo": false,
2781
+ "type": "boolean"
2782
+ },
2783
+ "vscode": {
2784
+ "description": "Output VS Code settings.json snippet for Copilot proxy",
2785
+ "name": "vscode",
2688
2786
  "allowNo": false,
2689
2787
  "type": "boolean"
2690
2788
  }
2691
2789
  },
2692
2790
  "hasDynamicHelp": false,
2693
2791
  "hiddenAliases": [],
2694
- "id": "local:down",
2792
+ "id": "proxy:env",
2695
2793
  "pluginAlias": "@rulemetric/cli",
2696
2794
  "pluginName": "@rulemetric/cli",
2697
2795
  "pluginType": "core",
@@ -2701,18 +2799,18 @@
2701
2799
  "relativePath": [
2702
2800
  "dist",
2703
2801
  "commands",
2704
- "local",
2705
- "down.js"
2802
+ "proxy",
2803
+ "env.js"
2706
2804
  ]
2707
2805
  },
2708
- "local:up": {
2806
+ "proxy:logs": {
2709
2807
  "aliases": [],
2710
2808
  "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.",
2809
+ "description": "View context capture proxy logs",
2712
2810
  "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"
2811
+ "<%= config.bin %> proxy logs",
2812
+ "<%= config.bin %> proxy logs --follow",
2813
+ "<%= config.bin %> proxy logs --lines 50"
2716
2814
  ],
2717
2815
  "flags": {
2718
2816
  "api-url": {
@@ -2724,47 +2822,26 @@
2724
2822
  "multiple": false,
2725
2823
  "type": "option"
2726
2824
  },
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"
2825
+ "follow": {
2826
+ "char": "f",
2827
+ "description": "Follow log output (like tail -f)",
2828
+ "name": "follow",
2829
+ "allowNo": false,
2830
+ "type": "boolean"
2743
2831
  },
2744
- "password": {
2745
- "description": "Password for the first user (min 8 chars)",
2746
- "name": "password",
2832
+ "lines": {
2833
+ "char": "n",
2834
+ "description": "Number of lines to show",
2835
+ "name": "lines",
2836
+ "default": 30,
2747
2837
  "hasDynamicHelp": false,
2748
2838
  "multiple": false,
2749
2839
  "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
2840
  }
2764
2841
  },
2765
2842
  "hasDynamicHelp": false,
2766
2843
  "hiddenAliases": [],
2767
- "id": "local:up",
2844
+ "id": "proxy:logs",
2768
2845
  "pluginAlias": "@rulemetric/cli",
2769
2846
  "pluginName": "@rulemetric/cli",
2770
2847
  "pluginType": "core",
@@ -2774,16 +2851,16 @@
2774
2851
  "relativePath": [
2775
2852
  "dist",
2776
2853
  "commands",
2777
- "local",
2778
- "up.js"
2854
+ "proxy",
2855
+ "logs.js"
2779
2856
  ]
2780
2857
  },
2781
- "org:current": {
2858
+ "proxy:restart": {
2782
2859
  "aliases": [],
2783
2860
  "args": {},
2784
- "description": "Show the current active organization",
2861
+ "description": "Restart the context capture proxy (stop + start)",
2785
2862
  "examples": [
2786
- "<%= config.bin %> org current"
2863
+ "<%= config.bin %> proxy restart"
2787
2864
  ],
2788
2865
  "flags": {
2789
2866
  "api-url": {
@@ -2794,11 +2871,26 @@
2794
2871
  "hasDynamicHelp": false,
2795
2872
  "multiple": false,
2796
2873
  "type": "option"
2874
+ },
2875
+ "port": {
2876
+ "char": "p",
2877
+ "description": "Proxy listen port",
2878
+ "name": "port",
2879
+ "hasDynamicHelp": false,
2880
+ "multiple": false,
2881
+ "type": "option"
2882
+ },
2883
+ "docker": {
2884
+ "char": "d",
2885
+ "description": "Run in Docker mode",
2886
+ "name": "docker",
2887
+ "allowNo": false,
2888
+ "type": "boolean"
2797
2889
  }
2798
2890
  },
2799
2891
  "hasDynamicHelp": false,
2800
2892
  "hiddenAliases": [],
2801
- "id": "org:current",
2893
+ "id": "proxy:restart",
2802
2894
  "pluginAlias": "@rulemetric/cli",
2803
2895
  "pluginName": "@rulemetric/cli",
2804
2896
  "pluginType": "core",
@@ -2808,17 +2900,19 @@
2808
2900
  "relativePath": [
2809
2901
  "dist",
2810
2902
  "commands",
2811
- "org",
2812
- "current.js"
2903
+ "proxy",
2904
+ "restart.js"
2813
2905
  ]
2814
2906
  },
2815
- "org:list": {
2907
+ "proxy:setup": {
2816
2908
  "aliases": [],
2817
2909
  "args": {},
2818
- "description": "List organizations the current user is a member of",
2910
+ "description": "Set up context capture proxy (installs mitmproxy, configures shell)",
2819
2911
  "examples": [
2820
- "<%= config.bin %> org list"
2821
- ],
2912
+ "<%= config.bin %> proxy setup",
2913
+ "<%= config.bin %> proxy setup --shell zsh",
2914
+ "<%= config.bin %> proxy setup --check"
2915
+ ],
2822
2916
  "flags": {
2823
2917
  "api-url": {
2824
2918
  "description": "Override API base URL",
@@ -2828,58 +2922,39 @@
2828
2922
  "hasDynamicHelp": false,
2829
2923
  "multiple": false,
2830
2924
  "type": "option"
2831
- }
2832
- },
2833
- "hasDynamicHelp": false,
2834
- "hiddenAliases": [],
2835
- "id": "org:list",
2836
- "pluginAlias": "@rulemetric/cli",
2837
- "pluginName": "@rulemetric/cli",
2838
- "pluginType": "core",
2839
- "strict": true,
2840
- "enableJsonFlag": false,
2841
- "isESM": true,
2842
- "relativePath": [
2843
- "dist",
2844
- "commands",
2845
- "org",
2846
- "list.js"
2847
- ]
2848
- },
2849
- "org:switch": {
2850
- "aliases": [],
2851
- "args": {
2852
- "slug": {
2853
- "description": "Organization slug to switch to",
2854
- "name": "slug",
2855
- "required": false
2856
- }
2857
- },
2858
- "description": "Switch the active organization",
2859
- "examples": [
2860
- "<%= config.bin %> org switch acme",
2861
- "<%= config.bin %> org switch --clear"
2862
- ],
2863
- "flags": {
2864
- "api-url": {
2865
- "description": "Override API base URL",
2866
- "env": "RULEMETRIC_API_URL",
2867
- "hidden": true,
2868
- "name": "api-url",
2925
+ },
2926
+ "shell": {
2927
+ "description": "Shell to configure (auto-detected if omitted)",
2928
+ "name": "shell",
2929
+ "hasDynamicHelp": false,
2930
+ "multiple": false,
2931
+ "options": [
2932
+ "zsh",
2933
+ "bash",
2934
+ "fish",
2935
+ "powershell"
2936
+ ],
2937
+ "type": "option"
2938
+ },
2939
+ "port": {
2940
+ "char": "p",
2941
+ "description": "Proxy listen port",
2942
+ "name": "port",
2943
+ "default": 8787,
2869
2944
  "hasDynamicHelp": false,
2870
2945
  "multiple": false,
2871
2946
  "type": "option"
2872
2947
  },
2873
- "clear": {
2874
- "description": "Clear the active organization (personal mode)",
2875
- "name": "clear",
2948
+ "check": {
2949
+ "description": "Only check prerequisites, do not install anything",
2950
+ "name": "check",
2876
2951
  "allowNo": false,
2877
2952
  "type": "boolean"
2878
2953
  }
2879
2954
  },
2880
2955
  "hasDynamicHelp": false,
2881
2956
  "hiddenAliases": [],
2882
- "id": "org:switch",
2957
+ "id": "proxy:setup",
2883
2958
  "pluginAlias": "@rulemetric/cli",
2884
2959
  "pluginName": "@rulemetric/cli",
2885
2960
  "pluginType": "core",
@@ -2889,17 +2964,19 @@
2889
2964
  "relativePath": [
2890
2965
  "dist",
2891
2966
  "commands",
2892
- "org",
2893
- "switch.js"
2967
+ "proxy",
2968
+ "setup.js"
2894
2969
  ]
2895
2970
  },
2896
- "research:backfill": {
2971
+ "proxy:start": {
2897
2972
  "aliases": [],
2898
2973
  "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.",
2974
+ "description": "Start context capture proxy",
2900
2975
  "examples": [
2901
- "<%= config.bin %> research backfill",
2902
- "<%= config.bin %> research backfill --claude-dir /custom/.claude --dry-run"
2976
+ "<%= config.bin %> proxy start",
2977
+ "<%= config.bin %> proxy start --docker",
2978
+ "<%= config.bin %> proxy start --port 9090",
2979
+ "<%= config.bin %> proxy start --web"
2903
2980
  ],
2904
2981
  "flags": {
2905
2982
  "api-url": {
@@ -2911,24 +2988,44 @@
2911
2988
  "multiple": false,
2912
2989
  "type": "option"
2913
2990
  },
2914
- "claude-dir": {
2915
- "description": "Override the Claude Code projects directory (defaults to ~/.claude)",
2916
- "name": "claude-dir",
2917
- "noCacheDefault": true,
2991
+ "port": {
2992
+ "char": "p",
2993
+ "description": "Proxy listen port",
2994
+ "name": "port",
2995
+ "default": 8788,
2918
2996
  "hasDynamicHelp": false,
2919
2997
  "multiple": false,
2920
2998
  "type": "option"
2921
2999
  },
2922
- "dry-run": {
2923
- "description": "Print observation count without POSTing",
2924
- "name": "dry-run",
3000
+ "docker": {
3001
+ "char": "d",
3002
+ "description": "Run proxy in Docker (no local mitmproxy needed)",
3003
+ "name": "docker",
3004
+ "allowNo": false,
3005
+ "type": "boolean"
3006
+ },
3007
+ "web": {
3008
+ "description": "Launch mitmweb debug UI instead of mitmdump (local mode only)",
3009
+ "name": "web",
3010
+ "allowNo": false,
3011
+ "type": "boolean"
3012
+ },
3013
+ "skip-checks": {
3014
+ "description": "Skip prerequisite checks",
3015
+ "name": "skip-checks",
3016
+ "allowNo": false,
3017
+ "type": "boolean"
3018
+ },
3019
+ "build": {
3020
+ "description": "Force rebuild Docker image",
3021
+ "name": "build",
2925
3022
  "allowNo": false,
2926
3023
  "type": "boolean"
2927
3024
  }
2928
3025
  },
2929
3026
  "hasDynamicHelp": false,
2930
3027
  "hiddenAliases": [],
2931
- "id": "research:backfill",
3028
+ "id": "proxy:start",
2932
3029
  "pluginAlias": "@rulemetric/cli",
2933
3030
  "pluginName": "@rulemetric/cli",
2934
3031
  "pluginType": "core",
@@ -2938,17 +3035,16 @@
2938
3035
  "relativePath": [
2939
3036
  "dist",
2940
3037
  "commands",
2941
- "research",
2942
- "backfill.js"
3038
+ "proxy",
3039
+ "start.js"
2943
3040
  ]
2944
3041
  },
2945
- "research:resume-scoped-outcomes": {
3042
+ "proxy:status": {
2946
3043
  "aliases": [],
2947
3044
  "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.",
3045
+ "description": "Check gateway and context capture proxy status",
2949
3046
  "examples": [
2950
- "<%= config.bin %> research resume-scoped-outcomes",
2951
- "<%= config.bin %> research resume-scoped-outcomes --list"
3047
+ "<%= config.bin %> proxy status"
2952
3048
  ],
2953
3049
  "flags": {
2954
3050
  "api-url": {
@@ -2959,18 +3055,11 @@
2959
3055
  "hasDynamicHelp": false,
2960
3056
  "multiple": false,
2961
3057
  "type": "option"
2962
- },
2963
- "list": {
2964
- "description": "Show the outcome store without uploading anything",
2965
- "name": "list",
2966
- "allowNo": false,
2967
- "type": "boolean"
2968
3058
  }
2969
3059
  },
2970
3060
  "hasDynamicHelp": false,
2971
- "hidden": true,
2972
3061
  "hiddenAliases": [],
2973
- "id": "research:resume-scoped-outcomes",
3062
+ "id": "proxy:status",
2974
3063
  "pluginAlias": "@rulemetric/cli",
2975
3064
  "pluginName": "@rulemetric/cli",
2976
3065
  "pluginType": "core",
@@ -2980,20 +3069,17 @@
2980
3069
  "relativePath": [
2981
3070
  "dist",
2982
3071
  "commands",
2983
- "research",
2984
- "resume-scoped-outcomes.js"
3072
+ "proxy",
3073
+ "status.js"
2985
3074
  ]
2986
3075
  },
2987
- "research:tail-transcript": {
3076
+ "proxy:stop": {
2988
3077
  "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.",
3078
+ "args": {},
3079
+ "description": "Stop the context capture proxy",
3080
+ "examples": [
3081
+ "<%= config.bin %> proxy stop"
3082
+ ],
2997
3083
  "flags": {
2998
3084
  "api-url": {
2999
3085
  "description": "Override API base URL",
@@ -3003,18 +3089,11 @@
3003
3089
  "hasDynamicHelp": false,
3004
3090
  "multiple": false,
3005
3091
  "type": "option"
3006
- },
3007
- "no-post": {
3008
- "description": "Parse and advance the offset without POSTing (debug)",
3009
- "name": "no-post",
3010
- "allowNo": false,
3011
- "type": "boolean"
3012
3092
  }
3013
3093
  },
3014
3094
  "hasDynamicHelp": false,
3015
- "hidden": true,
3016
3095
  "hiddenAliases": [],
3017
- "id": "research:tail-transcript",
3096
+ "id": "proxy:stop",
3018
3097
  "pluginAlias": "@rulemetric/cli",
3019
3098
  "pluginName": "@rulemetric/cli",
3020
3099
  "pluginType": "core",
@@ -3024,8 +3103,8 @@
3024
3103
  "relativePath": [
3025
3104
  "dist",
3026
3105
  "commands",
3027
- "research",
3028
- "tail-transcript.js"
3106
+ "proxy",
3107
+ "stop.js"
3029
3108
  ]
3030
3109
  },
3031
3110
  "packs:add-instruction": {
@@ -3376,15 +3455,13 @@
3376
3455
  "remove-instruction.js"
3377
3456
  ]
3378
3457
  },
3379
- "proxy:env": {
3458
+ "research:backfill": {
3380
3459
  "aliases": [],
3381
3460
  "args": {},
3382
- "description": "Print shell env vars to route any client through the RuleMetric proxy",
3461
+ "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
3462
  "examples": [
3384
- "<%= config.bin %> proxy env",
3385
- "<%= config.bin %> proxy env --shell fish",
3386
- "eval \"$(rulemetric proxy env)\"",
3387
- "rulemetric proxy env --python"
3463
+ "<%= config.bin %> research backfill",
3464
+ "<%= config.bin %> research backfill --claude-dir /custom/.claude --dry-run"
3388
3465
  ],
3389
3466
  "flags": {
3390
3467
  "api-url": {
@@ -3396,48 +3473,24 @@
3396
3473
  "multiple": false,
3397
3474
  "type": "option"
3398
3475
  },
3399
- "shell": {
3400
- "char": "s",
3401
- "description": "Shell format (posix, fish, powershell)",
3402
- "name": "shell",
3403
- "default": "posix",
3476
+ "claude-dir": {
3477
+ "description": "Override the Claude Code projects directory (defaults to ~/.claude)",
3478
+ "name": "claude-dir",
3479
+ "noCacheDefault": true,
3404
3480
  "hasDynamicHelp": false,
3405
3481
  "multiple": false,
3406
- "options": [
3407
- "posix",
3408
- "fish",
3409
- "powershell"
3410
- ],
3411
3482
  "type": "option"
3412
3483
  },
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",
3484
+ "dry-run": {
3485
+ "description": "Print observation count without POSTing",
3486
+ "name": "dry-run",
3434
3487
  "allowNo": false,
3435
3488
  "type": "boolean"
3436
3489
  }
3437
3490
  },
3438
3491
  "hasDynamicHelp": false,
3439
3492
  "hiddenAliases": [],
3440
- "id": "proxy:env",
3493
+ "id": "research:backfill",
3441
3494
  "pluginAlias": "@rulemetric/cli",
3442
3495
  "pluginName": "@rulemetric/cli",
3443
3496
  "pluginType": "core",
@@ -3447,18 +3500,17 @@
3447
3500
  "relativePath": [
3448
3501
  "dist",
3449
3502
  "commands",
3450
- "proxy",
3451
- "env.js"
3503
+ "research",
3504
+ "backfill.js"
3452
3505
  ]
3453
3506
  },
3454
- "proxy:logs": {
3507
+ "research:resume-scoped-outcomes": {
3455
3508
  "aliases": [],
3456
3509
  "args": {},
3457
- "description": "View context capture proxy logs",
3510
+ "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
3511
  "examples": [
3459
- "<%= config.bin %> proxy logs",
3460
- "<%= config.bin %> proxy logs --follow",
3461
- "<%= config.bin %> proxy logs --lines 50"
3512
+ "<%= config.bin %> research resume-scoped-outcomes",
3513
+ "<%= config.bin %> research resume-scoped-outcomes --list"
3462
3514
  ],
3463
3515
  "flags": {
3464
3516
  "api-url": {
@@ -3470,26 +3522,17 @@
3470
3522
  "multiple": false,
3471
3523
  "type": "option"
3472
3524
  },
3473
- "follow": {
3474
- "char": "f",
3475
- "description": "Follow log output (like tail -f)",
3476
- "name": "follow",
3525
+ "list": {
3526
+ "description": "Show the outcome store without uploading anything",
3527
+ "name": "list",
3477
3528
  "allowNo": false,
3478
3529
  "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
3530
  }
3489
3531
  },
3490
3532
  "hasDynamicHelp": false,
3533
+ "hidden": true,
3491
3534
  "hiddenAliases": [],
3492
- "id": "proxy:logs",
3535
+ "id": "research:resume-scoped-outcomes",
3493
3536
  "pluginAlias": "@rulemetric/cli",
3494
3537
  "pluginName": "@rulemetric/cli",
3495
3538
  "pluginType": "core",
@@ -3499,133 +3542,20 @@
3499
3542
  "relativePath": [
3500
3543
  "dist",
3501
3544
  "commands",
3502
- "proxy",
3503
- "logs.js"
3504
- ]
3505
- },
3506
- "proxy:restart": {
3507
- "aliases": [],
3508
- "args": {},
3509
- "description": "Restart the context capture proxy (stop + start)",
3510
- "examples": [
3511
- "<%= config.bin %> proxy restart"
3512
- ],
3513
- "flags": {
3514
- "api-url": {
3515
- "description": "Override API base URL",
3516
- "env": "RULEMETRIC_API_URL",
3517
- "hidden": true,
3518
- "name": "api-url",
3519
- "hasDynamicHelp": false,
3520
- "multiple": false,
3521
- "type": "option"
3522
- },
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",
3535
- "allowNo": false,
3536
- "type": "boolean"
3537
- }
3538
- },
3539
- "hasDynamicHelp": false,
3540
- "hiddenAliases": [],
3541
- "id": "proxy:restart",
3542
- "pluginAlias": "@rulemetric/cli",
3543
- "pluginName": "@rulemetric/cli",
3544
- "pluginType": "core",
3545
- "strict": true,
3546
- "enableJsonFlag": false,
3547
- "isESM": true,
3548
- "relativePath": [
3549
- "dist",
3550
- "commands",
3551
- "proxy",
3552
- "restart.js"
3545
+ "research",
3546
+ "resume-scoped-outcomes.js"
3553
3547
  ]
3554
3548
  },
3555
- "proxy:setup": {
3549
+ "research:tail-transcript": {
3556
3550
  "aliases": [],
3557
- "args": {},
3558
- "description": "Set up context capture proxy (installs mitmproxy, configures shell)",
3559
- "examples": [
3560
- "<%= config.bin %> proxy setup",
3561
- "<%= config.bin %> proxy setup --shell zsh",
3562
- "<%= config.bin %> proxy setup --check"
3563
- ],
3564
- "flags": {
3565
- "api-url": {
3566
- "description": "Override API base URL",
3567
- "env": "RULEMETRIC_API_URL",
3568
- "hidden": true,
3569
- "name": "api-url",
3570
- "hasDynamicHelp": false,
3571
- "multiple": false,
3572
- "type": "option"
3573
- },
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
- "port": {
3588
- "char": "p",
3589
- "description": "Proxy listen port",
3590
- "name": "port",
3591
- "default": 8787,
3592
- "hasDynamicHelp": false,
3593
- "multiple": false,
3594
- "type": "option"
3595
- },
3596
- "check": {
3597
- "description": "Only check prerequisites, do not install anything",
3598
- "name": "check",
3599
- "allowNo": false,
3600
- "type": "boolean"
3551
+ "args": {
3552
+ "transcript": {
3553
+ "description": "Absolute path to a Claude Code .jsonl transcript",
3554
+ "name": "transcript",
3555
+ "required": true
3601
3556
  }
3602
3557
  },
3603
- "hasDynamicHelp": false,
3604
- "hiddenAliases": [],
3605
- "id": "proxy:setup",
3606
- "pluginAlias": "@rulemetric/cli",
3607
- "pluginName": "@rulemetric/cli",
3608
- "pluginType": "core",
3609
- "strict": true,
3610
- "enableJsonFlag": false,
3611
- "isESM": true,
3612
- "relativePath": [
3613
- "dist",
3614
- "commands",
3615
- "proxy",
3616
- "setup.js"
3617
- ]
3618
- },
3619
- "proxy:start": {
3620
- "aliases": [],
3621
- "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
- ],
3558
+ "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.",
3629
3559
  "flags": {
3630
3560
  "api-url": {
3631
3561
  "description": "Override API base URL",
@@ -3636,112 +3566,17 @@
3636
3566
  "multiple": false,
3637
3567
  "type": "option"
3638
3568
  },
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",
3569
+ "no-post": {
3570
+ "description": "Parse and advance the offset without POSTing (debug)",
3571
+ "name": "no-post",
3670
3572
  "allowNo": false,
3671
3573
  "type": "boolean"
3672
3574
  }
3673
3575
  },
3674
3576
  "hasDynamicHelp": false,
3577
+ "hidden": true,
3675
3578
  "hiddenAliases": [],
3676
- "id": "proxy:start",
3677
- "pluginAlias": "@rulemetric/cli",
3678
- "pluginName": "@rulemetric/cli",
3679
- "pluginType": "core",
3680
- "strict": true,
3681
- "enableJsonFlag": false,
3682
- "isESM": true,
3683
- "relativePath": [
3684
- "dist",
3685
- "commands",
3686
- "proxy",
3687
- "start.js"
3688
- ]
3689
- },
3690
- "proxy:status": {
3691
- "aliases": [],
3692
- "args": {},
3693
- "description": "Check gateway and context capture proxy status",
3694
- "examples": [
3695
- "<%= config.bin %> proxy status"
3696
- ],
3697
- "flags": {
3698
- "api-url": {
3699
- "description": "Override API base URL",
3700
- "env": "RULEMETRIC_API_URL",
3701
- "hidden": true,
3702
- "name": "api-url",
3703
- "hasDynamicHelp": false,
3704
- "multiple": false,
3705
- "type": "option"
3706
- }
3707
- },
3708
- "hasDynamicHelp": false,
3709
- "hiddenAliases": [],
3710
- "id": "proxy:status",
3711
- "pluginAlias": "@rulemetric/cli",
3712
- "pluginName": "@rulemetric/cli",
3713
- "pluginType": "core",
3714
- "strict": true,
3715
- "enableJsonFlag": false,
3716
- "isESM": true,
3717
- "relativePath": [
3718
- "dist",
3719
- "commands",
3720
- "proxy",
3721
- "status.js"
3722
- ]
3723
- },
3724
- "proxy:stop": {
3725
- "aliases": [],
3726
- "args": {},
3727
- "description": "Stop the context capture proxy",
3728
- "examples": [
3729
- "<%= config.bin %> proxy stop"
3730
- ],
3731
- "flags": {
3732
- "api-url": {
3733
- "description": "Override API base URL",
3734
- "env": "RULEMETRIC_API_URL",
3735
- "hidden": true,
3736
- "name": "api-url",
3737
- "hasDynamicHelp": false,
3738
- "multiple": false,
3739
- "type": "option"
3740
- }
3741
- },
3742
- "hasDynamicHelp": false,
3743
- "hiddenAliases": [],
3744
- "id": "proxy:stop",
3579
+ "id": "research:tail-transcript",
3745
3580
  "pluginAlias": "@rulemetric/cli",
3746
3581
  "pluginName": "@rulemetric/cli",
3747
3582
  "pluginType": "core",
@@ -3751,8 +3586,8 @@
3751
3586
  "relativePath": [
3752
3587
  "dist",
3753
3588
  "commands",
3754
- "proxy",
3755
- "stop.js"
3589
+ "research",
3590
+ "tail-transcript.js"
3756
3591
  ]
3757
3592
  },
3758
3593
  "service:install": {
@@ -3952,18 +3787,12 @@
3952
3787
  "updates.js"
3953
3788
  ]
3954
3789
  },
3955
- "sessions:analyze": {
3790
+ "org:current": {
3956
3791
  "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",
3792
+ "args": {},
3793
+ "description": "Show the current active organization",
3965
3794
  "examples": [
3966
- "<%= config.bin %> sessions analyze <session-id>"
3795
+ "<%= config.bin %> org current"
3967
3796
  ],
3968
3797
  "flags": {
3969
3798
  "api-url": {
@@ -3978,7 +3807,7 @@
3978
3807
  },
3979
3808
  "hasDynamicHelp": false,
3980
3809
  "hiddenAliases": [],
3981
- "id": "sessions:analyze",
3810
+ "id": "org:current",
3982
3811
  "pluginAlias": "@rulemetric/cli",
3983
3812
  "pluginName": "@rulemetric/cli",
3984
3813
  "pluginType": "core",
@@ -3988,71 +3817,16 @@
3988
3817
  "relativePath": [
3989
3818
  "dist",
3990
3819
  "commands",
3991
- "sessions",
3992
- "analyze.js"
3993
- ]
3994
- },
3995
- "sessions:delete": {
3996
- "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)",
4005
- "examples": [
4006
- "<%= config.bin %> sessions delete 4f9d…",
4007
- "<%= config.bin %> sessions delete 4f9d… 8a21…",
4008
- "<%= config.bin %> sessions delete --project /work/client-a --yes"
4009
- ],
4010
- "flags": {
4011
- "api-url": {
4012
- "description": "Override API base URL",
4013
- "env": "RULEMETRIC_API_URL",
4014
- "hidden": true,
4015
- "name": "api-url",
4016
- "hasDynamicHelp": false,
4017
- "multiple": false,
4018
- "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
- }
4033
- },
4034
- "hasDynamicHelp": false,
4035
- "hiddenAliases": [],
4036
- "id": "sessions:delete",
4037
- "pluginAlias": "@rulemetric/cli",
4038
- "pluginName": "@rulemetric/cli",
4039
- "pluginType": "core",
4040
- "strict": false,
4041
- "enableJsonFlag": false,
4042
- "isESM": true,
4043
- "relativePath": [
4044
- "dist",
4045
- "commands",
4046
- "sessions",
4047
- "delete.js"
3820
+ "org",
3821
+ "current.js"
4048
3822
  ]
4049
3823
  },
4050
- "sessions:end": {
3824
+ "org:list": {
4051
3825
  "aliases": [],
4052
3826
  "args": {},
4053
- "description": "End the active capture session",
3827
+ "description": "List organizations the current user is a member of",
4054
3828
  "examples": [
4055
- "<%= config.bin %> sessions end"
3829
+ "<%= config.bin %> org list"
4056
3830
  ],
4057
3831
  "flags": {
4058
3832
  "api-url": {
@@ -4067,7 +3841,7 @@
4067
3841
  },
4068
3842
  "hasDynamicHelp": false,
4069
3843
  "hiddenAliases": [],
4070
- "id": "sessions:end",
3844
+ "id": "org:list",
4071
3845
  "pluginAlias": "@rulemetric/cli",
4072
3846
  "pluginName": "@rulemetric/cli",
4073
3847
  "pluginType": "core",
@@ -4077,23 +3851,23 @@
4077
3851
  "relativePath": [
4078
3852
  "dist",
4079
3853
  "commands",
4080
- "sessions",
4081
- "end.js"
3854
+ "org",
3855
+ "list.js"
4082
3856
  ]
4083
3857
  },
4084
- "sessions:import": {
3858
+ "org:switch": {
4085
3859
  "aliases": [],
4086
3860
  "args": {
4087
- "path": {
4088
- "description": "Path to session file",
4089
- "name": "path",
4090
- "required": true
3861
+ "slug": {
3862
+ "description": "Organization slug to switch to",
3863
+ "name": "slug",
3864
+ "required": false
4091
3865
  }
4092
3866
  },
4093
- "description": "Import a session file (JSONL, JSON)",
3867
+ "description": "Switch the active organization",
4094
3868
  "examples": [
4095
- "<%= config.bin %> sessions import ~/.claude/projects/my-project/session-abc.jsonl",
4096
- "<%= config.bin %> sessions import ./copilot-export.json --tool vscode_copilot"
3869
+ "<%= config.bin %> org switch acme",
3870
+ "<%= config.bin %> org switch --clear"
4097
3871
  ],
4098
3872
  "flags": {
4099
3873
  "api-url": {
@@ -4105,17 +3879,16 @@
4105
3879
  "multiple": false,
4106
3880
  "type": "option"
4107
3881
  },
4108
- "tool": {
4109
- "description": "Override tool detection (claude_code, cursor, vscode_copilot)",
4110
- "name": "tool",
4111
- "hasDynamicHelp": false,
4112
- "multiple": false,
4113
- "type": "option"
3882
+ "clear": {
3883
+ "description": "Clear the active organization (personal mode)",
3884
+ "name": "clear",
3885
+ "allowNo": false,
3886
+ "type": "boolean"
4114
3887
  }
4115
3888
  },
4116
3889
  "hasDynamicHelp": false,
4117
3890
  "hiddenAliases": [],
4118
- "id": "sessions:import",
3891
+ "id": "org:switch",
4119
3892
  "pluginAlias": "@rulemetric/cli",
4120
3893
  "pluginName": "@rulemetric/cli",
4121
3894
  "pluginType": "core",
@@ -4125,19 +3898,14 @@
4125
3898
  "relativePath": [
4126
3899
  "dist",
4127
3900
  "commands",
4128
- "sessions",
4129
- "import.js"
3901
+ "org",
3902
+ "switch.js"
4130
3903
  ]
4131
3904
  },
4132
- "sessions:list": {
3905
+ "local:down": {
4133
3906
  "aliases": [],
4134
3907
  "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
- ],
3908
+ "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.",
4141
3909
  "flags": {
4142
3910
  "api-url": {
4143
3911
  "description": "Override API base URL",
@@ -4148,25 +3916,16 @@
4148
3916
  "multiple": false,
4149
3917
  "type": "option"
4150
3918
  },
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"
3919
+ "delete-data": {
3920
+ "description": "Also delete the local database volumes (irreversible)",
3921
+ "name": "delete-data",
3922
+ "allowNo": false,
3923
+ "type": "boolean"
4165
3924
  }
4166
3925
  },
4167
3926
  "hasDynamicHelp": false,
4168
3927
  "hiddenAliases": [],
4169
- "id": "sessions:list",
3928
+ "id": "local:down",
4170
3929
  "pluginAlias": "@rulemetric/cli",
4171
3930
  "pluginName": "@rulemetric/cli",
4172
3931
  "pluginType": "core",
@@ -4176,18 +3935,18 @@
4176
3935
  "relativePath": [
4177
3936
  "dist",
4178
3937
  "commands",
4179
- "sessions",
4180
- "list.js"
3938
+ "local",
3939
+ "down.js"
4181
3940
  ]
4182
3941
  },
4183
- "sessions:start": {
3942
+ "local:up": {
4184
3943
  "aliases": [],
4185
3944
  "args": {},
4186
- "description": "Start a capture session for any LLM provider (Cortex, Groq, etc.)",
3945
+ "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.",
4187
3946
  "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"
3947
+ "<%= config.bin %> local up --email you@example.com --password <pw>",
3948
+ "<%= config.bin %> local up --port 3000",
3949
+ "<%= config.bin %> local up --foreground"
4191
3950
  ],
4192
3951
  "flags": {
4193
3952
  "api-url": {
@@ -4199,27 +3958,47 @@
4199
3958
  "multiple": false,
4200
3959
  "type": "option"
4201
3960
  },
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,
3961
+ "port": {
3962
+ "char": "p",
3963
+ "description": "Local API + dashboard port",
3964
+ "name": "port",
3965
+ "default": 3000,
4207
3966
  "hasDynamicHelp": false,
4208
3967
  "multiple": false,
4209
3968
  "type": "option"
4210
3969
  },
4211
- "project-dir": {
4212
- "char": "d",
4213
- "description": "Project directory (defaults to cwd)",
4214
- "name": "project-dir",
3970
+ "email": {
3971
+ "char": "e",
3972
+ "description": "Create the first user with this email (with --password)",
3973
+ "name": "email",
4215
3974
  "hasDynamicHelp": false,
4216
3975
  "multiple": false,
4217
3976
  "type": "option"
3977
+ },
3978
+ "password": {
3979
+ "description": "Password for the first user (min 8 chars)",
3980
+ "name": "password",
3981
+ "hasDynamicHelp": false,
3982
+ "multiple": false,
3983
+ "type": "option"
3984
+ },
3985
+ "foreground": {
3986
+ "description": "Run the server in this terminal instead of installing a launchd service (works on any OS; skips user provisioning)",
3987
+ "name": "foreground",
3988
+ "allowNo": false,
3989
+ "type": "boolean"
3990
+ },
3991
+ "yes": {
3992
+ "char": "y",
3993
+ "description": "Skip the runtime-download confirmation",
3994
+ "name": "yes",
3995
+ "allowNo": false,
3996
+ "type": "boolean"
4218
3997
  }
4219
3998
  },
4220
3999
  "hasDynamicHelp": false,
4221
4000
  "hiddenAliases": [],
4222
- "id": "sessions:start",
4001
+ "id": "local:up",
4223
4002
  "pluginAlias": "@rulemetric/cli",
4224
4003
  "pluginName": "@rulemetric/cli",
4225
4004
  "pluginType": "core",
@@ -4229,8 +4008,8 @@
4229
4008
  "relativePath": [
4230
4009
  "dist",
4231
4010
  "commands",
4232
- "sessions",
4233
- "start.js"
4011
+ "local",
4012
+ "up.js"
4234
4013
  ]
4235
4014
  },
4236
4015
  "skills:export-approved": {
@@ -4638,6 +4417,287 @@
4638
4417
  "update.js"
4639
4418
  ]
4640
4419
  },
4420
+ "sessions:analyze": {
4421
+ "aliases": [],
4422
+ "args": {
4423
+ "id": {
4424
+ "description": "Session ID",
4425
+ "name": "id",
4426
+ "required": true
4427
+ }
4428
+ },
4429
+ "description": "Trigger AI analysis on a session",
4430
+ "examples": [
4431
+ "<%= config.bin %> sessions analyze <session-id>"
4432
+ ],
4433
+ "flags": {
4434
+ "api-url": {
4435
+ "description": "Override API base URL",
4436
+ "env": "RULEMETRIC_API_URL",
4437
+ "hidden": true,
4438
+ "name": "api-url",
4439
+ "hasDynamicHelp": false,
4440
+ "multiple": false,
4441
+ "type": "option"
4442
+ }
4443
+ },
4444
+ "hasDynamicHelp": false,
4445
+ "hiddenAliases": [],
4446
+ "id": "sessions:analyze",
4447
+ "pluginAlias": "@rulemetric/cli",
4448
+ "pluginName": "@rulemetric/cli",
4449
+ "pluginType": "core",
4450
+ "strict": true,
4451
+ "enableJsonFlag": false,
4452
+ "isESM": true,
4453
+ "relativePath": [
4454
+ "dist",
4455
+ "commands",
4456
+ "sessions",
4457
+ "analyze.js"
4458
+ ]
4459
+ },
4460
+ "sessions:delete": {
4461
+ "aliases": [],
4462
+ "args": {
4463
+ "ids": {
4464
+ "description": "Session id(s) to delete",
4465
+ "name": "ids",
4466
+ "required": false
4467
+ }
4468
+ },
4469
+ "description": "Permanently delete captured sessions and everything stored with them (events, context snapshots, offloaded blobs)",
4470
+ "examples": [
4471
+ "<%= config.bin %> sessions delete 4f9d…",
4472
+ "<%= config.bin %> sessions delete 4f9d… 8a21…",
4473
+ "<%= config.bin %> sessions delete --project /work/client-a --yes"
4474
+ ],
4475
+ "flags": {
4476
+ "api-url": {
4477
+ "description": "Override API base URL",
4478
+ "env": "RULEMETRIC_API_URL",
4479
+ "hidden": true,
4480
+ "name": "api-url",
4481
+ "hasDynamicHelp": false,
4482
+ "multiple": false,
4483
+ "type": "option"
4484
+ },
4485
+ "project": {
4486
+ "description": "Delete every session captured under this project path (use with --yes).",
4487
+ "name": "project",
4488
+ "hasDynamicHelp": false,
4489
+ "multiple": false,
4490
+ "type": "option"
4491
+ },
4492
+ "yes": {
4493
+ "description": "Skip the confirmation prompt. Required for --project in non-interactive use.",
4494
+ "name": "yes",
4495
+ "allowNo": false,
4496
+ "type": "boolean"
4497
+ }
4498
+ },
4499
+ "hasDynamicHelp": false,
4500
+ "hiddenAliases": [],
4501
+ "id": "sessions:delete",
4502
+ "pluginAlias": "@rulemetric/cli",
4503
+ "pluginName": "@rulemetric/cli",
4504
+ "pluginType": "core",
4505
+ "strict": false,
4506
+ "enableJsonFlag": false,
4507
+ "isESM": true,
4508
+ "relativePath": [
4509
+ "dist",
4510
+ "commands",
4511
+ "sessions",
4512
+ "delete.js"
4513
+ ]
4514
+ },
4515
+ "sessions:end": {
4516
+ "aliases": [],
4517
+ "args": {},
4518
+ "description": "End the active capture session",
4519
+ "examples": [
4520
+ "<%= config.bin %> sessions end"
4521
+ ],
4522
+ "flags": {
4523
+ "api-url": {
4524
+ "description": "Override API base URL",
4525
+ "env": "RULEMETRIC_API_URL",
4526
+ "hidden": true,
4527
+ "name": "api-url",
4528
+ "hasDynamicHelp": false,
4529
+ "multiple": false,
4530
+ "type": "option"
4531
+ }
4532
+ },
4533
+ "hasDynamicHelp": false,
4534
+ "hiddenAliases": [],
4535
+ "id": "sessions:end",
4536
+ "pluginAlias": "@rulemetric/cli",
4537
+ "pluginName": "@rulemetric/cli",
4538
+ "pluginType": "core",
4539
+ "strict": true,
4540
+ "enableJsonFlag": false,
4541
+ "isESM": true,
4542
+ "relativePath": [
4543
+ "dist",
4544
+ "commands",
4545
+ "sessions",
4546
+ "end.js"
4547
+ ]
4548
+ },
4549
+ "sessions:import": {
4550
+ "aliases": [],
4551
+ "args": {
4552
+ "path": {
4553
+ "description": "Path to session file",
4554
+ "name": "path",
4555
+ "required": true
4556
+ }
4557
+ },
4558
+ "description": "Import a session file (JSONL, JSON)",
4559
+ "examples": [
4560
+ "<%= config.bin %> sessions import ~/.claude/projects/my-project/session-abc.jsonl",
4561
+ "<%= config.bin %> sessions import ./copilot-export.json --tool vscode_copilot"
4562
+ ],
4563
+ "flags": {
4564
+ "api-url": {
4565
+ "description": "Override API base URL",
4566
+ "env": "RULEMETRIC_API_URL",
4567
+ "hidden": true,
4568
+ "name": "api-url",
4569
+ "hasDynamicHelp": false,
4570
+ "multiple": false,
4571
+ "type": "option"
4572
+ },
4573
+ "tool": {
4574
+ "description": "Override tool detection (claude_code, cursor, vscode_copilot)",
4575
+ "name": "tool",
4576
+ "hasDynamicHelp": false,
4577
+ "multiple": false,
4578
+ "type": "option"
4579
+ }
4580
+ },
4581
+ "hasDynamicHelp": false,
4582
+ "hiddenAliases": [],
4583
+ "id": "sessions:import",
4584
+ "pluginAlias": "@rulemetric/cli",
4585
+ "pluginName": "@rulemetric/cli",
4586
+ "pluginType": "core",
4587
+ "strict": true,
4588
+ "enableJsonFlag": false,
4589
+ "isESM": true,
4590
+ "relativePath": [
4591
+ "dist",
4592
+ "commands",
4593
+ "sessions",
4594
+ "import.js"
4595
+ ]
4596
+ },
4597
+ "sessions:list": {
4598
+ "aliases": [],
4599
+ "args": {},
4600
+ "description": "List captured sessions",
4601
+ "examples": [
4602
+ "<%= config.bin %> sessions list",
4603
+ "<%= config.bin %> sessions list --tool claude_code",
4604
+ "<%= config.bin %> sessions list --tool codex"
4605
+ ],
4606
+ "flags": {
4607
+ "api-url": {
4608
+ "description": "Override API base URL",
4609
+ "env": "RULEMETRIC_API_URL",
4610
+ "hidden": true,
4611
+ "name": "api-url",
4612
+ "hasDynamicHelp": false,
4613
+ "multiple": false,
4614
+ "type": "option"
4615
+ },
4616
+ "tool": {
4617
+ "description": "Filter by tool (claude_code, cursor, vscode_copilot, copilot_agent, rulemetric_mcp, codex, pi, opencode, antigravity)",
4618
+ "name": "tool",
4619
+ "hasDynamicHelp": false,
4620
+ "multiple": false,
4621
+ "type": "option"
4622
+ },
4623
+ "limit": {
4624
+ "description": "Max results",
4625
+ "name": "limit",
4626
+ "default": 20,
4627
+ "hasDynamicHelp": false,
4628
+ "multiple": false,
4629
+ "type": "option"
4630
+ }
4631
+ },
4632
+ "hasDynamicHelp": false,
4633
+ "hiddenAliases": [],
4634
+ "id": "sessions:list",
4635
+ "pluginAlias": "@rulemetric/cli",
4636
+ "pluginName": "@rulemetric/cli",
4637
+ "pluginType": "core",
4638
+ "strict": true,
4639
+ "enableJsonFlag": false,
4640
+ "isESM": true,
4641
+ "relativePath": [
4642
+ "dist",
4643
+ "commands",
4644
+ "sessions",
4645
+ "list.js"
4646
+ ]
4647
+ },
4648
+ "sessions:start": {
4649
+ "aliases": [],
4650
+ "args": {},
4651
+ "description": "Start a capture session for any LLM provider (Cortex, Groq, etc.)",
4652
+ "examples": [
4653
+ "<%= config.bin %> sessions start --tool cortex",
4654
+ "<%= config.bin %> sessions start --tool groq --project-dir /path/to/project",
4655
+ "eval \"$(rulemetric proxy env --python)\" && rulemetric sessions start --tool cortex"
4656
+ ],
4657
+ "flags": {
4658
+ "api-url": {
4659
+ "description": "Override API base URL",
4660
+ "env": "RULEMETRIC_API_URL",
4661
+ "hidden": true,
4662
+ "name": "api-url",
4663
+ "hasDynamicHelp": false,
4664
+ "multiple": false,
4665
+ "type": "option"
4666
+ },
4667
+ "tool": {
4668
+ "char": "t",
4669
+ "description": "LLM provider or tool name (e.g., cortex, groq, deepseek, custom_app)",
4670
+ "name": "tool",
4671
+ "required": true,
4672
+ "hasDynamicHelp": false,
4673
+ "multiple": false,
4674
+ "type": "option"
4675
+ },
4676
+ "project-dir": {
4677
+ "char": "d",
4678
+ "description": "Project directory (defaults to cwd)",
4679
+ "name": "project-dir",
4680
+ "hasDynamicHelp": false,
4681
+ "multiple": false,
4682
+ "type": "option"
4683
+ }
4684
+ },
4685
+ "hasDynamicHelp": false,
4686
+ "hiddenAliases": [],
4687
+ "id": "sessions:start",
4688
+ "pluginAlias": "@rulemetric/cli",
4689
+ "pluginName": "@rulemetric/cli",
4690
+ "pluginType": "core",
4691
+ "strict": true,
4692
+ "enableJsonFlag": false,
4693
+ "isESM": true,
4694
+ "relativePath": [
4695
+ "dist",
4696
+ "commands",
4697
+ "sessions",
4698
+ "start.js"
4699
+ ]
4700
+ },
4641
4701
  "suggestions:accept": {
4642
4702
  "aliases": [],
4643
4703
  "args": {
@@ -4938,5 +4998,5 @@
4938
4998
  ]
4939
4999
  }
4940
5000
  },
4941
- "version": "0.19.1"
5001
+ "version": "0.20.0"
4942
5002
  }