feat: add signed numbered module lifecycle
This commit is contained in:
parent
d30d84631d
commit
7673c337fc
18 changed files with 1622 additions and 12 deletions
|
|
@ -33,10 +33,10 @@ url = "2"
|
|||
reqwest = { version = "0.13.2", default-features = false, features = ["cookies", "form", "json", "rustls", "stream"] }
|
||||
tokio = { version = "1", features = ["time"] }
|
||||
futures-util = "0.3"
|
||||
minisign-verify = "0.2.5"
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
widestring = "1"
|
||||
|
||||
[dev-dependencies]
|
||||
minisign-verify = "0.2.5"
|
||||
tempfile = "3"
|
||||
|
|
|
|||
|
|
@ -230,7 +230,7 @@ enum BrokerRequest {
|
|||
OpenSession(OpenSessionInput),
|
||||
ResumeSession(ResumeSessionInput),
|
||||
HeartbeatSession(AuthenticateSessionInput),
|
||||
PresentPersonaCarrierLicense(AuthenticatedPersonaCarrierLicenseInput),
|
||||
PresentPersonaCarrierLicense(Box<AuthenticatedPersonaCarrierLicenseInput>),
|
||||
GetPersonaCarrierLicenseStatus(AuthenticatedPersonaCarrierLicenseStatusInput),
|
||||
GetWorkEnvironment(AuthenticatedWorkEnvironmentInput),
|
||||
AppendEvent(AppendSessionEventInput),
|
||||
|
|
@ -737,7 +737,7 @@ fn connect_endpoint(path: &Path) -> std::io::Result<LocalSocketStream> {
|
|||
#[cfg(unix)]
|
||||
{
|
||||
let name = path.to_fs_name::<GenericFilePath>()?;
|
||||
return LocalSocketStream::connect(name);
|
||||
LocalSocketStream::connect(name)
|
||||
}
|
||||
#[cfg(windows)]
|
||||
{
|
||||
|
|
@ -1055,6 +1055,7 @@ fn dispatch(roots: &BrokerStorageRoots, bytes: &[u8]) -> BrokerResponse {
|
|||
BrokerRequest::ResumeSession(input) => resume_at(session_root, input)
|
||||
.and_then(|receipt| serde_json::to_value(receipt).map_err(|error| error.to_string())),
|
||||
BrokerRequest::PresentPersonaCarrierLicense(input) => {
|
||||
let input = *input;
|
||||
authenticate_context_at(session_root, &input.session)
|
||||
.and_then(|context| {
|
||||
present_persona_license_at(
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ mod home_status;
|
|||
mod knowledge_base;
|
||||
mod local_development_bridge;
|
||||
mod metacognitive_zero_layer;
|
||||
mod module_package_runtime;
|
||||
mod number_coordinate_tree;
|
||||
mod numbered_ipc;
|
||||
mod numbered_ipc_dispatch;
|
||||
|
|
@ -49,6 +50,7 @@ pub fn run() {
|
|||
gls_protocol_kernel::start_on_application_open(app.handle())?;
|
||||
metacognitive_zero_layer::start_on_application_open()?;
|
||||
persona_carrier_license::start_on_application_open()?;
|
||||
module_package_runtime::start_on_application_open(app.handle())?;
|
||||
number_coordinate_tree::start_on_application_open()?;
|
||||
numbered_language_input::validate_contract()?;
|
||||
numbered_ipc::start_on_application_open(app.handle())?;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -53,7 +53,7 @@ fn validate_tree() -> Result<(), String> {
|
|||
|| tree.record_id != "HLP-UNIFIED-NUMBER-TREE-001"
|
||||
|| tree.state != "MACHINE_COMPILED_STARTUP_ENFORCED"
|
||||
|| tree.root_number != "HLP-NUMBER-WORLD-ROOT-001"
|
||||
|| tree.route_count != 84
|
||||
|| tree.route_count != 91
|
||||
|| tree.routes.len() != tree.route_count
|
||||
|| !tree.invariants.number_is_stable_coordinate_not_authority
|
||||
|| !tree.invariants.path_is_unique_navigation
|
||||
|
|
|
|||
|
|
@ -934,7 +934,7 @@ mod tests {
|
|||
#[test]
|
||||
fn registry_is_closed_and_contains_every_migrated_command() {
|
||||
let registry = load_registry().unwrap();
|
||||
assert_eq!(registry.operations.len(), 62);
|
||||
assert_eq!(registry.operations.len(), 69);
|
||||
assert!(!registry.runtime.legacy_direct_commands_allowed);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -99,6 +99,27 @@ pub(crate) async fn dispatch(
|
|||
)
|
||||
.await?,
|
||||
),
|
||||
"module_package_runtime::get_module_runtime_snapshot" => {
|
||||
json(crate::module_package_runtime::get_module_runtime_snapshot(app).await?)
|
||||
}
|
||||
"module_package_runtime::verify_module_package" => {
|
||||
json(crate::module_package_runtime::verify_module_package(app, input(&payload)?).await?)
|
||||
}
|
||||
"module_package_runtime::install_module_package" => json(
|
||||
crate::module_package_runtime::install_module_package(app, input(&payload)?).await?,
|
||||
),
|
||||
"module_package_runtime::mount_module" => {
|
||||
json(crate::module_package_runtime::mount_module(app, input(&payload)?).await?)
|
||||
}
|
||||
"module_package_runtime::self_test_module" => {
|
||||
json(crate::module_package_runtime::self_test_module(app, input(&payload)?).await?)
|
||||
}
|
||||
"module_package_runtime::unmount_module" => {
|
||||
json(crate::module_package_runtime::unmount_module(app, input(&payload)?).await?)
|
||||
}
|
||||
"module_package_runtime::rollback_module" => {
|
||||
json(crate::module_package_runtime::rollback_module(app, input(&payload)?).await?)
|
||||
}
|
||||
"local_development_bridge::acquire_development_write_lane" => json(
|
||||
crate::local_development_bridge::acquire_development_write_lane(app, input(&payload)?)
|
||||
.await?,
|
||||
|
|
|
|||
Loading…
Reference in a new issue