Release v0.1.2: embedded stdlib, docs, and extension branch policy.

Embed lib/*.mq.md in binary; marqdo version --check; public writeback/subtask pages; restore /vscode-extension/ ignore. VSIX built from branch vscode-extension only (see doc/design/vscode-extension-commit.md).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cflmyandCursor committed 2026-08-07 09:41:53 +08:00
1 parent 3da7b276d3
commit 2e65c055b8
23 files changed
+469 -53

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 / 外联), plugin (plugin / 插件).
Modules: text (text / 文本), table (table / 表), files (fs / 文件), time (time / 时间), system (sys / 系统), json (json only), net (net / 网络), math (math / 数学), foreign (foreign / 外联), plugin (plugin / 插件), writeback (writeback / 自写回), subtask (subtask / 子任务).
From **v0.1.2**, official `lib/*.mq.md` is **embedded in the `marqdo` binary** (disk `lib/` or `MARQDO_LIB` still overrides). Standalone `.exe` works without a separate stdlib zip.
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.
+3 -1
View File
@@ -11,7 +11,9 @@ description: 如何导入官方 lib 模块
导入即表示要用对应能力,无需再加允许旗标。marqdo view 或静态导出里,退出会软失败、长睡眠会被钳制,以免拖垮控制台。
模块:文本(text / 文本)、表(table / 表)、文件(fs / 文件)、时间(time / 时间)、系统(sys / 系统)、json(仅 json)、网络(net / 网络)、数学(math / 数学)、外联(foreign / 外联)、插件(plugin / 插件)。
模块:文本(text / 文本)、表(table / 表)、文件(fs / 文件)、时间(time / 时间)、系统(sys / 系统)、json(仅 json)、网络(net / 网络)、数学(math / 数学)、外联(foreign / 外联)、插件(plugin / 插件)、自写回(writeback / 自写回)、子任务(subtask / 子任务)。
自 **v0.1.2** 起,官方 `lib/*.mq.md` **内置于 `marqdo` 二进制**(磁盘 `lib/` 或 `MARQDO_LIB` 仍可覆盖)。单独下载 `.exe` 即可导入标准库,无需再解压 stdlib 包。
官方可选扩展在 ext/(不是标准库):ext/llm、ext/agent — 见 features/05-扩展.mq.md。
+20
View File
@@ -0,0 +1,20 @@
---
title: lib/subtask — concurrent tasks
description: Spawn file, function, or foreign code in parallel
> lib/subtask.mq.md
---
# main
`spawn` picks **one** mode (others default to `None`):
| Argument | Runs | `wait` returns |
|----------|------|----------------|
| `path=` | `marqdo run` child process | exit code |
| `fn=` + optional `args=` | function in a thread (entry module) | return value |
| `code=` | foreign ``` fence ``` subprocess | stdout text |
| `lang=` + `source=` | foreign source subprocess | stdout text |
Also: `poll id=`, `kill id=`, `wait_all`. Parent exit kills file/foreign children.
> print text=subtask overview ok
+15
View File
@@ -0,0 +1,15 @@
---
title: lib/writeback — Jupyter-style writeback
description: Persist run output in the entry .mq.md file
> lib/writeback.mq.md
---
# main
Writeback stores output in `<!-- marqdo-out … -->` blocks in the **entry** file (the one you run).
- `record value=` — default: insert or replace the block **below the call**; `at_end=true` → single block at EOF
- `get` / `clear` — read or remove the adjacent block (or EOF block when `at_end=true`)
- `list` — all output blocks in the entry file
> print text=writeback overview ok
+20
View File
@@ -0,0 +1,20 @@
---
title: lib/子任务 — 并发子任务
description: 文件、函数或外联代码并行执行
> lib/子任务.mq.md
---
# main
`启动`(`spawn`)四选一(其余参数默认 `None`):
| 参数 | 方式 | `等待` 返回 |
|------|------|-------------|
| `路径=` | `marqdo run` 子进程 | 退出码 |
| `函数=` + 可选 `参数=` | 入口模块中的函数(线程) | 返回值 |
| `代码=` | 外联代码块子进程 | stdout 文本 |
| `语言=` + `源码=` | 外联源码子进程 | stdout 文本 |
另有:`探测`、`终止`、`等待全部`。父进程结束会终止文件/外联子进程。
> 打印 内容=子任务总览就绪
+15
View File
@@ -0,0 +1,15 @@
---
title: lib/自写回 — Jupyter 式写回
description: 把运行结果写回入口 .mq.md
> lib/自写回.mq.md
---
# main
自写回把结果写入入口文件(你 `run` 的那份 `.mq.md`)里的 `<!-- marqdo-out … -->` 块。
- `记录 内容=`(`record`)— 默认写在调用下方;`at_end=真` 则在文件末尾单独一块
- `读取` / `清除` — 读或删相邻块(`at_end` 时指 EOF 块)
- `列表` — 列出文件中所有输出块
> 打印 内容=自写回总览就绪