Files
marqdo/public/stdlib/00-overview.mq.md
T
cflmy 9331af78e2 release(2.8.0): 合入 CHANGELOG/README/发版说明/skills prove 任务;CI 链接指向 doc/releases
- 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。
2026-11-18 10:29:26 +08:00

2.6 KiB
Executable File

markup, title, description
markup title description
occlusion Standard library — overview How to import official lib modules

main

返回 类型 说明
result any None; execute this page's documented steps in order and observe their output or stated effects

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).

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.

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.

Sibling pages in this folder document each module. Chinese overview: 00-索引.mq.md.

We now [Display this step's result](> print text="stdlib overview ok").