@rulemetric/cli 0.2.4 → 0.3.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 (49) hide show
  1. package/dist/{chunk-B3HILODD.js → chunk-2BCPVUSF.js} +3 -3
  2. package/dist/{chunk-4A7FKR2O.js → chunk-42A3HEEH.js} +50 -3
  3. package/dist/chunk-42A3HEEH.js.map +7 -0
  4. package/dist/{chunk-PDURR7O3.js → chunk-46LMTDRE.js} +2 -2
  5. package/dist/{chunk-ISDA2QFX.js → chunk-4QGATD5Y.js} +209 -2
  6. package/dist/chunk-4QGATD5Y.js.map +7 -0
  7. package/dist/{chunk-PIOVE3TN.js → chunk-FUS5C4SB.js} +2 -2
  8. package/dist/{chunk-PHLMIZKM.js → chunk-JNFIYBFL.js} +30 -5
  9. package/dist/chunk-JNFIYBFL.js.map +7 -0
  10. package/dist/{chunk-JM6BQSRE.js → chunk-LCT6MT2V.js} +5 -5
  11. package/dist/{chunk-RDIH4AG2.js → chunk-MTLAIJED.js} +3 -3
  12. package/dist/{chunk-NIDLJO6F.js → chunk-QSN77T7C.js} +23 -1
  13. package/dist/{chunk-NIDLJO6F.js.map → chunk-QSN77T7C.js.map} +2 -2
  14. package/dist/{chunk-ELL34R3K.js → chunk-XMWHTOCC.js} +3 -3
  15. package/dist/{chunk-3LHLSY7V.js → chunk-Y2ARLMWZ.js} +3 -3
  16. package/dist/{chunk-3IU7GFXS.js → chunk-YEBBX4HQ.js} +2 -2
  17. package/dist/commands/evals/agent.js +9 -11
  18. package/dist/commands/evals/agent.js.map +2 -2
  19. package/dist/commands/hooks/install.js +1 -1
  20. package/dist/commands/service/install.js +180 -11
  21. package/dist/commands/service/install.js.map +2 -2
  22. package/dist/commands/service/uninstall.js +33 -2
  23. package/dist/commands/service/uninstall.js.map +2 -2
  24. package/dist/dashboard/Dashboard.js +3 -3
  25. package/dist/dashboard/data.js +2 -2
  26. package/dist/{dist-I6BCOLNG.js → dist-NEECHU47.js} +6 -2
  27. package/dist/lib/agent-loop.js +9 -9
  28. package/dist/lib/handlers/process-announcement.js +3 -3
  29. package/dist/lib/handlers/process-changelog.js +3 -3
  30. package/dist/lib/handlers/process-launch.js +3 -3
  31. package/dist/lib/handlers/process-run-cleanup.js +4 -4
  32. package/dist/lib/handlers/process-session-goal.js +2 -2
  33. package/dist/lib/manual-tasks.js +3 -3
  34. package/dist/lib/statusline-shim.js +1 -1
  35. package/dist/lib/worktree.js +2 -2
  36. package/oclif.manifest.json +11 -4
  37. package/package.json +18 -15
  38. package/dist/chunk-4A7FKR2O.js.map +0 -7
  39. package/dist/chunk-ISDA2QFX.js.map +0 -7
  40. package/dist/chunk-PHLMIZKM.js.map +0 -7
  41. /package/dist/{chunk-B3HILODD.js.map → chunk-2BCPVUSF.js.map} +0 -0
  42. /package/dist/{chunk-PDURR7O3.js.map → chunk-46LMTDRE.js.map} +0 -0
  43. /package/dist/{chunk-PIOVE3TN.js.map → chunk-FUS5C4SB.js.map} +0 -0
  44. /package/dist/{chunk-JM6BQSRE.js.map → chunk-LCT6MT2V.js.map} +0 -0
  45. /package/dist/{chunk-RDIH4AG2.js.map → chunk-MTLAIJED.js.map} +0 -0
  46. /package/dist/{chunk-ELL34R3K.js.map → chunk-XMWHTOCC.js.map} +0 -0
  47. /package/dist/{chunk-3LHLSY7V.js.map → chunk-Y2ARLMWZ.js.map} +0 -0
  48. /package/dist/{chunk-3IU7GFXS.js.map → chunk-YEBBX4HQ.js.map} +0 -0
  49. /package/dist/{dist-I6BCOLNG.js.map → dist-NEECHU47.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/commands/service/uninstall.ts"],
4
- "sourcesContent": ["import { existsSync, unlinkSync } from 'node:fs';\nimport { execSync, execFileSync } from 'node:child_process';\nimport { homedir } from 'node:os';\nimport { join } from 'node:path';\nimport { BaseCommand } from '../../base-command.js';\n\n// Every plist label that `service install` may have written. Keeping these in\n// one ordered list lets uninstall march through them with the same teardown\n// logic; if install ever adds a fifth service, this is the only file that\n// needs to learn about it.\nconst SERVICES: Array<{ label: string; description: string }> = [\n { label: 'com.rulemetric.api', description: 'API' },\n { label: 'com.rulemetric.worker', description: 'Worker' },\n { label: 'com.rulemetric.gateway', description: 'Gateway' },\n { label: 'com.rulemetric.proxy', description: 'Proxy' },\n // Legacy daily worker-restart agent \u2014 install removes any stale copy,\n // but uninstall still cleans it up so a user running uninstall on an\n // older box gets a fully clean state.\n { label: 'com.rulemetric.worker.restart', description: 'Worker restart agent' },\n];\n\nfunction plistPathFor(label: string): string {\n return join(homedir(), 'Library', 'LaunchAgents', `${label}.plist`);\n}\n\nexport default class ServiceUninstall extends BaseCommand {\n static override description = 'Remove all RuleMetric launchd services (API, worker, gateway, proxy)';\n\n async run(): Promise<void> {\n if (process.platform !== 'darwin') {\n this.error('Service uninstall is currently macOS-only.');\n }\n\n const installed = SERVICES.filter((s) => existsSync(plistPathFor(s.label)));\n if (installed.length === 0) {\n this.log('No RuleMetric services are installed.');\n return;\n }\n\n const uid = execSync('id -u', { encoding: 'utf-8' }).trim();\n\n for (const svc of installed) {\n const path = plistPathFor(svc.label);\n this.stopService(uid, path, svc.label, svc.description);\n this.removePlist(path, svc.description);\n }\n\n this.log('');\n this.log('All RuleMetric services removed. They will no longer start automatically.');\n this.log('Use scripts/start.sh (dev) or `rulemetric service install` (always-on) to bring them back.');\n }\n\n private stopService(uid: string, plistPath: string, label: string, description: string): void {\n try {\n execFileSync('launchctl', ['bootout', `gui/${uid}`, plistPath], { encoding: 'utf-8' });\n this.log(`[OK] ${description} stopped`);\n return;\n } catch {\n // Fall through to legacy unload\n }\n try {\n execFileSync('launchctl', ['unload', plistPath], { encoding: 'utf-8' });\n this.log(`[OK] ${description} stopped (legacy)`);\n return;\n } catch {\n // Verify whether it's actually running. launchctl list returns the\n // current state; if there's no PID, the service wasn't running and\n // both bootout/unload no-op'd legitimately.\n try {\n const output = execSync(`launchctl list ${label} 2>&1`, { encoding: 'utf-8' });\n if (output.includes('PID')) {\n this.warn(`${description} appears to still be running. Try manually:`);\n this.warn(` launchctl bootout gui/${uid} \"${plistPath}\"`);\n } else {\n this.log(`[OK] ${description} was not running`);\n }\n } catch {\n this.log(`[OK] ${description} was not running`);\n }\n }\n }\n\n private removePlist(plistPath: string, description: string): void {\n try {\n unlinkSync(plistPath);\n this.log(`[OK] Removed ${plistPath}`);\n } catch (err) {\n this.warn(`Could not remove ${description} plist: ${(err as Error).message}. Try: rm \"${plistPath}\"`);\n }\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;AAAA,SAAS,YAAY,kBAAkB;AACvC,SAAS,UAAU,oBAAoB;AACvC,SAAS,eAAe;AACxB,SAAS,YAAY;AAOrB,IAAM,WAA0D;AAAA,EAC9D,EAAE,OAAO,sBAA0B,aAAa,MAAU;AAAA,EAC1D,EAAE,OAAO,yBAA0B,aAAa,SAAU;AAAA,EAC1D,EAAE,OAAO,0BAA0B,aAAa,UAAU;AAAA,EAC1D,EAAE,OAAO,wBAA0B,aAAa,QAAU;AAAA;AAAA;AAAA;AAAA,EAI1D,EAAE,OAAO,iCAAiC,aAAa,uBAAuB;AAChF;AAEA,SAAS,aAAa,OAAuB;AAC3C,SAAO,KAAK,QAAQ,GAAG,WAAW,gBAAgB,GAAG,KAAK,QAAQ;AACpE;AAEA,IAAqB,mBAArB,cAA8C,YAAY;AAAA,EACxD,OAAgB,cAAc;AAAA,EAE9B,MAAM,MAAqB;AACzB,QAAI,QAAQ,aAAa,UAAU;AACjC,WAAK,MAAM,4CAA4C;AAAA,IACzD;AAEA,UAAM,YAAY,SAAS,OAAO,CAAC,MAAM,WAAW,aAAa,EAAE,KAAK,CAAC,CAAC;AAC1E,QAAI,UAAU,WAAW,GAAG;AAC1B,WAAK,IAAI,uCAAuC;AAChD;AAAA,IACF;AAEA,UAAM,MAAM,SAAS,SAAS,EAAE,UAAU,QAAQ,CAAC,EAAE,KAAK;AAE1D,eAAW,OAAO,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import { execSync, execFileSync } from 'node:child_process';\nimport { homedir } from 'node:os';\nimport { join } from 'node:path';\nimport { BaseCommand } from '../../base-command.js';\n\n// Every plist label that `service install` may have written. Keeping these in\n// one ordered list lets uninstall march through them with the same teardown\n// logic; if install ever adds a fifth service, this is the only file that\n// needs to learn about it.\nconst SERVICES: Array<{ label: string; description: string }> = [\n { label: 'com.rulemetric.api', description: 'API' },\n { label: 'com.rulemetric.worker', description: 'Worker' },\n { label: 'com.rulemetric.gateway', description: 'Gateway' },\n { label: 'com.rulemetric.proxy', description: 'Proxy' },\n // Legacy daily worker-restart agent \u2014 install removes any stale copy,\n // but uninstall still cleans it up so a user running uninstall on an\n // older box gets a fully clean state.\n { label: 'com.rulemetric.worker.restart', description: 'Worker restart agent' },\n];\n\nfunction plistPathFor(label: string): string {\n return join(homedir(), 'Library', 'LaunchAgents', `${label}.plist`);\n}\n\n// Linux systemd --user unit written by `service install --worker-only`. Kept in\n// sync with the constants in install.ts.\nconst WORKER_SYSTEMD_UNIT = 'rulemetric-worker.service';\nconst WORKER_SYSTEMD_PATH = join(homedir(), '.config', 'systemd', 'user', WORKER_SYSTEMD_UNIT);\n\nexport default class ServiceUninstall extends BaseCommand {\n static override description = 'Remove RuleMetric services (macOS launchd: API/worker/gateway/proxy; Linux: the --worker-only systemd unit)';\n\n async run(): Promise<void> {\n // Linux: only the worker-only systemd unit can exist here.\n if (process.platform === 'linux') {\n this.uninstallLinuxWorker();\n return;\n }\n if (process.platform !== 'darwin') {\n this.error('Service uninstall supports macOS (launchd) and Linux (systemd) only.');\n }\n\n const installed = SERVICES.filter((s) => existsSync(plistPathFor(s.label)));\n if (installed.length === 0) {\n this.log('No RuleMetric services are installed.');\n return;\n }\n\n const uid = execSync('id -u', { encoding: 'utf-8' }).trim();\n\n for (const svc of installed) {\n const path = plistPathFor(svc.label);\n this.stopService(uid, path, svc.label, svc.description);\n this.removePlist(path, svc.description);\n }\n\n this.log('');\n this.log('All RuleMetric services removed. They will no longer start automatically.');\n this.log('Use scripts/start.sh (dev) or `rulemetric service install` (always-on) to bring them back.');\n }\n\n private stopService(uid: string, plistPath: string, label: string, description: string): void {\n try {\n execFileSync('launchctl', ['bootout', `gui/${uid}`, plistPath], { encoding: 'utf-8' });\n this.log(`[OK] ${description} stopped`);\n return;\n } catch {\n // Fall through to legacy unload\n }\n try {\n execFileSync('launchctl', ['unload', plistPath], { encoding: 'utf-8' });\n this.log(`[OK] ${description} stopped (legacy)`);\n return;\n } catch {\n // Verify whether it's actually running. launchctl list returns the\n // current state; if there's no PID, the service wasn't running and\n // both bootout/unload no-op'd legitimately.\n try {\n const output = execSync(`launchctl list ${label} 2>&1`, { encoding: 'utf-8' });\n if (output.includes('PID')) {\n this.warn(`${description} appears to still be running. Try manually:`);\n this.warn(` launchctl bootout gui/${uid} \"${plistPath}\"`);\n } else {\n this.log(`[OK] ${description} was not running`);\n }\n } catch {\n this.log(`[OK] ${description} was not running`);\n }\n }\n }\n\n private removePlist(plistPath: string, description: string): void {\n try {\n unlinkSync(plistPath);\n this.log(`[OK] Removed ${plistPath}`);\n } catch (err) {\n this.warn(`Could not remove ${description} plist: ${(err as Error).message}. Try: rm \"${plistPath}\"`);\n }\n }\n\n private uninstallLinuxWorker(): void {\n if (!existsSync(WORKER_SYSTEMD_PATH)) {\n this.log('No RuleMetric worker is installed (no systemd unit found).');\n return;\n }\n try {\n execFileSync('systemctl', ['--user', 'disable', '--now', WORKER_SYSTEMD_UNIT], { encoding: 'utf-8' });\n this.log('[OK] Worker stopped + disabled (systemctl --user)');\n } catch (err) {\n this.warn(`Could not disable the worker unit: ${(err as Error).message}`);\n this.warn(` systemctl --user disable --now ${WORKER_SYSTEMD_UNIT}`);\n }\n try {\n unlinkSync(WORKER_SYSTEMD_PATH);\n this.log(`[OK] Removed ${WORKER_SYSTEMD_PATH}`);\n } catch (err) {\n this.warn(`Could not remove ${WORKER_SYSTEMD_PATH}: ${(err as Error).message}. Try: rm \"${WORKER_SYSTEMD_PATH}\"`);\n }\n try {\n execFileSync('systemctl', ['--user', 'daemon-reload'], { encoding: 'utf-8' });\n } catch {\n // best-effort\n }\n this.log('');\n this.log('RuleMetric worker removed. It will no longer start automatically.');\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;AAAA,SAAS,YAAY,kBAAkB;AACvC,SAAS,UAAU,oBAAoB;AACvC,SAAS,eAAe;AACxB,SAAS,YAAY;AAOrB,IAAM,WAA0D;AAAA,EAC9D,EAAE,OAAO,sBAA0B,aAAa,MAAU;AAAA,EAC1D,EAAE,OAAO,yBAA0B,aAAa,SAAU;AAAA,EAC1D,EAAE,OAAO,0BAA0B,aAAa,UAAU;AAAA,EAC1D,EAAE,OAAO,wBAA0B,aAAa,QAAU;AAAA;AAAA;AAAA;AAAA,EAI1D,EAAE,OAAO,iCAAiC,aAAa,uBAAuB;AAChF;AAEA,SAAS,aAAa,OAAuB;AAC3C,SAAO,KAAK,QAAQ,GAAG,WAAW,gBAAgB,GAAG,KAAK,QAAQ;AACpE;AAIA,IAAM,sBAAsB;AAC5B,IAAM,sBAAsB,KAAK,QAAQ,GAAG,WAAW,WAAW,QAAQ,mBAAmB;AAE7F,IAAqB,mBAArB,cAA8C,YAAY;AAAA,EACxD,OAAgB,cAAc;AAAA,EAE9B,MAAM,MAAqB;AAEzB,QAAI,QAAQ,aAAa,SAAS;AAChC,WAAK,qBAAqB;AAC1B;AAAA,IACF;AACA,QAAI,QAAQ,aAAa,UAAU;AACjC,WAAK,MAAM,sEAAsE;AAAA,IACnF;AAEA,UAAM,YAAY,SAAS,OAAO,CAAC,MAAM,WAAW,aAAa,EAAE,KAAK,CAAC,CAAC;AAC1E,QAAI,UAAU,WAAW,GAAG;AAC1B,WAAK,IAAI,uCAAuC;AAChD;AAAA,IACF;AAEA,UAAM,MAAM,SAAS,SAAS,EAAE,UAAU,QAAQ,CAAC,EAAE,KAAK;AAE1D,eAAW,OAAO,WAAW;AAC3B,YAAM,OAAO,aAAa,IAAI,KAAK;AACnC,WAAK,YA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AI;AACF,mBAAa,aAAa,CAAC,UAAU,WAAW,SAAS,mBAAmB,GAAG,EAAE,UAAU,QAAQ,CAAC;AACpG,WAAK,IAAI,mDAAmD;AAAA,IAC9D,SAAS,KAAK;AACZ,WAAK,KAAK,sCAAuC,IAAc,OAAO,EAAE;AACxE,WAAK,KAAK,oCAAoC,mBAAmB,EAAE;AAAA,IACrE;AACA,QAAI;AACF,iBAAW,mBAAmB;AAC9B,WAAK,IAAI,gBAAgB,mBAAmB,EAAE;AAAA,IAChD,SAAS,KAAK;AACZ,WAAK,KAAK,oBAAoB,mBAAmB,KAAM,IAAc,OAAO,cAAc,mBAAmB,GAAG;AAAA,IAClH;AACA,QAAI;AACF,mBAAa,aAAa,CAAC,UAAU,eAAe,GAAG,EAAE,UAAU,QAAQ,CAAC;AAAA,IAC9E,QAAQ;AAAA,IAER;AACA,SAAK,IAAI,EAAE;AACX,SAAK,IAAI,mEAAmE;AAAA,EAC9E;AACF;",
6
6
  "names": []
7
7
  }
@@ -18,7 +18,7 @@ import {
18
18
  loadApiInsights,
19
19
  loadLinkedInstructions,
20
20
  loadLocalStats
21
- } from "../chunk-PDURR7O3.js";
21
+ } from "../chunk-46LMTDRE.js";
22
22
  import {
23
23
  LauncherOverlay
24
24
  } from "../chunk-CROYS75W.js";
@@ -33,7 +33,7 @@ import {
33
33
  PERIODS,
34
34
  PERIOD_LABELS
35
35
  } from "../chunk-QJQS6TUN.js";
36
- import "../chunk-ISDA2QFX.js";
36
+ import "../chunk-4QGATD5Y.js";
37
37
  import {
38
38
  readActiveOrg
39
39
  } from "../chunk-EKJ2CABV.js";
@@ -149,7 +149,7 @@ function InteractiveDashboard({ initialLocal, initialApi, initialInstructions, i
149
149
  return;
150
150
  }
151
151
  if (input === "n") {
152
- import("../dist-I6BCOLNG.js").then(({ getLauncher }) => {
152
+ import("../dist-NEECHU47.js").then(({ getLauncher }) => {
153
153
  getLauncher("claude_code").launch({ projectPath: process.cwd(), mode: "interactive" });
154
154
  });
155
155
  return;
@@ -2,8 +2,8 @@ import {
2
2
  loadApiInsights,
3
3
  loadLinkedInstructions,
4
4
  loadLocalStats
5
- } from "../chunk-PDURR7O3.js";
6
- import "../chunk-ISDA2QFX.js";
5
+ } from "../chunk-46LMTDRE.js";
6
+ import "../chunk-4QGATD5Y.js";
7
7
  import "../chunk-NSBPE2FW.js";
8
8
  export {
9
9
  loadApiInsights,
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  ClaudeCodeAdapter,
3
+ CodexAdapter,
3
4
  CopilotAgentAdapter,
4
5
  CursorAdapter,
5
6
  RuleMetricMcpAdapter,
@@ -13,6 +14,7 @@ import {
13
14
  buildTmuxSendKeysArgs,
14
15
  detectTool,
15
16
  discoverAllSessions,
17
+ freshCodexState,
16
18
  getAdapter,
17
19
  getAllProviders,
18
20
  getAvailableLaunchers,
@@ -22,10 +24,11 @@ import {
22
24
  sanitizeBranch,
23
25
  sanitizeTmuxName,
24
26
  worktreePathFor
25
- } from "./chunk-ISDA2QFX.js";
27
+ } from "./chunk-4QGATD5Y.js";
26
28
  import "./chunk-NSBPE2FW.js";
27
29
  export {
28
30
  ClaudeCodeAdapter,
31
+ CodexAdapter,
29
32
  CopilotAgentAdapter,
30
33
  CursorAdapter,
31
34
  RuleMetricMcpAdapter,
@@ -39,6 +42,7 @@ export {
39
42
  buildTmuxSendKeysArgs,
40
43
  detectTool,
41
44
  discoverAllSessions,
45
+ freshCodexState,
42
46
  getAdapter,
43
47
  getAllProviders,
44
48
  getAvailableLaunchers,
@@ -49,4 +53,4 @@ export {
49
53
  sanitizeTmuxName,
50
54
  worktreePathFor
51
55
  };
52
- //# sourceMappingURL=dist-I6BCOLNG.js.map
56
+ //# sourceMappingURL=dist-NEECHU47.js.map
@@ -3,22 +3,22 @@ import {
3
3
  HANDLERS,
4
4
  pollForWork,
5
5
  runAgentLoop
6
- } from "../chunk-JM6BQSRE.js";
6
+ } from "../chunk-LCT6MT2V.js";
7
7
  import "../chunk-JX5UI6RW.js";
8
8
  import "../chunk-EHABPBGH.js";
9
- import "../chunk-ELL34R3K.js";
10
- import "../chunk-3LHLSY7V.js";
11
- import "../chunk-PIOVE3TN.js";
9
+ import "../chunk-XMWHTOCC.js";
10
+ import "../chunk-Y2ARLMWZ.js";
11
+ import "../chunk-FUS5C4SB.js";
12
12
  import "../chunk-W53GKIZQ.js";
13
- import "../chunk-3IU7GFXS.js";
13
+ import "../chunk-YEBBX4HQ.js";
14
14
  import "../chunk-XZXS2W24.js";
15
15
  import "../chunk-RQ2TMLKG.js";
16
16
  import "../chunk-YBNW7ARH.js";
17
17
  import "../chunk-FZKLLNDS.js";
18
- import "../chunk-B3HILODD.js";
18
+ import "../chunk-2BCPVUSF.js";
19
19
  import "../chunk-K3BFZ7KG.js";
20
- import "../chunk-NIDLJO6F.js";
21
- import "../chunk-4A7FKR2O.js";
20
+ import "../chunk-QSN77T7C.js";
21
+ import "../chunk-42A3HEEH.js";
22
22
  import "../chunk-BD7CY42U.js";
23
23
  import "../chunk-QJXAULRC.js";
24
24
  import "../chunk-DGHWRQXL.js";
@@ -26,7 +26,7 @@ import "../chunk-J7N3DLH6.js";
26
26
  import "../chunk-52WIYRZH.js";
27
27
  import "../chunk-IWYCRLEK.js";
28
28
  import "../chunk-EKP32DLN.js";
29
- import "../chunk-ISDA2QFX.js";
29
+ import "../chunk-4QGATD5Y.js";
30
30
  import "../chunk-OQSQC7VB.js";
31
31
  import "../chunk-KRBQLMOP.js";
32
32
  import "../chunk-3TIMQ3O6.js";
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  processAnnouncement
3
- } from "../../chunk-B3HILODD.js";
4
- import "../../chunk-NIDLJO6F.js";
5
- import "../../chunk-4A7FKR2O.js";
3
+ } from "../../chunk-2BCPVUSF.js";
4
+ import "../../chunk-QSN77T7C.js";
5
+ import "../../chunk-42A3HEEH.js";
6
6
  import "../../chunk-DGHWRQXL.js";
7
7
  import "../../chunk-NSBPE2FW.js";
8
8
  export {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  processChangelog
3
- } from "../../chunk-RDIH4AG2.js";
3
+ } from "../../chunk-MTLAIJED.js";
4
4
  import "../../chunk-K3BFZ7KG.js";
5
- import "../../chunk-NIDLJO6F.js";
6
- import "../../chunk-4A7FKR2O.js";
5
+ import "../../chunk-QSN77T7C.js";
6
+ import "../../chunk-42A3HEEH.js";
7
7
  import "../../chunk-NSBPE2FW.js";
8
8
  export {
9
9
  processChangelog
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  processLaunch,
3
3
  resolveWorktreeForLaunch
4
- } from "../../chunk-ELL34R3K.js";
5
- import "../../chunk-PIOVE3TN.js";
4
+ } from "../../chunk-XMWHTOCC.js";
5
+ import "../../chunk-FUS5C4SB.js";
6
6
  import "../../chunk-DGHWRQXL.js";
7
- import "../../chunk-ISDA2QFX.js";
7
+ import "../../chunk-4QGATD5Y.js";
8
8
  import "../../chunk-KRBQLMOP.js";
9
9
  import "../../chunk-EJOI2ZGU.js";
10
10
  import "../../chunk-KZRFUXGF.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  processRunCleanup
3
- } from "../../chunk-3LHLSY7V.js";
4
- import "../../chunk-PIOVE3TN.js";
5
- import "../../chunk-4A7FKR2O.js";
3
+ } from "../../chunk-Y2ARLMWZ.js";
4
+ import "../../chunk-FUS5C4SB.js";
5
+ import "../../chunk-42A3HEEH.js";
6
6
  import "../../chunk-DGHWRQXL.js";
7
- import "../../chunk-ISDA2QFX.js";
7
+ import "../../chunk-4QGATD5Y.js";
8
8
  import "../../chunk-KRBQLMOP.js";
9
9
  import "../../chunk-NSBPE2FW.js";
10
10
  export {
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  processSessionGoal
3
- } from "../../chunk-3IU7GFXS.js";
3
+ } from "../../chunk-YEBBX4HQ.js";
4
4
  import "../../chunk-FZKLLNDS.js";
5
- import "../../chunk-4A7FKR2O.js";
5
+ import "../../chunk-42A3HEEH.js";
6
6
  import "../../chunk-KRBQLMOP.js";
7
7
  import "../../chunk-NSBPE2FW.js";
8
8
  export {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  processChangelog
3
- } from "../chunk-RDIH4AG2.js";
3
+ } from "../chunk-MTLAIJED.js";
4
4
  import {
5
5
  cronRefreshSkills
6
6
  } from "../chunk-RQ2TMLKG.js";
@@ -9,8 +9,8 @@ import {
9
9
  } from "../chunk-YBNW7ARH.js";
10
10
  import "../chunk-FZKLLNDS.js";
11
11
  import "../chunk-K3BFZ7KG.js";
12
- import "../chunk-NIDLJO6F.js";
13
- import "../chunk-4A7FKR2O.js";
12
+ import "../chunk-QSN77T7C.js";
13
+ import "../chunk-42A3HEEH.js";
14
14
  import "../chunk-EKP32DLN.js";
15
15
  import "../chunk-OQSQC7VB.js";
16
16
  import "../chunk-KRBQLMOP.js";
@@ -4,7 +4,7 @@ import {
4
4
  isStatuslineShimInstalled,
5
5
  readCurrentStatusLine,
6
6
  writeStatuslineShim
7
- } from "../chunk-PHLMIZKM.js";
7
+ } from "../chunk-JNFIYBFL.js";
8
8
  import "../chunk-NSBPE2FW.js";
9
9
  export {
10
10
  STATUSLINE_SETTINGS_VALUE,
@@ -2,10 +2,10 @@ import {
2
2
  ensureWorktree,
3
3
  removeWorktree,
4
4
  runGit
5
- } from "../chunk-PIOVE3TN.js";
5
+ } from "../chunk-FUS5C4SB.js";
6
6
  import {
7
7
  sanitizeBranch
8
- } from "../chunk-ISDA2QFX.js";
8
+ } from "../chunk-4QGATD5Y.js";
9
9
  import "../chunk-KRBQLMOP.js";
10
10
  import "../chunk-NSBPE2FW.js";
11
11
  export {
@@ -3012,12 +3012,13 @@
3012
3012
  "service:install": {
3013
3013
  "aliases": [],
3014
3014
  "args": {},
3015
- "description": "Install RuleMetric API, worker, gateway, and capture proxy as persistent macOS launchd services",
3015
+ "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).",
3016
3016
  "examples": [
3017
3017
  "<%= config.bin %> service install",
3018
3018
  "<%= config.bin %> service install --port 3000",
3019
3019
  "<%= config.bin %> service install --skip-build",
3020
- "<%= config.bin %> service install --no-proxy"
3020
+ "<%= config.bin %> service install --no-proxy",
3021
+ "<%= config.bin %> service install --worker-only"
3021
3022
  ],
3022
3023
  "flags": {
3023
3024
  "api-url": {
@@ -3056,6 +3057,12 @@
3056
3057
  "name": "no-proxy",
3057
3058
  "allowNo": false,
3058
3059
  "type": "boolean"
3060
+ },
3061
+ "worker-only": {
3062
+ "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).",
3063
+ "name": "worker-only",
3064
+ "allowNo": false,
3065
+ "type": "boolean"
3059
3066
  }
3060
3067
  },
3061
3068
  "hasDynamicHelp": false,
@@ -3108,7 +3115,7 @@
3108
3115
  "service:uninstall": {
3109
3116
  "aliases": [],
3110
3117
  "args": {},
3111
- "description": "Remove all RuleMetric launchd services (API, worker, gateway, proxy)",
3118
+ "description": "Remove RuleMetric services (macOS launchd: API/worker/gateway/proxy; Linux: the --worker-only systemd unit)",
3112
3119
  "flags": {
3113
3120
  "api-url": {
3114
3121
  "description": "Override API base URL",
@@ -3956,5 +3963,5 @@
3956
3963
  ]
3957
3964
  }
3958
3965
  },
3959
- "version": "0.2.4"
3966
+ "version": "0.3.0"
3960
3967
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rulemetric/cli",
3
- "version": "0.2.4",
3
+ "version": "0.3.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -53,6 +53,13 @@
53
53
  "@oclif/plugin-help": "^6.2.0",
54
54
  "@oclif/plugin-not-found": "^3.2.0",
55
55
  "@oclif/table": "^0.3.0",
56
+ "@opentelemetry/api": "^1.9.0",
57
+ "@opentelemetry/exporter-trace-otlp-http": "^0.57.0",
58
+ "@opentelemetry/resources": "^1.30.0",
59
+ "@opentelemetry/sdk-node": "^0.57.0",
60
+ "@opentelemetry/sdk-trace-node": "^1.30.0",
61
+ "@opentelemetry/semantic-conventions": "^1.28.0",
62
+ "@sentry/node": "^8.42.0",
56
63
  "@supabase/supabase-js": "^2.95.0",
57
64
  "drizzle-orm": "^0.44.0",
58
65
  "gray-matter": "^4.0.3",
@@ -60,40 +67,36 @@
60
67
  "ink-select-input": "^6.2.0",
61
68
  "ink-spinner": "^5.0.0",
62
69
  "ink-text-input": "^6.0.0",
70
+ "postgres": "^3.4.0",
63
71
  "react": "^19.0.0",
64
72
  "zod": "^3.24.0",
65
- "@rulemetric/proxy": "0.2.4",
66
- "@rulemetric/skills-registry": "0.2.4",
67
- "@rulemetric/hooks": "0.2.4"
73
+ "@rulemetric/hooks": "0.3.0",
74
+ "@rulemetric/proxy": "0.3.0",
75
+ "@rulemetric/skills-registry": "0.3.0"
76
+ },
77
+ "//deps": "Worker (`evals agent`) runtime deps: the @opentelemetry/* set, @sentry/node, and postgres are STATIC top-level imports loaded at worker startup (via bundled @rulemetric/{telemetry,db}) — they MUST be runtime deps or a clean `npm i -g` crashes with ModuleLoadError. `better-sqlite3` is optionalDependencies (below): it's a native module, lazy `require()`'d inside a try/catch (packages/session providers cursor/opencode) so a missing binary degrades gracefully — making it a hard dep would break `npm i -g` on platforms without prebuilt binaries. `resend` stays a devDep: lazy `await import('resend')` guarded by RESEND_API_KEY, which end-user workers never set (provider falls back to noop). Classification verified via import-graph scan of dist/commands/evals/agent.js + per-importer static/lazy check.",
78
+ "optionalDependencies": {
79
+ "better-sqlite3": "^11.0.0"
68
80
  },
69
81
  "devDependencies": {
70
82
  "@hono/node-server": "^1.13.0",
71
83
  "@oclif/test": "^4.1.0",
72
- "@opentelemetry/api": "^1.9.0",
73
- "@opentelemetry/exporter-trace-otlp-http": "^0.57.0",
74
- "@opentelemetry/resources": "^1.30.0",
75
- "@opentelemetry/sdk-node": "^0.57.0",
76
- "@opentelemetry/sdk-trace-node": "^1.30.0",
77
- "@opentelemetry/semantic-conventions": "^1.28.0",
78
- "@sentry/node": "^8.42.0",
79
84
  "@types/node": "^22.0.0",
80
85
  "@types/react": "^19.0.0",
81
- "better-sqlite3": "^11.0.0",
82
86
  "esbuild": "^0.25.0",
83
87
  "ink-testing-library": "^4.0.0",
84
88
  "oclif": "^4.17.0",
85
- "postgres": "^3.4.0",
86
89
  "resend": "^4.0.0",
87
90
  "tsx": "^4.19.0",
88
91
  "typescript": "^5.9.0",
89
92
  "vitest": "^3.2.0",
90
93
  "@rulemetric/api": "0.0.1",
91
94
  "@rulemetric/core": "0.0.1",
92
- "@rulemetric/db": "0.0.1",
93
95
  "@rulemetric/email": "0.0.1",
96
+ "@rulemetric/session": "0.2.1",
94
97
  "@rulemetric/telemetry": "0.0.1",
95
98
  "@rulemetric/typescript-config": "0.0.0",
96
- "@rulemetric/session": "0.2.1"
99
+ "@rulemetric/db": "0.0.1"
97
100
  },
98
101
  "scripts": {
99
102
  "build": "node scripts/build.mjs",