- CHANGELOG.md:v2.8.0 条目(中英双语); - README.md:版本行 2.7.1→2.8.0 + 愿景第 6 条(知识可证明); - doc/releases/v2.8.0.md:双语发版说明(亮点/用法/已知限制); - skills/marqdo-dev/index.mq.md:新增 prove 任务(路径/目录模式/ require_lean/json;参数用 + 行声明升参,check 与 narrative-ratio 通过); - 设计文档 §12.5 标记已合入;发版链接统一指向 doc/releases/v2.8.0.md。
2.6 KiB
Executable File
markup, title, description, import
| markup | title | description | import | ||||||
|---|---|---|---|---|---|---|---|---|---|
| occlusion | ext/agent framework smoke | Real llm handle from tests/ext/.env; context, extract_tool_name, run_tool via subtask. |
|
获取时间
esc = > json.parse text={"v":"ok-time"}
> json.get value=esc key="v"
main
llm.load_env path=.env
工具表 =
| 工具 |
|---|
| 获取时间 |
模型 = > llm.llm
助手 = > agent.agent model=模型 tools=工具表 standing="you are a readable Marqdo agent"
The allowlist names what the agent may call; ToolSpec registration declares the actual capability. This deterministic read tool takes no arguments and keeps this smoke test independent of a real clock or mutating effect ledger.
spec =
| id | version | description | effect |
|---|---|---|---|
| 获取时间 | "1" | deterministic smoke value | read |
agent.tools_clear agent.tools_register spec=
spec
id = > json.get value=助手 key="id"
ctx = > agent.build_step_context agent=助手 task="probe"
has_skill = > split value=ctx sep="Marqdo"
sk_n = > len value=has_skill
sk_n> 1
print text=skill-ok
print text=skill-missing
has_tools = > split value=ctx sep="获取时间"
tool_n = > len value=has_tools
tool_n> 1
print text=tools-ok
print text=tools-missing
has_src = > split value=ctx sep="probe"
src_n = > len value=has_src
src_n> 1
print text=source-ok
print text=source-missing
has_act = > split value=ctx sep="CALL:"
act_n = > len value=has_act
act_n> 1
print text=protocol-ok
print text=protocol-missing
samples = > json.parse text={"r":"CALL:获取时间","m":"think\nCALL:获取时间"}
raw1 = > json.get value=samples key="r"
name1 = > agent.extract_tool_name reply=raw1
print text=
name1
raw2 = > json.get value=samples key="m"
name2 = > agent.extract_tool_name reply=raw2
print text=
name2
tool_out = > agent.run_tool tools=工具表 name="获取时间"
print text=
tool_out
turn = > json.parse text={"role":"user","content":"one"}
agent_history_append id=
iditem=turnturn2 = > json.parse text={"role":"assistant","content":"two"} agent_history_append id=iditem=turn2
h1 = > agent_history_get id=id
n1 = > len value=h1
print text=
n1
助手.clear_history
h2 = > agent_history_get id=id
n2 = > len value=h2
print text=
n2
site = > agent_call_site
fn = > json.get value=site key="function"
print text=
fn