@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.
- 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 +1 -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 +72 -0
- package/prds/API-REFERENCE.md +935 -0
- package/prds/README.md +988 -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,278 @@
|
|
|
1
|
+
export declare const memoryTypeValidator: import("convex/values").VUnion<"instruction" | "learning" | "reference" | "feedback" | "journal", [import("convex/values").VLiteral<"instruction", "required">, import("convex/values").VLiteral<"learning", "required">, import("convex/values").VLiteral<"reference", "required">, import("convex/values").VLiteral<"feedback", "required">, import("convex/values").VLiteral<"journal", "required">], "required", never>;
|
|
2
|
+
export declare const scopeValidator: import("convex/values").VUnion<"project" | "user" | "org", [import("convex/values").VLiteral<"project", "required">, import("convex/values").VLiteral<"user", "required">, import("convex/values").VLiteral<"org", "required">], "required", never>;
|
|
3
|
+
export declare const syncDirectionValidator: import("convex/values").VUnion<"push" | "pull", [import("convex/values").VLiteral<"push", "required">, import("convex/values").VLiteral<"pull", "required">], "required", never>;
|
|
4
|
+
export declare const historyEventValidator: import("convex/values").VUnion<"created" | "updated" | "archived" | "restored" | "merged", [import("convex/values").VLiteral<"created", "required">, import("convex/values").VLiteral<"updated", "required">, import("convex/values").VLiteral<"archived", "required">, import("convex/values").VLiteral<"restored", "required">, import("convex/values").VLiteral<"merged", "required">], "required", never>;
|
|
5
|
+
export declare const feedbackSentimentValidator: import("convex/values").VUnion<"positive" | "negative" | "very_negative", [import("convex/values").VLiteral<"positive", "required">, import("convex/values").VLiteral<"negative", "required">, import("convex/values").VLiteral<"very_negative", "required">], "required", never>;
|
|
6
|
+
export declare const ingestEventValidator: import("convex/values").VUnion<"updated" | "added" | "deleted" | "skipped", [import("convex/values").VLiteral<"added", "required">, import("convex/values").VLiteral<"updated", "required">, import("convex/values").VLiteral<"deleted", "required">, import("convex/values").VLiteral<"skipped", "required">], "required", never>;
|
|
7
|
+
declare const _default: import("convex/server").SchemaDefinition<{
|
|
8
|
+
memories: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
9
|
+
userId?: string | undefined;
|
|
10
|
+
agentId?: string | undefined;
|
|
11
|
+
sessionId?: string | undefined;
|
|
12
|
+
paths?: string[] | undefined;
|
|
13
|
+
priority?: number | undefined;
|
|
14
|
+
source?: string | undefined;
|
|
15
|
+
lastSyncedAt?: number | undefined;
|
|
16
|
+
embeddingId?: import("convex/values").GenericId<"embeddings"> | undefined;
|
|
17
|
+
accessCount?: number | undefined;
|
|
18
|
+
lastAccessedAt?: number | undefined;
|
|
19
|
+
positiveCount?: number | undefined;
|
|
20
|
+
negativeCount?: number | undefined;
|
|
21
|
+
archived: boolean;
|
|
22
|
+
scope: "project" | "user" | "org";
|
|
23
|
+
memoryType: "instruction" | "learning" | "reference" | "feedback" | "journal";
|
|
24
|
+
projectId: string;
|
|
25
|
+
title: string;
|
|
26
|
+
content: string;
|
|
27
|
+
tags: string[];
|
|
28
|
+
checksum: string;
|
|
29
|
+
}, {
|
|
30
|
+
projectId: import("convex/values").VString<string, "required">;
|
|
31
|
+
scope: import("convex/values").VUnion<"project" | "user" | "org", [import("convex/values").VLiteral<"project", "required">, import("convex/values").VLiteral<"user", "required">, import("convex/values").VLiteral<"org", "required">], "required", never>;
|
|
32
|
+
userId: import("convex/values").VString<string | undefined, "optional">;
|
|
33
|
+
agentId: import("convex/values").VString<string | undefined, "optional">;
|
|
34
|
+
sessionId: import("convex/values").VString<string | undefined, "optional">;
|
|
35
|
+
title: import("convex/values").VString<string, "required">;
|
|
36
|
+
content: import("convex/values").VString<string, "required">;
|
|
37
|
+
memoryType: import("convex/values").VUnion<"instruction" | "learning" | "reference" | "feedback" | "journal", [import("convex/values").VLiteral<"instruction", "required">, import("convex/values").VLiteral<"learning", "required">, import("convex/values").VLiteral<"reference", "required">, import("convex/values").VLiteral<"feedback", "required">, import("convex/values").VLiteral<"journal", "required">], "required", never>;
|
|
38
|
+
tags: import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">;
|
|
39
|
+
paths: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
|
|
40
|
+
priority: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
41
|
+
source: import("convex/values").VString<string | undefined, "optional">;
|
|
42
|
+
lastSyncedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
43
|
+
checksum: import("convex/values").VString<string, "required">;
|
|
44
|
+
archived: import("convex/values").VBoolean<boolean, "required">;
|
|
45
|
+
embeddingId: import("convex/values").VId<import("convex/values").GenericId<"embeddings"> | undefined, "optional">;
|
|
46
|
+
accessCount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
47
|
+
lastAccessedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
48
|
+
positiveCount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
49
|
+
negativeCount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
50
|
+
}, "required", "archived" | "scope" | "memoryType" | "projectId" | "userId" | "agentId" | "sessionId" | "title" | "content" | "tags" | "paths" | "priority" | "source" | "lastSyncedAt" | "checksum" | "embeddingId" | "accessCount" | "lastAccessedAt" | "positiveCount" | "negativeCount">, {
|
|
51
|
+
by_project: ["projectId", "archived", "memoryType", "_creationTime"];
|
|
52
|
+
by_project_scope: ["projectId", "scope", "userId", "archived", "_creationTime"];
|
|
53
|
+
by_project_title: ["projectId", "title", "_creationTime"];
|
|
54
|
+
by_type_priority: ["projectId", "memoryType", "priority", "_creationTime"];
|
|
55
|
+
by_agent: ["projectId", "agentId", "archived", "_creationTime"];
|
|
56
|
+
by_session: ["projectId", "sessionId", "archived", "_creationTime"];
|
|
57
|
+
by_source: ["projectId", "source", "archived", "_creationTime"];
|
|
58
|
+
by_last_accessed: ["projectId", "lastAccessedAt", "_creationTime"];
|
|
59
|
+
}, {
|
|
60
|
+
search_content: {
|
|
61
|
+
searchField: "content";
|
|
62
|
+
filterFields: "archived" | "scope" | "memoryType" | "projectId";
|
|
63
|
+
};
|
|
64
|
+
search_title: {
|
|
65
|
+
searchField: "title";
|
|
66
|
+
filterFields: "memoryType" | "projectId";
|
|
67
|
+
};
|
|
68
|
+
}, {}>;
|
|
69
|
+
embeddings: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
70
|
+
memoryId: import("convex/values").GenericId<"memories">;
|
|
71
|
+
embedding: number[];
|
|
72
|
+
model: string;
|
|
73
|
+
dimensions: number;
|
|
74
|
+
}, {
|
|
75
|
+
memoryId: import("convex/values").VId<import("convex/values").GenericId<"memories">, "required">;
|
|
76
|
+
embedding: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
|
|
77
|
+
model: import("convex/values").VString<string, "required">;
|
|
78
|
+
dimensions: import("convex/values").VFloat64<number, "required">;
|
|
79
|
+
}, "required", "memoryId" | "embedding" | "model" | "dimensions">, {
|
|
80
|
+
by_memory: ["memoryId", "_creationTime"];
|
|
81
|
+
}, {}, {
|
|
82
|
+
by_embedding: {
|
|
83
|
+
vectorField: "embedding";
|
|
84
|
+
dimensions: number;
|
|
85
|
+
filterFields: never;
|
|
86
|
+
};
|
|
87
|
+
}>;
|
|
88
|
+
projects: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
89
|
+
description?: string | undefined;
|
|
90
|
+
projectId: string;
|
|
91
|
+
name: string;
|
|
92
|
+
settings: {
|
|
93
|
+
embeddingModel?: string | undefined;
|
|
94
|
+
embeddingDimensions?: number | undefined;
|
|
95
|
+
factExtractionPrompt?: string | undefined;
|
|
96
|
+
updateDecisionPrompt?: string | undefined;
|
|
97
|
+
decayEnabled?: boolean | undefined;
|
|
98
|
+
decayHalfLifeDays?: number | undefined;
|
|
99
|
+
apiRateLimit?: {
|
|
100
|
+
requestsPerWindow: number;
|
|
101
|
+
windowMs: number;
|
|
102
|
+
} | undefined;
|
|
103
|
+
autoSync: boolean;
|
|
104
|
+
syncFormats: string[];
|
|
105
|
+
};
|
|
106
|
+
}, {
|
|
107
|
+
projectId: import("convex/values").VString<string, "required">;
|
|
108
|
+
name: import("convex/values").VString<string, "required">;
|
|
109
|
+
description: import("convex/values").VString<string | undefined, "optional">;
|
|
110
|
+
settings: import("convex/values").VObject<{
|
|
111
|
+
embeddingModel?: string | undefined;
|
|
112
|
+
embeddingDimensions?: number | undefined;
|
|
113
|
+
factExtractionPrompt?: string | undefined;
|
|
114
|
+
updateDecisionPrompt?: string | undefined;
|
|
115
|
+
decayEnabled?: boolean | undefined;
|
|
116
|
+
decayHalfLifeDays?: number | undefined;
|
|
117
|
+
apiRateLimit?: {
|
|
118
|
+
requestsPerWindow: number;
|
|
119
|
+
windowMs: number;
|
|
120
|
+
} | undefined;
|
|
121
|
+
autoSync: boolean;
|
|
122
|
+
syncFormats: string[];
|
|
123
|
+
}, {
|
|
124
|
+
autoSync: import("convex/values").VBoolean<boolean, "required">;
|
|
125
|
+
syncFormats: import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">;
|
|
126
|
+
embeddingModel: import("convex/values").VString<string | undefined, "optional">;
|
|
127
|
+
embeddingDimensions: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
128
|
+
factExtractionPrompt: import("convex/values").VString<string | undefined, "optional">;
|
|
129
|
+
updateDecisionPrompt: import("convex/values").VString<string | undefined, "optional">;
|
|
130
|
+
decayEnabled: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
131
|
+
decayHalfLifeDays: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
132
|
+
apiRateLimit: import("convex/values").VObject<{
|
|
133
|
+
requestsPerWindow: number;
|
|
134
|
+
windowMs: number;
|
|
135
|
+
} | undefined, {
|
|
136
|
+
requestsPerWindow: import("convex/values").VFloat64<number, "required">;
|
|
137
|
+
windowMs: import("convex/values").VFloat64<number, "required">;
|
|
138
|
+
}, "optional", "requestsPerWindow" | "windowMs">;
|
|
139
|
+
}, "required", "autoSync" | "syncFormats" | "embeddingModel" | "embeddingDimensions" | "factExtractionPrompt" | "updateDecisionPrompt" | "decayEnabled" | "decayHalfLifeDays" | "apiRateLimit" | "apiRateLimit.requestsPerWindow" | "apiRateLimit.windowMs">;
|
|
140
|
+
}, "required", "projectId" | "name" | "description" | "settings" | "settings.autoSync" | "settings.syncFormats" | "settings.embeddingModel" | "settings.embeddingDimensions" | "settings.factExtractionPrompt" | "settings.updateDecisionPrompt" | "settings.decayEnabled" | "settings.decayHalfLifeDays" | "settings.apiRateLimit" | "settings.apiRateLimit.requestsPerWindow" | "settings.apiRateLimit.windowMs">, {
|
|
141
|
+
by_projectId: ["projectId", "_creationTime"];
|
|
142
|
+
}, {}, {}>;
|
|
143
|
+
syncLog: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
144
|
+
userId?: string | undefined;
|
|
145
|
+
projectId: string;
|
|
146
|
+
checksum: string;
|
|
147
|
+
memoryId: import("convex/values").GenericId<"memories">;
|
|
148
|
+
direction: "push" | "pull";
|
|
149
|
+
targetFormat: string;
|
|
150
|
+
targetPath: string;
|
|
151
|
+
syncedAt: number;
|
|
152
|
+
}, {
|
|
153
|
+
projectId: import("convex/values").VString<string, "required">;
|
|
154
|
+
userId: import("convex/values").VString<string | undefined, "optional">;
|
|
155
|
+
memoryId: import("convex/values").VId<import("convex/values").GenericId<"memories">, "required">;
|
|
156
|
+
targetFormat: import("convex/values").VString<string, "required">;
|
|
157
|
+
targetPath: import("convex/values").VString<string, "required">;
|
|
158
|
+
syncedAt: import("convex/values").VFloat64<number, "required">;
|
|
159
|
+
checksum: import("convex/values").VString<string, "required">;
|
|
160
|
+
direction: import("convex/values").VUnion<"push" | "pull", [import("convex/values").VLiteral<"push", "required">, import("convex/values").VLiteral<"pull", "required">], "required", never>;
|
|
161
|
+
}, "required", "projectId" | "userId" | "checksum" | "memoryId" | "direction" | "targetFormat" | "targetPath" | "syncedAt">, {
|
|
162
|
+
by_project_user: ["projectId", "userId", "syncedAt", "_creationTime"];
|
|
163
|
+
}, {}, {}>;
|
|
164
|
+
memoryHistory: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
165
|
+
previousContent?: string | undefined;
|
|
166
|
+
newContent?: string | undefined;
|
|
167
|
+
previousTitle?: string | undefined;
|
|
168
|
+
newTitle?: string | undefined;
|
|
169
|
+
projectId: string;
|
|
170
|
+
memoryId: import("convex/values").GenericId<"memories">;
|
|
171
|
+
event: "created" | "updated" | "archived" | "restored" | "merged";
|
|
172
|
+
actor: string;
|
|
173
|
+
timestamp: number;
|
|
174
|
+
}, {
|
|
175
|
+
memoryId: import("convex/values").VId<import("convex/values").GenericId<"memories">, "required">;
|
|
176
|
+
projectId: import("convex/values").VString<string, "required">;
|
|
177
|
+
previousContent: import("convex/values").VString<string | undefined, "optional">;
|
|
178
|
+
newContent: import("convex/values").VString<string | undefined, "optional">;
|
|
179
|
+
previousTitle: import("convex/values").VString<string | undefined, "optional">;
|
|
180
|
+
newTitle: import("convex/values").VString<string | undefined, "optional">;
|
|
181
|
+
event: import("convex/values").VUnion<"created" | "updated" | "archived" | "restored" | "merged", [import("convex/values").VLiteral<"created", "required">, import("convex/values").VLiteral<"updated", "required">, import("convex/values").VLiteral<"archived", "required">, import("convex/values").VLiteral<"restored", "required">, import("convex/values").VLiteral<"merged", "required">], "required", never>;
|
|
182
|
+
actor: import("convex/values").VString<string, "required">;
|
|
183
|
+
timestamp: import("convex/values").VFloat64<number, "required">;
|
|
184
|
+
}, "required", "projectId" | "memoryId" | "event" | "previousContent" | "newContent" | "previousTitle" | "newTitle" | "actor" | "timestamp">, {
|
|
185
|
+
by_memory: ["memoryId", "timestamp", "_creationTime"];
|
|
186
|
+
by_project: ["projectId", "timestamp", "_creationTime"];
|
|
187
|
+
}, {}, {}>;
|
|
188
|
+
memoryFeedback: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
189
|
+
comment?: string | undefined;
|
|
190
|
+
projectId: string;
|
|
191
|
+
memoryId: import("convex/values").GenericId<"memories">;
|
|
192
|
+
actor: string;
|
|
193
|
+
timestamp: number;
|
|
194
|
+
sentiment: "positive" | "negative" | "very_negative";
|
|
195
|
+
}, {
|
|
196
|
+
memoryId: import("convex/values").VId<import("convex/values").GenericId<"memories">, "required">;
|
|
197
|
+
projectId: import("convex/values").VString<string, "required">;
|
|
198
|
+
sentiment: import("convex/values").VUnion<"positive" | "negative" | "very_negative", [import("convex/values").VLiteral<"positive", "required">, import("convex/values").VLiteral<"negative", "required">, import("convex/values").VLiteral<"very_negative", "required">], "required", never>;
|
|
199
|
+
comment: import("convex/values").VString<string | undefined, "optional">;
|
|
200
|
+
actor: import("convex/values").VString<string, "required">;
|
|
201
|
+
timestamp: import("convex/values").VFloat64<number, "required">;
|
|
202
|
+
}, "required", "projectId" | "memoryId" | "actor" | "timestamp" | "sentiment" | "comment">, {
|
|
203
|
+
by_memory: ["memoryId", "timestamp", "_creationTime"];
|
|
204
|
+
by_project: ["projectId", "timestamp", "_creationTime"];
|
|
205
|
+
}, {}, {}>;
|
|
206
|
+
memoryRelations: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
207
|
+
metadata?: {
|
|
208
|
+
confidence?: number | undefined;
|
|
209
|
+
createdBy?: string | undefined;
|
|
210
|
+
} | undefined;
|
|
211
|
+
projectId: string;
|
|
212
|
+
timestamp: number;
|
|
213
|
+
fromMemoryId: import("convex/values").GenericId<"memories">;
|
|
214
|
+
toMemoryId: import("convex/values").GenericId<"memories">;
|
|
215
|
+
relationship: string;
|
|
216
|
+
}, {
|
|
217
|
+
projectId: import("convex/values").VString<string, "required">;
|
|
218
|
+
fromMemoryId: import("convex/values").VId<import("convex/values").GenericId<"memories">, "required">;
|
|
219
|
+
toMemoryId: import("convex/values").VId<import("convex/values").GenericId<"memories">, "required">;
|
|
220
|
+
relationship: import("convex/values").VString<string, "required">;
|
|
221
|
+
metadata: import("convex/values").VObject<{
|
|
222
|
+
confidence?: number | undefined;
|
|
223
|
+
createdBy?: string | undefined;
|
|
224
|
+
} | undefined, {
|
|
225
|
+
confidence: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
226
|
+
createdBy: import("convex/values").VString<string | undefined, "optional">;
|
|
227
|
+
}, "optional", "confidence" | "createdBy">;
|
|
228
|
+
timestamp: import("convex/values").VFloat64<number, "required">;
|
|
229
|
+
}, "required", "projectId" | "timestamp" | "fromMemoryId" | "toMemoryId" | "relationship" | "metadata" | "metadata.confidence" | "metadata.createdBy">, {
|
|
230
|
+
by_from: ["fromMemoryId", "relationship", "_creationTime"];
|
|
231
|
+
by_to: ["toMemoryId", "relationship", "_creationTime"];
|
|
232
|
+
by_project: ["projectId", "relationship", "_creationTime"];
|
|
233
|
+
}, {}, {}>;
|
|
234
|
+
apiKeys: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
235
|
+
rateLimitOverride?: {
|
|
236
|
+
requestsPerWindow: number;
|
|
237
|
+
windowMs: number;
|
|
238
|
+
} | undefined;
|
|
239
|
+
lastUsedAt?: number | undefined;
|
|
240
|
+
expiresAt?: number | undefined;
|
|
241
|
+
projectId: string;
|
|
242
|
+
name: string;
|
|
243
|
+
keyHash: string;
|
|
244
|
+
permissions: string[];
|
|
245
|
+
revoked: boolean;
|
|
246
|
+
}, {
|
|
247
|
+
keyHash: import("convex/values").VString<string, "required">;
|
|
248
|
+
projectId: import("convex/values").VString<string, "required">;
|
|
249
|
+
name: import("convex/values").VString<string, "required">;
|
|
250
|
+
permissions: import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">;
|
|
251
|
+
rateLimitOverride: import("convex/values").VObject<{
|
|
252
|
+
requestsPerWindow: number;
|
|
253
|
+
windowMs: number;
|
|
254
|
+
} | undefined, {
|
|
255
|
+
requestsPerWindow: import("convex/values").VFloat64<number, "required">;
|
|
256
|
+
windowMs: import("convex/values").VFloat64<number, "required">;
|
|
257
|
+
}, "optional", "requestsPerWindow" | "windowMs">;
|
|
258
|
+
lastUsedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
259
|
+
expiresAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
260
|
+
revoked: import("convex/values").VBoolean<boolean, "required">;
|
|
261
|
+
}, "required", "projectId" | "name" | "keyHash" | "permissions" | "rateLimitOverride" | "lastUsedAt" | "expiresAt" | "revoked" | "rateLimitOverride.requestsPerWindow" | "rateLimitOverride.windowMs">, {
|
|
262
|
+
by_key: ["keyHash", "_creationTime"];
|
|
263
|
+
by_project: ["projectId", "revoked", "_creationTime"];
|
|
264
|
+
}, {}, {}>;
|
|
265
|
+
rateLimitTokens: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
266
|
+
keyHash: string;
|
|
267
|
+
windowStart: number;
|
|
268
|
+
tokenCount: number;
|
|
269
|
+
}, {
|
|
270
|
+
keyHash: import("convex/values").VString<string, "required">;
|
|
271
|
+
windowStart: import("convex/values").VFloat64<number, "required">;
|
|
272
|
+
tokenCount: import("convex/values").VFloat64<number, "required">;
|
|
273
|
+
}, "required", "keyHash" | "windowStart" | "tokenCount">, {
|
|
274
|
+
by_key_window: ["keyHash", "windowStart", "_creationTime"];
|
|
275
|
+
}, {}, {}>;
|
|
276
|
+
}, true>;
|
|
277
|
+
export default _default;
|
|
278
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/component/schema.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,mBAAmB,6ZAM/B,CAAC;AAEF,eAAO,MAAM,cAAc,qPAI1B,CAAC;AAEF,eAAO,MAAM,sBAAsB,kLAGlC,CAAC;AAEF,eAAO,MAAM,qBAAqB,+YAMjC,CAAC;AAEF,eAAO,MAAM,0BAA0B,mRAItC,CAAC;AAEF,eAAO,MAAM,oBAAoB,oUAKhC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEF,wBAmKG"}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { defineSchema, defineTable } from "convex/server";
|
|
2
|
+
import { v } from "convex/values";
|
|
3
|
+
export const memoryTypeValidator = v.union(v.literal("instruction"), v.literal("learning"), v.literal("reference"), v.literal("feedback"), v.literal("journal"));
|
|
4
|
+
export const scopeValidator = v.union(v.literal("project"), v.literal("user"), v.literal("org"));
|
|
5
|
+
export const syncDirectionValidator = v.union(v.literal("push"), v.literal("pull"));
|
|
6
|
+
export const historyEventValidator = v.union(v.literal("created"), v.literal("updated"), v.literal("archived"), v.literal("restored"), v.literal("merged"));
|
|
7
|
+
export const feedbackSentimentValidator = v.union(v.literal("positive"), v.literal("negative"), v.literal("very_negative"));
|
|
8
|
+
export const ingestEventValidator = v.union(v.literal("added"), v.literal("updated"), v.literal("deleted"), v.literal("skipped"));
|
|
9
|
+
export default defineSchema({
|
|
10
|
+
// Core memory documents — each row is one markdown memory
|
|
11
|
+
memories: defineTable({
|
|
12
|
+
projectId: v.string(),
|
|
13
|
+
scope: scopeValidator,
|
|
14
|
+
userId: v.optional(v.string()),
|
|
15
|
+
agentId: v.optional(v.string()),
|
|
16
|
+
sessionId: v.optional(v.string()),
|
|
17
|
+
title: v.string(),
|
|
18
|
+
content: v.string(),
|
|
19
|
+
memoryType: memoryTypeValidator,
|
|
20
|
+
tags: v.array(v.string()),
|
|
21
|
+
paths: v.optional(v.array(v.string())),
|
|
22
|
+
priority: v.optional(v.float64()),
|
|
23
|
+
source: v.optional(v.string()),
|
|
24
|
+
lastSyncedAt: v.optional(v.float64()),
|
|
25
|
+
checksum: v.string(),
|
|
26
|
+
archived: v.boolean(),
|
|
27
|
+
embeddingId: v.optional(v.id("embeddings")),
|
|
28
|
+
// Access tracking for relevance decay
|
|
29
|
+
accessCount: v.optional(v.float64()),
|
|
30
|
+
lastAccessedAt: v.optional(v.float64()),
|
|
31
|
+
// Feedback aggregation
|
|
32
|
+
positiveCount: v.optional(v.float64()),
|
|
33
|
+
negativeCount: v.optional(v.float64()),
|
|
34
|
+
})
|
|
35
|
+
.index("by_project", ["projectId", "archived", "memoryType"])
|
|
36
|
+
.index("by_project_scope", ["projectId", "scope", "userId", "archived"])
|
|
37
|
+
.index("by_project_title", ["projectId", "title"])
|
|
38
|
+
.index("by_type_priority", ["projectId", "memoryType", "priority"])
|
|
39
|
+
.index("by_agent", ["projectId", "agentId", "archived"])
|
|
40
|
+
.index("by_session", ["projectId", "sessionId", "archived"])
|
|
41
|
+
.index("by_source", ["projectId", "source", "archived"])
|
|
42
|
+
.index("by_last_accessed", ["projectId", "lastAccessedAt"])
|
|
43
|
+
.searchIndex("search_content", {
|
|
44
|
+
searchField: "content",
|
|
45
|
+
filterFields: ["projectId", "memoryType", "scope", "archived"],
|
|
46
|
+
})
|
|
47
|
+
.searchIndex("search_title", {
|
|
48
|
+
searchField: "title",
|
|
49
|
+
filterFields: ["projectId", "memoryType"],
|
|
50
|
+
}),
|
|
51
|
+
// Vector embeddings for semantic search
|
|
52
|
+
embeddings: defineTable({
|
|
53
|
+
memoryId: v.id("memories"),
|
|
54
|
+
embedding: v.array(v.float64()),
|
|
55
|
+
model: v.string(),
|
|
56
|
+
dimensions: v.float64(),
|
|
57
|
+
})
|
|
58
|
+
.index("by_memory", ["memoryId"])
|
|
59
|
+
.vectorIndex("by_embedding", {
|
|
60
|
+
vectorField: "embedding",
|
|
61
|
+
dimensions: 1536,
|
|
62
|
+
filterFields: [],
|
|
63
|
+
}),
|
|
64
|
+
// Project registry
|
|
65
|
+
projects: defineTable({
|
|
66
|
+
projectId: v.string(),
|
|
67
|
+
name: v.string(),
|
|
68
|
+
description: v.optional(v.string()),
|
|
69
|
+
settings: v.object({
|
|
70
|
+
autoSync: v.boolean(),
|
|
71
|
+
syncFormats: v.array(v.string()),
|
|
72
|
+
embeddingModel: v.optional(v.string()),
|
|
73
|
+
embeddingDimensions: v.optional(v.float64()),
|
|
74
|
+
// Custom prompts for intelligent ingest
|
|
75
|
+
factExtractionPrompt: v.optional(v.string()),
|
|
76
|
+
updateDecisionPrompt: v.optional(v.string()),
|
|
77
|
+
// Relevance decay settings
|
|
78
|
+
decayEnabled: v.optional(v.boolean()),
|
|
79
|
+
decayHalfLifeDays: v.optional(v.float64()),
|
|
80
|
+
// Read-only API rate limiting
|
|
81
|
+
apiRateLimit: v.optional(v.object({
|
|
82
|
+
requestsPerWindow: v.float64(),
|
|
83
|
+
windowMs: v.float64(),
|
|
84
|
+
})),
|
|
85
|
+
}),
|
|
86
|
+
}).index("by_projectId", ["projectId"]),
|
|
87
|
+
// Sync log — tracks push/pull sync events
|
|
88
|
+
syncLog: defineTable({
|
|
89
|
+
projectId: v.string(),
|
|
90
|
+
userId: v.optional(v.string()),
|
|
91
|
+
memoryId: v.id("memories"),
|
|
92
|
+
targetFormat: v.string(),
|
|
93
|
+
targetPath: v.string(),
|
|
94
|
+
syncedAt: v.float64(),
|
|
95
|
+
checksum: v.string(),
|
|
96
|
+
direction: syncDirectionValidator,
|
|
97
|
+
}).index("by_project_user", ["projectId", "userId", "syncedAt"]),
|
|
98
|
+
// Memory history — audit trail of all changes
|
|
99
|
+
memoryHistory: defineTable({
|
|
100
|
+
memoryId: v.id("memories"),
|
|
101
|
+
projectId: v.string(),
|
|
102
|
+
previousContent: v.optional(v.string()),
|
|
103
|
+
newContent: v.optional(v.string()),
|
|
104
|
+
previousTitle: v.optional(v.string()),
|
|
105
|
+
newTitle: v.optional(v.string()),
|
|
106
|
+
event: historyEventValidator,
|
|
107
|
+
actor: v.string(), // userId, agentId, "mcp", "cli", "system", "ingest"
|
|
108
|
+
timestamp: v.float64(),
|
|
109
|
+
})
|
|
110
|
+
.index("by_memory", ["memoryId", "timestamp"])
|
|
111
|
+
.index("by_project", ["projectId", "timestamp"]),
|
|
112
|
+
// Memory feedback — quality signals from agents/users
|
|
113
|
+
memoryFeedback: defineTable({
|
|
114
|
+
memoryId: v.id("memories"),
|
|
115
|
+
projectId: v.string(),
|
|
116
|
+
sentiment: feedbackSentimentValidator,
|
|
117
|
+
comment: v.optional(v.string()),
|
|
118
|
+
actor: v.string(),
|
|
119
|
+
timestamp: v.float64(),
|
|
120
|
+
})
|
|
121
|
+
.index("by_memory", ["memoryId", "timestamp"])
|
|
122
|
+
.index("by_project", ["projectId", "timestamp"]),
|
|
123
|
+
// Memory relations — graph connections between memories
|
|
124
|
+
memoryRelations: defineTable({
|
|
125
|
+
projectId: v.string(),
|
|
126
|
+
fromMemoryId: v.id("memories"),
|
|
127
|
+
toMemoryId: v.id("memories"),
|
|
128
|
+
relationship: v.string(), // e.g. "contradicts", "extends", "replaces", "related_to"
|
|
129
|
+
metadata: v.optional(v.object({
|
|
130
|
+
confidence: v.optional(v.float64()),
|
|
131
|
+
createdBy: v.optional(v.string()),
|
|
132
|
+
})),
|
|
133
|
+
timestamp: v.float64(),
|
|
134
|
+
})
|
|
135
|
+
.index("by_from", ["fromMemoryId", "relationship"])
|
|
136
|
+
.index("by_to", ["toMemoryId", "relationship"])
|
|
137
|
+
.index("by_project", ["projectId", "relationship"]),
|
|
138
|
+
// API keys — for read-only HTTP API access
|
|
139
|
+
apiKeys: defineTable({
|
|
140
|
+
keyHash: v.string(), // SHA-256 hash of the plaintext key
|
|
141
|
+
projectId: v.string(),
|
|
142
|
+
name: v.string(), // human-readable label
|
|
143
|
+
permissions: v.array(v.string()), // allowed endpoints: "list", "get", "search", "context", "export", "history", "relations"
|
|
144
|
+
rateLimitOverride: v.optional(v.object({
|
|
145
|
+
requestsPerWindow: v.float64(),
|
|
146
|
+
windowMs: v.float64(),
|
|
147
|
+
})),
|
|
148
|
+
lastUsedAt: v.optional(v.float64()),
|
|
149
|
+
expiresAt: v.optional(v.float64()),
|
|
150
|
+
revoked: v.boolean(),
|
|
151
|
+
})
|
|
152
|
+
.index("by_key", ["keyHash"])
|
|
153
|
+
.index("by_project", ["projectId", "revoked"]),
|
|
154
|
+
// Rate limit tracking — fixed-window token counting per API key
|
|
155
|
+
rateLimitTokens: defineTable({
|
|
156
|
+
keyHash: v.string(),
|
|
157
|
+
windowStart: v.float64(),
|
|
158
|
+
tokenCount: v.float64(),
|
|
159
|
+
}).index("by_key_window", ["keyHash", "windowStart"]),
|
|
160
|
+
});
|
|
161
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/component/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAElC,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CACxC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,EACxB,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EACrB,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,EACtB,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EACrB,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,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oCAAoC;QACzD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;QACrB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,uBAAuB;QACzC,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,0FAA0F;QAC5H,iBAAiB,EAAE,CAAC,CAAC,QAAQ,CAC3B,CAAC,CAAC,MAAM,CAAC;YACP,iBAAiB,EAAE,CAAC,CAAC,OAAO,EAAE;YAC9B,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;SACtB,CAAC,CACH;QACD,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;QACnC,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;QAClC,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;KACrB,CAAC;SACC,KAAK,CAAC,QAAQ,EAAE,CAAC,SAAS,CAAC,CAAC;SAC5B,KAAK,CAAC,YAAY,EAAE,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;IAEhD,gEAAgE;IAChE,eAAe,EAAE,WAAW,CAAC;QAC3B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;QACnB,WAAW,EAAE,CAAC,CAAC,OAAO,EAAE;QACxB,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE;KACxB,CAAC,CAAC,KAAK,CAAC,eAAe,EAAE,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;CACtD,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface McpServerConfig {
|
|
2
|
+
convexUrl: string;
|
|
3
|
+
projectId: string;
|
|
4
|
+
readOnly: boolean;
|
|
5
|
+
disabledTools: string[];
|
|
6
|
+
embeddingApiKey?: string;
|
|
7
|
+
llmApiKey?: string;
|
|
8
|
+
llmModel?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function startMcpServer(config: McpServerConfig): Promise<void>;
|
|
11
|
+
//# sourceMappingURL=server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAsB,cAAc,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAioB3E"}
|