pi-web-providers 2.4.0 → 2.4.1

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.
Files changed (2) hide show
  1. package/dist/index.js +16 -20
  2. package/package.json +11 -5
package/dist/index.js CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  visibleWidth,
24
24
  wrapTextWithAnsi
25
25
  } from "@mariozechner/pi-tui";
26
- import { Type as Type16 } from "@sinclair/typebox";
26
+ import { Type as Type16 } from "typebox";
27
27
 
28
28
  // src/config.ts
29
29
  import { execSync } from "node:child_process";
@@ -1179,7 +1179,7 @@ function parseOptionalNonNegativeIntegerOption(options, key) {
1179
1179
  }
1180
1180
 
1181
1181
  // src/options.ts
1182
- import { Type } from "@sinclair/typebox";
1182
+ import { Type } from "typebox";
1183
1183
  var runtimeOptionFields = {
1184
1184
  requestTimeoutMs: Type.Optional(
1185
1185
  Type.Integer({
@@ -1274,7 +1274,7 @@ import { createHash } from "node:crypto";
1274
1274
  // src/providers/claude.ts
1275
1275
  import { existsSync } from "node:fs";
1276
1276
  import { query } from "@anthropic-ai/claude-agent-sdk";
1277
- import { Type as Type3 } from "@sinclair/typebox";
1277
+ import { Type as Type3 } from "typebox";
1278
1278
 
1279
1279
  // src/provider-plans.ts
1280
1280
  function createProviderPlan({
@@ -1372,7 +1372,7 @@ function asPlanConfig(config) {
1372
1372
  }
1373
1373
 
1374
1374
  // src/providers/schema.ts
1375
- import { Type as Type2 } from "@sinclair/typebox";
1375
+ import { Type as Type2 } from "typebox";
1376
1376
  function literalUnion(values, options) {
1377
1377
  return Type2.Union(
1378
1378
  values.map((value) => Type2.Literal(value)),
@@ -1748,7 +1748,7 @@ function readString(value, key) {
1748
1748
  }
1749
1749
 
1750
1750
  // src/providers/cloudflare.ts
1751
- import { Type as Type4 } from "@sinclair/typebox";
1751
+ import { Type as Type4 } from "typebox";
1752
1752
  import CloudflareClient from "cloudflare";
1753
1753
  var cloudflareContentsOptionsSchema = Type4.Object(
1754
1754
  {
@@ -1888,7 +1888,7 @@ function buildRequestOptions(context) {
1888
1888
 
1889
1889
  // src/providers/codex.ts
1890
1890
  import { Codex as CodexClient } from "@openai/codex-sdk";
1891
- import { Type as Type5 } from "@sinclair/typebox";
1891
+ import { Type as Type5 } from "typebox";
1892
1892
  var codexOutputSchema = Type5.Object({
1893
1893
  sources: Type5.Array(
1894
1894
  Type5.Object({
@@ -2493,7 +2493,7 @@ function isJsonObject2(value) {
2493
2493
  }
2494
2494
 
2495
2495
  // src/providers/exa.ts
2496
- import { Type as Type6 } from "@sinclair/typebox";
2496
+ import { Type as Type6 } from "typebox";
2497
2497
  import { Exa as ExaClient } from "exa-js";
2498
2498
  var exaSearchOptionsSchema = Type6.Object(
2499
2499
  {
@@ -2791,7 +2791,7 @@ function createClient2(config) {
2791
2791
 
2792
2792
  // src/providers/firecrawl.ts
2793
2793
  import FirecrawlClient from "@mendable/firecrawl-js";
2794
- import { Type as Type7 } from "@sinclair/typebox";
2794
+ import { Type as Type7 } from "typebox";
2795
2795
  var firecrawlSearchOptionsSchema = Type7.Object(
2796
2796
  {
2797
2797
  lang: Type7.Optional(
@@ -3086,7 +3086,7 @@ function readString2(value) {
3086
3086
 
3087
3087
  // src/providers/gemini.ts
3088
3088
  import { GoogleGenAI } from "@google/genai";
3089
- import { Type as Type8 } from "@sinclair/typebox";
3089
+ import { Type as Type8 } from "typebox";
3090
3090
  var DEFAULT_SEARCH_MODEL = "gemini-2.5-flash";
3091
3091
  var DEFAULT_ANSWER_MODEL = "gemini-2.5-flash";
3092
3092
  var DEFAULT_RESEARCH_AGENT = "deep-research-pro-preview-12-2025";
@@ -3869,7 +3869,7 @@ function readNonEmptyString3(value) {
3869
3869
  }
3870
3870
 
3871
3871
  // src/providers/linkup.ts
3872
- import { Type as Type9 } from "@sinclair/typebox";
3872
+ import { Type as Type9 } from "typebox";
3873
3873
  import {
3874
3874
  LinkupClient
3875
3875
  } from "linkup-sdk";
@@ -4122,7 +4122,7 @@ function toDate(value, name) {
4122
4122
  }
4123
4123
 
4124
4124
  // src/providers/openai.ts
4125
- import { Type as Type10 } from "@sinclair/typebox";
4125
+ import { Type as Type10 } from "typebox";
4126
4126
  import OpenAI from "openai";
4127
4127
  var DEFAULT_SEARCH_MODEL2 = "gpt-4.1";
4128
4128
  var DEFAULT_ANSWER_MODEL2 = "gpt-4.1";
@@ -4638,7 +4638,7 @@ function readInteger(value) {
4638
4638
  }
4639
4639
 
4640
4640
  // src/providers/parallel.ts
4641
- import { Type as Type11 } from "@sinclair/typebox";
4641
+ import { Type as Type11 } from "typebox";
4642
4642
  import ParallelClient from "parallel-web";
4643
4643
  var parallelSearchOptionsSchema = Type11.Object(
4644
4644
  {
@@ -4819,7 +4819,7 @@ function buildRequestOptions3(context) {
4819
4819
 
4820
4820
  // src/providers/perplexity.ts
4821
4821
  import PerplexityClient from "@perplexity-ai/perplexity_ai";
4822
- import { Type as Type12 } from "@sinclair/typebox";
4822
+ import { Type as Type12 } from "typebox";
4823
4823
  var DEFAULT_ANSWER_MODEL3 = "sonar";
4824
4824
  var DEFAULT_RESEARCH_MODEL2 = "sonar-deep-research";
4825
4825
  var perplexitySearchOptionsSchema = Type12.Object(
@@ -5133,7 +5133,7 @@ function buildRequestOptions4(context) {
5133
5133
  }
5134
5134
 
5135
5135
  // src/providers/serper.ts
5136
- import { Type as Type13 } from "@sinclair/typebox";
5136
+ import { Type as Type13 } from "typebox";
5137
5137
  var DEFAULT_BASE_URL = "https://google.serper.dev";
5138
5138
  var serperSearchOptionsSchema = Type13.Object(
5139
5139
  {
@@ -5364,7 +5364,7 @@ function readNumber(value) {
5364
5364
  }
5365
5365
 
5366
5366
  // src/providers/tavily.ts
5367
- import { Type as Type14 } from "@sinclair/typebox";
5367
+ import { Type as Type14 } from "typebox";
5368
5368
  import {
5369
5369
  tavily
5370
5370
  } from "@tavily/core";
@@ -5614,7 +5614,7 @@ function buildExtractMetadata(response, result) {
5614
5614
  }
5615
5615
 
5616
5616
  // src/providers/valyu.ts
5617
- import { Type as Type15 } from "@sinclair/typebox";
5617
+ import { Type as Type15 } from "typebox";
5618
5618
  import { Valyu as ValyuClient } from "valyu-js";
5619
5619
  var valyuSearchOptionsSchema = Type15.Object(
5620
5620
  {
@@ -7788,10 +7788,6 @@ function webProvidersExtension(pi) {
7788
7788
  { addAvailable: true }
7789
7789
  );
7790
7790
  });
7791
- pi.on("session_switch", async (_event, ctx) => {
7792
- latestWidgetContext = ctx;
7793
- updateWebResearchWidget(ctx);
7794
- });
7795
7791
  pi.on("before_agent_start", async (_event, ctx) => {
7796
7792
  latestWidgetContext = ctx;
7797
7793
  await cleanupContentStore();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-web-providers",
3
- "version": "2.4.0",
3
+ "version": "2.4.1",
4
4
  "description": "Configurable web access extension for pi with per-tool provider routing and explicit provider option schemas for search, contents, answers, and research.",
5
5
  "type": "module",
6
6
  "files": [
@@ -52,7 +52,7 @@
52
52
  ]
53
53
  },
54
54
  "scripts": {
55
- "build": "rm -rf dist && esbuild src/index.ts --bundle --format=esm --platform=node --outfile=dist/index.js --external:@mariozechner/pi-coding-agent --external:@mariozechner/pi-ai --external:@mariozechner/pi-tui --external:@sinclair/typebox --external:@anthropic-ai/claude-agent-sdk --external:@google/genai --external:@mendable/firecrawl-js --external:@openai/codex-sdk --external:@perplexity-ai/perplexity_ai --external:@tavily/core --external:cloudflare --external:exa-js --external:linkup-sdk --external:openai --external:parallel-web --external:valyu-js",
55
+ "build": "rm -rf dist && esbuild src/index.ts --bundle --format=esm --platform=node --outfile=dist/index.js --external:@mariozechner/pi-coding-agent --external:@mariozechner/pi-ai --external:@mariozechner/pi-tui --external:typebox --external:@anthropic-ai/claude-agent-sdk --external:@google/genai --external:@mendable/firecrawl-js --external:@openai/codex-sdk --external:@perplexity-ai/perplexity_ai --external:@tavily/core --external:cloudflare --external:exa-js --external:linkup-sdk --external:openai --external:parallel-web --external:valyu-js",
56
56
  "prepare": "npm run build",
57
57
  "prepack": "npm run build",
58
58
  "check": "tsc --noEmit",
@@ -78,12 +78,18 @@
78
78
  },
79
79
  "devDependencies": {
80
80
  "@biomejs/biome": "^2.4.10",
81
- "@mariozechner/pi-ai": "^0.64.0",
82
- "@mariozechner/pi-coding-agent": "^0.64.0",
83
- "@sinclair/typebox": "^0.34.49",
81
+ "@mariozechner/pi-ai": "^0.69.0",
82
+ "@mariozechner/pi-coding-agent": "^0.69.0",
83
+ "@mariozechner/pi-tui": "^0.69.0",
84
+ "typebox": "^1.1.31",
84
85
  "@types/node": "^25.5.0",
85
86
  "esbuild": "^0.27.4",
86
87
  "typescript": "^6.0.2",
87
88
  "vitest": "^4.1.2"
89
+ },
90
+ "peerDependencies": {
91
+ "@mariozechner/pi-coding-agent": "*",
92
+ "@mariozechner/pi-tui": "*",
93
+ "typebox": "*"
88
94
  }
89
95
  }