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

+3 -1
View File
@@ -11,7 +11,9 @@ English-named files export English APIs; Chinese-named files export Chinese APIs
No extra allow flags: importing a module means you intend to use it. Under marqdo view or static export, exit soft-fails and long sleeps are clamped so the console stays up.
Modules: text (text / 文本), table (table / 表), files (fs / 文件), time (time / 时间), system (sys / 系统), json (json only), net (net / 网络), math (math / 数学), foreign (foreign / 外联).
Modules: text (text / 文本), table (table / 表), files (fs / 文件), time (time / 时间), system (sys / 系统), json (json only), net (net / 网络), math (math / 数学), foreign (foreign / 外联), plugin (plugin / 插件).
Official optional extensions live under ext/ (not stdlib): ext/llm, ext/agent — see features/05-extensions.mq.md and doc/design/ext-llm.md / ext-agent.md.
Sibling pages in this folder document each module. Chinese overview: 00-索引.mq.md.
+3 -1
View File
@@ -11,7 +11,9 @@ description: 如何导入官方 lib 模块
导入即表示要用对应能力,无需再加允许旗标。marqdo view 或静态导出里,退出会软失败、长睡眠会被钳制,以免拖垮控制台。
模块:文本(text / 文本)、表(table / 表)、文件(fs / 文件)、时间(time / 时间)、系统(sys / 系统)、json(仅 json)、网络(net / 网络)、数学(math / 数学)、外联(foreign / 外联)。
模块:文本(text / 文本)、表(table / 表)、文件(fs / 文件)、时间(time / 时间)、系统(sys / 系统)、json(仅 json)、网络(net / 网络)、数学(math / 数学)、外联(foreign / 外联)、插件(plugin / 插件)。
官方可选扩展在 ext/(不是标准库):ext/llm、ext/agent — 见 features/05-扩展.mq.md。
各模块说明见本目录其它页。English: 00-overview.mq.md.
+1 -1
View File
@@ -6,7 +6,7 @@ description: Shared EN/ZH path; parse and stringify
# main
Import lib/json.mq.md from both English and Chinese docs (no translated twin). Functions: parse(text), stringify(value), get(value, key), keys(value). Objects become the map runtime type.
Import lib/json.mq.md from both English and Chinese docs (no translated twin). Functions: parse(text), stringify(value), get(value, key), keys(value), quote(text) — JSON string literal with quotes (for building request bodies). Objects become the map runtime type.
*`obj` = > parse text={} *
+18
View File
@@ -0,0 +1,18 @@
---
title: lib/plugin — native ABI
description: Load optional shared libraries (.dll / .so / .dylib)
> lib/plugin.mq.md
---
# main
Import lib/plugin.mq.md. Functions: load(path), unload(), list(). After load, registered plugin names are callable like other functions. C ABI: include/marqdo_abi.h — see doc/design/ext-abi.md. Path must stay under the program sandbox (cwd / fs root).
*`names` = > list *
*`n` = > len `names` *
+ `n` >= 0
> print text=plugin-ok
+ *
> print text=plugin-bad
+2 -2
View File
@@ -1,12 +1,12 @@
---
title: lib/sys — process
description: Env, cwd, args, exit, exec
description: Env, dotenv, cwd, args, exit, exec
> lib/sys.mq.md
---
# main
Import lib/sys.mq.md. Functions: env_get, env_set, args, cwd, exit(code), exec(cmd). Under view, exit soft-fails instead of killing the process.
Import lib/sys.mq.md. Functions: env_get, env_set, load_dotenv(optional path), args, cwd, exit(code), exec(cmd). load_dotenv does not override existing variables. Under view, exit soft-fails instead of killing the process.
*`d` = > cwd *
+18
View File
@@ -0,0 +1,18 @@
---
title: lib/插件 — 原生 ABI
description: 加载可选共享库(.dll / .so / .dylib)
> lib/插件.mq.md
---
# main
导入 lib/插件.mq.md。函数:加载(路径)、卸载()、列出()。加载后,插件注册的名称可像普通函数一样调用。C 契约见 include/marqdo_abi.h 与 doc/design/ext-abi.md。路径须落在程序沙箱内。
*`names` = > 列出 *
*`n` = > 长度 值=`names` *
+ `n` >= 0
> 打印 内容=插件就绪
+ *
> 打印 内容=插件异常
+2 -2
View File
@@ -1,12 +1,12 @@
---
title: lib/系统 — 进程
description: 环境变量、工作目录、参数、退出、执行
description: 环境变量、dotenv、工作目录、参数、退出、执行
> lib/系统.mq.md
---
# main
导入 lib/系统.mq.md。函数:取环境、设环境、参数表、工作目录、退出(码)、执行(命令)。view 下退出会软失败,不结束进程。
导入 lib/系统.mq.md。函数:取环境、设环境、加载环境(可选路径)、参数表、工作目录、退出(码)、执行(命令)。加载环境不覆盖已有变量。view 下退出会软失败,不结束进程。
*`d` = > 工作目录 *
+2 -2
View File
@@ -1,12 +1,12 @@
---
title: lib/网络 — HTTP
description: 简易 HTTP 与地址编码
description: HTTP(S) 与地址编码
> lib/网络.mq.md
---
# main
导入 lib/网络.mq.md。函数:获取(地址) 返回 map status/body、提交(地址, 内容)、编码地址(内容)。本波仅明文 http。
导入 lib/网络.mq.md。函数:获取(地址)、提交(地址, 内容;可选 content_type / headers)、编码地址(内容)。支持 HTTP 与 HTTPS(ureq)。
*`e` = > 编码地址 内容=你好 *