@demigodmode/pi-web-agent 0.6.0 → 1.0.0
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/CHANGELOG.md +192 -0
- package/README.md +5 -26
- package/dist/changelog-notice.d.ts +16 -0
- package/dist/changelog-notice.js +105 -0
- package/dist/commands/web-agent-config.d.ts +2 -1
- package/dist/commands/web-agent-config.js +10 -3
- package/dist/extension.d.ts +1 -1
- package/dist/extension.js +12 -0
- package/package.json +7 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is intentionally simple and release-oriented.
|
|
6
|
+
|
|
7
|
+
## Unreleased
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- Nothing yet.
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- Nothing yet.
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
- Nothing yet.
|
|
17
|
+
|
|
18
|
+
### Breaking
|
|
19
|
+
- None.
|
|
20
|
+
|
|
21
|
+
## [1.0.0] - 2026-05-08
|
|
22
|
+
### Added
|
|
23
|
+
- Added one-time `pi-web-agent` changelog notices after package updates and `/web-agent changelog` for manual viewing.
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
- Migrated Pi package imports to `@earendil-works/*` after the upstream Pi scope move.
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
- Nothing yet.
|
|
30
|
+
|
|
31
|
+
### Breaking
|
|
32
|
+
- This release requires Pi 0.74+. Users on older Pi versions should stay on `@demigodmode/pi-web-agent@0.6.x` until they update Pi.
|
|
33
|
+
|
|
34
|
+
## [0.6.0] - 2026-05-04
|
|
35
|
+
### Added
|
|
36
|
+
- Added configurable web backends for `web_explore`, including SearXNG search and Firecrawl fetch support.
|
|
37
|
+
- Added backend diagnostics to `/web-agent doctor`, including config validation and self-hosted endpoint checks.
|
|
38
|
+
- Added dedicated self-hosted backend docs for connecting existing SearXNG and Firecrawl services.
|
|
39
|
+
|
|
40
|
+
### Changed
|
|
41
|
+
- `/web-agent show` now includes the effective backend configuration.
|
|
42
|
+
- `web_explore` now loads the effective backend config while preserving the default DuckDuckGo, HTTP, and local-browser behavior.
|
|
43
|
+
|
|
44
|
+
### Fixed
|
|
45
|
+
- Fixed backend config merging so provider-specific fields do not leak when a higher-precedence config changes providers.
|
|
46
|
+
- Kept the configured `web_explore` workflow reusable while backend config is unchanged, avoiding unnecessary backend/cache recreation.
|
|
47
|
+
|
|
48
|
+
### Breaking
|
|
49
|
+
- None.
|
|
50
|
+
|
|
51
|
+
## [0.5.1] - 2026-05-04
|
|
52
|
+
### Added
|
|
53
|
+
- Nothing yet.
|
|
54
|
+
|
|
55
|
+
### Changed
|
|
56
|
+
- Nothing yet.
|
|
57
|
+
|
|
58
|
+
### Fixed
|
|
59
|
+
- Fixed the Windows browser-resolution test so it is deterministic on Linux CI.
|
|
60
|
+
|
|
61
|
+
### Breaking
|
|
62
|
+
- None.
|
|
63
|
+
|
|
64
|
+
## [0.5.0] - 2026-05-04
|
|
65
|
+
### Added
|
|
66
|
+
- Added `/web-agent doctor` to report extension, runtime dependency, and browser detection status.
|
|
67
|
+
- Added a `/web-agent` action menu for settings, config display, doctor, and reset actions.
|
|
68
|
+
|
|
69
|
+
### Changed
|
|
70
|
+
- Migrated runtime schema imports from `@sinclair/typebox` to `typebox` for Pi 0.69 compatibility.
|
|
71
|
+
- Documented the current headless rendering browser requirement and doctor command.
|
|
72
|
+
|
|
73
|
+
### Fixed
|
|
74
|
+
- Fixed headless browser detection so Chrome, Chromium, Edge, and Brave can be found across Windows, macOS, and Linux instead of only checking Windows Chrome/Edge paths.
|
|
75
|
+
|
|
76
|
+
### Breaking
|
|
77
|
+
- None.
|
|
78
|
+
|
|
79
|
+
## [0.4.0] - 2026-04-29
|
|
80
|
+
### Added
|
|
81
|
+
- Made `web_explore` the single public web research tool, with search, fetch, source ranking, and headless escalation handled internally.
|
|
82
|
+
- Added adaptive research helpers for query planning, candidate selection, evidence ranking, stop decisions, and answer synthesis.
|
|
83
|
+
- Added preview/verbose provenance for `web_explore` showing which internal reader produced each finding.
|
|
84
|
+
|
|
85
|
+
### Changed
|
|
86
|
+
- Simplified `/web-agent` presentation settings to `defaultMode` and `web_explore` only.
|
|
87
|
+
- Updated live web evals to treat shell/network fallbacks after `web_explore` as a quality issue.
|
|
88
|
+
- Updated the release script to use `npm version --no-git-tag-version` before tagging so package metadata is changed through npm instead of regex replacement.
|
|
89
|
+
|
|
90
|
+
### Fixed
|
|
91
|
+
- Turned successful headless reads into usable `web_explore` evidence instead of returning empty results for dynamic docs pages.
|
|
92
|
+
- Filtered headless bot-check/security-verification pages out of research evidence.
|
|
93
|
+
- Made empty research results display as “No usable evidence found” instead of looking like a successful synthesis.
|
|
94
|
+
- Added the Linux Rollup optional package to the lockfile so GitHub Actions can build from `npm ci` without patch-installing Rollup.
|
|
95
|
+
|
|
96
|
+
### Breaking
|
|
97
|
+
- None.
|
|
98
|
+
|
|
99
|
+
## [0.3.1] - 2026-04-22
|
|
100
|
+
### Added
|
|
101
|
+
- Nothing yet.
|
|
102
|
+
|
|
103
|
+
### Changed
|
|
104
|
+
- Stopped self-upgrading npm inside the publish workflow before install and publish steps.
|
|
105
|
+
- Added GitHub release creation to the tag publish workflow.
|
|
106
|
+
|
|
107
|
+
### Fixed
|
|
108
|
+
- Fixed the tag publish workflow so npm publishing no longer fails before `npm ci`.
|
|
109
|
+
|
|
110
|
+
### Breaking
|
|
111
|
+
- None.
|
|
112
|
+
|
|
113
|
+
## [0.3.0] - 2026-04-22
|
|
114
|
+
### Added
|
|
115
|
+
- Added compact, preview, and verbose presentation modes for web tool output.
|
|
116
|
+
- Added a user-facing `/web-agent` settings UI plus helper commands for showing, resetting, and changing presentation config.
|
|
117
|
+
- Added global and project-local presentation config files with project-overrides-global precedence.
|
|
118
|
+
- Added docs for presentation settings, config paths, and command usage.
|
|
119
|
+
|
|
120
|
+
### Changed
|
|
121
|
+
- Made compact output the default presentation mode for all web tools.
|
|
122
|
+
- Made bare `/web-agent` open the settings UI directly.
|
|
123
|
+
|
|
124
|
+
### Fixed
|
|
125
|
+
- Fixed settings scope switching so global and project drafts do not leak into each other.
|
|
126
|
+
- Fixed config persistence so inherited values are not unnecessarily written into lower-precedence config files.
|
|
127
|
+
- Fixed command notifications to use supported Pi UI notify levels.
|
|
128
|
+
|
|
129
|
+
### Breaking
|
|
130
|
+
- None.
|
|
131
|
+
|
|
132
|
+
## [0.2.2] - 2026-04-21
|
|
133
|
+
### Added
|
|
134
|
+
- Expanded the live web eval so it covers deterministic search failure cases and reports when follow-up web calls were blocked after `web_explore`.
|
|
135
|
+
|
|
136
|
+
### Changed
|
|
137
|
+
- Tightened post-`web_explore` discipline by blocking same-flow low-level web tool churn instead of relying on prompt wording alone.
|
|
138
|
+
|
|
139
|
+
### Fixed
|
|
140
|
+
- Split `web_search` failures into more useful states like no results, parse failures, blocked pages, and fetch failures.
|
|
141
|
+
- Catch DuckDuckGo challenge pages that still return HTTP 200 so blocked searches stop looking like vague parser bugs.
|
|
142
|
+
- Stopped the model from spiraling into extra `web_search` / `web_fetch` calls after a successful `web_explore` in the live-eval cases.
|
|
143
|
+
|
|
144
|
+
### Breaking
|
|
145
|
+
- None.
|
|
146
|
+
|
|
147
|
+
## [0.2.1] - 2026-04-20
|
|
148
|
+
### Added
|
|
149
|
+
- Nothing yet.
|
|
150
|
+
|
|
151
|
+
### Changed
|
|
152
|
+
- Nothing yet.
|
|
153
|
+
|
|
154
|
+
### Fixed
|
|
155
|
+
- Added the missing npm `--provenance` flag to the publish workflow so Trusted Publishing can exchange the GitHub OIDC token correctly.
|
|
156
|
+
|
|
157
|
+
### Breaking
|
|
158
|
+
- None.
|
|
159
|
+
|
|
160
|
+
## [0.2.0] - 2026-04-20
|
|
161
|
+
### Added
|
|
162
|
+
- Added AGPL licensing, a release foundation test, and changelog-driven release tooling.
|
|
163
|
+
- Added GitHub Actions workflows for CI and tag-based npm publishing.
|
|
164
|
+
- Added maintainer docs for releases, self-hosted runners, and main branch protection.
|
|
165
|
+
|
|
166
|
+
### Changed
|
|
167
|
+
- Documented the release process in the README.
|
|
168
|
+
- Switched npm publishing guidance from `NPM_TOKEN` secrets to npm Trusted Publishing.
|
|
169
|
+
|
|
170
|
+
### Fixed
|
|
171
|
+
- Stopped injecting post-`web_explore` reminder text through a context hook so it no longer leaks into normal sessions.
|
|
172
|
+
- Worked around Rollup's missing Linux native package in GitHub Actions so CI and publish jobs run reliably on Ubuntu.
|
|
173
|
+
|
|
174
|
+
### Breaking
|
|
175
|
+
- None.
|
|
176
|
+
|
|
177
|
+
## [0.1.0] - 2026-04-20
|
|
178
|
+
|
|
179
|
+
### Added
|
|
180
|
+
- Published `@demigodmode/pi-web-agent` as a Pi package.
|
|
181
|
+
- Added explicit web research tools for search, HTTP fetch, headless fetch, and bounded exploration.
|
|
182
|
+
- Added headless fetch implementation and package install validation.
|
|
183
|
+
|
|
184
|
+
### Changed
|
|
185
|
+
- Tightened follow-up tool discipline after `web_explore`.
|
|
186
|
+
- Split package build output from repo-local development tooling.
|
|
187
|
+
|
|
188
|
+
### Fixed
|
|
189
|
+
- Fixed post-`web_explore` reminder handling so it is derived from context instead of shared mutable state.
|
|
190
|
+
|
|
191
|
+
### Breaking
|
|
192
|
+
- None.
|
package/README.md
CHANGED
|
@@ -14,6 +14,8 @@ That sounds obvious, but a lot of agent tooling gets fuzzy right there. This pac
|
|
|
14
14
|
|
|
15
15
|
## Install
|
|
16
16
|
|
|
17
|
+
Compatibility notice: current `pi-web-agent` requires Pi 0.74+ because Pi packages moved to the `@earendil-works/*` scope. Update Pi before updating this package. If you are on an older Pi version, stay on `@demigodmode/pi-web-agent@0.6.x` until Pi is updated.
|
|
18
|
+
|
|
17
19
|
```bash
|
|
18
20
|
pi install npm:@demigodmode/pi-web-agent
|
|
19
21
|
```
|
|
@@ -71,6 +73,7 @@ Helper commands:
|
|
|
71
73
|
```text
|
|
72
74
|
/web-agent doctor
|
|
73
75
|
/web-agent show
|
|
76
|
+
/web-agent changelog
|
|
74
77
|
/web-agent reset project
|
|
75
78
|
/web-agent reset global
|
|
76
79
|
/web-agent mode preview
|
|
@@ -106,33 +109,9 @@ Example:
|
|
|
106
109
|
}
|
|
107
110
|
```
|
|
108
111
|
|
|
109
|
-
Backend config is also supported. Defaults
|
|
110
|
-
|
|
111
|
-
```json
|
|
112
|
-
{
|
|
113
|
-
"backends": {
|
|
114
|
-
"search": { "provider": "duckduckgo" },
|
|
115
|
-
"fetch": { "provider": "http" },
|
|
116
|
-
"headless": { "provider": "local-browser" }
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
Self-hosted example for existing SearXNG/Firecrawl services:
|
|
122
|
-
|
|
123
|
-
```json
|
|
124
|
-
{
|
|
125
|
-
"backends": {
|
|
126
|
-
"search": { "provider": "searxng", "baseUrl": "http://localhost:8080" },
|
|
127
|
-
"fetch": { "provider": "firecrawl", "baseUrl": "http://localhost:3002" },
|
|
128
|
-
"headless": { "provider": "local-browser" }
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
Prefer `PI_WEB_AGENT_FIRECRAWL_API_KEY` for Firecrawl auth instead of putting secrets in project config. `/web-agent doctor` validates required backend fields and checks configured self-hosted endpoints.
|
|
112
|
+
Backend config is also supported. Defaults remain DuckDuckGo search, plain HTTP fetch, and local browser headless fallback. If you already run SearXNG or Firecrawl, see the self-hosted backend guide:
|
|
134
113
|
|
|
135
|
-
|
|
114
|
+
- https://demigodmode.github.io/pi-web-agent/self-hosted-backends
|
|
136
115
|
|
|
137
116
|
## Local development
|
|
138
117
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type ChangelogEntry = {
|
|
2
|
+
version: string;
|
|
3
|
+
content: string;
|
|
4
|
+
};
|
|
5
|
+
type ChangelogOptions = {
|
|
6
|
+
packageRoot?: string;
|
|
7
|
+
statePath?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function parseChangelogEntries(changelog: string): ChangelogEntry[];
|
|
10
|
+
export declare function markChangelogSeen({ statePath, version }: {
|
|
11
|
+
statePath?: string;
|
|
12
|
+
version: string;
|
|
13
|
+
}): Promise<void>;
|
|
14
|
+
export declare function getUpdateChangelogNotice(options?: ChangelogOptions): Promise<string | undefined>;
|
|
15
|
+
export declare function getLatestChangelogEntry(options?: ChangelogOptions): Promise<string | undefined>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
export function parseChangelogEntries(changelog) {
|
|
5
|
+
const lines = changelog.split(/\r?\n/);
|
|
6
|
+
const entries = [];
|
|
7
|
+
let currentVersion;
|
|
8
|
+
let currentLines = [];
|
|
9
|
+
function flush() {
|
|
10
|
+
if (currentVersion && currentLines.length > 0) {
|
|
11
|
+
entries.push({ version: currentVersion, content: currentLines.join('\n').trim() });
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
for (const line of lines) {
|
|
15
|
+
if (line.startsWith('## ')) {
|
|
16
|
+
flush();
|
|
17
|
+
const match = line.match(/^##\s+\[?(\d+\.\d+\.\d+)\]?/);
|
|
18
|
+
currentVersion = match?.[1];
|
|
19
|
+
currentLines = currentVersion ? [line] : [];
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
22
|
+
if (currentVersion) {
|
|
23
|
+
currentLines.push(line);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
flush();
|
|
27
|
+
return entries;
|
|
28
|
+
}
|
|
29
|
+
function compareVersions(left, right) {
|
|
30
|
+
const leftParts = left.split('.').map(Number);
|
|
31
|
+
const rightParts = right.split('.').map(Number);
|
|
32
|
+
for (let i = 0; i < 3; i += 1) {
|
|
33
|
+
const diff = (leftParts[i] || 0) - (rightParts[i] || 0);
|
|
34
|
+
if (diff !== 0)
|
|
35
|
+
return diff;
|
|
36
|
+
}
|
|
37
|
+
return 0;
|
|
38
|
+
}
|
|
39
|
+
function defaultPackageRoot() {
|
|
40
|
+
const here = path.dirname(fileURLToPath(import.meta.url));
|
|
41
|
+
return path.basename(here) === 'dist' ? path.dirname(here) : path.dirname(here);
|
|
42
|
+
}
|
|
43
|
+
function defaultStatePath() {
|
|
44
|
+
const homeDir = process.env.USERPROFILE ?? process.env.HOME ?? '';
|
|
45
|
+
return path.join(homeDir, '.pi', 'agent', 'extensions', 'pi-web-agent', 'state.json');
|
|
46
|
+
}
|
|
47
|
+
async function readPackageVersion(packageRoot) {
|
|
48
|
+
try {
|
|
49
|
+
const raw = await readFile(path.join(packageRoot, 'package.json'), 'utf8');
|
|
50
|
+
const parsed = JSON.parse(raw);
|
|
51
|
+
return typeof parsed.version === 'string' ? parsed.version : undefined;
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
async function readChangelogEntries(packageRoot) {
|
|
58
|
+
try {
|
|
59
|
+
return parseChangelogEntries(await readFile(path.join(packageRoot, 'CHANGELOG.md'), 'utf8'));
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
return [];
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
async function readState(statePath) {
|
|
66
|
+
try {
|
|
67
|
+
return JSON.parse(await readFile(statePath, 'utf8'));
|
|
68
|
+
}
|
|
69
|
+
catch {
|
|
70
|
+
return {};
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
export async function markChangelogSeen({ statePath = defaultStatePath(), version }) {
|
|
74
|
+
try {
|
|
75
|
+
await mkdir(path.dirname(statePath), { recursive: true });
|
|
76
|
+
await writeFile(statePath, `${JSON.stringify({ lastChangelogVersion: version }, null, 2)}\n`, 'utf8');
|
|
77
|
+
}
|
|
78
|
+
catch {
|
|
79
|
+
// Changelog display is best effort. Never block extension startup on state persistence.
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
export async function getUpdateChangelogNotice(options = {}) {
|
|
83
|
+
const packageRoot = options.packageRoot ?? defaultPackageRoot();
|
|
84
|
+
const statePath = options.statePath ?? defaultStatePath();
|
|
85
|
+
const version = await readPackageVersion(packageRoot);
|
|
86
|
+
if (!version)
|
|
87
|
+
return undefined;
|
|
88
|
+
const state = await readState(statePath);
|
|
89
|
+
if (!state.lastChangelogVersion) {
|
|
90
|
+
await markChangelogSeen({ statePath, version });
|
|
91
|
+
return undefined;
|
|
92
|
+
}
|
|
93
|
+
if (compareVersions(version, state.lastChangelogVersion) <= 0) {
|
|
94
|
+
return undefined;
|
|
95
|
+
}
|
|
96
|
+
const entries = (await readChangelogEntries(packageRoot))
|
|
97
|
+
.filter((entry) => compareVersions(entry.version, state.lastChangelogVersion || '0.0.0') > 0)
|
|
98
|
+
.map((entry) => entry.content);
|
|
99
|
+
await markChangelogSeen({ statePath, version });
|
|
100
|
+
return entries.length > 0 ? entries.join('\n\n') : undefined;
|
|
101
|
+
}
|
|
102
|
+
export async function getLatestChangelogEntry(options = {}) {
|
|
103
|
+
const entries = await readChangelogEntries(options.packageRoot ?? defaultPackageRoot());
|
|
104
|
+
return entries[0]?.content;
|
|
105
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type BackendConfig } from '../backends/config.js';
|
|
2
|
-
import { type ExtensionAPI } from '@
|
|
2
|
+
import { type ExtensionAPI } from '@earendil-works/pi-coding-agent';
|
|
3
3
|
import { loadPresentationConfigLayers, type LoadedPresentationConfig } from '../presentation/config-store.js';
|
|
4
4
|
import { type BrowserResolutionResult } from '../fetch/browser-resolution.js';
|
|
5
5
|
import type { PresentationConfig, PresentationConfigOverride, PresentationScope } from '../presentation/types.js';
|
|
@@ -15,6 +15,7 @@ type CommandDeps = {
|
|
|
15
15
|
};
|
|
16
16
|
checkTypebox?: () => Promise<boolean>;
|
|
17
17
|
checkBackends?: (config: BackendConfig) => Promise<string[]>;
|
|
18
|
+
getChangelog?: () => Promise<string | undefined>;
|
|
18
19
|
};
|
|
19
20
|
export type SettingsDraftState = {
|
|
20
21
|
scope: PresentationScope;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { DEFAULT_BACKEND_CONFIG, validateBackendConfig } from '../backends/config.js';
|
|
2
2
|
import { checkBackendHealth } from '../backends/doctor.js';
|
|
3
|
-
import { DynamicBorder, getSettingsListTheme } from '@
|
|
4
|
-
import { Container, SelectList, SettingsList, Text } from '@
|
|
3
|
+
import { DynamicBorder, getSettingsListTheme } from '@earendil-works/pi-coding-agent';
|
|
4
|
+
import { Container, SelectList, SettingsList, Text } from '@earendil-works/pi-tui';
|
|
5
5
|
import { DEFAULT_PRESENTATION_CONFIG, mergePresentationConfigLayers, resolvePresentationMode } from '../presentation/config.js';
|
|
6
6
|
import { loadPresentationConfigLayers, resetPresentationConfigScope, savePresentationConfigScope } from '../presentation/config-store.js';
|
|
7
7
|
import { resolveBrowserExecutable } from '../fetch/browser-resolution.js';
|
|
8
|
+
import { getLatestChangelogEntry } from '../changelog-notice.js';
|
|
8
9
|
const PRESENTATION_TOOL_NAMES = ['web_explore'];
|
|
9
10
|
function parseScopeToken(token) {
|
|
10
11
|
return token === 'global' || token === 'project' ? token : undefined;
|
|
@@ -249,6 +250,7 @@ export function registerWebAgentConfigCommands(pi, deps = {}) {
|
|
|
249
250
|
};
|
|
250
251
|
const checkTypebox = deps.checkTypebox ?? defaultCheckTypebox;
|
|
251
252
|
const checkBackends = deps.checkBackends ?? ((config) => checkBackendHealth(config));
|
|
253
|
+
const getChangelog = deps.getChangelog ?? (() => getLatestChangelogEntry());
|
|
252
254
|
pi.registerCommand('web-agent', {
|
|
253
255
|
description: 'Open settings or manage pi-web-agent presentation config',
|
|
254
256
|
handler: async (args, ctx) => {
|
|
@@ -303,6 +305,11 @@ export function registerWebAgentConfigCommands(pi, deps = {}) {
|
|
|
303
305
|
].join('\n'), 'info');
|
|
304
306
|
return;
|
|
305
307
|
}
|
|
308
|
+
if (action === 'changelog') {
|
|
309
|
+
const changelog = await getChangelog();
|
|
310
|
+
ctx.ui.notify(changelog ?? 'No pi-web-agent changelog entries found.', 'info');
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
306
313
|
if (action === 'reset') {
|
|
307
314
|
const scope = parseScopeToken(maybeScope) ?? 'project';
|
|
308
315
|
await reset(scope);
|
|
@@ -351,7 +358,7 @@ export function registerWebAgentConfigCommands(pi, deps = {}) {
|
|
|
351
358
|
ctx.ui.notify(`Saved ${result.scope} config`, 'info');
|
|
352
359
|
return;
|
|
353
360
|
}
|
|
354
|
-
ctx.ui.notify('Use /web-agent, /web-agent show, /web-agent doctor, /web-agent reset project, or /web-agent settings', 'info');
|
|
361
|
+
ctx.ui.notify('Use /web-agent, /web-agent show, /web-agent doctor, /web-agent changelog, /web-agent reset project, or /web-agent settings', 'info');
|
|
355
362
|
}
|
|
356
363
|
});
|
|
357
364
|
}
|
package/dist/extension.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ExtensionAPI } from '@
|
|
1
|
+
import type { ExtensionAPI } from '@earendil-works/pi-coding-agent';
|
|
2
2
|
export default function extension(pi: ExtensionAPI): void;
|
package/dist/extension.js
CHANGED
|
@@ -6,6 +6,7 @@ import { createResearchWorkflow } from './orchestration/index.js';
|
|
|
6
6
|
import { loadPresentationConfigLayers } from './presentation/config-store.js';
|
|
7
7
|
import { selectPresentationView } from './presentation/select-view.js';
|
|
8
8
|
import { createWebExploreTool } from './tools/web-explore.js';
|
|
9
|
+
import { getUpdateChangelogNotice } from './changelog-notice.js';
|
|
9
10
|
async function loadWebAgentConfig(pi) {
|
|
10
11
|
const store = pi.__presentationConfigStore;
|
|
11
12
|
return store?.load?.() ?? loadPresentationConfigLayers();
|
|
@@ -51,6 +52,17 @@ export default function extension(pi) {
|
|
|
51
52
|
}
|
|
52
53
|
return cachedWebExplore;
|
|
53
54
|
}
|
|
55
|
+
pi.on('session_start', async (_event, ctx) => {
|
|
56
|
+
try {
|
|
57
|
+
const notice = await getUpdateChangelogNotice();
|
|
58
|
+
if (notice) {
|
|
59
|
+
ctx.ui.notify(`pi-web-agent updated\n\n${notice}`, 'info');
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
catch {
|
|
63
|
+
// Never block extension startup on changelog display.
|
|
64
|
+
}
|
|
65
|
+
});
|
|
54
66
|
pi.on('before_agent_start', async (event) => ({
|
|
55
67
|
systemPrompt: `${event.systemPrompt}\n\n` +
|
|
56
68
|
'For web research questions that require finding and comparing sources, use web_explore. ' +
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@demigodmode/pi-web-agent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Pi package for reliable web access with explicit search, fetch, and headless boundaries.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/extension.js",
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
},
|
|
14
14
|
"files": [
|
|
15
15
|
"dist",
|
|
16
|
-
"README.md"
|
|
16
|
+
"README.md",
|
|
17
|
+
"CHANGELOG.md"
|
|
17
18
|
],
|
|
18
19
|
"keywords": [
|
|
19
20
|
"pi-package",
|
|
@@ -60,7 +61,8 @@
|
|
|
60
61
|
"typebox": "^1.1.37"
|
|
61
62
|
},
|
|
62
63
|
"devDependencies": {
|
|
63
|
-
"@
|
|
64
|
+
"@earendil-works/pi-coding-agent": "^0.74.0",
|
|
65
|
+
"@earendil-works/pi-tui": "^0.74.0",
|
|
64
66
|
"@types/jsdom": "^21.1.7",
|
|
65
67
|
"@types/node": "^24.0.0",
|
|
66
68
|
"@vitest/coverage-v8": "^3.2.4",
|
|
@@ -69,6 +71,7 @@
|
|
|
69
71
|
"vitest": "^3.2.0"
|
|
70
72
|
},
|
|
71
73
|
"peerDependencies": {
|
|
72
|
-
"@
|
|
74
|
+
"@earendil-works/pi-coding-agent": "*",
|
|
75
|
+
"@earendil-works/pi-tui": "*"
|
|
73
76
|
}
|
|
74
77
|
}
|