openclaw-engram 2.0.6 → 2.0.11
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/client.d.ts +45 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +72 -0
- package/dist/client.js.map +1 -1
- package/dist/hooks/before-tool-call.d.ts +21 -0
- package/dist/hooks/before-tool-call.d.ts.map +1 -0
- package/dist/hooks/before-tool-call.js +72 -0
- package/dist/hooks/before-tool-call.js.map +1 -0
- package/dist/hooks/session-end.d.ts +4 -3
- package/dist/hooks/session-end.d.ts.map +1 -1
- package/dist/hooks/session-end.js +64 -22
- package/dist/hooks/session-end.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -1
- package/dist/tools/engram-decisions.d.ts.map +1 -1
- package/dist/tools/engram-decisions.js +12 -17
- package/dist/tools/engram-decisions.js.map +1 -1
- package/dist/tools/engram-find-by-file.d.ts +11 -0
- package/dist/tools/engram-find-by-file.d.ts.map +1 -0
- package/dist/tools/engram-find-by-file.js +57 -0
- package/dist/tools/engram-find-by-file.js.map +1 -0
- package/dist/tools/engram-outcome.d.ts +11 -0
- package/dist/tools/engram-outcome.d.ts.map +1 -0
- package/dist/tools/engram-outcome.js +50 -0
- package/dist/tools/engram-outcome.js.map +1 -0
- package/dist/tools/engram-presets.d.ts +12 -0
- package/dist/tools/engram-presets.d.ts.map +1 -0
- package/dist/tools/engram-presets.js +66 -0
- package/dist/tools/engram-presets.js.map +1 -0
- package/dist/tools/engram-rate.d.ts +11 -0
- package/dist/tools/engram-rate.d.ts.map +1 -0
- package/dist/tools/engram-rate.js +42 -0
- package/dist/tools/engram-rate.js.map +1 -0
- package/dist/tools/engram-suppress.d.ts +11 -0
- package/dist/tools/engram-suppress.d.ts.map +1 -0
- package/dist/tools/engram-suppress.js +39 -0
- package/dist/tools/engram-suppress.js.map +1 -0
- package/dist/tools/engram-timeline.d.ts +11 -0
- package/dist/tools/engram-timeline.d.ts.map +1 -0
- package/dist/tools/engram-timeline.js +66 -0
- package/dist/tools/engram-timeline.js.map +1 -0
- package/dist/tools/engram-vault.d.ts +12 -0
- package/dist/tools/engram-vault.d.ts.map +1 -0
- package/dist/tools/engram-vault.js +80 -0
- package/dist/tools/engram-vault.js.map +1 -0
- package/dist/tools/memory-forget.d.ts +3 -2
- package/dist/tools/memory-forget.d.ts.map +1 -1
- package/dist/tools/memory-forget.js +27 -11
- package/dist/tools/memory-forget.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* engram_find_by_file — find observations related to a specific file.
|
|
3
|
+
*
|
|
4
|
+
* WHEN TO USE: BEFORE modifying any file. Returns what engram knows about it —
|
|
5
|
+
* past bugs, decisions, patterns, and important context that should inform your changes.
|
|
6
|
+
*/
|
|
7
|
+
import type { EngramRestClient } from '../client.js';
|
|
8
|
+
import type { PluginConfig } from '../config.js';
|
|
9
|
+
import type { AnyAgentTool, OpenClawPluginToolContext } from '../types/openclaw.js';
|
|
10
|
+
export declare function createEngramFindByFileTool(ctx: OpenClawPluginToolContext, client: EngramRestClient, config: PluginConfig): AnyAgentTool;
|
|
11
|
+
//# sourceMappingURL=engram-find-by-file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engram-find-by-file.d.ts","sourceRoot":"","sources":["../../src/tools/engram-find-by-file.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAe,MAAM,cAAc,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD,OAAO,KAAK,EAAE,YAAY,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAYpF,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,yBAAyB,EAC9B,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,YAAY,GACnB,YAAY,CAmCd"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* engram_find_by_file — find observations related to a specific file.
|
|
4
|
+
*
|
|
5
|
+
* WHEN TO USE: BEFORE modifying any file. Returns what engram knows about it —
|
|
6
|
+
* past bugs, decisions, patterns, and important context that should inform your changes.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.createEngramFindByFileTool = createEngramFindByFileTool;
|
|
10
|
+
const zod_1 = require("zod");
|
|
11
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
12
|
+
const identity_js_1 = require("../identity.js");
|
|
13
|
+
const FindByFileParamsSchema = zod_1.z.object({
|
|
14
|
+
file: zod_1.z.string().min(1),
|
|
15
|
+
limit: zod_1.z.number().int().min(1).max(20).optional().default(5),
|
|
16
|
+
});
|
|
17
|
+
const findByFileParameters = typebox_1.Type.Object({
|
|
18
|
+
file: typebox_1.Type.String({ description: 'File path to look up (absolute or relative)' }),
|
|
19
|
+
limit: typebox_1.Type.Optional(typebox_1.Type.Number({ description: 'Max observations to return (default: 5)' })),
|
|
20
|
+
});
|
|
21
|
+
function createEngramFindByFileTool(ctx, client, config) {
|
|
22
|
+
return {
|
|
23
|
+
name: 'engram_find_by_file',
|
|
24
|
+
description: 'Find observations related to a specific file. ' +
|
|
25
|
+
'Call BEFORE modifying any file to check what engram knows about it — ' +
|
|
26
|
+
'past bugs, decisions, patterns, and context that should inform your changes.',
|
|
27
|
+
parameters: findByFileParameters,
|
|
28
|
+
async execute(_toolCallId, params) {
|
|
29
|
+
const parsed = FindByFileParamsSchema.safeParse(params);
|
|
30
|
+
if (!parsed.success) {
|
|
31
|
+
return `Invalid parameters: ${parsed.error.message}`;
|
|
32
|
+
}
|
|
33
|
+
if (!client.isAvailable()) {
|
|
34
|
+
return 'engram is currently unreachable — file context unavailable';
|
|
35
|
+
}
|
|
36
|
+
const identity = (0, identity_js_1.resolveIdentity)(ctx.agentId ?? '', ctx.workspaceDir);
|
|
37
|
+
const project = config.project ?? identity.projectId;
|
|
38
|
+
const observations = await client.getFileContext(parsed.data.file, project, parsed.data.limit);
|
|
39
|
+
if (observations.length === 0) {
|
|
40
|
+
return `No observations found for file: ${parsed.data.file}`;
|
|
41
|
+
}
|
|
42
|
+
return formatFileContext(parsed.data.file, observations);
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function formatFileContext(file, observations) {
|
|
47
|
+
let out = `# Known Context for ${file}\n\n`;
|
|
48
|
+
observations.forEach((obs, i) => {
|
|
49
|
+
const typeLabel = (obs.type ?? 'observation').toUpperCase();
|
|
50
|
+
out += `## ${i + 1}. [${typeLabel}] ${obs.title ?? 'Untitled'}\n`;
|
|
51
|
+
if (obs.narrative)
|
|
52
|
+
out += `${obs.narrative}\n`;
|
|
53
|
+
out += '\n';
|
|
54
|
+
});
|
|
55
|
+
return out.trimEnd();
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=engram-find-by-file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engram-find-by-file.js","sourceRoot":"","sources":["../../src/tools/engram-find-by-file.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAmBH,gEAuCC;AAxDD,6BAAwB;AACxB,+CAAyC;AAGzC,gDAAiD;AAGjD,MAAM,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IACtC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;CAC7D,CAAC,CAAC;AAEH,MAAM,oBAAoB,GAAG,cAAI,CAAC,MAAM,CAAC;IACvC,IAAI,EAAE,c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E,YAAY,CAAC,CAAC;QAC3D,CAAC;KACF,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB,CAAC,IAAY,EAAE,YAA2B;IAClE,IAAI,GAAG,GAAG,uBAAuB,IAAI,MAAM,CAAC;IAC5C,YAAY,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE;QAC9B,MAAM,SAAS,GAAG,CAAC,GAAG,CAAC,IAAI,IAAI,aAAa,CAAC,CAAC,WAAW,EAAE,CAAC;QAC5D,GAAG,IAAI,MAAM,CAAC,GAAG,CAAC,MAAM,SAAS,KAAK,GAAG,CAAC,KAAK,IAAI,UAAU,IAAI,CAAC;QAClE,IAAI,GAAG,CAAC,SAAS;YAAE,GAAG,IAAI,GAAG,GAAG,CAAC,SAAS,IAAI,CAAC;QAC/C,GAAG,IAAI,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;IACH,OAAO,GAAG,CAAC,OAAO,EAAE,CAAC;AACvB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* engram_outcome — record session outcome for closed-loop learning.
|
|
3
|
+
*
|
|
4
|
+
* WHEN TO USE: At the end of a session or task. Records whether the goal was achieved,
|
|
5
|
+
* enabling engram to learn which observations lead to successful outcomes.
|
|
6
|
+
*/
|
|
7
|
+
import type { EngramRestClient } from '../client.js';
|
|
8
|
+
import type { PluginConfig } from '../config.js';
|
|
9
|
+
import type { AnyAgentTool, OpenClawPluginToolContext } from '../types/openclaw.js';
|
|
10
|
+
export declare function createEngramOutcomeTool(ctx: OpenClawPluginToolContext, client: EngramRestClient, config: PluginConfig): AnyAgentTool;
|
|
11
|
+
//# sourceMappingURL=engram-outcome.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engram-outcome.d.ts","sourceRoot":"","sources":["../../src/tools/engram-outcome.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAepF,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,yBAAyB,EAC9B,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,YAAY,GACnB,YAAY,CAoCd"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* engram_outcome — record session outcome for closed-loop learning.
|
|
4
|
+
*
|
|
5
|
+
* WHEN TO USE: At the end of a session or task. Records whether the goal was achieved,
|
|
6
|
+
* enabling engram to learn which observations lead to successful outcomes.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.createEngramOutcomeTool = createEngramOutcomeTool;
|
|
10
|
+
const zod_1 = require("zod");
|
|
11
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
12
|
+
const OutcomeParamsSchema = zod_1.z.object({
|
|
13
|
+
outcome: zod_1.z.enum(['success', 'partial', 'failure', 'abandoned']),
|
|
14
|
+
reason: zod_1.z.string().optional(),
|
|
15
|
+
});
|
|
16
|
+
const outcomeParameters = typebox_1.Type.Object({
|
|
17
|
+
outcome: typebox_1.Type.String({
|
|
18
|
+
description: 'Session outcome: success, partial, failure, or abandoned',
|
|
19
|
+
enum: ['success', 'partial', 'failure', 'abandoned'],
|
|
20
|
+
}),
|
|
21
|
+
reason: typebox_1.Type.Optional(typebox_1.Type.String({ description: 'Brief explanation of the outcome' })),
|
|
22
|
+
});
|
|
23
|
+
function createEngramOutcomeTool(ctx, client, config) {
|
|
24
|
+
return {
|
|
25
|
+
name: 'engram_outcome',
|
|
26
|
+
description: 'Record the outcome of the current session (success/partial/failure/abandoned). ' +
|
|
27
|
+
'Call at the END of a task or session. Enables closed-loop learning — engram uses outcomes ' +
|
|
28
|
+
'to learn which observations lead to better results.',
|
|
29
|
+
parameters: outcomeParameters,
|
|
30
|
+
async execute(_toolCallId, params) {
|
|
31
|
+
const parsed = OutcomeParamsSchema.safeParse(params);
|
|
32
|
+
if (!parsed.success) {
|
|
33
|
+
return `Invalid parameters: ${parsed.error.message}`;
|
|
34
|
+
}
|
|
35
|
+
if (!client.isAvailable()) {
|
|
36
|
+
return 'engram is currently unreachable — outcome recording unavailable';
|
|
37
|
+
}
|
|
38
|
+
// Server endpoint accepts Claude session ID string directly
|
|
39
|
+
const claudeSessionId = ctx.sessionId ?? ctx.sessionKey ?? '';
|
|
40
|
+
if (!claudeSessionId) {
|
|
41
|
+
return 'Cannot record outcome — no session ID available';
|
|
42
|
+
}
|
|
43
|
+
const success = await client.setSessionOutcome(claudeSessionId, parsed.data.outcome, parsed.data.reason);
|
|
44
|
+
return success
|
|
45
|
+
? `Session outcome recorded: ${parsed.data.outcome}${parsed.data.reason ? ` (${parsed.data.reason})` : ''}`
|
|
46
|
+
: 'Failed to record session outcome';
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=engram-outcome.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engram-outcome.js","sourceRoot":"","sources":["../../src/tools/engram-outcome.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAqBH,0DAwCC;AA3DD,6BAAwB;AACxB,+CAAyC;AAKzC,MAAM,mBAAmB,GAAG,OAAC,CAAC,MAAM,CAAC;IACnC,OAAO,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;IAC/D,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC;AAEH,MAAM,iBAAiB,GAAG,cAAI,CAAC,MAAM,CAAC;IACpC,OAAO,EAAE,cAAI,CAAC,MAAM,CAAC;QACnB,WAAW,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MAAM,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;gBAC3G,CAAC,CAAC,kCAAkC,CAAC;QACzC,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* engram_changes and engram_how_it_works — search preset wrappers.
|
|
3
|
+
*
|
|
4
|
+
* These are thin wrappers around searchContext with preset parameters,
|
|
5
|
+
* providing shortcut access to common query patterns.
|
|
6
|
+
*/
|
|
7
|
+
import type { EngramRestClient } from '../client.js';
|
|
8
|
+
import type { PluginConfig } from '../config.js';
|
|
9
|
+
import type { AnyAgentTool, OpenClawPluginToolContext } from '../types/openclaw.js';
|
|
10
|
+
export declare function createEngramChangesTool(ctx: OpenClawPluginToolContext, client: EngramRestClient, config: PluginConfig): AnyAgentTool;
|
|
11
|
+
export declare function createEngramHowItWorksTool(ctx: OpenClawPluginToolContext, client: EngramRestClient, config: PluginConfig): AnyAgentTool;
|
|
12
|
+
//# sourceMappingURL=engram-presets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engram-presets.d.ts","sourceRoot":"","sources":["../../src/tools/engram-presets.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAe,MAAM,cAAc,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD,OAAO,KAAK,EAAE,YAAY,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AA6DpF,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,yBAAyB,EAC9B,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,YAAY,GACnB,YAAY,CAUd;AAED,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,yBAAyB,EAC9B,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,YAAY,GACnB,YAAY,CAUd"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* engram_changes and engram_how_it_works — search preset wrappers.
|
|
4
|
+
*
|
|
5
|
+
* These are thin wrappers around searchContext with preset parameters,
|
|
6
|
+
* providing shortcut access to common query patterns.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.createEngramChangesTool = createEngramChangesTool;
|
|
10
|
+
exports.createEngramHowItWorksTool = createEngramHowItWorksTool;
|
|
11
|
+
const zod_1 = require("zod");
|
|
12
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
13
|
+
const identity_js_1 = require("../identity.js");
|
|
14
|
+
const PresetParamsSchema = zod_1.z.object({
|
|
15
|
+
query: zod_1.z.string().min(1),
|
|
16
|
+
});
|
|
17
|
+
const presetParameters = typebox_1.Type.Object({
|
|
18
|
+
query: typebox_1.Type.String({ description: 'Search query' }),
|
|
19
|
+
});
|
|
20
|
+
function createPresetTool(name, description, preset, ctx, client, config) {
|
|
21
|
+
return {
|
|
22
|
+
name,
|
|
23
|
+
description,
|
|
24
|
+
parameters: presetParameters,
|
|
25
|
+
async execute(_toolCallId, params) {
|
|
26
|
+
const parsed = PresetParamsSchema.safeParse(params);
|
|
27
|
+
if (!parsed.success) {
|
|
28
|
+
return `Invalid parameters: ${parsed.error.message}`;
|
|
29
|
+
}
|
|
30
|
+
if (!client.isAvailable()) {
|
|
31
|
+
return `engram is currently unreachable — ${name} unavailable`;
|
|
32
|
+
}
|
|
33
|
+
const identity = (0, identity_js_1.resolveIdentity)(ctx.agentId ?? '', ctx.workspaceDir);
|
|
34
|
+
const project = config.project ?? identity.projectId;
|
|
35
|
+
const response = await client.searchContext({
|
|
36
|
+
project,
|
|
37
|
+
query: parsed.data.query,
|
|
38
|
+
cwd: ctx.workspaceDir,
|
|
39
|
+
agent_id: ctx.agentId,
|
|
40
|
+
preset,
|
|
41
|
+
});
|
|
42
|
+
const observations = response?.observations ?? [];
|
|
43
|
+
if (observations.length === 0) {
|
|
44
|
+
return `No results found for: ${parsed.data.query}`;
|
|
45
|
+
}
|
|
46
|
+
let out = `# ${preset === 'changes' ? 'Recent Changes' : 'How It Works'}\n\n`;
|
|
47
|
+
observations.forEach((obs, i) => {
|
|
48
|
+
const typeLabel = (obs.type ?? 'observation').toUpperCase();
|
|
49
|
+
out += `## ${i + 1}. [${typeLabel}] ${obs.title ?? 'Untitled'}\n`;
|
|
50
|
+
if (obs.narrative)
|
|
51
|
+
out += `${obs.narrative}\n`;
|
|
52
|
+
out += '\n';
|
|
53
|
+
});
|
|
54
|
+
return out.trimEnd();
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function createEngramChangesTool(ctx, client, config) {
|
|
59
|
+
return createPresetTool('engram_changes', 'Find recent code changes, refactorings, and modifications. ' +
|
|
60
|
+
'Use when you need to understand what changed recently in the codebase.', 'changes', ctx, client, config);
|
|
61
|
+
}
|
|
62
|
+
function createEngramHowItWorksTool(ctx, client, config) {
|
|
63
|
+
return createPresetTool('engram_how_it_works', 'Understand system architecture, design patterns, and implementation details. ' +
|
|
64
|
+
'Use when exploring unfamiliar code to get a high-level understanding.', 'how_it_works', ctx, client, config);
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=engram-presets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engram-presets.js","sourceRoot":"","sources":["../../src/tools/engram-presets.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAoEH,0DAcC;AAED,gEAcC;AAhGD,6BAAwB;AACxB,+CAAyC;AAGzC,gDAAiD;AAGjD,MAAM,kBAAkB,GAAG,OAAC,CAAC,MAAM,CAAC;IAClC,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACzB,CAAC,CAAC;AAEH,MAAM,gBAAgB,GAAG,cAAI,CAAC,MAAM,CAAC;IACnC,KAAK,EAAE,cAAI,CAAC,MAAM,CAAC,EAAE,WAAW,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AAC,CAAC,cAAc,MAAM,CAAC;YAC9E,YAAY,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE;gBAC9B,MAAM,SAAS,GAAG,CAAC,GAAG,CAAC,IAAI,IAAI,aAAa,CAAC,CAAC,WAAW,EAAE,CAAC;gBAC5D,GAAG,IAAI,MAAM,CAAC,GAAG,CAAC,MAAM,SAAS,KAAK,GAAG,CAAC,KAAK,IAAI,UAAU,IAAI,CAAC;gBAClE,IAAI,GAAG,CAAC,SAAS;oBAAE,GAAG,IAAI,GAAG,GAAG,CAAC,SAAS,IAAI,CAAC;gBAC/C,GAAG,IAAI,IAAI,CAAC;YACd,CAAC,CAAC,CAAC;YACH,OAAO,GAAG,CAAC,OAAO,EAAE,CAAC;QACvB,CAAC;KACF,CAAC;AACJ,CAAC;AAED,SAAgB,uBAAuB,CACrC,GAA8B,EAC9B,MAAwB,EACxB,MAAoB;IAEpB,OAAO,gBAAgB,CACrB,gBAAgB,EAChB,6DAA6D;QAC7D,wEAAwE,EACxE,SAAS,EACT,GAAG,EACH,MAAM,EACN,MAAM,CACP,CAAC;AACJ,CAAC;AAED,SAAgB,0BAA0B,CACxC,GAA8B,EAC9B,MAAwB,EACxB,MAAoB;IAEpB,OAAO,gBAAgB,CACrB,qBAAqB,EACrB,+EAA+E;QAC/E,uEAAuE,EACvE,cAAc,EACd,GAAG,EACH,MAAM,EACN,MAAM,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* engram_rate — rate an observation as useful or not useful.
|
|
3
|
+
*
|
|
4
|
+
* WHEN TO USE: After recalling a memory that influenced your work.
|
|
5
|
+
* Rate it so engram learns what to prioritize in future sessions.
|
|
6
|
+
*/
|
|
7
|
+
import type { EngramRestClient } from '../client.js';
|
|
8
|
+
import type { PluginConfig } from '../config.js';
|
|
9
|
+
import type { AnyAgentTool, OpenClawPluginToolContext } from '../types/openclaw.js';
|
|
10
|
+
export declare function createEngramRateTool(_ctx: OpenClawPluginToolContext, client: EngramRestClient, _config: PluginConfig): AnyAgentTool;
|
|
11
|
+
//# sourceMappingURL=engram-rate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engram-rate.d.ts","sourceRoot":"","sources":["../../src/tools/engram-rate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAYpF,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,yBAAyB,EAC/B,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,YAAY,GACpB,YAAY,CAyBd"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* engram_rate — rate an observation as useful or not useful.
|
|
4
|
+
*
|
|
5
|
+
* WHEN TO USE: After recalling a memory that influenced your work.
|
|
6
|
+
* Rate it so engram learns what to prioritize in future sessions.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.createEngramRateTool = createEngramRateTool;
|
|
10
|
+
const zod_1 = require("zod");
|
|
11
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
12
|
+
const RateParamsSchema = zod_1.z.object({
|
|
13
|
+
id: zod_1.z.number().int().positive(),
|
|
14
|
+
useful: zod_1.z.boolean(),
|
|
15
|
+
});
|
|
16
|
+
const rateParameters = typebox_1.Type.Object({
|
|
17
|
+
id: typebox_1.Type.Number({ description: 'Observation ID to rate' }),
|
|
18
|
+
useful: typebox_1.Type.Boolean({ description: 'true if the observation was helpful, false if not' }),
|
|
19
|
+
});
|
|
20
|
+
function createEngramRateTool(_ctx, client, _config) {
|
|
21
|
+
return {
|
|
22
|
+
name: 'engram_rate',
|
|
23
|
+
description: 'Rate a recalled observation as useful or not useful. ' +
|
|
24
|
+
'Call this AFTER using a memory that influenced your response — helps engram learn what to prioritize.',
|
|
25
|
+
parameters: rateParameters,
|
|
26
|
+
async execute(_toolCallId, params) {
|
|
27
|
+
const parsed = RateParamsSchema.safeParse(params);
|
|
28
|
+
if (!parsed.success) {
|
|
29
|
+
return `Invalid parameters: ${parsed.error.message}`;
|
|
30
|
+
}
|
|
31
|
+
if (!client.isAvailable()) {
|
|
32
|
+
return 'engram is currently unreachable — rating unavailable';
|
|
33
|
+
}
|
|
34
|
+
const success = await client.rateObservation(parsed.data.id, parsed.data.useful);
|
|
35
|
+
const label = parsed.data.useful ? 'useful' : 'not useful';
|
|
36
|
+
return success
|
|
37
|
+
? `Rated observation ${parsed.data.id} as ${label}`
|
|
38
|
+
: `Failed to rate observation ${parsed.data.id}`;
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=engram-rate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engram-rate.js","sourceRoot":"","sources":["../../src/tools/engram-rate.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAkBH,oDA6BC;AA7CD,6BAAwB;AACxB,+CAAyC;AAKzC,MAAM,gBAAgB,GAAG,OAAC,CAAC,MAAM,CAAC;IAChC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IAC/B,MAAM,EAAE,OAAC,CAAC,OAAO,EAAE;CACpB,CAAC,CAAC;AAEH,MAAM,cAAc,GAAG,cAAI,CAAC,MAAM,CAAC;IACjC,EAAE,EAAE,cAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,wBAAwB,EAAE,CAAC;IAC1D,MAAM,EAAE,cAAI,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,mDAAmD,EAAE,CAAC;CAC3F,CAAC,CAAC;AAEH,SAAgB,oBAAoB,CAClC,IAA+B,EAC/B,MAAwB,EACxB,OAAqB;IAErB,OAAO;QACL,IAAI,EAAE,aAAa;QACnB,WAAW,EACT,uDAAuD;YACvD,uGAAuG;QACzG,UAAU,EAAE,cAAc;QAE1B,KAAK,CAAC,OAAO,CAAC,WAAmB,EAAE,MAA+B;YAChE,MAAM,MAAM,GAAG,gBAAgB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YAClD,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;gBACpB,OAAO,uBAAuB,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;YACvD,CAAC;YAED,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,CAAC;gBAC1B,OAAO,sDAAsD,CAAC;YAChE,CAAC;YAED,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACjF,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC;YAC3D,OAAO,OAAO;gBACZ,CAAC,CAAC,qBAAqB,MAAM,CAAC,IAAI,CAAC,EAAE,OAAO,KAAK,EAAE;gBACnD,CAAC,CAAC,8BAA8B,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;QACrD,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* engram_suppress — suppress an observation from future search results.
|
|
3
|
+
*
|
|
4
|
+
* WHEN TO USE: When an observation is outdated, wrong, or no longer relevant.
|
|
5
|
+
* Suppression is reversible — the observation stays in the database but is hidden from search.
|
|
6
|
+
*/
|
|
7
|
+
import type { EngramRestClient } from '../client.js';
|
|
8
|
+
import type { PluginConfig } from '../config.js';
|
|
9
|
+
import type { AnyAgentTool, OpenClawPluginToolContext } from '../types/openclaw.js';
|
|
10
|
+
export declare function createEngramSuppressTool(_ctx: OpenClawPluginToolContext, client: EngramRestClient, _config: PluginConfig): AnyAgentTool;
|
|
11
|
+
//# sourceMappingURL=engram-suppress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engram-suppress.d.ts","sourceRoot":"","sources":["../../src/tools/engram-suppress.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAUpF,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,yBAAyB,EAC/B,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,YAAY,GACpB,YAAY,CAwBd"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* engram_suppress — suppress an observation from future search results.
|
|
4
|
+
*
|
|
5
|
+
* WHEN TO USE: When an observation is outdated, wrong, or no longer relevant.
|
|
6
|
+
* Suppression is reversible — the observation stays in the database but is hidden from search.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.createEngramSuppressTool = createEngramSuppressTool;
|
|
10
|
+
const zod_1 = require("zod");
|
|
11
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
12
|
+
const SuppressParamsSchema = zod_1.z.object({
|
|
13
|
+
id: zod_1.z.number().int().positive(),
|
|
14
|
+
});
|
|
15
|
+
const suppressParameters = typebox_1.Type.Object({
|
|
16
|
+
id: typebox_1.Type.Number({ description: 'Observation ID to suppress' }),
|
|
17
|
+
});
|
|
18
|
+
function createEngramSuppressTool(_ctx, client, _config) {
|
|
19
|
+
return {
|
|
20
|
+
name: 'engram_suppress',
|
|
21
|
+
description: 'Suppress an observation from future search results (reversible). ' +
|
|
22
|
+
'Use when an observation is outdated, wrong, or no longer relevant.',
|
|
23
|
+
parameters: suppressParameters,
|
|
24
|
+
async execute(_toolCallId, params) {
|
|
25
|
+
const parsed = SuppressParamsSchema.safeParse(params);
|
|
26
|
+
if (!parsed.success) {
|
|
27
|
+
return `Invalid parameters: ${parsed.error.message}`;
|
|
28
|
+
}
|
|
29
|
+
if (!client.isAvailable()) {
|
|
30
|
+
return 'engram is currently unreachable — suppress unavailable';
|
|
31
|
+
}
|
|
32
|
+
const success = await client.suppressObservation(parsed.data.id);
|
|
33
|
+
return success
|
|
34
|
+
? `Suppressed observation ${parsed.data.id} — it will no longer appear in search results`
|
|
35
|
+
: `Failed to suppress observation ${parsed.data.id}`;
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=engram-suppress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engram-suppress.js","sourceRoot":"","sources":["../../src/tools/engram-suppress.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAgBH,4DA4BC;AA1CD,6BAAwB;AACxB,+CAAyC;AAKzC,MAAM,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IACpC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;CAChC,CAAC,CAAC;AAEH,MAAM,kBAAkB,GAAG,cAAI,CAAC,MAAM,CAAC;IACrC,EAAE,EAAE,cAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,4BAA4B,EAAE,CAAC;CAC/D,CAAC,CAAC;AAEH,SAAgB,wBAAwB,CACtC,IAA+B,EAC/B,MAAwB,EACxB,OAAqB;IAErB,OAAO;QACL,IAAI,EAAE,iBAAiB;QACvB,WAAW,EACT,mEAAmE;YACnE,oEAAoE;QACtE,UAAU,EAAE,kBAAkB;QAE9B,KAAK,CAAC,OAAO,CAAC,WAAmB,EAAE,MAA+B;YAChE,MAAM,MAAM,GAAG,oBAAoB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YACtD,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;gBACpB,OAAO,uBAAuB,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;YACvD,CAAC;YAED,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,CAAC;gBAC1B,OAAO,wDAAwD,CAAC;YAClE,CAAC;YAED,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,mBAAmB,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACjE,OAAO,OAAO;gBACZ,CAAC,CAAC,0BAA0B,MAAM,CAAC,IAAI,CAAC,EAAE,+CAA+C;gBACzF,CAAC,CAAC,kCAAkC,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;QACzD,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* engram_timeline — fetch timeline of observations.
|
|
3
|
+
*
|
|
4
|
+
* WHEN TO USE: When exploring what happened recently in a project,
|
|
5
|
+
* or when you need temporal context around a specific event.
|
|
6
|
+
*/
|
|
7
|
+
import type { EngramRestClient } from '../client.js';
|
|
8
|
+
import type { PluginConfig } from '../config.js';
|
|
9
|
+
import type { AnyAgentTool, OpenClawPluginToolContext } from '../types/openclaw.js';
|
|
10
|
+
export declare function createEngramTimelineTool(ctx: OpenClawPluginToolContext, client: EngramRestClient, config: PluginConfig): AnyAgentTool;
|
|
11
|
+
//# sourceMappingURL=engram-timeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engram-timeline.d.ts","sourceRoot":"","sources":["../../src/tools/engram-timeline.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAe,MAAM,cAAc,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD,OAAO,KAAK,EAAE,YAAY,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAmBpF,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,yBAAyB,EAC9B,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,YAAY,GACnB,YAAY,CAkCd"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* engram_timeline — fetch timeline of observations.
|
|
4
|
+
*
|
|
5
|
+
* WHEN TO USE: When exploring what happened recently in a project,
|
|
6
|
+
* or when you need temporal context around a specific event.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.createEngramTimelineTool = createEngramTimelineTool;
|
|
10
|
+
const zod_1 = require("zod");
|
|
11
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
12
|
+
const identity_js_1 = require("../identity.js");
|
|
13
|
+
const TimelineParamsSchema = zod_1.z.object({
|
|
14
|
+
mode: zod_1.z.enum(['recent', 'anchor', 'query']).optional().default('recent'),
|
|
15
|
+
query: zod_1.z.string().optional(),
|
|
16
|
+
anchor_id: zod_1.z.number().int().positive().optional(),
|
|
17
|
+
limit: zod_1.z.number().int().min(1).max(50).optional().default(20),
|
|
18
|
+
});
|
|
19
|
+
const timelineParameters = typebox_1.Type.Object({
|
|
20
|
+
mode: typebox_1.Type.Optional(typebox_1.Type.String({
|
|
21
|
+
description: 'Timeline mode: recent (default), anchor (around specific ID), query (search + timeline)',
|
|
22
|
+
enum: ['recent', 'anchor', 'query'],
|
|
23
|
+
})),
|
|
24
|
+
query: typebox_1.Type.Optional(typebox_1.Type.String({ description: 'Search query (for query mode)' })),
|
|
25
|
+
anchor_id: typebox_1.Type.Optional(typebox_1.Type.Number({ description: 'Observation ID (for anchor mode)' })),
|
|
26
|
+
limit: typebox_1.Type.Optional(typebox_1.Type.Number({ description: 'Max observations to return (default: 20)' })),
|
|
27
|
+
});
|
|
28
|
+
function createEngramTimelineTool(ctx, client, config) {
|
|
29
|
+
return {
|
|
30
|
+
name: 'engram_timeline',
|
|
31
|
+
description: 'Fetch a timeline of observations. Modes: recent (what happened lately), ' +
|
|
32
|
+
'anchor (context around a specific observation), query (search + timeline).',
|
|
33
|
+
parameters: timelineParameters,
|
|
34
|
+
async execute(_toolCallId, params) {
|
|
35
|
+
const parsed = TimelineParamsSchema.safeParse(params);
|
|
36
|
+
if (!parsed.success) {
|
|
37
|
+
return `Invalid parameters: ${parsed.error.message}`;
|
|
38
|
+
}
|
|
39
|
+
if (!client.isAvailable()) {
|
|
40
|
+
return 'engram is currently unreachable — timeline unavailable';
|
|
41
|
+
}
|
|
42
|
+
const identity = (0, identity_js_1.resolveIdentity)(ctx.agentId ?? '', ctx.workspaceDir);
|
|
43
|
+
const project = config.project ?? identity.projectId;
|
|
44
|
+
const observations = await client.getTimeline(project, parsed.data.mode, {
|
|
45
|
+
query: parsed.data.query,
|
|
46
|
+
anchor_id: parsed.data.anchor_id,
|
|
47
|
+
limit: parsed.data.limit,
|
|
48
|
+
});
|
|
49
|
+
if (observations.length === 0) {
|
|
50
|
+
return 'No observations found in timeline.';
|
|
51
|
+
}
|
|
52
|
+
return formatTimeline(observations);
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function formatTimeline(observations) {
|
|
57
|
+
let out = '# Timeline\n\n';
|
|
58
|
+
observations.forEach((obs, i) => {
|
|
59
|
+
const typeLabel = (obs.type ?? 'observation').toUpperCase();
|
|
60
|
+
out += `${i + 1}. [${typeLabel}] ${obs.title ?? 'Untitled'}\n`;
|
|
61
|
+
if (obs.narrative)
|
|
62
|
+
out += ` ${obs.narrative.slice(0, 200)}\n`;
|
|
63
|
+
});
|
|
64
|
+
return out.trimEnd();
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=engram-timeline.js.map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CAAC,YAA2B;IACjD,IAAI,GAAG,GAAG,gBAAgB,CAAC;IAC3B,YAAY,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE;QAC9B,MAAM,SAAS,GAAG,CAAC,GAAG,CAAC,IAAI,IAAI,aAAa,CAAC,CAAC,WAAW,EAAE,CAAC;QAC5D,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,MAAM,SAAS,KAAK,GAAG,CAAC,KAAK,IAAI,UAAU,IAAI,CAAC;QAC/D,IAAI,GAAG,CAAC,SAAS;YAAE,GAAG,IAAI,MAAM,GAAG,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC;IAClE,CAAC,CAAC,CAAC;IACH,OAAO,GAAG,CAAC,OAAO,EAAE,CAAC;AACvB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* engram_vault_store and engram_vault_get — credential management.
|
|
3
|
+
*
|
|
4
|
+
* Securely store and retrieve encrypted credentials via engram's vault.
|
|
5
|
+
* Encryption happens server-side (AES-256-GCM). Credentials never leave the server unencrypted.
|
|
6
|
+
*/
|
|
7
|
+
import type { EngramRestClient } from '../client.js';
|
|
8
|
+
import type { PluginConfig } from '../config.js';
|
|
9
|
+
import type { AnyAgentTool, OpenClawPluginToolContext } from '../types/openclaw.js';
|
|
10
|
+
export declare function createEngramVaultStoreTool(ctx: OpenClawPluginToolContext, client: EngramRestClient, config: PluginConfig): AnyAgentTool;
|
|
11
|
+
export declare function createEngramVaultGetTool(_ctx: OpenClawPluginToolContext, client: EngramRestClient, _config: PluginConfig): AnyAgentTool;
|
|
12
|
+
//# sourceMappingURL=engram-vault.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engram-vault.d.ts","sourceRoot":"","sources":["../../src/tools/engram-vault.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD,OAAO,KAAK,EAAE,YAAY,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAyBpF,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,yBAAyB,EAC9B,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,YAAY,GACnB,YAAY,CAiCd;AAED,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,yBAAyB,EAC/B,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,YAAY,GACpB,YAAY,CA4Bd"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* engram_vault_store and engram_vault_get — credential management.
|
|
4
|
+
*
|
|
5
|
+
* Securely store and retrieve encrypted credentials via engram's vault.
|
|
6
|
+
* Encryption happens server-side (AES-256-GCM). Credentials never leave the server unencrypted.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.createEngramVaultStoreTool = createEngramVaultStoreTool;
|
|
10
|
+
exports.createEngramVaultGetTool = createEngramVaultGetTool;
|
|
11
|
+
const zod_1 = require("zod");
|
|
12
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
13
|
+
const identity_js_1 = require("../identity.js");
|
|
14
|
+
const StoreParamsSchema = zod_1.z.object({
|
|
15
|
+
name: zod_1.z.string().min(1),
|
|
16
|
+
value: zod_1.z.string().min(1),
|
|
17
|
+
scope: zod_1.z.enum(['project', 'global']).optional().default('project'),
|
|
18
|
+
});
|
|
19
|
+
const storeParameters = typebox_1.Type.Object({
|
|
20
|
+
name: typebox_1.Type.String({ description: 'Credential name (e.g., OPENAI_API_KEY)' }),
|
|
21
|
+
value: typebox_1.Type.String({ description: 'Credential value to encrypt and store' }),
|
|
22
|
+
scope: typebox_1.Type.Optional(typebox_1.Type.String({
|
|
23
|
+
description: 'Scope: project (default) or global',
|
|
24
|
+
enum: ['project', 'global'],
|
|
25
|
+
})),
|
|
26
|
+
});
|
|
27
|
+
const GetParamsSchema = zod_1.z.object({
|
|
28
|
+
name: zod_1.z.string().min(1),
|
|
29
|
+
});
|
|
30
|
+
const getParameters = typebox_1.Type.Object({
|
|
31
|
+
name: typebox_1.Type.String({ description: 'Credential name to retrieve' }),
|
|
32
|
+
});
|
|
33
|
+
function createEngramVaultStoreTool(ctx, client, config) {
|
|
34
|
+
return {
|
|
35
|
+
name: 'engram_vault_store',
|
|
36
|
+
description: 'Securely store an encrypted credential in engram vault. ' +
|
|
37
|
+
'Server-side AES-256-GCM encryption. Use for API keys, tokens, passwords.',
|
|
38
|
+
parameters: storeParameters,
|
|
39
|
+
async execute(_toolCallId, params) {
|
|
40
|
+
const parsed = StoreParamsSchema.safeParse(params);
|
|
41
|
+
if (!parsed.success) {
|
|
42
|
+
return `Invalid parameters: ${parsed.error.message}`;
|
|
43
|
+
}
|
|
44
|
+
if (!client.isAvailable()) {
|
|
45
|
+
return 'engram is currently unreachable — vault store unavailable';
|
|
46
|
+
}
|
|
47
|
+
const identity = (0, identity_js_1.resolveIdentity)(ctx.agentId ?? '', ctx.workspaceDir);
|
|
48
|
+
const project = config.project ?? identity.projectId;
|
|
49
|
+
const success = await client.storeCredential(parsed.data.name, parsed.data.value, parsed.data.scope, project);
|
|
50
|
+
return success
|
|
51
|
+
? `Credential "${parsed.data.name}" stored securely (scope: ${parsed.data.scope})`
|
|
52
|
+
: `Failed to store credential "${parsed.data.name}" — server may be unavailable or vault not configured`;
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function createEngramVaultGetTool(_ctx, client, _config) {
|
|
57
|
+
return {
|
|
58
|
+
name: 'engram_vault_get',
|
|
59
|
+
description: 'Retrieve and decrypt a credential from engram vault by name. ' +
|
|
60
|
+
'Returns the decrypted value. Use for accessing stored API keys and tokens.',
|
|
61
|
+
parameters: getParameters,
|
|
62
|
+
async execute(_toolCallId, params) {
|
|
63
|
+
const parsed = GetParamsSchema.safeParse(params);
|
|
64
|
+
if (!parsed.success) {
|
|
65
|
+
return `Invalid parameters: ${parsed.error.message}`;
|
|
66
|
+
}
|
|
67
|
+
if (!client.isAvailable()) {
|
|
68
|
+
return 'engram is currently unreachable — vault get unavailable';
|
|
69
|
+
}
|
|
70
|
+
const cred = await client.getCredential(parsed.data.name);
|
|
71
|
+
if (!cred) {
|
|
72
|
+
return `Credential "${parsed.data.name}" not found — check name and scope`;
|
|
73
|
+
}
|
|
74
|
+
// Note: credential value is in tool output (conversation history).
|
|
75
|
+
// Ensure session transcripts handle sensitive data appropriately.
|
|
76
|
+
return `${cred.name}: ${cred.value}`;
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=engram-vault.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engram-vault.js","sourceRoot":"","sources":["../../src/tools/engram-vault.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAgCH,gEAqCC;AAED,4DAgCC;AArGD,6BAAwB;AACxB,+CAAyC;AAGzC,gDAAiD;AAGjD,MAAM,iBAAiB,GAAG,OAAC,CAAC,MAAM,CAAC;IACjC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,KAAK,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC;CACnE,CAAC,CAAC;AAEH,MAAM,eAAe,GAAG,cAAI,CAAC,MAAM,CAAC;IAClC,IAAI,EAAE,cAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,wCAAwC,EAAE,CAAC;IAC5E,KAAK,EAAE,cAAI,CAA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|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* memory_forget — delete observations from engram by ID.
|
|
2
|
+
* memory_forget — suppress or permanently delete observations from engram by ID.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Default: suppress (reversible soft-hide from search results).
|
|
5
|
+
* With permanent=true: archive (permanent removal).
|
|
5
6
|
*/
|
|
6
7
|
import type { EngramRestClient } from '../client.js';
|
|
7
8
|
import type { PluginConfig } from '../config.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-forget.d.ts","sourceRoot":"","sources":["../../src/tools/memory-forget.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"memory-forget.d.ts","sourceRoot":"","sources":["../../src/tools/memory-forget.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAgBpF,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,yBAAyB,EAC/B,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,YAAY,GACpB,YAAY,CAwCd"}
|