Add ext/agent layout framework, ext CLI, and docs catch-up.

Ship ABI agent plugin helpers, marqdo ext list/add/remove, and document the agent development roadmap (compose LLM, match/assign).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cflmyandCursor committed 2026-08-06 13:31:25 +08:00
1 parent b0c777c480
commit 3a7e11c995
45 files changed
+1632 -204

No files matched your search

+58
View File
@@ -0,0 +1,58 @@
---
title: ext/agent
description: Agent project layout via ABI plugin (English). Not stdlib — import ext/agent.mq.md.
> lib/plugin.mq.md
> lib/sys.mq.md
> lib/json.mq.md
---
## load_native
Load `plugins/agent` shared library. Order: env `MARQDO_AGENT_PLUGIN`, then installed path from `marqdo ext add agent` (`host_ext_native_path`).
*`envp` = > env_get name=MARQDO_AGENT_PLUGIN *
+ `envp`
**> load path=`envp`**
+ *
*`np` = > host_ext_native_path name=agent *
+ `np`
**> load path=`np`**
+ *
> print text=ext/agent: set MARQDO_AGENT_PLUGIN or run marqdo ext add agent
> exit code=1
# agent
- root
Construct a workspace handle. Optional `root=`; otherwise `agent_find_root` from cwd.
+ `root`
*`r` = `root`*
+ *
*`start` = > cwd *
*`r` = > agent_find_root start=`start` markers=agents,runbooks,marqdo.agent.json *
*`t` = > parse text={"p":"{\"_type\":\"agent\",\"root\":","s":"}"} *
*`qr` = > quote text=`r` *
*`p` = > get value=`t` key=p *
*`s` = > get value=`t` key=s *
*`raw` = `p` + `qr` + `s` *
**> parse text=`raw`**
## probe
*`root` = > get value=`self` key=root *
**> agent_probe root=`root`**
## ensure_layout
*`root` = > get value=`self` key=root *
**> agent_ensure_layout root=`root`**
## scaffold
- name
- template
- dest
*`root` = > get value=`self` key=root *
**> agent_scaffold root=`root` name=`name` template=`template` dest=`dest`**
+58
View File
@@ -0,0 +1,58 @@
---
title: ext/智能体
description: 经 ABI 插件的智能体项目布局(中文)。非标准库 — 导入 ext/智能体.mq.md。
> lib/插件.mq.md
> lib/系统.mq.md
> lib/json.mq.md
---
## 加载原生
加载 `plugins/agent` 共享库。顺序:环境变量 `MARQDO_AGENT_PLUGIN`,否则 `marqdo ext add agent` 安装路径(`host_ext_native_path`)。
*`环境路径` = > 取环境 名=MARQDO_AGENT_PLUGIN *
+ `环境路径`
**> 加载 路径=`环境路径`**
+ *
*`原生` = > host_ext_native_path name=agent *
+ `原生`
**> 加载 路径=`原生`**
+ *
> 打印 内容=ext/智能体: 请设置 MARQDO_AGENT_PLUGIN 或执行 marqdo ext add agent
> 退出 码=1
# 智能体
- 根
构造工作区句柄。可选 `根=`;否则从工作目录向上 `agent_find_root`。
+ `根`
*`r` = `根`*
+ *
*`起点` = > 工作目录 *
*`r` = > agent_find_root start=`起点` markers=agents,runbooks,marqdo.agent.json *
*`t` = > parse text={"p":"{\"_type\":\"智能体\",\"root\":","s":"}"} *
*`qr` = > quote text=`r` *
*`p` = > get value=`t` key=p *
*`s` = > get value=`t` key=s *
*`raw` = `p` + `qr` + `s` *
**> parse text=`raw`**
## 探测
*`root` = > get value=`自` key=root *
**> agent_probe root=`root`**
## 确保布局
*`root` = > get value=`自` key=root *
**> agent_ensure_layout root=`root`**
## 脚手架
- 名
- 模板
- 目标
*`root` = > get value=`自` key=root *
**> agent_scaffold root=`root` name=`名` template=`模板` dest=`目标`**