@xiaoxiamimengfb/my-opencode-mem 2.12.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.
Files changed (152) hide show
  1. package/README.md +155 -0
  2. package/dist/config.d.ts +58 -0
  3. package/dist/config.d.ts.map +1 -0
  4. package/dist/config.js +411 -0
  5. package/dist/index.d.ts +3 -0
  6. package/dist/index.d.ts.map +1 -0
  7. package/dist/index.js +427 -0
  8. package/dist/plugin.d.ts +5 -0
  9. package/dist/plugin.d.ts.map +1 -0
  10. package/dist/plugin.js +4 -0
  11. package/dist/services/ai/ai-provider-factory.d.ts +8 -0
  12. package/dist/services/ai/ai-provider-factory.d.ts.map +1 -0
  13. package/dist/services/ai/ai-provider-factory.js +28 -0
  14. package/dist/services/ai/opencode-provider.d.ts +30 -0
  15. package/dist/services/ai/opencode-provider.d.ts.map +1 -0
  16. package/dist/services/ai/opencode-provider.js +332 -0
  17. package/dist/services/ai/provider-config.d.ts +17 -0
  18. package/dist/services/ai/provider-config.d.ts.map +1 -0
  19. package/dist/services/ai/provider-config.js +14 -0
  20. package/dist/services/ai/providers/anthropic-messages.d.ts +12 -0
  21. package/dist/services/ai/providers/anthropic-messages.d.ts.map +1 -0
  22. package/dist/services/ai/providers/anthropic-messages.js +184 -0
  23. package/dist/services/ai/providers/base-provider.d.ts +25 -0
  24. package/dist/services/ai/providers/base-provider.d.ts.map +1 -0
  25. package/dist/services/ai/providers/base-provider.js +23 -0
  26. package/dist/services/ai/providers/google-gemini.d.ts +16 -0
  27. package/dist/services/ai/providers/google-gemini.d.ts.map +1 -0
  28. package/dist/services/ai/providers/google-gemini.js +228 -0
  29. package/dist/services/ai/providers/openai-chat-completion.d.ts +13 -0
  30. package/dist/services/ai/providers/openai-chat-completion.d.ts.map +1 -0
  31. package/dist/services/ai/providers/openai-chat-completion.js +277 -0
  32. package/dist/services/ai/providers/openai-responses.d.ts +14 -0
  33. package/dist/services/ai/providers/openai-responses.d.ts.map +1 -0
  34. package/dist/services/ai/providers/openai-responses.js +182 -0
  35. package/dist/services/ai/session/ai-session-manager.d.ts +21 -0
  36. package/dist/services/ai/session/ai-session-manager.d.ts.map +1 -0
  37. package/dist/services/ai/session/ai-session-manager.js +166 -0
  38. package/dist/services/ai/session/session-types.d.ts +43 -0
  39. package/dist/services/ai/session/session-types.d.ts.map +1 -0
  40. package/dist/services/ai/session/session-types.js +1 -0
  41. package/dist/services/ai/tools/tool-schema.d.ts +41 -0
  42. package/dist/services/ai/tools/tool-schema.d.ts.map +1 -0
  43. package/dist/services/ai/tools/tool-schema.js +24 -0
  44. package/dist/services/ai/validators/user-profile-validator.d.ts +13 -0
  45. package/dist/services/ai/validators/user-profile-validator.d.ts.map +1 -0
  46. package/dist/services/ai/validators/user-profile-validator.js +111 -0
  47. package/dist/services/api-handlers.d.ts +164 -0
  48. package/dist/services/api-handlers.d.ts.map +1 -0
  49. package/dist/services/api-handlers.js +901 -0
  50. package/dist/services/auto-capture.d.ts +3 -0
  51. package/dist/services/auto-capture.d.ts.map +1 -0
  52. package/dist/services/auto-capture.js +306 -0
  53. package/dist/services/cleanup-service.d.ts +23 -0
  54. package/dist/services/cleanup-service.d.ts.map +1 -0
  55. package/dist/services/cleanup-service.js +102 -0
  56. package/dist/services/client.d.ts +118 -0
  57. package/dist/services/client.d.ts.map +1 -0
  58. package/dist/services/client.js +251 -0
  59. package/dist/services/context.d.ts +11 -0
  60. package/dist/services/context.d.ts.map +1 -0
  61. package/dist/services/context.js +24 -0
  62. package/dist/services/deduplication-service.d.ts +30 -0
  63. package/dist/services/deduplication-service.d.ts.map +1 -0
  64. package/dist/services/deduplication-service.js +124 -0
  65. package/dist/services/embedding.d.ts +15 -0
  66. package/dist/services/embedding.d.ts.map +1 -0
  67. package/dist/services/embedding.js +106 -0
  68. package/dist/services/jsonc.d.ts +7 -0
  69. package/dist/services/jsonc.d.ts.map +1 -0
  70. package/dist/services/jsonc.js +76 -0
  71. package/dist/services/language-detector.d.ts +3 -0
  72. package/dist/services/language-detector.d.ts.map +1 -0
  73. package/dist/services/language-detector.js +16 -0
  74. package/dist/services/logger.d.ts +2 -0
  75. package/dist/services/logger.d.ts.map +1 -0
  76. package/dist/services/logger.js +51 -0
  77. package/dist/services/migration-service.d.ts +42 -0
  78. package/dist/services/migration-service.d.ts.map +1 -0
  79. package/dist/services/migration-service.js +250 -0
  80. package/dist/services/privacy.d.ts +3 -0
  81. package/dist/services/privacy.d.ts.map +1 -0
  82. package/dist/services/privacy.js +7 -0
  83. package/dist/services/secret-resolver.d.ts +2 -0
  84. package/dist/services/secret-resolver.d.ts.map +1 -0
  85. package/dist/services/secret-resolver.js +55 -0
  86. package/dist/services/sqlite/connection-manager.d.ts +13 -0
  87. package/dist/services/sqlite/connection-manager.d.ts.map +1 -0
  88. package/dist/services/sqlite/connection-manager.js +74 -0
  89. package/dist/services/sqlite/shard-manager.d.ts +23 -0
  90. package/dist/services/sqlite/shard-manager.d.ts.map +1 -0
  91. package/dist/services/sqlite/shard-manager.js +288 -0
  92. package/dist/services/sqlite/sqlite-bootstrap.d.ts +2 -0
  93. package/dist/services/sqlite/sqlite-bootstrap.d.ts.map +1 -0
  94. package/dist/services/sqlite/sqlite-bootstrap.js +8 -0
  95. package/dist/services/sqlite/types.d.ts +42 -0
  96. package/dist/services/sqlite/types.d.ts.map +1 -0
  97. package/dist/services/sqlite/types.js +1 -0
  98. package/dist/services/sqlite/vector-search.d.ts +29 -0
  99. package/dist/services/sqlite/vector-search.d.ts.map +1 -0
  100. package/dist/services/sqlite/vector-search.js +268 -0
  101. package/dist/services/tags.d.ts +24 -0
  102. package/dist/services/tags.d.ts.map +1 -0
  103. package/dist/services/tags.js +146 -0
  104. package/dist/services/user-memory-learning.d.ts +3 -0
  105. package/dist/services/user-memory-learning.d.ts.map +1 -0
  106. package/dist/services/user-memory-learning.js +231 -0
  107. package/dist/services/user-profile/profile-context.d.ts +2 -0
  108. package/dist/services/user-profile/profile-context.d.ts.map +1 -0
  109. package/dist/services/user-profile/profile-context.js +40 -0
  110. package/dist/services/user-profile/profile-utils.d.ts +3 -0
  111. package/dist/services/user-profile/profile-utils.d.ts.map +1 -0
  112. package/dist/services/user-profile/profile-utils.js +45 -0
  113. package/dist/services/user-profile/types.d.ts +46 -0
  114. package/dist/services/user-profile/types.d.ts.map +1 -0
  115. package/dist/services/user-profile/types.js +1 -0
  116. package/dist/services/user-profile/user-profile-manager.d.ts +23 -0
  117. package/dist/services/user-profile/user-profile-manager.d.ts.map +1 -0
  118. package/dist/services/user-profile/user-profile-manager.js +292 -0
  119. package/dist/services/user-prompt/user-prompt-manager.d.ts +41 -0
  120. package/dist/services/user-prompt/user-prompt-manager.d.ts.map +1 -0
  121. package/dist/services/user-prompt/user-prompt-manager.js +192 -0
  122. package/dist/services/vector-backends/backend-factory.d.ts +3 -0
  123. package/dist/services/vector-backends/backend-factory.d.ts.map +1 -0
  124. package/dist/services/vector-backends/backend-factory.js +104 -0
  125. package/dist/services/vector-backends/exact-scan-backend.d.ts +39 -0
  126. package/dist/services/vector-backends/exact-scan-backend.d.ts.map +1 -0
  127. package/dist/services/vector-backends/exact-scan-backend.js +63 -0
  128. package/dist/services/vector-backends/types.d.ts +51 -0
  129. package/dist/services/vector-backends/types.d.ts.map +1 -0
  130. package/dist/services/vector-backends/types.js +1 -0
  131. package/dist/services/vector-backends/usearch-backend.d.ts +47 -0
  132. package/dist/services/vector-backends/usearch-backend.d.ts.map +1 -0
  133. package/dist/services/vector-backends/usearch-backend.js +174 -0
  134. package/dist/services/web-server-worker.d.ts +2 -0
  135. package/dist/services/web-server-worker.d.ts.map +1 -0
  136. package/dist/services/web-server-worker.js +283 -0
  137. package/dist/services/web-server.d.ts +31 -0
  138. package/dist/services/web-server.d.ts.map +1 -0
  139. package/dist/services/web-server.js +356 -0
  140. package/dist/types/index.d.ts +19 -0
  141. package/dist/types/index.d.ts.map +1 -0
  142. package/dist/types/index.js +1 -0
  143. package/dist/web/app.d.ts +2 -0
  144. package/dist/web/app.d.ts.map +1 -0
  145. package/dist/web/app.js +1194 -0
  146. package/dist/web/favicon.ico +0 -0
  147. package/dist/web/i18n.d.ts +2 -0
  148. package/dist/web/i18n.d.ts.map +1 -0
  149. package/dist/web/i18n.js +265 -0
  150. package/dist/web/index.html +284 -0
  151. package/dist/web/styles.css +1631 -0
  152. package/package.json +71 -0
@@ -0,0 +1,356 @@
1
+ import { readFileSync } from "node:fs";
2
+ import { join, dirname } from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+ import { log } from "./logger.js";
5
+ import { handleListTags, handleListMemories, handleAddMemory, handleDeleteMemory, handleBulkDelete, handleUpdateMemory, handleSearch, handleStats, handlePinMemory, handleUnpinMemory, handleRunCleanup, handleRunDeduplication, handleDetectMigration, handleRunMigration, handleDetectTagMigration, handleRunTagMigrationBatch, handleGetTagMigrationProgress, handleDeletePrompt, handleBulkDeletePrompts, handleGetUserProfile, handleGetProfileChangelog, handleGetProfileSnapshot, handleRefreshProfile, } from "./api-handlers.js";
6
+ const __filename = fileURLToPath(import.meta.url);
7
+ const __dirname = dirname(__filename);
8
+ export class WebServer {
9
+ server = null;
10
+ config;
11
+ isOwner = false;
12
+ startPromise = null;
13
+ healthCheckInterval = null;
14
+ onTakeoverCallback = null;
15
+ constructor(config) {
16
+ this.config = config;
17
+ }
18
+ setOnTakeoverCallback(callback) {
19
+ this.onTakeoverCallback = callback;
20
+ }
21
+ async start() {
22
+ if (this.startPromise) {
23
+ return this.startPromise;
24
+ }
25
+ this.startPromise = this._start();
26
+ return this.startPromise;
27
+ }
28
+ async _start() {
29
+ if (!this.config.enabled) {
30
+ return;
31
+ }
32
+ try {
33
+ this.server = Bun.serve({
34
+ port: this.config.port,
35
+ hostname: this.config.host,
36
+ fetch: this.handleRequest.bind(this),
37
+ });
38
+ this.isOwner = true;
39
+ }
40
+ catch (error) {
41
+ const errorMsg = String(error);
42
+ if (errorMsg.includes("EADDRINUSE") ||
43
+ errorMsg.includes("address already in use") ||
44
+ /Failed to start server.*Is port \d+ in use/.test(errorMsg)) {
45
+ this.isOwner = false;
46
+ this.server = null;
47
+ this.startHealthCheckLoop();
48
+ }
49
+ else {
50
+ this.isOwner = false;
51
+ this.server = null;
52
+ log("Web server failed to start", { error: errorMsg });
53
+ throw error;
54
+ }
55
+ }
56
+ }
57
+ startHealthCheckLoop() {
58
+ if (this.healthCheckInterval) {
59
+ return;
60
+ }
61
+ this.healthCheckInterval = setInterval(async () => {
62
+ const isAvailable = await this.checkServerAvailable();
63
+ if (!isAvailable) {
64
+ this.stopHealthCheckLoop();
65
+ await this.attemptTakeover();
66
+ }
67
+ }, 5000);
68
+ }
69
+ stopHealthCheckLoop() {
70
+ if (this.healthCheckInterval) {
71
+ clearInterval(this.healthCheckInterval);
72
+ this.healthCheckInterval = null;
73
+ }
74
+ }
75
+ async attemptTakeover() {
76
+ // prevent thundering herd: multiple non-owners racing to bind port
77
+ const jitterMs = 500 + Math.random() * 1000;
78
+ await new Promise((resolve) => setTimeout(resolve, jitterMs));
79
+ if (await this.checkServerAvailable()) {
80
+ this.startHealthCheckLoop();
81
+ return;
82
+ }
83
+ try {
84
+ // Reset startPromise so _start() can run again
85
+ this.startPromise = null;
86
+ await this._start();
87
+ if (this.isOwner) {
88
+ log("Web server takeover successful", { port: this.config.port });
89
+ if (this.onTakeoverCallback) {
90
+ try {
91
+ await this.onTakeoverCallback();
92
+ }
93
+ catch (error) {
94
+ log("Takeover callback error", { error: String(error) });
95
+ }
96
+ }
97
+ }
98
+ }
99
+ catch (error) {
100
+ this.startHealthCheckLoop();
101
+ }
102
+ }
103
+ async stop() {
104
+ this.stopHealthCheckLoop();
105
+ if (!this.isOwner || !this.server) {
106
+ return;
107
+ }
108
+ this.server.stop();
109
+ this.server = null;
110
+ this.isOwner = false;
111
+ }
112
+ isRunning() {
113
+ return this.server !== null;
114
+ }
115
+ isServerOwner() {
116
+ return this.isOwner;
117
+ }
118
+ getUrl() {
119
+ return `http://${this.config.host}:${this.config.port}`;
120
+ }
121
+ async checkServerAvailable() {
122
+ try {
123
+ const response = await fetch(`${this.getUrl()}/api/stats`, {
124
+ method: "GET",
125
+ signal: AbortSignal.timeout(2000),
126
+ });
127
+ return response.ok;
128
+ }
129
+ catch {
130
+ return false;
131
+ }
132
+ }
133
+ // --- HTTP request handling (inlined from web-server-worker.ts) ---
134
+ async handleRequest(req) {
135
+ const url = new URL(req.url);
136
+ const path = url.pathname;
137
+ const method = req.method;
138
+ try {
139
+ if (path === "/" || path === "/index.html") {
140
+ return this.serveStaticFile("index.html", "text/html");
141
+ }
142
+ if (path === "/styles.css") {
143
+ return this.serveStaticFile("styles.css", "text/css");
144
+ }
145
+ if (path === "/app.js") {
146
+ return this.serveStaticFile("app.js", "application/javascript");
147
+ }
148
+ if (path === "/i18n.js") {
149
+ return this.serveStaticFile("i18n.js", "application/javascript");
150
+ }
151
+ if (path === "/favicon.ico") {
152
+ return this.serveStaticFile("favicon.ico", "image/x-icon");
153
+ }
154
+ if (path === "/api/tags" && method === "GET") {
155
+ const result = await handleListTags();
156
+ return this.jsonResponse(result);
157
+ }
158
+ if (path === "/api/memories" && method === "GET") {
159
+ const tag = url.searchParams.get("tag") || undefined;
160
+ const page = parseInt(url.searchParams.get("page") || "1");
161
+ const pageSize = parseInt(url.searchParams.get("pageSize") || "20");
162
+ const includePrompts = url.searchParams.get("includePrompts") !== "false";
163
+ const result = await handleListMemories(tag, page, pageSize, includePrompts);
164
+ return this.jsonResponse(result);
165
+ }
166
+ if (path === "/api/memories" && method === "POST") {
167
+ const body = (await req.json());
168
+ const result = await handleAddMemory(body);
169
+ return this.jsonResponse(result);
170
+ }
171
+ if (path.startsWith("/api/memories/") && method === "DELETE") {
172
+ const parts = path.split("/");
173
+ const id = parts[3];
174
+ if (!id || id === "bulk-delete") {
175
+ return this.jsonResponse({ success: false, error: "Invalid ID" });
176
+ }
177
+ const cascade = url.searchParams.get("cascade") === "true";
178
+ const result = await handleDeleteMemory(id, cascade);
179
+ return this.jsonResponse(result);
180
+ }
181
+ if (path.startsWith("/api/memories/") && method === "PUT") {
182
+ const id = path.split("/").pop();
183
+ if (!id) {
184
+ return this.jsonResponse({ success: false, error: "Invalid ID" });
185
+ }
186
+ const body = (await req.json());
187
+ const result = await handleUpdateMemory(id, body);
188
+ return this.jsonResponse(result);
189
+ }
190
+ if (path === "/api/memories/bulk-delete" && method === "POST") {
191
+ const body = (await req.json());
192
+ const cascade = body.cascade !== false;
193
+ const result = await handleBulkDelete(body.ids || [], cascade);
194
+ return this.jsonResponse(result);
195
+ }
196
+ if (path === "/api/search" && method === "GET") {
197
+ const query = url.searchParams.get("q");
198
+ const tag = url.searchParams.get("tag") || undefined;
199
+ const page = parseInt(url.searchParams.get("page") || "1");
200
+ const pageSize = parseInt(url.searchParams.get("pageSize") || "20");
201
+ if (!query) {
202
+ return this.jsonResponse({ success: false, error: "query parameter required" });
203
+ }
204
+ const result = await handleSearch(query, tag, page, pageSize);
205
+ return this.jsonResponse(result);
206
+ }
207
+ if (path === "/api/stats" && method === "GET") {
208
+ const result = await handleStats();
209
+ return this.jsonResponse(result);
210
+ }
211
+ if (path.match(/^\/api\/memories\/[^/]+\/pin$/) && method === "POST") {
212
+ const id = path.split("/")[3];
213
+ if (!id) {
214
+ return this.jsonResponse({ success: false, error: "Invalid ID" });
215
+ }
216
+ const result = await handlePinMemory(id);
217
+ return this.jsonResponse(result);
218
+ }
219
+ if (path.match(/^\/api\/memories\/[^/]+\/unpin$/) && method === "POST") {
220
+ const id = path.split("/")[3];
221
+ if (!id) {
222
+ return this.jsonResponse({ success: false, error: "Invalid ID" });
223
+ }
224
+ const result = await handleUnpinMemory(id);
225
+ return this.jsonResponse(result);
226
+ }
227
+ if (path === "/api/cleanup" && method === "POST") {
228
+ const result = await handleRunCleanup();
229
+ return this.jsonResponse(result);
230
+ }
231
+ if (path === "/api/deduplicate" && method === "POST") {
232
+ const result = await handleRunDeduplication();
233
+ return this.jsonResponse(result);
234
+ }
235
+ if (path === "/api/migration/detect" && method === "GET") {
236
+ const result = await handleDetectMigration();
237
+ return this.jsonResponse(result);
238
+ }
239
+ if (path === "/api/migration/tags/detect" && method === "GET") {
240
+ const result = await handleDetectTagMigration();
241
+ return this.jsonResponse(result);
242
+ }
243
+ if (path === "/api/migration/tags/run-batch" && method === "POST") {
244
+ const body = (await req.json());
245
+ const batchSize = body?.batchSize || 5;
246
+ const result = await handleRunTagMigrationBatch(batchSize);
247
+ return this.jsonResponse(result);
248
+ }
249
+ if (path === "/api/migration/tags/progress" && method === "GET") {
250
+ const result = await handleGetTagMigrationProgress();
251
+ return this.jsonResponse(result);
252
+ }
253
+ if (path === "/api/migration/run" && method === "POST") {
254
+ const body = (await req.json());
255
+ const strategy = body.strategy || "fresh-start";
256
+ if (strategy !== "fresh-start" && strategy !== "re-embed") {
257
+ return this.jsonResponse({ success: false, error: "Invalid strategy" });
258
+ }
259
+ const result = await handleRunMigration(strategy);
260
+ return this.jsonResponse(result);
261
+ }
262
+ if (path.startsWith("/api/prompts/") && method === "DELETE") {
263
+ const parts = path.split("/");
264
+ const id = parts[3];
265
+ if (!id || id === "bulk-delete") {
266
+ return this.jsonResponse({ success: false, error: "Invalid ID" });
267
+ }
268
+ const cascade = url.searchParams.get("cascade") === "true";
269
+ const result = await handleDeletePrompt(id, cascade);
270
+ return this.jsonResponse(result);
271
+ }
272
+ if (path === "/api/prompts/bulk-delete" && method === "POST") {
273
+ const body = (await req.json());
274
+ const cascade = body.cascade !== false;
275
+ const result = await handleBulkDeletePrompts(body.ids || [], cascade);
276
+ return this.jsonResponse(result);
277
+ }
278
+ if (path === "/api/user-profile" && method === "GET") {
279
+ const userId = url.searchParams.get("userId") || undefined;
280
+ const result = await handleGetUserProfile(userId);
281
+ return this.jsonResponse(result);
282
+ }
283
+ if (path === "/api/user-profile/changelog" && method === "GET") {
284
+ const profileId = url.searchParams.get("profileId");
285
+ const limit = parseInt(url.searchParams.get("limit") || "5");
286
+ if (!profileId) {
287
+ return this.jsonResponse({ success: false, error: "profileId parameter required" });
288
+ }
289
+ const result = await handleGetProfileChangelog(profileId, limit);
290
+ return this.jsonResponse(result);
291
+ }
292
+ if (path === "/api/user-profile/snapshot" && method === "GET") {
293
+ const changelogId = url.searchParams.get("chlogId");
294
+ if (!changelogId) {
295
+ return this.jsonResponse({ success: false, error: "changelogId parameter required" });
296
+ }
297
+ const result = await handleGetProfileSnapshot(changelogId);
298
+ return this.jsonResponse(result);
299
+ }
300
+ if (path === "/api/user-profile/refresh" && method === "POST") {
301
+ const body = (await req.json().catch(() => ({})));
302
+ const userId = body.userId || undefined;
303
+ const result = await handleRefreshProfile(userId);
304
+ return this.jsonResponse(result);
305
+ }
306
+ return new Response("Not Found", { status: 404 });
307
+ }
308
+ catch (error) {
309
+ return this.jsonResponse({
310
+ success: false,
311
+ error: String(error),
312
+ }, 500);
313
+ }
314
+ }
315
+ serveStaticFile(filename, contentType) {
316
+ try {
317
+ const webDir = join(__dirname, "..", "web");
318
+ const filePath = join(webDir, filename);
319
+ if (contentType.startsWith("image/")) {
320
+ const content = readFileSync(filePath);
321
+ return new Response(content, {
322
+ headers: {
323
+ "Content-Type": contentType,
324
+ "Cache-Control": "public, max-age=86400",
325
+ },
326
+ });
327
+ }
328
+ const content = readFileSync(filePath, "utf-8");
329
+ return new Response(content, {
330
+ headers: {
331
+ "Content-Type": contentType,
332
+ "Cache-Control": "no-cache",
333
+ },
334
+ });
335
+ }
336
+ catch (error) {
337
+ return new Response("File not found", { status: 404 });
338
+ }
339
+ }
340
+ jsonResponse(data, status = 200) {
341
+ return new Response(JSON.stringify(data), {
342
+ status,
343
+ headers: {
344
+ "Content-Type": "application/json",
345
+ "Access-Control-Allow-Origin": "*",
346
+ "Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, OPTIONS",
347
+ "Access-Control-Allow-Headers": "Content-Type",
348
+ },
349
+ });
350
+ }
351
+ }
352
+ export async function startWebServer(config) {
353
+ const server = new WebServer(config);
354
+ await server.start();
355
+ return server;
356
+ }
@@ -0,0 +1,19 @@
1
+ export type MemoryType = string;
2
+ export interface MemoryMetadata {
3
+ type?: MemoryType;
4
+ source?: "manual" | "auto-capture" | "import" | "api";
5
+ tool?: string;
6
+ sessionID?: string;
7
+ reasoning?: string;
8
+ captureTimestamp?: number;
9
+ promptId?: string;
10
+ displayName?: string;
11
+ userName?: string;
12
+ userEmail?: string;
13
+ projectPath?: string;
14
+ projectName?: string;
15
+ gitRepoUrl?: string;
16
+ [key: string]: unknown;
17
+ }
18
+ export type AIProviderType = "openai-chat" | "openai-responses" | "anthropic";
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAEhC,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,MAAM,CAAC,EAAE,QAAQ,GAAG,cAAc,GAAG,QAAQ,GAAG,KAAK,CAAC;IACtD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG,kBAAkB,GAAG,WAAW,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=app.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/web/app.js"],"names":[],"mappings":""}