@warlock.js/ai-google 4.1.7 → 4.1.9

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/cjs/index.cjs CHANGED
@@ -3,7 +3,7 @@ let _google_genai = require("@google/genai");
3
3
  let _warlock_js_ai = require("@warlock.js/ai");
4
4
  let _warlock_js_logger = require("@warlock.js/logger");
5
5
 
6
- //#region ../../@warlock.js/ai-google/src/utils/map-finish-reason.ts
6
+ //#region ../@warlock.js/ai-google/src/utils/map-finish-reason.ts
7
7
  const finishReasonMap = {
8
8
  STOP: "stop",
9
9
  MAX_TOKENS: "length"
@@ -35,7 +35,7 @@ function mapFinishReason(raw) {
35
35
  }
36
36
 
37
37
  //#endregion
38
- //#region ../../@warlock.js/ai-google/src/utils/to-google-contents.ts
38
+ //#region ../@warlock.js/ai-google/src/utils/to-google-contents.ts
39
39
  /**
40
40
  * Convert vendor-neutral `Message[]` into Gemini's request shape.
41
41
  *
@@ -151,7 +151,7 @@ function toGooglePart(part) {
151
151
  }
152
152
 
153
153
  //#endregion
154
- //#region ../../@warlock.js/ai-google/src/utils/to-google-tools.ts
154
+ //#region ../@warlock.js/ai-google/src/utils/to-google-tools.ts
155
155
  /**
156
156
  * Convert vendor-neutral `ToolConfig[]` into Gemini's `tools` array —
157
157
  * a single `Tool` carrying one `functionDeclarations` entry per tool.
@@ -188,7 +188,7 @@ function toJsonSchema(input) {
188
188
  }
189
189
 
190
190
  //#endregion
191
- //#region ../../@warlock.js/ai-google/src/utils/wrap-google-error.ts
191
+ //#region ../@warlock.js/ai-google/src/utils/wrap-google-error.ts
192
192
  /**
193
193
  * Wrap any thrown value caught inside the Gemini adapter into the
194
194
  * appropriate `@warlock.js/ai` `AIError` subclass.
@@ -291,7 +291,7 @@ function buildContext(shape) {
291
291
  }
292
292
 
293
293
  //#endregion
294
- //#region ../../@warlock.js/ai-google/src/embedder.ts
294
+ //#region ../@warlock.js/ai-google/src/embedder.ts
295
295
  const LOG_MODULE$1 = "ai.google";
296
296
  /**
297
297
  * Token usage is not returned by Gemini's `embedContent`, so every
@@ -388,7 +388,7 @@ var GoogleEmbedder = class {
388
388
  };
389
389
 
390
390
  //#endregion
391
- //#region ../../@warlock.js/ai-google/src/known-vision-models.ts
391
+ //#region ../@warlock.js/ai-google/src/known-vision-models.ts
392
392
  /**
393
393
  * Substrings identifying Gemini model ids whose family accepts image
394
394
  * input (vision).
@@ -425,7 +425,7 @@ function inferVisionCapability(modelId) {
425
425
  }
426
426
 
427
427
  //#endregion
428
- //#region ../../@warlock.js/ai-google/src/model.ts
428
+ //#region ../@warlock.js/ai-google/src/model.ts
429
429
  const LOG_MODULE = "ai.google";
430
430
  /**
431
431
  * Google Gemini-backed implementation of `ModelContract`.
@@ -692,7 +692,7 @@ var GoogleModel = class {
692
692
  };
693
693
 
694
694
  //#endregion
695
- //#region ../../@warlock.js/ai-google/src/sdk.ts
695
+ //#region ../@warlock.js/ai-google/src/sdk.ts
696
696
  /**
697
697
  * Google Gemini-backed implementation of `SDKAdapterContract`.
698
698
  *
@@ -1,7 +1,7 @@
1
1
  import { GoogleGenAIOptions } from "@google/genai";
2
2
  import { EmbedderConfig, ModelConfig, ModelPricing } from "@warlock.js/ai";
3
3
 
4
- //#region ../../@warlock.js/ai-google/src/config.type.d.ts
4
+ //#region ../@warlock.js/ai-google/src/config.type.d.ts
5
5
  /**
6
6
  * Configuration for the Google Gemini SDK adapter.
7
7
  *
package/esm/embedder.mjs CHANGED
@@ -2,7 +2,7 @@ import { wrapGoogleError } from "./utils/wrap-google-error.mjs";
2
2
  import "./utils/index.mjs";
3
3
  import { log } from "@warlock.js/logger";
4
4
 
5
- //#region ../../@warlock.js/ai-google/src/embedder.ts
5
+ //#region ../@warlock.js/ai-google/src/embedder.ts
6
6
  const LOG_MODULE = "ai.google";
7
7
  /**
8
8
  * Token usage is not returned by Gemini's `embedContent`, so every
@@ -1,4 +1,4 @@
1
- //#region ../../@warlock.js/ai-google/src/known-vision-models.ts
1
+ //#region ../@warlock.js/ai-google/src/known-vision-models.ts
2
2
  /**
3
3
  * Substrings identifying Gemini model ids whose family accepts image
4
4
  * input (vision).
package/esm/model.mjs CHANGED
@@ -6,7 +6,7 @@ import "./utils/index.mjs";
6
6
  import { inferVisionCapability } from "./known-vision-models.mjs";
7
7
  import { log } from "@warlock.js/logger";
8
8
 
9
- //#region ../../@warlock.js/ai-google/src/model.ts
9
+ //#region ../@warlock.js/ai-google/src/model.ts
10
10
  const LOG_MODULE = "ai.google";
11
11
  /**
12
12
  * Google Gemini-backed implementation of `ModelContract`.
package/esm/sdk.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { GoogleEmbedderConfig, GoogleModelConfig, GoogleSDKConfig } from "./config.type.mjs";
2
2
  import { EmbedderContract, ModelContract, SDKAdapterContract } from "@warlock.js/ai";
3
3
 
4
- //#region ../../@warlock.js/ai-google/src/sdk.d.ts
4
+ //#region ../@warlock.js/ai-google/src/sdk.d.ts
5
5
  /**
6
6
  * Google Gemini-backed implementation of `SDKAdapterContract`.
7
7
  *
package/esm/sdk.mjs CHANGED
@@ -3,7 +3,7 @@ import { GoogleModel } from "./model.mjs";
3
3
  import { GoogleGenAI } from "@google/genai";
4
4
  import { approximateTokenCount } from "@warlock.js/ai";
5
5
 
6
- //#region ../../@warlock.js/ai-google/src/sdk.ts
6
+ //#region ../@warlock.js/ai-google/src/sdk.ts
7
7
  /**
8
8
  * Google Gemini-backed implementation of `SDKAdapterContract`.
9
9
  *
@@ -1,4 +1,4 @@
1
- //#region ../../@warlock.js/ai-google/src/utils/map-finish-reason.ts
1
+ //#region ../@warlock.js/ai-google/src/utils/map-finish-reason.ts
2
2
  const finishReasonMap = {
3
3
  STOP: "stop",
4
4
  MAX_TOKENS: "length"
@@ -1,6 +1,6 @@
1
1
  import { InvalidRequestError, safeJsonParse } from "@warlock.js/ai";
2
2
 
3
- //#region ../../@warlock.js/ai-google/src/utils/to-google-contents.ts
3
+ //#region ../@warlock.js/ai-google/src/utils/to-google-contents.ts
4
4
  /**
5
5
  * Convert vendor-neutral `Message[]` into Gemini's request shape.
6
6
  *
@@ -1,6 +1,6 @@
1
1
  import { extractJsonSchema } from "@warlock.js/ai";
2
2
 
3
- //#region ../../@warlock.js/ai-google/src/utils/to-google-tools.ts
3
+ //#region ../@warlock.js/ai-google/src/utils/to-google-tools.ts
4
4
  /**
5
5
  * Convert vendor-neutral `ToolConfig[]` into Gemini's `tools` array —
6
6
  * a single `Tool` carrying one `functionDeclarations` entry per tool.
@@ -1,7 +1,7 @@
1
1
  import { ApiError } from "@google/genai";
2
2
  import { AIError, ContextLengthExceededError, InvalidRequestError, ProviderAuthError, ProviderError, ProviderRateLimitError, ProviderTimeoutError } from "@warlock.js/ai";
3
3
 
4
- //#region ../../@warlock.js/ai-google/src/utils/wrap-google-error.ts
4
+ //#region ../@warlock.js/ai-google/src/utils/wrap-google-error.ts
5
5
  /**
6
6
  * Wrap any thrown value caught inside the Gemini adapter into the
7
7
  * appropriate `@warlock.js/ai` `AIError` subclass.
package/package.json CHANGED
@@ -15,12 +15,12 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@google/genai": "^2.4.0",
18
- "@warlock.js/logger": "4.1.7"
18
+ "@warlock.js/logger": "*"
19
19
  },
20
20
  "peerDependencies": {
21
- "@warlock.js/ai": "4.1.7"
21
+ "@warlock.js/ai": "*"
22
22
  },
23
- "version": "4.1.7",
23
+ "version": "4.1.9",
24
24
  "main": "./cjs/index.cjs",
25
25
  "module": "./esm/index.mjs",
26
26
  "types": "./esm/index.d.mts",