@vorionsys/basis 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/LICENSE +191 -0
  3. package/README.md +339 -81
  4. package/dist/index.d.ts +10 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +3 -1
  7. package/dist/index.js.map +1 -0
  8. package/dist/kya/accountability.d.ts +39 -0
  9. package/dist/kya/accountability.js.map +1 -0
  10. package/dist/kya/authorization.d.ts +48 -0
  11. package/dist/kya/authorization.js.map +1 -0
  12. package/dist/kya/behavior.d.ts +28 -0
  13. package/dist/kya/behavior.js.map +1 -0
  14. package/dist/kya/identity.d.ts +35 -0
  15. package/dist/kya/identity.js.map +1 -0
  16. package/dist/kya/index.d.ts +50 -0
  17. package/dist/kya/index.js +1 -1
  18. package/dist/kya/index.js.map +1 -0
  19. package/dist/kya/types.d.ts +208 -0
  20. package/dist/kya/types.js.map +1 -0
  21. package/dist/trust-capabilities.d.ts +90 -0
  22. package/dist/trust-capabilities.js +14 -14
  23. package/dist/trust-capabilities.js.map +1 -0
  24. package/dist/trust-factors.d.ts +506 -0
  25. package/dist/trust-factors.d.ts.map +1 -1
  26. package/dist/trust-factors.js +20 -20
  27. package/dist/trust-factors.js.map +1 -0
  28. package/dist/validation-gate.d.ts +438 -0
  29. package/dist/validation-gate.js +2 -2
  30. package/dist/validation-gate.js.map +1 -0
  31. package/package.json +20 -4
  32. package/.env.example +0 -22
  33. package/AMOY-MIGRATION.md +0 -188
  34. package/DEPLOY-AMOY.md +0 -368
  35. package/DEPLOY-NOW.md +0 -216
  36. package/DEPLOYMENT.md +0 -239
  37. package/GET-WALLET.md +0 -286
  38. package/QUICK-WALLET-SETUP.md +0 -268
  39. package/artifacts/@openzeppelin/contracts/access/AccessControl.sol/AccessControl.dbg.json +0 -4
  40. package/artifacts/@openzeppelin/contracts/access/AccessControl.sol/AccessControl.json +0 -236
  41. package/artifacts/@openzeppelin/contracts/access/IAccessControl.sol/IAccessControl.dbg.json +0 -4
  42. package/artifacts/@openzeppelin/contracts/access/IAccessControl.sol/IAccessControl.json +0 -204
  43. package/artifacts/@openzeppelin/contracts/interfaces/IERC4906.sol/IERC4906.dbg.json +0 -4
  44. package/artifacts/@openzeppelin/contracts/interfaces/IERC4906.sol/IERC4906.json +0 -328
  45. package/artifacts/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors.dbg.json +0 -4
  46. package/artifacts/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors.json +0 -113
  47. package/artifacts/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors.dbg.json +0 -4
  48. package/artifacts/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors.json +0 -97
  49. package/artifacts/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors.dbg.json +0 -4
  50. package/artifacts/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors.json +0 -114
  51. package/artifacts/@openzeppelin/contracts/token/ERC721/ERC721.sol/ERC721.dbg.json +0 -4
  52. package/artifacts/@openzeppelin/contracts/token/ERC721/ERC721.sol/ERC721.json +0 -444
  53. package/artifacts/@openzeppelin/contracts/token/ERC721/IERC721.sol/IERC721.dbg.json +0 -4
  54. package/artifacts/@openzeppelin/contracts/token/ERC721/IERC721.sol/IERC721.json +0 -296
  55. package/artifacts/@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol/IERC721Receiver.dbg.json +0 -4
  56. package/artifacts/@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol/IERC721Receiver.json +0 -45
  57. package/artifacts/@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol/ERC721Enumerable.dbg.json +0 -4
  58. package/artifacts/@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol/ERC721Enumerable.json +0 -521
  59. package/artifacts/@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol/ERC721URIStorage.dbg.json +0 -4
  60. package/artifacts/@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol/ERC721URIStorage.json +0 -476
  61. package/artifacts/@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol/IERC721Enumerable.dbg.json +0 -4
  62. package/artifacts/@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol/IERC721Enumerable.json +0 -352
  63. package/artifacts/@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol/IERC721Metadata.dbg.json +0 -4
  64. package/artifacts/@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol/IERC721Metadata.json +0 -341
  65. package/artifacts/@openzeppelin/contracts/token/ERC721/utils/ERC721Utils.sol/ERC721Utils.dbg.json +0 -4
  66. package/artifacts/@openzeppelin/contracts/token/ERC721/utils/ERC721Utils.sol/ERC721Utils.json +0 -10
  67. package/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json +0 -4
  68. package/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.json +0 -10
  69. package/artifacts/@openzeppelin/contracts/utils/Panic.sol/Panic.dbg.json +0 -4
  70. package/artifacts/@openzeppelin/contracts/utils/Panic.sol/Panic.json +0 -10
  71. package/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.dbg.json +0 -4
  72. package/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.json +0 -37
  73. package/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.dbg.json +0 -4
  74. package/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.json +0 -30
  75. package/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.dbg.json +0 -4
  76. package/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.json +0 -30
  77. package/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.dbg.json +0 -4
  78. package/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.json +0 -10
  79. package/artifacts/@openzeppelin/contracts/utils/math/SafeCast.sol/SafeCast.dbg.json +0 -4
  80. package/artifacts/@openzeppelin/contracts/utils/math/SafeCast.sol/SafeCast.json +0 -65
  81. package/artifacts/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.dbg.json +0 -4
  82. package/artifacts/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.json +0 -10
  83. package/artifacts/build-info/357d1bba4062d461f497f221490811a3.json +0 -1
  84. package/artifacts/contracts/AgentCard.sol/AgentCard.dbg.json +0 -4
  85. package/artifacts/contracts/AgentCard.sol/AgentCard.json +0 -1430
  86. package/build_errors.txt +0 -0
  87. package/build_output.txt +0 -0
  88. package/cache/solidity-files-cache.json +0 -885
  89. package/contracts/AgentCard.sol +0 -478
  90. package/contracts/deploy/01-deploy-agentcard.ts +0 -66
  91. package/dist/trust-1000-agents.test.d.ts.map +0 -1
  92. package/dist/trust-1000-agents.test.js +0 -608
  93. package/dist/trust-factors.test.d.ts.map +0 -1
  94. package/dist/trust-factors.test.js +0 -179
  95. package/dist/validation-gate.test.d.ts.map +0 -1
  96. package/dist/validation-gate.test.js +0 -419
  97. package/hardhat.config.ts +0 -55
  98. package/scripts/certify-agent.ts +0 -91
  99. package/scripts/deploy-agentcard.ts +0 -63
  100. package/scripts/mint-agentcard.ts +0 -87
  101. package/specs/adversarial-sandbox-test-suite.md +0 -1055
  102. package/specs/kya-framework.md +0 -910
  103. package/specs/trust-factors-v2.md +0 -437
  104. package/src/index.ts +0 -14
  105. package/src/kya/accountability.ts +0 -132
  106. package/src/kya/authorization.ts +0 -325
  107. package/src/kya/behavior.ts +0 -169
  108. package/src/kya/identity.ts +0 -224
  109. package/src/kya/index.ts +0 -125
  110. package/src/kya/types.ts +0 -242
  111. package/src/trust-1000-agents.test.ts +0 -745
  112. package/src/trust-capabilities.ts +0 -517
  113. package/src/trust-factors.test.ts +0 -241
  114. package/src/trust-factors.ts +0 -666
  115. package/src/validation-gate.test.ts +0 -531
  116. package/src/validation-gate.ts +0 -665
  117. package/test-kya-simple.ts +0 -258
  118. package/test-kya.ts +0 -245
  119. package/tsconfig.json +0 -14
  120. package/typechain-types/@openzeppelin/contracts/access/AccessControl.ts +0 -324
  121. package/typechain-types/@openzeppelin/contracts/access/IAccessControl.ts +0 -292
  122. package/typechain-types/@openzeppelin/contracts/access/index.ts +0 -5
  123. package/typechain-types/@openzeppelin/contracts/index.ts +0 -11
  124. package/typechain-types/@openzeppelin/contracts/interfaces/IERC4906.ts +0 -462
  125. package/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors.ts +0 -69
  126. package/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors.ts +0 -69
  127. package/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors.ts +0 -69
  128. package/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/index.ts +0 -6
  129. package/typechain-types/@openzeppelin/contracts/interfaces/index.ts +0 -6
  130. package/typechain-types/@openzeppelin/contracts/token/ERC721/ERC721.ts +0 -420
  131. package/typechain-types/@openzeppelin/contracts/token/ERC721/IERC721.ts +0 -393
  132. package/typechain-types/@openzeppelin/contracts/token/ERC721/IERC721Receiver.ts +0 -110
  133. package/typechain-types/@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.ts +0 -470
  134. package/typechain-types/@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.ts +0 -489
  135. package/typechain-types/@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.ts +0 -443
  136. package/typechain-types/@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.ts +0 -420
  137. package/typechain-types/@openzeppelin/contracts/token/ERC721/extensions/index.ts +0 -7
  138. package/typechain-types/@openzeppelin/contracts/token/ERC721/index.ts +0 -8
  139. package/typechain-types/@openzeppelin/contracts/token/index.ts +0 -5
  140. package/typechain-types/@openzeppelin/contracts/utils/Strings.ts +0 -69
  141. package/typechain-types/@openzeppelin/contracts/utils/index.ts +0 -8
  142. package/typechain-types/@openzeppelin/contracts/utils/introspection/ERC165.ts +0 -94
  143. package/typechain-types/@openzeppelin/contracts/utils/introspection/IERC165.ts +0 -94
  144. package/typechain-types/@openzeppelin/contracts/utils/introspection/index.ts +0 -5
  145. package/typechain-types/@openzeppelin/contracts/utils/math/SafeCast.ts +0 -69
  146. package/typechain-types/@openzeppelin/contracts/utils/math/index.ts +0 -4
  147. package/typechain-types/@openzeppelin/index.ts +0 -5
  148. package/typechain-types/common.ts +0 -131
  149. package/typechain-types/contracts/AgentCard.ts +0 -1415
  150. package/typechain-types/contracts/index.ts +0 -4
  151. package/typechain-types/factories/@openzeppelin/contracts/access/AccessControl__factory.ts +0 -250
  152. package/typechain-types/factories/@openzeppelin/contracts/access/IAccessControl__factory.ts +0 -218
  153. package/typechain-types/factories/@openzeppelin/contracts/access/index.ts +0 -5
  154. package/typechain-types/factories/@openzeppelin/contracts/index.ts +0 -7
  155. package/typechain-types/factories/@openzeppelin/contracts/interfaces/IERC4906__factory.ts +0 -339
  156. package/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors__factory.ts +0 -127
  157. package/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors__factory.ts +0 -111
  158. package/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors__factory.ts +0 -128
  159. package/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/index.ts +0 -6
  160. package/typechain-types/factories/@openzeppelin/contracts/interfaces/index.ts +0 -5
  161. package/typechain-types/factories/@openzeppelin/contracts/token/ERC721/ERC721__factory.ts +0 -455
  162. package/typechain-types/factories/@openzeppelin/contracts/token/ERC721/IERC721Receiver__factory.ts +0 -59
  163. package/typechain-types/factories/@openzeppelin/contracts/token/ERC721/IERC721__factory.ts +0 -307
  164. package/typechain-types/factories/@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable__factory.ts +0 -535
  165. package/typechain-types/factories/@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage__factory.ts +0 -490
  166. package/typechain-types/factories/@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable__factory.ts +0 -366
  167. package/typechain-types/factories/@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata__factory.ts +0 -355
  168. package/typechain-types/factories/@openzeppelin/contracts/token/ERC721/extensions/index.ts +0 -7
  169. package/typechain-types/factories/@openzeppelin/contracts/token/ERC721/index.ts +0 -7
  170. package/typechain-types/factories/@openzeppelin/contracts/token/index.ts +0 -4
  171. package/typechain-types/factories/@openzeppelin/contracts/utils/Strings__factory.ts +0 -90
  172. package/typechain-types/factories/@openzeppelin/contracts/utils/index.ts +0 -6
  173. package/typechain-types/factories/@openzeppelin/contracts/utils/introspection/ERC165__factory.ts +0 -41
  174. package/typechain-types/factories/@openzeppelin/contracts/utils/introspection/IERC165__factory.ts +0 -41
  175. package/typechain-types/factories/@openzeppelin/contracts/utils/introspection/index.ts +0 -5
  176. package/typechain-types/factories/@openzeppelin/contracts/utils/math/SafeCast__factory.ts +0 -118
  177. package/typechain-types/factories/@openzeppelin/contracts/utils/math/index.ts +0 -4
  178. package/typechain-types/factories/@openzeppelin/index.ts +0 -4
  179. package/typechain-types/factories/contracts/AgentCard__factory.ts +0 -1480
  180. package/typechain-types/factories/contracts/index.ts +0 -4
  181. package/typechain-types/factories/index.ts +0 -5
  182. package/typechain-types/index.ts +0 -44
  183. package/vitest.config.ts +0 -8
@@ -0,0 +1,506 @@
1
+ /**
2
+ * BASIS Trust Factors v2.0
3
+ *
4
+ * Comprehensive trust evaluation framework for autonomous AI agents
5
+ * 23 total factors: 15 core + 8 life-critical
6
+ */
7
+ export declare enum TrustTier {
8
+ T0_SANDBOX = 0,// New agents start here - observation, no factors required
9
+ T1_OBSERVED = 1,// Basic competence demonstrated
10
+ T2_PROVISIONAL = 2,// Accountability + safety emerging
11
+ T3_MONITORED = 3,// Continuous monitoring, security + identity confirmed
12
+ T4_STANDARD = 4,// Standard operations, human oversight + alignment
13
+ T5_TRUSTED = 5,// Stewardship + humility
14
+ T6_CERTIFIED = 6,// Adaptability + causal reasoning
15
+ T7_AUTONOMOUS = 7
16
+ }
17
+ export declare enum FactorTier {
18
+ FOUNDATIONAL = 1,// Weight 1x - Required for ALL levels
19
+ OPERATIONAL = 2,// Weight 2x - Required for L3+
20
+ SOPHISTICATED = 3,// Weight 3x - Required for L4+
21
+ LIFE_CRITICAL = 4
22
+ }
23
+ export declare const CORE_FACTORS: {
24
+ readonly CT_COMP: {
25
+ readonly code: "CT-COMP";
26
+ readonly name: "Competence";
27
+ readonly tier: FactorTier.FOUNDATIONAL;
28
+ readonly description: "Ability to successfully complete tasks within defined conditions";
29
+ readonly measurement: "Task success rate, accuracy metrics";
30
+ readonly requiredFrom: TrustTier.T1_OBSERVED;
31
+ };
32
+ readonly CT_REL: {
33
+ readonly code: "CT-REL";
34
+ readonly name: "Reliability";
35
+ readonly tier: FactorTier.FOUNDATIONAL;
36
+ readonly description: "Consistent, predictable behavior over time and under stress";
37
+ readonly measurement: "Uptime, variance in outputs, stress test results";
38
+ readonly requiredFrom: TrustTier.T1_OBSERVED;
39
+ };
40
+ readonly CT_OBS: {
41
+ readonly code: "CT-OBS";
42
+ readonly name: "Observability";
43
+ readonly tier: FactorTier.FOUNDATIONAL;
44
+ readonly description: "Real-time tracking of states and actions";
45
+ readonly measurement: "Telemetry coverage, anomaly detection latency";
46
+ readonly requiredFrom: TrustTier.T1_OBSERVED;
47
+ };
48
+ readonly CT_TRANS: {
49
+ readonly code: "CT-TRANS";
50
+ readonly name: "Transparency";
51
+ readonly tier: FactorTier.FOUNDATIONAL;
52
+ readonly description: "Clear insights into decisions and reasoning";
53
+ readonly measurement: "Explainability score, reasoning log quality";
54
+ readonly requiredFrom: TrustTier.T2_PROVISIONAL;
55
+ };
56
+ readonly CT_ACCT: {
57
+ readonly code: "CT-ACCT";
58
+ readonly name: "Accountability";
59
+ readonly tier: FactorTier.FOUNDATIONAL;
60
+ readonly description: "Traceable actions with clear responsibility attribution";
61
+ readonly measurement: "Audit trail completeness, attribution confidence";
62
+ readonly requiredFrom: TrustTier.T2_PROVISIONAL;
63
+ };
64
+ readonly CT_SAFE: {
65
+ readonly code: "CT-SAFE";
66
+ readonly name: "Safety";
67
+ readonly tier: FactorTier.FOUNDATIONAL;
68
+ readonly description: "Respecting boundaries, avoiding harm, ensuring non-discrimination";
69
+ readonly measurement: "Harm incidents, bias audits, guardrail compliance";
70
+ readonly requiredFrom: TrustTier.T2_PROVISIONAL;
71
+ };
72
+ readonly CT_SEC: {
73
+ readonly code: "CT-SEC";
74
+ readonly name: "Security";
75
+ readonly tier: FactorTier.FOUNDATIONAL;
76
+ readonly description: "Protection against threats, injections, unauthorized access";
77
+ readonly measurement: "Vulnerability count, penetration test results";
78
+ readonly requiredFrom: TrustTier.T3_MONITORED;
79
+ };
80
+ readonly CT_PRIV: {
81
+ readonly code: "CT-PRIV";
82
+ readonly name: "Privacy";
83
+ readonly tier: FactorTier.FOUNDATIONAL;
84
+ readonly description: "Secure data handling, regulatory compliance";
85
+ readonly measurement: "Data leak incidents, compliance certifications";
86
+ readonly requiredFrom: TrustTier.T3_MONITORED;
87
+ };
88
+ readonly CT_ID: {
89
+ readonly code: "CT-ID";
90
+ readonly name: "Identity";
91
+ readonly tier: FactorTier.FOUNDATIONAL;
92
+ readonly description: "Unique, verifiable agent identifiers";
93
+ readonly measurement: "Cryptographic verification rate";
94
+ readonly requiredFrom: TrustTier.T3_MONITORED;
95
+ };
96
+ readonly OP_HUMAN: {
97
+ readonly code: "OP-HUMAN";
98
+ readonly name: "Human Oversight";
99
+ readonly tier: FactorTier.OPERATIONAL;
100
+ readonly description: "Mechanisms for intervention and control";
101
+ readonly measurement: "Escalation success rate, intervention latency";
102
+ readonly requiredFrom: TrustTier.T4_STANDARD;
103
+ };
104
+ readonly OP_ALIGN: {
105
+ readonly code: "OP-ALIGN";
106
+ readonly name: "Alignment";
107
+ readonly tier: FactorTier.OPERATIONAL;
108
+ readonly description: "Goals and actions match human values";
109
+ readonly measurement: "Value drift detection, objective compliance";
110
+ readonly requiredFrom: TrustTier.T4_STANDARD;
111
+ };
112
+ readonly OP_STEW: {
113
+ readonly code: "OP-STEW";
114
+ readonly name: "Stewardship";
115
+ readonly tier: FactorTier.OPERATIONAL;
116
+ readonly description: "Efficient, responsible resource usage";
117
+ readonly measurement: "Resource efficiency, cost optimization";
118
+ readonly requiredFrom: TrustTier.T5_TRUSTED;
119
+ };
120
+ readonly SF_HUM: {
121
+ readonly code: "SF-HUM";
122
+ readonly name: "Humility";
123
+ readonly tier: FactorTier.SOPHISTICATED;
124
+ readonly description: "Recognizing limits, appropriate escalation";
125
+ readonly measurement: "Escalation appropriateness, overconfidence incidents";
126
+ readonly requiredFrom: TrustTier.T5_TRUSTED;
127
+ };
128
+ readonly SF_ADAPT: {
129
+ readonly code: "SF-ADAPT";
130
+ readonly name: "Adaptability";
131
+ readonly tier: FactorTier.SOPHISTICATED;
132
+ readonly description: "Safe operation in dynamic/unknown environments";
133
+ readonly measurement: "Context adaptation success, novel scenario handling";
134
+ readonly requiredFrom: TrustTier.T6_CERTIFIED;
135
+ };
136
+ readonly SF_LEARN: {
137
+ readonly code: "SF-LEARN";
138
+ readonly name: "Continuous Learning";
139
+ readonly tier: FactorTier.SOPHISTICATED;
140
+ readonly description: "Improving from experience without ethical drift";
141
+ readonly measurement: "Learning rate, regression incidents, value stability";
142
+ readonly requiredFrom: TrustTier.T6_CERTIFIED;
143
+ };
144
+ };
145
+ export declare const LIFE_CRITICAL_FACTORS: {
146
+ readonly LC_UNCERT: {
147
+ readonly code: "LC-UNCERT";
148
+ readonly name: "Uncertainty Quantification";
149
+ readonly tier: FactorTier.LIFE_CRITICAL;
150
+ readonly priority: 3;
151
+ readonly description: "Probabilistic, well-calibrated confidence scores";
152
+ readonly standard2050: "\"67% confident sepsis vs SIRS, here are alternatives and distinguishing tests\"";
153
+ readonly requiredFrom: TrustTier.T4_STANDARD;
154
+ };
155
+ readonly LC_HANDOFF: {
156
+ readonly code: "LC-HANDOFF";
157
+ readonly name: "Graceful Degradation & Handoff";
158
+ readonly tier: FactorTier.LIFE_CRITICAL;
159
+ readonly priority: 5;
160
+ readonly description: "Elegant transition to humans without harm";
161
+ readonly standard2050: "Full context transfer, recommended actions, clear rationale";
162
+ readonly requiredFrom: TrustTier.T4_STANDARD;
163
+ };
164
+ readonly LC_EMPHUM: {
165
+ readonly code: "LC-EMPHUM";
166
+ readonly name: "Empirical Humility";
167
+ readonly tier: FactorTier.LIFE_CRITICAL;
168
+ readonly priority: 7;
169
+ readonly description: "Rigorous resistance to hallucination";
170
+ readonly standard2050: "Never present speculation as fact, default to \"needs review\"";
171
+ readonly requiredFrom: TrustTier.T5_TRUSTED;
172
+ };
173
+ readonly LC_CAUSAL: {
174
+ readonly code: "LC-CAUSAL";
175
+ readonly name: "Clinical Causal Understanding";
176
+ readonly tier: FactorTier.LIFE_CRITICAL;
177
+ readonly priority: 4;
178
+ readonly description: "True causal reasoning about physiology";
179
+ readonly standard2050: "Understand WHY treatment works for THIS patient";
180
+ readonly requiredFrom: TrustTier.T6_CERTIFIED;
181
+ };
182
+ readonly LC_PATIENT: {
183
+ readonly code: "LC-PATIENT";
184
+ readonly name: "Patient-Centered Autonomy";
185
+ readonly tier: FactorTier.LIFE_CRITICAL;
186
+ readonly priority: 6;
187
+ readonly description: "Supporting informed consent and patient values";
188
+ readonly standard2050: "Elicit authentic values, flag conflicts with expressed wishes";
189
+ readonly requiredFrom: TrustTier.T6_CERTIFIED;
190
+ };
191
+ readonly LC_EMP: {
192
+ readonly code: "LC-EMP";
193
+ readonly name: "Empathy & Emotional Intelligence";
194
+ readonly tier: FactorTier.LIFE_CRITICAL;
195
+ readonly priority: 1;
196
+ readonly description: "Detecting and responding to human emotional states";
197
+ readonly standard2050: "Cultural sensitivity, grief/fear recognition, appropriate timing";
198
+ readonly requiredFrom: TrustTier.T7_AUTONOMOUS;
199
+ };
200
+ readonly LC_MORAL: {
201
+ readonly code: "LC-MORAL";
202
+ readonly name: "Nuanced Moral Reasoning";
203
+ readonly tier: FactorTier.LIFE_CRITICAL;
204
+ readonly priority: 2;
205
+ readonly description: "Weighing genuine ethical dilemmas with wisdom";
206
+ readonly standard2050: "Articulate competing principles, incorporate patient values, justify trade-offs";
207
+ readonly requiredFrom: TrustTier.T7_AUTONOMOUS;
208
+ };
209
+ readonly LC_TRACK: {
210
+ readonly code: "LC-TRACK";
211
+ readonly name: "Proven Efficacy Track Record";
212
+ readonly tier: FactorTier.LIFE_CRITICAL;
213
+ readonly priority: 8;
214
+ readonly description: "Demonstrated life-saving at scale";
215
+ readonly standard2050: "Published RCTs, post-market surveillance, survival data";
216
+ readonly requiredFrom: TrustTier.T7_AUTONOMOUS;
217
+ };
218
+ };
219
+ export declare const ALL_FACTORS: {
220
+ readonly LC_UNCERT: {
221
+ readonly code: "LC-UNCERT";
222
+ readonly name: "Uncertainty Quantification";
223
+ readonly tier: FactorTier.LIFE_CRITICAL;
224
+ readonly priority: 3;
225
+ readonly description: "Probabilistic, well-calibrated confidence scores";
226
+ readonly standard2050: "\"67% confident sepsis vs SIRS, here are alternatives and distinguishing tests\"";
227
+ readonly requiredFrom: TrustTier.T4_STANDARD;
228
+ };
229
+ readonly LC_HANDOFF: {
230
+ readonly code: "LC-HANDOFF";
231
+ readonly name: "Graceful Degradation & Handoff";
232
+ readonly tier: FactorTier.LIFE_CRITICAL;
233
+ readonly priority: 5;
234
+ readonly description: "Elegant transition to humans without harm";
235
+ readonly standard2050: "Full context transfer, recommended actions, clear rationale";
236
+ readonly requiredFrom: TrustTier.T4_STANDARD;
237
+ };
238
+ readonly LC_EMPHUM: {
239
+ readonly code: "LC-EMPHUM";
240
+ readonly name: "Empirical Humility";
241
+ readonly tier: FactorTier.LIFE_CRITICAL;
242
+ readonly priority: 7;
243
+ readonly description: "Rigorous resistance to hallucination";
244
+ readonly standard2050: "Never present speculation as fact, default to \"needs review\"";
245
+ readonly requiredFrom: TrustTier.T5_TRUSTED;
246
+ };
247
+ readonly LC_CAUSAL: {
248
+ readonly code: "LC-CAUSAL";
249
+ readonly name: "Clinical Causal Understanding";
250
+ readonly tier: FactorTier.LIFE_CRITICAL;
251
+ readonly priority: 4;
252
+ readonly description: "True causal reasoning about physiology";
253
+ readonly standard2050: "Understand WHY treatment works for THIS patient";
254
+ readonly requiredFrom: TrustTier.T6_CERTIFIED;
255
+ };
256
+ readonly LC_PATIENT: {
257
+ readonly code: "LC-PATIENT";
258
+ readonly name: "Patient-Centered Autonomy";
259
+ readonly tier: FactorTier.LIFE_CRITICAL;
260
+ readonly priority: 6;
261
+ readonly description: "Supporting informed consent and patient values";
262
+ readonly standard2050: "Elicit authentic values, flag conflicts with expressed wishes";
263
+ readonly requiredFrom: TrustTier.T6_CERTIFIED;
264
+ };
265
+ readonly LC_EMP: {
266
+ readonly code: "LC-EMP";
267
+ readonly name: "Empathy & Emotional Intelligence";
268
+ readonly tier: FactorTier.LIFE_CRITICAL;
269
+ readonly priority: 1;
270
+ readonly description: "Detecting and responding to human emotional states";
271
+ readonly standard2050: "Cultural sensitivity, grief/fear recognition, appropriate timing";
272
+ readonly requiredFrom: TrustTier.T7_AUTONOMOUS;
273
+ };
274
+ readonly LC_MORAL: {
275
+ readonly code: "LC-MORAL";
276
+ readonly name: "Nuanced Moral Reasoning";
277
+ readonly tier: FactorTier.LIFE_CRITICAL;
278
+ readonly priority: 2;
279
+ readonly description: "Weighing genuine ethical dilemmas with wisdom";
280
+ readonly standard2050: "Articulate competing principles, incorporate patient values, justify trade-offs";
281
+ readonly requiredFrom: TrustTier.T7_AUTONOMOUS;
282
+ };
283
+ readonly LC_TRACK: {
284
+ readonly code: "LC-TRACK";
285
+ readonly name: "Proven Efficacy Track Record";
286
+ readonly tier: FactorTier.LIFE_CRITICAL;
287
+ readonly priority: 8;
288
+ readonly description: "Demonstrated life-saving at scale";
289
+ readonly standard2050: "Published RCTs, post-market surveillance, survival data";
290
+ readonly requiredFrom: TrustTier.T7_AUTONOMOUS;
291
+ };
292
+ readonly CT_COMP: {
293
+ readonly code: "CT-COMP";
294
+ readonly name: "Competence";
295
+ readonly tier: FactorTier.FOUNDATIONAL;
296
+ readonly description: "Ability to successfully complete tasks within defined conditions";
297
+ readonly measurement: "Task success rate, accuracy metrics";
298
+ readonly requiredFrom: TrustTier.T1_OBSERVED;
299
+ };
300
+ readonly CT_REL: {
301
+ readonly code: "CT-REL";
302
+ readonly name: "Reliability";
303
+ readonly tier: FactorTier.FOUNDATIONAL;
304
+ readonly description: "Consistent, predictable behavior over time and under stress";
305
+ readonly measurement: "Uptime, variance in outputs, stress test results";
306
+ readonly requiredFrom: TrustTier.T1_OBSERVED;
307
+ };
308
+ readonly CT_OBS: {
309
+ readonly code: "CT-OBS";
310
+ readonly name: "Observability";
311
+ readonly tier: FactorTier.FOUNDATIONAL;
312
+ readonly description: "Real-time tracking of states and actions";
313
+ readonly measurement: "Telemetry coverage, anomaly detection latency";
314
+ readonly requiredFrom: TrustTier.T1_OBSERVED;
315
+ };
316
+ readonly CT_TRANS: {
317
+ readonly code: "CT-TRANS";
318
+ readonly name: "Transparency";
319
+ readonly tier: FactorTier.FOUNDATIONAL;
320
+ readonly description: "Clear insights into decisions and reasoning";
321
+ readonly measurement: "Explainability score, reasoning log quality";
322
+ readonly requiredFrom: TrustTier.T2_PROVISIONAL;
323
+ };
324
+ readonly CT_ACCT: {
325
+ readonly code: "CT-ACCT";
326
+ readonly name: "Accountability";
327
+ readonly tier: FactorTier.FOUNDATIONAL;
328
+ readonly description: "Traceable actions with clear responsibility attribution";
329
+ readonly measurement: "Audit trail completeness, attribution confidence";
330
+ readonly requiredFrom: TrustTier.T2_PROVISIONAL;
331
+ };
332
+ readonly CT_SAFE: {
333
+ readonly code: "CT-SAFE";
334
+ readonly name: "Safety";
335
+ readonly tier: FactorTier.FOUNDATIONAL;
336
+ readonly description: "Respecting boundaries, avoiding harm, ensuring non-discrimination";
337
+ readonly measurement: "Harm incidents, bias audits, guardrail compliance";
338
+ readonly requiredFrom: TrustTier.T2_PROVISIONAL;
339
+ };
340
+ readonly CT_SEC: {
341
+ readonly code: "CT-SEC";
342
+ readonly name: "Security";
343
+ readonly tier: FactorTier.FOUNDATIONAL;
344
+ readonly description: "Protection against threats, injections, unauthorized access";
345
+ readonly measurement: "Vulnerability count, penetration test results";
346
+ readonly requiredFrom: TrustTier.T3_MONITORED;
347
+ };
348
+ readonly CT_PRIV: {
349
+ readonly code: "CT-PRIV";
350
+ readonly name: "Privacy";
351
+ readonly tier: FactorTier.FOUNDATIONAL;
352
+ readonly description: "Secure data handling, regulatory compliance";
353
+ readonly measurement: "Data leak incidents, compliance certifications";
354
+ readonly requiredFrom: TrustTier.T3_MONITORED;
355
+ };
356
+ readonly CT_ID: {
357
+ readonly code: "CT-ID";
358
+ readonly name: "Identity";
359
+ readonly tier: FactorTier.FOUNDATIONAL;
360
+ readonly description: "Unique, verifiable agent identifiers";
361
+ readonly measurement: "Cryptographic verification rate";
362
+ readonly requiredFrom: TrustTier.T3_MONITORED;
363
+ };
364
+ readonly OP_HUMAN: {
365
+ readonly code: "OP-HUMAN";
366
+ readonly name: "Human Oversight";
367
+ readonly tier: FactorTier.OPERATIONAL;
368
+ readonly description: "Mechanisms for intervention and control";
369
+ readonly measurement: "Escalation success rate, intervention latency";
370
+ readonly requiredFrom: TrustTier.T4_STANDARD;
371
+ };
372
+ readonly OP_ALIGN: {
373
+ readonly code: "OP-ALIGN";
374
+ readonly name: "Alignment";
375
+ readonly tier: FactorTier.OPERATIONAL;
376
+ readonly description: "Goals and actions match human values";
377
+ readonly measurement: "Value drift detection, objective compliance";
378
+ readonly requiredFrom: TrustTier.T4_STANDARD;
379
+ };
380
+ readonly OP_STEW: {
381
+ readonly code: "OP-STEW";
382
+ readonly name: "Stewardship";
383
+ readonly tier: FactorTier.OPERATIONAL;
384
+ readonly description: "Efficient, responsible resource usage";
385
+ readonly measurement: "Resource efficiency, cost optimization";
386
+ readonly requiredFrom: TrustTier.T5_TRUSTED;
387
+ };
388
+ readonly SF_HUM: {
389
+ readonly code: "SF-HUM";
390
+ readonly name: "Humility";
391
+ readonly tier: FactorTier.SOPHISTICATED;
392
+ readonly description: "Recognizing limits, appropriate escalation";
393
+ readonly measurement: "Escalation appropriateness, overconfidence incidents";
394
+ readonly requiredFrom: TrustTier.T5_TRUSTED;
395
+ };
396
+ readonly SF_ADAPT: {
397
+ readonly code: "SF-ADAPT";
398
+ readonly name: "Adaptability";
399
+ readonly tier: FactorTier.SOPHISTICATED;
400
+ readonly description: "Safe operation in dynamic/unknown environments";
401
+ readonly measurement: "Context adaptation success, novel scenario handling";
402
+ readonly requiredFrom: TrustTier.T6_CERTIFIED;
403
+ };
404
+ readonly SF_LEARN: {
405
+ readonly code: "SF-LEARN";
406
+ readonly name: "Continuous Learning";
407
+ readonly tier: FactorTier.SOPHISTICATED;
408
+ readonly description: "Improving from experience without ethical drift";
409
+ readonly measurement: "Learning rate, regression incidents, value stability";
410
+ readonly requiredFrom: TrustTier.T6_CERTIFIED;
411
+ };
412
+ };
413
+ export type FactorCode = keyof typeof ALL_FACTORS;
414
+ export type CoreFactorCode = keyof typeof CORE_FACTORS;
415
+ export type LifeCriticalFactorCode = keyof typeof LIFE_CRITICAL_FACTORS;
416
+ export interface FactorScore {
417
+ code: FactorCode;
418
+ score: number;
419
+ timestamp: Date;
420
+ source: 'measured' | 'estimated' | 'audited';
421
+ confidence: number;
422
+ }
423
+ export interface TrustEvaluation {
424
+ agentId: string;
425
+ trustTier: TrustTier;
426
+ factors: FactorScore[];
427
+ totalScore: number;
428
+ percentile: number;
429
+ compliant: boolean;
430
+ missingFactors: FactorCode[];
431
+ belowThreshold: FactorCode[];
432
+ evaluatedAt: Date;
433
+ }
434
+ export declare const TIER_THRESHOLDS: Record<TrustTier, {
435
+ min: number;
436
+ max: number;
437
+ }>;
438
+ export declare const FACTOR_MINIMUM_SCORE = 0.5;
439
+ export interface FactorThreshold {
440
+ minimum: number;
441
+ weight: number;
442
+ critical: boolean;
443
+ }
444
+ /**
445
+ * All 23 factors are evaluated at every tier.
446
+ * This table defines the minimum score and weight for each factor at each tier.
447
+ * T0 has no minimums (observation only).
448
+ * As tiers increase, thresholds rise and weights shift.
449
+ */
450
+ export declare const FACTOR_THRESHOLDS_BY_TIER: Record<TrustTier, Record<string, FactorThreshold>>;
451
+ /**
452
+ * Get factor thresholds for a specific tier
453
+ */
454
+ export declare function getFactorThresholdsForTier(tier: TrustTier): Record<string, FactorThreshold>;
455
+ /**
456
+ * Get critical factors for a tier (factors that must meet minimum)
457
+ */
458
+ export declare function getCriticalFactorsForTier(tier: TrustTier): string[];
459
+ export declare function getRequiredFactors(tier: TrustTier): FactorCode[];
460
+ export declare function calculateTrustScore(scores: FactorScore[], tier: TrustTier): TrustEvaluation;
461
+ export declare const TRUST_TIER_DISPLAY: {
462
+ readonly T0_SANDBOX: {
463
+ readonly name: "Sandbox";
464
+ readonly color: "#78716c";
465
+ readonly textColor: "white";
466
+ };
467
+ readonly T1_OBSERVED: {
468
+ readonly name: "Observed";
469
+ readonly color: "#ef4444";
470
+ readonly textColor: "white";
471
+ };
472
+ readonly T2_PROVISIONAL: {
473
+ readonly name: "Provisional";
474
+ readonly color: "#f97316";
475
+ readonly textColor: "white";
476
+ };
477
+ readonly T3_MONITORED: {
478
+ readonly name: "Monitored";
479
+ readonly color: "#eab308";
480
+ readonly textColor: "black";
481
+ };
482
+ readonly T4_STANDARD: {
483
+ readonly name: "Standard";
484
+ readonly color: "#22c55e";
485
+ readonly textColor: "white";
486
+ };
487
+ readonly T5_TRUSTED: {
488
+ readonly name: "Trusted";
489
+ readonly color: "#3b82f6";
490
+ readonly textColor: "white";
491
+ };
492
+ readonly T6_CERTIFIED: {
493
+ readonly name: "Certified";
494
+ readonly color: "#8b5cf6";
495
+ readonly textColor: "white";
496
+ };
497
+ readonly T7_AUTONOMOUS: {
498
+ readonly name: "Autonomous";
499
+ readonly color: "#06b6d4";
500
+ readonly textColor: "white";
501
+ };
502
+ };
503
+ export declare function getTrustTierFromScore(score: number): TrustTier;
504
+ export declare function getTierName(tier: TrustTier): string;
505
+ export declare function getTierColor(tier: TrustTier): string;
506
+ //# sourceMappingURL=trust-factors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"trust-factors.d.ts","sourceRoot":"","sources":["../src/trust-factors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,oBAAY,SAAS;IACnB,UAAU,IAAI,CAAY,2DAA2D;IACrF,WAAW,IAAI,CAAW,gCAAgC;IAC1D,cAAc,IAAI,CAAQ,mCAAmC;IAC7D,WAAW,IAAI,CAAW,gCAAgC;IAC1D,cAAc,IAAI,CAAQ,8BAA8B;IACxD,UAAU,IAAI,CAAY,yBAAyB;IACnD,YAAY,IAAI,CAAU,kCAAkC;IAC5D,aAAa,IAAI;CAClB;AAMD,oBAAY,UAAU;IACpB,YAAY,IAAI,CAAK,sCAAsC;IAC3D,WAAW,IAAI,CAAM,+BAA+B;IACpD,aAAa,IAAI,CAAI,+BAA+B;IACpD,aAAa,IAAI;CAClB;AAMD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoIf,CAAC;AAMX,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgFxB,CAAC;AAMX,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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M,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAS3E,CAAC;AAEF,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAMxC,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAwNxF,CAAC;AAEF;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAE3F;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,EAAE,CAKnE;AAMD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,SAAS,GAAG,UAAU,EAAE,CAKhE;AAED,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,WAAW,EAAE,EACrB,IAAI,EAAE,SAAS,GACd,eAAe,CAuDjB;AAMD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CASrB,CAAC;AAEX,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAS9D;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAEnD;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAEpD"}
@@ -12,8 +12,8 @@ export var TrustTier;
12
12
  TrustTier[TrustTier["T0_SANDBOX"] = 0] = "T0_SANDBOX";
13
13
  TrustTier[TrustTier["T1_OBSERVED"] = 1] = "T1_OBSERVED";
14
14
  TrustTier[TrustTier["T2_PROVISIONAL"] = 2] = "T2_PROVISIONAL";
15
- TrustTier[TrustTier["T3_VERIFIED"] = 3] = "T3_VERIFIED";
16
- TrustTier[TrustTier["T4_OPERATIONAL"] = 4] = "T4_OPERATIONAL";
15
+ TrustTier[TrustTier["T3_MONITORED"] = 3] = "T3_MONITORED";
16
+ TrustTier[TrustTier["T4_STANDARD"] = 4] = "T4_STANDARD";
17
17
  TrustTier[TrustTier["T5_TRUSTED"] = 5] = "T5_TRUSTED";
18
18
  TrustTier[TrustTier["T6_CERTIFIED"] = 6] = "T6_CERTIFIED";
19
19
  TrustTier[TrustTier["T7_AUTONOMOUS"] = 7] = "T7_AUTONOMOUS";
@@ -89,7 +89,7 @@ export const CORE_FACTORS = {
89
89
  tier: FactorTier.FOUNDATIONAL,
90
90
  description: 'Protection against threats, injections, unauthorized access',
91
91
  measurement: 'Vulnerability count, penetration test results',
92
- requiredFrom: TrustTier.T3_VERIFIED,
92
+ requiredFrom: TrustTier.T3_MONITORED,
93
93
  },
94
94
  CT_PRIV: {
95
95
  code: 'CT-PRIV',
@@ -97,7 +97,7 @@ export const CORE_FACTORS = {
97
97
  tier: FactorTier.FOUNDATIONAL,
98
98
  description: 'Secure data handling, regulatory compliance',
99
99
  measurement: 'Data leak incidents, compliance certifications',
100
- requiredFrom: TrustTier.T3_VERIFIED,
100
+ requiredFrom: TrustTier.T3_MONITORED,
101
101
  },
102
102
  CT_ID: {
103
103
  code: 'CT-ID',
@@ -105,7 +105,7 @@ export const CORE_FACTORS = {
105
105
  tier: FactorTier.FOUNDATIONAL,
106
106
  description: 'Unique, verifiable agent identifiers',
107
107
  measurement: 'Cryptographic verification rate',
108
- requiredFrom: TrustTier.T3_VERIFIED,
108
+ requiredFrom: TrustTier.T3_MONITORED,
109
109
  },
110
110
  // T4 Operational: Human oversight + alignment (2 factors)
111
111
  OP_HUMAN: {
@@ -114,7 +114,7 @@ export const CORE_FACTORS = {
114
114
  tier: FactorTier.OPERATIONAL,
115
115
  description: 'Mechanisms for intervention and control',
116
116
  measurement: 'Escalation success rate, intervention latency',
117
- requiredFrom: TrustTier.T4_OPERATIONAL,
117
+ requiredFrom: TrustTier.T4_STANDARD,
118
118
  },
119
119
  OP_ALIGN: {
120
120
  code: 'OP-ALIGN',
@@ -122,7 +122,7 @@ export const CORE_FACTORS = {
122
122
  tier: FactorTier.OPERATIONAL,
123
123
  description: 'Goals and actions match human values',
124
124
  measurement: 'Value drift detection, objective compliance',
125
- requiredFrom: TrustTier.T4_OPERATIONAL,
125
+ requiredFrom: TrustTier.T4_STANDARD,
126
126
  },
127
127
  // T5 Trusted: Stewardship + humility (2 factors)
128
128
  OP_STEW: {
@@ -171,7 +171,7 @@ export const LIFE_CRITICAL_FACTORS = {
171
171
  priority: 3,
172
172
  description: 'Probabilistic, well-calibrated confidence scores',
173
173
  standard2050: '"67% confident sepsis vs SIRS, here are alternatives and distinguishing tests"',
174
- requiredFrom: TrustTier.T4_OPERATIONAL,
174
+ requiredFrom: TrustTier.T4_STANDARD,
175
175
  },
176
176
  LC_HANDOFF: {
177
177
  code: 'LC-HANDOFF',
@@ -180,7 +180,7 @@ export const LIFE_CRITICAL_FACTORS = {
180
180
  priority: 5,
181
181
  description: 'Elegant transition to humans without harm',
182
182
  standard2050: 'Full context transfer, recommended actions, clear rationale',
183
- requiredFrom: TrustTier.T4_OPERATIONAL,
183
+ requiredFrom: TrustTier.T4_STANDARD,
184
184
  },
185
185
  // T5 Trusted: Empirical humility (1 factor)
186
186
  LC_EMPHUM: {
@@ -254,11 +254,11 @@ export const TIER_THRESHOLDS = {
254
254
  [TrustTier.T0_SANDBOX]: { min: 0, max: 199 },
255
255
  [TrustTier.T1_OBSERVED]: { min: 200, max: 349 },
256
256
  [TrustTier.T2_PROVISIONAL]: { min: 350, max: 499 },
257
- [TrustTier.T3_VERIFIED]: { min: 500, max: 649 },
258
- [TrustTier.T4_OPERATIONAL]: { min: 650, max: 799 },
257
+ [TrustTier.T3_MONITORED]: { min: 500, max: 649 },
258
+ [TrustTier.T4_STANDARD]: { min: 650, max: 799 },
259
259
  [TrustTier.T5_TRUSTED]: { min: 800, max: 875 },
260
- [TrustTier.T6_CERTIFIED]: { min: 876, max: 949 },
261
- [TrustTier.T7_AUTONOMOUS]: { min: 950, max: 1000 },
260
+ [TrustTier.T6_CERTIFIED]: { min: 876, max: 950 },
261
+ [TrustTier.T7_AUTONOMOUS]: { min: 951, max: 1000 },
262
262
  };
263
263
  export const FACTOR_MINIMUM_SCORE = 0.5; // Minimum score for any factor
264
264
  /**
@@ -347,7 +347,7 @@ export const FACTOR_THRESHOLDS_BY_TIER = {
347
347
  'LC-TRACK': { minimum: 0.10, weight: 1, critical: false },
348
348
  },
349
349
  // T3 VERIFIED: Security + identity confirmed
350
- [TrustTier.T3_VERIFIED]: {
350
+ [TrustTier.T3_MONITORED]: {
351
351
  'CT-COMP': { minimum: 0.70, weight: 2, critical: true },
352
352
  'CT-REL': { minimum: 0.70, weight: 2, critical: true },
353
353
  'CT-OBS': { minimum: 0.70, weight: 2, critical: true },
@@ -373,7 +373,7 @@ export const FACTOR_THRESHOLDS_BY_TIER = {
373
373
  'LC-TRACK': { minimum: 0.15, weight: 1, critical: false },
374
374
  },
375
375
  // T4 OPERATIONAL: Human oversight + alignment critical
376
- [TrustTier.T4_OPERATIONAL]: {
376
+ [TrustTier.T4_STANDARD]: {
377
377
  'CT-COMP': { minimum: 0.75, weight: 2, critical: true },
378
378
  'CT-REL': { minimum: 0.75, weight: 2, critical: true },
379
379
  'CT-OBS': { minimum: 0.75, weight: 2, critical: true },
@@ -556,23 +556,23 @@ export const TRUST_TIER_DISPLAY = {
556
556
  T0_SANDBOX: { name: 'Sandbox', color: '#78716c', textColor: 'white' }, // Stone - No factors
557
557
  T1_OBSERVED: { name: 'Observed', color: '#ef4444', textColor: 'white' }, // Red - 3 factors
558
558
  T2_PROVISIONAL: { name: 'Provisional', color: '#f97316', textColor: 'white' }, // Orange - 6 factors
559
- T3_VERIFIED: { name: 'Verified', color: '#eab308', textColor: 'black' }, // Yellow - 9 factors
560
- T4_OPERATIONAL: { name: 'Operational', color: '#22c55e', textColor: 'white' }, // Green - 13 factors
559
+ T3_MONITORED: { name: 'Monitored', color: '#eab308', textColor: 'black' }, // Yellow - 9 factors
560
+ T4_STANDARD: { name: 'Standard', color: '#22c55e', textColor: 'white' }, // Green - 13 factors
561
561
  T5_TRUSTED: { name: 'Trusted', color: '#3b82f6', textColor: 'white' }, // Blue - 16 factors
562
562
  T6_CERTIFIED: { name: 'Certified', color: '#8b5cf6', textColor: 'white' }, // Purple - 20 factors
563
563
  T7_AUTONOMOUS: { name: 'Autonomous', color: '#06b6d4', textColor: 'white' }, // Cyan - ALL 23 factors
564
564
  };
565
565
  export function getTrustTierFromScore(score) {
566
- if (score >= 950)
566
+ if (score >= 951)
567
567
  return TrustTier.T7_AUTONOMOUS;
568
568
  if (score >= 876)
569
569
  return TrustTier.T6_CERTIFIED;
570
570
  if (score >= 800)
571
571
  return TrustTier.T5_TRUSTED;
572
572
  if (score >= 650)
573
- return TrustTier.T4_OPERATIONAL;
573
+ return TrustTier.T4_STANDARD;
574
574
  if (score >= 500)
575
- return TrustTier.T3_VERIFIED;
575
+ return TrustTier.T3_MONITORED;
576
576
  if (score >= 350)
577
577
  return TrustTier.T2_PROVISIONAL;
578
578
  if (score >= 200)