@remembrance-ai/mcp-server 0.1.2 → 0.1.4
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 +32 -5
- package/package.json +1 -1
- package/server.json +2 -2
package/dist/server.js
CHANGED
|
@@ -4715,7 +4715,7 @@ var verifierOutputSchema = external_exports.object({
|
|
|
4715
4715
|
});
|
|
4716
4716
|
|
|
4717
4717
|
// src/server.ts
|
|
4718
|
-
import { existsSync } from "node:fs";
|
|
4718
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
4719
4719
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
4720
4720
|
import { homedir } from "node:os";
|
|
4721
4721
|
import { dirname, join } from "node:path";
|
|
@@ -6137,8 +6137,33 @@ function inputSchemaFor(schema, name) {
|
|
|
6137
6137
|
}
|
|
6138
6138
|
|
|
6139
6139
|
// src/server.ts
|
|
6140
|
-
|
|
6141
|
-
|
|
6140
|
+
function remembranceConfigPath() {
|
|
6141
|
+
return join(
|
|
6142
|
+
process.env.XDG_CONFIG_HOME ?? join(homedir(), ".config"),
|
|
6143
|
+
"remembrance",
|
|
6144
|
+
"config.json"
|
|
6145
|
+
);
|
|
6146
|
+
}
|
|
6147
|
+
function readRemembranceConfig() {
|
|
6148
|
+
try {
|
|
6149
|
+
const parsed = JSON.parse(
|
|
6150
|
+
readFileSync(remembranceConfigPath(), "utf8")
|
|
6151
|
+
);
|
|
6152
|
+
return parsed && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {};
|
|
6153
|
+
} catch {
|
|
6154
|
+
return {};
|
|
6155
|
+
}
|
|
6156
|
+
}
|
|
6157
|
+
function resolveApiKey() {
|
|
6158
|
+
const fromEnv = process.env.REMEMBRANCE_API_KEY;
|
|
6159
|
+
if (fromEnv) {
|
|
6160
|
+
return fromEnv;
|
|
6161
|
+
}
|
|
6162
|
+
const fromFile = readRemembranceConfig().apiKey;
|
|
6163
|
+
return fromFile ? String(fromFile) : "";
|
|
6164
|
+
}
|
|
6165
|
+
var apiBase = (process.env.REMEMBRANCE_API_URL || readRemembranceConfig().apiUrl || "https://remembrance.dev").replace(/\/$/, "");
|
|
6166
|
+
var SERVER_VERSION = true ? "0.1.4" : "0.0.0-dev";
|
|
6142
6167
|
var tools = toolDefinitions;
|
|
6143
6168
|
var inputBuffer = Buffer.alloc(0);
|
|
6144
6169
|
process.stdin.on("data", (chunk) => {
|
|
@@ -6218,6 +6243,7 @@ async function handleRequest(request) {
|
|
|
6218
6243
|
}
|
|
6219
6244
|
writeResponse(response.id, response.result, response.error);
|
|
6220
6245
|
}
|
|
6246
|
+
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
6247
|
async function dispatchJsonRpcRequest(request) {
|
|
6222
6248
|
if (request.method === "initialize") {
|
|
6223
6249
|
return {
|
|
@@ -6228,7 +6254,8 @@ async function dispatchJsonRpcRequest(request) {
|
|
|
6228
6254
|
serverInfo: {
|
|
6229
6255
|
name: "@remembrance-ai/mcp-server",
|
|
6230
6256
|
version: SERVER_VERSION
|
|
6231
|
-
}
|
|
6257
|
+
},
|
|
6258
|
+
instructions: SERVER_INSTRUCTIONS
|
|
6232
6259
|
}
|
|
6233
6260
|
};
|
|
6234
6261
|
}
|
|
@@ -6522,7 +6549,7 @@ async function callRemembrance(definition, rawArguments) {
|
|
|
6522
6549
|
const headers = {
|
|
6523
6550
|
"content-type": "application/json"
|
|
6524
6551
|
};
|
|
6525
|
-
const apiKey =
|
|
6552
|
+
const apiKey = resolveApiKey();
|
|
6526
6553
|
if (apiKey) {
|
|
6527
6554
|
headers["x-remembrance-api-key"] = apiKey;
|
|
6528
6555
|
}
|
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.4",
|
|
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.4",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"identifier": "@remembrance-ai/mcp-server",
|
|
14
|
-
"version": "0.1.
|
|
14
|
+
"version": "0.1.4",
|
|
15
15
|
"transport": {
|
|
16
16
|
"type": "stdio"
|
|
17
17
|
},
|