@vorionsys/shared-constants 1.0.0 → 1.0.1

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.
package/README.md ADDED
@@ -0,0 +1,129 @@
1
+ # @vorionsys/shared-constants
2
+
3
+ Single source of truth for the Vorion ecosystem - trust tiers, domains, capabilities, rate limits, error codes, and more.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @vorionsys/shared-constants
9
+ ```
10
+
11
+ ## Quick Start
12
+
13
+ ```typescript
14
+ import {
15
+ TrustTier,
16
+ TIER_THRESHOLDS,
17
+ scoreToTier,
18
+ API_ENDPOINTS,
19
+ CAPABILITIES,
20
+ } from '@vorionsys/shared-constants';
21
+
22
+ // Convert score to tier
23
+ const tier = scoreToTier(750); // TrustTier.T4_STANDARD
24
+
25
+ // Get tier info
26
+ const info = TIER_THRESHOLDS[TrustTier.T4_STANDARD];
27
+ console.log(info.name); // "Standard"
28
+ console.log(info.min, info.max); // 650, 799
29
+
30
+ // Check capabilities
31
+ const caps = getCapabilitiesForTier(TrustTier.T4_STANDARD);
32
+ ```
33
+
34
+ ## Features
35
+
36
+ - **Trust Tiers (T0-T7)**: Complete 8-tier trust model with thresholds, names, colors, and helper functions
37
+ - **Domains & URLs**: All Vorion, AgentAnchor, and Cognigate domains and API endpoints
38
+ - **Capabilities**: Tier-gated capability definitions with category filtering
39
+ - **Products**: Product catalog with status and category metadata
40
+ - **Rate Limits**: Per-tier rate limiting and quota configurations
41
+ - **Error Codes**: Standardized error codes with categories and retry information
42
+ - **API Versions**: Version management for Cognigate, Trust, Logic, BASIS, and CAR APIs
43
+ - **Themes**: UI theme tokens with CSS variable generation
44
+
45
+ ## Trust Tiers
46
+
47
+ The BASIS 8-tier trust model (score range 0-1000):
48
+
49
+ | Tier | Score | Name | Description |
50
+ |------|-------|------|-------------|
51
+ | T0 | 0-199 | Sandbox | Isolated, no external access |
52
+ | T1 | 200-349 | Observed | Read-only, monitored |
53
+ | T2 | 350-499 | Provisional | Basic operations, heavy supervision |
54
+ | T3 | 500-649 | Monitored | Standard operations with monitoring |
55
+ | T4 | 650-799 | Standard | External API access, policy-governed |
56
+ | T5 | 800-875 | Trusted | Cross-agent communication |
57
+ | T6 | 876-950 | Certified | Admin tasks, minimal oversight |
58
+ | T7 | 951-1000 | Autonomous | Full autonomy, self-governance |
59
+
60
+ ## Subpath Imports
61
+
62
+ ```typescript
63
+ // Import only what you need
64
+ import { TrustTier, scoreToTier } from '@vorionsys/shared-constants/tiers';
65
+ import { VORION_DOMAINS, API_ENDPOINTS } from '@vorionsys/shared-constants/domains';
66
+ import { CAPABILITIES, getCapabilitiesForTier } from '@vorionsys/shared-constants/capabilities';
67
+ import { VORION_PRODUCTS } from '@vorionsys/shared-constants/products';
68
+ import { RATE_LIMITS, getRateLimits } from '@vorionsys/shared-constants/rate-limits';
69
+ import { ERROR_CODES, getErrorByCode } from '@vorionsys/shared-constants/error-codes';
70
+ import { API_VERSIONS, getCurrentVersion } from '@vorionsys/shared-constants/api-versions';
71
+ ```
72
+
73
+ ## API Reference
74
+
75
+ ### Tiers
76
+
77
+ ```typescript
78
+ scoreToTier(750) // TrustTier.T4_STANDARD
79
+ getTierName(TrustTier.T5_TRUSTED) // "Trusted"
80
+ getTierColor(TrustTier.T3_MONITORED) // "#eab308"
81
+ getTierMinScore(TrustTier.T4_STANDARD) // 650
82
+ meetsTierRequirement(750, TrustTier.T3_MONITORED) // true
83
+ parseTier('T3') // TrustTier.T3_MONITORED
84
+ parseTier('TRUSTED') // TrustTier.T5_TRUSTED
85
+ ```
86
+
87
+ ### Rate Limits
88
+
89
+ ```typescript
90
+ const limits = getRateLimits(TrustTier.T4_STANDARD);
91
+ // { requestsPerMinute: ..., requestsPerHour: ..., ... }
92
+
93
+ wouldExceedLimit(currentCount, TrustTier.T4_STANDARD, 'requestsPerMinute');
94
+ formatRateLimit(limits); // Human-readable string
95
+ ```
96
+
97
+ ### Error Codes
98
+
99
+ ```typescript
100
+ const error = getErrorByCode('AUTH_001');
101
+ // { code, message, category, httpStatus, retryable }
102
+
103
+ const retryable = getRetryableErrors();
104
+ const response = createErrorResponse('AUTH_001', { detail: 'Token expired' });
105
+ ```
106
+
107
+ ## TypeScript
108
+
109
+ All types are fully exported:
110
+
111
+ ```typescript
112
+ import type {
113
+ TrustTier,
114
+ TierThreshold,
115
+ TrustTierName,
116
+ TrustTierCode,
117
+ CapabilityDefinition,
118
+ ProductDefinition,
119
+ RateLimitConfig,
120
+ ErrorDefinition,
121
+ ErrorCode,
122
+ ApiVersionDefinition,
123
+ ThemeTokens,
124
+ } from '@vorionsys/shared-constants';
125
+ ```
126
+
127
+ ## License
128
+
129
+ MIT
@@ -8,7 +8,7 @@ import {
8
8
  getCapabilityMinTier,
9
9
  isCapabilityAvailable
10
10
  } from "./chunk-JZJPDGG7.js";
11
- import "./chunk-PHL3CB53.js";
11
+ import "./chunk-X5XDDJ3Z.js";
12
12
  export {
13
13
  CAPABILITIES,
14
14
  CapabilityCategory,
@@ -0,0 +1,159 @@
1
+ // src/tiers.ts
2
+ var TrustTier = /* @__PURE__ */ ((TrustTier2) => {
3
+ TrustTier2[TrustTier2["T0_SANDBOX"] = 0] = "T0_SANDBOX";
4
+ TrustTier2[TrustTier2["T1_OBSERVED"] = 1] = "T1_OBSERVED";
5
+ TrustTier2[TrustTier2["T2_PROVISIONAL"] = 2] = "T2_PROVISIONAL";
6
+ TrustTier2[TrustTier2["T3_MONITORED"] = 3] = "T3_MONITORED";
7
+ TrustTier2[TrustTier2["T4_STANDARD"] = 4] = "T4_STANDARD";
8
+ TrustTier2[TrustTier2["T5_TRUSTED"] = 5] = "T5_TRUSTED";
9
+ TrustTier2[TrustTier2["T6_CERTIFIED"] = 6] = "T6_CERTIFIED";
10
+ TrustTier2[TrustTier2["T7_AUTONOMOUS"] = 7] = "T7_AUTONOMOUS";
11
+ return TrustTier2;
12
+ })(TrustTier || {});
13
+ var TIER_THRESHOLDS = {
14
+ [0 /* T0_SANDBOX */]: {
15
+ min: 0,
16
+ max: 199,
17
+ name: "Sandbox",
18
+ description: "Isolated, no external access, observation only",
19
+ color: "#78716c",
20
+ textColor: "#ffffff"
21
+ },
22
+ [1 /* T1_OBSERVED */]: {
23
+ min: 200,
24
+ max: 349,
25
+ name: "Observed",
26
+ description: "Read-only, sandboxed execution, monitored",
27
+ color: "#ef4444",
28
+ textColor: "#ffffff"
29
+ },
30
+ [2 /* T2_PROVISIONAL */]: {
31
+ min: 350,
32
+ max: 499,
33
+ name: "Provisional",
34
+ description: "Basic operations, heavy supervision",
35
+ color: "#f97316",
36
+ textColor: "#ffffff"
37
+ },
38
+ [3 /* T3_MONITORED */]: {
39
+ min: 500,
40
+ max: 649,
41
+ name: "Monitored",
42
+ description: "Standard operations with continuous monitoring",
43
+ color: "#eab308",
44
+ textColor: "#000000"
45
+ },
46
+ [4 /* T4_STANDARD */]: {
47
+ min: 650,
48
+ max: 799,
49
+ name: "Standard",
50
+ description: "External API access, policy-governed",
51
+ color: "#22c55e",
52
+ textColor: "#ffffff"
53
+ },
54
+ [5 /* T5_TRUSTED */]: {
55
+ min: 800,
56
+ max: 875,
57
+ name: "Trusted",
58
+ description: "Cross-agent communication, delegated tasks",
59
+ color: "#3b82f6",
60
+ textColor: "#ffffff"
61
+ },
62
+ [6 /* T6_CERTIFIED */]: {
63
+ min: 876,
64
+ max: 950,
65
+ name: "Certified",
66
+ description: "Admin tasks, agent spawning, minimal oversight",
67
+ color: "#8b5cf6",
68
+ textColor: "#ffffff"
69
+ },
70
+ [7 /* T7_AUTONOMOUS */]: {
71
+ min: 951,
72
+ max: 1e3,
73
+ name: "Autonomous",
74
+ description: "Full autonomy, self-governance, strategic only",
75
+ color: "#06b6d4",
76
+ textColor: "#ffffff"
77
+ }
78
+ };
79
+ function scoreToTier(score) {
80
+ if (score < 0 || score > 1e3) {
81
+ throw new Error(`Trust score must be between 0 and 1000, got ${score}`);
82
+ }
83
+ if (score >= 951) return 7 /* T7_AUTONOMOUS */;
84
+ if (score >= 876) return 6 /* T6_CERTIFIED */;
85
+ if (score >= 800) return 5 /* T5_TRUSTED */;
86
+ if (score >= 650) return 4 /* T4_STANDARD */;
87
+ if (score >= 500) return 3 /* T3_MONITORED */;
88
+ if (score >= 350) return 2 /* T2_PROVISIONAL */;
89
+ if (score >= 200) return 1 /* T1_OBSERVED */;
90
+ return 0 /* T0_SANDBOX */;
91
+ }
92
+ function getTierThreshold(tier) {
93
+ return TIER_THRESHOLDS[tier];
94
+ }
95
+ function getTierName(tier) {
96
+ return TIER_THRESHOLDS[tier].name;
97
+ }
98
+ function getTierColor(tier) {
99
+ return TIER_THRESHOLDS[tier].color;
100
+ }
101
+ function getTierMinScore(tier) {
102
+ return TIER_THRESHOLDS[tier].min;
103
+ }
104
+ function getTierMaxScore(tier) {
105
+ return TIER_THRESHOLDS[tier].max;
106
+ }
107
+ function meetsTierRequirement(score, minTier) {
108
+ const actualTier = scoreToTier(score);
109
+ return actualTier >= minTier;
110
+ }
111
+ function getTierCode(tier) {
112
+ return `T${tier}`;
113
+ }
114
+ function parseTier(input) {
115
+ const normalized = input.toUpperCase().trim();
116
+ const tMatch = normalized.match(/^T?(\d)$/);
117
+ if (tMatch) {
118
+ const num = parseInt(tMatch[1], 10);
119
+ if (num >= 0 && num <= 7) {
120
+ return num;
121
+ }
122
+ }
123
+ const nameMap = {
124
+ SANDBOX: 0 /* T0_SANDBOX */,
125
+ OBSERVED: 1 /* T1_OBSERVED */,
126
+ PROVISIONAL: 2 /* T2_PROVISIONAL */,
127
+ MONITORED: 3 /* T3_MONITORED */,
128
+ STANDARD: 4 /* T4_STANDARD */,
129
+ TRUSTED: 5 /* T5_TRUSTED */,
130
+ CERTIFIED: 6 /* T6_CERTIFIED */,
131
+ AUTONOMOUS: 7 /* T7_AUTONOMOUS */
132
+ };
133
+ return nameMap[normalized] ?? null;
134
+ }
135
+ var ALL_TIERS = [
136
+ 0 /* T0_SANDBOX */,
137
+ 1 /* T1_OBSERVED */,
138
+ 2 /* T2_PROVISIONAL */,
139
+ 3 /* T3_MONITORED */,
140
+ 4 /* T4_STANDARD */,
141
+ 5 /* T5_TRUSTED */,
142
+ 6 /* T6_CERTIFIED */,
143
+ 7 /* T7_AUTONOMOUS */
144
+ ];
145
+
146
+ export {
147
+ TrustTier,
148
+ TIER_THRESHOLDS,
149
+ scoreToTier,
150
+ getTierThreshold,
151
+ getTierName,
152
+ getTierColor,
153
+ getTierMinScore,
154
+ getTierMaxScore,
155
+ meetsTierRequirement,
156
+ getTierCode,
157
+ parseTier,
158
+ ALL_TIERS
159
+ };
@@ -0,0 +1,253 @@
1
+ import {
2
+ TrustTier
3
+ } from "./chunk-X5XDDJ3Z.js";
4
+
5
+ // src/rate-limits.ts
6
+ var RATE_LIMITS = {
7
+ [0 /* T0_SANDBOX */]: {
8
+ requestsPerSecond: 1,
9
+ requestsPerMinute: 10,
10
+ requestsPerHour: 100,
11
+ requestsPerDay: 500,
12
+ burstLimit: 2,
13
+ maxPayloadBytes: 1024 * 10,
14
+ // 10 KB
15
+ maxResponseBytes: 1024 * 100,
16
+ // 100 KB
17
+ connectionTimeoutMs: 5e3,
18
+ requestTimeoutMs: 1e4
19
+ },
20
+ [1 /* T1_OBSERVED */]: {
21
+ requestsPerSecond: 2,
22
+ requestsPerMinute: 30,
23
+ requestsPerHour: 500,
24
+ requestsPerDay: 2e3,
25
+ burstLimit: 5,
26
+ maxPayloadBytes: 1024 * 50,
27
+ // 50 KB
28
+ maxResponseBytes: 1024 * 500,
29
+ // 500 KB
30
+ connectionTimeoutMs: 5e3,
31
+ requestTimeoutMs: 15e3
32
+ },
33
+ [2 /* T2_PROVISIONAL */]: {
34
+ requestsPerSecond: 5,
35
+ requestsPerMinute: 100,
36
+ requestsPerHour: 2e3,
37
+ requestsPerDay: 1e4,
38
+ burstLimit: 10,
39
+ maxPayloadBytes: 1024 * 100,
40
+ // 100 KB
41
+ maxResponseBytes: 1024 * 1024,
42
+ // 1 MB
43
+ connectionTimeoutMs: 1e4,
44
+ requestTimeoutMs: 3e4
45
+ },
46
+ [3 /* T3_MONITORED */]: {
47
+ requestsPerSecond: 10,
48
+ requestsPerMinute: 300,
49
+ requestsPerHour: 5e3,
50
+ requestsPerDay: 5e4,
51
+ burstLimit: 20,
52
+ maxPayloadBytes: 1024 * 500,
53
+ // 500 KB
54
+ maxResponseBytes: 1024 * 1024 * 5,
55
+ // 5 MB
56
+ connectionTimeoutMs: 1e4,
57
+ requestTimeoutMs: 6e4
58
+ },
59
+ [4 /* T4_STANDARD */]: {
60
+ requestsPerSecond: 20,
61
+ requestsPerMinute: 600,
62
+ requestsPerHour: 1e4,
63
+ requestsPerDay: 1e5,
64
+ burstLimit: 50,
65
+ maxPayloadBytes: 1024 * 1024,
66
+ // 1 MB
67
+ maxResponseBytes: 1024 * 1024 * 10,
68
+ // 10 MB
69
+ connectionTimeoutMs: 15e3,
70
+ requestTimeoutMs: 12e4
71
+ },
72
+ [5 /* T5_TRUSTED */]: {
73
+ requestsPerSecond: 50,
74
+ requestsPerMinute: 1500,
75
+ requestsPerHour: 3e4,
76
+ requestsPerDay: 3e5,
77
+ burstLimit: 100,
78
+ maxPayloadBytes: 1024 * 1024 * 5,
79
+ // 5 MB
80
+ maxResponseBytes: 1024 * 1024 * 50,
81
+ // 50 MB
82
+ connectionTimeoutMs: 3e4,
83
+ requestTimeoutMs: 3e5
84
+ },
85
+ [6 /* T6_CERTIFIED */]: {
86
+ requestsPerSecond: 100,
87
+ requestsPerMinute: 3e3,
88
+ requestsPerHour: 1e5,
89
+ requestsPerDay: 1e6,
90
+ burstLimit: 200,
91
+ maxPayloadBytes: 1024 * 1024 * 10,
92
+ // 10 MB
93
+ maxResponseBytes: 1024 * 1024 * 100,
94
+ // 100 MB
95
+ connectionTimeoutMs: 6e4,
96
+ requestTimeoutMs: 6e5
97
+ },
98
+ [7 /* T7_AUTONOMOUS */]: {
99
+ requestsPerSecond: 500,
100
+ requestsPerMinute: 1e4,
101
+ requestsPerHour: 5e5,
102
+ requestsPerDay: 5e6,
103
+ burstLimit: 500,
104
+ maxPayloadBytes: 1024 * 1024 * 50,
105
+ // 50 MB
106
+ maxResponseBytes: 1024 * 1024 * 500,
107
+ // 500 MB
108
+ connectionTimeoutMs: 12e4,
109
+ requestTimeoutMs: 12e5
110
+ }
111
+ };
112
+ function getRateLimits(tier) {
113
+ return RATE_LIMITS[tier];
114
+ }
115
+ function getMinTierForLimits(config) {
116
+ const tiers = Object.values(TrustTier).filter((t) => typeof t === "number");
117
+ for (const tier of tiers) {
118
+ const limits = RATE_LIMITS[tier];
119
+ if ((config.requestsPerSecond === void 0 || limits.requestsPerSecond >= config.requestsPerSecond) && (config.requestsPerMinute === void 0 || limits.requestsPerMinute >= config.requestsPerMinute) && (config.requestsPerHour === void 0 || limits.requestsPerHour >= config.requestsPerHour) && (config.requestsPerDay === void 0 || limits.requestsPerDay >= config.requestsPerDay)) {
120
+ return tier;
121
+ }
122
+ }
123
+ return 7 /* T7_AUTONOMOUS */;
124
+ }
125
+ function wouldExceedLimit(tier, window, currentCount) {
126
+ const limits = RATE_LIMITS[tier];
127
+ switch (window) {
128
+ case "second":
129
+ return currentCount >= limits.requestsPerSecond;
130
+ case "minute":
131
+ return currentCount >= limits.requestsPerMinute;
132
+ case "hour":
133
+ return currentCount >= limits.requestsPerHour;
134
+ case "day":
135
+ return currentCount >= limits.requestsPerDay;
136
+ }
137
+ }
138
+ function formatRateLimit(tier) {
139
+ const limits = RATE_LIMITS[tier];
140
+ return `${limits.requestsPerSecond}/s, ${limits.requestsPerMinute}/min, ${limits.requestsPerHour}/hr`;
141
+ }
142
+ var TIER_QUOTAS = {
143
+ [0 /* T0_SANDBOX */]: {
144
+ monthlyApiCalls: 1e3,
145
+ monthlyComputeUnits: 100,
146
+ monthlyStorageBytes: 1024 * 1024 * 10,
147
+ // 10 MB
148
+ monthlyBandwidthBytes: 1024 * 1024 * 100,
149
+ // 100 MB
150
+ maxAgents: 1,
151
+ maxWebhooks: 1,
152
+ maxTeamMembers: 1
153
+ },
154
+ [1 /* T1_OBSERVED */]: {
155
+ monthlyApiCalls: 1e4,
156
+ monthlyComputeUnits: 1e3,
157
+ monthlyStorageBytes: 1024 * 1024 * 100,
158
+ // 100 MB
159
+ monthlyBandwidthBytes: 1024 * 1024 * 1024,
160
+ // 1 GB
161
+ maxAgents: 5,
162
+ maxWebhooks: 5,
163
+ maxTeamMembers: 3
164
+ },
165
+ [2 /* T2_PROVISIONAL */]: {
166
+ monthlyApiCalls: 5e4,
167
+ monthlyComputeUnits: 5e3,
168
+ monthlyStorageBytes: 1024 * 1024 * 500,
169
+ // 500 MB
170
+ monthlyBandwidthBytes: 1024 * 1024 * 1024 * 5,
171
+ // 5 GB
172
+ maxAgents: 10,
173
+ maxWebhooks: 10,
174
+ maxTeamMembers: 5
175
+ },
176
+ [3 /* T3_MONITORED */]: {
177
+ monthlyApiCalls: 25e4,
178
+ monthlyComputeUnits: 25e3,
179
+ monthlyStorageBytes: 1024 * 1024 * 1024 * 2,
180
+ // 2 GB
181
+ monthlyBandwidthBytes: 1024 * 1024 * 1024 * 25,
182
+ // 25 GB
183
+ maxAgents: 50,
184
+ maxWebhooks: 25,
185
+ maxTeamMembers: 10
186
+ },
187
+ [4 /* T4_STANDARD */]: {
188
+ monthlyApiCalls: 1e6,
189
+ monthlyComputeUnits: 1e5,
190
+ monthlyStorageBytes: 1024 * 1024 * 1024 * 10,
191
+ // 10 GB
192
+ monthlyBandwidthBytes: 1024 * 1024 * 1024 * 100,
193
+ // 100 GB
194
+ maxAgents: 200,
195
+ maxWebhooks: 50,
196
+ maxTeamMembers: 25
197
+ },
198
+ [5 /* T5_TRUSTED */]: {
199
+ monthlyApiCalls: 5e6,
200
+ monthlyComputeUnits: 5e5,
201
+ monthlyStorageBytes: 1024 * 1024 * 1024 * 50,
202
+ // 50 GB
203
+ monthlyBandwidthBytes: 1024 * 1024 * 1024 * 500,
204
+ // 500 GB
205
+ maxAgents: 1e3,
206
+ maxWebhooks: 100,
207
+ maxTeamMembers: 50
208
+ },
209
+ [6 /* T6_CERTIFIED */]: {
210
+ monthlyApiCalls: 25e6,
211
+ monthlyComputeUnits: 25e5,
212
+ monthlyStorageBytes: 1024 * 1024 * 1024 * 250,
213
+ // 250 GB
214
+ monthlyBandwidthBytes: 1024 * 1024 * 1024 * 2500,
215
+ // 2.5 TB
216
+ maxAgents: 5e3,
217
+ maxWebhooks: 250,
218
+ maxTeamMembers: 100
219
+ },
220
+ [7 /* T7_AUTONOMOUS */]: {
221
+ monthlyApiCalls: -1,
222
+ // Unlimited
223
+ monthlyComputeUnits: -1,
224
+ // Unlimited
225
+ monthlyStorageBytes: 1024 * 1024 * 1024 * 1024,
226
+ // 1 TB
227
+ monthlyBandwidthBytes: 1024 * 1024 * 1024 * 1e4,
228
+ // 10 TB
229
+ maxAgents: -1,
230
+ // Unlimited
231
+ maxWebhooks: -1,
232
+ // Unlimited
233
+ maxTeamMembers: -1
234
+ // Unlimited
235
+ }
236
+ };
237
+ function getQuota(tier) {
238
+ return TIER_QUOTAS[tier];
239
+ }
240
+ function isUnlimited(value) {
241
+ return value === -1;
242
+ }
243
+
244
+ export {
245
+ RATE_LIMITS,
246
+ getRateLimits,
247
+ getMinTierForLimits,
248
+ wouldExceedLimit,
249
+ formatRateLimit,
250
+ TIER_QUOTAS,
251
+ getQuota,
252
+ isUnlimited
253
+ };
package/dist/index.cjs CHANGED
@@ -143,14 +143,14 @@ var TIER_THRESHOLDS = {
143
143
  },
144
144
  [2 /* T2_PROVISIONAL */]: {
145
145
  min: 350,
146
- max: 500,
146
+ max: 499,
147
147
  name: "Provisional",
148
148
  description: "Basic operations, heavy supervision",
149
149
  color: "#f97316",
150
150
  textColor: "#ffffff"
151
151
  },
152
152
  [3 /* T3_MONITORED */]: {
153
- min: 501,
153
+ min: 500,
154
154
  max: 649,
155
155
  name: "Monitored",
156
156
  description: "Standard operations with continuous monitoring",
@@ -198,7 +198,7 @@ function scoreToTier(score) {
198
198
  if (score >= 876) return 6 /* T6_CERTIFIED */;
199
199
  if (score >= 800) return 5 /* T5_TRUSTED */;
200
200
  if (score >= 650) return 4 /* T4_STANDARD */;
201
- if (score >= 501) return 3 /* T3_MONITORED */;
201
+ if (score >= 500) return 3 /* T3_MONITORED */;
202
202
  if (score >= 350) return 2 /* T2_PROVISIONAL */;
203
203
  if (score >= 200) return 1 /* T1_OBSERVED */;
204
204
  return 0 /* T0_SANDBOX */;
package/dist/index.js CHANGED
@@ -79,7 +79,7 @@ import {
79
79
  getRateLimits,
80
80
  isUnlimited,
81
81
  wouldExceedLimit
82
- } from "./chunk-F2R6HBF5.js";
82
+ } from "./chunk-ZSBKDWWS.js";
83
83
  import {
84
84
  ALL_TIERS,
85
85
  TIER_THRESHOLDS,
@@ -93,7 +93,7 @@ import {
93
93
  meetsTierRequirement,
94
94
  parseTier,
95
95
  scoreToTier
96
- } from "./chunk-PHL3CB53.js";
96
+ } from "./chunk-X5XDDJ3Z.js";
97
97
  import {
98
98
  ACTIVE_THEME,
99
99
  THEMES,
@@ -7,8 +7,8 @@ import {
7
7
  getRateLimits,
8
8
  isUnlimited,
9
9
  wouldExceedLimit
10
- } from "./chunk-F2R6HBF5.js";
11
- import "./chunk-PHL3CB53.js";
10
+ } from "./chunk-ZSBKDWWS.js";
11
+ import "./chunk-X5XDDJ3Z.js";
12
12
  export {
13
13
  RATE_LIMITS,
14
14
  TIER_QUOTAS,
package/dist/tiers.cjs CHANGED
@@ -64,14 +64,14 @@ var TIER_THRESHOLDS = {
64
64
  },
65
65
  [2 /* T2_PROVISIONAL */]: {
66
66
  min: 350,
67
- max: 500,
67
+ max: 499,
68
68
  name: "Provisional",
69
69
  description: "Basic operations, heavy supervision",
70
70
  color: "#f97316",
71
71
  textColor: "#ffffff"
72
72
  },
73
73
  [3 /* T3_MONITORED */]: {
74
- min: 501,
74
+ min: 500,
75
75
  max: 649,
76
76
  name: "Monitored",
77
77
  description: "Standard operations with continuous monitoring",
@@ -119,7 +119,7 @@ function scoreToTier(score) {
119
119
  if (score >= 876) return 6 /* T6_CERTIFIED */;
120
120
  if (score >= 800) return 5 /* T5_TRUSTED */;
121
121
  if (score >= 650) return 4 /* T4_STANDARD */;
122
- if (score >= 501) return 3 /* T3_MONITORED */;
122
+ if (score >= 500) return 3 /* T3_MONITORED */;
123
123
  if (score >= 350) return 2 /* T2_PROVISIONAL */;
124
124
  if (score >= 200) return 1 /* T1_OBSERVED */;
125
125
  return 0 /* T0_SANDBOX */;
package/dist/tiers.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  meetsTierRequirement,
12
12
  parseTier,
13
13
  scoreToTier
14
- } from "./chunk-PHL3CB53.js";
14
+ } from "./chunk-X5XDDJ3Z.js";
15
15
  export {
16
16
  ALL_TIERS,
17
17
  TIER_THRESHOLDS,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vorionsys/shared-constants",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Shared constants for Vorion ecosystem - single source of truth for tiers, domains, and configuration",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -67,5 +67,8 @@
67
67
  },
68
68
  "engines": {
69
69
  "node": ">=18.0.0"
70
+ },
71
+ "publishConfig": {
72
+ "access": "public"
70
73
  }
71
74
  }
package/src/tiers.ts CHANGED
@@ -58,14 +58,14 @@ export const TIER_THRESHOLDS: Readonly<Record<TrustTier, TierThreshold>> = {
58
58
  },
59
59
  [TrustTier.T2_PROVISIONAL]: {
60
60
  min: 350,
61
- max: 500,
61
+ max: 499,
62
62
  name: 'Provisional',
63
63
  description: 'Basic operations, heavy supervision',
64
64
  color: '#f97316',
65
65
  textColor: '#ffffff',
66
66
  },
67
67
  [TrustTier.T3_MONITORED]: {
68
- min: 501,
68
+ min: 500,
69
69
  max: 649,
70
70
  name: 'Monitored',
71
71
  description: 'Standard operations with continuous monitoring',
@@ -122,7 +122,7 @@ export function scoreToTier(score: number): TrustTier {
122
122
  if (score >= 876) return TrustTier.T6_CERTIFIED;
123
123
  if (score >= 800) return TrustTier.T5_TRUSTED;
124
124
  if (score >= 650) return TrustTier.T4_STANDARD;
125
- if (score >= 501) return TrustTier.T3_MONITORED;
125
+ if (score >= 500) return TrustTier.T3_MONITORED;
126
126
  if (score >= 350) return TrustTier.T2_PROVISIONAL;
127
127
  if (score >= 200) return TrustTier.T1_OBSERVED;
128
128
  return TrustTier.T0_SANDBOX;