@lineman-io/mcp 2.4.1 → 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 +31 -8
- package/dist/main.js +7 -1
- package/hooks/core/lineman-config.mjs +1 -1
- package/hooks/lineman-call.mjs +1 -1
- package/package.json +1 -1
|
@@ -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}}
|