feat(PR-01): single Rust package, Tool Protocol v1 bundle and PublicCoreClient
- src/lib.rs module layout + thin main.rs dispatcher; CLI owns browse/export/verify - core_client: MARQDO_BIN only, explicit argv (no shell), 0700 scratch dirs, wall-clock timeout killing the whole process group, version/protocol negotiation - project/source_map: canonical path boundary, SafeRelativePath, exact UTF-8 byte <-> line/column <-> UTF-16 mapping, SHA-256 of exact bytes - stable view.* error codes with 0/1/2 exit classes; BindDenied for non-loopback - verify use case: Analysis v2 schema/profile/root_id/source_digest binding, no execution - tool.json + tools/package.sh + tools/install-smoke.sh; frozen-CLI install smoke PASS - contract tests with a real fake-core executable + architectural coupling gates - COMPATIBILITY/CHANGELOG/STATUS updated
This commit is contained in:
1 parent
ef546f2ca6
commit
8ba20a5c67
23 files changed
+3692
-8
No files matched your search
+30
@@ -0,0 +1,30 @@
|
||||
//! marqdo-view library: a single package with one presentation pipeline.
|
||||
//!
|
||||
//! Layer direction (RFC-VIEW-0001 §6.1):
|
||||
//! `CLI/Server → Application → Domain → ProtocolAdapter`, and
|
||||
//! `Application → Presentation → Renderer → Assets`.
|
||||
//! `main.rs` is only a dispatcher; integration tests and future server code use
|
||||
//! this library so there is never a second renderer or a second parser.
|
||||
|
||||
pub mod app;
|
||||
pub mod cli;
|
||||
pub mod core_client;
|
||||
pub mod error;
|
||||
pub mod project;
|
||||
pub mod source_map;
|
||||
pub mod version;
|
||||
|
||||
pub use cli::Cli;
|
||||
pub use error::{ViewError, ViewResult};
|
||||
|
||||
/// Dispatch a parsed CLI invocation. Returns the process exit code.
|
||||
pub fn run(cli: Cli) -> ViewResult<i32> {
|
||||
let opts = cli.runtime();
|
||||
cli::validate_bind(&opts.host, opts.unsafe_expose)
|
||||
.map_err(|detail| ViewError::BindDenied { detail })?;
|
||||
match cli.command {
|
||||
Some(cli::Command::Verify(args)) => app::verify(&opts, &args),
|
||||
Some(cli::Command::Export(args)) => app::export(&opts, &args),
|
||||
None => app::browse(&opts),
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user