@osovv/vv-opencode 1.3.7 → 1.3.8
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
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## <small>1.3.8 (2026-09-09)</small>
|
|
2
|
+
|
|
3
|
+
### Summary
|
|
4
|
+
|
|
5
|
+
Version 1.3.8 fixes a Brave Web Search integration issue where queries returning zero results caused a spurious tool error instead of cleanly reporting no matches. Brave responds to such queries with HTTP 200 and omits the usual results field, which the parser previously rejected as a malformed response. The search adapter now recognizes that zero-result envelope as a legitimate empty result set, so web_search returns an empty result instead of failing, while genuinely unrecognized responses still fail closed to preserve safety. This eliminates confusing errors during legitimate searches that simply have no web results.
|
|
6
|
+
|
|
7
|
+
* fix(web-tools): treat zero-result brave envelopes as empty results ([291b989](https://github.com/osovv/vv-opencode/commit/291b989))
|
|
8
|
+
|
|
1
9
|
## <small>1.3.7 (2026-09-09)</small>
|
|
2
10
|
|
|
3
11
|
### Summary
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// FILE: src/plugins/web-tools/providers/brave.ts
|
|
2
|
-
// VERSION: 1.0.
|
|
2
|
+
// VERSION: 1.0.1
|
|
3
3
|
// START_MODULE_CONTRACT
|
|
4
4
|
// PURPOSE: Call the Brave Web Search endpoint directly and normalize web results for the web_search tool.
|
|
5
|
-
// SCOPE: Brave request construction with X-Subscription-Token auth, count and freshness mapping, moderate safe search, and web
|
|
5
|
+
// SCOPE: Brave request construction with X-Subscription-Token auth, count and freshness mapping, moderate safe search, web result normalization, and zero-result 200 envelopes without a web field resolving to empty results.
|
|
6
6
|
// DEPENDS: [src/plugins/web-tools/http.ts, src/plugins/web-tools/providers/exa.ts]
|
|
7
7
|
// LINKS: [M-WEB-BRAVE, M-WEB-HTTP, M-WEB-SEARCH-SERVICE]
|
|
8
8
|
// ROLE: RUNTIME
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
// END_MODULE_MAP
|
|
15
15
|
//
|
|
16
16
|
// START_CHANGE_SUMMARY
|
|
17
|
-
// LAST_CHANGE: [
|
|
17
|
+
// LAST_CHANGE: [2026-09-09 direct fix - Zero-result Brave 200 envelopes without a web field now resolve to empty results instead of BAD_RESPONSE.]
|
|
18
18
|
// END_CHANGE_SUMMARY
|
|
19
19
|
import { DEFAULT_TEXT_MAX_BYTES, requestBounded, } from "../http.js";
|
|
20
20
|
import { mapHttpErrorToProviderError, WebProviderError, } from "./exa.js";
|
|
@@ -54,12 +54,18 @@ function parseBraveResults(bytes) {
|
|
|
54
54
|
}
|
|
55
55
|
const web = isPlainObject(parsed) ? parsed.web : undefined;
|
|
56
56
|
const results = isPlainObject(web) && Array.isArray(web.results) ? web.results : undefined;
|
|
57
|
-
if (
|
|
58
|
-
|
|
57
|
+
if (results) {
|
|
58
|
+
return results
|
|
59
|
+
.map(normalizeBraveResult)
|
|
60
|
+
.filter((result) => result !== undefined);
|
|
59
61
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
// Brave answers zero-result queries with HTTP 200 and no `web` field at all
|
|
63
|
+
// (observed 2026-09-09: query.bad_results true, empty mixed). Recognize that
|
|
64
|
+
// envelope as an empty result set instead of a protocol error.
|
|
65
|
+
if (isPlainObject(parsed) && (isPlainObject(parsed.query) || isPlainObject(parsed.mixed))) {
|
|
66
|
+
return [];
|
|
67
|
+
}
|
|
68
|
+
throw new WebProviderError("brave", "BAD_RESPONSE", "unexpected brave response envelope");
|
|
63
69
|
}
|
|
64
70
|
// END_BLOCK_HELPERS
|
|
65
71
|
// START_CONTRACT: searchBrave
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brave.js","sourceRoot":"","sources":["../../../../src/plugins/web-tools/providers/brave.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,iBAAiB;AACjB,wBAAwB;AACxB,4GAA4G;AAC5G,
|
|
1
|
+
{"version":3,"file":"brave.js","s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OAAO,EAAE;gBACP,sBAAsB,EAAE,KAAK,CAAC,UAAU,CAAC,KAAK;gBAC9C,MAAM,EAAE,kBAAkB;aAC3B;YACD,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,QAAQ,EAAE,sBAAsB;YAChC,KAAK,EAAE,KAAK,CAAC,KAAK;SACnB,EACD,SAAS,CACV,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,2BAA2B,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAC5C,MAAM,KAAK,CAAC;IACd,CAAC;IAED,OAAO,iBAAiB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC3C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osovv/vv-opencode",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.8",
|
|
4
4
|
"description": "An opinionated agentic development layer for OpenCode — spec-first when it matters, review-driven execution, portable model roles, safer tools, and long-run safety.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
package/schemas/vvoc/v3.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://cdn.jsdelivr.net/npm/@osovv/vv-opencode@1.3.
|
|
3
|
+
"$id": "https://cdn.jsdelivr.net/npm/@osovv/vv-opencode@1.3.8/schemas/vvoc/v3.json",
|
|
4
4
|
"title": "vvoc config",
|
|
5
5
|
"description": "Canonical vvoc configuration document.",
|
|
6
6
|
"type": "object",
|