@google/genai 1.35.0 → 1.37.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/web/web.d.ts CHANGED
@@ -417,11 +417,17 @@ export declare interface AudioChunk {
417
417
  */
418
418
  declare interface AudioContent {
419
419
  type: 'audio';
420
+ /**
421
+ * The audio content.
422
+ */
420
423
  data?: string;
421
424
  /**
422
425
  * The mime type of the audio.
423
426
  */
424
427
  mime_type?: AudioMimeType;
428
+ /**
429
+ * The URI of the audio.
430
+ */
425
431
  uri?: string;
426
432
  }
427
433
 
@@ -581,7 +587,7 @@ declare interface BaseCreateAgentInteractionParams {
581
587
  /**
582
588
  * Body param: The inputs for the interaction.
583
589
  */
584
- input: string | Array<Content_2> | Array<Turn> | TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchResultContent;
590
+ input: string | Array<Content_2> | Array<Turn> | TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchCallContent | FileSearchResultContent;
585
591
  /**
586
592
  * Path param: Which version of the API to use.
587
593
  */
@@ -633,7 +639,7 @@ declare interface BaseCreateModelInteractionParams {
633
639
  /**
634
640
  * Body param: The inputs for the interaction.
635
641
  */
636
- input: string | Array<Content_2> | Array<Turn> | TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchResultContent;
642
+ input: string | Array<Content_2> | Array<Turn> | TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchCallContent | FileSearchResultContent;
637
643
  /**
638
644
  * Body param: The name of the `Model` used for generating the interaction.
639
645
  */
@@ -1701,6 +1707,12 @@ export declare class ComputeTokensResponse {
1701
1707
  tokensInfo?: TokensInfo[];
1702
1708
  }
1703
1709
 
1710
+ /** Local tokenizer compute tokens result. */
1711
+ export declare interface ComputeTokensResult {
1712
+ /** Lists of tokens info from the input. */
1713
+ tokensInfo?: TokensInfo[];
1714
+ }
1715
+
1704
1716
  declare type _ConditionalNodeReadableStream<R = any> = typeof globalThis extends {
1705
1717
  ReadableStream: any;
1706
1718
  } ? never : _NodeReadableStream<R>;
@@ -1720,10 +1732,10 @@ export declare interface Content {
1720
1732
  /**
1721
1733
  * The content of the response.
1722
1734
  */
1723
- declare type Content_2 = TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchResultContent;
1735
+ declare type Content_2 = TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchCallContent | FileSearchResultContent;
1724
1736
 
1725
1737
  declare interface ContentDelta {
1726
- delta?: ContentDelta.TextDelta | ContentDelta.ImageDelta | ContentDelta.AudioDelta | ContentDelta.DocumentDelta | ContentDelta.VideoDelta | ContentDelta.ThoughtSummaryDelta | ContentDelta.ThoughtSignatureDelta | ContentDelta.FunctionCallDelta | ContentDelta.FunctionResultDelta | ContentDelta.CodeExecutionCallDelta | ContentDelta.CodeExecutionResultDelta | ContentDelta.URLContextCallDelta | ContentDelta.URLContextResultDelta | ContentDelta.GoogleSearchCallDelta | ContentDelta.GoogleSearchResultDelta | ContentDelta.MCPServerToolCallDelta | ContentDelta.MCPServerToolResultDelta | ContentDelta.FileSearchResultDelta;
1738
+ delta?: ContentDelta.TextDelta | ContentDelta.ImageDelta | ContentDelta.AudioDelta | ContentDelta.DocumentDelta | ContentDelta.VideoDelta | ContentDelta.ThoughtSummaryDelta | ContentDelta.ThoughtSignatureDelta | ContentDelta.FunctionCallDelta | ContentDelta.FunctionResultDelta | ContentDelta.CodeExecutionCallDelta | ContentDelta.CodeExecutionResultDelta | ContentDelta.URLContextCallDelta | ContentDelta.URLContextResultDelta | ContentDelta.GoogleSearchCallDelta | ContentDelta.GoogleSearchResultDelta | ContentDelta.MCPServerToolCallDelta | ContentDelta.MCPServerToolResultDelta | ContentDelta.FileSearchCallDelta | ContentDelta.FileSearchResultDelta;
1727
1739
  /**
1728
1740
  * The event_id token to be used to resume the interaction stream, from this event.
1729
1741
  */
@@ -1921,6 +1933,13 @@ declare namespace ContentDelta {
1921
1933
  items?: Array<string | InteractionsAPI.ImageContent | unknown>;
1922
1934
  }
1923
1935
  }
1936
+ interface FileSearchCallDelta {
1937
+ type: 'file_search_call';
1938
+ /**
1939
+ * A unique ID for this specific tool call.
1940
+ */
1941
+ id?: string;
1942
+ }
1924
1943
  interface FileSearchResultDelta {
1925
1944
  type: 'file_search_result';
1926
1945
  result?: Array<FileSearchResultDelta.Result>;
@@ -2103,6 +2122,12 @@ export declare class CountTokensResponse {
2103
2122
  cachedContentTokenCount?: number;
2104
2123
  }
2105
2124
 
2125
+ /** Local tokenizer count tokens result. */
2126
+ export declare interface CountTokensResult {
2127
+ /** The total number of tokens. */
2128
+ totalTokens?: number;
2129
+ }
2130
+
2106
2131
  declare interface CreateAgentInteractionParamsNonStreaming extends BaseCreateAgentInteractionParams {
2107
2132
  /**
2108
2133
  * Body param: Input only. Whether the interaction will be streamed.
@@ -2754,11 +2779,17 @@ export { Document_2 as Document }
2754
2779
  */
2755
2780
  declare interface DocumentContent {
2756
2781
  type: 'document';
2782
+ /**
2783
+ * The document content.
2784
+ */
2757
2785
  data?: string;
2758
2786
  /**
2759
2787
  * The mime type of the document.
2760
2788
  */
2761
2789
  mime_type?: DocumentMimeType;
2790
+ /**
2791
+ * The URI of the document.
2792
+ */
2762
2793
  uri?: string;
2763
2794
  }
2764
2795
 
@@ -3399,6 +3430,17 @@ export declare interface FileSearch {
3399
3430
  metadataFilter?: string;
3400
3431
  }
3401
3432
 
3433
+ /**
3434
+ * File Search content.
3435
+ */
3436
+ declare interface FileSearchCallContent {
3437
+ type: 'file_search_call';
3438
+ /**
3439
+ * A unique ID for this specific tool call.
3440
+ */
3441
+ id?: string;
3442
+ }
3443
+
3402
3444
  /**
3403
3445
  * File Search result content.
3404
3446
  */
@@ -4560,6 +4602,10 @@ export declare interface GenerationConfig {
4560
4602
  * Configuration parameters for model interactions.
4561
4603
  */
4562
4604
  declare interface GenerationConfig_2 {
4605
+ /**
4606
+ * Configuration for image interaction.
4607
+ */
4608
+ image_config?: ImageConfig_2;
4563
4609
  /**
4564
4610
  * The maximum number of tokens to include in the response.
4565
4611
  */
@@ -5436,11 +5482,22 @@ export declare interface ImageConfig {
5436
5482
  outputCompressionQuality?: number;
5437
5483
  }
5438
5484
 
5485
+ /**
5486
+ * The configuration for image interaction.
5487
+ */
5488
+ declare interface ImageConfig_2 {
5489
+ aspect_ratio?: '1:1' | '2:3' | '3:2' | '3:4' | '4:3' | '4:5' | '5:4' | '9:16' | '16:9' | '21:9';
5490
+ image_size?: '1K' | '2K' | '4K';
5491
+ }
5492
+
5439
5493
  /**
5440
5494
  * An image content block.
5441
5495
  */
5442
5496
  declare interface ImageContent {
5443
5497
  type: 'image';
5498
+ /**
5499
+ * The image content.
5500
+ */
5444
5501
  data?: string;
5445
5502
  /**
5446
5503
  * The mime type of the image.
@@ -5450,6 +5507,9 @@ declare interface ImageContent {
5450
5507
  * The resolution of the media.
5451
5508
  */
5452
5509
  resolution?: 'low' | 'medium' | 'high' | 'ultra_high';
5510
+ /**
5511
+ * The URI of the image.
5512
+ */
5453
5513
  uri?: string;
5454
5514
  }
5455
5515
 
@@ -5705,7 +5765,7 @@ export declare class Interactions extends BaseInteractions {
5705
5765
  }
5706
5766
 
5707
5767
  export declare namespace Interactions {
5708
- export { type AllowedTools as AllowedTools, type Annotation as Annotation, type AudioContent as AudioContent, type AudioMimeType as AudioMimeType, type CodeExecutionCallArguments as CodeExecutionCallArguments, type CodeExecutionCallContent as CodeExecutionCallContent, type CodeExecutionResultContent as CodeExecutionResultContent, type Content_2 as Content, type ContentDelta as ContentDelta, type ContentStart as ContentStart, type ContentStop as ContentStop, type DeepResearchAgentConfig as DeepResearchAgentConfig, type DocumentContent as DocumentContent, type DocumentMimeType as DocumentMimeType, type DynamicAgentConfig as DynamicAgentConfig, type ErrorEvent_2 as ErrorEvent, type FileSearchResultContent as FileSearchResultContent, type Function_2 as Function, type FunctionCallContent as FunctionCallContent, type FunctionResultContent as FunctionResultContent, type GenerationConfig_2 as GenerationConfig, type GoogleSearchCallArguments as GoogleSearchCallArguments, type GoogleSearchCallContent as GoogleSearchCallContent, type GoogleSearchResult as GoogleSearchResult, type GoogleSearchResultContent as GoogleSearchResultContent, type ImageContent as ImageContent, type ImageMimeType as ImageMimeType, type Interaction as Interaction, type InteractionEvent as InteractionEvent, type InteractionSSEEvent as InteractionSSEEvent, type InteractionStatusUpdate as InteractionStatusUpdate, type MCPServerToolCallContent as MCPServerToolCallContent, type MCPServerToolResultContent as MCPServerToolResultContent, type Model_2 as Model, type SpeechConfig_2 as SpeechConfig, type TextContent as TextContent, type ThinkingLevel_2 as ThinkingLevel, type ThoughtContent as ThoughtContent, type Tool_2 as Tool, type ToolChoice as ToolChoice, type ToolChoiceConfig as ToolChoiceConfig, type ToolChoiceType as ToolChoiceType, type Turn as Turn, type URLContextCallArguments as URLContextCallArguments, type URLContextCallContent as URLContextCallContent, type URLContextResult as URLContextResult, type URLContextResultContent as URLContextResultContent, type Usage as Usage, type VideoContent as VideoContent, type VideoMimeType as VideoMimeType, type InteractionDeleteResponse as InteractionDeleteResponse, type InteractionCreateParams as InteractionCreateParams, type CreateModelInteractionParamsNonStreaming as CreateModelInteractionParamsNonStreaming, type CreateModelInteractionParamsStreaming as CreateModelInteractionParamsStreaming, type CreateAgentInteractionParamsNonStreaming as CreateAgentInteractionParamsNonStreaming, type CreateAgentInteractionParamsStreaming as CreateAgentInteractionParamsStreaming, type InteractionDeleteParams as InteractionDeleteParams, type InteractionCancelParams as InteractionCancelParams, type InteractionGetParams as InteractionGetParams, type InteractionGetParamsNonStreaming as InteractionGetParamsNonStreaming, type InteractionGetParamsStreaming as InteractionGetParamsStreaming, };
5768
+ export { type AllowedTools as AllowedTools, type Annotation as Annotation, type AudioContent as AudioContent, type AudioMimeType as AudioMimeType, type CodeExecutionCallArguments as CodeExecutionCallArguments, type CodeExecutionCallContent as CodeExecutionCallContent, type CodeExecutionResultContent as CodeExecutionResultContent, type Content_2 as Content, type ContentDelta as ContentDelta, type ContentStart as ContentStart, type ContentStop as ContentStop, type DeepResearchAgentConfig as DeepResearchAgentConfig, type DocumentContent as DocumentContent, type DocumentMimeType as DocumentMimeType, type DynamicAgentConfig as DynamicAgentConfig, type ErrorEvent_2 as ErrorEvent, type FileSearchCallContent as FileSearchCallContent, type FileSearchResultContent as FileSearchResultContent, type Function_2 as Function, type FunctionCallContent as FunctionCallContent, type FunctionResultContent as FunctionResultContent, type GenerationConfig_2 as GenerationConfig, type GoogleSearchCallArguments as GoogleSearchCallArguments, type GoogleSearchCallContent as GoogleSearchCallContent, type GoogleSearchResult as GoogleSearchResult, type GoogleSearchResultContent as GoogleSearchResultContent, type ImageConfig_2 as ImageConfig, type ImageContent as ImageContent, type ImageMimeType as ImageMimeType, type Interaction as Interaction, type InteractionEvent as InteractionEvent, type InteractionSSEEvent as InteractionSSEEvent, type InteractionStatusUpdate as InteractionStatusUpdate, type MCPServerToolCallContent as MCPServerToolCallContent, type MCPServerToolResultContent as MCPServerToolResultContent, type Model_2 as Model, type SpeechConfig_2 as SpeechConfig, type TextContent as TextContent, type ThinkingLevel_2 as ThinkingLevel, type ThoughtContent as ThoughtContent, type Tool_2 as Tool, type ToolChoice as ToolChoice, type ToolChoiceConfig as ToolChoiceConfig, type ToolChoiceType as ToolChoiceType, type Turn as Turn, type URLContextCallArguments as URLContextCallArguments, type URLContextCallContent as URLContextCallContent, type URLContextResult as URLContextResult, type URLContextResultContent as URLContextResultContent, type Usage as Usage, type VideoContent as VideoContent, type VideoMimeType as VideoMimeType, type InteractionDeleteResponse as InteractionDeleteResponse, type InteractionCreateParams as InteractionCreateParams, type CreateModelInteractionParamsNonStreaming as CreateModelInteractionParamsNonStreaming, type CreateModelInteractionParamsStreaming as CreateModelInteractionParamsStreaming, type CreateAgentInteractionParamsNonStreaming as CreateAgentInteractionParamsNonStreaming, type CreateAgentInteractionParamsStreaming as CreateAgentInteractionParamsStreaming, type InteractionDeleteParams as InteractionDeleteParams, type InteractionCancelParams as InteractionCancelParams, type InteractionGetParams as InteractionGetParams, type InteractionGetParamsNonStreaming as InteractionGetParamsNonStreaming, type InteractionGetParamsStreaming as InteractionGetParamsStreaming, };
5709
5769
  }
5710
5770
 
5711
5771
  declare namespace InteractionsAPI {
@@ -5728,6 +5788,7 @@ declare namespace InteractionsAPI {
5728
5788
  DocumentMimeType,
5729
5789
  DynamicAgentConfig,
5730
5790
  ErrorEvent_2 as ErrorEvent,
5791
+ FileSearchCallContent,
5731
5792
  FileSearchResultContent,
5732
5793
  Function_2 as Function,
5733
5794
  FunctionCallContent,
@@ -5737,6 +5798,7 @@ declare namespace InteractionsAPI {
5737
5798
  GoogleSearchCallContent,
5738
5799
  GoogleSearchResult,
5739
5800
  GoogleSearchResultContent,
5801
+ ImageConfig_2 as ImageConfig,
5740
5802
  ImageContent,
5741
5803
  ImageMimeType,
5742
5804
  Interaction,
@@ -6810,8 +6872,10 @@ export declare class LiveServerMessage {
6810
6872
  goAway?: LiveServerGoAway;
6811
6873
  /** Update of the session resumption state. */
6812
6874
  sessionResumptionUpdate?: LiveServerSessionResumptionUpdate;
6813
- /** Voice activity detection signal. */
6875
+ /** Voice activity detection signal. Allowlisted only. */
6814
6876
  voiceActivityDetectionSignal?: VoiceActivityDetectionSignal;
6877
+ /** Voice activity signal. */
6878
+ voiceActivity?: VoiceActivity;
6815
6879
  /**
6816
6880
  * Returns the concatenation of all text parts from the server content if present.
6817
6881
  *
@@ -9828,6 +9892,7 @@ declare namespace types {
9828
9892
  TurnCompleteReason,
9829
9893
  MediaModality,
9830
9894
  VadSignalType,
9895
+ VoiceActivityType,
9831
9896
  StartSensitivity,
9832
9897
  EndSensitivity,
9833
9898
  ActivityHandling,
@@ -10150,6 +10215,7 @@ declare namespace types {
10150
10215
  LiveServerGoAway,
10151
10216
  LiveServerSessionResumptionUpdate,
10152
10217
  VoiceActivityDetectionSignal,
10218
+ VoiceActivity,
10153
10219
  LiveServerMessage,
10154
10220
  OperationFromAPIResponseParameters,
10155
10221
  GenerationConfigThinkingConfig,
@@ -10197,6 +10263,8 @@ declare namespace types {
10197
10263
  CreateAuthTokenConfig,
10198
10264
  CreateAuthTokenParameters,
10199
10265
  OperationGetParameters,
10266
+ CountTokensResult,
10267
+ ComputeTokensResult,
10200
10268
  CreateTuningJobParameters,
10201
10269
  UploadToFileSearchStoreResponse,
10202
10270
  UploadToFileSearchStoreOperation,
@@ -10837,6 +10905,9 @@ export declare enum VideoCompressionQuality {
10837
10905
  */
10838
10906
  declare interface VideoContent {
10839
10907
  type: 'video';
10908
+ /**
10909
+ * The video content.
10910
+ */
10840
10911
  data?: string;
10841
10912
  /**
10842
10913
  * The mime type of the video.
@@ -10846,6 +10917,9 @@ declare interface VideoContent {
10846
10917
  * The resolution of the media.
10847
10918
  */
10848
10919
  resolution?: 'low' | 'medium' | 'high' | 'ultra_high';
10920
+ /**
10921
+ * The URI of the video.
10922
+ */
10849
10923
  uri?: string;
10850
10924
  }
10851
10925
 
@@ -10925,11 +10999,33 @@ export declare interface VideoMetadata {
10925
10999
  */
10926
11000
  declare type VideoMimeType = 'video/mp4' | 'video/mpeg' | 'video/mov' | 'video/avi' | 'video/x-flv' | 'video/mpg' | 'video/webm' | 'video/wmv' | 'video/3gpp' | (string & {});
10927
11001
 
11002
+ /** Voice activity signal. */
11003
+ export declare interface VoiceActivity {
11004
+ /** The type of the voice activity signal. */
11005
+ voiceActivityType?: VoiceActivityType;
11006
+ }
11007
+
10928
11008
  export declare interface VoiceActivityDetectionSignal {
10929
11009
  /** The type of the VAD signal. */
10930
11010
  vadSignalType?: VadSignalType;
10931
11011
  }
10932
11012
 
11013
+ /** The type of the voice activity signal. */
11014
+ export declare enum VoiceActivityType {
11015
+ /**
11016
+ * The default is VOICE_ACTIVITY_TYPE_UNSPECIFIED.
11017
+ */
11018
+ TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED",
11019
+ /**
11020
+ * Start of sentence signal.
11021
+ */
11022
+ ACTIVITY_START = "ACTIVITY_START",
11023
+ /**
11024
+ * End of sentence signal.
11025
+ */
11026
+ ACTIVITY_END = "ACTIVITY_END"
11027
+ }
11028
+
10933
11029
  export declare interface VoiceConfig {
10934
11030
  /** If true, the model will use a replicated voice for the response. */
10935
11031
  replicatedVoiceConfig?: ReplicatedVoiceConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@google/genai",
3
- "version": "1.35.0",
3
+ "version": "1.37.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/node/index.mjs",
@@ -34,6 +34,24 @@
34
34
  "types": "./dist/node/node.d.ts",
35
35
  "import": "./dist/node/index.mjs",
36
36
  "default": "./dist/node/index.mjs"
37
+ },
38
+ "./tokenizer": {
39
+ "node": {
40
+ "types": "./dist/tokenizer/node.d.ts",
41
+ "import": "./dist/tokenizer/node.mjs",
42
+ "require": "./dist/tokenizer/node.cjs",
43
+ "default": "./dist/tokenizer/node.mjs"
44
+ },
45
+ "types": "./dist/tokenizer/node.d.ts",
46
+ "import": "./dist/tokenizer/node.mjs",
47
+ "require": "./dist/tokenizer/node.cjs",
48
+ "default": "./dist/tokenizer/node.mjs"
49
+ },
50
+ "./tokenizer/node": {
51
+ "types": "./dist/tokenizer/node.d.ts",
52
+ "import": "./dist/tokenizer/node.mjs",
53
+ "require": "./dist/tokenizer/node.cjs",
54
+ "default": "./dist/tokenizer/node.mjs"
37
55
  }
38
56
  },
39
57
  "scripts": {
@@ -43,10 +61,12 @@
43
61
  "api-extractor:dev:main": "api-extractor run --local --verbose",
44
62
  "api-extractor:dev:node": "api-extractor run -c api-extractor.node.json --local --verbose",
45
63
  "api-extractor:dev:web": "api-extractor run -c api-extractor.web.json --local --verbose",
64
+ "api-extractor:dev:tokenizer-node": "api-extractor run -c api-extractor.tokenizer-node.json --local --verbose",
46
65
  "api-extractor:prod:main": "api-extractor run --verbose",
47
66
  "api-extractor:prod:node": "api-extractor run -c api-extractor.node.json --verbose",
48
67
  "api-extractor:prod:web": "api-extractor run -c api-extractor.web.json --verbose",
49
- "unit-test": "tsc && jasmine dist/test/unit/**/*_test.js dist/test/unit/*_test.js",
68
+ "api-extractor:prod:tokenizer-node": "api-extractor run -c api-extractor.tokenizer-node.json --verbose",
69
+ "unit-test": "tsc && cp src/cross/sentencepiece/sentencepiece_model.pb.js dist/src/cross/sentencepiece/ && jasmine dist/test/unit/**/*_test.js dist/test/unit/**/**/*_test.js dist/test/unit/*_test.js",
50
70
  "system-test": "tsc && jasmine dist/test/system/**/*_test.js",
51
71
  "test-server-tests": "tsc && GOOGLE_CLOUD_PROJECT=googcloudproj GOOGLE_CLOUD_LOCATION=googcloudloc jasmine dist/test/system/node/*_test.js -- --test-server",
52
72
  "test-server-tests:record": "tsc && jasmine --fail-fast dist/test/system/node/*_test.js -- --test-server --record",
@@ -56,7 +76,8 @@
56
76
  "format": "prettier '**/*.ts' '**/*.mjs' '**/*.json' --write",
57
77
  "lint": "eslint '**/*.ts'",
58
78
  "lint-fix": "eslint --fix '**/*.ts'",
59
- "coverage-report": "./test/generate_report.sh"
79
+ "coverage-report": "./test/generate_report.sh",
80
+ "generate-proto": "pbjs -t static-module -w es6 -o src/cross/sentencepiece/sentencepiece_model.pb.js src/cross/sentencepiece/sentencepiece_model.proto && pbts -o src/cross/sentencepiece/sentencepiece_model.pb.d.ts src/cross/sentencepiece/sentencepiece_model.pb.js && sed -i.bak 's/import \\* as \\$protobuf from \"protobufjs\\/minimal\"/import \\$protobuf from \"protobufjs\\/minimal.js\"/' src/cross/sentencepiece/sentencepiece_model.pb.js && rm src/cross/sentencepiece/sentencepiece_model.pb.js.bak"
60
81
  },
61
82
  "engines": {
62
83
  "node": ">=20.0.0"
@@ -76,13 +97,17 @@
76
97
  "dist/web/index.mjs",
77
98
  "dist/web/index.mjs.map",
78
99
  "dist/web/web.d.ts",
100
+ "dist/tokenizer/node.mjs",
101
+ "dist/tokenizer/node.cjs",
102
+ "dist/tokenizer/node.mjs.map",
103
+ "dist/tokenizer/node.d.ts",
79
104
  "node/package.json",
80
105
  "web/package.json"
81
106
  ],
82
107
  "devDependencies": {
83
108
  "@eslint/js": "9.20.0",
84
109
  "@microsoft/api-extractor": "^7.52.9",
85
- "@modelcontextprotocol/sdk": "^1.24.0",
110
+ "@modelcontextprotocol/sdk": "^1.25.2",
86
111
  "@rollup/plugin-json": "^6.1.0",
87
112
  "@types/jasmine": "^5.1.2",
88
113
  "@types/node": "^20.9.0",
@@ -101,6 +126,7 @@
101
126
  "patch-package": "^8.0.1",
102
127
  "prettier": "3.3.3",
103
128
  "prettier-plugin-organize-imports": "^4.1.0",
129
+ "protobufjs-cli": "^1.1.3",
104
130
  "rollup-plugin-typescript2": "^0.36.0",
105
131
  "test-server-sdk": "^0.2.9",
106
132
  "ts-node": "^10.9.2",
@@ -116,10 +142,11 @@
116
142
  },
117
143
  "dependencies": {
118
144
  "google-auth-library": "^10.3.0",
145
+ "protobufjs": "^7.5.4",
119
146
  "ws": "^8.18.0"
120
147
  },
121
148
  "peerDependencies": {
122
- "@modelcontextprotocol/sdk": "^1.24.0"
149
+ "@modelcontextprotocol/sdk": "^1.25.2"
123
150
  },
124
151
  "peerDependenciesMeta": {
125
152
  "@modelcontextprotocol/sdk": {