@embd/mcp 0.7.1 → 0.7.3

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.
@@ -1,4 +1,4 @@
1
- import{J as D}from"./bin-2pd22980.js";import F from"node:process";class A{append(b){this._buffer=this._buffer?Buffer.concat([this._buffer,b]):b}readMessage(){if(!this._buffer)return null;let b=this._buffer.indexOf(`
1
+ import{J as D}from"./bin-23re2y63.js";import F from"node:process";class A{append(b){this._buffer=this._buffer?Buffer.concat([this._buffer,b]):b}readMessage(){if(!this._buffer)return null;let b=this._buffer.indexOf(`
2
2
  `);if(b===-1)return null;let q=this._buffer.toString("utf8",0,b).replace(/\r$/,"");return this._buffer=this._buffer.subarray(b+1),G(q)}clear(){this._buffer=void 0}}function G(b){return D.parse(JSON.parse(b))}function E(b){return JSON.stringify(b)+`
3
3
  `}class H{constructor(b=F.stdin,q=F.stdout){this._stdin=b,this._stdout=q,this._readBuffer=new A,this._started=!1,this._ondata=(w)=>{this._readBuffer.append(w),this.processReadBuffer()},this._onerror=(w)=>{this.onerror?.(w)}}async start(){if(this._started)throw Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");this._started=!0,this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror)}processReadBuffer(){while(!0)try{let b=this._readBuffer.readMessage();if(b===null)break;this.onmessage?.(b)}catch(b){this.onerror?.(b)}}async close(){if(this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.listenerCount("data")===0)this._stdin.pause();this._readBuffer.clear(),this.onclose?.()}send(b){return new Promise((q)=>{let w=E(b);if(this._stdout.write(w))q();else this._stdout.once("drain",q)})}}
4
4
  export{H as a};
@@ -1,4 +1,4 @@
1
- import{A as C2,B as N2,C as R2,D as C,L as I2,M as O2}from"./bin-2pd22980.js";var $2=N2((h0,g0)=>{(function(Z,$){if(typeof define==="function"&&define.amd)define([],$);else if(typeof g0==="object"&&typeof h0<"u")g0.exports=$();else Z.Papa=$()})(h0,function Z(){var $=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof $<"u")return $;return{}}();function U(){var Y=$.URL||$.webkitURL||null,J=Z.toString();return G.BLOB_URL||(G.BLOB_URL=Y.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",J,")();"],{type:"text/javascript"})))}var V=!$.document&&!!$.postMessage,W=$.IS_PAPA_WORKER||!1,_={},I=0,G={};if(G.parse=Y0,G.unparse=v,G.RECORD_SEP=String.fromCharCode(30),G.UNIT_SEP=String.fromCharCode(31),G.BYTE_ORDER_MARK="\uFEFF",G.BAD_DELIMITERS=["\r",`
1
+ import{A as C2,B as N2,C as R2,D as C,L as I2,M as O2}from"./bin-23re2y63.js";var $2=N2((h0,g0)=>{(function(Z,$){if(typeof define==="function"&&define.amd)define([],$);else if(typeof g0==="object"&&typeof h0<"u")g0.exports=$();else Z.Papa=$()})(h0,function Z(){var $=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof $<"u")return $;return{}}();function U(){var Y=$.URL||$.webkitURL||null,J=Z.toString();return G.BLOB_URL||(G.BLOB_URL=Y.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",J,")();"],{type:"text/javascript"})))}var V=!$.document&&!!$.postMessage,W=$.IS_PAPA_WORKER||!1,_={},I=0,G={};if(G.parse=Y0,G.unparse=v,G.RECORD_SEP=String.fromCharCode(30),G.UNIT_SEP=String.fromCharCode(31),G.BYTE_ORDER_MARK="\uFEFF",G.BAD_DELIMITERS=["\r",`
2
2
  `,'"',G.BYTE_ORDER_MARK],G.WORKERS_SUPPORTED=!V&&!!$.Worker,G.NODE_STREAM_INPUT=1,G.LocalChunkSize=10485760,G.RemoteChunkSize=5242880,G.DefaultDelimiter=",",G.Parser=W0,G.ParserHandle=i,G.NetworkStreamer=m,G.FileStreamer=a,G.StringStreamer=t,G.ReadableStreamStreamer=$0,typeof PAPA_BROWSER_CONTEXT>"u")G.DuplexStreamStreamer=N;if($.jQuery){var f=$.jQuery;f.fn.parse=function(Y){var J=Y.config||{},X=[];return this.each(function(K){var F=f(this).prop("tagName").toUpperCase()==="INPUT"&&f(this).attr("type").toLowerCase()==="file"&&$.FileReader;if(!F||!this.files||this.files.length===0)return!0;for(var E=0;E<this.files.length;E++)X.push({file:this.files[E],inputElem:this,instanceConfig:f.extend({},J)})}),M(),this;function M(){if(X.length===0){if(S(Y.complete))Y.complete();return}var K=X[0];if(S(Y.before)){var F=Y.before(K.file,K.inputElem);if(typeof F==="object"){if(F.action==="abort"){Q("AbortError",K.file,K.inputElem,F.reason);return}else if(F.action==="skip"){L();return}else if(typeof F.config==="object")K.instanceConfig=f.extend(K.instanceConfig,F.config)}else if(F==="skip"){L();return}}var E=K.instanceConfig.complete;K.instanceConfig.complete=function(x){if(S(E))E(x,K.file,K.inputElem);L()},G.parse(K.file,K.instanceConfig)}function Q(K,F,E,x){if(S(Y.error))Y.error({name:K},F,E,x)}function L(){X.splice(0,1),M()}}}if(W)$.onmessage=j2;function e(Y){if(Y.charCodeAt(0)===65279)return Y.slice(1);return Y}function Y0(Y,J){J=J||{};var X=J.dynamicTyping||!1;if(S(X))J.dynamicTypingFunction=X,X={};if(J.dynamicTyping=X,J.transform=S(J.transform)?J.transform:!1,J.worker&&G.WORKERS_SUPPORTED){var M=D0();M.userStep=J.step,M.userChunk=J.chunk,M.userComplete=J.complete,M.userError=J.error,J.step=S(J.step),J.chunk=S(J.chunk),J.complete=S(J.complete),J.error=S(J.error),delete J.worker,M.postMessage({input:Y,config:J,workerId:M.id});return}var Q=null;if(Y===G.NODE_STREAM_INPUT&&typeof PAPA_BROWSER_CONTEXT>"u")return Q=new N(J),Q.getStream();else if(typeof Y==="string")if(Y=e(Y),J.download)Q=new m(J);else Q=new t(J);else if(Y.readable===!0&&S(Y.read)&&S(Y.on))Q=new $0(J);else if($.File&&Y instanceof File||Y instanceof Object)Q=new a(J);return Q.stream(Y)}function v(Y,J){var X=!1,M=!0,Q=",",L=`\r
3
3
  `,K='"',F=K+K,E=!1,x=null,h=!1;r();var O=new RegExp(J0(K),"g");if(typeof Y==="string")Y=JSON.parse(Y);if(Array.isArray(Y)){if(!Y.length||Array.isArray(Y[0]))return B(null,Y,E);else if(typeof Y[0]==="object")return B(x||Object.keys(Y[0]),Y,E)}else if(typeof Y==="object"){if(typeof Y.data==="string")Y.data=JSON.parse(Y.data);if(Array.isArray(Y.data)){if(!Y.fields)Y.fields=Y.meta&&Y.meta.fields||x;if(!Y.fields)Y.fields=Array.isArray(Y.data[0])?Y.fields:typeof Y.data[0]==="object"?Object.keys(Y.data[0]):[];if(!Array.isArray(Y.data[0])&&typeof Y.data[0]!=="object")Y.data=[Y.data]}return B(Y.fields||[],Y.data||[],E)}throw Error("Unable to serialize unrecognized input");function r(){if(typeof J!=="object")return;if(typeof J.delimiter==="string"&&!G.BAD_DELIMITERS.filter(function(A){return J.delimiter.indexOf(A)!==-1}).length)Q=J.delimiter;if(typeof J.quotes==="boolean"||typeof J.quotes==="function"||Array.isArray(J.quotes))X=J.quotes;if(typeof J.skipEmptyLines==="boolean"||typeof J.skipEmptyLines==="string")E=J.skipEmptyLines;if(typeof J.newline==="string")L=J.newline;if(typeof J.quoteChar==="string")K=J.quoteChar,F=K+K;if(typeof J.header==="boolean")M=J.header;if(Array.isArray(J.columns)){if(J.columns.length===0)throw Error("Option columns is empty");x=J.columns}if(J.escapeChar!==void 0)F=J.escapeChar+K;if(J.escapeFormulae instanceof RegExp)h=J.escapeFormulae;else if(typeof J.escapeFormulae==="boolean"&&J.escapeFormulae)h=/^[=+\-@\t\r].*$/}function B(A,R,b){var p="";if(typeof A==="string")A=JSON.parse(A);if(typeof R==="string")R=JSON.parse(R);var g=Array.isArray(A)&&A.length>0,u=!Array.isArray(R[0]);if(g&&M){for(var s=0;s<A.length;s++){if(s>0)p+=Q;p+=j(A[s],s)}if(R.length>0)p+=L}for(var q=0;q<R.length;q++){var G0=g?A.length:R[q].length,Z0=!1,z=g?Object.keys(R[q]).length===0:R[q].length===0;if(b&&!g)Z0=b==="greedy"?R[q].join("").trim()==="":R[q].length===1&&R[q][0].length===0;if(b==="greedy"&&g){var H=[];for(var D=0;D<G0;D++){var k=u?A[D]:D;H.push(R[q][k])}Z0=H.join("").trim()===""}if(!Z0){for(var P=0;P<G0;P++){if(P>0&&!z)p+=Q;var y=g&&u?A[P]:P;p+=j(R[q][y],P)}if(q<R.length-1&&(!b||G0>0&&!z))p+=L}}return p}function j(A,R){if(typeof A>"u"||A===null)return"";if(A.constructor===Date)return JSON.stringify(A).slice(1,25);var b=!1;if(h&&typeof A==="string"&&h.test(A))A="'"+A,b=!0;var p=A.toString(),g=p.replace(O,F);return b=b||X===!0||typeof X==="function"&&X(A,R)||Array.isArray(X)&&X[R]||P0(g,G.BAD_DELIMITERS)||g.indexOf(Q)>-1||p.indexOf(K)>-1||g.charAt(0)===" "||g.charAt(g.length-1)===" ",b?K+g+K:g}function P0(A,R){for(var b=0;b<R.length;b++)if(A.indexOf(R[b])>-1)return!0;return!1}}function T(Y){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},J.call(this,Y),this.parseChunk=function(X,M){let Q=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&Q>0){let h=this._config.newline;if(!h){let r=this._config.quoteChar||'"';h=this._handle.guessLineEndings(X,r)}X=[...X.split(h).slice(Q)].join(h)}if(this.isFirstChunk&&S(this._config.beforeFirstChunk)){var L=this._config.beforeFirstChunk(X);if(L!==void 0)X=L}this.isFirstChunk=!1,this._halted=!1;var K=this._partialLine+X;this._partialLine="";var F=this._handle.parse(K,this._baseIndex,!this._finished);if(this._handle.paused()||this._handle.aborted()){this._halted=!0;return}var E=F.meta.cursor;if(!this._finished)this._partialLine=K.substring(E-this._baseIndex),this._baseIndex=E;if(F&&F.data)this._rowCount+=F.data.length;var x=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(W)$.postMessage({results:F,workerId:G.WORKER_ID,finished:x});else if(S(this._config.chunk)&&!M){if(this._config.chunk(F,this._handle),this._handle.paused()||this._handle.aborted()){this._halted=!0;return}F=void 0,this._completeResults=void 0}if(!this._config.step&&!this._config.chunk)this._completeResults.data=this._completeResults.data.concat(F.data),this._completeResults.errors=this._completeResults.errors.concat(F.errors),this._completeResults.meta=F.meta;if(!this._completed&&x&&S(this._config.complete)&&(!F||!F.meta.aborted))this._config.complete(this._completeResults,this._input),this._completed=!0;if(!x&&(!F||!F.meta.paused))this._nextChunk();return F},this._sendError=function(X){if(S(this._config.error))this._config.error(X);else if(W&&this._config.error)$.postMessage({workerId:G.WORKER_ID,error:X,finished:!1})};function J(X){var M=N0(X);if(M.chunkSize=parseInt(M.chunkSize),!X.step&&!X.chunk)M.chunkSize=null;this._handle=new i(M),this._handle.streamer=this,this._config=M}}function m(Y){if(Y=Y||{},!Y.chunkSize)Y.chunkSize=G.RemoteChunkSize;T.call(this,Y);var J;if(V)this._nextChunk=function(){this._readChunk(),this._chunkLoaded()};else this._nextChunk=function(){this._readChunk()};this.stream=function(M){this._input=M,this._nextChunk()},this._readChunk=function(){if(this._finished){this._chunkLoaded();return}if(J=new XMLHttpRequest,this._config.withCredentials)J.withCredentials=this._config.withCredentials;if(!V)J.onload=n(this._chunkLoaded,this),J.onerror=n(this._chunkError,this);if(J.open(this._config.downloadRequestBody?"POST":"GET",this._input,!V),this._config.downloadRequestHeaders){var M=this._config.downloadRequestHeaders;for(var Q in M)J.setRequestHeader(Q,M[Q])}if(this._config.chunkSize){var L=this._start+this._config.chunkSize-1;J.setRequestHeader("Range","bytes="+this._start+"-"+L)}try{J.send(this._config.downloadRequestBody)}catch(K){this._chunkError(K.message)}if(V&&J.status===0)this._chunkError()},this._chunkLoaded=function(){if(J.readyState!==4)return;if(J.status<200||J.status>=400){this._chunkError();return}this._start+=this._config.chunkSize?this._config.chunkSize:J.responseText.length,this._finished=!this._config.chunkSize||this._start>=X(J),this.parseChunk(J.responseText)},this._chunkError=function(M){var Q=J.statusText||M;this._sendError(Error(Q))};function X(M){var Q=M.getResponseHeader("Content-Range");if(Q===null)return-1;return parseInt(Q.substring(Q.lastIndexOf("/")+1))}}m.prototype=Object.create(T.prototype),m.prototype.constructor=m;function a(Y){if(Y=Y||{},!Y.chunkSize)Y.chunkSize=G.LocalChunkSize;T.call(this,Y);var J,X,M=typeof FileReader<"u";this.stream=function(Q){if(this._input=Q,X=Q.slice||Q.webkitSlice||Q.mozSlice,M)J=new FileReader,J.onload=n(this._chunkLoaded,this),J.onerror=n(this._chunkError,this);else J=new FileReaderSync;this._nextChunk()},this._nextChunk=function(){if(!this._finished&&(!this._config.preview||this._rowCount<this._config.preview))this._readChunk()},this._readChunk=function(){var Q=this._input;if(this._config.chunkSize){var L=Math.min(this._start+this._config.chunkSize,this._input.size);Q=X.call(Q,this._start,L)}var K=J.readAsText(Q,this._config.encoding);if(!M)this._chunkLoaded({target:{result:K}})},this._chunkLoaded=function(Q){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(Q.target.result)},this._chunkError=function(){this._sendError(J.error)}}a.prototype=Object.create(T.prototype),a.prototype.constructor=a;function t(Y){Y=Y||{},T.call(this,Y);var J;this.stream=function(X){return J=X,this._nextChunk()},this._nextChunk=function(){if(this._finished)return;var X=this._config.chunkSize,M;if(X)M=J.substring(0,X),J=J.substring(X);else M=J,J="";return this._finished=!J,this.parseChunk(M)}}t.prototype=Object.create(t.prototype),t.prototype.constructor=t;function $0(Y){Y=Y||{},T.call(this,Y);var J=[],X=!0,M=!1;this.pause=function(){T.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){T.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(Q){this._input=Q,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){if(M&&J.length===1)this._finished=!0},this._nextChunk=function(){if(this._checkIsFinished(),J.length)this.parseChunk(J.shift());else X=!0},this._streamData=n(function(Q){try{if(J.push(typeof Q==="string"?Q:Q.toString(this._config.encoding)),X)X=!1,this._checkIsFinished(),this.parseChunk(J.shift())}catch(L){this._streamError(L)}},this),this._streamError=n(function(Q){this._streamCleanUp(),this._sendError(Q)},this),this._streamEnd=n(function(){this._streamCleanUp(),M=!0,this._streamData("")},this),this._streamCleanUp=n(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}$0.prototype=Object.create(T.prototype),$0.prototype.constructor=$0;function N(Y){var J=R2("stream").Duplex,X=N0(Y),M=!0,Q=!1,L=[],K=null;this._onCsvData=function(F){var E=F.data;if(!K.push(E)&&!this._handle.paused())this._handle.pause()},this._onCsvComplete=function(){K.push(null)},X.step=n(this._onCsvData,this),X.complete=n(this._onCsvComplete,this),T.call(this,X),this._nextChunk=function(){if(Q&&L.length===1)this._finished=!0;if(L.length)L.shift()();else M=!0},this._addToParseQueue=function(F,E){if(L.push(n(function(){if(this.parseChunk(typeof F==="string"?F:F.toString(X.encoding)),S(E))return E()},this)),M)M=!1,this._nextChunk()},this._onRead=function(){if(this._handle.paused())this._handle.resume()},this._onWrite=function(F,E,x){this._addToParseQueue(F,x)},this._onWriteComplete=function(){Q=!0,this._addToParseQueue("")},this.getStream=function(){return K},K=new J({readableObjectMode:!0,decodeStrings:!1,read:n(this._onRead,this),write:n(this._onWrite,this)}),K.once("finish",n(this._onWriteComplete,this))}if(typeof PAPA_BROWSER_CONTEXT>"u")N.prototype=Object.create(T.prototype),N.prototype.constructor=N;function i(Y){var J=Math.pow(2,53),X=-J,M=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,Q=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,L=this,K=0,F=0,E,x,h=!1,O=!1,r,B=[],j={data:[],errors:[],meta:{}};if(S(Y.step)){var P0=Y.step;Y.step=function(z){if(j=z,p())b();else{if(b(),j.data.length===0)return;if(K+=z.data.length,Y.preview&&K>Y.preview)x.abort();else j.data=j.data[0],P0(j,L)}}}this.parse=function(z,H,D){var k=Y.quoteChar||'"';if(!Y.newline)Y.newline=this.guessLineEndings(z,k);if(r=!1,!Y.delimiter){var P=G0(z,Y.newline,Y.skipEmptyLines,Y.comments,Y.delimitersToGuess);if(P.successful)Y.delimiter=P.bestDelimiter;else r=!0,Y.delimiter=G.DefaultDelimiter;j.meta.delimiter=Y.delimiter}else if(S(Y.delimiter))Y.delimiter=Y.delimiter(z),j.meta.delimiter=Y.delimiter;var y=N0(Y);if(Y.preview&&Y.header)y.preview++;return E=z,x=new W0(y),j=x.parse(E,H,D),b(),h?{meta:{paused:!0}}:j||{meta:{paused:!1}}},this.paused=function(){return h},this.pause=function(){h=!0,x.abort(),E=S(Y.chunk)?"":E.substring(x.getCharIndex())},this.resume=function(){if(L.streamer._halted)h=!1,L.streamer.parseChunk(E,!0);else setTimeout(L.resume,3)},this.aborted=function(){return O},this.abort=function(){if(O=!0,x.abort(),j.meta.aborted=!0,S(Y.complete))Y.complete(j);E=""},this.guessLineEndings=function(z,H){z=z.substring(0,1048576);var D=new RegExp(J0(H)+"([^]*?)"+J0(H),"gm");z=z.replace(D,"");var k=z.split("\r"),P=z.split(`
4
4
  `),y=P.length>1&&P[0].length<k[0].length;if(k.length===1||y)return`
package/dist/bin.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{a as g}from"./bin-ph1y1a8b.js";import{n as h,p as q,z as u}from"./bin-5b95b3jx.js";import"./bin-2pd22980.js";async function z(){let f=process.env.EMBD_API_KEY;if(!f)console.error(`embd MCP server: the EMBD_API_KEY environment variable is required.
2
+ import{a as g}from"./bin-vnnxgm54.js";import{n as h,p as q,z as u}from"./bin-y6fp1ys8.js";import"./bin-23re2y63.js";async function z(){let f=process.env.EMBD_API_KEY;if(!f)console.error(`embd MCP server: the EMBD_API_KEY environment variable is required.
3
3
  Create an API key in your embd account settings (${h}), then configure this server with EMBD_API_KEY=embd_sk_...`),process.exit(1);let w=new q({apiKey:f,apiUrl:process.env.EMBD_API_URL});await u(w).connect(new g),console.error("embd MCP server running on stdio")}z().catch((f)=>{console.error("embd MCP server failed to start:",f),process.exit(1)});
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{a as h}from"./bin-ph1y1a8b.js";import{b as q,c as y,d as z}from"./bin-facfqmdm.js";import"./bin-2pd22980.js";try{let f=new q(process.env.EMBD_DOCUMENT_TOKEN??"",process.env.EMBD_DOCUMENT_ORIGIN);await z(f,new y(f,process.env.EMBD_DOCUMENT_TOKEN??"",process.env.EMBD_DOCUMENT_ORIGIN,process.env.EMBD_KB_DIR)).connect(new h),console.error("embd private document MCP ready")}catch{console.error("Cannot start document MCP. Check EMBD_DOCUMENT_TOKEN and EMBD_DOCUMENT_ORIGIN."),process.exitCode=1}
2
+ import{a as h}from"./bin-vnnxgm54.js";import{b as q,c as y,d as z}from"./bin-mvjk1fq0.js";import"./bin-23re2y63.js";try{let f=new q(process.env.EMBD_DOCUMENT_TOKEN??"",process.env.EMBD_DOCUMENT_ORIGIN);await z(f,new y(f,process.env.EMBD_DOCUMENT_TOKEN??"",process.env.EMBD_DOCUMENT_ORIGIN,process.env.EMBD_KB_DIR)).connect(new h),console.error("embd private document MCP ready")}catch{console.error("Cannot start document MCP. Check EMBD_DOCUMENT_TOKEN and EMBD_DOCUMENT_ORIGIN."),process.exitCode=1}
package/dist/http-bin.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{k as x}from"./bin-crkm8v3n.js";import"./bin-5b95b3jx.js";import"./bin-2pd22980.js";var j=Number(process.env.PORT??process.env.EMBD_MCP_PORT??8787),q=process.env.EMBD_MCP_HOST??"127.0.0.1",y=process.env.EMBD_MCP_PATH??"/mcp",C=process.env.EMBD_ORIGIN,z=(process.env.EMBD_MCP_ALLOWED_HOSTS??"").split(",").map((b)=>b.trim()).filter((b)=>b.length>0),A=x({origin:C,mcpPath:y,allowedHosts:z});A.listen(j,q,()=>{if(console.log(`embd MCP (stateless HTTP) listening on http://${q}:${j}${y}`),z.length===0)console.log("Note: DNS-rebinding protection is OFF. Set EMBD_MCP_ALLOWED_HOSTS if exposing this port directly.")});function B(b){console.log(`
2
+ import{k as x}from"./bin-hadzj9pc.js";import"./bin-y6fp1ys8.js";import"./bin-23re2y63.js";var j=Number(process.env.PORT??process.env.EMBD_MCP_PORT??8787),q=process.env.EMBD_MCP_HOST??"127.0.0.1",y=process.env.EMBD_MCP_PATH??"/mcp",C=process.env.EMBD_ORIGIN,z=(process.env.EMBD_MCP_ALLOWED_HOSTS??"").split(",").map((b)=>b.trim()).filter((b)=>b.length>0),A=x({origin:C,mcpPath:y,allowedHosts:z});A.listen(j,q,()=>{if(console.log(`embd MCP (stateless HTTP) listening on http://${q}:${j}${y}`),z.length===0)console.log("Note: DNS-rebinding protection is OFF. Set EMBD_MCP_ALLOWED_HOSTS if exposing this port directly.")});function B(b){console.log(`
3
3
  embd MCP: received ${b}, shutting down.`),A.close(()=>process.exit(0)),setTimeout(()=>process.exit(0),5000).unref()}process.on("SIGINT",()=>B("SIGINT"));process.on("SIGTERM",()=>B("SIGTERM"));
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{b as h,d as m}from"./bin-facfqmdm.js";import{e as i,f as s,g as E,h as c,i as y,j as S,k as f}from"./bin-crkm8v3n.js";import{l as e,m as t,o as r,p as a,u as p,v as o,w as n,x as l,y as C,z as d}from"./bin-5b95b3jx.js";import"./bin-2pd22980.js";export{c as handleQrUrl,n as handleListCharts,E as handleKpiUrl,s as handleDocUrl,l as handleDeleteChart,o as handleCreateDoc,p as handleCreateChart,i as handleChartUrl,r as friendlyErrorMessage,y as createStatelessServer,S as createRequestListener,f as createHttpServer,d as createEmbdServer,m as createDocumentServer,C as SERVER_VERSION,t as EmbdApiError,a as EmbdApiClient,h as DocumentClient,e as DEFAULT_API_URL};
1
+ import{b as h,d as m}from"./bin-mvjk1fq0.js";import{e as i,f as s,g as E,h as c,i as y,j as S,k as f}from"./bin-hadzj9pc.js";import{l as e,m as t,o as r,p as a,u as p,v as o,w as n,x as l,y as C,z as d}from"./bin-y6fp1ys8.js";import"./bin-23re2y63.js";export{c as handleQrUrl,n as handleListCharts,E as handleKpiUrl,s as handleDocUrl,l as handleDeleteChart,o as handleCreateDoc,p as handleCreateChart,i as handleChartUrl,r as friendlyErrorMessage,y as createStatelessServer,S as createRequestListener,f as createHttpServer,d as createEmbdServer,m as createDocumentServer,C as SERVER_VERSION,t as EmbdApiError,a as EmbdApiClient,h as DocumentClient,e as DEFAULT_API_URL};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@embd/mcp",
3
- "version": "0.7.1",
3
+ "version": "0.7.3",
4
4
  "description": "Private collaborative Markdown/HTML workspaces and embeddable charts from AI agents via MCP",
5
5
  "type": "module",
6
6
  "bin": {
@@ -44,5 +44,5 @@
44
44
  "url": "git+https://github.com/arthurpark/embd.git",
45
45
  "directory": "packages/mcp"
46
46
  },
47
- "embdRelease": "1c677c6b5c3d88101e7e31d0adbaa994e33965cbf6d80278fd8a5b82ea71fbd7"
47
+ "embdRelease": "058256a452fa0ac31cc74942809ae789452920ad34c49509da4891bb8f64d944"
48
48
  }