@alexanderfortin/pi-tavily-tools 0.6.2 → 0.6.3

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
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.6.3] - 2026-07-17
11
+
12
+ ### Fixed
13
+
14
+ - update auth storage API to latest Pi SDK
15
+
10
16
  ## [0.6.2] - 2026-07-17
11
17
 
12
18
  ### Changed
@@ -240,7 +246,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
240
246
 
241
247
  - Initial release with `web_search` tool using Tavily
242
248
 
243
- [unreleased]: https://github.com/shaftoe/pi-tavily-tools/compare/v0.6.2...HEAD
249
+ [unreleased]: https://github.com/shaftoe/pi-tavily-tools/compare/v0.6.3...HEAD
250
+ [0.6.3]: https://github.com/shaftoe/pi-tavily-tools/compare/v0.6.2...v0.6.3
244
251
  [0.6.2]: https://github.com/shaftoe/pi-tavily-tools/compare/v0.6.1...v0.6.2
245
252
  [0.6.1]: https://github.com/shaftoe/pi-tavily-tools/compare/v0.6.0...v0.6.1
246
253
  [0.6.0]: https://github.com/shaftoe/pi-tavily-tools/compare/v0.5.18...v0.6.0
package/dist/index.d.ts CHANGED
@@ -5,11 +5,11 @@
5
5
  * Adds a `web_search` tool that the LLM can use to find current
6
6
  * information, recent news, documentation, and time-sensitive data.
7
7
  */
8
- import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
8
+ import { type ExtensionAPI } from "@earendil-works/pi-coding-agent";
9
9
  /**
10
10
  * Main extension entry point.
11
11
  *
12
- * Resolves API key from AuthStorage under key "tavily" first,
12
+ * Resolves API key from the stored "tavily" credential in auth.json first,
13
13
  * falling back to TAVILY_API_KEY environment variable.
14
14
  *
15
15
  * If neither is available, no hooks are registered and the extension
@@ -19,5 +19,5 @@ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
19
19
  * even if the API key is missing. The tool is registered only
20
20
  * once on the first agent run and persists across sessions.
21
21
  */
22
- export default function (pi: ExtensionAPI): Promise<void>;
22
+ export default function (pi: ExtensionAPI): void;
23
23
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAWpE;;;;;;;;;;;;GAYG;AACH,yBAA+B,EAAE,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAwC9D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAwB,KAAK,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAU1F;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,OAAO,WAAW,EAAE,EAAE,YAAY,GAAG,IAAI,CAwC/C"}
package/dist/index.js CHANGED
@@ -5,13 +5,13 @@
5
5
  * Adds a `web_search` tool that the LLM can use to find current
6
6
  * information, recent news, documentation, and time-sensitive data.
7
7
  */
8
- import { AuthStorage } from "@earendil-works/pi-coding-agent";
8
+ import { readStoredCredential } from "@earendil-works/pi-coding-agent";
9
9
  import { cleanupTempDir, createTavilyClient, registerWebExtractTool, registerWebSearchTool, resultCache, } from "./tools/index.js";
10
10
  import { UsageCache } from "./usage/index.js";
11
11
  /**
12
12
  * Main extension entry point.
13
13
  *
14
- * Resolves API key from AuthStorage under key "tavily" first,
14
+ * Resolves API key from the stored "tavily" credential in auth.json first,
15
15
  * falling back to TAVILY_API_KEY environment variable.
16
16
  *
17
17
  * If neither is available, no hooks are registered and the extension
@@ -21,9 +21,10 @@ import { UsageCache } from "./usage/index.js";
21
21
  * even if the API key is missing. The tool is registered only
22
22
  * once on the first agent run and persists across sessions.
23
23
  */
24
- export default async function (pi) {
25
- const authStorage = AuthStorage.create();
26
- const apiKey = (await authStorage.getApiKey("tavily"))?.trim() ?? process.env.TAVILY_API_KEY?.trim();
24
+ export default function (pi) {
25
+ const credential = readStoredCredential("tavily");
26
+ const storedKey = credential?.type === "api_key" ? credential.key : undefined;
27
+ const apiKey = storedKey?.trim() ?? process.env.TAVILY_API_KEY?.trim();
27
28
  if (!apiKey) {
28
29
  pi.on("session_start", (_event, ctx) => {
29
30
  ctx.ui.notify('Web Search · API key not found. Add to ~/.pi/agent/auth.json under "tavily" key or set TAVILY_API_KEY env var. Get a free key at tavily.com', "warning");
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,sBAAsB,EACtB,qBAAqB,EACrB,WAAW,GACZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,OAAO,CAAC,KAAK,WAAW,EAAgB;IAC7C,MAAM,WAAW,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC;IACzC,MAAM,MAAM,GACV,CAAC,MAAM,WAAW,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,IAAI,EAAE,CAAC;IAExF,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,EAAE,CAAC,EAAE,CAAC,eAAe,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE;YACrC,GAAG,CAAC,EAAE,CAAC,MAAM,CACX,6IAA6I,EAC7I,SAAS,CACV,CAAC;QACJ,CAAC,CAAC,CAAC;QACH,OAAO;IACT,CAAC;IAED,I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CAAC;IAC/C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE;QAChC,UAAU,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,EAAE,CAAC,kBAAkB,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE;QAC9C,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACtB,MAAM,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC,CAAC,cAAc;IAC/D,CAAC,CAAC,CAAC;AACL,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@alexanderfortin/pi-tavily-tools",
3
3
  "author": "Alexander Fortin",
4
- "version": "0.6.2",
4
+ "version": "0.6.3",
5
5
  "description": "Pi coding agent extension for web search and content extraction using Tavily",
6
6
  "keywords": [
7
7
  "pi-package",
@@ -62,9 +62,9 @@
62
62
  },
63
63
  "devDependencies": {
64
64
  "@alexanderfortin/semantic-release-keep-a-changelog": "^0.4.9",
65
- "@earendil-works/pi-ai": "0.74.0",
66
- "@earendil-works/pi-coding-agent": "0.74.0",
67
- "@earendil-works/pi-tui": "0.74.0",
65
+ "@earendil-works/pi-ai": "0.80.10",
66
+ "@earendil-works/pi-coding-agent": "0.80.10",
67
+ "@earendil-works/pi-tui": "0.80.10",
68
68
  "@semantic-release/changelog": "6.0.3",
69
69
  "@semantic-release/commit-analyzer": "13.0.1",
70
70
  "@semantic-release/exec": "7.1.0",