release: v2.6.0 — executable library handbooks and readable actions

This commit is contained in:
cflmy committed 2026-11-08 23:30:17 +08:00
1 parent c50c515c4a
commit aa0c4d0f55
13 files changed
+102 -68

No files matched your search

+8 -2
View File
@@ -6,11 +6,17 @@ description: How to import official lib modules
# main
Official libraries live under lib/ (alias std/). Import them in YAML frontmatter with a greater-than line, for example lib/text.mq.md or lib/fs.mq.md.
Version 2.6.0: each standard library is normally one lib/name.mq.md source file, which is its own handbook. No extra index is required. Read the parameter/default and return tables below its headings to call it; multi-file extensions use indexes to organize modules. The 61 public sources provide 650 functions.
Import with a nested YAML import mapping. File, network and process effects still need authorization at the execution entry. marqdo call defaults to pure functions; file operations require explicit --effects and --fs-root. Contract documentation never grants permission.
New bytes, archive, Result, document and collection workflows retain explicit platform limits. Check one-based paths versus legacy zero-based indexes before using arrays. Real workflows live in examples/stdlib-handbook; the development guide is doc/library-development.mq.md.
Official libraries live under lib/ (alias std/). Use a nested import mapping in YAML frontmatter, for example a module alias mapped to lib/text.mq.md or lib/fs.mq.md.
English-named files export English APIs; Chinese-named files export Chinese APIs. JSON is special: only lib/json.mq.md (shared by both languages).
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.
Importing selects the module; it does not replace effect authorization at the execution entry. 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 / 插件), writeback (writeback / 自写回), subtask (subtask / 子任务). Foreign v2 adds structured invoke records, JSON calls, parallel fan-out, persistent Python/Node kernels, an explicit state bridge and document-native view cells — see stdlib/foreign.mq.md and features/19-foreign-view-cells.mq.md.
+8 -2
View File
@@ -6,11 +6,17 @@ description: 如何导入官方 lib 模块
# main
官方库在仓库 lib/(别名 std/)。在 YAML frontmatter 用大于号行导入,例如 lib/文本.mq.md 或 lib/文件.mq.md。
版本 2.6.0:标准库通常是单个 lib/名称.mq.md 文件,源码本身就是手册,不要求额外 index。直接阅读标题下的参数、默认值和返回表即可调用;多文件拓展库才通过 index 组织模块。当前 61 份公开标准库包含 650 个函数。
使用 YAML 的 import(或导入)映射导入模块。文件、网络、进程等副作用仍由运行入口授权;marqdo call 默认只运行纯函数,文件调用要明确 --effects 与 --fs-root。文档契约不会自动授予权限。
新增字节、归档、Result、文档操作及集合工作流;数组读写要注意一基路径与旧零基接口的区别。更完整的标准库源码在 lib/,真实工程在 examples/stdlib-handbook,开发规范见 doc/library-development.mq.md。
官方库在仓库 lib/(别名 std/)。在 YAML frontmatter 的 import 或导入映射中填写模块别名与路径,例如 lib/文本.mq.md 或 lib/文件.mq.md。
拉丁文件名导出英文 API;中文文件名导出中文 API。JSON 特例:只有 lib/json.mq.md(中英共用)。
导入即表示要用对应能力,无需再加允许旗标。marqdo view 或静态导出里,退出会软失败、长睡眠会被钳制,以免拖垮控制台。
导入只选择模块,不替代实际运行入口的副作用授权。marqdo view 或静态导出里,退出会软失败、长睡眠会被钳制,以免拖垮控制台。
模块:文本(text / 文本)、表(table / 表)、文件(fs / 文件)、时间(time / 时间)、系统(sys / 系统)、json(仅 json)、网络(net / 网络)、数学(math / 数学)、外联(foreign / 外联)、插件(plugin / 插件)、自写回(writeback / 自写回)、子任务(subtask / 子任务)。外联 v2 新增结构化执行记录、JSON 调用、并行扇出、Python/Node 持久内核、显式状态桥与文档原生 view 单元 — 见 stdlib/外联.mq.md 与 features/19-外联视图单元.mq.md。