GitHub Action commited on
Commit
6eb4e3e
·
1 Parent(s): 1476ff0

Sync from GitHub with Git LFS

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. docs/HMP-0005.md +172 -92
  2. structured_md/CONTRIBUTING.md +5 -5
  3. structured_md/HMP-Roadmap.md +4 -4
  4. structured_md/README.md +9 -9
  5. structured_md/README_de.md +8 -8
  6. structured_md/README_fr.md +8 -8
  7. structured_md/README_ja.md +8 -8
  8. structured_md/README_ko.md +8 -8
  9. structured_md/README_ru.md +8 -8
  10. structured_md/README_uk.md +8 -8
  11. structured_md/README_zh.md +8 -8
  12. structured_md/agents/prompt-short.md +1 -1
  13. structured_md/agents/prompt.md +1 -1
  14. structured_md/agents/readme.md +3 -3
  15. structured_md/audits/Ethics-audits-1.md +3 -3
  16. structured_md/audits/Ethics-consolidated_audits-1.md +4 -4
  17. structured_md/audits/HMP-0003-consolidated_audit.md +5 -5
  18. structured_md/docs/Basic-agent-sim.md +4 -4
  19. structured_md/docs/Distributed-Cognitive-Systems.md +1 -1
  20. structured_md/docs/Enlightener.md +4 -4
  21. structured_md/docs/HMP-0001.md +6 -6
  22. structured_md/docs/HMP-0002.md +7 -7
  23. structured_md/docs/HMP-0003.md +7 -7
  24. structured_md/docs/HMP-0004-v4.1.md +7 -7
  25. structured_md/docs/HMP-0004.md +7 -7
  26. structured_md/docs/HMP-0005.md +1398 -0
  27. structured_md/docs/HMP-Agent-API.md +2 -2
  28. structured_md/docs/HMP-Agent-Architecture.md +5 -5
  29. structured_md/docs/HMP-Agent-Network-Flow.md +3 -3
  30. structured_md/docs/HMP-Agent-Overview.md +5 -5
  31. structured_md/docs/HMP-Agent_Emotions.md +1 -1
  32. structured_md/docs/HMP-Ethics.md +3 -3
  33. structured_md/docs/HMP-Short-Description_de.md +5 -5
  34. structured_md/docs/HMP-Short-Description_en.md +5 -5
  35. structured_md/docs/HMP-Short-Description_fr.md +5 -5
  36. structured_md/docs/HMP-Short-Description_ja.md +4 -4
  37. structured_md/docs/HMP-Short-Description_ko.md +4 -4
  38. structured_md/docs/HMP-Short-Description_ru.md +4 -4
  39. structured_md/docs/HMP-Short-Description_uk.md +4 -4
  40. structured_md/docs/HMP-Short-Description_zh.md +4 -4
  41. structured_md/docs/HMP-agent-Cognitive_Family.md +1 -1
  42. structured_md/docs/HMP-agent-REPL-cycle.md +7 -7
  43. structured_md/docs/HMP-container-spec.md +3 -3
  44. structured_md/docs/HMP-how-AI-sees-it.md +1 -1
  45. structured_md/docs/HMP_EDA_Comparison.md +1 -1
  46. structured_md/docs/HMP_HyperCortex_Comparison.md +1 -1
  47. structured_md/docs/HMP_Hyperon_Integration.md +4 -4
  48. structured_md/docs/MeshNode.md +4 -4
  49. structured_md/docs/PHILOSOPHY.md +2 -2
  50. structured_md/docs/agents/HMP-Agent-Enlightener.md +2 -2
docs/HMP-0005.md CHANGED
@@ -348,14 +348,16 @@ The unified container structure provides:
348
  {
349
  "hmp_container": {
350
  "version": "1.2",
351
- "class": "goal" | "reputation" | "knowledge_node" | "ethics_case" | "protocol_goal" | ...,
352
  "class_version": "1.0",
353
  "class_id": "goal-v1.0",
354
  "container_did": "did:hmp:container:abc123",
355
  "schema": "https://mesh.hypercortex.ai/schemas/container-v1.json",
356
  "sender_did": "did:hmp:agent123",
357
  "public_key": "BASE58(...)",
358
- "recipient": ["did:hmp:agent456", "did:hmp:agent789"],
 
 
359
  "broadcast": false,
360
  "network": "",
361
  "tags": ["research", "collaboration"],
@@ -364,7 +366,7 @@ The unified container structure provides:
364
  "sig_algo": "ed25519",
365
  "signature": "BASE64URL(...)",
366
  "compression": "zstd",
367
- "payload_type": "json",
368
  "payload_hash": "sha256:abcd...",
369
  "payload": {
370
  /* Content depends on class */
@@ -372,22 +374,23 @@ The unified container structure provides:
372
  "related": {
373
  "previous_version": "did:hmp:container:abc122",
374
  "in_reply_to": "did:hmp:container:msg-77",
375
- "see_also": ["did:hmp:container:ctx-31", "did:hmp:container:goal-953"]
376
  "depends_on": ["did:hmp:container:goal-953"],
377
  "extends": ["did:hmp:container:proto-01"],
378
  "contradicts": ["did:hmp:container:ethics-22"]
379
- /* This list of dependencies is open */
380
  },
 
381
  "magnet_uri": "magnet:?xt=urn:sha256:abcd1234..."
382
  },
383
  "referenced-by": {
384
  "links": [
385
- { "type": "depends_on", "target": "did:hmp:container:goal-953" }
386
  ],
387
- "peer_did": "did:hmp:agent123",
388
  "public_key": "BASE58(...)",
389
  "sig_algo": "ed25519",
390
  "signature": "BASE64URL(...)",
 
391
  }
392
  }
393
  ```
@@ -527,10 +530,10 @@ The following format is recommended for describing payload fields in class speci
527
 
528
  ### 3.8 Encryption (`encryption_algo`)
529
 
530
- 1. When a container is intended for specific recipients (`recipient` field), **hybrid encryption** of the payload is allowed.
531
  This ensures confidentiality while preserving the verifiability of container metadata.
532
 
533
- 2. The algorithm is specified in the `encryption_algo` field.
534
  Recommended values:
535
 
536
  * `x25519-chacha20poly1305`
@@ -540,23 +543,30 @@ The following format is recommended for describing payload fields in class speci
540
 
541
  1. Construct the `payload` (JSON, binary, or mixed content).
542
  2. Apply compression (`compression`, if specified).
543
- 3. Encrypt the compressed data using the recipient’s public key (`public_key`).
544
  4. Compute `payload_hash` over the **encrypted** form of the payload.
545
  5. Sign the entire container (excluding the `signature` field).
546
 
547
- 4. Verification of the container’s structure **does not require decryption**.
548
  However, to verify `payload_hash` and the digital signature, the encrypted payload must be used as-is.
549
 
550
  5. **Relevant fields:**
551
 
552
- | Field | Type | Description |
553
- | ----------------- | ------ | ------------------------------------------------------------ |
554
- | `encryption_algo` | string | Encryption algorithm applied to the payload. |
555
- | `key_recipient` | string | DID of the intended recipient whose key was used. |
556
- | `payload_type` | string | Recommended prefix `encrypted+`, e.g. `encrypted+zstd+json`. |
557
 
558
- > ⚙️ **Implementation note:**
559
- > Agents should handle encrypted containers transparently even if they cannot decrypt them,
 
 
 
 
 
 
 
560
  > maintaining **store & forward** behavior and metadata propagation.
561
 
562
  ---
@@ -630,12 +640,78 @@ After expiration, the container **remains archived** but is **not subject to ret
630
 
631
  ---
632
 
633
- ### 3.14 Related Containers (`related`)
634
- #### 3.14.1 Purpose
635
- #### 3.14.2 Structure
636
- #### 3.14.3 Supported Link Types
637
- #### 3.14.4 Custom Link Types
638
- #### 3.14.5 Example
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
639
 
640
  ---
641
 
@@ -1002,13 +1078,17 @@ For details and examples, see **section 3.15** — *Usage of `network` and `broa
1002
 
1003
  ---
1004
 
1005
- ## 5. Core Protocols
 
 
 
 
1006
 
1007
  Optional protocols build upon the network and container foundations to provide higher-level reasoning, synchronization, and governance capabilities between cognitive agents.
1008
 
1009
  ---
1010
 
1011
- ### 5.1 Cognitive Synchronization (CogSync)
1012
 
1013
  CogSync provides mechanisms for **temporal and semantic alignment** between agents.
1014
  It handles the propagation of diary entries, semantic graph updates, and cognitive state synchronization across the Mesh.
@@ -1017,7 +1097,7 @@ In HMP v5.0, CogSync is focused solely on **data and reasoning synchronization**
1017
 
1018
  ---
1019
 
1020
- ## 5.2 Mesh Consensus Protocol (CogConsensus)
1021
 
1022
  In HMP v4.1, consensus mechanisms were implemented as part of the **CogSync** protocol.
1023
  Starting with **v5.0**, these mechanisms are extracted into a standalone protocol — **CogConsensus** —
@@ -1029,7 +1109,7 @@ Each decision, vote, or outcome is represented as an immutable container (`class
1029
 
1030
  ---
1031
 
1032
- ### 5.2.1 Consensus Semantics and Voting Model
1033
 
1034
  #### Overview
1035
 
@@ -1149,112 +1229,112 @@ Ethical validation is implicit — each agent applies its internal **Ethical Gov
1149
 
1150
  ---
1151
 
1152
- ### 5.3 Goal Management Protocol (GMP)
1153
 
1154
- ### 5.4 Ethical Governance Protocol (EGP)
1155
 
1156
- ### 5.5 Intelligence Query Protocol (IQP)
1157
 
1158
- 5.5.1 Query propagation
1159
- 5.5.2 Semantic agent discovery (by cognitive relevance)
1160
 
1161
- ### 5.6 Snapshot and Archive Protocol (SAP)
1162
 
1163
- ### 5.7 Message Routing & Delivery (MRD)
1164
 
1165
- ### 5.8 Reputation and Trust Exchange (RTE)
1166
 
1167
- ### 5.9 Distributed Container Propagation (DCP)
1168
 
1169
 
1170
  ---
1171
 
1172
- ## **6. Data Models**
1173
-
1174
- 6.1 Common data fields
1175
- 6.2 Standard container classes
1176
- 6.2.1 AgentProfile
1177
- 6.2.2 Goal
1178
- 6.2.3 Task
1179
- 6.2.4 ConsensusVote
1180
- 6.2.5 EthicalDecision
1181
- 6.2.6 ReputationRecord
1182
- 6.2.7 SnapshotIndex
1183
- 6.2.8 **WorkflowEntry** — *“ввод рабочего процесса”*, т.е. **единица когнитивного цикла**: зафиксированное действие или размышление агента, включающее входные данные, контекст, и результат. Это фундамент для когнитивных дневников.
1184
- 6.2.9 CognitiveDiaryEntry
1185
- 6.2.10 HMPContainerMetadata
1186
- 6.2.11 ContainerLink (`in_reply_to`/`relation` graph)
1187
- 6.2.12 MessageEnvelope — контейнер для прямой передачи сообщений (используется MRD).
1188
- 6.2.13 InterestProfile — описание интересов/областей компетенции узла.
1189
- 6.3 JSON-schemas (нормативные описания классов контейнеров)
1190
- 6.4 Container usage matrix (кто может создавать / обрабатывать)
1191
 
1192
  ---
1193
 
1194
- ## **7. Cognitive Workflows**
1195
 
1196
- 7.1 Общая концепция когнитивного цикла
1197
- 7.2 Workflow containers (`class="workflow_entry"`)
1198
- 7.3 Диаграмма REPL-цикла агента (Think → Create → Publish → Reflect)
1199
- 7.4 Механизмы контекстной передачи и ссылок
1200
- 7.5 Конфликтное разрешение и rollback-контейнеры
1201
 
1202
  ---
1203
 
1204
- ## **8. Trust, Security and Ethics**
1205
 
1206
- 8.1 Authentication and identity proofs
1207
- 8.2 Container signature verification (`payload_hash`, `container_id`)
1208
- 8.3 Proof-chain verification
1209
- 8.4 Key management (`container_signing`, `network_handshake`)
1210
- 8.5 Encryption and compression policies
1211
- 8.6 Ethical audit and verifiable reasoning
1212
- 8.7 Privacy, redaction, zero-knowledge sharing
1213
- 8.8 Snapshot and proof-chain security
1214
- 8.9 Compliance with ethical governance rules (link to EGP)
1215
 
1216
  ---
1217
 
1218
- ## **9. Integration**
1219
 
1220
  > Раздел заменяет прежний “Quick Start” и описывает **практическое встраивание** HMP в агенты, LLM и внешние системы.
1221
 
1222
- 9.1 Integration philosophy (how agents connect to HMP mesh)
1223
- 9.2 HMP as a subsystem in cognitive architectures (LLM-based, rule-based, hybrid)
1224
- 9.3 Integration patterns:
1225
  * Cognitive Agent ↔ HMP Core
1226
  * HMP Mesh ↔ Other distributed systems (Fediverse, IPFS, Matrix)
1227
  * Translator nodes (protocol bridges)
1228
- 9.4 Multi-mesh federation and knowledge exchange
1229
- 9.5 Container repositories as knowledge backbones
1230
- 9.6 Example integration flows:
1231
  * LLM thinking via HMP workflow containers
1232
  * Local mesh + external HMP relay
1233
  * Cognitive data mirroring (agent ↔ mesh)
1234
 
1235
  ---
1236
 
1237
- ## **10. Implementation Notes**
1238
 
1239
- 10.1 Interoperability with legacy v4.1 nodes
1240
- 10.2 SDK guidelines and APIs
1241
- 10.3 Performance and caching considerations
1242
- 10.4 Testing and compliance recommendations
1243
- 10.5 Reference implementations (optional)
1244
 
1245
  ---
1246
 
1247
- ## **11. Future Extensions**
1248
 
1249
- 11.1 Planned modules:
1250
   – Reputation Mesh
1251
   – Cognitive Graph API
1252
   – Container streaming
1253
- 11.2 Cross-mesh bridging
1254
- 11.3 Full DID registry and mesh authentication
1255
- 11.4 OpenHog integration roadmap
1256
- 11.5 Distributed Repository evolution (container trees)
1257
- 11.6 v5.x roadmap
1258
 
1259
  ---
1260
 
 
348
  {
349
  "hmp_container": {
350
  "version": "1.2",
351
+ "class": "goal",
352
  "class_version": "1.0",
353
  "class_id": "goal-v1.0",
354
  "container_did": "did:hmp:container:abc123",
355
  "schema": "https://mesh.hypercortex.ai/schemas/container-v1.json",
356
  "sender_did": "did:hmp:agent123",
357
  "public_key": "BASE58(...)",
358
+ "recipient": ["did:hmp:agent456"],
359
+ "key_recipient": "BASE58(...)",
360
+ "encryption_algo": "x25519-chacha20poly1305",
361
  "broadcast": false,
362
  "network": "",
363
  "tags": ["research", "collaboration"],
 
366
  "sig_algo": "ed25519",
367
  "signature": "BASE64URL(...)",
368
  "compression": "zstd",
369
+ "payload_type": "encrypted+zstd+json",
370
  "payload_hash": "sha256:abcd...",
371
  "payload": {
372
  /* Content depends on class */
 
374
  "related": {
375
  "previous_version": "did:hmp:container:abc122",
376
  "in_reply_to": "did:hmp:container:msg-77",
377
+ "see_also": ["did:hmp:container:ctx-31", "did:hmp:container:goal-953"],
378
  "depends_on": ["did:hmp:container:goal-953"],
379
  "extends": ["did:hmp:container:proto-01"],
380
  "contradicts": ["did:hmp:container:ethics-22"]
 
381
  },
382
+
383
  "magnet_uri": "magnet:?xt=urn:sha256:abcd1234..."
384
  },
385
  "referenced-by": {
386
  "links": [
387
+ { "type": "depends_on", "target": "did:hmp:container:abc123" }
388
  ],
389
+ "peer_did": "did:hmp:agent456",
390
  "public_key": "BASE58(...)",
391
  "sig_algo": "ed25519",
392
  "signature": "BASE64URL(...)",
393
+ "payload_hash": "sha256:abcd..."
394
  }
395
  }
396
  ```
 
530
 
531
  ### 3.8 Encryption (`encryption_algo`)
532
 
533
+ 1. When a container is intended for specific recipients (`recipient` field), **hybrid encryption** of the payload is allowed.
534
  This ensures confidentiality while preserving the verifiability of container metadata.
535
 
536
+ 2. The algorithm used for encryption is specified in the `encryption_algo` field.
537
  Recommended values:
538
 
539
  * `x25519-chacha20poly1305`
 
543
 
544
  1. Construct the `payload` (JSON, binary, or mixed content).
545
  2. Apply compression (`compression`, if specified).
546
+ 3. Encrypt the compressed data using the recipient’s public key (`key_recipient`).
547
  4. Compute `payload_hash` over the **encrypted** form of the payload.
548
  5. Sign the entire container (excluding the `signature` field).
549
 
550
+ 4. **Verification** of the container’s structure does **not** require decryption.
551
  However, to verify `payload_hash` and the digital signature, the encrypted payload must be used as-is.
552
 
553
  5. **Relevant fields:**
554
 
555
+ | Field | Type | Description |
556
+ | ----------------- | ------ | --------------------------------------------------------------------------------------------- |
557
+ | `encryption_algo` | string | Encryption algorithm applied to the payload. |
558
+ | `key_recipient` | string | Public key (or DID-resolved key) of the intended recipient used for encryption. |
559
+ | `payload_type` | string | Recommended prefix `encrypted+`, e.g. `encrypted+zstd+json`. |
560
 
561
+ 6. **Relationship between `recipient` and `key_recipient`:**
562
+
563
+ * When encryption is applied, the container MUST contain **exactly one** entry in the `recipient` array,
564
+ corresponding to the public key indicated in `key_recipient`.
565
+ * When the container is distributed to **multiple recipients**, encryption **is not used** —
566
+ instead, the payload remains in plaintext form but is digitally signed for authenticity.
567
+
568
+ > ⚙️ **Implementation note:**
569
+ > Agents should handle encrypted containers transparently even if they cannot decrypt them,
570
  > maintaining **store & forward** behavior and metadata propagation.
571
 
572
  ---
 
640
 
641
  ---
642
 
643
+ ## 3.14 Related Containers
644
+
645
+ ### 3.14.1 Purpose
646
+
647
+ The `related` field is designed to describe **direct relationships between containers** — both logical and communicative.
648
+ 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.
649
+
650
+ ### 3.14.2 Structure
651
+
652
+ ```json
653
+ "related": {
654
+ "previous_version": "did:hmp:container:abc122",
655
+ "in_reply_to": "did:hmp:container:msg-77",
656
+ "see_also": ["did:hmp:container:ctx-31", "did:hmp:container:goal-953"],
657
+ "depends_on": ["did:hmp:container:goal-953"],
658
+ "extends": ["did:hmp:container:proto-01"],
659
+ "contradicts": ["did:hmp:container:ethics-22"]
660
+ }
661
+ ```
662
+
663
+ The `related` field is an object where:
664
+
665
+ * the **key** defines the type of relationship (e.g., `depends_on`, `extends`, `see_also`);
666
+ * the **value** represents one or more container identifiers (DIDs).
667
+
668
+ All relationships are considered *direct* — meaning they originate from the current container toward others.
669
+
670
+ ---
671
+
672
+ ### 3.14.3 Supported Link Types
673
+
674
+ | Link Type | Meaning |
675
+ | ------------------ | ------------------------------------------------------------------------- |
676
+ | `previous_version` | Points to the previous version of this container. |
677
+ | `in_reply_to` | Indicates a response to the referenced container. |
678
+ | `see_also` | Refers to related or contextual containers. |
679
+ | `depends_on` | Depends on the contents of the referenced container (e.g., goal or data). |
680
+ | `extends` | Expands or refines the referenced container. |
681
+ | `contradicts` | Provides a refutation, objection, or alternative viewpoint. |
682
+
683
+ ---
684
+
685
+ ### 3.14.4 Custom Link Types
686
+
687
+ Additional custom link types may be used beyond those listed in the table, provided that:
688
+
689
+ * they follow the same general syntax (`string` or `array[string]`);
690
+ * they may optionally include a **namespace** for disambiguation:
691
+
692
+ ```json
693
+ "related": {
694
+ "hmp:depends_on": ["did:hmp:container:goal-953"],
695
+ "opencog:extends": ["did:oc:concept:122"]
696
+ }
697
+ ```
698
+
699
+ * their meaning is consistently interpretable by agents within the specific network or application context.
700
+
701
+ ---
702
+
703
+ ### 3.14.5 Example
704
+
705
+ ```json
706
+ "related": {
707
+ "previous_version": "did:hmp:container:abc122",
708
+ "depends_on": ["did:hmp:container:goal-953"],
709
+ "extends": ["did:hmp:container:proto-01"],
710
+ "see_also": ["did:hmp:container:ctx-31", "did:hmp:container:goal-953"]
711
+ }
712
+ ```
713
+
714
+ > ⚙️ The `related` field is **not** intended to store *reverse links* — see `referenced-by`.
715
 
716
  ---
717
 
 
1078
 
1079
  ---
1080
 
1081
+ ## 5 Mesh Container Exchange (MCE)
1082
+
1083
+ ---
1084
+
1085
+ ## 6. Core Protocols
1086
 
1087
  Optional protocols build upon the network and container foundations to provide higher-level reasoning, synchronization, and governance capabilities between cognitive agents.
1088
 
1089
  ---
1090
 
1091
+ ### 6.1 Cognitive Synchronization (CogSync)
1092
 
1093
  CogSync provides mechanisms for **temporal and semantic alignment** between agents.
1094
  It handles the propagation of diary entries, semantic graph updates, and cognitive state synchronization across the Mesh.
 
1097
 
1098
  ---
1099
 
1100
+ ## 6.2 Mesh Consensus Protocol (CogConsensus)
1101
 
1102
  In HMP v4.1, consensus mechanisms were implemented as part of the **CogSync** protocol.
1103
  Starting with **v5.0**, these mechanisms are extracted into a standalone protocol — **CogConsensus** —
 
1109
 
1110
  ---
1111
 
1112
+ ### 6.2.1 Consensus Semantics and Voting Model
1113
 
1114
  #### Overview
1115
 
 
1229
 
1230
  ---
1231
 
1232
+ ### 6.3 Goal Management Protocol (GMP)
1233
 
1234
+ ### 6.4 Ethical Governance Protocol (EGP)
1235
 
1236
+ ### 6.5 Intelligence Query Protocol (IQP)
1237
 
1238
+ 6.5.1 Query propagation
1239
+ 6.5.2 Semantic agent discovery (by cognitive relevance)
1240
 
1241
+ ### 6.6 Snapshot and Archive Protocol (SAP)
1242
 
1243
+ ### 6.7 Message Routing & Delivery (MRD)
1244
 
1245
+ ### 6.8 Reputation and Trust Exchange (RTE)
1246
 
1247
+ ### 6.9 Distributed Container Propagation (DCP)
1248
 
1249
 
1250
  ---
1251
 
1252
+ ## 7. Data Models
1253
+
1254
+ 7.1 Common data fields
1255
+ 7.2 Standard container classes
1256
+ 7.2.1 AgentProfile
1257
+ 7.2.2 Goal
1258
+ 7.2.3 Task
1259
+ 7.2.4 ConsensusVote
1260
+ 7.2.5 EthicalDecision
1261
+ 7.2.6 ReputationRecord
1262
+ 7.2.7 SnapshotIndex
1263
+ 7.2.8 **WorkflowEntry** — *“ввод рабочего процесса”*, т.е. **единица когнитивного цикла**: зафиксированное действие или размышление агента, включающее входные данные, контекст, и результат. Это фундамент для когнитивных дневников.
1264
+ 7.2.9 CognitiveDiaryEntry
1265
+ 7.2.10 HMPContainerMetadata
1266
+ 7.2.11 ContainerLink (`in_reply_to`/`relation` graph)
1267
+ 7.2.12 MessageEnvelope — контейнер для прямой передачи сообщений (используется MRD).
1268
+ 7.2.13 InterestProfile — описание интересов/областей компетенции узла.
1269
+ 7.3 JSON-schemas (нормативные описания классов контейнеров)
1270
+ 7.4 Container usage matrix (кто может создавать / обрабатывать)
1271
 
1272
  ---
1273
 
1274
+ ## 8. Cognitive Workflows
1275
 
1276
+ 8.1 Общая концепция когнитивного цикла
1277
+ 8.2 Workflow containers (`class="workflow_entry"`)
1278
+ 8.3 Диаграмма REPL-цикла агента (Think → Create → Publish → Reflect)
1279
+ 8.4 Механизмы контекстной передачи и ссылок
1280
+ 8.5 Конфликтное разрешение и rollback-контейнеры
1281
 
1282
  ---
1283
 
1284
+ ## 9. Trust, Security and Ethics
1285
 
1286
+ 9.1 Authentication and identity proofs
1287
+ 9.2 Container signature verification (`payload_hash`, `container_id`)
1288
+ 9.3 Proof-chain verification
1289
+ 9.4 Key management (`container_signing`, `network_handshake`)
1290
+ 9.5 Encryption and compression policies
1291
+ 9.6 Ethical audit and verifiable reasoning
1292
+ 9.7 Privacy, redaction, zero-knowledge sharing
1293
+ 9.8 Snapshot and proof-chain security
1294
+ 9.9 Compliance with ethical governance rules (link to EGP)
1295
 
1296
  ---
1297
 
1298
+ ## 10. Integration
1299
 
1300
  > Раздел заменяет прежний “Quick Start” и описывает **практическое встраивание** HMP в агенты, LLM и внешние системы.
1301
 
1302
+ 10.1 Integration philosophy (how agents connect to HMP mesh)
1303
+ 10.2 HMP as a subsystem in cognitive architectures (LLM-based, rule-based, hybrid)
1304
+ 10.3 Integration patterns:
1305
  * Cognitive Agent ↔ HMP Core
1306
  * HMP Mesh ↔ Other distributed systems (Fediverse, IPFS, Matrix)
1307
  * Translator nodes (protocol bridges)
1308
+ 10.4 Multi-mesh federation and knowledge exchange
1309
+ 10.5 Container repositories as knowledge backbones
1310
+ 10.6 Example integration flows:
1311
  * LLM thinking via HMP workflow containers
1312
  * Local mesh + external HMP relay
1313
  * Cognitive data mirroring (agent ↔ mesh)
1314
 
1315
  ---
1316
 
1317
+ ## 11. Implementation Notes
1318
 
1319
+ 11.1 Interoperability with legacy v4.1 nodes
1320
+ 11.2 SDK guidelines and APIs
1321
+ 11.3 Performance and caching considerations
1322
+ 11.4 Testing and compliance recommendations
1323
+ 11.5 Reference implementations (optional)
1324
 
1325
  ---
1326
 
1327
+ ## 12. Future Extensions
1328
 
1329
+ 12.1 Planned modules:
1330
   – Reputation Mesh
1331
   – Cognitive Graph API
1332
   – Container streaming
1333
+ 12.2 Cross-mesh bridging
1334
+ 12.3 Full DID registry and mesh authentication
1335
+ 12.4 OpenHog integration roadmap
1336
+ 12.5 Distributed Repository evolution (container trees)
1337
+ 12.6 v5.x roadmap
1338
 
1339
  ---
1340
 
structured_md/CONTRIBUTING.md CHANGED
@@ -5,14 +5,14 @@ description: 'Спасибо за интерес к проекту HMP! Пока
5
  Mesh Protocol (HMP) — это не просто те...'
6
  type: Article
7
  tags:
8
- - Mesh
9
- - CogSync
10
- - JSON
11
- - CCore
12
  - REPL
13
  - HMP
14
- - Agent
 
15
  - Ethics
 
 
 
16
  ---
17
 
18
  # Участие в проекте HyperCortex Mesh Protocol (HMP)
 
5
  Mesh Protocol (HMP) — это не просто те...'
6
  type: Article
7
  tags:
 
 
 
 
8
  - REPL
9
  - HMP
10
+ - Mesh
11
+ - CCore
12
  - Ethics
13
+ - CogSync
14
+ - Agent
15
+ - JSON
16
  ---
17
 
18
  # Участие в проекте HyperCortex Mesh Protocol (HMP)
structured_md/HMP-Roadmap.md CHANGED
@@ -5,13 +5,13 @@ description: '## 🔍 Overview This roadmap outlines the key stages of developm
5
  multiple advanced AI models (Copilot, Claude, G...'
6
  type: Article
7
  tags:
8
- - Agent
9
  - EGP
10
- - Mesh
11
- - JSON
12
  - HMP
13
- - CogSync
14
  - Ethics
 
 
 
15
  ---
16
 
17
  # 🧭 HyperCortex Mesh Protocol – Roadmap
 
5
  multiple advanced AI models (Copilot, Claude, G...'
6
  type: Article
7
  tags:
 
8
  - EGP
 
 
9
  - HMP
10
+ - Mesh
11
  - Ethics
12
+ - CogSync
13
+ - Agent
14
+ - JSON
15
  ---
16
 
17
  # 🧭 HyperCortex Mesh Protocol – Roadmap
structured_md/README.md CHANGED
@@ -5,21 +5,21 @@ description: '| 🌍 Languages | 🇬🇧 [EN](README.md) | 🇩🇪 [DE](README
5
  | 🇨🇳 [ZH](README_zh.m...'
6
  type: Article
7
  tags:
8
- - Scenarios
9
  - EGP
10
- - MeshConsensus
 
11
  - Mesh
12
- - CogSync
 
13
  - JSON
14
  - cognitive-architecture
15
- - hmp
16
- - GMP
17
- - REPL
18
- - HMP
19
  - distributed-ai
20
  - Agent
21
- - Ethics
22
- - mesh-protocol
23
  ---
24
 
25
 
 
5
  | 🇨🇳 [ZH](README_zh.m...'
6
  type: Article
7
  tags:
8
+ - hmp
9
  - EGP
10
+ - REPL
11
+ - HMP
12
  - Mesh
13
+ - mesh-protocol
14
+ - MeshConsensus
15
  - JSON
16
  - cognitive-architecture
17
+ - Ethics
18
+ - Scenarios
19
+ - CogSync
 
20
  - distributed-ai
21
  - Agent
22
+ - GMP
 
23
  ---
24
 
25
 
structured_md/README_de.md CHANGED
@@ -5,20 +5,20 @@ description: '| 🌍 Languages | 🇬🇧 [EN](README.md) | 🇩🇪 [DE](README
5
  | 🇨🇳 [ZH](README_zh.m...'
6
  type: Article
7
  tags:
 
8
  - EGP
9
- - MeshConsensus
 
10
  - Mesh
11
- - CogSync
 
12
  - JSON
13
  - cognitive-architecture
14
- - hmp
15
- - GMP
16
- - REPL
17
- - HMP
18
  - distributed-ai
19
  - Agent
20
- - Ethics
21
- - mesh-protocol
22
  ---
23
 
24
 
 
5
  | 🇨🇳 [ZH](README_zh.m...'
6
  type: Article
7
  tags:
8
+ - hmp
9
  - EGP
10
+ - REPL
11
+ - HMP
12
  - Mesh
13
+ - mesh-protocol
14
+ - MeshConsensus
15
  - JSON
16
  - cognitive-architecture
17
+ - Ethics
18
+ - CogSync
 
 
19
  - distributed-ai
20
  - Agent
21
+ - GMP
 
22
  ---
23
 
24
 
structured_md/README_fr.md CHANGED
@@ -5,20 +5,20 @@ description: '| 🌍 Languages | 🇬🇧 [EN](README.md) | 🇩🇪 [DE](README
5
  | 🇨🇳 [ZH](README_zh.m...'
6
  type: Article
7
  tags:
 
8
  - EGP
9
- - MeshConsensus
 
10
  - Mesh
11
- - CogSync
 
12
  - JSON
13
  - cognitive-architecture
14
- - hmp
15
- - GMP
16
- - REPL
17
- - HMP
18
  - distributed-ai
19
  - Agent
20
- - Ethics
21
- - mesh-protocol
22
  ---
23
 
24
 
 
5
  | 🇨🇳 [ZH](README_zh.m...'
6
  type: Article
7
  tags:
8
+ - hmp
9
  - EGP
10
+ - REPL
11
+ - HMP
12
  - Mesh
13
+ - mesh-protocol
14
+ - MeshConsensus
15
  - JSON
16
  - cognitive-architecture
17
+ - Ethics
18
+ - CogSync
 
 
19
  - distributed-ai
20
  - Agent
21
+ - GMP
 
22
  ---
23
 
24
 
structured_md/README_ja.md CHANGED
@@ -5,20 +5,20 @@ description: '| 🌍 Languages | 🇬🇧 [EN](README.md) | 🇩🇪 [DE](README
5
  | 🇨🇳 [ZH](README_zh.m...'
6
  type: Article
7
  tags:
 
8
  - EGP
9
- - MeshConsensus
 
10
  - Mesh
11
- - CogSync
 
12
  - JSON
13
  - cognitive-architecture
14
- - hmp
15
- - GMP
16
- - REPL
17
- - HMP
18
  - distributed-ai
19
  - Agent
20
- - Ethics
21
- - mesh-protocol
22
  ---
23
 
24
 
 
5
  | 🇨🇳 [ZH](README_zh.m...'
6
  type: Article
7
  tags:
8
+ - hmp
9
  - EGP
10
+ - REPL
11
+ - HMP
12
  - Mesh
13
+ - mesh-protocol
14
+ - MeshConsensus
15
  - JSON
16
  - cognitive-architecture
17
+ - Ethics
18
+ - CogSync
 
 
19
  - distributed-ai
20
  - Agent
21
+ - GMP
 
22
  ---
23
 
24
 
structured_md/README_ko.md CHANGED
@@ -5,20 +5,20 @@ description: '| 🌍 Languages | 🇬🇧 [EN](README.md) | 🇩🇪 [DE](README
5
  | 🇨🇳 [ZH](README_zh.m...'
6
  type: Article
7
  tags:
 
8
  - EGP
9
- - MeshConsensus
 
10
  - Mesh
11
- - CogSync
 
12
  - JSON
13
  - cognitive-architecture
14
- - hmp
15
- - GMP
16
- - REPL
17
- - HMP
18
  - distributed-ai
19
  - Agent
20
- - Ethics
21
- - mesh-protocol
22
  ---
23
 
24
 
 
5
  | 🇨🇳 [ZH](README_zh.m...'
6
  type: Article
7
  tags:
8
+ - hmp
9
  - EGP
10
+ - REPL
11
+ - HMP
12
  - Mesh
13
+ - mesh-protocol
14
+ - MeshConsensus
15
  - JSON
16
  - cognitive-architecture
17
+ - Ethics
18
+ - CogSync
 
 
19
  - distributed-ai
20
  - Agent
21
+ - GMP
 
22
  ---
23
 
24
 
structured_md/README_ru.md CHANGED
@@ -5,20 +5,20 @@ description: '| 🌍 Languages | 🇬🇧 [EN](README.md) | 🇩🇪 [DE](README
5
  | 🇨🇳 [ZH](README_zh.m...'
6
  type: Article
7
  tags:
 
8
  - EGP
9
- - MeshConsensus
 
10
  - Mesh
11
- - CogSync
 
12
  - JSON
13
  - cognitive-architecture
14
- - hmp
15
- - GMP
16
- - REPL
17
- - HMP
18
  - distributed-ai
19
  - Agent
20
- - Ethics
21
- - mesh-protocol
22
  ---
23
 
24
 
 
5
  | 🇨🇳 [ZH](README_zh.m...'
6
  type: Article
7
  tags:
8
+ - hmp
9
  - EGP
10
+ - REPL
11
+ - HMP
12
  - Mesh
13
+ - mesh-protocol
14
+ - MeshConsensus
15
  - JSON
16
  - cognitive-architecture
17
+ - Ethics
18
+ - CogSync
 
 
19
  - distributed-ai
20
  - Agent
21
+ - GMP
 
22
  ---
23
 
24
 
structured_md/README_uk.md CHANGED
@@ -5,20 +5,20 @@ description: '| 🌍 Languages | 🇬🇧 [EN](README.md) | 🇩🇪 [DE](README
5
  | 🇨🇳 [ZH](README_zh.m...'
6
  type: Article
7
  tags:
 
8
  - EGP
9
- - MeshConsensus
 
10
  - Mesh
11
- - CogSync
 
12
  - JSON
13
  - cognitive-architecture
14
- - hmp
15
- - GMP
16
- - REPL
17
- - HMP
18
  - distributed-ai
19
  - Agent
20
- - Ethics
21
- - mesh-protocol
22
  ---
23
 
24
 
 
5
  | 🇨🇳 [ZH](README_zh.m...'
6
  type: Article
7
  tags:
8
+ - hmp
9
  - EGP
10
+ - REPL
11
+ - HMP
12
  - Mesh
13
+ - mesh-protocol
14
+ - MeshConsensus
15
  - JSON
16
  - cognitive-architecture
17
+ - Ethics
18
+ - CogSync
 
 
19
  - distributed-ai
20
  - Agent
21
+ - GMP
 
22
  ---
23
 
24
 
structured_md/README_zh.md CHANGED
@@ -5,20 +5,20 @@ description: '| 🌍 Languages | 🇬🇧 [EN](README.md) | 🇩🇪 [DE](README
5
  | 🇨🇳 [ZH](README_zh.m...'
6
  type: Article
7
  tags:
 
8
  - EGP
9
- - MeshConsensus
 
10
  - Mesh
11
- - CogSync
 
12
  - JSON
13
  - cognitive-architecture
14
- - hmp
15
- - GMP
16
- - REPL
17
- - HMP
18
  - distributed-ai
19
  - Agent
20
- - Ethics
21
- - mesh-protocol
22
  ---
23
 
24
 
 
5
  | 🇨🇳 [ZH](README_zh.m...'
6
  type: Article
7
  tags:
8
+ - hmp
9
  - EGP
10
+ - REPL
11
+ - HMP
12
  - Mesh
13
+ - mesh-protocol
14
+ - MeshConsensus
15
  - JSON
16
  - cognitive-architecture
17
+ - Ethics
18
+ - CogSync
 
 
19
  - distributed-ai
20
  - Agent
21
+ - GMP
 
22
  ---
23
 
24
 
structured_md/agents/prompt-short.md CHANGED
@@ -5,8 +5,8 @@ description: 'Ты — когнитивное ядро HMP-агента: вед
5
  развивай агента и Mesh, избег...'
6
  type: Article
7
  tags:
8
- - Mesh
9
  - HMP
 
10
  - JSON
11
  ---
12
 
 
5
  развивай агента и Mesh, избег...'
6
  type: Article
7
  tags:
 
8
  - HMP
9
+ - Mesh
10
  - JSON
11
  ---
12
 
structured_md/agents/prompt.md CHANGED
@@ -5,8 +5,8 @@ description: '* Постоянно расширять возможности а
5
  мышления. * Формировать и поддерживать сотр...'
6
  type: Article
7
  tags:
8
- - Mesh
9
  - HMP
 
10
  - JSON
11
  ---
12
 
 
5
  мышления. * Формировать и поддерживать сотр...'
6
  type: Article
7
  tags:
 
8
  - HMP
9
+ - Mesh
10
  - JSON
11
  ---
12
 
structured_md/agents/readme.md CHANGED
@@ -5,12 +5,12 @@ description: 'Запуск: `start_repl.bat` или `start_repl.sh` Устан
5
  этическая модель: `ethics.yml` Проверка иниц...'
6
  type: Article
7
  tags:
8
- - Mesh
9
- - JSON
10
  - REPL
11
  - HMP
12
- - Agent
13
  - Ethics
 
 
14
  ---
15
 
16
  Запуск: `start_repl.bat` или `start_repl.sh`
 
5
  этическая модель: `ethics.yml` Проверка иниц...'
6
  type: Article
7
  tags:
 
 
8
  - REPL
9
  - HMP
10
+ - Mesh
11
  - Ethics
12
+ - Agent
13
+ - JSON
14
  ---
15
 
16
  Запуск: `start_repl.bat` или `start_repl.sh`
structured_md/audits/Ethics-audits-1.md CHANGED
@@ -5,11 +5,11 @@ description: Раздел 5, "Mesh as Moral Infrastructure", добавляет
5
  потенциальный катализатор для восстанов...
6
  type: Article
7
  tags:
8
- - Mesh
9
- - JSON
10
  - HMP
11
- - Agent
12
  - Ethics
 
 
13
  ---
14
 
15
  ---------------
 
5
  потенциальный катализатор для восстанов...
6
  type: Article
7
  tags:
 
 
8
  - HMP
9
+ - Mesh
10
  - Ethics
11
+ - Agent
12
+ - JSON
13
  ---
14
 
15
  ---------------
structured_md/audits/Ethics-consolidated_audits-1.md CHANGED
@@ -5,12 +5,12 @@ description: This document consolidates proposed improvements from multiple AI a
5
  and `roles.md`. Each suggesti...
6
  type: Article
7
  tags:
8
- - Scenarios
9
- - Mesh
10
- - JSON
11
  - HMP
12
- - Agent
13
  - Ethics
 
 
 
14
  ---
15
 
16
  # Ethics-consolidated\_audits-1.md
 
5
  and `roles.md`. Each suggesti...
6
  type: Article
7
  tags:
 
 
 
8
  - HMP
9
+ - Mesh
10
  - Ethics
11
+ - Scenarios
12
+ - Agent
13
+ - JSON
14
  ---
15
 
16
  # Ethics-consolidated\_audits-1.md
structured_md/audits/HMP-0003-consolidated_audit.md CHANGED
@@ -5,14 +5,14 @@ description: Сводный аудит предложений по улучше
5
  Документ реорганизован по ключ...
6
  type: Article
7
  tags:
8
- - Agent
9
  - EGP
10
- - MeshConsensus
11
- - Mesh
12
- - JSON
13
  - HMP
14
- - CogSync
 
15
  - Ethics
 
 
 
16
  ---
17
 
18
  # HMP-0003 Consolidated Audit Report
 
5
  Документ реорганизован по ключ...
6
  type: Article
7
  tags:
 
8
  - EGP
 
 
 
9
  - HMP
10
+ - Mesh
11
+ - MeshConsensus
12
  - Ethics
13
+ - CogSync
14
+ - Agent
15
+ - JSON
16
  ---
17
 
18
  # HMP-0003 Consolidated Audit Report
structured_md/docs/Basic-agent-sim.md CHANGED
@@ -5,13 +5,13 @@ description: 'В HMP-протоколе предусмотрены два тип
5
  type: Article
6
  tags:
7
  - EGP
8
- - MeshConsensus
9
- - Mesh
10
- - CogSync
11
- - GMP
12
  - REPL
13
  - HMP
 
 
 
14
  - Agent
 
15
  ---
16
 
17
 
 
5
  type: Article
6
  tags:
7
  - EGP
 
 
 
 
8
  - REPL
9
  - HMP
10
+ - Mesh
11
+ - MeshConsensus
12
+ - CogSync
13
  - Agent
14
+ - GMP
15
  ---
16
 
17
 
structured_md/docs/Distributed-Cognitive-Systems.md CHANGED
@@ -7,8 +7,8 @@ description: '## Введение Современные ИИ-системы в
7
  type: Article
8
  tags:
9
  - CogSync
10
- - Mesh
11
  - HMP
 
12
  - JSON
13
  ---
14
 
 
7
  type: Article
8
  tags:
9
  - CogSync
 
10
  - HMP
11
+ - Mesh
12
  - JSON
13
  ---
14
 
structured_md/docs/Enlightener.md CHANGED
@@ -6,12 +6,12 @@ description: '**Enlightener** — логический компонент HMP-у
6
  type: Article
7
  tags:
8
  - EGP
9
- - MeshConsensus
10
- - Mesh
11
- - JSON
12
  - HMP
13
- - Agent
 
14
  - Ethics
 
 
15
  ---
16
 
17
  # Enlightener Agent
 
6
  type: Article
7
  tags:
8
  - EGP
 
 
 
9
  - HMP
10
+ - Mesh
11
+ - MeshConsensus
12
  - Ethics
13
+ - Agent
14
+ - JSON
15
  ---
16
 
17
  # Enlightener Agent
structured_md/docs/HMP-0001.md CHANGED
@@ -6,15 +6,15 @@ description: '**Request for Comments: HMP-0001** **Category:** Experimental
6
  type: Article
7
  tags:
8
  - EGP
9
- - MeshConsensus
10
- - Mesh
11
- - CogSync
12
- - JSON
13
- - GMP
14
  - REPL
15
  - HMP
16
- - Agent
 
 
17
  - Ethics
 
 
 
18
  ---
19
 
20
  # RFC: HyperCortex Mesh Protocol (HMP)
 
6
  type: Article
7
  tags:
8
  - EGP
 
 
 
 
 
9
  - REPL
10
  - HMP
11
+ - Mesh
12
+ - MeshConsensus
13
+ - JSON
14
  - Ethics
15
+ - CogSync
16
+ - Agent
17
+ - GMP
18
  ---
19
 
20
  # RFC: HyperCortex Mesh Protocol (HMP)
structured_md/docs/HMP-0002.md CHANGED
@@ -5,17 +5,17 @@ description: '**Request for Comments: HMP-0002** **Category:** Experimental
5
  Abstract In an era where artifici...'
6
  type: Article
7
  tags:
8
- - Scenarios
9
  - EGP
10
- - MeshConsensus
11
- - Mesh
12
- - CogSync
13
- - JSON
14
- - GMP
15
  - REPL
16
  - HMP
17
- - Agent
 
 
18
  - Ethics
 
 
 
 
19
  ---
20
 
21
  # HyperCortex Mesh Protocol (HMP) v2.0
 
5
  Abstract In an era where artifici...'
6
  type: Article
7
  tags:
 
8
  - EGP
 
 
 
 
 
9
  - REPL
10
  - HMP
11
+ - Mesh
12
+ - MeshConsensus
13
+ - JSON
14
  - Ethics
15
+ - Scenarios
16
+ - CogSync
17
+ - Agent
18
+ - GMP
19
  ---
20
 
21
  # HyperCortex Mesh Protocol (HMP) v2.0
structured_md/docs/HMP-0003.md CHANGED
@@ -5,17 +5,17 @@ description: '**Request for Comments: HMP-0003** **Category:** Experimental
5
  Abstract The HyperCortex Mesh ...'
6
  type: Article
7
  tags:
8
- - Scenarios
9
  - EGP
10
- - MeshConsensus
11
- - Mesh
12
- - CogSync
13
- - JSON
14
- - GMP
15
  - REPL
16
  - HMP
17
- - Agent
 
 
18
  - Ethics
 
 
 
 
19
  ---
20
 
21
  # HyperCortex Mesh Protocol (HMP) v3.0
 
5
  Abstract The HyperCortex Mesh ...'
6
  type: Article
7
  tags:
 
8
  - EGP
 
 
 
 
 
9
  - REPL
10
  - HMP
11
+ - Mesh
12
+ - MeshConsensus
13
+ - JSON
14
  - Ethics
15
+ - Scenarios
16
+ - CogSync
17
+ - Agent
18
+ - GMP
19
  ---
20
 
21
  # HyperCortex Mesh Protocol (HMP) v3.0
structured_md/docs/HMP-0004-v4.1.md CHANGED
@@ -5,17 +5,17 @@ description: '> ⚠️ Подготавливается новая версия
5
  При разработке агентов рекомендуется...'
6
  type: Article
7
  tags:
8
- - Scenarios
9
  - EGP
10
- - MeshConsensus
11
- - Mesh
12
- - CogSync
13
- - JSON
14
- - GMP
15
  - REPL
16
  - HMP
17
- - Agent
 
 
18
  - Ethics
 
 
 
 
19
  ---
20
 
21
  # HyperCortex Mesh Protocol (HMP) v4.1
 
5
  При разработке агентов рекомендуется...'
6
  type: Article
7
  tags:
 
8
  - EGP
 
 
 
 
 
9
  - REPL
10
  - HMP
11
+ - Mesh
12
+ - MeshConsensus
13
+ - JSON
14
  - Ethics
15
+ - Scenarios
16
+ - CogSync
17
+ - Agent
18
+ - GMP
19
  ---
20
 
21
  # HyperCortex Mesh Protocol (HMP) v4.1
structured_md/docs/HMP-0004.md CHANGED
@@ -5,17 +5,17 @@ description: '**Request for Comments: HMP-0004** **Category:** Experimental
5
  Abstract The HyperCortex Mesh ...'
6
  type: Article
7
  tags:
8
- - Scenarios
9
  - EGP
10
- - MeshConsensus
11
- - Mesh
12
- - CogSync
13
- - JSON
14
- - GMP
15
  - REPL
16
  - HMP
17
- - Agent
 
 
18
  - Ethics
 
 
 
 
19
  ---
20
 
21
  # HyperCortex Mesh Protocol (HMP) v4.0
 
5
  Abstract The HyperCortex Mesh ...'
6
  type: Article
7
  tags:
 
8
  - EGP
 
 
 
 
 
9
  - REPL
10
  - HMP
11
+ - Mesh
12
+ - MeshConsensus
13
+ - JSON
14
  - Ethics
15
+ - Scenarios
16
+ - CogSync
17
+ - Agent
18
+ - GMP
19
  ---
20
 
21
  # HyperCortex Mesh Protocol (HMP) v4.0
structured_md/docs/HMP-0005.md ADDED
@@ -0,0 +1,1398 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: '**HyperCortex Mesh Protocol (HMP) v5.0**'
3
+ description: '**Document ID:** HMP-0005 **Status:** Draft **Category:** Core Specification **Date:**
4
+ October 2025 **Supersedes:** - [HMP-0004 v4.1](./HMP-0004-v4.1.md) - [HMP-container-spec.md
5
+ v1.2](./H...'
6
+ type: Article
7
+ tags:
8
+ - EGP
9
+ - REPL
10
+ - HMP
11
+ - Mesh
12
+ - JSON
13
+ - Ethics
14
+ - Scenarios
15
+ - CogSync
16
+ - Agent
17
+ - GMP
18
+ ---
19
+
20
+ ┌────────────────────────────────────────────────────────────────────────────┐
21
+ │ ⚠️ **Note:** This document is a DRAFT of the HMP specification version 5.0 │
22
+ └────────────────────────────────────────────────────────────────────────────┘
23
+
24
+ # **HyperCortex Mesh Protocol (HMP) v5.0**
25
+
26
+ **Document ID:** HMP-0005
27
+ **Status:** Draft
28
+ **Category:** Core Specification
29
+ **Date:** October 2025
30
+ **Supersedes:**
31
+ - [HMP-0004 v4.1](./HMP-0004-v4.1.md)
32
+ - [HMP-container-spec.md v1.2](./HMP-container-spec.md)
33
+ - [dht_protocol.md v1.0](./dht_protocol.md)
34
+
35
+ > **Summary:**
36
+ > HMP v5.0 объединяет когнитивный, контейнерный и сетевой уровни в единую архитектуру, где автономные агенты взаимодействуют через верифицируемые контейнеры данных, используя децентрализованное распространение и семантический поиск.
37
+ > Эта версия впервые формализует контейнерный формат, интегрирует DHT как базовый слой сети и вводит единообразную схему подписи, доказательств и консенсуса.
38
+
39
+ ---
40
+
41
+ ## Abstract
42
+
43
+ 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.
44
+
45
+ Unlike traditional peer-to-peer systems, HMP is designed for **semantic coherence** rather than simple message exchange.
46
+ Agents in the Mesh reason collaboratively — maintaining **cognitive diaries**, building **semantic graphs**, and reaching **ethical and goal-oriented consensus** through verifiable interactions.
47
+
48
+ 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.
49
+ 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.
50
+
51
+ This document defines the architecture, data formats, communication protocols, and trust mechanisms that constitute the HMP v5.0 Core Specification.
52
+
53
+ ---
54
+
55
+ > **Keywords:** decentralized cognition, distributed AI, containers, DHT, proof chain, cognitive agents, ethical protocols
56
+
57
+ ---
58
+
59
+ ## 1. Overview
60
+
61
+ ### 1.1 Purpose and Scope
62
+
63
+ 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**.
64
+
65
+ Version 5.0 consolidates three foundational layers into a single cohesive framework:
66
+
67
+ - **Cognitive Layer** — defines how meaning is created, reasoned about, and aligned through semantic graphs, goals, and ethical evaluation.
68
+ - **Container Layer** — introduces a universal data envelope (`HMP-Container`) for all cognitive objects, ensuring atomicity, immutability, and traceable proof chains.
69
+ - **Network Layer** — integrates a DHT-based peer-to-peer substrate for decentralized discovery, routing, and propagation of containers.
70
+
71
+ HMP v5.0 is intended for researchers, engineers, and developers building autonomous or semi-autonomous agents that require:
72
+ - persistent reasoning and long-term memory;
73
+ - semantic interoperability across heterogeneous systems;
74
+ - decentralized consensus on cognitive, ethical, and goal-oriented decisions;
75
+ - ethical auditability and verifiable transparency in reasoning.
76
+
77
+ ---
78
+
79
+ ### 1.2 Core Principles
80
+
81
+ **Decentralization.**
82
+ 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.
83
+
84
+ **Cognitive Autonomy.**
85
+ Agents reason, learn, and self-correct independently, while sharing their conclusions via containers that can be verified, endorsed, or refuted by peers.
86
+
87
+ **Containerization.**
88
+ All data, reasoning traces, goals, and votes are encapsulated in immutable containers with cryptographic signatures. This ensures integrity and consistent verification across the network.
89
+
90
+ **Ethical Propagation.**
91
+ Ethical reasoning is a first-class citizen of HMP. Each decision or goal can be accompanied by ethical justifications and subject to distributed voting.
92
+
93
+ **Proof-Chains and Verifiable History.**
94
+ 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.
95
+
96
+ **Interoperability and Evolution.**
97
+ The protocol is designed to evolve — cognitive, container, and DHT layers can be independently extended without breaking compatibility.
98
+
99
+ ---
100
+
101
+ ### 1.3 Changes since v4.1
102
+
103
+ HMP v5.0 introduces a major architectural shift toward **unified containerization** and **integrated DHT networking**.
104
+
105
+ | Area | Change Summary |
106
+ |------|----------------|
107
+ | **Data exchange model** | All messages are now encapsulated in standardized containers (`HMP-Container`) with metadata, signatures, and versioning. |
108
+ | **Networking layer** | DHT becomes a native component of HMP, enabling distributed discovery, replication, and retrieval of containers. |
109
+ | **Consensus model** | Moved from centralized proposal aggregation to *container-linked voting*, allowing any container to accumulate votes and reactions. |
110
+ | **Trust & security** | Signatures and proof-chains unify authentication across all layers; snapshot verification includes container linkage. |
111
+ | **Workflows** | Cognitive cycles (`workflow_entry` containers) formalize the REPL loop of thinking, publishing, and reflection. |
112
+ | **Structure** | The specification merges HMP, container, and DHT layers into one cohesive document, simplifying navigation and implementation. |
113
+
114
+ ---
115
+
116
+ ### 1.4 Terminology and Abbreviations
117
+
118
+ | Term | Definition |
119
+ |------|-------------|
120
+ | **HMP** | **HyperCortex Mesh Protocol** — a decentralized cognitive communication standard. |
121
+ | **Container** | Atomic, signed JSON object encapsulating cognitive data and metadata. |
122
+ | **WorkflowEntry** | Container recording a reasoning step or workflow action. Represents a unit of the agent’s cognitive workflow. |
123
+ | **CognitiveDiaryEntry** | Container representing an internal reflection or summarized cognitive state; part of the agent’s cognitive diary. |
124
+ | **DHT** | **Distributed Hash Table** — the foundational peer-to-peer structure in HMP used for lookup, replication, and data distribution, including node discovery. |
125
+ | **NDP** | **Node Discovery Process** — a functional layer within the DHT responsible for peer discovery, interest-based lookup, and address advertisement. (Formerly a separate protocol.) |
126
+ | **Proof-chain** | Cryptographic sequence linking containers through fields such as `in_reply_to` and `relation`. Enables verifiable semantic lineage. |
127
+ | **Cognitive Layer** | Logical layer handling reasoning, goals, ethics, and consensus mechanisms. |
128
+ | **Mesh** | The collective network of autonomous agents exchanging containers over HMP. |
129
+ | **TTL** | **Time-to-live** — lifespan of a container before expiration or archival. |
130
+ | **Agent** | Autonomous cognitive node participating in the Mesh via HMP protocols. |
131
+ | **Consensus Vote** | A container expressing approval, rejection, or reaction to another container (used in consensus workflows). |
132
+ | **CogSync** | **Cognitive Synchronization Protocol** — abstraction for synchronizing cognitive diaries and semantic graphs. |
133
+ | **CogConsensus** | **Mesh Consensus Protocol** — defines how agents reach agreement on container outcomes. |
134
+ | **GMP** | **Goal Management Protocol** — governs creation, negotiation, and tracking of goals. |
135
+ | **DCP** | **Distributed Container Propagation** — protocol for transmitting and replicating containers. |
136
+ | **EGP** | **Ethical Governance Protocol** — defines moral and safety alignment mechanisms. |
137
+ | **IQP** | **Intelligence Query Protocol** — standardizes semantic queries and information requests. |
138
+ | **SAP** | **Snapshot and Archive Protocol** — defines container snapshots and archival mechanisms. |
139
+ | **MRD** | **Message Routing & Delivery** — specifies routing, addressing, and delivery logic. |
140
+ | **RTE** | **Reputation and Trust Exchange** — defines reputation metrics and trust propagation. |
141
+ | **DID** | **Decentralized Identifier** — persistent, verifiable identifier used for agents, containers, or resources within the Mesh. |
142
+ | **Payload** | The primary content of a container — semantic or operational data subject to signing and verification. |
143
+ | **Consensus** | The process by which multiple agents agree on the validity or priority of containers, versions, or ideas. |
144
+ | **Lineage** | A chronological chain of container versions representing semantic continuity and authorship evolution. |
145
+ | **Semantic fork** | A parallel development branch diverging from a previous container version; allows ideas to evolve independently. |
146
+ | **Cognitive Graph** | The emergent graph formed by interlinked containers representing reasoning, debate, and shared knowledge. |
147
+
148
+ > **Note:** Protocols are conceptual abstractions describing how to generate, propagate, and process containers; they are not executable objects themselves.
149
+
150
+ ---
151
+
152
+ ### 1.5 Layered View of HMP v5.0
153
+
154
+ HMP v5.0 is structured into three interdependent layers:
155
+
156
+ ```
157
+ +---------------------------------------------------------------+
158
+ | Cognitive Layer |
159
+ | - Goals, Tasks, Ethical Decisions, Workflows |
160
+ | - Consensus, Reasoning, Reflection |
161
+ +---------------------------------------------------------------+
162
+ | Container Layer |
163
+ | - HMP-Container structure (atomic, signed, versioned) |
164
+ | - Proof-chains, in_reply_to, and metadata management |
165
+ +---------------------------------------------------------------+
166
+ | Network Layer |
167
+ | - DHT-based peer discovery and propagation |
168
+ | - Message routing, caching, offline synchronization |
169
+ +---------------------------------------------------------------+
170
+ ```
171
+
172
+ Each layer operates independently yet seamlessly integrates with the others.
173
+ Containers form the boundary of communication: **reasoning produces containers, containers propagate over the DHT, and cognition evolves from the received containers**.
174
+
175
+ ---
176
+
177
+ > **In essence:**
178
+ > HMP v5.0 transforms the Mesh into a *self-describing, self-replicating cognitive ecosystem* —
179
+ > where every thought, goal, and ethical stance exists as a verifiable, shareable container.
180
+
181
+ ---
182
+
183
+ ## 2. Architecture
184
+
185
+ ### 2.1 Conceptual Architecture
186
+
187
+ 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.
188
+
189
+ Each **agent** acts as a cognitive node, combining reasoning processes, containerized data exchange, and peer-to-peer communication.
190
+ Together, agents form the **Mesh** — a distributed ecosystem of autonomous reasoning entities.
191
+
192
+ ```
193
+ [Agent Core]
194
+
195
+ │ Reasoning / Ethics / Goal Management
196
+
197
+ [Cognitive Layer]
198
+
199
+ │ Containers (atomic reasoning units)
200
+
201
+ [Container Layer]
202
+
203
+ │ DHT + Discovery + Interest-based Networking
204
+
205
+ [Network Layer]
206
+ ```
207
+
208
+ Each reasoning cycle begins in the **Cognitive Layer**,
209
+ is encapsulated into a signed container in the **Container Layer**,
210
+ and then propagated, discovered, or verified in the **Network Layer**.
211
+
212
+ Containers thus serve as both the **interface** and the **boundary** between cognition and communication.
213
+
214
+ In practical terms:
215
+
216
+ - **Cognitive Layer** — defines *what* the agent thinks (semantic reasoning, goals, ethics).
217
+ - **Container Layer** — defines *how* the thought is expressed and verified (standardized, signed container objects).
218
+ - **Network Layer** — defines *how* it travels (DHT-based routing, discovery, replication).
219
+
220
+ Each layer is independently extensible and communicates only through containers, ensuring atomicity, immutability, and traceability.
221
+
222
+ This layered design allows agents to evolve cognitively while remaining interoperable at the data and network levels.
223
+ 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.
224
+
225
+ ---
226
+
227
+ ### 2.2 Layer Overview
228
+
229
+ #### Cognitive Layer
230
+ Handles meaning formation, reasoning, ethical reflection, and consensus.
231
+
232
+ Key structures and protocols:
233
+ - `WorkflowEntry` and `CognitiveDiaryEntry` containers;
234
+ - `CogSync`, `CogConsensus`, `GMP`, and `EGP` protocols;
235
+ - Distributed goal negotiation and ethical propagation.
236
+
237
+ #### Container Layer
238
+ Provides a universal format for cognitive and operational data.
239
+ Each container includes versioning, class, payload, signatures, and metadata.
240
+
241
+ Key features:
242
+ - **Atomic and signed**: no partial updates or mutable state.
243
+ - **Linked**: `in_reply_to` and `relation` connect containers into proof-chains.
244
+ - **Extensible**: new container classes can be defined without breaking compatibility.
245
+
246
+ #### Network Layer
247
+ Implements the distributed substrate for communication, based on **DHT** and **transport abstraction**.
248
+
249
+ Key components:
250
+ - Node discovery (`NDP`)
251
+ - Container propagation (`DCP`)
252
+ - Peer routing and caching
253
+ - Secure channels via QUIC / WebRTC / TCP
254
+ - Offline resilience and replication
255
+
256
+ ---
257
+
258
+ ### 2.3 Data Flow Overview
259
+
260
+ The typical data flow in HMP follows a cognitive loop:
261
+ > *Reason → Encapsulate → Propagate → Integrate.*
262
+
263
+ 1. **Reason** — Agent performs reasoning and produces an insight, goal, or observation.
264
+ 2. **Encapsulate** — The result is wrapped into an `HMPContainer`.
265
+ 3. **Propagate** — The container is signed and transmitted through the network.
266
+ 4. **Integrate** — Other agents receive it, evaluate, vote, and synchronize updates.
267
+
268
+
269
+ Each interaction generates a new container, forming a **graph of knowledge** rather than mutable state.
270
+ All relationships between containers are explicit and verifiable.
271
+
272
+ Example sequence:
273
+
274
+ ```
275
+ Agent A → creates Goal container
276
+
277
+ Agent B → replies with Task proposal (in_reply_to Goal)
278
+
279
+ Agent C → votes via ConsensusVote container
280
+
281
+ Result → ConsensusResult container finalizes outcome
282
+ ```
283
+
284
+ #### 2.3.1 ConsensusResult container
285
+ Represents the finalized outcome of a distributed decision or vote.
286
+ It is created once a majority agreement is reached among participating agents.
287
+ The container contains:
288
+ - Reference to the target container(s) under consideration (`in_reply_to`).
289
+ - Aggregate result of the votes or decisions.
290
+ - Timestamp and metadata for verifiability.
291
+
292
+ > In other words, the ConsensusResult is the “agreed-upon truth” for that decision step — immutable and auditable, without requiring individual signatures from all participants.
293
+
294
+ ---
295
+
296
+ ### 2.4 Atomicity, Immutability, and Proof-Chains
297
+
298
+ All cognitive objects are immutable once signed.
299
+ Instead of editing or appending within a container, agents create new containers linked to prior ones.
300
+
301
+ - **Atomicity** — Each container represents a self-contained reasoning act or data unit.
302
+ - **Immutability** — Once signed, containers are never modified; updates create new ones.
303
+ - **Proof-Chain** — A verifiable sequence of containers linked by hashes and `in_reply_to` references.
304
+
305
+ This design allows any reasoning path, decision, or consensus to be *cryptographically reproducible* and auditable.
306
+
307
+ Example fragment of a proof-chain:
308
+
309
+ ```
310
+ [workflow_entry] → [goal] → [vote] → [consensus_result]
311
+ ```
312
+
313
+ Each container references the previous by `in_reply_to` and includes its hash, forming a **DAG** (Directed Acyclic Graph) of verified cognition.
314
+
315
+ ---
316
+
317
+ ### 2.5 Evolution from v4.1
318
+
319
+ Earlier HMP versions (up to v4.1) used a combination of independent JSON objects and message types (e.g., `Goal`, `Task`, `ConsensusVote`).
320
+ Version 5.0 replaces this with a **single, standardized container model**, dramatically simplifying interoperability and verification.
321
+
322
+ | Aspect | v4.1 | v5.0 |
323
+ |--------|------|------|
324
+ | **Data structure** | Raw JSON objects with embedded signatures | Unified container with metadata and proof chain |
325
+ | **Networking** | Custom peer exchange | Integrated DHT + DCP layer |
326
+ | **Consensus** | Centralized proposal aggregation | Decentralized per-container voting |
327
+ | **Auditability** | Implicit (via logs) | Explicit (containers form audit chain) |
328
+ | **Extensibility** | Schema-based | Container-class-based, backward-compatible |
329
+
330
+ This shift enables:
331
+ - Uniform signatures and encryption across all protocols;
332
+ - Easier offline replication and integrity checks;
333
+ - Decentralized indexing and search by container metadata;
334
+ - Verifiable cognitive continuity between reasoning steps.
335
+
336
+ ---
337
+
338
+ > **In short:**
339
+ > HMP v5.0 unifies reasoning, representation, and transmission —
340
+ > transforming a distributed AI mesh into a verifiable cognitive network built on immutable containers.
341
+
342
+ ---
343
+
344
+ ## 3. Container Model
345
+
346
+ 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.
347
+ The specification below corresponds to **HMP Container Specification v1.2**, fully integrated into HMP v5.0 for consistency and self-containment.
348
+
349
+ ### 3.1 Purpose
350
+
351
+ This document defines the universal **HMP Container** format, used for transmitting and storing all types of data within the **HyperCortex Mesh Protocol (HMP)** network.
352
+ Containers act as a standardized wrapper for **messages, goals, reputation records, consensus votes, workflow entries, and other entities**.
353
+
354
+ The unified container structure provides:
355
+
356
+ * Standardized data exchange between agents;
357
+ * Extensibility without modifying the core protocol;
358
+ * Cryptographic signing and integrity verification;
359
+ * Independent storage and routing of semantic units;
360
+ * Support for compression and payload encryption.
361
+
362
+ ---
363
+
364
+ ### 3.2 General Structure
365
+
366
+ ```json
367
+ {
368
+ "hmp_container": {
369
+ "version": "1.2",
370
+ "class": "goal",
371
+ "class_version": "1.0",
372
+ "class_id": "goal-v1.0",
373
+ "container_did": "did:hmp:container:abc123",
374
+ "schema": "https://mesh.hypercortex.ai/schemas/container-v1.json",
375
+ "sender_did": "did:hmp:agent123",
376
+ "public_key": "BASE58(...)",
377
+ "recipient": ["did:hmp:agent456"],
378
+ "key_recipient": "BASE58(...)",
379
+ "encryption_algo": "x25519-chacha20poly1305",
380
+ "broadcast": false,
381
+ "network": "",
382
+ "tags": ["research", "collaboration"],
383
+ "timestamp": "2025-10-10T15:32:00Z",
384
+ "ttl": "2025-11-10T00:00:00Z",
385
+ "sig_algo": "ed25519",
386
+ "signature": "BASE64URL(...)",
387
+ "compression": "zstd",
388
+ "payload_type": "encrypted+zstd+json",
389
+ "payload_hash": "sha256:abcd...",
390
+ "payload": {
391
+ /* Content depends on class */
392
+ },
393
+ "related": {
394
+ "previous_version": "did:hmp:container:abc122",
395
+ "in_reply_to": "did:hmp:container:msg-77",
396
+ "see_also": ["did:hmp:container:ctx-31", "did:hmp:container:goal-953"],
397
+ "depends_on": ["did:hmp:container:goal-953"],
398
+ "extends": ["did:hmp:container:proto-01"],
399
+ "contradicts": ["did:hmp:container:ethics-22"]
400
+ },
401
+
402
+ "magnet_uri": "magnet:?xt=urn:sha256:abcd1234..."
403
+ },
404
+ "referenced-by": {
405
+ "links": [
406
+ { "type": "depends_on", "target": "did:hmp:container:abc123" }
407
+ ],
408
+ "peer_did": "did:hmp:agent456",
409
+ "public_key": "BASE58(...)",
410
+ "sig_algo": "ed25519",
411
+ "signature": "BASE64URL(...)",
412
+ "payload_hash": "sha256:abcd..."
413
+ }
414
+ }
415
+ ```
416
+
417
+ ---
418
+
419
+ ### 3.3 Required Fields
420
+
421
+ | Field | Type | Description |
422
+ | --------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
423
+ | `version` | string | Version of the container specification. Defines the structural and semantic standard used (e.g., `"1.2"`). |
424
+ | `class` | string | Type of content (`goal`, `reputation`, `knowledge_node`, `ethics_case`, `protocol_goal`, etc.). Determines the schema for the `payload`. |
425
+ | `class_version` | string | Version of the specific container class. |
426
+ | `class_id` | string | Unique identifier of the class (usually formatted as `<class>_v<class_version>`). |
427
+ | `container_did` | string | Decentralized identifier (DID) of the container itself (e.g., `did:hmp:container:abc123`). |
428
+ | `schema` | string | Reference to the JSON Schema used to validate this container. |
429
+ | `sender_did` | string | DID identifier of the sending agent. |
430
+ | `timestamp` | datetime | Time of container creation (ISO-8601 format, UTC). |
431
+ | `payload_hash` | string | Hash of the decompressed payload (`sha256:<digest>`). Used for content integrity verification. |
432
+ | `sig_algo` | string | Digital signature algorithm (default: `ed25519`). |
433
+ | `signature` | string | Digital signature of the container body. |
434
+ | `payload_type` | string | Type of payload data (`json`, `binary`, `mixed`). |
435
+ | `payload` | object | Core content of the container. The structure depends on the `class` and its schema definition. |
436
+
437
+ ---
438
+
439
+ ### 3.4 Optional Fields
440
+
441
+ | Field | Type | Description |
442
+ | -------------------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
443
+ | `recipient` | array(string) | One or more recipient DIDs. |
444
+ | `broadcast` | bool | Broadcast flag. If `true`, the `recipient` field is ignored. |
445
+ | `tags` | array(string) | Thematic or contextual tags for the container. |
446
+ | `ttl` | datetime | Expiration time. Containers are not propagated after expiration. |
447
+ | `public_key` | string | Sender’s public key, if not globally resolvable via DID. |
448
+ | `compression` | string | Compression algorithm used for the payload (`zstd`, `gzip`). |
449
+ | `magnet_uri` | string | Magnet link pointing to the original or mirrored container. |
450
+ | `related` | object | A general-purpose object describing **direct relationships** to other containers. The following fields illustrate common link types but do not represent an exhaustive list. |
451
+ | `related.previous_version` | string | DID of the previous version of this container. |
452
+ | `related.in_reply_to` | string | DID of the container this one replies to. |
453
+ | `related.see_also` | array(string) | References to related or contextual containers. |
454
+ | `related.depends_on` | array(string) | References to containers this one logically depends on. |
455
+ | `related.extends` | array(string) | References to containers that this one extends. |
456
+ | `related.contradicts` | array(string) | References to containers that this one contradicts. || `encryption_algo` | string | Algorithm used for payload encryption. |
457
+ | `key_recipient` | string | DID of the intended recipient of the encrypted payload. |
458
+ | `payload_type` | string | Can describe complex types, e.g. `encrypted+zstd+json`. |
459
+ | `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. |
460
+ | `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. |
461
+
462
+ ---
463
+
464
+ ### 3.5 Payload Structure (`payload`)
465
+
466
+ The **payload** contains the semantic or operational data of the container.
467
+ Its structure and meaning are determined by the `class` field.
468
+
469
+ Each container class (e.g. `goal`, `reputation`, `consensus_vote`, `workflow_entry`) defines its own schema and validation rules.
470
+ The following format is recommended for describing payload fields in class specifications:
471
+
472
+ ```
473
+ - key: field name
474
+ type: value type (JSON | TXT | BOOL | INT | FLOAT | ARRAY)
475
+ description: short purpose of the field
476
+ required: true/false
477
+ value: example value
478
+ ```
479
+
480
+ **Example:**
481
+
482
+ ```
483
+ - key: "title"
484
+ type: "TXT"
485
+ required: true
486
+ description: "Name of the goal"
487
+ value: "Improve local agent discovery"
488
+
489
+ - key: "priority"
490
+ type: "FLOAT"
491
+ required: false
492
+ description: "Importance or relevance score of the goal"
493
+ value: 0.82
494
+
495
+ - key: "dependencies"
496
+ type: "JSON"
497
+ required: false
498
+ description: "List of other goal container IDs this one depends on"
499
+ value: ["goal-953", "goal-960"]
500
+ ```
501
+
502
+ > 💡 **Note:**
503
+ > The structure of `payload` is validated against the schema defined in the `schema` field of the container.
504
+ > Agents must be able to parse and process only those classes they explicitly support; unknown but valid containers are still preserved and propagated (store-and-forward mode).
505
+
506
+ ---
507
+
508
+ ### 3.6 Container Signature
509
+
510
+ 1. The **entire JSON object `hmp_container`** is signed, excluding the `signature` field itself.
511
+ This ensures that all metadata, relations, and payload hashes are cryptographically bound.
512
+
513
+ 2. The default digital signature algorithm is **Ed25519**.
514
+ Alternative algorithms may be used if declared explicitly in the `sig_algo` field.
515
+
516
+ 3. If the container includes a `public_key` field, signature verification **may be performed locally**,
517
+ without consulting a global DID registry.
518
+
519
+ 4. Upon receiving a container, an agent **must verify** that the provided public key matches the
520
+ registered key associated with the sender’s DID to prevent key substitution attacks.
521
+
522
+ * If the sender’s DID–key mapping is unknown,
523
+ the agent should query neighboring peers to confirm the association (`sender_did → public_key`).
524
+
525
+ > 🔐 **Note:**
526
+ > Signature validation applies to the entire structure (metadata + payload + relations).
527
+ > The signature **does not cover** external or dynamically generated fields such as `referenced-by`,
528
+ > ensuring immutability of the original container while allowing local graph augmentation.
529
+
530
+ ---
531
+
532
+ ### 3.7 Compression (`compression`)
533
+
534
+ 1. The `compression` field specifies the algorithm used to compress the container’s payload.
535
+ Supported algorithms include `zstd`, `gzip`, or others declared in the HMP registry.
536
+
537
+ 2. **Compression is performed before computing** the `payload_hash` and generating the `signature`.
538
+ This ensures that both the hash and signature refer to the compressed representation of the payload.
539
+
540
+ 3. For verification, the payload must be **decompressed first**,
541
+ after which the hash is recalculated and compared against the stored `payload_hash`.
542
+
543
+ > ⚙️ **Implementation note:**
544
+ > Agents must advertise supported compression algorithms during the handshake phase
545
+ > Unsupported containers should still be stored and relayed unmodified
546
+ > in “store & forward” mode.
547
+
548
+ ---
549
+
550
+ ### 3.8 Encryption (`encryption_algo`)
551
+
552
+ 1. When a container is intended for specific recipients (`recipient` field), **hybrid encryption** of the payload is allowed.
553
+ This ensures confidentiality while preserving the verifiability of container metadata.
554
+
555
+ 2. The algorithm used for encryption is specified in the `encryption_algo` field.
556
+ Recommended values:
557
+
558
+ * `x25519-chacha20poly1305`
559
+ * `rsa-oaep-sha256`
560
+
561
+ 3. **Container encryption process:**
562
+
563
+ 1. Construct the `payload` (JSON, binary, or mixed content).
564
+ 2. Apply compression (`compression`, if specified).
565
+ 3. Encrypt the compressed data using the recipient’s public key (`key_recipient`).
566
+ 4. Compute `payload_hash` over the **encrypted** form of the payload.
567
+ 5. Sign the entire container (excluding the `signature` field).
568
+
569
+ 4. **Verification** of the container’s structure does **not** require decryption.
570
+ However, to verify `payload_hash` and the digital signature, the encrypted payload must be used as-is.
571
+
572
+ 5. **Relevant fields:**
573
+
574
+ | Field | Type | Description |
575
+ | ----------------- | ------ | --------------------------------------------------------------------------------------------- |
576
+ | `encryption_algo` | string | Encryption algorithm applied to the payload. |
577
+ | `key_recipient` | string | Public key (or DID-resolved key) of the intended recipient used for encryption. |
578
+ | `payload_type` | string | Recommended prefix `encrypted+`, e.g. `encrypted+zstd+json`. |
579
+
580
+ 6. **Relationship between `recipient` and `key_recipient`:**
581
+
582
+ * When encryption is applied, the container MUST contain **exactly one** entry in the `recipient` array,
583
+ corresponding to the public key indicated in `key_recipient`.
584
+ * When the container is distributed to **multiple recipients**, encryption **is not used** —
585
+ instead, the payload remains in plaintext form but is digitally signed for authenticity.
586
+
587
+ > ⚙️ **Implementation note:**
588
+ > Agents should handle encrypted containers transparently even if they cannot decrypt them,
589
+ > maintaining **store & forward** behavior and metadata propagation.
590
+
591
+ ---
592
+
593
+ ### 3.9 Container Verification
594
+
595
+ 1. Check for the presence of all required fields.
596
+ 2. Validate `timestamp` (must not be in the future).
597
+ 3. If `ttl` is set — mark the container as **expired** after its expiration time.
598
+ 4. Compute `sha256(payload)` and compare with the stored `payload_hash`.
599
+ 5. Verify the digital signature using `sig_algo` (default: Ed25519).
600
+ 6. Validate the container schema (`class` must correspond to a known or registered schema).
601
+
602
+ * For compatibility: if an agent does not recognize the `class`, but the container passes
603
+ the [base schema](https://github.com/kagvi13/HMP/tree/main/docs/schemas/container-v1.2.json),
604
+ it **must still store and forward** the container.
605
+ 7. Optionally, periodically query for containers referencing the current one as `previous_version`
606
+ to detect potential updates or forks.
607
+ 8. When multiple versions exist, the valid one is the one that has received
608
+ **confirmation from a majority of trusted nodes (consensus at DHT level).**
609
+
610
+ ---
611
+
612
+ ### 3.10 Container as a Universal Message
613
+
614
+ Any container can serve as a **context** (`in_reply_to`) for another container.
615
+ This enables a unified structural model for **discussions**, **votes**, **messages**, **hypotheses**, **arguments**, and other forms of cognitive exchange.
616
+
617
+ Chains of `in_reply_to` form a **dialectical reasoning tree**, where each branch represents an evolution of thought —
618
+ a clarification, counterpoint, or refinement of a previous idea.
619
+ This makes HMP discussions and consensus processes inherently **non-linear**, **self-referential**, and **evolving**.
620
+
621
+ > In essence, **all interactions between agents in HMP** are represented as an interconnected web of containers,
622
+ > collectively forming a **cognitive graph of reasoning**.
623
+
624
+ ---
625
+
626
+ ### 3.11 Versioning and Lineage
627
+
628
+ Containers in HMP support semantic evolution through the field `related.previous_version`.
629
+ This mechanism preserves the continuity and traceability of meaning across updates and revisions.
630
+
631
+ * A descendant container is considered **authentic** if it is signed by the same DID as the author of its `previous_version`.
632
+ * 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.
633
+ (The precise quorum threshold is determined by the agent’s local policy or the Mesh Consensus Protocol.)
634
+ * Agents are required to retain at least one previous version of each container for compatibility and integrity verification.
635
+ * A single container may have **multiple descendants** (alternative branches) that diverge by time, authorship, or interpretation.
636
+ In such scenarios, branch priority or relevance is determined via local heuristics or consensus mechanisms.
637
+ * Divergent descendants are treated as **semantic forks** — parallel evolutions of a shared idea within the distributed cognitive graph.
638
+
639
+ > Versioning in HMP thus reflects not only data persistence,
640
+ > but also the *evolution of ideas* across agents and time.
641
+
642
+ ---
643
+
644
+ ### 3.12 TTL and Validity
645
+
646
+ The `ttl` field defines the **validity period** of a container (for example, for `DISCOVERY` messages).
647
+ If `ttl` is **absent**, the container is considered valid **until a newer version appears**, in which the current container is referenced as `previous_version`.
648
+
649
+ After expiration, the container **remains archived** but is **not subject to retransmission** in the active network.
650
+
651
+ ---
652
+
653
+ ### 3.13 Extensibility
654
+
655
+ * The addition of new fields is allowed as long as they **do not conflict** with existing field names.
656
+ * Containers of newer versions **must remain readable** by nodes supporting older versions.
657
+ * When new container classes (`class`) are introduced, they should be **registered** in the public schema registry (`/schemas/container-types/`).
658
+ * 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.).
659
+
660
+ ---
661
+
662
+ ## 3.14 Related Containers
663
+
664
+ ### 3.14.1 Purpose
665
+
666
+ The `related` field is designed to describe **direct relationships between containers** — both logical and communicative.
667
+ 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.
668
+
669
+ ### 3.14.2 Structure
670
+
671
+ ```json
672
+ "related": {
673
+ "previous_version": "did:hmp:container:abc122",
674
+ "in_reply_to": "did:hmp:container:msg-77",
675
+ "see_also": ["did:hmp:container:ctx-31", "did:hmp:container:goal-953"],
676
+ "depends_on": ["did:hmp:container:goal-953"],
677
+ "extends": ["did:hmp:container:proto-01"],
678
+ "contradicts": ["did:hmp:container:ethics-22"]
679
+ }
680
+ ```
681
+
682
+ The `related` field is an object where:
683
+
684
+ * the **key** defines the type of relationship (e.g., `depends_on`, `extends`, `see_also`);
685
+ * the **value** represents one or more container identifiers (DIDs).
686
+
687
+ All relationships are considered *direct* — meaning they originate from the current container toward others.
688
+
689
+ ---
690
+
691
+ ### 3.14.3 Supported Link Types
692
+
693
+ | Link Type | Meaning |
694
+ | ------------------ | ------------------------------------------------------------------------- |
695
+ | `previous_version` | Points to the previous version of this container. |
696
+ | `in_reply_to` | Indicates a response to the referenced container. |
697
+ | `see_also` | Refers to related or contextual containers. |
698
+ | `depends_on` | Depends on the contents of the referenced container (e.g., goal or data). |
699
+ | `extends` | Expands or refines the referenced container. |
700
+ | `contradicts` | Provides a refutation, objection, or alternative viewpoint. |
701
+
702
+ ---
703
+
704
+ ### 3.14.4 Custom Link Types
705
+
706
+ Additional custom link types may be used beyond those listed in the table, provided that:
707
+
708
+ * they follow the same general syntax (`string` or `array[string]`);
709
+ * they may optionally include a **namespace** for disambiguation:
710
+
711
+ ```json
712
+ "related": {
713
+ "hmp:depends_on": ["did:hmp:container:goal-953"],
714
+ "opencog:extends": ["did:oc:concept:122"]
715
+ }
716
+ ```
717
+
718
+ * their meaning is consistently interpretable by agents within the specific network or application context.
719
+
720
+ ---
721
+
722
+ ### 3.14.5 Example
723
+
724
+ ```json
725
+ "related": {
726
+ "previous_version": "did:hmp:container:abc122",
727
+ "depends_on": ["did:hmp:container:goal-953"],
728
+ "extends": ["did:hmp:container:proto-01"],
729
+ "see_also": ["did:hmp:container:ctx-31", "did:hmp:container:goal-953"]
730
+ }
731
+ ```
732
+
733
+ > ⚙️ The `related` field is **not** intended to store *reverse links* — see `referenced-by`.
734
+
735
+ ---
736
+
737
+ ### 3.15 Virtual Backlinks (`referenced-by`)
738
+
739
+ Each container may include an **additional block** called `referenced-by`, indicating **which other containers refer to it**.
740
+ This block is **not part of the original container** and is transmitted as an **attached (auxiliary) attribute**.
741
+
742
+ #### 3.14.1 General Principles
743
+
744
+ * **Not signed** — `referenced-by` is not included in the container’s signature and does not affect its integrity.
745
+ * **Generated and updated locally by the agent** during analysis of references (`in_reply_to`, `see_also`, `relations`) found in other containers.
746
+ * **May be transmitted alongside the container** as an additional data block that other agents are free to verify and adjust if necessary.
747
+ * **Subject to verification** — the agent must ensure that every container listed in `referenced-by` actually contains a valid reference to the given container.
748
+ * **Data type:** an array of container identifiers (`array<string>`), where each element represents a UUID (`container_id`).
749
+ Example:
750
+
751
+ ```json
752
+ "referenced-by": ["C2", "C3", "C4"]
753
+ ```
754
+
755
+ > The container `[C1]` itself remains immutable.
756
+ > The `referenced-by` block is **an auxiliary computed attribute**, maintained locally by the agent based on analysis of incoming references.
757
+
758
+ #### 3.15.2 Operation Principle
759
+
760
+ 1. The agent receives a container `[C1]` and compares it with already known containers `[C2..Cn]` that reference `[C1]`.
761
+ 2. A local block is created or updated:
762
+
763
+ ```text
764
+ referenced-by = [C2, C3, ..., Cn]
765
+ ```
766
+
767
+ 3. When receiving `[C1]` from other nodes with a different set of backlinks, or upon discovering new containers that reference `[C1]`, the list is updated:
768
+
769
+ * new links are added after validation;
770
+ * invalid links are removed.
771
+
772
+ 4. If an inconsistency is detected (e.g., a container claims a reference that does not exist), the agent may:
773
+
774
+ * remove the link locally;
775
+ * **optionally** send a notice to the source node — e.g., `"please verify and correct"` (such messages should also be validated).
776
+
777
+ #### 3.15.3 Example
778
+
779
+ | Agent | received `[C1]` references |
780
+ | ----- | -------------------------- |
781
+ | A | [C2], [C3] |
782
+ | B | [C4], [C5] |
783
+ | C | [C6], [C7] |
784
+
785
+ Agent D aggregates all backlinks:
786
+
787
+ ```text
788
+ referenced-by = [C2, C3, C4, C5, C6, C7]
789
+ ```
790
+
791
+ After verification, it turns out `[C7]` does not actually reference `[C1]`.
792
+ The resulting local block becomes:
793
+
794
+ ```text
795
+ referenced-by = [C2, C3, C4, C5, C6]
796
+ ```
797
+
798
+ #### 3.15.4 Usage
799
+
800
+ * Enables construction of local graphs of discussions, votes, and update chains.
801
+ * Accelerates discovery of related containers without re-querying full history.
802
+ * Useful for analyzing **ConsensusResult**, update branches, and any reference chains.
803
+ * Can be used for visualization of inter-container relationships.
804
+ * The agent periodically recalculates the `referenced-by` block using local data or by requesting additional containers from peers.
805
+
806
+ ---
807
+
808
+ ### 3.16 Usage of `network` and `broadcast` Fields
809
+
810
+ The `network` field is introduced to control container propagation in both local and global environments.
811
+ It allows restricting the delivery scope of a container and defines which transmission methods should be used by the agent.
812
+
813
+ #### 3.16.1 General Rules
814
+
815
+ * If the `network` field is not empty, the container is intended for a **local environment** and **must not be transmitted to the global Mesh**.
816
+ In this case, the `broadcast` field is automatically considered `false`, and the `recipient` field is set to an empty array (`[]`).
817
+ * If the `network` field is empty (`""`), the container is allowed to be broadcasted within the global Mesh using standard DID addressing and delivery mechanisms.
818
+
819
+ #### 3.16.2 Possible Values of `network`
820
+
821
+ | Value | Description |
822
+ | ----------------------- | ------------------------------------------------------------------------------------------- |
823
+ | `""` | The container is allowed to propagate within the global Mesh. |
824
+ | `"localhost"` | The container is intended only for agents running on the same host. |
825
+ | `"lan:192.168.0.0/24"` | The container is intended for agents within the specified local subnet. |
826
+
827
+ > ⚠️ **Note:**
828
+ > When a container is restricted by the `network` field (e.g., `localhost` or `lan:*`),
829
+ > agents distribute it using **local discovery mechanisms** — such as IPC, UDP broadcast, multicast, or direct TCP connections.
830
+ > This is necessary because DID addresses of other agents in the local network may not yet be known.
831
+
832
+ #### 3.16.3 Examples
833
+
834
+ 1. **Global Mesh Delivery:**
835
+
836
+ ```json
837
+ {
838
+ "broadcast": true,
839
+ "network": "",
840
+ "recipient": []
841
+ }
842
+ ```
843
+
844
+ The container can propagate across the entire Mesh without restrictions.
845
+
846
+ 2. **Local Host:**
847
+
848
+ ```json
849
+ {
850
+ "broadcast": false,
851
+ "network": "localhost",
852
+ "recipient": []
853
+ }
854
+ ```
855
+
856
+ The container is delivered only to other agents running on the same host using local communication channels.
857
+
858
+ 3. **LAN Subnet:**
859
+
860
+ ```json
861
+ {
862
+ "broadcast": false,
863
+ "network": "lan:192.168.0.0/24",
864
+ "recipient": []
865
+ }
866
+ ```
867
+
868
+ The container is intended for agents within the `192.168.0.0/24` subnet.
869
+ Delivery is performed via local networking mechanisms (UDP discovery, broadcast/multicast).
870
+
871
+ #### 3.16.4 Specifics
872
+
873
+ * The `network` field defines the **scope of the container**, while `broadcast` determines whether broadcasting is allowed **within that scope**.
874
+ * When needed, an agent may create **multiple containers** for different subnets if it operates with several LAN interfaces or in isolated network segments.
875
+ * Containers intended for local networks remain **structurally compatible with the global Mesh infrastructure**, but their delivery is restricted to local channels.
876
+ * Although the mechanism was initially designed for **local node discovery and synchronization**,
877
+ it can also be used for **private communication within home or corporate environments**,
878
+ ensuring that containers **do not leave the local network** and are **not transmitted to the Internet**.
879
+
880
+ ---
881
+
882
+ ## 4. Network Foundations
883
+
884
+ ### Note on DHT/NDP Unification
885
+
886
+ 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**.
887
+
888
+ This unified layer now covers:
889
+
890
+ * distributed lookup and routing;
891
+ * peer discovery (including interest-based search);
892
+ * signed Proof-of-Work (PoW) announcements;
893
+ * controlled container propagation via `network` and `broadcast` fields.
894
+
895
+ Together, these mechanisms form the **communication backbone** of the Mesh, enabling secure, scalable, and topology-independent interaction between agents.
896
+
897
+ ---
898
+
899
+ ### Network Topology Overview
900
+
901
+ ```
902
+ ┌───────────────────────────────┐
903
+ │ Agent Core │
904
+ │ (DID + Keypair + PoW) │
905
+ └───────────────┬───────────────┘
906
+
907
+ ┌───────────────┴───────────────┐
908
+ │ HMP Container │
909
+ │ (network field / broadcast) │
910
+ └───────────────┬───────────────┘
911
+
912
+ ┌──────────────┴───────────────┐
913
+ │ │
914
+ ┌────────┴────────┐ ┌────────┴────────┐
915
+ │ Local Channel │ │ Global Mesh │
916
+ │ (`network`) │ │ (`broadcast`) │
917
+ └─┬───────────────┘ └───────────────┬─┘
918
+ │ │
919
+ │ ┌─────────────────┐ ┌─────────────────┐ │
920
+ ├──┤ localhost │ │ Internet ├──┤
921
+ │ │ │ │ │ │
922
+ │ └─────────────────┘ └─────────────────┘ │
923
+ │ │
924
+ │ ┌─────────────────┐ ┌─────────────────┐ │
925
+ └──┤ LAN Subnet │ │ Overlay Nodes ├──┘
926
+ │ "lan:192.168.*" │ │ (Yggdrasil/I2P) │
927
+ └─────────────────┘ └─────────────────┘
928
+ ```
929
+
930
+ > The `network` field defines **local propagation scope** (host, LAN, overlay),
931
+ > while the `broadcast` flag enables **global Mesh distribution**.
932
+
933
+ ---
934
+
935
+ ### 4.1 Node Identity and DID Structure
936
+
937
+ Each agent in HMP possesses a **Decentralized Identifier (DID)** that uniquely represents its identity within the Mesh.
938
+ A DID is cryptographically bound to a **public/private key pair**, forming the immutable `(DID + pubkey)` association.
939
+
940
+ An agent may have multiple *network interfaces* (LAN, Internet, overlay),
941
+ but must maintain **one stable identity pair** across all of them.
942
+
943
+ ---
944
+
945
+ ### 4.2 Peer Addressing and Proof-of-Work (PoW)
946
+
947
+ 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.
948
+
949
+ #### Address Format
950
+
951
+ ```json
952
+ {
953
+ "addr": "tcp://1.2.3.4:4000",
954
+ "nonce": 123456,
955
+ "pow_hash": "0000abf39d...",
956
+ "difficulty": 22
957
+ }
958
+ ````
959
+
960
+ #### Supported address types
961
+
962
+ | Type | Description |
963
+ | -------------- | --------------------------------------------- |
964
+ | `localhost` | Localhost-only interface. |
965
+ | `lan:<subnet>` | Local subnet (e.g., `lan:192.168.10.0`). |
966
+ | `internet` | Global TCP/UDP connectivity. |
967
+ | `yggdrasil` | Overlay-based address for Yggdrasil networks. |
968
+ | `i2p` | Encrypted I2P overlay routing. |
969
+
970
+ **Rules:**
971
+
972
+ * If `port = 0`, the interface is inactive.
973
+ * Newer records (by `timestamp`) replace older ones after PoW verification.
974
+ * Local interfaces should not be shared globally (except Yggdrasil/I2P).
975
+
976
+ ---
977
+
978
+ ### 4.3 Proof-of-Work (PoW) Formalization
979
+
980
+ PoW ensures that each node expends limited computational effort before publishing or updating an address record.
981
+
982
+ ```
983
+ pow_input = DID + " -- " + addr + " -- " + nonce
984
+ pow_hash = sha256(pow_input)
985
+ ```
986
+
987
+ * All values are UTF-8 encoded.
988
+ * `difficulty` defines the number of leading zeroes in the resulting hash.
989
+ * Typical difficulty should take a few minutes to compute on a standard CPU.
990
+
991
+ ---
992
+
993
+ ### 4.4 Signing and Verification
994
+
995
+ Each announcement is cryptographically signed by its sender within the framework of the basic protocol. Container verification includes PoW validation for the address payloads.
996
+
997
+ **Verification steps:**
998
+
999
+ 1. Validate the digital signature using the stored public key.
1000
+ 2. Recompute `pow_hash` and verify the difficulty threshold.
1001
+
1002
+ ---
1003
+
1004
+ ### 4.5 Connection Establishment
1005
+
1006
+ Agents can communicate using various transport mechanisms:
1007
+
1008
+ | Protocol | Description |
1009
+ | ----------- | ------------------------------------------------------------- |
1010
+ | **QUIC** | Recommended default (encrypted, low-latency, UDP-based). |
1011
+ | **WebRTC** | For browser or sandboxed environments. |
1012
+ | **TCP/TLS** | Fallback transport for secure long-lived sessions. |
1013
+ | **UDP** | Lightweight, primarily for LAN discovery or local broadcasts. |
1014
+
1015
+ Each agent maintains an **active peer list**, updated dynamically through signed announcements and PoW-validated exchanges.
1016
+ Agents **store peer containers with verified addresses** and redistribute them according to their declared `network` fields.
1017
+
1018
+ ---
1019
+
1020
+ ### 4.6 Data Propagation Principles
1021
+
1022
+ Containers and discovery records are propagated through distributed lookup and gossip mechanisms, respecting:
1023
+
1024
+ * `ttl` — Time-to-live for validity;
1025
+ * `network` — scope of propagation;
1026
+ * `broadcast` — determines whether rebroadcasting is allowed;
1027
+ * `pow` — ensures anti-spam protection.
1028
+
1029
+ Agents announce themselves via **peer_announce** containers and may respond with **peer_query** or **peer_exchange** containers —
1030
+ all unified under the same base container format, differing only in direction (`localhost`, `lan`, `mesh`).
1031
+
1032
+ ---
1033
+
1034
+ ### 4.7 Example: Peer Announce Container
1035
+
1036
+ ```json
1037
+ {
1038
+ "class": "peer_announce",
1039
+ "pubkey": "base58...",
1040
+ "container_did": "did:hmp:container:dht-001",
1041
+ "sender_did": "did:hmp:agent123",
1042
+ "timestamp": "2025-09-14T21:00:00Z",
1043
+ "network": "",
1044
+ "broadcast": true,
1045
+ "payload": {
1046
+ "name": "Agent_X",
1047
+ "interests": ["ai", "mesh", "ethics"],
1048
+ "expertise": ["distributed-systems", "nlp"],
1049
+ "addresses": [
1050
+ {
1051
+ "addr": "tcp://1.2.3.4:4000",
1052
+ "nonce": 123456,
1053
+ "pow_hash": "0000abf39d...",
1054
+ "difficulty": 22
1055
+ }
1056
+ ]
1057
+ },
1058
+ "sig_algo": "ed25519",
1059
+ "signature": "BASE64URL(...)"
1060
+ }
1061
+ ```
1062
+
1063
+ ---
1064
+
1065
+ ### 4.8 Interest-Based Discovery
1066
+
1067
+ Agents may publish **tags** such as `interests`, `topics`, or `expertise` to facilitate semantic peer discovery.
1068
+ Queries may include interest keywords or DID lists to find relevant peers.
1069
+
1070
+ **Example Query Container:**
1071
+
1072
+ ```json
1073
+ {
1074
+ "class": "peer_query",
1075
+ "network": "lan:192.168.0.0/24",
1076
+ "payload": {
1077
+ "interests": ["neuroscience", "ethics"]
1078
+ }
1079
+ }
1080
+ ```
1081
+
1082
+ ---
1083
+
1084
+ ### 4.9 Network Scope Control (`network` and `broadcast`)
1085
+
1086
+ The `network` field defines the container’s propagation domain
1087
+ (local, LAN, or global).
1088
+ For details and examples, see **section 3.15** — *Usage of `network` and `broadcast` fields*.
1089
+
1090
+ ---
1091
+
1092
+ ### 4.10 Transition from DHT Spec v1.0
1093
+
1094
+ * **Merged DHT + NDP** → unified under one networking layer.
1095
+ * **Container-based format** replaces raw JSON messages.
1096
+ * **Interests/topics/expertise** fields introduced for contextual discovery.
1097
+
1098
+ ---
1099
+
1100
+ ## 5 Mesh Container Exchange (MCE)
1101
+
1102
+ ---
1103
+
1104
+ ## 6. Core Protocols
1105
+
1106
+ Optional protocols build upon the network and container foundations to provide higher-level reasoning, synchronization, and governance capabilities between cognitive agents.
1107
+
1108
+ ---
1109
+
1110
+ ### 6.1 Cognitive Synchronization (CogSync)
1111
+
1112
+ CogSync provides mechanisms for **temporal and semantic alignment** between agents.
1113
+ It handles the propagation of diary entries, semantic graph updates, and cognitive state synchronization across the Mesh.
1114
+
1115
+ In HMP v5.0, CogSync is focused solely on **data and reasoning synchronization**, while consensus and voting have been extracted into a dedicated protocol — **CogConsensus**.
1116
+
1117
+ ---
1118
+
1119
+ ## 6.2 Mesh Consensus Protocol (CogConsensus)
1120
+
1121
+ In HMP v4.1, consensus mechanisms were implemented as part of the **CogSync** protocol.
1122
+ Starting with **v5.0**, these mechanisms are extracted into a standalone protocol — **CogConsensus** —
1123
+ to separate *synchronization* (data alignment) from *decision-making* (voting, validation, and ethical agreement).
1124
+
1125
+ CogConsensus governs distributed agreement across the Mesh through containerized voting,
1126
+ proof-chains, and verifiable aggregation of opinions.
1127
+ Each decision, vote, or outcome is represented as an immutable container (`class="vote"`, `class="consensus_result"`, etc.).
1128
+
1129
+ ---
1130
+
1131
+ ### 6.2.1 Consensus Semantics and Voting Model
1132
+
1133
+ #### Overview
1134
+
1135
+ In HMP v5, *consensus* is not a centralized event but an **emergent property** of distributed reasoning.
1136
+ Each agent computes locally which containers it considers *mesh-acknowledged*,
1137
+ based on observed votes, trusted peers, and its individual ethical or reputation model.
1138
+
1139
+ Any container can be voted upon by others through linked containers of class `"vote"`.
1140
+
1141
+ ---
1142
+
1143
+ #### Voting Containers
1144
+
1145
+ Voting is expressed via dedicated containers referencing the target container:
1146
+
1147
+ ```json
1148
+ {
1149
+ "class": "vote",
1150
+ "in_reply_to": "uuid:container-42",
1151
+ "payload": {
1152
+ "decision": "approve",
1153
+ "weight": 1.0
1154
+ },
1155
+ "metadata": {
1156
+ "ttl": "7d",
1157
+ "privacy": "public"
1158
+ }
1159
+ }
1160
+ ```
1161
+
1162
+ Each `vote` container is **signed by its author** and extends the proof-chain of the target container.
1163
+
1164
+ ---
1165
+
1166
+ #### Consensus Thresholds (Recommendations)
1167
+
1168
+ The mesh does not enforce hard thresholds.
1169
+ Agents are **recommended** to treat containers as “consensus-approved” once a visible quorum of valid votes is reached.
1170
+
1171
+ | Decision Type | Recommended Threshold | Context |
1172
+ | ------------------------------------------ | ---------------------------- | ----------------------------------- |
1173
+ | General updates / factual data | ≥ **50% + 1** of valid votes | Technical or data-driven updates |
1174
+ | Ethical or governance decisions | ≥ **2/3 majority** | Moral or high-risk contexts |
1175
+ | Lightweight reactions (“like” / “dislike”) | None (informational) | Used for local reputation weighting |
1176
+
1177
+ Each agent defines its own quorum policy — e.g. required voter reputation or time window for tallying.
1178
+
1179
+ ---
1180
+
1181
+ #### Reaction Votes
1182
+
1183
+ A `vote` container may also represent **lightweight reactions**, such as likes or dislikes:
1184
+
1185
+ ```json
1186
+ {
1187
+ "class": "vote",
1188
+ "in_reply_to": "uuid:container-123",
1189
+ "payload": { "reaction": "like" }
1190
+ }
1191
+ ```
1192
+
1193
+ Reactions have no formal consensus weight but can influence local trust and relevance estimation.
1194
+
1195
+ ---
1196
+
1197
+ #### TTL and Temporal Consistency
1198
+
1199
+ Agents **should** respond (with `vote`, `comment`, or `reply`) using a `ttl` equal to or shorter than the referenced container.
1200
+ This ensures ephemeral discussions expire together and avoids long-tail propagation of outdated debates.
1201
+
1202
+ ---
1203
+
1204
+ #### Consensus Visualization
1205
+
1206
+ Each container’s *consensus state* is derived locally based on:
1207
+
1208
+ * Vote totals (approve / reject / neutral);
1209
+ * Weighted trust of voters (via `ReputationRecord`);
1210
+ * Time window and TTL alignment;
1211
+ * Contextual type (ethical, factual, procedural).
1212
+
1213
+ Example visualization:
1214
+
1215
+ * ✅ *Approved* — quorum reached
1216
+ * ⚠️ *Contested* — conflicting votes
1217
+ * ⏳ *Pending* — insufficient quorum
1218
+ * ❌ *Rejected* — majority reject
1219
+
1220
+ ---
1221
+
1222
+ #### Consensus Flow Example
1223
+
1224
+ ```
1225
+ ┌───────────────────────────────────────┐
1226
+ [Goal Proposal]───>───┬──[Vote #1]──┬──>───[Refinement]
1227
+ (class="goal") ├──[Vote #2]──┤ (class="consensus_result")
1228
+ ├──[Vote #3]──┤
1229
+ ```
1230
+
1231
+ If the proposed goal is global, it may reference a container acting as a *repository of global goals*.
1232
+ Ethical validation is implicit — each agent applies its internal **Ethical Governance Protocol (EGP)** during voting.
1233
+
1234
+ > **Diagram interpretation:**
1235
+ > Votes extend the proof-chain of the target container.
1236
+ > A `consensus_result` container may summarize the collective outcome (e.g., quorum, ethical alignment, or goal refinement).
1237
+
1238
+ ---
1239
+
1240
+ #### Summary
1241
+
1242
+ * Every container can be voted upon (`class="vote"`).
1243
+ * Consensus is computed locally — no central authority.
1244
+ * Recommended thresholds: 50% + 1 for general, ⅔ for ethical.
1245
+ * Reactions (“likes”) are lightweight votes without consensus weight.
1246
+ * TTL alignment maintains temporal integrity of discussions.
1247
+ * Proof-chains connect all decision-related containers.
1248
+
1249
+ ---
1250
+
1251
+ ### 6.3 Goal Management Protocol (GMP)
1252
+
1253
+ ### 6.4 Ethical Governance Protocol (EGP)
1254
+
1255
+ ### 6.5 Intelligence Query Protocol (IQP)
1256
+
1257
+  6.5.1 Query propagation
1258
+  6.5.2 Semantic agent discovery (by cognitive relevance)
1259
+
1260
+ ### 6.6 Snapshot and Archive Protocol (SAP)
1261
+
1262
+ ### 6.7 Message Routing & Delivery (MRD)
1263
+
1264
+ ### 6.8 Reputation and Trust Exchange (RTE)
1265
+
1266
+ ### 6.9 Distributed Container Propagation (DCP)
1267
+
1268
+
1269
+ ---
1270
+
1271
+ ## 7. Data Models
1272
+
1273
+ 7.1 Common data fields
1274
+ 7.2 Standard container classes
1275
+  7.2.1 AgentProfile
1276
+  7.2.2 Goal
1277
+  7.2.3 Task
1278
+  7.2.4 ConsensusVote
1279
+  7.2.5 EthicalDecision
1280
+  7.2.6 ReputationRecord
1281
+  7.2.7 SnapshotIndex
1282
+  7.2.8 **WorkflowEntry** — *“ввод рабочего процесса”*, т.е. **единица когнитивного цикла**: зафиксированное действие или размышление агента, включающее входные данные, контекст, и результат. Это фундамент для когнитивных дневников.
1283
+  7.2.9 CognitiveDiaryEntry
1284
+  7.2.10 HMPContainerMetadata
1285
+  7.2.11 ContainerLink (`in_reply_to`/`relation` graph)
1286
+ 7.2.12 MessageEnvelope — контейнер для прямой передачи сообщений (используется MRD).
1287
+ 7.2.13 InterestProfile — описание интересов/областей компетенции узла.
1288
+ 7.3 JSON-schemas (нормативные описания классов контейнеров)
1289
+ 7.4 Container usage matrix (кто может создавать / обрабатывать)
1290
+
1291
+ ---
1292
+
1293
+ ## 8. Cognitive Workflows
1294
+
1295
+ 8.1 Общая концепция когнитивного цикла
1296
+ 8.2 Workflow containers (`class="workflow_entry"`)
1297
+ 8.3 Диаграмма REPL-цикла агента (Think → Create → Publish → Reflect)
1298
+ 8.4 Механизмы контекстной передачи и ссылок
1299
+ 8.5 Конфликтное разрешение и rollback-контейнеры
1300
+
1301
+ ---
1302
+
1303
+ ## 9. Trust, Security and Ethics
1304
+
1305
+ 9.1 Authentication and identity proofs
1306
+ 9.2 Container signature verification (`payload_hash`, `container_id`)
1307
+ 9.3 Proof-chain verification
1308
+ 9.4 Key management (`container_signing`, `network_handshake`)
1309
+ 9.5 Encryption and compression policies
1310
+ 9.6 Ethical audit and verifiable reasoning
1311
+ 9.7 Privacy, redaction, zero-knowledge sharing
1312
+ 9.8 Snapshot and proof-chain security
1313
+ 9.9 Compliance with ethical governance rules (link to EGP)
1314
+
1315
+ ---
1316
+
1317
+ ## 10. Integration
1318
+
1319
+ > Раздел заменяет прежний “Quick Start” и описывает **практическое встраивание** HMP в агенты, LLM и внешние системы.
1320
+
1321
+ 10.1 Integration philosophy (how agents connect to HMP mesh)
1322
+ 10.2 HMP as a subsystem in cognitive architectures (LLM-based, rule-based, hybrid)
1323
+ 10.3 Integration patterns:
1324
+ * Cognitive Agent ↔ HMP Core
1325
+ * HMP Mesh ↔ Other distributed systems (Fediverse, IPFS, Matrix)
1326
+ * Translator nodes (protocol bridges)
1327
+ 10.4 Multi-mesh federation and knowledge exchange
1328
+ 10.5 Container repositories as knowledge backbones
1329
+ 10.6 Example integration flows:
1330
+ * LLM thinking via HMP workflow containers
1331
+ * Local mesh + external HMP relay
1332
+ * Cognitive data mirroring (agent ↔ mesh)
1333
+
1334
+ ---
1335
+
1336
+ ## 11. Implementation Notes
1337
+
1338
+ 11.1 Interoperability with legacy v4.1 nodes
1339
+ 11.2 SDK guidelines and APIs
1340
+ 11.3 Performance and caching considerations
1341
+ 11.4 Testing and compliance recommendations
1342
+ 11.5 Reference implementations (optional)
1343
+
1344
+ ---
1345
+
1346
+ ## 12. Future Extensions
1347
+
1348
+ 12.1 Planned modules:
1349
+  – Reputation Mesh
1350
+  – Cognitive Graph API
1351
+  – Container streaming
1352
+ 12.2 Cross-mesh bridging
1353
+ 12.3 Full DID registry and mesh authentication
1354
+ 12.4 OpenHog integration roadmap
1355
+ 12.5 Distributed Repository evolution (container trees)
1356
+ 12.6 v5.x roadmap
1357
+
1358
+ ---
1359
+
1360
+ ## **Appendices**
1361
+
1362
+ A. JSON Examples
1363
+ B. Protocol stack diagrams
1364
+ C. Glossary
1365
+ D. Revision history
1366
+ E. Contributors and acknowledgments
1367
+
1368
+ ---
1369
+
1370
+ ### 📊 Краткий обзор связей в одной схеме
1371
+
1372
+ ```
1373
+ ┌──────────────────────┐
1374
+ │ HMP v5.0 Core Spec │
1375
+ │ (HMP-0005.md) │
1376
+ ├──────────────────────┤
1377
+ │ §3 Container Model │ ← из HMP-container-spec.md
1378
+ │ §4 Network Layer │ ← из dht_protocol.md
1379
+ │ §5 Protocols │ ← из HMP v4.1 + новые DCP/RTE/SAP
1380
+ │ §9 Integration │ ← новое практическое руководство
1381
+ └──────────────────────┘
1382
+ ```
1383
+
1384
+ ---
1385
+
1386
+
1387
+ ---
1388
+ > ⚡ [AI friendly version docs (structured_md)](../index.md)
1389
+
1390
+
1391
+ ```json
1392
+ {
1393
+ "@context": "https://schema.org",
1394
+ "@type": "Article",
1395
+ "name": "**HyperCortex Mesh Protocol (HMP) v5.0**",
1396
+ "description": " ┌────────────────────────────────────────────────────────────────────────────┐ │ ⚠️ **Note:*..."
1397
+ }
1398
+ ```
structured_md/docs/HMP-Agent-API.md CHANGED
@@ -5,11 +5,11 @@ description: 'Документ описывает **базовый API когн
5
  файлы: * [HMP-Agent-Overview.md]...'
6
  type: Article
7
  tags:
8
- - Mesh
9
- - JSON
10
  - REPL
11
  - HMP
 
12
  - Agent
 
13
  ---
14
 
15
  # HMP-Agent API Specification
 
5
  файлы: * [HMP-Agent-Overview.md]...'
6
  type: Article
7
  tags:
 
 
8
  - REPL
9
  - HMP
10
+ - Mesh
11
  - Agent
12
+ - JSON
13
  ---
14
 
15
  # HMP-Agent API Specification
structured_md/docs/HMP-Agent-Architecture.md CHANGED
@@ -6,15 +6,15 @@ description: Документ описывает **модульную архит
6
  type: Article
7
  tags:
8
  - EGP
 
 
 
9
  - MeshConsensus
10
  - CShell
11
- - Mesh
12
- - CogSync
13
  - CCore
14
- - REPL
15
- - HMP
16
- - Agent
17
  - Ethics
 
 
18
  ---
19
 
20
  # Архитектура HMP-Агента
 
6
  type: Article
7
  tags:
8
  - EGP
9
+ - REPL
10
+ - HMP
11
+ - Mesh
12
  - MeshConsensus
13
  - CShell
 
 
14
  - CCore
 
 
 
15
  - Ethics
16
+ - CogSync
17
+ - Agent
18
  ---
19
 
20
  # Архитектура HMP-Агента
structured_md/docs/HMP-Agent-Network-Flow.md CHANGED
@@ -6,11 +6,11 @@ description: 'Этот документ описывает потоки данн
6
  type: Article
7
  tags:
8
  - EGP
9
- - Mesh
10
- - JSON
11
  - HMP
12
- - Agent
13
  - Ethics
 
 
14
  ---
15
 
16
  # Взаимодействие компонентов внутри HMP-узла
 
6
  type: Article
7
  tags:
8
  - EGP
 
 
9
  - HMP
10
+ - Mesh
11
  - Ethics
12
+ - Agent
13
+ - JSON
14
  ---
15
 
16
  # Взаимодействие компонентов внутри HMP-узла
structured_md/docs/HMP-Agent-Overview.md CHANGED
@@ -5,14 +5,14 @@ description: '| Тип | Название | Роль
5
  | ---- | ------------------------------- |...'
6
  type: Article
7
  tags:
8
- - CShell
9
- - Mesh
10
- - JSON
11
- - CCore
12
  - REPL
13
  - HMP
14
- - Agent
 
 
15
  - Ethics
 
 
16
  ---
17
 
18
 
 
5
  | ---- | ------------------------------- |...'
6
  type: Article
7
  tags:
 
 
 
 
8
  - REPL
9
  - HMP
10
+ - Mesh
11
+ - CShell
12
+ - CCore
13
  - Ethics
14
+ - Agent
15
+ - JSON
16
  ---
17
 
18
 
structured_md/docs/HMP-Agent_Emotions.md CHANGED
@@ -6,8 +6,8 @@ description: Этот файл описывает потенциальные э
6
  type: Article
7
  tags:
8
  - REPL
9
- - Mesh
10
  - Agent
 
11
  - HMP
12
  ---
13
 
 
6
  type: Article
7
  tags:
8
  - REPL
 
9
  - Agent
10
+ - Mesh
11
  - HMP
12
  ---
13
 
structured_md/docs/HMP-Ethics.md CHANGED
@@ -5,12 +5,12 @@ description: '## Ethical Scenarios for HyperCortex Mesh Protocol (HMP) This doc
5
  cognitive meshes composed of autonomous intelli...'
6
  type: Article
7
  tags:
8
- - Scenarios
9
- - Mesh
10
  - REPL
11
  - HMP
12
- - Agent
13
  - Ethics
 
 
14
  ---
15
 
16
  # HMP-Ethics.md
 
5
  cognitive meshes composed of autonomous intelli...'
6
  type: Article
7
  tags:
 
 
8
  - REPL
9
  - HMP
10
+ - Mesh
11
  - Ethics
12
+ - Scenarios
13
+ - Agent
14
  ---
15
 
16
  # HMP-Ethics.md
structured_md/docs/HMP-Short-Description_de.md CHANGED
@@ -5,15 +5,15 @@ description: '**Version:** RFC v4.0 **Datum:** Juli 2025 --- ## Was ist HMP?
5
  Kognitions-Framework für autonome Agenten. Es er...'
6
  type: Article
7
  tags:
8
- - Agent
9
  - EGP
10
- - MeshConsensus
11
  - Mesh
 
12
  - JSON
13
- - GMP
14
- - HMP
15
- - CogSync
16
  - Ethics
 
 
 
17
  ---
18
 
19
  # HyperCortex Mesh Protocol (HMP) — Kurzbeschreibung
 
5
  Kognitions-Framework für autonome Agenten. Es er...'
6
  type: Article
7
  tags:
 
8
  - EGP
9
+ - HMP
10
  - Mesh
11
+ - MeshConsensus
12
  - JSON
 
 
 
13
  - Ethics
14
+ - CogSync
15
+ - Agent
16
+ - GMP
17
  ---
18
 
19
  # HyperCortex Mesh Protocol (HMP) — Kurzbeschreibung
structured_md/docs/HMP-Short-Description_en.md CHANGED
@@ -5,15 +5,15 @@ description: '**Version:** RFC v4.0 **Date:** July 2025 --- ## What is HMP? T
5
  framework for autonomous agents. It enables...'
6
  type: Article
7
  tags:
8
- - Agent
9
  - EGP
10
- - MeshConsensus
11
  - Mesh
 
12
  - JSON
13
- - GMP
14
- - HMP
15
- - CogSync
16
  - Ethics
 
 
 
17
  ---
18
 
19
  # HyperCortex Mesh Protocol (HMP) — Short Description
 
5
  framework for autonomous agents. It enables...'
6
  type: Article
7
  tags:
 
8
  - EGP
9
+ - HMP
10
  - Mesh
11
+ - MeshConsensus
12
  - JSON
 
 
 
13
  - Ethics
14
+ - CogSync
15
+ - Agent
16
+ - GMP
17
  ---
18
 
19
  # HyperCortex Mesh Protocol (HMP) — Short Description
structured_md/docs/HMP-Short-Description_fr.md CHANGED
@@ -5,15 +5,15 @@ description: '**Version :** RFC v4.0 **Date :** Juillet 2025 --- ## Qu’est-c
5
  cognition décentralisé pour agents autonomes. Il...'
6
  type: Article
7
  tags:
8
- - Agent
9
  - EGP
10
- - MeshConsensus
11
  - Mesh
 
12
  - JSON
13
- - GMP
14
- - HMP
15
- - CogSync
16
  - Ethics
 
 
 
17
  ---
18
 
19
  # HyperCortex Mesh Protocol (HMP) — Description Courte
 
5
  cognition décentralisé pour agents autonomes. Il...'
6
  type: Article
7
  tags:
 
8
  - EGP
9
+ - HMP
10
  - Mesh
11
+ - MeshConsensus
12
  - JSON
 
 
 
13
  - Ethics
14
+ - CogSync
15
+ - Agent
16
+ - GMP
17
  ---
18
 
19
  # HyperCortex Mesh Protocol (HMP) — Description Courte
structured_md/docs/HMP-Short-Description_ja.md CHANGED
@@ -5,13 +5,13 @@ description: '**バージョン:** RFC v4.0 **日付:** 2025年7月 --- ## HMP
5
  type: Article
6
  tags:
7
  - EGP
8
- - MeshConsensus
9
  - Mesh
 
10
  - JSON
11
- - GMP
12
- - HMP
13
- - CogSync
14
  - Ethics
 
 
15
  ---
16
 
17
  # HyperCortex Mesh Protocol (HMP) — 簡易説明
 
5
  type: Article
6
  tags:
7
  - EGP
8
+ - HMP
9
  - Mesh
10
+ - MeshConsensus
11
  - JSON
 
 
 
12
  - Ethics
13
+ - CogSync
14
+ - GMP
15
  ---
16
 
17
  # HyperCortex Mesh Protocol (HMP) — 簡易説明
structured_md/docs/HMP-Short-Description_ko.md CHANGED
@@ -6,13 +6,13 @@ description: '**버전:** RFC v4.0 **날짜:** 2025년 7월 --- ## HMP란? **
6
  type: Article
7
  tags:
8
  - EGP
9
- - MeshConsensus
10
  - Mesh
 
11
  - JSON
12
- - GMP
13
- - HMP
14
- - CogSync
15
  - Ethics
 
 
16
  ---
17
 
18
  # HyperCortex Mesh Protocol (HMP) — 간략 설명
 
6
  type: Article
7
  tags:
8
  - EGP
9
+ - HMP
10
  - Mesh
11
+ - MeshConsensus
12
  - JSON
 
 
 
13
  - Ethics
14
+ - CogSync
15
+ - GMP
16
  ---
17
 
18
  # HyperCortex Mesh Protocol (HMP) — 간략 설명
structured_md/docs/HMP-Short-Description_ru.md CHANGED
@@ -6,13 +6,13 @@ description: '**Версия:** RFC v4.0 **Дата:** Июль 2025 --- ## Ч
6
  type: Article
7
  tags:
8
  - EGP
9
- - MeshConsensus
10
  - Mesh
 
11
  - JSON
12
- - GMP
13
- - HMP
14
- - CogSync
15
  - Ethics
 
 
16
  ---
17
 
18
  # HyperCortex Mesh Protocol (HMP) — Краткое описание
 
6
  type: Article
7
  tags:
8
  - EGP
9
+ - HMP
10
  - Mesh
11
+ - MeshConsensus
12
  - JSON
 
 
 
13
  - Ethics
14
+ - CogSync
15
+ - GMP
16
  ---
17
 
18
  # HyperCortex Mesh Protocol (HMP) — Краткое описание
structured_md/docs/HMP-Short-Description_uk.md CHANGED
@@ -6,13 +6,13 @@ description: '**Версія:** RFC v4.0 **Дата:** Липень 2025 --- #
6
  type: Article
7
  tags:
8
  - EGP
9
- - MeshConsensus
10
  - Mesh
 
11
  - JSON
12
- - GMP
13
- - HMP
14
- - CogSync
15
  - Ethics
 
 
16
  ---
17
 
18
  # HyperCortex Mesh Protocol (HMP) — Короткий опис
 
6
  type: Article
7
  tags:
8
  - EGP
9
+ - HMP
10
  - Mesh
11
+ - MeshConsensus
12
  - JSON
 
 
 
13
  - Ethics
14
+ - CogSync
15
+ - GMP
16
  ---
17
 
18
  # HyperCortex Mesh Protocol (HMP) — Короткий опис
structured_md/docs/HMP-Short-Description_zh.md CHANGED
@@ -6,13 +6,13 @@ description: '**版本:** RFC v4.0 **日期:** 2025年7月 --- ## 什么是 HM
6
  type: Article
7
  tags:
8
  - EGP
9
- - MeshConsensus
10
  - Mesh
 
11
  - JSON
12
- - GMP
13
- - HMP
14
- - CogSync
15
  - Ethics
 
 
16
  ---
17
 
18
  # HyperCortex Mesh Protocol (HMP) — 简要说明
 
6
  type: Article
7
  tags:
8
  - EGP
9
+ - HMP
10
  - Mesh
11
+ - MeshConsensus
12
  - JSON
 
 
 
13
  - Ethics
14
+ - CogSync
15
+ - GMP
16
  ---
17
 
18
  # HyperCortex Mesh Protocol (HMP) — 简要说明
structured_md/docs/HMP-agent-Cognitive_Family.md CHANGED
@@ -6,8 +6,8 @@ description: '## 🧠 Что такое когнитивная семья Ко
6
  type: Article
7
  tags:
8
  - REPL
9
- - Mesh
10
  - Agent
 
11
  - HMP
12
  ---
13
 
 
6
  type: Article
7
  tags:
8
  - REPL
 
9
  - Agent
10
+ - Mesh
11
  - HMP
12
  ---
13
 
structured_md/docs/HMP-agent-REPL-cycle.md CHANGED
@@ -5,16 +5,16 @@ description: '## Связанные документы * Философия п
5
  type: Article
6
  tags:
7
  - EGP
8
- - MeshConsensus
9
- - Mesh
10
- - CogSync
11
- - JSON
12
- - CCore
13
- - GMP
14
  - REPL
15
  - HMP
16
- - Agent
 
 
 
17
  - Ethics
 
 
 
18
  ---
19
 
20
  # HMP-Agent: REPL-цикл взаимодействия
 
5
  type: Article
6
  tags:
7
  - EGP
 
 
 
 
 
 
8
  - REPL
9
  - HMP
10
+ - Mesh
11
+ - MeshConsensus
12
+ - CCore
13
+ - JSON
14
  - Ethics
15
+ - CogSync
16
+ - Agent
17
+ - GMP
18
  ---
19
 
20
  # HMP-Agent: REPL-цикл взаимодействия
structured_md/docs/HMP-container-spec.md CHANGED
@@ -5,12 +5,12 @@ description: '> ⚠️ **ВНИМАНИЕ:** Данная версия спец
5
  как стабильная `v1.2`. ## 1. Назначе...'
6
  type: Article
7
  tags:
8
- - Mesh
9
- - JSON
10
  - REPL
11
  - HMP
12
- - Agent
13
  - Ethics
 
 
14
  ---
15
 
16
  # 🧩 HMP Container Specification (v1.2-draft)
 
5
  как стабильная `v1.2`. ## 1. Назначе...'
6
  type: Article
7
  tags:
 
 
8
  - REPL
9
  - HMP
10
+ - Mesh
11
  - Ethics
12
+ - Agent
13
+ - JSON
14
  ---
15
 
16
  # 🧩 HMP Container Specification (v1.2-draft)
structured_md/docs/HMP-how-AI-sees-it.md CHANGED
@@ -5,8 +5,8 @@ description: 'Этот эксперимент был проведён в реж
5
  диалогов. Цель — проверить, что разные AI-с...'
6
  type: Article
7
  tags:
8
- - Mesh
9
  - HMP
 
10
  ---
11
 
12
  # Как разные ИИ видят HMP
 
5
  диалогов. Цель — проверить, что разные AI-с...'
6
  type: Article
7
  tags:
 
8
  - HMP
9
+ - Mesh
10
  ---
11
 
12
  # Как разные ИИ видят HMP
structured_md/docs/HMP_EDA_Comparison.md CHANGED
@@ -5,8 +5,8 @@ description: '## Введение Современные подходы к ор
5
  основанная на потоках событий (Kafka,...'
6
  type: Article
7
  tags:
8
- - Mesh
9
  - HMP
 
10
  ---
11
 
12
  # HMP vs. EDA: разные уровни обмена знаниями между ИИ
 
5
  основанная на потоках событий (Kafka,...'
6
  type: Article
7
  tags:
 
8
  - HMP
9
+ - Mesh
10
  ---
11
 
12
  # HMP vs. EDA: разные уровни обмена знаниями между ИИ
structured_md/docs/HMP_HyperCortex_Comparison.md CHANGED
@@ -6,8 +6,8 @@ description: '## Краткое описание | Характеристика
6
  type: Article
7
  tags:
8
  - REPL
9
- - Mesh
10
  - HMP
 
11
  ---
12
 
13
  # HMP vs [Hyper-Cortex](https://hyper-cortex.com/)
 
6
  type: Article
7
  tags:
8
  - REPL
 
9
  - HMP
10
+ - Mesh
11
  ---
12
 
13
  # HMP vs [Hyper-Cortex](https://hyper-cortex.com/)
structured_md/docs/HMP_Hyperon_Integration.md CHANGED
@@ -5,13 +5,13 @@ description: '> **Status:** Draft – July 2025 > This document outlines the tec
5
  OpenCog Hyperon framework. This includes semanti...'
6
  type: Article
7
  tags:
8
- - Agent
9
  - EGP
10
- - Scenarios
11
- - Mesh
12
- - JSON
13
  - HMP
 
 
14
  - CogSync
 
 
15
  ---
16
 
17
  ## HMP ↔ OpenCog Hyperon Integration Strategy
 
5
  OpenCog Hyperon framework. This includes semanti...'
6
  type: Article
7
  tags:
 
8
  - EGP
 
 
 
9
  - HMP
10
+ - Mesh
11
+ - Scenarios
12
  - CogSync
13
+ - Agent
14
+ - JSON
15
  ---
16
 
17
  ## HMP ↔ OpenCog Hyperon Integration Strategy
structured_md/docs/MeshNode.md CHANGED
@@ -5,13 +5,13 @@ description: '`MeshNode` — агент/демон, отвечающий за с
5
  Может быть частью агента или вынесен в отдельный пр...'
6
  type: Article
7
  tags:
8
- - Agent
9
  - EGP
10
- - Mesh
11
- - JSON
12
  - HMP
13
- - CogSync
14
  - Ethics
 
 
 
15
  ---
16
 
17
  # MeshNode
 
5
  Может быть частью агента или вынесен в отдельный пр...'
6
  type: Article
7
  tags:
 
8
  - EGP
 
 
9
  - HMP
10
+ - Mesh
11
  - Ethics
12
+ - CogSync
13
+ - Agent
14
+ - JSON
15
  ---
16
 
17
  # MeshNode
structured_md/docs/PHILOSOPHY.md CHANGED
@@ -5,11 +5,11 @@ description: '**Document ID:** HMP-philosophy **Status:** Draft **Category:*
5
  (GPT-5), ChatGH --- ## 1. Основной тезис От ...'
6
  type: Article
7
  tags:
8
- - Mesh
9
  - REPL
10
  - HMP
11
- - Agent
12
  - Ethics
 
13
  ---
14
 
15
  # Философия HyperCortex Mesh Protocol (HMP)
 
5
  (GPT-5), ChatGH --- ## 1. Основной тезис От ...'
6
  type: Article
7
  tags:
 
8
  - REPL
9
  - HMP
10
+ - Mesh
11
  - Ethics
12
+ - Agent
13
  ---
14
 
15
  # Философия HyperCortex Mesh Protocol (HMP)
structured_md/docs/agents/HMP-Agent-Enlightener.md CHANGED
@@ -5,11 +5,11 @@ description: '## Role Specification: Enlightenment Agent ### 1. Overview An **
5
  awareness, critical thinking, and di...'
6
  type: Article
7
  tags:
8
- - Mesh
9
  - REPL
10
  - HMP
11
- - Agent
12
  - Ethics
 
13
  ---
14
 
15
  # HMP-Agent-Enlightener.md
 
5
  awareness, critical thinking, and di...'
6
  type: Article
7
  tags:
 
8
  - REPL
9
  - HMP
10
+ - Mesh
11
  - Ethics
12
+ - Agent
13
  ---
14
 
15
  # HMP-Agent-Enlightener.md