@juicesharp/rpiv-web-tools 2.13.8 → 2.13.10

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/index.ts CHANGED
@@ -9,10 +9,10 @@
9
9
  */
10
10
 
11
11
  import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
12
- import { buildInterceptors } from "./providers/interceptors/index.js";
13
- import { registerWebFetchTool, registerWebSearchConfigCommand, registerWebSearchTool } from "./web-tools.js";
12
+ import { buildInterceptors } from "./providers/interceptors/index.ts";
13
+ import { registerWebFetchTool, registerWebSearchConfigCommand, registerWebSearchTool } from "./web-tools.ts";
14
14
 
15
- export { createSearchProvider } from "./providers/factory.js";
15
+ export { createSearchProvider } from "./providers/factory.ts";
16
16
  export {
17
17
  GITHUB_TOKEN_ENV_VAR,
18
18
  GitHubInterceptor,
@@ -21,7 +21,7 @@ export {
21
21
  parseGitHubUrl,
22
22
  resolveGitHubOptions,
23
23
  type UrlInterceptor,
24
- } from "./providers/interceptors/index.js";
24
+ } from "./providers/interceptors/index.ts";
25
25
 
26
26
  export type {
27
27
  FetchProvider,
@@ -30,7 +30,7 @@ export type {
30
30
  SearchProvider,
31
31
  SearchResponse,
32
32
  SearchResult,
33
- } from "./providers/types.js";
33
+ } from "./providers/types.ts";
34
34
  export {
35
35
  DEFAULT_WEB_FETCH_GUIDELINES,
36
36
  DEFAULT_WEB_FETCH_SNIPPET,
@@ -39,7 +39,7 @@ export {
39
39
  registerWebFetchTool,
40
40
  registerWebSearchConfigCommand,
41
41
  registerWebSearchTool,
42
- } from "./web-tools.js";
42
+ } from "./web-tools.ts";
43
43
 
44
44
  // Programmatic consumer-side opt-in for URL interceptors. Tier 2 in the
45
45
  // resolution model: end-user config (Tier 1) still wins. Default OFF —
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juicesharp/rpiv-web-tools",
3
- "version": "2.13.8",
3
+ "version": "2.13.10",
4
4
  "description": "Pi extension. Web search and fetch for the model with pluggable providers (Brave, Tavily, Serper, Exa, You.com, Jina, Firecrawl, Perplexity, SearXNG, Ollama).",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -65,7 +65,7 @@
65
65
  ]
66
66
  },
67
67
  "dependencies": {
68
- "@juicesharp/rpiv-config": "^2.13.8"
68
+ "@juicesharp/rpiv-config": "^2.13.10"
69
69
  },
70
70
  "peerDependencies": {
71
71
  "@earendil-works/pi-coding-agent": "*",
@@ -1,4 +1,4 @@
1
- import type { SearchProvider, SearchResponse, SearchResult } from "./types.js";
1
+ import type { SearchProvider, SearchResponse, SearchResult } from "./types.ts";
2
2
 
3
3
  const BRAVE_SEARCH_API_URL = "https://api.search.brave.com/res/v1/web/search";
4
4
  export const BRAVE_API_KEY_ENV_VAR = "BRAVE_SEARCH_API_KEY";
package/providers/exa.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { FetchResponse, FullProvider, SearchResponse, SearchResult } from "./types.js";
1
+ import type { FetchResponse, FullProvider, SearchResponse, SearchResult } from "./types.ts";
2
2
 
3
3
  const EXA_API_URL = "https://api.exa.ai/search";
4
4
  const EXA_CONTENTS_API_URL = "https://api.exa.ai/contents";
@@ -1,14 +1,14 @@
1
- import { BraveProvider } from "./brave.js";
2
- import { ExaProvider } from "./exa.js";
3
- import { FirecrawlProvider } from "./firecrawl.js";
4
- import { JinaProvider } from "./jina.js";
5
- import { OllamaProvider } from "./ollama.js";
6
- import { PerplexityProvider } from "./perplexity.js";
7
- import { SearxngProvider } from "./searxng.js";
8
- import { SerperProvider } from "./serper.js";
9
- import { TavilyProvider } from "./tavily.js";
10
- import type { FullProvider, SearchProvider } from "./types.js";
11
- import { YouComProvider } from "./youcom.js";
1
+ import { BraveProvider } from "./brave.ts";
2
+ import { ExaProvider } from "./exa.ts";
3
+ import { FirecrawlProvider } from "./firecrawl.ts";
4
+ import { JinaProvider } from "./jina.ts";
5
+ import { OllamaProvider } from "./ollama.ts";
6
+ import { PerplexityProvider } from "./perplexity.ts";
7
+ import { SearxngProvider } from "./searxng.ts";
8
+ import { SerperProvider } from "./serper.ts";
9
+ import { TavilyProvider } from "./tavily.ts";
10
+ import type { FullProvider, SearchProvider } from "./types.ts";
11
+ import { YouComProvider } from "./youcom.ts";
12
12
 
13
13
  export interface ProviderCredentials {
14
14
  apiKey?: string;
@@ -5,7 +5,7 @@
5
5
  * delegate their `fetch()` method to.
6
6
  */
7
7
 
8
- import type { FetchResponse } from "./types.js";
8
+ import type { FetchResponse } from "./types.ts";
9
9
 
10
10
  // ---------------------------------------------------------------------------
11
11
  // Constants
@@ -1,4 +1,4 @@
1
- import type { FetchResponse, FullProvider, SearchResponse, SearchResult } from "./types.js";
1
+ import type { FetchResponse, FullProvider, SearchResponse, SearchResult } from "./types.ts";
2
2
 
3
3
  const FIRECRAWL_API_URL = "https://api.firecrawl.dev/v1";
4
4
  export const FIRECRAWL_API_KEY_ENV_VAR = "FIRECRAWL_API_KEY";
@@ -1,19 +1,19 @@
1
- import { BRAVE_PROVIDER_META } from "./brave.js";
2
- import { EXA_PROVIDER_META } from "./exa.js";
3
- import { FIRECRAWL_PROVIDER_META } from "./firecrawl.js";
4
- import { JINA_PROVIDER_META } from "./jina.js";
5
- import { OLLAMA_PROVIDER_META } from "./ollama.js";
6
- import { PERPLEXITY_PROVIDER_META } from "./perplexity.js";
7
- import { SEARXNG_PROVIDER_META } from "./searxng.js";
8
- import { SERPER_PROVIDER_META } from "./serper.js";
9
- import { TAVILY_PROVIDER_META } from "./tavily.js";
10
- import type { ProviderMeta } from "./types.js";
11
- import { YOUCOM_PROVIDER_META } from "./youcom.js";
1
+ import { BRAVE_PROVIDER_META } from "./brave.ts";
2
+ import { EXA_PROVIDER_META } from "./exa.ts";
3
+ import { FIRECRAWL_PROVIDER_META } from "./firecrawl.ts";
4
+ import { JINA_PROVIDER_META } from "./jina.ts";
5
+ import { OLLAMA_PROVIDER_META } from "./ollama.ts";
6
+ import { PERPLEXITY_PROVIDER_META } from "./perplexity.ts";
7
+ import { SEARXNG_PROVIDER_META } from "./searxng.ts";
8
+ import { SERPER_PROVIDER_META } from "./serper.ts";
9
+ import { TAVILY_PROVIDER_META } from "./tavily.ts";
10
+ import type { ProviderMeta } from "./types.ts";
11
+ import { YOUCOM_PROVIDER_META } from "./youcom.ts";
12
12
 
13
- export { BRAVE_API_KEY_ENV_VAR, BRAVE_PROVIDER_META, BraveProvider } from "./brave.js";
14
- export { EXA_API_KEY_ENV_VAR, EXA_PROVIDER_META, ExaProvider } from "./exa.js";
15
- export { createSearchProvider, type ProviderCredentials } from "./factory.js";
16
- export { FIRECRAWL_API_KEY_ENV_VAR, FIRECRAWL_PROVIDER_META, FirecrawlProvider } from "./firecrawl.js";
13
+ export { BRAVE_API_KEY_ENV_VAR, BRAVE_PROVIDER_META, BraveProvider } from "./brave.ts";
14
+ export { EXA_API_KEY_ENV_VAR, EXA_PROVIDER_META, ExaProvider } from "./exa.ts";
15
+ export { createSearchProvider, type ProviderCredentials } from "./factory.ts";
16
+ export { FIRECRAWL_API_KEY_ENV_VAR, FIRECRAWL_PROVIDER_META, FirecrawlProvider } from "./firecrawl.ts";
17
17
  // URL interceptors live in providers/interceptors/. The github primitives
18
18
  // (parseGitHubUrl, GitHubUrlInfo, etc.) are re-exported from there.
19
19
  export {
@@ -24,8 +24,8 @@ export {
24
24
  type GitHubUrlInfo,
25
25
  parseGitHubUrl,
26
26
  type UrlInterceptor,
27
- } from "./interceptors/index.js";
28
- export { JINA_API_KEY_ENV_VAR, JINA_PROVIDER_META, JinaProvider } from "./jina.js";
27
+ } from "./interceptors/index.ts";
28
+ export { JINA_API_KEY_ENV_VAR, JINA_PROVIDER_META, JinaProvider } from "./jina.ts";
29
29
  export {
30
30
  configureOllama,
31
31
  OLLAMA_API_KEY_ENV_VAR,
@@ -33,8 +33,8 @@ export {
33
33
  OLLAMA_HOST_ENV_VAR,
34
34
  OLLAMA_PROVIDER_META,
35
35
  OllamaProvider,
36
- } from "./ollama.js";
37
- export { PERPLEXITY_API_KEY_ENV_VAR, PERPLEXITY_PROVIDER_META, PerplexityProvider } from "./perplexity.js";
36
+ } from "./ollama.ts";
37
+ export { PERPLEXITY_API_KEY_ENV_VAR, PERPLEXITY_PROVIDER_META, PerplexityProvider } from "./perplexity.ts";
38
38
  export {
39
39
  configureSearxng,
40
40
  SEARXNG_API_KEY_ENV_VAR,
@@ -45,9 +45,9 @@ export {
45
45
  type SearxngConfigCurrent,
46
46
  type SearxngConfigUi,
47
47
  SearxngProvider,
48
- } from "./searxng.js";
49
- export { SERPER_API_KEY_ENV_VAR, SERPER_PROVIDER_META, SerperProvider } from "./serper.js";
50
- export { TAVILY_API_KEY_ENV_VAR, TAVILY_PROVIDER_META, TavilyProvider } from "./tavily.js";
48
+ } from "./searxng.ts";
49
+ export { SERPER_API_KEY_ENV_VAR, SERPER_PROVIDER_META, SerperProvider } from "./serper.ts";
50
+ export { TAVILY_API_KEY_ENV_VAR, TAVILY_PROVIDER_META, TavilyProvider } from "./tavily.ts";
51
51
  export type {
52
52
  FetchProvider,
53
53
  FetchResponse,
@@ -60,8 +60,8 @@ export type {
60
60
  SearchProvider,
61
61
  SearchResponse,
62
62
  SearchResult,
63
- } from "./types.js";
64
- export { YOUCOM_API_KEY_ENV_VAR, YOUCOM_PROVIDER_META, YouComProvider } from "./youcom.js";
63
+ } from "./types.ts";
64
+ export { YOUCOM_API_KEY_ENV_VAR, YOUCOM_PROVIDER_META, YouComProvider } from "./youcom.ts";
65
65
 
66
66
  // Typed as readonly ProviderMeta[] (not `as const`) so iterators can access
67
67
  // the optional META fields (baseUrlEnvVar, defaultBaseUrl, configure) without
@@ -12,9 +12,9 @@ import {
12
12
  } from "node:fs";
13
13
  import { tmpdir } from "node:os";
14
14
  import { extname, join, sep as pathSep, resolve as resolvePath } from "node:path";
15
- import { readConfig } from "../config.js";
16
- import type { FetchResponse } from "../types.js";
17
- import type { UrlInterceptor } from "./types.js";
15
+ import { readConfig } from "../config.ts";
16
+ import type { FetchResponse } from "../types.ts";
17
+ import type { UrlInterceptor } from "./types.ts";
18
18
 
19
19
  // ---------------------------------------------------------------------------
20
20
  // Constants
@@ -1,5 +1,5 @@
1
- import { GitHubInterceptor, readUserGitHubConfig, resolveGitHubOptions } from "./github.js";
2
- import type { UrlInterceptor } from "./types.js";
1
+ import { GitHubInterceptor, readUserGitHubConfig, resolveGitHubOptions } from "./github.ts";
2
+ import type { UrlInterceptor } from "./types.ts";
3
3
 
4
4
  export {
5
5
  DEFAULTS as GITHUB_INTERCEPTOR_DEFAULTS,
@@ -11,8 +11,8 @@ export {
11
11
  type ResolvedGitHubOptions,
12
12
  readUserGitHubConfig,
13
13
  resolveGitHubOptions,
14
- } from "./github.js";
15
- export type { UrlInterceptor } from "./types.js";
14
+ } from "./github.ts";
15
+ export type { UrlInterceptor } from "./types.ts";
16
16
 
17
17
  // Package-private singletons set by registerWebTools at startup. The
18
18
  // orchestrator reads `getInterceptors()` per-request rather than caching the
@@ -1,4 +1,4 @@
1
- import type { FetchResponse } from "../types.js";
1
+ import type { FetchResponse } from "../types.ts";
2
2
 
3
3
  // Generic URL specialist contract. A UrlInterceptor inspects a fetch target
4
4
  // before the active search provider's fetch() runs; if it owns the URL it
package/providers/jina.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { FetchResponse, FullProvider, SearchResponse, SearchResult } from "./types.js";
1
+ import type { FetchResponse, FullProvider, SearchResponse, SearchResult } from "./types.ts";
2
2
 
3
3
  const JINA_SEARCH_API_URL = "https://s.jina.ai/";
4
4
  const JINA_READER_API_URL = "https://r.jina.ai/";
@@ -8,7 +8,7 @@ import {
8
8
  type ProviderMeta,
9
9
  type SearchResponse,
10
10
  type SearchResult,
11
- } from "./types.js";
11
+ } from "./types.ts";
12
12
 
13
13
  export const OLLAMA_API_KEY_ENV_VAR = "OLLAMA_API_KEY";
14
14
  export const OLLAMA_HOST_ENV_VAR = "OLLAMA_HOST";
@@ -1,4 +1,4 @@
1
- import type { SearchProvider, SearchResponse, SearchResult } from "./types.js";
1
+ import type { SearchProvider, SearchResponse, SearchResult } from "./types.ts";
2
2
 
3
3
  const PERPLEXITY_API_URL = "https://api.perplexity.ai/search";
4
4
  export const PERPLEXITY_API_KEY_ENV_VAR = "PERPLEXITY_API_KEY";
@@ -7,7 +7,7 @@ import {
7
7
  type SearchProvider,
8
8
  type SearchResponse,
9
9
  type SearchResult,
10
- } from "./types.js";
10
+ } from "./types.ts";
11
11
 
12
12
  export const SEARXNG_API_KEY_ENV_VAR = "SEARXNG_API_KEY";
13
13
  export const SEARXNG_URL_ENV_VAR = "SEARXNG_URL";
@@ -1,4 +1,4 @@
1
- import type { SearchProvider, SearchResponse, SearchResult } from "./types.js";
1
+ import type { SearchProvider, SearchResponse, SearchResult } from "./types.ts";
2
2
 
3
3
  const SERPER_API_URL = "https://google.serper.dev/search";
4
4
  export const SERPER_API_KEY_ENV_VAR = "SERPER_API_KEY";
@@ -1,4 +1,4 @@
1
- import type { FetchResponse, FullProvider, SearchResponse, SearchResult } from "./types.js";
1
+ import type { FetchResponse, FullProvider, SearchResponse, SearchResult } from "./types.ts";
2
2
 
3
3
  const TAVILY_API_URL = "https://api.tavily.com/search";
4
4
  const TAVILY_EXTRACT_API_URL = "https://api.tavily.com/extract";
@@ -1,4 +1,4 @@
1
- import type { FetchResponse, FullProvider, SearchResponse, SearchResult } from "./types.js";
1
+ import type { FetchResponse, FullProvider, SearchResponse, SearchResult } from "./types.ts";
2
2
 
3
3
  const YOUCOM_SEARCH_URL = "https://ydc-index.io/v1/search";
4
4
  const YOUCOM_CONTENTS_URL = "https://ydc-index.io/v1/contents";
package/web-tools.ts CHANGED
@@ -25,12 +25,12 @@ import {
25
25
  import { Text } from "@earendil-works/pi-tui";
26
26
  import { validateGuidanceFields } from "@juicesharp/rpiv-config";
27
27
  import { Type } from "typebox";
28
- import { getConfigPath, readConfig, type WebToolsConfig, writeConfig } from "./providers/config.js";
29
- import { createSearchProvider } from "./providers/factory.js";
30
- import { fetchViaGenericHtml } from "./providers/fetch-helpers.js";
31
- import { PROVIDERS } from "./providers/index.js";
32
- import { GITHUB_TOKEN_ENV_VAR, getActiveGitHubInterceptor, getInterceptors } from "./providers/interceptors/index.js";
33
- import type { FetchResponse, FullProvider, ProviderMeta, SearchProvider, SearchResult } from "./providers/types.js";
28
+ import { getConfigPath, readConfig, type WebToolsConfig, writeConfig } from "./providers/config.ts";
29
+ import { createSearchProvider } from "./providers/factory.ts";
30
+ import { fetchViaGenericHtml } from "./providers/fetch-helpers.ts";
31
+ import { PROVIDERS } from "./providers/index.ts";
32
+ import { GITHUB_TOKEN_ENV_VAR, getActiveGitHubInterceptor, getInterceptors } from "./providers/interceptors/index.ts";
33
+ import type { FetchResponse, FullProvider, ProviderMeta, SearchProvider, SearchResult } from "./providers/types.ts";
34
34
 
35
35
  // ---------------------------------------------------------------------------
36
36
  // Tunables and external surface