feat(markup): finish v0.3 stock migration and green gold

Migrate remaining .mq.md (tests/ext/public/examples), stop elevating local assigns to params, inject form_target in Go libweb, and skip live LLM gold without a real key.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cflmyandCursor committed 2026-09-13 23:43:44 +08:00
1 parent bfb10d172b
commit b5c07385e9
324 files changed
+4572 -4339

No files matched your search

+18 -18
View File
@@ -8,7 +8,7 @@ import sys:lib/sys.mq.md
# main
*p = > plugin.native_path name="web"*
**p = > plugin.native_path name="web"**
1. `p`
> plugin.load path=`p`
2. *
@@ -26,49 +26,49 @@ import sys:lib/sys.mq.md
|------|--------|-----|------|--------|
| /api/echo | POST | demo.echo | json | json |
*pg = > web.page title="proxy-invoke"*
*app = > web.app page=`pg`*
*app = > `app`.configure proxy=`proxy_tbl` invoke=`invoke_tbl`*
*app = > `app`.proxy path="/v1/stream" upstream="https://example.com/v1/chat" stream=True headers_from_env="TOKEN=X-Token"*
*app = > `app`.invoke path="/api/ping" fn="demo.ping" method="GET" body="query"*
**pg = > web.page title="proxy-invoke"**
**app = > web.app page=`pg`**
**app = > `app`.configure proxy=`proxy_tbl` invoke=`invoke_tbl`**
**app = > `app`.proxy path="/v1/stream" upstream="https://example.com/v1/chat" stream=True headers_from_env="TOKEN=X-Token"**
**app = > `app`.invoke path="/api/ping" fn="demo.ping" method="GET" body="query"**
*proutes = app[^proxy_routes]*
*chat = proutes[^proxy/chat]*
*up = chat[^upstream]*
**proutes = app[^proxy_routes]**
**chat = proutes[^proxy/chat]**
**up = chat[^upstream]**
1. `up` == "$OPENAI_BASE_URL"
> print text=proxy-table-ok
2. *
> print text=proxy-table-fail
*stream = chat[^stream]*
**stream = chat[^stream]**
1. `stream`
> print text=proxy-stream-ok
2. *
> print text=proxy-stream-fail
*hdr = chat[^headers_from_env]*
**hdr = chat[^headers_from_env]**
1. `hdr` == "OPENAI_API_KEY=Authorization"
> print text=proxy-env-ok
2. *
> print text=proxy-env-fail
*v1 = proutes[^v1/stream]*
*v1u = v1[^upstream]*
**v1 = proutes[^v1/stream]**
**v1u = v1[^upstream]**
1. `v1u` == "https://example.com/v1/chat"
> print text=proxy-method-ok
2. *
> print text=proxy-method-fail
*iroutes = app[^invoke_routes]*
*echo = iroutes[^api/echo]*
*efn = echo[^fn]*
**iroutes = app[^invoke_routes]**
**echo = iroutes[^api/echo]**
**efn = echo[^fn]**
1. `efn` == "demo.echo"
> print text=invoke-table-ok
2. *
> print text=invoke-table-fail
*ping = iroutes[^api/ping]*
*pm = ping[^method]*
**ping = iroutes[^api/ping]**
**pm = ping[^method]**
1. `pm` == "GET"
> print text=invoke-method-ok
2. *