@waynesutton/agent-memory 0.0.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.
Files changed (201) hide show
  1. package/.claude/settings.json +9 -0
  2. package/.claude/settings.local.json +7 -0
  3. package/AGENTS.md +113 -0
  4. package/CLAUDE.md +79 -0
  5. package/README.md +1 -0
  6. package/dist/cli/index.d.ts +3 -0
  7. package/dist/cli/index.d.ts.map +1 -0
  8. package/dist/cli/index.js +192 -0
  9. package/dist/cli/index.js.map +1 -0
  10. package/dist/cli/parsers/claude-code.d.ts +3 -0
  11. package/dist/cli/parsers/claude-code.d.ts.map +1 -0
  12. package/dist/cli/parsers/claude-code.js +75 -0
  13. package/dist/cli/parsers/claude-code.js.map +1 -0
  14. package/dist/cli/parsers/codex.d.ts +3 -0
  15. package/dist/cli/parsers/codex.d.ts.map +1 -0
  16. package/dist/cli/parsers/codex.js +42 -0
  17. package/dist/cli/parsers/codex.js.map +1 -0
  18. package/dist/cli/parsers/conductor.d.ts +3 -0
  19. package/dist/cli/parsers/conductor.d.ts.map +1 -0
  20. package/dist/cli/parsers/conductor.js +43 -0
  21. package/dist/cli/parsers/conductor.js.map +1 -0
  22. package/dist/cli/parsers/cursor.d.ts +3 -0
  23. package/dist/cli/parsers/cursor.d.ts.map +1 -0
  24. package/dist/cli/parsers/cursor.js +50 -0
  25. package/dist/cli/parsers/cursor.js.map +1 -0
  26. package/dist/cli/parsers/index.d.ts +12 -0
  27. package/dist/cli/parsers/index.d.ts.map +1 -0
  28. package/dist/cli/parsers/index.js +27 -0
  29. package/dist/cli/parsers/index.js.map +1 -0
  30. package/dist/cli/parsers/opencode.d.ts +3 -0
  31. package/dist/cli/parsers/opencode.d.ts.map +1 -0
  32. package/dist/cli/parsers/opencode.js +72 -0
  33. package/dist/cli/parsers/opencode.js.map +1 -0
  34. package/dist/cli/parsers/parsers.test.d.ts +2 -0
  35. package/dist/cli/parsers/parsers.test.d.ts.map +1 -0
  36. package/dist/cli/parsers/parsers.test.js +151 -0
  37. package/dist/cli/parsers/parsers.test.js.map +1 -0
  38. package/dist/cli/parsers/pi.d.ts +3 -0
  39. package/dist/cli/parsers/pi.d.ts.map +1 -0
  40. package/dist/cli/parsers/pi.js +43 -0
  41. package/dist/cli/parsers/pi.js.map +1 -0
  42. package/dist/cli/parsers/types.d.ts +25 -0
  43. package/dist/cli/parsers/types.d.ts.map +1 -0
  44. package/dist/cli/parsers/types.js +2 -0
  45. package/dist/cli/parsers/types.js.map +1 -0
  46. package/dist/cli/parsers/vscode-copilot.d.ts +3 -0
  47. package/dist/cli/parsers/vscode-copilot.d.ts.map +1 -0
  48. package/dist/cli/parsers/vscode-copilot.js +69 -0
  49. package/dist/cli/parsers/vscode-copilot.js.map +1 -0
  50. package/dist/cli/parsers/zed.d.ts +3 -0
  51. package/dist/cli/parsers/zed.d.ts.map +1 -0
  52. package/dist/cli/parsers/zed.js +43 -0
  53. package/dist/cli/parsers/zed.js.map +1 -0
  54. package/dist/cli/sync.d.ts +21 -0
  55. package/dist/cli/sync.d.ts.map +1 -0
  56. package/dist/cli/sync.js +78 -0
  57. package/dist/cli/sync.js.map +1 -0
  58. package/dist/cli/type-extractor.d.ts +25 -0
  59. package/dist/cli/type-extractor.d.ts.map +1 -0
  60. package/dist/cli/type-extractor.js +254 -0
  61. package/dist/cli/type-extractor.js.map +1 -0
  62. package/dist/cli/type-extractor.test.d.ts +2 -0
  63. package/dist/cli/type-extractor.test.d.ts.map +1 -0
  64. package/dist/cli/type-extractor.test.js +173 -0
  65. package/dist/cli/type-extractor.test.js.map +1 -0
  66. package/dist/client/http.d.ts +44 -0
  67. package/dist/client/http.d.ts.map +1 -0
  68. package/dist/client/http.js +311 -0
  69. package/dist/client/http.js.map +1 -0
  70. package/dist/client/index.d.ts +158 -0
  71. package/dist/client/index.d.ts.map +1 -0
  72. package/dist/client/index.js +256 -0
  73. package/dist/client/index.js.map +1 -0
  74. package/dist/component/_generated/api.d.ts +12 -0
  75. package/dist/component/_generated/api.d.ts.map +1 -0
  76. package/dist/component/_generated/api.js +13 -0
  77. package/dist/component/_generated/api.js.map +1 -0
  78. package/dist/component/_generated/dataModel.d.ts +18 -0
  79. package/dist/component/_generated/dataModel.d.ts.map +1 -0
  80. package/dist/component/_generated/dataModel.js +11 -0
  81. package/dist/component/_generated/dataModel.js.map +1 -0
  82. package/dist/component/_generated/server.d.ts +42 -0
  83. package/dist/component/_generated/server.d.ts.map +1 -0
  84. package/dist/component/_generated/server.js +39 -0
  85. package/dist/component/_generated/server.js.map +1 -0
  86. package/dist/component/actions.d.ts +42 -0
  87. package/dist/component/actions.d.ts.map +1 -0
  88. package/dist/component/actions.js +405 -0
  89. package/dist/component/actions.js.map +1 -0
  90. package/dist/component/apiKeyMutations.d.ts +29 -0
  91. package/dist/component/apiKeyMutations.d.ts.map +1 -0
  92. package/dist/component/apiKeyMutations.js +149 -0
  93. package/dist/component/apiKeyMutations.js.map +1 -0
  94. package/dist/component/apiKeyQueries.d.ts +37 -0
  95. package/dist/component/apiKeyQueries.d.ts.map +1 -0
  96. package/dist/component/apiKeyQueries.js +127 -0
  97. package/dist/component/apiKeyQueries.js.map +1 -0
  98. package/dist/component/checksum.d.ts +6 -0
  99. package/dist/component/checksum.d.ts.map +1 -0
  100. package/dist/component/checksum.js +14 -0
  101. package/dist/component/checksum.js.map +1 -0
  102. package/dist/component/checksum.test.d.ts +2 -0
  103. package/dist/component/checksum.test.d.ts.map +1 -0
  104. package/dist/component/checksum.test.js +27 -0
  105. package/dist/component/checksum.test.js.map +1 -0
  106. package/dist/component/convex.config.d.ts +3 -0
  107. package/dist/component/convex.config.d.ts.map +1 -0
  108. package/dist/component/convex.config.js +4 -0
  109. package/dist/component/convex.config.js.map +1 -0
  110. package/dist/component/cronActions.d.ts +3 -0
  111. package/dist/component/cronActions.d.ts.map +1 -0
  112. package/dist/component/cronActions.js +38 -0
  113. package/dist/component/cronActions.js.map +1 -0
  114. package/dist/component/cronQueries.d.ts +6 -0
  115. package/dist/component/cronQueries.d.ts.map +1 -0
  116. package/dist/component/cronQueries.js +38 -0
  117. package/dist/component/cronQueries.js.map +1 -0
  118. package/dist/component/crons.d.ts +3 -0
  119. package/dist/component/crons.d.ts.map +1 -0
  120. package/dist/component/crons.js +18 -0
  121. package/dist/component/crons.js.map +1 -0
  122. package/dist/component/format.d.ts +11 -0
  123. package/dist/component/format.d.ts.map +1 -0
  124. package/dist/component/format.js +175 -0
  125. package/dist/component/format.js.map +1 -0
  126. package/dist/component/format.test.d.ts +2 -0
  127. package/dist/component/format.test.d.ts.map +1 -0
  128. package/dist/component/format.test.js +118 -0
  129. package/dist/component/format.test.js.map +1 -0
  130. package/dist/component/mutations.d.ts +158 -0
  131. package/dist/component/mutations.d.ts.map +1 -0
  132. package/dist/component/mutations.js +745 -0
  133. package/dist/component/mutations.js.map +1 -0
  134. package/dist/component/queries.d.ts +94 -0
  135. package/dist/component/queries.d.ts.map +1 -0
  136. package/dist/component/queries.js +574 -0
  137. package/dist/component/queries.js.map +1 -0
  138. package/dist/component/schema.d.ts +278 -0
  139. package/dist/component/schema.d.ts.map +1 -0
  140. package/dist/component/schema.js +161 -0
  141. package/dist/component/schema.js.map +1 -0
  142. package/dist/mcp/server.d.ts +11 -0
  143. package/dist/mcp/server.d.ts.map +1 -0
  144. package/dist/mcp/server.js +571 -0
  145. package/dist/mcp/server.js.map +1 -0
  146. package/dist/shared.d.ts +126 -0
  147. package/dist/shared.d.ts.map +1 -0
  148. package/dist/shared.js +67 -0
  149. package/dist/shared.js.map +1 -0
  150. package/dist/test.d.ts +23 -0
  151. package/dist/test.d.ts.map +1 -0
  152. package/dist/test.js +21 -0
  153. package/dist/test.js.map +1 -0
  154. package/eslint.config.js +15 -0
  155. package/example/convex/convex.config.ts +7 -0
  156. package/example/convex/memory.ts +129 -0
  157. package/llms.md +175 -0
  158. package/llms.txt +126 -0
  159. package/package.json +72 -0
  160. package/prds/API-REFERENCE.md +935 -0
  161. package/prds/README.md +988 -0
  162. package/prds/SETUP.md +682 -0
  163. package/src/cli/index.ts +254 -0
  164. package/src/cli/parsers/claude-code.ts +80 -0
  165. package/src/cli/parsers/codex.ts +45 -0
  166. package/src/cli/parsers/conductor.ts +47 -0
  167. package/src/cli/parsers/cursor.ts +55 -0
  168. package/src/cli/parsers/index.ts +30 -0
  169. package/src/cli/parsers/opencode.ts +84 -0
  170. package/src/cli/parsers/parsers.test.ts +201 -0
  171. package/src/cli/parsers/pi.ts +47 -0
  172. package/src/cli/parsers/types.ts +26 -0
  173. package/src/cli/parsers/vscode-copilot.ts +78 -0
  174. package/src/cli/parsers/zed.ts +47 -0
  175. package/src/cli/sync.ts +110 -0
  176. package/src/cli/type-extractor.test.ts +241 -0
  177. package/src/cli/type-extractor.ts +331 -0
  178. package/src/client/http.ts +415 -0
  179. package/src/client/index.ts +519 -0
  180. package/src/component/_generated/api.ts +14 -0
  181. package/src/component/_generated/dataModel.ts +20 -0
  182. package/src/component/_generated/server.ts +64 -0
  183. package/src/component/actions.ts +558 -0
  184. package/src/component/apiKeyMutations.ts +175 -0
  185. package/src/component/apiKeyQueries.ts +156 -0
  186. package/src/component/checksum.test.ts +31 -0
  187. package/src/component/checksum.ts +13 -0
  188. package/src/component/convex.config.ts +5 -0
  189. package/src/component/cronActions.ts +52 -0
  190. package/src/component/cronQueries.ts +42 -0
  191. package/src/component/crons.ts +34 -0
  192. package/src/component/format.test.ts +133 -0
  193. package/src/component/format.ts +232 -0
  194. package/src/component/mutations.ts +824 -0
  195. package/src/component/queries.ts +684 -0
  196. package/src/component/schema.ts +207 -0
  197. package/src/mcp/server.ts +695 -0
  198. package/src/shared.ts +251 -0
  199. package/src/test.ts +32 -0
  200. package/tsconfig.json +21 -0
  201. 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,EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE;YACpD,MAAM,MAAM,GAAG,mBAAmB,CAAC,UAAU,EAAE,aAAa,EAAE,YAAY,CAAC,CAAC;YAC5E,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC;YACvD,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;QAClD,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,2CAA2C,EAAE,GAAG,EAAE;YACnD,MAAM,QAAQ,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C;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"}