@convex-dev/agent 0.1.4 → 0.1.5-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +76 -38
- package/dist/commonjs/client/createTool.d.ts +3 -5
- package/dist/commonjs/client/createTool.d.ts.map +1 -1
- package/dist/commonjs/client/createTool.js +1 -0
- package/dist/commonjs/client/createTool.js.map +1 -1
- package/dist/commonjs/client/index.d.ts +37 -6
- package/dist/commonjs/client/index.d.ts.map +1 -1
- package/dist/commonjs/client/index.js +62 -1
- package/dist/commonjs/client/index.js.map +1 -1
- package/dist/commonjs/client/streaming.d.ts +3 -3
- package/dist/commonjs/client/streaming.d.ts.map +1 -1
- package/dist/commonjs/client/streaming.js +1 -1
- package/dist/commonjs/client/streaming.js.map +1 -1
- package/dist/commonjs/component/files.d.ts +2 -2
- package/dist/commonjs/component/files.d.ts.map +1 -1
- package/dist/commonjs/component/files.js.map +1 -1
- package/dist/commonjs/component/messages.d.ts +158 -24
- package/dist/commonjs/component/messages.d.ts.map +1 -1
- package/dist/commonjs/component/messages.js +13 -5
- package/dist/commonjs/component/messages.js.map +1 -1
- package/dist/commonjs/component/schema.d.ts +45 -45
- package/dist/commonjs/component/schema.d.ts.map +1 -1
- package/dist/commonjs/component/schema.js.map +1 -1
- package/dist/commonjs/component/streams.js +3 -3
- package/dist/commonjs/component/streams.js.map +1 -1
- package/dist/commonjs/component/threads.d.ts +8 -8
- package/dist/commonjs/component/threads.js +3 -3
- package/dist/commonjs/component/threads.js.map +1 -1
- package/dist/commonjs/component/users.js +4 -4
- package/dist/commonjs/component/users.js.map +1 -1
- package/dist/commonjs/component/vector/index.d.ts +7 -4
- package/dist/commonjs/component/vector/index.d.ts.map +1 -1
- package/dist/commonjs/component/vector/index.js +16 -8
- package/dist/commonjs/component/vector/index.js.map +1 -1
- package/dist/commonjs/component/vector/tables.d.ts +5 -7
- package/dist/commonjs/component/vector/tables.d.ts.map +1 -1
- package/dist/commonjs/mapping.d.ts +2 -2
- package/dist/commonjs/mapping.d.ts.map +1 -1
- package/dist/commonjs/mapping.js.map +1 -1
- package/dist/commonjs/react/toUIMessages.d.ts +3 -3
- package/dist/commonjs/react/toUIMessages.d.ts.map +1 -1
- package/dist/commonjs/shared.d.ts +2 -2
- package/dist/commonjs/shared.d.ts.map +1 -1
- package/dist/commonjs/validators.d.ts +1 -1
- package/dist/commonjs/validators.d.ts.map +1 -1
- package/dist/commonjs/validators.js +2 -2
- package/dist/commonjs/validators.js.map +1 -1
- package/dist/commonjs.tsbuildinfo +1 -0
- package/dist/esm/client/createTool.d.ts +3 -5
- package/dist/esm/client/createTool.d.ts.map +1 -1
- package/dist/esm/client/createTool.js +1 -0
- package/dist/esm/client/createTool.js.map +1 -1
- package/dist/esm/client/index.d.ts +37 -6
- package/dist/esm/client/index.d.ts.map +1 -1
- package/dist/esm/client/index.js +62 -1
- package/dist/esm/client/index.js.map +1 -1
- package/dist/esm/client/streaming.d.ts +3 -3
- package/dist/esm/client/streaming.d.ts.map +1 -1
- package/dist/esm/client/streaming.js +1 -1
- package/dist/esm/client/streaming.js.map +1 -1
- package/dist/esm/component/files.d.ts +2 -2
- package/dist/esm/component/files.d.ts.map +1 -1
- package/dist/esm/component/files.js.map +1 -1
- package/dist/esm/component/messages.d.ts +158 -24
- package/dist/esm/component/messages.d.ts.map +1 -1
- package/dist/esm/component/messages.js +13 -5
- package/dist/esm/component/messages.js.map +1 -1
- package/dist/esm/component/schema.d.ts +45 -45
- package/dist/esm/component/schema.d.ts.map +1 -1
- package/dist/esm/component/schema.js.map +1 -1
- package/dist/esm/component/streams.js +3 -3
- package/dist/esm/component/streams.js.map +1 -1
- package/dist/esm/component/threads.d.ts +8 -8
- package/dist/esm/component/threads.js +3 -3
- package/dist/esm/component/threads.js.map +1 -1
- package/dist/esm/component/users.js +4 -4
- package/dist/esm/component/users.js.map +1 -1
- package/dist/esm/component/vector/index.d.ts +7 -4
- package/dist/esm/component/vector/index.d.ts.map +1 -1
- package/dist/esm/component/vector/index.js +16 -8
- package/dist/esm/component/vector/index.js.map +1 -1
- package/dist/esm/component/vector/tables.d.ts +5 -7
- package/dist/esm/component/vector/tables.d.ts.map +1 -1
- package/dist/esm/mapping.d.ts +2 -2
- package/dist/esm/mapping.d.ts.map +1 -1
- package/dist/esm/mapping.js.map +1 -1
- package/dist/esm/react/toUIMessages.d.ts +3 -3
- package/dist/esm/react/toUIMessages.d.ts.map +1 -1
- package/dist/esm/shared.d.ts +2 -2
- package/dist/esm/shared.d.ts.map +1 -1
- package/dist/esm/validators.d.ts +1 -1
- package/dist/esm/validators.d.ts.map +1 -1
- package/dist/esm/validators.js +2 -2
- package/dist/esm/validators.js.map +1 -1
- package/dist/esm.tsbuildinfo +1 -0
- package/package.json +2 -1
- package/src/client/createTool.ts +3 -5
- package/src/client/index.test.ts +1 -1
- package/src/client/index.ts +122 -11
- package/src/client/streaming.ts +12 -3
- package/src/component/_generated/api.d.ts +158 -1
- package/src/component/files.ts +2 -2
- package/src/component/messages.test.ts +4 -4
- package/src/component/messages.ts +25 -15
- package/src/component/schema.ts +1 -1
- package/src/component/streams.ts +5 -5
- package/src/component/threads.ts +6 -6
- package/src/component/users.ts +7 -7
- package/src/component/vector/index.ts +27 -12
- package/src/component/vector/tables.ts +10 -10
- package/src/mapping.ts +4 -4
- package/src/react/toUIMessages.ts +3 -3
- package/src/shared.ts +2 -2
- package/src/validators.test.ts +22 -22
- package/src/validators.ts +8 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { assert, omit } from "convex-helpers";
|
|
2
2
|
import { mergedStream, stream } from "convex-helpers/server/stream";
|
|
3
|
-
import {
|
|
3
|
+
import { paginationOptsValidator } from "convex/server";
|
|
4
|
+
import type { ObjectType } from "convex/values";
|
|
4
5
|
import {
|
|
5
6
|
DEFAULT_MESSAGE_RANGE,
|
|
6
7
|
DEFAULT_RECENT_MESSAGES,
|
|
@@ -8,38 +9,37 @@ import {
|
|
|
8
9
|
isTool,
|
|
9
10
|
} from "../shared.js";
|
|
10
11
|
import {
|
|
11
|
-
vPaginationResult,
|
|
12
12
|
vMessageEmbeddings,
|
|
13
13
|
vMessageStatus,
|
|
14
14
|
vMessageWithMetadata,
|
|
15
|
+
vPaginationResult,
|
|
15
16
|
vSearchOptions,
|
|
16
17
|
vStepWithMessages,
|
|
17
18
|
} from "../validators.js";
|
|
18
19
|
import { api, internal } from "./_generated/api.js";
|
|
19
|
-
import { Doc, Id } from "./_generated/dataModel.js";
|
|
20
|
+
import type { Doc, Id } from "./_generated/dataModel.js";
|
|
20
21
|
import {
|
|
21
22
|
action,
|
|
22
23
|
internalQuery,
|
|
23
24
|
mutation,
|
|
24
|
-
MutationCtx,
|
|
25
|
+
type MutationCtx,
|
|
25
26
|
query,
|
|
26
|
-
QueryCtx,
|
|
27
|
+
type QueryCtx,
|
|
27
28
|
} from "./_generated/server.js";
|
|
28
|
-
import {
|
|
29
|
+
import type { MessageDoc } from "./schema.js";
|
|
30
|
+
import { schema, v, vMessageDoc } from "./schema.js";
|
|
31
|
+
import {
|
|
32
|
+
getThread as _getThread,
|
|
33
|
+
listThreadsByUserId as _listThreadsByUserId,
|
|
34
|
+
updateThread as _updateThread,
|
|
35
|
+
} from "./threads.js";
|
|
29
36
|
import { insertVector, searchVectors } from "./vector/index.js";
|
|
30
37
|
import {
|
|
31
|
-
VectorDimension,
|
|
38
|
+
type VectorDimension,
|
|
32
39
|
VectorDimensions,
|
|
33
|
-
VectorTableId,
|
|
40
|
+
type VectorTableId,
|
|
34
41
|
vVectorId,
|
|
35
42
|
} from "./vector/tables.js";
|
|
36
|
-
import {
|
|
37
|
-
listThreadsByUserId as _listThreadsByUserId,
|
|
38
|
-
getThread as _getThread,
|
|
39
|
-
updateThread as _updateThread,
|
|
40
|
-
} from "./threads.js";
|
|
41
|
-
import { paginationOptsValidator } from "convex/server";
|
|
42
|
-
import { MessageDoc, vMessageDoc } from "./schema.js";
|
|
43
43
|
|
|
44
44
|
/** @deprecated Use *.threads.listMessagesByThreadId instead. */
|
|
45
45
|
export const listThreadsByUserId = _listThreadsByUserId;
|
|
@@ -443,6 +443,16 @@ export const listMessagesByThreadId = query({
|
|
|
443
443
|
returns: vPaginationResult(vMessageDoc),
|
|
444
444
|
});
|
|
445
445
|
|
|
446
|
+
export const getMessagesByIds = query({
|
|
447
|
+
args: {
|
|
448
|
+
messageIds: v.array(v.id("messages")),
|
|
449
|
+
},
|
|
450
|
+
handler: async (ctx, args) => {
|
|
451
|
+
return await Promise.all(args.messageIds.map((id) => ctx.db.get(id)));
|
|
452
|
+
},
|
|
453
|
+
returns: v.array(v.union(v.null(), vMessageDoc)),
|
|
454
|
+
});
|
|
455
|
+
|
|
446
456
|
/** @deprecated Use listMessagesByThreadId instead. */
|
|
447
457
|
export const getThreadMessages = query({
|
|
448
458
|
args: { deprecated: v.literal("Use listMessagesByThreadId instead") },
|
package/src/component/schema.ts
CHANGED
package/src/component/streams.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
+
import { omit, pick } from "convex-helpers";
|
|
1
2
|
import { v } from "convex/values";
|
|
3
|
+
import { type StreamDelta, vStreamDelta, vStreamMessage } from "../validators";
|
|
4
|
+
import { internal } from "./_generated/api";
|
|
5
|
+
import type { Id } from "./_generated/dataModel";
|
|
2
6
|
import {
|
|
3
7
|
internalMutation,
|
|
4
8
|
mutation,
|
|
5
|
-
MutationCtx,
|
|
9
|
+
type MutationCtx,
|
|
6
10
|
query,
|
|
7
11
|
} from "./_generated/server";
|
|
8
|
-
import { omit, pick } from "convex-helpers";
|
|
9
|
-
import { StreamDelta, vStreamDelta, vStreamMessage } from "../validators";
|
|
10
12
|
import schema from "./schema";
|
|
11
|
-
import { internal } from "./_generated/api";
|
|
12
|
-
import { Id } from "./_generated/dataModel";
|
|
13
13
|
|
|
14
14
|
const MAX_DELTAS_PER_REQUEST = 1000;
|
|
15
15
|
const MAX_DELTAS_PER_STREAM = 100;
|
package/src/component/threads.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { assert, omit, pick } from "convex-helpers";
|
|
2
2
|
import { paginator } from "convex-helpers/server/pagination";
|
|
3
3
|
import { partial } from "convex-helpers/validators";
|
|
4
|
-
import {
|
|
4
|
+
import { paginationOptsValidator } from "convex/server";
|
|
5
|
+
import type { ObjectType } from "convex/values";
|
|
6
|
+
import { type ThreadDoc, vThreadDoc } from "../client/index.js";
|
|
5
7
|
import { vPaginationResult } from "../validators.js";
|
|
6
8
|
import { api, internal } from "./_generated/api.js";
|
|
7
|
-
import { Doc } from "./_generated/dataModel.js";
|
|
9
|
+
import type { Doc } from "./_generated/dataModel.js";
|
|
8
10
|
import {
|
|
9
11
|
action,
|
|
10
12
|
internalMutation,
|
|
11
13
|
mutation,
|
|
12
|
-
MutationCtx,
|
|
14
|
+
type MutationCtx,
|
|
13
15
|
query,
|
|
14
16
|
} from "./_generated/server.js";
|
|
15
|
-
import { schema, v } from "./schema.js";
|
|
16
|
-
import { paginationOptsValidator } from "convex/server";
|
|
17
17
|
import { deleteMessage } from "./messages.js";
|
|
18
|
-
import {
|
|
18
|
+
import { schema, v } from "./schema.js";
|
|
19
19
|
|
|
20
20
|
function publicThreadOrNull(thread: Doc<"threads"> | null): ThreadDoc | null {
|
|
21
21
|
if (thread === null) {
|
package/src/component/users.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { paginator } from "convex-helpers/server/pagination";
|
|
2
|
+
import { stream } from "convex-helpers/server/stream";
|
|
2
3
|
import { nullable } from "convex-helpers/validators";
|
|
3
|
-
import {
|
|
4
|
+
import { paginationOptsValidator } from "convex/server";
|
|
5
|
+
import type { ObjectType } from "convex/values";
|
|
6
|
+
import { vPaginationResult } from "../validators.js";
|
|
4
7
|
import { internal } from "./_generated/api.js";
|
|
8
|
+
import type { Id } from "./_generated/dataModel.js";
|
|
5
9
|
import {
|
|
6
10
|
action,
|
|
7
11
|
internalMutation,
|
|
8
12
|
internalQuery,
|
|
9
13
|
mutation,
|
|
10
|
-
MutationCtx,
|
|
14
|
+
type MutationCtx,
|
|
11
15
|
query,
|
|
12
16
|
} from "./_generated/server.js";
|
|
13
|
-
import { schema, v } from "./schema.js";
|
|
14
17
|
import { deleteMessage } from "./messages.js";
|
|
15
|
-
import {
|
|
16
|
-
import { stream } from "convex-helpers/server/stream";
|
|
17
|
-
import { vPaginationResult } from "../validators.js";
|
|
18
|
-
import { Id } from "./_generated/dataModel.js";
|
|
18
|
+
import { schema, v } from "./schema.js";
|
|
19
19
|
|
|
20
20
|
// Note: it only searches for users with threads
|
|
21
21
|
export const listUsersWithThreads = query({
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import { paginator } from "convex-helpers/server/pagination";
|
|
2
|
+
import { mergedStream, stream } from "convex-helpers/server/stream";
|
|
2
3
|
import { v } from "convex/values";
|
|
3
|
-
import {
|
|
4
|
+
import type { Id } from "../_generated/dataModel.js";
|
|
4
5
|
import {
|
|
5
|
-
|
|
6
|
+
type ActionCtx,
|
|
7
|
+
mutation,
|
|
8
|
+
type MutationCtx,
|
|
9
|
+
query,
|
|
10
|
+
} from "../_generated/server.js";
|
|
11
|
+
import schema from "../schema.js";
|
|
12
|
+
import {
|
|
13
|
+
type EmbeddingsWithoutDenormalizedFields,
|
|
6
14
|
getVectorTableName,
|
|
7
|
-
VectorDimension,
|
|
15
|
+
type VectorDimension,
|
|
8
16
|
vEmbeddingsWithoutDenormalizedFields,
|
|
9
17
|
vVectorDimension,
|
|
10
18
|
vVectorId,
|
|
11
|
-
} from "./tables";
|
|
12
|
-
import schema from "../schema";
|
|
13
|
-
import { mergedStream } from "convex-helpers/server/stream";
|
|
14
|
-
import { stream } from "convex-helpers/server/stream";
|
|
15
|
-
import { Id } from "../_generated/dataModel";
|
|
19
|
+
} from "./tables.js";
|
|
16
20
|
|
|
17
21
|
export const paginate = query({
|
|
18
22
|
args: {
|
|
@@ -93,12 +97,23 @@ export const deleteBatchForThread = mutation({
|
|
|
93
97
|
export const insertBatch = mutation({
|
|
94
98
|
args: {
|
|
95
99
|
vectorDimension: vVectorDimension,
|
|
96
|
-
vectors: v.array(
|
|
100
|
+
vectors: v.array(
|
|
101
|
+
v.object({
|
|
102
|
+
...vEmbeddingsWithoutDenormalizedFields.fields,
|
|
103
|
+
messageId: v.optional(v.id("messages")),
|
|
104
|
+
})
|
|
105
|
+
),
|
|
97
106
|
},
|
|
98
|
-
returns: v.
|
|
107
|
+
returns: v.array(vVectorId),
|
|
99
108
|
handler: async (ctx, args) => {
|
|
100
|
-
|
|
101
|
-
args.vectors.map(
|
|
109
|
+
return Promise.all(
|
|
110
|
+
args.vectors.map(async ({ messageId, ...v }) => {
|
|
111
|
+
const embeddingId = await insertVector(ctx, args.vectorDimension, v);
|
|
112
|
+
if (messageId) {
|
|
113
|
+
await ctx.db.patch(messageId, { embeddingId });
|
|
114
|
+
}
|
|
115
|
+
return embeddingId;
|
|
116
|
+
})
|
|
102
117
|
);
|
|
103
118
|
},
|
|
104
119
|
});
|
|
@@ -2,20 +2,20 @@ import { omit } from "convex-helpers";
|
|
|
2
2
|
import { literals } from "convex-helpers/validators";
|
|
3
3
|
import {
|
|
4
4
|
defineTable,
|
|
5
|
-
GenericTableSearchIndexes,
|
|
6
|
-
SchemaDefinition,
|
|
7
|
-
TableDefinition,
|
|
5
|
+
type GenericTableSearchIndexes,
|
|
6
|
+
type SchemaDefinition,
|
|
7
|
+
type TableDefinition,
|
|
8
8
|
} from "convex/server";
|
|
9
9
|
import {
|
|
10
|
-
GenericId,
|
|
11
|
-
Infer,
|
|
12
|
-
ObjectType,
|
|
10
|
+
type GenericId,
|
|
11
|
+
type Infer,
|
|
12
|
+
type ObjectType,
|
|
13
13
|
v,
|
|
14
|
-
VId,
|
|
15
|
-
VObject,
|
|
16
|
-
VUnion,
|
|
14
|
+
type VId,
|
|
15
|
+
type VObject,
|
|
16
|
+
type VUnion,
|
|
17
17
|
} from "convex/values";
|
|
18
|
-
import { QueryCtx } from "../_generated/server";
|
|
18
|
+
import type { QueryCtx } from "../_generated/server";
|
|
19
19
|
|
|
20
20
|
// We only generate embeddings for non-tool, non-system messages
|
|
21
21
|
const embeddings = {
|
package/src/mapping.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
+
import type { FileUIPart } from "@ai-sdk/ui-utils";
|
|
1
2
|
import {
|
|
2
3
|
convertToCoreMessages,
|
|
3
4
|
coreMessageSchema,
|
|
4
|
-
|
|
5
|
+
type Message as AIMessage,
|
|
5
6
|
type AssistantContent,
|
|
6
7
|
type CoreMessage,
|
|
7
8
|
type DataContent,
|
|
9
|
+
type GenerateObjectResult,
|
|
8
10
|
type StepResult,
|
|
9
11
|
type ToolContent,
|
|
10
12
|
type ToolSet,
|
|
11
|
-
type Message as AIMessage,
|
|
12
13
|
type UserContent,
|
|
13
14
|
} from "ai";
|
|
14
|
-
import type { FileUIPart } from "@ai-sdk/ui-utils";
|
|
15
15
|
import { assert } from "convex-helpers";
|
|
16
|
-
import {
|
|
16
|
+
import type {
|
|
17
17
|
MessageWithMetadata,
|
|
18
18
|
Step,
|
|
19
19
|
StepWithMessagesWithMetadata,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { UIMessage as AIUIMessage } from "ai";
|
|
2
1
|
import type { ToolInvocationUIPart } from "@ai-sdk/ui-utils";
|
|
3
|
-
import {
|
|
2
|
+
import type { UIMessage as AIUIMessage } from "ai";
|
|
3
|
+
import type { MessageDoc } from "../client";
|
|
4
4
|
import { deserializeMessage, toUIFilePart } from "../mapping";
|
|
5
|
-
import { MessageStatus } from "../validators";
|
|
5
|
+
import type { MessageStatus } from "../validators";
|
|
6
6
|
|
|
7
7
|
export type UIMessage = AIUIMessage & {
|
|
8
8
|
key: string;
|
package/src/shared.ts
CHANGED
package/src/validators.test.ts
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
|
+
TextStreamPart as AITextStreamPart,
|
|
3
|
+
AssistantContent,
|
|
4
|
+
CoreAssistantMessage,
|
|
5
|
+
CoreMessage,
|
|
6
|
+
CoreSystemMessage,
|
|
7
|
+
CoreToolMessage,
|
|
8
|
+
CoreUserMessage,
|
|
9
|
+
FilePart,
|
|
10
|
+
ImagePart,
|
|
11
|
+
TextPart,
|
|
12
|
+
ToolCallPart,
|
|
13
|
+
ToolContent,
|
|
14
|
+
ToolSet,
|
|
15
|
+
UserContent,
|
|
16
|
+
} from "ai";
|
|
17
|
+
import type { Infer } from "convex/values";
|
|
2
18
|
import { expectTypeOf, test } from "vitest";
|
|
19
|
+
import type { ContextOptions, StorageOptions } from "./client";
|
|
20
|
+
import type { SerializeUrlsAndUint8Arrays } from "./mapping";
|
|
21
|
+
import type { TextStreamPart } from "./validators";
|
|
3
22
|
import {
|
|
4
23
|
vAssistantContent,
|
|
5
24
|
vAssistantMessage,
|
|
@@ -15,28 +34,9 @@ import {
|
|
|
15
34
|
vToolCallPart,
|
|
16
35
|
vToolContent,
|
|
17
36
|
vToolMessage,
|
|
37
|
+
vUserContent,
|
|
18
38
|
vUserMessage,
|
|
19
39
|
} from "./validators";
|
|
20
|
-
import { vUserContent } from "./validators";
|
|
21
|
-
import type { TextStreamPart } from "./validators";
|
|
22
|
-
import {
|
|
23
|
-
AssistantContent,
|
|
24
|
-
CoreAssistantMessage,
|
|
25
|
-
CoreMessage,
|
|
26
|
-
CoreSystemMessage,
|
|
27
|
-
CoreToolMessage,
|
|
28
|
-
CoreUserMessage,
|
|
29
|
-
FilePart,
|
|
30
|
-
ImagePart,
|
|
31
|
-
TextPart,
|
|
32
|
-
TextStreamPart as AITextStreamPart,
|
|
33
|
-
ToolCallPart,
|
|
34
|
-
ToolContent,
|
|
35
|
-
ToolSet,
|
|
36
|
-
UserContent,
|
|
37
|
-
} from "ai";
|
|
38
|
-
import { SerializeUrlsAndUint8Arrays } from "./mapping";
|
|
39
|
-
import { ContextOptions, StorageOptions } from "./client";
|
|
40
40
|
|
|
41
41
|
// type assertion
|
|
42
42
|
type OurUserContent = SerializeUrlsAndUint8Arrays<UserContent>;
|
|
@@ -125,4 +125,4 @@ type StreamPart = Extract<
|
|
|
125
125
|
>;
|
|
126
126
|
expectTypeOf<StreamPart>().toExtend<TextStreamPart>();
|
|
127
127
|
|
|
128
|
-
test("noop", () => {
|
|
128
|
+
test("noop", () => {});
|
package/src/validators.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
v,
|
|
3
|
+
type Infer,
|
|
4
|
+
type ObjectType,
|
|
5
|
+
type Validator,
|
|
6
|
+
type Value,
|
|
7
|
+
} from "convex/values";
|
|
8
|
+
import { vVectorDimension } from "./component/vector/tables.js";
|
|
3
9
|
|
|
4
10
|
// const deprecated = v.optional(v.any()) as unknown as VNull<unknown, "optional">;
|
|
5
11
|
|