@maind-dev/mcp-bridge 0.14.0 → 0.17.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.
package/README.md CHANGED
@@ -70,10 +70,33 @@ again unless you re-pair).
70
70
  | Command | Effect |
71
71
  |---|---|
72
72
  | `npx -y @maind-dev/mcp-bridge` | Run as MCP server (default; what your IDE invokes) |
73
+ | `npx -y @maind-dev/mcp-bridge install` | One-shot setup: MCP configs, preamble files, Claude Code hooks |
73
74
  | `npx -y @maind-dev/mcp-bridge --reauth` | Drop the cached key and re-run the device flow |
74
75
  | `npx -y @maind-dev/mcp-bridge --version` | Print the bridge version |
75
76
  | `npx -y @maind-dev/mcp-bridge --help` | Show usage |
76
77
 
78
+ ### Claude Code hook subcommands
79
+
80
+ `install` wires these into `~/.claude/settings.json` for you (consent is asked
81
+ per hook, and an absolute interpreter-pinned path is written rather than `npx`).
82
+ They read the hook payload on stdin and authenticate with the bridge's own
83
+ paired credential — there is no separate init step. Since **0.16.0** they live
84
+ here; the standalone `maind-hook` binary they came from is retired (ADR-245).
85
+
86
+ | Subcommand | Hook event | Effect |
87
+ |---|---|---|
88
+ | `on-session-start` | `SessionStart` | Open a tracked session for the flat Tier-3 metrics |
89
+ | `on-tool-use` | `PreToolUse` | Count tool calls; warn on stderr when token usage crosses your handoff thresholds (ADR-039) |
90
+ | `on-session-end` | `Stop` | Post session communication analytics; close and flush the tracked session |
91
+ | `sync-config` | — | Pull your context thresholds from the server |
92
+ | `flush` | — | Post queued Tier-3 metrics now |
93
+ | `status` | — | Show pairing, queued metrics and active thresholds |
94
+
95
+ Everything these post is gated server-side by Tier-3 consent
96
+ (<https://app.maind.dev/consent>) — with it off, the rows are dropped, by design.
97
+ Thresholds are set at <https://app.maind.dev/settings>; run `sync-config`
98
+ afterwards on each machine.
99
+
77
100
  ## Where things live
78
101
 
79
102
  | Path | Purpose |
@@ -82,6 +105,7 @@ again unless you re-pair).
82
105
  | `~/.config/maind/device-id` (Linux/BSD) | Same, on XDG-style systems |
83
106
  | `%APPDATA%\maind\device-id` (Windows) | Same, on Windows |
84
107
  | `device-id`-sibling file `api-key` | API key returned by approve flow (mode 0600) |
108
+ | `~/.maind/state.json` | Hook subcommand state: tracked sessions, queued Tier-3 metrics, synced thresholds (mode 0600) |
85
109
 
86
110
  To rebind the bridge to a different account: delete the directory above (or run
87
111
  `--reauth`) and restart the bridge.