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

@ -165,12 +165,26 @@
"ONLY_THEN_ASSIGN_PERMANENT_MODULE_NUMBER"
],
"hot_install_boundary": {
"runtime_state": "SIGNED_DECLARATIVE_PACKAGE_ENGINE_IMPLEMENTED",
"runtime_contract": "contracts/module-package-runtime.json",
"numbered_module_runtime_operations": [
"HLP-NIPC-OP-0063",
"HLP-NIPC-OP-0064",
"HLP-NIPC-OP-0065",
"HLP-NIPC-OP-0066",
"HLP-NIPC-OP-0067",
"HLP-NIPC-OP-0068",
"HLP-NIPC-OP-0069"
],
"source_repository_is_directly_executable": false,
"immutable_signed_artifact_required": true,
"compatibility_manifest_required": true,
"permissions_declared_before_mount": true,
"human_confirmation_required_when_boundary_expands": true,
"rollback_on_self_test_failure": true,
"user_data_survives_unmount": true
"user_data_survives_unmount": true,
"arbitrary_native_code_allowed": false,
"arbitrary_webview_javascript_allowed": false,
"real_signed_acceptance_fixture": "fixtures/module-packages/HLP-MOD-LOCAL-RUNTIME-ACCEPTANCE-0001-0.1.0.ghmod"
}
}

View file

@ -0,0 +1,52 @@
{
"schema": "hololake.module-package-runtime/v1",
"record_id": "HLP-MODULE-PACKAGE-RUNTIME-001",
"protocols": ["GLS-0710", "GLS-0803", "GLS-0819", "GLS-0310"],
"package_schema": "hololake.module-package/v1",
"signature": {
"algorithm": "MINISIGN_ED25519",
"trust_source": "src-tauri/release-trust.json",
"signature_is_detached": true,
"package_bytes_are_signed_exactly": true,
"source_repository_is_executable": false
},
"number_classes": {
"official": "HLP-MOD-OFFICIAL-*",
"private_channel": "HLP-MOD-LOCAL-*",
"candidate_number_is_runtime_number": false
},
"host": {
"version": "0.5.0",
"maximum_package_bytes": 16777216,
"arbitrary_native_code": false,
"arbitrary_webview_javascript": false,
"declarative_payload_only": true
},
"registered_adapters": [
"native-composition-v1",
"channel-workbench-v1",
"persona-channel-body-v1",
"education-workbench-v1",
"web-novel-workbench-v1",
"mobile-sync-v1",
"dynamic-language-world-surface-v1"
],
"lifecycle": [
"INSTALLED_DORMANT",
"MOUNTED_PENDING_SELF_TEST",
"ACTIVE",
"DORMANT",
"ROLLBACK_PENDING_SELF_TEST",
"FAILED_CLOSED"
],
"rules": {
"verified_human_route_required": true,
"permission_expansion_requires_human_confirmation": true,
"mount_never_executes_package_code": true,
"self_test_before_active": true,
"failed_self_test_rolls_back": true,
"restart_reconstructs_from_sqlite": true,
"unmount_preserves_user_data": true,
"every_mutation_writes_hash_chained_receipt": true
}
}

View file

@ -60,7 +60,8 @@
"get_zero_core_numbering_kernel",
"zero_point_verify",
"zero_point_sync",
"zero_point_status"
"zero_point_status",
"get_module_runtime_snapshot"
],
"input_wrapper_aliases": [
"confirm_hololake_update_install",
@ -91,7 +92,13 @@
"inspect_mounted_pncc_repository",
"confirm_pncc_repository_mount",
"query_pncc_receipt_projection",
"zero_point_bind"
"zero_point_bind",
"verify_module_package",
"install_module_package",
"mount_module",
"self_test_module",
"unmount_module",
"rollback_module"
],
"direct_field_aliases": {
"perform_code_repo_login": [
@ -917,6 +924,83 @@
"admission": "PREAUTH_SYSTEM_ROUTE",
"effect": "STATE_CHANGE",
"payload_schema": "hololake.numbered-ipc.payload/zero_point_status/v1"
},
{
"operation_number": "HLP-NIPC-OP-0063",
"alias": "get_module_runtime_snapshot",
"handler": "module_package_runtime::get_module_runtime_snapshot",
"channel_number": "HLP-NIPC-CH-0002",
"module_number": "HLP-NIPC-MOD-0020",
"target_number": "HLP-NIPC-TGT-0020",
"admission": "VERIFIED_HUMAN_ROUTE",
"effect": "READ_OR_STATUS",
"payload_schema": "hololake.numbered-ipc.payload/get_module_runtime_snapshot/v1"
},
{
"operation_number": "HLP-NIPC-OP-0064",
"alias": "verify_module_package",
"handler": "module_package_runtime::verify_module_package",
"channel_number": "HLP-NIPC-CH-0002",
"module_number": "HLP-NIPC-MOD-0020",
"target_number": "HLP-NIPC-TGT-0020",
"admission": "VERIFIED_HUMAN_ROUTE",
"effect": "READ_OR_STATUS",
"payload_schema": "hololake.numbered-ipc.payload/verify_module_package/v1"
},
{
"operation_number": "HLP-NIPC-OP-0065",
"alias": "install_module_package",
"handler": "module_package_runtime::install_module_package",
"channel_number": "HLP-NIPC-CH-0002",
"module_number": "HLP-NIPC-MOD-0020",
"target_number": "HLP-NIPC-TGT-0020",
"admission": "VERIFIED_HUMAN_ROUTE",
"effect": "STATE_CHANGE",
"payload_schema": "hololake.numbered-ipc.payload/install_module_package/v1"
},
{
"operation_number": "HLP-NIPC-OP-0066",
"alias": "mount_module",
"handler": "module_package_runtime::mount_module",
"channel_number": "HLP-NIPC-CH-0002",
"module_number": "HLP-NIPC-MOD-0020",
"target_number": "HLP-NIPC-TGT-0020",
"admission": "VERIFIED_HUMAN_ROUTE",
"effect": "STATE_CHANGE",
"payload_schema": "hololake.numbered-ipc.payload/mount_module/v1"
},
{
"operation_number": "HLP-NIPC-OP-0067",
"alias": "self_test_module",
"handler": "module_package_runtime::self_test_module",
"channel_number": "HLP-NIPC-CH-0002",
"module_number": "HLP-NIPC-MOD-0020",
"target_number": "HLP-NIPC-TGT-0020",
"admission": "VERIFIED_HUMAN_ROUTE",
"effect": "STATE_CHANGE",
"payload_schema": "hololake.numbered-ipc.payload/self_test_module/v1"
},
{
"operation_number": "HLP-NIPC-OP-0068",
"alias": "unmount_module",
"handler": "module_package_runtime::unmount_module",
"channel_number": "HLP-NIPC-CH-0002",
"module_number": "HLP-NIPC-MOD-0020",
"target_number": "HLP-NIPC-TGT-0020",
"admission": "VERIFIED_HUMAN_ROUTE",
"effect": "STATE_CHANGE",
"payload_schema": "hololake.numbered-ipc.payload/unmount_module/v1"
},
{
"operation_number": "HLP-NIPC-OP-0069",
"alias": "rollback_module",
"handler": "module_package_runtime::rollback_module",
"channel_number": "HLP-NIPC-CH-0002",
"module_number": "HLP-NIPC-MOD-0020",
"target_number": "HLP-NIPC-TGT-0020",
"admission": "VERIFIED_HUMAN_ROUTE",
"effect": "STATE_CHANGE",
"payload_schema": "hololake.numbered-ipc.payload/rollback_module/v1"
}
]
}