@waynesutton/agent-memory 0.0.1-alpha.1
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/.claude/settings.json +9 -0
- package/.claude/settings.local.json +7 -0
- package/AGENTS.md +113 -0
- package/CLAUDE.md +79 -0
- package/README.md +1003 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +192 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/parsers/claude-code.d.ts +3 -0
- package/dist/cli/parsers/claude-code.d.ts.map +1 -0
- package/dist/cli/parsers/claude-code.js +75 -0
- package/dist/cli/parsers/claude-code.js.map +1 -0
- package/dist/cli/parsers/codex.d.ts +3 -0
- package/dist/cli/parsers/codex.d.ts.map +1 -0
- package/dist/cli/parsers/codex.js +42 -0
- package/dist/cli/parsers/codex.js.map +1 -0
- package/dist/cli/parsers/conductor.d.ts +3 -0
- package/dist/cli/parsers/conductor.d.ts.map +1 -0
- package/dist/cli/parsers/conductor.js +43 -0
- package/dist/cli/parsers/conductor.js.map +1 -0
- package/dist/cli/parsers/cursor.d.ts +3 -0
- package/dist/cli/parsers/cursor.d.ts.map +1 -0
- package/dist/cli/parsers/cursor.js +50 -0
- package/dist/cli/parsers/cursor.js.map +1 -0
- package/dist/cli/parsers/index.d.ts +12 -0
- package/dist/cli/parsers/index.d.ts.map +1 -0
- package/dist/cli/parsers/index.js +27 -0
- package/dist/cli/parsers/index.js.map +1 -0
- package/dist/cli/parsers/opencode.d.ts +3 -0
- package/dist/cli/parsers/opencode.d.ts.map +1 -0
- package/dist/cli/parsers/opencode.js +72 -0
- package/dist/cli/parsers/opencode.js.map +1 -0
- package/dist/cli/parsers/parsers.test.d.ts +2 -0
- package/dist/cli/parsers/parsers.test.d.ts.map +1 -0
- package/dist/cli/parsers/parsers.test.js +151 -0
- package/dist/cli/parsers/parsers.test.js.map +1 -0
- package/dist/cli/parsers/pi.d.ts +3 -0
- package/dist/cli/parsers/pi.d.ts.map +1 -0
- package/dist/cli/parsers/pi.js +43 -0
- package/dist/cli/parsers/pi.js.map +1 -0
- package/dist/cli/parsers/types.d.ts +25 -0
- package/dist/cli/parsers/types.d.ts.map +1 -0
- package/dist/cli/parsers/types.js +2 -0
- package/dist/cli/parsers/types.js.map +1 -0
- package/dist/cli/parsers/vscode-copilot.d.ts +3 -0
- package/dist/cli/parsers/vscode-copilot.d.ts.map +1 -0
- package/dist/cli/parsers/vscode-copilot.js +69 -0
- package/dist/cli/parsers/vscode-copilot.js.map +1 -0
- package/dist/cli/parsers/zed.d.ts +3 -0
- package/dist/cli/parsers/zed.d.ts.map +1 -0
- package/dist/cli/parsers/zed.js +43 -0
- package/dist/cli/parsers/zed.js.map +1 -0
- package/dist/cli/sync.d.ts +21 -0
- package/dist/cli/sync.d.ts.map +1 -0
- package/dist/cli/sync.js +78 -0
- package/dist/cli/sync.js.map +1 -0
- package/dist/cli/type-extractor.d.ts +25 -0
- package/dist/cli/type-extractor.d.ts.map +1 -0
- package/dist/cli/type-extractor.js +254 -0
- package/dist/cli/type-extractor.js.map +1 -0
- package/dist/cli/type-extractor.test.d.ts +2 -0
- package/dist/cli/type-extractor.test.d.ts.map +1 -0
- package/dist/cli/type-extractor.test.js +173 -0
- package/dist/cli/type-extractor.test.js.map +1 -0
- package/dist/client/http.d.ts +44 -0
- package/dist/client/http.d.ts.map +1 -0
- package/dist/client/http.js +311 -0
- package/dist/client/http.js.map +1 -0
- package/dist/client/index.d.ts +158 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +256 -0
- package/dist/client/index.js.map +1 -0
- package/dist/component/_generated/api.d.ts +12 -0
- package/dist/component/_generated/api.d.ts.map +1 -0
- package/dist/component/_generated/api.js +13 -0
- package/dist/component/_generated/api.js.map +1 -0
- package/dist/component/_generated/dataModel.d.ts +18 -0
- package/dist/component/_generated/dataModel.d.ts.map +1 -0
- package/dist/component/_generated/dataModel.js +11 -0
- package/dist/component/_generated/dataModel.js.map +1 -0
- package/dist/component/_generated/server.d.ts +42 -0
- package/dist/component/_generated/server.d.ts.map +1 -0
- package/dist/component/_generated/server.js +39 -0
- package/dist/component/_generated/server.js.map +1 -0
- package/dist/component/actions.d.ts +42 -0
- package/dist/component/actions.d.ts.map +1 -0
- package/dist/component/actions.js +405 -0
- package/dist/component/actions.js.map +1 -0
- package/dist/component/apiKeyMutations.d.ts +29 -0
- package/dist/component/apiKeyMutations.d.ts.map +1 -0
- package/dist/component/apiKeyMutations.js +149 -0
- package/dist/component/apiKeyMutations.js.map +1 -0
- package/dist/component/apiKeyQueries.d.ts +37 -0
- package/dist/component/apiKeyQueries.d.ts.map +1 -0
- package/dist/component/apiKeyQueries.js +127 -0
- package/dist/component/apiKeyQueries.js.map +1 -0
- package/dist/component/checksum.d.ts +6 -0
- package/dist/component/checksum.d.ts.map +1 -0
- package/dist/component/checksum.js +14 -0
- package/dist/component/checksum.js.map +1 -0
- package/dist/component/checksum.test.d.ts +2 -0
- package/dist/component/checksum.test.d.ts.map +1 -0
- package/dist/component/checksum.test.js +27 -0
- package/dist/component/checksum.test.js.map +1 -0
- package/dist/component/convex.config.d.ts +3 -0
- package/dist/component/convex.config.d.ts.map +1 -0
- package/dist/component/convex.config.js +4 -0
- package/dist/component/convex.config.js.map +1 -0
- package/dist/component/cronActions.d.ts +3 -0
- package/dist/component/cronActions.d.ts.map +1 -0
- package/dist/component/cronActions.js +38 -0
- package/dist/component/cronActions.js.map +1 -0
- package/dist/component/cronQueries.d.ts +6 -0
- package/dist/component/cronQueries.d.ts.map +1 -0
- package/dist/component/cronQueries.js +38 -0
- package/dist/component/cronQueries.js.map +1 -0
- package/dist/component/crons.d.ts +3 -0
- package/dist/component/crons.d.ts.map +1 -0
- package/dist/component/crons.js +18 -0
- package/dist/component/crons.js.map +1 -0
- package/dist/component/format.d.ts +11 -0
- package/dist/component/format.d.ts.map +1 -0
- package/dist/component/format.js +175 -0
- package/dist/component/format.js.map +1 -0
- package/dist/component/format.test.d.ts +2 -0
- package/dist/component/format.test.d.ts.map +1 -0
- package/dist/component/format.test.js +118 -0
- package/dist/component/format.test.js.map +1 -0
- package/dist/component/mutations.d.ts +158 -0
- package/dist/component/mutations.d.ts.map +1 -0
- package/dist/component/mutations.js +745 -0
- package/dist/component/mutations.js.map +1 -0
- package/dist/component/queries.d.ts +94 -0
- package/dist/component/queries.d.ts.map +1 -0
- package/dist/component/queries.js +574 -0
- package/dist/component/queries.js.map +1 -0
- package/dist/component/schema.d.ts +278 -0
- package/dist/component/schema.d.ts.map +1 -0
- package/dist/component/schema.js +161 -0
- package/dist/component/schema.js.map +1 -0
- package/dist/mcp/server.d.ts +11 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +571 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/shared.d.ts +126 -0
- package/dist/shared.d.ts.map +1 -0
- package/dist/shared.js +67 -0
- package/dist/shared.js.map +1 -0
- package/dist/test.d.ts +23 -0
- package/dist/test.d.ts.map +1 -0
- package/dist/test.js +21 -0
- package/dist/test.js.map +1 -0
- package/eslint.config.js +15 -0
- package/example/convex/convex.config.ts +7 -0
- package/example/convex/memory.ts +129 -0
- package/llms.md +175 -0
- package/llms.txt +126 -0
- package/package.json +80 -0
- package/prds/API-REFERENCE.md +935 -0
- package/prds/SETUP.md +682 -0
- package/src/cli/index.ts +254 -0
- package/src/cli/parsers/claude-code.ts +80 -0
- package/src/cli/parsers/codex.ts +45 -0
- package/src/cli/parsers/conductor.ts +47 -0
- package/src/cli/parsers/cursor.ts +55 -0
- package/src/cli/parsers/index.ts +30 -0
- package/src/cli/parsers/opencode.ts +84 -0
- package/src/cli/parsers/parsers.test.ts +201 -0
- package/src/cli/parsers/pi.ts +47 -0
- package/src/cli/parsers/types.ts +26 -0
- package/src/cli/parsers/vscode-copilot.ts +78 -0
- package/src/cli/parsers/zed.ts +47 -0
- package/src/cli/sync.ts +110 -0
- package/src/cli/type-extractor.test.ts +241 -0
- package/src/cli/type-extractor.ts +331 -0
- package/src/client/http.ts +415 -0
- package/src/client/index.ts +519 -0
- package/src/component/_generated/api.ts +14 -0
- package/src/component/_generated/dataModel.ts +20 -0
- package/src/component/_generated/server.ts +64 -0
- package/src/component/actions.ts +558 -0
- package/src/component/apiKeyMutations.ts +175 -0
- package/src/component/apiKeyQueries.ts +156 -0
- package/src/component/checksum.test.ts +31 -0
- package/src/component/checksum.ts +13 -0
- package/src/component/convex.config.ts +5 -0
- package/src/component/cronActions.ts +52 -0
- package/src/component/cronQueries.ts +42 -0
- package/src/component/crons.ts +34 -0
- package/src/component/format.test.ts +133 -0
- package/src/component/format.ts +232 -0
- package/src/component/mutations.ts +824 -0
- package/src/component/queries.ts +684 -0
- package/src/component/schema.ts +207 -0
- package/src/mcp/server.ts +695 -0
- package/src/shared.ts +251 -0
- package/src/test.ts +32 -0
- package/tsconfig.json +21 -0
- package/vitest.config.ts +8 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { describe, it, expect } from "vitest";
|
|
2
|
+
import { formatMemoryForTool } from "./format.js";
|
|
3
|
+
const baseMemory = {
|
|
4
|
+
_id: "test-id",
|
|
5
|
+
_creationTime: Date.now(),
|
|
6
|
+
projectId: "test-project",
|
|
7
|
+
scope: "project",
|
|
8
|
+
title: "api-rules",
|
|
9
|
+
content: "# API Rules\n\n- Use camelCase\n- Return JSON",
|
|
10
|
+
memoryType: "instruction",
|
|
11
|
+
tags: ["api", "style"],
|
|
12
|
+
priority: 0.9,
|
|
13
|
+
source: "claude-code",
|
|
14
|
+
checksum: "abc12345",
|
|
15
|
+
archived: false,
|
|
16
|
+
};
|
|
17
|
+
describe("formatMemoryForTool", () => {
|
|
18
|
+
describe("claude-code", () => {
|
|
19
|
+
it("formats instructions as .claude/rules/*.md", () => {
|
|
20
|
+
const result = formatMemoryForTool(baseMemory, "claude-code", "my-project");
|
|
21
|
+
expect(result.path).toBe(".claude/rules/api-rules.md");
|
|
22
|
+
expect(result.content).toContain("# API Rules");
|
|
23
|
+
});
|
|
24
|
+
it("formats learnings under .claude/projects/", () => {
|
|
25
|
+
const learning = { ...baseMemory, memoryType: "learning" };
|
|
26
|
+
const result = formatMemoryForTool(learning, "claude-code", "my-project");
|
|
27
|
+
expect(result.path).toBe(".claude/projects/my-project/memory/api-rules.md");
|
|
28
|
+
});
|
|
29
|
+
it("includes paths as YAML frontmatter", () => {
|
|
30
|
+
const withPaths = { ...baseMemory, paths: ["src/**/*.ts"] };
|
|
31
|
+
const result = formatMemoryForTool(withPaths, "claude-code");
|
|
32
|
+
expect(result.content).toContain("---");
|
|
33
|
+
expect(result.content).toContain("paths:");
|
|
34
|
+
expect(result.content).toContain("src/**/*.ts");
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
describe("cursor", () => {
|
|
38
|
+
it("formats as .cursor/rules/*.mdc", () => {
|
|
39
|
+
const result = formatMemoryForTool(baseMemory, "cursor");
|
|
40
|
+
expect(result.path).toBe(".cursor/rules/api-rules.mdc");
|
|
41
|
+
expect(result.content).toContain("description: api-rules");
|
|
42
|
+
expect(result.content).toContain("alwaysApply: true"); // priority 0.9 >= 0.8
|
|
43
|
+
});
|
|
44
|
+
it("sets alwaysApply false for low priority", () => {
|
|
45
|
+
const low = { ...baseMemory, priority: 0.3 };
|
|
46
|
+
const result = formatMemoryForTool(low, "cursor");
|
|
47
|
+
expect(result.content).toContain("alwaysApply: false");
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
describe("opencode", () => {
|
|
51
|
+
it("formats instructions as AGENTS.md sections", () => {
|
|
52
|
+
const result = formatMemoryForTool(baseMemory, "opencode");
|
|
53
|
+
expect(result.path).toBe("AGENTS.md");
|
|
54
|
+
expect(result.content).toContain("## api-rules");
|
|
55
|
+
});
|
|
56
|
+
it("formats journals as separate files", () => {
|
|
57
|
+
const journal = { ...baseMemory, memoryType: "journal" };
|
|
58
|
+
const result = formatMemoryForTool(journal, "opencode");
|
|
59
|
+
expect(result.path).toBe("journal/api-rules.md");
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
describe("codex", () => {
|
|
63
|
+
it("formats as AGENTS.md by default", () => {
|
|
64
|
+
const result = formatMemoryForTool(baseMemory, "codex");
|
|
65
|
+
expect(result.path).toBe("AGENTS.md");
|
|
66
|
+
});
|
|
67
|
+
it("uses common path prefix for scoped rules", () => {
|
|
68
|
+
const withPaths = { ...baseMemory, paths: ["src/api/routes.ts", "src/api/handlers.ts"] };
|
|
69
|
+
const result = formatMemoryForTool(withPaths, "codex");
|
|
70
|
+
expect(result.path).toBe("src/api/AGENTS.md");
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
describe("conductor", () => {
|
|
74
|
+
it("formats as .conductor/rules/*.md", () => {
|
|
75
|
+
const result = formatMemoryForTool(baseMemory, "conductor");
|
|
76
|
+
expect(result.path).toBe(".conductor/rules/api-rules.md");
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
describe("zed", () => {
|
|
80
|
+
it("formats as .zed/rules/*.md", () => {
|
|
81
|
+
const result = formatMemoryForTool(baseMemory, "zed");
|
|
82
|
+
expect(result.path).toBe(".zed/rules/api-rules.md");
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
describe("vscode-copilot", () => {
|
|
86
|
+
it("formats as .github/copilot-instructions.md", () => {
|
|
87
|
+
const result = formatMemoryForTool(baseMemory, "vscode-copilot");
|
|
88
|
+
expect(result.path).toBe(".github/copilot-instructions.md");
|
|
89
|
+
expect(result.content).toContain("## api-rules");
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
describe("pi", () => {
|
|
93
|
+
it("formats as .pi/rules/*.md", () => {
|
|
94
|
+
const result = formatMemoryForTool(baseMemory, "pi");
|
|
95
|
+
expect(result.path).toBe(".pi/rules/api-rules.md");
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
describe("raw", () => {
|
|
99
|
+
it("includes full frontmatter", () => {
|
|
100
|
+
const result = formatMemoryForTool(baseMemory, "raw");
|
|
101
|
+
expect(result.path).toBe("memories/api-rules.md");
|
|
102
|
+
expect(result.content).toContain("title: api-rules");
|
|
103
|
+
expect(result.content).toContain("type: instruction");
|
|
104
|
+
expect(result.content).toContain("scope: project");
|
|
105
|
+
expect(result.content).toContain("tags:");
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
describe("filename sanitization", () => {
|
|
109
|
+
it("sanitizes special characters in titles", () => {
|
|
110
|
+
const special = { ...baseMemory, title: "My Rule (v2) & Notes!" };
|
|
111
|
+
const result = formatMemoryForTool(special, "zed");
|
|
112
|
+
expect(result.path).not.toContain("(");
|
|
113
|
+
expect(result.path).not.toContain("!");
|
|
114
|
+
expect(result.path).not.toContain("&");
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
//# sourceMappingURL=format.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.test.js","sourceRoot":"","sources":["../../src/component/format.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,UAAU,GAAG;IACjB,GAAG,EAAE,SAAgB;IACrB,aAAa,EAAE,IAAI,CAAC,GAAG,EAAE;IACzB,SAAS,EAAE,cAAc;IACzB,KAAK,EAAE,SAAkB;IACzB,KAAK,EAAE,WAAW;IAClB,OAAO,EAAE,+CAA+C;IACxD,UAAU,EAAE,aAAsB;IAClC,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,GAAG;IACb,MAAM,EAAE,aAAa;IACrB,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,KAAK;CAChB,CAAC;AAEF,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;IACnC,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;QAC3B,EA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C,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,uBAAuB,EAAE,GAAG,EAAE;QACrC,EAAE,CAAC,wCAAwC,EAAE,GAAG,EAAE;YAChD,MAAM,OAAO,GAAG,EAAE,GAAG,UAAU,EAAE,KAAK,EAAE,uBAAuB,EAAE,CAAC;YAClE,MAAM,MAAM,GAAG,mBAAmB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;YACnD,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;YACvC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;YACvC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QACzC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
export declare const create: import("convex/server").RegisteredMutation<"public", {
|
|
2
|
+
userId?: string | undefined;
|
|
3
|
+
agentId?: string | undefined;
|
|
4
|
+
sessionId?: string | undefined;
|
|
5
|
+
tags?: string[] | undefined;
|
|
6
|
+
paths?: string[] | undefined;
|
|
7
|
+
priority?: number | undefined;
|
|
8
|
+
source?: string | undefined;
|
|
9
|
+
scope: "project" | "user" | "org";
|
|
10
|
+
memoryType: "instruction" | "learning" | "reference" | "feedback" | "journal";
|
|
11
|
+
projectId: string;
|
|
12
|
+
title: string;
|
|
13
|
+
content: string;
|
|
14
|
+
}, Promise<import("convex/values").GenericId<"memories">>>;
|
|
15
|
+
export declare const update: import("convex/server").RegisteredMutation<"public", {
|
|
16
|
+
memoryType?: "instruction" | "learning" | "reference" | "feedback" | "journal" | undefined;
|
|
17
|
+
title?: string | undefined;
|
|
18
|
+
content?: string | undefined;
|
|
19
|
+
tags?: string[] | undefined;
|
|
20
|
+
paths?: string[] | undefined;
|
|
21
|
+
priority?: number | undefined;
|
|
22
|
+
actor?: string | undefined;
|
|
23
|
+
memoryId: string;
|
|
24
|
+
}, Promise<null>>;
|
|
25
|
+
export declare const archive: import("convex/server").RegisteredMutation<"public", {
|
|
26
|
+
actor?: string | undefined;
|
|
27
|
+
memoryId: string;
|
|
28
|
+
}, Promise<null>>;
|
|
29
|
+
export declare const restore: import("convex/server").RegisteredMutation<"public", {
|
|
30
|
+
actor?: string | undefined;
|
|
31
|
+
memoryId: string;
|
|
32
|
+
}, Promise<null>>;
|
|
33
|
+
export declare const batchArchive: import("convex/server").RegisteredMutation<"public", {
|
|
34
|
+
actor?: string | undefined;
|
|
35
|
+
memoryIds: string[];
|
|
36
|
+
}, Promise<{
|
|
37
|
+
archived: number;
|
|
38
|
+
failed: number;
|
|
39
|
+
}>>;
|
|
40
|
+
export declare const batchUpdate: import("convex/server").RegisteredMutation<"public", {
|
|
41
|
+
actor?: string | undefined;
|
|
42
|
+
updates: {
|
|
43
|
+
memoryType?: "instruction" | "learning" | "reference" | "feedback" | "journal" | undefined;
|
|
44
|
+
title?: string | undefined;
|
|
45
|
+
content?: string | undefined;
|
|
46
|
+
tags?: string[] | undefined;
|
|
47
|
+
paths?: string[] | undefined;
|
|
48
|
+
priority?: number | undefined;
|
|
49
|
+
memoryId: string;
|
|
50
|
+
}[];
|
|
51
|
+
}, Promise<{
|
|
52
|
+
updated: number;
|
|
53
|
+
failed: number;
|
|
54
|
+
}>>;
|
|
55
|
+
export declare const recordAccess: import("convex/server").RegisteredMutation<"public", {
|
|
56
|
+
memoryIds: string[];
|
|
57
|
+
}, Promise<null>>;
|
|
58
|
+
export declare const addFeedback: import("convex/server").RegisteredMutation<"public", {
|
|
59
|
+
comment?: string | undefined;
|
|
60
|
+
memoryId: string;
|
|
61
|
+
actor: string;
|
|
62
|
+
sentiment: "positive" | "negative" | "very_negative";
|
|
63
|
+
}, Promise<null>>;
|
|
64
|
+
export declare const addRelation: import("convex/server").RegisteredMutation<"public", {
|
|
65
|
+
metadata?: {
|
|
66
|
+
confidence?: number | undefined;
|
|
67
|
+
createdBy?: string | undefined;
|
|
68
|
+
} | undefined;
|
|
69
|
+
projectId: string;
|
|
70
|
+
fromMemoryId: string;
|
|
71
|
+
toMemoryId: string;
|
|
72
|
+
relationship: string;
|
|
73
|
+
}, Promise<import("convex/values").GenericId<"memoryRelations">>>;
|
|
74
|
+
export declare const removeRelation: import("convex/server").RegisteredMutation<"public", {
|
|
75
|
+
relationId: string;
|
|
76
|
+
}, Promise<null>>;
|
|
77
|
+
export declare const importFromLocal: import("convex/server").RegisteredMutation<"public", {
|
|
78
|
+
userId?: string | undefined;
|
|
79
|
+
projectId: string;
|
|
80
|
+
memories: {
|
|
81
|
+
paths?: string[] | undefined;
|
|
82
|
+
priority?: number | undefined;
|
|
83
|
+
scope: "project" | "user" | "org";
|
|
84
|
+
memoryType: "instruction" | "learning" | "reference" | "feedback" | "journal";
|
|
85
|
+
title: string;
|
|
86
|
+
content: string;
|
|
87
|
+
tags: string[];
|
|
88
|
+
source: string;
|
|
89
|
+
checksum: string;
|
|
90
|
+
}[];
|
|
91
|
+
}, Promise<{
|
|
92
|
+
created: number;
|
|
93
|
+
updated: number;
|
|
94
|
+
unchanged: number;
|
|
95
|
+
}>>;
|
|
96
|
+
export declare const upsertProject: import("convex/server").RegisteredMutation<"public", {
|
|
97
|
+
description?: string | undefined;
|
|
98
|
+
settings?: {
|
|
99
|
+
embeddingModel?: string | undefined;
|
|
100
|
+
embeddingDimensions?: number | undefined;
|
|
101
|
+
factExtractionPrompt?: string | undefined;
|
|
102
|
+
updateDecisionPrompt?: string | undefined;
|
|
103
|
+
decayEnabled?: boolean | undefined;
|
|
104
|
+
decayHalfLifeDays?: number | undefined;
|
|
105
|
+
autoSync: boolean;
|
|
106
|
+
syncFormats: string[];
|
|
107
|
+
} | undefined;
|
|
108
|
+
projectId: string;
|
|
109
|
+
name: string;
|
|
110
|
+
}, Promise<any>>;
|
|
111
|
+
export declare const recordSync: import("convex/server").RegisteredMutation<"public", {
|
|
112
|
+
userId?: string | undefined;
|
|
113
|
+
projectId: string;
|
|
114
|
+
checksum: string;
|
|
115
|
+
memoryId: string;
|
|
116
|
+
direction: "push" | "pull";
|
|
117
|
+
targetFormat: string;
|
|
118
|
+
targetPath: string;
|
|
119
|
+
}, Promise<null>>;
|
|
120
|
+
export declare const storeEmbedding: import("convex/server").RegisteredMutation<"public", {
|
|
121
|
+
memoryId: string;
|
|
122
|
+
embedding: number[];
|
|
123
|
+
model: string;
|
|
124
|
+
dimensions: number;
|
|
125
|
+
}, Promise<null>>;
|
|
126
|
+
export declare const applyDecay: import("convex/server").RegisteredMutation<"internal", {
|
|
127
|
+
projectId: string;
|
|
128
|
+
halfLifeDays: number;
|
|
129
|
+
}, Promise<{
|
|
130
|
+
processed: number;
|
|
131
|
+
decayed: number;
|
|
132
|
+
}>>;
|
|
133
|
+
export declare const cleanupOldHistory: import("convex/server").RegisteredMutation<"internal", {
|
|
134
|
+
projectId: string;
|
|
135
|
+
olderThanMs: number;
|
|
136
|
+
}, Promise<{
|
|
137
|
+
deleted: number;
|
|
138
|
+
}>>;
|
|
139
|
+
export declare const ingestCreateMemory: import("convex/server").RegisteredMutation<"internal", {
|
|
140
|
+
userId?: string | undefined;
|
|
141
|
+
agentId?: string | undefined;
|
|
142
|
+
sessionId?: string | undefined;
|
|
143
|
+
scope: "project" | "user" | "org";
|
|
144
|
+
memoryType: "instruction" | "learning" | "reference" | "feedback" | "journal";
|
|
145
|
+
projectId: string;
|
|
146
|
+
title: string;
|
|
147
|
+
content: string;
|
|
148
|
+
tags: string[];
|
|
149
|
+
source: string;
|
|
150
|
+
}, Promise<import("convex/values").GenericId<"memories">>>;
|
|
151
|
+
export declare const ingestUpdateMemory: import("convex/server").RegisteredMutation<"internal", {
|
|
152
|
+
content: string;
|
|
153
|
+
memoryId: string;
|
|
154
|
+
}, Promise<null>>;
|
|
155
|
+
export declare const ingestDeleteMemory: import("convex/server").RegisteredMutation<"internal", {
|
|
156
|
+
memoryId: string;
|
|
157
|
+
}, Promise<null>>;
|
|
158
|
+
//# sourceMappingURL=mutations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../src/component/mutations.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,MAAM;;;;;;;;;;;;;0DAqDjB,CAAC;AAIH,eAAO,MAAM,MAAM;;;;;;;;;iBAiDjB,CAAC;AAIH,eAAO,MAAM,OAAO;;;iBA2BlB,CAAC;AAIH,eAAO,MAAM,OAAO;;;iBAyBlB,CAAC;AAIH,eAAO,MAAM,YAAY;;;;;;GAoCvB,CAAC;AAIH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;GA+DtB,CAAC;AAIH,eAAO,MAAM,YAAY;;iBAqBvB,CAAC;AAIH,eAAO,MAAM,WAAW;;;;;iBAsCtB,CAAC;AAIH,eAAO,MAAM,WAAW;;;;;;;;;iEA+BtB,CAAC;AAIH,eAAO,MAAM,cAAc;;iBAYzB,CAAC;AAgBH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;GAuF1B,CAAC;AAIH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;gBA+CxB,CAAC;AAIH,eAAO,MAAM,UAAU;;;;;;;;iBAgCrB,CAAC;AAIH,eAAO,MAAM,cAAc;;;;;iBAoCzB,CAAC;AAIH,eAAO,MAAM,UAAU;;;;;;GA8CrB,CAAC;AAIH,eAAO,MAAM,iBAAiB;;;;;GAyB5B,CAAC;AAIH,eAAO,MAAM,kBAAkB;;;;;;;;;;;0DAgD7B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;iBA4B7B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;iBA0B7B,CAAC"}
|