@lineman-io/mcp 2.3.0 → 2.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +44 -12
- package/dist/main.js +7 -1
- package/hooks/core/lineman-config.mjs +1 -1
- package/hooks/lineman-call.mjs +1 -1
- package/package.json +21 -2
- package/skills/telemetry/SKILL.md +58 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{readFileSync as
|
|
1
|
+
import{readFileSync as r}from"node:fs";import{homedir as e}from"node:os";import{join as o}from"node:path";const n=o(e(),".goodex","lineman.json");function t(r,e){return"string"==typeof r[e]?r[e]:null}export function loadLinemanConfig(){let e={};try{e=JSON.parse(r(n,"utf-8"))}catch{}const o=process.env.LINEMAN_API_TOKEN??t(e,"apiToken"),s=process.env.LINEMAN_DATA_API_URL??t(e,"dataApiUrl")??process.env.LINEMAN_SERVER_URL??t(e,"serverUrl"),p=process.env.LINEMAN_DATA_STREAM_API_URL??t(e,"dataStreamApiUrl")??s,A=process.env.LINEMAN_CONTROL_API_URL??t(e,"controlApiUrl")??process.env.LINEMAN_SERVER_URL??t(e,"serverUrl");return s&&o?{serverUrl:t(e,"serverUrl")??s,dataApiUrl:s,dataStreamApiUrl:p,controlApiUrl:A??s,apiToken:o}:null}
|
package/hooks/lineman-call.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{loadLinemanConfig as t}from"./core/lineman-config.mjs";import{MCP_SERVER_NAME as n,MCP_TOOL_NAME as e,MCP_TOOL_PREFIX as o}from"./core/tool-naming.mjs";function r(){return t()}export function loadHookConfig(){return r()}export function isEnabled(){return"false"!==process.env.LINEMAN_ENABLED}export async function callLineman(t,n,e={},o={}){const a=r();if(!a)return null;const i=o.timeoutMs??3e4;let l,
|
|
1
|
+
import{loadLinemanConfig as t}from"./core/lineman-config.mjs";import{MCP_SERVER_NAME as n,MCP_TOOL_NAME as e,MCP_TOOL_PREFIX as o}from"./core/tool-naming.mjs";function r(){return t()}export function loadHookConfig(){return r()}export function isEnabled(){return"false"!==process.env.LINEMAN_ENABLED}export async function callLineman(t,n,e={},o={}){const a=r();if(!a)return null;const i=o.timeoutMs??3e4;let l,u;try{l=await fetch(`${a.dataApiUrl}/lineman/execute`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${a.apiToken}`},body:JSON.stringify({task_type:t,content:n,params:e}),signal:AbortSignal.timeout(i)})}catch{return null}if(!l.ok)return null;try{u=await l.json()}catch{return null}return"success"!==u?.metadata?.status?null:u.shaped_result??null}export function loadHooksConfig(){return{toolPrefix:o,toolName:e,serverName:n}}
|
package/package.json
CHANGED
|
@@ -1,7 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lineman-io/mcp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.2",
|
|
4
4
|
"description": "Lineman MCP server — AI-powered code intelligence for Claude Code",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"homepage": "https://lineman.io",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/lineman-io/lineman-mono",
|
|
10
|
+
"directory": "apps/lineman/mcp"
|
|
11
|
+
},
|
|
12
|
+
"bugs": "https://github.com/lineman-io/lineman-mono/issues",
|
|
13
|
+
"author": {
|
|
14
|
+
"name": "Lineman",
|
|
15
|
+
"url": "https://lineman.io"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"mcp",
|
|
19
|
+
"claude-code",
|
|
20
|
+
"context-window",
|
|
21
|
+
"secondary-llm",
|
|
22
|
+
"token-saving"
|
|
23
|
+
],
|
|
5
24
|
"type": "module",
|
|
6
25
|
"bin": {
|
|
7
26
|
"lineman-mcp": "./dist/main.js"
|
|
@@ -20,7 +39,7 @@
|
|
|
20
39
|
"zod": "^3.25.76"
|
|
21
40
|
},
|
|
22
41
|
"publishConfig": {
|
|
23
|
-
"access": "
|
|
42
|
+
"access": "public",
|
|
24
43
|
"registry": "https://registry.npmjs.org/"
|
|
25
44
|
},
|
|
26
45
|
"engines": {
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: telemetry
|
|
3
|
+
description: "View or change Lineman's telemetry consent — show what we send to Sentry and let the user opt out. Use when the user types '/lineman:telemetry', asks to 'turn telemetry on/off', 'disable analytics', 'opt out of telemetry', 'stop sending data to lineman', or asks 'what does lineman send to sentry'."
|
|
4
|
+
user-invocable: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Lineman telemetry
|
|
8
|
+
|
|
9
|
+
Show the user what Lineman sends to Sentry, and let them flip their consent. The actual mechanics are in the `telemetry` MCP tool — this skill is the model-facing wrapper that interprets the user's intent (`on` / `off` / "what do you send?") and dispatches accordingly.
|
|
10
|
+
|
|
11
|
+
## How telemetry works
|
|
12
|
+
|
|
13
|
+
Lineman MCP sends a small, anonymous stream of operational telemetry to Sentry so we can detect outages, fix bugs, and measure activation. We **never** send raw prompts, source code, file contents, or environment variable values.
|
|
14
|
+
|
|
15
|
+
What we send (per LIN-523):
|
|
16
|
+
|
|
17
|
+
- A stable per-machine UUID (`lineman_install_id`).
|
|
18
|
+
- After authentication, the user's Lineman user id from the signed claim.
|
|
19
|
+
- Tool-call telemetry: tool name, task type, latency, byte counts, savings estimates, error class.
|
|
20
|
+
- Activation events: `mcp.first_run`, `mcp.auth_link_clicked`, `mcp.auth_completed`, `mcp.upgraded`.
|
|
21
|
+
- OS, Node version, MCP version, runtime host (`claude-code` / `aider` / `continue` / `unknown`).
|
|
22
|
+
|
|
23
|
+
What we strip before send:
|
|
24
|
+
|
|
25
|
+
- All absolute file paths are rewritten — `/Users/<you>/...` and `/home/<you>/...` are replaced with `~`.
|
|
26
|
+
- Stack-frame variables named `prompt`, `content`, `code`, `summary`, `messages`, `body`, `input`, or anything matching `KEY|TOKEN|SECRET|PASSWORD|API|AUTH|CREDENTIAL` are blanked.
|
|
27
|
+
- HTTP request bodies are blanked wholesale.
|
|
28
|
+
|
|
29
|
+
## Resolution order
|
|
30
|
+
|
|
31
|
+
The MCP server resolves the on/off state in this order at boot (first match wins):
|
|
32
|
+
|
|
33
|
+
1. `LINEMAN_TELEMETRY` env var — beats everything. `0`/`off`/`false`/`no` disable; `1`/`on`/`true`/`yes` enable.
|
|
34
|
+
2. `~/.goodex/lineman.json::telemetryEnabled` — set by this skill (this file is what `/lineman:telemetry [on|off]` writes).
|
|
35
|
+
3. Default: enabled.
|
|
36
|
+
|
|
37
|
+
Setting the value via this skill won't override an active env var — surface that to the user so they're not confused if they think they flipped it but Sentry is still running.
|
|
38
|
+
|
|
39
|
+
## Phase 1 — read
|
|
40
|
+
|
|
41
|
+
If the user asks "what does lineman send to sentry?" or just types `/lineman:telemetry` without args, call `mcp__plugin_lineman_core__telemetry` with `{}` and show the response — it's a small JSON envelope with `enabled`, `source`, `envOverride`, and a `message` you can quote verbatim to the user.
|
|
42
|
+
|
|
43
|
+
Then summarise the "What we send / What we strip" lists above so they can make an informed decision.
|
|
44
|
+
|
|
45
|
+
## Phase 2 — flip
|
|
46
|
+
|
|
47
|
+
When the user says "turn telemetry off" / "disable analytics" / similar, call `mcp__plugin_lineman_core__telemetry` with `{ enabled: false }`. When they say "turn it back on" / "enable telemetry", pass `{ enabled: true }`.
|
|
48
|
+
|
|
49
|
+
After the call, read the response's `source` field:
|
|
50
|
+
|
|
51
|
+
- `source: "config"` and matching `enabled` — the change took effect; tell the user to **restart their Claude Code session** for the next MCP launch to pick it up.
|
|
52
|
+
- `source: "env"` — the env var is overriding the file setting; surface the `envOverride` value and tell the user they need to unset `LINEMAN_TELEMETRY` in their shell before the per-install setting will be honoured.
|
|
53
|
+
|
|
54
|
+
## Edge cases
|
|
55
|
+
|
|
56
|
+
- If the user pastes `/lineman:telemetry` without saying on or off and they previously had it off, ask "do you want to re-enable it?" rather than assuming.
|
|
57
|
+
- If the call returns `isError: true`, the message will name the persistence failure (read-only HOME, etc.). Show the message and suggest the env var workaround as a fallback.
|
|
58
|
+
- Don't argue with the user. If they want telemetry off, set it off. We have a documented opt-out for a reason.
|