@zenning/ai 6.0.30 → 6.0.31

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # ai
2
2
 
3
+ ## 6.0.31
4
+
5
+ ### Patch Changes
6
+
7
+ - compaction chunks
8
+ - Updated dependencies
9
+ - @zenning/provider@3.0.6
10
+ - @zenning/gateway@3.0.13
11
+ - @zenning/provider-utils@4.0.8
12
+
3
13
  ## 6.0.30
4
14
 
5
15
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -2514,6 +2514,11 @@ type TextStreamPart<TOOLS extends ToolSet> = {
2514
2514
  } | {
2515
2515
  type: 'raw';
2516
2516
  rawValue: unknown;
2517
+ } | {
2518
+ type: 'compaction';
2519
+ id: string;
2520
+ encrypted_content: string;
2521
+ providerMetadata?: ProviderMetadata;
2517
2522
  };
2518
2523
 
2519
2524
  /**
@@ -4029,6 +4034,11 @@ type SingleRequestTextStreamPart<TOOLS extends ToolSet> = {
4029
4034
  } | {
4030
4035
  type: 'raw';
4031
4036
  rawValue: unknown;
4037
+ } | {
4038
+ type: 'compaction';
4039
+ id: string;
4040
+ encrypted_content: string;
4041
+ providerMetadata?: ProviderMetadata;
4032
4042
  };
4033
4043
 
4034
4044
  declare const symbol$b: unique symbol;
package/dist/index.d.ts CHANGED
@@ -2514,6 +2514,11 @@ type TextStreamPart<TOOLS extends ToolSet> = {
2514
2514
  } | {
2515
2515
  type: 'raw';
2516
2516
  rawValue: unknown;
2517
+ } | {
2518
+ type: 'compaction';
2519
+ id: string;
2520
+ encrypted_content: string;
2521
+ providerMetadata?: ProviderMetadata;
2517
2522
  };
2518
2523
 
2519
2524
  /**
@@ -4029,6 +4034,11 @@ type SingleRequestTextStreamPart<TOOLS extends ToolSet> = {
4029
4034
  } | {
4030
4035
  type: 'raw';
4031
4036
  rawValue: unknown;
4037
+ } | {
4038
+ type: 'compaction';
4039
+ id: string;
4040
+ encrypted_content: string;
4041
+ providerMetadata?: ProviderMetadata;
4032
4042
  };
4033
4043
 
4034
4044
  declare const symbol$b: unique symbol;
package/dist/index.js CHANGED
@@ -1001,7 +1001,7 @@ var import_provider_utils3 = require("@zenning/provider-utils");
1001
1001
  var import_provider_utils4 = require("@zenning/provider-utils");
1002
1002
 
1003
1003
  // src/version.ts
1004
- var VERSION = true ? "6.0.30" : "0.0.0-test";
1004
+ var VERSION = true ? "6.0.31" : "0.0.0-test";
1005
1005
 
1006
1006
  // src/util/download/download.ts
1007
1007
  var download = async ({ url }) => {
@@ -5592,7 +5592,8 @@ function runToolsTransformation({
5592
5592
  case "source":
5593
5593
  case "response-metadata":
5594
5594
  case "error":
5595
- case "raw": {
5595
+ case "raw":
5596
+ case "compaction": {
5596
5597
  controller.enqueue(chunk);
5597
5598
  break;
5598
5599
  }
@@ -6659,6 +6660,10 @@ var DefaultStreamTextResult = class {
6659
6660
  }
6660
6661
  break;
6661
6662
  }
6663
+ case "compaction": {
6664
+ controller.enqueue(chunk);
6665
+ break;
6666
+ }
6662
6667
  default: {
6663
6668
  const exhaustiveCheck = chunkType;
6664
6669
  throw new Error(`Unknown chunk type: ${exhaustiveCheck}`);
@@ -7195,6 +7200,14 @@ var DefaultStreamTextResult = class {
7195
7200
  case "raw": {
7196
7201
  break;
7197
7202
  }
7203
+ case "compaction": {
7204
+ controller.enqueue({
7205
+ type: "compaction",
7206
+ id: part.id,
7207
+ encrypted_content: part.encrypted_content
7208
+ });
7209
+ break;
7210
+ }
7198
7211
  default: {
7199
7212
  const exhaustiveCheck = partType;
7200
7213
  throw new Error(`Unknown chunk type: ${exhaustiveCheck}`);