feat(m0.6-r2): explicit foreign kernel provider registry
- add KernelDescriptor/KernelRegistry with built-in Python/Node providers - route run/call through the registry; external providers need an explicit executable and wire version - expose provider registration on StdHost and use it in the foreign adapter - add mocklang registration/call, duplicate-label, wire-version and timeout tests - update spec/foreign.md and M0.6 progress
This commit is contained in:
1 parent
4ecf537141
commit
21c1e50617
8 files changed
+370
-54
No files matched your search
@@ -177,13 +177,13 @@ pub(crate) fn foreign(
|
||||
};
|
||||
match op {
|
||||
HostOp::ForeignRun => {
|
||||
let result =
|
||||
marqdo_foreign::run(&request).map_err(|error| foreign_error(error, span))?;
|
||||
let result = marqdo_foreign::run_with_registry(&request, &host.kernel_registry)
|
||||
.map_err(|error| foreign_error(error, span))?;
|
||||
Ok(foreign_result_map(result))
|
||||
}
|
||||
HostOp::ForeignCall => {
|
||||
let result =
|
||||
marqdo_foreign::call(&request).map_err(|error| foreign_error(error, span))?;
|
||||
let result = marqdo_foreign::call_with_registry(&request, &host.kernel_registry)
|
||||
.map_err(|error| foreign_error(error, span))?;
|
||||
if result.status != marqdo_foreign::RunStatus::Success {
|
||||
return Err(RuntimeError::new(
|
||||
ErrorCategory::ForeignFailure,
|
||||
|
||||
Reference in new issue
Block a user