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" "ONLY_THEN_ASSIGN_PERMANENT_MODULE_NUMBER"
], ],
"hot_install_boundary": { "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, "source_repository_is_directly_executable": false,
"immutable_signed_artifact_required": true, "immutable_signed_artifact_required": true,
"compatibility_manifest_required": true, "compatibility_manifest_required": true,
"permissions_declared_before_mount": true, "permissions_declared_before_mount": true,
"human_confirmation_required_when_boundary_expands": true, "human_confirmation_required_when_boundary_expands": true,
"rollback_on_self_test_failure": 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", "get_zero_core_numbering_kernel",
"zero_point_verify", "zero_point_verify",
"zero_point_sync", "zero_point_sync",
"zero_point_status" "zero_point_status",
"get_module_runtime_snapshot"
], ],
"input_wrapper_aliases": [ "input_wrapper_aliases": [
"confirm_hololake_update_install", "confirm_hololake_update_install",
@ -91,7 +92,13 @@
"inspect_mounted_pncc_repository", "inspect_mounted_pncc_repository",
"confirm_pncc_repository_mount", "confirm_pncc_repository_mount",
"query_pncc_receipt_projection", "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": { "direct_field_aliases": {
"perform_code_repo_login": [ "perform_code_repo_login": [
@ -917,6 +924,83 @@
"admission": "PREAUTH_SYSTEM_ROUTE", "admission": "PREAUTH_SYSTEM_ROUTE",
"effect": "STATE_CHANGE", "effect": "STATE_CHANGE",
"payload_schema": "hololake.numbered-ipc.payload/zero_point_status/v1" "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"
} }
] ]
} }

View file

@ -100,6 +100,8 @@ HoloLake 0.5.0 is the clean numbered-root base. The compiled 0.4.1 desktop appli
Each donor capability receives a candidate coordinate, but no permanent runtime module number, until one isolated admission cycle has reviewed provenance and permissions, allocated numbered IPC module/target/operation coordinates, implemented an adapter without raw Tauri invoke, passed negative-route and data tests, and produced installed mount, restart, unmount and rollback receipts. The admission order and candidate inventory are recorded in `contracts/module-donor-admission-registry.json`. Each donor capability receives a candidate coordinate, but no permanent runtime module number, until one isolated admission cycle has reviewed provenance and permissions, allocated numbered IPC module/target/operation coordinates, implemented an adapter without raw Tauri invoke, passed negative-route and data tests, and produced installed mount, restart, unmount and rollback receipts. The admission order and candidate inventory are recorded in `contracts/module-donor-admission-registry.json`.
The module-package runtime is now the shared admission executor. It accepts an exact detached-minisign `.ghmod` artifact, validates the package and its compatibility/permission manifest, stores it inside the authenticated account, and advances only through numbered install, mount, self-test, unmount and rollback operations. Lifecycle state and receipts are durable SQLite records; unmount never removes user data. A package is declarative and selects a host-registered adapter: repositories, native binaries and arbitrary webview JavaScript are not executable module inputs. Public lighthouse numbers remain unavailable until a candidate completes its own installed acceptance; private channel packages use a separate local number class.
## Stage-one convergence verdict ## Stage-one convergence verdict
The Tauri source in this directory is the only future HoloLake desktop mainline. An installed build of it is an acceptance candidate, not a separate product line and not proof that stage one exists. The Electron 0.8.0 product and the legacy Tauri/platform sources remain read-only UX, behavior, engineering and protected-data donors until inventory, backup, readback, reversible migration rehearsal and signed installed-runtime acceptance all pass. The Tauri source in this directory is the only future HoloLake desktop mainline. An installed build of it is an acceptance candidate, not a separate product line and not proof that stage one exists. The Electron 0.8.0 product and the legacy Tauri/platform sources remain read-only UX, behavior, engineering and protected-data donors until inventory, backup, readback, reversible migration rehearsal and signed installed-runtime acceptance all pass.

View file

@ -0,0 +1,36 @@
{
"schema": "hololake.module-package/v1",
"manifest": {
"moduleNumber": "HLP-MOD-LOCAL-RUNTIME-ACCEPTANCE-0001",
"registrationClass": "PRIVATE_CHANNEL_LOCAL",
"displayName": "原生组合模块运行时验收包",
"version": "0.1.0",
"minimumHostVersion": "0.5.0",
"adapter": "native-composition-v1",
"contentDigest": "07bfafaaa0b06f160abc489edce2bc23a3b092520c8d6c6f4a5ce29cca4485ea",
"permissions": [
"KNOWLEDGE_READ",
"PROJECTION_RENDER"
],
"userDataSchema": "hololake.module-data/native-composition/v1",
"selfTest": {
"kind": "DECLARATIVE_SCHEMA_V1",
"expectedContentDigest": "07bfafaaa0b06f160abc489edce2bc23a3b092520c8d6c6f4a5ce29cca4485ea"
}
},
"payload": {
"adapterContract": "hololake.native-composition-v1",
"capabilities": [
"READ_CURRENT_ACCOUNT_KNOWLEDGE",
"PROJECT_SHARED_EXECUTION_RESULT"
],
"entry": "native-composition",
"views": [
"DASHBOARD",
"COMPARISON",
"VERTICAL_BAR",
"CLASSIFICATION",
"TABLE"
]
}
}

View file

@ -0,0 +1 @@
dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVReHJHQ2hTVDYvRThwcUdLRThMYkJLN29MM1NmVFVCcmh4dGdrbHdPVWlvdm45enpveUhBeFZ3VEM1TkNHRDBKdGFoN21OZHgzV0NSMFVvMk1TNW44Z3BtRS9GcmN5SHdvPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzg3MDczNTkxCWZpbGU6SExQLU1PRC1MT0NBTC1SVU5USU1FLUFDQ0VQVEFOQ0UtMDAwMS0wLjEuMC5naG1vZApXRWZINVdEUG12SlNsdzRTMkFHRDV3V0NkSVhNYW92RmczRGZlU3M0ZU9nSnhjc1BWbU1ZS0x1cStoQXE5TE96cnV1S2FaQ1FnK0FGdFNEY1RvUGZBQT09Cg==

View file

@ -54,7 +54,7 @@
}, },
{ {
"recordId": "HLP-NUMBERED-IPC-ROOT-001", "recordId": "HLP-NUMBERED-IPC-ROOT-001",
"sha256": "f8373820f373ffb59df08952acc753d48c2e3a8a0d0df5dab486bd43d3e9ab70" "sha256": "09f5ed0933850d06df508387500ff8aa7d33c864b473647b675a2d5e405b68dc"
}, },
{ {
"recordId": "HLP-NBROKER-ROOT-001", "recordId": "HLP-NBROKER-ROOT-001",
@ -69,7 +69,7 @@
"everyAcceptedCallHasEvidenceClass": true, "everyAcceptedCallHasEvidenceClass": true,
"mismatchedCoordinate": "FAIL_CLOSED" "mismatchedCoordinate": "FAIL_CLOSED"
}, },
"routeCount": 84, "routeCount": 91,
"routes": [ "routes": [
{ {
"transport": "DIRECT_LOCAL_NUMBERED_BROKER", "transport": "DIRECT_LOCAL_NUMBERED_BROKER",
@ -855,6 +855,104 @@
"evidence": "HASH_CHAINED_NUMBERED_IPC_RECEIPT", "evidence": "HASH_CHAINED_NUMBERED_IPC_RECEIPT",
"path": "HLP-NUMBER-WORLD-ROOT-001/TAURI/HLP-NIPC-CH-0002/HLP-NIPC-MOD-0011/HLP-NIPC-OP-0042/HLP-NIPC-TGT-0011" "path": "HLP-NUMBER-WORLD-ROOT-001/TAURI/HLP-NIPC-CH-0002/HLP-NIPC-MOD-0011/HLP-NIPC-OP-0042/HLP-NIPC-TGT-0011"
}, },
{
"transport": "TAURI_WEBVIEW_NUMBERED_IPC",
"protocolVersion": "HLP-NIPC-v1",
"callerNumber": "HLP-NIPC-CALLER-MAIN-WEBVIEW-0001",
"channelNumber": "HLP-NIPC-CH-0002",
"moduleNumber": "HLP-NIPC-MOD-0020",
"operationNumber": "HLP-NIPC-OP-0063",
"targetNumber": "HLP-NIPC-TGT-0020",
"alias": "get_module_runtime_snapshot",
"admission": "VERIFIED_HUMAN_ROUTE",
"effect": "READ_OR_STATUS",
"evidence": "HASH_CHAINED_NUMBERED_IPC_RECEIPT",
"path": "HLP-NUMBER-WORLD-ROOT-001/TAURI/HLP-NIPC-CH-0002/HLP-NIPC-MOD-0020/HLP-NIPC-OP-0063/HLP-NIPC-TGT-0020"
},
{
"transport": "TAURI_WEBVIEW_NUMBERED_IPC",
"protocolVersion": "HLP-NIPC-v1",
"callerNumber": "HLP-NIPC-CALLER-MAIN-WEBVIEW-0001",
"channelNumber": "HLP-NIPC-CH-0002",
"moduleNumber": "HLP-NIPC-MOD-0020",
"operationNumber": "HLP-NIPC-OP-0064",
"targetNumber": "HLP-NIPC-TGT-0020",
"alias": "verify_module_package",
"admission": "VERIFIED_HUMAN_ROUTE",
"effect": "READ_OR_STATUS",
"evidence": "HASH_CHAINED_NUMBERED_IPC_RECEIPT",
"path": "HLP-NUMBER-WORLD-ROOT-001/TAURI/HLP-NIPC-CH-0002/HLP-NIPC-MOD-0020/HLP-NIPC-OP-0064/HLP-NIPC-TGT-0020"
},
{
"transport": "TAURI_WEBVIEW_NUMBERED_IPC",
"protocolVersion": "HLP-NIPC-v1",
"callerNumber": "HLP-NIPC-CALLER-MAIN-WEBVIEW-0001",
"channelNumber": "HLP-NIPC-CH-0002",
"moduleNumber": "HLP-NIPC-MOD-0020",
"operationNumber": "HLP-NIPC-OP-0065",
"targetNumber": "HLP-NIPC-TGT-0020",
"alias": "install_module_package",
"admission": "VERIFIED_HUMAN_ROUTE",
"effect": "STATE_CHANGE",
"evidence": "HASH_CHAINED_NUMBERED_IPC_RECEIPT",
"path": "HLP-NUMBER-WORLD-ROOT-001/TAURI/HLP-NIPC-CH-0002/HLP-NIPC-MOD-0020/HLP-NIPC-OP-0065/HLP-NIPC-TGT-0020"
},
{
"transport": "TAURI_WEBVIEW_NUMBERED_IPC",
"protocolVersion": "HLP-NIPC-v1",
"callerNumber": "HLP-NIPC-CALLER-MAIN-WEBVIEW-0001",
"channelNumber": "HLP-NIPC-CH-0002",
"moduleNumber": "HLP-NIPC-MOD-0020",
"operationNumber": "HLP-NIPC-OP-0066",
"targetNumber": "HLP-NIPC-TGT-0020",
"alias": "mount_module",
"admission": "VERIFIED_HUMAN_ROUTE",
"effect": "STATE_CHANGE",
"evidence": "HASH_CHAINED_NUMBERED_IPC_RECEIPT",
"path": "HLP-NUMBER-WORLD-ROOT-001/TAURI/HLP-NIPC-CH-0002/HLP-NIPC-MOD-0020/HLP-NIPC-OP-0066/HLP-NIPC-TGT-0020"
},
{
"transport": "TAURI_WEBVIEW_NUMBERED_IPC",
"protocolVersion": "HLP-NIPC-v1",
"callerNumber": "HLP-NIPC-CALLER-MAIN-WEBVIEW-0001",
"channelNumber": "HLP-NIPC-CH-0002",
"moduleNumber": "HLP-NIPC-MOD-0020",
"operationNumber": "HLP-NIPC-OP-0067",
"targetNumber": "HLP-NIPC-TGT-0020",
"alias": "self_test_module",
"admission": "VERIFIED_HUMAN_ROUTE",
"effect": "STATE_CHANGE",
"evidence": "HASH_CHAINED_NUMBERED_IPC_RECEIPT",
"path": "HLP-NUMBER-WORLD-ROOT-001/TAURI/HLP-NIPC-CH-0002/HLP-NIPC-MOD-0020/HLP-NIPC-OP-0067/HLP-NIPC-TGT-0020"
},
{
"transport": "TAURI_WEBVIEW_NUMBERED_IPC",
"protocolVersion": "HLP-NIPC-v1",
"callerNumber": "HLP-NIPC-CALLER-MAIN-WEBVIEW-0001",
"channelNumber": "HLP-NIPC-CH-0002",
"moduleNumber": "HLP-NIPC-MOD-0020",
"operationNumber": "HLP-NIPC-OP-0068",
"targetNumber": "HLP-NIPC-TGT-0020",
"alias": "unmount_module",
"admission": "VERIFIED_HUMAN_ROUTE",
"effect": "STATE_CHANGE",
"evidence": "HASH_CHAINED_NUMBERED_IPC_RECEIPT",
"path": "HLP-NUMBER-WORLD-ROOT-001/TAURI/HLP-NIPC-CH-0002/HLP-NIPC-MOD-0020/HLP-NIPC-OP-0068/HLP-NIPC-TGT-0020"
},
{
"transport": "TAURI_WEBVIEW_NUMBERED_IPC",
"protocolVersion": "HLP-NIPC-v1",
"callerNumber": "HLP-NIPC-CALLER-MAIN-WEBVIEW-0001",
"channelNumber": "HLP-NIPC-CH-0002",
"moduleNumber": "HLP-NIPC-MOD-0020",
"operationNumber": "HLP-NIPC-OP-0069",
"targetNumber": "HLP-NIPC-TGT-0020",
"alias": "rollback_module",
"admission": "VERIFIED_HUMAN_ROUTE",
"effect": "STATE_CHANGE",
"evidence": "HASH_CHAINED_NUMBERED_IPC_RECEIPT",
"path": "HLP-NUMBER-WORLD-ROOT-001/TAURI/HLP-NIPC-CH-0002/HLP-NIPC-MOD-0020/HLP-NIPC-OP-0069/HLP-NIPC-TGT-0020"
},
{ {
"transport": "TAURI_WEBVIEW_NUMBERED_IPC", "transport": "TAURI_WEBVIEW_NUMBERED_IPC",
"protocolVersion": "HLP-NIPC-v1", "protocolVersion": "HLP-NIPC-v1",

View file

@ -31,9 +31,13 @@ test('legacy numbering donor is rejected and the numbered IPC root remains singu
}) })
test('hot installation is artifact, permission, self-test and rollback backed', () => { test('hot installation is artifact, permission, self-test and rollback backed', () => {
assert.equal(catalog.hot_install_boundary.runtime_state, 'SIGNED_DECLARATIVE_PACKAGE_ENGINE_IMPLEMENTED')
assert.equal(catalog.hot_install_boundary.numbered_module_runtime_operations.length, 7)
assert.equal(catalog.hot_install_boundary.source_repository_is_directly_executable, false) assert.equal(catalog.hot_install_boundary.source_repository_is_directly_executable, false)
assert.equal(catalog.hot_install_boundary.immutable_signed_artifact_required, true) assert.equal(catalog.hot_install_boundary.immutable_signed_artifact_required, true)
assert.equal(catalog.hot_install_boundary.compatibility_manifest_required, true) assert.equal(catalog.hot_install_boundary.compatibility_manifest_required, true)
assert.equal(catalog.hot_install_boundary.rollback_on_self_test_failure, true) assert.equal(catalog.hot_install_boundary.rollback_on_self_test_failure, true)
assert.equal(catalog.hot_install_boundary.user_data_survives_unmount, true) assert.equal(catalog.hot_install_boundary.user_data_survives_unmount, true)
assert.equal(catalog.hot_install_boundary.arbitrary_native_code_allowed, false)
assert.equal(catalog.hot_install_boundary.arbitrary_webview_javascript_allowed, false)
}) })

View file

@ -0,0 +1,37 @@
import assert from 'node:assert/strict'
import { readFileSync } from 'node:fs'
import test from 'node:test'
const contract = JSON.parse(readFileSync(new URL('../contracts/module-package-runtime.json', import.meta.url), 'utf8'))
const registry = JSON.parse(readFileSync(new URL('../contracts/numbered-ipc-registry.json', import.meta.url), 'utf8'))
const rust = readFileSync(new URL('../src-tauri/src/module_package_runtime.rs', import.meta.url), 'utf8')
test('module packages are signed declarative artifacts rather than executable repositories', () => {
assert.equal(contract.schema, 'hololake.module-package-runtime/v1')
assert.equal(contract.signature.source_repository_is_executable, false)
assert.equal(contract.signature.package_bytes_are_signed_exactly, true)
assert.equal(contract.host.arbitrary_native_code, false)
assert.equal(contract.host.arbitrary_webview_javascript, false)
assert.equal(contract.host.declarative_payload_only, true)
assert.equal(contract.rules.self_test_before_active, true)
assert.equal(contract.rules.failed_self_test_rolls_back, true)
assert.equal(contract.rules.unmount_preserves_user_data, true)
})
test('module lifecycle is reachable only through numbered verified-human routes', () => {
const routes = registry.operations.filter((route) => route.module_number === 'HLP-NIPC-MOD-0020')
assert.equal(routes.length, 7)
assert.deepEqual(routes.map((route) => route.operation_number), [
'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',
])
assert.ok(routes.every((route) => route.admission === 'VERIFIED_HUMAN_ROUTE'))
assert.match(rust, /MINISIGN_ED25519|PublicKey::decode/)
assert.match(rust, /module_receipts/)
assert.match(rust, /ROLLBACK_PENDING_SELF_TEST/)
})

View file

@ -7,8 +7,8 @@ test('identity, webview and direct broker numbers compile into one unique eviden
const generated = JSON.parse(readFileSync(new URL('../generated/unified-number-coordinate-tree.json', import.meta.url), 'utf8')) const generated = JSON.parse(readFileSync(new URL('../generated/unified-number-coordinate-tree.json', import.meta.url), 'utf8'))
assert.deepEqual(generated, compileUnifiedNumberTree()) assert.deepEqual(generated, compileUnifiedNumberTree())
assert.equal(generated.recordId, 'HLP-UNIFIED-NUMBER-TREE-001') assert.equal(generated.recordId, 'HLP-UNIFIED-NUMBER-TREE-001')
assert.equal(generated.routeCount, 84) assert.equal(generated.routeCount, 91)
assert.equal(new Set(generated.routes.map((route) => route.path)).size, 84) assert.equal(new Set(generated.routes.map((route) => route.path)).size, 91)
assert.equal(generated.invariants.everyPhysicalCallHasNumberedRoute, true) assert.equal(generated.invariants.everyPhysicalCallHasNumberedRoute, true)
assert.equal(generated.invariants.everyAcceptedCallHasEvidenceClass, true) assert.equal(generated.invariants.everyAcceptedCallHasEvidenceClass, true)
assert.ok(generated.routes.every((route) => route.admission && route.evidence)) assert.ok(generated.routes.every((route) => route.admission && route.evidence))

View file

@ -33,10 +33,10 @@ url = "2"
reqwest = { version = "0.13.2", default-features = false, features = ["cookies", "form", "json", "rustls", "stream"] } reqwest = { version = "0.13.2", default-features = false, features = ["cookies", "form", "json", "rustls", "stream"] }
tokio = { version = "1", features = ["time"] } tokio = { version = "1", features = ["time"] }
futures-util = "0.3" futures-util = "0.3"
minisign-verify = "0.2.5"
[target.'cfg(windows)'.dependencies] [target.'cfg(windows)'.dependencies]
widestring = "1" widestring = "1"
[dev-dependencies] [dev-dependencies]
minisign-verify = "0.2.5"
tempfile = "3" tempfile = "3"

View file

@ -230,7 +230,7 @@ enum BrokerRequest {
OpenSession(OpenSessionInput), OpenSession(OpenSessionInput),
ResumeSession(ResumeSessionInput), ResumeSession(ResumeSessionInput),
HeartbeatSession(AuthenticateSessionInput), HeartbeatSession(AuthenticateSessionInput),
PresentPersonaCarrierLicense(AuthenticatedPersonaCarrierLicenseInput), PresentPersonaCarrierLicense(Box<AuthenticatedPersonaCarrierLicenseInput>),
GetPersonaCarrierLicenseStatus(AuthenticatedPersonaCarrierLicenseStatusInput), GetPersonaCarrierLicenseStatus(AuthenticatedPersonaCarrierLicenseStatusInput),
GetWorkEnvironment(AuthenticatedWorkEnvironmentInput), GetWorkEnvironment(AuthenticatedWorkEnvironmentInput),
AppendEvent(AppendSessionEventInput), AppendEvent(AppendSessionEventInput),
@ -737,7 +737,7 @@ fn connect_endpoint(path: &Path) -> std::io::Result<LocalSocketStream> {
#[cfg(unix)] #[cfg(unix)]
{ {
let name = path.to_fs_name::<GenericFilePath>()?; let name = path.to_fs_name::<GenericFilePath>()?;
return LocalSocketStream::connect(name); LocalSocketStream::connect(name)
} }
#[cfg(windows)] #[cfg(windows)]
{ {
@ -1055,6 +1055,7 @@ fn dispatch(roots: &BrokerStorageRoots, bytes: &[u8]) -> BrokerResponse {
BrokerRequest::ResumeSession(input) => resume_at(session_root, input) BrokerRequest::ResumeSession(input) => resume_at(session_root, input)
.and_then(|receipt| serde_json::to_value(receipt).map_err(|error| error.to_string())), .and_then(|receipt| serde_json::to_value(receipt).map_err(|error| error.to_string())),
BrokerRequest::PresentPersonaCarrierLicense(input) => { BrokerRequest::PresentPersonaCarrierLicense(input) => {
let input = *input;
authenticate_context_at(session_root, &input.session) authenticate_context_at(session_root, &input.session)
.and_then(|context| { .and_then(|context| {
present_persona_license_at( present_persona_license_at(

View file

@ -14,6 +14,7 @@ mod home_status;
mod knowledge_base; mod knowledge_base;
mod local_development_bridge; mod local_development_bridge;
mod metacognitive_zero_layer; mod metacognitive_zero_layer;
mod module_package_runtime;
mod number_coordinate_tree; mod number_coordinate_tree;
mod numbered_ipc; mod numbered_ipc;
mod numbered_ipc_dispatch; mod numbered_ipc_dispatch;
@ -49,6 +50,7 @@ pub fn run() {
gls_protocol_kernel::start_on_application_open(app.handle())?; gls_protocol_kernel::start_on_application_open(app.handle())?;
metacognitive_zero_layer::start_on_application_open()?; metacognitive_zero_layer::start_on_application_open()?;
persona_carrier_license::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()?; number_coordinate_tree::start_on_application_open()?;
numbered_language_input::validate_contract()?; numbered_language_input::validate_contract()?;
numbered_ipc::start_on_application_open(app.handle())?; 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.record_id != "HLP-UNIFIED-NUMBER-TREE-001"
|| tree.state != "MACHINE_COMPILED_STARTUP_ENFORCED" || tree.state != "MACHINE_COMPILED_STARTUP_ENFORCED"
|| tree.root_number != "HLP-NUMBER-WORLD-ROOT-001" || tree.root_number != "HLP-NUMBER-WORLD-ROOT-001"
|| tree.route_count != 84 || tree.route_count != 91
|| tree.routes.len() != tree.route_count || tree.routes.len() != tree.route_count
|| !tree.invariants.number_is_stable_coordinate_not_authority || !tree.invariants.number_is_stable_coordinate_not_authority
|| !tree.invariants.path_is_unique_navigation || !tree.invariants.path_is_unique_navigation

View file

@ -934,7 +934,7 @@ mod tests {
#[test] #[test]
fn registry_is_closed_and_contains_every_migrated_command() { fn registry_is_closed_and_contains_every_migrated_command() {
let registry = load_registry().unwrap(); let registry = load_registry().unwrap();
assert_eq!(registry.operations.len(), 62); assert_eq!(registry.operations.len(), 69);
assert!(!registry.runtime.legacy_direct_commands_allowed); assert!(!registry.runtime.legacy_direct_commands_allowed);
} }

View file

@ -99,6 +99,27 @@ pub(crate) async fn dispatch(
) )
.await?, .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( "local_development_bridge::acquire_development_write_lane" => json(
crate::local_development_bridge::acquire_development_write_lane(app, input(&payload)?) crate::local_development_bridge::acquire_development_write_lane(app, input(&payload)?)
.await?, .await?,

View file

@ -496,6 +496,62 @@ const ROUTES = {
"moduleNumber": "HLP-NIPC-MOD-0019", "moduleNumber": "HLP-NIPC-MOD-0019",
"operationNumber": "HLP-NIPC-OP-0062", "operationNumber": "HLP-NIPC-OP-0062",
"targetNumber": "HLP-NIPC-TGT-0019" "targetNumber": "HLP-NIPC-TGT-0019"
},
"get_module_runtime_snapshot": {
"protocolVersion": "HLP-NIPC-v1",
"callerNumber": "HLP-NIPC-CALLER-MAIN-WEBVIEW-0001",
"channelNumber": "HLP-NIPC-CH-0002",
"moduleNumber": "HLP-NIPC-MOD-0020",
"operationNumber": "HLP-NIPC-OP-0063",
"targetNumber": "HLP-NIPC-TGT-0020"
},
"verify_module_package": {
"protocolVersion": "HLP-NIPC-v1",
"callerNumber": "HLP-NIPC-CALLER-MAIN-WEBVIEW-0001",
"channelNumber": "HLP-NIPC-CH-0002",
"moduleNumber": "HLP-NIPC-MOD-0020",
"operationNumber": "HLP-NIPC-OP-0064",
"targetNumber": "HLP-NIPC-TGT-0020"
},
"install_module_package": {
"protocolVersion": "HLP-NIPC-v1",
"callerNumber": "HLP-NIPC-CALLER-MAIN-WEBVIEW-0001",
"channelNumber": "HLP-NIPC-CH-0002",
"moduleNumber": "HLP-NIPC-MOD-0020",
"operationNumber": "HLP-NIPC-OP-0065",
"targetNumber": "HLP-NIPC-TGT-0020"
},
"mount_module": {
"protocolVersion": "HLP-NIPC-v1",
"callerNumber": "HLP-NIPC-CALLER-MAIN-WEBVIEW-0001",
"channelNumber": "HLP-NIPC-CH-0002",
"moduleNumber": "HLP-NIPC-MOD-0020",
"operationNumber": "HLP-NIPC-OP-0066",
"targetNumber": "HLP-NIPC-TGT-0020"
},
"self_test_module": {
"protocolVersion": "HLP-NIPC-v1",
"callerNumber": "HLP-NIPC-CALLER-MAIN-WEBVIEW-0001",
"channelNumber": "HLP-NIPC-CH-0002",
"moduleNumber": "HLP-NIPC-MOD-0020",
"operationNumber": "HLP-NIPC-OP-0067",
"targetNumber": "HLP-NIPC-TGT-0020"
},
"unmount_module": {
"protocolVersion": "HLP-NIPC-v1",
"callerNumber": "HLP-NIPC-CALLER-MAIN-WEBVIEW-0001",
"channelNumber": "HLP-NIPC-CH-0002",
"moduleNumber": "HLP-NIPC-MOD-0020",
"operationNumber": "HLP-NIPC-OP-0068",
"targetNumber": "HLP-NIPC-TGT-0020"
},
"rollback_module": {
"protocolVersion": "HLP-NIPC-v1",
"callerNumber": "HLP-NIPC-CALLER-MAIN-WEBVIEW-0001",
"channelNumber": "HLP-NIPC-CH-0002",
"moduleNumber": "HLP-NIPC-MOD-0020",
"operationNumber": "HLP-NIPC-OP-0069",
"targetNumber": "HLP-NIPC-TGT-0020"
} }
} as const } as const