@herbertgao/pi-extensions 2026.10.7 → 2026.10.8
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/README.md +4 -4
- package/THIRD_PARTY_NOTICES.md +2 -2
- package/node_modules/@herbertgao/pi-cc-extensions/README.en.md +28 -27
- package/node_modules/@herbertgao/pi-cc-extensions/README.md +6 -6
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/config.ts +16 -27
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/panel.ts +49 -48
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/compact-thinking.ts +2 -3
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/context.ts +0 -60
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/reference/index.ts +2 -3
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/footer-layout.ts +105 -23
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/footer.ts +59 -43
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/prompt-editor.ts +96 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/index.ts +6 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/compact-mode.ts +36 -34
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/default-mode.ts +7 -4
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/interaction.ts +3 -2
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/scroll.ts +23 -8
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/sticky-prompt.ts +2 -2
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/ccstyle-tool.ts +24 -12
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/codemode.ts +121 -6
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-limits.ts +3 -2
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-palette.ts +39 -8
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-presentation.ts +2 -2
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/grouping.ts +13 -13
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/message-display.ts +3 -2
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/names.ts +49 -49
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/result.ts +24 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/tool-state.ts +51 -2
- package/node_modules/@herbertgao/pi-cc-extensions/package.json +4 -4
- package/node_modules/@herbertgao/pi-cc-extensions/themes/cc-dark.json +71 -70
- package/node_modules/@herbertgao/pi-cc-extensions/themes/cc-light.json +71 -70
- package/node_modules/@tifan/pi-inline-skills/package.json +5 -1
- package/node_modules/@tifan/pi-inline-skills/src/index.ts +5 -2
- package/node_modules/pi-provider-qoder/dist/index.js +136 -31
- package/node_modules/pi-provider-qoder/package.json +1 -1
- package/node_modules/pi-typesafe/README.md +3 -3
- package/node_modules/pi-typesafe/dist/backends.d.ts +7 -2
- package/node_modules/pi-typesafe/dist/backends.js +42 -0
- package/node_modules/pi-typesafe/dist/batch.d.ts +10 -6
- package/node_modules/pi-typesafe/dist/batch.js +20 -9
- package/node_modules/pi-typesafe/dist/client.d.ts +4 -1
- package/node_modules/pi-typesafe/dist/client.js +5 -4
- package/node_modules/pi-typesafe/dist/index.d.ts +2 -2
- package/node_modules/pi-typesafe/dist/index.js +1 -1
- package/node_modules/pi-typesafe/dist/schema.d.ts +18 -3
- package/node_modules/pi-typesafe/dist/schema.js +29 -3
- package/node_modules/pi-typesafe/package.json +1 -1
- package/node_modules/pi-web-access/CHANGELOG.md +16 -0
- package/node_modules/pi-web-access/README.md +5 -2
- package/node_modules/pi-web-access/dist/index.js +13 -2
- package/node_modules/pi-web-access/dist/mcp-cli.js +14 -3
- package/node_modules/pi-web-access/extract.ts +4 -2
- package/node_modules/pi-web-access/package.json +1 -1
- package/node_modules/pi-web-access/searxng.ts +2 -1
- package/node_modules/pi-web-access/ssrf-protection.ts +11 -0
- package/package.json +6 -6
|
@@ -21,7 +21,7 @@ import { extractWithCrawl4ai, isCrawl4aiAvailable } from "./crawl4ai.ts";
|
|
|
21
21
|
import { extractWithBrightDataUnlocker, isBrightDataUnlockerAvailable } from "./brightdata-unlocker.ts";
|
|
22
22
|
import { isVideoFile, extractVideo, extractVideoFrame, getLocalVideoDuration } from "./video-extract.ts";
|
|
23
23
|
import { appendDeclaredWebLinks, discoverDeclaredWebLinks, type DeclaredWebLink } from "./declared-web-links.ts";
|
|
24
|
-
import { fetchRemoteUrl, loadFetchContentDomainPolicy, loadFetchContentRedirectPolicy, loadSsrfConfig, validateRemoteUrl, type DomainPolicy, type Lookup, type RedirectPolicy, type SsrfConfig } from "./ssrf-protection.ts";
|
|
24
|
+
import { fetchRemoteUrl, loadFetchContentDomainPolicy, loadFetchContentRedirectPolicy, loadFetchContentUserAgent, loadSsrfConfig, validateRemoteUrl, type DomainPolicy, type Lookup, type RedirectPolicy, type SsrfConfig } from "./ssrf-protection.ts";
|
|
25
25
|
import { formatSeconds, getWebSearchConfigPath, type ProxiedRequestInit } from "./utils.ts";
|
|
26
26
|
import { isImageEnabled } from "./feature-config.ts";
|
|
27
27
|
import { assertAuthFetchUrl, authFetchRedirectGuard, type AuthFetchProfile } from "./auth-fetch.ts";
|
|
@@ -569,6 +569,8 @@ export async function extractContent(
|
|
|
569
569
|
try {
|
|
570
570
|
const ssrf = loadSsrfConfig();
|
|
571
571
|
const domainPolicy = loadFetchContentDomainPolicy();
|
|
572
|
+
// An invalid configured User-Agent fails here, before any provider fallback runs.
|
|
573
|
+
loadFetchContentUserAgent();
|
|
572
574
|
await validateRemoteUrl(remoteUrl, {
|
|
573
575
|
allowRanges: ssrf.allowRanges,
|
|
574
576
|
trustEnvProxy: ssrf.trustEnvProxy,
|
|
@@ -1251,7 +1253,7 @@ async function extractViaHttp(
|
|
|
1251
1253
|
signal: controller.signal,
|
|
1252
1254
|
__proxy: options?.proxy,
|
|
1253
1255
|
headers: {
|
|
1254
|
-
"User-Agent":
|
|
1256
|
+
"User-Agent": loadFetchContentUserAgent(),
|
|
1255
1257
|
"Accept": preferMarkdown ? MARKDOWN_FIRST_ACCEPT : BROWSER_ACCEPT,
|
|
1256
1258
|
"Accept-Language": "en-US,en;q=0.9",
|
|
1257
1259
|
"Cache-Control": "no-cache",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-web-access",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.41.0",
|
|
4
4
|
"description": "Web search, URL fetching, GitHub repo cloning, PDF extraction, YouTube video understanding, and local video analysis for Pi coding agent. Supports OpenAI, Brave, Parallel, TinyFish, Search1API, Searchinfinity, Querit, Tavily, Firecrawl, Crawl4AI, Jina, SERPdive, Kagi, Ollama, AnySearch, Bright Data SERP, SerpBase, SerpApi, Serply, You.com, SearXNG, degoog, Exa, Perplexity, Gemini, Kimi, and Mistral.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -4,7 +4,7 @@ import { normalizeDomain } from "./domain-filter-normalization.ts";
|
|
|
4
4
|
import { fetchRemoteUrl, loadSsrfConfig } from "./ssrf-protection.ts";
|
|
5
5
|
import type { SearchOptions, SearchResult, SearchResponse } from "./perplexity.ts";
|
|
6
6
|
import { normalizeSearchResultCount } from "./search-result-count-normalization.ts";
|
|
7
|
-
import { getWebSearchConfigPath } from "./utils.ts";
|
|
7
|
+
import { getWebSearchConfigPath, isLoopbackHostname } from "./utils.ts";
|
|
8
8
|
|
|
9
9
|
const CONFIG_PATH = getWebSearchConfigPath();
|
|
10
10
|
const SEARCH_TIMEOUT_MS = 30_000;
|
|
@@ -196,6 +196,7 @@ export async function searchWithSearXNG(query: string, options: SearchOptions =
|
|
|
196
196
|
: AbortSignal.timeout(SEARCH_TIMEOUT_MS),
|
|
197
197
|
}, {
|
|
198
198
|
...loadSsrfConfig(),
|
|
199
|
+
allowLoopback: isLoopbackHostname(url.hostname),
|
|
199
200
|
onRedirect: ({ from, to, init }) => from.origin === to.origin ? init : { ...init, headers: { Accept: "application/json" } },
|
|
200
201
|
});
|
|
201
202
|
|
|
@@ -88,6 +88,17 @@ export function loadFetchContentRedirectPolicy(): RedirectPolicy | undefined {
|
|
|
88
88
|
return redirects;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
+
const DEFAULT_FETCH_CONTENT_USER_AGENT = "OpenAI File Downloader, XaiImageApiFetch/1.0";
|
|
92
|
+
|
|
93
|
+
export function loadFetchContentUserAgent(): string {
|
|
94
|
+
const userAgent = loadFetchContentConfig()?.userAgent;
|
|
95
|
+
if (userAgent === undefined || userAgent === null) return DEFAULT_FETCH_CONTENT_USER_AGENT;
|
|
96
|
+
if (typeof userAgent !== "string" || userAgent.trim().length === 0 || !/^[\t\x20-\x7e]+$/.test(userAgent)) {
|
|
97
|
+
throw new Error(`fetchContent.userAgent in ${WEB_SEARCH_CONFIG_PATH} must be a non-empty string of printable ASCII characters`);
|
|
98
|
+
}
|
|
99
|
+
return userAgent.trim();
|
|
100
|
+
}
|
|
101
|
+
|
|
91
102
|
export function loadFetchContentDomainPolicy(): DomainPolicy {
|
|
92
103
|
const policy = loadFetchContentConfig()?.domainPolicy;
|
|
93
104
|
if (policy === undefined || policy === null) return { ...DEFAULT_DOMAIN_POLICY };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@herbertgao/pi-extensions",
|
|
3
|
-
"version": "2026.10.
|
|
3
|
+
"version": "2026.10.8",
|
|
4
4
|
"description": "Aggregate installer for HerbertGao-maintained Pi extensions.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"extensions",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@dietrichgebert/ponytail": "5.2.0",
|
|
42
42
|
"@herbertgao/pi-agency": "0.1.1",
|
|
43
43
|
"@herbertgao/pi-bark": "0.2.1",
|
|
44
|
-
"@herbertgao/pi-cc-extensions": "1.0.
|
|
44
|
+
"@herbertgao/pi-cc-extensions": "1.0.6-local.1",
|
|
45
45
|
"@herbertgao/pi-subagents": "0.22.0-local.1",
|
|
46
46
|
"@herbertgao/sol-pi": "0.4.1",
|
|
47
47
|
"@juicesharp/rpiv-ask-user-question": "2.13.8",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@shikijs/cli": "^4.0.2",
|
|
57
57
|
"@tifan/pi-copy-response": "0.2.7",
|
|
58
58
|
"@tifan/pi-handoff": "2.2.2",
|
|
59
|
-
"@tifan/pi-inline-skills": "1.0.
|
|
59
|
+
"@tifan/pi-inline-skills": "1.0.7",
|
|
60
60
|
"@tifan/pi-mermaid-open": "0.2.2",
|
|
61
61
|
"@tifan/pi-preferred-thinking": "1.0.2",
|
|
62
62
|
"@tifan/pi-recap": "0.4.8",
|
|
@@ -76,9 +76,9 @@
|
|
|
76
76
|
"pi-lens": "4.4.3",
|
|
77
77
|
"pi-multi-account": "1.24.0",
|
|
78
78
|
"pi-next-cue": "1.0.7",
|
|
79
|
-
"pi-provider-qoder": "0.
|
|
80
|
-
"pi-typesafe": "0.
|
|
81
|
-
"pi-web-access": "0.
|
|
79
|
+
"pi-provider-qoder": "0.6.1",
|
|
80
|
+
"pi-typesafe": "0.10.0",
|
|
81
|
+
"pi-web-access": "0.41.0",
|
|
82
82
|
"pidusage": "^4.0.1",
|
|
83
83
|
"promise.try": "^2.0.1",
|
|
84
84
|
"proper-lockfile": "4.1.2",
|