feat: add signed numbered module lifecycle

This commit is contained in:
冰朔 2026-08-19 01:28:22 +08:00
commit 7673c337fc
18 changed files with 1622 additions and 12 deletions

View file

@ -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(

View file

@ -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

View file

@ -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

View file

@ -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);
}

View file

@ -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?,