@zenning/ai 5.2.0 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +14 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.js +21 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -1
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/internal/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1405,7 +1405,7 @@ interface UIMessage<METADATA = unknown, DATA_PARTS extends UIDataTypes = UIDataT
|
|
|
1405
1405
|
*/
|
|
1406
1406
|
parts: Array<UIMessagePart<DATA_PARTS, TOOLS>>;
|
|
1407
1407
|
}
|
|
1408
|
-
type UIMessagePart<DATA_TYPES extends UIDataTypes, TOOLS extends UITools> = TextUIPart | ReasoningUIPart | ToolUIPart<TOOLS> | DynamicToolUIPart | SourceUrlUIPart | SourceDocumentUIPart | FileUIPart | DataUIPart<DATA_TYPES> | StepStartUIPart;
|
|
1408
|
+
type UIMessagePart<DATA_TYPES extends UIDataTypes, TOOLS extends UITools> = TextUIPart | ReasoningUIPart | ToolUIPart<TOOLS> | DynamicToolUIPart | SourceUrlUIPart | SourceDocumentUIPart | FileUIPart | SourceExecutionFileUIPart | DataUIPart<DATA_TYPES> | StepStartUIPart;
|
|
1409
1409
|
/**
|
|
1410
1410
|
* A text part of a message.
|
|
1411
1411
|
*/
|
|
@@ -1452,6 +1452,11 @@ type SourceUrlUIPart = {
|
|
|
1452
1452
|
title?: string;
|
|
1453
1453
|
providerMetadata?: ProviderMetadata;
|
|
1454
1454
|
};
|
|
1455
|
+
type SourceExecutionFileUIPart = {
|
|
1456
|
+
type: 'source-execution-file';
|
|
1457
|
+
sourceId: string;
|
|
1458
|
+
providerMetadata?: ProviderMetadata;
|
|
1459
|
+
};
|
|
1455
1460
|
/**
|
|
1456
1461
|
* A document source part of a message.
|
|
1457
1462
|
*/
|
|
@@ -1683,6 +1688,10 @@ declare const uiMessageChunkSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1683
1688
|
url: z.ZodString;
|
|
1684
1689
|
mediaType: z.ZodString;
|
|
1685
1690
|
providerMetadata: z.ZodOptional<z.ZodType<_zenning_provider.SharedV3ProviderMetadata, unknown, z.core.$ZodTypeInternals<_zenning_provider.SharedV3ProviderMetadata, unknown>>>;
|
|
1691
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1692
|
+
type: z.ZodLiteral<"source-execution-file">;
|
|
1693
|
+
sourceId: z.ZodString;
|
|
1694
|
+
providerMetadata: z.ZodOptional<z.ZodType<_zenning_provider.SharedV3ProviderMetadata, unknown, z.core.$ZodTypeInternals<_zenning_provider.SharedV3ProviderMetadata, unknown>>>;
|
|
1686
1695
|
}, z.core.$strict>, z.ZodObject<{
|
|
1687
1696
|
type: z.ZodCustom<`data-${string}`, `data-${string}`>;
|
|
1688
1697
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -1798,6 +1807,10 @@ type UIMessageChunk<METADATA = unknown, DATA_TYPES extends UIDataTypes = UIDataT
|
|
|
1798
1807
|
startIndex?: number;
|
|
1799
1808
|
endIndex?: number;
|
|
1800
1809
|
providerMetadata?: ProviderMetadata;
|
|
1810
|
+
} | {
|
|
1811
|
+
type: 'source-execution-file';
|
|
1812
|
+
sourceId: string;
|
|
1813
|
+
providerMetadata?: ProviderMetadata;
|
|
1801
1814
|
} | {
|
|
1802
1815
|
type: 'file';
|
|
1803
1816
|
url: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1405,7 +1405,7 @@ interface UIMessage<METADATA = unknown, DATA_PARTS extends UIDataTypes = UIDataT
|
|
|
1405
1405
|
*/
|
|
1406
1406
|
parts: Array<UIMessagePart<DATA_PARTS, TOOLS>>;
|
|
1407
1407
|
}
|
|
1408
|
-
type UIMessagePart<DATA_TYPES extends UIDataTypes, TOOLS extends UITools> = TextUIPart | ReasoningUIPart | ToolUIPart<TOOLS> | DynamicToolUIPart | SourceUrlUIPart | SourceDocumentUIPart | FileUIPart | DataUIPart<DATA_TYPES> | StepStartUIPart;
|
|
1408
|
+
type UIMessagePart<DATA_TYPES extends UIDataTypes, TOOLS extends UITools> = TextUIPart | ReasoningUIPart | ToolUIPart<TOOLS> | DynamicToolUIPart | SourceUrlUIPart | SourceDocumentUIPart | FileUIPart | SourceExecutionFileUIPart | DataUIPart<DATA_TYPES> | StepStartUIPart;
|
|
1409
1409
|
/**
|
|
1410
1410
|
* A text part of a message.
|
|
1411
1411
|
*/
|
|
@@ -1452,6 +1452,11 @@ type SourceUrlUIPart = {
|
|
|
1452
1452
|
title?: string;
|
|
1453
1453
|
providerMetadata?: ProviderMetadata;
|
|
1454
1454
|
};
|
|
1455
|
+
type SourceExecutionFileUIPart = {
|
|
1456
|
+
type: 'source-execution-file';
|
|
1457
|
+
sourceId: string;
|
|
1458
|
+
providerMetadata?: ProviderMetadata;
|
|
1459
|
+
};
|
|
1455
1460
|
/**
|
|
1456
1461
|
* A document source part of a message.
|
|
1457
1462
|
*/
|
|
@@ -1683,6 +1688,10 @@ declare const uiMessageChunkSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1683
1688
|
url: z.ZodString;
|
|
1684
1689
|
mediaType: z.ZodString;
|
|
1685
1690
|
providerMetadata: z.ZodOptional<z.ZodType<_zenning_provider.SharedV3ProviderMetadata, unknown, z.core.$ZodTypeInternals<_zenning_provider.SharedV3ProviderMetadata, unknown>>>;
|
|
1691
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1692
|
+
type: z.ZodLiteral<"source-execution-file">;
|
|
1693
|
+
sourceId: z.ZodString;
|
|
1694
|
+
providerMetadata: z.ZodOptional<z.ZodType<_zenning_provider.SharedV3ProviderMetadata, unknown, z.core.$ZodTypeInternals<_zenning_provider.SharedV3ProviderMetadata, unknown>>>;
|
|
1686
1695
|
}, z.core.$strict>, z.ZodObject<{
|
|
1687
1696
|
type: z.ZodCustom<`data-${string}`, `data-${string}`>;
|
|
1688
1697
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -1798,6 +1807,10 @@ type UIMessageChunk<METADATA = unknown, DATA_TYPES extends UIDataTypes = UIDataT
|
|
|
1798
1807
|
startIndex?: number;
|
|
1799
1808
|
endIndex?: number;
|
|
1800
1809
|
providerMetadata?: ProviderMetadata;
|
|
1810
|
+
} | {
|
|
1811
|
+
type: 'source-execution-file';
|
|
1812
|
+
sourceId: string;
|
|
1813
|
+
providerMetadata?: ProviderMetadata;
|
|
1801
1814
|
} | {
|
|
1802
1815
|
type: 'file';
|
|
1803
1816
|
url: string;
|
package/dist/index.js
CHANGED
|
@@ -802,7 +802,7 @@ function detectMediaType({
|
|
|
802
802
|
var import_provider_utils2 = require("@zenning/provider-utils");
|
|
803
803
|
|
|
804
804
|
// src/version.ts
|
|
805
|
-
var VERSION = true ? "5.
|
|
805
|
+
var VERSION = true ? "5.3.0" : "0.0.0-test";
|
|
806
806
|
|
|
807
807
|
// src/util/download/download.ts
|
|
808
808
|
var download = async ({ url }) => {
|
|
@@ -3064,6 +3064,11 @@ var uiMessageChunkSchema = import_v47.z.union([
|
|
|
3064
3064
|
mediaType: import_v47.z.string(),
|
|
3065
3065
|
providerMetadata: providerMetadataSchema.optional()
|
|
3066
3066
|
}),
|
|
3067
|
+
import_v47.z.strictObject({
|
|
3068
|
+
type: import_v47.z.literal("source-execution-file"),
|
|
3069
|
+
sourceId: import_v47.z.string(),
|
|
3070
|
+
providerMetadata: providerMetadataSchema.optional()
|
|
3071
|
+
}),
|
|
3067
3072
|
import_v47.z.strictObject({
|
|
3068
3073
|
type: import_v47.z.custom(
|
|
3069
3074
|
(value) => typeof value === "string" && value.startsWith("data-"),
|
|
@@ -3698,6 +3703,15 @@ function processUIMessageStream({
|
|
|
3698
3703
|
write();
|
|
3699
3704
|
break;
|
|
3700
3705
|
}
|
|
3706
|
+
case "source-execution-file": {
|
|
3707
|
+
state.message.parts.push({
|
|
3708
|
+
type: "source-execution-file",
|
|
3709
|
+
sourceId: chunk.sourceId,
|
|
3710
|
+
providerMetadata: chunk.providerMetadata
|
|
3711
|
+
});
|
|
3712
|
+
write();
|
|
3713
|
+
break;
|
|
3714
|
+
}
|
|
3701
3715
|
case "source-document": {
|
|
3702
3716
|
state.message.parts.push({
|
|
3703
3717
|
type: "source-document",
|
|
@@ -10224,6 +10238,11 @@ var dynamicToolUIPartSchemas = [
|
|
|
10224
10238
|
callProviderMetadata: providerMetadataSchema.optional()
|
|
10225
10239
|
})
|
|
10226
10240
|
];
|
|
10241
|
+
var sourceExecutionFileUIPartSchema = import_v410.z.object({
|
|
10242
|
+
type: import_v410.z.literal("source-execution-file"),
|
|
10243
|
+
sourceId: import_v410.z.string(),
|
|
10244
|
+
providerMetadata: providerMetadataSchema.optional()
|
|
10245
|
+
});
|
|
10227
10246
|
var toolUIPartSchemas = [
|
|
10228
10247
|
import_v410.z.object({
|
|
10229
10248
|
type: import_v410.z.string().startsWith("tool-"),
|
|
@@ -10278,6 +10297,7 @@ var uiMessageSchema = import_v410.z.object({
|
|
|
10278
10297
|
sourceDocumentUIPartSchema,
|
|
10279
10298
|
fileUIPartSchema,
|
|
10280
10299
|
stepStartUIPartSchema,
|
|
10300
|
+
sourceExecutionFileUIPartSchema,
|
|
10281
10301
|
dataUIPartSchema,
|
|
10282
10302
|
...dynamicToolUIPartSchemas,
|
|
10283
10303
|
...toolUIPartSchemas
|