docs: remove retired protocol names from current guides

This commit is contained in:
cflmy committed 2026-11-24 17:04:27 +08:00
1 parent 3fe1ca3c0c
commit 867cd72ced
5 files changed
+70 -58

No files matched your search

+1 -1
View File
@@ -31,7 +31,7 @@ release policy.
> [release](https://git.cflmy.cn/cflmy/marqdo-cli/releases/tag/v3.0.0-beta.1), > [release](https://git.cflmy.cn/cflmy/marqdo-cli/releases/tag/v3.0.0-beta.1),
> source `2c7c4f31e7a388d3fcfa717a77067e696ed13854`. The public beta target is **Linux x86_64 (glibc)**; macOS and Windows are experimental and not claimed, and the > source `2c7c4f31e7a388d3fcfa717a77067e696ed13854`. The public beta target is **Linux x86_64 (glibc)**; macOS and Windows are experimental and not claimed, and the
> C ABI plugin/provider paths are Linux-only in this beta. The language > C ABI plugin/provider paths are Linux-only in this beta. The language
> (RFC-LANG-0002), lock v4, Analysis v2, Trace v2, Tool v1, Plugin ABI v1 > (RFC-LANG-0002), lock v4, Analysis, Observation, CLI Tool, Plugin ABI v1
> (native + worker), pinned Foreign providers and Resource Provider v2 are > (native + worker), pinned Foreign providers and Resource Provider v2 are
> implemented and covered by tests. **`strict` OS isolation is Linux-only and > implemented and covered by tests. **`strict` OS isolation is Linux-only and
> probe-gated**; unsupported hosts must fail closed, and strict L2 > probe-gated**; unsupported hosts must fail closed, and strict L2
+8 -7
View File
@@ -7,16 +7,17 @@ core checkout, or host memory layout. Adding a new domain function must not
require a core commit. require a core commit.
Product version for these docs: **`3.0.0-rc.2`** (Linux x86_64 candidate). Product version for these docs: **`3.0.0-rc.2`** (Linux x86_64 candidate).
Protocol versions are independent: Analysis v2, Trace v2, Execution Events v1, Current protocol contracts: Analysis, Observation, CLI Tool, Plugin ABI v1,
Tool v1, Plugin ABI v1, Foreign wire v1, Provider manifest v2, lock v4, Foreign wire v1, Provider manifest v2, lock v4 and markdown profile
markdown profile `marqdo.md.v1`. `marqdo.md.v1`. Product, protocol and package versions are independent; see
[compatibility.md](compatibility.md).
## Pick your entry point ## Pick your entry point
| Goal | Use | Deliverable | | Goal | Use | Deliverable |
|---|---|---| |---|---|---|
| AI/math/data/quantum/SKILL libraries, pure algorithms | `.mq.md` package | `index.mq.md`, `marqdo.yaml`, README, tests | | AI/math/data/quantum/SKILL libraries, pure algorithms | `.mq.md` package | `index.mq.md`, `marqdo.yaml`, README, tests |
| Knowledge/Proof/View/IDE/lint/analysis tools | CLI Tool Protocol v1 | standalone executable + `tool.json` + Analysis/Trace consumer | | Knowledge/Proof/View/IDE/lint/analysis tools | CLI Tool protocol | standalone executable + `tool.json` + Analysis/Observation consumer |
| High-performance native callable functions | Callable Plugin ABI v1 | `plugin.yaml`, host-targeted library, SDK/header | | High-performance native callable functions | Callable Plugin ABI v1 | `plugin.yaml`, host-targeted library, SDK/header |
| New foreign language backend (R/Python/Julia/…) | Foreign Kernel | `kernel.json`, executable provider, pinned environment | | New foreign language backend (R/Python/Julia/…) | Foreign Kernel | `kernel.json`, executable provider, pinned environment |
| Hardware/device/external-stream resources | Resource Provider v2 | `provider.json`, C ABI library, worker helper | | Hardware/device/external-stream resources | Resource Provider v2 | `provider.json`, C ABI library, worker helper |
@@ -28,12 +29,12 @@ markdown profile `marqdo.md.v1`.
project. project.
2. [libraries.md](libraries.md) — publish a pure `.mq.md` library and consume 2. [libraries.md](libraries.md) — publish a pure `.mq.md` library and consume
it through a pinned Git dependency. it through a pinned Git dependency.
3. [tools.md](tools.md) — build an external Tool that consumes Analysis v2 and 3. [tools.md](tools.md) — build an external Tool that consumes the current
Trace v2. Analysis and Observation contracts.
4. [extensions.md](extensions.md) — plugins, foreign kernels, resource 4. [extensions.md](extensions.md) — plugins, foreign kernels, resource
providers, extension selection and lock v4. providers, extension selection and lock v4.
5. [analysis-observation.md](analysis-observation.md) — the public static/dynamic data 5. [analysis-observation.md](analysis-observation.md) — the public static/dynamic data
contracts, Execution Events v1 and digest binding. contracts and digest binding.
6. [compatibility.md](compatibility.md) — version axes, platform matrix and the 6. [compatibility.md](compatibility.md) — version axes, platform matrix and the
prerelease policy. prerelease policy.
7. [release-limits.md](release-limits.md) — the honest beta limitations (this 7. [release-limits.md](release-limits.md) — the honest beta limitations (this
+4 -4
View File
@@ -57,10 +57,10 @@ Even when available:
## Compatibility and versioning ## Compatibility and versioning
* `3.0.0-rc.2` is a **prerelease**. The changelog lists changes from the beta. * `3.0.0-rc.3` is a **prerelease**. The changelog lists changes from the beta.
* The product version is independent of protocol versions: Analysis v2, Trace * The product version is independent of protocol versions: Analysis,
v2, Execution Events v1, Tool v1, Plugin ABI v1, Foreign wire v1, Provider Observation, CLI Tool, Plugin ABI v1, Foreign wire v1, Provider manifest v2
manifest v2 and lock v4 keep their own major numbers. and lock v4 keep their own identifiers.
* The official bundled stdlib keeps its independent package version `0.1.0`. * The official bundled stdlib keeps its independent package version `0.1.0`.
A plugin `.mq.md` package version such as `0.1.0` is also independent. A plugin `.mq.md` package version such as `0.1.0` is also independent.
* `project.marqdo` in `marqdo.yaml` is enforced in this release. SemVer * `project.marqdo` in `marqdo.yaml` is enforced in this release. SemVer
+55 -44
View File
@@ -1,12 +1,12 @@
# External tools: CLI Tool Protocol v1 # External tools: current CLI Tool protocol
The core does not contain `view`, `knowledge`, `prove`, `lint` or any other The core does not contain `view`, `knowledge`, `prove`, `lint` or any other
product command. A tool is a **separate executable** registered by the user; the product command. A tool is a **separate executable** registered by the user; the
CLI only dispatches unknown top-level commands to registered tools and never CLI only dispatches unknown top-level commands to registered tools and never
scans `PATH` for a guessed name. scans `PATH` for a guessed name.
Normative contract: [`../../spec/cli-tool.md`](../../spec/cli-tool.md) Normative contract: [`../../spec/cli-tool.md`](../../spec/cli-tool.md) and
(implemented and frozen for protocol v1). [`../../spec/schemas/cli-tool.schema.json`](../../spec/schemas/cli-tool.schema.json).
## 1. Package layout ## 1. Package layout
@@ -20,7 +20,7 @@ marqdo-view/
examples/ examples/
``` ```
`tool.json` for the `3.0.0-rc.2` candidate: `tool.json` for the `3.0.0-rc.3` candidate:
```json ```json
{ {
@@ -30,22 +30,19 @@ marqdo-view/
"version": "0.1.0", "version": "0.1.0",
"command": "view", "command": "view",
"entrypoint": "bin/marqdo-view", "entrypoint": "bin/marqdo-view",
"compatibility": { "requires": {"api_revision": 1, "analysis": 3, "observation": 1}
"marqdo": ">=3.0.0-beta.1,<4.0.0",
"analysis": [2],
"trace": [2]
}
} }
``` ```
- `version` is the **tool's** SemVer. - `version` is the **tool's** SemVer. It identifies the artifact; it does not
- `compatibility.marqdo` is the **core product** range. A stable-only promise compatibility with retired core protocols.
`>=3.0.0,<4.0.0` does not match a beta core; opt in explicitly. The CLI - `requires.api_revision` is required and must equal the current core revision.
rejects a mismatched range at install and dispatch time with a - `requires.analysis` and `requires.observation` are optional. Declare one only
`requires marqdo …` diagnostic. when the tool consumes that contract, and declare it as a **single exact
- `analysis`/`trace` are declared only if the tool consumes them; the current integer**; arrays, ranges and "highest shared version" negotiation do not
development branch provides Analysis v2/v3 and Trace v2. Declare exist.
`analysis: [2, 3]` when the reader handles both versions. - A mismatched requirement fails install and dispatch with
`tool.protocol_incompatible`; there is no negotiation and no fallback.
- `command` must match `^[a-z][a-z0-9-]*$` and must not collide with a built-in - `command` must match `^[a-z][a-z0-9-]*$` and must not collide with a built-in
command (`init`, `run`, `call`, `check`, `inspect`, `fmt`, `plugin`, `add`, command (`init`, `run`, `call`, `check`, `inspect`, `fmt`, `plugin`, `add`,
`remove`, `lock`, `sync`, `tool`, `help`). `remove`, `lock`, `sync`, `tool`, `help`).
@@ -72,11 +69,13 @@ The tool receives:
| Variable | Meaning | | Variable | Meaning |
|---|---| |---|---|
| `MARQDO_BIN` | absolute path of the running `marqdo` executable | | `MARQDO_BIN` | absolute path of the running `marqdo` executable |
| `MARQDO_TOOL_PROTOCOL` | `1` | | `MARQDO_API_REVISION` | the single current tool API revision (`1`) |
| `MARQDO_PROTOCOL_ANALYSIS` | Highest shared Analysis version. Read the artifact envelope for its actual version. |
| `MARQDO_PROTOCOL_TRACE` | `2` when Trace v2 was negotiated |
Call `$MARQDO_BIN` with an argv array; do not assume `marqdo` is on `PATH`. Call `$MARQDO_BIN` with an argv array; do not assume `marqdo` is on `PATH`.
The retired `MARQDO_TOOL_PROTOCOL`, `MARQDO_PROTOCOL_ANALYSIS` and
`MARQDO_PROTOCOL_TRACE` variables are not exported: version selection is not
negotiated. A registration written by a retired manifest/record format is
rejected with a "remove and reinstall" diagnostic and is never rewritten.
## 3. Consume the public protocols ## 3. Consume the public protocols
@@ -86,28 +85,37 @@ Static input (View/Knowledge/Proof):
"$MARQDO_BIN" check index.mq.md --refs --emit ./analysis.json "$MARQDO_BIN" check index.mq.md --refs --emit ./analysis.json
``` ```
Dynamic input: Dynamic input uses the single Observation contract. The same run can deliver
the event stream on stdout and an atomic JSON snapshot in one invocation:
```bash ```bash
"$MARQDO_BIN" run index.mq.md --trace-file ./trace.json # live JSONL events
"$MARQDO_BIN" run index.mq.md --output jsonl
"$MARQDO_BIN" call index.mq.md main --arg n=5 --output jsonl
# one JSON snapshot, from the same execution
"$MARQDO_BIN" run index.mq.md --output json --observation-file ./observation.json
# both destinations, still one execution
"$MARQDO_BIN" call index.mq.md main --arg n=5 --output jsonl \
--observation-file ./observation.json
``` ```
Live dynamic input (Execution Events v1): Consume the stdout line stream as NDJSON; do not pass another `--output` in the
same invocation. Every event carries `schema: "marqdo.observation"` and
`schema_version: 1`; read `stream.opened` for the capture policy and reject any
other format identifier. The JSON snapshot wraps the same events, so a consumer
must not treat it as a second protocol or renumber them. A tool server may
convert the stream to its own SSE/websocket transport; the CLI never implements
HTTP/SSE. Live and file destinations are rejected under `--mode strict` in the
current tree; the tool must surface that refusal instead of pretending
real-time support. The retired `--json`, `--trace-file` and `--event-stream`
options are rejected, not aliased.
```bash See [analysis-observation.md](analysis-observation.md) for fields and digest rules. A
"$MARQDO_BIN" run index.mq.md --event-stream jsonl consumer must verify the exact Analysis bytes (SHA-256) and each module source
"$MARQDO_BIN" call index.mq.md main --arg n=5 --event-stream jsonl digest before attributing a span. Do not depend on `inspect --ir`: that JSON is
``` not a frozen cross-repository protocol.
Consume the stdout line stream as NDJSON; do not pass `--json` in the same
invocation. Negotiate by reading `stream.opened` (`marqdo.execution-events`,
`schema_version: 1`) and reject unknown majors. A tool server may convert the
stream to its own SSE/websocket transport; the CLI never implements HTTP/SSE.
This option is unavailable under `--mode strict` in the current tree and the
tool must surface that refusal instead of pretending real-time support.
See [analysis-observation.md](analysis-observation.md) for fields and digest rules. Do not
depend on `inspect --ir`: that JSON is not a frozen cross-repository protocol.
The `view` tool renders the **original Markdown**, not the Analysis JSON; the The `view` tool renders the **original Markdown**, not the Analysis JSON; the
Analysis is an index, not a replacement for the source text. Analysis is an index, not a replacement for the source text.
@@ -122,13 +130,16 @@ Checksums verify bundle integrity only; they are not publisher authentication.
- Test against a **frozen** `marqdo` binary: hash it before/after the suite and - Test against a **frozen** `marqdo` binary: hash it before/after the suite and
fail if it changes. fail if it changes.
- Cover the negative paths: unknown schema major, incompatible `marqdo` range, - Cover the negative paths: unknown schema/schema_version, incompatible
reserved command, traversal/symlink entrypoint, tampered bundle file, missing `api_revision`/`analysis`/`observation` requirement, array requirements,
entrypoint, tool crash/exit-status propagation. retired record format, reserved command, traversal/symlink entrypoint,
- Match a real Analysis v2/Trace v2 schema (`spec/schemas/`) and check tampered bundle file, missing entrypoint, tool crash/exit-status propagation.
`source.analysis_digest`. - Validate against the current Analysis and Observation schemas
- Include README, minimal example, supported CLI product range, protocol (`spec/schemas/`) and check `source.analysis_digest` plus the module source
versions, platform matrix, reproducible artifact hashes and limitations. digest before using event spans.
- Include README, minimal example, supported CLI product range, the exact
protocol requirements, platform matrix, reproducible artifact hashes and
limitations.
- The archive ships `examples/tool-samples/{sample-view,sample-knowledge,sample-proof}` - The archive ships `examples/tool-samples/{sample-view,sample-knowledge,sample-proof}`
as independent source examples and `examples/tool-unknown-name/` as a as independent source examples and `examples/tool-unknown-name/` as a
runnable dispatch fixture. runnable dispatch fixture.
+2 -2
View File
@@ -57,7 +57,7 @@ requires re-running every gate. On that SHA:
environment and limits; the 9 correctness workloads must still pass. Never environment and limits; the 9 correctness workloads must still pass. Never
report TCG/QEMU or development-container timings as G4. report TCG/QEMU or development-container timings as G4.
8. `README`, `CHANGELOG`, `COMPATIBILITY`, `docs/STATUS`, this file, 8. `README`, `CHANGELOG`, `COMPATIBILITY`, `docs/STATUS`, this file,
`spec/tool-v1.md`, `spec/plugin-abi.md` and the developer docs are on the `spec/cli-tool.md`, `spec/plugin-abi.md` and the developer docs are on the
same fact baseline. No "implemented but says Proposed", no "released but same fact baseline. No "implemented but says Proposed", no "released but
says DO NOT RELEASE", no product/protocol/package version confusion. says DO NOT RELEASE", no product/protocol/package version confusion.
9. Every shipped binary was actually built and smoke-tested on its claimed 9. Every shipped binary was actually built and smoke-tested on its claimed
@@ -150,7 +150,7 @@ python3 tools/release/smoke.py \
It verifies the `.sha256`, `RELEASE_INFO.json`/`SOURCE_SHA`, both stdlib It verifies the `.sha256`, `RELEASE_INFO.json`/`SOURCE_SHA`, both stdlib
digests against `stdlib/stdlib.json` and the staged tree, offline digests against `stdlib/stdlib.json` and the staged tree, offline
`--version`/`--help`, `check`/`run`/`call`, lock/sync, Analysis v2/v3 and Trace v2 `--version`/`--help`, `check`/`run`/`call`, lock/sync, Analysis and Observation
consumers, Tool install/dispatch, native + worker plugin transports, a foreign consumers, Tool install/dispatch, native + worker plugin transports, a foreign
kernel, Resource Provider v2 through the shipped worker (positive, kernel, Resource Provider v2 through the shipped worker (positive,
unauthorized and missing-helper fail-closed), the pure math package and optional unauthorized and missing-helper fail-closed), the pure math package and optional