@herbertgao/pi-extensions 2026.10.14 → 2026.10.15
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 +8 -6
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/node_modules/@narumitw/pi-btw/README.md +1 -1
- package/node_modules/@narumitw/pi-btw/dist/index.ts +77 -64
- package/node_modules/@narumitw/pi-btw/dist/index.ts.map +2 -2
- package/node_modules/@narumitw/pi-btw/docs/core-alignment.md +10 -2
- package/node_modules/@narumitw/pi-btw/package.json +5 -5
- package/node_modules/@narumitw/pi-btw/src/fullscreen-ui.ts +83 -63
- package/node_modules/@narumitw/pi-caffeinate/package.json +3 -3
- package/node_modules/pi-web-access/CHANGELOG.md +40 -0
- package/node_modules/pi-web-access/README.md +96 -22
- package/node_modules/pi-web-access/brave-rate-limit.ts +2 -2
- package/node_modules/pi-web-access/curator-page.ts +3 -1
- package/node_modules/pi-web-access/curator-server.ts +1 -0
- package/node_modules/pi-web-access/dist/index.js +2607 -1674
- package/node_modules/pi-web-access/dist/mcp-cli.js +1119 -327
- package/node_modules/pi-web-access/duckduckgo-rate-limit.ts +95 -0
- package/node_modules/pi-web-access/duckduckgo.ts +51 -45
- package/node_modules/pi-web-access/exa.ts +48 -6
- package/node_modules/pi-web-access/extract.ts +2 -2
- package/node_modules/pi-web-access/fetch-params.ts +5 -4
- package/node_modules/pi-web-access/field-extract.ts +347 -0
- package/node_modules/pi-web-access/gemini-search.ts +151 -13
- package/node_modules/pi-web-access/index.ts +128 -125
- package/node_modules/pi-web-access/mistral-search.ts +1 -1
- package/node_modules/pi-web-access/ninerouter.ts +92 -0
- package/node_modules/pi-web-access/offtopic-judge.ts +72 -0
- package/node_modules/pi-web-access/openai-search.ts +36 -10
- package/node_modules/pi-web-access/package.json +1 -1
- package/node_modules/pi-web-access/perplexity.ts +1 -0
- package/node_modules/pi-web-access/query-rewrite.ts +39 -13
- package/node_modules/pi-web-access/source-check.ts +31 -15
- package/node_modules/pi-web-access/summary-model-scope.ts +19 -1
- package/node_modules/pi-web-access/summary-review.ts +13 -20
- package/node_modules/pi-web-access/tool-arguments.ts +1 -1
- package/node_modules/pi-web-access/upgrade-notice.ts +47 -0
- package/node_modules/pi-web-access/utils.ts +26 -1
- package/node_modules/pi-web-access/web-tool-contract.ts +4 -1
- package/node_modules/pi-web-access/web-tool-core.ts +99 -19
- package/node_modules/pi-web-access/xai-search.ts +3 -3
- package/package.json +6 -6
|
@@ -4,7 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
BTW keeps its side-thread policy separate from Pi's renderer and Kit's shared screens.
|
|
6
6
|
Local improvements do not remove the need for a public Pi workspace API.
|
|
7
|
-
The contracts below are proposals, not available Pi APIs. No external issue, core change, or publication is implied.
|
|
7
|
+
The upstream Pi contracts below are proposals, not available Pi APIs. No external issue, core change, or publication is implied.
|
|
8
|
+
|
|
9
|
+
## Shared physical handoff extraction
|
|
10
|
+
|
|
11
|
+
The Kit `createFullscreenHandoff()` resource shares only terminal entry, native drain, stop/start, owned-overlay hiding, and restoration. BTW retains its multi-screen context adapter, private split-pane layout integration, input priority, paste handling, selection/copy, root cancellation, main-thread updates, bring-to-main, and queued settings writes.
|
|
12
|
+
|
|
13
|
+
The [retained shared matrix and verification record](https://github.com/narumiruna/pi-extensions/blob/main/packages/pi-tui-kit/docs/fullscreen-handoff.md) records two-consumer admission with Starship, lifecycle regressions, artifact and PTY smokes, dependency propagation, and exact-artifact release guards. Historical checks below do not replace the shared resource's evidence. The proposed Pi workspace-composition API remains necessary.
|
|
14
|
+
|
|
15
|
+
Pi's official [TUI guidance](https://github.com/earendil-works/pi/blob/main/packages/coding-agent/docs/tui.md) advises against a second terminal renderer. BTW intentionally deviates: a second TUI instance exists, but only one renderer actively owns the shared terminal. Extracting the physical lifecycle into Kit does not make that deviation officially supported or remove private layout access from BTW.
|
|
8
16
|
|
|
9
17
|
## Evidence boundary
|
|
10
18
|
|
|
@@ -242,7 +250,7 @@ These steps define contract tests, not instructions to open a live provider or i
|
|
|
242
250
|
|
|
243
251
|
The Pi core maintainer owns API design, implementation, tests, and publication after repository-owner approval.
|
|
244
252
|
A later authorized BTW migration must pass the existing native-dispatch and terminal-restoration regressions before removing the workaround.
|
|
245
|
-
No new Kit API or raised BTW dependency floor
|
|
253
|
+
No new Kit API or raised BTW dependency floor was required for that upstream API proposal. The separate shared physical-handoff extraction above must require the Kit release that first contains its API before dependent publication.
|
|
246
254
|
|
|
247
255
|
## Verification and remaining acceptance
|
|
248
256
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@narumitw/pi-btw",
|
|
3
|
-
"version": "0.63.
|
|
3
|
+
"version": "0.63.1",
|
|
4
4
|
"description": "Pi extension that adds a /btw side-question command.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"prepack": "npm run build"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@earendil-works/pi-ai": "1.
|
|
36
|
-
"@earendil-works/pi-coding-agent": "1.
|
|
37
|
-
"@earendil-works/pi-tui": "1.
|
|
35
|
+
"@earendil-works/pi-ai": "1.4.0",
|
|
36
|
+
"@earendil-works/pi-coding-agent": "1.4.0",
|
|
37
|
+
"@earendil-works/pi-tui": "1.4.0",
|
|
38
38
|
"esbuild": "0.28.2",
|
|
39
39
|
"typescript": "7.0.2"
|
|
40
40
|
},
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"directory": "packages/pi-btw"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@narumitw/pi-tui-kit": "^0.
|
|
47
|
+
"@narumitw/pi-tui-kit": "^0.67.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"@earendil-works/pi-ai": "*",
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
type Theme,
|
|
6
6
|
} from "@earendil-works/pi-coding-agent";
|
|
7
7
|
import { type Component, type OverlayHandle, ScrollView, type TUI, truncateToWidth } from "@earendil-works/pi-tui";
|
|
8
|
+
import type { createFullscreenHandoff, FullscreenHandoff } from "@narumitw/pi-tui-kit";
|
|
8
9
|
import {
|
|
9
10
|
type BtwFullscreenTui,
|
|
10
11
|
createBtwFullscreenTui,
|
|
@@ -83,6 +84,10 @@ export async function runBtwFullscreen<T>(
|
|
|
83
84
|
options: BtwFullscreenOptions = {},
|
|
84
85
|
dependencies: BtwFullscreenDependencies = {},
|
|
85
86
|
): Promise<T> {
|
|
87
|
+
const { createFullscreenHandoff } = await import("@narumitw/pi-tui-kit/fullscreen-handoff");
|
|
88
|
+
if (ctx.signal?.aborted || options.signal?.aborted || options.canRestoreParent?.() === false) {
|
|
89
|
+
throw new FullscreenUiDisposedError();
|
|
90
|
+
}
|
|
86
91
|
const createTui =
|
|
87
92
|
dependencies.createTui ??
|
|
88
93
|
((parent: TUI, theme: Theme, keybindings: KeybindingsManager, fullscreenOptions: BtwFullscreenOptions) =>
|
|
@@ -121,6 +126,7 @@ export async function runBtwFullscreen<T>(
|
|
|
121
126
|
},
|
|
122
127
|
createTui,
|
|
123
128
|
options,
|
|
129
|
+
createFullscreenHandoff,
|
|
124
130
|
);
|
|
125
131
|
return host;
|
|
126
132
|
},
|
|
@@ -142,7 +148,7 @@ export async function runBtwFullscreen<T>(
|
|
|
142
148
|
|
|
143
149
|
class BtwFullscreenHost<T> implements Component {
|
|
144
150
|
private fullscreen: BtwFullscreenTui | undefined;
|
|
145
|
-
private
|
|
151
|
+
private readonly handoff: FullscreenHandoff<BtwFullscreenTui>;
|
|
146
152
|
private cancelActiveCustom: (() => void) | undefined;
|
|
147
153
|
private hardCancelActiveCustom: (() => void) | undefined;
|
|
148
154
|
private removeHardCancelListener: (() => void) | undefined;
|
|
@@ -150,13 +156,8 @@ class BtwFullscreenHost<T> implements Component {
|
|
|
150
156
|
private started = false;
|
|
151
157
|
private disposed = false;
|
|
152
158
|
private finished = false;
|
|
153
|
-
private parentStopped = false;
|
|
154
|
-
private parentRestoreAttempted = false;
|
|
155
|
-
private fullscreenCreated = false;
|
|
156
|
-
private fullscreenStopped = false;
|
|
157
|
-
private parentRestoreQueued = false;
|
|
158
159
|
private parentRestorePromise: Promise<void> | undefined;
|
|
159
|
-
private
|
|
160
|
+
private readonly cleanupErrors: unknown[] = [];
|
|
160
161
|
private removeMainThreadUpdateListener: (() => void) | undefined;
|
|
161
162
|
private mainThreadRefreshTimer: ReturnType<typeof setTimeout> | undefined;
|
|
162
163
|
private readonly mainThreadInput: BtwMainThreadInput;
|
|
@@ -175,6 +176,7 @@ class BtwFullscreenHost<T> implements Component {
|
|
|
175
176
|
private readonly done: (outcome: FullscreenOutcome<T>) => void,
|
|
176
177
|
private readonly createTui: BtwFullscreenTuiFactory,
|
|
177
178
|
private readonly options: BtwFullscreenOptions,
|
|
179
|
+
createHandoff: typeof createFullscreenHandoff,
|
|
178
180
|
) {
|
|
179
181
|
const initialMainInput = getFocusedComponent(parent);
|
|
180
182
|
this.mainThreadInput = new BtwMainThreadInput(
|
|
@@ -185,12 +187,20 @@ class BtwFullscreenHost<T> implements Component {
|
|
|
185
187
|
},
|
|
186
188
|
() => this.fullscreen?.requestRender(),
|
|
187
189
|
);
|
|
190
|
+
this.handoff = createHandoff<BtwFullscreenTui>(parent, {
|
|
191
|
+
isCurrent: () =>
|
|
192
|
+
!this.disposed &&
|
|
193
|
+
!this.finished &&
|
|
194
|
+
!this.lifetimeController.signal.aborted &&
|
|
195
|
+
this.options.canRestoreParent?.() !== false,
|
|
196
|
+
canRestoreParent: () => this.options.canRestoreParent?.() !== false,
|
|
197
|
+
});
|
|
188
198
|
this.sidePaneRatio = options.sidePaneRatio;
|
|
189
199
|
queueMicrotask(() => void this.start());
|
|
190
200
|
}
|
|
191
201
|
|
|
192
202
|
setParentOverlay(overlay: OverlayHandle): void {
|
|
193
|
-
this.
|
|
203
|
+
this.handoff.setOverlayHandle(overlay);
|
|
194
204
|
}
|
|
195
205
|
|
|
196
206
|
render(width: number): string[] {
|
|
@@ -221,12 +231,12 @@ class BtwFullscreenHost<T> implements Component {
|
|
|
221
231
|
getParentFullscreenLayout(this.parent);
|
|
222
232
|
getParentFullscreenScrollView(this.parent);
|
|
223
233
|
}
|
|
224
|
-
this.
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
this.fullscreen
|
|
228
|
-
|
|
229
|
-
|
|
234
|
+
this.fullscreen = await this.handoff.enter(() =>
|
|
235
|
+
this.createTui(this.parent, this.theme, this.keybindings, this.options),
|
|
236
|
+
);
|
|
237
|
+
if (!this.fullscreen || this.disposed || this.finished || this.options.canRestoreParent?.() === false) {
|
|
238
|
+
throw new FullscreenUiDisposedError();
|
|
239
|
+
}
|
|
230
240
|
this.watchMainThreadUpdates();
|
|
231
241
|
const shortcuts = resolveBtwShortcuts(
|
|
232
242
|
this.options.keybindings,
|
|
@@ -287,11 +297,19 @@ class BtwFullscreenHost<T> implements Component {
|
|
|
287
297
|
try {
|
|
288
298
|
this.cancelActiveCustom?.();
|
|
289
299
|
} catch (error) {
|
|
290
|
-
this.
|
|
300
|
+
this.cleanupErrors.push(error);
|
|
301
|
+
}
|
|
302
|
+
this.queueParentRestore();
|
|
303
|
+
await this.parentRestorePromise;
|
|
304
|
+
if (this.cleanupErrors.length) {
|
|
305
|
+
outcome = {
|
|
306
|
+
kind: "failed",
|
|
307
|
+
error: combineErrors(
|
|
308
|
+
outcome.kind === "failed" ? [outcome.error, ...this.cleanupErrors] : this.cleanupErrors,
|
|
309
|
+
"Pi BTW flow and terminal cleanup failed",
|
|
310
|
+
),
|
|
311
|
+
};
|
|
291
312
|
}
|
|
292
|
-
if (this.parentRestorePromise) await this.parentRestorePromise;
|
|
293
|
-
else this.restoreParent();
|
|
294
|
-
if (this.cleanupError !== undefined) outcome = { kind: "failed", error: this.cleanupError };
|
|
295
313
|
this.finished = true;
|
|
296
314
|
this.done(outcome);
|
|
297
315
|
}
|
|
@@ -333,16 +351,13 @@ class BtwFullscreenHost<T> implements Component {
|
|
|
333
351
|
}
|
|
334
352
|
|
|
335
353
|
private queueParentRestore(): void {
|
|
336
|
-
if (this.
|
|
337
|
-
this.
|
|
354
|
+
if (this.parentRestorePromise) return;
|
|
355
|
+
const restoration = this.handoff.restore().catch((error: unknown) => {
|
|
356
|
+
this.cleanupErrors.push(error);
|
|
357
|
+
});
|
|
338
358
|
this.parentRestorePromise = Promise.resolve().then(async () => {
|
|
339
|
-
try {
|
|
340
|
-
await this.fullscreen?.terminal.drainInput?.();
|
|
341
|
-
} catch (error) {
|
|
342
|
-
this.cleanupError ??= error;
|
|
343
|
-
}
|
|
344
|
-
this.parentRestoreQueued = false;
|
|
345
359
|
this.restoreParent();
|
|
360
|
+
await restoration;
|
|
346
361
|
});
|
|
347
362
|
}
|
|
348
363
|
|
|
@@ -369,50 +384,26 @@ class BtwFullscreenHost<T> implements Component {
|
|
|
369
384
|
try {
|
|
370
385
|
removeMainThreadUpdateListener?.();
|
|
371
386
|
} catch (error) {
|
|
372
|
-
this.
|
|
387
|
+
this.cleanupErrors.push(error);
|
|
373
388
|
}
|
|
374
389
|
try {
|
|
375
390
|
this.mainThreadInput.dispose();
|
|
376
391
|
} catch (error) {
|
|
377
|
-
this.
|
|
392
|
+
this.cleanupErrors.push(error);
|
|
378
393
|
}
|
|
379
394
|
const removeUpstreamAbortListener = this.removeUpstreamAbortListener;
|
|
380
395
|
this.removeUpstreamAbortListener = undefined;
|
|
381
396
|
try {
|
|
382
397
|
removeUpstreamAbortListener?.();
|
|
383
398
|
} catch (error) {
|
|
384
|
-
this.
|
|
399
|
+
this.cleanupErrors.push(error);
|
|
385
400
|
}
|
|
386
401
|
const removeHardCancelListener = this.removeHardCancelListener;
|
|
387
402
|
this.removeHardCancelListener = undefined;
|
|
388
403
|
try {
|
|
389
404
|
removeHardCancelListener?.();
|
|
390
405
|
} catch (error) {
|
|
391
|
-
this.
|
|
392
|
-
}
|
|
393
|
-
if (this.fullscreenCreated && !this.fullscreenStopped) {
|
|
394
|
-
this.fullscreenStopped = true;
|
|
395
|
-
try {
|
|
396
|
-
this.fullscreen?.stop({ preserveScreen: true });
|
|
397
|
-
} catch (error) {
|
|
398
|
-
this.cleanupError ??= error;
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
if (!this.parentStopped || this.parentRestoreAttempted) return;
|
|
402
|
-
const parentOverlay = this.parentOverlay;
|
|
403
|
-
this.parentOverlay = undefined;
|
|
404
|
-
try {
|
|
405
|
-
parentOverlay?.setHidden(true);
|
|
406
|
-
} catch (error) {
|
|
407
|
-
this.cleanupError ??= error;
|
|
408
|
-
}
|
|
409
|
-
try {
|
|
410
|
-
this.parentRestoreAttempted = true;
|
|
411
|
-
if (this.options.canRestoreParent?.() === false) return;
|
|
412
|
-
this.parent.start();
|
|
413
|
-
this.parent.renderNow(false);
|
|
414
|
-
} catch (error) {
|
|
415
|
-
this.cleanupError ??= error;
|
|
406
|
+
this.cleanupErrors.push(error);
|
|
416
407
|
}
|
|
417
408
|
}
|
|
418
409
|
|
|
@@ -487,23 +478,23 @@ class BtwFullscreenHost<T> implements Component {
|
|
|
487
478
|
componentDisposed = true;
|
|
488
479
|
try {
|
|
489
480
|
component.dispose?.();
|
|
490
|
-
} catch {
|
|
491
|
-
|
|
481
|
+
} catch (error) {
|
|
482
|
+
this.cleanupErrors.push(error);
|
|
492
483
|
}
|
|
493
484
|
};
|
|
494
485
|
const unmount = () => {
|
|
495
|
-
|
|
486
|
+
const cleanupErrors: unknown[] = [];
|
|
496
487
|
const removeFocusListener = removePaneFocusListener;
|
|
497
488
|
removePaneFocusListener = undefined;
|
|
498
489
|
try {
|
|
499
490
|
removeFocusListener?.();
|
|
500
491
|
} catch (error) {
|
|
501
|
-
|
|
492
|
+
cleanupErrors.push(error);
|
|
502
493
|
}
|
|
503
494
|
try {
|
|
504
495
|
splitPane?.dispose();
|
|
505
496
|
} catch (error) {
|
|
506
|
-
|
|
497
|
+
cleanupErrors.push(error);
|
|
507
498
|
}
|
|
508
499
|
splitPane = undefined;
|
|
509
500
|
try {
|
|
@@ -511,18 +502,18 @@ class BtwFullscreenHost<T> implements Component {
|
|
|
511
502
|
else if (mounted && layoutMounted) fullscreen.setLayoutRoot(undefined);
|
|
512
503
|
else if (mounted && component) fullscreen.removeChild(component);
|
|
513
504
|
} catch (error) {
|
|
514
|
-
|
|
505
|
+
cleanupErrors.push(error);
|
|
515
506
|
}
|
|
516
507
|
if (overlay || mounted) {
|
|
517
508
|
try {
|
|
518
509
|
fullscreen.setFocus(null);
|
|
519
510
|
fullscreen.requestRender();
|
|
520
511
|
} catch (error) {
|
|
521
|
-
|
|
512
|
+
cleanupErrors.push(error);
|
|
522
513
|
}
|
|
523
514
|
}
|
|
524
515
|
disposeComponent();
|
|
525
|
-
if (
|
|
516
|
+
if (cleanupErrors.length) throw combineErrors(cleanupErrors, "Pi BTW custom UI cleanup failed");
|
|
526
517
|
};
|
|
527
518
|
const complete = () => {
|
|
528
519
|
if (promiseSettled || !hasPendingValue) return;
|
|
@@ -557,7 +548,7 @@ class BtwFullscreenHost<T> implements Component {
|
|
|
557
548
|
unmount();
|
|
558
549
|
reject(error);
|
|
559
550
|
} catch (cleanupError) {
|
|
560
|
-
reject(cleanupError);
|
|
551
|
+
reject(combineErrors([error, cleanupError], "Pi BTW custom UI and cleanup failed"));
|
|
561
552
|
}
|
|
562
553
|
};
|
|
563
554
|
this.cancelActiveCustom = () => {
|
|
@@ -710,6 +701,35 @@ class BtwFullscreenHost<T> implements Component {
|
|
|
710
701
|
}
|
|
711
702
|
}
|
|
712
703
|
|
|
704
|
+
// Keep an existing aggregate intact unless it overlaps causes already collected.
|
|
705
|
+
function combineErrors(errors: readonly unknown[], message: string): unknown {
|
|
706
|
+
const causes: unknown[] = [];
|
|
707
|
+
const seen = new Set<unknown>();
|
|
708
|
+
const remember = (error: unknown): void => {
|
|
709
|
+
if (seen.has(error)) return;
|
|
710
|
+
seen.add(error);
|
|
711
|
+
if (error instanceof AggregateError) error.errors.forEach(remember);
|
|
712
|
+
};
|
|
713
|
+
const overlaps = (error: unknown, visited = new Set<unknown>()): boolean => {
|
|
714
|
+
if (seen.has(error)) return true;
|
|
715
|
+
if (visited.has(error)) return false;
|
|
716
|
+
visited.add(error);
|
|
717
|
+
return error instanceof AggregateError && error.errors.some((cause: unknown) => overlaps(cause, visited));
|
|
718
|
+
};
|
|
719
|
+
const append = (error: unknown): void => {
|
|
720
|
+
if (seen.has(error)) return;
|
|
721
|
+
if (error instanceof AggregateError && overlaps(error)) {
|
|
722
|
+
seen.add(error);
|
|
723
|
+
error.errors.forEach(append);
|
|
724
|
+
return;
|
|
725
|
+
}
|
|
726
|
+
causes.push(error);
|
|
727
|
+
remember(error);
|
|
728
|
+
};
|
|
729
|
+
errors.forEach(append);
|
|
730
|
+
return causes.length === 1 ? causes[0] : new AggregateError(causes, message);
|
|
731
|
+
}
|
|
732
|
+
|
|
713
733
|
function formatError(error: unknown): string {
|
|
714
734
|
return error instanceof Error ? error.message : String(error);
|
|
715
735
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@narumitw/pi-caffeinate",
|
|
3
|
-
"version": "0.49.
|
|
3
|
+
"version": "0.49.13",
|
|
4
4
|
"description": "Pi extension that keeps the computer awake while the agent is running.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@earendil-works/pi-coding-agent": "*"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@earendil-works/pi-coding-agent": "1.
|
|
38
|
+
"@earendil-works/pi-coding-agent": "1.4.0",
|
|
39
39
|
"@types/node": "26.6.5",
|
|
40
40
|
"esbuild": "0.28.2",
|
|
41
41
|
"typescript": "7.0.2"
|
|
@@ -47,6 +47,6 @@
|
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@narumitw/pi-tui-kit": "^0.59.0",
|
|
50
|
-
"dbus-native": "^0.16.
|
|
50
|
+
"dbus-native": "^0.16.2"
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -4,6 +4,46 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.45.0] - 2026-10-25
|
|
8
|
+
|
|
9
|
+
### Highlights
|
|
10
|
+
|
|
11
|
+
- Pull exact facts off a page. Ask for "price: number" and get 29 back with the line it came from, not 40KB of HTML. It says when a value isn't there instead of guessing. Opt-in.
|
|
12
|
+
- Summaries can run on the model your Pi session is using, so they stay on your local or self-hosted model.
|
|
13
|
+
- The web tools take 60% less of every request to the model (2.8k → 1.1k tokens).
|
|
14
|
+
- Search moves to the next provider when one comes back empty, you can put a time limit on the whole search, and DuckDuckGo no longer gets your IP blocked.
|
|
15
|
+
- Search through Azure with Bing, or pick the model for a single search.
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- `fetch_content` can read specific values off a page instead of returning all of it: a price, a release date, a rate limit, a list of supported platforms. It is off unless you add `"extract"` to `fetch.allowedModes`, and it uses Cloudflare's Clairic model with the Cloudflare key you set up in Pi (`CLOUDFLARE_API_KEY` and `CLOUDFLARE_ACCOUNT_ID`); with a `CLOUDFLARE_GATEWAY_ID` in Pi, the requests go through that Cloudflare AI Gateway. Call it with `mode: "extract"` and `fields` such as `{ "price": "number: Pro plan monthly price" }`; each field comes back as a typed value, as an uncertain guess, or as not on the page, and a value is reported only when the model is confident and it has the right type. Once it is on, the agent's tool list tells it to use extract when it needs a specific value rather than the whole page. The page text is sent to Cloudflare. Pi only; [docs/field-extract.md](https://github.com/nicobailon/pi-web-access/blob/main/docs/field-extract.md) has the details and measurements.
|
|
20
|
+
- Extract mode shows the page line each text or number value was found on, so you can check and cite it. Text the model is confident about but that isn't on the page comes back as uncertain, not extracted ([#616](https://github.com/nicobailon/pi-web-access/issues/616)).
|
|
21
|
+
- Codemode scripts that call `fetch_content` with `mode: "extract"` get each page's typed values as data, under `extraction` for each URL, so a script doesn't have to parse text ([#618](https://github.com/nicobailon/pi-web-access/issues/618)).
|
|
22
|
+
- After an update, the first Pi session shows the highlights of the releases you skipped, once, with a link to the full changelog. A fresh install or a downgrade shows nothing.
|
|
23
|
+
- Search through a self-hosted [9router](https://github.com/decolua/9router) with `provider: "ninerouter"` and `ninerouterBaseUrl`, so every search backend set up in the router works from Pi. Thanks to [@giovannirandykusuma](https://github.com/giovannirandykusuma) for [PR #612](https://github.com/nicobailon/pi-web-access/pull/612).
|
|
24
|
+
- Search routing can skip a provider whose results have nothing to do with your query. Add `"off-topic"` to `searchRouting.fallbackOn` and pick a classifier model in `searchRouting.offTopicModel`; it then checks each routed answer and moves on when the results are off-topic ([#619](https://github.com/nicobailon/pi-web-access/issues/619)).
|
|
25
|
+
- Search routing can move on to the next provider when one answers with no results, or with no results from the domains you asked for. Turn it on by adding `"empty"` or `"domain-miss"` to `searchRouting.fallbackOn`. If every provider answers that way, you get the first answer. A routed search can also be given a total time limit with `searchRouting.timeoutMs` (1 to 600000 milliseconds), which includes the time spent checking whether each provider is set up and signed in; when it runs out, you get the first answer passed over, or an error that says the route ran out of time. Thanks to [@isjiajia01](https://github.com/isjiajia01) for [PR #594](https://github.com/nicobailon/pi-web-access/pull/594).
|
|
26
|
+
- `queryRewriteModel` chooses the model the curator uses to rewrite a search query: `"current"` for the model your Pi session is running, or a `provider/model-id`, each with an optional thinking level such as `"current:low"`. When set, no other model is tried. Unset, the rewrite still uses its built-in list of cloud models.
|
|
27
|
+
- `summaryModel` accepts `"current"` or `"current:<level>"` to write summaries with the model your Pi session is running, which keeps them on a local or self-hosted model. Pi `enabledModels` still applies.
|
|
28
|
+
- `web_search` takes an optional `model` to pick the search model for one call, for example `provider: "openai", model: "gpt-6-luna"`, without changing your config. It works with the OpenAI, xAI, Mistral, and Gemini providers, and only when you name exactly one of them as `provider`. If that model fails, you get the error; the search is not retried with a different model or provider. Thanks to [@IdrisGit](https://github.com/IdrisGit) for [PR #598](https://github.com/nicobailon/pi-web-access/pull/598).
|
|
29
|
+
- `"allowHttpBaseUrls": true` (or `PI_WEB_ACCESS_ALLOW_HTTP_BASE_URLS=true`) lets provider gateway base URLs such as `braveBaseUrl` use plain `http://` on any host, for example an internal Kubernetes Service. Without it, gateway URLs must still use HTTPS unless they point at your own machine. HTTP sends API keys unencrypted, so use it only on a trusted network. Thanks to [@Coder-Sang](https://github.com/Coder-Sang) for [PR #592](https://github.com/nicobailon/pi-web-access/pull/592).
|
|
30
|
+
- Web search through Azure OpenAI, which grounds answers with Bing. Point `openaiResponsesUrl` at your Azure resource's `/openai/v1/responses` endpoint and set `openaiSearchModel` to your deployment name; an Azure API key is sent in the `api-key` header and a Microsoft Entra token as Bearer auth. A Pi Azure provider can be reused with `openaiUseProviderBaseUrl`, and an active Pi model on an Azure endpoint works with `searchRouting.useCurrentModel`. Azure doesn't support `openaiUseAlphaSearch`, so that setting is rejected before any request. Bing grounding is billed separately by Microsoft; see the README for cost and privacy notes. Thanks to [@abhishek944](https://github.com/abhishek944) for [PR #599](https://github.com/nicobailon/pi-web-access/pull/599).
|
|
31
|
+
- Exa search results show each source's published date and authors, and results from Exa's `publication` category (its research paper index) also show the citation count and DOI. `publication` replaces `research paper` as the documented category; `research paper` still works. Thanks to [@kestermcullough](https://github.com/kestermcullough) for [PR #596](https://github.com/nicobailon/pi-web-access/pull/596).
|
|
32
|
+
|
|
33
|
+
### Changed
|
|
34
|
+
|
|
35
|
+
- `source_check` shows the passages it found under each source, up to 4,000 characters, so the agent can weigh the claim without a second `get_search_content` call. Before, the result listed only titles and links.
|
|
36
|
+
- The web tools now add about 1,100 tokens to every request to the model instead of about 2,800: the definitions of `web_search`, `source_check`, `fetch_content`, and `get_search_content` shrank from about 11,000 to about 4,400 characters. Every parameter is still there; the longer explanations moved to the README ([#595](https://github.com/nicobailon/pi-web-access/issues/595)).
|
|
37
|
+
- The `provider` argument of `web_search` and `source_check` is now a plain string. To search several providers at once, pass comma-separated names such as `"brave,exa"` instead of a list. An unknown name now returns an error that lists the valid names, instead of quietly using automatic selection. The `provider` setting in `web-search.json`, including lists, works as before ([#595](https://github.com/nicobailon/pi-web-access/issues/595)).
|
|
38
|
+
- When `summaryModel` is set, summaries use only that model. Before, if it was missing, signed out, or failed, the summary quietly switched to a built-in cloud model such as Claude Haiku, which could bill a provider you did not choose. Now you get the plain summary built from the search results, with the reason it failed, and the curator preselects your model even when it is unavailable. An invalid `summaryModel`, including an empty string, stops the summary with an error naming the config file instead of being ignored. If `summaryModel` is not set, nothing changes. Thanks to [@Meetsch](https://github.com/Meetsch) for [issue #597](https://github.com/nicobailon/pi-web-access/issues/597).
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
|
|
42
|
+
- DuckDuckGo search no longer locks itself out. Several searches at once, such as a `queries` list, used to trigger DuckDuckGo's bot check for the whole IP address for 10 to 15 minutes, and every retry kept the block in place. DuckDuckGo searches now run one at a time, at least 2 seconds apart. After a bot check the provider stops sending requests for 5 minutes, doubling up to 1 hour, and fails at once with a `quota` error, so search routing can fall back right away.
|
|
43
|
+
- A DuckDuckGo search that times out now fails as a network error instead of an abort, so search routing falls back to the next provider. Its 30-second limit also counts the time spent waiting behind other DuckDuckGo searches. Thanks to [@kestermcullough](https://github.com/kestermcullough) for [PR #593](https://github.com/nicobailon/pi-web-access/pull/593).
|
|
44
|
+
- `source_check` passages from fetched pages keep the whole sentence when it contains a period inside a word, such as `example.com`. Before, the passage started after the last such period and lost its subject. Thanks to [@appe233](https://github.com/appe233) for reporting [#600](https://github.com/nicobailon/pi-web-access/issues/600).
|
|
45
|
+
- `source_check` picks the sentences from fetched pages that match the claim. Before, when the search result had a snippet, it matched the snippet instead and the claim was ignored. Acronyms and numbers such as `API`, `TLS` and `429` now count as matching words.
|
|
46
|
+
|
|
7
47
|
## [0.44.0] - 2026-10-20
|
|
8
48
|
|
|
9
49
|
### Highlights
|