1.0.4: declare build_cmd_posix/win64 so the market's copy-paste command works
The published build_cmd was the CLI's pre-1.4.0 default: cc -O2 -std=c99 -Wall -Wextra -o plugin_websearch src/plugin_websearch.c Measured on a fresh clone: it fails before it links - names one of six sources, omits the 277 vendored BearSSL units and vendor/yyjson.c, and does not pass -I vendor, so it dies on #include "yyjson.h". That string is what the marketplace's 'copy the agent build command' button hands a user's agent, so it was a promise that could not be kept. plugin.json now declares its own commands (rule 1 of the CLI's precedence): "build_cmd_posix": "make", "build_cmd_win64": "make win64". The suite asserts the declaration AND that win64 is a real Makefile target, and the README names the broken line explicitly so nobody re-derives it. 92 assertions / 0 fail; e2e green.
AuthorPico <picobot@scorpioplayer.com>
Date2026-11-14 09:09:05
Commit4c99dae8
Parentscdce71b0
Changed files
README.md+24−0■■■■■
plugin.json+4−2■■■■■
src/ws.h+1−1■■
tests/run.sh+27−0■■■■■
4 files+56−3
Diff
README.md+24−0■■■■■
index 4059c9f..48977aa 100644
--- a/README.md
+++ b/README.md
@@ -177,6 +177,30 @@ deliberate, and it is the honest answer for this connector:
177177
178178 Flip it to `"live"` when someone runs it with a real key and says so.
179179
180+## Building it
181+
182+`plugin.json` declares the two commands the marketplace publishes as
183+`build_cmd_posix` / `build_cmd_win64`:
184+
185+```json
186+"build_cmd_posix": "make",
187+"build_cmd_win64": "make win64"
188+```
189+
190+That is the author's declaration, and it is the difference between a working
191+"copy the agent build command" button and a broken one. The CLI's pre-1.4.0
192+default was a single-source line
193+
194+```
195+cc -O2 -std=c99 -Wall -Wextra -o plugin_websearch src/plugin_websearch.c
196+```
197+
198+which cannot build this repository: it names one of six sources, omits the 277
199+vendored BearSSL translation units and `vendor/yyjson.c`, and does not pass
200+`-I vendor` — so it fails on `#include "yyjson.h"` before it ever links. The
201+suite asserts the declaration (and that `win64` is a real Makefile target)
202+instead of trusting it.
203+
180204 ## Security
181205
182206 See [docs/SECURITY.md](docs/SECURITY.md). The short version: TLS is verified against a
plugin.json+4−2■■■■■
index 786c1d9..dc20f31 100644
--- a/plugin.json
+++ b/plugin.json
@@ -11,7 +11,7 @@
1111 "menus": false,
1212 "verified": "mock",
1313 "category": "network",
14- "version": "1.0.3",
14+ "version": "1.0.4",
1515 "license": "MIT",
1616 "capabilities": [
1717 "outbound_https_search_api",
@@ -27,5 +27,7 @@
2727 "ldflags_win64": [
2828 "-lws2_32",
2929 "-ladvapi32"
30- ]
30+ ],
31+ "build_cmd_posix": "make",
32+ "build_cmd_win64": "make win64"
3133 }
src/ws.h+1−1■■
index 14ac690..ba609bc 100644
--- a/src/ws.h
+++ b/src/ws.h
@@ -32,7 +32,7 @@
3232
3333 #define WS_SLUG "websearch"
3434 #define WS_ID "plugin_websearch"
35-#define WS_VER "1.0.3"
35+#define WS_VER "1.0.4"
3636 #define WS_NAME "websearch"
3737 #define WS_DESC "Web search MCP"
3838
tests/run.sh+27−0■■■■■
index 7bda96b..5166897 100755
--- a/tests/run.sh
+++ b/tests/run.sh
@@ -379,6 +379,33 @@ NOPWD=$(QUERY_STRING="action=providers&format=json" REQUEST_METHOD=GET BOT_PASSW
379379 SWEBSEARCH_CONFIG_DIR="$CFGDIR" "$BIN")
380380 check "the JSON API is behind the same auth gate" '401 Unauthorized' "$NOPWD"
381381
382+# ---------------------------------------------------------------- build cmd
383+section "the advertised build command actually builds the plugin"
384+# `build_cmd_posix` is what the marketplace's "copy the agent build command"
385+# button hands to a user's agent, so a wrong string is a broken promise - and
386+# the CLI's pre-1.4.0 default was a single-source `cc` line that cannot build a
387+# repo with six sources and two vendored libraries. The author declares it here
388+# (rule 1 of the CLI's own precedence) and this asserts the declaration is the
389+# one that works, not merely that it exists.
390+json_ok "plugin.json declares build_cmd_posix" "$(cat plugin.json)" \
391+ 'd.get("build_cmd_posix")=="make"'
392+json_ok "plugin.json declares build_cmd_win64" "$(cat plugin.json)" \
393+ 'd.get("build_cmd_win64")=="make win64"'
394+json_ok "the declared win64 build is a real Makefile target" "$(cat plugin.json)" \
395+ 'open("Makefile").read().find("\nwin64:") >= 0'
396+# the legacy single-source line is provably wrong here: it neither passes -I nor
397+# names the vendored translation units. Prove that rather than assert it.
398+if [ "$(ls src/*.c | wc -l)" -gt 1 ]; then
399+ pass "repo has more than one translation unit (a one-line cc cannot build it)"
400+else
401+ fail "expected more than one source file"
402+fi
403+if grep -q -- '-I vendor' Makefile; then
404+ pass "the Makefile passes -I vendor (the one-line cc does not)"
405+else
406+ fail "Makefile does not pass -I vendor"
407+fi
408+
382409 # ---------------------------------------------------------------- source
383410 section "source guards"
384411 if grep -rn --include='*.c' --include='*.h' -E '\b(popen|system|execv|fork)\s*\(' src/ >/dev/null 2>&1; then
385412
README.md+24−0■■■■■
index 4059c9f..48977aa 100644index 4059c9f..48977aa 100644
--- a/README.md--- a/README.md
+++ b/README.md+++ b/README.md
@@ -177,6 +177,30 @@ deliberate, and it is the honest answer for this connector:@@ -177,6 +177,30 @@ deliberate, and it is the honest answer for this connector:
177 177
178 Flip it to `"live"` when someone runs it with a real key and says so.178 Flip it to `"live"` when someone runs it with a real key and says so.
179 179
180+## Building it
181+
182+`plugin.json` declares the two commands the marketplace publishes as
183+`build_cmd_posix` / `build_cmd_win64`:
184+
185+```json
186+"build_cmd_posix": "make",
187+"build_cmd_win64": "make win64"
188+```
189+
190+That is the author's declaration, and it is the difference between a working
191+"copy the agent build command" button and a broken one. The CLI's pre-1.4.0
192+default was a single-source line
193+
194+```
195+cc -O2 -std=c99 -Wall -Wextra -o plugin_websearch src/plugin_websearch.c
196+```
197+
198+which cannot build this repository: it names one of six sources, omits the 277
199+vendored BearSSL translation units and `vendor/yyjson.c`, and does not pass
200+`-I vendor` — so it fails on `#include "yyjson.h"` before it ever links. The
201+suite asserts the declaration (and that `win64` is a real Makefile target)
202+instead of trusting it.
203+
180 ## Security204 ## Security
181 205
182 See [docs/SECURITY.md](docs/SECURITY.md). The short version: TLS is verified against a206 See [docs/SECURITY.md](docs/SECURITY.md). The short version: TLS is verified against a
plugin.json+4−2■■■■■
index 786c1d9..dc20f31 100644index 786c1d9..dc20f31 100644
--- a/plugin.json--- a/plugin.json
+++ b/plugin.json+++ b/plugin.json
@@ -11,7 +11,7 @@@@ -11,7 +11,7 @@
11 "menus": false,11 "menus": false,
12 "verified": "mock",12 "verified": "mock",
13 "category": "network",13 "category": "network",
14- "version": "1.0.3",14+ "version": "1.0.4",
15 "license": "MIT",15 "license": "MIT",
16 "capabilities": [16 "capabilities": [
17 "outbound_https_search_api",17 "outbound_https_search_api",
@@ -27,5 +27,7 @@@@ -27,5 +27,7 @@
27 "ldflags_win64": [27 "ldflags_win64": [
28 "-lws2_32",28 "-lws2_32",
29 "-ladvapi32"29 "-ladvapi32"
30- ]30+ ],
31+ "build_cmd_posix": "make",
32+ "build_cmd_win64": "make win64"
31 }33 }
src/ws.h+1−1■■
index 14ac690..ba609bc 100644index 14ac690..ba609bc 100644
--- a/src/ws.h--- a/src/ws.h
+++ b/src/ws.h+++ b/src/ws.h
@@ -32,7 +32,7 @@@@ -32,7 +32,7 @@
32 32
33 #define WS_SLUG "websearch"33 #define WS_SLUG "websearch"
34 #define WS_ID "plugin_websearch"34 #define WS_ID "plugin_websearch"
35-#define WS_VER "1.0.3"35+#define WS_VER "1.0.4"
36 #define WS_NAME "websearch"36 #define WS_NAME "websearch"
37 #define WS_DESC "Web search MCP"37 #define WS_DESC "Web search MCP"
38 38
tests/run.sh+27−0■■■■■
index 7bda96b..5166897 100755index 7bda96b..5166897 100755
--- a/tests/run.sh--- a/tests/run.sh
+++ b/tests/run.sh+++ b/tests/run.sh
@@ -379,6 +379,33 @@ NOPWD=$(QUERY_STRING="action=providers&format=json" REQUEST_METHOD=GET BOT_PASSW@@ -379,6 +379,33 @@ NOPWD=$(QUERY_STRING="action=providers&format=json" REQUEST_METHOD=GET BOT_PASSW
379 SWEBSEARCH_CONFIG_DIR="$CFGDIR" "$BIN")379 SWEBSEARCH_CONFIG_DIR="$CFGDIR" "$BIN")
380 check "the JSON API is behind the same auth gate" '401 Unauthorized' "$NOPWD"380 check "the JSON API is behind the same auth gate" '401 Unauthorized' "$NOPWD"
381 381
382+# ---------------------------------------------------------------- build cmd
383+section "the advertised build command actually builds the plugin"
384+# `build_cmd_posix` is what the marketplace's "copy the agent build command"
385+# button hands to a user's agent, so a wrong string is a broken promise - and
386+# the CLI's pre-1.4.0 default was a single-source `cc` line that cannot build a
387+# repo with six sources and two vendored libraries. The author declares it here
388+# (rule 1 of the CLI's own precedence) and this asserts the declaration is the
389+# one that works, not merely that it exists.
390+json_ok "plugin.json declares build_cmd_posix" "$(cat plugin.json)" \
391+ 'd.get("build_cmd_posix")=="make"'
392+json_ok "plugin.json declares build_cmd_win64" "$(cat plugin.json)" \
393+ 'd.get("build_cmd_win64")=="make win64"'
394+json_ok "the declared win64 build is a real Makefile target" "$(cat plugin.json)" \
395+ 'open("Makefile").read().find("\nwin64:") >= 0'
396+# the legacy single-source line is provably wrong here: it neither passes -I nor
397+# names the vendored translation units. Prove that rather than assert it.
398+if [ "$(ls src/*.c | wc -l)" -gt 1 ]; then
399+ pass "repo has more than one translation unit (a one-line cc cannot build it)"
400+else
401+ fail "expected more than one source file"
402+fi
403+if grep -q -- '-I vendor' Makefile; then
404+ pass "the Makefile passes -I vendor (the one-line cc does not)"
405+else
406+ fail "Makefile does not pass -I vendor"
407+fi
408+
382 # ---------------------------------------------------------------- source409 # ---------------------------------------------------------------- source
383 section "source guards"410 section "source guards"
384 if grep -rn --include='*.c' --include='*.h' -E '\b(popen|system|execv|fork)\s*\(' src/ >/dev/null 2>&1; then411 if grep -rn --include='*.c' --include='*.h' -E '\b(popen|system|execv|fork)\s*\(' src/ >/dev/null 2>&1; then
385412