@openclaw/tavily-plugin 2026.7.2-beta.1 → 2026.7.2-beta.2

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.js CHANGED
@@ -1,5 +1,5 @@
1
- import { n as runTavilySearch, t as runTavilyExtract } from "./tavily-client-JxXwblGx.js";
2
- import { t as createTavilyWebSearchProvider } from "./tavily-search-provider-CiA5lPG5.js";
1
+ import { n as runTavilySearch, t as runTavilyExtract } from "./tavily-client-tySEevV6.js";
2
+ import { t as createTavilyWebSearchProvider } from "./tavily-search-provider-vKanocId.js";
3
3
  import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
4
4
  import { jsonResult, readPositiveIntegerParam, readStringParam } from "openclaw/plugin-sdk/provider-web-search";
5
5
  import { Type } from "typebox";
@@ -2,24 +2,52 @@ import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
2
  import { DEFAULT_CACHE_TTL_MINUTES, normalizeCacheKey, postTrustedWebToolsJson, readCache, resolveCacheTtlMs, resolvePositiveTimeoutSeconds, writeCache } from "openclaw/plugin-sdk/provider-web-search";
3
3
  import { readProviderJsonResponse } from "openclaw/plugin-sdk/provider-http";
4
4
  import { wrapExternalContent, wrapWebContent } from "openclaw/plugin-sdk/security-runtime";
5
- import { normalizeResolvedSecretInputString, normalizeSecretInput } from "openclaw/plugin-sdk/secret-input";
5
+ import { canResolveEnvSecretRefInReadOnlyPath } from "openclaw/plugin-sdk/extension-shared";
6
+ import { normalizeSecretInput, resolveSecretInputString } from "openclaw/plugin-sdk/secret-input";
6
7
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
7
8
  //#region extensions/tavily/src/config.ts
8
9
  const DEFAULT_TAVILY_BASE_URL = "https://api.tavily.com";
9
10
  const DEFAULT_TAVILY_SEARCH_TIMEOUT_SECONDS = 30;
10
11
  const DEFAULT_TAVILY_EXTRACT_TIMEOUT_SECONDS = 60;
12
+ const TAVILY_API_KEY_ENV_VAR = "TAVILY_API_KEY";
11
13
  function resolveTavilySearchConfig(cfg) {
12
14
  const pluginWebSearch = (cfg?.plugins?.entries?.tavily?.config)?.webSearch;
13
15
  if (pluginWebSearch && typeof pluginWebSearch === "object" && !Array.isArray(pluginWebSearch)) return pluginWebSearch;
14
16
  }
15
- function normalizeConfiguredSecret(value, path) {
16
- return normalizeSecretInput(normalizeResolvedSecretInputString({
17
+ function resolveConfiguredSecret(value, path, cfg) {
18
+ const resolved = resolveSecretInputString({
17
19
  value,
18
- path
19
- }));
20
+ path,
21
+ defaults: cfg?.secrets?.defaults,
22
+ mode: "inspect"
23
+ });
24
+ if (resolved.status === "available") {
25
+ const normalized = normalizeSecretInput(resolved.value);
26
+ return normalized ? {
27
+ status: "available",
28
+ value: normalized
29
+ } : { status: "missing" };
30
+ }
31
+ if (resolved.status === "missing") return { status: "missing" };
32
+ if (resolved.ref.source !== "env") return { status: "blocked" };
33
+ const envVarName = resolved.ref.id.trim();
34
+ if (envVarName !== TAVILY_API_KEY_ENV_VAR) return { status: "blocked" };
35
+ if (!canResolveEnvSecretRefInReadOnlyPath({
36
+ cfg,
37
+ provider: resolved.ref.provider,
38
+ id: envVarName
39
+ })) return { status: "blocked" };
40
+ const envValue = normalizeSecretInput(process.env[envVarName]);
41
+ return envValue ? {
42
+ status: "available",
43
+ value: envValue
44
+ } : { status: "missing" };
20
45
  }
21
46
  function resolveTavilyApiKey(cfg) {
22
- return normalizeConfiguredSecret(resolveTavilySearchConfig(cfg)?.apiKey, "plugins.entries.tavily.config.webSearch.apiKey") || normalizeSecretInput(process.env.TAVILY_API_KEY) || void 0;
47
+ const resolved = resolveConfiguredSecret(resolveTavilySearchConfig(cfg)?.apiKey, "plugins.entries.tavily.config.webSearch.apiKey", cfg);
48
+ if (resolved.status === "available") return resolved.value;
49
+ if (resolved.status === "blocked") return;
50
+ return normalizeSecretInput(process.env.TAVILY_API_KEY) || void 0;
23
51
  }
24
52
  function resolveTavilyBaseUrl(cfg) {
25
53
  return (normalizeOptionalString(resolveTavilySearchConfig(cfg)?.baseUrl) ?? "") || normalizeSecretInput(process.env.TAVILY_BASE_URL) || "https://api.tavily.com";
@@ -4,7 +4,7 @@ import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
4
4
  import { readPositiveIntegerParam } from "openclaw/plugin-sdk/param-readers";
5
5
  //#region extensions/tavily/src/tavily-search-provider.ts
6
6
  var tavily_search_provider_exports = /* @__PURE__ */ __exportAll({ createTavilyWebSearchProvider: () => createTavilyWebSearchProvider });
7
- const loadTavilyClientModule = createLazyRuntimeModule(() => import("./tavily-client-JxXwblGx.js").then((n) => n.r));
7
+ const loadTavilyClientModule = createLazyRuntimeModule(() => import("./tavily-client-tySEevV6.js").then((n) => n.r));
8
8
  function createTavilyWebSearchProvider() {
9
9
  return {
10
10
  ...buildTavilyWebSearchProviderBase(),
@@ -1,7 +1,7 @@
1
1
  import { TAVILY_GENERIC_SEARCH_DESCRIPTION, TAVILY_GENERIC_SEARCH_SCHEMA, buildTavilyWebSearchProviderBase } from "./web-search-shared.js";
2
2
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
3
3
  //#region extensions/tavily/web-search-contract-api.ts
4
- const loadTavilySearchProviderModule = createLazyRuntimeModule(() => import("./tavily-search-provider-CiA5lPG5.js").then((n) => n.n));
4
+ const loadTavilySearchProviderModule = createLazyRuntimeModule(() => import("./tavily-search-provider-vKanocId.js").then((n) => n.n));
5
5
  function createTavilyWebSearchProvider() {
6
6
  return {
7
7
  ...buildTavilyWebSearchProviderBase(),
@@ -1,2 +1,2 @@
1
- import { t as createTavilyWebSearchProvider } from "./tavily-search-provider-CiA5lPG5.js";
1
+ import { t as createTavilyWebSearchProvider } from "./tavily-search-provider-vKanocId.js";
2
2
  export { createTavilyWebSearchProvider };
@@ -43,4 +43,4 @@ function buildTavilyWebSearchProviderBase() {
43
43
  };
44
44
  }
45
45
  //#endregion
46
- export { TAVILY_CREDENTIAL_PATH, TAVILY_GENERIC_SEARCH_DESCRIPTION, TAVILY_GENERIC_SEARCH_SCHEMA, buildTavilyWebSearchProviderBase };
46
+ export { TAVILY_GENERIC_SEARCH_DESCRIPTION, TAVILY_GENERIC_SEARCH_SCHEMA, buildTavilyWebSearchProviderBase };
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@openclaw/tavily-plugin",
3
- "version": "2026.7.2-beta.1",
3
+ "version": "2026.7.2-beta.2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/tavily-plugin",
9
- "version": "2026.7.2-beta.1",
9
+ "version": "2026.7.2-beta.2",
10
10
  "dependencies": {
11
11
  "typebox": "1.3.3"
12
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/tavily-plugin",
3
- "version": "2026.7.2-beta.1",
3
+ "version": "2026.7.2-beta.2",
4
4
  "description": "OpenClaw Tavily plugin",
5
5
  "type": "module",
6
6
  "dependencies": {
@@ -18,10 +18,10 @@
18
18
  "allowInvalidConfigRecovery": true
19
19
  },
20
20
  "compat": {
21
- "pluginApi": ">=2026.7.2-beta.1"
21
+ "pluginApi": ">=2026.7.2-beta.2"
22
22
  },
23
23
  "build": {
24
- "openclawVersion": "2026.7.2-beta.1",
24
+ "openclawVersion": "2026.7.2-beta.2",
25
25
  "bundledDist": false
26
26
  },
27
27
  "release": {
@@ -44,7 +44,7 @@
44
44
  "skills/**"
45
45
  ],
46
46
  "peerDependencies": {
47
- "openclaw": ">=2026.7.2-beta.1"
47
+ "openclaw": ">=2026.7.2-beta.2"
48
48
  },
49
49
  "peerDependenciesMeta": {
50
50
  "openclaw": {