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

+20 -20
View File
@@ -15,12 +15,12 @@ import time:lib/time.mq.md
Return today's date string (tool visible in source to the model).
*u = > time.now_unix*
**> time.format unix=`u` pattern="%Y-%m-%d"**
**u = > time.now_unix**
*> time.format unix=`u` pattern="%Y-%m-%d"*
# main
*p = > plugin.native_path name="agent"*
**p = > plugin.native_path name="agent"**
1. `p`
> plugin.load path=`p`
2. *
@@ -35,53 +35,53 @@ Return today's date string (tool visible in source to the model).
|------|
| 获取时间 |
*model = > llm.llm*
*助手 = > agent.agent model=`model` tools=`工具表` standing="You are a Marqdo agent. Prefer CALL:获取时间 when the task needs today's date."*
**model = > llm.llm**
**助手 = > agent.agent model=`model` tools=`工具表` standing="You are a Marqdo agent. Prefer CALL:获取时间 when the task needs today's date."**
Assert constitution markers in the assembled prompt (call site before how-to-act):
*ctx = > agent.build_step_context agent=`助手` task="What is today's date? Use the tool in this runbook."*
**ctx = > agent.build_step_context agent=`助手` task="What is today's date? Use the tool in this runbook."**
*parts = > split value=`ctx` sep="--- call site ---"*
*n = > len value=`parts`*
**parts = > split value=`ctx` sep="--- call site ---"**
**n = > len value=`parts`**
1. `n` > 1
> print text=call-site-ok
2. *
> print text=call-site-missing
> sys.exit code=1
*parts2 = > split value=`ctx` sep="--- source (.mq.md) ---"*
*n2 = > len value=`parts2`*
**parts2 = > split value=`ctx` sep="--- source (.mq.md) ---"**
**n2 = > len value=`parts2`**
1. `n2` > 1
> print text=source-ok
2. *
> print text=source-missing
> sys.exit code=1
*parts3 = > split value=`ctx` sep="获取时间"*
*n3 = > len value=`parts3`*
**parts3 = > split value=`ctx` sep="获取时间"**
**n3 = > len value=`parts3`**
1. `n3` > 1
> print text=tool-in-source-ok
2. *
> print text=tool-in-source-missing
> sys.exit code=1
*site = > agent_call_site*
*fn = > json.get value=`site` key="function"*
**site = > agent_call_site**
**fn = > json.get value=`site` key="function"**
> print text=`fn`
Optional live step — set env AGENT_LIVE=1 and put keys in repo-root `.env`:
*live = > sys.env_get name="AGENT_LIVE"*
*key = > sys.env_get name="OPENAI_API_KEY"*
**live = > sys.env_get name="AGENT_LIVE"**
**key = > sys.env_get name="OPENAI_API_KEY"**
1. `live` == "1"
1. `key`
*out = > `助手`.step task="请调用获取时间工具,然后只回复日期字符串。" writeback=False*
*status = > json.get value=`out` key="status"*
**out = > `助手`.step task="请调用获取时间工具,然后只回复日期字符串。" writeback=False**
**status = > json.get value=`out` key="status"**
> print text=`status`
*tool = > json.get value=`out` key="tool"*
**tool = > json.get value=`out` key="tool"**
> print text=`tool`
*result = > json.get value=`out` key="result"*
**result = > json.get value=`out` key="result"**
> print text=`result`
2. *
> print text=live-skipped-no-key