convex-agent-knowledge 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 (97) hide show
  1. package/LICENSE +73 -0
  2. package/README.md +156 -0
  3. package/dist/client/chunking.d.ts +7 -0
  4. package/dist/client/chunking.d.ts.map +1 -0
  5. package/dist/client/chunking.js +36 -0
  6. package/dist/client/chunking.js.map +1 -0
  7. package/dist/client/extraction.d.ts +9 -0
  8. package/dist/client/extraction.d.ts.map +1 -0
  9. package/dist/client/extraction.js +88 -0
  10. package/dist/client/extraction.js.map +1 -0
  11. package/dist/client/hash.d.ts +3 -0
  12. package/dist/client/hash.d.ts.map +1 -0
  13. package/dist/client/hash.js +17 -0
  14. package/dist/client/hash.js.map +1 -0
  15. package/dist/client/index.d.ts +99 -0
  16. package/dist/client/index.d.ts.map +1 -0
  17. package/dist/client/index.js +194 -0
  18. package/dist/client/index.js.map +1 -0
  19. package/dist/client/types.d.ts +126 -0
  20. package/dist/client/types.d.ts.map +1 -0
  21. package/dist/client/types.js +2 -0
  22. package/dist/client/types.js.map +1 -0
  23. package/dist/component/_generated/api.d.ts +40 -0
  24. package/dist/component/_generated/api.d.ts.map +1 -0
  25. package/dist/component/_generated/api.js +31 -0
  26. package/dist/component/_generated/api.js.map +1 -0
  27. package/dist/component/_generated/component.d.ts +277 -0
  28. package/dist/component/_generated/component.d.ts.map +1 -0
  29. package/dist/component/_generated/component.js +11 -0
  30. package/dist/component/_generated/component.js.map +1 -0
  31. package/dist/component/_generated/dataModel.d.ts +46 -0
  32. package/dist/component/_generated/dataModel.d.ts.map +1 -0
  33. package/dist/component/_generated/dataModel.js +11 -0
  34. package/dist/component/_generated/dataModel.js.map +1 -0
  35. package/dist/component/_generated/server.d.ts +121 -0
  36. package/dist/component/_generated/server.d.ts.map +1 -0
  37. package/dist/component/_generated/server.js +78 -0
  38. package/dist/component/_generated/server.js.map +1 -0
  39. package/dist/component/actions.d.ts +12 -0
  40. package/dist/component/actions.d.ts.map +1 -0
  41. package/dist/component/actions.js +42 -0
  42. package/dist/component/actions.js.map +1 -0
  43. package/dist/component/convex.config.d.ts +3 -0
  44. package/dist/component/convex.config.d.ts.map +1 -0
  45. package/dist/component/convex.config.js +4 -0
  46. package/dist/component/convex.config.js.map +1 -0
  47. package/dist/component/mutations.d.ts +85 -0
  48. package/dist/component/mutations.d.ts.map +1 -0
  49. package/dist/component/mutations.js +407 -0
  50. package/dist/component/mutations.js.map +1 -0
  51. package/dist/component/queries.d.ts +95 -0
  52. package/dist/component/queries.d.ts.map +1 -0
  53. package/dist/component/queries.js +181 -0
  54. package/dist/component/queries.js.map +1 -0
  55. package/dist/component/schema.d.ts +442 -0
  56. package/dist/component/schema.d.ts.map +1 -0
  57. package/dist/component/schema.js +140 -0
  58. package/dist/component/schema.js.map +1 -0
  59. package/dist/component/validators.d.ts +158 -0
  60. package/dist/component/validators.d.ts.map +1 -0
  61. package/dist/component/validators.js +90 -0
  62. package/dist/component/validators.js.map +1 -0
  63. package/dist/node/index.d.ts +3 -0
  64. package/dist/node/index.d.ts.map +1 -0
  65. package/dist/node/index.js +2 -0
  66. package/dist/node/index.js.map +1 -0
  67. package/dist/node/neo4j.d.ts +5 -0
  68. package/dist/node/neo4j.d.ts.map +1 -0
  69. package/dist/node/neo4j.js +147 -0
  70. package/dist/node/neo4j.js.map +1 -0
  71. package/dist/shared/ranking.d.ts +17 -0
  72. package/dist/shared/ranking.d.ts.map +1 -0
  73. package/dist/shared/ranking.js +44 -0
  74. package/dist/shared/ranking.js.map +1 -0
  75. package/package.json +84 -0
  76. package/src/client/chunking.test.ts +25 -0
  77. package/src/client/chunking.ts +45 -0
  78. package/src/client/extraction.test.ts +15 -0
  79. package/src/client/extraction.ts +108 -0
  80. package/src/client/hash.test.ts +17 -0
  81. package/src/client/hash.ts +17 -0
  82. package/src/client/index.ts +307 -0
  83. package/src/client/types.ts +141 -0
  84. package/src/component/_generated/api.ts +56 -0
  85. package/src/component/_generated/component.ts +310 -0
  86. package/src/component/_generated/dataModel.ts +60 -0
  87. package/src/component/_generated/server.ts +156 -0
  88. package/src/component/actions.ts +47 -0
  89. package/src/component/convex.config.ts +5 -0
  90. package/src/component/mutations.ts +445 -0
  91. package/src/component/queries.ts +202 -0
  92. package/src/component/schema.ts +161 -0
  93. package/src/component/validators.ts +104 -0
  94. package/src/node/index.ts +2 -0
  95. package/src/node/neo4j.ts +210 -0
  96. package/src/shared/ranking.test.ts +30 -0
  97. package/src/shared/ranking.ts +64 -0
@@ -0,0 +1,181 @@
1
+ // @ts-nocheck
2
+ import { v } from "convex/values";
3
+ import { internalQuery, query } from "./_generated/server.js";
4
+ import { memoryCardValidator, vectorTableForDimension } from "./validators.js";
5
+ async function getActiveMemory(ctx, memoryId) {
6
+ const id = ctx.db.normalizeId("memories", memoryId);
7
+ if (!id) {
8
+ return null;
9
+ }
10
+ const memory = await ctx.db.get(id);
11
+ if (!memory || memory.status !== "active") {
12
+ return null;
13
+ }
14
+ return memory;
15
+ }
16
+ async function buildMemoryCard(ctx, memoryId, score, scores) {
17
+ const memory = await getActiveMemory(ctx, memoryId);
18
+ if (!memory) {
19
+ return null;
20
+ }
21
+ const [entities, relationships] = await Promise.all([
22
+ ctx.db
23
+ .query("entities")
24
+ .withIndex("by_memory", (q) => q.eq("memoryId", memory._id))
25
+ .collect(),
26
+ ctx.db
27
+ .query("relationships")
28
+ .withIndex("by_memory", (q) => q.eq("memoryId", memory._id))
29
+ .collect(),
30
+ ]);
31
+ return {
32
+ memoryId: memory._id,
33
+ namespace: memory.namespace,
34
+ ...(memory.key === undefined ? {} : { key: memory.key }),
35
+ ...(memory.agentId === undefined ? {} : { agentId: memory.agentId }),
36
+ text: memory.text,
37
+ score,
38
+ ...(scores?.semanticScore === undefined ? {} : { semanticScore: scores.semanticScore }),
39
+ ...(scores?.graphScore === undefined ? {} : { graphScore: scores.graphScore }),
40
+ importance: memory.importance,
41
+ ...(memory.source === undefined ? {} : { source: memory.source }),
42
+ ...(memory.metadata === undefined ? {} : { metadata: memory.metadata }),
43
+ entities: entities.map((entity) => ({
44
+ externalId: entity.externalId,
45
+ name: entity.name,
46
+ type: entity.type,
47
+ ...(entity.description === undefined ? {} : { description: entity.description }),
48
+ confidence: entity.confidence,
49
+ })),
50
+ relationships: relationships.map((relationship) => ({
51
+ fromEntityExternalId: relationship.fromEntityExternalId,
52
+ toEntityExternalId: relationship.toEntityExternalId,
53
+ type: relationship.type,
54
+ ...(relationship.description === undefined ? {} : { description: relationship.description }),
55
+ confidence: relationship.confidence,
56
+ weight: relationship.weight,
57
+ })),
58
+ };
59
+ }
60
+ export const getMemory = query({
61
+ args: {
62
+ memoryId: v.string(),
63
+ },
64
+ returns: v.nullable(memoryCardValidator),
65
+ handler: async (ctx, args) => {
66
+ return await buildMemoryCard(ctx, args.memoryId, 1);
67
+ },
68
+ });
69
+ export const listMemories = query({
70
+ args: {
71
+ namespace: v.string(),
72
+ limit: v.optional(v.number()),
73
+ cursor: v.optional(v.string()),
74
+ },
75
+ returns: v.object({
76
+ page: v.array(memoryCardValidator),
77
+ continueCursor: v.union(v.string(), v.null()),
78
+ isDone: v.boolean(),
79
+ }),
80
+ handler: async (ctx, args) => {
81
+ const page = await ctx.db
82
+ .query("memories")
83
+ .withIndex("by_namespace", (q) => q.eq("namespace", args.namespace))
84
+ .filter((q) => q.eq(q.field("status"), "active"))
85
+ .order("desc")
86
+ .paginate({
87
+ cursor: args.cursor ?? null,
88
+ numItems: args.limit ?? 25,
89
+ });
90
+ const cards = [];
91
+ for (const memory of page.page) {
92
+ const card = await buildMemoryCard(ctx, memory._id, memory.importance);
93
+ if (card) {
94
+ cards.push(card);
95
+ }
96
+ }
97
+ return { ...page, page: cards };
98
+ },
99
+ });
100
+ export const fetchMemoryCards = query({
101
+ args: {
102
+ matches: v.array(v.object({
103
+ memoryId: v.string(),
104
+ score: v.number(),
105
+ semanticScore: v.optional(v.number()),
106
+ graphScore: v.optional(v.number()),
107
+ })),
108
+ },
109
+ returns: v.array(memoryCardValidator),
110
+ handler: async (ctx, args) => {
111
+ const cards = [];
112
+ for (const match of args.matches) {
113
+ const card = await buildMemoryCard(ctx, match.memoryId, match.score, {
114
+ semanticScore: match.semanticScore,
115
+ graphScore: match.graphScore,
116
+ });
117
+ if (card) {
118
+ cards.push(card);
119
+ }
120
+ }
121
+ return cards;
122
+ },
123
+ });
124
+ export const fetchMemoryCardsByVectorMatches = internalQuery({
125
+ args: {
126
+ embeddingDimension: v.number(),
127
+ matches: v.array(v.object({
128
+ vectorId: v.string(),
129
+ score: v.number(),
130
+ })),
131
+ },
132
+ returns: v.array(memoryCardValidator),
133
+ handler: async (ctx, args) => {
134
+ const table = vectorTableForDimension(args.embeddingDimension);
135
+ const cards = [];
136
+ for (const match of args.matches) {
137
+ const vectorId = ctx.db.normalizeId(table, match.vectorId);
138
+ if (!vectorId) {
139
+ continue;
140
+ }
141
+ const vectorRow = await ctx.db.get(vectorId);
142
+ if (!vectorRow) {
143
+ continue;
144
+ }
145
+ const card = await buildMemoryCard(ctx, vectorRow.memoryId, match.score, {
146
+ semanticScore: match.score,
147
+ });
148
+ if (card) {
149
+ cards.push(card);
150
+ }
151
+ }
152
+ return cards;
153
+ },
154
+ });
155
+ export const listPendingGraphSyncJobs = query({
156
+ args: {
157
+ limit: v.number(),
158
+ },
159
+ returns: v.array(v.object({
160
+ jobId: v.string(),
161
+ namespace: v.string(),
162
+ operation: v.string(),
163
+ attempts: v.number(),
164
+ payload: v.any(),
165
+ })),
166
+ handler: async (ctx, args) => {
167
+ const jobs = await ctx.db
168
+ .query("graphSyncJobs")
169
+ .withIndex("by_status", (q) => q.eq("status", "pending"))
170
+ .order("asc")
171
+ .take(args.limit);
172
+ return jobs.map((job) => ({
173
+ jobId: job._id,
174
+ namespace: job.namespace,
175
+ operation: job.operation,
176
+ attempts: job.attempts,
177
+ payload: job.payload,
178
+ }));
179
+ },
180
+ });
181
+ //# sourceMappingURL=queries.js.map
@@ -0,0 +1 @@
1
+ {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P,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;QACjB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;QACrB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;QACrB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;QACpB,OAAO,EAAE,CAAC,CAAC,GAAG,EAAE;KACjB,CAAC,CACH;IACD,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAC3B,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,EAAE;aACtB,KAAK,CAAC,eAAe,CAAC;aACtB,SAAS,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;aACxD,KAAK,CAAC,KAAK,CAAC;aACZ,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACpB,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;YACxB,KAAK,EAAE,GAAG,CAAC,GAAG;YACd,SAAS,EAAE,GAAG,CAAC,SAAS;YACxB,SAAS,EAAE,GAAG,CAAC,SAAS;YACxB,QAAQ,EAAE,GAAG,CAAC,QAAQ;YACtB,OAAO,EAAE,GAAG,CAAC,OAAO;SACrB,CAAC,CAAC,CAAC;IACN,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,442 @@
1
+ declare const _default: import("convex/server").SchemaDefinition<{
2
+ namespaces: import("convex/server").TableDefinition<import("convex/values").VObject<{
3
+ metadata?: any;
4
+ namespace: string;
5
+ createdAt: number;
6
+ updatedAt: number;
7
+ }, {
8
+ namespace: import("convex/values").VString<string, "required">;
9
+ metadata: import("convex/values").VAny<any, "optional", string>;
10
+ createdAt: import("convex/values").VFloat64<number, "required">;
11
+ updatedAt: import("convex/values").VFloat64<number, "required">;
12
+ }, "required", "metadata" | "namespace" | "createdAt" | "updatedAt" | `metadata.${string}`>, {
13
+ by_namespace: ["namespace", "_creationTime"];
14
+ }, {}, {}>;
15
+ memories: import("convex/server").TableDefinition<import("convex/values").VObject<{
16
+ key?: string;
17
+ agentId?: string;
18
+ source?: {
19
+ id?: string;
20
+ url?: string;
21
+ title?: string;
22
+ type: string;
23
+ };
24
+ metadata?: any;
25
+ deletedAt?: number;
26
+ importance: number;
27
+ embeddingDimension: number;
28
+ text: string;
29
+ contentHash: string;
30
+ namespace: string;
31
+ createdAt: number;
32
+ updatedAt: number;
33
+ status: "active" | "deleted" | "pending";
34
+ observationScore: number;
35
+ chunkCount: number;
36
+ entityCount: number;
37
+ relationshipCount: number;
38
+ }, {
39
+ namespace: import("convex/values").VString<string, "required">;
40
+ key: import("convex/values").VString<string | undefined, "optional">;
41
+ agentId: import("convex/values").VString<string | undefined, "optional">;
42
+ text: import("convex/values").VString<string, "required">;
43
+ contentHash: import("convex/values").VString<string, "required">;
44
+ source: import("convex/values").VObject<{
45
+ id?: string;
46
+ url?: string;
47
+ title?: string;
48
+ type: string;
49
+ } | undefined, {
50
+ type: import("convex/values").VString<string, "required">;
51
+ id: import("convex/values").VString<string | undefined, "optional">;
52
+ url: import("convex/values").VString<string | undefined, "optional">;
53
+ title: import("convex/values").VString<string | undefined, "optional">;
54
+ }, "optional", "type" | "id" | "url" | "title">;
55
+ metadata: import("convex/values").VAny<any, "optional", string>;
56
+ status: import("convex/values").VUnion<"active" | "deleted" | "pending", [import("convex/values").VLiteral<"active", "required">, import("convex/values").VLiteral<"deleted", "required">, import("convex/values").VLiteral<"pending", "required">], "required", never>;
57
+ importance: import("convex/values").VFloat64<number, "required">;
58
+ observationScore: import("convex/values").VFloat64<number, "required">;
59
+ embeddingDimension: import("convex/values").VFloat64<number, "required">;
60
+ chunkCount: import("convex/values").VFloat64<number, "required">;
61
+ entityCount: import("convex/values").VFloat64<number, "required">;
62
+ relationshipCount: import("convex/values").VFloat64<number, "required">;
63
+ createdAt: import("convex/values").VFloat64<number, "required">;
64
+ updatedAt: import("convex/values").VFloat64<number, "required">;
65
+ deletedAt: import("convex/values").VFloat64<number | undefined, "optional">;
66
+ }, "required", "key" | "agentId" | "source" | "metadata" | "importance" | "embeddingDimension" | "text" | "contentHash" | "namespace" | "createdAt" | "updatedAt" | `metadata.${string}` | "status" | "observationScore" | "chunkCount" | "entityCount" | "relationshipCount" | "deletedAt" | "source.type" | "source.id" | "source.url" | "source.title">, {
67
+ by_namespace: ["namespace", "_creationTime"];
68
+ by_namespace_key: ["namespace", "key", "_creationTime"];
69
+ by_namespace_hash: ["namespace", "contentHash", "_creationTime"];
70
+ by_agent: ["namespace", "agentId", "_creationTime"];
71
+ }, {}, {}>;
72
+ chunks: import("convex/server").TableDefinition<import("convex/values").VObject<{
73
+ agentId?: string;
74
+ metadata?: any;
75
+ summary?: string;
76
+ tokenCount?: number;
77
+ text: string;
78
+ namespace: string;
79
+ memoryId: import("convex/values").GenericId<"memories">;
80
+ createdAt: number;
81
+ order: number;
82
+ }, {
83
+ namespace: import("convex/values").VString<string, "required">;
84
+ memoryId: import("convex/values").VId<import("convex/values").GenericId<"memories">, "required">;
85
+ agentId: import("convex/values").VString<string | undefined, "optional">;
86
+ order: import("convex/values").VFloat64<number, "required">;
87
+ text: import("convex/values").VString<string, "required">;
88
+ summary: import("convex/values").VString<string | undefined, "optional">;
89
+ tokenCount: import("convex/values").VFloat64<number | undefined, "optional">;
90
+ metadata: import("convex/values").VAny<any, "optional", string>;
91
+ createdAt: import("convex/values").VFloat64<number, "required">;
92
+ }, "required", "agentId" | "metadata" | "text" | "namespace" | "memoryId" | "createdAt" | `metadata.${string}` | "order" | "summary" | "tokenCount">, {
93
+ by_memory: ["memoryId", "order", "_creationTime"];
94
+ by_namespace: ["namespace", "_creationTime"];
95
+ }, {}, {}>;
96
+ entities: import("convex/server").TableDefinition<import("convex/values").VObject<{
97
+ description?: string;
98
+ aliases?: string[];
99
+ metadata?: any;
100
+ chunkId?: import("convex/values").GenericId<"chunks">;
101
+ name: string;
102
+ type: string;
103
+ confidence: number;
104
+ namespace: string;
105
+ memoryId: import("convex/values").GenericId<"memories">;
106
+ createdAt: number;
107
+ updatedAt: number;
108
+ externalId: string;
109
+ }, {
110
+ namespace: import("convex/values").VString<string, "required">;
111
+ memoryId: import("convex/values").VId<import("convex/values").GenericId<"memories">, "required">;
112
+ chunkId: import("convex/values").VId<import("convex/values").GenericId<"chunks"> | undefined, "optional">;
113
+ externalId: import("convex/values").VString<string, "required">;
114
+ name: import("convex/values").VString<string, "required">;
115
+ type: import("convex/values").VString<string, "required">;
116
+ description: import("convex/values").VString<string | undefined, "optional">;
117
+ aliases: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
118
+ confidence: import("convex/values").VFloat64<number, "required">;
119
+ metadata: import("convex/values").VAny<any, "optional", string>;
120
+ createdAt: import("convex/values").VFloat64<number, "required">;
121
+ updatedAt: import("convex/values").VFloat64<number, "required">;
122
+ }, "required", "name" | "type" | "description" | "aliases" | "confidence" | "metadata" | "namespace" | "memoryId" | "chunkId" | "createdAt" | "updatedAt" | `metadata.${string}` | "externalId">, {
123
+ by_memory: ["memoryId", "_creationTime"];
124
+ by_namespace_name: ["namespace", "name", "_creationTime"];
125
+ by_external_id: ["namespace", "externalId", "_creationTime"];
126
+ }, {}, {}>;
127
+ relationships: import("convex/server").TableDefinition<import("convex/values").VObject<{
128
+ description?: string;
129
+ metadata?: any;
130
+ type: string;
131
+ confidence: number;
132
+ weight: number;
133
+ fromEntityExternalId: string;
134
+ toEntityExternalId: string;
135
+ namespace: string;
136
+ memoryId: import("convex/values").GenericId<"memories">;
137
+ createdAt: number;
138
+ updatedAt: number;
139
+ }, {
140
+ namespace: import("convex/values").VString<string, "required">;
141
+ memoryId: import("convex/values").VId<import("convex/values").GenericId<"memories">, "required">;
142
+ fromEntityExternalId: import("convex/values").VString<string, "required">;
143
+ toEntityExternalId: import("convex/values").VString<string, "required">;
144
+ type: import("convex/values").VString<string, "required">;
145
+ description: import("convex/values").VString<string | undefined, "optional">;
146
+ confidence: import("convex/values").VFloat64<number, "required">;
147
+ weight: import("convex/values").VFloat64<number, "required">;
148
+ metadata: import("convex/values").VAny<any, "optional", string>;
149
+ createdAt: import("convex/values").VFloat64<number, "required">;
150
+ updatedAt: import("convex/values").VFloat64<number, "required">;
151
+ }, "required", "type" | "description" | "confidence" | "weight" | "fromEntityExternalId" | "toEntityExternalId" | "metadata" | "namespace" | "memoryId" | "createdAt" | "updatedAt" | `metadata.${string}`>, {
152
+ by_memory: ["memoryId", "_creationTime"];
153
+ by_from: ["namespace", "fromEntityExternalId", "_creationTime"];
154
+ by_to: ["namespace", "toEntityExternalId", "_creationTime"];
155
+ }, {}, {}>;
156
+ observations: import("convex/server").TableDefinition<import("convex/values").VObject<{
157
+ metadata?: any;
158
+ feedback?: string;
159
+ namespace: string;
160
+ query: string;
161
+ memoryId: import("convex/values").GenericId<"memories">;
162
+ outcome: "helpful" | "not_helpful" | "neutral";
163
+ createdAt: number;
164
+ }, {
165
+ namespace: import("convex/values").VString<string, "required">;
166
+ memoryId: import("convex/values").VId<import("convex/values").GenericId<"memories">, "required">;
167
+ query: import("convex/values").VString<string, "required">;
168
+ outcome: import("convex/values").VUnion<"helpful" | "not_helpful" | "neutral", [import("convex/values").VLiteral<"helpful", "required">, import("convex/values").VLiteral<"not_helpful", "required">, import("convex/values").VLiteral<"neutral", "required">], "required", never>;
169
+ feedback: import("convex/values").VString<string | undefined, "optional">;
170
+ metadata: import("convex/values").VAny<any, "optional", string>;
171
+ createdAt: import("convex/values").VFloat64<number, "required">;
172
+ }, "required", "metadata" | "namespace" | "query" | "memoryId" | "outcome" | "feedback" | "createdAt" | `metadata.${string}`>, {
173
+ by_memory: ["memoryId", "_creationTime"];
174
+ by_namespace: ["namespace", "_creationTime"];
175
+ }, {}, {}>;
176
+ graphSyncJobs: import("convex/server").TableDefinition<import("convex/values").VObject<{
177
+ memoryId?: import("convex/values").GenericId<"memories">;
178
+ lastError?: string;
179
+ namespace: string;
180
+ createdAt: number;
181
+ updatedAt: number;
182
+ status: "pending" | "running" | "succeeded" | "failed";
183
+ operation: "upsert_memory" | "delete_memory" | "promote_memory";
184
+ attempts: number;
185
+ payload: any;
186
+ }, {
187
+ namespace: import("convex/values").VString<string, "required">;
188
+ memoryId: import("convex/values").VId<import("convex/values").GenericId<"memories"> | undefined, "optional">;
189
+ operation: import("convex/values").VUnion<"upsert_memory" | "delete_memory" | "promote_memory", [import("convex/values").VLiteral<"upsert_memory", "required">, import("convex/values").VLiteral<"delete_memory", "required">, import("convex/values").VLiteral<"promote_memory", "required">], "required", never>;
190
+ status: import("convex/values").VUnion<"pending" | "running" | "succeeded" | "failed", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"running", "required">, import("convex/values").VLiteral<"succeeded", "required">, import("convex/values").VLiteral<"failed", "required">], "required", never>;
191
+ attempts: import("convex/values").VFloat64<number, "required">;
192
+ payload: import("convex/values").VAny<any, "required", string>;
193
+ lastError: import("convex/values").VString<string | undefined, "optional">;
194
+ createdAt: import("convex/values").VFloat64<number, "required">;
195
+ updatedAt: import("convex/values").VFloat64<number, "required">;
196
+ }, "required", "namespace" | "memoryId" | "createdAt" | "updatedAt" | "status" | "operation" | "attempts" | "payload" | "lastError" | `payload.${string}`>, {
197
+ by_status: ["status", "createdAt", "_creationTime"];
198
+ by_memory: ["memoryId", "_creationTime"];
199
+ }, {}, {}>;
200
+ vectors_128: import("convex/server").TableDefinition<import("convex/values").VObject<{
201
+ agentId: string;
202
+ namespace: string;
203
+ memoryId: import("convex/values").GenericId<"memories">;
204
+ chunkId: import("convex/values").GenericId<"chunks">;
205
+ embedding: number[];
206
+ kind: string;
207
+ }, {
208
+ namespace: import("convex/values").VString<string, "required">;
209
+ memoryId: import("convex/values").VId<import("convex/values").GenericId<"memories">, "required">;
210
+ chunkId: import("convex/values").VId<import("convex/values").GenericId<"chunks">, "required">;
211
+ agentId: import("convex/values").VString<string, "required">;
212
+ kind: import("convex/values").VString<string, "required">;
213
+ embedding: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
214
+ }, "required", "agentId" | "namespace" | "memoryId" | "chunkId" | "embedding" | "kind">, {
215
+ by_memory: ["memoryId", "_creationTime"];
216
+ by_chunk: ["chunkId", "_creationTime"];
217
+ }, {}, {
218
+ by_embedding: {
219
+ vectorField: "embedding";
220
+ dimensions: number;
221
+ filterFields: "agentId" | "namespace" | "kind";
222
+ };
223
+ }>;
224
+ vectors_256: import("convex/server").TableDefinition<import("convex/values").VObject<{
225
+ agentId: string;
226
+ namespace: string;
227
+ memoryId: import("convex/values").GenericId<"memories">;
228
+ chunkId: import("convex/values").GenericId<"chunks">;
229
+ embedding: number[];
230
+ kind: string;
231
+ }, {
232
+ namespace: import("convex/values").VString<string, "required">;
233
+ memoryId: import("convex/values").VId<import("convex/values").GenericId<"memories">, "required">;
234
+ chunkId: import("convex/values").VId<import("convex/values").GenericId<"chunks">, "required">;
235
+ agentId: import("convex/values").VString<string, "required">;
236
+ kind: import("convex/values").VString<string, "required">;
237
+ embedding: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
238
+ }, "required", "agentId" | "namespace" | "memoryId" | "chunkId" | "embedding" | "kind">, {
239
+ by_memory: ["memoryId", "_creationTime"];
240
+ by_chunk: ["chunkId", "_creationTime"];
241
+ }, {}, {
242
+ by_embedding: {
243
+ vectorField: "embedding";
244
+ dimensions: number;
245
+ filterFields: "agentId" | "namespace" | "kind";
246
+ };
247
+ }>;
248
+ vectors_384: import("convex/server").TableDefinition<import("convex/values").VObject<{
249
+ agentId: string;
250
+ namespace: string;
251
+ memoryId: import("convex/values").GenericId<"memories">;
252
+ chunkId: import("convex/values").GenericId<"chunks">;
253
+ embedding: number[];
254
+ kind: string;
255
+ }, {
256
+ namespace: import("convex/values").VString<string, "required">;
257
+ memoryId: import("convex/values").VId<import("convex/values").GenericId<"memories">, "required">;
258
+ chunkId: import("convex/values").VId<import("convex/values").GenericId<"chunks">, "required">;
259
+ agentId: import("convex/values").VString<string, "required">;
260
+ kind: import("convex/values").VString<string, "required">;
261
+ embedding: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
262
+ }, "required", "agentId" | "namespace" | "memoryId" | "chunkId" | "embedding" | "kind">, {
263
+ by_memory: ["memoryId", "_creationTime"];
264
+ by_chunk: ["chunkId", "_creationTime"];
265
+ }, {}, {
266
+ by_embedding: {
267
+ vectorField: "embedding";
268
+ dimensions: number;
269
+ filterFields: "agentId" | "namespace" | "kind";
270
+ };
271
+ }>;
272
+ vectors_512: import("convex/server").TableDefinition<import("convex/values").VObject<{
273
+ agentId: string;
274
+ namespace: string;
275
+ memoryId: import("convex/values").GenericId<"memories">;
276
+ chunkId: import("convex/values").GenericId<"chunks">;
277
+ embedding: number[];
278
+ kind: string;
279
+ }, {
280
+ namespace: import("convex/values").VString<string, "required">;
281
+ memoryId: import("convex/values").VId<import("convex/values").GenericId<"memories">, "required">;
282
+ chunkId: import("convex/values").VId<import("convex/values").GenericId<"chunks">, "required">;
283
+ agentId: import("convex/values").VString<string, "required">;
284
+ kind: import("convex/values").VString<string, "required">;
285
+ embedding: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
286
+ }, "required", "agentId" | "namespace" | "memoryId" | "chunkId" | "embedding" | "kind">, {
287
+ by_memory: ["memoryId", "_creationTime"];
288
+ by_chunk: ["chunkId", "_creationTime"];
289
+ }, {}, {
290
+ by_embedding: {
291
+ vectorField: "embedding";
292
+ dimensions: number;
293
+ filterFields: "agentId" | "namespace" | "kind";
294
+ };
295
+ }>;
296
+ vectors_768: import("convex/server").TableDefinition<import("convex/values").VObject<{
297
+ agentId: string;
298
+ namespace: string;
299
+ memoryId: import("convex/values").GenericId<"memories">;
300
+ chunkId: import("convex/values").GenericId<"chunks">;
301
+ embedding: number[];
302
+ kind: string;
303
+ }, {
304
+ namespace: import("convex/values").VString<string, "required">;
305
+ memoryId: import("convex/values").VId<import("convex/values").GenericId<"memories">, "required">;
306
+ chunkId: import("convex/values").VId<import("convex/values").GenericId<"chunks">, "required">;
307
+ agentId: import("convex/values").VString<string, "required">;
308
+ kind: import("convex/values").VString<string, "required">;
309
+ embedding: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
310
+ }, "required", "agentId" | "namespace" | "memoryId" | "chunkId" | "embedding" | "kind">, {
311
+ by_memory: ["memoryId", "_creationTime"];
312
+ by_chunk: ["chunkId", "_creationTime"];
313
+ }, {}, {
314
+ by_embedding: {
315
+ vectorField: "embedding";
316
+ dimensions: number;
317
+ filterFields: "agentId" | "namespace" | "kind";
318
+ };
319
+ }>;
320
+ vectors_1024: import("convex/server").TableDefinition<import("convex/values").VObject<{
321
+ agentId: string;
322
+ namespace: string;
323
+ memoryId: import("convex/values").GenericId<"memories">;
324
+ chunkId: import("convex/values").GenericId<"chunks">;
325
+ embedding: number[];
326
+ kind: string;
327
+ }, {
328
+ namespace: import("convex/values").VString<string, "required">;
329
+ memoryId: import("convex/values").VId<import("convex/values").GenericId<"memories">, "required">;
330
+ chunkId: import("convex/values").VId<import("convex/values").GenericId<"chunks">, "required">;
331
+ agentId: import("convex/values").VString<string, "required">;
332
+ kind: import("convex/values").VString<string, "required">;
333
+ embedding: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
334
+ }, "required", "agentId" | "namespace" | "memoryId" | "chunkId" | "embedding" | "kind">, {
335
+ by_memory: ["memoryId", "_creationTime"];
336
+ by_chunk: ["chunkId", "_creationTime"];
337
+ }, {}, {
338
+ by_embedding: {
339
+ vectorField: "embedding";
340
+ dimensions: number;
341
+ filterFields: "agentId" | "namespace" | "kind";
342
+ };
343
+ }>;
344
+ vectors_1536: import("convex/server").TableDefinition<import("convex/values").VObject<{
345
+ agentId: string;
346
+ namespace: string;
347
+ memoryId: import("convex/values").GenericId<"memories">;
348
+ chunkId: import("convex/values").GenericId<"chunks">;
349
+ embedding: number[];
350
+ kind: string;
351
+ }, {
352
+ namespace: import("convex/values").VString<string, "required">;
353
+ memoryId: import("convex/values").VId<import("convex/values").GenericId<"memories">, "required">;
354
+ chunkId: import("convex/values").VId<import("convex/values").GenericId<"chunks">, "required">;
355
+ agentId: import("convex/values").VString<string, "required">;
356
+ kind: import("convex/values").VString<string, "required">;
357
+ embedding: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
358
+ }, "required", "agentId" | "namespace" | "memoryId" | "chunkId" | "embedding" | "kind">, {
359
+ by_memory: ["memoryId", "_creationTime"];
360
+ by_chunk: ["chunkId", "_creationTime"];
361
+ }, {}, {
362
+ by_embedding: {
363
+ vectorField: "embedding";
364
+ dimensions: number;
365
+ filterFields: "agentId" | "namespace" | "kind";
366
+ };
367
+ }>;
368
+ vectors_2048: import("convex/server").TableDefinition<import("convex/values").VObject<{
369
+ agentId: string;
370
+ namespace: string;
371
+ memoryId: import("convex/values").GenericId<"memories">;
372
+ chunkId: import("convex/values").GenericId<"chunks">;
373
+ embedding: number[];
374
+ kind: string;
375
+ }, {
376
+ namespace: import("convex/values").VString<string, "required">;
377
+ memoryId: import("convex/values").VId<import("convex/values").GenericId<"memories">, "required">;
378
+ chunkId: import("convex/values").VId<import("convex/values").GenericId<"chunks">, "required">;
379
+ agentId: import("convex/values").VString<string, "required">;
380
+ kind: import("convex/values").VString<string, "required">;
381
+ embedding: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
382
+ }, "required", "agentId" | "namespace" | "memoryId" | "chunkId" | "embedding" | "kind">, {
383
+ by_memory: ["memoryId", "_creationTime"];
384
+ by_chunk: ["chunkId", "_creationTime"];
385
+ }, {}, {
386
+ by_embedding: {
387
+ vectorField: "embedding";
388
+ dimensions: number;
389
+ filterFields: "agentId" | "namespace" | "kind";
390
+ };
391
+ }>;
392
+ vectors_3072: import("convex/server").TableDefinition<import("convex/values").VObject<{
393
+ agentId: string;
394
+ namespace: string;
395
+ memoryId: import("convex/values").GenericId<"memories">;
396
+ chunkId: import("convex/values").GenericId<"chunks">;
397
+ embedding: number[];
398
+ kind: string;
399
+ }, {
400
+ namespace: import("convex/values").VString<string, "required">;
401
+ memoryId: import("convex/values").VId<import("convex/values").GenericId<"memories">, "required">;
402
+ chunkId: import("convex/values").VId<import("convex/values").GenericId<"chunks">, "required">;
403
+ agentId: import("convex/values").VString<string, "required">;
404
+ kind: import("convex/values").VString<string, "required">;
405
+ embedding: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
406
+ }, "required", "agentId" | "namespace" | "memoryId" | "chunkId" | "embedding" | "kind">, {
407
+ by_memory: ["memoryId", "_creationTime"];
408
+ by_chunk: ["chunkId", "_creationTime"];
409
+ }, {}, {
410
+ by_embedding: {
411
+ vectorField: "embedding";
412
+ dimensions: number;
413
+ filterFields: "agentId" | "namespace" | "kind";
414
+ };
415
+ }>;
416
+ vectors_4096: import("convex/server").TableDefinition<import("convex/values").VObject<{
417
+ agentId: string;
418
+ namespace: string;
419
+ memoryId: import("convex/values").GenericId<"memories">;
420
+ chunkId: import("convex/values").GenericId<"chunks">;
421
+ embedding: number[];
422
+ kind: string;
423
+ }, {
424
+ namespace: import("convex/values").VString<string, "required">;
425
+ memoryId: import("convex/values").VId<import("convex/values").GenericId<"memories">, "required">;
426
+ chunkId: import("convex/values").VId<import("convex/values").GenericId<"chunks">, "required">;
427
+ agentId: import("convex/values").VString<string, "required">;
428
+ kind: import("convex/values").VString<string, "required">;
429
+ embedding: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
430
+ }, "required", "agentId" | "namespace" | "memoryId" | "chunkId" | "embedding" | "kind">, {
431
+ by_memory: ["memoryId", "_creationTime"];
432
+ by_chunk: ["chunkId", "_creationTime"];
433
+ }, {}, {
434
+ by_embedding: {
435
+ vectorField: "embedding";
436
+ dimensions: number;
437
+ filterFields: "agentId" | "namespace" | "kind";
438
+ };
439
+ }>;
440
+ }, true>;
441
+ export default _default;
442
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/component/schema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,wBAyHG"}