refactor: extract neutral host contract and decouple plugin ABI (issue #13)
Implements the core M0-M3 boundary work from issue #13 / ADR-0071 without changing language semantics or any public protocol: - add marqdo-host-contract owning Host/HostOp/ExecutionContext/ResourceRead and the runtime observation facts; the engine depends on it only. - marqdo-runtime no longer links marqdo-host; the native host implements the contract and has no reverse edge to runtime/frontend/IR. - reduce marqdo-plugin-abi to the public C ABI/wire/error contract; move manifest/artifact/loader/worker execution into marqdo-host::plugin so the SDK carries no loader/worker/host dependency. - add a real independent consumer (tests/embedding, own workspace+lock) that runs Markdown -> frontend -> IR -> runtime with bounded budgets and explicit effect refusal, plus differential CLI comparison. - add an SDK-only third-party plugin fixture and real CLI invocation gate. - replace the frozen-crate architecture test with a reviewed responsibility graph enforced from Cargo metadata, with negative unit cases. - consolidate current docs/entry: ADR-0071, CURRENT responsibility map, developers/architecture indexes, historical banners, STATUS and evidence. - record keep-in-workspace for Engine/Native Host; no empty candidate repo. Evidence: docs/evidence/2026-11-26-issue-13-engine-host-boundary.md Refs #13
This commit is contained in:
1 parent
4bbefc9244
commit
9b4f0a0822
89 files changed
+3490
-545
No files matched your search
@@ -13,7 +13,7 @@ marqdo-span = { workspace = true }
|
||||
marqdo-value = { workspace = true }
|
||||
marqdo-ir = { workspace = true }
|
||||
marqdo-expression = { workspace = true }
|
||||
marqdo-host = { workspace = true }
|
||||
marqdo-host-contract = { workspace = true }
|
||||
num-bigint = { workspace = true }
|
||||
num-rational = { workspace = true }
|
||||
num-traits = { workspace = true }
|
||||
@@ -21,6 +21,7 @@ thiserror = { workspace = true }
|
||||
|
||||
|
||||
[dev-dependencies]
|
||||
marqdo-host = { workspace = true }
|
||||
marqdo-frontend = { workspace = true }
|
||||
marqdo-sandbox = { workspace = true }
|
||||
tempfile = { workspace = true }
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use marqdo_host::{HostOp, ResourceRead};
|
||||
use marqdo_host_contract::{HostOp, ResourceRead};
|
||||
use marqdo_ir::builtins::Builtin;
|
||||
use marqdo_ir::Resource;
|
||||
use marqdo_span::Span;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use marqdo_expression::{BinaryOp, Expr, RecordEntry};
|
||||
use marqdo_host::{
|
||||
use marqdo_host_contract::{
|
||||
ExecutionContext, FrameId, Host, HostOp, LoopTransfer, ParameterSource, ResourceRead,
|
||||
RuntimeObservation,
|
||||
};
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
//! The interpreter is Marqdo's own execution engine: expressions, scoping,
|
||||
//! calls, branches, loops and returns are evaluated here, never by translating
|
||||
//! to Python or another language. Every side effect goes through
|
||||
//! [`marqdo_host::Host`]; prose never reaches this layer because it is absent
|
||||
//! [`marqdo_host_contract::Host`]; prose never reaches this layer because it is absent
|
||||
//! from the IR.
|
||||
|
||||
mod builtins_impl;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
//! End-to-end interpreter tests: Markdown source → frontend IR → execution.
|
||||
|
||||
use marqdo_host::{Capabilities, Host, StdHost};
|
||||
use marqdo_host::{Capabilities, StdHost};
|
||||
use marqdo_host_contract::Host;
|
||||
use marqdo_ir::{ModuleId, Program};
|
||||
use marqdo_runtime::{run, run_with_limits, EvaluatedArg, MemoryLimits, RuntimeError, Value};
|
||||
use marqdo_sandbox::SandboxMode;
|
||||
|
||||
@@ -8,9 +8,10 @@ use std::cell::RefCell;
|
||||
use std::rc::Rc;
|
||||
|
||||
use marqdo_host::{
|
||||
Capabilities, ObservationConfig, ObservationError, ObservationEvent, ObservationSink,
|
||||
ParameterSource, StdHost, ValueState,
|
||||
Capabilities, ObservationConfig, ObservationError, ObservationEvent, ObservationSink, StdHost,
|
||||
ValueState,
|
||||
};
|
||||
use marqdo_host_contract::ParameterSource;
|
||||
use marqdo_ir::{ModuleId, Program};
|
||||
use marqdo_runtime::run;
|
||||
use marqdo_sandbox::SandboxMode;
|
||||
|
||||
Reference in new issue
Block a user