smart-web-mcp 0.19.0 → 0.20.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 +140 -0
- package/README.md +55 -5
- package/dist/cli.js +0 -0
- package/dist/dev.js +0 -0
- package/dist/index.js +0 -0
- package/dist/korea/coupang.js +116 -32
- package/dist/korea/coupang.js.map +1 -1
- package/dist/korea/food-safety.d.ts +4 -1
- package/dist/korea/food-safety.js +119 -13
- package/dist/korea/food-safety.js.map +1 -1
- package/dist/korea/geeknews.js +2 -1
- package/dist/korea/geeknews.js.map +1 -1
- package/dist/mcp-server.js +15 -6
- package/dist/mcp-server.js.map +1 -1
- package/dist/settings.d.ts +2 -0
- package/dist/settings.js +1 -0
- package/dist/settings.js.map +1 -1
- package/dist/smartcrawl-export.d.ts +36 -0
- package/dist/smartcrawl-export.js +74 -7
- package/dist/smartcrawl-export.js.map +1 -1
- package/dist/smartcrawl.js +5 -1
- package/dist/smartcrawl.js.map +1 -1
- package/dist/smartfetch/archive-fallback.js +18 -0
- package/dist/smartfetch/archive-fallback.js.map +1 -1
- package/dist/smartfetch/pipeline.js +5 -3
- package/dist/smartfetch/pipeline.js.map +1 -1
- package/dist/smartfetch/providers/cp-common.js +16 -3
- package/dist/smartfetch/providers/cp-common.js.map +1 -1
- package/dist/smartfetch/providers/wikidocs.js +12 -3
- package/dist/smartfetch/providers/wikidocs.js.map +1 -1
- package/dist/smartfetch.js +5 -2
- package/dist/smartfetch.js.map +1 -1
- package/dist/smartsearch.js +59 -0
- package/dist/smartsearch.js.map +1 -1
- package/package.json +20 -2
package/CHANGELOG.md
CHANGED
|
@@ -14,10 +14,55 @@ The format is based on Keep a Changelog[^1] and this project uses SemVer.
|
|
|
14
14
|
- Added `docs/roadmap.md` with long-term provider strategy, lane replacement criteria, and benchmark planning for optional external provider lanes.
|
|
15
15
|
- Added a CI-safe provider evaluation skeleton script (`scripts/provider-benchmark.mjs`) with corpus definitions and explicit available/skipped lane reporting.
|
|
16
16
|
- Added deterministic provider benchmark measurement mode (`--run-measurements`) with fixture metrics and build-vs-wrap recommendation sections.
|
|
17
|
+
- Added `--report-file <path>` for provider benchmark measurement mode to write Markdown review artifacts.
|
|
18
|
+
- Added secret-safe provider availability diagnostics to provider benchmark JSON, human-readable, and Markdown reports.
|
|
19
|
+
- Added `--trend-file <path>` for provider benchmark measurement mode to append compact NDJSON trend records for CI/job artifacts.
|
|
20
|
+
- Added an explicit `provider-benchmark.v1` schema version to provider benchmark reports and trend records.
|
|
21
|
+
- Added lane labels, provider families, and categories to provider benchmark corpus and measurement records.
|
|
22
|
+
- Added non-fatal git commit/branch/dirty metadata to provider benchmark reports and trend records for artifact traceability.
|
|
23
|
+
- Added runtime metadata (Node version, platform, arch, elapsed milliseconds) to provider benchmark reports and trend records.
|
|
24
|
+
- Added npm scripts for provider benchmark measurement, JSON, Markdown report, and NDJSON trend artifact modes.
|
|
25
|
+
- Added provider-family and category lane-status rollups to provider benchmark summaries and trend records.
|
|
26
|
+
- Added provider benchmark lane/case recommendation-action rollups to JSON, human-readable, and Markdown outputs.
|
|
27
|
+
- Added provider benchmark fixture-yield ratios and aggregate yield averages to JSON, human-readable, Markdown, and NDJSON trend outputs.
|
|
28
|
+
- Added provider benchmark fixture-yield comparison rollups by provider family, category, and lane across JSON, human-readable, Markdown, and NDJSON trend outputs.
|
|
29
|
+
- Added provider benchmark best-current-evidence summaries by surface across JSON, human-readable, Markdown, and NDJSON trend outputs.
|
|
30
|
+
- Added provider benchmark live-readiness manifests with lane prerequisites, fixture/live smoke candidates, and surfaces still missing live evidence.
|
|
31
|
+
- Added gated no-secret provider benchmark live-smoke artifacts for safe core surfaces, with per-case `present`/`missing`/`skipped` evidence and a `benchmark:providers:live` npm alias.
|
|
32
|
+
- Added provider benchmark live-vs-fixture comparison rollups that highlight confirmed, skipped, not-run, and disagreeing surface evidence for replacement reviews.
|
|
33
|
+
- Added provider benchmark evidence-gap priority artifacts that rank the next provider surfaces to unlock, fixture, allowlist, or investigate.
|
|
34
|
+
- Added live-smoke failure error classes and reasons to provider benchmark live-vs-fixture and evidence-gap artifacts so timed-out browser/live lanes stay diagnosable from saved reports.
|
|
35
|
+
- Added secret-safe Playwright preflight diagnostics to browser-lane provider benchmark live-smoke rows so launch/navigation/runtime failures can be separated from normalization failures.
|
|
36
|
+
- Added an explicit `--allow-jina-live-smoke` provider benchmark gate and `benchmark:providers:live:jina` alias for public Jina Reader relay live evidence.
|
|
37
|
+
- Added an explicit `--allow-competitive-programming-live-smoke` provider benchmark gate and `benchmark:providers:live:cp` alias for public BOJ/Codeforces specialist live evidence.
|
|
38
|
+
- Added an explicit `--allow-browser-live-smoke` provider benchmark gate and `benchmark:providers:live:browser` alias for Playwright/browser lane live evidence.
|
|
39
|
+
- Added an explicit `--allow-youtube-live-smoke` provider benchmark gate and `benchmark:providers:live:youtube` alias for public YouTube seed-lane live evidence.
|
|
40
|
+
- Added an explicit `--allow-blocked-authwall-live-smoke` provider benchmark gate and `benchmark:providers:live:blocked` alias for no-secret blocked/authwall honesty live evidence.
|
|
41
|
+
- Added an explicit `--allow-naver-blog-live-smoke` provider benchmark gate and `benchmark:providers:live:naver-blog` alias for public Naver Blog specialist-lane live evidence.
|
|
42
|
+
- Added an explicit `--allow-naver-map-live-smoke` provider benchmark gate and `benchmark:providers:live:naver-map` alias for public Naver Map browser-lane live evidence.
|
|
43
|
+
- Added an explicit `--allow-naver-cafe-live-smoke` provider benchmark gate and `benchmark:providers:live:naver-cafe` alias for public Naver Cafe partial-honesty live evidence.
|
|
44
|
+
- Added `--allow-all-no-secret-live-smokes` and `benchmark:providers:live:no-secret` so maintenance jobs can archive one all-no-secret live calibration artifact without enabling credentialed search lanes.
|
|
45
|
+
- Added an explicit `--allow-external-search-live-smoke` provider benchmark gate and `benchmark:providers:live:external-search` alias for credentialed Exa/Tavily search live-smoke policy calibration.
|
|
46
|
+
- Added a Tavily `smartsearch` runtime provider behind `search.tavilyApiKey` / `search.enableTavily`, plus credentialed external-search live-smoke support when `TAVILY_API_KEY` or `SMART_WEB_TAVILY_API_KEY` is explicitly configured.
|
|
47
|
+
- Added `--json-file <path>` and an npm alias for provider benchmark JSON artifacts without stdout capture.
|
|
48
|
+
- Added `--gap-file <path>` and `benchmark:providers:gaps` for compact provider evidence gap JSON artifacts.
|
|
49
|
+
- Added `benchmark:providers:live:no-secret:gaps` for refreshing the compact all-no-secret live provider evidence gap artifact without archiving the full Markdown/JSON report.
|
|
50
|
+
- Added a provider benchmark report archive index in `reports/README.md` that points maintenance jobs at the current no-secret artifacts and labels older cumulative reports as historical calibration snapshots.
|
|
51
|
+
- Added deterministic Exa/Tavily-style `search_external` provider benchmark fixtures so credentialed search lanes can be measured without paid/live requests before any external-search live-smoke work.
|
|
52
|
+
- Added fixture skipped-case lane/reason metadata to provider benchmark live-vs-fixture and evidence-gap artifacts so credential-gated fixtures are not misread as absent fixtures.
|
|
53
|
+
- Added an explicit `smartcrawl-export.v1` schema version to smartcrawl export manifests and summaries.
|
|
54
|
+
- Added per-document SHA-256 hashes to smartcrawl export manifests for generated Markdown integrity checks.
|
|
55
|
+
- Added resolved crawl options to smartcrawl export manifests for reproducible docs exports.
|
|
56
|
+
- Added versioned `smartcrawl-resource-handles.json` files to smartcrawl docs exports so hosts can consume local Markdown file handles without parsing the full crawl manifest.
|
|
57
|
+
- Expanded provider benchmark corpus coverage across static articles, JS-rendered pages, authwalls, long docs/Wikipedia, Naver Blog/Cafe/Map, Hacker News, YouTube, BOJ/Codeforces, relay, search, and docs export surfaces.
|
|
17
58
|
|
|
18
59
|
### Changed
|
|
19
60
|
|
|
61
|
+
- Provider benchmark live-vs-fixture and evidence-gap actions now use `unlock-skipped-fixture-prerequisites` when fixture rows already exist but were skipped by missing credentials or commands, keeping credentialed search follow-up queues from implying new fixtures are needed.
|
|
62
|
+
- Documented the `smartcrawl` docs export manifest schema version and per-document hash fields.
|
|
63
|
+
- Documented the current provider benchmark artifact modes in the README, including diagnostics, trend records, schema versioning, lane metadata, and unknown-flag handling.
|
|
20
64
|
- `smartfetch` MCP calls now default the human-readable text channel to compact text while preserving projected JSON in `structuredContent`. Use `format: "json"` only when a host needs JSON repeated in `content[0].text`.
|
|
65
|
+
- `smartcrawl` MCP summary and export calls now default `content[0].text` to rendered text while preserving full results in `structuredContent`; `format: "json"` remains the explicit JSON-duplication escape hatch.
|
|
21
66
|
- The compact `smartfetch` text renderer now caps body text, result, comment, link, and asset lines separately, and reports omitted counts while keeping the projected JSON in `structuredContent`.
|
|
22
67
|
- Documented `smartfetch` output-budget settings and the compact MCP text default in the README and configuration guide.
|
|
23
68
|
- `smartfetch` MCP budget resolution now uses a single exported resolver with precedence: `output_budget` → `preferred_budget_chars` → `headroom_tokens` → `context_mode` → compact default; `context_mode` is treated as a backward-compatible alias and not the primary control.
|
|
@@ -25,6 +70,24 @@ The format is based on Keep a Changelog[^1] and this project uses SemVer.
|
|
|
25
70
|
|
|
26
71
|
### Fixed
|
|
27
72
|
|
|
73
|
+
- `kr_food_safety` now calls the current k-skill-proxy food-safety routes (`search`, `inspection-fail`, and `health-food-ingredient`) with the `query` parameter and renders the current result fields.
|
|
74
|
+
- `kr_coupang` no-secret hosted fallback now sends direct Retention Corp JSON-RPC method payloads with top-level query arguments and parses the current `best_fit`/`shortlist` response shape while preserving legacy nested-envelope parsing.
|
|
75
|
+
- `kr_geeknews` text headings now show returned and total item counts when list output is limited, while preserving `structuredContent.total` and `limit`.
|
|
76
|
+
- `smartcrawl` page-result snippets now strip helper `<style>`, `<script>`, `<noscript>`, and `<template>` contents before text projection, avoiding CSS/script noise in summary and smartsearch handoff output.
|
|
77
|
+
- Wikidocs `smartfetch` normalization now removes CSS-declaration helper text from the start of article bodies while preserving the actual article content and links.
|
|
78
|
+
- Provider benchmark live-smoke classification now treats BOJ shutdown/unavailable responses as honest no-secret competitive-programming evidence instead of a critical missing-evidence gap.
|
|
79
|
+
- BOJ/ACM ICPC problem pages that now return the Korean shutdown/maintenance shell are marked `blocked_or_unavailable`/partial instead of being treated as successful problem content.
|
|
80
|
+
- Compact `smartfetch` text now keeps authwall/handoff responses concise by using smaller body/link limits while preserving full projected content in `structuredContent`.
|
|
81
|
+
- Provider benchmark no-secret live smokes now use a 60s default timeout, avoiding false critical blocked/authwall gaps when honest handoff retrieval takes longer than the previous 15s budget.
|
|
82
|
+
- Provider benchmark live-smoke useful-character counts now include structured blocked/handoff evidence such as error messages and handoff reasons, so honest partial/authwall rows are not reported as near-empty.
|
|
83
|
+
- `smartfetch` assessment now treats broad login/auth wording in otherwise complete public docs as content, not an authwall signal, avoiding false handoffs for pages that document authentication concepts.
|
|
84
|
+
- `smartfetch` assessment now ignores benign interactive UI phrases in page chrome when deterministic extraction already has complete primary content, avoiding unnecessary web-task handoffs for docs pages such as MDN.
|
|
85
|
+
- `smartfetch` archive fallback now rejects archive.md search/index pages that have no snapshot, and blocked fetches keep handoff guidance even when only reference metadata is available.
|
|
86
|
+
- `smartsearch` MCP calls now honor `contextMaxCharacters` as a rendered text-channel cap, keeping oversized search summaries out of `content[0].text` while preserving full results in `structuredContent`.
|
|
87
|
+
- Built package bin targets now keep executable permissions after `npm run build`, so local `npm link` / Hermes stdio MCP installs can launch `smart-web-mcp` directly instead of failing with permission denied.
|
|
88
|
+
- `smartcrawl` export reruns now validate prior manifest identity before trusting it as an ownership marker for non-empty output directories.
|
|
89
|
+
- `smartcrawl` export reruns now require complete prior manifests before bypassing the non-empty output directory guard.
|
|
90
|
+
- Provider benchmark CLI now rejects unknown `--flag` options instead of silently ignoring typos in benchmark jobs.
|
|
28
91
|
- YouTube transcript enrichment now imports the public `youtube-transcript` package entry instead of a private dist path that is not exported by current package versions.
|
|
29
92
|
- YouTube transcript loading now falls back to the legacy ESM entry when older `youtube-transcript` installs expose broken CommonJS metadata under Node ESM.
|
|
30
93
|
- YouTube target inference now routes only real video URLs such as watch, shorts, embed, live, and youtu.be links to the `youtube_video` provider; channel, search, and playlist pages stay generic.
|
|
@@ -33,6 +96,83 @@ The format is based on Keep a Changelog[^1] and this project uses SemVer.
|
|
|
33
96
|
- Korean public API helpers now validate outbound URLs and redirects before fetching, blocking localhost, private, and reserved targets unless `network.allowPrivateHosts` is explicitly enabled.
|
|
34
97
|
- 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.
|
|
35
98
|
|
|
99
|
+
## [0.20.0](https://github.com/jojo-labs/smart-web/compare/v0.19.0...v0.20.0) (2026-06-20)
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
### Features
|
|
103
|
+
|
|
104
|
+
* **benchmark:** add all no-secret live smoke gate ([#266](https://github.com/jojo-labs/smart-web/issues/266)) ([52d0ed4](https://github.com/jojo-labs/smart-web/commit/52d0ed462abf21f90fd2414842ae8f839978b560))
|
|
105
|
+
* **benchmark:** add artifact npm scripts ([#222](https://github.com/jojo-labs/smart-web/issues/222)) ([5b4ed6f](https://github.com/jojo-labs/smart-web/commit/5b4ed6f1acfc0b71ce26c35455c463838f3da8d5))
|
|
106
|
+
* **benchmark:** add blocked authwall live smoke gate ([#256](https://github.com/jojo-labs/smart-web/issues/256)) ([782754b](https://github.com/jojo-labs/smart-web/commit/782754bf65bab48164ecdeebabe358ca1b7e2a37))
|
|
107
|
+
* **benchmark:** add browser live preflight diagnostics ([#253](https://github.com/jojo-labs/smart-web/issues/253)) ([270fb30](https://github.com/jojo-labs/smart-web/commit/270fb303c5cf4feb84c6975b19511fb268b8894d))
|
|
108
|
+
* **benchmark:** add external search live smoke policy ([#261](https://github.com/jojo-labs/smart-web/issues/261)) ([19ad4f4](https://github.com/jojo-labs/smart-web/commit/19ad4f4225c44c2103439dbe2c9a31e978da64ef))
|
|
109
|
+
* **benchmark:** add gated provider live smoke artifacts ([#246](https://github.com/jojo-labs/smart-web/issues/246)) ([40818c9](https://github.com/jojo-labs/smart-web/commit/40818c95a2c59f74f36b28fb7a9a5928437784eb))
|
|
110
|
+
* **benchmark:** add lane status rollups ([#224](https://github.com/jojo-labs/smart-web/issues/224)) ([1f6017a](https://github.com/jojo-labs/smart-web/commit/1f6017ab12b78f011e4c40be39ba69665102c788))
|
|
111
|
+
* **benchmark:** add markdown report export ([#204](https://github.com/jojo-labs/smart-web/issues/204)) ([ddd15cc](https://github.com/jojo-labs/smart-web/commit/ddd15cc8a26c52927c0d5ed70cc49f426a5e77ab))
|
|
112
|
+
* **benchmark:** add Naver Blog live smoke gate ([7a2fb3c](https://github.com/jojo-labs/smart-web/commit/7a2fb3c9d457560bc98f629b7e75632f2da0e397))
|
|
113
|
+
* **benchmark:** add Naver Blog live smoke gate ([#257](https://github.com/jojo-labs/smart-web/issues/257)) ([7a2fb3c](https://github.com/jojo-labs/smart-web/commit/7a2fb3c9d457560bc98f629b7e75632f2da0e397))
|
|
114
|
+
* **benchmark:** add Naver Cafe live smoke gate ([#260](https://github.com/jojo-labs/smart-web/issues/260)) ([d9a4dc0](https://github.com/jojo-labs/smart-web/commit/d9a4dc0a9e8df0da2be6a7a76980df86eaa59354))
|
|
115
|
+
* **benchmark:** add Naver Map live smoke gate ([#258](https://github.com/jojo-labs/smart-web/issues/258)) ([434efee](https://github.com/jojo-labs/smart-web/commit/434efee6d4cb4ca5382de68ffe5e4da7c15d194d))
|
|
116
|
+
* **benchmark:** add provider diagnostics ([#206](https://github.com/jojo-labs/smart-web/issues/206)) ([0944efc](https://github.com/jojo-labs/smart-web/commit/0944efcee7d9f0fd2d2fc039efef176fa8b23208))
|
|
117
|
+
* **benchmark:** add provider evidence gap artifact ([#265](https://github.com/jojo-labs/smart-web/issues/265)) ([b60c117](https://github.com/jojo-labs/smart-web/commit/b60c11799fbcf362b1f81a0e3138a28d652e83e3))
|
|
118
|
+
* **benchmark:** add provider live-readiness manifest ([#245](https://github.com/jojo-labs/smart-web/issues/245)) ([3b29a98](https://github.com/jojo-labs/smart-web/commit/3b29a989889234b151317a62c10215a401aad753))
|
|
119
|
+
* **benchmark:** add search external fixture evidence ([#259](https://github.com/jojo-labs/smart-web/issues/259)) ([e389cb5](https://github.com/jojo-labs/smart-web/commit/e389cb5bb956afbe33dcb7f18c71dd83153663b2))
|
|
120
|
+
* **benchmark:** add youtube live smoke gate ([#255](https://github.com/jojo-labs/smart-web/issues/255)) ([b45df89](https://github.com/jojo-labs/smart-web/commit/b45df8909b6cb5571bca3e19af1087552ecb73b3))
|
|
121
|
+
* **benchmark:** align skipped fixture comparison actions ([#270](https://github.com/jojo-labs/smart-web/issues/270)) ([0957dee](https://github.com/jojo-labs/smart-web/commit/0957dee9bfb78c099dbb7ce03a127a6cd28d8439))
|
|
122
|
+
* **benchmark:** allow browser live smoke ([#251](https://github.com/jojo-labs/smart-web/issues/251)) ([bbd411f](https://github.com/jojo-labs/smart-web/commit/bbd411f9f44aa6dd0a4666c8c140e22ce4aabaab))
|
|
123
|
+
* **benchmark:** allow competitive programming live smoke ([#250](https://github.com/jojo-labs/smart-web/issues/250)) ([e745679](https://github.com/jojo-labs/smart-web/commit/e74567981c4bd35024f952d48950b653b0d0ec49))
|
|
124
|
+
* **benchmark:** allow gated Jina live smoke ([#249](https://github.com/jojo-labs/smart-web/issues/249)) ([ce0900d](https://github.com/jojo-labs/smart-web/commit/ce0900dd9059f5ff94b7646ee77046f123693a59))
|
|
125
|
+
* **benchmark:** append trend artifacts ([#208](https://github.com/jojo-labs/smart-web/issues/208)) ([0701d18](https://github.com/jojo-labs/smart-web/commit/0701d18ebbf3bdad13e9cefd6b9100df34c70732))
|
|
126
|
+
* **benchmark:** archive no-secret gap queue ([#271](https://github.com/jojo-labs/smart-web/issues/271)) ([834b6a0](https://github.com/jojo-labs/smart-web/commit/834b6a0938421c2ba1b3e48e544cf97e313c7746))
|
|
127
|
+
* **benchmark:** clarify skipped fixture gap actions ([#269](https://github.com/jojo-labs/smart-web/issues/269)) ([1ccc861](https://github.com/jojo-labs/smart-web/commit/1ccc8612e1f2654a2cbce1b8f60b331ed69318ca))
|
|
128
|
+
* **benchmark:** compare fixture yield by lane ([#243](https://github.com/jojo-labs/smart-web/issues/243)) ([ad440f6](https://github.com/jojo-labs/smart-web/commit/ad440f61df6b51913c96b2b53ab9e36ea2e7010c))
|
|
129
|
+
* **benchmark:** compare live and fixture evidence ([#247](https://github.com/jojo-labs/smart-web/issues/247)) ([26ac436](https://github.com/jojo-labs/smart-web/commit/26ac4364ee42d3ad3af8073e20e68fa7bdcc7c60))
|
|
130
|
+
* **benchmark:** expand provider corpus coverage ([#202](https://github.com/jojo-labs/smart-web/issues/202)) ([f663d1e](https://github.com/jojo-labs/smart-web/commit/f663d1e2771f186bceb54bd8ea8f6354e10b0426))
|
|
131
|
+
* **benchmark:** include git metadata ([#218](https://github.com/jojo-labs/smart-web/issues/218)) ([8d59d78](https://github.com/jojo-labs/smart-web/commit/8d59d78f55269bde205c39725ed9bf528c4cae79))
|
|
132
|
+
* **benchmark:** include lane metadata ([#214](https://github.com/jojo-labs/smart-web/issues/214)) ([70736dd](https://github.com/jojo-labs/smart-web/commit/70736dd0a23b5c521ce26c8398ab66d1f653feb4))
|
|
133
|
+
* **benchmark:** include runtime metadata ([#220](https://github.com/jojo-labs/smart-web/issues/220)) ([3991d24](https://github.com/jojo-labs/smart-web/commit/3991d243e95964623c93ae5d1f0409aec44e5b4e))
|
|
134
|
+
* **benchmark:** rank provider evidence by surface ([#244](https://github.com/jojo-labs/smart-web/issues/244)) ([9b6e21e](https://github.com/jojo-labs/smart-web/commit/9b6e21e1fc5f904eb6e1b03a2ea234d58cd71f15))
|
|
135
|
+
* **benchmark:** rank provider evidence gaps ([#248](https://github.com/jojo-labs/smart-web/issues/248)) ([22788fe](https://github.com/jojo-labs/smart-web/commit/22788fe91e422fce77ffde50a35d60f00b4894c0))
|
|
136
|
+
* **benchmark:** report fixture yield ratios ([#242](https://github.com/jojo-labs/smart-web/issues/242)) ([f2b50b9](https://github.com/jojo-labs/smart-web/commit/f2b50b9815ed5e333a920d5233296511a58b0e13))
|
|
137
|
+
* **benchmark:** summarize recommendation actions ([#241](https://github.com/jojo-labs/smart-web/issues/241)) ([3cbf809](https://github.com/jojo-labs/smart-web/commit/3cbf809c31706a889a0bbba0026a5d11dee6aa0a))
|
|
138
|
+
* **benchmark:** surface live smoke failure details ([#252](https://github.com/jojo-labs/smart-web/issues/252)) ([c8eae24](https://github.com/jojo-labs/smart-web/commit/c8eae2405cbd3878910a5e74f705b357ed959c00))
|
|
139
|
+
* **benchmark:** surface skipped fixture evidence ([#268](https://github.com/jojo-labs/smart-web/issues/268)) ([e53ed9c](https://github.com/jojo-labs/smart-web/commit/e53ed9cf5eb8b39b97459c29d93bc7699550fa9d))
|
|
140
|
+
* **benchmark:** version provider artifacts ([#212](https://github.com/jojo-labs/smart-web/issues/212)) ([2e97f55](https://github.com/jojo-labs/smart-web/commit/2e97f55b402c7a11ece23a7de101fe6ff4ed4717))
|
|
141
|
+
* **benchmark:** write JSON artifacts ([#226](https://github.com/jojo-labs/smart-web/issues/226)) ([3669936](https://github.com/jojo-labs/smart-web/commit/3669936a1c232668b197fc890c992c02d97850e2))
|
|
142
|
+
* **search:** add Tavily smartsearch provider ([#262](https://github.com/jojo-labs/smart-web/issues/262)) ([011220d](https://github.com/jojo-labs/smart-web/commit/011220d72d2ecf62dddb87019e8c42df180c9104))
|
|
143
|
+
* **smartcrawl:** add export resource handles ([#240](https://github.com/jojo-labs/smart-web/issues/240)) ([423d418](https://github.com/jojo-labs/smart-web/commit/423d418aceb4c8bdc612c261dc831a04ac349968))
|
|
144
|
+
* **smartcrawl:** hash export documents ([#230](https://github.com/jojo-labs/smart-web/issues/230)) ([77fdbc3](https://github.com/jojo-labs/smart-web/commit/77fdbc32258d5cd3a22c66309821d8c315dbd22f))
|
|
145
|
+
* **smartcrawl:** record export options ([#238](https://github.com/jojo-labs/smart-web/issues/238)) ([015634b](https://github.com/jojo-labs/smart-web/commit/015634bc72e511830a919565657e014819a6092f))
|
|
146
|
+
* **smartcrawl:** version export manifests ([#228](https://github.com/jojo-labs/smart-web/issues/228)) ([182fd5d](https://github.com/jojo-labs/smart-web/commit/182fd5ddb1dd1b908813834beb3fa302e6ee2d5f))
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
### Bug Fixes
|
|
150
|
+
|
|
151
|
+
* accept BOJ unavailable benchmark evidence ([7c5738c](https://github.com/jojo-labs/smart-web/commit/7c5738c7bd426fa5c19c75a8f59eed9d6a6966b8))
|
|
152
|
+
* **benchmark:** reject unknown CLI flags ([#210](https://github.com/jojo-labs/smart-web/issues/210)) ([76e5a3d](https://github.com/jojo-labs/smart-web/commit/76e5a3da42073e227b792208b307e65a495ff5d4))
|
|
153
|
+
* **build:** keep MCP bin targets executable ([#273](https://github.com/jojo-labs/smart-web/issues/273)) ([3a13685](https://github.com/jojo-labs/smart-web/commit/3a13685f8d55b068f92ff7d55bf429ea618fc747))
|
|
154
|
+
* cap smartsearch MCP text output ([#274](https://github.com/jojo-labs/smart-web/issues/274)) ([79579d2](https://github.com/jojo-labs/smart-web/commit/79579d2bbaa6b0e3760d7e496172f6be87db0240))
|
|
155
|
+
* clarify GeekNews limited headings ([#289](https://github.com/jojo-labs/smart-web/issues/289)) ([942bea4](https://github.com/jojo-labs/smart-web/commit/942bea48b260ada42f3e0fee71c08ff253988b2e))
|
|
156
|
+
* count blocked benchmark handoff evidence ([#281](https://github.com/jojo-labs/smart-web/issues/281)) ([ce90972](https://github.com/jojo-labs/smart-web/commit/ce9097220fea31a94e0b9722ef59638c0c4d6fff))
|
|
157
|
+
* default smartcrawl MCP text output ([#275](https://github.com/jojo-labs/smart-web/issues/275)) ([7e46a15](https://github.com/jojo-labs/smart-web/commit/7e46a15a601f4b8f1b6a1f87af465d996e1f907d))
|
|
158
|
+
* ignore auth docs wording as authwall signal ([#279](https://github.com/jojo-labs/smart-web/issues/279)) ([7d45927](https://github.com/jojo-labs/smart-web/commit/7d459275bf13263d860323bcadd3eae5eeb6f330))
|
|
159
|
+
* keep authwall archive fallback honest ([#277](https://github.com/jojo-labs/smart-web/issues/277)) ([8b653ff](https://github.com/jojo-labs/smart-web/commit/8b653ffad3ed31e4fb87cf55d0757f5412011224))
|
|
160
|
+
* mark BOJ shutdown pages unavailable ([#284](https://github.com/jojo-labs/smart-web/issues/284)) ([d9177ff](https://github.com/jojo-labs/smart-web/commit/d9177ff7fcfa125eabc4894950a5c2160996016c))
|
|
161
|
+
* relax provider live smoke timeout ([#280](https://github.com/jojo-labs/smart-web/issues/280)) ([e1a12b4](https://github.com/jojo-labs/smart-web/commit/e1a12b4020c9f71fcb01f2d17e06684bddc8e869))
|
|
162
|
+
* **smartcrawl:** require complete export manifests ([#236](https://github.com/jojo-labs/smart-web/issues/236)) ([be98128](https://github.com/jojo-labs/smart-web/commit/be981288f98d942d1a1e844648666f44b18f8e83))
|
|
163
|
+
* **smartcrawl:** validate export manifest identity ([#234](https://github.com/jojo-labs/smart-web/issues/234)) ([93b9fd1](https://github.com/jojo-labs/smart-web/commit/93b9fd19c7c4dadba46db1d726e126b0167e3906))
|
|
164
|
+
* strip helper text from smartcrawl snippets ([#287](https://github.com/jojo-labs/smart-web/issues/287)) ([4572acf](https://github.com/jojo-labs/smart-web/commit/4572acfc8c64c6a800b02dcd0d09d6ebc12cdcfc))
|
|
165
|
+
* strip Wikidocs style text noise ([#286](https://github.com/jojo-labs/smart-web/issues/286)) ([98e6bc9](https://github.com/jojo-labs/smart-web/commit/98e6bc9b88c458d2f528f4e3506feade5062dbb6))
|
|
166
|
+
* suppress docs chrome handoff false positives ([#278](https://github.com/jojo-labs/smart-web/issues/278)) ([9b7b0a2](https://github.com/jojo-labs/smart-web/commit/9b7b0a2f693c26053a67331117b635678538526a))
|
|
167
|
+
* tighten authwall compact text ([#283](https://github.com/jojo-labs/smart-web/issues/283)) ([77cf2cb](https://github.com/jojo-labs/smart-web/commit/77cf2cb9c26ae05cbcfbb6e09ea6041593da8a0a))
|
|
168
|
+
* update Coupang hosted fallback ([#290](https://github.com/jojo-labs/smart-web/issues/290)) ([e0f4d94](https://github.com/jojo-labs/smart-web/commit/e0f4d94477457a47a1a2d5e712de50d6d71af2d4))
|
|
169
|
+
* update food safety proxy routes ([ceb2140](https://github.com/jojo-labs/smart-web/commit/ceb21409227ed2b50d171ff9b9d235eefd5c4592))
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
### CI / Release
|
|
173
|
+
|
|
174
|
+
* standardize CI and release automation ([#288](https://github.com/jojo-labs/smart-web/issues/288)) ([a4294fb](https://github.com/jojo-labs/smart-web/commit/a4294fb565fa9de923093dcd0b78a7805c126fc9))
|
|
175
|
+
|
|
36
176
|
## [0.19.0](https://github.com/jojo-labs/smart-web/compare/v0.18.0...v0.19.0) (2026-06-17)
|
|
37
177
|
|
|
38
178
|
|
package/README.md
CHANGED
|
@@ -27,6 +27,7 @@ If `smart-web` returns reproducible incorrect or misleading output, open a GitHu
|
|
|
27
27
|
- up-front smartfetch acquisition lanes instead of broad direct → browser retry chains
|
|
28
28
|
- optional Jina Reader relay for weak generic/article fetches when you explicitly enable it, with JSON mode and alternate-link preservation
|
|
29
29
|
- shared document extraction for article-like pages keeps browser primary content separate from raw shell HTML, preserving headings, links, blocks, and Markdown when requested
|
|
30
|
+
- docs export manifests are versioned and include per-document SHA-256 hashes plus resource-handle manifests for stable local Markdown mirrors
|
|
30
31
|
- budgeted `smartfetch` projection records explicit truncation metadata instead of scattering silent hardcoded caps; MCP calls default to the compact preset for token-sensitive agent hosts
|
|
31
32
|
- weak generic pages can recover through JSON-LD or Next.js payload extraction and same-origin RSS/Atom feed discovery before falling back to a handoff
|
|
32
33
|
- paywalled article pages prefer lawful archive recovery and search-indexed reference previews before telling the host to escalate elsewhere
|
|
@@ -68,6 +69,10 @@ This lets hosts decide whether deterministic retrieval was good enough or whethe
|
|
|
68
69
|
|
|
69
70
|
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
71
|
|
|
72
|
+
For `smartsearch`, `contextMaxCharacters` is a text-channel budget hint for MCP hosts: oversized rendered search summaries are truncated in `content[0].text` with an explicit notice while the full search response remains available in `structuredContent`.
|
|
73
|
+
|
|
74
|
+
For `smartcrawl`, MCP calls now follow the same host-safe shape: `structuredContent` carries the full summary/export result, while the human-readable `content[0].text` defaults to the rendered crawl summary or export summary instead of duplicating JSON. Set `format: "json"` only for hosts that cannot consume `structuredContent` and intentionally need JSON repeated in the text channel.
|
|
75
|
+
|
|
71
76
|
Use budget presets this way:
|
|
72
77
|
|
|
73
78
|
- `compact`: default first pass for agent hosts, link triage, social/thread previews, and "is this page enough?" checks.
|
|
@@ -232,6 +237,7 @@ npx -y smart-web-mcp --init-settings
|
|
|
232
237
|
"search": {
|
|
233
238
|
// API keys — leave empty to skip that provider
|
|
234
239
|
"exaApiKey": "",
|
|
240
|
+
"tavilyApiKey": "",
|
|
235
241
|
"braveSearchApiKey": "",
|
|
236
242
|
// Self-hosted SearXNG instance URL
|
|
237
243
|
"searxngBaseUrl": "",
|
|
@@ -329,7 +335,7 @@ Out of the box `smart-web` works with sensible defaults. Create a settings file
|
|
|
329
335
|
}
|
|
330
336
|
```
|
|
331
337
|
|
|
332
|
-
In `private` mode, relay-style provider requests are blocked, Exa and Brave default off unless you explicitly re-enable them, public no-key search fallbacks are disabled, and SearXNG bases must resolve to localhost or private addresses.
|
|
338
|
+
In `private` mode, relay-style provider requests are blocked, Exa, Tavily, and Brave default off unless you explicitly re-enable them, public no-key search fallbacks are disabled, and SearXNG bases must resolve to localhost or private addresses.
|
|
333
339
|
|
|
334
340
|
#### Private with Exa allowed back in
|
|
335
341
|
|
|
@@ -343,13 +349,26 @@ In `private` mode, relay-style provider requests are blocked, Exa and Brave defa
|
|
|
343
349
|
}
|
|
344
350
|
```
|
|
345
351
|
|
|
346
|
-
####
|
|
352
|
+
#### Private with Tavily allowed back in
|
|
353
|
+
|
|
354
|
+
```json
|
|
355
|
+
{
|
|
356
|
+
"profile": "private",
|
|
357
|
+
"search": {
|
|
358
|
+
"tavilyApiKey": "...",
|
|
359
|
+
"enableTavily": true
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
#### With Exa, Tavily, and Brave API keys
|
|
347
365
|
|
|
348
366
|
```json
|
|
349
367
|
{
|
|
350
368
|
"profile": "balanced",
|
|
351
369
|
"search": {
|
|
352
370
|
"exaApiKey": "exa-...",
|
|
371
|
+
"tavilyApiKey": "tvly-...",
|
|
353
372
|
"braveSearchApiKey": "BSA-..."
|
|
354
373
|
}
|
|
355
374
|
}
|
|
@@ -450,6 +469,7 @@ These keys live inside `settings.json` when you need to force one provider on or
|
|
|
450
469
|
**Search**
|
|
451
470
|
|
|
452
471
|
- `search.enableExa`
|
|
472
|
+
- `search.enableTavily`
|
|
453
473
|
- `search.enableBrave`
|
|
454
474
|
- `search.enableSearxng`
|
|
455
475
|
- `search.enableDuckDuckGo`
|
|
@@ -499,11 +519,41 @@ Use the provider benchmark when deciding whether to build, wrap, or replace retr
|
|
|
499
519
|
|
|
500
520
|
```bash
|
|
501
521
|
npm run benchmark:providers
|
|
502
|
-
|
|
503
|
-
|
|
522
|
+
npm run benchmark:providers:measure
|
|
523
|
+
npm run --silent benchmark:providers:json
|
|
524
|
+
npm run benchmark:providers:json-file
|
|
525
|
+
npm run benchmark:providers:report
|
|
526
|
+
npm run benchmark:providers:gaps
|
|
527
|
+
npm run benchmark:providers:live
|
|
528
|
+
npm run benchmark:providers:live:jina
|
|
529
|
+
npm run benchmark:providers:live:cp
|
|
530
|
+
npm run benchmark:providers:live:browser
|
|
531
|
+
npm run benchmark:providers:live:youtube
|
|
532
|
+
npm run benchmark:providers:live:blocked
|
|
533
|
+
npm run benchmark:providers:live:naver-blog
|
|
534
|
+
npm run benchmark:providers:live:naver-map
|
|
535
|
+
npm run benchmark:providers:live:naver-cafe
|
|
536
|
+
npm run benchmark:providers:live:no-secret
|
|
537
|
+
npm run benchmark:providers:live:no-secret:gaps
|
|
538
|
+
npm run benchmark:providers:live:external-search
|
|
539
|
+
npm run benchmark:providers:trend
|
|
504
540
|
```
|
|
505
541
|
|
|
506
|
-
The default report is availability-only and safe for CI. `--run-measurements` adds deterministic fixture records for available local/core
|
|
542
|
+
The default report is availability-only and safe for CI. `--run-measurements` (`npm run benchmark:providers:measure`) adds deterministic fixture records for available local/core, optional no-key lanes, and credentialed external search lanes when their prerequisite keys are configured: success, useful character counts, projected/text character counts, useful-to-projected and useful-to-text yield ratios, latency, extractor/provider id, confidence, partial status, error class, lane label/family/category metadata, provider-family/category lane-status rollups, surface coverage, and recommendation sections grouped by lane, case, and surface.
|
|
543
|
+
|
|
544
|
+
Reports carry the `provider-benchmark.v1` schema version plus non-fatal git and runtime metadata so archived JSON, Markdown, and NDJSON trend artifacts are parseable, traceable, and comparable as the harness evolves. Markdown, text, JSON, and NDJSON outputs include aggregate fixture yield averages, compact yield rollups by provider family/category/lane, and a best-current-evidence surface table that ranks measured/skipped candidates so review jobs can compare token efficiency and build-vs-wrap posture between core, browser, relay, and specialist paths without reprocessing the full measurement table.
|
|
545
|
+
|
|
546
|
+
Measurement artifacts also include a live-readiness manifest listing each lane's env/command/settings prerequisites, a deterministic fixture smoke, a safe MCP live-smoke candidate, and surfaces that still lack live evidence. `--run-live-smokes` (`npm run benchmark:providers:live`) is an explicit gated mode that runs only no-secret, core-surface live checks for static articles, long docs/Wikipedia, Hacker News, and docs export; credential/external lanes remain skipped until their prerequisites are configured, except for explicitly allowlisted no-secret exceptions: `--allow-jina-live-smoke` (`npm run benchmark:providers:live:jina`) exercises the public Jina Reader relay with a secret-stripped settings file, `--allow-competitive-programming-live-smoke` (`npm run benchmark:providers:live:cp`) adds a public BOJ/Codeforces representative smoke for the competitive-programming specialist surface, `--allow-browser-live-smoke` (`npm run benchmark:providers:live:browser`) runs a Playwright `--force-dynamic` smoke for the JS-rendered article surface only when the local browser lane is available, `--allow-youtube-live-smoke` (`npm run benchmark:providers:live:youtube`) adds the public YouTube seed-lane representative smoke, `--allow-blocked-authwall-live-smoke` (`npm run benchmark:providers:live:blocked`) adds a deterministic HTTP Basic Auth challenge smoke that treats honest blocked/error/handoff signals as positive calibration without private credentials, `--allow-naver-blog-live-smoke` (`npm run benchmark:providers:live:naver-blog`) adds a stable public Naver Blog representative smoke for Korean specialist-lane calibration, `--allow-naver-map-live-smoke` (`npm run benchmark:providers:live:naver-map`) adds a stable public Naver Map place smoke with browser-preflight diagnostics, and `--allow-naver-cafe-live-smoke` (`npm run benchmark:providers:live:naver-cafe`) adds a stable public Naver Cafe shared-link smoke that treats useful no-credential partial output as honest calibration. `--allow-all-no-secret-live-smokes` (`npm run benchmark:providers:live:no-secret`) enables every no-secret gate in one run while still leaving credentialed Exa/Tavily search lanes disabled unless `--allow-external-search-live-smoke` is provided separately.
|
|
547
|
+
|
|
548
|
+
Live smoke artifacts record per-case `present`/`missing`/`skipped` evidence next to fixture evidence without printing secret values. Browser-lane live smoke rows also include a secret-safe Playwright preflight diagnostic with executable path, launch timing, `domcontentloaded` navigation timing, HTTP status/final URL, and truncated failure reason so runtime/cache/network failures can be separated from smartfetch normalization failures.
|
|
549
|
+
|
|
550
|
+
Credentialed external-search live smoke remains a separate explicit gate: `--allow-external-search-live-smoke` (`npm run benchmark:providers:live:external-search`) attempts each implemented Exa/Tavily `smartsearch` lane only when that lane's key is configured (`EXA_API_KEY` for Exa; `TAVILY_API_KEY` or `SMART_WEB_TAVILY_API_KEY` for Tavily), writes keys only into a temporary mode-0600 settings file, strips API-key environment variables from the child process, and records only secret-free status/output metadata.
|
|
551
|
+
|
|
552
|
+
The same JSON, text, Markdown, and NDJSON outputs include a compact live-vs-fixture comparison rollup so replacement reviews can distinguish calibrated surfaces from fixture-only, skipped-live, live-disagreeing, and fixture-skipped-by-prerequisite surfaces. Secret-safe provider diagnostics list prerequisite names with satisfied/missing status and never print env values. Use `npm run benchmark:providers:json-file` or add `--json-file <path>` to write the full JSON artifact without relying on stdout capture. Use `npm run benchmark:providers:report` or add `--report-file <path>` with measurement mode to write a Markdown review artifact containing lane availability, diagnostics, surface/corpus coverage, measurement highlights, yield comparisons, per-surface evidence, live readiness, live-smoke diagnostics, and build-vs-wrap recommendations without changing stdout or JSON behavior. Use `npm run benchmark:providers:gaps` or add `--gap-file <path>` with measurement mode to write a compact `provider-benchmark-gaps.v1` JSON artifact containing only the ranked provider evidence gap queue, summary counts, git/runtime metadata, and safe smoke candidates. Use `npm run benchmark:providers:trend` or add `--trend-file <path>` with measurement mode to append compact NDJSON trend records with aggregate lane, prerequisite, measurement, recommendation, surface-evidence, and fixture-yield counts. Unknown `--flag` options fail fast so typoed benchmark jobs do not produce misleading artifacts. The corpus covers static articles, JS-rendered articles, blocked/authwall-like pages, long docs/Wikipedia pages, Naver Blog/Cafe/Map, Hacker News, YouTube, BOJ/Codeforces, relay, search, and docs export surfaces. External lanes without credentials or commands remain explicit skips instead of silently failing, while Exa/Tavily-style search lanes now have deterministic fixture rows ready for secret-safe measurement once keys are configured.
|
|
553
|
+
|
|
554
|
+
Provider benchmark reports also include `providerEvidenceGaps`: a ranked next-action queue built from the live-vs-fixture rollup. Each gap records the surface, priority score, selected and candidate lanes, follow-up action, unlock prerequisites, fixture/live useful chars, fixture skipped-case lanes/reasons, live-smoke failure error classes/reasons, and safe live smoke candidate so replacement reviews can pick the next provider experiment without scanning every measurement row or re-running a timed live calibration. Use `npm run benchmark:providers:live:no-secret:gaps` to refresh only the compact all-no-secret gap artifact at `reports/provider-benchmark-live-no-secret-gaps.json`. When fixture rows exist but were skipped by missing credentials or commands, the live-vs-fixture and gap actions are `unlock-skipped-fixture-prerequisites` rather than fixture-creation actions.
|
|
555
|
+
|
|
556
|
+
See `reports/README.md` for the curated report archive index. It identifies `provider-benchmark-live-no-secret.{json,md}` and `provider-benchmark-live-no-secret-gaps.json` as the current maintenance artifacts, and labels older cumulative live-smoke reports as historical calibration snapshots.
|
|
507
557
|
|
|
508
558
|
## Quick verification
|
|
509
559
|
|
package/dist/cli.js
CHANGED
|
File without changes
|
package/dist/dev.js
CHANGED
|
File without changes
|
package/dist/index.js
CHANGED
|
File without changes
|
package/dist/korea/coupang.js
CHANGED
|
@@ -20,26 +20,84 @@ import { httpPost } from "./proxy-client.js";
|
|
|
20
20
|
const RETN_BASE = (process.env["OPENCLAW_SHOPPING_BASE_URL"] || "https://a.retn.kr").replace(/\/$/, "");
|
|
21
21
|
const RETN_ASSIST = `${RETN_BASE}/v1/public/assist`;
|
|
22
22
|
const CLIENT_ID = process.env["OPENCLAW_SHOPPING_CLIENT_ID"] || "openclaw-skill";
|
|
23
|
+
function isRecord(value) {
|
|
24
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
25
|
+
}
|
|
26
|
+
function firstString(...values) {
|
|
27
|
+
for (const value of values) {
|
|
28
|
+
if (value !== undefined && value !== null && value !== "")
|
|
29
|
+
return String(value);
|
|
30
|
+
}
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
function firstBoolean(...values) {
|
|
34
|
+
for (const value of values) {
|
|
35
|
+
if (typeof value === "boolean")
|
|
36
|
+
return value;
|
|
37
|
+
if (typeof value === "string") {
|
|
38
|
+
const normalized = value.toLowerCase();
|
|
39
|
+
if (normalized === "true")
|
|
40
|
+
return true;
|
|
41
|
+
if (normalized === "false")
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
function normalizeProduct(raw) {
|
|
48
|
+
if (!isRecord(raw))
|
|
49
|
+
return undefined;
|
|
50
|
+
const metadata = isRecord(raw["metadata"]) ? raw["metadata"] : {};
|
|
51
|
+
const title = firstString(raw["productName"], raw["product_name"], raw["title"], raw["name"], metadata["productName"], metadata["title"], metadata["name"]) ?? "";
|
|
52
|
+
const url = firstString(raw["url"], raw["deeplink"], raw["short_deeplink"], raw["shortDeeplink"], raw["productUrl"], raw["product_url"], raw["link"], metadata["url"], metadata["deeplink"], metadata["short_deeplink"], metadata["productUrl"], metadata["product_url"], metadata["link"]) ?? "";
|
|
53
|
+
if (!title && !url)
|
|
54
|
+
return undefined;
|
|
55
|
+
const price = firstString(raw["price"], raw["salePrice"], raw["sale_price"], raw["currentPrice"], raw["current_price"], metadata["price"], metadata["salePrice"], metadata["sale_price"]);
|
|
56
|
+
const imageUrl = firstString(raw["image_url"], raw["imageUrl"], raw["image"], raw["thumbnail"], metadata["image_url"], metadata["imageUrl"], metadata["image"], metadata["thumbnail"]);
|
|
57
|
+
const rating = firstString(raw["rating"], raw["rating_average"], raw["ratingAverage"], metadata["rating"], metadata["rating_average"], metadata["ratingAverage"]);
|
|
58
|
+
const reviewCount = firstString(raw["review_count"], raw["reviewCount"], raw["reviews"], metadata["review_count"], metadata["reviewCount"], metadata["reviews"]);
|
|
59
|
+
return {
|
|
60
|
+
title,
|
|
61
|
+
is_rocket: firstBoolean(raw["is_rocket"], raw["isRocket"], raw["rocket"], raw["rocketDelivery"], raw["rocket_delivery"], metadata["is_rocket"], metadata["isRocket"], metadata["rocket"], metadata["rocketDelivery"], metadata["rocket_delivery"]),
|
|
62
|
+
url,
|
|
63
|
+
...(price !== undefined ? { price } : {}),
|
|
64
|
+
...(imageUrl !== undefined ? { image_url: imageUrl } : {}),
|
|
65
|
+
...(rating !== undefined ? { rating } : {}),
|
|
66
|
+
...(reviewCount !== undefined ? { review_count: reviewCount } : {}),
|
|
67
|
+
};
|
|
68
|
+
}
|
|
23
69
|
function parseProducts(raw) {
|
|
24
70
|
if (!Array.isArray(raw)) {
|
|
25
71
|
// Try text extraction if result is a string
|
|
26
72
|
if (typeof raw === "string") {
|
|
27
73
|
return parseProductsFromText(raw);
|
|
28
74
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
75
|
+
const product = normalizeProduct(raw);
|
|
76
|
+
return product ? [product] : [];
|
|
77
|
+
}
|
|
78
|
+
return raw.map((item) => normalizeProduct(item)).filter((p) => Boolean(p));
|
|
79
|
+
}
|
|
80
|
+
function parseDirectProducts(raw) {
|
|
81
|
+
if (!isRecord(raw)) {
|
|
82
|
+
return parseProducts(raw);
|
|
83
|
+
}
|
|
84
|
+
const products = [];
|
|
85
|
+
products.push(...parseProducts(raw["best_fit"]));
|
|
86
|
+
products.push(...parseProducts(raw["shortlist"]));
|
|
87
|
+
products.push(...parseProducts(raw["products"]));
|
|
88
|
+
products.push(...parseProducts(raw["items"]));
|
|
89
|
+
products.push(...parseProducts(raw["results"]));
|
|
90
|
+
if (products.length === 0) {
|
|
91
|
+
return parseProducts(raw);
|
|
92
|
+
}
|
|
93
|
+
const seen = new Set();
|
|
94
|
+
return products.filter((product) => {
|
|
95
|
+
const key = product.url || product.title;
|
|
96
|
+
if (!key || seen.has(key))
|
|
97
|
+
return false;
|
|
98
|
+
seen.add(key);
|
|
99
|
+
return true;
|
|
100
|
+
});
|
|
43
101
|
}
|
|
44
102
|
function parseProductsFromText(text) {
|
|
45
103
|
// Best-effort: extract JSON array from MCP content text
|
|
@@ -56,13 +114,36 @@ function parseProductsFromText(text) {
|
|
|
56
114
|
}
|
|
57
115
|
return [];
|
|
58
116
|
}
|
|
59
|
-
|
|
60
|
-
|
|
117
|
+
function parseJsonResponse(raw) {
|
|
118
|
+
if (typeof raw !== "string")
|
|
119
|
+
return raw;
|
|
120
|
+
try {
|
|
121
|
+
return JSON.parse(raw);
|
|
122
|
+
}
|
|
123
|
+
catch {
|
|
124
|
+
return { ok: false, message: "Coupang hosted backend returned invalid JSON" };
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
function directPayload(tool, args) {
|
|
128
|
+
const body = {
|
|
61
129
|
jsonrpc: "2.0",
|
|
62
130
|
id: 1,
|
|
63
|
-
method:
|
|
64
|
-
|
|
65
|
-
|
|
131
|
+
method: tool,
|
|
132
|
+
};
|
|
133
|
+
for (const [key, value] of Object.entries(args)) {
|
|
134
|
+
if (value !== undefined)
|
|
135
|
+
body[key] = value;
|
|
136
|
+
}
|
|
137
|
+
return body;
|
|
138
|
+
}
|
|
139
|
+
function isFailure(value) {
|
|
140
|
+
return isRecord(value) && value["ok"] === false;
|
|
141
|
+
}
|
|
142
|
+
function errorMessage(value, fallback) {
|
|
143
|
+
return firstString(value.message, value.error) ?? fallback;
|
|
144
|
+
}
|
|
145
|
+
async function callRetentionAssist(tool, args, timeoutMs) {
|
|
146
|
+
const body = JSON.stringify(directPayload(tool, args));
|
|
66
147
|
const result = await httpPost(RETN_ASSIST, body, {
|
|
67
148
|
"Content-Type": "application/json",
|
|
68
149
|
"X-OpenClaw-Client-Id": CLIENT_ID,
|
|
@@ -70,8 +151,7 @@ async function callRetentionAssist(tool, args, timeoutMs) {
|
|
|
70
151
|
}, timeoutMs);
|
|
71
152
|
if (!result.ok)
|
|
72
153
|
return { ok: false, message: result.message };
|
|
73
|
-
|
|
74
|
-
return envelope;
|
|
154
|
+
return parseJsonResponse(result.data);
|
|
75
155
|
}
|
|
76
156
|
function extractProducts(envelope) {
|
|
77
157
|
const payload = envelope.data?.payload;
|
|
@@ -90,21 +170,27 @@ function extractProducts(envelope) {
|
|
|
90
170
|
return parseProducts(envelope.data.result);
|
|
91
171
|
return [];
|
|
92
172
|
}
|
|
173
|
+
function extractHostedProducts(response) {
|
|
174
|
+
if (isRecord(response) && response["ok"] === true && isRecord(response["data"])) {
|
|
175
|
+
return extractProducts(response);
|
|
176
|
+
}
|
|
177
|
+
return parseDirectProducts(response);
|
|
178
|
+
}
|
|
93
179
|
export async function runCoupang(options) {
|
|
94
180
|
const { action = "search", query, maxPrice, limit = 10, timeoutMs = 20000 } = options;
|
|
95
181
|
const disclosure = "파트너스 활동을 통해 일정액의 수수료를 제공받을 수 있음";
|
|
96
182
|
const note = "가격·품절·배송 정보는 실시간으로 변동될 수 있습니다.";
|
|
97
183
|
if (action === "goldbox") {
|
|
98
184
|
const envelope = await callRetentionAssist("get_coupang_goldbox", { limit }, timeoutMs);
|
|
99
|
-
if (
|
|
100
|
-
return { ok: false, message:
|
|
101
|
-
const products =
|
|
185
|
+
if (isFailure(envelope))
|
|
186
|
+
return { ok: false, message: errorMessage(envelope, "Coupang goldbox failed") };
|
|
187
|
+
const products = extractHostedProducts(envelope);
|
|
102
188
|
return { source: "coupang", action: "goldbox", query: "골드박스 특가", products, disclosure, note };
|
|
103
189
|
}
|
|
104
190
|
if (!query)
|
|
105
191
|
return { ok: false, message: "검색어(query)가 필요합니다." };
|
|
106
192
|
let tool = "search_coupang_products";
|
|
107
|
-
const args = {
|
|
193
|
+
const args = { query, limit };
|
|
108
194
|
if (action === "rocket") {
|
|
109
195
|
tool = "search_coupang_rocket";
|
|
110
196
|
}
|
|
@@ -117,15 +203,13 @@ export async function runCoupang(options) {
|
|
|
117
203
|
args["query"] = query;
|
|
118
204
|
}
|
|
119
205
|
const envelope = await callRetentionAssist(tool, args, timeoutMs);
|
|
120
|
-
if (
|
|
121
|
-
|
|
122
|
-
return { ok: false, message: msg };
|
|
206
|
+
if (isFailure(envelope)) {
|
|
207
|
+
return { ok: false, message: errorMessage(envelope, "Coupang search failed") };
|
|
123
208
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
return { ok: false, message: `Coupang hosted backend error: ${ev.error ?? "no data returned"}` };
|
|
209
|
+
if (isRecord(envelope) && envelope["ok"] === true && !envelope["data"]) {
|
|
210
|
+
return { ok: false, message: "Coupang hosted backend error: no data returned" };
|
|
127
211
|
}
|
|
128
|
-
const products =
|
|
212
|
+
const products = extractHostedProducts(envelope);
|
|
129
213
|
return { source: "coupang", action, query, products, disclosure, note };
|
|
130
214
|
}
|
|
131
215
|
export function renderCoupang(result) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coupang.js","sourceRoot":"","sources":["../../src/korea/coupang.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5C,MAAM,SAAS,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,IAAI,mBAAmB,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;AACvG,MAAM,WAAW,GAAG,GAAG,SAAS,mBAAmB,CAAA;AACnD,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,IAAI,gBAAgB,CAAA;AA+BhF,SAAS,aAAa,CAAC,GAAY;IACjC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QACxB,4CAA4C;QAC5C,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;YAC5B,OAAO,qBAAqB,CAAC,GAAG,CAAC,CAAA;QACnC,CAAC;QACD,OAAO,EAAE,CAAA;IACX,CAAC;IACD,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,IAA6B,EAAE,EAAE;QAC/C,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,CAAA;QACnD,OAAO;YACL,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;YACzE,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC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,UAAU,GAAG,CAAC,CAAA;IACpC,KAAK,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,IAAI,GAAG,CAAC,CAAA;IAC9B,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACzB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Food safety info (식약처/식품안전나라) via k-skill-proxy
|
|
3
|
-
* Endpoints: /v1/mfds/food-safety/
|
|
3
|
+
* Endpoints: /v1/mfds/food-safety/search, /v1/mfds/food-safety/inspection-fail, /v1/mfds/food-safety/health-food-ingredient
|
|
4
4
|
*/
|
|
5
5
|
export type FoodSafetyResult = {
|
|
6
6
|
source: "food-safety";
|
|
@@ -8,6 +8,9 @@ export type FoodSafetyResult = {
|
|
|
8
8
|
query: string;
|
|
9
9
|
total: number;
|
|
10
10
|
items: Record<string, unknown>[];
|
|
11
|
+
warnings?: string[];
|
|
12
|
+
note?: string;
|
|
13
|
+
proxy?: unknown;
|
|
11
14
|
};
|
|
12
15
|
export declare function runFoodSafety(options: {
|
|
13
16
|
action: "recall" | "unfit" | "functional-ingredient";
|