@memlink/cli 1.0.5 → 1.0.7

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/cli/index.js CHANGED
@@ -45847,9 +45847,6 @@ function info(label, value) {
45847
45847
  function count(label, value) {
45848
45848
  return ` ${colors.muted(`${SYM.count} ${value} ${label}`)}`;
45849
45849
  }
45850
- function subheading(text) {
45851
- return colors.muted(` ${text}`);
45852
- }
45853
45850
  function dimLine(text) {
45854
45851
  return colors.dim(` ${text}`);
45855
45852
  }
@@ -45903,19 +45900,13 @@ Memlink is a self-hosted MCP server that gives you persistent, organized memory
45903
45900
 
45904
45901
  The MCP server runs at:
45905
45902
 
45906
- **Streamable HTTP** (modern clients):
45907
45903
  \`\`\`
45908
45904
  http://localhost:4444/mcp?id=YOUR_MEMORY_ID
45909
45905
  \`\`\`
45910
45906
 
45911
- **SSE** (legacy clients like OpenCode):
45912
- \`\`\`
45913
- http://localhost:4444/sse?id=YOUR_MEMORY_ID
45914
- \`\`\`
45915
-
45916
45907
  The memory ID is a 12-character alphanumeric string assigned when you create a memory via \`memlink init <name>\`.
45917
45908
 
45918
- ### Streamable HTTP config
45909
+ ### MCP config
45919
45910
 
45920
45911
  \`\`\`json
45921
45912
  {
@@ -45928,20 +45919,6 @@ The memory ID is a 12-character alphanumeric string assigned when you create a m
45928
45919
  }
45929
45920
  \`\`\`
45930
45921
 
45931
- ### SSE config (OpenCode)
45932
-
45933
- \`\`\`json
45934
- {
45935
- "mcpServers": {
45936
- "memlink": {
45937
- "type": "remote",
45938
- "enabled": true,
45939
- "url": "http://localhost:4444/sse?id=YOUR_MEMORY_ID"
45940
- }
45941
- }
45942
- }
45943
- \`\`\`
45944
-
45945
45922
  ## Session Workflow
45946
45923
 
45947
45924
  1. **Start of session** — Always call \`memory_read\` to load existing context
@@ -46024,7 +46001,7 @@ function nanoid(size = 21) {
46024
46001
  }
46025
46002
 
46026
46003
  // src/core/types.ts
46027
- var MEMLINK_VERSION = "1.0.5";
46004
+ var MEMLINK_VERSION = "1.0.7";
46028
46005
  var DEFAULT_PORT = 4444;
46029
46006
  var DEFAULT_HOST = "localhost";
46030
46007
  var CONFIG_DIR = ".memlink";
@@ -79798,11 +79775,14 @@ function createApp() {
79798
79775
  });
79799
79776
  try {
79800
79777
  await mcpServer.connect(transport);
79801
- await transport.start();
79802
79778
  } catch {
79803
79779
  sseSessions.delete(transport.sessionId);
79804
79780
  mcpServer.close();
79781
+ return;
79805
79782
  }
79783
+ await new Promise((resolve) => {
79784
+ res.on("close", () => resolve());
79785
+ });
79806
79786
  });
79807
79787
  app.post("/messages", async (req, res) => {
79808
79788
  const sessionId = req.query.sessionId;
@@ -79985,9 +79965,6 @@ function memoryTableRow(name, id, sizeKb) {
79985
79965
  function mcpUrl(host, port, memId) {
79986
79966
  return `http://${host}:${port}/mcp?id=${memId}`;
79987
79967
  }
79988
- function sseUrl(host, port, memId) {
79989
- return `http://${host}:${port}/sse?id=${memId}`;
79990
- }
79991
79968
  var program2 = new Command;
79992
79969
  program2.name("memlink").description("Memlink — Universal memory for AI agents").version(MEMLINK_VERSION, "--version").addHelpText("before", logo());
79993
79970
  program2.action(() => {
@@ -80038,7 +80015,6 @@ program2.command("serve").description("Start the Memlink MCP server").option("--
80038
80015
  if (config3.universalMemories.length > 0) {
80039
80016
  for (const mem of config3.universalMemories) {
80040
80017
  console.log(info("MCP", mcpUrl(host, port, mem.memoryId)));
80041
- console.log(info("SSE", sseUrl(host, port, mem.memoryId)));
80042
80018
  }
80043
80019
  } else {
80044
80020
  console.log(info("no memories", "Create one with: Memlink init <name>"));
@@ -80056,11 +80032,9 @@ function initAction(name, opts) {
80056
80032
  const host = envHost() || config3.serverHost || DEFAULT_HOST;
80057
80033
  const port = envPort() || config3.serverPort || DEFAULT_PORT;
80058
80034
  const mcp = mcpUrl(host, port, memory.memoryId);
80059
- const sse = sseUrl(host, port, memory.memoryId);
80060
80035
  console.log(info("Name", memory.memoryName));
80061
80036
  console.log(info("ID", memory.memoryId));
80062
80037
  console.log(info("MCP", mcp));
80063
- console.log(info("SSE", sse));
80064
80038
  console.log();
80065
80039
  const copied = copyToClipboard(mcp);
80066
80040
  if (copied) {
@@ -80114,7 +80088,6 @@ program2.command("connect <memoryId>").description("Get MCP connection details f
80114
80088
  const host = envHost() || config3.serverHost || DEFAULT_HOST;
80115
80089
  const port = envPort() || config3.serverPort || DEFAULT_PORT;
80116
80090
  const mcp = mcpUrl(host, port, memory.memoryId);
80117
- const sse = sseUrl(host, port, memory.memoryId);
80118
80091
  const small = logoSmall();
80119
80092
  if (small)
80120
80093
  console.log(`
@@ -80123,38 +80096,6 @@ program2.command("connect <memoryId>").description("Get MCP connection details f
80123
80096
  console.log(info("Name", memory.memoryName));
80124
80097
  console.log(info("ID", memory.memoryId));
80125
80098
  console.log(info("MCP", mcp));
80126
- console.log(info("SSE", sse));
80127
- console.log();
80128
- const httpConfig = {
80129
- mcpServers: {
80130
- memlink: {
80131
- type: "http",
80132
- url: mcp
80133
- }
80134
- }
80135
- };
80136
- const sseConfig = {
80137
- mcpServers: {
80138
- memlink: {
80139
- type: "remote",
80140
- enabled: true,
80141
- url: sse
80142
- }
80143
- }
80144
- };
80145
- console.log(subheading("Streamable HTTP (modern clients):"));
80146
- console.log(colors.muted(" ```json"));
80147
- console.log(colors.muted(JSON.stringify(httpConfig, null, 2).split(`
80148
- `).map((l) => " " + l).join(`
80149
- `)));
80150
- console.log(colors.muted(" ```"));
80151
- console.log();
80152
- console.log(subheading("SSE (legacy clients like OpenCode):"));
80153
- console.log(colors.muted(" ```json"));
80154
- console.log(colors.muted(JSON.stringify(sseConfig, null, 2).split(`
80155
- `).map((l) => " " + l).join(`
80156
- `)));
80157
- console.log(colors.muted(" ```"));
80158
80099
  console.log();
80159
80100
  const copied = copyToClipboard(mcp);
80160
80101
  if (copied) {
@@ -70523,7 +70523,7 @@ function nanoid4(size = 21) {
70523
70523
  }
70524
70524
 
70525
70525
  // src/core/types.ts
70526
- var MEMLINK_VERSION = "1.0.5";
70526
+ var MEMLINK_VERSION = "1.0.7";
70527
70527
  var DEFAULT_PORT = 4444;
70528
70528
  var DEFAULT_HOST = "localhost";
70529
70529
  var CONFIG_DIR = ".memlink";
@@ -71428,11 +71428,14 @@ function createApp() {
71428
71428
  });
71429
71429
  try {
71430
71430
  await mcpServer.connect(transport);
71431
- await transport.start();
71432
71431
  } catch {
71433
71432
  sseSessions.delete(transport.sessionId);
71434
71433
  mcpServer.close();
71434
+ return;
71435
71435
  }
71436
+ await new Promise((resolve) => {
71437
+ res.on("close", () => resolve());
71438
+ });
71436
71439
  });
71437
71440
  app.post("/messages", async (req, res) => {
71438
71441
  const sessionId = req.query.sessionId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memlink/cli",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "Memlink — Universal memory async and organized for AI agents. Self hosted, Fast, Organized.",
5
5
  "keywords": [
6
6
  "mcp",