smart-web-mcp 0.18.0 → 0.19.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.
Files changed (3) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +52 -0
  3. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -9,8 +9,11 @@ The format is based on Keep a Changelog[^1] and this project uses SemVer.
9
9
  ### Added
10
10
 
11
11
  - `smartfetch` now accepts an MCP `output_budget` preset (`compact`, `balanced`, or `full`) and `fetch.outputBudget.preset` settings, so token-sensitive hosts can request smaller structured payloads without hand-tuning every numeric cap.
12
+ - Added MCP host-profile guidance for Hermes/Raon, Codex, OpenCode, and Claude Code, including budget-control precedence and compact/balanced/full follow-up retrieval guidance.
13
+ - Added deterministic MCP smoke coverage proving large `smartfetch` structured payloads stay out of `content[0].text` unless `format: "json"` is explicitly requested.
12
14
  - Added `docs/roadmap.md` with long-term provider strategy, lane replacement criteria, and benchmark planning for optional external provider lanes.
13
15
  - Added a CI-safe provider evaluation skeleton script (`scripts/provider-benchmark.mjs`) with corpus definitions and explicit available/skipped lane reporting.
16
+ - Added deterministic provider benchmark measurement mode (`--run-measurements`) with fixture metrics and build-vs-wrap recommendation sections.
14
17
 
15
18
  ### Changed
16
19
 
@@ -30,6 +33,13 @@ The format is based on Keep a Changelog[^1] and this project uses SemVer.
30
33
  - Korean public API helpers now validate outbound URLs and redirects before fetching, blocking localhost, private, and reserved targets unless `network.allowPrivateHosts` is explicitly enabled.
31
34
  - CI now declares read-only default repository permissions, Dependabot auto-merge pins the reusable workflow without forwarding all caller secrets, and the workflow check enforces those guards.
32
35
 
36
+ ## [0.19.0](https://github.com/jojo-labs/smart-web/compare/v0.18.0...v0.19.0) (2026-06-17)
37
+
38
+
39
+ ### Features
40
+
41
+ * add provider benchmark measurements ([#199](https://github.com/jojo-labs/smart-web/issues/199)) ([6e10eef](https://github.com/jojo-labs/smart-web/commit/6e10eef921b7d204d066ef82ffd7b4b393cbab9e))
42
+
33
43
  ## [0.18.0](https://github.com/jojo-labs/smart-web/compare/v0.17.0...v0.18.0) (2026-06-17)
34
44
 
35
45
 
package/README.md CHANGED
@@ -68,6 +68,14 @@ This lets hosts decide whether deterministic retrieval was good enough or whethe
68
68
 
69
69
  For `smartfetch`, MCP `structuredContent` always carries the projected JSON result. MCP calls default to `output_budget: "compact"` so agent hosts do not ingest large page/thread/link payloads unless they ask for them. The human-readable `content[0].text` defaults to compact text instead of duplicating that JSON payload, with separate caps for long body text, result, comment, link, and asset sections. Omitted counts are reported in the text view while the projected fields remain available through `structuredContent`; set `format: "json"` only when a host needs JSON repeated in the text channel. Set `output_budget: "balanced"` or `"full"` only for follow-up calls that explicitly need more structured content. For host-side integration, prefer `preferred_budget_chars`; use `context_mode` only as a backward-compatible coarse alias when numeric hints are not supplied. If neither is present, `headroom_tokens` keeps compact output by default and uses `balanced` only when there is enough room. `format: "markdown"` keeps the compact response shape and requests Markdown extraction when available.
70
70
 
71
+ Use budget presets this way:
72
+
73
+ - `compact`: default first pass for agent hosts, link triage, social/thread previews, and "is this page enough?" checks.
74
+ - `balanced`: follow-up when the first pass found the right page but omitted useful body, result, comment, or link detail.
75
+ - `full`: explicit retrieval pass for a known relevant URL when the host can afford the larger `structuredContent` payload.
76
+
77
+ When compact output omits needed content, make a follow-up `smartfetch` call for the same URL with a larger budget control instead of asking the model to infer from the compact text. Prefer `preferred_budget_chars` when the host knows its available response budget, or use `output_budget: "balanced"` / `"full"` for manual retries.
78
+
71
79
  ## Supported high-signal surfaces
72
80
 
73
81
  - communities: Reddit, DCInside, LinkedIn public posts with public fallback recovery, Algumon
@@ -98,6 +106,8 @@ When `smartfetch` or `smartcrawl` needs Playwright-backed page loading, `smart-w
98
106
  claude mcp add smart-web -- npx -y smart-web-mcp
99
107
  ```
100
108
 
109
+ Suggested tool-use profile: default to `smartfetch` without `format` and without a budget control for compact first-pass retrieval; retry with `output_budget: "balanced"` or `"full"` only when the user asks for deeper extraction. If Claude Code exposes a host response budget, send it as `preferred_budget_chars`.
110
+
101
111
  ### Codex
102
112
 
103
113
  ```bash
@@ -112,6 +122,8 @@ command = "npx"
112
122
  args = ["-y", "smart-web-mcp"]
113
123
  ```
114
124
 
125
+ Suggested tool-use profile: keep default compact text for normal browsing. For targeted follow-up retrieval, pass `preferred_budget_chars` from the remaining response/tool budget when available; otherwise pass one explicit `output_budget` preset.
126
+
115
127
  ### OpenCode
116
128
 
117
129
  ```json
@@ -127,6 +139,34 @@ args = ["-y", "smart-web-mcp"]
127
139
  }
128
140
  ```
129
141
 
142
+ Suggested tool-use profile: call `smartfetch` with no `format` for normal retrieval, `format: "markdown"` only when Markdown extraction is useful, and `format: "json"` only for hosts that intentionally require the full JSON duplicated into `content[0].text`.
143
+
144
+ ### Hermes/Raon
145
+
146
+ For Hermes/Raon-style hosts, keep the MCP server command standard and set budget controls per tool call:
147
+
148
+ ```json
149
+ {
150
+ "tool": "smartfetch",
151
+ "arguments": {
152
+ "url": "https://example.com/post",
153
+ "preferred_budget_chars": 40000
154
+ }
155
+ }
156
+ ```
157
+
158
+ Use `preferred_budget_chars` as the primary host-profile control when Hermes/Raon knows the response budget. Use `headroom_tokens` only when the host has token headroom but no character budget, and use `context_mode` only for older integrations that cannot send numeric budget metadata.
159
+
160
+ Budget-control precedence is deterministic:
161
+
162
+ 1. `output_budget`
163
+ 2. `preferred_budget_chars`
164
+ 3. `headroom_tokens`
165
+ 4. `context_mode`
166
+ 5. compact default
167
+
168
+ Send only one control when possible. If older host profiles send more than one, `evidence.selected_output_budget_source` reports which control won.
169
+
130
170
  ### Custom settings file
131
171
 
132
172
  To use a non-default settings path, append `--settings-file` to the command:
@@ -453,6 +493,18 @@ These keys live inside `settings.json` when you need to force one provider on or
453
493
 
454
494
  - `network.localOnly`: advanced override that forces local-only behavior regardless of profile
455
495
 
496
+ ## Provider benchmark
497
+
498
+ Use the provider benchmark when deciding whether to build, wrap, or replace retrieval lanes:
499
+
500
+ ```bash
501
+ npm run benchmark:providers
502
+ node scripts/provider-benchmark.mjs --run-measurements
503
+ node scripts/provider-benchmark.mjs --run-measurements --json
504
+ ```
505
+
506
+ The default report is availability-only and safe for CI. `--run-measurements` adds deterministic fixture records for available local/core and optional no-key lanes: success, useful character counts, projected/text character counts, latency, extractor/provider id, confidence, partial status, error class, and recommendation sections grouped by lane and case. External lanes without credentials or commands remain explicit skips instead of silently failing.
507
+
456
508
  ## Quick verification
457
509
 
458
510
  Sanity-check the server with a few real calls:
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "smart-web-mcp",
3
3
  "mcpName": "io.github.jojo-labs/smart-web",
4
- "version": "0.18.0",
4
+ "version": "0.19.0",
5
5
  "packageManager": "npm@11.9.0",
6
6
  "description": "Local MCP for web search, direct-URL fetch, compact normalized output, site crawling, and docs export.",
7
7
  "homepage": "https://github.com/jojo-labs/smart-web",
@@ -42,7 +42,7 @@
42
42
  "dev:mcp": "node dist/dev.js",
43
43
  "dev:watch": "tsc -p tsconfig.json --watch --preserveWatchOutput",
44
44
  "typecheck": "tsc -p tsconfig.json --noEmit",
45
- "test": "node --import tsx --test src/assessment.test.ts src/browser-session.test.ts src/shared.test.ts src/extraction.test.ts src/assets.test.ts src/dev-runtime.test.ts src/release-scripts.test.ts src/render.test.ts src/providers.test.ts src/smartcrawl.test.ts src/smartcrawl-export.test.ts src/provider-policy.test.ts src/archive-fallback.test.ts src/mcp.test.ts src/korea/korea.test.ts",
45
+ "test": "node --import tsx --test src/assessment.test.ts src/browser-session.test.ts src/shared.test.ts src/extraction.test.ts src/assets.test.ts src/dev-runtime.test.ts src/release-scripts.test.ts src/provider-benchmark-script.test.ts src/render.test.ts src/providers.test.ts src/smartcrawl.test.ts src/smartcrawl-export.test.ts src/provider-policy.test.ts src/archive-fallback.test.ts src/mcp.test.ts src/korea/korea.test.ts",
46
46
  "test:e2e": "node --import tsx --test src/packaged-mcp.test.ts",
47
47
  "test:file": "node --import tsx --test",
48
48
  "check:meta": "node scripts/check-metadata.mjs",