@lincoln504/pi-research 1.6.17 → 1.6.18

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 CHANGED
@@ -34,8 +34,6 @@
34
34
 
35
35
  Search and scraping run locally in a stealth browser, with no search provider and no monthly cap. The only cost is LLM tokens.
36
36
 
37
- Currently recommended model to configure for research: [`openrouter/inclusionai/ling-3.0-flash`](https://openrouter.ai/inclusionai/ling-3.0-flash).
38
-
39
37
  ### Install
40
38
 
41
39
  As a [Pi](https://github.com/earendil-works/pi) Coding Agent extension:
@@ -89,7 +87,7 @@ Three depth levels (normal, deep, ultra) set the team size and number of rounds.
89
87
  - pi. The pi extension uses the host's copy while the standalone CLI and agent skill install it as a dependency.
90
88
  - Local knowledge-store embeddings need `@huggingface/transformers`, an optional dependency. If its native image chain (sharp) cannot install, npm skips it with a warning and the install still succeeds, so everything works except local embeddings. The store tells you how to restore them.
91
89
  - Cloudflare Turnstile and similar systems block scraping on some sites. A run compensates with a wide pool of search results to scrape.
92
- - npm reports 1 moderate advisory (adm-zip, pulled in by onnxruntime and the camoufox browser downloader). Installs are unaffected; just don't run `npm audit fix --force` (its suggested downgrade reintroduces a high-severity advisory). Details: [docs/AUDIT-GATE.md](docs/AUDIT-GATE.md).
90
+ - No open advisories: adm-zip 0.6.1 (which fixes the 2026 symlink-extraction advisory in the 0.5.9-0.6.0 line) reaches the tree directly, so `npm audit` is clean. History and the full triage runbook: [docs/AUDIT-GATE.md](docs/AUDIT-GATE.md).
93
91
 
94
92
  ### Channels
95
93
 
@@ -2,7 +2,7 @@
2
2
  name: pi-research
3
3
  description: "Multi-agent web research for any coding agent. Use for anything requiring current information from the internet — news, trends, product/service/company facts, statistics, people, places, events, APIs, library behavior, or 'what is X / how does X work' questions. Also use to search a local knowledge store of previously researched findings before doing live research. Powered by the pi-research engine (search, stealth scraping, security databases, Stack Exchange). Not for reading local files, running project commands, or analyzing this repository's own source."
4
4
  license: MIT
5
- metadata: { "author": "Lincoln Deen", "version": "1.6.17", "package": "@lincoln504/pi-research", "engine": "pi-research-sdk", "openclaw": { "requires": { "bins": ["node"] } } }
5
+ metadata: { "author": "Lincoln Deen", "version": "1.6.18", "package": "@lincoln504/pi-research", "engine": "pi-research-sdk", "openclaw": { "requires": { "bins": ["node"] } } }
6
6
  allowed-tools: Bash(node:*)
7
7
  ---
8
8
 
package/dist/cli.mjs CHANGED
@@ -3615,9 +3615,9 @@ function buildSafeOptions(model, options, defaultCap = 4096, thinkingLevel = "of
3615
3615
  ...options,
3616
3616
  // Ensure maxTokens is never null/None to avoid provider-side crashes
3617
3617
  maxTokens: options.maxTokens ?? Math.min(defaultCap, model.maxTokens || defaultCap),
3618
- // 'off' is a valid ModelThinkingLevel that pi-ai accepts at runtime even though the
3619
- // public SimpleStreamOptions.reasoning type narrows to the non-off ThinkingLevel.
3620
- reasoning: effective
3618
+ // compat API treats any truthy reasoning as thinking-enabled; 'off' has no budget
3619
+ // entry, so it would send maxTokens as NaN. undefined is its no-reasoning value.
3620
+ reasoning: effective === "off" ? void 0 : effective
3621
3621
  };
3622
3622
  }
3623
3623
  function validateAndExtractText(response, label) {
package/docs/CHANGELOG.md CHANGED
@@ -5,11 +5,20 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [Unreleased]
8
+ ## [1.6.18]
9
+
10
+ ### Fixed
11
+
12
+ - **`buildSafeOptions` no longer sends the literal `'off'` reasoning level into pi-ai's compat API (merged PR #13 by @lukey03).** pi-ai 0.85.1's compat path treats any truthy `reasoning` as thinking-enabled, and `'off'` has no entry in its thinking-budget table, so `maxTokens` was computed as `NaN` and serialized as `max_tokens: null` — every coordinator/plan call 400'd on providers that validate the cap (observed on Fireworks' anthropic-messages endpoint, where research never got past the first planning call). `'off'` now crosses the boundary as `undefined`, pi-ai's no-reasoning value; explicit non-off levels, caller precedence, and the maxTokens cap are unchanged. The new `build-safe-options.test.ts` drives the real compat `completeSimple` against a stubbed transport and asserts on the actual request body (5 of its 9 tests fail pre-patch); the one coordinator-boundary assertion that expected the literal `'off'` was updated to the compat contract.
13
+
14
+ ### Security
15
+
16
+ - **The adm-zip allowlist exception is REMOVED — the advisory is fixed upstream and the production audit is clean.** `adm-zip` 0.6.1 (published 2026-09-11) contains the fix for GHSA-vwc7-r8mq-g2x9 / CVE-2026-76845 (cthackers/adm-zip PR #575, commit `eaa35fa`: extraction no longer writes through destination symlinks, plus setuid/setgid/sticky-bit stripping and related symlink hardening) — the exact `clearsWhen` condition the 1.6.16 exception documented. The `adm-zip` override moves `^0.6.0` → `^0.6.1` to pin the floor explicitly; both parents (`onnxruntime-node`, `camoufox-js`) already resolve 0.6.1 from their own `^0.6.0` ranges, so consumers clear the advisory with a fresh install and can drop any suppression they added. `config/tooling/audit-exceptions.json` is now empty and `npm audit --omit=dev` reports zero vulnerabilities; `docs/AUDIT-GATE.md` keeps the worked example as the triage runbook and records the clearance (the GitHub advisory page still read "patched versions: None" as of 2026-09-16 — its last review predates the release by three days).
9
17
 
10
18
  ### Changed
11
19
 
12
- - **README: the adm-zip limitation bullet is trimmed to its essentials.** It no longer walks through the consumer-CI consequence (`npm audit` exiting nonzero until the upstream fix ships) or re-states the verified mechanics — installs succeed, don't run `npm audit fix --force`, details in `docs/AUDIT-GATE.md` — because pi-research is a research tool, not a CI component, and the full verified impact matrix lives in the runbook. No behavioral or dependency change.
20
+ - **README: the "Currently recommended model" line is removed** (leaving the README with no model endorsement), and the leftover double blank line it left behind is fixed.
21
+ - **Dev dependency lockfile refresh, all in-range: `vitest` 5.0.0 → 5.0.1, `@vitest/coverage-v8` 5.0.0 → 5.0.1, `vite` 8.2.2 → 8.3.0, `dependency-cruiser` 18.2.0 → 18.3.1, `jsdom` 30.0.1 → 30.1.0, `webgpu` 0.6.0 → 0.6.1.** Deliberate holds re-verified and unchanged: `typebox` stays 1.3.7 (lockstep with the host pi 0.85.1 line), `apache-arrow` stays 21.1.0 (21.2.0 breaks LanceDB IPC), `playwright-core` stays 1.60.0 (camoufox-js 0.12.0 peers `<1.61.0`), `typescript` stays `<6.1.0` (@typescript-eslint peer ceiling), and `@huggingface/transformers` stays 4.2.0 (4.3.0 pulls an `onnxruntime-web` dev build, `1.31.0-dev.20260914`, and reshuffles the optional native stack for no needed gain). The full gate suite is green: lint, all four type-checks (TS 6 and TS 7 native, src and tests), 3,073 unit tests, dependency-cruiser, build + manifest verify, and the audit gate with an empty allowlist.
13
22
 
14
23
  ## [1.6.16] - 2026-09-09
15
24
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lincoln504/pi-research",
3
- "version": "1.6.17",
3
+ "version": "1.6.18",
4
4
  "description": "Web research for your agents with smart and safe tooling + knowledge store",
5
5
  "type": "module",
6
6
  "private": false,
@@ -116,8 +116,8 @@
116
116
  "dependencies": {
117
117
  "@earendil-works/pi-ai": ">=0.85.0 <1",
118
118
  "@earendil-works/pi-coding-agent": ">=0.85.0 <1",
119
- "@earendil-works/pi-tui": ">=0.85.0 <1",
120
119
  "@earendil-works/pi-server": ">=0.85.0 <1",
120
+ "@earendil-works/pi-tui": ">=0.85.0 <1",
121
121
  "@kreuzberg/html-to-markdown-node": "^3.7.2",
122
122
  "@lancedb/lancedb": "0.38.0",
123
123
  "apache-arrow": "21.1.0",
@@ -125,7 +125,7 @@
125
125
  "camoufox-js": "^0.12.0",
126
126
  "esbuild": "^0.28.2",
127
127
  "impit": "0.14.5",
128
- "jsdom": "^30.0.1",
128
+ "jsdom": "^30.1.0",
129
129
  "node-html-markdown": "^2.0.0",
130
130
  "pdf-oxide-wasm": "^0.3.77",
131
131
  "playwright-core": "1.60.0",
@@ -147,7 +147,7 @@
147
147
  "ua-parser-js": "^1.0.41",
148
148
  "protobufjs": "7.6.5",
149
149
  "vite": "^8.2.2",
150
- "adm-zip": "^0.6.0",
150
+ "adm-zip": "^0.6.1",
151
151
  "jsdom": {
152
152
  "undici": "^8.10.2"
153
153
  },
@@ -158,13 +158,13 @@
158
158
  "@types/jsdom": "^30.0.0",
159
159
  "@typescript-eslint/eslint-plugin": "^8.70.0",
160
160
  "@typescript-eslint/parser": "^8.70.0",
161
- "@vitest/coverage-v8": "^5.0.0",
161
+ "@vitest/coverage-v8": "^5.0.1",
162
162
  "dependency-cruiser": "^18.2.0",
163
163
  "depngn": "^0.6.0",
164
164
  "eslint": "^10.10.0",
165
165
  "npm-check-updates": "^23.1.0",
166
166
  "typescript": ">=6.0.3 <6.1.0",
167
167
  "vite": "^8.2.2",
168
- "vitest": "^5.0.0"
168
+ "vitest": "^5.0.1"
169
169
  }
170
170
  }
@@ -14,10 +14,8 @@ import { completeSimple } from './pi-ai-completion.ts';
14
14
  *
15
15
  * - Ensures maxTokens is always set (satisfies providers that reject a null cap),
16
16
  * clamped to the model's own ceiling so a large requested cap is never invalid.
17
- * - Sets the chain-of-thought "thinking" level, defaulting to 'off'. This is passed
18
- * straight to pi-ai, which clamps it to whatever the specific model/provider
19
- * supports (disabling thinking where an off state exists, omitting the parameter
20
- * where it does not). The fix is therefore model-agnostic — pi-ai owns the
17
+ * - Sets the chain-of-thought "thinking" level, defaulting to 'off' (normalized to
18
+ * undefined at the compat boundary, see the reasoning line below). pi-ai owns the
21
19
  * per-provider translation; this code never hardcodes a provider-specific payload.
22
20
  * 'off' is deliberate: these engine calls emit structured JSON / cited reports, so a
23
21
  * thinking block only consumes the output-token budget (often truncating before the
@@ -47,9 +45,9 @@ export function buildSafeOptions(
47
45
  ...options,
48
46
  // Ensure maxTokens is never null/None to avoid provider-side crashes
49
47
  maxTokens: options.maxTokens ?? Math.min(defaultCap, model.maxTokens || defaultCap),
50
- // 'off' is a valid ModelThinkingLevel that pi-ai accepts at runtime even though the
51
- // public SimpleStreamOptions.reasoning type narrows to the non-off ThinkingLevel.
52
- reasoning: effective as unknown as SimpleStreamOptions['reasoning'],
48
+ // compat API treats any truthy reasoning as thinking-enabled; 'off' has no budget
49
+ // entry, so it would send maxTokens as NaN. undefined is its no-reasoning value.
50
+ reasoning: effective === 'off' ? undefined : (effective as SimpleStreamOptions['reasoning']),
53
51
  };
54
52
  }
55
53