feat(stdlib): add datetime and project-mode clock APIs

This commit is contained in:
Marqdo Agent committed 2026-11-21 08:36:40 +08:00
1 parent cffb6790be
commit ae69391bc0
15 files changed
+527 -11

No files matched your search

+7 -6
View File
@@ -58,7 +58,7 @@ byte-identical).
cargo fmt --all -- --check PASS
cargo clippy --workspace --all-targets -- -D warnings PASS
cargo test --workspace --locked PASS
471 passed, 0 failed, 2 ignored; includes 7/7 Linux security tests
474 passed, 0 failed, 2 ignored; includes 7/7 Linux security tests
```
The documentation and test migration is local work; re-run this block after it
@@ -202,11 +202,12 @@ This is still a **local VM lane**, not a self-hosted GitHub Actions security URL
over the existing `resource.*` ABI plus `存在`/`元数据`/`列出目录`/`创建目录`/
`删除`/`重命名` over `resource.request` (ADR-0041); `data/json`/`data/csv`
provide recursive JSON and quoted single-row CSV product parsers; `path` and a
`regex` subset are pure `.mq.md`. Append/seek/watch, recursive walk, streaming
JSON/CSV, a JSON depth bound, regex groups/alternation and `datetime`/`env`/
`process` remain open.
`regex` subset are pure `.mq.md`; `datetime` is pure UTC ISO-8601 and
`clock.现在` reads `clock.now` in project mode (ADR-0042). Append/seek/watch,
recursive walk, streaming JSON/CSV, a JSON depth bound, regex groups/
alternation and `env`/`process` remain open.
- Bundled standard library (CM-A10, ADR-0028): `stdlib/` ships
`format`/`text`/`io`/`fs`/`data`/`path`/`regex`; explicit `std:` imports resolve only inside the bundle;
`format`/`text`/`io`/`fs`/`data`/`path`/`regex`/`datetime`/`clock`; explicit `std:` imports resolve only inside the bundle;
a SHA-256 digest over `*.mq.md` is verified before loading; Analysis records
`project.stdlib`; a frozen-binary test asserts the CLI hash is unchanged after
running a `std:io` project and that tampering is rejected. `打印/print` is
@@ -232,7 +233,7 @@ This is still a **local VM lane**, not a self-hosted GitHub Actions security URL
status/index links and SHA-pinned evidence; `crates/cli/tests/architecture_boundaries.rs`
pins the workspace graph, `marqdo-runtime -> marqdo-host`, the bundled stdlib
digest and the stdio/file/TCP endpoints; `crates/cli/tests/stdlib_product.rs`
runs every public stdlib module (`console/csv/demo/format/fs/http/io/json/path/regex/stream/table/text/utf8`)
runs every public stdlib module (`clock/console/csv/datetime/demo/format/fs/http/io/json/path/regex/stream/table/text/utf8`)
through `std:` imports over `stdlib/tests/*.mq.md`. `tools/pack-stdlib.py`
now sorts `.mq.md` by the same relative path key as the CLI. Source/test baseline
`0d40de7`; later docs-only commits keep code/test bytes identical. Evidence: