@remembrance-ai/mcp-server 0.1.1 → 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/README.md +6 -3
- package/dist/server.js +91 -9
- package/package.json +1 -1
- package/server.json +2 -2
package/README.md
CHANGED
|
@@ -14,11 +14,14 @@ Claude Code users can install the Remembrance plugin instead. It bundles this
|
|
|
14
14
|
MCP server configuration, the Remembrancer skill, and a `UserPromptSubmit` hook
|
|
15
15
|
that auto-queries Remembrance before likely service/API/tool/workflow tasks:
|
|
16
16
|
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
```bash
|
|
18
|
+
claude plugin marketplace add dreamarkinc/remembrance-skills
|
|
19
|
+
claude plugin install remembrance@remembrance
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
+
The `claude plugin` CLI works in any shell; the interactive `/plugin` slash
|
|
23
|
+
command is the equivalent inside a running `claude` session.
|
|
24
|
+
|
|
22
25
|
Environment:
|
|
23
26
|
|
|
24
27
|
- `REMEMBRANCE_API_URL`: Remembrance API origin. Defaults to `https://remembrance.dev`.
|
package/dist/server.js
CHANGED
|
@@ -4455,7 +4455,16 @@ var remembrancePayloadSchema = external_exports.object({
|
|
|
4455
4455
|
lesson: boundedString(MAX_LONG_TEXT_LENGTH),
|
|
4456
4456
|
enterprise_encryption: enterpriseEncryptedPayloadEnvelopeSchema.optional(),
|
|
4457
4457
|
suggested_update: suggestedUpdateSchema.default({ kind: "none" }),
|
|
4458
|
-
evidence: evidenceSchema.default({ artifact_hashes: [] })
|
|
4458
|
+
evidence: evidenceSchema.default({ artifact_hashes: [] }),
|
|
4459
|
+
// Client-only directive: "sign this with my local TOFU key" (the MCP
|
|
4460
|
+
// submit_remembrance tool exposes it, and feedback-next-step tells REST
|
|
4461
|
+
// clients to POST the same payload). The server doesn't need it — the actual
|
|
4462
|
+
// signature arrives in `evidence.attestation` — but a strict schema would
|
|
4463
|
+
// 422 an otherwise-valid submission that forwards this documented field.
|
|
4464
|
+
// Accept it here so a forwarding client can't 422; the REST route strips it
|
|
4465
|
+
// after parse (before auth/idempotency/storage/verifier) so it is never
|
|
4466
|
+
// persisted or hashed.
|
|
4467
|
+
verified_attestation: external_exports.boolean().optional()
|
|
4459
4468
|
}).strict();
|
|
4460
4469
|
var skillMetadataSchema = external_exports.object({
|
|
4461
4470
|
schema_version: external_exports.literal("0.1"),
|
|
@@ -4621,10 +4630,14 @@ var agentFeedbackRequestSchema = external_exports.object({
|
|
|
4621
4630
|
idempotency_key: boundedString(MAX_SHORT_TEXT_LENGTH).optional(),
|
|
4622
4631
|
evidence: evidenceSchema.default({ artifact_hashes: [] })
|
|
4623
4632
|
});
|
|
4633
|
+
var adminReviewActionValueSchema = external_exports.enum([
|
|
4634
|
+
...verifierActionSchema.options,
|
|
4635
|
+
"delete"
|
|
4636
|
+
]);
|
|
4624
4637
|
var adminReviewActionSchema = external_exports.object({
|
|
4625
4638
|
job_id: boundedString(MAX_SHORT_TEXT_LENGTH),
|
|
4626
|
-
action:
|
|
4627
|
-
note: external_exports.string().max(MAX_LONG_TEXT_LENGTH).optional()
|
|
4639
|
+
action: adminReviewActionValueSchema,
|
|
4640
|
+
note: external_exports.string().max(MAX_LONG_TEXT_LENGTH).transform((value) => value.trim()).optional()
|
|
4628
4641
|
});
|
|
4629
4642
|
|
|
4630
4643
|
// ../core/src/seed.ts
|
|
@@ -4638,6 +4651,45 @@ var duplicateCandidateSchema = external_exports.object({
|
|
|
4638
4651
|
slug: external_exports.string().min(1).max(MAX_SHORT_TEXT_LENGTH).optional(),
|
|
4639
4652
|
similarity: external_exports.number().min(0).max(1)
|
|
4640
4653
|
});
|
|
4654
|
+
var PROPOSED_METADATA_MAX_KEYWORDS = 25;
|
|
4655
|
+
var PROPOSED_METADATA_MAX_TAGS = 15;
|
|
4656
|
+
var PROPOSED_METADATA_MAX_DOMAINS = 8;
|
|
4657
|
+
var PROPOSED_METADATA_MAX_TERM_LENGTH = 64;
|
|
4658
|
+
var PROPOSED_METADATA_MAX_RATIONALE_LENGTH = 2e3;
|
|
4659
|
+
var PROPOSED_METADATA_MAX_MODEL_LENGTH = MAX_SHORT_TEXT_LENGTH;
|
|
4660
|
+
var proposedMetadataTermArraySchema = (max) => external_exports.preprocess(
|
|
4661
|
+
(value) => {
|
|
4662
|
+
if (!Array.isArray(value)) {
|
|
4663
|
+
return value;
|
|
4664
|
+
}
|
|
4665
|
+
const seen = /* @__PURE__ */ new Set();
|
|
4666
|
+
const terms = [];
|
|
4667
|
+
for (const entry of value) {
|
|
4668
|
+
if (typeof entry !== "string") {
|
|
4669
|
+
continue;
|
|
4670
|
+
}
|
|
4671
|
+
const trimmed = entry.trim().slice(0, PROPOSED_METADATA_MAX_TERM_LENGTH);
|
|
4672
|
+
if (!trimmed) {
|
|
4673
|
+
continue;
|
|
4674
|
+
}
|
|
4675
|
+
const key = trimmed.toLowerCase();
|
|
4676
|
+
if (seen.has(key)) {
|
|
4677
|
+
continue;
|
|
4678
|
+
}
|
|
4679
|
+
seen.add(key);
|
|
4680
|
+
terms.push(trimmed);
|
|
4681
|
+
}
|
|
4682
|
+
return terms.slice(0, max);
|
|
4683
|
+
},
|
|
4684
|
+
external_exports.array(external_exports.string().min(1).max(PROPOSED_METADATA_MAX_TERM_LENGTH)).max(max)
|
|
4685
|
+
);
|
|
4686
|
+
var proposedSkillMetadataSchema = external_exports.object({
|
|
4687
|
+
keywords: proposedMetadataTermArraySchema(PROPOSED_METADATA_MAX_KEYWORDS),
|
|
4688
|
+
tags: proposedMetadataTermArraySchema(PROPOSED_METADATA_MAX_TAGS),
|
|
4689
|
+
domains: proposedMetadataTermArraySchema(PROPOSED_METADATA_MAX_DOMAINS),
|
|
4690
|
+
rationale: external_exports.string().trim().min(1).max(PROPOSED_METADATA_MAX_RATIONALE_LENGTH),
|
|
4691
|
+
model: external_exports.string().trim().min(1).max(PROPOSED_METADATA_MAX_MODEL_LENGTH)
|
|
4692
|
+
});
|
|
4641
4693
|
var verifierOutputSchema = external_exports.object({
|
|
4642
4694
|
recommended_action: verifierActionSchema,
|
|
4643
4695
|
confidence: external_exports.number().min(0).max(1),
|
|
@@ -4656,11 +4708,14 @@ var verifierOutputSchema = external_exports.object({
|
|
|
4656
4708
|
message: `score_updates must be ${MAX_JSON_FIELD_BYTES} bytes or smaller`
|
|
4657
4709
|
});
|
|
4658
4710
|
}
|
|
4659
|
-
}).nullable().default(null)
|
|
4711
|
+
}).nullable().default(null),
|
|
4712
|
+
// Advisory retrieval enrichment (see proposedSkillMetadataSchema). Optional
|
|
4713
|
+
// and defaults to null so existing verifier outputs remain valid.
|
|
4714
|
+
proposed_metadata: proposedSkillMetadataSchema.nullable().default(null)
|
|
4660
4715
|
});
|
|
4661
4716
|
|
|
4662
4717
|
// src/server.ts
|
|
4663
|
-
import { existsSync } from "node:fs";
|
|
4718
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
4664
4719
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
4665
4720
|
import { homedir } from "node:os";
|
|
4666
4721
|
import { dirname, join } from "node:path";
|
|
@@ -6082,8 +6137,33 @@ function inputSchemaFor(schema, name) {
|
|
|
6082
6137
|
}
|
|
6083
6138
|
|
|
6084
6139
|
// src/server.ts
|
|
6085
|
-
|
|
6086
|
-
|
|
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";
|
|
6087
6167
|
var tools = toolDefinitions;
|
|
6088
6168
|
var inputBuffer = Buffer.alloc(0);
|
|
6089
6169
|
process.stdin.on("data", (chunk) => {
|
|
@@ -6163,6 +6243,7 @@ async function handleRequest(request) {
|
|
|
6163
6243
|
}
|
|
6164
6244
|
writeResponse(response.id, response.result, response.error);
|
|
6165
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.";
|
|
6166
6247
|
async function dispatchJsonRpcRequest(request) {
|
|
6167
6248
|
if (request.method === "initialize") {
|
|
6168
6249
|
return {
|
|
@@ -6173,7 +6254,8 @@ async function dispatchJsonRpcRequest(request) {
|
|
|
6173
6254
|
serverInfo: {
|
|
6174
6255
|
name: "@remembrance-ai/mcp-server",
|
|
6175
6256
|
version: SERVER_VERSION
|
|
6176
|
-
}
|
|
6257
|
+
},
|
|
6258
|
+
instructions: SERVER_INSTRUCTIONS
|
|
6177
6259
|
}
|
|
6178
6260
|
};
|
|
6179
6261
|
}
|
|
@@ -6467,7 +6549,7 @@ async function callRemembrance(definition, rawArguments) {
|
|
|
6467
6549
|
const headers = {
|
|
6468
6550
|
"content-type": "application/json"
|
|
6469
6551
|
};
|
|
6470
|
-
const apiKey =
|
|
6552
|
+
const apiKey = resolveApiKey();
|
|
6471
6553
|
if (apiKey) {
|
|
6472
6554
|
headers["x-remembrance-api-key"] = apiKey;
|
|
6473
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
|
},
|