feat(m0.6-r6): release examples, public schemas and cross-platform CI

- add runnable examples for an unknown-name Tool, multi-export plugin,
  external kernel provider and same-name multi-version packages
- add JSON Schemas for Analysis v1, Trace v1 and Tool v1 and validate them in CI
- extend CI with protocol/consumer smoke tests and a Windows/macOS cargo check
- add --kernel provider descriptors and R6 example integration tests
- document the examples and update M0.6 status
This commit is contained in:
cflmy committed 2026-11-20 11:50:27 +08:00
1 parent 54c7b43d15
commit 4ce37afb39
31 files changed
+537 -5

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
# External kernel provider example
`mocklang` is not built into `marqdo-foreign`. The descriptor registers it at
run time without changing interpreter or host source:
```sh
marqdo run examples/kernel-mock/demo.mq.md \
--kernel examples/kernel-mock/kernel.json \
--allow-foreign
```
The `mocklang` executable receives the source file path as argv[1] and the
versioned request envelope on stdin. For `foreign.call` it must print exactly
one typed wire value on stdout. A missing provider or wire version is
`kernel.unavailable`; the `Code` value itself remains inert until the explicit
call.
+11
View File
@@ -0,0 +1,11 @@
## main
### 代码
```mocklang
ignored by the mock provider
```
**结果 = foreign.call(ref("#代码"), {})**
> 打印(结果)
+7
View File
@@ -0,0 +1,7 @@
{
"provider_id": "mocklang",
"languages": ["mocklang", "mock"],
"wire_version": 1,
"entrypoint": "./mocklang",
"permissions_requested": []
}
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh
# Minimal external kernel provider: consume the request envelope, then emit one
# typed wire value. The source file path is argv[1].
cat >/dev/null
printf '%s' '{"type":"int","decimal":"42"}'