@lunora/mcp 1.0.0-alpha.56 → 1.0.0-alpha.58
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/dist/index.d.mts
CHANGED
|
@@ -34,9 +34,9 @@ declare const callTool: (client: LunoraClient, name: string, input: Record<strin
|
|
|
34
34
|
interface McpAgentExposure {
|
|
35
35
|
/** What the agent does — shown to the calling model, which decides from it. */
|
|
36
36
|
description: string;
|
|
37
|
-
/** The agent's export name (its `ctx.agents
|
|
37
|
+
/** The agent's export name (its `ctx.agents.<name>` / `AGENT_<NAME>` binding). */
|
|
38
38
|
name: string;
|
|
39
|
-
/** Override the model-facing tool name (default `agent_
|
|
39
|
+
/** Override the model-facing tool name (default `agent_<name>`). */
|
|
40
40
|
toolName?: string;
|
|
41
41
|
}
|
|
42
42
|
/** The generic status/poll tool advertised alongside the per-agent tools. */
|
|
@@ -93,7 +93,7 @@ interface LunoraMcpServerOptions {
|
|
|
93
93
|
/** The agents this server fronts as MCP tools (see `allowAgents`). */
|
|
94
94
|
agents?: ReadonlyArray<McpAgentExposure>;
|
|
95
95
|
/**
|
|
96
|
-
* Expose the per-agent tools (`agent_
|
|
96
|
+
* Expose the per-agent tools (`agent_<name>` + the generic
|
|
97
97
|
* `lunora_agent_status`). Defaults to `false`, mirroring `allowWrites`:
|
|
98
98
|
* starting a durable agent run is a side effect, so the agent tools are
|
|
99
99
|
* omitted from the advertised list AND refused at dispatch unless explicitly
|
package/dist/index.d.ts
CHANGED
|
@@ -34,9 +34,9 @@ declare const callTool: (client: LunoraClient, name: string, input: Record<strin
|
|
|
34
34
|
interface McpAgentExposure {
|
|
35
35
|
/** What the agent does — shown to the calling model, which decides from it. */
|
|
36
36
|
description: string;
|
|
37
|
-
/** The agent's export name (its `ctx.agents
|
|
37
|
+
/** The agent's export name (its `ctx.agents.<name>` / `AGENT_<NAME>` binding). */
|
|
38
38
|
name: string;
|
|
39
|
-
/** Override the model-facing tool name (default `agent_
|
|
39
|
+
/** Override the model-facing tool name (default `agent_<name>`). */
|
|
40
40
|
toolName?: string;
|
|
41
41
|
}
|
|
42
42
|
/** The generic status/poll tool advertised alongside the per-agent tools. */
|
|
@@ -93,7 +93,7 @@ interface LunoraMcpServerOptions {
|
|
|
93
93
|
/** The agents this server fronts as MCP tools (see `allowAgents`). */
|
|
94
94
|
agents?: ReadonlyArray<McpAgentExposure>;
|
|
95
95
|
/**
|
|
96
|
-
* Expose the per-agent tools (`agent_
|
|
96
|
+
* Expose the per-agent tools (`agent_<name>` + the generic
|
|
97
97
|
* `lunora_agent_status`). Defaults to `false`, mirroring `allowWrites`:
|
|
98
98
|
* starting a durable agent run is a side effect, so the agent tools are
|
|
99
99
|
* omitted from the advertised list AND refused at dispatch unless explicitly
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{AGENT_RUN_INPUT_SCHEMA as r,AGENT_STATUS_TOOL_NAME as t,agentToolDefinitions as c,callAgentTool as T,parseAgentsEnv as a}from"./packem_shared/AGENT_RUN_INPUT_SCHEMA-ihZg6vIZ.mjs";import{createToolServer as E}from"./packem_shared/createToolServer-CP5bNUcS.mjs";import{createMcpFetchHandler as _}from"./packem_shared/createMcpFetchHandler-DjvXAX80.mjs";import{LOCAL_SERVER_NAME as p,NO_DEPLOYMENT_MESSAGE as N,connectLocalStdio as O,createLocalMcpServer as A,localTools as f}from"./packem_shared/LOCAL_SERVER_NAME-
|
|
1
|
+
import{AGENT_RUN_INPUT_SCHEMA as r,AGENT_STATUS_TOOL_NAME as t,agentToolDefinitions as c,callAgentTool as T,parseAgentsEnv as a}from"./packem_shared/AGENT_RUN_INPUT_SCHEMA-ihZg6vIZ.mjs";import{createToolServer as E}from"./packem_shared/createToolServer-CP5bNUcS.mjs";import{createMcpFetchHandler as _}from"./packem_shared/createMcpFetchHandler-DjvXAX80.mjs";import{LOCAL_SERVER_NAME as p,NO_DEPLOYMENT_MESSAGE as N,connectLocalStdio as O,createLocalMcpServer as A,localTools as f}from"./packem_shared/LOCAL_SERVER_NAME-BoQv1iu8.mjs";import{createPaidMcpServer as i}from"./packem_shared/createPaidMcpServer-CwdcSPpN.mjs";import{connectStdio as m,createLunoraMcpServer as s}from"./packem_shared/connectStdio-Dt-DqEgA.mjs";import{READ_ONLY_TOOL_DEFINITIONS as I,WRITE_TOOL_DEFINITIONS as v,callTool as D,toolDefinitions as R}from"./packem_shared/READ_ONLY_TOOL_DEFINITIONS-48jMcpI-.mjs";import{serveStateless as g}from"./packem_shared/serveStateless-BqoRk-xU.mjs";export{r as AGENT_RUN_INPUT_SCHEMA,t as AGENT_STATUS_TOOL_NAME,p as LOCAL_SERVER_NAME,N as NO_DEPLOYMENT_MESSAGE,I as READ_ONLY_TOOL_DEFINITIONS,v as WRITE_TOOL_DEFINITIONS,c as agentToolDefinitions,T as callAgentTool,D as callTool,O as connectLocalStdio,m as connectStdio,A as createLocalMcpServer,s as createLunoraMcpServer,_ as createMcpFetchHandler,i as createPaidMcpServer,E as createToolServer,f as localTools,a as parseAgentsEnv,g as serveStateless,R as toolDefinitions};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{LunoraClient as p}from"@lunora/client";import{StdioServerTransport as u}from"@modelcontextprotocol/sdk/server/stdio.js";import{createToolServer as f}from"./createToolServer-CP5bNUcS.mjs";import{createRemoteDocsIndex as m}from"./DEFAULT_DOCS_BASE_URL-DhaPz6PK.mjs";import{docsResources as v}from"./DOCS_URI_SCHEME-DbyotZvf.mjs";import{docsTools as h}from"./DEFAULT_SEARCH_LIMIT-CKtOASrB.mjs";import{toolDefinitions as y,callTool as O}from"./READ_ONLY_TOOL_DEFINITIONS-48jMcpI-.mjs";const R=(t,e)=>{if(t.size<e)return;const o=t.keys().next().value;o!==void 0&&t.delete(o)},c=t=>t.docs===!1?void 0:m({...t.docs?.baseUrl===void 0?{}:{baseUrl:t.docs.baseUrl},...t.fetch===void 0?{}:{fetch:t.fetch}}),E="lunora",P="no Lunora dev server is running for this project — start one with `lunora dev`, then call this tool again (call lunora_dev_status to check).",_=8,l=t=>{const e=new Map;return o=>{const n=JSON.stringify([o.url,o.token??""]),r=e.get(n);if(r!==void 0)return r;const i=new p({fetch:t,url:o.url});return o.token!==void 0&&o.token.length>0&&i.setAuthToken(o.token),R(e,_),e.set(n,i),i}},w=(t,e,o)=>{const n=typeof t=="function"?t:()=>t;return y(e).map(r=>({definition:r,handle:async i=>{const s=n();return s===void 0?{content:[{text:P,type:"text"}],isError:!0}:O(o(s),r.name,i,e)}}))},S="lunora-spec:openrpc",T="lunora-spec:openapi",a=[{description:"The deployment's generated OpenRPC 1.x document — every RPC function's path, kind, and argument schema in one read, instead of list_functions plus one get_function_schema call per function.",fetch:async t=>t.fetchOpenRpc(),name:"OpenRPC specification",uri:S},{description:"The deployment's generated OpenAPI 3.1 document.",fetch:async t=>t.fetchOpenApi(),name:"OpenAPI specification",uri:T}],g=(t,e)=>{const o=typeof t=="function"?t:()=>t,n=async r=>{const i=o();if(i!==void 0)try{return await r.fetch(e(i))}catch{return}};return{list:async()=>(await Promise.all(a.map(async r=>await n(r)===void 0?void 0:{description:r.description,mimeType:"application/json",name:r.name,uri:r.uri}))).filter(r=>r!==void 0),read:async r=>{const i=a.find(d=>d.uri===r);if(i===void 0)return;const s=await n(i);return s===void 0?void 0:{mimeType:"application/json",text:JSON.stringify(s,void 0,2)}}}},A=t=>({list:async()=>(await Promise.all(t.map(async e=>e.list()))).flat(),read:async e=>{for(const o of t){const n=await o.read(e);if(n!==void 0)return n}}}),x=(t,e)=>{const o=[],n=c(t);return n!==void 0&&o.push(...h(n)),o.push(...t.extraTools??[]),t.deployment!==void 0&&o.push(...w(t.deployment,t.allowWrites??!1,e??l(t.fetch))),o},C=(t={})=>{const e=c(t),o=[];e!==void 0&&o.push(v(e));const n=l(t.fetch);return t.deployment!==void 0&&o.push(g(t.deployment,n)),f({name:E,version:t.version??"0.0.0"},x(t,n),o.length===0?void 0:A(o))},$=async(t={})=>{const e=C(t);return await e.connect(new u),e};export{E as LOCAL_SERVER_NAME,P as NO_DEPLOYMENT_MESSAGE,T as OPENAPI_RESOURCE_URI,S as OPENRPC_RESOURCE_URI,$ as connectLocalStdio,C as createLocalMcpServer,x as localTools};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/mcp",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.58",
|
|
4
4
|
"description": "Model Context Protocol server exposing a Lunora deployment to AI agents",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-agents",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"access": "public"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@lunora/client": "1.0.0-alpha.
|
|
57
|
-
"@lunora/errors": "1.0.0-alpha.
|
|
56
|
+
"@lunora/client": "1.0.0-alpha.41",
|
|
57
|
+
"@lunora/errors": "1.0.0-alpha.15",
|
|
58
58
|
"@modelcontextprotocol/sdk": "^1.29.0"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{LunoraClient as p}from"@lunora/client";import{StdioServerTransport as u}from"@modelcontextprotocol/sdk/server/stdio.js";import{createToolServer as f}from"./createToolServer-CP5bNUcS.mjs";import{createRemoteDocsIndex as c}from"./DEFAULT_DOCS_BASE_URL-DhaPz6PK.mjs";import{docsResources as m}from"./DOCS_URI_SCHEME-DbyotZvf.mjs";import{docsTools as h}from"./DEFAULT_SEARCH_LIMIT-CKtOASrB.mjs";import{toolDefinitions as v,callTool as y}from"./READ_ONLY_TOOL_DEFINITIONS-48jMcpI-.mjs";const O=(t,e)=>{if(t.size<e)return;const o=t.keys().next().value;o!==void 0&&t.delete(o)},R="lunora",E="no Lunora dev server is running for this project — start one with `lunora dev`, then call this tool again (call lunora_dev_status to check).",P=8,l=t=>{const e=new Map;return o=>{const r=JSON.stringify([o.url,o.token??""]),n=e.get(r);if(n!==void 0)return n;const s=new p({fetch:t,url:o.url});return o.token!==void 0&&o.token.length>0&&s.setAuthToken(o.token),O(e,P),e.set(r,s),s}},T=(t,e,o)=>{const r=typeof t=="function"?t:()=>t;return v(e).map(n=>({definition:n,handle:async s=>{const i=r();return i===void 0?{content:[{text:E,type:"text"}],isError:!0}:y(o(i),n.name,s,e)}}))},_="lunora-spec:openrpc",w="lunora-spec:openapi",a=[{description:"The deployment's generated OpenRPC 1.x document — every RPC function's path, kind, and argument schema in one read, instead of list_functions plus one get_function_schema call per function.",fetch:async t=>t.fetchOpenRpc(),name:"OpenRPC specification",uri:_},{description:"The deployment's generated OpenAPI 3.1 document.",fetch:async t=>t.fetchOpenApi(),name:"OpenAPI specification",uri:w}],S=(t,e)=>{const o=typeof t=="function"?t:()=>t,r=async n=>{const s=o();if(s!==void 0)try{return await n.fetch(e(s))}catch{return}};return{list:async()=>(await Promise.all(a.map(async n=>await r(n)===void 0?void 0:{description:n.description,mimeType:"application/json",name:n.name,uri:n.uri}))).filter(n=>n!==void 0),read:async n=>{const s=a.find(d=>d.uri===n);if(s===void 0)return;const i=await r(s);return i===void 0?void 0:{mimeType:"application/json",text:JSON.stringify(i,void 0,2)}}}},g=t=>({list:async()=>(await Promise.all(t.map(async e=>e.list()))).flat(),read:async e=>{for(const o of t){const r=await o.read(e);if(r!==void 0)return r}}}),A=(t,e)=>{const o=[];return t.docs!==!1&&o.push(...h(c({...t.docs?.baseUrl===void 0?{}:{baseUrl:t.docs.baseUrl},...t.fetch===void 0?{}:{fetch:t.fetch}}))),o.push(...t.extraTools??[]),t.deployment!==void 0&&o.push(...T(t.deployment,t.allowWrites??!1,e??l(t.fetch))),o},U=(t={})=>{const e=t.docs===!1?void 0:c({...t.docs?.baseUrl===void 0?{}:{baseUrl:t.docs.baseUrl},...t.fetch===void 0?{}:{fetch:t.fetch}}),o=[];e!==void 0&&o.push(m(e));const r=l(t.fetch);return t.deployment!==void 0&&o.push(S(t.deployment,r)),f({name:R,version:t.version??"0.0.0"},A(t,r),o.length===0?void 0:g(o))},D=async(t={})=>{const e=U(t);return await e.connect(new u),e};export{R as LOCAL_SERVER_NAME,E as NO_DEPLOYMENT_MESSAGE,w as OPENAPI_RESOURCE_URI,_ as OPENRPC_RESOURCE_URI,D as connectLocalStdio,U as createLocalMcpServer,A as localTools};
|