refactor(cli,host): split command entry points and provider/effects modules
This commit is contained in:
1 parent
791819a725
commit
550e66b1e2
10 files changed
+708
-671
No files matched your search
@@ -1,7 +1,7 @@
|
||||
# Evidence: CLI/Host responsibility split
|
||||
|
||||
Date: 2026-11-21 (Asia/Shanghai)
|
||||
Source baseline: `3ef18fb496096d97e3c48ff661f0b2ad00cdcdc3`
|
||||
Source baseline: `791819a72576f54e406e7dfbbe6ac635f9b1edd2`
|
||||
Repository: `marqdo-cli`
|
||||
RFC item: P1 module boundaries
|
||||
|
||||
@@ -9,14 +9,19 @@ RFC item: P1 module boundaries
|
||||
|
||||
| New module | Responsibility |
|
||||
|---|---|
|
||||
| `crates/cli/src/commands/sandbox.rs` | `SandboxSettings`, mode parsing, strict preflight and CLI-to-`Capabilities` mapping; `commands.rs` re-exports it |
|
||||
| `crates/cli/src/commands/sandbox.rs` | `SandboxSettings`, mode parsing, strict preflight and CLI-to-`Capabilities` mapping |
|
||||
| `crates/cli/src/commands/run.rs` | `execute` run-session assembly and `read_stdin` |
|
||||
| `crates/cli/src/commands/check.rs` | `check` command |
|
||||
| `crates/cli/src/commands/inspect.rs` | `inspect` command and `InspectFlags` |
|
||||
| `crates/marqdo-host/src/host/resource_ops.rs` | `open_resource_stream` stdio/file/tcp/provider dispatch; child module of `host` |
|
||||
| `crates/marqdo-host/src/host/providers.rs` | trusted in-process/worker/C-ABI/package provider registration |
|
||||
| `crates/marqdo-host/src/host/effects.rs` | `next_seq` and `record_resource_effect` trace helpers |
|
||||
| `crates/marqdo-host/src/process.rs` | explicitly granted `process.run` execution, timeout and output caps |
|
||||
|
||||
This is a **behavior-preserving** refactor: no public CLI flag, host trait
|
||||
method, builtin, spec or stdlib API changed. No new crate was added. Provider
|
||||
registration and `commands.rs` run/check/inspect still live in their original
|
||||
files.
|
||||
method, builtin, spec or stdlib API changed. No new crate was added.
|
||||
`commands.rs` still owns init/fmt/lock/sync/package/tool and `host.rs` still
|
||||
owns `Host::invoke` dispatch and capability checks.
|
||||
|
||||
## Commands
|
||||
|
||||
@@ -31,7 +36,7 @@ python3 tools/pack-stdlib.py PASS
|
||||
|
||||
## Not covered
|
||||
|
||||
`commands.rs` still contains run/check/inspect/package/tool command bodies
|
||||
and `host.rs` still contains provider registration and capability dispatch.
|
||||
A complete split needs a later behavior-preserving change; it is not claimed
|
||||
here.
|
||||
`commands.rs` still contains init/fmt/lock/sync/package/tool command bodies
|
||||
and `host.rs` still contains `Host::invoke` dispatch, capability checks and
|
||||
register entry points. A complete split needs a later behavior-preserving
|
||||
change; it is not claimed here.
|
||||
Reference in new issue
Block a user