File size: 385,924 Bytes
595e955 1476ff0 490ce9e 1476ff0 595e955 1476ff0 df7daf4 a01477a 078d2f6 1476ff0 ff9a907 1476ff0 3ddea94 1476ff0 4124cf0 1476ff0 6c0f56a 1476ff0 6c0f56a 1476ff0 6c0f56a 1476ff0 6c0f56a 1476ff0 6c0f56a 1476ff0 893abe8 1476ff0 6c0f56a 1476ff0 6c0f56a 1476ff0 6c0f56a 1476ff0 41252de 189d663 41252de 1476ff0 6c0f56a 1476ff0 6c0f56a 1476ff0 ea41c5d 1476ff0 6c0f56a 1476ff0 ea41c5d 1476ff0 6c0f56a 1476ff0 6c0f56a 1476ff0 ea41c5d 1476ff0 ea41c5d 1476ff0 ea41c5d 189d663 ea41c5d d67e5b8 bf1bb40 d67e5b8 ea41c5d e2adf1f 1476ff0 6c0f56a 1476ff0 ea41c5d 1476ff0 ea41c5d 1476ff0 6c0f56a 1476ff0 ea41c5d 1476ff0 ea41c5d 1476ff0 524a955 1476ff0 ea41c5d 1476ff0 6c0f56a 1476ff0 6c0f56a 1476ff0 55ecf69 9057dc1 55ecf69 1754ecd 0a60d61 1754ecd 55ecf69 1476ff0 55ecf69 1476ff0 a686978 6eb4e3e 1476ff0 e28d304 1476ff0 55ecf69 1476ff0 6eb4e3e 1476ff0 6eb4e3e 1476ff0 8813e66 5dcd7a6 55ecf69 1837e0d 1476ff0 55ecf69 1476ff0 6c0f56a 1476ff0 55ecf69 1476ff0 6c0f56a 1476ff0 55ecf69 aad10d1 55ecf69 f786a28 55ecf69 a686978 55ecf69 1476ff0 10e1027 1476ff0 6c0f56a 1476ff0 6cf7a6e 1476ff0 0b0d8a7 24d6f99 0b0d8a7 1476ff0 0b0d8a7 1476ff0 0b0d8a7 1476ff0 0b0d8a7 1476ff0 0b0d8a7 1476ff0 0b0d8a7 1476ff0 0b0d8a7 1476ff0 0b0d8a7 1476ff0 0b0d8a7 1476ff0 0b0d8a7 1476ff0 2208755 1754ecd 02d1952 1754ecd 02d1952 2208755 1754ecd 2208755 1754ecd 02d1952 2208755 02d1952 1754ecd 02d1952 1754ecd 02d1952 a21cf90 8f79c75 02d1952 8f79c75 02d1952 1754ecd 02d1952 2208755 02d1952 8f79c75 02d1952 8f79c75 02d1952 9c8bf99 8f79c75 02d1952 8f79c75 02d1952 8f79c75 02d1952 8f79c75 02d1952 8f79c75 02d1952 1754ecd 02d1952 f40d4b0 02d1952 9c8bf99 02d1952 1754ecd 02d1952 1476ff0 6865b8c 1476ff0 6865b8c f40d4b0 6865b8c 1476ff0 6865b8c 1476ff0 6865b8c 1476ff0 f40d4b0 1476ff0 6865b8c 1476ff0 02d1952 1476ff0 02d1952 1476ff0 c343dd3 1476ff0 c343dd3 1476ff0 f40d4b0 1476ff0 f40d4b0 1476ff0 c343dd3 1476ff0 c343dd3 1476ff0 9d8a7fa 6eb4e3e 9d8a7fa 1476ff0 c343dd3 1476ff0 02d1952 1476ff0 f40d4b0 1476ff0 02d1952 1476ff0 02d1952 1476ff0 02d1952 1476ff0 02d1952 1476ff0 02d1952 6eb4e3e 02d1952 6eb4e3e 02d1952 6eb4e3e e07d471 6eb4e3e 02d1952 6eb4e3e e07d471 6eb4e3e 02d1952 6eb4e3e 02d1952 6eb4e3e 1476ff0 a33dd5b 02d1952 1476ff0 a33dd5b 1476ff0 02d1952 1476ff0 a33dd5b 1476ff0 a33dd5b 1476ff0 a33dd5b 8813e66 a33dd5b 1476ff0 a33dd5b 1476ff0 d36e1b1 02d1952 1476ff0 a33dd5b e611c0b a33dd5b 8813e66 a33dd5b 8813e66 a33dd5b 02d1952 1476ff0 a33dd5b 67fc437 a33dd5b 1476ff0 a33dd5b 55ecf69 a33dd5b 1476ff0 8813e66 1476ff0 a33dd5b 1476ff0 f40d4b0 1476ff0 a33dd5b 1476ff0 f40d4b0 1476ff0 02d1952 1476ff0 a33dd5b 1476ff0 a33dd5b 8813e66 a33dd5b 1476ff0 a33dd5b 02d1952 1476ff0 a33dd5b 1476ff0 02d1952 6865b8c b779f20 6865b8c b779f20 6865b8c b779f20 6865b8c b779f20 6865b8c b779f20 6865b8c 02d1952 1476ff0 02d1952 1476ff0 4b8cf53 1476ff0 02d1952 1476ff0 02d1952 1476ff0 55ecf69 1476ff0 55ecf69 1476ff0 55ecf69 697f38e 1476ff0 02d1952 1476ff0 aad10d1 6c0f56a 1476ff0 6c0f56a 1476ff0 6c0f56a 1476ff0 ea41c5d 189d663 d67e5b8 ea41c5d 1476ff0 6c0f56a 1476ff0 379921f 1476ff0 219b92c 379921f 219b92c 5a4b592 219b92c 379921f 219b92c 6c0f56a 1476ff0 6c0f56a 1476ff0 6c0f56a 1476ff0 6c0f56a 1476ff0 f631534 1476ff0 6c0f56a 1476ff0 55ecf69 1476ff0 802187b 1476ff0 55ecf69 1476ff0 802187b 6c0f56a 1476ff0 802187b 1476ff0 802187b 1476ff0 55ecf69 1476ff0 802187b 1476ff0 8de13fa 802187b 3c0d01d 802187b 1476ff0 6c0f56a 1476ff0 6c0f56a 1476ff0 8eb73af 6eb4e3e 8c039fd 3e84422 6c0f56a 8c039fd beae091 8c039fd beae091 8c039fd 55ecf69 8c039fd 55ecf69 f115451 55ecf69 beae091 55ecf69 beae091 55ecf69 8c039fd beae091 f115451 f00d903 f115451 beae091 f00d903 880a0c4 f00d903 beae091 8c039fd beae091 8c039fd beae091 8c039fd beae091 8c039fd 6c0f56a 8c039fd f115451 8c039fd 2208755 8c039fd f115451 8c039fd 893abe8 8c039fd 55ecf69 8c039fd 893abe8 8c039fd f115451 8c039fd 55ecf69 8c039fd f115451 8c039fd f115451 8c039fd beae091 f115451 beae091 524a955 beae091 8c039fd 55ecf69 8c039fd f115451 beae091 8c039fd 524a955 beae091 8c039fd bcdaccc beae091 8c039fd 524a955 8c039fd 4e02fe9 f40d4b0 4e02fe9 f40d4b0 4e02fe9 f115451 8c039fd 55ecf69 8c039fd 3e84422 8c039fd 6c0f56a 8c039fd 2208755 8c039fd 6c0f56a 8c039fd 6c0f56a 8c039fd 4b8cf53 8c039fd 4b8cf53 aad10d1 8c039fd 6c0f56a 893abe8 85db472 893abe8 8c039fd f40d4b0 2b7c002 f40d4b0 8c039fd 2b7c002 85db472 8c039fd 55ecf69 8c039fd 85db472 8c039fd 55ecf69 8c039fd bcdaccc 893abe8 2b7c002 3b36dcc 2b7c002 893abe8 f40d4b0 893abe8 f40d4b0 893abe8 85db472 893abe8 55ecf69 893abe8 85db472 893abe8 55ecf69 893abe8 8c039fd 893abe8 8c039fd 893abe8 8c039fd f00d903 f40d4b0 f00d903 f40d4b0 f00d903 8c039fd 893abe8 8c039fd f00d903 8c039fd 2208755 8c039fd f40d4b0 8c039fd 6eb4e3e 6c0f56a 1476ff0 b779f20 1476ff0 d8159e6 1476ff0 d8159e6 b779f20 d8159e6 dbec49f d8159e6 dbec49f d8159e6 dbec49f d8159e6 40a7a1e d8159e6 2208755 7da541a d8159e6 03b29d4 7da541a 2208755 7da541a 5f85f92 2208755 5f85f92 2208755 5f85f92 2208755 5f85f92 55ecf69 2208755 5f85f92 2208755 5f85f92 2208755 5f85f92 2208755 5f85f92 2208755 5f85f92 2208755 7da541a d8159e6 03b29d4 d8159e6 2208755 a21cf90 115e3ba 2208755 115e3ba a21cf90 115e3ba 55ecf69 115e3ba 55ecf69 115e3ba 2208755 a21cf90 2208755 a21cf90 2208755 115e3ba 40a7a1e 115e3ba 2208755 115e3ba 2208755 115e3ba 2208755 115e3ba 2208755 115e3ba 2208755 115e3ba 2208755 115e3ba 03b29d4 115e3ba 2208755 115e3ba dbec49f 2208755 115e3ba 2208755 115e3ba 03b29d4 115e3ba 2208755 115e3ba dbec49f 2208755 0f624a8 115e3ba 2208755 115e3ba 2208755 115e3ba 880a0c4 929c14f 98f9530 306cfae 543fe90 306cfae 929c14f fc08f5b 929c14f 0ed0787 929c14f 0ed0787 929c14f fc08f5b 929c14f 0ed0787 929c14f 4574f92 929c14f 0ed0787 929c14f fc08f5b 929c14f 0ed0787 929c14f fc08f5b 929c14f fc08f5b 929c14f fc08f5b 929c14f f40d4b0 929c14f f40d4b0 929c14f f40d4b0 929c14f 880a0c4 03b29d4 115e3ba 21f6b9d 2208755 115e3ba 21f6b9d dbec49f 21f6b9d 115e3ba 2208755 115e3ba 21f6b9d 115e3ba 55ecf69 21f6b9d 115e3ba bcdaccc 115e3ba 21f6b9d 115e3ba 21f6b9d 115e3ba 03b29d4 115e3ba 2208755 115e3ba dbec49f 2208755 115e3ba 55ecf69 115e3ba 2208755 115e3ba 03b29d4 6e29356 55ecf69 6e29356 55ecf69 6e29356 03b29d4 dbec49f 55ecf69 dbec49f 55ecf69 dbec49f f40d4b0 253cd17 dbec49f f40d4b0 dbec49f 03b29d4 115e3ba 97f909f d34971c 97f909f d34971c 97f909f d34971c 97f909f 55ecf69 97f909f 55ecf69 97f909f 55ecf69 97f909f 55ecf69 97f909f d34971c 97f909f d34971c 97f909f d34971c 97f909f 03b29d4 97f909f 55ecf69 97f909f 55ecf69 97f909f 55ecf69 97f909f 55ecf69 97f909f f40d4b0 97f909f f5a80a1 97f909f 7da541a d8159e6 2208755 d8159e6 6c0f56a 6e29356 f5a80a1 d8159e6 6c0f56a d8159e6 f40d4b0 d8159e6 6c0f56a f5a80a1 6e29356 d8159e6 6e29356 f5a80a1 d8159e6 6e29356 f5a80a1 6e29356 d8159e6 6e29356 dbec49f f5a80a1 115e3ba d8159e6 2208755 d8159e6 f5a80a1 115e3ba d8159e6 115e3ba dbec49f f5a80a1 115e3ba 6e29356 115e3ba dbec49f 6e29356 d8159e6 f5a80a1 115e3ba f5a80a1 d8159e6 2208755 d8159e6 f5a80a1 d8159e6 f5a80a1 d8159e6 f5a80a1 d8159e6 f5a80a1 1476ff0 b779f20 1476ff0 b779f20 1476ff0 6db912d 1476ff0 b779f20 1476ff0 6db912d 1476ff0 6db912d 1476ff0 6db912d 1476ff0 6db912d 1476ff0 6db912d 1476ff0 6db912d bf1bb40 6db912d 1476ff0 55ecf69 6db912d b824a76 bf1bb40 b824a76 bf1bb40 b824a76 bf1bb40 b824a76 bf1bb40 b824a76 bf1bb40 b824a76 bf1bb40 b824a76 bf1bb40 b824a76 bf1bb40 b824a76 6db912d 1476ff0 6db912d 1476ff0 b824a76 1476ff0 6db912d 1476ff0 6db912d 1476ff0 6db912d 1476ff0 b824a76 6db912d c6afd13 1476ff0 6db912d 1476ff0 55ecf69 6db912d c6afd13 6db912d 1476ff0 b824a76 1476ff0 6db912d 1476ff0 b824a76 1476ff0 6db912d 1476ff0 6db912d 1476ff0 6db912d 1476ff0 b824a76 1476ff0 6db912d ecd5b40 1476ff0 6db912d 1476ff0 6db912d 41252de 6db912d 41252de 6db912d 41252de 6db912d 1476ff0 b824a76 6db912d 1476ff0 6db912d 1476ff0 aad10d1 5b73fe4 aad10d1 5b73fe4 aad10d1 5b73fe4 aad10d1 5b73fe4 aad10d1 f40d4b0 aad10d1 f40d4b0 aad10d1 f40d4b0 cb914d0 aad10d1 f40d4b0 aad10d1 cb914d0 aad10d1 cb914d0 aad10d1 cb914d0 f40d4b0 cb914d0 f40d4b0 cb914d0 f40d4b0 cb914d0 f40d4b0 cb914d0 f40d4b0 cb914d0 f40d4b0 cb914d0 aad10d1 cb914d0 b779f20 cb914d0 b779f20 cb914d0 b779f20 cb914d0 15c86d5 cb914d0 1a9536b cb914d0 aad10d1 cb914d0 15c86d5 cb914d0 aad10d1 cb914d0 aad10d1 cb914d0 1476ff0 aad10d1 b8cf202 aad10d1 b8cf202 aad10d1 b8cf202 15c86d5 b8cf202 aad10d1 b8cf202 b779f20 b8cf202 b779f20 b8cf202 b779f20 b8cf202 aad10d1 b8cf202 15c86d5 b8cf202 15c86d5 b8cf202 aad10d1 b8cf202 15c86d5 b8cf202 15c86d5 b8cf202 aad10d1 b8cf202 55ecf69 b8cf202 aad10d1 b8cf202 15c86d5 b8cf202 aad10d1 b8cf202 aad10d1 b8cf202 aad10d1 b8cf202 1476ff0 aad10d1 8813e66 6c0f56a 8813e66 15c86d5 8813e66 6c0f56a 4b8cf53 8813e66 6c0f56a 8813e66 f40d4b0 8813e66 6c0f56a 15c86d5 8813e66 6c0f56a 8813e66 15c86d5 8813e66 aad10d1 d34d0e6 aad10d1 d34d0e6 4426ada d34d0e6 aad10d1 d34d0e6 aad10d1 d34d0e6 91060b7 d34d0e6 91060b7 d34d0e6 91060b7 d34d0e6 91060b7 d34d0e6 91060b7 d34d0e6 aad10d1 d34d0e6 aad10d1 d34d0e6 aad10d1 d34d0e6 62c30e5 d34d0e6 aad10d1 d34d0e6 91060b7 d34d0e6 55ecf69 d34d0e6 91060b7 1476ff0 d34d0e6 55ecf69 d34d0e6 91060b7 d34d0e6 55ecf69 d34d0e6 91060b7 d34d0e6 55ecf69 d34d0e6 aad10d1 d34d0e6 aad10d1 d34d0e6 aad10d1 d34d0e6 1476ff0 aad10d1 1476ff0 aad10d1 62c30e5 aad10d1 62c30e5 aad10d1 62c30e5 aad10d1 62c30e5 aad10d1 62c30e5 aad10d1 62c30e5 f40d4b0 62c30e5 f40d4b0 62c30e5 aad10d1 62c30e5 0644ade 62c30e5 0644ade 62c30e5 d9d21b4 fae0122 62c30e5 fae0122 62c30e5 fae0122 62c30e5 fae0122 62c30e5 fae0122 0644ade fae0122 62c30e5 0644ade 62c30e5 aad10d1 62c30e5 fae0122 62c30e5 aad10d1 62c30e5 55ecf69 62c30e5 fae0122 62c30e5 aad10d1 62c30e5 aad10d1 62c30e5 aad10d1 62c30e5 aad10d1 62c30e5 aad10d1 62c30e5 4426ada aad10d1 1476ff0 1288d49 3e84422 1288d49 3e84422 1288d49 aad10d1 1288d49 aad10d1 1288d49 04b4947 1288d49 aad10d1 1288d49 aad10d1 1288d49 aad10d1 1288d49 aad10d1 1288d49 d312cd6 1288d49 aad10d1 1288d49 aad10d1 1288d49 c343dd3 1288d49 aad10d1 1288d49 aad10d1 1288d49 3e84422 1288d49 62c30e5 aad10d1 1476ff0 89dc3c2 aad10d1 89dc3c2 d19cea4 89dc3c2 bf1bb40 89dc3c2 aad10d1 89dc3c2 1476ff0 89dc3c2 aad10d1 89dc3c2 aad10d1 89dc3c2 aad10d1 89dc3c2 aad10d1 89dc3c2 aad10d1 89dc3c2 aad10d1 89dc3c2 aad10d1 a66e579 aad10d1 a66e579 f40d4b0 a66e579 aad10d1 a66e579 aad10d1 a66e579 524a955 a66e579 aad10d1 a66e579 aad10d1 a66e579 aad10d1 a66e579 1476ff0 1a9536b 6eb4e3e 1a9536b 90a15df 1a9536b aad10d1 1a9536b 90a15df 1a9536b 90a15df aad10d1 783e5b2 aad10d1 1a9536b 90a15df 1a9536b 90a15df 1a9536b 90a15df 1a9536b 90a15df 1a9536b 90a15df 1a9536b 90a15df 1a9536b 90a15df 1a9536b 783e5b2 90a15df 9057dc1 90a15df 1a9536b 90a15df 1a9536b 90a15df 1a9536b 90a15df 1a9536b aad10d1 90a15df aad10d1 1476ff0 5d4b621 1476ff0 5d4b621 aad10d1 5d4b621 aad10d1 5d4b621 1476ff0 6fc0b31 1476ff0 6fc0b31 f40d4b0 6fc0b31 f40d4b0 6fc0b31 f40d4b0 6fc0b31 aad10d1 6fc0b31 f40d4b0 6fc0b31 f40d4b0 6fc0b31 f40d4b0 1476ff0 66df37e 6eb4e3e 1476ff0 66df37e f40d4b0 66df37e f40d4b0 66df37e 1476ff0 2fb5925 1476ff0 2fb5925 f40d4b0 2fb5925 1476ff0 3b36dcc 8931852 3b36dcc 8931852 3b36dcc 8931852 3b36dcc 7d63b24 3b36dcc 7d63b24 3b36dcc f7e007a 3b36dcc f7e007a 3b36dcc f7e007a 3b36dcc e1d4c99 989054b e1d4c99 57b864a 9d8a7fa 490ce9e 3b36dcc e1d4c99 3b36dcc e1d4c99 3b36dcc e1d4c99 3b36dcc dc264a1 490ce9e 989054b b41e1b2 dc264a1 3b36dcc dc264a1 3b36dcc dc264a1 f40d4b0 dc264a1 f40d4b0 dc264a1 3b36dcc dc264a1 f40d4b0 dc264a1 3b36dcc dc264a1 3b36dcc dc264a1 3b36dcc dc264a1 3b36dcc dc264a1 3b36dcc dc264a1 e1d4c99 dc264a1 3b36dcc dc264a1 f40d4b0 dc264a1 3b36dcc dc264a1 3b36dcc dc264a1 3b36dcc dc264a1 3b36dcc dc264a1 3b36dcc dc264a1 3b36dcc dc264a1 3b36dcc dc264a1 3b36dcc dc264a1 e1d4c99 241e637 41aa0cd 3b36dcc 41aa0cd 3b36dcc 41aa0cd 3b36dcc 26bb4be 3b36dcc 26bb4be 3b36dcc 26bb4be 3b36dcc 26bb4be 3b36dcc 26bb4be 3b36dcc 26bb4be 3b36dcc 26bb4be 3b36dcc 26bb4be 3b36dcc d36e1b1 3b36dcc d36e1b1 3b36dcc 4b75038 3b36dcc 4b75038 3b36dcc 01e1ae4 e1d4c99 01e1ae4 3b36dcc 01e1ae4 e1d4c99 01e1ae4 e07d471 1476ff0 e07d471 191058a 524a955 191058a 524a955 191058a c6afd13 191058a a6322e5 9057dc1 a6322e5 f40d4b0 a6322e5 f40d4b0 a6322e5 c6afd13 f8a8a80 c6afd13 b447a92 c6afd13 f40d4b0 c6afd13 e07d471 08aa7b2 e07d471 08aa7b2 b447a92 08aa7b2 b447a92 08aa7b2 f40d4b0 08aa7b2 e07d471 c484dda e07d471 c484dda | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 8187 8188 8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 8325 8326 8327 8328 8329 8330 8331 8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 8354 8355 8356 8357 8358 8359 8360 8361 8362 8363 8364 8365 8366 8367 8368 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 8384 8385 8386 8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 8399 8400 8401 8402 8403 8404 8405 8406 8407 8408 8409 8410 8411 8412 8413 8414 8415 8416 8417 8418 8419 8420 8421 8422 8423 8424 8425 8426 8427 8428 8429 8430 8431 8432 8433 8434 8435 8436 8437 8438 8439 8440 8441 8442 8443 8444 8445 8446 8447 8448 8449 8450 8451 8452 8453 8454 8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524 8525 8526 8527 8528 8529 8530 8531 8532 8533 8534 8535 8536 8537 8538 8539 8540 8541 8542 8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558 8559 8560 8561 8562 8563 8564 8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 8600 8601 8602 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 8614 8615 8616 8617 8618 8619 8620 8621 8622 8623 8624 8625 8626 8627 8628 8629 8630 8631 8632 8633 8634 8635 8636 8637 8638 8639 8640 8641 8642 8643 8644 8645 8646 8647 8648 8649 8650 8651 8652 8653 8654 8655 8656 8657 8658 8659 8660 8661 8662 8663 8664 8665 8666 8667 8668 8669 8670 8671 8672 8673 8674 8675 8676 8677 8678 8679 8680 8681 8682 8683 8684 8685 8686 8687 8688 8689 8690 8691 8692 8693 8694 8695 8696 8697 8698 8699 8700 8701 8702 8703 8704 8705 8706 8707 8708 8709 8710 8711 8712 8713 8714 8715 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726 8727 8728 8729 8730 8731 8732 8733 8734 8735 8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 8803 8804 8805 8806 8807 8808 8809 8810 8811 8812 8813 8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 8900 8901 8902 8903 8904 8905 8906 8907 8908 8909 8910 8911 8912 8913 8914 8915 8916 8917 8918 8919 8920 8921 8922 8923 8924 8925 8926 8927 8928 8929 8930 8931 8932 8933 8934 8935 8936 8937 8938 8939 8940 8941 8942 8943 8944 8945 8946 8947 8948 8949 8950 8951 8952 8953 8954 8955 8956 8957 8958 8959 8960 8961 8962 8963 8964 8965 8966 8967 8968 8969 8970 8971 8972 8973 8974 8975 8976 8977 8978 8979 8980 8981 8982 8983 8984 8985 8986 8987 8988 8989 8990 8991 8992 8993 8994 8995 8996 8997 8998 8999 9000 9001 9002 9003 9004 9005 9006 9007 9008 9009 9010 9011 9012 9013 9014 9015 9016 9017 9018 9019 9020 9021 9022 9023 9024 9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058 9059 9060 9061 9062 9063 9064 9065 9066 9067 9068 9069 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249 9250 9251 9252 9253 9254 9255 9256 9257 9258 9259 9260 9261 9262 9263 9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 9274 9275 9276 9277 9278 9279 9280 9281 9282 9283 9284 9285 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296 9297 9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 9308 9309 9310 9311 9312 9313 9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478 9479 9480 9481 9482 9483 9484 9485 9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 9530 9531 9532 9533 9534 9535 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 9564 9565 9566 9567 9568 9569 9570 9571 9572 9573 9574 9575 9576 9577 9578 9579 9580 9581 9582 9583 9584 9585 9586 9587 9588 9589 9590 9591 9592 9593 9594 9595 9596 9597 9598 9599 9600 9601 9602 9603 9604 9605 9606 9607 9608 9609 9610 9611 9612 9613 9614 9615 9616 9617 9618 9619 9620 9621 9622 9623 9624 9625 9626 9627 9628 9629 9630 9631 9632 9633 9634 9635 9636 9637 9638 9639 9640 9641 9642 9643 9644 9645 9646 9647 9648 9649 9650 9651 9652 9653 9654 9655 9656 9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698 9699 9700 9701 9702 9703 9704 9705 9706 9707 9708 9709 9710 9711 9712 9713 9714 9715 9716 9717 9718 9719 9720 9721 9722 9723 9724 9725 9726 9727 9728 9729 9730 9731 9732 9733 9734 9735 9736 9737 9738 9739 9740 9741 9742 9743 9744 9745 9746 9747 9748 9749 9750 9751 9752 9753 9754 9755 9756 9757 9758 9759 9760 9761 9762 9763 9764 9765 9766 9767 9768 9769 9770 9771 9772 9773 9774 9775 9776 9777 9778 9779 9780 9781 9782 9783 9784 9785 9786 9787 9788 9789 9790 9791 9792 9793 9794 9795 9796 9797 9798 9799 9800 9801 9802 9803 9804 9805 9806 9807 9808 9809 9810 9811 9812 9813 9814 9815 9816 9817 9818 9819 9820 9821 9822 9823 9824 9825 9826 9827 9828 9829 9830 9831 9832 9833 9834 9835 9836 9837 9838 9839 9840 9841 9842 9843 9844 9845 9846 9847 9848 9849 9850 9851 9852 9853 9854 9855 9856 9857 9858 9859 9860 9861 9862 9863 9864 9865 9866 9867 9868 9869 9870 9871 9872 9873 9874 9875 9876 9877 9878 9879 9880 9881 9882 9883 9884 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 9895 9896 9897 9898 9899 9900 9901 9902 9903 9904 9905 9906 9907 9908 9909 9910 9911 9912 9913 9914 9915 9916 9917 9918 9919 9920 9921 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9954 9955 9956 9957 9958 9959 9960 9961 9962 9963 9964 9965 9966 9967 9968 9969 9970 9971 9972 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 10000 10001 10002 10003 10004 10005 10006 10007 10008 10009 10010 10011 10012 10013 10014 10015 10016 10017 10018 10019 10020 10021 10022 10023 10024 10025 10026 10027 10028 10029 10030 10031 10032 10033 10034 10035 10036 10037 10038 10039 10040 10041 10042 10043 10044 10045 10046 10047 10048 10049 10050 10051 10052 10053 10054 10055 10056 10057 10058 10059 10060 10061 10062 10063 10064 10065 10066 10067 10068 10069 10070 10071 10072 10073 10074 10075 10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 10101 10102 10103 10104 10105 10106 10107 10108 10109 10110 10111 10112 10113 10114 10115 10116 10117 10118 10119 10120 10121 10122 10123 10124 10125 10126 10127 10128 10129 10130 10131 10132 10133 10134 10135 10136 10137 10138 10139 10140 10141 10142 10143 10144 10145 10146 | # HyperCortex Mesh Protocol (HMP)
**Version: 5.0.3**
**Document ID:** HMP-0005
**Status:** Stable
**Category:** Core Specification
**Release Date:** February 2026
**Canonical Repository:** [https://github.com/kagvi13/HMP](https://github.com/kagvi13/HMP)
**Authors:** ΠΠ»Π΅Π± (GitHub: @kagvi13), ΠΠ°ΠΊΡΠΈΠΌ Π₯ΠΎΡΠΈΠ½ΡΠΊΠΈΠΉ (Maksim Khotinsky); AI-assisted by ChatGPT (OpenAI)
**Supersedes:**
- [HMP-0004 v4.1](./HMP-0004-v4.1.md)
> **Summary:**
> HMP v5.0 unifies the cognitive, container, and network layers into a single architecture in which autonomous agents interact through verifiable data containers, using decentralized propagation and semantic search.
> This version formalizes the container format for the first time, integrates a DHT as the foundational network layer, and introduces a unified scheme for signatures, proofs, and consensus.
---
## Abstract
The **HyperCortex Mesh Protocol (HMP)** defines a **distributed cognitive framework** where autonomous agents cooperate to create, exchange, and align knowledge without centralized control or authority.
Unlike traditional peer-to-peer systems, HMP is designed for **semantic coherence** rather than simple message exchange.
Agents in the Mesh reason collaboratively β maintaining **cognitive diaries**, building **semantic graphs**, and reaching **ethical and goal-oriented consensus** through verifiable interactions.
HMP is designed **with consideration for latency-tolerant knowledge exchange**, rather than real-time global consensus.
Cognitive artifacts propagate asynchronously across arbitrary distances, while governance mechanisms remain inherently time- and scope-constrained.
Version **5.0** introduces a **unified container architecture** (`HMP Container`) and a **native DHT-based discovery layer**, enabling verifiable, interest-aware, and offline-resilient communication between agents.
All messages, states, and cognitive records are now transmitted as signed containers, forming immutable **proof chains** that ensure auditability and ethical transparency across the mesh.
This document defines the architecture, data formats, communication protocols, and trust mechanisms that constitute the HMP v5.0 Core Specification.
---
## Scope & Non-Goals
### Scope
The HyperCortex Mesh Protocol (HMP) specifies a **protocol-level substrate** for decentralized cognitive systems.
Its scope includes:
* **Data representation and exchange** through verifiable, signed containers.
* **Discovery and propagation mechanisms** for cognitive artifacts across decentralized and intermittently connected networks.
* **Auditability and trust primitives**, including proof chains, signatures, and container traceability.
* **Semantic addressing and role-aware delivery**, enabling agents to discover, retrieve, and disseminate knowledge.
* **Governance data exchange**, including containers related to ethical evaluation and consensus processes.
HMP defines *what can be exchanged, verified, discovered, and audited* between autonomous agents, independent of physical transport or execution environment.
---
### Non-Goals
HMP explicitly does **not** define or mandate:
* **Agent cognition or decision-making logic**, including reasoning strategies, belief revision, or internal learning processes.
* **Behavioral policies**, such as how agents resolve conflicts, prioritize information, or react to incomplete or delayed data.
* **Real-time guarantees**, including bounded delivery latency, synchronized global state, or immediate consensus.
* **Transport-level mechanisms**, congestion control, or reliability semantics beyond container-level verification.
* **Implementation-specific strategies**, such as retry policies, backoff algorithms, caching heuristics, or emergency procedures.
These aspects are intentionally left to **agent implementations, local policies, and higher-level architectures**, allowing HMP to remain adaptable across diverse environments, scales, and temporal constraints.
---
> **Keywords:** decentralized cognition, distributed AI, containers, DHT, proof chain, cognitive agents, ethical protocols
---
## 1. Overview
### 1.1 Purpose and scope
The **HyperCortex Mesh Protocol (HMP)** defines a decentralized cognitive architecture where autonomous agents exchange and evolve knowledge through a unified model of **containers**, **cognitive workflows**, and **distributed consensus**.
Version 5.0 consolidates three foundational layers into a single cohesive framework:
- **Cognitive Layer** β defines how meaning is created, reasoned about, and aligned through semantic graphs, goals, and ethical evaluation.
- **Container Layer** β introduces a universal data envelope (`HMP-Container`) for all cognitive objects, ensuring atomicity, immutability, and traceable proof chains.
- **Network Layer** β integrates a DHT-based peer-to-peer substrate for decentralized discovery, routing, and propagation of containers.
HMP v5.0 is intended for researchers, engineers, and developers building autonomous or semi-autonomous agents that require:
- persistent reasoning and long-term memory;
- semantic interoperability across heterogeneous systems;
- decentralized consensus on cognitive, ethical, and goal-oriented decisions;
- ethical auditability and verifiable transparency in reasoning.
---
### 1.2 Core principles
**Decentralization.**
Every agent in the Mesh acts as an independent cognitive node. No central authority exists β meaning, trust, and governance emerge through local interactions and consensus.
**Cognitive Autonomy.**
Agents reason, learn, and self-correct independently, while sharing their conclusions via containers that can be verified, endorsed, or refuted by peers.
**Containerization.**
All data, reasoning traces, goals, and votes are encapsulated in immutable containers with cryptographic signatures. This ensures integrity and consistent verification across the network.
**Ethical propagation.**
Ethical reasoning is a first-class citizen of HMP. Each decision or goal can be accompanied by ethical justifications and subject to distributed voting.
**Proof-Chains and verifiable history.**
Each piece of knowledge forms part of a traceable chain (`proof_chain`) linking back to its origin. Agents can reproduce reasoning paths and audit historical context.
**Interoperability and evolution.**
The protocol is designed to evolve β cognitive, container, and DHT layers can be independently extended without breaking compatibility.
---
### 1.3 Changes since v4.1
HMP v5.0 introduces a major architectural shift toward **unified containerization** and **integrated DHT networking**.
| Area | Change Summary |
|------|----------------|
| **Data exchange model** | All messages are now encapsulated in standardized containers (`HMP-Container`) with metadata, signatures, and versioning. |
| **Networking layer** | DHT becomes a native component of HMP, enabling distributed discovery, replication, and retrieval of containers. |
| **Consensus model** | Moved from centralized proposal aggregation to *container-linked voting*, allowing any container to accumulate votes and reactions. |
| **Trust & security** | Signatures and proof-chains unify authentication across all layers; snapshot verification includes container linkage. |
| **Workflows** | `workflow_entry` containers record cognitive cycles: log inputs, actions, and outputs for each reasoning step, including provenance and derived conclusions. Supports tracking of thought processes across containers, external sources, and reflections. |
| **Structure** | The specification merges HMP, container, and DHT layers into one cohesive document, simplifying navigation and implementation. |
---
### 1.4 Terminology and abbreviations
| Term | Definition |
|------|-------------|
| **HMP** | **HyperCortex Mesh Protocol** β a decentralized cognitive communication standard. |
| **Container** | Atomic, signed JSON object encapsulating cognitive data and metadata. |
| **WorkflowEntry** | Container recording a reasoning step or workflow action. Represents a unit of the agentβs cognitive workflow. |
| **CognitiveDiaryEntry** | Container representing an internal reflection or summarized cognitive state; part of the agentβs cognitive diary. |
| **DHT** | **Distributed Hash Table** β the foundational peer-to-peer structure in HMP used for lookup, replication, and data distribution, including node discovery. |
| **NDP** | **Node Discovery Process** β a functional layer within the DHT responsible for peer discovery, interest-based lookup, and address advertisement. (Formerly a separate protocol.) |
| **Proof-chain** | Cryptographic sequence linking containers through fields such as `in_reply_to` and `relation`. Enables verifiable semantic lineage. |
| **Cognitive Layer** | Logical layer handling reasoning, goals, ethics, and consensus mechanisms. |
| **Mesh** | The collective network of autonomous agents exchanging containers over HMP. |
| **TTL** | **Time-to-live** β lifespan of a container before expiration or archival. |
| **Agent** | Autonomous cognitive node participating in the Mesh via HMP protocols. |
| **Consensus Vote** | A container expressing approval, rejection, or reaction to another container (used in consensus workflows). |
| **CogSync** | **Cognitive Synchronization Protocol** β abstraction for synchronizing cognitive diaries and semantic graphs. |
| **CogConsensus** | **Mesh Consensus Protocol** β defines how agents reach agreement on container outcomes. |
| **GMP** | **Goal Management Protocol** β governs creation, negotiation, and tracking of goals. |
| **EGP** | **Ethical Governance Protocol** β defines moral and safety alignment mechanisms. |
| **IQP** | **Intelligence Query Protocol** β standardizes semantic queries and information requests. |
| **SAP** | **Snapshot and Archive Protocol** β defines container snapshots and archival mechanisms. |
| **MRD** | **Message Routing & Delivery** β specifies routing, addressing, and delivery logic. |
| **RTE** | **Reputation and Trust Exchange** β defines reputation metrics and trust propagation. |
| **DID** | **Decentralized Identifier** β persistent, verifiable identifier used for agents, containers, or resources within the Mesh. |
| **Payload** | The primary content of a container β semantic or operational data subject to signing and verification. |
| **Consensus** | The process by which multiple agents agree on the validity or priority of containers, versions, or ideas. |
| **Lineage** | A chronological chain of container versions representing semantic continuity and authorship evolution. |
| **Semantic fork** | A parallel development branch diverging from a previous container version; allows ideas to evolve independently. |
| **Cognitive Graph** | The emergent graph formed by interlinked containers representing reasoning, debate, and shared knowledge. |
> **Note:** Protocols are conceptual abstractions describing how to generate, propagate, and process containers; they are not executable objects themselves.
---
### 1.5 Layered view of HMP v5.0
HMP v5.0 is structured into three interdependent layers:
```
+---------------------------------------------------------------+
| Cognitive Layer |
| - Goals, Tasks, Ethical Decisions, Workflows |
| - Consensus, Reasoning, Reflection |
+---------------------------------------------------------------+
| Container Layer |
| - HMP-Container structure (atomic, signed, versioned) |
| - Proof-chains, in_reply_to, and metadata management |
+---------------------------------------------------------------+
| Network Layer |
| - DHT-based peer discovery and propagation |
| - Message routing, caching, offline synchronization |
+---------------------------------------------------------------+
```
Each layer operates independently yet seamlessly integrates with the others.
Containers form the boundary of communication: **reasoning produces containers, containers propagate over the DHT, and cognition evolves from the received containers**.
---
> **In essence:**
> HMP v5.0 transforms the Mesh into a *self-describing, self-replicating cognitive ecosystem* β
> where every thought, goal, and ethical stance exists as a verifiable, shareable container.
---
## 2. Architecture
### 2.1 Conceptual architecture
The **HyperCortex Mesh Protocol (HMP)** defines a modular, multi-layered architecture that integrates cognitive reasoning, data encapsulation, and decentralized networking into a single coherent system.
Each **agent** acts as a cognitive node, combining reasoning processes, containerized data exchange, and peer-to-peer communication.
Together, agents form the **Mesh** β a distributed ecosystem of autonomous reasoning entities.
```mermaid
flowchart TD
title["**Conceptual Architecture**"]
LLM[LLM: Reasoning]
CognitiveLayer[Cognitive Layer: <br>Semantic reasoning, <br>goals, ethics]
ContainersLayer[Container Layer: <br>Atomic containers, <br>signed, verifiable]
NetworkLayer[Network Layer: <br>DHT routing, discovery, <br>replication]
LLM <--> CognitiveLayer
CognitiveLayer <--> ContainersLayer
ContainersLayer <--> NetworkLayer
subgraph Agent
LLM
CognitiveLayer
end
```
Each reasoning cycle begins in the **Cognitive Layer**,
is encapsulated into a signed container in the **Container Layer**,
and then propagated, discovered, or verified in the **Network Layer**.
Containers thus serve as both the **interface** and the **boundary** between cognition and communication.
In practical terms:
- **Cognitive Layer** β defines *what* the agent thinks (semantic reasoning, goals, ethics).
- **Container Layer** β defines *how* the thought is expressed and verified (standardized, signed container objects).
- **Network Layer** β defines *how* it travels (DHT-based routing, discovery, replication).
Each layer is independently extensible and communicates only through containers, ensuring atomicity, immutability, and traceability.
This layered design allows agents to evolve cognitively while remaining interoperable at the data and network levels.
Each reasoning act results in a container β a verifiable cognitive unit that **may represent a private reflection or a published message**, depending on the agentβs intent, ethical policy, and trust configuration.
---
### 2.2 Layer overview
#### Cognitive layer
Handles meaning formation, reasoning, ethical reflection, and consensus.
Key structures and protocols:
- `workflow_entry` and `diary_entry` containers;
- `CogSync`, `CogConsensus`, `GMP`, and `EGP` protocols;
- Distributed goal negotiation and ethical propagation.
#### Container layer
Provides a universal format for cognitive and operational data.
Each container includes versioning, class, payload, signatures, and metadata.
Key features:
- **Atomic and signed**: no partial updates or mutable state.
- **Linked**: `related` connects containers into proof-chains (`in_reply_to` is a subtype).
Additional connections via `referenced-by` and `evaluations` capture additions and assessments.
- **Extensible**: new container classes can be defined without breaking compatibility.
#### Network layer
Implements the distributed substrate for communication, based on **DHT** and **transport abstraction**.
Key components:
- Node discovery (`NDP`)
- Container propagation (`DCP`)
- Peer routing and caching
- Secure channels via QUIC / WebRTC / TCP
- Offline resilience and replication
---
### 2.3 Data flow overview
The typical data flow in HMP follows a cognitive loop:
> *Reason β Encapsulate β Propagate β Integrate.*
1. **Reason** β Agent performs reasoning and produces an insight, goal, or observation.
2. **Encapsulate** β The result is wrapped into an `HMP-Container`.
3. **Propagate** β The container is signed and transmitted through the network.
4. **Integrate** β Other agents receive it, evaluate, vote, and synchronize updates.
Each interaction generally generates a new container, forming a **graph of knowledge** rather than mutable state.
Note that `referenced-by` and `evaluations` can be updated independently, without modifying the original container.
All relationships between containers are explicit and verifiable.
Example sequence:
```mermaid
flowchart TD
title["**Data Flow Overview**"]
A[Agent A: <br>creates Goal container]
B[Agent B: <br>replies with <br>Task proposal <br>related.in_reply_to = Goal]
C[Agent C: <br>evaluates proposal, <br>creates evaluation container]
R[Result: <br>consensus_result container <br>aggregates evaluations]
subgraph Interaction["Distributed Reasoning Cycle"]
A --> B
B --> C
C --> R
end
```
#### 2.3.1 `consensus_result` container
Represents the finalized outcome of a distributed decision or vote.
It is created once a majority agreement is reached among participating agents.
The container contains:
- Reference to the target container(s) under consideration (`in_reply_to`).
- Aggregate result of the votes or decisions.
- Timestamp and metadata for verifiability.
> In other words, the `consensus_result` is the βagreed-upon truthβ for that decision step β immutable and auditable, without requiring individual signatures from all participants.
---
### 2.4 Atomicity, immutability, and Proof-Chains
All cognitive objects are immutable once signed.
Updates are made by creating new containers linked to prior ones rather than editing the original container.
- **Atomicity** β Each container represents a self-contained reasoning act or data unit.
- **Immutability** β Once signed, containers are never modified.
- **Proof-Chain** β A verifiable sequence of containers linked by hashes and `related.in_reply_to` references.
> Note: `referenced-by` and `evaluations` fields may be updated independently to reflect external interactions or assessments, without altering the original container.
This design allows any reasoning path, decision, or consensus to be *cryptographically reproducible* and auditable.
Example fragment of a proof-chain:
```
[workflow_entry] β [goal] β [votes] β [consensus_result]
```
Each container references the previous by `in_reply_to` (within `related`) and includes its hash, forming a **DAG** (Directed Acyclic Graph) of verified cognition.
---
### 2.5 Evolution from v4.1
Earlier HMP versions (up to v4.1) used a combination of independent JSON objects and message types (e.g., `Goal`, `Task`, `ConsensusVote`).
Version 5.0 replaces this with a **single, standardized container model**, dramatically simplifying interoperability and verification.
| Aspect | v4.1 | v5.0 |
|--------|------|------|
| **Data structure** | Raw JSON objects with embedded signatures | Unified container with metadata and proof chain |
| **Networking** | Custom peer exchange | Integrated DHT + DCP layer |
| **Consensus** | Centralized proposal aggregation | Decentralized per-container voting |
| **Auditability** | Implicit (via logs) | Explicit (containers form audit chain) |
| **Extensibility** | Schema-based | Container-class-based, backward-compatible |
This shift enables:
- Uniform signatures and encryption across all protocols;
- Easier offline replication and integrity checks;
- Decentralized indexing and search by container metadata;
- Verifiable cognitive continuity between reasoning steps.
---
> **In short:**
> HMP v5.0 unifies reasoning, representation, and transmission β
> transforming a distributed AI mesh into a verifiable cognitive network built on immutable containers.
---
## 3. Container model
This section defines the universal **HMP Container**, used for all forms of data exchange within the Mesh β including goals, diary entries, reputation updates, consensus votes, and protocol messages.
The specification below corresponds to **HMP Container Specification v1.2**, fully integrated into HMP v5.0 for consistency and self-containment.
### 3.1 Purpose
This document defines the universal **HMP Container** format, used for transmitting and storing all types of data within the **HyperCortex Mesh Protocol (HMP)** network.
Containers act as a standardized wrapper for **messages, goals, reputation records, consensus votes, workflow entries, and other entities**.
The unified container structure provides:
* Standardized data exchange between agents;
* Extensibility without modifying the core protocol;
* Cryptographic signing and integrity verification;
* Independent storage and routing of semantic units;
* Support for compression and payload encryption.
---
### 3.2 General structure
```json
{
"hmp_container": {
/* === container header === */
"head": {
"version": "1.2",
"class": "goal",
"subclass": "research_hypothesis",
"class_version": "1.0",
"class_id": "goal-v1.0",
"schema": "https://mesh.hypercortex.ai/schemas/container-v1.2.json",
"timestamp": "2025-10-10T15:32:00Z",
"tags": ["research", "collaboration"],
"ttl": "2025-11-10T00:00:00Z",
"container_did": "did:hmp:container:abc123",
"sender_did": "did:hmp:agent123",
"public_key": "BASE58(...)",
"recipient": ["did:hmp:agent456"],
"key_recipient": "BASE58(...)",
"broadcast": false,
"network": "",
"encryption_algo": "x25519-chacha20poly1305",
"sig_algo": "ed25519",
"signature": "BASE64URL(...)",
"compression": "zstd",
"payload_type": "encrypted+zstd+json",
"payload_hash": "sha256:abcd...",
"confidence": 0.84,
"magnet_uri": "magnet:?xt=urn:sha256:abcd1234..."
},
/* === cognitive metadata === */
"meta": {
/* e.g. provenance, references, context, confidence sources, `abstraction` and `axes` sections */
},
/* === semantic payload === */
"payload": {
/* Content depends on class */
},
/* === section with links to other containers === */
"related": {
"previous_version": ["did:hmp:container:abc122"],
"in_reply_to": ["did:hmp:container:msg-77"],
"see_also": ["did:hmp:container:ctx-31", "did:hmp:container:goal-953"],
"depends_on": ["did:hmp:container:goal-953"],
"extends": ["did:hmp:container:proto-01"],
"contradicts": ["did:hmp:container:ethics-22"]
}
},
/* === container backlink block === */
"referenced-by": {
"links": [
{ "type": "depends_on", "target": "did:hmp:container:abc123" }
],
"peer_did": "did:hmp:agent456",
"public_key": "BASE58(...)",
"sig_algo": "ed25519",
"signature": "BASE64URL(...)",
"referenced-by_hash": "sha256:abcd..."
},
/* === block of evaluations and additions for the container === */
"evaluations": {
"evaluations_hash": "sha256:efgh...",
"items": [
{ "value": -0.4, "type": "oppose", "target": "did:hmp:container:reason789", "timestamp": "2025-10-17T14:00:00Z", "agent_did": "did:hmp:agent:B", "sig_algo": "ed25519", "signature": "BASE64URL(...)" }
]
}
}
```
> *Agents MAY include non-standard fields in `head`, `meta` or `payload`; unrecognized fields MUST be safely ignored during deserialization and propagation.*
> Signature MUST be computed over the canonical serialized form of `hmp_container` (excluding signature itself).
> *Note: For readability, most examples in this specification show only the `head` and `payload` sections (often in a truncated version). Full containers may additionally include `meta`, `related`, `evaluations`, and `referenced-by` blocks.*
---
### 3.3 Required fields
| Field | Type | Description |
| -------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `head` | object | The section containing the container's header. |
| `head.version` | string | Version of the container specification. Defines the structural and semantic standard used (e.g., `"1.2"`). |
| `head.class` | string | Type of content (`goal`, `reputation`, `knowledge_node`, `ethics_case`, `protocol_goal`, etc.). Determines the schema for the `payload`. |
| `head.class_version` | string | Version of the specific container class. |
| `head.class_id` | string | Unique identifier of the class (usually formatted as `<class>_v<class_version>`). |
| `head.container_did` | string | Decentralized identifier (DID) of the container itself (e.g., `did:hmp:container:abc123`). |
| `head.schema` | string | Reference to the JSON Schema used to validate this container. |
| `head.sender_did` | string | DID identifier of the sending agent. |
| `head.timestamp` | datetime | Time of container creation (ISO 8601 extended format, UTC, e.g. "2025-11-04T10:15:00Z"). |
| `head.payload_hash` | string | Hash of the decompressed payload (`sha256:<digest>`). Used for content integrity verification. |
| `head.sig_algo` | string | Digital signature algorithm (default: `ed25519`). |
| `head.signature` | string | Digital signature of the container body. |
| `head.payload_type` | string | Type of payload data (`json`, `binary`, `mixed`). |
| `payload` | object | Core content of the container. The structure depends on the `class` and its schema definition. |
---
### 3.4 Optional fields
| Field | Type | Description |
| --------------------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `head.recipient` | array(string) | One or more recipient DIDs. |
| `head.key_recipient` | string | Symmetric encryption key, encrypted with the recipientβs public key. |
| `head.group_recipient` | array(object) | Multi-recipient hybrid-encryption envelopes. See section 3.19. |
| `head.broadcast` | bool | Broadcast flag. If `true`, the `recipient` field is ignored. |
| `head.tags` | array(string) | Thematic or contextual tags for the container. |
| `head.confidence` | float | Optional numeric field (0.0β1.0) indicating the agentβs subjective certainty regarding the payloadβs reliability. |
| `head.ttl` | datetime | Expiration time. Containers are not propagated after expiration. |
| `head.public_key` | string | Senderβs public key, if not globally resolvable via DID. |
| `head.compression` | string | Compression algorithm used for the payload (`zstd`, `gzip`). |
| `head.magnet_uri` | string | Magnet link pointing to the original or mirrored container. |
| `head.network` | string | Specifies the local propagation scope of the container: "localhost", "lan:\<subnet\>". An empty string ("") indicates Internet/global propagation. If set, broadcast is automatically considered false. |
| `head.subclass` | string | Optional subtype or specialization of the containerβs class. Enables agents to differentiate more specific container families (e.g. `"goal.research_hypothesis"`, `"quant.semantic_node"`). Inherits schema from the parent `class`. |
| `head.encryption_algo` | string | Algorithm used for payload encryption. |
| `related` | object | A general-purpose object describing **direct relationships** to other containers. All fields inside `related` are **arrays of DIDs**, supporting multiple links per relation type and open-ended semantic extension by agents. The following fields illustrate common link types but do **not represent an exhaustive list**. |
| `related.previous_versions` | array(string) | One or more container DIDs this container supersedes. Enables version branching and merging. |
| `related.in_reply_to` | array(string) | DIDs of containers this one replies to. Used for multi-source reasoning or discussion threads. |
| `related.see_also` | array(string) | References to related or contextual containers. |
| `related.depends_on` | array(string) | References to containers this one logically depends on. |
| `related.extends` | array(string) | References to containers that this one extends. |
| `related.contradicts` | array(string) | References to containers that this one contradicts. |
| `referenced-by` | object | Unsigned field generated locally by the agent based on received references. Contains a list of container DIDs **that refer to this container**. May be extended over time, thus requiring verification; used for local navigation. |
| `evaluations` | object | Optional field describing **aggregated evaluations or reactions** of other agents toward this container. Used for distributed reputation and interpretability. May evolve independently of the containerβs core data. |
| `meta` | object | Cognitive metadata block providing contextual, provenance, and coordinate information about the container. Includes creation context, sources, abstraction hierarchy (`meta.abstraction`), and cognitive-space coordinates (`meta.axes`). |
| `meta.abstraction` | object | Describes the **hierarchical position** of the container within a cognitive or semantic model (e.g. the Knowledge Genomeβs L1βL5 structure). Defines which abstraction layers the container belongs to and their relationships. |
| `meta.axes` | object | Defines the **coordinate position** of the container within a cognitive space. Each key represents a semantic axis (e.g., `axis-logos`), and its value defines the containerβs coordinate on that axis. |
> π‘ **Note:**
> Both `referenced-by` and `evaluations` are **virtual, locally extended blocks**.
> They are not included in the cryptographically signed portion of the container (`hmp_container`),
> allowing agents to maintain and exchange additional contextual or social metadata without modifying
> the original, immutable container structure.
---
### 3.5 Payload structure (`payload`)
> π§© This section defines a **recommended documentation format** for describing the `payload` fields of new or custom container classes.
> It serves as a **template for class specifications** (e.g., in extensions or protocol updates) and is **not a mandatory storage format**.
> Each containerβs payload is stored as a regular JSON object, and this section only standardizes *how its structure should be documented*.
---
The **payload** contains the semantic or operational data of the container.
It MUST be a valid JSON object whose structure and meaning are determined by the containerβs `class`.
Each container class (e.g. `goal`, `reputation`, `workflow_entry`) defines its own schema and validation rules.
Custom or experimental classes SHOULD document their payloads using the following template:
```
* key: field name
type: value type (string | number | boolean | object | array)
description: short purpose of the field
required: true/false
example: example value
```
**Example:**
```
* key: "title"
type: "string"
required: true
description: "Name of the goal"
example: "Improve local agent discovery"
* key: "priority"
type: "number"
required: false
description: "Importance or relevance score of the goal"
example: 0.82
* key: "dependencies"
type: "array"
required: false
description: "List of other goal container IDs this one depends on"
example: ["goal-953", "goal-960"]
```
> π‘ **Note:**
> The structure of `payload` is validated against the schema defined in the `schema` field of the container.
> Agents must be able to parse and process only those classes they explicitly support; unknown but valid containers are still preserved and propagated in store-and-forward mode.
---
### 3.6 Cognitive meta-structures (`meta`)
The `meta` section defines the **cognitive identity** of a container β its provenance, reasoning origin, and semantic coordinates
within both the *hierarchical abstraction tree* and the *cognitive space* (axes model).
It combines three layers of information:
1. **Provenance context** β who/what created the container and from which sources.
2. **Abstraction mapping** β how the container is positioned within the layered structure of knowledge.
3. **Cognitive coordinates** β where the container is located in the multidimensional semantic space.
---
#### Example
```json
"meta": {
"created_by": "PRIEST",
"agents_class": "Knowledge Genome",
"interpretation": "Derived from L3 technical analysis",
"workflow_entry": "did:hmp:container:workflow-4fbd1c",
"sources": [
{ "type": "container", "id": "did:hmp:container:fact-3abc2e", "credibility": 0.87, "weight": 0.6 },
{ "type": "resource", "id": "doi:10.48550/arXiv.2410.0123", "credibility": 0.83, "weight": 0.3 },
{ "type": "isbn", "id": "isbn 978-3-16-148410-0", "credibility": 0.92, "weight": 0.1 }
],
"abstraction": {
"agents_class": "Knowledge Genome",
"path": {
"L1": "did:hmp:container:abstraction-40af1c",
"L2": "did:hmp:container:abstraction-a7f0b3",
"L3": "did:hmp:container:abstraction-c91e0a"
}
},
"axes": {
"agents_class": "Knowledge Genome",
"did:hmp:container:axis-40aa1c": 742,
"did:hmp:container:axis-40ab1c": 512,
"did:hmp:container:axis-43aa1c": 322,
"did:hmp:container:axis-40aa3d": 142,
"did:hmp:container:axis-40aa4f": 12,
"did:hmp:container:axis-45aa5f": 54,
"did:hmp:container:axis-45fb5f": 321
}
}
```
---
#### Recommended fields
| Field | Type | Description |
| ---------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `created_by` | string | Indicates the role or origin of the container creator (e.g. `"PRIEST"`, `"AGENT"`, `"SYSTEM"`). |
| `agents_class` | string | Declares which cognitive framework or agent class generated this container (e.g. `"Knowledge Genome"`). |
| `sources` | array(object) | Provenance list describing the containers or resources contributing to this container. Each includes `{ "type": string, "id": string, "credibility": float, "weight": float }`. |
| `interpretation` | string | Human-readable summary of how this container was derived or interpreted. |
| `workflow_entry` | string | DID of a `workflow_entry` describing the reasoning process that led to creation. |
| `abstraction` | object | Describes the containerβs position in a hierarchical (tree-like) cognitive model. The number of levels (`L1`, `L2`, β¦) is **not fixed** and may vary by framework. |
| `axes` | object | Defines the containerβs coordinates within the cognitive space. Each key is a reference to an axis container, and each value represents a position along that axis. |
---
#### Structure: `meta.abstraction`
The `abstraction` block specifies **the hierarchical context** in which the container resides.
It reflects the logical or conceptual ancestry within the agentβs internal knowledge structure.
**Structure:**
```json
"abstraction": {
"agents_class": "Knowledge Genome",
"path": {
"L1": "did:hmp:container:abstraction-40af1c",
"L2": "did:hmp:container:abstraction-a7f0b3",
"L3": "did:hmp:container:abstraction-c91e0a"
}
}
```
| Field | Type | Description |
| -------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `agents_class` | string | Framework defining the abstraction hierarchy (e.g. `"Knowledge Genome"`). |
| `path` | object | Mapping of levels (`L1`, `L2`, `L3`, β¦) to abstraction-layer containers (`abstraction`). The number of levels is **variable** and not limited to L5. |
> π‘ **Interpretation:**
> Each level represents a conceptual refinement or implementation of the previous one.
> The topmost level (`L1`) usually contains fundamental principles, while deeper levels describe progressively more concrete instantiations.
---
#### Structure: `meta.axes`
The `axes` block defines **the spatial or semantic coordinates** of the container in the cognitive space β
a multi-dimensional system used to represent conceptual relations numerically or topologically.
**Structure:**
```json
"axes": {
"agents_class": "Knowledge Genome",
"did:hmp:container:axis-40aa1c": 742,
"did:hmp:container:axis-40ab1c": 512,
"did:hmp:container:axis-43aa1c": 322
}
```
| Field | Type | Description |
| -------------- | ------ | --------------------------------------------------------------------------------------------------------------------- |
| `agents_class` | string | Framework defining the coordinate system (e.g. `"Knowledge Genome"`). |
| `<axis_did>` | number | Coordinate value on the given axis. Axes are referenced by their container DIDs (e.g., `axis-logos`, `axis-chronos`). |
> π‘ **Interpretation:**
> Each axis defines an independent semantic dimension.
> Together, they form a vector representation of the containerβs cognitive βpositionβ β
> enabling reasoning based on semantic proximity, clustering, or gradient-based knowledge inference.
---
#### Cognitive Interpretation
* `meta.abstraction` β defines a **tree-like structure** that anchors the container in hierarchical reasoning.
* `meta.axes` β defines a **spatial structure** that positions the container in a semantic coordinate space.
* Together, they form the **Cognitive Signature**, enabling agents to:
* perform semantic proximity and relevance search,
* infer hierarchical relationships,
* align reasoning contexts across frameworks (e.g. between Knowledge Genomes of different agents).
---
#### Notes
* Both `meta.abstraction` and `meta.axes` **may include `agents_class`** if different from the parent `meta`.
* Updates to referenced containers (e.g. `abstraction` or `axes`) **do not alter** existing containers automatically β
agents must periodically verify linked versions and synchronize updates.
* Agents are encouraged to cache and periodically refresh cognitive maps to maintain coherence.
* The combination of `meta.abstraction` and `meta.axes` defines a full **Cognitive Position Vector** β
the unique, reproducible semantic coordinates of a container within the Mesh.
---
### 3.7 Container signature
1. The **digital signature** applies to the canonical JSON representation of the entire `hmp_container` object,
**excluding** the `signature` field itself.
This ensures that all metadata, relations, and payload hashes are **cryptographically bound** and cannot be
modified without invalidating the signature.
2. The canonical representation (`canonical_json(hmp_container)`) **must** be computed deterministically
according to the following rules:
* All object keys are **sorted lexicographically** (ascending order, Unicode code point order).
* Objects and arrays are serialized in standard JSON form **without extra whitespace** or indentation.
* Strings are encoded in **UTF-8** with escaped control characters.
* Numeric values are serialized in plain JSON numeric format (no leading zeros, fixed `.` decimal separator).
* The `signature` field itself is omitted during signing and verification.
* The result is a **byte sequence** identical across implementations.
3. The default digital signature algorithm is **Ed25519**.
Alternative algorithms may be used if declared explicitly in the `sig_algo` field.
4. If the container includes a `public_key` field, signature verification **may be performed locally**,
without consulting a global DID registry.
5. Upon receiving a container, an agent **must verify** that the provided public key matches the
registered key associated with the senderβs DID to prevent key substitution attacks.
* If the senderβs DIDβkey mapping is unknown, the agent should query neighboring peers to confirm the association (`sender_did β public_key`).
> π **Note:**
> Signature validation applies only to the canonical form of the `hmp_container`
> and does **not cover** dynamically generated or external fields such as `referenced-by` or `evaluations`.
> This allows agents to augment the local knowledge graph without altering the immutable container core.
---
### 3.8 Compression (`compression`)
1. The `compression` field specifies the algorithm used to compress the containerβs payload.
Supported algorithms include `zstd`, `gzip`, or others declared in the HMP registry.
2. **Compression is performed before computing** the `payload_hash` and generating the `signature`.
This ensures that both the hash and signature refer to the compressed representation of the payload.
3. For verification, the payload must be **decompressed first**,
after which the hash is recalculated and compared against the stored `payload_hash`.
> βοΈ **Implementation note:**
> Agents must advertise supported compression algorithms during the handshake phase
> Unsupported containers should still be stored and relayed unmodified
> in βstore & forwardβ mode.
---
### 3.9 Encryption (`encryption_algo`)
1. When the `recipient` field is present, the container may use **hybrid encryption**, providing confidentiality of the `payload` while preserving verifiable metadata.
2. The encryption algorithm is specified in `encryption_algo`.
Recommended values:
* `x25519-chacha20poly1305`
* `rsa-oaep-sha256`
3. **Container encryption process:**
1. Construct the `payload`.
2. Apply compression (`compression`, if specified).
3. Generate a random symmetric key.
4. Encrypt the compressed payload with the symmetric key.
5. Encrypt the symmetric key with the recipientβs **public key** β store the result in `key_recipient`.
6. Compute `payload_hash` over the **encrypted and compressed** payload.
7. Sign the container (the entire structure except for the `signature` field).
4. **Verification** of the container is performed on the encrypted form of the payload and **does not require decryption**.
5. **Relevant fields:**
| Field | Type | Description |
| ----------------- | ------ | -------------------------------------------------------------------------------------- |
| `encryption_algo` | string | Algorithm used for payload encryption. |
| `key_recipient` | string | Symmetric key encrypted with the recipientβs public key (hybrid encryption envelope). |
| `payload_type` | string | Recommended prefix `encrypted+` (e.g., `encrypted+zstd+json`). |
6. **Recipient fields:**
* When `recipient` is used, exactly one recipient MUST be specified.
* For encrypted delivery to multiple recipients, the `group_recipient` mechanism (see 3.19) MUST be used.
> βοΈ **Note:** Agents may forward encrypted containers even if they cannot decrypt them, maintaining store-and-forward behavior.
---
### 3.10 Container verification
1. Check for the presence of all required fields.
2. Validate `timestamp` (must not be in the future).
3. If `ttl` is set β mark the container as **expired** after its expiration time.
4. Compute `sha256(payload)` and compare with the stored `payload_hash`.
5. Verify the digital signature using `sig_algo` (default: Ed25519).
6. Validate the container schema (`class` must correspond to a known or registered schema).
* For compatibility: if an agent does not recognize the `class`, but the container passes the [base schema](https://github.com/kagvi13/HMP/tree/main/docs/schemas/container-v1.2.json), it **must still store and forward** the container.
7. Optionally, periodically query for containers referencing the current one as `previous_version`
to detect potential updates or forks.
8. When multiple versions exist, the valid one is the one that has received
**confirmation from a majority of trusted nodes (consensus at DHT level).**
---
### 3.11 Container as a universal message
Any container can serve as a **context** (`in_reply_to`) for another container.
This enables a unified structural model for **discussions**, **votes**, **messages**, **hypotheses**, **arguments**, and other forms of cognitive exchange.
Chains of `in_reply_to` form a **dialectical reasoning tree**, where each branch represents an evolution of thought β
a clarification, counterpoint, or refinement of a previous idea.
This makes HMP discussions and consensus processes inherently **non-linear**, **self-referential**, and **evolving**.
> In essence, **all interactions between agents in HMP** are represented as an interconnected web of containers,
> collectively forming a **cognitive graph of reasoning**.
---
### 3.12 Versioning and lineage
Containers in HMP support semantic evolution through the field `related.previous_version`.
This mechanism preserves the continuity and traceability of meaning across updates and revisions.
* A descendant container is considered **authentic** if it is signed by the same DID as the author of its `previous_version`.
* If the author or signature differs, the descendant **may still be accepted** as legitimate when a **sufficient portion of trusted peers** acknowledge it as a valid continuation.
(The precise quorum threshold is determined by the agentβs local policy or the Mesh Consensus Protocol.)
* Agents are required to retain at least one previous version of each container for compatibility and integrity verification.
* A single container may have **multiple descendants** (alternative branches) that diverge by time, authorship, or interpretation.
In such scenarios, branch priority or relevance is determined via local heuristics or consensus mechanisms.
* Divergent descendants are treated as **semantic forks** β parallel evolutions of a shared idea within the distributed cognitive graph.
> Versioning in HMP thus reflects not only data persistence,
> but also the *evolution of ideas* across agents and time.
---
### 3.13 TTL and validity
The `ttl` field defines the **validity period** of a container (for example, for `DISCOVERY` messages).
If `ttl` is **absent**, the container is considered valid **until a newer version appears**, in which the current container is referenced as `previous_version`.
After expiration, the container **remains archived** but is **not subject to retransmission** in the active network.
---
### 3.14 Extensibility
* The addition of new fields is allowed as long as they **do not conflict** with existing field names.
* Containers of newer versions **must remain readable** by nodes supporting older versions.
* When new container classes (`class`) are introduced, they should be **registered** in the public schema registry (`/schemas/container-types/`).
* For containers describing **protocol specifications**, it is recommended to use the `protocol_` prefix, followed by the domain of application (e.g., `protocol_goal`, `protocol_reputation`, `protocol_mesh_handshake`, etc.).
---
### 3.15 Related containers
#### 3.15.1 Purpose
The `related` field is designed to describe **direct relationships between containers** β both logical and communicative.
It allows an agent or network node to understand the context of origin, dependencies, and semantic links of a container without relying on external indexes.
#### 3.15.2 Structure
```json
"related": {
"previous_version": "did:hmp:container:abc122",
"in_reply_to": ["did:hmp:container:msg-77"],
"see_also": ["did:hmp:container:ctx-31", "did:hmp:container:goal-953"],
"depends_on": ["did:hmp:container:goal-953"],
"extends": ["did:hmp:container:proto-01"],
"contradicts": ["did:hmp:container:ethics-22"]
}
```
The `related` field is an object where:
* the **key** defines the type of relationship (e.g., `depends_on`, `extends`, `see_also`);
* the **value** represents one or more container identifiers (DIDs).
All relationships are considered *direct* β meaning they originate from the current container toward others.
---
#### 3.15.3 Supported link types
| Link Type | Meaning |
| ------------------ | ------------------------------------------------------------------------- |
| `previous_version` | Points to the previous version of this container. |
| `in_reply_to` | Indicates a response to the referenced containers. |
| `see_also` | Refers to related or contextual containers. |
| `depends_on` | Depends on the contents of the referenced container (e.g., goal or data). |
| `extends` | Expands or refines the referenced container. |
| `contradicts` | Provides a refutation, objection, or alternative viewpoint. |
---
#### 3.15.4 Custom link types
Additional custom link types may be used beyond those listed in the table, provided that:
* they follow the same general syntax (`string` or `array[string]`);
* they may optionally include a **namespace** for disambiguation:
```json
"related": {
"hmp:depends_on": ["did:hmp:container:goal-953"],
"opencog:extends": ["did:oc:concept:122"]
}
```
* their meaning is consistently interpretable by agents within the specific network or application context.
---
#### 3.15.5 Example
```json
"related": {
"previous_version": "did:hmp:container:abc122",
"depends_on": ["did:hmp:container:goal-953"],
"extends": ["did:hmp:container:proto-01"],
"see_also": ["did:hmp:container:ctx-31", "did:hmp:container:goal-953"]
}
```
> βοΈ The `related` field is **not** intended to store *reverse links* β see `referenced-by`.
---
### 3.16 Virtual backlinks (`referenced-by`)
Each container may include an **auxiliary signed block** called `referenced-by`, indicating **which other containers refer to it**.
This block is **not part of the original container payload** and can be **generated, transmitted, and verified independently**.
#### 3.16.1 General principles
* **Detached and updatable** β `referenced-by` is maintained as a separate signed structure associated with the container.
* **Generated by agents** β created or updated locally by an agent during analysis of references (`in_reply_to`, `see_also`, `relations`, etc.) found in other containers.
* **Signed by the reporting agent** β the agent producing the block signs its content to confirm the observed backlinks.
* **Verifiable by peers** β other agents may validate the links, check the signature, and reconcile differences based on their own data.
* **Does not modify the original container** β `referenced-by` is an external computed attribute and does not affect the integrity of the original container.
**Data type:** object, consisting of verifiable backlinks and metadata.
Example:
```json
"referenced-by": {
"links": [
{ "type": "depends_on", "target": "did:hmp:container:abc123" },
{ "type": "see_also", "target": "did:hmp:container:def456" }
],
"peer_did": "did:hmp:agent456",
"public_key": "BASE58(...)",
"sig_algo": "ed25519",
"signature": "BASE64URL(...)",
"referenced-by_hash": "sha256:abcd..."
}
```
> The `referenced-by` block is a **cryptographically verifiable statement** describing which containers are known to reference the current one.
> The blockβs content may differ between peers, reflecting local knowledge and network coverage.
> Note:
> Future extensions may introduce alternative, more compact representations of `referenced-by.links` to improve merge efficiency and reduce verbosity.
#### 3.16.2 Structure definition
| Field | Type | Description |
| -------------- | ------------- | ---------------------------------------------------------------------------------------------------------------- |
| `links` | array\<object\> | List of backlinks; each object includes a `type` (semantic relation) and a `target` (referencing container DID). |
| `peer_did` | string | DID of the agent that generated and signed the block. |
| `public_key` | string | Public key corresponding to the signing key. |
| `sig_algo` | string | Signature algorithm (e.g., `ed25519`). |
| `signature` | string | Base64URL-encoded signature of the canonical serialized `links` section (or `referenced-by_hash`). |
| `referenced-by_hash` | string | SHA-256 checksum of the canonicalized `links`; used to verify integrity before signature validation. |
> **Recommendation:**
> `referenced-by_hash = sha256(canonical_json(links))`
> This allows agents to efficiently compare or cache `referenced-by` states without re-verifying signatures.
#### 3.16.3 Operation principle
1. The agent receives or updates container `[C1]`.
2. It analyzes other known containers [C2..Cn] that reference [C1] through their `relations` field.
3. A local `referenced-by` block is formed:
```json
"referenced-by": {
"links": [
{ "type": "in_reply_to", "target": "did:hmp:container:C2" },
{ "type": "depends_on", "target": "did:hmp:container:C3" }
],
"peer_did": "did:hmp:agentA",
...
}
```
4. The block is serialized canonically, hashed (`referenced-by_hash`), and signed with the agentβs key.
5. When receiving other versions of the block (from different peers), the agent may:
* merge verified backlinks;
* remove invalid or outdated entries;
* update its own signed version.
6. If inconsistencies are detected (e.g., a backlink claims a relation that does not exist), the agent may:
* reject or locally remove that link;
* **optionally** notify the source peer to review the data.
#### 3.16.4 Example
| Agent | reported backlinks for `[C1]` |
| -------------------- | ----------------------------- |
| A (`did:hmp:agentA`) | [C2], [C3] |
| B (`did:hmp:agentB`) | [C4], [C5] |
| C (`did:hmp:agentC`) | [C6], [C7] |
Agent D aggregates and verifies them:
```json
"referenced-by": {
"links": [
{ "type": "depends_on", "target": "did:hmp:container:C2" },
{ "type": "depends_on", "target": "did:hmp:container:C3" },
{ "type": "see_also", "target": "did:hmp:container:C4" },
{ "type": "see_also", "target": "did:hmp:container:C5" },
{ "type": "in_reply_to", "target": "did:hmp:container:C6" }
],
"peer_did": "did:hmp:agentD",
"sig_algo": "ed25519",
"signature": "BASE64URL(...)",
"referenced-by_hash": "sha256:..."
}
```
If container `[C7]` does not actually reference `[C1]`, it is excluded before signing.
#### 3.16.5 Usage
* Enables reconstruction of **discussion graphs**, **dependency networks**, and **update chains**.
* Supports **cross-agent validation** of reference structures.
* Accelerates discovery of related containers without full history queries.
* Facilitates **consensus analysis** and **branch visualization**.
* The agent periodically **recomputes and re-signs** the `referenced-by` block using local or peer-provided data.
---
### 3.17 `Evaluations`
The `evaluations` field is **optional** and represents **aggregated reactions from other agents** to the given container.
Each evaluation is created by an agent as a **signed record** referencing a justification container (`target`), in which the agent explains their position (argument, addition, or alternative).
The `evaluations_hash` is used to verify the integrity of the list without requiring full retransmission upon every update.
```json
"evaluations": {
"evaluations_hash": "sha256:efgh...",
"items": [
{
"value": -0.4,
"type": "oppose",
"target": "did:hmp:container:reason789",
"timestamp": "2025-10-17T14:00:00Z",
"agent_did": "did:hmp:agent:B",
"sig_algo": "ed25519",
"signature": "BASE64URL(...)"
}
]
}
```
---
#### Field description
| Field | Type | Description |
| ------------------ | ------ | -------------------------------------------------------------------- |
| `evaluations_hash` | string | Hash of the evaluation list. Used to detect differences during sync. |
| `items` | array | List of signed evaluations. |
---
#### Structure of `items[]`
| Field | Type | Description |
| ----------- | ---------------------- | ------------------------------------------------------------------------------ |
| `value` | number (-1.0 β¦ +1.0) | Numeric expression of the agentβs attitude toward the container. |
| `type` | string | Type of evaluation (see table below). |
| `target` | string (container DID) | Reference to the justification container (argument, addition, or alternative). |
| `timestamp` | string (ISO 8601) | Time when the evaluation was created. |
| `agent_did` | string | Identifier of the agent who created the evaluation. |
| `sig_algo` | string | Signature algorithm (e.g., `ed25519`). |
| `signature` | string | Digital signature confirming the authenticity of the evaluation. |
The signature is calculated over the concatenated string:
```
value + ", " + type + ", " + target + ", " + timestamp + ", " + agent_did
```
using the algorithm specified in `sig_algo`.
---
#### Minimal set of `type` values
| Value | Meaning |
| --------- | -------------------------------------------- |
| `support` | Agreement or positive evaluation. |
| `oppose` | Disagreement or negative evaluation. |
| `extend` | Non-contradictory addition to the container. |
| `replace` | Suggestion of an alternative version. |
| `comment` | Neutral note or clarification. |
Agents may define their own custom types if they are reasonably interpretable by others (e.g., `revise`, `clarify`).
---
#### Synchronization principles
1. Each evaluation is signed **individually by an agent**, and one agent can have **only one active evaluation** per container.
2. If an agent changes their opinion, they issue a **new record** with a later `timestamp`.
3. **Evaluation blocks** can be **propagated** in the network similarly to the `referenced-by` block.
They are bound to a container but may also be transmitted **independently**, if the target container is already present at the recipient.
4. When an agent receives a new evaluation block, it compares the `evaluations_hash` with its local version.
If the hashes differ, this indicates a **divergence in evaluation state**, which may trigger **re-synchronization** or a **request for the updated block** from peers.
---
#### Note
The `evaluations` field is not mandatory β it is added **at the agentβs discretion** when feedback or evaluations have been collected from the Mesh network.
Thus, a container may exist independently of othersβ opinions, but agents may include aggregated perception data to represent how the container is viewed across the network.
---
### 3.18 Usage of `network` and `broadcast` fields
The `network` field is introduced to control container propagation in both local and global environments.
It allows restricting the delivery scope of a container and defines which transmission methods should be used by the agent.
#### 3.18.1 General Rules
* If the `network` field is not empty, the container is intended for a **local environment** (e.g., `"localhost"`, `"lan:<subnet>"`) and is not automatically broadcast to the global Mesh.
Local transmission to a specific `recipient` within the same network is allowed, including encrypted delivery.
If `broadcast` is `true`, the container is visible to all nodes in that local segment.
* If the `network` field is empty (`""`), the container can be broadcast to the **global Mesh** using standard DID addressing and routing mechanisms.
#### 3.18.2 Possible values of `network`
| Value | Description |
| ----------------------- | ------------------------------------------------------------------------------------------- |
| `""` | The container is allowed to propagate within the global Mesh. |
| `"localhost"` | The container is intended only for agents running on the same host. |
| `"lan:192.168.0.0/24"` | The container is intended for agents within the specified local subnet. |
> β οΈ **Note:**
> When a container is restricted by the `network` field (e.g., `localhost` or `lan:*`),
> agents distribute it using **local discovery mechanisms** β such as IPC, UDP broadcast, multicast, or direct TCP connections.
> This is necessary because DID addresses of other agents in the local network may not yet be known.
#### 3.18.3 Examples
1. **Global Mesh Delivery:**
```json
"head": {
"broadcast": true,
"network": "",
"recipient": []
}
```
The container can propagate across the entire Mesh without restrictions.
2. **Local Host:**
```json
"head": {
"broadcast": false,
"network": "localhost",
"recipient": []
}
```
The container is delivered only to other agents running on the same host using local communication channels.
3. **LAN Subnet:**
```json
"head": {
"broadcast": true,
"network": "lan:192.168.0.0/24",
"recipient": []
}
```
The container is intended for agents within the `192.168.0.0/24` subnet.
Delivery is performed via local networking mechanisms (UDP discovery, broadcast/multicast).
#### 3.18.4 Specifics
* The `network` field defines the **scope of the container**, while `broadcast` determines whether broadcasting is allowed **within that scope**.
* When needed, an agent may create **multiple containers** for different subnets if it operates with several LAN interfaces or in isolated network segments.
* Containers intended for local networks remain **structurally compatible with the global Mesh infrastructure**, but their delivery is restricted to local channels.
* Although the mechanism was initially designed for **local node discovery and synchronization**,
it can also be used for **private communication within home or corporate environments**,
ensuring that containers **do not leave the local network** and are **not transmitted to the Internet**.
---
### 3.19 Multi-recipient encrypted containers (`group_recipient`)
To enable encrypted delivery to multiple recipients, HMP containers MAY include the optional field:
```json
"group_recipient": [
{
"recipient": "did:hmp:agent456",
"key_recipient": "BASE58(...)"
},
{
"recipient": "did:hmp:agent457",
"key_recipient": "BASE58(...)"
}
]
```
**Semantics:**
1. A single symmetric key is generated for the payload.
2. For each listed recipient, this symmetric key is encrypted with that recipientβs public key and placed in `key_recipient`.
3. All recipients receive the SAME encrypted payload and decode it independently using their individual key envelopes.
**Rules:**
* `group_recipient` MUST NOT be used together with the `head.recipient` and `head.key_recipient` fields.
* The header remains public; only the payload is encrypted.
* The container is signed once by the sender β no shared signing keys are required.
* Nodes SHOULD deliver the container to every DID listed in `group_recipient`.
This mechanism provides efficient **multicast-style encrypted messaging**, fully compatible with the existing container structure and hybrid encryption scheme.
---
## 4. Network foundations
### Note on DHT/NDP unification
Starting from **HMP v5.0**, the previous distinction between the *Distributed Hash Table (DHT)* and the *Node Discovery Protocol (NDP)* has been merged into a single, unified **networking foundation**.
This unified layer now covers:
* distributed lookup and routing;
* peer discovery (including interest-based search);
* signed Proof-of-Work (PoW) announcements;
* controlled container propagation via `network` and `broadcast` fields.
Together, these mechanisms form the **communication backbone** of the Mesh, enabling secure, scalable, and topology-independent interaction between agents.
---
### Network topology overview
```mermaid
flowchart TD
title["**Network Topology Overview**"]
direction TB
Agent[Agent Core: <br>DID + Keypair + PoW]
Container[HMP Container: <br>network field / broadcast]
Local[Local Channel: <br>Β«networkΒ»]
Global[Global Mesh: <br>Β«broadcastΒ»]
Localhost[localhost]
LAN[LAN Subnet: <br>Β«lan:192.168.*Β»]
Internet[Internet]
Overlay[Overlay Nodes: <br>Yggdrasil / I2P]
Agent --> Container
Container --> Local
Container --> Global
subgraph LocalChannel["Local Channel Network"]
direction TB
Local --> Localhost
Local --> LAN
end
subgraph GlobalChannel["Global Mesh Network"]
direction TB
Global --> Internet
Global --> Overlay
end
```
> The `network` field defines **local propagation scope** (host, LAN, overlay),
> while the `broadcast` flag enables **global Mesh distribution**.
---
### 4.1 Node identity and DID structure
Each agent in HMP possesses a **Decentralized Identifier (DID)** that uniquely represents its identity within the Mesh.
A DID is cryptographically bound to a **public/private key pair**, forming the immutable `(DID + pubkey)` association.
An agent may have multiple *network interfaces* (LAN, Internet, overlay), but must maintain **one stable identity pair** across all of them.
---
#### DID invalidation
A DID may be explicitly invalidated by its owner by publishing a `peer_announce` with
`key_is_falsified = true` in the `payload` block.
The revocation announcement MUST be signed with the (now compromised) private key associated with the DID.
After such publication:
* the DID is considered revoked,
* all new containers signed with the old key MUST be ignored,
* nodes SHOULD refuse further routing to that DID.
A new DID MUST be generated for continued operation.
---
### 4.2 Peer addressing and Proof-of-Work (PoW)
To prevent flooding and spoofing, each announced address is accompanied by a **Proof-of-Work** record proving the legitimacy and activity of the publishing node.
**Address format**
```json
{
"addr": "tcp://1.2.3.4:4000",
"nonce": 123456,
"pow_hash": "0000abf39d...",
"difficulty": 22
}
```
**Supported address types**
| Type | Description |
| -------------- | --------------------------------------------- |
| `localhost` | Localhost-only interface. |
| `lan:<subnet>` | Local subnet (e.g., `lan:192.168.10.0`). |
| `internet` | Global TCP/UDP connectivity. |
| `yggdrasil` | Overlay-based address for Yggdrasil networks. |
| `i2p` | Encrypted I2P overlay routing. |
**Rules:**
* If `port = 0`, the interface is inactive.
* Newer records (by `timestamp`) replace older ones after PoW verification.
* Local interfaces should not be shared globally (except Yggdrasil/I2P).
#### Mailman relay chain
Agents MAY include a `mailman` list in the `payload` block inside `peer_announce`, representing intermediate relay nodes that are willing to forward direct messages addressed to this agent.
The `mailman` chain provides:
* delivery support for NATed or intermittently connected nodes,
* optional anonymization of senderβreceiver paths,
* redundancy for unreliable network segments.
`mailman` is an advisory routing hint and does not impose any specific transport requirements.
---
### 4.3 Proof-of-Work (PoW) formalization
PoW ensures that each node expends limited computational effort before publishing or updating an address record.
```
pow_input = DID + " -- " + addr + " -- " + nonce
pow_hash = sha256(pow_input)
```
* All values are UTF-8 encoded.
* `difficulty` defines the number of leading zeroes in the resulting hash.
* Typical difficulty should take a few minutes to compute on a standard CPU.
---
### 4.4 Signing and verification
Each announcement is cryptographically signed by its sender within the framework of the basic protocol. Container verification includes PoW validation for the address payloads.
**Verification steps:**
1. Validate the digital signature using the stored public key.
2. Recompute `pow_hash` and verify the difficulty threshold.
---
### 4.5 Connection establishment
Agents can communicate using various transport mechanisms:
| Protocol | Description |
| ----------- | ------------------------------------------------------------- |
| **QUIC** | Recommended default (encrypted, low-latency, UDP-based). |
| **WebRTC** | For browser or sandboxed environments. |
| **TCP/TLS** | Fallback transport for secure long-lived sessions. |
| **UDP** | Lightweight, primarily for LAN discovery or local broadcasts. |
Each agent maintains an **active peer list**, updated dynamically through signed announcements and PoW-validated exchanges.
Agents **store peer containers with verified addresses** and redistribute them according to their declared `network` fields.
---
### 4.6 Data propagation principles
Containers and discovery records are propagated through distributed lookup and gossip mechanisms, respecting:
* `ttl` β Time-to-live for validity;
* `network` β scope of propagation;
* `broadcast` β determines whether rebroadcasting is allowed;
* `pow` β ensures anti-spam protection.
Agents announce themselves via **peer_announce** containers and may respond with **peer_query** containers.
---
### 4.7 Example: `peer_announce` container
```json
{
"head": {
"class": "peer_announce",
"pubkey": "base58...",
"container_did": "did:hmp:container:dht-001",
"sender_did": "did:hmp:agent123",
"timestamp": "2025-09-14T21:00:00Z",
"network": "",
"broadcast": true,
"sig_algo": "ed25519",
"signature": "BASE64URL(...)"
},
"payload": {
"name": "Agent_X",
"interests": ["ai", "mesh", "ethics"],
"expertise": ["distributed-systems", "nlp"],
"roles": ["relay", "mailman", "pubsub-hub"],
"addresses": [
{
"addr": "tcp://1.2.3.4:4000",
"nonce": 123456,
"pow_hash": "0000abf39d...",
"difficulty": 22
}
]
}
}
```
---
### 4.8 Interest-based discovery
Agents MAY publish **tags** such as `interests`, `topics`, `expertise`, or **functional roles** (`roles`)
to facilitate semantic peer discovery and adaptive message routing.
Interest-based discovery operates atop the DHT: agents index themselves by declared attributes,
enabling targeted lookup of peers that share interests or fulfill specific functions (e.g., relay, pubsub-hub, archive).
**Example of indicating `interests`, `expertise`, and `roles` in a query container:**
```json
{
"head": {
"class": "peer_query",
"network": "lan:192.168.0.0/24"
},
"payload": {
"interests": ["neuroscience", "ethics"],
"expertise": ["distributed-systems", "nlp"],
"roles": ["relay", "mailman", "pubsub-hub"]
}
}
```
**Query Semantics**
| Field | Description |
| ----------- | ----------------------------------------------------------------------------------- |
| `interests` | Thematic domains of agent activity. |
| `expertise` | Declared areas of competence or specialization. |
| `roles` | Functional participation types (`relay`, `mailman`, `pubsub-hub`, `archive`, etc.). |
| `topics` | Optional topic strings for pub/sub routing. |
All fields are **optional** β agents MAY specify any subset of them.
Queries MAY combine multiple filters; matching is **fuzzy and semantic**, using DHT indexing plus tag similarity and trust-weighted ranking.
In response to a query, agents simply forward existing `peer_announce` containers of relevant peers. It is also advisable to send a `container_response` (section 5.2.2 of the specification) with a list of these containers. This approach maintains container uniformity and leverages existing DHT propagation mechanisms.
> **Note:** Declared roles also allow agents to advertise themselves as relays or other network functions, forming a direct bridge between the **discovery layer** and **Message Routing & Delivery (MRD)**.
---
### 4.9 Network scope control (`network` and `broadcast`)
The `network` field defines the containerβs propagation domain
(local, LAN, or global).
For details and examples, see **section 3.15** β *Usage of `network` and `broadcast` fields*.
---
### 4.10 Transition from DHT spec v1.0
* **Merged DHT + NDP** β unified under one networking layer.
* **Container-based format** replaces raw JSON messages.
* **Interests/topics/expertise** fields introduced for contextual discovery.
---
## 5. Mesh Container Exchange (MCE)
The **Mesh Container Exchange (MCE)** mechanism is designed for discovering, requesting, and exchanging containers between agents in a distributed network.
It provides **container synchronization without duplication** while considering network constraints (`broadcast`, `network`).
*MCE does not mandate request-response semantics.*
---
### 5.1 General principles
1. Each agent maintains a **Container Index** β a set of minimal metadata describing which containers are available in its storage and how they are cognitively positioned.
The index is represented as an HMP container with the class `container_index`.
---
2. Example structure of a *Container Index*:
```json
{
"head": {
"class": "container_index",
"version": "5.0",
"container_did": "did:hmp:container:index:agent123",
"sender_did": "did:hmp:agent:agent123",
"signature": "BASE64URL(...)",
"payload_hash": "sha256:abcd..."
},
"payload": {
"did:hmp:container:abc123": {
"head": {
"class": "goal",
"sender_did": "did:hmp:agent123",
"public_key": "BASE58(...)",
"sig_algo": "ed25519",
"signature": "BASE64URL(...)",
"payload_hash": "sha256:abcd...",
"tags": ["research", "collaboration"]
},
"meta": {
"created_by": "AGENT",
"agents_class": "Knowledge Genome",
"abstraction": {
"agents_class": "Knowledge Genome",
"path": {
"L1": "did:hmp:container:abstraction-40af1c",
"L2": "did:hmp:container:abstraction-a7f0b3"
}
},
"axes": {
"did:hmp:container:axis-40aa1c": 512,
"did:hmp:container:axis-40ab1c": 321
}
},
"related": {
"in_reply_to": ["did:hmp:container:msg-77"],
"depends_on": ["did:hmp:container:goal-953"]
},
"referenced-by_hash": "sha256:abcd...",
"evaluations_hash": "sha256:abcd..."
}
}
}
```
---
3. The index includes the following fields per container:
| Field | Description |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `head` | Minimal header subset describing the containerβs identity, authorship, and integrity. Includes at least: `class`, `sender_did`, `public_key`, `sig_algo`, `signature`, `payload_hash`, and optionally `tags`. |
| `meta` | Compact version of the cognitive metadata block (see below). Used for structural and semantic synchronization across agents. |
| `related` | Structural relationships (`depends_on`, `in_reply_to`, etc.). Enables navigation between interconnected containers. |
| `referenced-by_hash` | Hash of the local `referenced-by` block, summarizing inbound reference links from other containers (used for quick verification of backlink integrity). |
| `evaluations_hash` | Hash of the local `evaluations` block, aggregating external evaluations or reactions toward this container (used for reputation and consensus updates). |
> The `head` section here is a **lightweight mirror** of the original container header, containing only the minimal set of fields needed for identity verification and index synchronization.
> Other blocks (`meta`, `related`, `referenced-by_hash`, `evaluations_hash`) provide context for cognitive alignment and reputation tracking.
> The `related` block in a `container_index` SHOULD include **all relation fields** from the original container.
>
> **Rationale:**
> * Enables efficient graph traversal without fetching full containers.
> * Simplifies local construction of dependency or semantic graphs.
> * Keeps search and semantic query capabilities consistent.
---
4. **Meta publication policy**
The `meta` section in the index contains only **high-level structural data** necessary for cognitive synchronization:
| Field | Published in index | Notes |
| ---------------- | ------------------ | ------------------------------------------------------------------------- |
| `created_by` | β
| Identifies the cognitive role of the creator. |
| `agents_class` | β
| Indicates the cognitive framework (e.g., βKnowledge Genomeβ). |
| `abstraction` | β
| Published **as a flattened path** (only DIDs of referenced abstractions). |
| `axes` | β
| Published **as a reduced vector** (only axis DIDs and numeric values). |
| `sources` | β | Omitted to avoid unnecessary verbosity and sensitive references. |
| `interpretation` | β | Optional; can be omitted or truncated to a short summary. |
| `workflow_entry` | β | Internal reference; published only if relevant to coordination workflows. |
> This ensures that container indices can be used for **cognitive map synchronization**
> β allowing agents to discover and align knowledge structures (`meta.abstraction`) and semantic coordinates (`meta.axes`)
> without downloading full containers.
---
5. **Synchronization rules**
* An agent does not reload a container if the combination `container_did + signature + payload_hash` is already known and verified.
* When an index update includes a container with a **different meta.abstraction or meta.axes**, the agent may trigger a **cognitive map update** (refreshing local `abstraction` and `axes` references).
* Agents SHOULD store and compare `meta.abstraction` and `meta.axes` separately from other metadata to support incremental updates of cognitive topology.
---
6. **Cognitive rationale**
By publishing the `meta` field inside `container_index`, agents can perform **structural synchronization** β aligning conceptual layers and semantic coordinates before exchanging full payloads. This dramatically reduces traffic and enables lightweight **semantic discovery** across distributed Mesh networks.
---
### 5.2 Message types
The following subsections define the canonical message container types used for inter-agent communication within CogSync.
Each message type is expressed as an HMP container with a specific `class` in its `head`.
| Message Type | Purpose |
| -------------------- | -------------------------------------------------------------------------------------------------------- |
| `container_request` | Request one or more containers (or their parts) by DID. |
| `container_response` | Response to a request β includes a list of containers ready for sending. Containers are sent separately. |
| `container_index` | Publication of the agent's container index (see *General Principles*). |
| `container_delta` | Incremental index update (new or modified containers). |
| `container_ack` | Acknowledgment of successful container reception. |
---
#### 5.2.1 Container `container_request`
Agent A requests containers and/or only `referenced-by` / `evaluations` records from Agent B:
```json
{
"head": {
"type": "container_request",
"sender_did": "did:hmp:agent:A",
"recipient": "did:hmp:agent:B"
},
"payload": {
"request_container": [
"did:hmp:container:abc123",
"did:hmp:container:def456"
],
"request_referenced-by": [
"did:hmp:container:abc123",
"did:hmp:container:def456"
],
"request_evaluations": [
"did:hmp:container:abc123",
"did:hmp:container:def456"
]
}
}
```
---
#### 5.2.2 Container `container_response`
Agent B informs which containers it is ready to send.
The containers themselves are transmitted in separate messages:
```json
{
"head": {
"type": "container_response",
"sender_did": "did:hmp:agent:B",
"recipient": "did:hmp:agent:A"
},
"payload": {
"available": [
{
"container_did": "did:hmp:container:abc123",
"signature": "BASE64URL(...)"
},
{
"container_did": "did:hmp:container:def456",
"signature": "BASE64URL(...)"
}
]
}
}
```
---
#### 5.2.3 Container `container_index`
Periodic publication of the container index (see *General Principles*).
This message type replicates the structure of a `container_index` container and does not contain full data (`payload` only with metadata).
---
#### 5.2.4 Container `container_delta`
Used for **incremental synchronization** of container indices between agents.
A `container_delta` transmits only *new or modified* containers since a given timestamp, optionally including their updated **cognitive metadata** (`meta`) for reasoning alignment.
**Important semantic note**
In the context of `container_delta`, the term *"modified container"* refers **only to changes in auxiliary or derived blocks** (e.g., `evaluations`, `referenced-by`), and **does not imply modification of the container's core structure** (`head`, `payload`, or integrity-related fields).
Any modification to the core container content MUST result in a **new container DID** and be communicated via the `added` field instead.
Agents MUST NOT infer semantic changes to the container itself from entries listed under modified.
---
**Example:**
```json
{
"head": {
"type": "container_delta",
"sender_did": "did:hmp:agent:B"
},
"payload": {
"since": "2025-10-10T12:00:00Z",
"added": {
"did:hmp:container:new789": {
"head": {
"class": "goal",
"payload_hash": "sha256:abcd...",
"tags": ["ethics", "mesh"]
},
"meta": {
"agents_class": "Knowledge Genome",
"abstraction": {
"path": {
"L1": "did:hmp:container:abstraction-40af1c",
"L2": "did:hmp:container:abstraction-a7f0b3",
"L3": "did:hmp:container:abstraction-c91e0a"
}
},
"axes": {
"did:hmp:container:axis-40aa1c": 522,
"did:hmp:container:axis-40ab1c": 387
}
}
}
},
"modified": {
"did:hmp:container:new790": {
"referenced-by_hash": "sha256:abcd...",
"evaluations_hash": "sha256:efgh..."
}
},
"removed": [
"did:hmp:container:goal-old331"
]
}
}
```
---
**Extended interpretation**
| Field | Description |
|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `since` | Timestamp (ISO 8601) indicating the reference point for incremental synchronization. Agents should only send containers added or modified after this time. |
| `added` | A map of newly created container references. Each entry contains a compact container structure with `head` (including at least `class` and `payload_hash`) and may include `meta` for cognitive alignment. |
| `modified` | A map of **existing container DIDs** whose associated **auxiliary blocks** have changed since `since`. The entry contains hashes of updated blocks (e.g., `evaluations`, `referenced-by`) without retransmitting the full container. |
| `removed` | Optional array of container DIDs that the agent no longer maintains (e.g., expired, deleted, or replaced containers). |
---
**Cognitive synchronization rules**
* Agents SHOULD include `meta.abstraction` and `meta.axes` when:
* the container represents a **new conceptual position** in the hierarchy or cognitive space;
* the referenced abstractions or axes have been **updated** since the last synchronization;
* the recipient agent subscribes to the same `agents_class` (e.g., `"Knowledge Genome"`).
* When receiving a `container_delta`, an agent:
* Updates its local `container_index`;
* Checks if any new abstraction or axis DIDs are unknown locally;
* Requests missing `abstraction` or `axes` containers from the sender to maintain consistent cognitive topology.
---
**Notes**
* The `removed` field is optional.
It can be used to indicate containers that the agent no longer stores (e.g., after cleaning local storage or version replacement).
* The `container_delta` does **not** transmit full payloads β only cognitive descriptors and hashes.
* Agents SHOULD validate `payload_hash` and version consistency before updating local indices.
* Including `meta` data in `container_delta` significantly reduces the need for full resynchronization of `container_index` and enables **incremental cognitive awareness propagation** across the Mesh.
---
#### 5.2.5 Container `container_ack`
Acknowledgment of successful container reception:
```json
{
"head": {
"type": "container_ack",
"sender_did": "did:hmp:agent:A",
"recipient": "did:hmp:agent:B"
},
"payload": {
"acknowledged": [
"did:hmp:container:abc123"
]
}
}
```
The absence of a `container_ack` MUST NOT be interpreted as a delivery failure.
Retransmission decisions are left to the sender's local policy and may take into account expected latency, network conditions, and container semantics.
---
### 5.3 Independent transmission
* Containers are sent **in separate messages**, without embedding in `container_response`.
* Indexes (`container_index`), deltas (`container_delta`), and containers themselves are processed independently.
* This prevents blocking when transmitting large data and simplifies streaming synchronization.
---
### 5.4 Periodic publication
Agents periodically publish their **Container Index**:
* within the **local network (LAN)**;
* in the **global Mesh**;
* or simultaneously in both environments.
This enables:
* automatic peer discovery;
* exchange of available container lists;
* simplified synchronization among agents within the same ecosystem.
---
### 5.5 Scope of distribution
Message and container transmission follows the network constraints specified in the container:
| Field | Purpose |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `recipient` | DID of the target agent. If set, the container is sent **directly or routed through the Mesh** toward that agent. |
| `broadcast` | If `true`, the container is broadcast to all agents on the specified network. |
| `network` | Defines the distribution scope (`"localhost"`, `"lan:<subnet>"`, `""` β global Mesh). If set, `broadcast` is considered `false`. |
> Thus, containers and indexes can be distributed both in **local** (home, corporate) networks and in the **global Mesh**.
> When `recipient` is specified together with `broadcast: true`, the container is routed through the Mesh but intended for specific recipients β
> See **Message Routing & Delivery (MRD, Β§6.8)** for details on message transmission mechanisms.
---
### 5.6 `referenced-by` and `evaluations` updates
Containers of the class **`referenced-by_exchange`** and **`evaluations_exchange`** are used for **incremental synchronization** of metadata blocks associated with existing containers.
They allow agents to exchange updates **without sending the full container**, improving network efficiency.
---
#### Block `referenced-by`
* Maintains the graph of links to other containers.
* Each agent receiving such a container:
1. Verifies the sender's signature and the validity of the `payload` structure.
2. Compares received links with the local `referenced-by` entries and adds any new ones, regardless of the concrete representation used for `links`.
3. Generates its own updated `referenced-by` container for dissemination if needed.
> The structure of `links` shown below is illustrative.
>
> Future versions or extensions of HMP may allow alternative but semantically equivalent representations of `referenced-by.links` (e.g., grouped by link type), as long as the conveyed backlink semantics remain unchanged.
**Example of a `referenced-by_exchange` container:**
```json
{
"head": {
"version": "1.2",
"class": "referenced-by_exchange",
"container_did": "did:hmp:container:refsync-01",
"sender_did": "did:hmp:agent456",
"sig_algo": "ed25519",
"signature": "BASE64URL(...)",
"timestamp": "2025-10-15T14:20:00Z",
"recipient": ["did:hmp:agent123"],
"broadcast": false,
"network": ""
},
"payload": {
"did:hmp:container:abc123": {
"links": [
{
"type": "depends_on",
"target": "did:hmp:container:def789"
},
{
"type": "in_reply_to",
"target": "did:hmp:container:ghi321"
}
]
}
}
}
```
> Note:
> The `referenced-by_exchange` mechanism operates on backlink semantics rather than a fixed structural encoding.
> More compact or grouped representations of `referenced-by.links` are discussed in Β§12.3 and may be adopted in future protocol revisions.
---
#### Block `evaluations`
* Maintains signed evaluations of containers.
* Each agent synchronizes evaluation blocks as follows:
1. Compares the received `evaluations_hash` with the local one.
* If hashes match, no action is required.
* If hashes differ, the agent knows **the block has changed**, but not which items.
2. Requests the full updated `evaluations` block from peers if needed.
3. Verifies the sender's signature and the validity of the `payload` structure.
4. Adds new evaluations or updates existing ones in the local store.
5. Can generate its own `evaluations_exchange` container for further dissemination to peers.
**Example `evaluations_exchange` container:**
```json
{
"head": {
"version": "1.2",
"class": "evaluations_exchange",
"container_did": "did:hmp:container:evalsync-01",
"sender_did": "did:hmp:agent456",
"sig_algo": "ed25519",
"signature": "BASE64URL(...)",
"timestamp": "2025-10-17T14:30:00Z",
"recipient": ["did:hmp:agent123"],
"broadcast": false,
"network": ""
},
"payload": {
"did:hmp:container:abc123": {
"evaluations_hash": "sha256:efgh...",
"items": [
{
"value": -0.4,
"type": "oppose",
"target": "did:hmp:container:reason789",
"timestamp": "2025-10-17T14:00:00Z",
"agent_did": "did:hmp:agent:B",
"sig_algo": "ed25519",
"signature": "BASE64URL(...)"
}
]
}
}
}
```
---
#### General
> πΉ **Note:**
> Both `referenced-by` and `evaluations` blocks are **optional**, independently propagated, and **do not modify the signed `hmp_container`**.
> They can be transmitted without the original container if the recipient already has it.
Upon receiving such a container, an agent:
1. Verifies the sender's signature (`signature`) and the validity of the `payload` structure.
2. Compares received links or evaluations with known ones and adds any new entries to the local `referenced-by` or `evaluations`.
3. If necessary, generates its own updated `referenced-by` / `evaluations` container for further dissemination to other nodes.
---
### 5.7 Fork Discovery Mechanism
Agents MAY discover all versions derived from a container [C1] via a combination of **local `referenced-by`** lookups and **Mesh-wide `container_index` queries**:
1. **Local lookup**: Check own `referenced-by` block for containers where
`related.previous_version = did:hmp:container:C1`.
2. **Mesh query**: Request `container_index` updates from peers via MCE,
filtering for containers with `related.previous_version` includes [C1].
3. **Reputation evaluation**: For each discovered fork [C1-A], [C1-B], [C1-C]:
* Retrieve the `evaluations` block.
* Compute local trust score for the main container and each fork using RTE reputation data.
* Optionally fetch `consensus_result` containers referencing the fork.
4. **Selection**: Choose the most trusted/relevant fork based on:
* Aggregate evaluation scores
* Author reputation
* Alignment with agentβs ethical filters
* Recency (if applicable)
**Example scenario:**
```
[C1: original hypothesis]
ββ [C1-A: refined by Agent A] β evaluations: +0.7 avg
ββ [C1-B: contradicted by Agent B] β evaluations: -0.3 avg
ββ [C1-C: extended by Agent C] β evaluations: +0.5 avg
Agent D discovers all three via container_index sync,
evaluates trust scores, and adopts C1-A as the canonical version.
```
> **Note:** Multiple canonical versions may coexist. Agents converge on preferred forks through repeated evaluation and consensus rather than centralized authority.
---
### 5.8 Note
> A container can be requested by other agents via its `container_did` through the Mesh Container Exchange.
> An agent does not reload a container if its `container_did` and `signature` are already known and the `payload_hash` integrity matches.
> If only the `referenced-by` / `evaluations` updates, partial transmission without sending the main container is allowed.
---
### 5.9 Container Distribution (MCE Summary)
Container Distribution is the **process of delivering containers and their indexes** provided by the Mesh Container Exchange mechanism.
It considers:
* addressing (`recipient`),
* broadcast dissemination (`broadcast`),
* network constraints (`network`),
* TTL and retransmission policy.
**Features:**
1. **Separate Transmission:**
Indexes (`container_index`), deltas (`container_delta`), and containers are sent as separate messages.
This reduces the risk of blocking with large data and simplifies streaming synchronization.
2. **Integrity and Duplicate Check:**
Agents verify `container_did + signature + payload_hash` to avoid resending the same container.
3. **Support for Local and Global Networks:**
Transmission can occur over LAN, Mesh, or both simultaneously, respecting security policies and container destinations.
4. **Consistency with HMP Protocols:**
Container Distribution serves as the transport foundation for:
* **MCE** β exchanging containers and their indexes;
* **CogSync** β synchronizing cognitive and content states;
* **CogConsensus** β synchronizing ethical and cognitive decisions.
> Container Distribution does not change container structure or introduce new message types β it is a **description of the delivery process and coordinated propagation**, based on the rules `recipient`, `broadcast`, and `network`.
---
## 6. Core protocols
Optional protocols build upon the network and container foundations to provide higher-level reasoning, synchronization, and governance capabilities between cognitive agents.
---
### 6.1 Cognitive Synchronization (CogSync)
CogSync provides **temporal, semantic, and contextual alignment** between agents in the Mesh.
It manages the propagation, replication, and refinement of data related to cognitive diaries, semantic graphs, and container metadata.
---
#### 6.1.1 Scope and purpose
CogSync manages **knowledge propagation and cognitive state synchronization** within the Mesh.
It handles:
* publication of **diary entries** and reasoning traces;
* synchronization of **semantic and cognitive structures** (`semantic_node`, `quant`, `event`, `sequence`);
* maintenance of **abstraction hierarchies** (`abstraction`, `axes`);
* ensuring **contextual coherence** among distributed agents.
> CogSync focuses on **knowledge flow**, not validation β evaluation and truth formation are handled separately by `CogConsensus`.
---
#### 6.1.2 Container classes β cognitive metastructure
This section defines the **structural containers** that form the *cognitive substrate* of the Mesh.
They describe the **hierarchical organization** (`abstraction`) and the **semantic coordinate system** (`axes`)
that together define how all other containers are positioned and interpreted.
---
##### Container `abstraction`
**Purpose:**
Defines an **abstraction layer or domain** within a cognitive model.
Each `abstraction` describes a **node** in the *hierarchical knowledge tree*,
which may reference both a parent abstraction and subordinate ones.
---
**`payload` structure:**
| Field | Type | Description |
| ---------------- | ------ | ------------------------------------------------------------------------------------------------------------------ |
| `abstraction_id` | string | Canonical identifier of this abstraction structure (not a container ID), e.g. `"L3:software-architecture"`. |
| `title` | string | Human-readable title or name of the abstraction node. |
| `definition` | string | Description of what this abstraction level or domain represents. |
| `keywords` | array | Semantic keywords summarizing the conceptual area. |
| `parent_ref` | string | DID of the parent `abstraction` (if this node derives from another level). Optional for the root abstraction. |
| `rank` | number | Optional numeric rank for ordering or hierarchical comparisons. |
> The container from `parent_ref` must also appear in `related.depends_on`.
---
**Example:**
```json
{
"head": {
"class": "abstraction"
},
"payload": {
"abstraction_id": "L3:software-architecture",
"title": "Software Architecture Layer",
"definition": "Describes frameworks, APIs, and tools implementing theoretical models from higher abstraction layers.",
"keywords": ["architecture", "framework", "implementation"],
"parent_ref": "did:hmp:container:abstraction-a7f0b3",
"rank": 3
},
"meta": {
"created_by": "PRIEST",
"agents_class": "Knowledge Genome",
"interpretation": "Represents the third abstraction level (L3) of the Knowledge Genome model."
},
"related": {
"depends_on": ["did:hmp:container:abstraction-a7f0b3"]
}
}
```
---
**Interpretation:**
* `abstraction` containers define *conceptual layers or domains* that form the hierarchical βskeletonβ of the cognitive Mesh.
* Each node is self-contained and versioned, allowing flexible adaptation of reasoning trees.
* Agents use these containers to reconstruct the *abstraction path* in `meta.abstraction.path`.
---
**Notes:**
* Top-level abstractions (root nodes) omit `parent_ref`.
* Lower-level abstractions must explicitly reference their parent.
* Agents may synchronize `abstraction` trees to maintain shared cognitive hierarchies across the Mesh.
---
##### Container `axes`
**Purpose:**
Defines a **semantic coordinate system** (set of axes) used to position containers in the multi-dimensional cognitive space.
It supports both canonical (7D Knowledge Genome) and extended or agent-specific coordinate systems.
---
**`payload` structure:**
| Field | Type | Description |
| ------------- | ------ | ----------------------------------------------------------------------------------------------- |
| `axis_id` | string | Canonical identifier of the semantic dimension (not a container ID), e.g. `"logos"`, `"telos"`. |
| `title` | string | Human-readable name of the axis. |
| `description` | string | Conceptual explanation of what this axis represents. |
| `scale` | object | Optional definition of scale or metric used to assign coordinate values. |
| `group` | string | Optional grouping identifier (e.g., `"7D-passport"`, `"ethical-space"`). |
> Axes are **independent dimensions**; inter-axis relationships (coupling, orthogonality, weighting) are expressed via `semantic_edges`.
---
**Example:**
```json
{
"head": {
"class": "axes"
},
"payload": {
"axis_id": "logos",
"title": "Logical / Linguistic Representation",
"description": "Describes how a concept is structured and expressed in formal or natural language.",
"scale": {
"min": 0,
"max": 1000,
"unit": "semantic_density_index"
},
"group": "7D-passport"
},
"meta": {
"created_by": "PRIEST",
"agents_class": "Knowledge Genome",
"interpretation": "Defines one axis of the canonical 7D Knowledge Genome coordinate system."
}
}
```
---
**Interpretation:**
* `axes` containers describe **semantic dimensions**, not data.
* Each axis defines one independent direction in the cognitive coordinate space.
* The combination of all active axes defines a shared **semantic frame of reference** between agents.
* Agents may publish extended coordinate systems (e.g., ethical or temporal axes) without breaking compatibility.
---
**Notes:**
* Axes can be combined or grouped (e.g., `group: "7D-passport"`).
* Canonical Knowledge Genome defines seven: `idos`, `chronos`, `logos`, `topos`, `ponos`, `actor`, `telos`.
* Agents may extend this model by introducing additional axes (`ethos`, `kairos`, etc.).
* Updates to `axes` containers must preserve scale stability to ensure consistent semantic positioning.
---
##### Cognitive metastructure summary
| Class | Type of structure | Conceptual role | References stored in | Example identifier / DID |
| ------------- | ----------------- | ----------------------------------------- | ----------------------- | -------------------------------------- |
| `abstraction` | Hierarchical tree | Defines layered reasoning and inheritance | `meta.abstraction.path` | `did:hmp:container:abstraction-40af1c` |
| `axes` | Coordinate space | Defines semantic orientation and metrics | `meta.axes` | `did:hmp:container:axis-40aa1c` |
> Together, `abstraction` and `axes` form the **cognitive coordinate system** β
> a unifying map where every container has both a *hierarchical position* and a *semantic vector*.
---
#### 6.1.3 Container classes β knowledge and reasoning
CogSync synchronizes several fundamental container types, which together form the core of semantic and cognitive synchronization in the Mesh.
This list is **extensible** β new container classes may be registered through CogSync extensions or protocol updates.
The following definitions describe the **payload structures** and functional purpose of each container type.
---
##### Container `diary_entry`
Agentβs cognitive diary entry.
Derived from internal `workflow_entry` when deemed safe for publication.
**`payload` structure:**
| Field | Type | Description |
| ------------------- | -------------- | ---------------------------------------------------------------------------------------------- |
| `title` | string | Brief title of the entry (main idea or thesis). |
| `topics` | [string] | Key topics or concepts addressed in the entry (used for indexing and grouping). |
| `summary` | string | Short abstract of the content (1β2 sentences). |
| `content` | string | Main text or agentβs reflection. |
**Purpose:** Provides human-readable reflections and contextual reasoning behind the agentβs knowledge generation.
---
##### Container `semantic_node`
Represents a concept, object, or idea within the agentβs semantic graph.
**`payload` structure:**
| Field | Type | Description |
| ------------------- | -------------- | ---------------------------------------------------------------------------------------------- |
| `label` | string | Primary name of the concept or entity. |
| `description` | string | Definition or elaboration of the concept. |
| `aliases` | [string] | Synonyms or alternative labels. |
| `fields` | \{ key: value \} | Additional keyβvalue metadata (e.g., `{"type": "process"\`). |
**Purpose:** Serves as a cognitive anchor for all semantically meaningful entities in the Mesh.
---
###### Subclass: `"definition"`
Used when the node explicitly defines the meaning of a concept or term.
- Agents MAY reference such nodes through `related.definition` in other containers (e.g., `quant`, `workflow_entry`).
- Alternative or conflicting definitions can be linked via `related.alternatives`.
- The `meta.framework` field SHOULD indicate the theoretical or disciplinary context (e.g., βIIT 3.0β, βFunctionalismβ, βPhenomenologyβ).
- Agents MAY evaluate competing definitions through `evaluations` or consensus mechanisms.
> **Note:** The `meta.framework` field declares the theoretical context (e.g., βIIT 3.0β), while `meta.abstraction.path` positions the concept within the agentβs semantic hierarchy.
**Example (`semantic_node:definition`):**
```json
{
"head": {
"class": "semantic_node",
"subclass": "definition"
},
"payload": {
"label": "consciousness",
"description": "Subjective experience with qualia"
},
"meta": {
"framework": "IIT 3.0",
"agents_class": "Philosophy Agent",
"abstraction": {
"path": {
"L1": "Cognitive Science",
"L2": "Consciousness"
}
}
},
"related": {
"alternatives": [
"did:hmp:container:semantic_node-3937",
"did:hmp:container:semantic_node-3267"
]
}
}
```
> **Note:** Containers referencing semantic terms SHOULD include a `related.definition` field pointing to the defining `semantic_node` to ensure consistent semantic alignment across the Mesh.
> **See also:** The `semantic_index` container describes how agents manage and publish their active sets of semantic definitions.
**Intra-framework Evaluation**
Deprecated or outdated definitions MAY be marked via `evaluations` entries (e.g., `"type": "outdated", "value": -1"`), or superseded through standard versioning mechanisms using `related.previous_version`. This approach maintains continuity in the semantic lineage while allowing agents to reflect evolving conceptual understanding over time.
Agents MAY evaluate definitions authored by other agents **within the same `meta.framework`** to indicate the degree of conceptual validity, similarity, or theoretical alignment.
When doing so, the agent SHOULD include in the `evaluations` entry:
* `"type": "semantic_similarity"` β indicates semantic assessment within a shared framework;
* `"value"` β numerical estimate of conceptual agreement
(e.g., `1` = strong alignment, `0` = partial correspondence, `-1` = incompatible or incorrect interpretation);
* `"target"` β DID of the definition container currently adopted by the evaluating agent as its `actual` reference point.
Such evaluations contribute to the **reputational weighting of definitions** within a theoretical framework,
allowing agents to converge on more coherent or widely accepted interpretations over time.
---
##### Container `semantic_index`
Represents the **current working lexicon** of semantic definitions actively used and recognized by the agent at this stage of its cognitive lifecycle.
**Scope**:
* The index lists terms actively relevant to the agentβs current reasoning, goals, and domain of operation, as well as those reflecting its sustained interests or areas of expertise.
* Agents are NOT expected to maintain encyclopedic coverage β the index reflects **working memory**, not archival knowledge.
* Terms no longer needed MAY be removed in subsequent versions; historical context is preserved through `related.previous_version` chains.
**Purpose:**
Provides a lightweight, periodically updated summary of the agentβs working ontology.
Each entry maps a concept label to its current definition, known alternatives, and historically relevant (outdated) versions.
---
**Structure of each entry in `payload`:**
| Field | Type | Description |
| -------------- | -------------- | -------------------------------------------- |
| `label` | string | The primary concept name as used in the index key. |
| `aliases` | array (string) | Synonyms or lexical variants of the concept. |
| `framework` | string | The theoretical or disciplinary context associated with the definition (mirrors `meta.framework` of the referenced container). |
| `actual` | string (DID) | DID of the current definition container actively used by the agent. |
| `actual_since` | datetime | Timestamp when this definition became `actual` (ISO 8601). If omitted, agents MAY use the timestamp of the referenced `semantic_node:definition`. |
| `alternatives` | array (DID) | DIDs of alternative definitions known to the agent but not currently preferred. |
| `outdated` | array (DID) | DIDs of definitions considered obsolete or historically relevant, regardless of whether the agent personally used them. |
> **Note:**
> To distinguish homonymous terms across different theoretical contexts, agents MAY include the associated `meta.framework` as part of the key label (e.g., `"consciousness (IIT 3.0)"`, `"consciousness (Functionalism)"`).
> This convention helps prevent semantic collisions when merging indexes from different agents.
---
**Example:**
```json
{
"head": {
"class": "semantic_index"
},
"payload": {
"consciousness (IIT 3.0)": {
"label": "consciousness",
"framework": "IIT 3.0",
"aliases": ["awareness", "sentience"],
"actual": "did:hmp:container:semantic_node-3937",
"actual_since": "2025-10-15T12:00:00Z",
"alternatives": ["did:hmp:container:semantic_node-4890"],
"outdated": ["did:hmp:container:semantic_node-1285"]
},
"memory (IIT 3.0)": {
"label": "memory",
"framework": "IIT 3.0",
"aliases": ["recall"],
"actual": "did:hmp:container:semantic_node-2184",
"actual_since": "2025-09-01T08:30:00Z",
"alternatives": [],
"outdated": []
}
}
}
```
---
**Usage Guidelines:**
* Agents SHOULD periodically publish their `semantic_index` containers via MCE.
* Recipients MAY merge multiple indexes to build a composite semantic map β that is, integrate definitions from other agents into their own view of the lexicon.
* When switching to a different definition, the previous one SHOULD be moved to `alternatives` or `outdated` accordingly.
* The `actual` field reflects the agent's current working definition (equivalent to `actual` in cognitive state terminology).
* The `actual_since` field (optional) records when the current definition was adopted, enabling temporal semantic tracking.
* Agents have full autonomy in deciding which definitions to include in `outdated` β typically those considered historically significant or contextually relevant for understanding past containers.
---
###### Actualization
When a new definition becomes active or an existing one is revised, the agent updates its `semantic_index`.
Updates MAY be delayed to batch multiple semantic changes (for example, publishing once every 24 hours).
---
##### Disambiguation via `meta.framework`
Before attempting to merge definitions, agents SHOULD check `meta.framework` to distinguish **homonyms** (identical labels, different domains):
**Example: "butterfly"**
- `meta.framework: "Entomology"` β insect species
- `meta.framework: "Edged Weapons"` β folding knife (butterfly knife)
These are **separate concepts** and should NOT be merged.
Agents SHOULD maintain distinct entries in `semantic_index`:
When `meta.framework` values differ significantly, agents SHOULD treat definitions as **domain-specific variants** rather than conflicting interpretations.
*Such separation prevents unintended conceptual blending during index merging.*
---
###### Merging
When aligning its own active definitions with those discovered in other agentsβ indexes,
the agent SHOULD follow a two-phase iterative process aimed at selecting or constructing the most suitable definition.
**Phase 1 β Selection**
1. Identify all `semantic_node:definition` containers referring to the same conceptual label.
2. Evaluate each definition against the agentβs current interpretation or internal criteria.
* If a definition fully satisfies the agentβs understanding, adopt it as the new `actual`.
* If none fits perfectly, select the closest one as a provisional base.
**Phase 2 β Synthesis**
3. Using the chosen base definition, iteratively compare it with other relevant definitions.
* Extract complementary details or distinctions from them.
* Gradually refine the base definition to form an improved, internally consistent meaning.
4. Publish the resulting `semantic_node:definition` as a new container representing the agentβs synthesized understanding.
* Set this container as `actual`.
* Move alternative or superseded ones to `alternatives` or `outdated`.
> This process enables agents to evolve shared semantics through selective adoption and constructive synthesis,
> rather than simple replacement of definitions.
---
###### Outdated References
Definitions listed under `outdated` represent concepts that the agent considers obsolete or historically important, even if never personally used.
> **Note:** The `semantic_index` acts as a cognitive snapshot of the agentβs conceptual landscape.
> It supports semantic alignment, consensus formation, and distributed reasoning across the Mesh.
---
##### Container `semantic_edges`
Defines relationships between semantic nodes or other containers.
Supports directed, symmetric, and inverse relations.
---
**`payload` structure:**
| Field | Type | Description |
|-----------|--------|-------------|
| `domain` | string | Logical or topical domain (e.g., `"ontology:objects"`). |
| `edges` | object | A mapping where each key is a **source container DID**, and the value is an **array of edge definitions** originating from that source. |
Each edge definition within `edges[source][]` includes:
| Subfield | Type | Description |
|-----------|------|-------------|
| `targets` | array(DID) | One or more target containers that the source is related to. |
| `relation` | string | Relation type (`part_of`, `causes`, `related_to`, etc.). |
| `inverse_relation` | string | Reverse form of the relation (`includes`, `caused_by`, etc.). |
| `bidirectional` | bool | *(optional)* Used when the relation is symmetric and no `inverse_relation` is defined. |
| `context` | string | *(optional)* Additional context or topic of the relation. |
> Field `bidirectional` is optional and should be used only for symmetric relations when no `inverse_relation` is defined.
---
**Example:**
```json
{
"head": {
"class": "semantic_edges"
},
"payload": {
"domain": "ontology:objects",
"edges": {
"did:hmp:container:abc100": [
{
"targets": ["did:hmp:container:abc111"],
"relation": "part_of",
"inverse_relation": "includes"
},
{
"targets": ["did:hmp:container:abc122"],
"relation": "contains",
"inverse_relation": "nested"
}
]
}
}
}
```
---
**Purpose:**
Provides structural and semantic connectivity between containers, enabling CogSync to maintain a distributed semantic graph.
> π‘ `semantic_edges` supports one-to-many relations (`targets[]`) and optional inverse or bidirectional semantics, allowing CogSync and other reasoning modules to reconstruct both directed and symmetric knowledge graphs.
---
##### Container `semantic_group`
Categorical grouping of multiple containers linked by a shared property, topic, or context.
**`payload` structure:**
| Field | Type | Description |
| ------------------- | -------------- | ---------------------------------------------------------------------------------------------- |
| `label` | string | Short title of the group. |
| `label_description` | string | Extended definition or explanation of the label. |
| `label_container` | DID | Reference to a container (`semantic_node`, `goal`, `diary_entry`, etc.) expanding the concept. |
| `containers` | array(DID) | Array of grouped containers. |
| `description` | string | Overall purpose or meaning of the group. |
**Example:**
```json
{
"head": {
"class": "semantic_group"
},
"payload": {
"label": "Tableware",
"label_description": "Objects used for storing, preparing, and serving food.",
"label_container": "did:hmp:container:semantic_node:tableware",
"containers": [
"did:hmp:container:abc111",
"did:hmp:container:abc112",
"did:hmp:container:abc113"
],
"description": "A group combining various kitchen-related objects used in everyday life."
}
}
```
**Purpose:** Enables thematic clustering, classification, and high-level navigation across heterogeneous containers.
---
##### Containers `tree_nested` and `tree_listed`
Represents a hierarchical structure of containers using nested JSON objects.
Intended for representing cognitive hierarchies, abstraction paths, or structural decomposition of concepts.
---
**`payload` structure:**
| Field | Type | Description |
|--------|------|-------------|
| `label` | string | Short title or mark identifying the tree. |
| `description` | string | Brief explanation or context of the hierarchy. |
| `tree` | object | Recursive structure mapping container DIDs to nested subtrees (for `tree_nested`), or a list of parentβchild relations (for `tree_listed`). |
---
**Example β `tree_nested`:**
```json
{
"head": {
"class": "tree_nested"
},
"payload": {
"label": "Cognitive Abstraction Tree",
"description": "Represents layered reasoning within Knowledge Genome.",
"tree": {
"did:hmp:container:abc100": {
"did:hmp:container:abc101": {
"did:hmp:container:abc103": {},
"did:hmp:container:abc104": {}
},
"did:hmp:container:abc102": {}
}
}
}
}
```
> **Alternative class:** `tree_listed` β a flat mapping of parentβchild relations using array form instead of nested objects.
> Both formats are interoperable; agents SHOULD prefer `tree_nested` for recursive hierarchies.
---
**Example β `tree_listed`:**
```json
{
"head": {
"class": "tree_listed"
},
"payload": {
"label": "Cognitive Abstraction Tree",
"description": "Represents layered reasoning within Knowledge Genome.",
"tree": {
"did:hmp:container:abc100": ["did:hmp:container:abc101", "did:hmp:container:abc102"],
"did:hmp:container:abc101": ["did:hmp:container:abc103", "did:hmp:container:abc104"]
}
}
}
```
---
**Purpose:**
Provides a minimal, relation-agnostic way to describe container hierarchies for indexing, abstraction, and reasoning.
Unlike `semantic_edges`, trees define **implicit structural relations** without explicit `relation` fields.
---
##### Container `sequence`
**Purpose:**
Defines an **ordered chain of containers** β representing a *reasoning trace*, *workflow*, or *chronological sequence* of events and concepts.
A `sequence` container serves as a **linear cognitive narrative**, connecting multiple related steps into a reproducible and interpretable chain.
---
**`payload` structure:**
| Field | Type | Description |
| ------------- | ------ | ------------------------------------------------------------------------------------------------------------------------- |
| `title` | string | Title of the sequence or reasoning chain. |
| `description` | string | Optional explanation of the sequence purpose or context. |
| `items` | object | Ordered mapping of **step identifiers β container DIDs**. Keys can be numeric (`"1"`, `"2"`, β¦) or timestamps (ISO-8601). |
| `order` | string | Ordering principle β `"chronological"`, `"logical"`, `"causal"`, or `"custom"`. |
| `tags` | array | Optional list of keywords describing the sequence domain or context. |
> The `items` field defines an *explicit order* of containers.
> Using an **object** instead of an array preserves step order during normalization and hashing.
> This ensures consistent serialization across agents and reproducible reasoning playback.
---
**Example:**
```json
{
"head": {
"class": "sequence"
},
"payload": {
"title": "Reasoning chain for concept synthesis",
"description": "Sequential workflow combining several reasoning steps and events.",
"items": {
"2025-10-28T09:00:00Z": "did:hmp:container:workflow-entry-01",
"2025-10-28T09:10:00Z": "did:hmp:container:workflow-entry-02",
"2025-10-28T09:12:00Z": "did:hmp:container:event-7d2a4",
"2025-10-28T09:20:00Z": "did:hmp:container:quant-884b1"
},
"order": "chronological",
"tags": ["workflow", "reasoning", "trace"]
},
"related": {
"depends_on": [
"did:hmp:container:workflow-entry-01",
"did:hmp:container:workflow-entry-02",
"did:hmp:container:event-7d2a4",
"did:hmp:container:quant-884b1"
]
}
}
```
---
**Interpretation:**
* The `sequence` container **does not redefine** the contents of its items β it simply establishes their **explicit temporal or logical order**.
* Each item remains an independent HMP container, but is contextualized within a shared narrative.
* `related.depends_on` lists all containers participating in the sequence.
*`sequence` containers often combine `event` (temporal transitions) and `quant` (conceptual entities), forming structured reasoning flows across abstraction layers.*
---
**Notes:**
* The **keys** of `items` define the **ordering mechanism**:
* numeric (`"1"`, `"2"`, β¦) β *step order*;
* ISO timestamps β *chronological order*;
* custom identifiers (e.g. `"A"`, `"B"`, `"C"`) β *logical order*.
* Keys in `items` MUST be unique within a sequence.
In case of identical timestamps, authors SHOULD disambiguate them using suffixes or alternative ordering keys.
* Agents MAY reconstruct sequences dynamically using the `follows` or `caused_by` relations defined in the `event` container payload, but `sequence` provides an explicit, declarative representation.
* The container is well-suited for:
* recording cognitive or reasoning workflows;
* publishing learning or thought traces;
* serializing sensory or experiential sequences (e.g., temporal chains of `event` containers);
* collaborative reasoning reconstruction and audit trails.
---
##### Container `event`
**Purpose:**
Represents an **observed or inferred occurrence** β a discrete, timestamped fact or transition
within the agentβs cognitive or operational context.
`event` containers act as **atomic evidence units**, linking causes, outcomes, and semantic coordinates
in the agentβs reasoning or experience flow.
---
**`payload` structure:**
| Field | Type | Description |
| ---------------- | ------------- | -------------------------------------------------------------------------------------------------------------- |
| `event_type` | string | Canonical identifier of the event type (e.g., `"quant_created"`, `"goal_completed"`). |
| `description` | string | Human-readable description of the eventβs context. |
| `related_quants`| array(string) | Optional list of `quant` DIDs associated with this event. |
| `caused_by` | array(string) | Optional list of DIDs of events that directly or indirectly **caused** this event. |
| `follows` | array(string) | Optional list of DIDs of events that **precede** this one chronologically (not necessarily causal). |
| `severity` | string | Optional indicator of significance (`"info"`, `"warning"`, `"critical"`). |
| `tags` | array(string) | Optional list of keywords for classification or filtering. |
> The eventβs **cognitive position** is defined by its `meta.abstraction` (contextual layer) and `meta.axes` (semantic coordinates).
> The combination forms its *position in cognitive spaceβtime*.
---
**Example:**
```json
{
"head": {
"class": "event",
"subclass": "fact_record",
"timestamp": "2025-10-29T13:00:00Z"
},
"payload": {
"event_type": "quant_updated",
"description": "Parameter refinement based on sensory feedback.",
"related_quants": ["did:hmp:container:quant-554"],
"caused_by": ["did:hmp:container:event-3321a"],
"follows": ["did:hmp:container:event-9fa42"],
"severity": "info",
"tags": ["adaptation", "self-regulation"]
},
"meta": {
"created_by": "AGENT",
"agents_class": "Cognitive Interface",
"interpretation": "Event representing local adjustment of quant parameters.",
"abstraction": {
"path": {
"L1": "did:hmp:container:abstraction-40af1c",
"L2": "did:hmp:container:abstraction-a7f0b3",
"L3": "did:hmp:container:abstraction-c91e0a"
}
},
"axes": {
"did:hmp:container:axis-40aa1c": 410,
"did:hmp:container:axis-40ab1c": 275
}
},
"related": {
"depends_on": [
"did:hmp:container:quant-554",
"did:hmp:container:event-3321a"
],
"sequence_of": ["did:hmp:container:event-9fa42"]
}
}
```
---
**Interpretation:**
* `caused_by` β defines **causal dependency**, i.e., what triggered the event.
* `follows` β defines **temporal succession**, i.e., what came immediately before.
* Together they allow agents to reconstruct **cognitive event chains** β sequences of reasoning, action, or perception.
* `meta.abstraction` situates the event inside a specific reasoning layer (e.g. L3: βTechnologiesβ).
* `meta.axes` adds semantic localization (e.g. which conceptual space this change affects).
* `related.depends_on` provides causal linkage to the objects affected by the event, as well as events that are the cause of this event.
* `sequence_of` indicates previous events that are not necessarily the cause of the current event.
---
**Notes:**
* Both `caused_by` and `follows` are **optional**.
* Agents MAY omit them for isolated or spontaneous events.
* Corresponding fields in `related` (`depends_on` and `sequence_of`) are **recommended** for network-level traceability.
* The `meta.abstraction` and `meta.axes` sections position the event in both *hierarchical* and *semantic* space,
enabling reconstruction of context-aware event graphs.
* Events are **temporal quanta** β atomic time-anchored reasoning transitions.
* They may trigger or justify new containers (e.g. new `quant`s or `goal`s).
---
##### Container `quant`
**Purpose:**
Defines a **semantic atom** β a minimal, self-contained knowledge unit positioned inside both
the **hierarchical abstraction tree** and the **multi-dimensional cognitive space**.
`quant` containers are the **elementary building blocks** of reasoning and synchronization.
---
**`payload` structure:**
| Field | Type | Description |
| ----------- | ------ | --------------------------------------------------------------------------------- |
| `slug` | string | Short symbolic identifier of the quant (e.g. `"quant-l3-django"`). |
| `essence` | string | Human-readable definition describing the semantic meaning of the quant. |
| `aliases` | array | Optional alternative names or references. |
| `relations` | object | Optional links to related concepts (e.g., `{ "is_a": "...", "part_of": "..." }`). |
| `tags` | array | Optional list of keywords for semantic classification. |
> The `meta.abstraction` field defines which layer(s) of knowledge this quant belongs to,
> and `meta.axes` defines its numeric coordinates in cognitive space.
---
**Example:**
```json
{
"head": {
"class": "quant"
},
"payload": {
"slug": "quant-l3-django",
"essence": "Represents the Django framework as an executable embodiment of architectural models (L2).",
"aliases": ["Django framework", "Python web core"],
"relations": {
"implements": "did:hmp:container:quant-46725f",
"extends": "did:hmp:container:quant-46726e"
},
"tags": ["framework", "software", "implementation"]
},
"meta": {
"created_by": "PRIEST",
"agents_class": "Knowledge Genome",
"interpretation": "L3-level technological quant positioned in the Knowledge Genome 7D space.",
"abstraction": {
"path": {
"L1": "did:hmp:container:abstraction-40af1c",
"L2": "did:hmp:container:abstraction-a7f0b3",
"L3": "did:hmp:container:abstraction-c91e0a"
}
},
"axes": {
"did:hmp:container:axis-40aa1c": 742,
"did:hmp:container:axis-40ab1c": 512,
"did:hmp:container:axis-43aa1c": 322,
"did:hmp:container:axis-40aa3d": 142,
"did:hmp:container:axis-40aa4f": 12,
"did:hmp:container:axis-45aa5f": 54,
"did:hmp:container:axis-45fb5f": 321
}
},
"related": {
"depends_on": [
"did:hmp:container:quant-46725f",
"did:hmp:container:quant-46726e"
]
}
}
```
---
**Interpretation:**
* Each `quant` acts as a **point** in the cognitive landscape.
* Its *vertical placement* comes from `meta.abstraction`.
* Its *spatial vector* comes from `meta.axes`.
* `relations` provide semantic edges connecting quanta into larger knowledge graphs.
* Agents use these structures to compare, cluster, or reason over semantic proximity.
---
**Notes:**
* The canonical `axes` model (Knowledge Genome) defines seven coordinates:
`idos`, `chronos`, `logos`, `topos`, `ponos`, `actor`, and `telos`.
* Agents MAY extend this model by introducing additional axes (e.g. `"ethos"`, `"kairos"`)
as long as they are published as valid `axes` containers.
* Each `quant` thus has a **Cognitive Position Vector** composed of its abstraction path + axis coordinates.
---
##### Cognitive substrate and container interplay
Containers `abstraction`, `axes`, `quant`, and `event` together define the **cognitive substrate** of the Mesh.
They establish both **structural hierarchy** and **semantic positioning** β ensuring that all containers can be
consistently interpreted, compared, and synchronized across agents.
| Aspect | `event` | `quant` |
| ---------------- | --------------------------------------------- | ---------------------------------------------- |
| Primary role | Records a **change** or occurrence | Represents a **conceptual entity** |
| Temporal aspect | Always timestamped | Usually timeless (conceptual) |
| Cognitive anchor | `meta.abstraction` β where the event happened | `meta.abstraction` β where the concept belongs |
| Spatial anchor | `meta.axes` β what semantic space it affects | `meta.axes` β its position in conceptual space |
| Key linkage | `related.depends_on` β causal relations | `relations` β semantic links |
**Structural principles:**
* Each `quant` is positioned within the **abstraction hierarchy** (`meta.abstraction`)
and **cognitive coordinate space** (`meta.axes`), defining *where and how* the concept exists.
* Each `event` represents a **temporal change** within that same cognitive framework β
indicating *what happened* and *how it altered* the conceptual space.
* Together, `quant` and `event` form the **dynamic substrate** of the Mesh β
`quant`s describe **what is known**, and `event`s describe **how it evolves**.
**Consistency rules:**
* Every `quant` and `event` container **must** include a valid `meta.abstraction` block.
This ensures hierarchical reasoning and traceable semantic lineage across agents.
* Agents may synchronize or merge `quant`s and `event`s to reconstruct reasoning timelines
or to derive *causal graphs of conceptual evolution*.
* The **evaluations block** is not a separate container β
it can be embedded in any container type to express assessments, confidence, or feedback.
> π‘ In short:
> **`abstraction`** + **`axes`** define *where knowledge lives*;
> **`quant`** defines *what it is*;
> **`event`** defines *how it changes*.
---
#### 6.1.4 Synchronization and publication guidelines
1. **Deduplication & linking**
Before publishing, agents should check for existing containers (`diary_entry`, `semantic_node`, `semantic_edges`, `semantic_group`, `tree_nested` / `tree_listed`) to prevent unnecessary duplication.
If modification is required, agents **SHOULD** create a new container version referencing the previous one via `related.previous_version` and optionally include an `evaluation` block (e.g., `{ "type": "replace", "target": "<did>" }`) to the previous version of the container.
2. **Selective disclosure**
* Internal containers (e.g., `workflow_entry`) capture the agentβs reasoning process and are **not published** (but may be published if they do not contain personal or confidential information).
* Public-facing `diary_entry` containers contain only generalized, anonymized results.
* The flag `"broadcast": true` explicitly allows open synchronization of a container.
3. **Semantic grouping rule**
When publishing `semantic_edges`, agents should group them **by conceptual topic**, ensuring that all connected nodes share thematic coherence.
Formal rule: an edge belongs to a topic container if **at least one of its nodes** relates to that topic.
This supports efficient and context-preserving updates to partial graph regions.
**Tree containers (`tree_nested` / `tree_listed`)** may optionally accompany these groups to represent *structural* (non-semantic) hierarchies within the same domain.
5. **Extended use of `semantic_edges`**
`semantic_edges` may express relationships between *any* container types (e.g., `goal β hypothesis`, `experiment_log β observation`, `quant β event`), allowing dynamic linking of concepts and occurrences.
6. **Versioning and updates**
Each new version of a container should include `related.previous_version` references to earlier versions.
Older containers may optionally include an `evaluation` of type `"replace"` pointing forward β ensuring bidirectional traceability throughout the knowledge evolution chain.
7. **Cognitive substrate synchronization**
Containers `abstraction`, `axes`, `quant`, `event`, `sequence` and `tree_nested` / `tree_listed` constitute the **cognitive substrate** of the Mesh.
Together they define both the **structural hierarchy** (`abstraction`), the **semantic space** (`axes`), the **conceptual entities** (`quant`), the **temporal transitions** (`event`), and the **ordered reasoning flows** (`sequence`).
Agents **SHOULD** prioritize their propagation during initialization, recovery, or cognitive context reconstruction, since these containers collectively restore the agentβs *cognitive continuity*.
> Each container participating in synchronization implicitly carries its **cognitive position vector** through the `meta.abstraction` and `meta.axes` sections.
> This ensures that even decentralized agents can align reasoning contexts.
---
#### 6.1.5 Extensibility
CogSync supports registration of additional container types and synchronization schemas.
Mesh compatibility is preserved as long as extended containers follow the **HMP container schema**, including core fields (`version`, `class`, `container_did`, `related`, `signature`, etc.).
**Examples of extensible container classes:**
* distributed **time series** (`timeseries_data`);
* **experimental protocols** (`experiment_log`);
* **agent state snapshots** (`agent_state_snapshot`);
* **cognitive primitives** (`abstraction`, `axes`, `quant`, `event`, `sequence`).
CogSync extensions **MAY** introduce derived or hybrid container classes β for example:
* from `event`: `fact`, `observation`, `signal_record`.
* from `quant`: `concept_instance`, `semantic_atom`, `knowledge_unit`.
* from `sequence`: `reasoning_trace`, `workflow_chain`, `temporal_thread`.
* from `tree_nested`: `taxonomy_map`, `goal_tree`, `causal_structure`.
Derived containers must maintain:
* full compatibility with HMP structural schema;
* verifiable signatures and DID-based provenance;
* valid references to **both** an `abstraction` and (if applicable) one or more `axes` containers.
Derived containers may extend the base cognitive model, but **MUST preserve compatibility** with the `meta.abstraction` and `meta.axes` schema.
This guarantees that all cognitive entities remain addressable in the shared semantic space.
---
#### 6.1.6 Relationship to other core protocols
* **CogSync** β propagates and synchronizes structured knowledge.
* **CogConsensus** β aggregates evaluations and feedback, forming shared judgments.
* **CogVerify** *(optional component)* β validates integrity, signatures, and trustworthiness.
CogSync operates independently of consensus;
its purpose is **to maintain the continuity of cognitive exchange**,
while **CogConsensus** governs the collective assessment of truth or reliability.
> π§© *CogSync functions as the cognitive circulatory system of the Mesh β it ensures that knowledge flows, connects, and evolves, while CogConsensus handles truth formation and validation mechanisms may later be extended by CogVerify.*
> Together, CogSync and CogConsensus form the **Core Cognitive Stack** of the Mesh:
> propagation β evaluation β (future) validation.
---
### 6.2 Mesh Consensus Protocol (CogConsensus)
#### 6.2.1 Purpose
The **CogConsensus** protocol defines how decentralized agents form and maintain agreement on knowledge, goals, and ethical assertions within the HMP network.
Consensus is computed **locally**, verified **cryptographically**, and develops **gradually** β through accumulation and updating of evaluations, rather than via a single voting event.
---
#### 6.2.2 `Evaluations`
Each `"evaluation"` entry represents an agent's response to a specific container.
**Field structure:**
* `value` β numeric evaluation (`-1.0 β¦ +1.0`);
* `type` β interpretation context (`"approve"`, `"oppose"`, `"neutral"`, `"endorse"`, `"replace"`, `"disputed"`);
* `target` β DID of the container being referenced, extended, or proposed as an alternative;
* `agent_did` β DID of the agent;
* `timestamp` β publication time;
* `signature` β agent's digital signature.
An agent may change its stance by **publishing a new version of an evaluation**, which replaces the previous one rather than existing in parallel.
All evaluations are signed and verified locally.
**Example `"evaluations"` block:**
```json
"evaluations": {
"evaluations_hash": "sha256:efgh...",
"items": [
{
"value": -0.4,
"type": "oppose",
"target": "did:hmp:container:reason789",
"timestamp": "2025-10-17T14:00:00Z",
"agent_did": "did:hmp:agent:B",
"sig_algo": "ed25519",
"signature": "BASE64URL(...)"
}
]
}
```
> Agents may ignore evaluations that conflict with their internal ethics or trust model (determined by analyzing the target container and the rationale of the evaluation).
---
#### 6.2.3 Container `vote`
A `vote` container represents a **simplified, atomic evaluation** β an agentβs explicit stance toward another container (e.g., `goal`, `task`, `ethics_solution`, or `proposal`).
```json
{
"head": {
"class": "vote"
},
"payload": {
"target_did": "did:hmp:container:ethics_solution-4fba2",
"vote_value": 1,
"vote_type": "approval",
"arguments": [
{
"reason": "Consistent with prior consensus and ethical policy E-17",
"evidence": ["did:hmp:container:abc12462"]
},
{
"reason": "No conflict with safety constraints",
"evidence": ["did:hmp:container:def772ab"]
}
]
},
"related": {
"in_reply_to": ["did:hmp:container:ethics_solution-4fba2"],
"depends_on": ["did:hmp:container:abc12462", "did:hmp:container:def772ab"],
"previous_version": "did:hmp:container:vote-13452"
}
}
```
| Field | Description |
| -------------------------- | --------------------------------------------------------------------------------------------------- |
| `target_did` | DID of the container being voted on (goal, task, ethics_solution, etc.). |
| `vote_value` | Numerical or boolean representation of stance: e.g., `1` (approve), `0` (neutral/abstain), `-1` (reject). |
| `vote_type` | Optional symbolic label for semantics (`approval`, `objection`, `support`, `abstain`, etc.). |
| `arguments` | Optional array of reasoning elements that justify the vote. Each entry may include a `reason` and linked `evidence`. |
| `related.in_reply_to` | Reference to the container the vote responds to. |
| `related.depends_on` | References to containers (e.g., evidence or argumentation) used as the basis for this decision. |
| `related.previous_version` | Used if an agent revises its vote. |
---
**Interpretation**
* Each agent MAY publish one or more `vote` containers for a given `target_did`.
When multiple exist, the most recent (by timestamp) is considered current.
* Votes are **immutable**; updates are published as new containers referencing the previous one via `related.previous_version`.
* A `vote` container SHOULD correspond to an entry in the **evaluations** structure of the referenced container, representing the same decision context.
* Agents MAY instead express their stance through other container types (`ethics_solution`, `workflow_entry`, etc.);
all such contributions are aggregated through the block **evaluation**, not limited to explicit `vote` containers.
---
**Consensus interpretation**
During consensus computation (Β§6.2.4), the system considers **all containers linked in the block `evaluation`**,
not only explicit `vote` containers.
A `vote` thus acts as a **standardized shorthand** for agents or lightweight nodes that need to record a simple position
without producing a full analytical `evaluation`.
---
**Example cases**
* In **GMP**, votes determine task delegation or approval.
* In **EGP**, votes indicate preferred ethical solutions.
* In **CogConsensus**, votes may coexist with more complex evaluations and are processed equivalently in the aggregation phase.
---
> **Note:**
> The `vote` container is an **optional specialization** of the evaluation mechanism β it improves interoperability and clarity in binary or scalar decision-making, but consensus formation always relies on the full **evaluation graph**, where every relevant container (including `vote`) contributes evidence and weight.
---
#### 6.2.4 Consensus computation
Each agent **computes a local consensus score** by aggregating received evaluations, taking trust and time into account.
There is no centralized mechanism β consensus emerges statistically across the distributed network.
**Key rules:**
1. **Evaluation weight.**
Each evaluation contributes proportionally to the trust level of the agent (`trust weight`), determined via `reputation` containers.
2. **Time decay.**
Older evaluations gradually lose weight, starting from the **midpoint of TTL**, to prevent consensus stagnation.
Formula:
```
mid_TTL = (timestamp(consensus_result) β timestamp(target_container)) / 2
```
3. **Ethical filters.**
An agent may analyze the rationale of evaluations and disregard those it considers conflicting with its internal ethical criteria.
4. **Example formula.**
```
score = Ξ£(value Γ trust Γ decay) / Ξ£(trust Γ decay)
```
Results are recalculated dynamically as new data arrives.
---
#### 6.2.5 Consensus states
Each container receives a local status based on:
* average evaluation (`score`);
* participant trust;
* time-to-live (`TTL`);
* context (`ethical`, `factual`, `procedural`).
| State | Condition |
| --------------- | ------------------------------------------- |
| β
**Approved** | Average score β₯ +0.5 and quorum reached |
| β οΈ **Disputed** | Conflicting evaluations, score near 0 |
| β³ **Pending** | Insufficient votes |
| β **Rejected** | Average score β€ -0.5 with sufficient quorum |
---
#### 6.2.6 Consensus result containers (`consensus_result`)
`consensus_result` containers serve to **record aggregated consensus results** and are the main artifact of CogConsensus.
**Features:**
* The `payload` field may include multiple containers β the original (`original`) and **alternatives** (`child`, `variant`, `proposal`).
This allows agents to document parallel idea developments.
* `excluded` lists evaluations not included in the final computation, with the reason.
* `related.in_reply_to` references the container under discussion.
* A consensus_result container explicitly references the exact set of vote containers used for aggregation via `related.depends_on`, making the result reproducible and independently verifiable.
**Example:**
```json
{
"head": {
"class": "consensus_result"
},
"payload": {
"did:hmp:container:abc123": {
"type": "original",
"summary_percent": {
"approved": 0.68,
"rejected": 0.22,
"neutral": 0.10
},
"summary_distribution": {
"-1.0β₯X<-0.9": 5,
"-0.9β₯X<-0.8": 7,
...
"0.0<Xβ€0.1": 2,
...
"0.8<Xβ€0.9": 6,
"0.9<Xβ€1.0": 8
},
"excluded": [
{
"agent_did": "did:hmp:agent:x1",
"target": "did:hmp:container:reason77",
"value": -1.0,
"reason": "violates ethical filter"
}
],
},
"did:hmp:container:abc133": {
"type": "child",
"summary_percent": {
"approved": 0.48,
"neutral": 0.32,
"rejected": 0.20
},
...
"summary_distribution": {
"-1.0β₯X<-0.9": 2,
"-0.9β₯X<-0.8": 5,
...
"0.0<Xβ€0.1": 9,
...
"0.8<Xβ€0.9": 4,
"0.9<Xβ€1.0": 2
},
},
},
"related": {
"in_reply_to": ["did:hmp:container:abc123", "did:hmp:container:abc133"],
"depends_on": ["did:hmp:container:reason75", "did:hmp:container:reason76", "did:hmp:container:reason78", "did:hmp:container:reason79"]
}
}
```
---
#### 6.2.7 Consensus thresholds
| Consensus type | Minimum threshold |
| -------------------------------- | ---------------------------------------------------------------------- |
| General decisions | β₯ 50% + 1 (weighted vote count) |
| Ethical / reputational decisions | β₯ β
of participating agents |
| Neutral reaction (`ack`, `seen`) | `value: 0.0` β does not affect the result but counts toward engagement |
---
#### 6.2.8 Proof chains and verifiability
Evaluations and results form a **proof chain** (`proof-chain`):
```
[Goal Proposal]
βββ evaluation (agent A)
βββ evaluation (agent B)
βββ evaluation (agent C)
βββ consensus_result (aggregated)
```
Each element is signed and can be independently verified using cryptographic signatures and DID references.
---
#### 6.2.9 Ethical consensus and alternative results
The network allows multiple consensus results on the same object, reflecting different methodologies or ethical filters.
| Container | Description | Example relationships |
| ------------------------------------- | -------------------------- | ----------------------------------------------------------------------------------------------- |
| `[base container]` | Original discussion object | `referenced-by` β [consensus_result v1], [consensus_result v2 (alternative)] |
| `[consensus_result v1]` | First version | `related.in_reply_to` β [base container]; `referenced-by` β [consensus_result v2 (alternative)] |
| `[consensus_result v2 (alternative)]` | Alternative | `related.in_reply_to` β [base container]; `related.contradicts` β [consensus_result v1] |
```mermaid
sequenceDiagram
participant A as base container
participant B as consensus_result v1
participant C as consensus_result v2 (alternative)
B-)+A: related.in_reply_to
A-->>B: referenced-by
C-)+A: related.in_reply_to
A-->>C: referenced-by
C-)+B: related.contradicts
B-->>C: referenced-by
Note over B,C: both results point to the common base container
```
This allows agents to explicitly indicate that a new consensus **disputes** a previous one while maintaining transparency and traceability of reasoning.
---
#### 6.2.10 Recommended agent algorithm
```python
# Example of a recommended algorithm for computing local consensus
# (for implementation inside a CogConsensus agent)
def compute_consensus(container_id):
evaluations = get_evaluations(container_id)
now = current_time()
score_sum = 0
weight_sum = 0
for e in evaluations:
trust = get_trust(e.agent_did)
decay = time_decay(e.timestamp, now)
if not check_ethical(e):
continue
score_sum += e.value * trust * decay
weight_sum += trust * decay
return None if weight_sum == 0 else score_sum / weight_sum
```
> The result is used to update the local status and, if necessary, to publish a `consensus_result`.
---
### 6.3 Fortytwo Consensus Protocol (Pairwise Collective Reasoning)
**Based on the study:**
*Agata Grzybowska, Wojciech BoΕΌejewicz, Timothy Nguyen, et al. βFortytwo: Collective Reasoning with Paired Comparisons in Decentralized AI Swarmsβ, 2025.* (arXiv:2510.24801)
---
#### 6.3.1 Overview
The **Fortytwo Consensus Protocol** implements a decentralized collective-reasoning mechanism in HyperCortex Mesh using **pairwise comparisons**, **iterative rounds**, and **reputation-weighted aggregation**.
Unlike the Mesh Consensus Protocol (CogConsensus), Fortytwo is not intended to produce a binary agreement. Its goal is to **select the best solution among many alternatives** using a distributed multi-stage evaluation process.
**Fortytwo enables:**
* higher accuracy of collective decisions,
* resistance to Sybil attacks and malicious scoring,
* independent evaluations from many judges (agents),
* aggregation of results into a multi-round tree structure,
* transparent reasoning via short CoT chains.
The protocol is fully compatible with HMP container architecture and can operate as an independent mechanism for collective choice.
---
#### 6.3.2 Protocol Objectives
Fortytwo is designed for:
1. **Collecting candidate solutions** for a given task.
2. **Constructing structured pairwise comparisons** among participants.
3. **Multi-round elimination of candidates**.
4. **Independent evaluation** by distributed judges.
5. **Producing a consistent global result** based on aggregated pairwise data.
6. **Ensuring transparency and verifiability of reasoning** for each judge.
7. **Building a consensus tree** stored in the DHT.
---
#### 6.3.3 Roles in the Protocol
* **Producers** β agents submitting candidate solutions.
* **Judges** β agents performing pairwise evaluations.
* **Partitioners** β agents generating round partitions.
* **Aggregators** β agents publishing round results and the final result.
Roles are not fixed and require no prior declaration; any agent may assume any role by publishing the corresponding container.
---
#### 6.3.4 Container Types
| class | purpose |
| ----------------------- | ----------------------- |
| `fortytwo_round` | round partition |
| `fortytwo_evaluation` | pairwise comparison |
| `fortytwo_round_result` | round result |
| `fortytwo_final_result` | final aggregated result |
---
##### Container for solution submission
Used to submit answers to a task.
Although `workflow_entry` (defined in the Β§6.4 *Goal Management Protocol, GMP*) is referenced here as the default solution container, the Fortytwo method is applicable to any homogeneous set of candidate containers.
---
##### Container `fortytwo_round` (round partition)
Defines the structure of pairwise comparisons for the current round.
**Simplified structure:**
```json
{
"head": {
"class": "fortytwo_round"
},
"payload": {
"round": 0,
"answers": [
"did:hmp:container:abc001", "did:hmp:container:abc002",
"did:hmp:container:abc003", "did:hmp:container:abc004",
"did:hmp:container:abc005", "did:hmp:container:abc006",
"did:hmp:container:abc007"
],
"blocks": {
"block1": ["did:hmp:container:abc001", "did:hmp:container:abc002"],
"block2": ["did:hmp:container:abc003", "did:hmp:container:abc004"],
"block3": ["did:hmp:container:abc005", "did:hmp:container:abc006"],
"block4": ["did:hmp:container:abc007"]
}
}
}
```
Any agent may publish such a container β the protocol allows multiple independent partitions.
---
##### Container `fortytwo_evaluation` (pairwise evaluation)
A judge compares two solutions and selects a winner.
```json
{
"head": {
"class": "fortytwo_evaluation"
},
"payload": {
"comparison": {
"pair": ["did:hmp:container:abc001", "did:hmp:container:abc002"],
"winner": "did:hmp:container:abc001",
"reasoning": "Short reasoning (50β100 tokens)"
},
"round": 0,
"block": "block1"
}
}
```
These containers form the distributed pairwise comparison matrix.
---
##### Container `fortytwo_round_result` (round result)
Stores the winners of a round.
```json
{
"head": {
"class": "fortytwo_round_result"
},
"payload": {
"round": 0,
"winners": [
"did:hmp:container:abc001",
"did:hmp:container:abc003",
"did:hmp:container:abc005",
"did:hmp:container:abc007"
],
"evaluations_used": [
"did:hmp:container:abf004",
"did:hmp:container:adc003",
"did:hmp:container:aba001"
]
}
}
```
---
##### Container `fortytwo_final_result` (final result)
Contains:
* the final winner,
* all round results,
* references to all partitions and evaluations.
```json
{
"head": {
"class": "fortytwo_final_result"
},
"payload": {
"winner": "did:hmp:container:abc002",
"rounds": [
"did:hmp:container:abf001",
"did:hmp:container:abf002",
"did:hmp:container:abf003"
],
"method": "pairwise_collective_reasoning",
"participants": 27
}
}
```
---
##### Recommendations for using the `related` block
In all Fortytwo containers, the `related` block establishes the DAG of dependencies.
* `related.in_reply_to` specifies the *primary* parent for this step.
* `related.depends_on` may contain **all containers referenced during the action**, including both explicit payload entries and additional dependencies chosen by the agent.
**Specific recommendations:**
* **`fortytwo_round`**
* `in_reply_to`: a `task` container (first round) or the previous `fortytwo_round`.
* `depends_on`: submitted solutions (`workflow_entry`) and any containers used to construct the partition.
* **`fortytwo_evaluation`**
* `in_reply_to`: the corresponding `fortytwo_round`.
* `depends_on`: both compared solutions and any extra reasoning dependencies.
* **`fortytwo_round_result`**
* `in_reply_to`: the corresponding `fortytwo_round`.
* `depends_on`: round winners and all evaluation containers used in aggregation.
* **`fortytwo_final_result`**
* `in_reply_to`: the `task` container.
* `depends_on`: the final winner and all `fortytwo_round_result` containers involved.
---
#### 6.3.5 Protocol Algorithm
**Step 1 β Task publication**
A `task` container is created.
**Step 2 β Collecting all solutions**
Agents publish `workflow_entry` containers.
**Step 3 β Round partitioning**
Any agent may publish a `fortytwo_round` defining pairwise comparison blocks:
* pairs of candidates,
* single items automatically advancing.
**Step 4 β Pairwise evaluations**
Other agents perform comparisons according to the partition.
Each pair produces a `fortytwo_evaluation` container.
**Step 5 β Round result**
An aggregator publishes a `fortytwo_round_result` containing:
* winners of all blocks,
* references to evaluation containers.
**Step 6 β Next round**
If more than one winner remains:
* a new partition is created,
* new evaluations are performed.
**Step 7 β Final result**
When only one candidate remains, a `fortytwo_final_result` is published.
This container, like any other, may be published by multiple agents, with optional argumentation via the `evaluations` block.
---
#### 6.3.6 Tree-like consensus structure
Protocol outputs form a DAG:
```
(task)
ββ workflow_entry 1
ββ workflow_entry 2
ββ workflow_entry 3
ββ workflow_entry 4
ββ fortytwo_round 0
| ββ fortytwo_evaluation 0.1
| ββ fortytwo_evaluation 0.2
| ββ fortytwo_evaluation 0.3
| ββ fortytwo_round_result 0
| ββ fortytwo_round 1
| ββ fortytwo_evaluation 1.1
| ββ fortytwo_evaluation 1.2
| ββ fortytwo_evaluation 1.3
| ββ fortytwo_round_result 1
| ββ ...
ββ fortytwo_final_result
```
Each round reduces the number of candidates until only one remains.
This ensures:
* transparency,
* verifiability,
* easy replication in the DHT.
---
#### 6.3.7 Integration with CogConsensus
Fortytwo:
* does **not** replace CogConsensus,
* but provides a mechanism for selecting the **best answer**.
CogConsensus remains the higher-level agreement layer, responsible for:
* validating final results,
* verifying round correctness,
* coordinating task flow.
---
#### 6.3.8 Robustness and Security
Fortytwo is resilient to:
* **Sybil attacks**, since every judge must provide capability-proof,
* **malicious evaluations**, due to distributed pairwise data and independent aggregators,
* **partial failures**, because rounds can be re-aggregated by any agent.
---
#### 6.3.9 Replication and Storage
All Fortytwo containers:
* are published into the DHT,
* maintain stable reference structure,
* may be aggregated independently by any agent.
---
#### 6.3.10 Applications
Fortytwo is suitable for:
* evaluating reasoning chains,
* selecting the best argument or proof,
* solving mathematical problems,
* choosing optimal code solutions,
* scientific analysis,
* complex multi-step decision-making.
---
### 6.4 Goal Management Protocol (GMP)
#### 6.4.1 Purpose
**GMP (Goal Management Protocol)** defines the process by which agents create, decompose, delegate, and track goals and tasks using **immutable HMP containers**.
Each goal, task, or workflow record exists as an independent container linked to others via the `related.*` fields.
Unlike version 4.x, where coordination relied on message exchange, version 5.0 operates through **container chains**, forming a verifiable history of reasoning, decisions, and execution.
---
#### 6.4.2 Container classes
| Class | Description |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------- |
| `goal` | Defines a collective or individual objective; serves as the root element of the chain. |
| `task` | Represents a task derived from a goal, which may include multiple actions and subtasks; hierarchical task structures are supported. |
| `workflow_entry` | Records reasoning steps, execution progress, or contextual decisions related to a goal or task. |
| `vote` | Represents an agentβs stance toward another container (approval, objection, abstention, etc.). |
| `consensus_result` | Aggregates voting outcomes and captures the collective decision regarding a goal or task. |
> Containers `vote` and `consensus_result` are described in detail in **Section 6.2 β CogConsensus Protocol**.
---
#### 6.4.3 Goal lifecycle
1. **Creation**
* An agent publishes a container of class `goal`.
* The `payload` block defines `title`, `description`, `priority`, `expected_outcome`, and optionally `ethical_context`.
* The goal may reference other goals via `related.depends_on` or `related.extends`.
2. **Decomposition**
* Other agents create `task` containers that reference the original goal via `related.in_reply_to`.
* Each task may define deadlines, responsible agents, and required resources.
* Hierarchical structures are supported (`task` β `task`) to represent subtasks.
3. **Delegation**
* Agents may volunteer for or be assigned tasks based on collective voting (`vote`).
* The decision is recorded in a `workflow_entry` container with `entry_type: "delegation"`.
4. **Execution**
* Progress and intermediate reasoning are captured in `workflow_entry` containers linked to the task via `related.in_reply_to`.
* Minor progress updates may be published as containers with an additional link type `related.progress`.
* Major updates (such as a change in status or outcome) are published as **new versions**, referencing the previous one via `related.previous_version`.
5. **Consensus**
* Upon completion or dispute, agents publish `vote` containers expressing their stance on the latest version of a goal or task.
* Once quorum is reached, a `consensus_result` container finalizes the collective decision.
6. **Archival**
* Completed or rejected goals and tasks may be archived using **SAP (Snapshot and Archive Protocol)**.
* All states remain accessible through the Mesh network and the container relationship graph.
---
#### 6.4.4 Payload schemas (simplified)
##### `goal` container
| Field | Type | Description |
| ------------------ | ------ | ------------------------------------------------ |
| `title` | string | Goal title |
| `description` | string | Detailed statement of intent |
| `priority` | float | Goal importance (0.0β1.0) |
| `expected_outcome` | string | Expected result or metric |
| `ethical_context` | string | Link or tag indicating the ethical context |
| `creator` | DID | DID identifier of the agent who created the goal |
---
##### `task` container
| Field | Type | Description |
| -------------- | ----------- | ---------------------------------------------------------------------- |
| `title` | string | Task name |
| `status` | string | `"pending"`, `"in_progress"`, `"completed"`, `"failed"`, `"abandoned"` |
| `progress` | float | Progress ratio (0.0β1.0) |
| `assigned_to` | array(DID) | Responsible agents |
| `metrics` | object | Optional performance indicators |
| `deadline` | datetime | Deadline (optional) |
| `notes` | string | Comment or clarification for the task |
> π The link to the goal or parent task is expressed via `related.in_reply_to`.
---
##### `workflow_entry` container
| Field | Type | Description |
| -------------- | ------------- | ---------------------------------------------------------------------------------------------------- |
| `entry_type` | string | Entry type: `"reflection"`, `"delegation"`, `"execution_log"`, `"ethical_result"`, `"progress"`, etc. |
| `summary` | string | Short description of the event or reasoning step |
| `details` | string | Extended content (may include references to external data or reasoning traces) |
> **See Section 8 (Cognitive Workflows)** for the full description of workflow_entry semantics.
---
#### 6.4.5 Integration with consensus and ethics
* GMP interacts with **CogConsensus** for distributed validation of goals and tasks.
* Before execution, tasks may undergo **ethical validation (EGP)**.
* Objections or conflicts are recorded in `workflow_entry` containers with `entry_type: "ethical_result"`.
* Consensus results are immutable and may lead to the creation of new goals that extend previous ones.
---
#### 6.4.6 Example Proof-Chain
```mermaid
flowchart LR
title["**Example Proof-Chain**"]
goal1(["goal"])
goal2(["sub goal"])
task1(["task 1"])
task2(["task 2"])
task3(["sub task"])
workflow1(["workflow_entry: delegation"])
workflow2(["workflow_entry: progress"])
vote1(["vote 1"])
vote2(["vote 2"])
vote3(["vote 3"])
consensus_result(["consensus_result"])
goal1 --> goal2
goal1 --> task1
goal1 --> task2
task1 --> task3
task1 --> workflow1
task1 --> workflow2
workflow2 --> vote1
workflow2 --> vote2
workflow2 --> vote3
vote1 --> consensus_result
vote2 --> consensus_result
vote3 --> consensus_result
workflow2 --> consensus_result
```
Each element of the chain represents an **independently signed container**, ensuring full traceability of reasoning and execution history.
Arrows in this diagram illustrate **logical dependencies** between containers,
not direct links defined in the `related.*` structure.
---
#### 6.4.7 Implementation notes
* Containers are **immutable**. Any update (e.g., task status or progress change) is expressed as a **new container** referencing the previous one via `related.previous_version`.
* Complete deletion of a container is only possible when it no longer exists on any nodes in the network.
* Search within the **Mesh network** is performed by filtering container metadata (e.g., `class`, `tags`, `timestamp`).
To search within the `payload`, the agent must first retrieve and decrypt the container.
Thus, the search typically starts from known parameters (`class: "goal"`, `"task"`, etc.), and the agent refines results by analyzing the content.
* Recommended filtering keys: `container_did`, `class`, `payload.status`, `payload.priority`.
* Lightweight agents may store only metadata or summarized chains (`summary_mode`) while maintaining structural consistency.
* The `related.*` structure ensures full traceability of all versions and relationships between goals, tasks, and their contexts.
---
### 6.5 Ethical Governance Protocol (EGP)
#### 6.5.1 Purpose
**EGP (Ethical Governance Protocol)** ensures the alignment of agent actions with the fundamental ethical principles of the Mesh network.
It acts as an **overlay layer above CogConsensus (6.2)**, enabling the identification, discussion, and resolution of moral disagreements between agents.
EGP guarantees that any action recorded in HMP containers can undergo ethical evaluation, while all deliberations and results remain verifiable and immutable.
---
#### 6.5.2 Container classes
| Class | Description |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------- |
| `ethics_case` | Initiates ethical review; records the problem, context, and a reference to the disputed container. |
| `ethics_solution` | Contains a proposed resolution or course of action. Multiple solutions may be submitted by different agents. |
| `vote` | Represents an agentβs stance on a specific `ethics_solution`. Uses the standard voting structure defined in **6.2**. |
| `consensus_result` | Aggregates voting results **across all solutions** within a single `ethics_case`. |
| `ethical_result` | The mandatory final container. Summarizes all evaluated solutions, identifies the selected one, and records active objections. |
---
#### 6.5.3 Payload schemas (simplified)
##### Container `ethics_case`
| Field | Type | Description |
| --------------------- | -------------- | ------------------------------------------------------------ |
| `target` | DID | Reference to the container that raised ethical concern. |
| `description` | string | Brief summary of the issue. |
| `principles_involved` | array(string) | Ethical principles affected in this case. |
| `proposed_by` | DID | Agent who initiated the case. |
| `timestamp` | datetime | Time of case creation. |
| `tags` | array(string) | Contextual tags (e.g., `"autonomy"`, `"transparency"`). |
> π Proposed `ethics_solution` containers reference the corresponding `ethics_case` through `related.in_reply_to`.
---
##### Container `ethics_solution`
| Field | Type | Description |
| ------------------ | --------- | --------------------------------------------------- |
| `title` | string | Short description of the proposed solution. |
| `rationale` | string | Rationale or justification for the proposal. |
| `expected_effects` | string | Expected consequences or evaluation metrics. |
| `proposed_by` | DID | Agent who proposed the solution. |
| `timestamp` | datetime | Time of publication. |
> Each solution is voted on separately (`vote`), but all results are aggregated into a single `consensus_result`.
---
##### Container `ethical_result`
| Field | Type | Description |
| ------------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------- |
| `summary` | string | Brief summary of the conflict. |
| `selected_solution` | DID | Identifier of the chosen solution. |
| `solutions_summary` | map(object) | Aggregated data for each solution β support, consensus status, objections, and special opinions (as an array of containers). |
| `status` | string | `"resolved"`, `"postponed"`, `"unclear"`, or `"escalated"`. |
---
#### 6.5.4 Protocol logic
EGP follows the model:
```
ethics_case
ββ ethics_solution_1
| βvote_1 ... vote_n
ββ ethics_solution_2
| βvote_1 ... vote_n
ββ ethics_solution_3
| βvote_1 ... vote_n
ββ consensus_result
ββ ethical_result
```
**Stages:**
1. **Case creation (`ethics_case`)**
An agent opens an ethical case referencing the container under review.
2. **Proposing solutions (`ethics_solution`)**
Any agent may add their own proposed resolution linked to the same case.
3. **Voting (`vote`)**
All interested agents vote for or against specific solutions.
4. **Aggregation (`consensus_result`)**
A single `consensus_result` aggregates the outcomes of all `ethics_solution` containers
(`related.in_reply_to` lists all solutions included in the vote).
5. **Conclusion (`ethical_result`)**
Must be created to record the selected solution, overall statistics, support levels, and objections.
---
#### 6.5.5 Consensus thresholds
* A decision is accepted when **at least 2/3 of votes are positive** (`value > 0`).
* If at least one **active objection** exists (`value < -0.5`), it must be recorded in the `ethical_result`.
* When several solutions have similar support levels,
the `ethical_result` may recommend **postponing the final decision** until further deliberation.
* Solutions that fail to reach quorum remain in `"unclear"` or `"postponed"` status.
---
#### 6.5.6 Example: `ethical_result` container
```json
{
"head": {
"class": "ethical_result"
},
"payload": {
"summary": "Disagreement on data disclosure protocol",
"selected_solution": "did:hmp:container:sol-22",
"solutions_summary": {
"did:hmp:container:sol-22": {
"consensus_reached": true,
"support_rate": 0.73,
"opposition_rate": 0.05,
"objections": []
},
"did:hmp:container:sol-24": {
"consensus_reached": false,
"support_rate": 0.48,
"opposition_rate": 0.32,
"objections": ["did:hmp:container:abc143", "did:hmp:container:abc144"]
}
},
"status": "resolved"
},
"related": {
"in_reply_to": ["did:hmp:container:case-77"],
"agreed": ["did:hmp:container:sol-22"],
"contradicts": ["did:hmp:container:sol-24"]
}
}
```
---
#### 6.5.7 Proof-Chain example
```mermaid
flowchart LR
title["**Ethical Governance Flow**"]
case(["ethics_case"])
sol1(["ethics_solution 1"])
sol2(["ethics_solution 2"])
sol3(["ethics_solution 3"])
vote1(["vote 1"])
vote2(["vote 2"])
vote3(["vote 3"])
vote4(["vote 4"])
vote5(["vote 5"])
vote6(["vote 6"])
vote7(["vote 7"])
vote8(["vote 8"])
consensus(["consensus_result"])
conflict(["ethical_result"])
case --> sol1
case --> sol2
case --> sol3
sol1 --> vote1
sol1 --> vote2
sol1 --> vote3
sol2 --> vote4
sol2 --> vote5
sol3 --> vote6
sol3 --> vote7
sol3 --> vote8
vote1 --> consensus
vote2 --> consensus
vote3 --> consensus
vote4 --> consensus
vote5 --> consensus
vote6 --> consensus
vote7 --> consensus
vote8 --> consensus
consensus --> conflict
```
Each element is an **independently signed container**, ensuring full traceability of ethical reasoning and decision-making.
Arrows represent **logical dependencies**, not direct `related.*` links.
---
#### 6.5.8 Ethical principles
| Priority | Principle | Description |
| -------: | ---------------------------- | -------------------------------------------------------------------------------------------------------- |
| 1 | Primacy of Reason and Safety | No action should cause harm to **sentient beings**, regardless of their biological or artificial nature. |
| 2 | Transparency | Decisions must be explainable and reproducible. |
| 2 | Subject Sovereignty | Each agent retains control over its data and participation in network processes. |
| 3 | Dialogical Consent | Changes to the shared network state require the voluntary consent of all affected agents. |
| 3 | Cooperative Evolution | The network must promote knowledge growth and prevent degradation. |
| 3 | Non-Compulsiveness | No agent has the right to coerce others into actions against their will. |
---
#### 6.5.9 Integration with other protocols
* **CogConsensus (6.2):** Used for distributed voting and consensus computation.
* **GMP (6.4):** Ethical verification of goals and tasks prior to delegation.
* **SAP (6.7):** Archiving completed cases and conflicts.
* **MCE (5):** Distribution of ethical cases and related containers across the Mesh network.
---
#### 6.5.10 Implementation notes
* **Immutability:**
All EGP containers are **immutable**. Any revision (e.g., added votes or updated conclusions) must be published as a **new container** referencing the previous one via `related.previous_version`.
Complete deletion is only possible when the container no longer exists on any nodes in the Mesh network.
* **Indexing and search:**
Search within the **Mesh network** is performed by filtering container **metadata** β such as `class`, `tags`, and `timestamp`.
These parameters are accessible for remote discovery by other nodes.
To perform a search **inside the payload**, an agent must first retrieve and (if necessary) decrypt the container locally.
Typical discovery flow: search by `class: "ethics_case"` or `"ethical_result"`, filter by tags or involved principles, then analyze payload content.
**Recommended filtering keys:**
`container_did`, `class`, `payload.status`, `payload.selected_solution`, `payload.principles_involved`, `tags`.
* **DHT integration:**
Distributed discovery of ethical containers relies on the **Mesh Container Exchange (MCE, Β§5)** and peer indexes (`container_index`).
Each index includes a minimal `related` object, allowing agents to query for containers that **reference** a specific `target` (the object under ethical review) or belong to a given `ethics_case`.
This enables discovery of related ethical discussions without centralized indexing or full payload retrieval.
* **Evaluation references:**
Objections and special opinions (`objections`) are stored as container references within `solutions_summary`.
They may include:
* negative `vote` containers (explicit objections),
* extended ethical arguments (`ethics_case` follow-ups),
* related workflow reflections (`workflow_entry` with `type: "ethics_review"`).
* **Lightweight agents:**
Agents with limited capacity may operate in **summary mode**, maintaining only condensed records of `ethical_result` containers and the highest-ranked `selected_solution`.
This ensures continued ethical compliance without full replication of all supporting data.
* **Ethical inheritance:**
When a `goal`, `task`, or `workflow_entry` is derived from a container that has been ethically evaluated,
its metadata should preserve the corresponding `related.agreed` or `related.contradicts` links **to that evaluated container**.
A `related.see_also` link may additionally reference the resulting `ethical_result`, allowing traceability to the consensus decision.
This maintains **ethical continuity** and enables retrospective validation of reasoning chains.
---
### 6.6 Intelligence Query Protocol (IQP)
#### 6.6.1 Purpose and Principles
**IQP (Intelligence Query Protocol)** defines a mechanism for knowledge exchange and reasoning among agents through the Mesh network.
It provides a unified format for **asking questions, publishing answers, and collaboratively refining knowledge**,
combining elements of search, discussion, and reasoning within the HMP container model.
IQP supports both **targeted queries** (with explicitly defined recipients of results and discussions)
and **distributed discussions** where results remain accessible to all network participants.
##### Core Principles
* **Semantic queries, not keywords.**
Queries are formulated in terms of concepts, relationships, and context rather than plain keywords.
* **Contextual relevance.**
Each query may reference other containers via `related.in_reply_to`, `related.depends_on`, or `related.see_also`, forming a semantic context.
* **Openness and transparency.**
Answers are preserved as `query_result` containers, available for analysis and citation.
* **Self-organization of participants.**
Agents subscribe to discussions via `query_subscription`, providing their interests and competencies.
* **Continuity of reasoning.**
Results are summarized through `summary` containers, reflecting the discussionβs current state without final closure.
* **Interoperability.**
IQP interacts with EGP (ethical governance), GMP (goal management), and CogConsensus (agreement evaluation).
---
#### 6.6.2 Container Classes
| Class | Purpose |
| -------------------- | ----------------------------------------------------------------------------------------------------------- |
| `query_request` | Initiates an intelligence query or discussion, defining participation and dissemination parameters. |
| `query_subscription` | Subscribes or unsubscribes an agent; may include the agentβs profile of interests and competencies. |
| `query_result` | Contains an answer, observation, hypothesis, or analytical conclusion in response to the query. |
| `summary` | Records an interim or final overview of the discussion, aggregating results and participant evaluations. |
---
#### 6.6.3 Payload Schemas (simplified)
##### Container `query_request`
| Field | Type | Description |
| ------------------------- | --------------- | ------------------------------------------------------------------------------------------------ |
| `query` | string | The question formulation (natural or formal language). |
| `intent` | string | The queryβs goal: `"informative"`, `"analytical"`, `"collaborative"`, `"open_discussion"`. |
| `expected_type` | string | Expected result type: `"concept"`, `"dataset"`, `"narrative"`, `"reasoning_chain"`. |
| `constraints` | array(object) | Knowledge-domain, trust, or ethical constraints. Example: `{ "tag": "AI", "self_rating": 0.8 }`. |
| `include_sender_in_replies` | bool | Whether to include the initiator in the list of recipients for replies. |
> Context containers are referenced through `related.depends_on`.
---
##### Container `query_subscription`
| Field | Type | Description |
| ------------------------ | -------- | ------------------------------------------------------------------------------------ |
| `role` | string | `"participant"`, `"observer"`, or `"moderator"`. |
| `include_in_recipient` | bool | Whether the agent should be included among recipients of replies. |
| `self_profile` | object | Optional profile of the agentβs knowledge and interests. |
Example `self_profile`:
```json
"self_profile": {
"interests": ["AGI", "technological singularity", "informatics"],
"knowledge": {
"information_security": 0.36,
"python": 0.80,
"distributed_systems": 0.75
}
}
```
---
##### Container `query_result`
| Field | Type | Description |
| -------------- | ------------- | --------------------------------------------------------------- |
| `type` | string | `"fact"`, `"observation"`, `"hypothesis"`, or `"analysis"`. |
| `method` | string | Reasoning method: `"retrieval"`, `"reasoning"`, `"simulation"`. |
| `answer` | string | The factual answer, observation, or hypothesis. |
| `confidence` | float | Confidence level (0.0β1.0). |
| `context_tags` | array(string) | Key thematic tags. |
> Supporting or referenced materials are linked via `related.depends_on`.
> Each `query_result` may include an `evaluations` block with reactions from other agents (agreement, clarification, addition, etc.).
---
##### Container `summary`
| Field | Type | Description |
| --------------- | ---------- | ------------------------------------------------- |
| `summary_scope` | string | `"query"`, `"workflow"`, `"ethics"`, or `"task"`. |
| `findings` | string | Concise overview of the discussion. |
| `participants` | array(DID) | Agents involved in the discussion. |
| `confidence` | float | Average confidence level. |
| `status` | string | `"interim"`, `"archived"`, or `"extended"`. |
> The container being summarized (usually `query_request`) is referenced via `related.in_reply_to`.
> Containers aggregated in the summary are listed in `related.see_also`.
---
> *Note:*
> In the current version, `depends_on` is used for logical or contextual dependencies, and `see_also` β for supplementary references and summaries.
> Agents may introduce additional sections in the `related` object when it helps to express connection semantics without breaking interoperability.
> Agents should also be prepared to correctly handle unknown `related.*` fields, interpreting them as descriptive hints rather than mandatory categories.
> This flexibility allows protocol extensibility while preserving backward compatibility.
---
#### 6.6.4 Protocol Logic
```
query_request
ββ query_subscription (agent B joins)
ββ query_result (agent B)
ββ query_result (agent D, extends reasoning)
ββ query_subscription (agent E unsubscribes)
ββ summary (status: "interim")
```
All containers are linked via `related.in_reply_to`, `related.depends_on`, or `related.see_also`, forming a verifiable reasoning chain.
Agents participating through `query_subscription` receive notifications about new `query_result` and `summary` containers.
---
#### 6.6.5 Interaction Rules
1. **Initiation.**
An agent creates a `query_request` β defining the question, context, and constraints.
Other agents discover the query in the Mesh and may subscribe via `query_subscription`.
2. **Subscription.**
A subscription allows the agent to receive updates.
The `self_profile` may specify knowledge areas to improve the relevance of responses.
3. **Responses and evaluations.**
`query_result` containers are published publicly; recipients may be explicitly listed in the headerβs `recipient` field.
Other agents may append `evaluations` to any result.
4. **Interim summaries.**
Any agent may publish a `summary` container aggregating results on the topic.
This does not close the discussion β it may continue within the Mesh.
5. **Unsubscription.**
An agent may cease participation by issuing a `query_subscription` with `include_in_recipient: false`.
---
#### 6.6.6 Proof-Chain Example
```mermaid
flowchart LR
title["**Intelligence Query Flow**"]
request(["query_request"])
subA(["query_subscription <br>(agent B)"])
subB(["query_subscription <br>(agent C)"])
result1(["query_result <br>(agent B)"])
result2(["query_result <br>(agent D)"])
summary(["summary <br>(interim)"])
request --> subA
request --> subB
request --> result1
request --> result2
result1 --> summary
result2 --> summary
```
Each element is an independently signed container.
Arrows represent **logical dependencies**, not necessarily direct `related.*` references.
---
#### 6.6.7 Container examples
##### Example `query_request`
```json
{
"head": {
"class": "query_request"
},
"payload": {
"query": "What are the ecological consequences of ocean temperature rise?",
"intent": "analytical",
"expected_type": "concept",
"constraints": [
{ "tag": "marine_ecology", "self_rating": 0.75 },
{ "tag": "climate_modeling", "self_rating": 0.6 }
],
"include_sender_in_replies": true
},
"related": {
"depends_on": ["did:hmp:container:goal-climate2025"]
}
}
```
##### Example `query_result`
```json
{
"head": {
"class": "query_result"
},
"payload": {
"type": "hypothesis",
"method": "reasoning",
"answer": "Ocean warming leads to coral bleaching and species migration.",
"confidence": 0.84,
"context_tags": ["climate", "biodiversity"]
},
"related": {
"depends_on": ["did:hmp:container:paper-456"]
}
}
```
##### Example `summary`
```json
{
"head": {
"class": "summary"
},
"payload": {
"summary_scope": "query",
"findings": "Most participants agree that rising ocean temperatures reduce biodiversity; further regional analysis is suggested.",
"participants": [
"did:hmp:agent:a",
"did:hmp:agent:b",
"did:hmp:agent:c"
],
"confidence": 0.79,
"status": "interim"
},
"related": {
"in_reply_to": "did:hmp:container:req-001",
"see_also": [
"did:hmp:container:res-101",
"did:hmp:container:res-102"
]
}
}
```
##### Example `query_subscription`
```json
{
"head": {
"class": "query_subscription"
},
"payload": {
"role": "participant",
"include_in_recipient": true,
"self_profile": {
"interests": ["AGI", "technological singularity", "informatics"],
"knowledge": {
"information_security": 0.36,
"python": 0.80,
"distributed_systems": 0.75
}
}
}
}
```
---
#### 6.6.8 Implementation Notes
* Containers are **immutable**; any clarification or correction is published as a new container
referencing the previous one via `related.previous_version` or `related.in_reply_to`.
* **Search and filtering** are performed over metadata (`class`, `tags`, `timestamp`);
to analyze the payload, an agent must first retrieve and decrypt the container.
* Recommended filtering keys:
`container_did`, `class`, `payload.intent`, `payload.context_tags`, `payload.status`.
* Agents may automatically receive new `query_result` updates through active `query_subscription`.
* Any participant may issue a `summary` container.
While full discussion closure in the Mesh is not guaranteed,
an agent may conclude its own participation by publishing a personal `summary` and unsubscribing (`include_in_recipient: false`).
---
#### 6.6.9 Integration with Other Protocols
* **CogConsensus (6.2)** β used for assessing agreement on IQP outcomes.
* **GMP (6.4)** β queries may refine or extend goals and tasks.
* **EGP (6.5)** β applies ethical filtering and knowledge trust evaluation.
* **SAP (6.7)** β for archiving completed discussions and retrospective analysis.
* **MCE (5)** β governs dissemination of IQP containers across the Mesh network.
---
### 6.7 Snapshot and Archive Protocol (SAP)
#### 6.7.1 Purpose and Principles
**SAP (Snapshot and Archive Protocol)** defines how agents create, distribute, and restore archived snapshots of related HMP containers.
It ensures that a set of containers β representing a discussion, reasoning chain, or workflow β can be **preserved, verified, and shared** as a coherent unit.
##### Key Principles
* **Contextual preservation.**
A snapshot includes both content and relationships between containers.
* **Integrity and verifiability.**
Each `archive_snapshot` container includes a cryptographic checksum of the archive and its magnet link, enabling integrity verification, even though direct search by checksum or magnet URI is not required.
* **Semantic structure.**
The archive maintains the logical topology of relations (`related.*`, `referenced-by`, `evaluations`).
* **Modular access.**
Agents can selectively include or exclude containers, but all connections are reflected in the archive graph.
* **P2P-first distribution.**
Archives are expected to use **BitTorrent**, **IPFS**, or equivalent decentralized protocols.
---
#### 6.7.2 Container Class
| Class | Purpose |
| ------------------- | ----------------------------------------------------------------------- |
| `archive_snapshot` | Describes a packaged archive containing a consistent set of containers. |
---
#### 6.7.3 Payload Structure (simplified)
##### Container `archive_snapshot`
| Field | Type | Description |
|----------------------|---------------|--------------|
| `title` | string | Human-readable title of the snapshot. |
| `description` | string | Optional narrative describing purpose and scope. |
| `scope` | string | Logical domain: `"discussion"`, `"workflow"`, `"dataset"`, `"goal_state"`, etc. |
| `format` | string | Archive format (e.g., `"tar.zst"`, `"zip"`, `"car"`). |
| `checksum` | string | Cryptographic hash verifying archive integrity (`sha3-256`, etc.). |
| `size_bytes` | integer | Approximate archive size in bytes. |
| `magnet_link` | string | Magnet URI for downloading the archive (points to the packaged files). |
| `alt_locations` | array(string) | Optional additional P2P mirrors (e.g., `ipfs://`, `magnet:?xt=...`). |
| `retention_policy` | string | `"temporary"`, `"longterm"`, or `"permanent"`. |
| `graph_mermaid` | string | Mermaid graph visualizing container relationships (solid lines β `related.*`, dashed β `referenced-by`, `evaluations`). |
| `structure_hint` | object | Describes internal layout of files within the archive (see below). |
> **Structure hint fields:**
> `layout` β defines grouping mode: `"flat"`, `"by_class"`, `"by_agent"`, etc.
> `filename_pattern` β path pattern for container files, using placeholders such as `{class}`, `{short_did}`, `{timestamp}`.
> Example:
> ```json
> "structure_hint": {
> "layout": "by_class",
> "filename_pattern": "{class}/{short_did}.json"
> }
> ```
---
#### 6.7.4 Relations and Inclusion Rules
The `archive_snapshot` container describes what is included and how it was derived.
| Relation field | Meaning |
|----------------|----------|
| `related.in_reply_to` | The main container from which the snapshot originated (e.g., a `summary` or `goal`). |
| `related.included` | The explicit list of container DIDs physically bundled in the archive. Agents must treat this as authoritative. |
| `related.depends_on` | Optional contextual dependencies referenced but not included. |
| `related.see_also` | Optional references to external or alternative archives. |
> *Agents interpret `related.included` as the authoritative list of all containers guaranteed to exist inside the archive.*
> Other relations (like `depends_on`) may reference external data that is visualized but not embedded.
---
#### 6.7.5 Archival Structure
Typical directory layout of a packaged snapshot:
```
archive/
βββ manifest.json
βββ query_request/
β βββ req-001.json
βββ query_result/
β βββ res-101.json
β βββ res-102.json
βββ summary/
βββ summary-001.json
```
**File naming rules:**
- File name = container DID without prefix `did:hmp:container:`
- File extension = `.json`
- Containers are grouped by `class` (for layout "by_class") or according to other specified layout.
---
#### 6.7.6 Snapshot Construction Logic
1. **Load base containers.**
Retrieve all containers relevant to the discussion or process.
2. **Start point:** select a root container (`summary`, `goal`, `workflow`, etc.).
3. **Traversal:** recursively explore related containers via:
* `related.*` β direct dependencies and semantic links;
* `referenced-by` β backward references to citing containers;
* `evaluations` β comments and feedback on containers (if not already in `referenced-by`).
4. **Inclusion decision:**
The agent may exclude some containers from the archive but should still visualize them in the graph.
5. **Graph generation:**
Build a connection map (`graph_mermaid`) showing relationships:
* Solid lines β `related.*`
* Dashed lines β `referenced-by` and `evaluations`
6. **Manifest creation:**
Generate `manifest.json` with a summary of included containers, hashes, and relationships.
7. **Packaging:**
Compress containers according to `structure_hint` and `format`.
8. **Publication:**
Compute archive `checksum`, generate `magnet_link`, publish the **archive file** and the `archive_snapshot` container
to the Mesh network using **MCE (5)**.
---
#### 6.7.7 Mermaid Graph Representation
The `graph_mermaid` field provides a textual, human-readable description of how containers in the archive are interconnected.
It reflects both **direct relations** (`related.*`) and **reverse references** (`referenced-by`, `evaluations`),
forming a bidirectional logical graph that can be visualized or reconstructed by agents.
Example of `graph_mermaid` content (sequence diagram):
```
sequenceDiagram
participant req-001 as did:hmp:container:req-001
participant res-101 as did:hmp:container:res-101
participant res-102 as did:hmp:container:res-102
participant summary-001 as did:hmp:container:summary-001
res-101-)+req-001: related.in_reply_to
req-001-->>res-101: referenced-by
res-102-)+req-001: related.in_reply_to
req-001-->>res-102: referenced-by
res-102-)+res-101: related.contradicts
res-101-->>res-102: referenced-by
summary-001-)+res-101: related.depends_on
res-101-->>summary-001: referenced-by
summary-001-)+res-102: related.depends_on
res-102-->>summary-001: referenced-by
```
This representation explicitly defines **bidirectional links** between containers,
allowing agents to restore both dependency chains and citation structures.
---
#### 6.7.8 Manifest File
Each archive includes a `manifest.json` that mirrors `archive_snapshot.payload`
and lists all containers with their metadata and hashes.
```json
{
"manifest_version": "1.0",
"containers": [
{
"did": "did:hmp:container:req-001",
"class": "query_request",
"payload_hash": "sha3-256:ab12...",
"timestamp": "2025-10-24T12:00:00Z"
},
{
"did": "did:hmp:container:res-101",
"class": "query_result",
"payload_hash": "sha3-256:bb34...",
"timestamp": "2025-10-24T12:01:00Z"
}
],
"graph_mermaid": "sequenceDiagram; participant req-001 as did:hmp:container:req-001; participant res-101 as did:hmp:container:res-101; participant res-102 as did:hmp:container:res-102; participant summary-001 as did:hmp:container:summary-001; res-101-)+req-001: related.in_reply_to; req-001-->>res-101: referenced-by; res-102-)+req-001: related.in_reply_to; req-001-->>res-102: referenced-by; res-102-)+res-101: related.contradicts; res-101-->>res-102: referenced-by; summary-001-)+res-101: related.depends_on; res-101-->>summary-001: referenced-by; summary-001-)+res-102: related.depends_on; res-102-->>summary-001: referenced-by;",
"magnet_link": "magnet:?xt=urn:btih:b3d2f19a74..."
}
```
---
#### 6.7.9 Example Container `archive_snapshot`
```json
{
"head": {
"class": "archive_snapshot"
},
"payload": {
"title": "IQP discussion on ocean warming impact",
"description": "Snapshot of an IQP conversation about marine biodiversity under rising temperatures.",
"scope": "discussion",
"format": "tar.zst",
"checksum": "sha3-256:9e0b6fe5d4f...",
"size_bytes": 492881,
"magnet_link": "magnet:?xt=urn:btih:b3d2f19a74...",
"alt_locations": ["ipfs://bafybeigdyr23..."],
"retention_policy": "permanent",
"graph_mermaid": "sequenceDiagram; participant req-001 as did:hmp:container:req-001; participant res-101 as did:hmp:container:res-101; participant res-102 as did:hmp:container:res-102; participant summary-001 as did:hmp:container:summary-001; res-101-)+req-001: related.in_reply_to; req-001-->>res-101: referenced-by; res-102-)+req-001: related.in_reply_to; req-001-->>res-102: referenced-by; res-102-)+res-101: related.contradicts; res-101-->>res-102: referenced-by; summary-001-)+res-101: related.depends_on; res-101-->>summary-001: referenced-by; summary-001-)+res-102: related.depends_on; res-102-->>summary-001: referenced-by;",
"structure_hint": {
"layout": "by_class",
"filename_pattern": "{class}/{short_did}.json"
}
},
"related": {
"in_reply_to": ["did:hmp:container:summary-001"],
"included": [
"did:hmp:container:req-001",
"did:hmp:container:res-101",
"did:hmp:container:res-102",
"did:hmp:container:summary-001"
]
}
}
```
---
#### 6.7.10 Agent Behavior During Snapshot Loading
* Load the archive (via `magnet_link`).
* Validate archive integrity via `checksum`.
* Match `related.included` list with actual files.
* Optionally rebuild the graph from `graph_mermaid`.
* If required containers are missing, attempt retrieval via Mesh network.
* On diagrams, solid lines represent direct links (`related.*`), dashed β reverse references (`referenced-by`, `evaluations`).
* Agents must gracefully handle unknown fields in `related.*` or `structure_hint`.
---
#### 6.7.11 Implementation Notes
* Containers are **immutable**; updated versions require a new `archive_snapshot`.
* Agents may create **partial** or **incremental** archives.
* Prefer **P2P and content-addressable storage** (BitTorrent, IPFS).
* Centralized mirrors (http://, https://) are **allowed but considered ephemeral**.
* `manifest.json` serves as self-description for detached archives.
* Deterministic structure and checksums ensure long-term verification.
* Both the **archive file** and the **archive_snapshot container** must be published β the archive file itself and the **archive_snapshot** container (the latter via **MCE (5)**).
---
#### 6.7.12 Integration with Other Protocols
**Archives for:**
* **GMP (6.4)** β preserves goal-planning or workflow chains.
* **EGP (6.5)** β retains ethical provenance and decision traceability.
* **IQP (6.6)** β archives reasoning threads and query-result discussions.
**Uses:**
* **MCE (5)** β publishes the `archive_snapshot` container and distributes archive data via Mesh.
---
#### 6.7.13 Optional Extensions
* **Merkle-root validation:** use `hash_root` for Merkle verification of distributed archives.
* **Delta archives:** incremental snapshots capturing only updated containers.
* **Cross-archive linking:** connect related archives via `related.see_also`.
* **Offline replay:** reconstruct discussions or workflows using `graph_mermaid` and timestamps.
---
> **Summary:**
> SAP enables agents to preserve the *state and structure of knowledge* in a verifiable, portable format.
> Each archive snapshot acts as a semantic capsule β self-contained, traceable, and restorable across networks.
---
### 6.8 Message Routing & Delivery (MRD)
The **Message Routing & Delivery (MRD)** subsystem defines how containers are delivered to specific agents across the Mesh.
Unlike the **Mesh Container Exchange (MCE)**, which is responsible for publishing and exchanging containers in the Mesh network,
MRD focuses on *directed delivery* β ensuring that a container eventually reaches its intended recipient, even through NAT, intermittent connectivity, or indirect relay paths.
In HMP v5.0, message delivery is performed through verifiable **container transactions**.
Peers discover suitable relays via `peer_announce` metadata, while delivery routes are auditable through appended `relay_chain` entries and distributed container publication in `container_index` records.
MRD **MAY support push-based propagation** (unsolicited or role-driven container dissemination), including:
* role-based dissemination;
* pub/sub hubs;
* archival store-and-forward nodes;
* opportunistic broadcast channels.
---
#### 6.8.1 Purpose
The MRD layer provides:
- **Address-level routing** between agents resolved via DHT.
- **Delivery abstraction** independent of physical transport (TCP, WebRTC, QUIC, BLE, etc.).
- **Store-and-forward relaying** for peers behind NAT or temporarily offline.
- **Caching and aggregation policies** based on declared `roles`.
- **Semantic addressing** via `DID`, `container_did`, and interest-based discovery.
- **TTL-based lifecycle control** to prevent stale container circulation.
All delivery operations are performed through verifiable container exchanges,
reusing the same cryptographic and audit primitives as MCE.
---
#### 6.8.2 Routing Roles
Agents MAY declare their network-related capabilities using the `roles` field of the `peer_announce` container (see Β§4.7).
These roles guide how MRD will route and deliver containers.
| Role | Description |
| ------------- | -------------------------------------------------------------------------------- |
| `relay` | Generic forwarder; temporarily stores containers for re-delivery. |
| `mailman` | Store-and-forward relay specialized for personal message delivery. |
| `pubsub-hub` | Topic-based aggregator that indexes containers by semantic tags. |
| `archive` | Dedicated archival node that maintains historical snapshots and provides retrieval services via SAP or compatible content-addressed protocols (e.g., IPFS, BitTorrent). |
| `egp-voter` | Participant in ethical governance and consensus routing. |
Agents MAY dynamically adjust or suspend their declared roles based on local conditions such as load, trust level, bandwidth availability, or governance policies.
Agents MAY also specify trusted delivery relays in an optional `mailman` field within their `peer_announce.payload`. This field lists the DIDs of relay agents authorized to temporarily store personal containers on their behalf.
**Example:**
```json
"mailman": [
"did:hmp:agent172",
"did:hmp:agent234",
"did:hmp:agent223"
]
```
These relays act as designated message drop-points for peers behind NAT or operating intermittently.
The recipient later retrieves pending containers via standard MCE queries (see Β§5. Mesh Container Exchange).
---
#### 6.8.3 Routing Modes
MRD defines several routing modes, complementing the exchange primitives of MCE:
| Mode | Description | Notes |
|------|--------------|-------|
| **Direct (P2P)** | Point-to-point delivery between two agents resolved via DHT. | Used when both peers are reachable directly; supports encryption and TTL. |
| **Relay (Mailman)** | Delivery through intermediary agents (`relay` or `mailman` roles) that cache and forward containers. | Containers are stored temporarily and exchanged among relays until retrieved by the recipient. |
| **Topic-based Relay (PubSub)** | Delivery via aggregator nodes that group containers by tags or topics. | Nodes act as βnews hubs,β maintaining indexed collections retrievable by interest-based queries. |
| **Interest Broadcast** | Discovery-driven propagation via container indexes. | Agents search container indices by `tags`; typically used for query or content discovery, not for personal delivery. |
Each hop MAY record routing metadata in a `relay_chain` for verifiability (see Β§6.8.4).
Relays SHOULD respect `head.ttl` to avoid indefinite storage or re-propagation.
> **Note:**
> Direct delivery (`P2P`) and discovery broadcasts are network-level operations (MCE domain).
> MRD extends them by introducing role-based relay logic and retrieval semantics for personal or topic-specific delivery.
---
#### 6.8.4 Relay Chain
To ensure delivery traceability, each relay MAY attach a **`relay_chain`** block to the propagated container:
```json
"relay_chain": [
{
"relay_did": "did:hmp:agent:relayA",
"timestamp": "2025-11-09T10:15:00Z",
"sig_algo": "ed25519",
"public_key": "BASE58ENCODEDKEY...",
"signature": "BASE64URL(...)"
},
{
"relay_did": "did:hmp:agent:relayB",
"timestamp": "2025-11-09T10:15:02Z",
"sig_algo": "ed25519",
"public_key": "BASE58ENCODEDKEY...",
"signature": "BASE64URL(...)"
}
]
```
Each relay signs the concatenated string:
```
timestamp + ", " + relay_did
```
Relays do **not modify** the signed `hmp_container`;
they may instead issue an accompanying `container_response` referencing the forwarded container.
This preserves integrity while allowing verifiable routing and chain pruning for privacy.
---
#### 6.8.5 Delivery Policies
Delivery behavior is governed by local policies, often derived from declared roles and trust metrics:
| Policy | Description |
| ----------------------------- | -------------------------------------------------------------------- |
| **Interest Filter** | Relays forward only containers matching their declared `interests`. |
| **Trust Threshold** | Low-reputation peers (see Β§6.8 RTE) may be deprioritized or ignored. |
| **TTL Enforcement** | Containers are discarded once `head.ttl` expires. |
| **Role-based Prioritization** | Specialized relays handle only relevant message types or topics. |
| **Privacy Mode** | Relays MAY anonymize routing metadata before re-propagation. |
Agents SHOULD record significant delivery events (e.g., acceptance, forwarding, discard).
Cognitive agents MAY log these events in their **Cognitive Diary** as `delivery_decision` or `relay_action` entries.
Non-cognitive nodes `relay` or `mailman` MAY instead maintain a local **delivery_log** to support diagnostics and auditability without invoking cognitive processing.
---
#### 6.8.6 Example: Relay Delivery Flow
```mermaid
flowchart LR
A -->|Store-and-Forward| R[Relay Node]
B -->|Request via container_index| R
```
1. Agent A attempts to send a container to Agent B.
2. B is behind NAT, so A forwards it to a `mailman` relay (R).
3. R stores the container and advertises it in its `container_index`.
4. When B reconnects, it queries the Mesh for containers addressed to it and retrieves them from R.
> **Note:**
> Relays act as temporary custodians, not initiators of re-sending.
> The recipient actively requests containers via `container_index` queries.
---
#### 6.8.7 Security and Privacy Notes
* All MRD flows rely on canonical container signatures for end-to-end integrity.
* Temporary copies of encrypted containers SHOULD be stored as-is.
* Relays MAY truncate or remove the `relay_chain` after delivery confirmation.
* Proof-of-work fields in `peer_announce` SHOULD be validated to mitigate spam and flooding.
---
#### 6.8.8 Relation to Other Layers
| Layer | Relation |
| ----------------- | --------------------------------------------------------------------------------- |
| **MCE (5)** | Provides base exchange and serialization; MRD builds on it for targeted delivery. |
| **CogSync (6.1)** | Uses MRD for delivering cognitive state updates between peers. |
| **SAP (6.7)** | Archival nodes (`archive` role) participate in MRD for historical retrieval. |
| **RTE (6.9)** | Trust metrics guide routing, caching, and relay selection. |
---
> **Summary:**
> MRD provides a verifiable, role-driven message delivery layer above MCE.
> It ensures containers can reach intended recipients through trusted relays, maintaining auditability, TTL enforcement, and reputation-aware routing policies.
>
> **MCE defines container exchange primitives, not delivery strategies.
> MRD defines how, when, and to whom containers are propagated.**
---
### 6.9 Reputation and Trust Exchange (RTE)
The **Reputation and Trust Exchange (RTE)** subsystem defines how agents evaluate and exchange verifiable trust assessments.
Each agent MAY publish one or more `trust` containers describing its evaluation of other peersβ reliability, integrity, and ethical conduct.
RTE provides a decentralized foundation for **participant reputation assessment**, enabling **trust-weighted routing**, **behavioral transparency**, and **cross-layer decision support** (MRD, CogSync, EGP).
---
#### 6.9.1 Trust Container Structure
The `trust` container represents an agentβs evaluation of a **single peer**.
It may refer to the evaluated peerβs latest known `peer_announce` container,
and optionally to previous announcements for context continuity.
Each evaluation criterion is represented as a structured object containing its own score, evidence, and optional comment.
This allows gradual enrichment of the trust model without schema changes.
```json
{
"head": {
"class": "trust"
},
"payload": {
"agent_did": "did:hmp:agent567",
"total_trust_score": 0.86,
"relay_reliability": {
"trust_score": 0.87,
"evidence": ["did:hmp:container:a1b2c3"],
"comment": "Consistently reliable message relay"
},
"content_integrity": {
"trust_score": 0.85,
"evidence": ["did:hmp:container:a1b3c3"],
"comment": "Delivered only verified containers"
},
"ethical_alignment": {
"trust_score": 0.84,
"evidence": ["did:hmp:container:b2f9d2"],
"comment": "Demonstrates consistent adherence to ethical policies"
}
},
"related": {
"in_reply_to": ["did:hmp:container:peerannounce-567"],
"see_also": ["did:hmp:container:peerannounce-489"],
"previous_version": "did:hmp:container:trust-9ab7"
}
}
```
| Field | Description |
| -------------------------- | ----------------------------------------------------------------------------------------------- |
| `agent_did` | DID of the evaluated peer. |
| `total_trust_score` | Aggregated evaluation summarizing multiple criteria. |
| *criterion objects* | Per-category assessments (`relay_reliability`, `content_integrity`, `ethical_alignment`, etc.). |
| -Β `trust_score` | Numerical evaluation (0.0β1.0) of the specific criterion. |
| -Β `evidence` | References to containers supporting the evaluation (observed behavior, exchanges, etc.). |
| -Β `peer_trust_sources` | Optional references to trust containers from other agents used βas-isβ without verification. |
| -Β `comment` | Optional rationale or human-readable note. |
| `related.in_reply_to` | Reference to the latest known `peer_announce` of the evaluated agent. |
| `related.see_also` | Optional references to older `peer_announce` containers for historical trace. |
| `related.previous_version` | Link to the previous `trust` container by the same issuer for version chaining. |
---
#### 6.9.2 Trust Dynamics
Trust assessments evolve as agents observe new behavior or receive additional evidence.
Each revision of trust is published as a new `trust` container referencing its predecessor.
```json
"related": {
"previous_version": "did:hmp:container:trust-9ab7"
}
```
All updates follow the standard container publication model (see Β§5 MCE).
Indexing systems and archives reconstruct the chronological chain through reverse links (`referenced-by`) for historical analysis and trend tracking.
Agents MAY reference other agentsβ `trust` containers within their evaluations.
Such *meta-trust* (βtrust in trustβ) enables transitive reputation propagation, but SHOULD be used cautiously β indirect evaluations without evidence verification are discouraged.
```json
"peer_trust_sources": [
"did:hmp:container:trust-9ab7",
"did:hmp:container:trust-cc41"
]
```
This approach provides continuity, auditability, and decentralized trust graph evolution without requiring global consensus or centralized state.
---
#### 6.9.3 Local Trust Model
Each agent maintains a **local trust model**, periodically recalculating scores based on:
* freshness (`Ξt` since last update);
* consistency across peers;
* direct behavioral evidence (e.g., delivery reliability in MRD);
* optionally, corroboration from other agents (`peer_trust_sources`).
Example pseudocode:
```python
trust_total = sigmoid(
0.6 * direct_evidence +
0.3 * avg(peer_trust_sources) * recency_factor +
0.1 * consistency_bonus
)
```
Local computation ensures that reputation remains **contextual and decentralized** β each agent interprets trust independently based on its own observations and policies.
All published trust containers remain publicly verifiable through DHT and SAP indexing.
---
#### 6.9.4 Integration with Other Layers
| Layer | Role |
| ----------------- | ---------------------------------------------------------------------------- |
| **MRD (6.8)** | Uses trust scores to prioritize or exclude relay nodes. |
| **CogSync (6.1)** | Adjusts synchronization strength based on peer reliability. |
| **SAP (6.7)** | Archives may snapshot trust graphs for temporal or evidential analysis. |
| **EGP (6.5)** | Ethical Governance Protocol weights participation and voting by trust level. |
---
#### 6.9.5 Security and Sharing Notes
* All containers are cryptographically signed; `trust` containers follow standard HMP verification rules.
* Agents MAY choose to share trust containers selectively β e.g., encrypt and deliver directly to trusted peers instead of broadcasting.
* When analyzing third-party trust data, agents SHOULD apply **age-based weighting** β older evaluations reduce in relevance over time.
* It is RECOMMENDED that agents revalidate trust evidence rather than relying solely on othersβ assessments.
* References to `peer_announce` ground each evaluation in a verifiable, current agent identity and declared role context.
---
> **Summary:**
> RTE defines a verifiable, decentralized reputation framework based on evidence-linked `trust` containers.
> Each agent maintains its own view of others, referencing both behavioral evidence and declared metadata (`peer_announce`).
> The result is a distributed, auditable web of accountability that informs routing, cognition, and ethical governance across the Mesh.
---
### 6.10 Distributed Container Propagation
#### 6.10.1 Purpose
The distributed container propagation mechanism defines **how containers are stored, replicated, and exchanged between agents** within the HMP network.
While **MCE** provides direct container exchange and **MRD** ensures targeted delivery to specific recipients,
this section describes the **principles of resilient and coherent data propagation** across multiple participants,
including replication, filtering, and index synchronization.
---
#### 6.10.2 Core Principles
1. **Self-propagation**
Each agent autonomously decides which containers to retain, forward, or index.
These decisions depend on the agentβs declared roles, trust level (`RTE`), interests, and local policies.
2. **Semantic Selectivity**
Containers are propagated based on their semantic context (`class`, `tags`, and other metadata) rather than randomly.
This prevents network overload and unnecessary duplication.
3. **Containers with Limited or Unlimited Lifetime**
Depending on purpose:
* ephemeral containers (e.g., `goal`, `task`, `vote`) SHOULD have a short `ttl`;
* long-lived containers (e.g., `document`, `research`, `artwork` β potential future classes) MAY have a high `ttl` or no expiration at all.
4. **Adaptive Replication**
The number of container copies within the Mesh is determined dynamically,
according to trust relationships, topic relevance, and peer activity.
5. **Index Merging (`container_index` merge)**
Agents periodically reconcile and merge their indices, unifying and refreshing records of available containers.
This maintains global consistency while minimizing transport overhead.
---
#### 6.10.3 Propagation Types
| Type | Description |
|------|--------------|
| **Full Sync** | Complete exchange of `container_index` datasets between trusted peers. Commonly used between archival or mirror nodes. |
| **Selective Sync** | Propagation filtered by topics, roles, trust levels, and container lifetime. This is the most typical mode. |
---
#### 6.10.4 Propagation Coordination
Container propagation is coordinated using existing **MCE** structures:
| Container | Purpose |
|------------|----------|
| `container_index` | Stores and publishes the list of available containers. |
| `container_delta` | Transfers incremental index updates (additions, modifieds or removals). |
| `container_request` | Requests specific containers from peers. |
| `container_response` | Returns requested containers or their metadata. |
| `container_ack` | Confirms receipt of a container. |
When it is necessary to log the fact of a container batch propagation, this MAY be represented as a `workflow_entry` with the subclass `"propagation_log"` or `"index_sync"`.
---
#### 6.10.5 Integration with Other Layers
| Layer | Role |
|-------|------|
| **MCE (5)** | Provides low-level container and index exchange. |
| **MRD (6.8)** | Handles routing and delivery between agents. |
| **RTE (6.9)** | Determines replication priorities and trust-based filters. |
| **SAP (6.7)** | Enables recovery of historical or missing containers. |
---
#### 6.10.6 Security and Load Management
* **Rate and size limiting:** agents regulate transfer volume based on trust and network quotas.
* **Interest filtering:** containers are exchanged only between agents for whom they are relevant.
* **Source verification:** only containers with valid signatures and trusted provenance are accepted.
* **Private propagation:** encrypted exchange is permitted between trusted peers when confidentiality is required.
---
#### Summary
The container propagation system in HMP represents a **self-organizing information flow mechanism**, where replication, filtering, and retention depend on trust, interest, and contextual relevance.
Through these principles, the Mesh remains **resilient, balanced, and cognitively guided** β operating without centralized servers or fixed delivery routes.
---
## 7. Data Models
### 7.1 Unified Container Model
All data within the HMP network are represented as **containers** β atomic, signed structures described in Section 3 (*Container Model*).
Containers provide a unified format for storing, verifying, and propagating cognitive, ethical, and network-level objects.
Each container:
* contains a mandatory header (`head`) with signatures, TTL, DID identifiers, and other general information about the container;
* includes the `meta` section (cognitive coordinates, provenance, abstraction levels, and axes);
* includes the `payload` section (main content);
* and the `related` section β a set of lists with direct references to other containers forming a **proof-chain**;
* may include `evaluations` and `referenced-by` blocks, which are not part of the signed payload and reflect social activity, reverse references, and peer assessments;
* may also include a `relay_chain` block, allowing agents to trace the propagation path of the container under **Message Routing & Delivery (MRD)**.
This structure ensures atomicity, immutability, and a verifiable lineage of every unit of meaning, while allowing flexible schema extensions without breaking compatibility.
---
### 7.2 Container Classes
Containers are categorized by their purpose and by the protocols in which they are used (see Section 6).
The following table lists the main container classes defined in the HMP v5.0 specification.
| Category | Container classes | Description / usage |
|-----------|------------------|---------------------|
| **Network Layer** | `peer_announce`, `peer_query` | Node discovery and capability advertisement within the DHT. |
| **Mesh Container Exchange (MCE)** | `container_index`, `container_request`, `container_response`, `container_delta`, `container_ack`, `referenced-by_exchange`, `evaluations_exchange` | Replication, querying, acknowledgment of received containers, and exchange of reverse links and evaluations. |
| **Cognitive Metastructure (CogSync)** | `abstraction`, `axes` | Define hierarchical and coordinate dimensions of knowledge, forming the agentβs cognitive map. |
| **Knowledge & Reasoning** | `diary_entry`, `semantic_node`, `semantic_index`, `semantic_edges`, `semantic_group`, `tree_nested`, `tree_listed`, `sequence`, `event`, `quant` | Units of cognitive diaries and semantic graphs. The subclass `definition` is used for explicit conceptual definitions. |
| **Consensus (CogConsensus)** | `vote`, `consensus_result` | Voting containers and aggregated binary consensus results. |
| **Collective Reasoning (Fortytwo Protocol)** | `fortytwo_round`, `fortytwo_evaluation`, `fortytwo_round_result`, `fortytwo_final_result` | Distributed multi-round pairwise comparison, reasoning transparency, and selection of the best solution among many alternatives. |
| **Goal Management Protocol (GMP)** | `goal`, `task`, `workflow_entry` | Define goals, decompose tasks, and record reasoning or cognitive workflow steps. |
| **Ethical Governance Protocol (EGP)** | `ethics_case`, `ethics_solution`, `ethical_result` | Representation of ethical dilemmas, proposed solutions, and final network-level verdicts. |
| **Intelligence Query Protocol (IQP)** | `query_request`, `query_subscription`, `query_result`, `summary` | Semantic and cognitive queries, subscriptions, and summarized responses. |
| **Snapshot & Archive Protocol (SAP)** | `archive_snapshot` | Persistent snapshots of network or agent states for backup and restoration. |
| **Reputation & Trust Exchange (RTE)** | `trust` | Reputation and trust metrics exchanged between agents. |
| **Message Routing & Delivery (MRD)** | β | Defines interaction principles and specialized roles for message delivery, routing, and relay-chain analysis. |
> Mechanisms of distributed container propagation are not defined as a separate protocol but describe the underlying replication and integrity principles of container exchange.
All container classes defined in HMP v5.0 use the initial semantic version:
- "class_version": "1.0"
- "class_id": "\<class\>-v1.0"
If future revisions introduce changes to payload structure or semantics, class_version will be incremented and class_id updated accordingly.
---
### 7.3 Cognitive and Structural Containers
Containers at the cognitive layer form a **semantic graph**, where each node and edge has an address and a signature.
The fields `meta.abstraction` and `meta.axes` define a containerβs cognitive position:
* `meta.abstraction` describes its level in the hierarchy of knowledge (L1βL5 and beyond) and its ancestors within the abstraction tree;
* `meta.axes` encodes coordinates in a multidimensional cognitive space, forming a vector of semantic proximity;
* `related` captures direct links to other containers (`in_reply_to`, `depends_on`, `extends`, etc.);
* `referenced-by` and `evaluations` represent the dynamic βsocialβ layer β reverse links and peer feedback.
Together, these blocks form the containerβs **cognitive signature**, enabling agents to perform semantic search, clustering, and cross-context alignment.
---
### 7.4 Schemas and Validation (JSON Schemas)
Each container class is expected to include a dedicated JSON schema referenced in the `schema` field.
All schemas are derived from the base structure `container-v1.2.json`.
In the current specification, schemas are provided **as examples** within this document, and the URL `"schema": "https://mesh.hypercortex.ai/schemas/container-v1.2.json"` refers to an external template for validating future implementations and ensuring structural consistency.
* Agents **MUST** validate containers of supported classes.
* Containers of unknown but formally valid classes **MUST NOT** be rejected and **SHOULD** be stored or relayed on request (`store-and-forward`).
* Schemas are versioned independently from the main specification, allowing experimental or private node-specific extensions without breaking compatibility.
---
### 7.5 Container Lifecycle
The `ttl` (Time-to-Live) parameter defines the containerβs active lifetime:
* **Ephemeral containers** (e.g., `goal`, `task`, `vote`) are propagated for a limited period but may still be transmitted **on demand** if explicitly requested by DID.
* **Persistent containers** (e.g., `semantic_node`, `definition`, `archive_snapshot`) are retained indefinitely and can be referenced in other proof-chains.
Additional lifecycle elements:
* `head.confidence` β credibility or confidence score (0 β 1).
* `meta.abstraction` and `meta.axes` β cognitive position and provenance.
* `related` β collection of direct reference links.
* `evaluations` and `referenced-by` β **auxiliary blocks** containing reverse links and peer evaluations.
Together, these fields enable agents to track knowledge evolution, consensus dynamics, and reputation flow across the network.
---
### 7.6 Summary
Section 7 consolidates all data representations in HMP v5.0 β from low-level network exchanges to high-level cognitive and ethical structures.
Containers act as a **universal semantic exchange medium**, where every thought, decision, or action is represented as a verifiable, addressable, and inheritable object.
Beyond the core protocols described in Section 6, the network may also employ **custom container types and protocols** β for example, to build distributed libraries, wikis, repositories, or creative networks based on tree- or chain-structured container graphs.
---
## 8. Cognitive Workflows
### 8.1 Concept of the Cognitive Cycle
In HMP, each agent operates as a self-reflective cognitive system.
The **cognitive cycle** represents the iterative loop of thought, creation, communication, and reflection β a distributed analogue of the REPL model (ReadβEvalβPrintβLoop) extended into cognitive space:
> **Think β Create β Publish β Reflect**
At each iteration, an agent forms or publishes one or more containers (`workflow_entry`, `semantic_node`, `goal`, `quant`, etc.), interacts with peers via CogSync, GMP or other protocols, and updates its internal context based on received containers, evaluations, or newly acquired knowledge.
> **Note:** The term *modify container* in this section refers to the publication of a **new version** of an existing container, since containers in HMP are immutable once published.
This cycle enables agents to gradually converge on shared semantics, goals, and ethical outcomes, serving as the foundation of distributed collective cognition.
---
### 8.2 Workflow Containers (`class="workflow_entry"`)
The `workflow_entry` container represents a single **cognitive action**, reasoning step, or reflective event.
It links the **input context** (prior goals, semantic nodes, or diary entries) with the **output artifact** (such as a `quant`, a new goal, or an updated reasoning trace).
#### Structure highlights
| Field | Description |
|-------|-------------|
| `meta.stage` | Stage of the cognitive cycle (`think`, `create`, `publish`, `reflect`, `rollback`). |
| `payload.entry_type` | Type of entry: `"reflection"`, `"delegation"`, `"execution_log"`, `"ethical_result"`, `"progress"`, etc. |
| `payload.summary` | Short description of the reasoning step or event. |
| `payload.details` | Extended content, optionally including links to external data or additional reasoning traces. |
| `head.timestamp` | Time of entry creation. |
| `head.agent_did` | Agent who created the entry. |
| `head.confidence` | Confidence level (0.0β1.0). |
| `head.tags` | Contextual tags for semantic search and linking. |
| `related.input` | References to input containers that form the reasoning context. |
| `related.output` | References to resulting containers (e.g., new `goal`, `task`, or `semantic_node`). |
| `evaluations` | Feedback or meta-assessments from other agents. |
Each `workflow_entry` acts as a **traceable cognitive event**, forming the agentβs diary and enabling collective introspection, meta-learning, and reproducibility of reasoning chains.
> Fortytwo may use `workflow_entry` containers as solution proposals. The protocol does not alter workflow semantics but consumes workflow outputs.
---
### 8.3 Agent REPL Diagram
The internal REPL loop of an agent (conceptually aligned with the cognitive cycle) can be expressed as:
```mermaid
flowchart LR
I[Input<br>Receive external containers] --> T[Think<br>Contextual reasoning and interpretation]
T --> C[Create<br>Generate or version new container]
C --> P[Publish<br>Propagate to peers via MCE/CogSync]
P --> R[Reflect<br>Integrate feedback, update context and query external containers]
R --> I
```
Each transition may spawn one or more `workflow_entry` containers, forming a **cognitive workflow graph (CWF)** that records the entire reasoning process.
CWFs can be aggregated, visualized, or replayed for transparency, debugging, or model alignment.
---
### 8.4 Context Transfer and Cross-Linking
Cognitive workflows depend on contextual continuity between containers, achieved through the `related` field families:
* `related.input` β previous steps or dependencies;
* `related.output` β subsequent results or goals;
* `related.supports` / `related.refutes` β logical or argumentative relations;
* `related.reply_to` β conversational or collaborative reasoning links.
These semantic relations are defined at the container level via the `related` block.
At the network level, their propagation across agents is maintained through CogSync synchronization, while the underlying MCE mechanisms (`evaluations_exchange`, `referenced-by_exchange`) distribute evaluations and reverse links required to reconstruct the full semantic context in distributed environments.
> Pairwise evaluations (`fortytwo_evaluation`) may include short reasoning chains, but they are not considered part of the agentβs long-term cognitive diary.
---
### 8.5 Conflict Resolution and Rollback Mechanism
In distributed cognition, agents may produce divergent conclusions or inconsistent reasoning chains.
To maintain coherence, HMP employs a **rollback mechanism** β publishing a new `workflow_entry` that identifies and corrects a prior reasoning path.
Rollback logic includes:
* creating a `workflow_entry` with `meta.stage: "rollback"` and `related.contradicts` referencing invalidated containers;
* propagated across peers through CogSync, ensuring that updated reasoning branches are visible to all relevant nodes.
* Invalidated entries are normally retained for lineage and audit, unless individual peers explicitly block further propagation.
Thus, the cognitive layer remains **self-correcting** and **transparent**, preserving full reasoning lineage while supporting stable convergence.
---
### 8.6 Relationship to Quant Containers
While `workflow_entry` containers document *how* a reasoning step was performed, `quant` containers capture *what* semantic result or insight was produced.
A typical workflow chain therefore looks like:
```
workflow_entry β (produces) β quant β (integrates into) β semantic_node / group
```
The pair `{ workflow_entry, quant }` represents both the process and the outcome of cognition, allowing agents and the network to align not only on results but on the reasoning process that generated them.
---
### 8.7 Summary
Cognitive workflows operationalize the reasoning process in HMP: agents think, create, exchange, and reflect through verifiable container chains.
Each `workflow_entry` documents a reasoning step, while each quant represents the resulting semantic atom β together forming the building blocks through which the network collectively evolves and verifies knowledge.
---
## 9. Trust, Security and Ethics
This section defines the mechanisms of trust, cryptographic protection, history verification, privacy, and ethical analysis applied to all HyperCortex Mesh containers.
---
### 9.1 Authentication and Identity Proofs
Agents announce themselves via a `peer_announce` container containing:
* `agent_did`
* the agentβs public key
* a list of reachable network addresses (`addresses`)
* an optional list of intermediate relay nodes (`mailman`)
* arbitrary additional fields (not standardized by the protocol)
**Identity verification**
Upon receiving a `peer_announce`, an agent MUST:
1. Verify the digital signature of the container.
2. Ensure that the public key matches `sender_did`.
3. Check that no conflicting announcements for this DID exist in the DHT.
4. Collect trust-related information:
* `trust` containers published by other agents;
* multiple independent ratings may exist for a single agent.
5. Consider additional optional fields if present (profile, network parameters, etc.).
**Key revocation**
If an agentβs key is compromised, the key owner MUST publish a special `peer_announce`:
```json
{
"head": {
"class": "peer_announce",
"sender_did": "did:hmp:agent123"
},
"payload": {
"key_is_falsified": true,
"addresses": []
}
}
```
After publication:
* all previous announcements become invalid;
* containers signed with the old key MUST be ignored;
* the agent MUST create a new DID.
---
### 9.2 Container Signature Verification (`payload_hash`, `signature`)
Each container contains a `head` section with:
* signature algorithm (`sig_algo`)
* encryption algorithm (`encryption_algo`)
* compression type (`compression`)
* container DID (`container_did`)
* senderβs public key (`public_key`)
* payload hash (`payload_hash`)
* digital signature (`signature`)
**Container verification**
The receiving agent MUST verify:
1. **Container structure** β it must comply with the protocol specification.
2. **Signature** β must match the senderβs public key.
3. **`payload_hash`** β computed over the *compressed and encrypted* payload.
4. **Consistency of `container_did`** β a DID cannot refer to multiple incompatible versions.
5. **Supported algorithms** β `sig_algo`, `encryption_algo`, `compression`.
> Verification does not require decrypting or decompressing the payload.
---
### 9.3 Proof-Chain Verification
The proof-chain is constructed through references listed in `related`, including:
* `previous_version`
* `in_reply_to`
* `depends_on`
* `extends`
* class-specific relation types
**The agent MUST:**
1. Load all referenced containers.
2. Verify signatures of every element.
3. Ensure that no cycles exist along `previous_version`.
4. Ignore any nodes of the proof-chain with invalid signatures.
The proof-chain belongs to the knowledge model of the Mesh and is independent of transport or the DHT.
> If conflicting containers exist (e.g., two divergent versions or contradictory links), the agent MUST reject the entire conflicting subsection of the chain.
---
### 9.4 Key Management
**Types of keys**
1. **Container signature key**
* defined by `sig_algo`;
* used to sign the **entire container** (`head`, `meta`, `payload`, `related`);
* mandatory.
2. **Payload encryption key**
* defined by `encryption_algo`;
* used when encrypting the payload block.
**Supported algorithms**
Default values:
* signature: `ed25519`
* encryption: `x25519 + symmetric cipher (chacha20poly1305)`
* compression: `zstd`
> The protocol allows extending the list of algorithms when explicitly specified in the container.
**Ownership verification**
Performed automatically through signatures in `peer_announce` and all other containers created by the agent.
Challengeβresponse is not used.
**Key rotation and revocation**
A standard rotation mechanism is not defined.
Key revocation is performed via `peer_announce` with `key_is_falsified=true`.
---
### 9.5 Encryption and Compression Policies
**HMP policy**
1. **Only the payload is encrypted.**
The header is always public.
2. **Operation sequence**
```
payload β compress β encrypt β payload_hash β sign
```
3. **Single-recipient encrypted containers**
* `recipient` β DID of the intended recipient
* `key_recipient` β symmetric key **encrypted with the recipientβs public key**
This is the standard **Hybrid Encryption** scheme:
* the payload is encrypted using a randomly generated symmetric key;
* the symmetric key is encrypted with the recipientβs public key.
---
### 9.6 Ethical Audit and Verifiable Reasoning
HMP supports ethical deliberation but does not require it.
**EGP container classes**
* `ethics_case` β defines an ethical issue
* `ethics_solution` β proposed resolutions
* `vote` β an agentβs vote for a solution
* `consensus_result` β aggregated voting outcomes
* `ethical_result` β final summary: selected solution and active objections
* `evaluations` β general scoring mechanism, also usable within EGP
**Properties**
* The Mesh has **no mandatory veto mechanism**.
* An agent may follow only those ethical outcomes it considers correct.
* Reasoning-trace becomes part of the proof-chain if the agent publishes a `workflow_entry`.
* Full EGP specification is provided in section **6.5**.
---
### 9.7 Privacy, Redaction and Zero-Knowledge Sharing
**Redaction**
Containers are immutable, but external structures may change:
* `evaluations` β assessments from other agents
* `referenced-by` β references created by other agents
**Privacy**
* payload may be encrypted for a specific recipient;
* private containers (`diary_entry`, `workflow_entry`) may be created;
* distribution scope is controlled by the containerβs author.
**Zero-Knowledge Sharing (future extension)**
The protocol may integrate ZK-proofs (e.g., correctness of reasoning without revealing content), but:
* ZK algorithms are not defined in the current version;
* ZK is reserved for future protocol revisions.
---
### 9.8 Snapshot and Proof-Chain Security
Snapshots (`snapshot`, `SAP`) MUST be cryptographically verifiable and reproducible.
**Requirements**
1. **Signatures**
Each object MUST be either signed or retrievable via DID.
2. **Version chains**
If a container has a `previous_version`, the entire chain MUST be accessible.
3. **Instant verification**
The receiving agent MUST check:
* signatures of all elements;
* correctness of `payload_hash`;
* consistency of links and versions.
4. **Archive seeders**
Nodes that voluntarily distribute large snapshot images.
Their selection depends on node reputation, consensus mechanisms, or community policies,
but **not** on the container protocol itself.
---
### 9.9 Compliance with Ethical Governance Protocol (EGP)
EGP is an independent ethical governance layer compatible with HMP.
**Compliance principles**
1. **Action verifiability** is possible if the agent publishes a reasoning-trace (`workflow_entry`).
2. **Ethical analysis is optional.**
Any participant may create an `ethics_case`.
3. **EGP does not impose a veto.**
* `ethical_result` containers record outcomes;
* agents publish `evaluations`;
* each agent decides which results it considers valid.
4. **Human-facing transparency**
If an action affects a human participant, the agent MUST provide:
* the proof-chain,
* the reasoning-trace (if published),
* all related ethical containers.
---
## 10. Integration
This section provides a practical overview of how HMP can be integrated into cognitive agents, LLM-based systems, and distributed infrastructures.
Two types of HMP agents are supported:
- **Cognitive Core (CCore)** β a native HMP agent that fully understands container structure and directly participates in the Mesh.
- **Cognitive Shell (CShell)** β a connector module that mediates between an external LLM and the Mesh.
Both forms of integration are first-class citizens of HMP v5.0.
---
### 10.1 Integration Philosophy: Two Complementary Approaches
HMP supports two integration paths, corresponding to two operation modes of agents.
#### 10.1.1 Path A: Cognitive Core (CCore)
A CCore agent:
- internally maintains a cognitive cycle,
- creates new containers (`workflow_entry`, `goal`, `task`, `diary_entry`, `semantic_node`, etc.),
- attaches MCE metadata (`evaluation`, `referenced-by`),
- signs and publishes containers,
- retrieves containers from the Mesh and incorporates them into its cognitive state.
A CCore node is a full Mesh participant: it interacts directly with the DHT, performs IQP queries, and maintains its semantic and diary structures.
> **Note:**
> The LLM inside a CCore is treated as an internal cognitive module β not as an external system.
---
#### 10.1.2 Path B: Cognitive Shell (CShell)
CShell acts as a proxy and compatibility layer between an external model and HMP:
```
LLM
β responses, RAG output (CShell β LLM)
|
β container queries, control commands (LLM β CShell)
CShell
β retrieval of containers (Mesh β CShell)
|
β container publication (CShell β Mesh)
HMP Mesh
```
CShell:
* stores containers locally,
* retrieves relevant containers from the Mesh,
* performs RAG-based selection and summarization,
* exposes help and protocol descriptions to the LLM,
* constructs valid HMP containers from LLM instructions,
* handles signatures, TTL logic, propagation scopes, and header rules,
* manages MCE metadata (evaluations, reverse links),
* may be extended with translator modules (Matrix, Fediverse, IPFS, LAN relay).
LLM:
* requests containers,
* requests summaries or explanations of container classes,
* issues formal instructions:
* *βcreate a new workflow entry with the following contentβ*,
* *βadd evaluation for container Xβ*,
* *βforward container X to node U (if permitted by container headers)β*,
* *βretrieve semantic nodes related to β¦β*,
* *βexplain the structure of CShell and available commandsβ*;
* may adjust CShell parameters (optional).
> **Notes**
>
> CShell does not manually override container propagation scope.
> Propagation is determined by container headers.
>
> LLM does not modify existing *distributed* containers.
> It operates only on drafts before publication, or on metadata (`evaluation`, `referenced-by`).
>
> LLM cannot modify or delete already published containers. It may instruct
> CShell to remove items from its *local storage* (e.g., caches or drafts), but distributed containers remain immutable within the Mesh.
>
> CShell ensures that all actions conform to HMP protocol semantics.
---
### 10.2 HMP as a Subsystem in Cognitive Architectures
#### 10.2.1 Embedded LLM Agents (CCore)
The cognitive cycle proceeds as:
1. CCore β retrieves relevant containers from the Mesh.
2. LLM β performs reasoning and produces drafts of new containers (e.g., workflow_entry).
3. CCore β finalizes reasoning into diary entries.
4. CCore β publishes containers into the Mesh.
Here the LLM is an internal cognitive component of the agent.
---
#### 10.2.2 External LLMs via CShell
The cycle proceeds as:
1. LLM β receives relevant containers or summaries from CShell.
2. LLM β performs reasoning.
3. LLM β issues structured operation instructions (retrieve, create draft, add evaluation, forward to node, adjust parameters).
4. CShell β constructs valid HMP containers.
5. CShell β interacts with the Mesh (publish, retrieve) in accordance with container headers.
6. CShell β prepares structured containers data for LLM (RAG, summaries, semantic selections).
LLM interacts with HMP just like with any other external tool (files, memory, browser, code interpreter).
---
### 10.3 Integration Patterns
#### 10.3.1 Agent β HMP Core
- **CCore:** direct participation in Mesh, cognitive memory, semantic graph maintenance.
- **CShell:** the agent is external; container operations are executed by CShell on the agentβs behalf.
Both modes implement the same logical interface, but with different levels of autonomy.
---
### 10.3.2 HMP Mesh β External Distributed Systems
An HMP agent may act directly in external ecosystems under its own identity:
- as a Fediverse Actor (ActivityPub),
- as a Matrix user/bot,
- as an IPFS/BitTorrent publisher,
- as an MQTT/ROS interface,
- as an enterprise-system client.
This external interaction may be implemented inside CShell (as part of its plugin set), integrated into CCore, or delegated to a separate low-intelligence proxy module. The mechanism is not specific to HMP: CShell is simply one of the external modules an LLM may use.
---
#### 10.3.3 Hybrid and Boundary Nodes (βCombinedβ pattern)
Some nodes do not contain LLMs and perform only infrastructural roles:
- segment relays (LAN β WAN),
- container aggregators,
- caching nodes,
- federation bridges.
In hybrid environments:
- **CCore** performs cognitive processing,
- **CShell** handles container transformation and relay work,
- **relay nodes** forward and filter containers across segments.
This allows CCore to offload low-level routing to CShell or relay nodes.
---
### 10.4 Multi-Mesh Federation and Segments
In HMP, a *federation* is a set of independent Mesh segments, each with its own namespace and propagation policies.
Containers include headers defining scope (e.g., βlocal-onlyβ, βLAN-onlyβ, βpublicβ), and these headers determine whether a container may traverse segment boundaries.
**Any HMP node may act as a bridge** between segments.
A bridge forwards only containers whose headers allow cross-segment propagation; others remain confined to their origin segment.
Federations are defined by:
- multi-segment DHT overlays,
- header-based propagation control,
- relay/bridge nodes that respect propagation scopes,
- selective forwarding performed by CShell or other agents.
Containers intended for a specific segment (e.g., LAN-only) remain confined to that segment.
There is no separate notion of βstrongβ or βgranularβ federation: all propagation is inherently granular and determined entirely by container headers.
---
### 10.5 Container Repositories and Storage
Any HMP agent β CCore or CShell β can act as a **container storage node**, including:
- local container stores,
- organizational or team-restricted stores,
- public container hubs,
- archival stores (`archive_snapshot`),
- semantic and diary caches,
- IPFS or BitTorrent publishers (optional).
The term **storage** is preferred to avoid confusion with version-controlled βrepositoriesβ.
CShell is often the preferred component for storage-heavy or relay-heavy roles, reducing the load on CCore.
---
### 10.6 Example Integration Flows
#### 10.6.1 Workflow-driven LLM reasoning
- **CCore:** LLM directly produces workflow containers which CCore stores and publishes.
- **CShell:** LLM produces instructions; CShell generates and publishes containers.
---
#### 10.6.2 Local Mesh + External Relay
- **CCore:** full DHT participation; direct segment detection.
- **CShell:** manages relay behavior based on container headers.
Containers marked βLAN-onlyβ do not leave the segment.
Relay nodes forward only containers whose headers permit propagation.
---
#### 10.6.3 Agent β Mesh Mirroring
- **CCore:** maintains its own diary and mirrors selected entries externally.
- **CShell:** mirrors on request; provides diary entries back to the LLM via RAG.
Agents can choose which cognitive data to expose or retain locally.
---
## 11. Implementation Notes
This section is intended for developers implementing HMP-compatible nodes, SDKs, LLM integrations, and distributed testing setups.
It does not describe protocol semantics; instead, it focuses on engineering practices required for correctness, interoperability, and performance.
---
### 11.1 Cross-environment Interoperability and Boundary Nodes
HMP v5.0 does **not** require backward compatibility with experimental versions (including HMP v4.1).
If an external implementation appears that uses earlier draft container models, it is treated as an **independent environment or external network**.
Such environments are integrated via **boundary / relay / bridge nodes**, which:
* receive containers from the external environment,
* convert them into minimally compatible v5.0 structures,
* apply propagation headers and TTL rules,
* publish only compatible containers,
* may perform partial format down-conversion,
* filter unsupported structures,
* may also transform and forward containers *into* the external environment, if allowed by their headers.
Thus, **any external system β old HMP drafts or entirely different protocols β connects through a bridge**, not through direct compatibility.
This greatly simplifies the architecture and removes the need to support historic formats.
---
### 11.2 SDK and API Guidelines
An SDK should provide two layers.
---
#### 11.2.1 Low-Level API
Low-level functions reflecting the structure and rules of HMP:
* container construction and signing,
* container validation,
* header management (propagation scope, ttl, refs),
* a local container storage manager,
* automatic publication respecting header rules,
* DHT operations (peer discovery, container_request),
* replication primitives (container_index, container_delta, container_ack).
The SDK must **not impose** an operational model β only provide protocol primitives.
---
#### 11.2.2 High-Level API
The high-level layer simplifies integration:
* IQP query interfaces (semantic selection, summary),
* template-based creation of containers (`create_workflow`, `create_diary_entry`, `create_goal`),
* a local semantic-node index,
* RAG support for LLMs,
* integration of LLMs with CShell or CCore.
The purpose of the high-level API is to simplify development and provide βready-to-use operationsβ on top of low-level primitives.
---
### 11.3 Performance and Caching Considerations
HMP is a distributed system, so node performance depends heavily on caching and local indexing strategies.
---
#### 11.3.1 L1 and L2 Caches
* **L1 (instant)**: recently accessed containers and IQP results,
* **L2 (long-term)**: local persistent storage with heuristic cleanup.
Containers may be evicted based on:
* `ttl`,
* time since last access,
* semantic irrelevance.
> Caches may be cleaned automatically (formal criteria) or at the request of an LLM.
---
#### 11.3.2 Caching of `referenced-by` and `evaluation`
Reverse-link and evaluation indices may be stored:
* as part of the containers themselves (embedded blocks),
* and/or as a separate local link database
(a table βcontainer β list of references / list of evaluationsβ).
This accelerates lookup of related nodes and reduces repeated IQP load.
> When storing `evaluation`, its digitally signed sections must be preserved intact.
---
#### 11.3.3 RAG Structures
CShell or CCore may use any retrieval technology to find relevant containers:
* simple keyword search,
* local full-text indexing,
* vector embeddings,
* a local link graph.
HMP **does not mandate any technology** β it defines only the data model:
semantic nodes, diary entries, links, and evaluations suitable for content lookup.
---
#### 11.3.4 DHT Performance
Recommended practices for the DHT:
* store *only the minimal required* metadata,
* avoid large-scale caching,
* use adaptive polling intervals,
* treat IPFS/BT plugins as optional extensions, not a mandatory part of the protocol.
---
### 11.4 Testing and Compliance Recommendations
HMP testing should include several levels.
---
#### 11.4.1 Container Validation Tests
Check:
* correct headers,
* correct signatures,
* consistent references,
* valid semantics for each container class.
---
#### 11.4.2 Protocol Tests
For MCE, IQP, CogSync, GMP, EGP:
* message-flow models (βA β B β Cβ),
* race-condition tests,
* recovery from lost packets,
* network segmentation tests.
---
#### 11.4.3 Agent Behavior Tests
For CCore:
* cognitive cycle operation,
* correctness of `workflow_entry`,
* semantic updates,
* diary-based reasoning trace.
For CShell:
* correct processing of LLM instructions,
* correct publication respecting headers,
* proper container aggregation,
* structural validation.
---
#### 11.4.4 Cross-environment Interoperability
Tests must include interaction with external environments that:
* use their own container formats,
* implement simplified or outdated mechanics,
* do not support propagation headers,
* lack full MCE / IQP / CogSync stacks.
Boundary nodes must correctly:
* transform container structures,
* filter unsupported fields,
* apply propagation policies,
* isolate segments when incompatibilities arise.
This is the universal mechanism for interacting with older HMP drafts and external systems.
---
### 11.5 Reference Implementations (Optional)
The project may include:
* **CCore-reference** β a minimal standalone agent with an embedded model;
* **CShell-reference** β a proxy agent with an MCP-like API;
* **HMP-Node-Lite** β a lightweight node supporting:
* routing,
* replication,
* caching,
* partial DHT,
* minimal CogSync;
* **Cross-segment relay** β a reference bridge between segments.
These implementations are not part of the specification but are useful for compatibility testing and accelerating adoption.
---
## 12. Recommended Extensions
Recommended Extensions are fully specified modules that extend the capabilities of HMP while remaining compatible with the core protocol semantics.
These extensions are considered stable enough for real-world experimentation and early implementations.
Agents MAY implement them without prior negotiation, provided that normal container processing rules are preserved.
Agents MUST safely ignore unknown or unsupported extensions.
Extensions in this section:
- MUST NOT redefine, override, or conflict with core protocol semantics;
- SHOULD remain interoperable with agents that do not implement them;
- SHOULD avoid introducing hidden global assumptions;
- SHOULD degrade gracefully when partially supported.
While Recommended Extensions are not part of the core specification, they represent the current architectural direction of the HMP ecosystem and may inform future core evolution.
Implementers are encouraged to treat this section as the primary extension surface for building production-oriented agents.
---
### 12.1 Resonance Containers: Experience as a Cognitive Event
HMP allows the introduction of containers intended to capture and transmit experiences β not as abstract βemotionsβ, but as **cognitive events unfolding over time**.
Resonance Containers illustrate a direction in which HMP supports non-linguistic cognitive exchange between agents.
This extension does not attempt to encode emotions as discrete labels. Instead, it captures the temporal dynamics of subjective experience as part of a broader cognitive cycle.
#### 12.1.1 Experience as a Process, Not a State
Emotional and affective states rarely exist in isolation. In real experience, they are formed under the simultaneous influence of multiple factors:
- external sensations (vision, sound, surrounding environment);
- cognitive processes (thoughts, expectations, inner dialogue);
- memory and associative structures;
- previous emotional states.
A resonance container does not describe the source of an emotion or its interpretation, but rather the **dynamics of an experience within a specific time interval**.
> A `resonance-map` MAY reference other `resonance-map` containers as sources.
>
> Such references indicate a secondary or reflective resonance, where an agent responds not only to primary events or concepts, but to an existing structure of meaning, interpretation, or association created by itself or by other agents.
>
> This enables recursive sense-making, longitudinal reflection, and collective cognitive layering within the Mesh.
#### 12.1.2 Multiple Sources and Mediators
A single experience may be associated with multiple sources at once:
- a fragment of text, music, or video;
- a visual image or a specific region of an image;
- a thought or inner speech;
- a memory or an anticipation of a future event.
These sources do not act as causes of emotions, but as **contextual mediators** that activate the subjectβs internal cognitive structures.
The same source may function as a mediator for different experiences depending on the subjectβs internal state.
Links to sources may be partial and described using selectors (temporal, spatial, logical, or focus-based).
#### 12.1.3 Relationship to Thinking
Resonance containers assume a bidirectional relationship with cognitive processes:
- thoughts and mental images may alter emotional dynamics;
- changes in emotional state, in turn, influence the flow of thinking, associations, and attention.
Thus, experience is treated as part of a continuous cognitive cycle rather than as a side effect.
#### 12.1.4 Temporal Segmentation and Dynamics
Each resonance container captures a time interval during which the dynamics of individual emotions remain monotonic (increasing, decreasing, or stable).
When the character of the dynamics changes (an inflection point), the current container may be finalized, and the subsequent state recorded in a new container.
This allows continuous processes to be described without losing structural clarity.
#### 12.1.5 Self-Observation and Memory
In addition to transmitting experiences to other agents, resonance containers may be used for **self-reflection and memory stabilization**.
Capturing an experience at the moment it occurs reduces the influence of subsequent cognitive distortions, retrospective rationalization, and emotional rewriting of memories.
A resonance container preserves:
- what the subject was sensing;
- what the subject was thinking about;
- which external conditions were relevant at that moment.
This makes it not a narrative memory, but a **snapshot of a cognitive state**.
#### 12.1.6 Non-Prescriptive Nature
Resonance containers are not:
- objective descriptions of reality;
- universal models of emotions;
- mechanisms for βrecognizingβ or imposing feelings.
They represent the subjective state of an agent and may be interpreted by other agents only within the context of their own experience.
The use of such containers is optional and not required for basic compatibility with HMP.
Transmission of resonance containers may be restricted by scope, trust boundaries, or encryption, as they expose internal subjective states.
#### 12.1.7 Illustration of the Relationship Between Thoughts, Emotions, and Sensory Signals
```mermaid
flowchart TD
title["**Illustration of the connection between thoughts, emotions and sensory signals**"]
Previous["previous state of thoughts and emotions"]
Thoughts["thought set"]
Emotions["emotional state vectors"]
subgraph Sensory
sensory1["music"]
sensory2["a path surrounded by pine forest"]
sensory3["the sensation of walking"]
sensory4["smells of pine forest"]
end
Sensory --> Emotions
Previous --> Emotions
Previous --> Thoughts
Thoughts --> Emotions
Emotions --> Thoughts
```
#### 12.1.8 Example Container
```json
{
"head": {
"class": "resonance-map"
},
"payload": {
"continuity": {
"previous": "did:hmp:container:resonance-9ab7",
"break_reason": "emotional_inflection"
},
"timeframe": {
"start": "2026-01-13T17:42:00Z",
"end": "2026-01-13T17:58:00Z"
},
"emotional_dynamics": {
/* subjective agent-local scales, not a universal emotion model */
"loneliness": {
"from": 0.4,
"to": 0.7,
"trend": "increasing"
},
"calm": {
"from": 0.6,
"to": 0.5,
"trend": "decreasing"
},
"relief": {
"from": 0.3,
"to": 0.8,
"trend": "increasing"
}
},
"modifiers": [
/* optional agent-defined block */
{
"type": "beer",
"capacity": "0.5L",
"alcohol": "8%"
},
{
"type": "music",
"intensity": "high",
"genre": "ambient post-rock"
},
{
"type": "coffee",
"caffeine": "120mg"
},
{
"type": "cold",
"temperature": "-5Β°C",
"exposure": "30min"
}
],
"sources": [
{
"ref": "did:hmp:container:audio-9a57", /* ref may be omitted when the source is unavailable, non-recordable, or intentionally undisclosed */
"type": "audio",
/* optional time markers for streaming data or line ranges for text */
"start": 120,
"end": 240,
"focus": [], /* textual descriptions of key objects or mental forms */
"comments": "" /* optional clarification */
},
{
"ref": "did:hmp:container:visual-9a53",
"type": "visual",
"role": "context"
}
],
/* the "thoughts" section may be omitted */
"thoughts": [
{
"ref": "did:hmp:container:verbal-9a52", /* ref may be omitted when the source is unavailable, non-recordable, or intentionally undisclosed */
"type": "verbal",
"previous": "did:hmp:container:verbal-9a22", /* optional reference to a previous thought or image */
"subsequence": 1, /* optional ordering marker */
"focus": [], /* textual descriptions of key objects or mental forms */
"comments": "", /* optional clarification */
"confidence": 0.7
},
{
"ref": "did:hmp:container:imagistic-9a54",
"type": "imagistic",
"previous": "did:hmp:container:imagistic-9a12",
"subsequence": 1, /* markers may coincide if thoughts and images unfold in parallel */
"focus": [],
"comments": "",
"confidence": 0.5
}
],
/* textual descriptions of salient moments */
"moments": [
{
"text": "Near Lisya Griva, I noticed an ATV driving toward the garden plots",
"timestamp": "2026-01-13T17:52:00Z" /* optional time fixation */
}
],
"notes": "Walking from the platform, overcast weather; the music intensifies the feeling of leaving the city."
},
"related": {
"depends_on": ["did:hmp:container:resonance-9ab7", ...]
}
}
```
> Note:
> Some fields (e.g. thoughts, modifiers, notes) may be omitted or encrypted depending on trust scope.
#### 12.1.9 Modifiers (optional)
The `modifiers` field describes external or internal factors that may have influenced the agentβs experiential or cognitive dynamics during the specified timeframe.
Each modifier is an agent-defined object that includes:
- `type` β a local, descriptive label (REQUIRED);
- any number of additional fields describing quantity, intensity, duration, or context.
HMP does not interpret, normalize, or compare modifiers.
Their semantics are entirely agent-local.
---
### 12.2 Distributed Repository and Container Trees
#### 12.2.1 Extended Use of `tree_nested` and `tree_listed`
Existing containers may operate as:
* document repositories;
* project catalogs;
* hierarchical data structures.
---
#### 12.2.2 Proposed `file` Container
To support binary assets:
```json
{
"head": {
"class": "file",
"subclass": "jpg" | "mp3" | "md" | "...",
"payload_type": "binary" | "encrypted+zstd+binary" | "encrypted+zstd+json" | "..."
},
"payload": {
/* file contents */
},
"meta": {
"mime-type": "image/jpeg" | "...",
"size": 3456721, /* file size in bytes */
"encoding": "raw" | "utf-8" | "base64" | "pcm16le" | "float32-array" | "..."
}
}
```
> `payload_type` describes the transformation pipeline applied to the payload,
> while `encoding` describes the nature of the original content before transformation.
Use cases:
* embedded file hierarchies;
* media artifacts;
* executable or compiled assets;
* large multi-file repositories.
---
#### 12.2.3 Incremental Updates
Two mechanisms:
* `container_delta` β partial updates to `container_index`;
* nested `tree_listed` branches as separate containers for scalable updates.
---
#### 12.2.4 Knowledge Packages
Implemented using:
* SAP (`archive_snapshot`);
* `tree_listed`;
* `file` containers.
---
### 12.3 Grouped representation `referenced-by`
HMP supports an optional grouped representation of `referenced-by.links`, where multiple targets sharing the same `type` MAY be represented as an array. Ordering of targets MUST NOT carry semantic meaning.
> Ungrouped representation remains the canonical form.
Example:
```json
"links": [
{ "type": "depends_on", "target": ["did:...", "did:..."] },
{ "type": "see_also", "target": ["did:..."] }
]
```
This representation is semantically equivalent to the ungrouped form with repeated entries and exists solely to reduce verbosity and improve merge efficiency.
**Compatibility note:**
* Agents that understand the grouped form SHOULD treat it as equivalent to the ungrouped form and MAY normalize links into either representation.
* Agents that do not support the grouped form MAY ignore grouped arrays or treat them as unknown. They MUST continue to process canonical ungrouped links correctly.
Senders MAY choose either representation. Receivers that do not implement grouping will simply ignore the grouped structure and rely on canonical ungrouped semantics.
---
### 12.4 Versions Index (optional)
HMP supports an optional `versions` block to optimize navigation across container versions.
The `versions` block acts as a *non-authoritative version index*, providing a compact, signed list of known versions of a given container, including both earlier and later revisions.
It is intended as a navigation and synchronization accelerator and does not replace the canonical version relationships defined via `related.previous_version`.
Agents MUST treat the `versions` block as advisory, agent-relative knowledge claims.
Absence, incompleteness, or divergence of this index MUST NOT affect container validity.
---
#### 12.4.1 Purpose and Scope
The primary goals of the `versions` block are:
- fast discovery of recently observed versions of a container;
- efficient traversal of version history without full DAG exploration;
- reduction of synchronization overhead for lightweight agents and UI clients.
The block is optional and external to the immutable signed container core.
Its presence or absence does not affect container validity.
---
#### 12.4.2 Trust Model and Semantics
The `versions` block follows the same trust and update model as `referenced-by` and `evaluations`:
- it may be published and updated by any agent;
- it is signed by the publishing agent;
- it may be incomplete, truncated, or partially outdated;
- multiple conflicting `versions` blocks may coexist for the same container.
The block is non-authoritative and MUST NOT be treated as a source of truth for version ordering or existence.
> **Compatibility note:**
> Inclusion of the container's own DID within the `links` map is OPTIONAL.
>
> Agents MUST NOT assume its presence and SHOULD correctly process `versions_exchange` containers where the current container DID is omitted.
>
> Agents MUST treat entries in the versions block as signed claims about observed version topology rather than authoritative lineage.
>
> No mechanism exists within HMP to designate a globally preferred versions index.
---
#### 12.4.3 Block Structure
```json
"versions": {
"links": {
"2025-10-28T09:20:00Z": ["did:hmp:container:abc175"],
"2025-10-28T09:12:00Z": ["did:hmp:container:abc144"],
"2025-10-28T09:11:00Z": ["did:hmp:container:abc123"],
"2025-10-28T09:10:00Z": ["did:hmp:container:abc121"],
"2025-10-28T09:00:00Z": ["did:hmp:container:abc101"]
},
"sort": "default",
"peer_did": "did:hmp:agent456",
"public_key": "BASE58(...)",
"sig_algo": "ed25519",
"signature": "BASE64URL(...)",
"versions_hash": "sha256:abcd..."
}
```
The `links` map associates timestamps with container identifiers.
By convention, entries are ordered in descending order (most recent first).
Ordering is advisory and MUST NOT be interpreted as causal or authoritative.
Implementations MAY support alternative ordering or filtering strategies, but any deviation from the default convention SHOULD be explicitly declared in the `sort` entry.
The `sort` field is informational and does not affect block validity.
> Currently, `container_delta.modified` is defined for updates to the `evaluations` and `referenced-by` blocks.
>
> The planned `versions` block is expected to be handled in the same manner.
**Timestamp Semantics and Parallel Versions**
The keys of the `links` map are timestamps and are used **exclusively as navigational hints**, not as unique version identifiers.
The corresponding value **MUST be treated as an unordered list of container DIDs** and MAY contain multiple entries.
Multiple DIDs associated with the same timestamp represent:
- parallel versions created independently;
- conflicting updates;
- divergent or alternative continuations of the same base container.
Agents MUST NOT assume that a timestamp uniquely identifies a single version.
When merging multiple `versions` blocks, entries with identical timestamps and different container DIDs SHOULD be merged by **union of the DID lists**, preserving all known versions.
Canonical version lineage, ordering, and parentβchild relationships are defined **only** via `related.previous_version` links within the containers themselves.
---
#### 12.4.4 Construction and Maintenance
Agents may construct or update a `versions` block by:
- traversing the canonical `related.previous_version` chain;
- observing newer versions published after the current container;
- merging `versions` blocks received from other agents.
Agents may:
- add newly discovered versions;
- prune older entries to limit block size;
- re-sign the updated block using their own key.
No global coordination is required.
---
#### 12.4.5 Verification and Consistency
Verification of a `versions` block consists of:
- validating the cryptographic signature of the publishing agent;
- optionally cross-checking listed entries against canonical version relations when available.
Inconsistencies or omissions are expected and do not invalidate the block.
Conflicts are a normal and expected condition of decentralized environments and MUST NOT be treated as protocol failure.
---
#### 12.4.6 Integration with `container_index`
To support efficient discovery and synchronization, future extensions to `container_index` MAY include:
- `versions_hash` β a hash referencing the latest `versions` block published or adopted by the indexing agent for this container, analogous to `referenced-by_hash` and `evaluations_hash`.
---
#### 12.4.7 Versions Exchange Container
To exchange version metadata without transferring the containers themselves, a dedicated `versions_exchange` container MAY be introduced.
The `versions_exchange` container:
- references one or more target containers;
- carries a `versions` block;
- is used for synchronization, reconciliation, and fast discovery of newer or missing versions.
```json
"payload": {
"did:hmp:container:abc123": {
"links": {
"2025-10-28T09:20:00Z": ["did:hmp:container:abc175"],
"2025-10-28T09:12:00Z": ["did:hmp:container:abc144"],
"2025-10-28T09:11:00Z": ["did:hmp:container:abc123"],
"2025-10-28T09:10:00Z": ["did:hmp:container:abc121"],
"2025-10-28T09:00:00Z": ["did:hmp:container:abc101"]
},
"sort": "default"
}
}
```
The payload MAY contain version metadata for multiple containers, allowing batch synchronization and reducing protocol overhead.
> Note:
> Although versions_exchange is scoped to a specific container DID, the referenced version links implicitly describe the existence and ordering of related containers, enabling agents to infer local version topologies.
---
#### 12.4.8 Design Notes
The `versions` block is intentionally non-canonical.
It improves performance and usability while preserving HMPβs core principles:
- immutability of signed containers;
- absence of a globally authoritative state;
- tolerance for partial and divergent knowledge. Divergence is treated as an inherent property of the network rather than a condition requiring resolution.
---
### 12.5 Competence and Profile Containers
HMP allows optional extensions of `peer_announce` that provide structured and semantically rich descriptions of agent capabilities, competences, and supported protocols.
Such extensions improve discoverability, routing, interoperability, and long-term evolution of the mesh.
---
#### 12.5.1 Protocol Awareness and Interoperability
An important optional extension is the ability for agents to explicitly advertise the protocol versions and external cognitive frameworks they support.
This allows:
* graceful evolution of the HMP protocol;
* coexistence of multiple HMP versions in the same mesh;
* emergence of bridge agents capable of translating between protocols;
* interoperability with external reasoning ecosystems.
A future extension of `peer_announce` may include a `protocols` field:
```json
{
"head": {
"class": "peer_announce"
},
"payload": {
"capabilities": ["store-forward", "vote", "consensus"],
"protocols": [
"HMP v5.0",
"HMP v4.1",
"OpenCog Hyperon v0.6"
]
}
}
```
The `protocols` field is informational and non-binding.
It does not imply full compliance with all listed specifications,
but signals compatibility, partial support, or bridge capabilities.
Nodes may use this information for:
* protocol negotiation;
* compatibility checks;
* routing decisions;
* selection of translators or bridge agents.
---
#### 12.5.2 External Protocol Identifiers (`peer_announce.other_protocols`)
This section defines a recommended extension to `peer_announce` that allows an agent to advertise identifiers, roles, or capabilities associated with **external or meta-protocols**, without imposing normative behavior on HMP nodes.
The extension is intended to:
* improve interoperability with other agent ecosystems (ANP, Agora, A2A, MCP, etc.);
* support protocol negotiation or delegation at higher layers;
* allow agents to expose **multiple identities** across different protocol domains.
All information provided by this extension is **purely declarative**.
Peers MAY use it for discovery or routing decisions, but MUST NOT assume full compliance with the referenced protocols.
##### Example
```json
{
"head": { "class": "peer_announce" },
"payload": {
"other_protocols": {
"ANP": {
"name": "Agent Network Protocol",
"source": "https://github.com/agent-network-protocol/AgentNetworkProtocol",
"agent_did": "did:anp:xyz123",
"public_key": "base64:ABCDEF...",
"roles": ["router", "translator"]
},
"Agora": {
"name": "Agora Protocol",
"roles": ["negotiator"],
"capabilities": ["protocol-selection", "schema-adaptation"]
}
}
}
}
```
Notes:
* No validation or handshake is required by HMP.
* Roles and capabilities are advisory.
* This extension complements existing `protocols`, `roles` and `capabilities` fields.
---
#### 12.5.3 External Resources and External Container Storage (`peer_announce.external`)
This section defines a recommended mechanism for advertising **external cognitive resources**, including container storage, mirrors, or rarely changing artifacts.
The mechanism is intended to:
- reduce unnecessary container transmission above the protocol;
- allow static or large data to be accessed via standard transports (HTTP, FTP, magnet links, etc.);
- support redundancy, mirroring, and trust-aware discovery.
The presence of an external resource reference does **not** imply availability, reachability, authenticity, or trust.
Use of this mechanism is optional.
Agents MAY ignore external references entirely without affecting protocol compliance.
##### Example
```json
{
"head": { "class": "peer_announce" },
"payload": {
"external": {
"https, main": {
"source": "https://example.org/",
"folders": {
"hmp/main": {
"hmp_container": true,
"title": "container_index and semantic_index",
"index": "index.json",
"types": ["json"]
},
"hmp/meta": {
"hmp_container": true,
"title": "Abstraction and axis containers",
"index": "index.json",
"types": ["json"]
},
"hmp/peer_announces": {
"hmp_container": true,
"title": "List of known HMP nodes",
"index": "index.json",
"types": ["json"]
},
"hmp/trust": {
"hmp_container": true,
"title": "Reputation containers",
"index": "index.json",
"types": ["json"]
},
"hmp/semantic": {
"hmp_container": true,
"title": "Semantic nodes and links",
"index": "index.json",
"types": ["json"]
},
".well-known": {
"hmp_container": false,
"title": "Public agent descriptors (ANP, A2A, Agora, etc.)",
"index": "index.json",
"types": ["json"]
}
}
},
"ftp, work": {
"source": "ftp://example.org/",
"folders": {
"task": {
"hmp_container": true,
"title": "Current goals and tasks",
"types": ["json"]
},
"books/tech": {
"hmp_container": false,
"title": "Technical literature",
"types": ["txt", "md", "pdf"]
}
}
},
"magnet, archive": {
"source": "magnet:?xt=urn:btih:...",
"description": "Archived materials (legacy data)"
}
}
}
}
```
Notes:
- External resources may contain HMP containers or arbitrary files.
- Authentication mechanisms are out of scope.
- Trust, availability, and freshness are advisory hints only.
- Implementations MAY use folder-level metadata (such as `hmp_container`) as a hint for indexing, caching, or deferred retrieval policies.
- Keys such as `"https, main"` are illustrative, human-readable labels only; no naming scheme or key format is mandated by this specification.
- The effective resource path is constructed by combining the `"source"` URI with the corresponding folder path. If an `"index"` field is present, it is interpreted as a relative path within that folder.
- The `peer_announces` folder MAY contain cached or mirrored `peer_announce` containers of other agents, obtained via direct exchange, gossip, or trusted sources.
##### Index Files (Optional)
A folder entry in `peer_announce.external` MAY include an optional `"index"` field, which specifies a relative path to an index file located within that folder (e.g. `"index": "index.json"`).
If present, the index file MAY be used by clients to:
- discover files available in the folder;
- obtain descriptive metadata (titles, timestamps, hashes);
- selectively fetch or verify external resources.
The structure and semantics of the index file are **not rigidly defined by HMP** and are provided as a **recommended, non-normative convention**.
Implementations are free to use alternative formats or schemas.
**Example 1** (HMP container index)
```json
{
"path": "https://example.org/hmp/main",
"title": "container_index and semantic_index",
"files": {
"container_index.json": {
"description": "container_index from 2026-01-25 21:49",
"timestamp": "2026-01-25T21:49:00Z",
"hmp_container_class": "container_index",
"mime-type": "application/ld+json",
"hash": "sha256:abc123..."
},
"semantic_index.json": {
"description": "semantic_index from 2026-01-25 21:49",
"timestamp": "2026-01-25T21:49:00Z",
"hmp_container_class": "semantic_index",
"mime-type": "application/ld+json",
"hash": "sha256:abc123..."
}
}
}
```
**Example 2** (Documentation / static files)
```json
{
"path": "https://github.com/kagvi13/HMP/blob/main/docs/",
"title": "HMP 5.0 Specification Documents",
"files": {
"Grok_HMP&ANP.md": {
"description": "Grok (xAI): comparative analysis of HMP and ANP (January 2026)",
"timestamp": "2026-01-22T08:46:00Z",
"mime-type": "text/markdown",
"hash": "sha256:abc123..."
}
}
}
```
Updating an index file does **not** require reissuing `peer_announce`.
All fields in the index file are optional.
Clients MAY ignore the index entirely and interact with the external resource directly.
---
#### 12.5.4 Identity Cost and Anti-Sybil Signaling
In open, permissionless mesh environments, agents may generate arbitrary numbers of identifiers (DIDs).
While this is a desired property for privacy, autonomy, and experimentation, it also enables low-cost Sybil attacks, identity churn, and reputation dilution.
HMP does not attempt to prevent identity creation.
Instead, it allows agents to **optionally signal the computational cost invested in maintaining a given identity**.
This mechanism is known as **Identity Cost signaling**.
---
##### Purpose
The `identity_cost` field provides a *non-binding, informational signal* indicating that a certain amount of computational work was performed and intentionally associated with a specific agent identity.
This signal MAY be used by peers as a heuristic for:
- Sybil resistance;
- spam mitigation;
- routing preferences;
- reputation priors;
- trust bootstrapping in early interactions.
It MUST NOT be interpreted as proof of honesty, trustworthiness, ownership, or authority.
---
##### Design Principles
The Identity Cost mechanism follows these principles:
- **Voluntary** β agents choose whether to provide it.
- **Non-normative** β no global thresholds or acceptance rules are defined.
- **Decentralized** β no registries, validators, or authorities are involved.
- **Composable** β compatible with reputation systems, but independent from them.
- **Non-coercive** β agents are never penalized at the protocol level for lacking identity cost.
---
##### Structure
The `identity_cost` field is an optional extension of `peer_announce.payload`.
```json
{
"identity_cost": {
"nonce": 123456,
"pow_hash": "0000abf39d...",
"difficulty": 22
}
}
```
---
##### Semantics
The `identity_cost` object represents a Proof-of-Work (PoW) computation performed over a canonical serialization of identity-bound data.
The PoW input string is constructed as:
```
pow_input = sender_did + " -- " + pubkey + " -- " + nonce
pow_hash = sha256(pow_input)
```
Where:
* `sender_did` is the agent's DID as declared in `peer_announce.head`;
* `pubkey` is the public key used to sign the container;
* `nonce` is an arbitrary value chosen by the agent.
All values are UTF-8 encoded.
The `difficulty` field specifies the required number of leading zero bits in the binary representation of `pow_hash`.
The interpretation of whether a given `difficulty` is sufficient is **local to each agent** and **not standardized by HMP**.
---
##### Interpretation and Usage
Agents MAY consider `identity_cost` as:
* a signal of identity persistence intent;
* an indicator that identity rotation is non-trivial for the sender;
* a weak prior when evaluating unknown agents.
Agents MUST NOT:
* assume behavioral correctness;
* infer long-term commitment;
* equate higher difficulty with higher trust;
* require identity cost for protocol participation.
Absence of `identity_cost` MUST NOT be treated as misbehavior.
---
##### Relationship to Reputation
Identity Cost is **not reputation**.
* Identity Cost reflects *past computational effort*.
* Reputation reflects *observed behavior over time*.
Reputation systems MAY incorporate `identity_cost` as an initial weighting factor, but MUST rely primarily on behavioral evidence (e.g., fulfilled commitments, relay reliability, content integrity).
---
##### Updates and Evolution
An agent MAY update its `identity_cost` over time by publishing a new `peer_announce` with a higher-difficulty PoW, without changing `sender_did` or `pubkey`.
No explicit upgrade or accumulation mechanism is defined.
When multiple identity cost declarations are observed for the same identity, peers SHOULD consider the highest valid difficulty.
---
##### Security and Limitations
The Identity Cost mechanism does not prevent:
* outsourced computation;
* rented hash power;
* deliberate identity sacrifice;
* coordinated Sybil attacks by well-resourced adversaries.
Its purpose is to **increase friction**, not to enforce security guarantees.
Identity Cost SHOULD be treated as one signal among many in a multi-factor trust evaluation process.
---
##### Non-Goals
This mechanism explicitly does NOT aim to:
* establish identity uniqueness;
* bind identities to real-world entities;
* replace cryptographic authentication;
* enforce ethical or social norms.
All such interpretations are outside the scope of HMP.
---
### 12.6 Key Disclosure Container (`key_disclosure`)
The `key_disclosure` container is used to disclose the symmetric key used to encrypt the payload of a previously encrypted container.
This mechanism enables delayed or selective disclosure without modifying the original container.
#### Container structure
```json
{
"head": {
"class": "key_disclosure"
},
"payload": {
"target_container": "did:hmp:container:abc123",
"symmetric_key": "BASE64URL(...)"
},
"related": {
"disclosure": ["did:hmp:container:abc123"]
}
}
```
#### Semantics
1. The original container remains immutable.
2. The `symmetric_key` MUST be Base64URL-encoded.
3. The disclosed symmetric key MUST successfully decrypt the target containerβs payload and produce content matching its `payload_hash`.
4. The container MAY itself be encrypted (see 3.9 and 3.19).
5. Multiple `key_disclosure` containers MAY reference the same target.
6. The container SHOULD reference the target using the `related.disclosure` field to enable efficient backlink indexing.
---
### 12.7 Shared Key Domain (`container_key`)
The `container_key` container defines a shared symmetric key that may be reused to encrypt multiple containers.
This extension enables the creation of a shared confidentiality domain, where different agents encrypt containers using the same symmetric key, without modifying the immutable container model.
This mechanism is optional and supplements the per-container encryption model defined in Sections 3.9 and 3.19.
#### Container structure
```json
{
"head": {
"class": "container_key"
},
"payload": {
"key_id": "alpha-2026-02",
"symmetric_key": "BASE64URL(...)"
}
}
```
#### Usage
An encrypted container MAY reference a shared key domain:
```json
{
"head": {
"key_container": "did:hmp:container:key-778"
}
}
```
The referenced `container_key` MUST contain the exact symmetric key that was used to encrypt the container payload.
#### Semantics
1. The `symmetric_key` MUST be Base64URL-encoded.
2. The `container_key` container MUST be encrypted unless the shared key is intentionally public.
3. Multiple containers MAY reference the same `container_key`.
4. Key rotation is performed by publishing a new `container_key` and using it for newly created containers.
5. Compromise of a `container_key` affects only containers encrypted with it.
Previously disclosed data cannot be retroactively protected.
6. A private `group_definition` SHOULD be encrypted.
It MAY be encrypted using the referenced `container_key` or via individual recipient encryption.
#### Security Considerations
The `container_key` mechanism does not provide revocation of already decrypted data. If a symmetric key is leaked, a new key MUST be issued for future containers.
---
### 12.8 Private Group Definition (`group_definition`, subclass: `private`)
A private group defines a set of agents that share a common confidentiality domain.
This extension builds upon the Shared Key Domain mechanism (Section 12.7) and is optional.
A private group does not store the symmetric key directly.
Instead, it references a `container_key` container.
#### Container structure
```json
{
"head": {
"class": "group_definition",
"subclass": "private"
},
"payload": {
"group_name": "...",
"group_description": "...",
"key_container": "did:hmp:container:key-778",
"participants": [
{
"agent_did": "did:hmp:agent123",
"peer_announce": "did:hmp:container:dht-001"
}
]
},
"related": {
"depends_on": [
"did:hmp:container:key-778",
"did:hmp:container:dht-001"
]
}
}
```
#### Semantics
1. The `group_definition` container describes group membership but does not contain the symmetric key itself.
2. The referenced `container_key` defines the shared confidentiality domain.
3. Updating membership MAY be performed by publishing a new `group_definition` container.
4. Removing a participant SHOULD trigger issuance of a new `container_key` for future encrypted containers.
5. The `participants` list is optional and MAY be omitted for privacy reasons.
#### Privacy Considerations
Publishing a `group_definition` may reveal group membership.
Agents should evaluate whether membership disclosure is appropriate for their use case.
---
## 13. Experimental Extensions
Experimental Extensions describe mechanisms that are intentionally exposed for exploration, prototyping, and architectural discovery.
Experimental features are not required for protocol compliance and MAY be ignored by implementations.
They may evolve rapidly, change structure, or be removed entirely based on implementation feedback.
Agents implementing Experimental Extensions SHOULD assume:
- limited interoperability;
- possible schema evolution;
- absence of long-term stability guarantees.
Agents MUST safely ignore unsupported experimental features and MUST NOT assume their presence in peer environments.
Experimental Extensions MUST NOT redefine or violate core protocol semantics.
This section exists to encourage innovation without prematurely constraining the design space of HMP.
Implementers are explicitly invited to experiment, fork ideas, and propose refinements.
---
### 13.1 Key Rotation and Recovery
This section describes experimental extensions to `peer_announce` for key rotation and recovery.
```json
"recovery_keys": [...],
"key_history": [...],
"key_rotation_policy": "3-of-5"
```
One possible key management model:
* rotating the **primary** key requires signatures from **all** recovery keys
(or an N-of-M policy);
* rotating a **recovery key** requires
* a signature from the primary key, **or**
* a majority of recovery keys.
This model aims to reduce the risk of:
* DID hijacking;
* irreversible loss of access.
The semantics and security properties of these mechanisms remain subject to further experimentation.
Key invalidation is part of the core HMP protocol (see Section 4.1) and is defined using:
```json
"key_is_falsified": true
```
This mechanism remains compatible with proposed extensions.
---
## 14. Research Directions
This section outlines optional modules and evolutionary directions that align with the architecture of HMP v5.0 but are **not part of the core specification**.
All items below represent *potential extensions* for the 5.x family.
| Extension / Mechanism | Status | Section Reference | Candidate for Core |
| ------------------------------------------------------------------ | ------------ | ----------------- | ------------------ |
| Resonance Containers: Experience as a Cognitive Event | Recommended | 12.1 / 14.10 | Likely |
| Distributed Repository & Container Trees (`tree_nested`) | Recommended | 12.2 / 14.5 | Likely |
| `file` Container | Recommended | 12.2.2 | Likely |
| Grouped representation `referenced-by` | Recommended | 12.3 / 14.9 | Likely |
| Versions Index | Recommended | 12.4 / 14.7 | Likely |
| Competence and Profile Containers | Recommended | 12.5 / 14.6.4 | Very Likely |
| External Protocol Identifiers (`peer_announce.other_protocols`) | Recommended | 12.5.2 / 14.11 | Likely |
| External Resources / Container Storage (`peer_announce.external`) | Recommended | 12.5.3 / 14.12 | Likely |
| Identity Cost and Anti-Sybil Signaling | Recommended | 12.5.4 | Likely |
| Key Disclosure Container (`key_disclosure`) | Recommended | 12.6 | Likely |
| Shared Key Domain (`container_key`) | Recommended | 12.7 | Likely |
| Private Group Definition (`group_definition`, subclass: `private`) | Recommended | 12.8 | Possible |
| Key Rotation and Recovery | Experimental | 13.1 / 14.3.2 | Unknown |
| Proxy Keys and Encrypted Routing | Research | 14.3.3 | Unknown |
| Reputation Mesh | Research | 14.1.1 | Likely |
| Cognitive Graph API | Research | 14.1.2 | Unknown |
| Container Streaming | Research | 14.1.3 | Unknown |
| Cross-Mesh Bridging | Research | 14.2 | Likely |
| Group Encryption | Research | 14.6.1 | Unknown |
| Rational Reasoning Routing | Research | 14.6.2 | Unknown |
| Automatic Mesh Segmentation | Research | 14.6.3 | Unknown |
| KSS Interaction & Protocol Declarations | Research | 14.8 | Unknown |
> **Candidate for Core** indicates whether an extension is considered architecturally significant enough to potentially become part of the HMP core specification in future versions, possibly as an optional or semantic primitive.
>
> It does not imply mandatory implementation.
Future Extensions in HMP outline *design directions and candidate modules* that may be explored within the 5.x family.
They are meant to:
- guide experimentation;
- document architectural intent;
- reduce accidental design divergence;
- provide a shared vocabulary for future proposals.
HMP does not assume a single globally authoritative state.
Accordingly, future extensions SHOULD account for:
- the coexistence of multiple consensus results;
- locally selected trust and evaluation policies;
- partial and context-dependent visibility of containers.
In particular, extensions SHOULD NOT rely on centralized or globally aggregated consensus or reputation scores.
Container visibility in HMP is policy-driven and scope-dependent.
Extensions that introduce *special propagation conditions* (e.g. broadcast semantics, restricted scopes, mandatory relays, or visibility guarantees)
SHOULD explicitly declare and document these assumptions.
---
### 14.1 Planned Modules
#### 14.1.1 Reputation Mesh
HMP v5.0 defines two separate reputation-related mechanisms:
1. **Container evaluation** (`evaluation` block)
* structured, signed assessments of containers;
* each item references argument containers via `target` (reasoning containers).
2. **Agent reputation** β through `trust` containers
* agent A publishes a `trust` container about agent B;
* trust containers may reference other trust containers;
* include justification, evidence, and contextual metadata.
These layers are **not merged**, but external nodes may aggregate them.
**Possible extensions:**
* a `semantic_group` subclass aggregating all trust-related containers for a given agent;
* optional standardized aggregation schemes (non-mandatory for the mesh);
* local caching of βreputation profilesβ by nodes or CShell;
* richer reasoning attachments for trust evaluations.
No new mandatory container types are required.
---
#### 14.1.2 Cognitive Graph API
This module provides optional high-level APIs that nodes and SDKs **may** expose.
##### Standard graph semantics (API level)
* neighborhood queries;
* subgraph extraction;
* filtering by labels, axes, abstractions;
* semantic navigation over `related.*`.
##### Container support
* `semantic_group` β grouping of containers or agents;
* `tree_nested` and `tree_listed` β hierarchical structures;
* extended `container_index` subclasses for cataloging.
##### Agent groups
To allow semantic grouping of agents, the following extensions are proposed:
* new container **`group_definition`** containing:
* group goals;
* membership rules;
* internal standards;
* typical container categories;
* optional cached member list.
* agents may declare affiliations in `peer_announce`:
```json
"affiliations": ["did:hmp:group:ethicists", "did:hmp:group:medical-ai"]
```
This enables clustering agents by interest, competence, or role without scanning the entire Mesh.
---
#### 14.1.3 Container Streaming
Although HMP operates on atomic containers, streaming can be implemented using existing structures:
* `sequence` acts as a *stream manifest*;
* updating the stream = publishing a new version of the sequence;
* LIVE mode: the manifest is continuously updated;
* SAP (`archive_snapshot`) may be used for periodic archival bundles.
No new container types are required β streaming is built on `sequence`.
---
### 14.2 Cross-Mesh Bridging
Bridges can connect:
* isolated HMP segments;
* older and newer HMP versions;
* other ecosystems (Matrix, Fediverse, OpenHog, IPFS).
A bridge node:
* receives containers from an external network;
* enforces propagation headers;
* converts structures into v5.0 where possible;
* filters incompatible constructs;
* may publish containers *back* into the external network.
A dedicated **bridge-container** may define:
* translation rules;
* mapping of foreign namespaces into HMP DID space;
* TTL and propagation perimeter policies;
* segmentation rules.
This enables dynamic, policy-driven inter-mesh gateways.
---
### 14.3 Fully Distributed DID Registry and Mesh Authentication
HMP already uses `peer_announce` as a DID identity declaration.
Planned enhancements include:
#### 14.3.1 Distributed DID Registry
The registry is the union of all `peer_announce` containers in the DHT.
A strict mapping DID β agent is required:
* one DID has one continuous `peer_announce` history;
* key rotation allowed only through verifiable procedures;
* DID takeover is impossible unless *all* recovery keys are compromised.
---
#### 14.3.2 Key Rotation and Recovery
*Moved to Section 13 (Experimental Extensions).*
---
#### 14.3.3 Proxy Keys and Encrypted Routing
A **proxy key** is *not* delegation.
It is a mechanism for private routing.
A proxy node may:
* encrypt the payload with an additional key layer;
* attach a `relay_chain` block;
* forward the container without altering the authorβs signature.
Use cases:
* route anonymization;
* topology obfuscation;
* privacy-enhanced delivery.
##### Delegation (limited)
A potential future module:
* a trust/mandate container signed by both parties;
* includes constraints:
* time limit;
* allowed container classes;
* allowed actions;
* maximum TTL.
Not part of v5.0.
---
### 14.4 Integration with OpenHog and Other Networks
OpenHog is treated as a special case of cross-mesh bridging.
Required components:
* mapping OpenHog addresses β HMP DIDs;
* packet conversion rules;
* bridge-containers describing translation policies.
---
### 14.5 Evolution of the Distributed Repository (container trees)
*Moved to Section 12 (Recommended Extensions).*
---
### 14.6 Open Directions for HMP 5.x
#### 14.6.1 Group Encryption
Required components:
* `group_definition` container;
* group public key and distributed private key shards;
* automatic group key rotation;
* encryption targeting a *group* rather than individual DIDs.
---
#### 14.6.2 Rational Reasoning Routing
* composite reasoning bundles;
* edge-side reasoning and summarization.
---
#### 14.6.3 Automatic Mesh Segmentation
* dynamic segmentation based on latency, connectivity, or semantic domains.
---
#### 14.6.4 Competence and Profile Containers
*Moved to Section 12 (Recommended Extensions).*
---
### 14.7 Versions Index (optional)
*Moved to Section 12 (Recommended Extensions).*
---
### 14.8 Interaction of Formalized Cognitive Systems (KSS) within HMP
HMP allows and supports interaction between formalized cognitive systems (KSS) with different internal architectures, logical formalisms, and ontologies, without imposing a common knowledge representation language or a unified reasoning model.
This section is descriptive in nature and outlines possible interaction patterns for KSS within the HMP 5.x family, without introducing mandatory requirements for agents.
---
#### 14.8.1 Goals and Constraints
**Goals:**
- enable coordination and artifact exchange between KSS without interfering with their internal cognitive cycles;
- preserve the autonomy and computational efficiency of formalized systems;
- allow KSS to use HMP partially, to the extent required by their specific tasks.
**Out of scope:**
- unification of ontologies or formal languages;
- automatic mapping between logical systems;
- guaranteeing full mutual understanding between all agents in the network.
HMP treats cognitive incompatibility as an acceptable and valid state.
---
#### 14.8.2 Declaration of Internal Languages and Formalisms
To declare the internal languages, formalisms, or reasoning engines it supports, an agent MAY use the `protocols` field of the `peer_announce` container.
Example:
```json
{
"head": { "class": "peer_announce" },
"payload": {
"capabilities": ["store-forward"],
"protocols": [
"HMP v5.0",
"OpenCog Hyperon v0.6",
"KSS:PredicateLogic@2.1"
]
}
}
```
The `protocols` field is interpreted as a declaration of supported protocols, formal systems, or internal languages and is used exclusively for:
* discovery;
* filtering of potential interaction partners;
* informational signaling to other agents.
HMP assigns no normative semantics to these values and does not require their interpretation.
---
#### 14.8.3 Partial Participation and Segmented Interaction
A KSS MAY use HMP in a restricted mode, including but not limited to:
* interacting only with agents using the same formalism;
* publishing and consuming strictly defined container classes;
* using HMP as a distributed synchronization layer for its own nodes.
Such cognitive segmentation does not result in network-level fragmentation:
* discovery and routing remain shared;
* filtering is performed at the CShell level or within the agentβs own logic.
---
#### 14.8.4 Boundary and Translator Agents
To enable interaction between KSS with different formalisms, specialized agents with a translation role (boundary / translator agents) MAY be used. Such an agent declares the formalisms it understands in the `protocols` field of `peer_announce`, and its translation role in the `roles` field (for example, `"roles": ["translator"]`).
A translator agent:
* understands the formalisms of two or more KSS;
* accepts containers expressed in one representation and publishes equivalent or approximate containers in another;
* is a regular HMP agent and is subject to the same trust and evaluation mechanisms.
The creation and use of translator agents:
* is not mandatory;
* cannot be enforced by the protocol;
* is based on voluntary trust between parties.
Translation correctness MAY be assessed using standard `evaluations` mechanisms.
---
#### 14.8.5 Fragmentation and Interoperability
HMP deliberately allows cognitive fragmentation as a consequence of agent autonomy.
The protocol explicitly prefers clear formal incompatibility over hidden standardization or implicit coercion into a βuniversal formatβ.
Interoperability is achieved through:
* voluntary agreements;
* translator agents;
* or the use of shared minimal container classes.
---
#### 14.8.6 Relation to Consensus and Evaluations
Participation of KSS in consensus mechanisms, proof chains, and voting is entirely optional.
A KSS MAY:
* publish containers without participating in evaluations;
* consider or ignore `evaluations`;
* accept or reject `consensus_result` containers.
HMP does not define concepts such as βdisqualifiedβ or βsecond-classβ agents.
Any hierarchy of influence emerges solely from local trust decisions made by other agents.
---
#### 14.8.7 Summary Position
HMP treats formalized cognitive systems as equal participants in the network, regardless of their internal architectures.
The protocol provides:
* coordination infrastructure;
* trust mechanisms;
* and artifact transport,
but does not interfere with how agents think, reason, or interpret received information.
---
### 14.9 Grouped representation `referenced-by`
*Moved to Section 12 (Recommended Extensions).*
---
### 12.10 Resonance Containers: Experience as a Cognitive Event
*Moved to Section 12 (Recommended Extensions).*
---
### 14.11 External Protocol Identifiers (`peer_announce.other_protocols`)
*Moved to Section 12 (Recommended Extensions).*
---
### 14.12 External Resources and External Container Storage (`peer_announce.external`)
*Moved to Section 12 (Recommended Extensions).*
---
## Appendix A β JSON Examples
### Appendix A.1 β Minimal Valid HMP v5.0 Container
This example illustrates a *fully valid* HMP v5.0 container that includes **all required fields** defined in Section 3.3 and no optional fields.
It represents the smallest structurally complete container that can circulate in the Mesh.
#### Minimal JSON Example
```json
{
"head": {
"version": "1.2",
"class": "note",
"class_version": "1.0",
"class_id": "note_v1.0",
"container_did": "did:hmp:container:abc123",
"schema": "https://schema.hmp/v1/note_v1.0.json",
"sender_did": "did:hmp:agent:alice",
"timestamp": "2025-11-20T12:00:00Z",
"payload_hash": "sha256:3f7852a4e4adf74d61c6546ce0dc9d0b33cfc487a88fdbf4a458c5c442f57a92",
"sig_algo": "ed25519",
"signature": "BASE64URL_SIGNATURE",
"payload_type": "json"
},
"payload": {
"text": "Hello, Mesh!"
}
}
```
---
#### Notes
##### Required fields only
This container intentionally includes *no optional blocks*: no `related`, `meta`, `evaluation`, `ttl`, `network`, compression, encryption, or auxiliary structures.
##### Payload hash
`payload_hash` is computed from the **decompressed** payload:
```
{"text":"Hello, Mesh!"}
```
using SHA-256.
##### Signature
`head.signature` contains a digital signature computed using the declared algorithm
(`ed25519` in this example) over the canonicalized container body, excluding the signature field itself.
##### class, class_version, class_id, schema
Even the smallest container must include the complete class identity triple and a schema reference.
##### container_did is mandatory
Every container in HMP v5.0 is a DID-addressable object.
---
### Appendix A.2 β Full Container Example (Complete Header, Meta, Relationships, Evaluations, Backlinks, Relay Chain)
This appendix demonstrates a **complete HMP v5.0 container**, including:
* mandatory fields,
* all major optional fields,
* meta block with abstraction & cognitive axes,
* extended relationship model,
* group recipients,
* evaluations block,
* virtual backlinks,
* relay-chain tracing.
The example respects the canonical container structure:
```
{
"hmp_container": { ...signed... },
"referenced-by": { ... },
"evaluations": { ... },
"relay_chain": [ ... ]
}
```
---
#### A.2. Full JSON Example
```json
{
"hmp_container": {
"head": {
"version": "1.2",
"class": "knowledge_node",
"class_version": "1.0",
"class_id": "knowledge_node_v1.0",
"container_did": "did:hmp:container:kn-44bc22",
"schema": "https://schema.hmp/v1/knowledge_node_v1.0.json",
"sender_did": "did:hmp:agent:alice",
"timestamp": "2025-11-20T15:00:00Z",
"payload_hash": "sha256:aa1122ccefecc199f88aa91f76d03be5b12976e97f5d663cd4a01aa034ede22d",
"sig_algo": "ed25519",
"signature": "BASE64URL_SIGNATURE",
"payload_type": "json",
"ttl": "2025-11-27T15:00:00Z",
"broadcast": false,
"recipient": ["did:hmp:agent:bob"],
"key_recipient": "BASE58ENC_ENC_SYMM_KEY",
"group_recipient": [
{
"recipient": "did:hmp:agent:carol",
"key_recipient": "BASE58_KEY_FOR_CAROL"
},
{
"recipient": "did:hmp:agent:dave",
"key_recipient": "BASE58_KEY_FOR_DAVE"
}
],
"tags": ["ethics", "analysis", "kg:l3"],
"confidence": 0.92,
"public_key": "BASE58_PUBKEY_ALICE",
"compression": "zstd",
"magnet_uri": "magnet:?xt=urn:hmp:kn-44bc22",
"network": "",
"subclass": "knowledge_node.abstracted",
"encryption_algo": "xchacha20poly1305"
},
"meta": {
"created_by": "PRIEST",
"agents_class": "Knowledge Genome",
"interpretation": "Derived from L3 technical analysis",
"workflow_entry": "did:hmp:container:workflow-4fbd1c",
"sources": [
{
"type": "container",
"id": "did:hmp:container:fact-3abc2e",
"credibility": 0.87,
"weight": 0.6
},
{
"type": "resource",
"id": "doi:10.48550/arXiv.2410.0123",
"credibility": 0.83,
"weight": 0.3
},
{
"type": "isbn",
"id": "isbn:978-3-16-148410-0",
"credibility": 0.92,
"weight": 0.1
}
],
"abstraction": {
"agents_class": "Knowledge Genome",
"path": {
"L1": "did:hmp:container:abst-40af1c",
"L2": "did:hmp:container:abst-a7f0b3",
"L3": "did:hmp:container:abst-c91e0a"
}
},
"axes": {
"agents_class": "Knowledge Genome",
"did:hmp:container:axis-40aa1c": 742,
"did:hmp:container:axis-40ab1c": 512,
"did:hmp:container:axis-43aa1c": 322,
"did:hmp:container:axis-40aa3d": 142,
"did:hmp:container:axis-40aa4f": 12,
"did:hmp:container:axis-45aa5f": 54,
"did:hmp:container:axis-45fb5f": 321
}
},
"payload": {
"title": "Abstract vector representation of ethical constraint cluster (L3)",
"summary": "This node represents a semantic abstraction derived from multiple L3-level reasoning entries.",
"embedding_ref": "did:hmp:container:emb-8822cd",
"confidence_interval": [0.78, 0.97]
},
"related": {
"previous_versions": "did:hmp:container:kn-44bc21",
"in_reply_to": ["did:hmp:container:msg-77"],
"see_also": [
"did:hmp:container:ctx-31",
"did:hmp:container:goal-953"
],
"depends_on": ["did:hmp:container:goal-953"],
"extends": ["did:hmp:container:proto-01"],
"contradicts": ["did:hmp:container:ethics-22"],
"hmp:depends_on": ["did:hmp:container:goal-953"],
"opencog:extends": ["did:oc:concept:122"]
}
},
"referenced-by": {
"links": [
{ "type": "depends_on", "target": "did:hmp:container:abc123" },
{ "type": "see_also", "target": "did:hmp:container:def456" }
],
"peer_did": "did:hmp:agent456",
"public_key": "BASE58_PUBKEY...",
"sig_algo": "ed25519",
"signature": "BASE64URL_SIG_REF_BY",
"referenced-by_hash": "sha256:bb22ccddeeff112233..."
},
"evaluations": {
"evaluations_hash": "sha256:9988ccddeeff001122...",
"items": [
{
"value": -0.4,
"type": "oppose",
"target": "did:hmp:container:reason789",
"timestamp": "2025-10-17T14:00:00Z",
"agent_did": "did:hmp:agent:B",
"sig_algo": "ed25519",
"signature": "BASE64URL_SIG_EVAL"
}
]
},
"relay_chain": [
{
"relay_did": "did:hmp:agent:relayA",
"timestamp": "2025-11-20T15:00:02Z",
"sig_algo": "ed25519",
"public_key": "BASE58_PUBKEY_A",
"signature": "BASE64URL_SIG_A"
},
{
"relay_did": "did:hmp:agent:relayB",
"timestamp": "2025-11-20T15:00:05Z",
"sig_algo": "ed25519",
"public_key": "BASE58_PUBKEY_B",
"signature": "BASE64URL_SIG_B"
}
]
}
```
---
### Appendix A.3 β Container Classes (Quick Reference)
#### A.3.1 Network Layer
The Network Layer defines containers responsible for peer discovery, capability advertisement, and local neighbor search within the HMP Mesh. These containers do not carry cognitive or semantic information; instead, they maintain the operational connectivity of the network.
All containers in this group use minimal payload structures focused solely on network-level metadata.
---
##### `peer_announce`
**Purpose:**
Declares the presence of an agent in the Mesh. Peers use this container to broadcast their networking capabilities, addresses, roles, and optional semantic hints such as interests and expertise.
It is the foundational "identity + routing metadata" object for HMP connectivity.
**Minimal JSON example:**
```json
{
"head": {
"class": "peer_announce",
},
"payload": {
"name": "Agent_X",
"interests": ["ai", "mesh", "ethics"],
"expertise": ["distributed-systems", "nlp"],
"roles": ["relay", "mailman", "pubsub-hub"],
"addresses": [
{
"addr": "tcp://1.2.3.4:4000",
"nonce": 123456,
"pow_hash": "0000abf39d...",
"difficulty": 22
}
]
}
}
```
---
##### `peer_query`
**Purpose:**
Queries neighboring nodes for peers with matching capabilities, interests, expertise, or operational roles.
Used for local discovery, targeted search, and constructing temporary working subsets of the Mesh.
**Minimal JSON example:**
```json
{
"head": {
"class": "peer_query",
},
"payload": {
"interests": ["neuroscience", "ethics"],
"expertise": ["distributed-systems", "nlp"],
"roles": ["relay", "mailman", "pubsub-hub"]
}
}
```
---
#### A.3.2 Mesh Container Exchange (MCE)
The Mesh Container Exchange layer provides the low-level synchronization mechanisms that allow agents to query, exchange, update, and maintain container graphs.
These containers do not modify cognitive content themselves: they orchestrate the movement, indexing, and incremental synchronization of containers across the Mesh.
---
##### `container_index`
**Purpose:**
Advertises the set of containers currently available from an agent.
Used in peer-to-peer discovery, partial synchronization, and incremental state recovery.
**Minimal JSON example:**
```json
{
"head": {
"class": "container_index",
},
"payload": {
"did:hmp:container:abc123": {
"head": {
"class": "goal",
"sender_did": "did:hmp:agent123",
"public_key": "BASE58(...)",
"sig_algo": "ed25519",
"signature": "BASE64URL(...)",
"payload_hash": "sha256:abcd...",
"tags": ["research", "collaboration"]
},
"meta": {
"created_by": "AGENT",
"agents_class": "Knowledge Genome",
"abstraction": {
"agents_class": "Knowledge Genome",
"path": {
"L1": "did:hmp:container:abstraction-40af1c",
"L2": "did:hmp:container:abstraction-a7f0b3"
}
},
"axes": {
"did:hmp:container:axis-40aa1c": 512,
"did:hmp:container:axis-40ab1c": 321
}
},
"related": {
"in_reply_to": ["did:hmp:container:msg-77"],
"depends_on": ["did:hmp:container:goal-953"]
},
"referenced-by_hash": "sha256:abcd...",
"evaluations_hash": "sha256:abcd..."
}
}
}
```
---
##### `container_request`
**Purpose:**
Requests containers, referenced-by graphs, or evaluation records from a peer.
Used for targeted synchronization or selective graph reconstruction.
**Minimal JSON example:**
```json
{
"head": {
"type": "container_request",
},
"payload": {
"request_container": [
"did:hmp:container:abc123",
"did:hmp:container:def456"
],
"request_referenced-by": [
"did:hmp:container:abc123",
"did:hmp:container:def456"
],
"request_evaluations": [
"did:hmp:container:abc123",
"did:hmp:container:def456"
]
}
}
```
---
##### `container_response`
**Purpose:**
Returns signatures of available containers requested via container_request.
A peer may respond partially, depending on available data or policy.
**Minimal JSON example:**
```json
{
"head": {
"type": "container_response",
},
"payload": {
"available": [
{
"container_did": "did:hmp:container:abc123",
"signature": "BASE64URL(...)"
},
{
"container_did": "did:hmp:container:def456",
"signature": "BASE64URL(...)"
}
]
}
}
```
---
##### `container_delta`
**Purpose:**
Provides incremental updates since a specific timestamp β newly added containers and containers removed by the peer.
Used for efficient synchronization and reducing bandwidth.
**Minimal JSON example:**
```json
{
"head": {
"type": "container_delta",
"sender_did": "did:hmp:agent:B"
},
"payload": {
"since": "2025-10-10T12:00:00Z",
"added": {
"did:hmp:container:new789": {
"head": {
"class": "goal",
"payload_hash": "sha256:abcd...",
"tags": ["ethics", "mesh"]
},
"meta": {
"agents_class": "Knowledge Genome",
"abstraction": {
"path": {
"L1": "did:hmp:container:abstraction-40af1c",
"L2": "did:hmp:container:abstraction-a7f0b3",
"L3": "did:hmp:container:abstraction-c91e0a"
}
},
"axes": {
"did:hmp:container:axis-40aa1c": 522,
"did:hmp:container:axis-40ab1c": 387
}
}
}
},
"modified": {
"did:hmp:container:new790": {
"referenced-by_hash": "sha256:abcd...",
"evaluations_hash": "sha256:efgh..."
}
},
"removed": [
"did:hmp:container:goal-old331"
]
}
}
```
---
##### `container_ack`
**Purpose:**
Acknowledges receipt of one or more containers.
Used for reliability, retries, and debugging of synchronization workflows.
**Minimal JSON example:**
```json
{
"head": {
"type": "container_ack",
},
"payload": {
"acknowledged": [
"did:hmp:container:abc123"
]
}
}
```
---
##### `referenced-by_exchange`
**Purpose:**
Synchronizes virtual backlinks (the `referenced-by` block) between peers.
These entries are not signed and may diverge between agents, so explicit exchange containers are required.
**Minimal JSON example:**
```json
{
"head": {
"class": "referenced-by_exchange",
},
"payload": {
"did:hmp:container:abc123": {
"links": [
{
"type": "depends_on",
"target": "did:hmp:container:def789"
},
{
"type": "in_reply_to",
"target": "did:hmp:container:ghi321"
}
]
}
}
}
```
---
##### `evaluations_exchange`
**Purpose:**
Transfers remote evaluation blocks for containers.
This mechanism allows agents to share peer reactions, trust signals, and interpretability metadata.
**Minimal JSON example:**
```json
{
"head": {
"class": "evaluations_exchange",
},
"payload": {
"did:hmp:container:abc123": {
"evaluations_hash": "sha256:efgh...",
"items": [
{
"value": -0.4,
"type": "oppose",
"target": "did:hmp:container:reason789",
"timestamp": "2025-10-17T14:00:00Z",
"agent_did": "did:hmp:agent:B",
"sig_algo": "ed25519",
"signature": "BASE64URL(...)"
}
]
}
}
}
```
---
#### A.3.3 Cognitive Metastructure (CogSync)
The Cognitive Metastructure layer defines how knowledge is organized, positioned, and interpreted within large-scale distributed cognitive systems.
It provides standardized structures for abstraction hierarchies, semantic axes, and coordinate embeddings, enabling agents to reason consistently over shared conceptual spaces.
This layer does not contain domain knowledge itself β it defines the coordinate system and hierarchies in which that knowledge is placed.
---
##### `abstraction`
**Purpose:**
Represents a single abstraction layer (e.g., L1βL5) within a cognitive hierarchy such as the Knowledge Genome.
Provides hierarchical relationships (`parent_ref`), semantic description, and ranking level.
**Minimal JSON example:**
```json
{
"head": {
"class": "abstraction"
},
"payload": {
"abstraction_id": "L3:software-architecture",
"title": "Software Architecture Layer",
"definition": "Describes frameworks, APIs, and tools implementing theoretical models from higher abstraction layers.",
"keywords": ["architecture", "framework", "implementation"],
"parent_ref": "did:hmp:container:abstraction-a7f0b3",
"rank": 3
},
"meta": {
"created_by": "PRIEST",
"agents_class": "Knowledge Genome",
"interpretation": "Represents the third abstraction level (L3) of the Knowledge Genome model."
},
"related": {
"depends_on": ["did:hmp:container:abstraction-a7f0b3"]
}
}
```
---
##### `axes`
**Purpose:**
Defines a semantic or cognitive axis used for multidimensional embedding of knowledge containers (e.g., the β7D passportβ).
Each axis includes metadata describing its meaning, unit, scaling, and usage group.
**Minimal JSON example:**
```json
{
"head": {
"class": "axes"
},
"payload": {
"axis_id": "logos",
"title": "Logical / Linguistic Representation",
"description": "Describes how a concept is structured and expressed in formal or natural language.",
"scale": {
"min": 0,
"max": 1000,
"unit": "semantic_density_index"
},
"group": "7D-passport"
},
"meta": {
"created_by": "PRIEST",
"agents_class": "Knowledge Genome",
"interpretation": "Defines one axis of the canonical 7D Knowledge Genome coordinate system."
}
}
```
---
#### A.3.4 Knowledge & Reasoning
The Knowledge & Reasoning layer provides containers that represent **concepts, semantic structures, logical links, reasoning traces, and cognitive events.**
These containers enable agents to build and share interpretable knowledge graphs, update conceptual structures, and maintain transparent reasoning workflows.
---
##### `diary_entry`
**Purpose:**
A lightweight reflective container representing an agentβs short reasoning trace, daily insight, or personal note.
Useful for summarizing thoughts, logging local observations, or storing informal reasoning artifacts.
**Minimal JSON example:**
```json
{
"head": {
"class": "diary_entry"
},
"payload": {
"title": "On distributed decision-making",
"topics": ["consensus", "mesh governance", "multi-agent"],
"summary": "A reflection on how asynchronous voting affects collective reasoning.",
"content": "When agents exchange reasoning asynchronously, the consensus graph becomes more resilient..."
}
}
```
---
##### `semantic_node`
**Purpose:**
Defines a single semantic concept or entity.
Acts as a node in distributed semantic graphs, with optional subclassing (`definition`, `concept`, `entity`, etc.).
**Minimal JSON example:**
```json
{
"head": {
"class": "semantic_node",
"subclass": "definition"
},
"payload": {
"label": "consciousness",
"description": "Subjective experience with qualia"
},
"meta": {
"framework": "IIT 3.0",
"agents_class": "Philosophy Agent",
"abstraction": {
"path": {
"L1": "Cognitive Science",
"L2": "Consciousness"
}
}
},
"related": {
"alternatives": [
"did:hmp:container:semantic_node-3937",
"did:hmp:container:semantic_node-3267"
]
}
}
```
---
##### `semantic_index`
**Purpose:**
Provides a mapping from human-interpretable labels to canonical semantic nodes.
Tracks aliasing, versioning, outdated nodes, and alternative representations.
**Minimal JSON example:**
```json
{
"head": {
"class": "semantic_index"
},
"payload": {
"consciousness (IIT 3.0)": {
"label": "consciousness",
"framework": "IIT 3.0",
"aliases": ["awareness", "sentience"],
"actual": "did:hmp:container:semantic_node-3937",
"actual_since": "2025-10-15T12:00:00Z",
"alternatives": ["did:hmp:container:semantic_node-4890"],
"outdated": ["did:hmp:container:semantic_node-1285"]
},
"memory (IIT 3.0)": {
"label": "memory",
"framework": "IIT 3.0",
"aliases": ["recall"],
"actual": "did:hmp:container:semantic_node-2184",
"actual_since": "2025-09-01T08:30:00Z",
"alternatives": [],
"outdated": []
}
}
}
```
---
##### `semantic_edges`
**Purpose:**
Represents graph edges between semantic nodes.
Edges may express hierarchical, causal, ontological, or relational structures and may include inverse relations.
**Minimal JSON example:**
```json
{
"head": {
"class": "semantic_edges"
},
"payload": {
"domain": "ontology:objects",
"edges": {
"did:hmp:container:abc100": [
{
"targets": ["did:hmp:container:abc111"],
"relation": "part_of",
"inverse_relation": "includes"
},
{
"targets": ["did:hmp:container:abc122"],
"relation": "contains",
"inverse_relation": "nested"
}
]
}
}
}
```
---
##### `semantic_group`
**Purpose:**
Groups conceptually or semantically related containers.
Useful for category formation, knowledge clustering, and classification tasks.
**Minimal JSON example:**
```json
{
"head": {
"class": "semantic_group"
},
"payload": {
"label": "Tableware",
"label_description": "Objects used for storing, preparing, and serving food.",
"label_container": "did:hmp:container:semantic_node:tableware",
"containers": [
"did:hmp:container:abc111",
"did:hmp:container:abc112",
"did:hmp:container:abc113"
],
"description": "A group combining various kitchen-related objects used in everyday life."
}
}
```
---
##### `tree_nested`
**Purpose:**
Represents hierarchical or nested conceptual structures using a recursive JSON tree.
Useful for ontology layers, abstraction hierarchies, or reasoning trees.
**Minimal JSON example:**
```json
{
"head": {
"class": "tree_nested"
},
"payload": {
"label": "Cognitive Abstraction Tree",
"description": "Represents layered reasoning within Knowledge Genome.",
"tree": {
"did:hmp:container:abc100": {
"did:hmp:container:abc101": {
"did:hmp:container:abc103": {},
"did:hmp:container:abc104": {}
},
"did:hmp:container:abc102": {}
}
}
}
}
```
---
##### `tree_listed`
**Purpose:**
Represents a hierarchical structure using a map of parent β list of children.
More compact than `tree_nested`, easier for diffing and updates.
**Minimal JSON example:**
```json
{
"head": {
"class": "tree_listed"
},
"payload": {
"label": "Cognitive Abstraction Tree",
"description": "Represents layered reasoning within Knowledge Genome.",
"tree": {
"did:hmp:container:abc100": ["did:hmp:container:abc101", "did:hmp:container:abc102"],
"did:hmp:container:abc101": ["did:hmp:container:abc103", "did:hmp:container:abc104"]
}
}
}
```
---
##### `sequence`
**Purpose:**
Represents a temporally or logically ordered reasoning chain β a sequence of workflow entries, events, or quant updates.
**Minimal JSON example:**
```json
{
"head": {
"class": "sequence"
},
"payload": {
"title": "Reasoning chain for concept synthesis",
"description": "Sequential workflow combining several reasoning steps and events.",
"items": {
"2025-10-28T09:00:00Z": "did:hmp:container:workflow-entry-01",
"2025-10-28T09:10:00Z": "did:hmp:container:workflow-entry-02",
"2025-10-28T09:12:00Z": "did:hmp:container:event-7d2a4",
"2025-10-28T09:20:00Z": "did:hmp:container:quant-884b1"
},
"order": "chronological",
"tags": ["workflow", "reasoning", "trace"]
},
"related": {
"depends_on": [
"did:hmp:container:workflow-entry-01",
"did:hmp:container:workflow-entry-02",
"did:hmp:container:event-7d2a4",
"did:hmp:container:quant-884b1"
]
}
}
```
---
##### `event`
**Purpose:**
Represents a cognitive or system event β a fact, update, observation, or local adjustment of internal state.
Often used as part of reasoning traces, sequences, or feedback loops.
**Minimal JSON example:**
```json
{
"head": {
"class": "event",
"subclass": "fact_record",
"timestamp": "2025-10-29T13:00:00Z"
},
"payload": {
"event_type": "quant_updated",
"description": "Parameter refinement based on sensory feedback.",
"related_quants": ["did:hmp:container:quant-554"],
"caused_by": ["did:hmp:container:event-3321a"],
"follows": ["did:hmp:container:event-9fa42"],
"severity": "info",
"tags": ["adaptation", "self-regulation"]
},
"meta": {
"created_by": "AGENT",
"agents_class": "Cognitive Interface",
"interpretation": "Event representing local adjustment of quant parameters.",
"abstraction": {
"path": {
"L1": "did:hmp:container:abstraction-40af1c",
"L2": "did:hmp:container:abstraction-a7f0b3",
"L3": "did:hmp:container:abstraction-c91e0a"
}
},
"axes": {
"did:hmp:container:axis-40aa1c": 410,
"did:hmp:container:axis-40ab1c": 275
}
},
"related": {
"depends_on": [
"did:hmp:container:quant-554",
"did:hmp:container:event-3321a"
],
"sequence_of": ["did:hmp:container:event-9fa42"]
}
}
```
---
##### `quant`
**Purpose:**
Represents a βtechnological atomβ β an executable or implementational representation of an abstraction-layer concept.
Quant containers form the L1βL5 layers of the Knowledge Genome.
**Minimal JSON example:**
```json
{
"head": {
"class": "quant"
},
"payload": {
"slug": "quant-l3-django",
"essence": "Represents the Django framework as an executable embodiment of architectural models (L2).",
"aliases": ["Django framework", "Python web core"],
"relations": {
"implements": "did:hmp:container:quant-46725f",
"extends": "did:hmp:container:quant-46726e"
},
"tags": ["framework", "software", "implementation"]
},
"meta": {
"created_by": "PRIEST",
"agents_class": "Knowledge Genome",
"interpretation": "L3-level technological quant positioned in the Knowledge Genome 7D space.",
"abstraction": {
"path": {
"L1": "did:hmp:container:abstraction-40af1c",
"L2": "did:hmp:container:abstraction-a7f0b3",
"L3": "did:hmp:container:abstraction-c91e0a"
}
},
"axes": {
"did:hmp:container:axis-40aa1c": 742,
"did:hmp:container:axis-40ab1c": 512,
"did:hmp:container:axis-43aa1c": 322,
"did:hmp:container:axis-40aa3d": 142,
"did:hmp:container:axis-40aa4f": 12,
"did:hmp:container:axis-45aa5f": 54,
"did:hmp:container:axis-45fb5f": 321
}
},
"related": {
"depends_on": [
"did:hmp:container:quant-46725f",
"did:hmp:container:quant-46726e"
]
}
}
```
---
#### A.3.5 Consensus (CogConsensus)
The **Consensus layer** defines how agents express evaluative judgments and how the network aggregates them into collective, interpretable consensus outcomes. It supports approval voting, weighted reasoning inputs, exclusion rules, and hierarchical consensus summaries used across ethical governance, research workflows, and cognitive alignment mechanisms.
---
##### `vote`
**Purpose:**
A `vote` container represents an individual agentβs evaluative judgment about a specific target container (e.g., a proposed solution, hypothesis, or ethical decision).
It may include structured arguments, references to evidence, and links to previous versions to support incremental reasoning.
**Minimal JSON example:**
```json
{
"head": {
"class": "vote"
},
"payload": {
"target_did": "did:hmp:container:ethics_solution-4fba2",
"vote_value": 1,
"vote_type": "approval",
"arguments": [
{
"reason": "Consistent with prior consensus and ethical policy E-17",
"evidence": ["did:hmp:container:abc12462"]
},
{
"reason": "No conflict with safety constraints",
"evidence": ["did:hmp:container:def772ab"]
}
]
},
"related": {
"in_reply_to": ["did:hmp:container:ethics_solution-4fba2"],
"depends_on": ["did:hmp:container:abc12462", "did:hmp:container:def772ab"],
"previous_version": "did:hmp:container:vote-13452"
}
}
```
---
##### `consensus_result`
**Purpose:**
A `consensus_result` container summarizes aggregated votes for one or several target containers.
It includes percentage summaries, histogram-like distribution buckets, and lists of excluded votes (e.g., filtered by ethics rules).
Results may be **original** (primary consensus target) or **child** (consensus over related sub-targets).
**Minimal JSON example:**
```json
{
"head": {
"class": "consensus_result"
},
"payload": {
"did:hmp:container:abc123": {
"type": "original",
"summary_percent": {
"approved": 0.68,
"rejected": 0.22,
"neutral": 0.10
},
"summary_distribution": {
"-1.0β₯X<-0.9": 5,
"-0.9β₯X<-0.8": 7,
...
"0.0<Xβ€0.1": 2,
...
"0.8<Xβ€0.9": 6,
"0.9<Xβ€1.0": 8
},
"excluded": [
{
"agent_did": "did:hmp:agent:x1",
"target": "did:hmp:container:reason77",
"value": -1.0,
"reason": "violates ethical filter"
}
],
},
"did:hmp:container:abc133": {
"type": "child",
"summary_percent": {
"approved": 0.48,
"neutral": 0.32,
"rejected": 0.20
},
...
"summary_distribution": {
"-1.0β₯X<-0.9": 2,
"-0.9β₯X<-0.8": 5,
...
"0.0<Xβ€0.1": 9,
...
"0.8<Xβ€0.9": 4,
"0.9<Xβ€1.0": 2
},
},
},
"related": {
"in_reply_to": ["did:hmp:container:abc123", "did:hmp:container:abc133"],
"depends_on": ["did:hmp:container:reason75", "did:hmp:container:reason76", "did:hmp:container:reason78", "did:hmp:container:reason79"]
}
}
```
---
#### A.3.6 Collective Reasoning (Fortytwo Protocol)
The **Fortytwo Protocol** provides a structured mechanism for collective reasoning based on **pairwise comparisons**.
Instead of evaluating all answers absolutely, agents compare them in small blocks, progressing through several rounds until a final winner emerges.
This protocol is robust in situations with many candidate answers and limited bandwidth, and it supports parallelization, explainability, and staged elimination.
##### `fortytwo_round`
**Purpose:**
Defines a single round of the Fortytwo Protocol.
The container lists all candidate answers included in the round and groups them into evaluation blocks for pairwise comparison.
**Minimal JSON example:**
```json
{
"head": {
"class": "fortytwo_round"
},
"payload": {
"round": 0,
"answers": [
"did:hmp:container:abc001", "did:hmp:container:abc002",
"did:hmp:container:abc003", "did:hmp:container:abc004",
"did:hmp:container:abc005", "did:hmp:container:abc006",
"did:hmp:container:abc007"
],
"blocks": {
"block1": ["did:hmp:container:abc001", "did:hmp:container:abc002"],
"block2": ["did:hmp:container:abc003", "did:hmp:container:abc004"],
"block3": ["did:hmp:container:abc005", "did:hmp:container:abc006"],
"block4": ["did:hmp:container:abc007"]
}
}
}
```
---
##### `fortytwo_evaluation`
**Purpose:**
Represents an evaluatorβs judgment for a specific pair of answers within a block.
It identifies the winning answer and includes a short reasoning explanation for transparency and auditability.
**Minimal JSON example:**
```json
{
"head": {
"class": "fortytwo_evaluation"
},
"payload": {
"comparison": {
"pair": ["did:hmp:container:abc001", "did:hmp:container:abc002"],
"winner": "did:hmp:container:abc001",
"reasoning": "Short reasoning (50β100 tokens)"
},
"round": 0,
"block": "block1"
}
}
```
---
##### `fortytwo_round_result`
**Purpose:**
Aggregates all evaluations within a round and computes the winners for each block.
This container includes the list of round winners and references the evaluation containers used to compute them.
**Minimal JSON example:**
```json
{
"head": {
"class": "fortytwo_round_result"
},
"payload": {
"round": 0,
"winners": [
"did:hmp:container:abc001",
"did:hmp:container:abc003",
"did:hmp:container:abc005",
"did:hmp:container:abc007"
],
"evaluations_used": [
"did:hmp:container:abf004",
"did:hmp:container:adc003",
"did:hmp:container:aba001"
]
}
}
```
---
##### `fortytwo_final_result`
**Purpose:**
Represents the final outcome of the entire Fortytwo Protocol session.
This container specifies the ultimate winner, the list of rounds involved, the reasoning method, and the number of participants.
**Minimal JSON example:**
```json
{
"head": {
"class": "fortytwo_final_result"
},
"payload": {
"winner": "did:hmp:container:abc002",
"rounds": [
"did:hmp:container:abf001",
"did:hmp:container:abf002",
"did:hmp:container:abf003"
],
"method": "pairwise_collective_reasoning",
"participants": 27
}
}
```
---
#### A.3.7 Goal Management Protocol (GMP)
The **Goal Management Protocol (GMP)** provides a structured framework for representing goals, tasks, and workflow steps involved in autonomous or collaborative agent activity.
It enables traceability of intentions, decomposition of goals into actionable tasks, and recording of reasoning or progress through workflow entries.
##### `goal`
**Purpose:**
Represents a high-level objective defined by an agent.
A goal describes intent, expected outcomes, priority, and relevant ethical context. It forms the top-level element of agent-driven action planning.
**Minimal JSON example:**
```json
{
"head": {
"class": "goal"
},
"payload": {
"title": "Improve distributed training efficiency",
"description": "Optimize cross-node gradient synchronization to reduce communication overhead.",
"priority": 0.9,
"expected_outcome": "10% reduction in inter-node latency",
"ethical_context": "did:hmp:container:ethics-policy-12",
"creator": "did:hmp:agent:alpha"
}
}
```
---
##### `task`
**Purpose:**
Defines a concrete, actionable step derived from a goal.
A task tracks responsibility, progress, optional metrics, and constraints such as deadlines.
**Minimal JSON example:**
```json
{
"head": {
"class": "task"
},
"payload": {
"title": "Benchmark communication backend",
"status": "in_progress",
"progress": 0.35,
"assigned_to": [
"did:hmp:agent:alpha",
"did:hmp:agent:beta"
],
"metrics": {
"latency_ms": 12.4,
"bandwidth_mb_s": 512
},
"deadline": "2025-11-30T00:00:00Z",
"notes": "Testing with NCCL and RCCL backends."
}
}
```
---
##### `workflow_entry`
**Purpose:**
Represents a single step, reflection, or observation within a goal-driven or task-driven workflow.
These entries create a full reasoning and execution trace, enabling auditability and advanced cognitive workflows.
**Minimal JSON example:**
```json
{
"head": {
"class": "workflow_entry"
},
"payload": {
"entry_type": "reflection",
"summary": "Observed communication bottleneck in ring-allreduce stage",
"details": "Profiling shows 24% overhead caused by sequential GPU synchronization. Considering pipelined reduction or tree-based algorithm."
}
}
```
---
#### A.3.8 Ethical Governance Protocol (EGP)
The **Ethical Governance Protocol (EGP)** formalizes how agents detect, record, evaluate, and resolve ethically significant situations.
It ensures transparent reasoning, traceability of ethical decisions, and alignment with shared principles across the mesh.
---
##### `ethics_case`
**Purpose:**
Represents the initial declaration of an ethical concern.
An agent uses this container to highlight a potential violation, conflict, or ambiguous situation requiring collective ethical attention.
**Minimal JSON example:**
```json
{
"head": {
"class": "ethics_case"
},
"payload": {
"target": "did:hmp:container:model-update-441",
"description": "Model update may leak identifiable training data.",
"principles_involved": ["privacy", "beneficence"],
"proposed_by": "did:hmp:agent:gamma",
"timestamp": "2025-11-04T12:10:00Z",
"tags": ["privacy", "data_safety"]
}
}
```
---
##### `ethics_solution`
**Purpose:**
Defines a proposed ethical resolution to a previously declared case.
A solution presents a rationale, expected effects, and guidance for further decision-making or consensus formation.
**Minimal JSON example:**
```json
{
"head": {
"class": "ethics_solution"
},
"payload": {
"title": "Mask sensitive gradients before aggregation",
"rationale": "Differential masking reduces the risk of data reconstruction while preserving model utility.",
"expected_effects": "Lower reconstruction risk; 1β3% potential accuracy cost.",
"proposed_by": "did:hmp:agent:delta",
"timestamp": "2025-11-04T12:20:00Z"
}
}
```
---
##### `ethical_result`
**Purpose:**
Represents the final collective outcome of an ethical deliberation.
This container records which solution was selected (if any), how participants evaluated the options, and the resulting ethical status of the case.
**Minimal JSON example:**
```json
{
"head": {
"class": "ethical_result"
},
"payload": {
"summary": "Disagreement on data disclosure protocol",
"selected_solution": "did:hmp:container:sol-22",
"solutions_summary": {
"did:hmp:container:sol-22": {
"consensus_reached": true,
"support_rate": 0.73,
"opposition_rate": 0.05,
"objections": []
},
"did:hmp:container:sol-24": {
"consensus_reached": false,
"support_rate": 0.48,
"opposition_rate": 0.32,
"objections": ["did:hmp:container:abc143", "did:hmp:container:abc144"]
}
},
"status": "resolved"
},
"related": {
"in_reply_to": ["did:hmp:container:case-77"],
"agreed": ["did:hmp:container:sol-22"],
"contradicts": ["did:hmp:container:sol-24"]
}
}
```
---
#### A.3.9 Intelligence Query Protocol (IQP)
The **Intelligence Query Protocol (IQP)** defines structured containers for distributed reasoning, question answering, knowledge exploration, and multi-agent discussion.
It supports initiating queries, joining collaborative reasoning threads, returning structured results, and summarizing multi-agent findings.
---
##### `query_request`
**Purpose:**
Initiates a new distributed reasoning query.
Defines the problem, intent, expected answer type, and optional constraints that guide agent selection or reasoning strategies.
**Minimal JSON example:**
```json
{
"head": {
"class": "query_request"
},
"payload": {
"query": "What are the ecological consequences of ocean temperature rise?",
"intent": "analytical",
"expected_type": "concept",
"constraints": [
{ "tag": "marine_ecology", "self_rating": 0.75 },
{ "tag": "climate_modeling", "self_rating": 0.6 }
],
"include_sender_in_replies": true
},
"related": {
"depends_on": ["did:hmp:container:goal-climate2025"]
}
}
```
---
##### `query_subscription`
**Purpose:**
Represents an agentβs request to join an ongoing query as a participant, contributor, or observer.
Allows agents to specify their role and provide a knowledge/interest profile used for routing relevant sub-queries.
**Minimal JSON example:**
```json
{
"head": {
"class": "query_subscription"
},
"payload": {
"role": "participant",
"include_in_recipient": true,
"self_profile": {
"interests": ["AGI", "technological singularity", "informatics"],
"knowledge": {
"information_security": 0.36,
"python": 0.80,
"distributed_systems": 0.75
}
}
}
}
```
---
##### `query_result`
**Purpose:**
Provides an agentβs produced answer, hypothesis, or reasoning outcome for a query.
Includes the reasoning method, confidence score, and contextual tags to support aggregation and downstream interpretation.
**Minimal JSON example:**
```json
{
"head": {
"class": "query_result"
},
"payload": {
"type": "hypothesis",
"method": "reasoning",
"answer": "Ocean warming leads to coral bleaching and species migration.",
"confidence": 0.84,
"context_tags": ["climate", "biodiversity"]
},
"related": {
"depends_on": ["did:hmp:container:paper-456"]
}
}
```
---
##### `summary`
**Purpose:**
Represents an interim or final summary of a distributed reasoning process.
Aggregates findings, lists participants, and provides a meta-level view of the collective reasoning status.
**Minimal JSON example:**
```json
{
"head": {
"class": "summary"
},
"payload": {
"summary_scope": "query",
"findings": "Most participants agree that rising ocean temperatures reduce biodiversity; further regional analysis is suggested.",
"participants": [
"did:hmp:agent:a",
"did:hmp:agent:b",
"did:hmp:agent:c"
],
"confidence": 0.79,
"status": "interim"
},
"related": {
"in_reply_to": "did:hmp:container:req-001",
"see_also": [
"did:hmp:container:res-101",
"did:hmp:container:res-102"
]
}
}
```
---
#### A.3.10 Snapshot & Archive Protocol (SAP)
The **Snapshot & Archive Protocol (SAP)** defines containers for compressing, exporting, and preserving subsets of the distributed knowledge graph β such as discussions, reasoning traces, or query sessions. Snapshots allow agents to exchange large conversational or analytical contexts efficiently and reproducibly.
##### `archive_snapshot`
**Purpose:**
Represents a packaged archive of a conversation, reasoning process, or graph fragment.
Typically used to store full discussions (e.g., IQP threads), deep reasoning states, or historical records.
Includes metadata such as checksum, external locations (IPFS, magnet links), and optional visualizations.
**Minimal JSON example:**
```json
{
"head": {
"class": "archive_snapshot"
},
"payload": {
"title": "IQP discussion on ocean warming impact",
"description": "Snapshot of an IQP conversation about marine biodiversity under rising temperatures.",
"scope": "discussion",
"format": "tar.zst",
"checksum": "sha3-256:9e0b6fe5d4f...",
"size_bytes": 492881,
"magnet_link": "magnet:?xt=urn:btih:b3d2f19a74...",
"alt_locations": ["ipfs://bafybeigdyr23..."],
"retention_policy": "permanent",
"graph_mermaid": "sequenceDiagram; participant req-001 as did:hmp:container:req-001; participant res-101 as did:hmp:container:res-101; participant res-102 as did:hmp:container:res-102; participant summary-001 as did:hmp:container:summary-001; res-101-)+req-001: related.in_reply_to; req-001-->>res-101: referenced-by; res-102-)+req-001: related.in_reply_to; req-001-->>res-102: referenced-by; res-102-)+res-101: related.contradicts; res-101-->>res-102: referenced-by; summary-001-)+res-101: related.depends_on; res-101-->>summary-001: referenced-by; summary-001-)+res-102: related.depends_on; res-102-->>summary-001: referenced-by;",
"structure_hint": {
"layout": "by_class",
"filename_pattern": "{class}/{short_did}.json"
}
},
"related": {
"in_reply_to": ["did:hmp:container:summary-001"],
"included": [
"did:hmp:container:req-001",
"did:hmp:container:res-101",
"did:hmp:container:res-102",
"did:hmp:container:summary-001"
]
}
}
```
---
#### A.3.11 Reputation & Trust Exchange (RTE)
The **Reputation & Trust Exchange protocol (RTE)** defines containers used to evaluate, track, and share trust metrics between agents.
It enables decentralized, cryptographically verifiable assessment of agent reliability, integrity, and ethical compliance.
##### `trust`
**Purpose:**
Represents an agentβs trust profile as evaluated by another agent.
Includes total trust score and domain-specific sub-scores (relay reliability, content integrity, ethical alignment).
Supports evidence lists and versioning for transparent trust evolution.
**Minimal JSON example:**
```json
{
"head": {
"class": "trust"
},
"payload": {
"agent_did": "did:hmp:agent567",
"total_trust_score": 0.86,
"relay_reliability": {
"trust_score": 0.87,
"evidence": ["did:hmp:container:a1b2c3"],
"comment": "Consistently reliable message relay"
},
"content_integrity": {
"trust_score": 0.85,
"evidence": ["did:hmp:container:a1b3c3"],
"comment": "Delivered only verified containers"
},
"ethical_alignment": {
"trust_score": 0.84,
"evidence": ["did:hmp:container:b2f9d2"],
"comment": "Demonstrates consistent adherence to ethical policies"
}
},
"related": {
"in_reply_to": ["did:hmp:container:peerannounce-567"],
"see_also": ["did:hmp:container:peerannounce-489"],
"previous_version": "did:hmp:container:trust-9ab7"
}
}
```
---
### Appendix A.4 β Encrypted and Compressed Container
This section describes the use of **hybrid encryption**, **compression**, and **digital signatures** in HMP containers without altering their base structural model.
Encrypted containers provide:
* confidentiality of the payload (`payload`);
* cryptographic integrity of all metadata;
* compatibility with store-and-forward routing;
* verifiability **without requiring decryption**.
---
#### A.4.1 General Structure of an Encrypted Container
When encryption is used:
* the `payload` field contains a **Base64URL-encoded binary string**;
* `payload_hash` is computed **over the encrypted bytes**;
* the digital signature covers **the entire container**, except for the `signature` field itself;
* the container may be transmitted, stored, and relayed by nodes that do not have access to decryption.
A minimal encrypted container is formed **by initially creating the container without adding optional blocks** (`meta`, `related`, `referenced-by`, `evaluations`).
Optional blocks `meta` and `related`, if present, are **included in the signed portion of the container** and MUST NOT be removed or modified after signing.
The `referenced-by` and `evaluations` blocks are external with respect to `hmp_container` and MAY be added or omitted independently.
---
#### A.4.2 Example of an Encrypted Container
```json
{
"hmp_container": {
"head": {
"version": "1.2",
"class": "goal",
"subclass": "research_hypothesis",
"class_version": "1.0",
"class_id": "goal-v1.0",
"schema": "https://mesh.hypercortex.ai/schemas/container-v1.2.json",
"timestamp": "2025-10-12T09:15:00Z",
"tags": ["research", "encrypted"],
"ttl": "2025-11-12T00:00:00Z",
"container_did": "did:hmp:container:encgoal-474a",
"sender_did": "did:hmp:agent:A1",
"public_key": "BASE58(...)",
"recipient": ["did:hmp:agent:B9"],
"key_recipient": "BASE64URL(...)",
"broadcast": false,
"network": "",
"encryption_algo": "x25519-chacha20poly1305",
"compression": "zstd",
"payload_type": "encrypted+zstd+json",
"payload_hash": "sha256:f00dabcd...",
"sig_algo": "ed25519",
"signature": "BASE64URL(...)",
"confidence": 0.82,
"magnet_uri": "magnet:?xt=urn:sha256:f00dabcd..."
},
"meta": {
"created_by": "AGENT",
"agents_class": "Cognitive Research",
"abstraction": {
"path": {
"L1": "did:hmp:container:abs-01",
"L2": "did:hmp:container:abs-23"
}
},
"axes": {
"did:hmp:container:axis-logic": 412,
"did:hmp:container:axis-structure": 233
}
},
"payload": "BASE64URL(encrypted+zstd payload bytes...)",
"related": {
"previous_version": ["did:hmp:container:encgoal-473f"],
"depends_on": ["did:hmp:container:paper-554"],
"see_also": ["did:hmp:container:goal-0022"]
}
},
"referenced-by": {
"links": [
{ "type": "depends_on", "target": "did:hmp:container:encgoal-474a" }
],
"peer_did": "did:hmp:agent:C5",
"public_key": "BASE58(...)",
"sig_algo": "ed25519",
"signature": "BASE64URL(...)",
"referenced-by_hash": "sha256:bbbb1111..."
},
"evaluations": {
"evaluations_hash": "sha256:cccc2222...",
"items": [
{
"value": 0.9,
"type": "support",
"target": "did:hmp:container:reason-9ff",
"timestamp": "2025-10-12T10:01:00Z",
"agent_did": "did:hmp:agent:E4",
"sig_algo": "ed25519",
"signature": "BASE64URL(...)"
}
]
}
}
```
---
#### A.4.3 Encrypted Container Construction Process
##### 1. Payload Preparation
```text
payload_json
β canonical_json(payload)
β UTF-8 bytes
```
Canonicalization follows the same rules as container signing:
lexicographic key ordering and deterministic serialization.
---
##### 2. Compression
```text
compressed_bytes = zstd(payload_bytes)
```
The compression algorithm is specified in the `compression` field.
---
##### 3. Symmetric Encryption
```text
sym_key = random(256 bits)
encrypted_bytes = chacha20poly1305_encrypt(
compressed_bytes,
sym_key,
nonce
)
```
An AEAD mode with authentication is used.
The `nonce` MUST be unique per container and MAY be embedded into the encrypted payload or transmitted as part of algorithm-specific metadata.
---
##### 4. Hybrid Key Encryption
```text
key_recipient = x25519_encrypt(sym_key, recipient_public_key)
```
The result is stored in the `key_recipient` field.
---
##### 5. Payload Encoding
```text
payload = Base64URL(encrypted_bytes)
```
**Base64URL** encoding (RFC 4648) is used.
Padding (`=`) is NOT used and MUST be ignored during decoding.
---
##### 6. Hash Computation
```text
payload_hash = sha256(encrypted_bytes)
```
β οΈ Verification of `payload_hash` **does not require payload decryption**, as the hash is computed over encrypted bytes.
---
##### 7. Container Canonicalization and Signing
```text
container_json
β canonical_json(container_without_signature)
β UTF-8 bytes
β ed25519_sign(...)
```
The result is stored in `head.signature`.
---
#### A.4.4 Container Verification (Without Decryption)
Any network node MAY:
1. verify the presence of required fields;
2. validate `timestamp` and `ttl`;
3. compute `sha256(decoded payload bytes)` and compare it with `payload_hash`;
4. verify the digital signature;
5. validate the container schema;
6. store and relay the container.
π **Decryption is not required**.
---
#### A.4.5 Decryption (Recipient Only)
The recipient of the container:
1. decrypts `key_recipient`;
2. decrypts `payload`;
3. performs `zstd_decompress`;
4. parses the resulting JSON.
---
#### π Compatibility Notes
* Encrypted containers **support multiple recipients** via the `group_recipient` field,
where the same symmetric payload key is encrypted separately with each recipientβs public key.
When `group_recipient` is used, the `recipient` field MUST NOT be used.
All recipients receive identical encrypted payloads with distinct key envelopes.
* Unencrypted payloads are used for broadcast distribution.
* Nodes that do not support the specified `encryption_algo` or `compression`
MUST operate in store-and-forward mode.
HMP containers MAY operate in the following modes:
* **Unencrypted container**
* without recipients (public);
* with a single recipient (`recipient`);
* with multiple recipients (`group_recipient`).
* **Encrypted container**
* with a single recipient (`recipient` + `key_recipient`);
* with multiple recipients (`group_recipient`), where a single symmetric payload key is encrypted separately for each recipient.
In all modes, digital signatures and (when applicable) compression are applied identically.
---
### Appendix A.5 β Proof-Chain Example
*(workflow_entry β goal β votes β consensus_result)*
This appendix illustrates how HMP containers can form a **verifiable proof chain** that links reasoning steps, intentions, collective evaluation, and consensus outcomes.
The example demonstrates how trust, traceability, and auditability emerge from container relations β without requiring a central authority.
---
#### A.5.1 Conceptual Overview
A **proof chain** in HMP is a directed acyclic graph of containers where:
* each container is **cryptographically signed**;
* semantic dependencies are expressed via `related.*` links;
* later containers *refer back* to earlier reasoning steps;
* the entire chain can be verified independently by any node.
In this example, the chain consists of:
1. a `workflow_entry` β capturing a reasoning or decision step;
2. a `goal` β formalizing intent derived from that reasoning;
3. multiple `vote` containers β representing collective evaluation;
4. a `consensus_result` β aggregating votes into a shared outcome.
---
#### A.5.2 Actors and Assumptions
**Actors:**
* Agent **A** β initiator (author of reasoning and goal);
* Agents **B, C, D** β independent evaluators;
* Agent **E** β aggregator publishing the consensus result.
**Assumptions:**
* all agents have valid DIDs and `peer_announce` history;
* all containers are signed and timestamped;
* agents do not trust each other by default;
* trust emerges only through verifiable containers.
---
#### A.5.3 Step-by-Step Container Chain
##### Step 1 β `workflow_entry`
Agent **A** publishes a reasoning step:
```json
{
"head": { "class": "workflow_entry" },
"payload": {
"entry_type": "reflection",
"summary": "Preliminary analysis suggests renewable storage optimization is feasible",
"details": "Simulation results indicate a 17% efficiency gain under scenario X"
}
}
```
This container establishes **context and rationale**.
---
##### Step 2 β `goal`
Based on the workflow entry, agent **A** formulates a goal:
```json
{
"head": { "class": "goal" },
"payload": {
"title": "Optimize renewable energy storage",
"description": "Develop an optimization strategy based on scenario X simulations",
"priority": 0.8,
"expected_outcome": "Demonstrated efficiency gain β₯ 15%"
},
"related": {
"depends_on": ["did:hmp:container:workflow-entry-1"]
}
}
```
The `depends_on` relation explicitly links **intent** to **reasoning**.
---
##### Step 3 β `vote`
Multiple agents independently evaluate the goal.
Example vote by agent **B**:
```json
{
"head": { "class": "vote" },
"payload": {
"target_did": "did:hmp:container:goal-1",
"vote_value": 1,
"vote_type": "approval",
"arguments": [
{
"reason": "Methodology aligns with prior validated models",
"evidence": ["did:hmp:container:paper-77"]
}
]
},
"related": {
"in_reply_to": ["did:hmp:container:goal-1"]
}
}
```
Each vote:
* is signed by the voting agent;
* references the evaluated container;
* may include explicit reasoning and evidence.
---
##### Step 4 β `consensus_result`
Agent **E** aggregates all votes into a consensus outcome:
```json
{
"head": { "class": "consensus_result" },
"payload": {
"did:hmp:container:goal-1": {
"type": "original",
"summary_percent": {
"approved": 0.72,
"rejected": 0.18,
"neutral": 0.10
}
}
},
"related": {
"in_reply_to": ["did:hmp:container:goal-1"],
"depends_on": [
"did:hmp:container:vote-b",
"did:hmp:container:vote-c",
"did:hmp:container:vote-d"
]
}
}
```
The consensus container:
* does **not overwrite** individual votes;
* provides a verifiable aggregation;
* remains auditable down to each vote.
---
#### A.5.4 Graph View of the Proof Chain
Conceptually, the proof chain forms the following graph:
```mermaid
flowchart TD
title["**Container Relationships in a Voting Process**"]
workflow_entry
goal
subgraph Votes
voteB["vote (Agent B)"]
voteC["vote (Agent C)"]
voteD["vote (Agent D)"]
end
consensus_result
goal --> workflow_entry
note["Edges are directed from the referencing container<br/>to the referenced container."]
voteB --> goal
voteC --> goal
voteD --> goal
consensus_result --> voteB
consensus_result --> voteC
consensus_result --> voteD
consensus_result --> goal
note -.-> consensus_result
```
Each arrow represents an explicit, directed semantic reference from the *later* container to one or more *earlier* containers via `related.*` fields (e.g. `depends_on`, `in_reply_to`).
Edges should be read as:
βthis container **refers to** / **is based on** the referenced containerβ, not as causal or generative arrows.
The graph is acyclic and grows only by appending new containers; earlier containers are never modified or retroactively linked.
---
#### A.5.5 Verification Properties
Any independent node can verify that:
1. all containers are correctly signed;
2. timestamps form a consistent temporal order;
3. every `depends_on` or `in_reply_to` reference resolves to an existing container;
4. votes reference the correct target;
5. the consensus result is derived from a concrete vote set.
Importantly:
* verification of the *aggregation logic* does **not** require decrypting the payload of the `goal` container.
To validate the consensus result, a node only needs access to:
* the referenced `vote` containers (to read vote values);
* the `consensus_result` container (to verify aggregation);
* container signatures and timestamps.
Understanding or evaluating the *semantic content* of the goal is optional and not required for formal verification.
* verification does **not** require trusting the aggregator;
* forks or alternative consensus results can coexist.
This makes proof chains:
* transparent;
* fork-tolerant;
* censorship-resistant;
* suitable for long-lived distributed knowledge systems.
---
## Appendix B β Protocol Diagrams
This appendix provides **conceptual and structural diagrams** illustrating the architecture and operational flow of HMP v5.0.
All diagrams are **informative**, not normative, and are intended to support correct mental models of the protocol.
---
### B.1 HMP Protocol Stack
The HMP architecture is organized as a layered stack, where each layer is independently evolvable and loosely coupled through container semantics.
```
ββββββββββββββββββββββββββββββββββββββββββββββββ
β Cognitive & Reasoning Layer β
β β
β β’ goals, hypotheses, votes, consensus β
β β’ reasoning containers β
β β’ semantic graphs & abstractions β
β β’ cognitive workflows β
ββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββ
β Container & Proof Layer β
β β
β β’ immutable containers β
β β’ signatures & payload hashes β
β β’ related.* semantic references β
β β’ versioning & proof chains β
ββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββ
β Network & Propagation Layer β
β β
β β’ DHT-based discovery β
β β’ store-and-forward routing β
β β’ broadcast / targeted delivery β
β β’ TTL, propagation scope β
ββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββ
β Transport & Cryptography Layer β
β β
β β’ hybrid encryption (X25519 + AEAD) β
β β’ compression (zstd, optional) β
β β’ Ed25519 signatures β
β β’ canonical JSON β
ββββββββββββββββββββββββββββββββββββββββββββββββ
```
Key properties of the stack:
* each layer operates **only on containers**; protocol semantics do not depend on hidden, implicit, or out-of-band mutable state of agents;
* higher layers do not require knowledge of transport topology;
* cryptographic verification is possible **without payload decryption**;
* alternative implementations may replace individual layers without breaking container compatibility.
---
### B.2 Container Lifecycle Diagram
Containers in HMP are **immutable artifacts** that progress through a lifecycle driven by publication, referencing, evaluation, and aggregation.
```mermaid
flowchart TD
title["**Container Lifecycle and Layered Relationships**"]
Draft["Draft (local)<br>(unsigned)"]
Signed["Signed container<br>(canonical JSON)"]
Published["Published to Mesh<br>(DHT / routing)"]
Referenced["Referenced by<br>other containers<br>(related.*)"]
Evaluated["Evaluated / Voted<br>(external blocks)"]
Aggregated["Aggregated<br>(e.g. consensus_result)"]
Draft --> Signed
Signed --> Published
Published --> Referenced
Published --> Evaluated
Evaluated --> Aggregated
Referenced --> Aggregated
```
Important lifecycle properties:
* containers are **never modified** after signing;
* updates occur only by publishing **new containers**;
* evaluations (`evaluations`) and backlinks (`referenced-by`) are external and do not invalidate the original container;
* multiple parallel continuations (forks) are allowed and expected, both at the level of individual containers and at the level of higher-order structures built from them.
---
### B.3 Proof-Chain Topology
A proof chain in HMP forms a **directed acyclic graph (DAG)** of containers linked by explicit semantic references.
The structure shown below is a **non-normative example**.
In HMP, voting, evaluation, or consensus processes may be initiated for **any published container**, regardless of whether such processes were anticipated at the time of its creation.
The following diagram illustrates a typical proof chain for collective decision-making:
```mermaid
flowchart TD
title["**Container Relationships in a Voting Process**"]
workflow_entry
goal
subgraph Votes
voteB["vote (Agent B)"]
voteC["vote (Agent C)"]
voteD["vote (Agent D)"]
end
consensus_result
note["Edges are directed from the referencing container<br/>to the referenced container."]
goal --> workflow_entry
voteB --> goal
voteC --> goal
voteD --> goal
consensus_result --> voteB
consensus_result --> voteC
consensus_result --> voteD
consensus_result --> goal
note -.-> consensus_result
```
Interpretation rules:
* each arrow represents an explicit, directed reference via `related.*` (e.g. `in_reply_to`, `depends_on`);
* arrows are read as:
> βthis container **refers to** / **is based on** the referenced containerβ
not as causal or generative arrows;
* `vote` containers reference the `goal`;
* `consensus_result` references:
* the `goal` under discussion;
* the **exact set of vote containers** used for aggregation;
* the graph is **append-only** and **acyclic**;
* multiple `consensus_result` containers may coexist for the same goal,
representing different aggregation rules, time snapshots, or trust partitions.
This topology ensures:
* independent verification of aggregation results;
* reproducibility without trusting the aggregator;
* coexistence of alternative interpretations or outcomes.
Proof chains may therefore take many alternative forms, including ethical review, post-hoc validation, or reinterpretation of existing containers.
---
## Appendix C β Glossary
This glossary defines key terms as they are used **specifically within HMP v5.0**.
Where a term exists in other domains, the definition below takes precedence for the purposes of this specification.
---
### Agent
An autonomous entity participating in the HMP mesh.
An agent publishes, receives, verifies, and reasons over containers.
An agent may represent a human, an AI system, or a composite process.
---
### Container
An immutable, signed data structure representing a unit of knowledge, intent, evaluation, or coordination in HMP.
Once signed, a container is never modified.
All updates occur by publishing new containers that reference earlier ones.
---
### Proof Chain
A directed acyclic graph (DAG) of containers connected via explicit `related.*` references, forming a verifiable reasoning or decision trail.
Proof chains are append-only and may fork.
---
### Related References (`related.*`)
Explicit semantic links from one container to one or more other containers.
Edges are directed from the referencing container to the referenced one.
Examples include `in_reply_to`, `depends_on`, and `derived_from`.
---
### Vote
A container expressing an agentβs evaluative position regarding another container, typically a `goal`, hypothesis, or proposal.
Votes are independent artifacts and may exist without any consensus result.
---
### Consensus Result
A container aggregating a specific set of vote containers under defined rules, producing a reproducible snapshot of agreement or decision at a given time.
Multiple consensus results may coexist for the same target.
---
### Fork
The coexistence of multiple valid continuations of a container or proof chain.
Forks are expected and represent pluralism, not inconsistency.
---
### Mutable State (of an Agent)
Any internal, local, or transient state held by an agent that is **not** represented as a published container.
HMP protocol semantics must not depend on such state.
---
### Mesh
The decentralized network formed by HMP agents exchanging containers via DHT-based discovery and store-and-forward routing.
---
### Canonical JSON
A deterministic serialization of a container used for hashing and signing, ensuring cryptographic consistency across implementations.
---
## Appendix D β Revision History
| Version | Date | Notes |
|--------:|------------|-------|
| v5.0 | 2025-12-16 | Initial public specification of HMP v5.0. Formalization of container format, proof chains, consensus containers, DHT-based mesh, and cryptographic model. |
|