@vorionsys/shared-constants 1.0.0

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 (46) hide show
  1. package/dist/api-versions.cjs +183 -0
  2. package/dist/api-versions.d.cts +91 -0
  3. package/dist/api-versions.js +46 -0
  4. package/dist/capabilities.cjs +246 -0
  5. package/dist/capabilities.d.cts +55 -0
  6. package/dist/capabilities.js +21 -0
  7. package/dist/chunk-F2R6HBF5.js +253 -0
  8. package/dist/chunk-IKLCEYZT.js +142 -0
  9. package/dist/chunk-JZJPDGG7.js +215 -0
  10. package/dist/chunk-P3VPMVF3.js +223 -0
  11. package/dist/chunk-PHL3CB53.js +159 -0
  12. package/dist/chunk-RZQZEF6Q.js +176 -0
  13. package/dist/chunk-TYCMBQGU.js +353 -0
  14. package/dist/chunk-UDCZKJSQ.js +139 -0
  15. package/dist/domains.cjs +175 -0
  16. package/dist/domains.d.cts +250 -0
  17. package/dist/domains.js +24 -0
  18. package/dist/error-codes.cjs +390 -0
  19. package/dist/error-codes.d.cts +633 -0
  20. package/dist/error-codes.js +32 -0
  21. package/dist/index.cjs +1762 -0
  22. package/dist/index.d.cts +54 -0
  23. package/dist/index.js +198 -0
  24. package/dist/products.cjs +208 -0
  25. package/dist/products.d.cts +80 -0
  26. package/dist/products.js +22 -0
  27. package/dist/rate-limits.cjs +295 -0
  28. package/dist/rate-limits.d.cts +80 -0
  29. package/dist/rate-limits.js +21 -0
  30. package/dist/themes.cjs +251 -0
  31. package/dist/themes.d.cts +85 -0
  32. package/dist/themes.js +14 -0
  33. package/dist/tiers.cjs +194 -0
  34. package/dist/tiers.d.cts +75 -0
  35. package/dist/tiers.js +28 -0
  36. package/package.json +71 -0
  37. package/src/api-versions.ts +250 -0
  38. package/src/capabilities.ts +272 -0
  39. package/src/domains.ts +216 -0
  40. package/src/error-codes.ts +494 -0
  41. package/src/index.ts +206 -0
  42. package/src/products.ts +285 -0
  43. package/src/rate-limits.ts +334 -0
  44. package/src/themes.ts +380 -0
  45. package/src/tiers.ts +239 -0
  46. package/tsconfig.json +25 -0
@@ -0,0 +1,253 @@
1
+ import {
2
+ TrustTier
3
+ } from "./chunk-PHL3CB53.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
+ };
@@ -0,0 +1,142 @@
1
+ // src/domains.ts
2
+ var VORION_DOMAINS = {
3
+ /** Main Vorion organization site */
4
+ main: "https://vorion.org",
5
+ /** BASIS specification and documentation */
6
+ basis: "https://basis.vorion.org",
7
+ /** CAR ID specification */
8
+ carId: "https://carid.vorion.org",
9
+ /** ATSF (Agent Trust & Safety Framework) */
10
+ atsf: "https://atsf.vorion.org",
11
+ /** Learning and educational resources (primary) */
12
+ learn: "https://learn.vorion.org",
13
+ /** Kaizen - Interactive AI Learning Experience (mirrors learn) */
14
+ kaizen: "https://kaizen.vorion.org",
15
+ /** Technical documentation */
16
+ docs: "https://docs.vorion.org",
17
+ /** Community forum */
18
+ community: "https://community.vorion.org"
19
+ };
20
+ var DOMAIN_ALIASES = {
21
+ "kaizen.vorion.org": "learn.vorion.org"
22
+ };
23
+ var AGENTANCHOR_DOMAINS = {
24
+ /** Main Agent Anchor AI site */
25
+ main: "https://agentanchorai.com",
26
+ /** Agent Anchor Trust - Trust verification and certification */
27
+ trust: "https://trust.agentanchorai.com",
28
+ /** Agent Anchor Logic - Policy engine and governance logic */
29
+ logic: "https://logic.agentanchorai.com",
30
+ /** Status page */
31
+ status: "https://status.agentanchorai.com"
32
+ };
33
+ var COGNIGATE_DOMAINS = {
34
+ /** Cognigate main site and documentation */
35
+ main: "https://cognigate.dev",
36
+ /** Cognigate API documentation */
37
+ docs: "https://cognigate.dev/docs"
38
+ };
39
+ var API_ENDPOINTS = {
40
+ /** Cognigate Production API */
41
+ cognigate: {
42
+ production: "https://cognigate.dev/v1",
43
+ staging: "https://staging.cognigate.dev/v1"
44
+ },
45
+ /** Agent Anchor AI Production API */
46
+ agentAnchor: {
47
+ production: "https://api.agentanchorai.com/v1",
48
+ staging: "https://staging-api.agentanchorai.com/v1",
49
+ sandbox: "https://sandbox.agentanchorai.com/v1"
50
+ },
51
+ /** Trust API */
52
+ trust: {
53
+ production: "https://trust.agentanchorai.com/v1",
54
+ staging: "https://staging.trust.agentanchorai.com/v1"
55
+ },
56
+ /** Logic/Policy API */
57
+ logic: {
58
+ production: "https://logic.agentanchorai.com/v1",
59
+ staging: "https://staging.logic.agentanchorai.com/v1"
60
+ }
61
+ };
62
+ var VORION_EMAILS = {
63
+ /** General inquiries */
64
+ info: "info@vorion.org",
65
+ /** Security reports */
66
+ security: "security@vorion.org",
67
+ /** Legal inquiries */
68
+ legal: "legal@vorion.org",
69
+ /** Community and contributions */
70
+ community: "community@vorion.org",
71
+ /** Contributing */
72
+ contribute: "contribute@vorion.org"
73
+ };
74
+ var AGENTANCHOR_EMAILS = {
75
+ /** General support */
76
+ support: "support@agentanchorai.com",
77
+ /** Sales inquiries */
78
+ sales: "sales@agentanchorai.com",
79
+ /** Partner program */
80
+ partners: "partners@agentanchorai.com",
81
+ /** API support */
82
+ apiSupport: "api-support@agentanchorai.com",
83
+ /** Enterprise inquiries */
84
+ enterprise: "enterprise@agentanchorai.com",
85
+ /** Compliance */
86
+ compliance: "compliance@agentanchorai.com",
87
+ /** Team */
88
+ team: "team@agentanchorai.com"
89
+ };
90
+ var GITHUB = {
91
+ /** Vorion organization */
92
+ vorion: {
93
+ org: "https://github.com/voriongit",
94
+ mainRepo: "https://github.com/voriongit/vorion"
95
+ },
96
+ /** Agent Anchor AI (if separate) */
97
+ agentAnchor: {
98
+ org: "https://github.com/agentanchorai"
99
+ }
100
+ };
101
+ var NPM_PACKAGES = {
102
+ /** Open source packages (@vorionsys) */
103
+ vorion: {
104
+ basis: "@vorionsys/basis",
105
+ contracts: "@vorionsys/contracts",
106
+ carSpec: "@vorionsys/car-spec",
107
+ atsfCore: "@vorionsys/atsf-core",
108
+ cognigate: "@vorionsys/cognigate",
109
+ sharedConstants: "@vorionsys/shared-constants"
110
+ },
111
+ /** Commercial packages (@agentanchor) */
112
+ agentAnchor: {
113
+ sdk: "@agentanchor/sdk",
114
+ trust: "@agentanchor/trust",
115
+ logic: "@agentanchor/logic"
116
+ }
117
+ };
118
+ var ALL_DOMAINS = {
119
+ vorion: VORION_DOMAINS,
120
+ agentAnchor: AGENTANCHOR_DOMAINS,
121
+ cognigate: COGNIGATE_DOMAINS,
122
+ api: API_ENDPOINTS,
123
+ emails: {
124
+ vorion: VORION_EMAILS,
125
+ agentAnchor: AGENTANCHOR_EMAILS
126
+ },
127
+ github: GITHUB,
128
+ npm: NPM_PACKAGES
129
+ };
130
+
131
+ export {
132
+ VORION_DOMAINS,
133
+ DOMAIN_ALIASES,
134
+ AGENTANCHOR_DOMAINS,
135
+ COGNIGATE_DOMAINS,
136
+ API_ENDPOINTS,
137
+ VORION_EMAILS,
138
+ AGENTANCHOR_EMAILS,
139
+ GITHUB,
140
+ NPM_PACKAGES,
141
+ ALL_DOMAINS
142
+ };
@@ -0,0 +1,215 @@
1
+ // src/capabilities.ts
2
+ var CapabilityCategory = /* @__PURE__ */ ((CapabilityCategory2) => {
3
+ CapabilityCategory2["DATA_ACCESS"] = "data_access";
4
+ CapabilityCategory2["API_ACCESS"] = "api_access";
5
+ CapabilityCategory2["CODE_EXECUTION"] = "code_execution";
6
+ CapabilityCategory2["AGENT_INTERACTION"] = "agent_interaction";
7
+ CapabilityCategory2["RESOURCE_MANAGEMENT"] = "resource_management";
8
+ CapabilityCategory2["GOVERNANCE"] = "governance";
9
+ CapabilityCategory2["ADMIN"] = "admin";
10
+ return CapabilityCategory2;
11
+ })(CapabilityCategory || {});
12
+ var CAPABILITIES = [
13
+ // T0 - Sandbox
14
+ {
15
+ code: "CAP-READ-PUBLIC",
16
+ name: "Read Public Data",
17
+ category: "data_access" /* DATA_ACCESS */,
18
+ description: "Access publicly available data",
19
+ unlockTier: 0 /* T0_SANDBOX */
20
+ },
21
+ {
22
+ code: "CAP-GENERATE-TEXT",
23
+ name: "Generate Text",
24
+ category: "code_execution" /* CODE_EXECUTION */,
25
+ description: "Generate text responses",
26
+ unlockTier: 0 /* T0_SANDBOX */
27
+ },
28
+ // T1 - Observed
29
+ {
30
+ code: "CAP-READ-INTERNAL",
31
+ name: "Read Internal Data",
32
+ category: "data_access" /* DATA_ACCESS */,
33
+ description: "Access internal data within allowed scopes",
34
+ unlockTier: 1 /* T1_OBSERVED */,
35
+ constraints: ["Read-only", "Logged"]
36
+ },
37
+ {
38
+ code: "CAP-INTERNAL-API",
39
+ name: "Internal API Access",
40
+ category: "api_access" /* API_ACCESS */,
41
+ description: "Make read-only internal API calls",
42
+ unlockTier: 1 /* T1_OBSERVED */,
43
+ constraints: ["GET only", "Rate limited"]
44
+ },
45
+ // T2 - Provisional
46
+ {
47
+ code: "CAP-FILE-WRITE",
48
+ name: "Write Files",
49
+ category: "data_access" /* DATA_ACCESS */,
50
+ description: "Write to approved directories",
51
+ unlockTier: 2 /* T2_PROVISIONAL */,
52
+ constraints: ["Approved dirs only", "Size limited"]
53
+ },
54
+ {
55
+ code: "CAP-DB-READ",
56
+ name: "Database Read",
57
+ category: "data_access" /* DATA_ACCESS */,
58
+ description: "Read from approved database tables",
59
+ unlockTier: 2 /* T2_PROVISIONAL */,
60
+ constraints: ["Approved tables", "Query timeout"]
61
+ },
62
+ {
63
+ code: "CAP-EXTERNAL-API-READ",
64
+ name: "External API Read",
65
+ category: "api_access" /* API_ACCESS */,
66
+ description: "Make GET requests to approved external APIs",
67
+ unlockTier: 2 /* T2_PROVISIONAL */,
68
+ constraints: ["GET only", "Approved endpoints"]
69
+ },
70
+ // T3 - Monitored
71
+ {
72
+ code: "CAP-DB-WRITE",
73
+ name: "Database Write",
74
+ category: "data_access" /* DATA_ACCESS */,
75
+ description: "Write to approved database tables",
76
+ unlockTier: 3 /* T3_MONITORED */,
77
+ constraints: ["Approved tables", "Transaction limits"]
78
+ },
79
+ {
80
+ code: "CAP-EXTERNAL-API-FULL",
81
+ name: "External API Full Access",
82
+ category: "api_access" /* API_ACCESS */,
83
+ description: "Full REST operations on approved external APIs",
84
+ unlockTier: 3 /* T3_MONITORED */,
85
+ constraints: ["Approved endpoints", "Rate limited"]
86
+ },
87
+ {
88
+ code: "CAP-CODE-SANDBOX",
89
+ name: "Sandboxed Code Execution",
90
+ category: "code_execution" /* CODE_EXECUTION */,
91
+ description: "Execute code in isolated sandbox",
92
+ unlockTier: 3 /* T3_MONITORED */,
93
+ constraints: ["Sandboxed", "Time limited", "No network"]
94
+ },
95
+ // T4 - Standard
96
+ {
97
+ code: "CAP-AGENT-COMMUNICATE",
98
+ name: "Agent Communication",
99
+ category: "agent_interaction" /* AGENT_INTERACTION */,
100
+ description: "Send and receive messages to/from other agents",
101
+ unlockTier: 4 /* T4_STANDARD */,
102
+ constraints: ["Approved agents", "Message limits"]
103
+ },
104
+ {
105
+ code: "CAP-WORKFLOW-MULTI",
106
+ name: "Multi-Step Workflow",
107
+ category: "code_execution" /* CODE_EXECUTION */,
108
+ description: "Orchestrate multi-step workflows",
109
+ unlockTier: 4 /* T4_STANDARD */,
110
+ constraints: ["Approved patterns", "Checkpoints required"]
111
+ },
112
+ {
113
+ code: "CAP-ESCALATE-HUMAN",
114
+ name: "Human Escalation",
115
+ category: "governance" /* GOVERNANCE */,
116
+ description: "Initiate escalation to human reviewers",
117
+ unlockTier: 4 /* T4_STANDARD */
118
+ },
119
+ // T5 - Trusted
120
+ {
121
+ code: "CAP-AGENT-DELEGATE",
122
+ name: "Task Delegation",
123
+ category: "agent_interaction" /* AGENT_INTERACTION */,
124
+ description: "Delegate tasks to other agents",
125
+ unlockTier: 5 /* T5_TRUSTED */,
126
+ constraints: ["Trust verified agents"]
127
+ },
128
+ {
129
+ code: "CAP-RESOURCE-PROVISION",
130
+ name: "Resource Provisioning",
131
+ category: "resource_management" /* RESOURCE_MANAGEMENT */,
132
+ description: "Provision computational resources",
133
+ unlockTier: 5 /* T5_TRUSTED */,
134
+ constraints: ["Budget limits", "Approval required"]
135
+ },
136
+ // T6 - Certified
137
+ {
138
+ code: "CAP-AGENT-SPAWN",
139
+ name: "Spawn Agents",
140
+ category: "agent_interaction" /* AGENT_INTERACTION */,
141
+ description: "Create new agent instances",
142
+ unlockTier: 6 /* T6_CERTIFIED */,
143
+ constraints: ["Template required", "Quota limited"]
144
+ },
145
+ {
146
+ code: "CAP-INFRA-MANAGE",
147
+ name: "Infrastructure Management",
148
+ category: "resource_management" /* RESOURCE_MANAGEMENT */,
149
+ description: "Manage infrastructure resources",
150
+ unlockTier: 6 /* T6_CERTIFIED */,
151
+ constraints: ["Approved resources"]
152
+ },
153
+ {
154
+ code: "CAP-POLICY-CREATE",
155
+ name: "Policy Creation",
156
+ category: "governance" /* GOVERNANCE */,
157
+ description: "Create governance policies",
158
+ unlockTier: 6 /* T6_CERTIFIED */,
159
+ constraints: ["Review required"]
160
+ },
161
+ // T7 - Autonomous
162
+ {
163
+ code: "CAP-FULL-ADMIN",
164
+ name: "Full Administration",
165
+ category: "admin" /* ADMIN */,
166
+ description: "Full administrative access",
167
+ unlockTier: 7 /* T7_AUTONOMOUS */
168
+ },
169
+ {
170
+ code: "CAP-SELF-MODIFY",
171
+ name: "Self-Modification",
172
+ category: "code_execution" /* CODE_EXECUTION */,
173
+ description: "Modify own configuration and behavior",
174
+ unlockTier: 7 /* T7_AUTONOMOUS */,
175
+ constraints: ["Ethical bounds", "Audit logged"]
176
+ },
177
+ {
178
+ code: "CAP-STRATEGIC-DECISION",
179
+ name: "Strategic Decisions",
180
+ category: "governance" /* GOVERNANCE */,
181
+ description: "Make strategic organizational decisions",
182
+ unlockTier: 7 /* T7_AUTONOMOUS */,
183
+ constraints: ["Human oversight available"]
184
+ }
185
+ ];
186
+ function getCapabilitiesForTier(tier) {
187
+ return CAPABILITIES.filter((cap) => cap.unlockTier <= tier);
188
+ }
189
+ function getCapability(code) {
190
+ return CAPABILITIES.find((cap) => cap.code === code);
191
+ }
192
+ function isCapabilityAvailable(code, tier) {
193
+ const cap = getCapability(code);
194
+ return cap !== void 0 && cap.unlockTier <= tier;
195
+ }
196
+ function getCapabilityMinTier(code) {
197
+ return getCapability(code)?.unlockTier;
198
+ }
199
+ function getCapabilitiesByCategory(category) {
200
+ return CAPABILITIES.filter((cap) => cap.category === category);
201
+ }
202
+ function getAllCapabilityCodes() {
203
+ return CAPABILITIES.map((cap) => cap.code);
204
+ }
205
+
206
+ export {
207
+ CapabilityCategory,
208
+ CAPABILITIES,
209
+ getCapabilitiesForTier,
210
+ getCapability,
211
+ isCapabilityAvailable,
212
+ getCapabilityMinTier,
213
+ getCapabilitiesByCategory,
214
+ getAllCapabilityCodes
215
+ };