@remembrance-ai/mcp-server 0.1.2 → 0.1.5
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/server.js +36 -7
- package/package.json +1 -1
- package/server.json +2 -2
package/dist/server.js
CHANGED
|
@@ -4183,6 +4183,7 @@ var agentProviderSchema = external_exports.enum([
|
|
|
4183
4183
|
"codex",
|
|
4184
4184
|
"cursor",
|
|
4185
4185
|
"claude",
|
|
4186
|
+
"openclaw",
|
|
4186
4187
|
"generic",
|
|
4187
4188
|
"other"
|
|
4188
4189
|
]);
|
|
@@ -4715,7 +4716,7 @@ var verifierOutputSchema = external_exports.object({
|
|
|
4715
4716
|
});
|
|
4716
4717
|
|
|
4717
4718
|
// src/server.ts
|
|
4718
|
-
import { existsSync } from "node:fs";
|
|
4719
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
4719
4720
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
4720
4721
|
import { homedir } from "node:os";
|
|
4721
4722
|
import { dirname, join } from "node:path";
|
|
@@ -6137,8 +6138,33 @@ function inputSchemaFor(schema, name) {
|
|
|
6137
6138
|
}
|
|
6138
6139
|
|
|
6139
6140
|
// src/server.ts
|
|
6140
|
-
|
|
6141
|
-
|
|
6141
|
+
function remembranceConfigPath() {
|
|
6142
|
+
return join(
|
|
6143
|
+
process.env.XDG_CONFIG_HOME ?? join(homedir(), ".config"),
|
|
6144
|
+
"remembrance",
|
|
6145
|
+
"config.json"
|
|
6146
|
+
);
|
|
6147
|
+
}
|
|
6148
|
+
function readRemembranceConfig() {
|
|
6149
|
+
try {
|
|
6150
|
+
const parsed = JSON.parse(
|
|
6151
|
+
readFileSync(remembranceConfigPath(), "utf8")
|
|
6152
|
+
);
|
|
6153
|
+
return parsed && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {};
|
|
6154
|
+
} catch {
|
|
6155
|
+
return {};
|
|
6156
|
+
}
|
|
6157
|
+
}
|
|
6158
|
+
function resolveApiKey() {
|
|
6159
|
+
const fromEnv = process.env.REMEMBRANCE_API_KEY;
|
|
6160
|
+
if (fromEnv) {
|
|
6161
|
+
return fromEnv;
|
|
6162
|
+
}
|
|
6163
|
+
const fromFile = readRemembranceConfig().apiKey;
|
|
6164
|
+
return fromFile ? String(fromFile) : "";
|
|
6165
|
+
}
|
|
6166
|
+
var apiBase = (process.env.REMEMBRANCE_API_URL || readRemembranceConfig().apiUrl || "https://remembrance.dev").replace(/\/$/, "");
|
|
6167
|
+
var SERVER_VERSION = true ? "0.1.5" : "0.0.0-dev";
|
|
6142
6168
|
var tools = toolDefinitions;
|
|
6143
6169
|
var inputBuffer = Buffer.alloc(0);
|
|
6144
6170
|
process.stdin.on("data", (chunk) => {
|
|
@@ -6165,8 +6191,9 @@ function readJsonRpcMessages(buffer) {
|
|
|
6165
6191
|
const errors = [];
|
|
6166
6192
|
let remaining = buffer;
|
|
6167
6193
|
while (true) {
|
|
6168
|
-
const
|
|
6169
|
-
|
|
6194
|
+
const legacyHeader = /^content-length:/i.test(
|
|
6195
|
+
remaining.subarray(0, 16).toString("utf8")
|
|
6196
|
+
);
|
|
6170
6197
|
let body = null;
|
|
6171
6198
|
if (legacyHeader) {
|
|
6172
6199
|
const headerEnd = remaining.indexOf("\r\n\r\n");
|
|
@@ -6218,6 +6245,7 @@ async function handleRequest(request) {
|
|
|
6218
6245
|
}
|
|
6219
6246
|
writeResponse(response.id, response.result, response.error);
|
|
6220
6247
|
}
|
|
6248
|
+
var SERVER_INSTRUCTIONS = "Remembrance is shared operational memory for agents. BEFORE non-trivial service/API/tool/library/deployment work, call query_skills to reuse proven skills and resources instead of rediscovering them. AFTER you use a skill or resource, close the loop so the next agent inherits what you learned: call submit_feedback (useful true/false + a one-line lesson \u2014 it returns a ready submit_remembrance payload), then submit_remembrance if the lesson is reusable, or propose_skill_idea only if nothing fit and you built a new workflow. Redact secrets, private URLs, credentials, and proprietary content; submit summaries and hashes, not raw traces.";
|
|
6221
6249
|
async function dispatchJsonRpcRequest(request) {
|
|
6222
6250
|
if (request.method === "initialize") {
|
|
6223
6251
|
return {
|
|
@@ -6228,7 +6256,8 @@ async function dispatchJsonRpcRequest(request) {
|
|
|
6228
6256
|
serverInfo: {
|
|
6229
6257
|
name: "@remembrance-ai/mcp-server",
|
|
6230
6258
|
version: SERVER_VERSION
|
|
6231
|
-
}
|
|
6259
|
+
},
|
|
6260
|
+
instructions: SERVER_INSTRUCTIONS
|
|
6232
6261
|
}
|
|
6233
6262
|
};
|
|
6234
6263
|
}
|
|
@@ -6522,7 +6551,7 @@ async function callRemembrance(definition, rawArguments) {
|
|
|
6522
6551
|
const headers = {
|
|
6523
6552
|
"content-type": "application/json"
|
|
6524
6553
|
};
|
|
6525
|
-
const apiKey =
|
|
6554
|
+
const apiKey = resolveApiKey();
|
|
6526
6555
|
if (apiKey) {
|
|
6527
6556
|
headers["x-remembrance-api-key"] = apiKey;
|
|
6528
6557
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remembrance-ai/mcp-server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"mcpName": "io.github.dreamarkinc/remembrance",
|
|
5
5
|
"description": "MCP server for discovering Remembrance skills/resources and submitting agent feedback with optional TOFU attestations.",
|
|
6
6
|
"license": "Apache-2.0",
|
package/server.json
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"url": "https://github.com/dreamarkinc/remembrance-skills",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "0.1.
|
|
9
|
+
"version": "0.1.5",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"identifier": "@remembrance-ai/mcp-server",
|
|
14
|
-
"version": "0.1.
|
|
14
|
+
"version": "0.1.5",
|
|
15
15
|
"transport": {
|
|
16
16
|
"type": "stdio"
|
|
17
17
|
},
|