@totalreclaw/mcp-server 2.6.1 → 3.0.0
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 +47 -7
- package/dist/claims-helper.d.ts +79 -31
- package/dist/claims-helper.d.ts.map +1 -1
- package/dist/claims-helper.js +125 -45
- package/dist/claims-helper.js.map +1 -1
- package/dist/consolidation.d.ts +10 -7
- package/dist/consolidation.d.ts.map +1 -1
- package/dist/consolidation.js +105 -32
- package/dist/consolidation.js.map +1 -1
- package/dist/index.js +177 -40
- package/dist/index.js.map +1 -1
- package/dist/prompts.d.ts +13 -13
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +111 -178
- package/dist/prompts.js.map +1 -1
- package/dist/subgraph/store.d.ts +5 -2
- package/dist/subgraph/store.d.ts.map +1 -1
- package/dist/subgraph/store.js +6 -3
- package/dist/subgraph/store.js.map +1 -1
- package/dist/tools/consolidate.js +12 -12
- package/dist/tools/consolidate.js.map +1 -1
- package/dist/tools/debrief.d.ts.map +1 -1
- package/dist/tools/debrief.js +11 -3
- package/dist/tools/debrief.js.map +1 -1
- package/dist/tools/export.d.ts.map +1 -1
- package/dist/tools/export.js +61 -12
- package/dist/tools/export.js.map +1 -1
- package/dist/tools/forget.d.ts +14 -0
- package/dist/tools/forget.d.ts.map +1 -1
- package/dist/tools/forget.js +8 -2
- package/dist/tools/forget.js.map +1 -1
- package/dist/tools/import-batch.d.ts.map +1 -1
- package/dist/tools/import-batch.js +10 -3
- package/dist/tools/import-batch.js.map +1 -1
- package/dist/tools/index.d.ts +2 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +15 -1
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/pin.d.ts +8 -0
- package/dist/tools/pin.d.ts.map +1 -1
- package/dist/tools/pin.js +44 -12
- package/dist/tools/pin.js.map +1 -1
- package/dist/tools/recall.d.ts.map +1 -1
- package/dist/tools/recall.js +63 -10
- package/dist/tools/recall.js.map +1 -1
- package/dist/tools/remember.d.ts +44 -3
- package/dist/tools/remember.d.ts.map +1 -1
- package/dist/tools/remember.js +97 -10
- package/dist/tools/remember.js.map +1 -1
- package/dist/tools/retype.d.ts +119 -0
- package/dist/tools/retype.d.ts.map +1 -0
- package/dist/tools/retype.js +360 -0
- package/dist/tools/retype.js.map +1 -0
- package/dist/tools/set-scope.d.ts +57 -0
- package/dist/tools/set-scope.d.ts.map +1 -0
- package/dist/tools/set-scope.js +118 -0
- package/dist/tools/set-scope.js.map +1 -0
- package/dist/v1-types.d.ts +79 -0
- package/dist/v1-types.d.ts.map +1 -0
- package/dist/v1-types.js +104 -0
- package/dist/v1-types.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* `totalreclaw_retype` — change the v1 type of an existing memory.
|
|
4
|
+
*
|
|
5
|
+
* Implementation pattern mirrors `tools/pin.ts`: fetch the original, decrypt,
|
|
6
|
+
* rebuild a new canonical claim with the type override, submit on-chain as a
|
|
7
|
+
* two-payload batch (tombstone old + write new with `superseded_by` link).
|
|
8
|
+
*
|
|
9
|
+
* Spec: `docs/specs/totalreclaw/memory-taxonomy-v1.md` §3-new-MCP-tools.
|
|
10
|
+
*/
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.retypeToolDefinition = void 0;
|
|
16
|
+
exports.validateRetypeArgs = validateRetypeArgs;
|
|
17
|
+
exports.extractV1Fields = extractV1Fields;
|
|
18
|
+
exports.executeMetadataOp = executeMetadataOp;
|
|
19
|
+
exports.executeRetype = executeRetype;
|
|
20
|
+
exports.handleRetype = handleRetype;
|
|
21
|
+
exports.handleRetypeWithDeps = handleRetypeWithDeps;
|
|
22
|
+
const node_crypto_1 = __importDefault(require("node:crypto"));
|
|
23
|
+
const store_js_1 = require("../subgraph/store.js");
|
|
24
|
+
const v1_types_js_1 = require("../v1-types.js");
|
|
25
|
+
const claims_helper_js_1 = require("../claims-helper.js");
|
|
26
|
+
// ── Tool definition ──────────────────────────────────────────────────────────
|
|
27
|
+
const RETYPE_DESCRIPTION = 'Reclassify memory to different v1 type.\n' +
|
|
28
|
+
'\nINVOKE WHEN USER SAYS:\n' +
|
|
29
|
+
'- "that was actually a directive, not a preference"\n' +
|
|
30
|
+
'- "more of a decision than a goal" / "retype as claim"\n' +
|
|
31
|
+
'- "file that under directives/commitments"\n' +
|
|
32
|
+
'\nDOES: builds v1 claim with new_type, links via superseded_by, tombstones original. Idempotent.\n' +
|
|
33
|
+
'\nWHEN NOT TO USE:\n' +
|
|
34
|
+
'- text wrong → totalreclaw_forget + totalreclaw_remember\n' +
|
|
35
|
+
'- unsure which memory → totalreclaw_recall first\n' +
|
|
36
|
+
'\nnew_type: claim|preference|directive|commitment|episode|summary.';
|
|
37
|
+
exports.retypeToolDefinition = {
|
|
38
|
+
name: 'totalreclaw_retype',
|
|
39
|
+
description: RETYPE_DESCRIPTION,
|
|
40
|
+
inputSchema: {
|
|
41
|
+
type: 'object',
|
|
42
|
+
properties: {
|
|
43
|
+
memory_id: {
|
|
44
|
+
type: 'string',
|
|
45
|
+
description: 'The ID of the memory to retype (from a prior totalreclaw_recall result).',
|
|
46
|
+
},
|
|
47
|
+
new_type: {
|
|
48
|
+
type: 'string',
|
|
49
|
+
enum: [...v1_types_js_1.VALID_MEMORY_TYPES_V1],
|
|
50
|
+
description: 'New Memory Taxonomy v1 type. One of: claim, preference, directive, commitment, episode, summary.',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
required: ['memory_id', 'new_type'],
|
|
54
|
+
},
|
|
55
|
+
annotations: {
|
|
56
|
+
readOnlyHint: false,
|
|
57
|
+
destructiveHint: false,
|
|
58
|
+
idempotentHint: true,
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
function validateRetypeArgs(args) {
|
|
62
|
+
if (!args || typeof args !== 'object') {
|
|
63
|
+
return {
|
|
64
|
+
ok: false,
|
|
65
|
+
memoryId: '',
|
|
66
|
+
newType: 'claim',
|
|
67
|
+
error: 'Invalid input: memory_id and new_type are required',
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
const record = args;
|
|
71
|
+
const memoryId = record.memory_id;
|
|
72
|
+
if (typeof memoryId !== 'string' || memoryId.trim().length === 0) {
|
|
73
|
+
return {
|
|
74
|
+
ok: false,
|
|
75
|
+
memoryId: '',
|
|
76
|
+
newType: 'claim',
|
|
77
|
+
error: 'Invalid input: memory_id must be a non-empty string',
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
const newType = record.new_type;
|
|
81
|
+
if (typeof newType !== 'string' ||
|
|
82
|
+
!v1_types_js_1.VALID_MEMORY_TYPES_V1.includes(newType)) {
|
|
83
|
+
return {
|
|
84
|
+
ok: false,
|
|
85
|
+
memoryId: memoryId.trim(),
|
|
86
|
+
newType: 'claim',
|
|
87
|
+
error: `Invalid input: new_type must be one of ${v1_types_js_1.VALID_MEMORY_TYPES_V1.join(', ')}`,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
return {
|
|
91
|
+
ok: true,
|
|
92
|
+
memoryId: memoryId.trim(),
|
|
93
|
+
newType: newType,
|
|
94
|
+
error: '',
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Parse a decrypted blob into a MemoryClaimV1-shaped object. Handles three
|
|
99
|
+
* input formats:
|
|
100
|
+
*
|
|
101
|
+
* 1. v1 canonical JSON (`{schema_version: "1.0", text, type, source, ...}`)
|
|
102
|
+
* 2. v0 short-key canonical JSON (`{t, c, i, sa, ea, ...}`) — legacy plugin
|
|
103
|
+
* 3. v0 plugin-legacy (`{text, metadata: {type, importance}}`)
|
|
104
|
+
*
|
|
105
|
+
* Returns a v1 shape that callers can mutate then pass to `buildV1ClaimBlob`.
|
|
106
|
+
* The caller is responsible for overriding the specific field being updated.
|
|
107
|
+
*/
|
|
108
|
+
function extractV1Fields(decrypted) {
|
|
109
|
+
try {
|
|
110
|
+
const obj = JSON.parse(decrypted);
|
|
111
|
+
// v1 canonical path — presence of top-level text+type (closed enum) is
|
|
112
|
+
// the signature; `schema_version` is omitted when equal to the default
|
|
113
|
+
// (Rust `skip_serializing_if`), so we don't require it.
|
|
114
|
+
if (typeof obj.text === 'string' &&
|
|
115
|
+
typeof obj.type === 'string' &&
|
|
116
|
+
v1_types_js_1.VALID_MEMORY_TYPES_V1.includes(String(obj.type)) &&
|
|
117
|
+
(typeof obj.schema_version !== 'string' ||
|
|
118
|
+
obj.schema_version === v1_types_js_1.MEMORY_CLAIM_V1_SCHEMA_VERSION)) {
|
|
119
|
+
return {
|
|
120
|
+
text: String(obj.text),
|
|
121
|
+
type: v1_types_js_1.VALID_MEMORY_TYPES_V1.includes(String(obj.type))
|
|
122
|
+
? obj.type
|
|
123
|
+
: 'claim',
|
|
124
|
+
source: typeof obj.source === 'string' ? obj.source : 'user-inferred',
|
|
125
|
+
scope: typeof obj.scope === 'string' ? obj.scope : undefined,
|
|
126
|
+
volatility: typeof obj.volatility === 'string' ? obj.volatility : undefined,
|
|
127
|
+
reasoning: typeof obj.reasoning === 'string' ? obj.reasoning : undefined,
|
|
128
|
+
importance: typeof obj.importance === 'number' ? obj.importance : undefined,
|
|
129
|
+
confidence: typeof obj.confidence === 'number' ? obj.confidence : undefined,
|
|
130
|
+
createdAt: typeof obj.created_at === 'string' ? obj.created_at : undefined,
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
// v0 short-key canonical path — map `c` short-key to v1 type, default source user-inferred
|
|
134
|
+
if (typeof obj.t === 'string') {
|
|
135
|
+
const cMap = {
|
|
136
|
+
fact: 'claim',
|
|
137
|
+
claim: 'claim',
|
|
138
|
+
ctx: 'claim',
|
|
139
|
+
dec: 'claim',
|
|
140
|
+
pref: 'preference',
|
|
141
|
+
rule: 'directive',
|
|
142
|
+
goal: 'commitment',
|
|
143
|
+
epi: 'episode',
|
|
144
|
+
sum: 'summary',
|
|
145
|
+
};
|
|
146
|
+
return {
|
|
147
|
+
text: String(obj.t),
|
|
148
|
+
type: cMap[String(obj.c)] ?? 'claim',
|
|
149
|
+
source: 'user-inferred',
|
|
150
|
+
importance: typeof obj.i === 'number' ? Math.max(1, Math.min(10, Math.round(obj.i))) : undefined,
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
// v0 plugin-legacy path
|
|
154
|
+
if (typeof obj.text === 'string') {
|
|
155
|
+
const meta = obj.metadata ?? {};
|
|
156
|
+
const typeLegacyToV1 = {
|
|
157
|
+
fact: 'claim',
|
|
158
|
+
context: 'claim',
|
|
159
|
+
decision: 'claim',
|
|
160
|
+
preference: 'preference',
|
|
161
|
+
rule: 'directive',
|
|
162
|
+
goal: 'commitment',
|
|
163
|
+
episodic: 'episode',
|
|
164
|
+
summary: 'summary',
|
|
165
|
+
};
|
|
166
|
+
const legacyType = typeof meta.type === 'string' ? meta.type : 'fact';
|
|
167
|
+
const impFloat = typeof meta.importance === 'number' ? meta.importance : 0.5;
|
|
168
|
+
return {
|
|
169
|
+
text: String(obj.text),
|
|
170
|
+
type: typeLegacyToV1[legacyType] ?? 'claim',
|
|
171
|
+
source: 'user-inferred',
|
|
172
|
+
importance: Math.max(1, Math.min(10, Math.round(impFloat * 10))),
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
catch {
|
|
177
|
+
// fall through
|
|
178
|
+
}
|
|
179
|
+
// Raw-text fallback
|
|
180
|
+
return {
|
|
181
|
+
text: decrypted,
|
|
182
|
+
type: 'claim',
|
|
183
|
+
source: 'user-inferred',
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Generic supersede operation. Used by retype + set_scope. Builds a fresh v1
|
|
188
|
+
* blob with the caller's field override and submits a two-payload batch
|
|
189
|
+
* (tombstone old + new fact with `superseded_by: old_id`).
|
|
190
|
+
*
|
|
191
|
+
* `buildOverride` produces the v1 claim input given the extracted original.
|
|
192
|
+
* Returns `{ previousValue, newValue }` so the result can surface a readable
|
|
193
|
+
* diff to the tool response.
|
|
194
|
+
*/
|
|
195
|
+
async function executeMetadataOp(memoryId, deps, readCurrent, isNoop, buildOverride, nextValue, opName) {
|
|
196
|
+
// 1. Fetch the original fact
|
|
197
|
+
const existing = await deps.fetchFactById(memoryId);
|
|
198
|
+
if (!existing) {
|
|
199
|
+
return {
|
|
200
|
+
success: false,
|
|
201
|
+
memory_id: memoryId,
|
|
202
|
+
error: `Memory not found: ${memoryId}`,
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
// 2. Decrypt
|
|
206
|
+
const blobHex = existing.encryptedBlob.startsWith('0x')
|
|
207
|
+
? existing.encryptedBlob.slice(2)
|
|
208
|
+
: existing.encryptedBlob;
|
|
209
|
+
let plaintext;
|
|
210
|
+
try {
|
|
211
|
+
plaintext = deps.decryptBlob(blobHex);
|
|
212
|
+
}
|
|
213
|
+
catch (err) {
|
|
214
|
+
return {
|
|
215
|
+
success: false,
|
|
216
|
+
memory_id: memoryId,
|
|
217
|
+
error: `Failed to decrypt memory: ${err instanceof Error ? err.message : String(err)}`,
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
const extracted = extractV1Fields(plaintext);
|
|
221
|
+
const current = readCurrent(extracted);
|
|
222
|
+
// 3. Idempotent early-exit
|
|
223
|
+
if (isNoop(current, nextValue)) {
|
|
224
|
+
return {
|
|
225
|
+
success: true,
|
|
226
|
+
memory_id: memoryId,
|
|
227
|
+
previous_value: String(current),
|
|
228
|
+
new_value: String(nextValue),
|
|
229
|
+
idempotent: true,
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
// 4. Build new v1 blob with the override
|
|
233
|
+
let newBlobPlain;
|
|
234
|
+
try {
|
|
235
|
+
const input = buildOverride(extracted, nextValue);
|
|
236
|
+
newBlobPlain = (0, claims_helper_js_1.buildV1ClaimBlob)(input);
|
|
237
|
+
}
|
|
238
|
+
catch (err) {
|
|
239
|
+
return {
|
|
240
|
+
success: false,
|
|
241
|
+
memory_id: memoryId,
|
|
242
|
+
error: `Failed to build updated claim: ${err instanceof Error ? err.message : String(err)}`,
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
// 5. Encrypt
|
|
246
|
+
let newBlobHex;
|
|
247
|
+
try {
|
|
248
|
+
newBlobHex = deps.encryptBlob(newBlobPlain);
|
|
249
|
+
}
|
|
250
|
+
catch (err) {
|
|
251
|
+
return {
|
|
252
|
+
success: false,
|
|
253
|
+
memory_id: memoryId,
|
|
254
|
+
error: `Failed to encrypt updated claim: ${err instanceof Error ? err.message : String(err)}`,
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
// 6. Regenerate trapdoors (text didn't change but we want fresh LSH for the
|
|
258
|
+
// new fact id so it's findable in recall).
|
|
259
|
+
let trapdoors;
|
|
260
|
+
try {
|
|
261
|
+
trapdoors = await deps.generateIndices(extracted.text, []);
|
|
262
|
+
}
|
|
263
|
+
catch {
|
|
264
|
+
trapdoors = { blindIndices: [] };
|
|
265
|
+
}
|
|
266
|
+
// 7. Build tombstone + new payloads
|
|
267
|
+
const tombstonePayload = {
|
|
268
|
+
id: memoryId,
|
|
269
|
+
timestamp: new Date().toISOString(),
|
|
270
|
+
owner: deps.owner,
|
|
271
|
+
encryptedBlob: Buffer.from('tombstone').toString('hex'),
|
|
272
|
+
blindIndices: [],
|
|
273
|
+
decayScore: 0,
|
|
274
|
+
source: `mcp_${opName}`,
|
|
275
|
+
contentFp: '',
|
|
276
|
+
agentId: deps.sourceAgent,
|
|
277
|
+
};
|
|
278
|
+
const newFactId = node_crypto_1.default.randomUUID();
|
|
279
|
+
const newPayload = {
|
|
280
|
+
id: newFactId,
|
|
281
|
+
timestamp: new Date().toISOString(),
|
|
282
|
+
owner: deps.owner,
|
|
283
|
+
encryptedBlob: newBlobHex,
|
|
284
|
+
blindIndices: trapdoors.blindIndices,
|
|
285
|
+
decayScore: 0.85, // Retype/scope updates land as active with healthy decay
|
|
286
|
+
source: `mcp_${opName}`,
|
|
287
|
+
contentFp: '',
|
|
288
|
+
agentId: deps.sourceAgent,
|
|
289
|
+
encryptedEmbedding: trapdoors.encryptedEmbedding,
|
|
290
|
+
};
|
|
291
|
+
const payloads = [(0, store_js_1.encodeFactProtobuf)(tombstonePayload), (0, store_js_1.encodeFactProtobuf)(newPayload)];
|
|
292
|
+
// 8. Submit
|
|
293
|
+
try {
|
|
294
|
+
const { txHash, success } = await deps.submitBatch(payloads);
|
|
295
|
+
if (!success) {
|
|
296
|
+
return {
|
|
297
|
+
success: false,
|
|
298
|
+
memory_id: memoryId,
|
|
299
|
+
previous_value: String(current),
|
|
300
|
+
error: 'On-chain batch submission failed',
|
|
301
|
+
tx_hash: txHash,
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
return {
|
|
305
|
+
success: true,
|
|
306
|
+
memory_id: memoryId,
|
|
307
|
+
new_memory_id: newFactId,
|
|
308
|
+
previous_value: String(current),
|
|
309
|
+
new_value: String(nextValue),
|
|
310
|
+
tx_hash: txHash,
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
catch (err) {
|
|
314
|
+
return {
|
|
315
|
+
success: false,
|
|
316
|
+
memory_id: memoryId,
|
|
317
|
+
previous_value: String(current),
|
|
318
|
+
error: `Failed to submit batch: ${err instanceof Error ? err.message : String(err)}`,
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
// ── Public entry point ───────────────────────────────────────────────────────
|
|
323
|
+
/**
|
|
324
|
+
* Execute the retype operation: build a new v1 claim with `new_type` and
|
|
325
|
+
* chain it over the original via `superseded_by`.
|
|
326
|
+
*/
|
|
327
|
+
async function executeRetype(memoryId, newType, deps) {
|
|
328
|
+
return executeMetadataOp(memoryId, deps, (e) => e.type, (cur, next) => cur === next, (e, next) => ({
|
|
329
|
+
text: e.text,
|
|
330
|
+
type: next,
|
|
331
|
+
source: e.source,
|
|
332
|
+
scope: e.scope,
|
|
333
|
+
volatility: e.volatility,
|
|
334
|
+
reasoning: e.reasoning,
|
|
335
|
+
importance: e.importance,
|
|
336
|
+
confidence: e.confidence,
|
|
337
|
+
createdAt: e.createdAt,
|
|
338
|
+
supersededBy: memoryId,
|
|
339
|
+
}), newType, 'retype');
|
|
340
|
+
}
|
|
341
|
+
// ── Handler wrappers ─────────────────────────────────────────────────────────
|
|
342
|
+
async function handleRetype(args) {
|
|
343
|
+
const validation = validateRetypeArgs(args);
|
|
344
|
+
if (!validation.ok) {
|
|
345
|
+
return errorResponse(validation.error);
|
|
346
|
+
}
|
|
347
|
+
// HTTP (self-hosted) mode: not yet supported — same policy as pin/unpin.
|
|
348
|
+
return errorResponse('Retype is only supported with the managed service. Self-hosted mode does not yet implement v1 supersession.');
|
|
349
|
+
}
|
|
350
|
+
async function handleRetypeWithDeps(args, deps) {
|
|
351
|
+
const validation = validateRetypeArgs(args);
|
|
352
|
+
if (!validation.ok)
|
|
353
|
+
return errorResponse(validation.error);
|
|
354
|
+
const result = await executeRetype(validation.memoryId, validation.newType, deps);
|
|
355
|
+
return { content: [{ type: 'text', text: JSON.stringify(result) }] };
|
|
356
|
+
}
|
|
357
|
+
function errorResponse(error) {
|
|
358
|
+
return { content: [{ type: 'text', text: JSON.stringify({ success: false, error }) }] };
|
|
359
|
+
}
|
|
360
|
+
//# sourceMappingURL=retype.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retype.js","sourceRoot":"","sources":["../../src/tools/retype.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;;;;AAgEH,gDAqCC;AAyCD,0CA8FC;AAWD,8CA8IC;AAqBD,sCAyBC;AAID,oCAWC;AAED,oDAQC;AA1cD,8DAAiC;AAEjC,mDAA0D;AAC1D,gDAOwB;AACxB,0DAAuD;AAEvD,gFAAgF;AAEhF,MAA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— set or change the v1 scope of an existing memory.
|
|
3
|
+
*
|
|
4
|
+
* Uses the same supersede pattern as `retype` and `pin`: rebuild the inner
|
|
5
|
+
* claim with the scope override, tombstone the old fact id, write the new
|
|
6
|
+
* one with `superseded_by` linking back.
|
|
7
|
+
*
|
|
8
|
+
* Spec: `docs/specs/totalreclaw/memory-taxonomy-v1.md` §3-new-MCP-tools.
|
|
9
|
+
*/
|
|
10
|
+
import { type MemoryScope } from '../v1-types.js';
|
|
11
|
+
import { type MetadataOpDeps, type MetadataOpResult } from './retype.js';
|
|
12
|
+
export declare const setScopeToolDefinition: {
|
|
13
|
+
name: string;
|
|
14
|
+
description: string;
|
|
15
|
+
inputSchema: {
|
|
16
|
+
type: string;
|
|
17
|
+
properties: {
|
|
18
|
+
memory_id: {
|
|
19
|
+
type: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
scope: {
|
|
23
|
+
type: string;
|
|
24
|
+
enum: ("work" | "personal" | "health" | "family" | "creative" | "finance" | "misc" | "unspecified")[];
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
required: string[];
|
|
29
|
+
};
|
|
30
|
+
annotations: {
|
|
31
|
+
readOnlyHint: boolean;
|
|
32
|
+
destructiveHint: boolean;
|
|
33
|
+
idempotentHint: boolean;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
interface ValidatedArgs {
|
|
37
|
+
ok: boolean;
|
|
38
|
+
memoryId: string;
|
|
39
|
+
scope: MemoryScope;
|
|
40
|
+
error: string;
|
|
41
|
+
}
|
|
42
|
+
export declare function validateSetScopeArgs(args: unknown): ValidatedArgs;
|
|
43
|
+
export declare function executeSetScope(memoryId: string, newScope: MemoryScope, deps: MetadataOpDeps): Promise<MetadataOpResult>;
|
|
44
|
+
export declare function handleSetScope(args: unknown): Promise<{
|
|
45
|
+
content: Array<{
|
|
46
|
+
type: string;
|
|
47
|
+
text: string;
|
|
48
|
+
}>;
|
|
49
|
+
}>;
|
|
50
|
+
export declare function handleSetScopeWithDeps(args: unknown, deps: MetadataOpDeps): Promise<{
|
|
51
|
+
content: Array<{
|
|
52
|
+
type: string;
|
|
53
|
+
text: string;
|
|
54
|
+
}>;
|
|
55
|
+
}>;
|
|
56
|
+
export {};
|
|
57
|
+
//# sourceMappingURL=set-scope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set-scope.d.ts","sourceRoot":"","sources":["../../src/tools/set-scope.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACtB,MAAM,aAAa,CAAC;AAarB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;CAwBlC,CAAC;AAEF,UAAU,aAAa;IACrB,EAAE,EAAE,OAAO,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,WAAW,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,GAAG,aAAa,CAkCjE;AAED,wBAAsB,eAAe,CACnC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,WAAW,EACrB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,gBAAgB,CAAC,CAqB3B;AAED,wBAAsB,cAAc,CAClC,IAAI,EAAE,OAAO,GACZ,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CAQ7D;AAED,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,OAAO,EACb,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CAK7D"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* `totalreclaw_set_scope` — set or change the v1 scope of an existing memory.
|
|
4
|
+
*
|
|
5
|
+
* Uses the same supersede pattern as `retype` and `pin`: rebuild the inner
|
|
6
|
+
* claim with the scope override, tombstone the old fact id, write the new
|
|
7
|
+
* one with `superseded_by` linking back.
|
|
8
|
+
*
|
|
9
|
+
* Spec: `docs/specs/totalreclaw/memory-taxonomy-v1.md` §3-new-MCP-tools.
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.setScopeToolDefinition = void 0;
|
|
13
|
+
exports.validateSetScopeArgs = validateSetScopeArgs;
|
|
14
|
+
exports.executeSetScope = executeSetScope;
|
|
15
|
+
exports.handleSetScope = handleSetScope;
|
|
16
|
+
exports.handleSetScopeWithDeps = handleSetScopeWithDeps;
|
|
17
|
+
const v1_types_js_1 = require("../v1-types.js");
|
|
18
|
+
const retype_js_1 = require("./retype.js");
|
|
19
|
+
const SET_SCOPE_DESCRIPTION = 'Re-tag memory under different life-domain scope (work|personal|health|family|creative|finance|misc|unspecified).\n' +
|
|
20
|
+
'\nINVOKE WHEN USER SAYS:\n' +
|
|
21
|
+
'- "actually that\'s work context, not personal"\n' +
|
|
22
|
+
'- "file that under health" / "move to finance"\n' +
|
|
23
|
+
'- "wrong scope — about my kids, not work"\n' +
|
|
24
|
+
'\nDOES: builds v1 claim with new scope, links via superseded_by, tombstones original. Idempotent.\n' +
|
|
25
|
+
'\nWHEN NOT TO USE:\n' +
|
|
26
|
+
'- memory wrong → totalreclaw_forget + totalreclaw_remember\n' +
|
|
27
|
+
'- type wrong (not scope) → totalreclaw_retype';
|
|
28
|
+
exports.setScopeToolDefinition = {
|
|
29
|
+
name: 'totalreclaw_set_scope',
|
|
30
|
+
description: SET_SCOPE_DESCRIPTION,
|
|
31
|
+
inputSchema: {
|
|
32
|
+
type: 'object',
|
|
33
|
+
properties: {
|
|
34
|
+
memory_id: {
|
|
35
|
+
type: 'string',
|
|
36
|
+
description: 'The ID of the memory to retag (from a prior totalreclaw_recall result).',
|
|
37
|
+
},
|
|
38
|
+
scope: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
enum: [...v1_types_js_1.VALID_MEMORY_SCOPES],
|
|
41
|
+
description: 'New scope value. One of: work, personal, health, family, creative, finance, misc, unspecified.',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
required: ['memory_id', 'scope'],
|
|
45
|
+
},
|
|
46
|
+
annotations: {
|
|
47
|
+
readOnlyHint: false,
|
|
48
|
+
destructiveHint: false,
|
|
49
|
+
idempotentHint: true,
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
function validateSetScopeArgs(args) {
|
|
53
|
+
if (!args || typeof args !== 'object') {
|
|
54
|
+
return {
|
|
55
|
+
ok: false,
|
|
56
|
+
memoryId: '',
|
|
57
|
+
scope: 'unspecified',
|
|
58
|
+
error: 'Invalid input: memory_id and scope are required',
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
const record = args;
|
|
62
|
+
const memoryId = record.memory_id;
|
|
63
|
+
if (typeof memoryId !== 'string' || memoryId.trim().length === 0) {
|
|
64
|
+
return {
|
|
65
|
+
ok: false,
|
|
66
|
+
memoryId: '',
|
|
67
|
+
scope: 'unspecified',
|
|
68
|
+
error: 'Invalid input: memory_id must be a non-empty string',
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
const scope = record.scope;
|
|
72
|
+
if (typeof scope !== 'string' || !v1_types_js_1.VALID_MEMORY_SCOPES.includes(scope)) {
|
|
73
|
+
return {
|
|
74
|
+
ok: false,
|
|
75
|
+
memoryId: memoryId.trim(),
|
|
76
|
+
scope: 'unspecified',
|
|
77
|
+
error: `Invalid input: scope must be one of ${v1_types_js_1.VALID_MEMORY_SCOPES.join(', ')}`,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
ok: true,
|
|
82
|
+
memoryId: memoryId.trim(),
|
|
83
|
+
scope: scope,
|
|
84
|
+
error: '',
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
async function executeSetScope(memoryId, newScope, deps) {
|
|
88
|
+
return (0, retype_js_1.executeMetadataOp)(memoryId, deps, (e) => e.scope ?? 'unspecified', (cur, next) => cur === next, (e, next) => ({
|
|
89
|
+
text: e.text,
|
|
90
|
+
type: e.type,
|
|
91
|
+
source: e.source,
|
|
92
|
+
scope: next,
|
|
93
|
+
volatility: e.volatility,
|
|
94
|
+
reasoning: e.reasoning,
|
|
95
|
+
importance: e.importance,
|
|
96
|
+
confidence: e.confidence,
|
|
97
|
+
createdAt: e.createdAt,
|
|
98
|
+
supersededBy: memoryId,
|
|
99
|
+
}), newScope, 'set_scope');
|
|
100
|
+
}
|
|
101
|
+
async function handleSetScope(args) {
|
|
102
|
+
const validation = validateSetScopeArgs(args);
|
|
103
|
+
if (!validation.ok) {
|
|
104
|
+
return errorResponse(validation.error);
|
|
105
|
+
}
|
|
106
|
+
return errorResponse('Set-scope is only supported with the managed service. Self-hosted mode does not yet implement v1 supersession.');
|
|
107
|
+
}
|
|
108
|
+
async function handleSetScopeWithDeps(args, deps) {
|
|
109
|
+
const validation = validateSetScopeArgs(args);
|
|
110
|
+
if (!validation.ok)
|
|
111
|
+
return errorResponse(validation.error);
|
|
112
|
+
const result = await executeSetScope(validation.memoryId, validation.scope, deps);
|
|
113
|
+
return { content: [{ type: 'text', text: JSON.stringify(result) }] };
|
|
114
|
+
}
|
|
115
|
+
function errorResponse(error) {
|
|
116
|
+
return { content: [{ type: 'text', text: JSON.stringify({ success: false, error }) }] };
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=set-scope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set-scope.js","sourceRoot":"","sources":["../../src/t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;QACtB,YAAY,EAAE,QAAQ;KACvB,CAAC,EACF,QAAQ,EACR,WAAW,CACZ,CAAC;AACJ,CAAC;AAEM,KAAK,UAAU,cAAc,CAClC,IAAa;IAEb,MAAM,UAAU,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC;IAC9C,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,CAAC;QACnB,OAAO,aAAa,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC;IACD,OAAO,aAAa,CAClB,gHAAgH,CACjH,CAAC;AACJ,CAAC;AAEM,KAAK,UAAU,sBAAsB,CAC1C,IAAa,EACb,IAAoB;IAEpB,MAAM,UAAU,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC;IAC9C,IAAI,CAAC,UAAU,CAAC,EAAE;QAAE,OAAO,aAAa,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IAC3D,MAAM,MAAM,GAAG,MAAM,eAAe,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAClF,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC;AACvE,CAAC;AAED,SAAS,aAAa,CAAC,KAAa;IAClC,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AAC1F,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Memory Taxonomy v1 — client-side TypeScript mirrors of the canonical
|
|
3
|
+
* enums defined in `rust/totalreclaw-core/src/claims.rs`.
|
|
4
|
+
*
|
|
5
|
+
* Single source of truth for MCP code that accepts / validates v1 fields on
|
|
6
|
+
* the way in from the tool schema. The actual (de)serialization goes through
|
|
7
|
+
* `@totalreclaw/core`'s `validateMemoryClaimV1` / `parseMemoryTypeV1` /
|
|
8
|
+
* `parseMemorySource` — this module only covers the string enumerations
|
|
9
|
+
* so callers can narrow `unknown` tool args without round-tripping WASM.
|
|
10
|
+
*
|
|
11
|
+
* Spec: `docs/specs/totalreclaw/memory-taxonomy-v1.md`.
|
|
12
|
+
*/
|
|
13
|
+
/** Closed enum of v1 speech-act-grounded memory types. */
|
|
14
|
+
export declare const VALID_MEMORY_TYPES_V1: readonly ["claim", "preference", "directive", "commitment", "episode", "summary"];
|
|
15
|
+
export type MemoryTypeV1 = (typeof VALID_MEMORY_TYPES_V1)[number];
|
|
16
|
+
/** Provenance source for a memory claim (Tier 1 retrieval signal). */
|
|
17
|
+
export declare const VALID_MEMORY_SOURCES: readonly ["user", "user-inferred", "assistant", "external", "derived"];
|
|
18
|
+
export type MemorySource = (typeof VALID_MEMORY_SOURCES)[number];
|
|
19
|
+
/**
|
|
20
|
+
* Life-domain scope for a memory claim. The enum is open-extensible per the
|
|
21
|
+
* v1 spec, but every v1-compliant client MUST accept these eight values when
|
|
22
|
+
* reading from a vault written by another client.
|
|
23
|
+
*/
|
|
24
|
+
export declare const VALID_MEMORY_SCOPES: readonly ["work", "personal", "health", "family", "creative", "finance", "misc", "unspecified"];
|
|
25
|
+
export type MemoryScope = (typeof VALID_MEMORY_SCOPES)[number];
|
|
26
|
+
/** Temporal stability of a memory claim (assigned in comparative rescoring pass). */
|
|
27
|
+
export declare const VALID_MEMORY_VOLATILITIES: readonly ["stable", "updatable", "ephemeral"];
|
|
28
|
+
export type MemoryVolatility = (typeof VALID_MEMORY_VOLATILITIES)[number];
|
|
29
|
+
/** Entity reference inside a v1 claim. */
|
|
30
|
+
export interface MemoryEntityV1 {
|
|
31
|
+
name: string;
|
|
32
|
+
type: 'person' | 'project' | 'tool' | 'company' | 'concept' | 'place';
|
|
33
|
+
role?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The encrypted-blob payload for protobuf v4. Written as UTF-8 JSON inside
|
|
37
|
+
* the XChaCha20-Poly1305 envelope. Matches `MemoryClaimV1` in the Rust core.
|
|
38
|
+
*/
|
|
39
|
+
export interface MemoryClaimV1 {
|
|
40
|
+
id: string;
|
|
41
|
+
text: string;
|
|
42
|
+
type: MemoryTypeV1;
|
|
43
|
+
source: MemorySource;
|
|
44
|
+
created_at: string;
|
|
45
|
+
schema_version: '1.0';
|
|
46
|
+
scope?: MemoryScope;
|
|
47
|
+
volatility?: MemoryVolatility;
|
|
48
|
+
entities?: MemoryEntityV1[];
|
|
49
|
+
reasoning?: string;
|
|
50
|
+
expires_at?: string;
|
|
51
|
+
importance?: number;
|
|
52
|
+
confidence?: number;
|
|
53
|
+
superseded_by?: string;
|
|
54
|
+
}
|
|
55
|
+
/** v1 inner-blob schema version — must match the Rust core constant. */
|
|
56
|
+
export declare const MEMORY_CLAIM_V1_SCHEMA_VERSION: "1.0";
|
|
57
|
+
/** Outer protobuf wrapper version that signals "inner blob is v1 JSON". */
|
|
58
|
+
export declare const PROTOBUF_WRAPPER_VERSION_V1: 4;
|
|
59
|
+
export declare function isValidMemoryTypeV1(value: unknown): value is MemoryTypeV1;
|
|
60
|
+
export declare function isValidMemorySource(value: unknown): value is MemorySource;
|
|
61
|
+
export declare function isValidMemoryScope(value: unknown): value is MemoryScope;
|
|
62
|
+
export declare function isValidMemoryVolatility(value: unknown): value is MemoryVolatility;
|
|
63
|
+
/**
|
|
64
|
+
* Map a legacy v0 type (8-type taxonomy) to its v1 replacement. Reference
|
|
65
|
+
* table from `docs/specs/totalreclaw/memory-taxonomy-v1.md` §migration-from-v0.
|
|
66
|
+
*
|
|
67
|
+
* Callers should inspect the source fact and populate `reasoning` separately
|
|
68
|
+
* when they see a legacy `decision` type (v1 merges decision → claim with the
|
|
69
|
+
* rationale captured in the `reasoning` field).
|
|
70
|
+
*/
|
|
71
|
+
export declare const LEGACY_TYPE_TO_V1: Record<string, MemoryTypeV1>;
|
|
72
|
+
/**
|
|
73
|
+
* Map a v1 type back to its legacy short-form category key used in v0 blobs
|
|
74
|
+
* (`{c: "pref"}` etc). The ZeroClaw + plugin read paths still emit these
|
|
75
|
+
* short keys for back-compat; we expose the same mapping so MCP reports
|
|
76
|
+
* uniform category strings in recall output regardless of blob version.
|
|
77
|
+
*/
|
|
78
|
+
export declare const V1_TYPE_TO_SHORT_CATEGORY: Record<MemoryTypeV1, string>;
|
|
79
|
+
//# sourceMappingURL=v1-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v1-types.d.ts","sourceRoot":"","sources":["../src/v1-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,0DAA0D;AAC1D,eAAO,MAAM,qBAAqB,mFAOxB,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE,sEAAsE;AACtE,eAAO,MAAM,oBAAoB,wEAMvB,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,iGAStB,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/D,qFAAqF;AACrF,eAAO,MAAM,yBAAyB,+CAAgD,CAAC;AAEvF,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1E,0CAA0C;AAC1C,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IACtE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;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