@alexanderfortin/pi-tavily-tools 0.6.2 → 0.6.4

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,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.6.4] - 2026-09-04
11
+
12
+ ### Changed
13
+
14
+ - **deps-ci**: bump actions/setup-node from 6 to 7 (#79)
15
+ - **deps**: update dependencies (#78)
16
+
17
+ ## [0.6.3] - 2026-07-17
18
+
19
+ ### Fixed
20
+
21
+ - update auth storage API to latest Pi SDK
22
+
10
23
  ## [0.6.2] - 2026-07-17
11
24
 
12
25
  ### Changed
@@ -240,7 +253,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
240
253
 
241
254
  - Initial release with `web_search` tool using Tavily
242
255
 
243
- [unreleased]: https://github.com/shaftoe/pi-tavily-tools/compare/v0.6.2...HEAD
256
+ [unreleased]: https://github.com/shaftoe/pi-tavily-tools/compare/v0.6.4...HEAD
257
+ [0.6.4]: https://github.com/shaftoe/pi-tavily-tools/compare/v0.6.3...v0.6.4
258
+ [0.6.3]: https://github.com/shaftoe/pi-tavily-tools/compare/v0.6.2...v0.6.3
244
259
  [0.6.2]: https://github.com/shaftoe/pi-tavily-tools/compare/v0.6.1...v0.6.2
245
260
  [0.6.1]: https://github.com/shaftoe/pi-tavily-tools/compare/v0.6.0...v0.6.1
246
261
  [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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AAE,MAAM,CAAC,CAAC;QAClC,sBAAsB,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;QAEnC,4EAA4E;QAC5E,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,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.4",
5
5
  "description": "Pi coding agent extension for web search and content extraction using Tavily",
6
6
  "keywords": [
7
7
  "pi-package",
@@ -61,31 +61,31 @@
61
61
  "release:dry-run": "semantic-release --dry-run"
62
62
  },
63
63
  "devDependencies": {
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",
68
- "@semantic-release/changelog": "6.0.3",
64
+ "@alexanderfortin/semantic-release-keep-a-changelog": "^0.4.13",
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
+ "@semantic-release/changelog": "^7.0.0",
69
69
  "@semantic-release/commit-analyzer": "13.0.1",
70
70
  "@semantic-release/exec": "7.1.0",
71
- "@semantic-release/git": "10.0.1",
71
+ "@semantic-release/git": "^11.0.1",
72
72
  "@semantic-release/github": "^12.0.9",
73
73
  "@semantic-release/npm": "13.1.5",
74
74
  "@semantic-release/release-notes-generator": "14.1.1",
75
75
  "@sinclair/typebox": "0.34.49",
76
- "@types/bun": "1.3.14",
77
- "@types/node": "^26.1.1",
78
- "@typescript-eslint/eslint-plugin": "^8.64.0",
79
- "@typescript-eslint/parser": "^8.64.0",
80
- "eslint": "^10.7.0",
76
+ "@types/bun": "^1.4.0",
77
+ "@types/node": "^26.4.1",
78
+ "@typescript-eslint/eslint-plugin": "^8.69.0",
79
+ "@typescript-eslint/parser": "^8.69.0",
80
+ "eslint": "^10.9.1",
81
81
  "eslint-config-prettier": "10.1.8",
82
- "prettier": "^3.9.5",
82
+ "prettier": "^3.9.6",
83
83
  "prettier-plugin-organize-imports": "4.3.0",
84
- "semantic-release": "^25.0.7",
84
+ "semantic-release": "^25.0.9",
85
85
  "typescript": "6.0.3"
86
86
  },
87
87
  "dependencies": {
88
- "@tavily/core": "^0.7.6",
89
- "temporal-polyfill": "^1.0.1"
88
+ "@tavily/core": "^0.7.8",
89
+ "temporal-polyfill": "^1.0.4"
90
90
  }
91
91
  }