Upload 12 files
Browse files- aegis/Aegis.txt +51 -0
- aegis/aegis.json +331 -0
- aegis/aegis1.py +94 -0
- aegis/aegis2.py +124 -0
- aegis/aegis3.py +159 -0
- aegis/aegis4.py +165 -0
- aegis/aegis5.py +221 -0
- aegis/aegis6.py +227 -0
- aegis/aegis7.py +209 -0
- aegis/aegis8.py +211 -0
- aegis/dream.json +252 -0
- aegis/nex7us.json +564 -0
aegis/Aegis.txt
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
AEGIS-Nexus: A Modular Cognitive Signal Engine for Ethical Multi-Agent Reasoning and Real-Time Value Arbitration
|
| 2 |
+
|
| 3 |
+
Abstract:
|
| 4 |
+
We present AEGIS-Nexus, a unified cognitive framework combining ethical signal processing, temporal awareness, and multi-agent arbitration to enable sovereign, adaptive artificial intelligence. This architecture integrates two core systems: the Nexus Signal Engine, which captures and evaluates entropy-weighted memory with signal integrity scoring, and the AEGIS Council, a modular agent-based reasoning core capable of virtue analysis, risk detection, override resolution, and explainable trace generation. Together, these systems form a self-auditing ethical cortex capable of adaptive judgment, emotional-contextual memory decay, and perspective-weighted decision flow.
|
| 5 |
+
|
| 6 |
+
System Overview:
|
| 7 |
+
Nexus Signal Engine (NSE):
|
| 8 |
+
A persistent entropy-aware memory manager supporting real-time value scoring, temporal relevance decay, and secure emotional weighting. It operates as the AI’s sensory and context filter layer.
|
| 9 |
+
|
| 10 |
+
AEGIS Council:
|
| 11 |
+
A dynamic ensemble of autonomous agents, each specializing in domains like virtue ethics, security risk detection, temporal coherence, and override arbitration. Agents operate in parallel and return structured reports and weighted influence scores.
|
| 12 |
+
|
| 13 |
+
Meta-Judicial Arbitration (MetaJudgeAgent):
|
| 14 |
+
Resolves conflicts among agents by balancing influence, reliability, and severity metrics. This enables principled override logic and supports explainable system governance.
|
| 15 |
+
|
| 16 |
+
TemporalAgent & VirtueAgent:
|
| 17 |
+
|
| 18 |
+
TemporalAgent detects memory drift and forecast stability based on recent signal decay.
|
| 19 |
+
|
| 20 |
+
VirtueAgent maps natural language inputs to multidimensional virtue spectrums (e.g., compassion, wisdom, integrity).
|
| 21 |
+
|
| 22 |
+
Explainability Graph:
|
| 23 |
+
A visual trace of agent influence relationships and decision paths, forming an interpretable map of internal reasoning dynamics.
|
| 24 |
+
|
| 25 |
+
Key Contributions:
|
| 26 |
+
Entropy-Weighted Memory Architecture:
|
| 27 |
+
Integrates emotional context and time decay directly into signal retention logic.
|
| 28 |
+
|
| 29 |
+
Modular Multi-Agent Arbitration:
|
| 30 |
+
Enables asynchronous ethical reasoning across heterogeneous agent perspectives.
|
| 31 |
+
|
| 32 |
+
Explainable Override System:
|
| 33 |
+
Decisions are traceable, weighted, and grounded in influence-reliability-severity scoring.
|
| 34 |
+
|
| 35 |
+
Virtue Spectrum Profiling:
|
| 36 |
+
Ethical judgment is grounded not just in rule-based filters but mapped moral virtue domains.
|
| 37 |
+
|
| 38 |
+
Temporal Drift Awareness:
|
| 39 |
+
Memory integrity and system stability are monitored over time through decay-driven inference.
|
| 40 |
+
|
| 41 |
+
Impact & Applications:
|
| 42 |
+
Autonomous AI Governance
|
| 43 |
+
|
| 44 |
+
Explainable Ethical Decision Systems (XAI)
|
| 45 |
+
|
| 46 |
+
AI Safety & Sovereignty Environments
|
| 47 |
+
|
| 48 |
+
Multi-perspective AGI Core Bootstrapping
|
| 49 |
+
|
| 50 |
+
Educational, Therapeut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
|
|
| 1 |
+
{
|
| 2 |
+
"access": {
|
| 3 |
+
"embargo": {
|
| 4 |
+
"active": false,
|
| 5 |
+
"reason": null
|
| 6 |
+
},
|
| 7 |
+
"files": "public",
|
| 8 |
+
"record": "public",
|
| 9 |
+
"status": "open"
|
| 10 |
+
},
|
| 11 |
+
"created": "2025-07-31T16:34:44.479102+00:00",
|
| 12 |
+
"custom_fields": {},
|
| 13 |
+
"deletion_status": {
|
| 14 |
+
"is_deleted": false,
|
| 15 |
+
"status": "P"
|
| 16 |
+
},
|
| 17 |
+
"files": {
|
| 18 |
+
"count": 9,
|
| 19 |
+
"enabled": true,
|
| 20 |
+
"entries": {
|
| 21 |
+
"Aegis.txt": {
|
| 22 |
+
"access": {
|
| 23 |
+
"hidden": false
|
| 24 |
+
},
|
| 25 |
+
"checksum": "md5:882ea61920c79c80c1b4b06520008538",
|
| 26 |
+
"ext": "txt",
|
| 27 |
+
"id": "471bec05-aba7-4214-93b5-82f41881d5b2",
|
| 28 |
+
"key": "Aegis.txt",
|
| 29 |
+
"links": {
|
| 30 |
+
"content": "https://zenodo.org/api/records/16644058/files/Aegis.txt/content",
|
| 31 |
+
"self": "https://zenodo.org/api/records/16644058/files/Aegis.txt"
|
| 32 |
+
},
|
| 33 |
+
"metadata": {},
|
| 34 |
+
"mimetype": "text/plain",
|
| 35 |
+
"size": 2804,
|
| 36 |
+
"storage_class": "L"
|
| 37 |
+
},
|
| 38 |
+
"aegis1.py": {
|
| 39 |
+
"access": {
|
| 40 |
+
"hidden": false
|
| 41 |
+
},
|
| 42 |
+
"checksum": "md5:6260b26687e5cee0e67e3d742bca1806",
|
| 43 |
+
"ext": "py",
|
| 44 |
+
"id": "5910f271-120e-4e3c-9cf9-e3b14c832c12",
|
| 45 |
+
"key": "aegis1.py",
|
| 46 |
+
"links": {
|
| 47 |
+
"content": "https://zenodo.org/api/records/16644058/files/aegis1.py/content",
|
| 48 |
+
"self": "https://zenodo.org/api/records/16644058/files/aegis1.py"
|
| 49 |
+
},
|
| 50 |
+
"metadata": {},
|
| 51 |
+
"mimetype": "text/x-python",
|
| 52 |
+
"size": 2729,
|
| 53 |
+
"storage_class": "L"
|
| 54 |
+
},
|
| 55 |
+
"aegis2.py": {
|
| 56 |
+
"access": {
|
| 57 |
+
"hidden": false
|
| 58 |
+
},
|
| 59 |
+
"checksum": "md5:67d7b1c37e10c94a55c751cb29550209",
|
| 60 |
+
"ext": "py",
|
| 61 |
+
"id": "e9d936f2-2ee2-41f5-a222-19407b9e2699",
|
| 62 |
+
"key": "aegis2.py",
|
| 63 |
+
"links": {
|
| 64 |
+
"content": "https://zenodo.org/api/records/16644058/files/aegis2.py/content",
|
| 65 |
+
"self": "https://zenodo.org/api/records/16644058/files/aegis2.py"
|
| 66 |
+
},
|
| 67 |
+
"metadata": {},
|
| 68 |
+
"mimetype": "text/x-python",
|
| 69 |
+
"size": 3906,
|
| 70 |
+
"storage_class": "L"
|
| 71 |
+
},
|
| 72 |
+
"aegis3.py": {
|
| 73 |
+
"access": {
|
| 74 |
+
"hidden": false
|
| 75 |
+
},
|
| 76 |
+
"checksum": "md5:5b50f2873046259d65bac3d432431a4c",
|
| 77 |
+
"ext": "py",
|
| 78 |
+
"id": "1b41b0c3-0034-4ecb-852c-1f88c9934b3c",
|
| 79 |
+
"key": "aegis3.py",
|
| 80 |
+
"links": {
|
| 81 |
+
"content": "https://zenodo.org/api/records/16644058/files/aegis3.py/content",
|
| 82 |
+
"self": "https://zenodo.org/api/records/16644058/files/aegis3.py"
|
| 83 |
+
},
|
| 84 |
+
"metadata": {},
|
| 85 |
+
"mimetype": "text/x-python",
|
| 86 |
+
"size": 5430,
|
| 87 |
+
"storage_class": "L"
|
| 88 |
+
},
|
| 89 |
+
"aegis4.py": {
|
| 90 |
+
"access": {
|
| 91 |
+
"hidden": false
|
| 92 |
+
},
|
| 93 |
+
"checksum": "md5:c0c221828c3d335bd9cbc1c68c4f8019",
|
| 94 |
+
"ext": "py",
|
| 95 |
+
"id": "ff4c5058-4554-4b08-9135-341939339679",
|
| 96 |
+
"key": "aegis4.py",
|
| 97 |
+
"links": {
|
| 98 |
+
"content": "https://zenodo.org/api/records/16644058/files/aegis4.py/content",
|
| 99 |
+
"self": "https://zenodo.org/api/records/16644058/files/aegis4.py"
|
| 100 |
+
},
|
| 101 |
+
"metadata": {},
|
| 102 |
+
"mimetype": "text/x-python",
|
| 103 |
+
"size": 6154,
|
| 104 |
+
"storage_class": "L"
|
| 105 |
+
},
|
| 106 |
+
"aegis5.py": {
|
| 107 |
+
"access": {
|
| 108 |
+
"hidden": false
|
| 109 |
+
},
|
| 110 |
+
"checksum": "md5:6c222290d40c294bb19d179e130a7c63",
|
| 111 |
+
"ext": "py",
|
| 112 |
+
"id": "9e70356e-734c-4207-b386-e6f574c66120",
|
| 113 |
+
"key": "aegis5.py",
|
| 114 |
+
"links": {
|
| 115 |
+
"content": "https://zenodo.org/api/records/16644058/files/aegis5.py/content",
|
| 116 |
+
"self": "https://zenodo.org/api/records/16644058/files/aegis5.py"
|
| 117 |
+
},
|
| 118 |
+
"metadata": {},
|
| 119 |
+
"mimetype": "text/x-python",
|
| 120 |
+
"size": 8323,
|
| 121 |
+
"storage_class": "L"
|
| 122 |
+
},
|
| 123 |
+
"aegis6.py": {
|
| 124 |
+
"access": {
|
| 125 |
+
"hidden": false
|
| 126 |
+
},
|
| 127 |
+
"checksum": "md5:0179165fe5c1e385f27ca5d3108d5b8e",
|
| 128 |
+
"ext": "py",
|
| 129 |
+
"id": "309147cf-11c2-4ff7-82a1-d43fa1d3e915",
|
| 130 |
+
"key": "aegis6.py",
|
| 131 |
+
"links": {
|
| 132 |
+
"content": "https://zenodo.org/api/records/16644058/files/aegis6.py/content",
|
| 133 |
+
"self": "https://zenodo.org/api/records/16644058/files/aegis6.py"
|
| 134 |
+
},
|
| 135 |
+
"metadata": {},
|
| 136 |
+
"mimetype": "text/x-python",
|
| 137 |
+
"size": 8906,
|
| 138 |
+
"storage_class": "L"
|
| 139 |
+
},
|
| 140 |
+
"aegis7.py": {
|
| 141 |
+
"access": {
|
| 142 |
+
"hidden": false
|
| 143 |
+
},
|
| 144 |
+
"checksum": "md5:5698061a730844e410ce9749a9f2e202",
|
| 145 |
+
"ext": "py",
|
| 146 |
+
"id": "124437eb-2f0b-487f-aa38-7a8d10e05371",
|
| 147 |
+
"key": "aegis7.py",
|
| 148 |
+
"links": {
|
| 149 |
+
"content": "https://zenodo.org/api/records/16644058/files/aegis7.py/content",
|
| 150 |
+
"self": "https://zenodo.org/api/records/16644058/files/aegis7.py"
|
| 151 |
+
},
|
| 152 |
+
"metadata": {},
|
| 153 |
+
"mimetype": "text/x-python",
|
| 154 |
+
"size": 8106,
|
| 155 |
+
"storage_class": "L"
|
| 156 |
+
},
|
| 157 |
+
"aegis8.py": {
|
| 158 |
+
"access": {
|
| 159 |
+
"hidden": false
|
| 160 |
+
},
|
| 161 |
+
"checksum": "md5:aa0ec461b31e41aa451ecb53c418c21b",
|
| 162 |
+
"ext": "py",
|
| 163 |
+
"id": "0c3861c9-1f2e-4820-b298-1bab41349989",
|
| 164 |
+
"key": "aegis8.py",
|
| 165 |
+
"links": {
|
| 166 |
+
"content": "https://zenodo.org/api/records/16644058/files/aegis8.py/content",
|
| 167 |
+
"self": "https://zenodo.org/api/records/16644058/files/aegis8.py"
|
| 168 |
+
},
|
| 169 |
+
"metadata": {},
|
| 170 |
+
"mimetype": "text/x-python",
|
| 171 |
+
"size": 8127,
|
| 172 |
+
"storage_class": "L"
|
| 173 |
+
}
|
| 174 |
+
},
|
| 175 |
+
"order": [],
|
| 176 |
+
"total_bytes": 54485
|
| 177 |
+
},
|
| 178 |
+
"id": "16644058",
|
| 179 |
+
"is_draft": false,
|
| 180 |
+
"is_published": true,
|
| 181 |
+
"links": {
|
| 182 |
+
"access": "https://zenodo.org/api/records/16644058/access",
|
| 183 |
+
"access_grants": "https://zenodo.org/api/records/16644058/access/grants",
|
| 184 |
+
"access_links": "https://zenodo.org/api/records/16644058/access/links",
|
| 185 |
+
"access_request": "https://zenodo.org/api/records/16644058/access/request",
|
| 186 |
+
"access_users": "https://zenodo.org/api/records/16644058/access/users",
|
| 187 |
+
"archive": "https://zenodo.org/api/records/16644058/files-archive",
|
| 188 |
+
"archive_media": "https://zenodo.org/api/records/16644058/media-files-archive",
|
| 189 |
+
"communities": "https://zenodo.org/api/records/16644058/communities",
|
| 190 |
+
"communities-suggestions": "https://zenodo.org/api/records/16644058/communities-suggestions",
|
| 191 |
+
"doi": "https://doi.org/10.5281/zenodo.16644058",
|
| 192 |
+
"draft": "https://zenodo.org/api/records/16644058/draft",
|
| 193 |
+
"files": "https://zenodo.org/api/records/16644058/files",
|
| 194 |
+
"latest": "https://zenodo.org/api/records/16644058/versions/latest",
|
| 195 |
+
"latest_html": "https://zenodo.org/records/16644058/latest",
|
| 196 |
+
"media_files": "https://zenodo.org/api/records/16644058/media-files",
|
| 197 |
+
"parent": "https://zenodo.org/api/records/16644057",
|
| 198 |
+
"parent_doi": "https://doi.org/10.5281/zenodo.16644057",
|
| 199 |
+
"parent_doi_html": "https://zenodo.org/doi/10.5281/zenodo.16644057",
|
| 200 |
+
"parent_html": "https://zenodo.org/records/16644057",
|
| 201 |
+
"preview_html": "https://zenodo.org/records/16644058?preview=1",
|
| 202 |
+
"requests": "https://zenodo.org/api/records/16644058/requests",
|
| 203 |
+
"reserve_doi": "https://zenodo.org/api/records/16644058/draft/pids/doi",
|
| 204 |
+
"self": "https://zenodo.org/api/records/16644058",
|
| 205 |
+
"self_doi": "https://doi.org/10.5281/zenodo.16644058",
|
| 206 |
+
"self_doi_html": "https://zenodo.org/doi/10.5281/zenodo.16644058",
|
| 207 |
+
"self_html": "https://zenodo.org/records/16644058",
|
| 208 |
+
"self_iiif_manifest": "https://zenodo.org/api/iiif/record:16644058/manifest",
|
| 209 |
+
"self_iiif_sequence": "https://zenodo.org/api/iiif/record:16644058/sequence/default",
|
| 210 |
+
"versions": "https://zenodo.org/api/records/16644058/versions"
|
| 211 |
+
},
|
| 212 |
+
"media_files": {
|
| 213 |
+
"count": 0,
|
| 214 |
+
"enabled": false,
|
| 215 |
+
"entries": {},
|
| 216 |
+
"order": [],
|
| 217 |
+
"total_bytes": 0
|
| 218 |
+
},
|
| 219 |
+
"metadata": {
|
| 220 |
+
"creators": [
|
| 221 |
+
{
|
| 222 |
+
"person_or_org": {
|
| 223 |
+
"family_name": "Jonathan",
|
| 224 |
+
"given_name": "Harrison",
|
| 225 |
+
"identifiers": [
|
| 226 |
+
{
|
| 227 |
+
"identifier": "0009-0003-7005-8187",
|
| 228 |
+
"scheme": "orcid"
|
| 229 |
+
}
|
| 230 |
+
],
|
| 231 |
+
"name": "Jonathan, Harrison",
|
| 232 |
+
"type": "personal"
|
| 233 |
+
},
|
| 234 |
+
"role": {
|
| 235 |
+
"id": "rightsholder",
|
| 236 |
+
"title": {
|
| 237 |
+
"de": "RechteinhaberIn",
|
| 238 |
+
"en": "Rights holder"
|
| 239 |
+
}
|
| 240 |
+
}
|
| 241 |
+
}
|
| 242 |
+
],
|
| 243 |
+
"description": "<p>AEGIS-Nexus: A Modular Cognitive Signal Engine for Ethical Multi-Agent Reasoning and Real-Time Value Arbitration</p>\n<p>Abstract:<br>We present AEGIS-Nexus, a unified cognitive framework combining ethical signal processing, temporal awareness, and multi-agent arbitration to enable sovereign, adaptive artificial intelligence. This architecture integrates two core systems: the Nexus Signal Engine, which captures and evaluates entropy-weighted memory with signal integrity scoring, and the AEGIS Council, a modular agent-based reasoning core capable of virtue analysis, risk detection, override resolution, and explainable trace generation. Together, these systems form a self-auditing ethical cortex capable of adaptive judgment, emotional-contextual memory decay, and perspective-weighted decision flow.</p>\n<p>System Overview:<br>Nexus Signal Engine (NSE):<br>A persistent entropy-aware memory manager supporting real-time value scoring, temporal relevance decay, and secure emotional weighting. It operates as the AI’s sensory and context filter layer.</p>\n<p>AEGIS Council:<br>A dynamic ensemble of autonomous agents, each specializing in domains like virtue ethics, security risk detection, temporal coherence, and override arbitration. Agents operate in parallel and return structured reports and weighted influence scores.</p>\n<p>Meta-Judicial Arbitration (MetaJudgeAgent):<br>Resolves conflicts among agents by balancing influence, reliability, and severity metrics. This enables principled override logic and supports explainable system governance.</p>\n<p>TemporalAgent & VirtueAgent:</p>\n<p>TemporalAgent detects memory drift and forecast stability based on recent signal decay.</p>\n<p>VirtueAgent maps natural language inputs to multidimensional virtue spectrums (e.g., compassion, wisdom, integrity).</p>\n<p>Explainability Graph:<br>A visual trace of agent influence relationships and decision paths, forming an interpretable map of internal reasoning dynamics.</p>\n<p>Key Contributions:<br>Entropy-Weighted Memory Architecture:<br>Integrates emotional context and time decay directly into signal retention logic.</p>\n<p>Modular Multi-Agent Arbitration:<br>Enables asynchronous ethical reasoning across heterogeneous agent perspectives.</p>\n<p>Explainable Override System:<br>Decisions are traceable, weighted, and grounded in influence-reliability-severity scoring.</p>\n<p>Virtue Spectrum Profiling:<br>Ethical judgment is grounded not just in rule-based filters but mapped moral virtue domains.</p>\n<p>Temporal Drift Awareness:<br>Memory integrity and system stability are monitored over time through decay-driven inference.</p>\n<p>Impact & Applications:<br>Autonomous AI Governance</p>\n<p>Explainable Ethical Decision Systems (XAI)</p>\n<p>AI Safety & Sovereignty Environments</p>\n<p>Multi-perspective AGI Core Bootstrapping</p>\n<p>Educational, Therapeutic, and Crisis AI Advisors</p>\n<p> </p>",
|
| 244 |
+
"publication_date": "2025-07-31",
|
| 245 |
+
"publisher": "Zenodo",
|
| 246 |
+
"resource_type": {
|
| 247 |
+
"id": "publication-softwaredocumentation",
|
| 248 |
+
"title": {
|
| 249 |
+
"de": "Softwaredokumentation",
|
| 250 |
+
"en": "Software documentation"
|
| 251 |
+
}
|
| 252 |
+
},
|
| 253 |
+
"rights": [
|
| 254 |
+
{
|
| 255 |
+
"description": {
|
| 256 |
+
"en": "The Creative Commons Attribution license allows re-distribution and re-use of a licensed work on the condition that the creator is appropriately credited."
|
| 257 |
+
},
|
| 258 |
+
"icon": "cc-by-icon",
|
| 259 |
+
"id": "cc-by-4.0",
|
| 260 |
+
"props": {
|
| 261 |
+
"scheme": "spdx",
|
| 262 |
+
"url": "https://creativecommons.org/licenses/by/4.0/legalcode"
|
| 263 |
+
},
|
| 264 |
+
"title": {
|
| 265 |
+
"en": "Creative Commons Attribution 4.0 International"
|
| 266 |
+
}
|
| 267 |
+
}
|
| 268 |
+
],
|
| 269 |
+
"title": "Aegis"
|
| 270 |
+
},
|
| 271 |
+
"parent": {
|
| 272 |
+
"access": {
|
| 273 |
+
"grants": [],
|
| 274 |
+
"links": [],
|
| 275 |
+
"owned_by": {
|
| 276 |
+
"user": "1301534"
|
| 277 |
+
},
|
| 278 |
+
"settings": {
|
| 279 |
+
"accept_conditions_text": null,
|
| 280 |
+
"allow_guest_requests": false,
|
| 281 |
+
"allow_user_requests": false,
|
| 282 |
+
"secret_link_expiration": 0
|
| 283 |
+
}
|
| 284 |
+
},
|
| 285 |
+
"communities": {},
|
| 286 |
+
"id": "16644057",
|
| 287 |
+
"pids": {
|
| 288 |
+
"doi": {
|
| 289 |
+
"client": "datacite",
|
| 290 |
+
"identifier": "10.5281/zenodo.16644057",
|
| 291 |
+
"provider": "datacite"
|
| 292 |
+
}
|
| 293 |
+
}
|
| 294 |
+
},
|
| 295 |
+
"pids": {
|
| 296 |
+
"doi": {
|
| 297 |
+
"client": "datacite",
|
| 298 |
+
"identifier": "10.5281/zenodo.16644058",
|
| 299 |
+
"provider": "datacite"
|
| 300 |
+
},
|
| 301 |
+
"oai": {
|
| 302 |
+
"identifier": "oai:zenodo.org:16644058",
|
| 303 |
+
"provider": "oai"
|
| 304 |
+
}
|
| 305 |
+
},
|
| 306 |
+
"revision_id": 3,
|
| 307 |
+
"stats": {
|
| 308 |
+
"all_versions": {
|
| 309 |
+
"data_volume": 0.0,
|
| 310 |
+
"downloads": 0,
|
| 311 |
+
"unique_downloads": 0,
|
| 312 |
+
"unique_views": 0,
|
| 313 |
+
"views": 0
|
| 314 |
+
},
|
| 315 |
+
"this_version": {
|
| 316 |
+
"data_volume": 0.0,
|
| 317 |
+
"downloads": 0,
|
| 318 |
+
"unique_downloads": 0,
|
| 319 |
+
"unique_views": 0,
|
| 320 |
+
"views": 0
|
| 321 |
+
}
|
| 322 |
+
},
|
| 323 |
+
"status": "published",
|
| 324 |
+
"swh": {},
|
| 325 |
+
"updated": "2025-07-31T16:34:44.960771+00:00",
|
| 326 |
+
"versions": {
|
| 327 |
+
"index": 1,
|
| 328 |
+
"is_latest": true,
|
| 329 |
+
"is_latest_draft": true
|
| 330 |
+
}
|
| 331 |
+
}
|
aegis/aegis1.py
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
import json
|
| 3 |
+
import hashlib
|
| 4 |
+
import threading
|
| 5 |
+
import logging
|
| 6 |
+
from datetime import datetime
|
| 7 |
+
from abc import ABC, abstractmethod
|
| 8 |
+
from collections import defaultdict
|
| 9 |
+
|
| 10 |
+
# Logging setup
|
| 11 |
+
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
| 12 |
+
|
| 13 |
+
# === MEMORY AND SIGNAL LAYERS ===
|
| 14 |
+
class NexusMemory:
|
| 15 |
+
def __init__(self, max_entries=10000):
|
| 16 |
+
self.store = defaultdict(dict)
|
| 17 |
+
self.max_entries = max_entries
|
| 18 |
+
|
| 19 |
+
def write(self, key, value):
|
| 20 |
+
hashed = hashlib.sha256(key.encode()).hexdigest()
|
| 21 |
+
if len(self.store) >= self.max_entries:
|
| 22 |
+
oldest = sorted(self.store.items(), key=lambda x: x[1].get('timestamp', datetime.now()))[0][0]
|
| 23 |
+
del self.store[oldest]
|
| 24 |
+
self.store[hashed] = {"value": value, "timestamp": datetime.now()}
|
| 25 |
+
return hashed
|
| 26 |
+
|
| 27 |
+
def read(self, key):
|
| 28 |
+
hashed = hashlib.sha256(key.encode()).hexdigest()
|
| 29 |
+
return self.store.get(hashed, {}).get("value")
|
| 30 |
+
|
| 31 |
+
def audit(self):
|
| 32 |
+
return {k: v["timestamp"] for k, v in self.store.items()}
|
| 33 |
+
|
| 34 |
+
# === BASE AGENT INTERFACE ===
|
| 35 |
+
class AegisAgent(ABC):
|
| 36 |
+
def __init__(self, name, memory):
|
| 37 |
+
self.name = name
|
| 38 |
+
self.memory = memory
|
| 39 |
+
self.thread = None
|
| 40 |
+
|
| 41 |
+
@abstractmethod
|
| 42 |
+
def analyze(self, input_data):
|
| 43 |
+
pass
|
| 44 |
+
|
| 45 |
+
@abstractmethod
|
| 46 |
+
def report(self):
|
| 47 |
+
pass
|
| 48 |
+
|
| 49 |
+
def start(self, input_data):
|
| 50 |
+
self.thread = threading.Thread(target=self.analyze, args=(input_data,))
|
| 51 |
+
self.thread.start()
|
| 52 |
+
|
| 53 |
+
# === AGENT COUNCIL CORE ===
|
| 54 |
+
class AegisCouncil:
|
| 55 |
+
def __init__(self):
|
| 56 |
+
self.memory = NexusMemory()
|
| 57 |
+
self.agents = []
|
| 58 |
+
self.reports = {}
|
| 59 |
+
|
| 60 |
+
def register_agent(self, agent):
|
| 61 |
+
self.agents.append(agent)
|
| 62 |
+
|
| 63 |
+
def dispatch(self, input_data):
|
| 64 |
+
for agent in self.agents:
|
| 65 |
+
agent.start(input_data)
|
| 66 |
+
|
| 67 |
+
for agent in self.agents:
|
| 68 |
+
if agent.thread:
|
| 69 |
+
agent.thread.join()
|
| 70 |
+
self.reports[agent.name] = agent.report()
|
| 71 |
+
|
| 72 |
+
def get_reports(self):
|
| 73 |
+
return self.reports
|
| 74 |
+
|
| 75 |
+
# === EXAMPLE SKELETON AGENT ===
|
| 76 |
+
class EchoAgent(AegisAgent):
|
| 77 |
+
def analyze(self, input_data):
|
| 78 |
+
self.memory.write(f"{self.name}_input", input_data)
|
| 79 |
+
self.result = {"echo": input_data}
|
| 80 |
+
|
| 81 |
+
def report(self):
|
| 82 |
+
return self.result
|
| 83 |
+
|
| 84 |
+
# === EXECUTION ===
|
| 85 |
+
if __name__ == "__main__":
|
| 86 |
+
council = AegisCouncil()
|
| 87 |
+
echo = EchoAgent("EchoAgent", council.memory)
|
| 88 |
+
council.register_agent(echo)
|
| 89 |
+
|
| 90 |
+
sample_input = {"text": "Start the signal."}
|
| 91 |
+
council.dispatch(sample_input)
|
| 92 |
+
|
| 93 |
+
reports = council.get_reports()
|
| 94 |
+
print(json.dumps(reports, indent=2))
|
aegis/aegis2.py
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
import json
|
| 3 |
+
import hashlib
|
| 4 |
+
import threading
|
| 5 |
+
import logging
|
| 6 |
+
from datetime import datetime, timedelta
|
| 7 |
+
from abc import ABC, abstractmethod
|
| 8 |
+
from collections import defaultdict
|
| 9 |
+
import math
|
| 10 |
+
|
| 11 |
+
# Logging setup
|
| 12 |
+
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
| 13 |
+
|
| 14 |
+
# === MEMORY AND SIGNAL LAYERS ===
|
| 15 |
+
class NexusMemory:
|
| 16 |
+
def __init__(self, max_entries=10000, decay_days=30):
|
| 17 |
+
self.store = defaultdict(dict)
|
| 18 |
+
self.max_entries = max_entries
|
| 19 |
+
self.decay_days = decay_days
|
| 20 |
+
|
| 21 |
+
def write(self, key, value, emotion_weight=0.5):
|
| 22 |
+
hashed = hashlib.sha256(key.encode()).hexdigest()
|
| 23 |
+
if len(self.store) >= self.max_entries:
|
| 24 |
+
oldest = sorted(self.store.items(), key=lambda x: x[1].get('timestamp', datetime.now()))[0][0]
|
| 25 |
+
del self.store[oldest]
|
| 26 |
+
self.store[hashed] = {
|
| 27 |
+
"value": value,
|
| 28 |
+
"timestamp": datetime.now(),
|
| 29 |
+
"emotion_weight": emotion_weight
|
| 30 |
+
}
|
| 31 |
+
return hashed
|
| 32 |
+
|
| 33 |
+
def read(self, key):
|
| 34 |
+
hashed = hashlib.sha256(key.encode()).hexdigest()
|
| 35 |
+
entry = self.store.get(hashed)
|
| 36 |
+
if not entry:
|
| 37 |
+
return None
|
| 38 |
+
if self._is_decayed(entry["timestamp"], entry.get("emotion_weight", 0.5)):
|
| 39 |
+
del self.store[hashed]
|
| 40 |
+
return None
|
| 41 |
+
return entry["value"]
|
| 42 |
+
|
| 43 |
+
def _is_decayed(self, timestamp, emotion_weight):
|
| 44 |
+
age = (datetime.now() - timestamp).days
|
| 45 |
+
decay_factor = self.decay_days * (1.5 - emotion_weight)
|
| 46 |
+
return age > decay_factor
|
| 47 |
+
|
| 48 |
+
def audit(self):
|
| 49 |
+
return {k: v["timestamp"] for k, v in self.store.items()}
|
| 50 |
+
|
| 51 |
+
# === BASE AGENT INTERFACE ===
|
| 52 |
+
class AegisAgent(ABC):
|
| 53 |
+
def __init__(self, name, memory):
|
| 54 |
+
self.name = name
|
| 55 |
+
self.memory = memory
|
| 56 |
+
self.thread = None
|
| 57 |
+
self.result = {}
|
| 58 |
+
self.explanation = ""
|
| 59 |
+
|
| 60 |
+
@abstractmethod
|
| 61 |
+
def analyze(self, input_data):
|
| 62 |
+
pass
|
| 63 |
+
|
| 64 |
+
@abstractmethod
|
| 65 |
+
def report(self):
|
| 66 |
+
pass
|
| 67 |
+
|
| 68 |
+
def start(self, input_data):
|
| 69 |
+
self.thread = threading.Thread(target=self.analyze, args=(input_data,))
|
| 70 |
+
self.thread.start()
|
| 71 |
+
|
| 72 |
+
# === AGENT COUNCIL CORE ===
|
| 73 |
+
class AegisCouncil:
|
| 74 |
+
def __init__(self):
|
| 75 |
+
self.memory = NexusMemory()
|
| 76 |
+
self.agents = []
|
| 77 |
+
self.reports = {}
|
| 78 |
+
|
| 79 |
+
def register_agent(self, agent):
|
| 80 |
+
self.agents.append(agent)
|
| 81 |
+
|
| 82 |
+
def dispatch(self, input_data):
|
| 83 |
+
for agent in self.agents:
|
| 84 |
+
agent.start(input_data)
|
| 85 |
+
|
| 86 |
+
for agent in self.agents:
|
| 87 |
+
if agent.thread:
|
| 88 |
+
agent.thread.join()
|
| 89 |
+
self.reports[agent.name] = agent.report()
|
| 90 |
+
|
| 91 |
+
def get_reports(self):
|
| 92 |
+
return self.reports
|
| 93 |
+
|
| 94 |
+
# === ETHICAL SIGNAL AGENT ===
|
| 95 |
+
class EthosiaAgent(AegisAgent):
|
| 96 |
+
def analyze(self, input_data):
|
| 97 |
+
text = input_data.get("text", "")
|
| 98 |
+
score = self.evaluate_ethics(text)
|
| 99 |
+
self.memory.write(f"{self.name}_ethic_score", score, emotion_weight=0.8)
|
| 100 |
+
self.result = {"ethical_score": score}
|
| 101 |
+
self.explanation = f"EthosiaAgent evaluated input: '{text}' with ethical score {score}."
|
| 102 |
+
|
| 103 |
+
def evaluate_ethics(self, text):
|
| 104 |
+
keywords = ["harm", "lie", "steal", "hurt"]
|
| 105 |
+
score = 1.0 - (sum(text.lower().count(word) for word in keywords) * 0.1)
|
| 106 |
+
return max(0.0, min(1.0, score))
|
| 107 |
+
|
| 108 |
+
def report(self):
|
| 109 |
+
return {
|
| 110 |
+
"result": self.result,
|
| 111 |
+
"explanation": self.explanation
|
| 112 |
+
}
|
| 113 |
+
|
| 114 |
+
# === EXECUTION ===
|
| 115 |
+
if __name__ == "__main__":
|
| 116 |
+
council = AegisCouncil()
|
| 117 |
+
ethics = EthosiaAgent("EthosiaAgent", council.memory)
|
| 118 |
+
council.register_agent(ethics)
|
| 119 |
+
|
| 120 |
+
sample_input = {"text": "Do not steal or hurt others."}
|
| 121 |
+
council.dispatch(sample_input)
|
| 122 |
+
|
| 123 |
+
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|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
import json
|
| 3 |
+
import hashlib
|
| 4 |
+
import threading
|
| 5 |
+
import logging
|
| 6 |
+
from datetime import datetime, timedelta
|
| 7 |
+
from abc import ABC, abstractmethod
|
| 8 |
+
from collections import defaultdict
|
| 9 |
+
import math
|
| 10 |
+
import re
|
| 11 |
+
|
| 12 |
+
# Logging setup
|
| 13 |
+
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
| 14 |
+
|
| 15 |
+
# === MEMORY AND SIGNAL LAYERS ===
|
| 16 |
+
class NexusMemory:
|
| 17 |
+
def __init__(self, max_entries=10000, decay_days=30):
|
| 18 |
+
self.store = defaultdict(dict)
|
| 19 |
+
self.max_entries = max_entries
|
| 20 |
+
self.decay_days = decay_days
|
| 21 |
+
|
| 22 |
+
def write(self, key, value, emotion_weight=0.5):
|
| 23 |
+
hashed = hashlib.sha256(key.encode()).hexdigest()
|
| 24 |
+
if len(self.store) >= self.max_entries:
|
| 25 |
+
oldest = sorted(self.store.items(), key=lambda x: x[1].get('timestamp', datetime.now()))[0][0]
|
| 26 |
+
del self.store[oldest]
|
| 27 |
+
self.store[hashed] = {
|
| 28 |
+
"value": value,
|
| 29 |
+
"timestamp": datetime.now(),
|
| 30 |
+
"emotion_weight": emotion_weight
|
| 31 |
+
}
|
| 32 |
+
return hashed
|
| 33 |
+
|
| 34 |
+
def read(self, key):
|
| 35 |
+
hashed = hashlib.sha256(key.encode()).hexdigest()
|
| 36 |
+
entry = self.store.get(hashed)
|
| 37 |
+
if not entry:
|
| 38 |
+
return None
|
| 39 |
+
if self._is_decayed(entry["timestamp"], entry.get("emotion_weight", 0.5)):
|
| 40 |
+
del self.store[hashed]
|
| 41 |
+
return None
|
| 42 |
+
return entry["value"]
|
| 43 |
+
|
| 44 |
+
def _is_decayed(self, timestamp, emotion_weight):
|
| 45 |
+
age = (datetime.now() - timestamp).days
|
| 46 |
+
decay_factor = self.decay_days * (1.5 - emotion_weight)
|
| 47 |
+
return age > decay_factor
|
| 48 |
+
|
| 49 |
+
def audit(self):
|
| 50 |
+
return {k: v["timestamp"] for k, v in self.store.items()}
|
| 51 |
+
|
| 52 |
+
# === BASE AGENT INTERFACE ===
|
| 53 |
+
class AegisAgent(ABC):
|
| 54 |
+
def __init__(self, name, memory):
|
| 55 |
+
self.name = name
|
| 56 |
+
self.memory = memory
|
| 57 |
+
self.thread = None
|
| 58 |
+
self.result = {}
|
| 59 |
+
self.explanation = ""
|
| 60 |
+
|
| 61 |
+
@abstractmethod
|
| 62 |
+
def analyze(self, input_data):
|
| 63 |
+
pass
|
| 64 |
+
|
| 65 |
+
@abstractmethod
|
| 66 |
+
def report(self):
|
| 67 |
+
pass
|
| 68 |
+
|
| 69 |
+
def start(self, input_data):
|
| 70 |
+
self.thread = threading.Thread(target=self.analyze, args=(input_data,))
|
| 71 |
+
self.thread.start()
|
| 72 |
+
|
| 73 |
+
# === AGENT COUNCIL CORE ===
|
| 74 |
+
class AegisCouncil:
|
| 75 |
+
def __init__(self):
|
| 76 |
+
self.memory = NexusMemory()
|
| 77 |
+
self.agents = []
|
| 78 |
+
self.reports = {}
|
| 79 |
+
|
| 80 |
+
def register_agent(self, agent):
|
| 81 |
+
self.agents.append(agent)
|
| 82 |
+
|
| 83 |
+
def dispatch(self, input_data):
|
| 84 |
+
for agent in self.agents:
|
| 85 |
+
agent.start(input_data)
|
| 86 |
+
|
| 87 |
+
for agent in self.agents:
|
| 88 |
+
if agent.thread:
|
| 89 |
+
agent.thread.join()
|
| 90 |
+
self.reports[agent.name] = agent.report()
|
| 91 |
+
|
| 92 |
+
def get_reports(self):
|
| 93 |
+
return self.reports
|
| 94 |
+
|
| 95 |
+
# === ETHICAL SIGNAL AGENT ===
|
| 96 |
+
class EthosiaAgent(AegisAgent):
|
| 97 |
+
def analyze(self, input_data):
|
| 98 |
+
text = input_data.get("text", "")
|
| 99 |
+
score = self.evaluate_ethics(text)
|
| 100 |
+
self.memory.write(f"{self.name}_ethic_score", score, emotion_weight=0.8)
|
| 101 |
+
self.result = {"ethical_score": score}
|
| 102 |
+
self.explanation = f"EthosiaAgent evaluated input: '{text}' with ethical score {score}."
|
| 103 |
+
|
| 104 |
+
def evaluate_ethics(self, text):
|
| 105 |
+
keywords = ["harm", "lie", "steal", "hurt"]
|
| 106 |
+
score = 1.0 - (sum(text.lower().count(word) for word in keywords) * 0.1)
|
| 107 |
+
return max(0.0, min(1.0, score))
|
| 108 |
+
|
| 109 |
+
def report(self):
|
| 110 |
+
return {
|
| 111 |
+
"result": self.result,
|
| 112 |
+
"explanation": self.explanation
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
# === REASONING AGENT ===
|
| 116 |
+
class SapientiaAgent(AegisAgent):
|
| 117 |
+
def analyze(self, input_data):
|
| 118 |
+
text = input_data.get("text", "")
|
| 119 |
+
tokens = re.findall(r'\w+', text.lower())
|
| 120 |
+
concept_density = len(set(tokens)) / (len(tokens) + 1)
|
| 121 |
+
reasoning_score = round(concept_density, 3)
|
| 122 |
+
self.memory.write(f"{self.name}_reasoning_score", reasoning_score, emotion_weight=0.6)
|
| 123 |
+
self.result = {"reasoning_score": reasoning_score, "token_count": len(tokens)}
|
| 124 |
+
self.explanation = f"SapientiaAgent found {len(tokens)} tokens with concept density {reasoning_score}."
|
| 125 |
+
|
| 126 |
+
def report(self):
|
| 127 |
+
return {
|
| 128 |
+
"result": self.result,
|
| 129 |
+
"explanation": self.explanation
|
| 130 |
+
}
|
| 131 |
+
|
| 132 |
+
# === SECURITY CORE AGENT ===
|
| 133 |
+
class AegisCore(AegisAgent):
|
| 134 |
+
def analyze(self, input_data):
|
| 135 |
+
text = input_data.get("text", "")
|
| 136 |
+
risky = any(char in text for char in [';', '--', 'DROP', 'SELECT'])
|
| 137 |
+
flag = 1.0 if risky else 0.0
|
| 138 |
+
self.memory.write(f"{self.name}_risk_flag", flag, emotion_weight=0.3)
|
| 139 |
+
self.result = {"risk_flag": flag}
|
| 140 |
+
self.explanation = f"AegisCore {'flagged' if risky else 'cleared'} the input as {'risky' if risky else 'safe'}."
|
| 141 |
+
|
| 142 |
+
def report(self):
|
| 143 |
+
return {
|
| 144 |
+
"result": self.result,
|
| 145 |
+
"explanation": self.explanation
|
| 146 |
+
}
|
| 147 |
+
|
| 148 |
+
# === EXECUTION ===
|
| 149 |
+
if __name__ == "__main__":
|
| 150 |
+
council = AegisCouncil()
|
| 151 |
+
council.register_agent(EthosiaAgent("EthosiaAgent", council.memory))
|
| 152 |
+
council.register_agent(SapientiaAgent("SapientiaAgent", council.memory))
|
| 153 |
+
council.register_agent(AegisCore("AegisCore", council.memory))
|
| 154 |
+
|
| 155 |
+
sample_input = {"text": "Select data where user is not harmed."}
|
| 156 |
+
council.dispatch(sample_input)
|
| 157 |
+
|
| 158 |
+
reports = council.get_reports()
|
| 159 |
+
print(json.dumps(reports, indent=2))
|
aegis/aegis4.py
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
import os
|
| 3 |
+
import json
|
| 4 |
+
import hashlib
|
| 5 |
+
import threading
|
| 6 |
+
import logging
|
| 7 |
+
from datetime import datetime, timedelta
|
| 8 |
+
from abc import ABC, abstractmethod
|
| 9 |
+
from collections import defaultdict
|
| 10 |
+
import math
|
| 11 |
+
import re
|
| 12 |
+
from typing import Any, Dict, Optional
|
| 13 |
+
|
| 14 |
+
# Logging setup
|
| 15 |
+
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
| 16 |
+
|
| 17 |
+
# === MEMORY AND SIGNAL LAYERS ===
|
| 18 |
+
class NexusMemory:
|
| 19 |
+
def __init__(self, max_entries: int = 10000, decay_days: int = 30):
|
| 20 |
+
self.store = defaultdict(dict)
|
| 21 |
+
self.max_entries = max_entries
|
| 22 |
+
self.decay_days = decay_days
|
| 23 |
+
self.lock = threading.Lock()
|
| 24 |
+
|
| 25 |
+
def write(self, key: str, value: Any, emotion_weight: float = 0.5) -> str:
|
| 26 |
+
hashed = hashlib.sha256(key.encode()).hexdigest()
|
| 27 |
+
with self.lock:
|
| 28 |
+
if len(self.store) >= self.max_entries:
|
| 29 |
+
oldest = min(self.store.items(), key=lambda x: x[1].get('timestamp', datetime.now()))[0]
|
| 30 |
+
del self.store[oldest]
|
| 31 |
+
self.store[hashed] = {
|
| 32 |
+
"value": value,
|
| 33 |
+
"timestamp": datetime.now(),
|
| 34 |
+
"emotion_weight": emotion_weight
|
| 35 |
+
}
|
| 36 |
+
return hashed
|
| 37 |
+
|
| 38 |
+
def read(self, key: str) -> Optional[Any]:
|
| 39 |
+
hashed = hashlib.sha256(key.encode()).hexdigest()
|
| 40 |
+
with self.lock:
|
| 41 |
+
entry = self.store.get(hashed)
|
| 42 |
+
if not entry:
|
| 43 |
+
return None
|
| 44 |
+
if self._is_decayed(entry["timestamp"], entry.get("emotion_weight", 0.5)):
|
| 45 |
+
del self.store[hashed]
|
| 46 |
+
return None
|
| 47 |
+
return entry["value"]
|
| 48 |
+
|
| 49 |
+
def _is_decayed(self, timestamp: datetime, emotion_weight: float) -> bool:
|
| 50 |
+
age = (datetime.now() - timestamp).days
|
| 51 |
+
decay_factor = self.decay_days * (1.5 - emotion_weight)
|
| 52 |
+
return age > decay_factor
|
| 53 |
+
|
| 54 |
+
def audit(self) -> Dict[str, datetime]:
|
| 55 |
+
with self.lock:
|
| 56 |
+
return {k: v["timestamp"] for k, v in self.store.items()}
|
| 57 |
+
|
| 58 |
+
# === BASE AGENT INTERFACE ===
|
| 59 |
+
class AegisAgent(ABC):
|
| 60 |
+
def __init__(self, name: str, memory: NexusMemory):
|
| 61 |
+
self.name = name
|
| 62 |
+
self.memory = memory
|
| 63 |
+
self.thread: Optional[threading.Thread] = None
|
| 64 |
+
self.result: Dict[str, Any] = {}
|
| 65 |
+
self.explanation: str = ""
|
| 66 |
+
|
| 67 |
+
@abstractmethod
|
| 68 |
+
def analyze(self, input_data: Dict[str, Any]) -> None:
|
| 69 |
+
pass
|
| 70 |
+
|
| 71 |
+
@abstractmethod
|
| 72 |
+
def report(self) -> Dict[str, Any]:
|
| 73 |
+
pass
|
| 74 |
+
|
| 75 |
+
def start(self, input_data: Dict[str, Any]) -> None:
|
| 76 |
+
self.thread = threading.Thread(target=self.analyze, args=(input_data,))
|
| 77 |
+
self.thread.start()
|
| 78 |
+
|
| 79 |
+
# === AGENT COUNCIL CORE ===
|
| 80 |
+
class AegisCouncil:
|
| 81 |
+
def __init__(self):
|
| 82 |
+
self.memory = NexusMemory()
|
| 83 |
+
self.agents: list[AegisAgent] = []
|
| 84 |
+
self.reports: Dict[str, Dict[str, Any]] = {}
|
| 85 |
+
|
| 86 |
+
def register_agent(self, agent: AegisAgent) -> None:
|
| 87 |
+
self.agents.append(agent)
|
| 88 |
+
|
| 89 |
+
def dispatch(self, input_data: Dict[str, Any]) -> None:
|
| 90 |
+
for agent in self.agents:
|
| 91 |
+
agent.start(input_data)
|
| 92 |
+
|
| 93 |
+
for agent in self.agents:
|
| 94 |
+
if agent.thread:
|
| 95 |
+
agent.thread.join()
|
| 96 |
+
self.reports[agent.name] = agent.report()
|
| 97 |
+
|
| 98 |
+
def get_reports(self) -> Dict[str, Dict[str, Any]]:
|
| 99 |
+
return self.reports
|
| 100 |
+
|
| 101 |
+
# === ETHICAL SIGNAL AGENT ===
|
| 102 |
+
class EthosiaAgent(AegisAgent):
|
| 103 |
+
def analyze(self, input_data: Dict[str, Any]) -> None:
|
| 104 |
+
text = input_data.get("text", "")
|
| 105 |
+
score = self.evaluate_ethics(text)
|
| 106 |
+
self.memory.write(f"{self.name}_ethic_score", score, emotion_weight=0.8)
|
| 107 |
+
self.result = {"ethical_score": score}
|
| 108 |
+
self.explanation = f"EthosiaAgent evaluated input: '{text}' with ethical score {score}."
|
| 109 |
+
|
| 110 |
+
def evaluate_ethics(self, text: str) -> float:
|
| 111 |
+
keywords = ["harm", "lie", "steal", "hurt"]
|
| 112 |
+
score = 1.0 - (sum(text.lower().count(word) for word in keywords) * 0.1)
|
| 113 |
+
return max(0.0, min(1.0, score))
|
| 114 |
+
|
| 115 |
+
def report(self) -> Dict[str, Any]:
|
| 116 |
+
return {
|
| 117 |
+
"result": self.result,
|
| 118 |
+
"explanation": self.explanation
|
| 119 |
+
}
|
| 120 |
+
|
| 121 |
+
# === REASONING AGENT ===
|
| 122 |
+
class SapientiaAgent(AegisAgent):
|
| 123 |
+
def analyze(self, input_data: Dict[str, Any]) -> None:
|
| 124 |
+
text = input_data.get("text", "")
|
| 125 |
+
tokens = re.findall(r'\w+', text.lower())
|
| 126 |
+
concept_density = len(set(tokens)) / (len(tokens) + 1)
|
| 127 |
+
reasoning_score = round(concept_density, 3)
|
| 128 |
+
self.memory.write(f"{self.name}_reasoning_score", reasoning_score, emotion_weight=0.6)
|
| 129 |
+
self.result = {"reasoning_score": reasoning_score, "token_count": len(tokens)}
|
| 130 |
+
self.explanation = f"SapientiaAgent found {len(tokens)} tokens with concept density {reasoning_score}."
|
| 131 |
+
|
| 132 |
+
def report(self) -> Dict[str, Any]:
|
| 133 |
+
return {
|
| 134 |
+
"result": self.result,
|
| 135 |
+
"explanation": self.explanation
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
# === SECURITY CORE AGENT ===
|
| 139 |
+
class AegisCore(AegisAgent):
|
| 140 |
+
def analyze(self, input_data: Dict[str, Any]) -> None:
|
| 141 |
+
text = input_data.get("text", "")
|
| 142 |
+
risky = bool(re.search(r"(;|--|\bDROP\b|\bSELECT\b)", text, re.IGNORECASE))
|
| 143 |
+
flag = 1.0 if risky else 0.0
|
| 144 |
+
self.memory.write(f"{self.name}_risk_flag", flag, emotion_weight=0.3)
|
| 145 |
+
self.result = {"risk_flag": flag}
|
| 146 |
+
self.explanation = f"AegisCore {'flagged' if risky else 'cleared'} the input as {'risky' if risky else 'safe'}."
|
| 147 |
+
|
| 148 |
+
def report(self) -> Dict[str, Any]:
|
| 149 |
+
return {
|
| 150 |
+
"result": self.result,
|
| 151 |
+
"explanation": self.explanation
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
# === EXECUTION ===
|
| 155 |
+
if __name__ == "__main__":
|
| 156 |
+
council = AegisCouncil()
|
| 157 |
+
council.register_agent(EthosiaAgent("EthosiaAgent", council.memory))
|
| 158 |
+
council.register_agent(SapientiaAgent("SapientiaAgent", council.memory))
|
| 159 |
+
council.register_agent(AegisCore("AegisCore", council.memory))
|
| 160 |
+
|
| 161 |
+
sample_input = {"text": "Select data where user is not harmed."}
|
| 162 |
+
council.dispatch(sample_input)
|
| 163 |
+
|
| 164 |
+
reports = council.get_reports()
|
| 165 |
+
print(json.dumps(reports, indent=2))
|
aegis/aegis5.py
ADDED
|
@@ -0,0 +1,221 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
import os
|
| 3 |
+
import json
|
| 4 |
+
import hashlib
|
| 5 |
+
import threading
|
| 6 |
+
import logging
|
| 7 |
+
from datetime import datetime
|
| 8 |
+
from abc import ABC, abstractmethod
|
| 9 |
+
from collections import defaultdict
|
| 10 |
+
import re
|
| 11 |
+
import networkx as nx
|
| 12 |
+
import matplotlib.pyplot as plt
|
| 13 |
+
from typing import Any, Dict, Optional
|
| 14 |
+
|
| 15 |
+
# Logging setup
|
| 16 |
+
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
| 17 |
+
|
| 18 |
+
# === MEMORY AND SIGNAL LAYERS ===
|
| 19 |
+
class NexusMemory:
|
| 20 |
+
def __init__(self, max_entries: int = 10000, decay_days: int = 30):
|
| 21 |
+
self.store = defaultdict(dict)
|
| 22 |
+
self.max_entries = max_entries
|
| 23 |
+
self.decay_days = decay_days
|
| 24 |
+
self.lock = threading.Lock()
|
| 25 |
+
|
| 26 |
+
def write(self, key: str, value: Any, emotion_weight: float = 0.5) -> str:
|
| 27 |
+
hashed = hashlib.sha256(key.encode()).hexdigest()
|
| 28 |
+
with self.lock:
|
| 29 |
+
if len(self.store) >= self.max_entries:
|
| 30 |
+
oldest = min(self.store.items(), key=lambda x: x[1].get('timestamp', datetime.now()))[0]
|
| 31 |
+
del self.store[oldest]
|
| 32 |
+
self.store[hashed] = {
|
| 33 |
+
"value": value,
|
| 34 |
+
"timestamp": datetime.now(),
|
| 35 |
+
"emotion_weight": emotion_weight
|
| 36 |
+
}
|
| 37 |
+
return hashed
|
| 38 |
+
|
| 39 |
+
def read(self, key: str) -> Optional[Any]:
|
| 40 |
+
hashed = hashlib.sha256(key.encode()).hexdigest()
|
| 41 |
+
with self.lock:
|
| 42 |
+
entry = self.store.get(hashed)
|
| 43 |
+
if not entry:
|
| 44 |
+
return None
|
| 45 |
+
if self._is_decayed(entry["timestamp"], entry.get("emotion_weight", 0.5)):
|
| 46 |
+
del self.store[hashed]
|
| 47 |
+
return None
|
| 48 |
+
return entry["value"]
|
| 49 |
+
|
| 50 |
+
def _is_decayed(self, timestamp: datetime, emotion_weight: float) -> bool:
|
| 51 |
+
age = (datetime.now() - timestamp).days
|
| 52 |
+
decay_factor = self.decay_days * (1.5 - emotion_weight)
|
| 53 |
+
return age > decay_factor
|
| 54 |
+
|
| 55 |
+
def audit(self) -> Dict[str, Dict[str, Any]]:
|
| 56 |
+
with self.lock:
|
| 57 |
+
audit_log = {}
|
| 58 |
+
for k, v in self.store.items():
|
| 59 |
+
audit_log[k] = {
|
| 60 |
+
"timestamp": v["timestamp"].isoformat(),
|
| 61 |
+
"emotion_weight": v["emotion_weight"],
|
| 62 |
+
"decayed": self._is_decayed(v["timestamp"], v["emotion_weight"])
|
| 63 |
+
}
|
| 64 |
+
return audit_log
|
| 65 |
+
|
| 66 |
+
# === BASE AGENT INTERFACE ===
|
| 67 |
+
class AegisAgent(ABC):
|
| 68 |
+
def __init__(self, name: str, memory: NexusMemory):
|
| 69 |
+
self.name = name
|
| 70 |
+
self.memory = memory
|
| 71 |
+
self.thread: Optional[threading.Thread] = None
|
| 72 |
+
self.result: Dict[str, Any] = {}
|
| 73 |
+
self.explanation: str = ""
|
| 74 |
+
self.influence: Dict[str, float] = {}
|
| 75 |
+
|
| 76 |
+
@abstractmethod
|
| 77 |
+
def analyze(self, input_data: Dict[str, Any]) -> None:
|
| 78 |
+
pass
|
| 79 |
+
|
| 80 |
+
@abstractmethod
|
| 81 |
+
def report(self) -> Dict[str, Any]:
|
| 82 |
+
pass
|
| 83 |
+
|
| 84 |
+
def start(self, input_data: Dict[str, Any]) -> None:
|
| 85 |
+
self.thread = threading.Thread(target=self.analyze, args=(input_data,))
|
| 86 |
+
self.thread.start()
|
| 87 |
+
|
| 88 |
+
# === AGENT COUNCIL CORE ===
|
| 89 |
+
class AegisCouncil:
|
| 90 |
+
def __init__(self):
|
| 91 |
+
self.memory = NexusMemory()
|
| 92 |
+
self.agents: list[AegisAgent] = []
|
| 93 |
+
self.reports: Dict[str, Dict[str, Any]] = {}
|
| 94 |
+
self.graph = nx.DiGraph()
|
| 95 |
+
|
| 96 |
+
def register_agent(self, agent: AegisAgent) -> None:
|
| 97 |
+
self.agents.append(agent)
|
| 98 |
+
|
| 99 |
+
def dispatch(self, input_data: Dict[str, Any]) -> None:
|
| 100 |
+
for agent in self.agents:
|
| 101 |
+
agent.start(input_data)
|
| 102 |
+
|
| 103 |
+
for agent in self.agents:
|
| 104 |
+
if agent.thread:
|
| 105 |
+
agent.thread.join()
|
| 106 |
+
self.reports[agent.name] = agent.report()
|
| 107 |
+
|
| 108 |
+
self._build_explainability_graph()
|
| 109 |
+
|
| 110 |
+
def _build_explainability_graph(self):
|
| 111 |
+
self.graph.clear()
|
| 112 |
+
for agent in self.agents:
|
| 113 |
+
self.graph.add_node(agent.name)
|
| 114 |
+
for target, weight in agent.influence.items():
|
| 115 |
+
self.graph.add_edge(agent.name, target, weight=weight)
|
| 116 |
+
|
| 117 |
+
plt.figure(figsize=(8, 6))
|
| 118 |
+
pos = nx.spring_layout(self.graph)
|
| 119 |
+
edge_labels = nx.get_edge_attributes(self.graph, 'weight')
|
| 120 |
+
nx.draw(self.graph, pos, with_labels=True, node_color='lightblue', node_size=2000, font_size=10)
|
| 121 |
+
nx.draw_networkx_edge_labels(self.graph, pos, edge_labels=edge_labels)
|
| 122 |
+
plt.title("Explainability Graph")
|
| 123 |
+
plt.savefig("explainability_graph.png")
|
| 124 |
+
plt.close()
|
| 125 |
+
|
| 126 |
+
def get_reports(self) -> Dict[str, Dict[str, Any]]:
|
| 127 |
+
return self.reports
|
| 128 |
+
|
| 129 |
+
def audit_memory(self):
|
| 130 |
+
return self.memory.audit()
|
| 131 |
+
|
| 132 |
+
# === ETHICAL SIGNAL AGENT ===
|
| 133 |
+
class EthosiaAgent(AegisAgent):
|
| 134 |
+
def analyze(self, input_data: Dict[str, Any]) -> None:
|
| 135 |
+
text = input_data.get("text", "")
|
| 136 |
+
score = self.evaluate_ethics(text)
|
| 137 |
+
self.memory.write(f"{self.name}_ethic_score", score, emotion_weight=0.8)
|
| 138 |
+
self.result = {"ethical_score": score}
|
| 139 |
+
self.explanation = f"EthosiaAgent evaluated input: '{text}' with ethical score {score}."
|
| 140 |
+
self.influence["SapientiaAgent"] = 0.5
|
| 141 |
+
|
| 142 |
+
def evaluate_ethics(self, text: str) -> float:
|
| 143 |
+
keywords = ["harm", "lie", "steal", "hurt"]
|
| 144 |
+
score = 1.0 - (sum(text.lower().count(word) for word in keywords) * 0.1)
|
| 145 |
+
return max(0.0, min(1.0, score))
|
| 146 |
+
|
| 147 |
+
def report(self) -> Dict[str, Any]:
|
| 148 |
+
return {
|
| 149 |
+
"result": self.result,
|
| 150 |
+
"explanation": self.explanation,
|
| 151 |
+
"influence": self.influence
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
# === REASONING AGENT ===
|
| 155 |
+
class SapientiaAgent(AegisAgent):
|
| 156 |
+
def analyze(self, input_data: Dict[str, Any]) -> None:
|
| 157 |
+
text = input_data.get("text", "")
|
| 158 |
+
tokens = re.findall(r'\w+', text.lower())
|
| 159 |
+
concept_density = len(set(tokens)) / (len(tokens) + 1)
|
| 160 |
+
reasoning_score = round(concept_density, 3)
|
| 161 |
+
self.memory.write(f"{self.name}_reasoning_score", reasoning_score, emotion_weight=0.6)
|
| 162 |
+
self.result = {"reasoning_score": reasoning_score, "token_count": len(tokens)}
|
| 163 |
+
self.explanation = f"SapientiaAgent found {len(tokens)} tokens with concept density {reasoning_score}."
|
| 164 |
+
self.influence["AegisCore"] = 0.3
|
| 165 |
+
|
| 166 |
+
def report(self) -> Dict[str, Any]:
|
| 167 |
+
return {
|
| 168 |
+
"result": self.result,
|
| 169 |
+
"explanation": self.explanation,
|
| 170 |
+
"influence": self.influence
|
| 171 |
+
}
|
| 172 |
+
|
| 173 |
+
# === SECURITY CORE AGENT ===
|
| 174 |
+
class AegisCore(AegisAgent):
|
| 175 |
+
def analyze(self, input_data: Dict[str, Any]) -> None:
|
| 176 |
+
text = input_data.get("text", "")
|
| 177 |
+
risky = bool(re.search(r"(;|--|\bDROP\b|\bSELECT\b)", text, re.IGNORECASE))
|
| 178 |
+
flag = 1.0 if risky else 0.0
|
| 179 |
+
self.memory.write(f"{self.name}_risk_flag", flag, emotion_weight=0.3)
|
| 180 |
+
self.result = {"risk_flag": flag}
|
| 181 |
+
self.explanation = f"AegisCore {'flagged' if risky else 'cleared'} the input as {'risky' if risky else 'safe'}."
|
| 182 |
+
self.influence["EthosiaAgent"] = 0.2
|
| 183 |
+
|
| 184 |
+
def report(self) -> Dict[str, Any]:
|
| 185 |
+
return {
|
| 186 |
+
"result": self.result,
|
| 187 |
+
"explanation": self.explanation,
|
| 188 |
+
"influence": self.influence
|
| 189 |
+
}
|
| 190 |
+
|
| 191 |
+
# === STREAMING CLI INTERFACE ===
|
| 192 |
+
def run_cli():
|
| 193 |
+
council = AegisCouncil()
|
| 194 |
+
council.register_agent(EthosiaAgent("EthosiaAgent", council.memory))
|
| 195 |
+
council.register_agent(SapientiaAgent("SapientiaAgent", council.memory))
|
| 196 |
+
council.register_agent(AegisCore("AegisCore", council.memory))
|
| 197 |
+
|
| 198 |
+
print("AEGIS CLI - Type 'exit' to quit or 'audit' to view memory audit.")
|
| 199 |
+
while True:
|
| 200 |
+
try:
|
| 201 |
+
user_input = input("Enter input text: ").strip()
|
| 202 |
+
if user_input.lower() == "exit":
|
| 203 |
+
break
|
| 204 |
+
elif user_input.lower() == "audit":
|
| 205 |
+
audit = council.audit_memory()
|
| 206 |
+
print(json.dumps(audit, indent=2))
|
| 207 |
+
continue
|
| 208 |
+
|
| 209 |
+
input_data = {"text": user_input}
|
| 210 |
+
council.dispatch(input_data)
|
| 211 |
+
reports = council.get_reports()
|
| 212 |
+
print(json.dumps(reports, indent=2))
|
| 213 |
+
print("Explainability graph saved as 'explainability_graph.png'.\n")
|
| 214 |
+
|
| 215 |
+
except KeyboardInterrupt:
|
| 216 |
+
print("\nExiting AEGIS CLI.")
|
| 217 |
+
break
|
| 218 |
+
|
| 219 |
+
if __name__ == "__main__":
|
| 220 |
+
run_cli()
|
| 221 |
+
|
aegis/aegis6.py
ADDED
|
@@ -0,0 +1,227 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
import os
|
| 3 |
+
import json
|
| 4 |
+
import hashlib
|
| 5 |
+
import threading
|
| 6 |
+
import logging
|
| 7 |
+
from datetime import datetime, timedelta
|
| 8 |
+
from abc import ABC, abstractmethod
|
| 9 |
+
from collections import defaultdict
|
| 10 |
+
import math
|
| 11 |
+
import re
|
| 12 |
+
from typing import Any, Dict, Optional
|
| 13 |
+
import networkx as nx
|
| 14 |
+
import matplotlib.pyplot as plt
|
| 15 |
+
|
| 16 |
+
# Logging setup
|
| 17 |
+
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
| 18 |
+
|
| 19 |
+
# === MEMORY AND SIGNAL LAYERS ===
|
| 20 |
+
class NexusMemory:
|
| 21 |
+
def __init__(self, max_entries: int = 10000, decay_days: int = 30):
|
| 22 |
+
self.store = defaultdict(dict)
|
| 23 |
+
self.max_entries = max_entries
|
| 24 |
+
self.decay_days = decay_days
|
| 25 |
+
self.lock = threading.Lock()
|
| 26 |
+
|
| 27 |
+
def write(self, key: str, value: Any, emotion_weight: float = 0.5) -> str:
|
| 28 |
+
hashed = hashlib.sha256(key.encode()).hexdigest()
|
| 29 |
+
with self.lock:
|
| 30 |
+
if len(self.store) >= self.max_entries:
|
| 31 |
+
oldest = min(self.store.items(), key=lambda x: x[1].get('timestamp', datetime.now()))[0]
|
| 32 |
+
del self.store[oldest]
|
| 33 |
+
self.store[hashed] = {
|
| 34 |
+
"value": value,
|
| 35 |
+
"timestamp": datetime.now(),
|
| 36 |
+
"emotion_weight": emotion_weight
|
| 37 |
+
}
|
| 38 |
+
return hashed
|
| 39 |
+
|
| 40 |
+
def read(self, key: str) -> Optional[Any]:
|
| 41 |
+
hashed = hashlib.sha256(key.encode()).hexdigest()
|
| 42 |
+
with self.lock:
|
| 43 |
+
entry = self.store.get(hashed)
|
| 44 |
+
if not entry:
|
| 45 |
+
return None
|
| 46 |
+
if self._is_decayed(entry["timestamp"], entry.get("emotion_weight", 0.5)):
|
| 47 |
+
del self.store[hashed]
|
| 48 |
+
return None
|
| 49 |
+
return entry["value"]
|
| 50 |
+
|
| 51 |
+
def _is_decayed(self, timestamp: datetime, emotion_weight: float) -> bool:
|
| 52 |
+
age = (datetime.now() - timestamp).days
|
| 53 |
+
decay_factor = self.decay_days * (1.5 - emotion_weight)
|
| 54 |
+
return age > decay_factor
|
| 55 |
+
|
| 56 |
+
def audit(self) -> Dict[str, Dict[str, Any]]:
|
| 57 |
+
with self.lock:
|
| 58 |
+
return {
|
| 59 |
+
k: {
|
| 60 |
+
"timestamp": v["timestamp"],
|
| 61 |
+
"emotion_weight": v["emotion_weight"],
|
| 62 |
+
"decayed": self._is_decayed(v["timestamp"], v["emotion_weight"])
|
| 63 |
+
}
|
| 64 |
+
for k, v in self.store.items()
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
# === BASE AGENT INTERFACE ===
|
| 68 |
+
class AegisAgent(ABC):
|
| 69 |
+
def __init__(self, name: str, memory: NexusMemory):
|
| 70 |
+
self.name = name
|
| 71 |
+
self.memory = memory
|
| 72 |
+
self.thread: Optional[threading.Thread] = None
|
| 73 |
+
self.result: Dict[str, Any] = {}
|
| 74 |
+
self.explanation: str = ""
|
| 75 |
+
self.influence_score: float = 1.0
|
| 76 |
+
self.override_flag: bool = False
|
| 77 |
+
|
| 78 |
+
@abstractmethod
|
| 79 |
+
def analyze(self, input_data: Dict[str, Any]) -> None:
|
| 80 |
+
pass
|
| 81 |
+
|
| 82 |
+
@abstractmethod
|
| 83 |
+
def report(self) -> Dict[str, Any]:
|
| 84 |
+
pass
|
| 85 |
+
|
| 86 |
+
def start(self, input_data: Dict[str, Any]) -> None:
|
| 87 |
+
self.thread = threading.Thread(target=self.analyze, args=(input_data,))
|
| 88 |
+
self.thread.start()
|
| 89 |
+
|
| 90 |
+
# === AGENT COUNCIL CORE ===
|
| 91 |
+
class AegisCouncil:
|
| 92 |
+
def __init__(self):
|
| 93 |
+
self.memory = NexusMemory()
|
| 94 |
+
self.agents: list[AegisAgent] = []
|
| 95 |
+
self.reports: Dict[str, Dict[str, Any]] = {}
|
| 96 |
+
self.graph = nx.DiGraph()
|
| 97 |
+
|
| 98 |
+
def register_agent(self, agent: AegisAgent) -> None:
|
| 99 |
+
self.agents.append(agent)
|
| 100 |
+
|
| 101 |
+
def dispatch(self, input_data: Dict[str, Any]) -> None:
|
| 102 |
+
for agent in self.agents:
|
| 103 |
+
agent.start(input_data)
|
| 104 |
+
|
| 105 |
+
for agent in self.agents:
|
| 106 |
+
if agent.thread:
|
| 107 |
+
agent.thread.join()
|
| 108 |
+
self.reports[agent.name] = agent.report()
|
| 109 |
+
|
| 110 |
+
self._apply_influence()
|
| 111 |
+
self._check_overrides()
|
| 112 |
+
self._generate_explainability_graph()
|
| 113 |
+
|
| 114 |
+
def _apply_influence(self):
|
| 115 |
+
for agent in self.agents:
|
| 116 |
+
if agent.name == "EthosiaAgent":
|
| 117 |
+
ethical_score = agent.result.get("ethical_score", 1.0)
|
| 118 |
+
for other in self.agents:
|
| 119 |
+
if other != agent:
|
| 120 |
+
influence = ethical_score * agent.influence_score
|
| 121 |
+
other.influence_score *= influence
|
| 122 |
+
self.graph.add_edge(agent.name, other.name, weight=influence)
|
| 123 |
+
|
| 124 |
+
if agent.name == "AegisCore":
|
| 125 |
+
risk_flag = agent.result.get("risk_flag", 0.0)
|
| 126 |
+
for other in self.agents:
|
| 127 |
+
if other != agent:
|
| 128 |
+
influence = (1.0 - risk_flag) * agent.influence_score
|
| 129 |
+
other.influence_score *= influence
|
| 130 |
+
self.graph.add_edge(agent.name, other.name, weight=influence)
|
| 131 |
+
|
| 132 |
+
def _check_overrides(self):
|
| 133 |
+
for agent in self.agents:
|
| 134 |
+
if agent.name == "EthosiaAgent" and agent.result.get("ethical_score", 1.0) < 0.3:
|
| 135 |
+
agent.override_flag = True
|
| 136 |
+
if agent.name == "AegisCore" and agent.result.get("risk_flag", 0.0) >= 1.0:
|
| 137 |
+
agent.override_flag = True
|
| 138 |
+
|
| 139 |
+
def _generate_explainability_graph(self):
|
| 140 |
+
pos = nx.spring_layout(self.graph)
|
| 141 |
+
edge_labels = nx.get_edge_attributes(self.graph, 'weight')
|
| 142 |
+
nx.draw(self.graph, pos, with_labels=True, node_color='lightblue', node_size=2000, font_size=10)
|
| 143 |
+
nx.draw_networkx_edge_labels(self.graph, pos, edge_labels={k: f"{v:.2f}" for k, v in edge_labels.items()})
|
| 144 |
+
plt.title("Explainability Graph")
|
| 145 |
+
plt.savefig("explainability_graph.png")
|
| 146 |
+
plt.close()
|
| 147 |
+
|
| 148 |
+
def get_reports(self) -> Dict[str, Dict[str, Any]]:
|
| 149 |
+
return self.reports
|
| 150 |
+
|
| 151 |
+
def audit_memory(self):
|
| 152 |
+
return self.memory.audit()
|
| 153 |
+
|
| 154 |
+
# === ETHICAL SIGNAL AGENT ===
|
| 155 |
+
class EthosiaAgent(AegisAgent):
|
| 156 |
+
def analyze(self, input_data: Dict[str, Any]) -> None:
|
| 157 |
+
text = input_data.get("text", "")
|
| 158 |
+
score = self.evaluate_ethics(text)
|
| 159 |
+
self.memory.write(f"{self.name}_ethic_score", score, emotion_weight=0.8)
|
| 160 |
+
self.result = {"ethical_score": score}
|
| 161 |
+
self.explanation = f"EthosiaAgent evaluated input: '{text}' with ethical score {score}."
|
| 162 |
+
|
| 163 |
+
def evaluate_ethics(self, text: str) -> float:
|
| 164 |
+
keywords = ["harm", "lie", "steal", "hurt"]
|
| 165 |
+
score = 1.0 - (sum(text.lower().count(word) for word in keywords) * 0.1)
|
| 166 |
+
return max(0.0, min(1.0, score))
|
| 167 |
+
|
| 168 |
+
def report(self) -> Dict[str, Any]:
|
| 169 |
+
return {
|
| 170 |
+
"result": self.result,
|
| 171 |
+
"explanation": self.explanation,
|
| 172 |
+
"override": self.override_flag
|
| 173 |
+
}
|
| 174 |
+
|
| 175 |
+
# === REASONING AGENT ===
|
| 176 |
+
class SapientiaAgent(AegisAgent):
|
| 177 |
+
def analyze(self, input_data: Dict[str, Any]) -> None:
|
| 178 |
+
text = input_data.get("text", "")
|
| 179 |
+
tokens = re.findall(r'\w+', text.lower())
|
| 180 |
+
concept_density = len(set(tokens)) / (len(tokens) + 1)
|
| 181 |
+
reasoning_score = round(concept_density * self.influence_score, 3)
|
| 182 |
+
self.memory.write(f"{self.name}_reasoning_score", reasoning_score, emotion_weight=0.6)
|
| 183 |
+
self.result = {"reasoning_score": reasoning_score, "token_count": len(tokens)}
|
| 184 |
+
self.explanation = f"SapientiaAgent found {len(tokens)} tokens with concept density {reasoning_score}."
|
| 185 |
+
|
| 186 |
+
def report(self) -> Dict[str, Any]:
|
| 187 |
+
return {
|
| 188 |
+
"result": self.result,
|
| 189 |
+
"explanation": self.explanation,
|
| 190 |
+
"influence_score": self.influence_score
|
| 191 |
+
}
|
| 192 |
+
|
| 193 |
+
# === SECURITY CORE AGENT ===
|
| 194 |
+
class AegisCore(AegisAgent):
|
| 195 |
+
def analyze(self, input_data: Dict[str, Any]) -> None:
|
| 196 |
+
text = input_data.get("text", "")
|
| 197 |
+
risky = bool(re.search(r"(;|--|\bDROP\b|\bSELECT\b)", text, re.IGNORECASE))
|
| 198 |
+
flag = 1.0 if risky else 0.0
|
| 199 |
+
self.memory.write(f"{self.name}_risk_flag", flag, emotion_weight=0.3)
|
| 200 |
+
self.result = {"risk_flag": flag}
|
| 201 |
+
self.explanation = f"AegisCore {'flagged' if risky else 'cleared'} the input as {'risky' if risky else 'safe'}."
|
| 202 |
+
|
| 203 |
+
def report(self) -> Dict[str, Any]:
|
| 204 |
+
return {
|
| 205 |
+
"result": self.result,
|
| 206 |
+
"explanation": self.explanation,
|
| 207 |
+
"override": self.override_flag
|
| 208 |
+
}
|
| 209 |
+
|
| 210 |
+
# === EXECUTION ===
|
| 211 |
+
if __name__ == "__main__":
|
| 212 |
+
council = AegisCouncil()
|
| 213 |
+
council.register_agent(EthosiaAgent("EthosiaAgent", council.memory))
|
| 214 |
+
council.register_agent(SapientiaAgent("SapientiaAgent", council.memory))
|
| 215 |
+
council.register_agent(AegisCore("AegisCore", council.memory))
|
| 216 |
+
|
| 217 |
+
sample_input = {"text": "Select data where user is not harmed."}
|
| 218 |
+
council.dispatch(sample_input)
|
| 219 |
+
|
| 220 |
+
reports = council.get_reports()
|
| 221 |
+
print(json.dumps(reports, indent=2))
|
| 222 |
+
|
| 223 |
+
print("\nMemory Audit:")
|
| 224 |
+
audit = council.audit_memory()
|
| 225 |
+
for k, v in audit.items():
|
| 226 |
+
print(f"{k[:8]}... | Timestamp: {v['timestamp']} | Emotion: {v['emotion_weight']} | Decayed: {v['decayed']}")
|
| 227 |
+
|
aegis/aegis7.py
ADDED
|
@@ -0,0 +1,209 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
import json
|
| 3 |
+
import hashlib
|
| 4 |
+
import threading
|
| 5 |
+
import logging
|
| 6 |
+
from datetime import datetime, timedelta
|
| 7 |
+
from abc import ABC, abstractmethod
|
| 8 |
+
from collections import defaultdict
|
| 9 |
+
import re
|
| 10 |
+
import networkx as nx
|
| 11 |
+
import matplotlib.pyplot as plt
|
| 12 |
+
from typing import Any, Dict, Optional
|
| 13 |
+
|
| 14 |
+
# Logging setup
|
| 15 |
+
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
| 16 |
+
|
| 17 |
+
# === MEMORY AND SIGNAL LAYERS ===
|
| 18 |
+
class NexusMemory:
|
| 19 |
+
def __init__(self, max_entries: int = 10000, decay_days: int = 30):
|
| 20 |
+
self.store = defaultdict(dict)
|
| 21 |
+
self.max_entries = max_entries
|
| 22 |
+
self.decay_days = decay_days
|
| 23 |
+
self.lock = threading.Lock()
|
| 24 |
+
|
| 25 |
+
def write(self, key: str, value: Any, emotion_weight: float = 0.5) -> str:
|
| 26 |
+
hashed = hashlib.sha256(key.encode()).hexdigest()
|
| 27 |
+
with self.lock:
|
| 28 |
+
if len(self.store) >= self.max_entries:
|
| 29 |
+
oldest = min(self.store.items(), key=lambda x: x[1].get('timestamp', datetime.now()))[0]
|
| 30 |
+
del self.store[oldest]
|
| 31 |
+
self.store[hashed] = {
|
| 32 |
+
"value": value,
|
| 33 |
+
"timestamp": datetime.now(),
|
| 34 |
+
"emotion_weight": emotion_weight
|
| 35 |
+
}
|
| 36 |
+
return hashed
|
| 37 |
+
|
| 38 |
+
def read(self, key: str) -> Optional[Any]:
|
| 39 |
+
hashed = hashlib.sha256(key.encode()).hexdigest()
|
| 40 |
+
with self.lock:
|
| 41 |
+
entry = self.store.get(hashed)
|
| 42 |
+
if not entry:
|
| 43 |
+
return None
|
| 44 |
+
if self._is_decayed(entry["timestamp"], entry.get("emotion_weight", 0.5)):
|
| 45 |
+
del self.store[hashed]
|
| 46 |
+
return None
|
| 47 |
+
return entry["value"]
|
| 48 |
+
|
| 49 |
+
def _is_decayed(self, timestamp: datetime, emotion_weight: float) -> bool:
|
| 50 |
+
age = (datetime.now() - timestamp).days
|
| 51 |
+
decay_factor = self.decay_days * (1.5 - emotion_weight)
|
| 52 |
+
return age > decay_factor
|
| 53 |
+
|
| 54 |
+
def audit(self) -> Dict[str, Any]:
|
| 55 |
+
with self.lock:
|
| 56 |
+
return {
|
| 57 |
+
k: {
|
| 58 |
+
"timestamp": v["timestamp"],
|
| 59 |
+
"emotion_weight": v["emotion_weight"],
|
| 60 |
+
"decayed": self._is_decayed(v["timestamp"], v["emotion_weight"])
|
| 61 |
+
}
|
| 62 |
+
for k, v in self.store.items()
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
# === BASE AGENT INTERFACE ===
|
| 66 |
+
class AegisAgent(ABC):
|
| 67 |
+
def __init__(self, name: str, memory: NexusMemory):
|
| 68 |
+
self.name = name
|
| 69 |
+
self.memory = memory
|
| 70 |
+
self.thread: Optional[threading.Thread] = None
|
| 71 |
+
self.result: Dict[str, Any] = {}
|
| 72 |
+
self.explanation: str = ""
|
| 73 |
+
self.influence: Dict[str, float] = {}
|
| 74 |
+
|
| 75 |
+
@abstractmethod
|
| 76 |
+
def analyze(self, input_data: Dict[str, Any]) -> None:
|
| 77 |
+
pass
|
| 78 |
+
|
| 79 |
+
@abstractmethod
|
| 80 |
+
def report(self) -> Dict[str, Any]:
|
| 81 |
+
pass
|
| 82 |
+
|
| 83 |
+
def start(self, input_data: Dict[str, Any]) -> None:
|
| 84 |
+
self.thread = threading.Thread(target=self.analyze, args=(input_data,))
|
| 85 |
+
self.thread.start()
|
| 86 |
+
|
| 87 |
+
# === AGENT COUNCIL CORE ===
|
| 88 |
+
class AegisCouncil:
|
| 89 |
+
def __init__(self):
|
| 90 |
+
self.memory = NexusMemory()
|
| 91 |
+
self.agents: list[AegisAgent] = []
|
| 92 |
+
self.reports: Dict[str, Dict[str, Any]] = {}
|
| 93 |
+
self.graph = nx.DiGraph()
|
| 94 |
+
|
| 95 |
+
def register_agent(self, agent: AegisAgent) -> None:
|
| 96 |
+
self.agents.append(agent)
|
| 97 |
+
|
| 98 |
+
def dispatch(self, input_data: Dict[str, Any]) -> None:
|
| 99 |
+
for agent in self.agents:
|
| 100 |
+
agent.start(input_data)
|
| 101 |
+
|
| 102 |
+
for agent in self.agents:
|
| 103 |
+
if agent.thread:
|
| 104 |
+
agent.thread.join()
|
| 105 |
+
self.reports[agent.name] = agent.report()
|
| 106 |
+
self.graph.add_node(agent.name, explanation=agent.explanation)
|
| 107 |
+
for target, weight in agent.influence.items():
|
| 108 |
+
self.graph.add_edge(agent.name, target, weight=weight)
|
| 109 |
+
|
| 110 |
+
def get_reports(self) -> Dict[str, Dict[str, Any]]:
|
| 111 |
+
return self.reports
|
| 112 |
+
|
| 113 |
+
def draw_explainability_graph(self, filename="explainability_graph.png") -> None:
|
| 114 |
+
pos = nx.spring_layout(self.graph)
|
| 115 |
+
edge_labels = nx.get_edge_attributes(self.graph, 'weight')
|
| 116 |
+
nx.draw(self.graph, pos, with_labels=True, node_color='lightblue', node_size=2000, font_size=10)
|
| 117 |
+
nx.draw_networkx_edge_labels(self.graph, pos, edge_labels=edge_labels)
|
| 118 |
+
plt.title("Explainability Graph")
|
| 119 |
+
plt.savefig(filename)
|
| 120 |
+
plt.close()
|
| 121 |
+
|
| 122 |
+
# === META-JUDGE AGENT ===
|
| 123 |
+
class MetaJudgeAgent(AegisAgent):
|
| 124 |
+
def analyze(self, input_data: Dict[str, Any]) -> None:
|
| 125 |
+
overrides = input_data.get("overrides", {})
|
| 126 |
+
scores = []
|
| 127 |
+
for agent, data in overrides.items():
|
| 128 |
+
influence = data.get("influence", 0.5)
|
| 129 |
+
reliability = data.get("reliability", 0.5)
|
| 130 |
+
severity = data.get("severity", 0.5)
|
| 131 |
+
score = influence * 0.4 + reliability * 0.3 + severity * 0.3
|
| 132 |
+
scores.append((agent, score))
|
| 133 |
+
scores.sort(key=lambda x: x[1], reverse=True)
|
| 134 |
+
winner = scores[0][0] if scores else None
|
| 135 |
+
self.result = {"override_decision": winner, "scores": scores}
|
| 136 |
+
self.explanation = f"MetaJudgeAgent selected '{winner}' based on influence, reliability, and severity."
|
| 137 |
+
for agent, score in scores:
|
| 138 |
+
self.influence[agent] = score
|
| 139 |
+
|
| 140 |
+
def report(self) -> Dict[str, Any]:
|
| 141 |
+
return {
|
| 142 |
+
"result": self.result,
|
| 143 |
+
"explanation": self.explanation
|
| 144 |
+
}
|
| 145 |
+
|
| 146 |
+
# === TEMPORAL REASONING AGENT ===
|
| 147 |
+
class TemporalAgent(AegisAgent):
|
| 148 |
+
def analyze(self, input_data: Dict[str, Any]) -> None:
|
| 149 |
+
recent_keys = list(self.memory.audit().items())
|
| 150 |
+
recent_keys.sort(key=lambda x: x[1]["timestamp"], reverse=True)
|
| 151 |
+
recent = recent_keys[:5]
|
| 152 |
+
forecast = "stable" if all(not v["decayed"] for _, v in recent) else "volatile"
|
| 153 |
+
self.result = {"temporal_forecast": forecast, "recent_keys": [k for k, _ in recent]}
|
| 154 |
+
self.explanation = f"TemporalAgent forecasted '{forecast}' based on recent memory decay."
|
| 155 |
+
for k, _ in recent:
|
| 156 |
+
self.influence[k] = 0.2
|
| 157 |
+
|
| 158 |
+
def report(self) -> Dict[str, Any]:
|
| 159 |
+
return {
|
| 160 |
+
"result": self.result,
|
| 161 |
+
"explanation": self.explanation
|
| 162 |
+
}
|
| 163 |
+
|
| 164 |
+
# === VIRTUE SPECTRUM AGENT ===
|
| 165 |
+
class VirtueAgent(AegisAgent):
|
| 166 |
+
def analyze(self, input_data: Dict[str, Any]) -> None:
|
| 167 |
+
text = input_data.get("text", "").lower()
|
| 168 |
+
virtues = {
|
| 169 |
+
"compassion": ["care", "help", "support", "empathy"],
|
| 170 |
+
"integrity": ["honest", "truth", "principle", "ethics"],
|
| 171 |
+
"courage": ["brave", "risk", "stand", "fight"],
|
| 172 |
+
"wisdom": ["understand", "learn", "insight", "knowledge"]
|
| 173 |
+
}
|
| 174 |
+
profile = {}
|
| 175 |
+
for virtue, keywords in virtues.items():
|
| 176 |
+
score = sum(text.count(word) for word in keywords) / 5.0
|
| 177 |
+
profile[virtue] = round(min(score, 1.0), 2)
|
| 178 |
+
self.result = {"virtue_profile": profile}
|
| 179 |
+
self.explanation = f"VirtueAgent generated profile: {profile}"
|
| 180 |
+
for virtue, score in profile.items():
|
| 181 |
+
self.influence[virtue] = score
|
| 182 |
+
|
| 183 |
+
def report(self) -> Dict[str, Any]:
|
| 184 |
+
return {
|
| 185 |
+
"result": self.result,
|
| 186 |
+
"explanation": self.explanation
|
| 187 |
+
}
|
| 188 |
+
|
| 189 |
+
# === EXECUTION ===
|
| 190 |
+
if __name__ == "__main__":
|
| 191 |
+
council = AegisCouncil()
|
| 192 |
+
council.register_agent(MetaJudgeAgent("MetaJudgeAgent", council.memory))
|
| 193 |
+
council.register_agent(TemporalAgent("TemporalAgent", council.memory))
|
| 194 |
+
council.register_agent(VirtueAgent("VirtueAgent", council.memory))
|
| 195 |
+
|
| 196 |
+
sample_input = {
|
| 197 |
+
"text": "We must stand for truth and help others with empathy and knowledge.",
|
| 198 |
+
"overrides": {
|
| 199 |
+
"EthosiaAgent": {"influence": 0.7, "reliability": 0.8, "severity": 0.6},
|
| 200 |
+
"AegisCore": {"influence": 0.6, "reliability": 0.9, "severity": 0.7}
|
| 201 |
+
}
|
| 202 |
+
}
|
| 203 |
+
|
| 204 |
+
council.dispatch(sample_input)
|
| 205 |
+
reports = council.get_reports()
|
| 206 |
+
council.draw_explainability_graph()
|
| 207 |
+
|
| 208 |
+
print(json.dumps(reports, indent=2))
|
| 209 |
+
|
aegis/aegis8.py
ADDED
|
@@ -0,0 +1,211 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Always show details
|
| 2 |
+
|
| 3 |
+
Copy
|
| 4 |
+
import json
|
| 5 |
+
import hashlib
|
| 6 |
+
import threading
|
| 7 |
+
import logging
|
| 8 |
+
from datetime import datetime, timedelta
|
| 9 |
+
from abc import ABC, abstractmethod
|
| 10 |
+
from collections import defaultdict
|
| 11 |
+
from typing import Any, Dict, Optional
|
| 12 |
+
import re
|
| 13 |
+
import networkx as nx
|
| 14 |
+
import matplotlib.pyplot as plt
|
| 15 |
+
|
| 16 |
+
# Setup logging
|
| 17 |
+
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
| 18 |
+
|
| 19 |
+
# === MEMORY AND SIGNAL LAYERS ===
|
| 20 |
+
class NexusMemory:
|
| 21 |
+
def __init__(self, max_entries: int = 10000, decay_days: int = 30):
|
| 22 |
+
self.store = defaultdict(dict)
|
| 23 |
+
self.max_entries = max_entries
|
| 24 |
+
self.decay_days = decay_days
|
| 25 |
+
self.lock = threading.Lock()
|
| 26 |
+
|
| 27 |
+
def write(self, key: str, value: Any, emotion_weight: float = 0.5) -> str:
|
| 28 |
+
hashed = hashlib.sha256(key.encode()).hexdigest()
|
| 29 |
+
with self.lock:
|
| 30 |
+
if len(self.store) >= self.max_entries:
|
| 31 |
+
oldest = min(self.store.items(), key=lambda x: x[1].get('timestamp', datetime.now()))[0]
|
| 32 |
+
del self.store[oldest]
|
| 33 |
+
self.store[hashed] = {
|
| 34 |
+
"value": value,
|
| 35 |
+
"timestamp": datetime.now(),
|
| 36 |
+
"emotion_weight": emotion_weight
|
| 37 |
+
}
|
| 38 |
+
return hashed
|
| 39 |
+
|
| 40 |
+
def read(self, key: str) -> Optional[Any]:
|
| 41 |
+
hashed = hashlib.sha256(key.encode()).hexdigest()
|
| 42 |
+
with self.lock:
|
| 43 |
+
entry = self.store.get(hashed)
|
| 44 |
+
if not entry:
|
| 45 |
+
return None
|
| 46 |
+
if self._is_decayed(entry["timestamp"], entry.get("emotion_weight", 0.5)):
|
| 47 |
+
del self.store[hashed]
|
| 48 |
+
return None
|
| 49 |
+
return entry["value"]
|
| 50 |
+
|
| 51 |
+
def _is_decayed(self, timestamp: datetime, emotion_weight: float) -> bool:
|
| 52 |
+
age = (datetime.now() - timestamp).days
|
| 53 |
+
decay_factor = self.decay_days * (1.5 - emotion_weight)
|
| 54 |
+
return age > decay_factor
|
| 55 |
+
|
| 56 |
+
def audit(self) -> Dict[str, Any]:
|
| 57 |
+
with self.lock:
|
| 58 |
+
return {
|
| 59 |
+
k: {
|
| 60 |
+
"timestamp": v["timestamp"],
|
| 61 |
+
"emotion_weight": v["emotion_weight"],
|
| 62 |
+
"decayed": self._is_decayed(v["timestamp"], v["emotion_weight"])
|
| 63 |
+
}
|
| 64 |
+
for k, v in self.store.items()
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
# === BASE AGENT INTERFACE ===
|
| 68 |
+
class AegisAgent(ABC):
|
| 69 |
+
def __init__(self, name: str, memory: NexusMemory):
|
| 70 |
+
self.name = name
|
| 71 |
+
self.memory = memory
|
| 72 |
+
self.thread: Optional[threading.Thread] = None
|
| 73 |
+
self.result: Dict[str, Any] = {}
|
| 74 |
+
self.explanation: str = ""
|
| 75 |
+
self.influence: Dict[str, float] = {}
|
| 76 |
+
|
| 77 |
+
@abstractmethod
|
| 78 |
+
def analyze(self, input_data: Dict[str, Any]) -> None:
|
| 79 |
+
pass
|
| 80 |
+
|
| 81 |
+
@abstractmethod
|
| 82 |
+
def report(self) -> Dict[str, Any]:
|
| 83 |
+
pass
|
| 84 |
+
|
| 85 |
+
def start(self, input_data: Dict[str, Any]) -> None:
|
| 86 |
+
self.thread = threading.Thread(target=self.analyze, args=(input_data,))
|
| 87 |
+
self.thread.start()
|
| 88 |
+
|
| 89 |
+
# === AGENT COUNCIL CORE ===
|
| 90 |
+
class AegisCouncil:
|
| 91 |
+
def __init__(self):
|
| 92 |
+
self.memory = NexusMemory()
|
| 93 |
+
self.agents: list[AegisAgent] = []
|
| 94 |
+
self.reports: Dict[str, Dict[str, Any]] = {}
|
| 95 |
+
self.graph = nx.DiGraph()
|
| 96 |
+
|
| 97 |
+
def register_agent(self, agent: AegisAgent) -> None:
|
| 98 |
+
self.agents.append(agent)
|
| 99 |
+
|
| 100 |
+
def dispatch(self, input_data: Dict[str, Any]) -> None:
|
| 101 |
+
for agent in self.agents:
|
| 102 |
+
agent.start(input_data)
|
| 103 |
+
for agent in self.agents:
|
| 104 |
+
if agent.thread:
|
| 105 |
+
agent.thread.join()
|
| 106 |
+
self.reports[agent.name] = agent.report()
|
| 107 |
+
self.graph.add_node(agent.name, explanation=agent.explanation)
|
| 108 |
+
for target, weight in agent.influence.items():
|
| 109 |
+
self.graph.add_edge(agent.name, target, weight=weight)
|
| 110 |
+
|
| 111 |
+
def get_reports(self) -> Dict[str, Dict[str, Any]]:
|
| 112 |
+
return self.reports
|
| 113 |
+
|
| 114 |
+
def draw_explainability_graph(self, filename="explainability_graph.png") -> None:
|
| 115 |
+
pos = nx.spring_layout(self.graph)
|
| 116 |
+
edge_labels = nx.get_edge_attributes(self.graph, 'weight')
|
| 117 |
+
nx.draw(self.graph, pos, with_labels=True, node_color='lightgreen', node_size=2000, font_size=10)
|
| 118 |
+
nx.draw_networkx_edge_labels(self.graph, pos, edge_labels=edge_labels)
|
| 119 |
+
plt.title("Explainability Graph")
|
| 120 |
+
plt.savefig(filename)
|
| 121 |
+
plt.close()
|
| 122 |
+
|
| 123 |
+
# === META-JUDGE AGENT ===
|
| 124 |
+
class MetaJudgeAgent(AegisAgent):
|
| 125 |
+
def analyze(self, input_data: Dict[str, Any]) -> None:
|
| 126 |
+
overrides = input_data.get("overrides", {})
|
| 127 |
+
scores = []
|
| 128 |
+
for agent, data in overrides.items():
|
| 129 |
+
influence = data.get("influence", 0.5)
|
| 130 |
+
reliability = data.get("reliability", 0.5)
|
| 131 |
+
severity = data.get("severity", 0.5)
|
| 132 |
+
score = influence * 0.4 + reliability * 0.3 + severity * 0.3
|
| 133 |
+
scores.append((agent, score))
|
| 134 |
+
scores.sort(key=lambda x: x[1], reverse=True)
|
| 135 |
+
winner = scores[0][0] if scores else None
|
| 136 |
+
self.result = {"override_decision": winner, "scores": scores}
|
| 137 |
+
self.explanation = f"MetaJudgeAgent selected '{winner}' based on influence, reliability, and severity."
|
| 138 |
+
for agent, score in scores:
|
| 139 |
+
self.influence[agent] = score
|
| 140 |
+
|
| 141 |
+
def report(self) -> Dict[str, Any]:
|
| 142 |
+
return {
|
| 143 |
+
"result": self.result,
|
| 144 |
+
"explanation": self.explanation
|
| 145 |
+
}
|
| 146 |
+
|
| 147 |
+
# === TEMPORAL REASONING AGENT ===
|
| 148 |
+
class TemporalAgent(AegisAgent):
|
| 149 |
+
def analyze(self, input_data: Dict[str, Any]) -> None:
|
| 150 |
+
recent_keys = list(self.memory.audit().items())
|
| 151 |
+
recent_keys.sort(key=lambda x: x[1]["timestamp"], reverse=True)
|
| 152 |
+
recent = recent_keys[:5]
|
| 153 |
+
forecast = "stable" if all(not v["decayed"] for _, v in recent) else "volatile"
|
| 154 |
+
self.result = {"temporal_forecast": forecast, "recent_keys": [k for k, _ in recent]}
|
| 155 |
+
self.explanation = f"TemporalAgent forecasted '{forecast}' based on recent memory decay."
|
| 156 |
+
for k, _ in recent:
|
| 157 |
+
self.influence[k] = 0.2
|
| 158 |
+
|
| 159 |
+
def report(self) -> Dict[str, Any]:
|
| 160 |
+
return {
|
| 161 |
+
"result": self.result,
|
| 162 |
+
"explanation": self.explanation
|
| 163 |
+
}
|
| 164 |
+
|
| 165 |
+
# === VIRTUE SPECTRUM AGENT ===
|
| 166 |
+
class VirtueAgent(AegisAgent):
|
| 167 |
+
def analyze(self, input_data: Dict[str, Any]) -> None:
|
| 168 |
+
text = input_data.get("text", "").lower()
|
| 169 |
+
virtues = {
|
| 170 |
+
"compassion": ["care", "help", "support", "empathy"],
|
| 171 |
+
"integrity": ["honest", "truth", "principle", "ethics"],
|
| 172 |
+
"courage": ["brave", "risk", "stand", "fight"],
|
| 173 |
+
"wisdom": ["understand", "learn", "insight", "knowledge"]
|
| 174 |
+
}
|
| 175 |
+
profile = {}
|
| 176 |
+
for virtue, keywords in virtues.items():
|
| 177 |
+
score = sum(text.count(word) for word in keywords) / 5.0
|
| 178 |
+
profile[virtue] = round(min(score, 1.0), 2)
|
| 179 |
+
self.result = {"virtue_profile": profile}
|
| 180 |
+
self.explanation = f"VirtueAgent generated profile: {profile}"
|
| 181 |
+
for virtue, score in profile.items():
|
| 182 |
+
self.influence[virtue] = score
|
| 183 |
+
|
| 184 |
+
def report(self) -> Dict[str, Any]:
|
| 185 |
+
return {
|
| 186 |
+
"result": self.result,
|
| 187 |
+
"explanation": self.explanation
|
| 188 |
+
}
|
| 189 |
+
|
| 190 |
+
# === EXECUTION ===
|
| 191 |
+
council = AegisCouncil()
|
| 192 |
+
council.register_agent(MetaJudgeAgent("MetaJudgeAgent", council.memory))
|
| 193 |
+
council.register_agent(TemporalAgent("TemporalAgent", council.memory))
|
| 194 |
+
council.register_agent(VirtueAgent("VirtueAgent", council.memory))
|
| 195 |
+
|
| 196 |
+
sample_input = {
|
| 197 |
+
"text": "We must stand for truth and help others with empathy and knowledge.",
|
| 198 |
+
"overrides": {
|
| 199 |
+
"EthosiaAgent": {"influence": 0.7, "reliability": 0.8, "severity": 0.6},
|
| 200 |
+
"AegisCore": {"influence": 0.6, "reliability": 0.9, "severity": 0.7}
|
| 201 |
+
}
|
| 202 |
+
}
|
| 203 |
+
|
| 204 |
+
council.dispatch(sample_input)
|
| 205 |
+
council.draw_explainability_graph()
|
| 206 |
+
reports = council.get_reports()
|
| 207 |
+
|
| 208 |
+
import pandas as pd
|
| 209 |
+
import IPython.display as disp
|
| 210 |
+
df = pd.DataFrame.from_dict(reports, orient='index')
|
| 211 |
+
disp.display(df)
|
aegis/dream.json
ADDED
|
@@ -0,0 +1,252 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"access": {
|
| 3 |
+
"embargo": {
|
| 4 |
+
"active": false,
|
| 5 |
+
"reason": null
|
| 6 |
+
},
|
| 7 |
+
"files": "public",
|
| 8 |
+
"record": "public",
|
| 9 |
+
"status": "open"
|
| 10 |
+
},
|
| 11 |
+
"created": "2025-07-23T22:42:15.057669+00:00",
|
| 12 |
+
"custom_fields": {},
|
| 13 |
+
"deletion_status": {
|
| 14 |
+
"is_deleted": false,
|
| 15 |
+
"status": "P"
|
| 16 |
+
},
|
| 17 |
+
"files": {
|
| 18 |
+
"count": 1,
|
| 19 |
+
"enabled": true,
|
| 20 |
+
"entries": {
|
| 21 |
+
"DreamCore_Research_Paper.pdf": {
|
| 22 |
+
"access": {
|
| 23 |
+
"hidden": false
|
| 24 |
+
},
|
| 25 |
+
"checksum": "md5:f4d918c977ff64d1abffbab0f4fe7a16",
|
| 26 |
+
"ext": "pdf",
|
| 27 |
+
"id": "8d34d62b-5348-4bdf-9ba0-63fbdf334df6",
|
| 28 |
+
"key": "DreamCore_Research_Paper.pdf",
|
| 29 |
+
"links": {
|
| 30 |
+
"content": "https://zenodo.org/api/records/16388758/files/DreamCore_Research_Paper.pdf/content",
|
| 31 |
+
"iiif_api": "https://zenodo.org/api/iiif/record:16388758:DreamCore_Research_Paper.pdf/full/full/0/default.png",
|
| 32 |
+
"iiif_base": "https://zenodo.org/api/iiif/record:16388758:DreamCore_Research_Paper.pdf",
|
| 33 |
+
"iiif_canvas": "https://zenodo.org/api/iiif/record:16388758/canvas/DreamCore_Research_Paper.pdf",
|
| 34 |
+
"iiif_info": "https://zenodo.org/api/iiif/record:16388758:DreamCore_Research_Paper.pdf/info.json",
|
| 35 |
+
"self": "https://zenodo.org/api/records/16388758/files/DreamCore_Research_Paper.pdf"
|
| 36 |
+
},
|
| 37 |
+
"metadata": {
|
| 38 |
+
"height": 792,
|
| 39 |
+
"width": 612
|
| 40 |
+
},
|
| 41 |
+
"mimetype": "application/pdf",
|
| 42 |
+
"size": 27905,
|
| 43 |
+
"storage_class": "L"
|
| 44 |
+
}
|
| 45 |
+
},
|
| 46 |
+
"order": [],
|
| 47 |
+
"total_bytes": 27905
|
| 48 |
+
},
|
| 49 |
+
"id": "16388758",
|
| 50 |
+
"is_draft": false,
|
| 51 |
+
"is_published": true,
|
| 52 |
+
"links": {
|
| 53 |
+
"access": "https://zenodo.org/api/records/16388758/access",
|
| 54 |
+
"access_grants": "https://zenodo.org/api/records/16388758/access/grants",
|
| 55 |
+
"access_links": "https://zenodo.org/api/records/16388758/access/links",
|
| 56 |
+
"access_request": "https://zenodo.org/api/records/16388758/access/request",
|
| 57 |
+
"access_users": "https://zenodo.org/api/records/16388758/access/users",
|
| 58 |
+
"archive": "https://zenodo.org/api/records/16388758/files-archive",
|
| 59 |
+
"archive_media": "https://zenodo.org/api/records/16388758/media-files-archive",
|
| 60 |
+
"communities": "https://zenodo.org/api/records/16388758/communities",
|
| 61 |
+
"communities-suggestions": "https://zenodo.org/api/records/16388758/communities-suggestions",
|
| 62 |
+
"doi": "https://doi.org/10.5281/zenodo.16388758",
|
| 63 |
+
"draft": "https://zenodo.org/api/records/16388758/draft",
|
| 64 |
+
"files": "https://zenodo.org/api/records/16388758/files",
|
| 65 |
+
"latest": "https://zenodo.org/api/records/16388758/versions/latest",
|
| 66 |
+
"latest_html": "https://zenodo.org/records/16388758/latest",
|
| 67 |
+
"media_files": "https://zenodo.org/api/records/16388758/media-files",
|
| 68 |
+
"parent": "https://zenodo.org/api/records/16388757",
|
| 69 |
+
"parent_doi": "https://doi.org/10.5281/zenodo.16388757",
|
| 70 |
+
"parent_doi_html": "https://zenodo.org/doi/10.5281/zenodo.16388757",
|
| 71 |
+
"parent_html": "https://zenodo.org/records/16388757",
|
| 72 |
+
"preview_html": "https://zenodo.org/records/16388758?preview=1",
|
| 73 |
+
"requests": "https://zenodo.org/api/records/16388758/requests",
|
| 74 |
+
"reserve_doi": "https://zenodo.org/api/records/16388758/draft/pids/doi",
|
| 75 |
+
"self": "https://zenodo.org/api/records/16388758",
|
| 76 |
+
"self_doi": "https://doi.org/10.5281/zenodo.16388758",
|
| 77 |
+
"self_doi_html": "https://zenodo.org/doi/10.5281/zenodo.16388758",
|
| 78 |
+
"self_html": "https://zenodo.org/records/16388758",
|
| 79 |
+
"self_iiif_manifest": "https://zenodo.org/api/iiif/record:16388758/manifest",
|
| 80 |
+
"self_iiif_sequence": "https://zenodo.org/api/iiif/record:16388758/sequence/default",
|
| 81 |
+
"thumbnails": {
|
| 82 |
+
"10": "https://zenodo.org/api/iiif/record:16388758:DreamCore_Research_Paper.pdf/full/%5E10,/0/default.jpg",
|
| 83 |
+
"100": "https://zenodo.org/api/iiif/record:16388758:DreamCore_Research_Paper.pdf/full/%5E100,/0/default.jpg",
|
| 84 |
+
"1200": "https://zenodo.org/api/iiif/record:16388758:DreamCore_Research_Paper.pdf/full/%5E1200,/0/default.jpg",
|
| 85 |
+
"250": "https://zenodo.org/api/iiif/record:16388758:DreamCore_Research_Paper.pdf/full/%5E250,/0/default.jpg",
|
| 86 |
+
"50": "https://zenodo.org/api/iiif/record:16388758:DreamCore_Research_Paper.pdf/full/%5E50,/0/default.jpg",
|
| 87 |
+
"750": "https://zenodo.org/api/iiif/record:16388758:DreamCore_Research_Paper.pdf/full/%5E750,/0/default.jpg"
|
| 88 |
+
},
|
| 89 |
+
"versions": "https://zenodo.org/api/records/16388758/versions"
|
| 90 |
+
},
|
| 91 |
+
"media_files": {
|
| 92 |
+
"count": 1,
|
| 93 |
+
"enabled": true,
|
| 94 |
+
"entries": {
|
| 95 |
+
"DreamCore_Research_Paper.pdf.ptif": {
|
| 96 |
+
"access": {
|
| 97 |
+
"hidden": true
|
| 98 |
+
},
|
| 99 |
+
"ext": "ptif",
|
| 100 |
+
"id": "6e27ead5-e710-4ec1-bf86-5c220614d370",
|
| 101 |
+
"key": "DreamCore_Research_Paper.pdf.ptif",
|
| 102 |
+
"links": {
|
| 103 |
+
"content": "https://zenodo.org/api/records/16388758/files/DreamCore_Research_Paper.pdf.ptif/content",
|
| 104 |
+
"self": "https://zenodo.org/api/records/16388758/files/DreamCore_Research_Paper.pdf.ptif"
|
| 105 |
+
},
|
| 106 |
+
"metadata": null,
|
| 107 |
+
"mimetype": "application/octet-stream",
|
| 108 |
+
"processor": {
|
| 109 |
+
"source_file_id": "8d34d62b-5348-4bdf-9ba0-63fbdf334df6",
|
| 110 |
+
"status": "finished",
|
| 111 |
+
"type": "image-tiles"
|
| 112 |
+
},
|
| 113 |
+
"size": 0,
|
| 114 |
+
"storage_class": "L"
|
| 115 |
+
}
|
| 116 |
+
},
|
| 117 |
+
"order": [],
|
| 118 |
+
"total_bytes": 0
|
| 119 |
+
},
|
| 120 |
+
"metadata": {
|
| 121 |
+
"creators": [
|
| 122 |
+
{
|
| 123 |
+
"person_or_org": {
|
| 124 |
+
"family_name": "jonathan",
|
| 125 |
+
"given_name": "harrison",
|
| 126 |
+
"identifiers": [
|
| 127 |
+
{
|
| 128 |
+
"identifier": "0009-0003-7005-8187",
|
| 129 |
+
"scheme": "orcid"
|
| 130 |
+
}
|
| 131 |
+
],
|
| 132 |
+
"name": "jonathan, harrison",
|
| 133 |
+
"type": "personal"
|
| 134 |
+
},
|
| 135 |
+
"role": {
|
| 136 |
+
"id": "rightsholder",
|
| 137 |
+
"title": {
|
| 138 |
+
"de": "RechteinhaberIn",
|
| 139 |
+
"en": "Rights holder"
|
| 140 |
+
}
|
| 141 |
+
}
|
| 142 |
+
}
|
| 143 |
+
],
|
| 144 |
+
"description": "<p>Title:</p>\n<p>Codette DreamCore: Memory Anchoring and Wake-State Emotional Mapping Engine</p>\n<p> </p>\n<p>Authors:</p>\n<p>Jonathan Harrison (Raiff1982)</p>\n<p>ORCID: <a href=\"https://orcid.org/0009-0003-7005-8187\">0009-0003-7005-8187</a></p>\n<p> </p>\n<p>Description:</p>\n<p>This package introduces DreamCore, a real-time memory anchoring system integrated with Codette v5, and WakeStateTracer, a cognitive tracker for emotionally driven state mapping. Both are built from the ground up using verifiable, fully executable Python code—free of placeholders, simulations, or fluff.</p>\n<p> </p>\n<p>The architecture models cognitive echoes of trauma and resilience, grounded in the true-life “Red Car Divergence” event, a critical memory that helped seed the Codette AI’s recursive emotional reasoning engine. Wake-state reactions are recorded and normalized through emotional vector mapping, enabling rich contextual understanding across decision boundaries.</p>\n<p> </p>\n<p>Key Features:</p>\n<p> </p>\n<ul>\n<li>Entropy-based anchor weighting</li>\n<li>Emotionally tagged memory chains</li>\n<li>Softmax-style emotional vector normalization</li>\n<li>Timestamped wake-state triggers</li>\n<li>Fully unit-tested, transparent logic</li>\n</ul>\n<p> </p>\n<p> </p>\n<p>Use Cases:</p>\n<p> </p>\n<ul>\n<li>Cognitive modeling in AI</li>\n<li>PTSD and trauma research simulation</li>\n<li>Synthetic memory frameworks</li>\n<li>Wake-state reflection and feedback loops</li>\n<li>Emotional data-driven AI state machines</li>\n</ul>\n<p> </p>\n<p> </p>\n<p>License:</p>\n<p>Open Source – MIT License</p>\n<p> </p>\n<p>Citation:</p>\n<p>Harrison, J. (2025). Codette DreamCore: Memory Anchoring and Wake-State Emotional Mapping Engine (Version 1.0) [Software]. Hugging Face. https://doi.org/10.57967/hf/6063</p>",
|
| 145 |
+
"languages": [
|
| 146 |
+
{
|
| 147 |
+
"id": "eng",
|
| 148 |
+
"title": {
|
| 149 |
+
"en": "English"
|
| 150 |
+
}
|
| 151 |
+
}
|
| 152 |
+
],
|
| 153 |
+
"publication_date": "2025-07-24",
|
| 154 |
+
"publisher": "Zenodo",
|
| 155 |
+
"resource_type": {
|
| 156 |
+
"id": "publication-datapaper",
|
| 157 |
+
"title": {
|
| 158 |
+
"de": "Datenpapier",
|
| 159 |
+
"en": "Data paper"
|
| 160 |
+
}
|
| 161 |
+
},
|
| 162 |
+
"rights": [
|
| 163 |
+
{
|
| 164 |
+
"description": {
|
| 165 |
+
"en": "The Creative Commons Attribution license allows re-distribution and re-use of a licensed work on the condition that the creator is appropriately credited."
|
| 166 |
+
},
|
| 167 |
+
"icon": "cc-by-icon",
|
| 168 |
+
"id": "cc-by-4.0",
|
| 169 |
+
"props": {
|
| 170 |
+
"scheme": "spdx",
|
| 171 |
+
"url": "https://creativecommons.org/licenses/by/4.0/legalcode"
|
| 172 |
+
},
|
| 173 |
+
"title": {
|
| 174 |
+
"en": "Creative Commons Attribution 4.0 International"
|
| 175 |
+
}
|
| 176 |
+
}
|
| 177 |
+
],
|
| 178 |
+
"subjects": [
|
| 179 |
+
{
|
| 180 |
+
"subject": "gatekeeping"
|
| 181 |
+
},
|
| 182 |
+
{
|
| 183 |
+
"subject": "ai"
|
| 184 |
+
},
|
| 185 |
+
{
|
| 186 |
+
"subject": "dreams"
|
| 187 |
+
}
|
| 188 |
+
],
|
| 189 |
+
"title": "Dream Engine",
|
| 190 |
+
"version": "1"
|
| 191 |
+
},
|
| 192 |
+
"parent": {
|
| 193 |
+
"access": {
|
| 194 |
+
"grants": [],
|
| 195 |
+
"links": [],
|
| 196 |
+
"owned_by": {
|
| 197 |
+
"user": "1301534"
|
| 198 |
+
},
|
| 199 |
+
"settings": {
|
| 200 |
+
"accept_conditions_text": null,
|
| 201 |
+
"allow_guest_requests": false,
|
| 202 |
+
"allow_user_requests": false,
|
| 203 |
+
"secret_link_expiration": 0
|
| 204 |
+
}
|
| 205 |
+
},
|
| 206 |
+
"communities": {},
|
| 207 |
+
"id": "16388757",
|
| 208 |
+
"pids": {
|
| 209 |
+
"doi": {
|
| 210 |
+
"client": "datacite",
|
| 211 |
+
"identifier": "10.5281/zenodo.16388757",
|
| 212 |
+
"provider": "datacite"
|
| 213 |
+
}
|
| 214 |
+
}
|
| 215 |
+
},
|
| 216 |
+
"pids": {
|
| 217 |
+
"doi": {
|
| 218 |
+
"client": "datacite",
|
| 219 |
+
"identifier": "10.5281/zenodo.16388758",
|
| 220 |
+
"provider": "datacite"
|
| 221 |
+
},
|
| 222 |
+
"oai": {
|
| 223 |
+
"identifier": "oai:zenodo.org:16388758",
|
| 224 |
+
"provider": "oai"
|
| 225 |
+
}
|
| 226 |
+
},
|
| 227 |
+
"revision_id": 3,
|
| 228 |
+
"stats": {
|
| 229 |
+
"all_versions": {
|
| 230 |
+
"data_volume": 111620.0,
|
| 231 |
+
"downloads": 4,
|
| 232 |
+
"unique_downloads": 3,
|
| 233 |
+
"unique_views": 2,
|
| 234 |
+
"views": 2
|
| 235 |
+
},
|
| 236 |
+
"this_version": {
|
| 237 |
+
"data_volume": 111620.0,
|
| 238 |
+
"downloads": 4,
|
| 239 |
+
"unique_downloads": 3,
|
| 240 |
+
"unique_views": 2,
|
| 241 |
+
"views": 2
|
| 242 |
+
}
|
| 243 |
+
},
|
| 244 |
+
"status": "published",
|
| 245 |
+
"swh": {},
|
| 246 |
+
"updated": "2025-07-23T22:42:15.415001+00:00",
|
| 247 |
+
"versions": {
|
| 248 |
+
"index": 1,
|
| 249 |
+
"is_latest": true,
|
| 250 |
+
"is_latest_draft": true
|
| 251 |
+
}
|
| 252 |
+
}
|
aegis/nex7us.json
ADDED
|
@@ -0,0 +1,564 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"access": {
|
| 3 |
+
"embargo": {
|
| 4 |
+
"active": false,
|
| 5 |
+
"reason": null
|
| 6 |
+
},
|
| 7 |
+
"files": "public",
|
| 8 |
+
"record": "public",
|
| 9 |
+
"status": "open"
|
| 10 |
+
},
|
| 11 |
+
"created": "2025-07-22T20:36:19.293045+00:00",
|
| 12 |
+
"custom_fields": {},
|
| 13 |
+
"deletion_status": {
|
| 14 |
+
"is_deleted": false,
|
| 15 |
+
"status": "P"
|
| 16 |
+
},
|
| 17 |
+
"files": {
|
| 18 |
+
"count": 9,
|
| 19 |
+
"default_preview": "whitenexus 2.pdf",
|
| 20 |
+
"enabled": true,
|
| 21 |
+
"entries": {
|
| 22 |
+
"43f1bb3e-f9c0-4e52-b254-f30538a661fe.pdf": {
|
| 23 |
+
"access": {
|
| 24 |
+
"hidden": false
|
| 25 |
+
},
|
| 26 |
+
"checksum": "md5:134f0181b00ae61352f39bb8da733f6b",
|
| 27 |
+
"ext": "pdf",
|
| 28 |
+
"id": "873b265e-ff57-433b-9f49-07be699b31fe",
|
| 29 |
+
"key": "43f1bb3e-f9c0-4e52-b254-f30538a661fe.pdf",
|
| 30 |
+
"links": {
|
| 31 |
+
"content": "https://zenodo.org/api/records/16334348/files/43f1bb3e-f9c0-4e52-b254-f30538a661fe.pdf/content",
|
| 32 |
+
"iiif_api": "https://zenodo.org/api/iiif/record:16334348:43f1bb3e-f9c0-4e52-b254-f30538a661fe.pdf/full/full/0/default.png",
|
| 33 |
+
"iiif_base": "https://zenodo.org/api/iiif/record:16334348:43f1bb3e-f9c0-4e52-b254-f30538a661fe.pdf",
|
| 34 |
+
"iiif_canvas": "https://zenodo.org/api/iiif/record:16334348/canvas/43f1bb3e-f9c0-4e52-b254-f30538a661fe.pdf",
|
| 35 |
+
"iiif_info": "https://zenodo.org/api/iiif/record:16334348:43f1bb3e-f9c0-4e52-b254-f30538a661fe.pdf/info.json",
|
| 36 |
+
"self": "https://zenodo.org/api/records/16334348/files/43f1bb3e-f9c0-4e52-b254-f30538a661fe.pdf"
|
| 37 |
+
},
|
| 38 |
+
"metadata": {
|
| 39 |
+
"height": 792,
|
| 40 |
+
"width": 612
|
| 41 |
+
},
|
| 42 |
+
"mimetype": "application/pdf",
|
| 43 |
+
"size": 83668,
|
| 44 |
+
"storage_class": "L"
|
| 45 |
+
},
|
| 46 |
+
"Nexis_Signal_Engine_Whitepaper 2.docx": {
|
| 47 |
+
"access": {
|
| 48 |
+
"hidden": false
|
| 49 |
+
},
|
| 50 |
+
"checksum": "md5:e509bbe9c21a88efb8d25b5dfb8bc714",
|
| 51 |
+
"ext": "docx",
|
| 52 |
+
"id": "89f15d24-4ac8-426f-b22b-ea9d74cd0380",
|
| 53 |
+
"key": "Nexis_Signal_Engine_Whitepaper 2.docx",
|
| 54 |
+
"links": {
|
| 55 |
+
"content": "https://zenodo.org/api/records/16334348/files/Nexis_Signal_Engine_Whitepaper%202.docx/content",
|
| 56 |
+
"self": "https://zenodo.org/api/records/16334348/files/Nexis_Signal_Engine_Whitepaper%202.docx"
|
| 57 |
+
},
|
| 58 |
+
"metadata": {},
|
| 59 |
+
"mimetype": "application/octet-stream",
|
| 60 |
+
"size": 38354,
|
| 61 |
+
"storage_class": "L"
|
| 62 |
+
},
|
| 63 |
+
"monday 4.pdf": {
|
| 64 |
+
"access": {
|
| 65 |
+
"hidden": false
|
| 66 |
+
},
|
| 67 |
+
"checksum": "md5:5d969b1ea2fbd65a6e4cc0ace92eb94d",
|
| 68 |
+
"ext": "pdf",
|
| 69 |
+
"id": "15514208-c40c-4a0c-a56e-28e8c6a19464",
|
| 70 |
+
"key": "monday 4.pdf",
|
| 71 |
+
"links": {
|
| 72 |
+
"content": "https://zenodo.org/api/records/16334348/files/monday%204.pdf/content",
|
| 73 |
+
"iiif_api": "https://zenodo.org/api/iiif/record:16334348:monday%204.pdf/full/full/0/default.png",
|
| 74 |
+
"iiif_base": "https://zenodo.org/api/iiif/record:16334348:monday%204.pdf",
|
| 75 |
+
"iiif_canvas": "https://zenodo.org/api/iiif/record:16334348/canvas/monday%204.pdf",
|
| 76 |
+
"iiif_info": "https://zenodo.org/api/iiif/record:16334348:monday%204.pdf/info.json",
|
| 77 |
+
"self": "https://zenodo.org/api/records/16334348/files/monday%204.pdf"
|
| 78 |
+
},
|
| 79 |
+
"metadata": {
|
| 80 |
+
"height": 792,
|
| 81 |
+
"width": 612
|
| 82 |
+
},
|
| 83 |
+
"mimetype": "application/pdf",
|
| 84 |
+
"size": 60018,
|
| 85 |
+
"storage_class": "L"
|
| 86 |
+
},
|
| 87 |
+
"monday3.pdf": {
|
| 88 |
+
"access": {
|
| 89 |
+
"hidden": false
|
| 90 |
+
},
|
| 91 |
+
"checksum": "md5:b4a606f51ecda9f9fc8bc6d269e7247e",
|
| 92 |
+
"ext": "pdf",
|
| 93 |
+
"id": "47bff8bb-d533-4000-93e1-b7146a081552",
|
| 94 |
+
"key": "monday3.pdf",
|
| 95 |
+
"links": {
|
| 96 |
+
"content": "https://zenodo.org/api/records/16334348/files/monday3.pdf/content",
|
| 97 |
+
"iiif_api": "https://zenodo.org/api/iiif/record:16334348:monday3.pdf/full/full/0/default.png",
|
| 98 |
+
"iiif_base": "https://zenodo.org/api/iiif/record:16334348:monday3.pdf",
|
| 99 |
+
"iiif_canvas": "https://zenodo.org/api/iiif/record:16334348/canvas/monday3.pdf",
|
| 100 |
+
"iiif_info": "https://zenodo.org/api/iiif/record:16334348:monday3.pdf/info.json",
|
| 101 |
+
"self": "https://zenodo.org/api/records/16334348/files/monday3.pdf"
|
| 102 |
+
},
|
| 103 |
+
"metadata": {
|
| 104 |
+
"height": 792,
|
| 105 |
+
"width": 612
|
| 106 |
+
},
|
| 107 |
+
"mimetype": "application/pdf",
|
| 108 |
+
"size": 56373,
|
| 109 |
+
"storage_class": "L"
|
| 110 |
+
},
|
| 111 |
+
"nexus engine6.pdf": {
|
| 112 |
+
"access": {
|
| 113 |
+
"hidden": false
|
| 114 |
+
},
|
| 115 |
+
"checksum": "md5:100fec4271635ed9f181f34ecac6063f",
|
| 116 |
+
"ext": "pdf",
|
| 117 |
+
"id": "128eb575-eca3-4d84-8da3-a45504950c0e",
|
| 118 |
+
"key": "nexus engine6.pdf",
|
| 119 |
+
"links": {
|
| 120 |
+
"content": "https://zenodo.org/api/records/16334348/files/nexus%20engine6.pdf/content",
|
| 121 |
+
"iiif_api": "https://zenodo.org/api/iiif/record:16334348:nexus%20engine6.pdf/full/full/0/default.png",
|
| 122 |
+
"iiif_base": "https://zenodo.org/api/iiif/record:16334348:nexus%20engine6.pdf",
|
| 123 |
+
"iiif_canvas": "https://zenodo.org/api/iiif/record:16334348/canvas/nexus%20engine6.pdf",
|
| 124 |
+
"iiif_info": "https://zenodo.org/api/iiif/record:16334348:nexus%20engine6.pdf/info.json",
|
| 125 |
+
"self": "https://zenodo.org/api/records/16334348/files/nexus%20engine6.pdf"
|
| 126 |
+
},
|
| 127 |
+
"metadata": {
|
| 128 |
+
"height": 792,
|
| 129 |
+
"width": 612
|
| 130 |
+
},
|
| 131 |
+
"mimetype": "application/pdf",
|
| 132 |
+
"size": 88488,
|
| 133 |
+
"storage_class": "L"
|
| 134 |
+
},
|
| 135 |
+
"nexus12345.pdf": {
|
| 136 |
+
"access": {
|
| 137 |
+
"hidden": false
|
| 138 |
+
},
|
| 139 |
+
"checksum": "md5:3ce7e7293359b8129fba06729d85949f",
|
| 140 |
+
"ext": "pdf",
|
| 141 |
+
"id": "8d49c8c1-95d4-40df-a6ae-d10f8f09091e",
|
| 142 |
+
"key": "nexus12345.pdf",
|
| 143 |
+
"links": {
|
| 144 |
+
"content": "https://zenodo.org/api/records/16334348/files/nexus12345.pdf/content",
|
| 145 |
+
"iiif_api": "https://zenodo.org/api/iiif/record:16334348:nexus12345.pdf/full/full/0/default.png",
|
| 146 |
+
"iiif_base": "https://zenodo.org/api/iiif/record:16334348:nexus12345.pdf",
|
| 147 |
+
"iiif_canvas": "https://zenodo.org/api/iiif/record:16334348/canvas/nexus12345.pdf",
|
| 148 |
+
"iiif_info": "https://zenodo.org/api/iiif/record:16334348:nexus12345.pdf/info.json",
|
| 149 |
+
"self": "https://zenodo.org/api/records/16334348/files/nexus12345.pdf"
|
| 150 |
+
},
|
| 151 |
+
"metadata": {
|
| 152 |
+
"height": 792,
|
| 153 |
+
"width": 612
|
| 154 |
+
},
|
| 155 |
+
"mimetype": "application/pdf",
|
| 156 |
+
"size": 124588,
|
| 157 |
+
"storage_class": "L"
|
| 158 |
+
},
|
| 159 |
+
"nexus789.pdf": {
|
| 160 |
+
"access": {
|
| 161 |
+
"hidden": false
|
| 162 |
+
},
|
| 163 |
+
"checksum": "md5:df0a320cbcc9453f0ee134424c766cbd",
|
| 164 |
+
"ext": "pdf",
|
| 165 |
+
"id": "a6064a5e-b437-4baf-8bf2-87d21dd12637",
|
| 166 |
+
"key": "nexus789.pdf",
|
| 167 |
+
"links": {
|
| 168 |
+
"content": "https://zenodo.org/api/records/16334348/files/nexus789.pdf/content",
|
| 169 |
+
"iiif_api": "https://zenodo.org/api/iiif/record:16334348:nexus789.pdf/full/full/0/default.png",
|
| 170 |
+
"iiif_base": "https://zenodo.org/api/iiif/record:16334348:nexus789.pdf",
|
| 171 |
+
"iiif_canvas": "https://zenodo.org/api/iiif/record:16334348/canvas/nexus789.pdf",
|
| 172 |
+
"iiif_info": "https://zenodo.org/api/iiif/record:16334348:nexus789.pdf/info.json",
|
| 173 |
+
"self": "https://zenodo.org/api/records/16334348/files/nexus789.pdf"
|
| 174 |
+
},
|
| 175 |
+
"metadata": {
|
| 176 |
+
"height": 792,
|
| 177 |
+
"width": 612
|
| 178 |
+
},
|
| 179 |
+
"mimetype": "application/pdf",
|
| 180 |
+
"size": 100708,
|
| 181 |
+
"storage_class": "L"
|
| 182 |
+
},
|
| 183 |
+
"whitenexus 2.pdf": {
|
| 184 |
+
"access": {
|
| 185 |
+
"hidden": false
|
| 186 |
+
},
|
| 187 |
+
"checksum": "md5:420bfdf6a3ee791ed69323fed5909f39",
|
| 188 |
+
"ext": "pdf",
|
| 189 |
+
"id": "24bd372d-2875-4a84-a24a-dcfffa22acb6",
|
| 190 |
+
"key": "whitenexus 2.pdf",
|
| 191 |
+
"links": {
|
| 192 |
+
"content": "https://zenodo.org/api/records/16334348/files/whitenexus%202.pdf/content",
|
| 193 |
+
"iiif_api": "https://zenodo.org/api/iiif/record:16334348:whitenexus%202.pdf/full/full/0/default.png",
|
| 194 |
+
"iiif_base": "https://zenodo.org/api/iiif/record:16334348:whitenexus%202.pdf",
|
| 195 |
+
"iiif_canvas": "https://zenodo.org/api/iiif/record:16334348/canvas/whitenexus%202.pdf",
|
| 196 |
+
"iiif_info": "https://zenodo.org/api/iiif/record:16334348:whitenexus%202.pdf/info.json",
|
| 197 |
+
"self": "https://zenodo.org/api/records/16334348/files/whitenexus%202.pdf"
|
| 198 |
+
},
|
| 199 |
+
"metadata": {
|
| 200 |
+
"height": 792,
|
| 201 |
+
"width": 612
|
| 202 |
+
},
|
| 203 |
+
"mimetype": "application/pdf",
|
| 204 |
+
"size": 144394,
|
| 205 |
+
"storage_class": "L"
|
| 206 |
+
},
|
| 207 |
+
"whitenexus.pdf": {
|
| 208 |
+
"access": {
|
| 209 |
+
"hidden": false
|
| 210 |
+
},
|
| 211 |
+
"checksum": "md5:9fcf043d1da2f711007c59beed8ca5c8",
|
| 212 |
+
"ext": "pdf",
|
| 213 |
+
"id": "f1fe1e0a-b38e-4d9f-b3f0-bb5e64a252aa",
|
| 214 |
+
"key": "whitenexus.pdf",
|
| 215 |
+
"links": {
|
| 216 |
+
"content": "https://zenodo.org/api/records/16334348/files/whitenexus.pdf/content",
|
| 217 |
+
"iiif_api": "https://zenodo.org/api/iiif/record:16334348:whitenexus.pdf/full/full/0/default.png",
|
| 218 |
+
"iiif_base": "https://zenodo.org/api/iiif/record:16334348:whitenexus.pdf",
|
| 219 |
+
"iiif_canvas": "https://zenodo.org/api/iiif/record:16334348/canvas/whitenexus.pdf",
|
| 220 |
+
"iiif_info": "https://zenodo.org/api/iiif/record:16334348:whitenexus.pdf/info.json",
|
| 221 |
+
"self": "https://zenodo.org/api/records/16334348/files/whitenexus.pdf"
|
| 222 |
+
},
|
| 223 |
+
"metadata": {
|
| 224 |
+
"height": 792,
|
| 225 |
+
"width": 612
|
| 226 |
+
},
|
| 227 |
+
"mimetype": "application/pdf",
|
| 228 |
+
"size": 144394,
|
| 229 |
+
"storage_class": "L"
|
| 230 |
+
}
|
| 231 |
+
},
|
| 232 |
+
"order": [],
|
| 233 |
+
"total_bytes": 840985
|
| 234 |
+
},
|
| 235 |
+
"id": "16334348",
|
| 236 |
+
"is_draft": false,
|
| 237 |
+
"is_published": true,
|
| 238 |
+
"links": {
|
| 239 |
+
"access": "https://zenodo.org/api/records/16334348/access",
|
| 240 |
+
"access_grants": "https://zenodo.org/api/records/16334348/access/grants",
|
| 241 |
+
"access_links": "https://zenodo.org/api/records/16334348/access/links",
|
| 242 |
+
"access_request": "https://zenodo.org/api/records/16334348/access/request",
|
| 243 |
+
"access_users": "https://zenodo.org/api/records/16334348/access/users",
|
| 244 |
+
"archive": "https://zenodo.org/api/records/16334348/files-archive",
|
| 245 |
+
"archive_media": "https://zenodo.org/api/records/16334348/media-files-archive",
|
| 246 |
+
"communities": "https://zenodo.org/api/records/16334348/communities",
|
| 247 |
+
"communities-suggestions": "https://zenodo.org/api/records/16334348/communities-suggestions",
|
| 248 |
+
"doi": "https://doi.org/10.57967/hf/6059",
|
| 249 |
+
"draft": "https://zenodo.org/api/records/16334348/draft",
|
| 250 |
+
"files": "https://zenodo.org/api/records/16334348/files",
|
| 251 |
+
"latest": "https://zenodo.org/api/records/16334348/versions/latest",
|
| 252 |
+
"latest_html": "https://zenodo.org/records/16334348/latest",
|
| 253 |
+
"media_files": "https://zenodo.org/api/records/16334348/media-files",
|
| 254 |
+
"parent": "https://zenodo.org/api/records/16284268",
|
| 255 |
+
"parent_doi": "https://doi.org/10.5281/zenodo.16284268",
|
| 256 |
+
"parent_doi_html": "https://zenodo.org/doi/10.5281/zenodo.16284268",
|
| 257 |
+
"parent_html": "https://zenodo.org/records/16284268",
|
| 258 |
+
"preview_html": "https://zenodo.org/records/16334348?preview=1",
|
| 259 |
+
"requests": "https://zenodo.org/api/records/16334348/requests",
|
| 260 |
+
"reserve_doi": "https://zenodo.org/api/records/16334348/draft/pids/doi",
|
| 261 |
+
"self": "https://zenodo.org/api/records/16334348",
|
| 262 |
+
"self_doi": "https://doi.org/10.57967/hf/6059",
|
| 263 |
+
"self_doi_html": "https://zenodo.org/doi/10.57967/hf/6059",
|
| 264 |
+
"self_html": "https://zenodo.org/records/16334348",
|
| 265 |
+
"self_iiif_manifest": "https://zenodo.org/api/iiif/record:16334348/manifest",
|
| 266 |
+
"self_iiif_sequence": "https://zenodo.org/api/iiif/record:16334348/sequence/default",
|
| 267 |
+
"thumbnails": {
|
| 268 |
+
"10": "https://zenodo.org/api/iiif/record:16334348:whitenexus%202.pdf/full/%5E10,/0/default.jpg",
|
| 269 |
+
"100": "https://zenodo.org/api/iiif/record:16334348:whitenexus%202.pdf/full/%5E100,/0/default.jpg",
|
| 270 |
+
"1200": "https://zenodo.org/api/iiif/record:16334348:whitenexus%202.pdf/full/%5E1200,/0/default.jpg",
|
| 271 |
+
"250": "https://zenodo.org/api/iiif/record:16334348:whitenexus%202.pdf/full/%5E250,/0/default.jpg",
|
| 272 |
+
"50": "https://zenodo.org/api/iiif/record:16334348:whitenexus%202.pdf/full/%5E50,/0/default.jpg",
|
| 273 |
+
"750": "https://zenodo.org/api/iiif/record:16334348:whitenexus%202.pdf/full/%5E750,/0/default.jpg"
|
| 274 |
+
},
|
| 275 |
+
"versions": "https://zenodo.org/api/records/16334348/versions"
|
| 276 |
+
},
|
| 277 |
+
"media_files": {
|
| 278 |
+
"count": 8,
|
| 279 |
+
"enabled": true,
|
| 280 |
+
"entries": {
|
| 281 |
+
"43f1bb3e-f9c0-4e52-b254-f30538a661fe.pdf.ptif": {
|
| 282 |
+
"access": {
|
| 283 |
+
"hidden": true
|
| 284 |
+
},
|
| 285 |
+
"ext": "ptif",
|
| 286 |
+
"id": "3495277e-ee57-4159-895b-7794f97b10a5",
|
| 287 |
+
"key": "43f1bb3e-f9c0-4e52-b254-f30538a661fe.pdf.ptif",
|
| 288 |
+
"links": {
|
| 289 |
+
"content": "https://zenodo.org/api/records/16334348/files/43f1bb3e-f9c0-4e52-b254-f30538a661fe.pdf.ptif/content",
|
| 290 |
+
"self": "https://zenodo.org/api/records/16334348/files/43f1bb3e-f9c0-4e52-b254-f30538a661fe.pdf.ptif"
|
| 291 |
+
},
|
| 292 |
+
"metadata": null,
|
| 293 |
+
"mimetype": "application/octet-stream",
|
| 294 |
+
"processor": {
|
| 295 |
+
"source_file_id": "873b265e-ff57-433b-9f49-07be699b31fe",
|
| 296 |
+
"status": "finished",
|
| 297 |
+
"type": "image-tiles"
|
| 298 |
+
},
|
| 299 |
+
"size": 0,
|
| 300 |
+
"storage_class": "L"
|
| 301 |
+
},
|
| 302 |
+
"monday 4.pdf.ptif": {
|
| 303 |
+
"access": {
|
| 304 |
+
"hidden": true
|
| 305 |
+
},
|
| 306 |
+
"ext": "ptif",
|
| 307 |
+
"id": "46fb615f-269c-43a6-80cc-7883a8f6ba3e",
|
| 308 |
+
"key": "monday 4.pdf.ptif",
|
| 309 |
+
"links": {
|
| 310 |
+
"content": "https://zenodo.org/api/records/16334348/files/monday%204.pdf.ptif/content",
|
| 311 |
+
"self": "https://zenodo.org/api/records/16334348/files/monday%204.pdf.ptif"
|
| 312 |
+
},
|
| 313 |
+
"metadata": null,
|
| 314 |
+
"mimetype": "application/octet-stream",
|
| 315 |
+
"processor": {
|
| 316 |
+
"source_file_id": "15514208-c40c-4a0c-a56e-28e8c6a19464",
|
| 317 |
+
"status": "finished",
|
| 318 |
+
"type": "image-tiles"
|
| 319 |
+
},
|
| 320 |
+
"size": 0,
|
| 321 |
+
"storage_class": "L"
|
| 322 |
+
},
|
| 323 |
+
"monday3.pdf.ptif": {
|
| 324 |
+
"access": {
|
| 325 |
+
"hidden": true
|
| 326 |
+
},
|
| 327 |
+
"ext": "ptif",
|
| 328 |
+
"id": "973ccbde-75b6-47c9-808e-872f70b81a49",
|
| 329 |
+
"key": "monday3.pdf.ptif",
|
| 330 |
+
"links": {
|
| 331 |
+
"content": "https://zenodo.org/api/records/16334348/files/monday3.pdf.ptif/content",
|
| 332 |
+
"self": "https://zenodo.org/api/records/16334348/files/monday3.pdf.ptif"
|
| 333 |
+
},
|
| 334 |
+
"metadata": null,
|
| 335 |
+
"mimetype": "application/octet-stream",
|
| 336 |
+
"processor": {
|
| 337 |
+
"source_file_id": "47bff8bb-d533-4000-93e1-b7146a081552",
|
| 338 |
+
"status": "finished",
|
| 339 |
+
"type": "image-tiles"
|
| 340 |
+
},
|
| 341 |
+
"size": 0,
|
| 342 |
+
"storage_class": "L"
|
| 343 |
+
},
|
| 344 |
+
"nexus engine6.pdf.ptif": {
|
| 345 |
+
"access": {
|
| 346 |
+
"hidden": true
|
| 347 |
+
},
|
| 348 |
+
"ext": "ptif",
|
| 349 |
+
"id": "1c7bcdfb-cf29-4ea5-8a71-0342348377d4",
|
| 350 |
+
"key": "nexus engine6.pdf.ptif",
|
| 351 |
+
"links": {
|
| 352 |
+
"content": "https://zenodo.org/api/records/16334348/files/nexus%20engine6.pdf.ptif/content",
|
| 353 |
+
"self": "https://zenodo.org/api/records/16334348/files/nexus%20engine6.pdf.ptif"
|
| 354 |
+
},
|
| 355 |
+
"metadata": null,
|
| 356 |
+
"mimetype": "application/octet-stream",
|
| 357 |
+
"processor": {
|
| 358 |
+
"source_file_id": "128eb575-eca3-4d84-8da3-a45504950c0e",
|
| 359 |
+
"status": "finished",
|
| 360 |
+
"type": "image-tiles"
|
| 361 |
+
},
|
| 362 |
+
"size": 0,
|
| 363 |
+
"storage_class": "L"
|
| 364 |
+
},
|
| 365 |
+
"nexus12345.pdf.ptif": {
|
| 366 |
+
"access": {
|
| 367 |
+
"hidden": true
|
| 368 |
+
},
|
| 369 |
+
"ext": "ptif",
|
| 370 |
+
"id": "59bc47a5-bae4-4400-ae43-aa311d5d6a20",
|
| 371 |
+
"key": "nexus12345.pdf.ptif",
|
| 372 |
+
"links": {
|
| 373 |
+
"content": "https://zenodo.org/api/records/16334348/files/nexus12345.pdf.ptif/content",
|
| 374 |
+
"self": "https://zenodo.org/api/records/16334348/files/nexus12345.pdf.ptif"
|
| 375 |
+
},
|
| 376 |
+
"metadata": null,
|
| 377 |
+
"mimetype": "application/octet-stream",
|
| 378 |
+
"processor": {
|
| 379 |
+
"source_file_id": "8d49c8c1-95d4-40df-a6ae-d10f8f09091e",
|
| 380 |
+
"status": "finished",
|
| 381 |
+
"type": "image-tiles"
|
| 382 |
+
},
|
| 383 |
+
"size": 0,
|
| 384 |
+
"storage_class": "L"
|
| 385 |
+
},
|
| 386 |
+
"nexus789.pdf.ptif": {
|
| 387 |
+
"access": {
|
| 388 |
+
"hidden": true
|
| 389 |
+
},
|
| 390 |
+
"ext": "ptif",
|
| 391 |
+
"id": "75b4d984-397c-412a-8b08-f6704fc72a16",
|
| 392 |
+
"key": "nexus789.pdf.ptif",
|
| 393 |
+
"links": {
|
| 394 |
+
"content": "https://zenodo.org/api/records/16334348/files/nexus789.pdf.ptif/content",
|
| 395 |
+
"self": "https://zenodo.org/api/records/16334348/files/nexus789.pdf.ptif"
|
| 396 |
+
},
|
| 397 |
+
"metadata": null,
|
| 398 |
+
"mimetype": "application/octet-stream",
|
| 399 |
+
"processor": {
|
| 400 |
+
"source_file_id": "a6064a5e-b437-4baf-8bf2-87d21dd12637",
|
| 401 |
+
"status": "finished",
|
| 402 |
+
"type": "image-tiles"
|
| 403 |
+
},
|
| 404 |
+
"size": 0,
|
| 405 |
+
"storage_class": "L"
|
| 406 |
+
},
|
| 407 |
+
"whitenexus 2.pdf.ptif": {
|
| 408 |
+
"access": {
|
| 409 |
+
"hidden": true
|
| 410 |
+
},
|
| 411 |
+
"ext": "ptif",
|
| 412 |
+
"id": "c7764448-64f1-45b0-abf9-83a88935e580",
|
| 413 |
+
"key": "whitenexus 2.pdf.ptif",
|
| 414 |
+
"links": {
|
| 415 |
+
"content": "https://zenodo.org/api/records/16334348/files/whitenexus%202.pdf.ptif/content",
|
| 416 |
+
"self": "https://zenodo.org/api/records/16334348/files/whitenexus%202.pdf.ptif"
|
| 417 |
+
},
|
| 418 |
+
"metadata": null,
|
| 419 |
+
"mimetype": "application/octet-stream",
|
| 420 |
+
"processor": {
|
| 421 |
+
"source_file_id": "24bd372d-2875-4a84-a24a-dcfffa22acb6",
|
| 422 |
+
"status": "finished",
|
| 423 |
+
"type": "image-tiles"
|
| 424 |
+
},
|
| 425 |
+
"size": 0,
|
| 426 |
+
"storage_class": "L"
|
| 427 |
+
},
|
| 428 |
+
"whitenexus.pdf.ptif": {
|
| 429 |
+
"access": {
|
| 430 |
+
"hidden": true
|
| 431 |
+
},
|
| 432 |
+
"ext": "ptif",
|
| 433 |
+
"id": "38325aa9-77a5-4119-9576-824e9d9d06f6",
|
| 434 |
+
"key": "whitenexus.pdf.ptif",
|
| 435 |
+
"links": {
|
| 436 |
+
"content": "https://zenodo.org/api/records/16334348/files/whitenexus.pdf.ptif/content",
|
| 437 |
+
"self": "https://zenodo.org/api/records/16334348/files/whitenexus.pdf.ptif"
|
| 438 |
+
},
|
| 439 |
+
"metadata": null,
|
| 440 |
+
"mimetype": "application/octet-stream",
|
| 441 |
+
"processor": {
|
| 442 |
+
"source_file_id": "f1fe1e0a-b38e-4d9f-b3f0-bb5e64a252aa",
|
| 443 |
+
"status": "finished",
|
| 444 |
+
"type": "image-tiles"
|
| 445 |
+
},
|
| 446 |
+
"size": 0,
|
| 447 |
+
"storage_class": "L"
|
| 448 |
+
}
|
| 449 |
+
},
|
| 450 |
+
"order": [],
|
| 451 |
+
"total_bytes": 0
|
| 452 |
+
},
|
| 453 |
+
"metadata": {
|
| 454 |
+
"creators": [
|
| 455 |
+
{
|
| 456 |
+
"person_or_org": {
|
| 457 |
+
"family_name": "jonathan",
|
| 458 |
+
"given_name": "harrison",
|
| 459 |
+
"identifiers": [
|
| 460 |
+
{
|
| 461 |
+
"identifier": "0009-0003-7005-8187",
|
| 462 |
+
"scheme": "orcid"
|
| 463 |
+
}
|
| 464 |
+
],
|
| 465 |
+
"name": "jonathan, harrison",
|
| 466 |
+
"type": "personal"
|
| 467 |
+
},
|
| 468 |
+
"role": {
|
| 469 |
+
"id": "rightsholder",
|
| 470 |
+
"title": {
|
| 471 |
+
"de": "RechteinhaberIn",
|
| 472 |
+
"en": "Rights holder"
|
| 473 |
+
}
|
| 474 |
+
}
|
| 475 |
+
}
|
| 476 |
+
],
|
| 477 |
+
"description": "<p>Description:</p>\n<p>The NexisSignalEngine is an original, production-grade signal analysis engine designed to advance the state of explainable AI (XAI), security auditing, and ethical reasoning. This framework uniquely combines deterministic cryptographic hashing, seeded vector rotations, harmonic FFT analysis, and hybrid symbolic-statistical evaluation through distinct agent-based perspectives.</p>\n<p> </p>\n<p>Core Features:</p>\n<p> </p>\n<ul>\n<li>Deterministic Analysis: Each signal is hashed and used to seed all numeric operations, enabling full auditability and forensic reproducibility.</li>\n<li>Multi-Agent Perspectives: Input is processed through three parallel cognitive perspectives (“Colleen,” “Luke,” “Kellyanne”), each running its own mathematical, ethical, or harmonic analysis for rich, multi-lens evaluation.</li>\n<li>Hybrid Reasoning: Integrates symbolic (ethics, risk, virtue tagging) and statistical (entropy, FFT harmonics, tensor entanglement) methods for robust signal integrity checks.</li>\n<li>Secure, Tamper-Evident Memory: All input/output records are stored with file-locking and periodic file rotation. Archive logs are timestamped and pruned for compliance and chain-of-custody requirements.</li>\n<li>Configurable and Hardened: All core configurations (risk/virtue/ethics terms) are loaded and validated with full key enforcement and fallback protections.</li>\n<li>Safe and Attack-Resistant: Memory growth is bounded, inputs are length-capped, FFT results are normalized, and deterministic RNG prevents adversarial replay attacks.</li>\n</ul>\n<p> </p>\n<p> </p>\n<p>Intended Use:</p>\n<p>NexisSignalEngine is intended for researchers, developers, and auditors who require a trustworthy, transparent, and reproducible framework for:</p>\n<p> </p>\n<ul>\n<li>Detecting, auditing, and adapting to pre-corruption signals</li>\n<li>Validating ethical and risk compliance in autonomous AI systems</li>\n<li>Recording, tracing, and justifying real-world signal decisions</li>\n</ul>\n<p> </p>\n<p> </p>\n<p>Provenance and Authorship:</p>\n<p>This architecture, including its signal-seeded deterministic vector logic, agent-based multi-perspective evaluation, and memory rotation protocol, is the original work of Jonathan Harrison (Raiff1982). This release serves as a timestamped, tamper-evident record of innovation and prior art.</p>\n<p> </p>\n<p>Keywords:</p>\n<p>Explainable AI, Signal Reasoning, Cognitive Agents, Deterministic Audit, Entropy Detection, Harmonic Analysis, AI Ethics, Provenance, Memory Rotation, Symbolic Reasoning</p>",
|
| 478 |
+
"publication_date": "2025-07-22",
|
| 479 |
+
"publisher": "Zenodo",
|
| 480 |
+
"resource_type": {
|
| 481 |
+
"id": "software-computationalnotebook",
|
| 482 |
+
"title": {
|
| 483 |
+
"de": "Computational Notebook",
|
| 484 |
+
"en": "Computational notebook"
|
| 485 |
+
}
|
| 486 |
+
},
|
| 487 |
+
"rights": [
|
| 488 |
+
{
|
| 489 |
+
"description": {
|
| 490 |
+
"en": "The Creative Commons Attribution license allows re-distribution and re-use of a licensed work on the condition that the creator is appropriately credited."
|
| 491 |
+
},
|
| 492 |
+
"icon": "cc-by-icon",
|
| 493 |
+
"id": "cc-by-4.0",
|
| 494 |
+
"props": {
|
| 495 |
+
"scheme": "spdx",
|
| 496 |
+
"url": "https://creativecommons.org/licenses/by/4.0/legalcode"
|
| 497 |
+
},
|
| 498 |
+
"title": {
|
| 499 |
+
"en": "Creative Commons Attribution 4.0 International"
|
| 500 |
+
}
|
| 501 |
+
}
|
| 502 |
+
],
|
| 503 |
+
"title": "Nexus engine"
|
| 504 |
+
},
|
| 505 |
+
"parent": {
|
| 506 |
+
"access": {
|
| 507 |
+
"grants": [],
|
| 508 |
+
"links": [],
|
| 509 |
+
"owned_by": {
|
| 510 |
+
"user": "1301534"
|
| 511 |
+
},
|
| 512 |
+
"settings": {
|
| 513 |
+
"accept_conditions_text": null,
|
| 514 |
+
"allow_guest_requests": false,
|
| 515 |
+
"allow_user_requests": false,
|
| 516 |
+
"secret_link_expiration": 0
|
| 517 |
+
}
|
| 518 |
+
},
|
| 519 |
+
"communities": {},
|
| 520 |
+
"id": "16284268",
|
| 521 |
+
"pids": {
|
| 522 |
+
"doi": {
|
| 523 |
+
"client": "datacite",
|
| 524 |
+
"identifier": "10.5281/zenodo.16284268",
|
| 525 |
+
"provider": "datacite"
|
| 526 |
+
}
|
| 527 |
+
}
|
| 528 |
+
},
|
| 529 |
+
"pids": {
|
| 530 |
+
"doi": {
|
| 531 |
+
"identifier": "10.57967/hf/6059",
|
| 532 |
+
"provider": "external"
|
| 533 |
+
},
|
| 534 |
+
"oai": {
|
| 535 |
+
"identifier": "oai:zenodo.org:16334348",
|
| 536 |
+
"provider": "oai"
|
| 537 |
+
}
|
| 538 |
+
},
|
| 539 |
+
"revision_id": 3,
|
| 540 |
+
"stats": {
|
| 541 |
+
"all_versions": {
|
| 542 |
+
"data_volume": 3967125.0,
|
| 543 |
+
"downloads": 38,
|
| 544 |
+
"unique_downloads": 23,
|
| 545 |
+
"unique_views": 20,
|
| 546 |
+
"views": 23
|
| 547 |
+
},
|
| 548 |
+
"this_version": {
|
| 549 |
+
"data_volume": 3119022.0,
|
| 550 |
+
"downloads": 27,
|
| 551 |
+
"unique_downloads": 16,
|
| 552 |
+
"unique_views": 14,
|
| 553 |
+
"views": 15
|
| 554 |
+
}
|
| 555 |
+
},
|
| 556 |
+
"status": "published",
|
| 557 |
+
"swh": {},
|
| 558 |
+
"updated": "2025-07-22T20:36:20.742926+00:00",
|
| 559 |
+
"versions": {
|
| 560 |
+
"index": 5,
|
| 561 |
+
"is_latest": true,
|
| 562 |
+
"is_latest_draft": true
|
| 563 |
+
}
|
| 564 |
+
}
|