@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,183 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/api-versions.ts
21
+ var api_versions_exports = {};
22
+ __export(api_versions_exports, {
23
+ API_VERSIONS: () => API_VERSIONS,
24
+ BASIS_CURRENT_VERSION: () => BASIS_CURRENT_VERSION,
25
+ BASIS_SPEC_VERSION: () => BASIS_SPEC_VERSION,
26
+ BASIS_VERSIONS: () => BASIS_VERSIONS,
27
+ CAR_SPEC_CURRENT_VERSION: () => CAR_SPEC_CURRENT_VERSION,
28
+ CAR_SPEC_VERSIONS: () => CAR_SPEC_VERSIONS,
29
+ COGNIGATE_CURRENT_VERSION: () => COGNIGATE_CURRENT_VERSION,
30
+ COGNIGATE_DEFAULT_VERSION: () => COGNIGATE_DEFAULT_VERSION,
31
+ COGNIGATE_VERSIONS: () => COGNIGATE_VERSIONS,
32
+ LOGIC_API_VERSIONS: () => LOGIC_API_VERSIONS,
33
+ LOGIC_CURRENT_VERSION: () => LOGIC_CURRENT_VERSION,
34
+ TRUST_API_VERSIONS: () => TRUST_API_VERSIONS,
35
+ TRUST_CURRENT_VERSION: () => TRUST_CURRENT_VERSION,
36
+ VERSION_HEADERS: () => VERSION_HEADERS,
37
+ VersionStatus: () => VersionStatus,
38
+ buildApiUrl: () => buildApiUrl,
39
+ getCurrentVersion: () => getCurrentVersion,
40
+ getStableVersions: () => getStableVersions,
41
+ getVersionDefinition: () => getVersionDefinition,
42
+ isVersionDeprecated: () => isVersionDeprecated,
43
+ isVersionSupported: () => isVersionSupported
44
+ });
45
+ module.exports = __toCommonJS(api_versions_exports);
46
+ var VersionStatus = /* @__PURE__ */ ((VersionStatus2) => {
47
+ VersionStatus2["DEVELOPMENT"] = "development";
48
+ VersionStatus2["PREVIEW"] = "preview";
49
+ VersionStatus2["STABLE"] = "stable";
50
+ VersionStatus2["DEPRECATED"] = "deprecated";
51
+ VersionStatus2["RETIRED"] = "retired";
52
+ return VersionStatus2;
53
+ })(VersionStatus || {});
54
+ var COGNIGATE_VERSIONS = {
55
+ v1: {
56
+ version: "v1",
57
+ fullVersion: "1.0.0",
58
+ releaseDate: "2026-02-01",
59
+ status: "stable" /* STABLE */,
60
+ changelogUrl: "https://cognigate.dev/changelog/v1"
61
+ }
62
+ };
63
+ var COGNIGATE_CURRENT_VERSION = "v1";
64
+ var COGNIGATE_DEFAULT_VERSION = "v1";
65
+ var TRUST_API_VERSIONS = {
66
+ v1: {
67
+ version: "v1",
68
+ fullVersion: "1.0.0",
69
+ releaseDate: "2026-02-01",
70
+ status: "stable" /* STABLE */,
71
+ changelogUrl: "https://trust.agentanchorai.com/changelog/v1"
72
+ }
73
+ };
74
+ var TRUST_CURRENT_VERSION = "v1";
75
+ var LOGIC_API_VERSIONS = {
76
+ v1: {
77
+ version: "v1",
78
+ fullVersion: "1.0.0",
79
+ releaseDate: "2026-02-01",
80
+ status: "preview" /* PREVIEW */,
81
+ changelogUrl: "https://logic.agentanchorai.com/changelog/v1"
82
+ }
83
+ };
84
+ var LOGIC_CURRENT_VERSION = "v1";
85
+ var BASIS_VERSIONS = {
86
+ v1: {
87
+ version: "v1",
88
+ fullVersion: "1.0.0",
89
+ releaseDate: "2026-02-01",
90
+ status: "stable" /* STABLE */,
91
+ changelogUrl: "https://basis.vorion.org/changelog"
92
+ }
93
+ };
94
+ var BASIS_CURRENT_VERSION = "v1";
95
+ var BASIS_SPEC_VERSION = "1.0.0";
96
+ var CAR_SPEC_VERSIONS = {
97
+ v1: {
98
+ version: "v1",
99
+ fullVersion: "1.0.0",
100
+ releaseDate: "2026-02-01",
101
+ status: "stable" /* STABLE */,
102
+ changelogUrl: "https://carid.vorion.org/changelog"
103
+ }
104
+ };
105
+ var CAR_SPEC_CURRENT_VERSION = "v1";
106
+ var API_VERSIONS = {
107
+ cognigate: COGNIGATE_VERSIONS,
108
+ trust: TRUST_API_VERSIONS,
109
+ logic: LOGIC_API_VERSIONS,
110
+ basis: BASIS_VERSIONS,
111
+ carSpec: CAR_SPEC_VERSIONS
112
+ };
113
+ function getCurrentVersion(service) {
114
+ switch (service) {
115
+ case "cognigate":
116
+ return COGNIGATE_CURRENT_VERSION;
117
+ case "trust":
118
+ return TRUST_CURRENT_VERSION;
119
+ case "logic":
120
+ return LOGIC_CURRENT_VERSION;
121
+ case "basis":
122
+ return BASIS_CURRENT_VERSION;
123
+ case "carSpec":
124
+ return CAR_SPEC_CURRENT_VERSION;
125
+ }
126
+ }
127
+ function getVersionDefinition(service, version) {
128
+ return API_VERSIONS[service][version];
129
+ }
130
+ function isVersionSupported(service, version) {
131
+ const def = getVersionDefinition(service, version);
132
+ if (!def) return false;
133
+ return def.status !== "retired" /* RETIRED */;
134
+ }
135
+ function isVersionDeprecated(service, version) {
136
+ const def = getVersionDefinition(service, version);
137
+ if (!def) return false;
138
+ return def.status === "deprecated" /* DEPRECATED */;
139
+ }
140
+ function getStableVersions(service) {
141
+ return Object.values(API_VERSIONS[service]).filter(
142
+ (v) => v.status === "stable" /* STABLE */
143
+ );
144
+ }
145
+ function buildApiUrl(baseUrl, version, path) {
146
+ const cleanBase = baseUrl.replace(/\/$/, "");
147
+ const cleanPath = path.replace(/^\//, "");
148
+ return `${cleanBase}/${version}/${cleanPath}`;
149
+ }
150
+ var VERSION_HEADERS = {
151
+ /** Header to request specific API version */
152
+ REQUEST_VERSION: "X-API-Version",
153
+ /** Header indicating actual API version used */
154
+ RESPONSE_VERSION: "X-API-Version",
155
+ /** Header warning about deprecation */
156
+ DEPRECATION_WARNING: "X-Deprecation-Warning",
157
+ /** Header with sunset date */
158
+ SUNSET: "Sunset"
159
+ };
160
+ // Annotate the CommonJS export names for ESM import in node:
161
+ 0 && (module.exports = {
162
+ API_VERSIONS,
163
+ BASIS_CURRENT_VERSION,
164
+ BASIS_SPEC_VERSION,
165
+ BASIS_VERSIONS,
166
+ CAR_SPEC_CURRENT_VERSION,
167
+ CAR_SPEC_VERSIONS,
168
+ COGNIGATE_CURRENT_VERSION,
169
+ COGNIGATE_DEFAULT_VERSION,
170
+ COGNIGATE_VERSIONS,
171
+ LOGIC_API_VERSIONS,
172
+ LOGIC_CURRENT_VERSION,
173
+ TRUST_API_VERSIONS,
174
+ TRUST_CURRENT_VERSION,
175
+ VERSION_HEADERS,
176
+ VersionStatus,
177
+ buildApiUrl,
178
+ getCurrentVersion,
179
+ getStableVersions,
180
+ getVersionDefinition,
181
+ isVersionDeprecated,
182
+ isVersionSupported
183
+ });
@@ -0,0 +1,91 @@
1
+ /**
2
+ * @vorionsys/shared-constants - API Versions
3
+ *
4
+ * Centralized API version management across all services
5
+ * Ensures consistent versioning strategy
6
+ *
7
+ * @see https://cognigate.dev/docs/versioning
8
+ */
9
+ declare enum VersionStatus {
10
+ /** Currently in development, not available */
11
+ DEVELOPMENT = "development",
12
+ /** Available as preview/beta */
13
+ PREVIEW = "preview",
14
+ /** Stable and recommended */
15
+ STABLE = "stable",
16
+ /** Still supported but deprecated */
17
+ DEPRECATED = "deprecated",
18
+ /** No longer supported */
19
+ RETIRED = "retired"
20
+ }
21
+ interface ApiVersionDefinition {
22
+ /** Version identifier (e.g., "v1") */
23
+ version: string;
24
+ /** Full version number (e.g., "1.0.0") */
25
+ fullVersion: string;
26
+ /** Release date */
27
+ releaseDate: string;
28
+ /** End of support date (if deprecated/retired) */
29
+ endOfLife?: string;
30
+ /** Current status */
31
+ status: VersionStatus;
32
+ /** Changelog URL */
33
+ changelogUrl?: string;
34
+ /** Migration guide URL (if deprecated) */
35
+ migrationUrl?: string;
36
+ }
37
+ declare const COGNIGATE_VERSIONS: Record<string, ApiVersionDefinition>;
38
+ declare const COGNIGATE_CURRENT_VERSION = "v1";
39
+ declare const COGNIGATE_DEFAULT_VERSION = "v1";
40
+ declare const TRUST_API_VERSIONS: Record<string, ApiVersionDefinition>;
41
+ declare const TRUST_CURRENT_VERSION = "v1";
42
+ declare const LOGIC_API_VERSIONS: Record<string, ApiVersionDefinition>;
43
+ declare const LOGIC_CURRENT_VERSION = "v1";
44
+ declare const BASIS_VERSIONS: Record<string, ApiVersionDefinition>;
45
+ declare const BASIS_CURRENT_VERSION = "v1";
46
+ declare const BASIS_SPEC_VERSION = "1.0.0";
47
+ declare const CAR_SPEC_VERSIONS: Record<string, ApiVersionDefinition>;
48
+ declare const CAR_SPEC_CURRENT_VERSION = "v1";
49
+ declare const API_VERSIONS: {
50
+ readonly cognigate: Record<string, ApiVersionDefinition>;
51
+ readonly trust: Record<string, ApiVersionDefinition>;
52
+ readonly logic: Record<string, ApiVersionDefinition>;
53
+ readonly basis: Record<string, ApiVersionDefinition>;
54
+ readonly carSpec: Record<string, ApiVersionDefinition>;
55
+ };
56
+ /**
57
+ * Get the current stable version for a service
58
+ */
59
+ declare function getCurrentVersion(service: 'cognigate' | 'trust' | 'logic' | 'basis' | 'carSpec'): string;
60
+ /**
61
+ * Get version definition
62
+ */
63
+ declare function getVersionDefinition(service: 'cognigate' | 'trust' | 'logic' | 'basis' | 'carSpec', version: string): ApiVersionDefinition | undefined;
64
+ /**
65
+ * Check if a version is still supported
66
+ */
67
+ declare function isVersionSupported(service: 'cognigate' | 'trust' | 'logic' | 'basis' | 'carSpec', version: string): boolean;
68
+ /**
69
+ * Check if a version is deprecated
70
+ */
71
+ declare function isVersionDeprecated(service: 'cognigate' | 'trust' | 'logic' | 'basis' | 'carSpec', version: string): boolean;
72
+ /**
73
+ * Get all stable versions for a service
74
+ */
75
+ declare function getStableVersions(service: 'cognigate' | 'trust' | 'logic' | 'basis' | 'carSpec'): ApiVersionDefinition[];
76
+ /**
77
+ * Build versioned API URL
78
+ */
79
+ declare function buildApiUrl(baseUrl: string, version: string, path: string): string;
80
+ declare const VERSION_HEADERS: {
81
+ /** Header to request specific API version */
82
+ readonly REQUEST_VERSION: "X-API-Version";
83
+ /** Header indicating actual API version used */
84
+ readonly RESPONSE_VERSION: "X-API-Version";
85
+ /** Header warning about deprecation */
86
+ readonly DEPRECATION_WARNING: "X-Deprecation-Warning";
87
+ /** Header with sunset date */
88
+ readonly SUNSET: "Sunset";
89
+ };
90
+
91
+ export { API_VERSIONS, type ApiVersionDefinition, BASIS_CURRENT_VERSION, BASIS_SPEC_VERSION, BASIS_VERSIONS, CAR_SPEC_CURRENT_VERSION, CAR_SPEC_VERSIONS, COGNIGATE_CURRENT_VERSION, COGNIGATE_DEFAULT_VERSION, COGNIGATE_VERSIONS, LOGIC_API_VERSIONS, LOGIC_CURRENT_VERSION, TRUST_API_VERSIONS, TRUST_CURRENT_VERSION, VERSION_HEADERS, VersionStatus, buildApiUrl, getCurrentVersion, getStableVersions, getVersionDefinition, isVersionDeprecated, isVersionSupported };
@@ -0,0 +1,46 @@
1
+ import {
2
+ API_VERSIONS,
3
+ BASIS_CURRENT_VERSION,
4
+ BASIS_SPEC_VERSION,
5
+ BASIS_VERSIONS,
6
+ CAR_SPEC_CURRENT_VERSION,
7
+ CAR_SPEC_VERSIONS,
8
+ COGNIGATE_CURRENT_VERSION,
9
+ COGNIGATE_DEFAULT_VERSION,
10
+ COGNIGATE_VERSIONS,
11
+ LOGIC_API_VERSIONS,
12
+ LOGIC_CURRENT_VERSION,
13
+ TRUST_API_VERSIONS,
14
+ TRUST_CURRENT_VERSION,
15
+ VERSION_HEADERS,
16
+ VersionStatus,
17
+ buildApiUrl,
18
+ getCurrentVersion,
19
+ getStableVersions,
20
+ getVersionDefinition,
21
+ isVersionDeprecated,
22
+ isVersionSupported
23
+ } from "./chunk-UDCZKJSQ.js";
24
+ export {
25
+ API_VERSIONS,
26
+ BASIS_CURRENT_VERSION,
27
+ BASIS_SPEC_VERSION,
28
+ BASIS_VERSIONS,
29
+ CAR_SPEC_CURRENT_VERSION,
30
+ CAR_SPEC_VERSIONS,
31
+ COGNIGATE_CURRENT_VERSION,
32
+ COGNIGATE_DEFAULT_VERSION,
33
+ COGNIGATE_VERSIONS,
34
+ LOGIC_API_VERSIONS,
35
+ LOGIC_CURRENT_VERSION,
36
+ TRUST_API_VERSIONS,
37
+ TRUST_CURRENT_VERSION,
38
+ VERSION_HEADERS,
39
+ VersionStatus,
40
+ buildApiUrl,
41
+ getCurrentVersion,
42
+ getStableVersions,
43
+ getVersionDefinition,
44
+ isVersionDeprecated,
45
+ isVersionSupported
46
+ };
@@ -0,0 +1,246 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/capabilities.ts
21
+ var capabilities_exports = {};
22
+ __export(capabilities_exports, {
23
+ CAPABILITIES: () => CAPABILITIES,
24
+ CapabilityCategory: () => CapabilityCategory,
25
+ getAllCapabilityCodes: () => getAllCapabilityCodes,
26
+ getCapabilitiesByCategory: () => getCapabilitiesByCategory,
27
+ getCapabilitiesForTier: () => getCapabilitiesForTier,
28
+ getCapability: () => getCapability,
29
+ getCapabilityMinTier: () => getCapabilityMinTier,
30
+ isCapabilityAvailable: () => isCapabilityAvailable
31
+ });
32
+ module.exports = __toCommonJS(capabilities_exports);
33
+ var CapabilityCategory = /* @__PURE__ */ ((CapabilityCategory2) => {
34
+ CapabilityCategory2["DATA_ACCESS"] = "data_access";
35
+ CapabilityCategory2["API_ACCESS"] = "api_access";
36
+ CapabilityCategory2["CODE_EXECUTION"] = "code_execution";
37
+ CapabilityCategory2["AGENT_INTERACTION"] = "agent_interaction";
38
+ CapabilityCategory2["RESOURCE_MANAGEMENT"] = "resource_management";
39
+ CapabilityCategory2["GOVERNANCE"] = "governance";
40
+ CapabilityCategory2["ADMIN"] = "admin";
41
+ return CapabilityCategory2;
42
+ })(CapabilityCategory || {});
43
+ var CAPABILITIES = [
44
+ // T0 - Sandbox
45
+ {
46
+ code: "CAP-READ-PUBLIC",
47
+ name: "Read Public Data",
48
+ category: "data_access" /* DATA_ACCESS */,
49
+ description: "Access publicly available data",
50
+ unlockTier: 0 /* T0_SANDBOX */
51
+ },
52
+ {
53
+ code: "CAP-GENERATE-TEXT",
54
+ name: "Generate Text",
55
+ category: "code_execution" /* CODE_EXECUTION */,
56
+ description: "Generate text responses",
57
+ unlockTier: 0 /* T0_SANDBOX */
58
+ },
59
+ // T1 - Observed
60
+ {
61
+ code: "CAP-READ-INTERNAL",
62
+ name: "Read Internal Data",
63
+ category: "data_access" /* DATA_ACCESS */,
64
+ description: "Access internal data within allowed scopes",
65
+ unlockTier: 1 /* T1_OBSERVED */,
66
+ constraints: ["Read-only", "Logged"]
67
+ },
68
+ {
69
+ code: "CAP-INTERNAL-API",
70
+ name: "Internal API Access",
71
+ category: "api_access" /* API_ACCESS */,
72
+ description: "Make read-only internal API calls",
73
+ unlockTier: 1 /* T1_OBSERVED */,
74
+ constraints: ["GET only", "Rate limited"]
75
+ },
76
+ // T2 - Provisional
77
+ {
78
+ code: "CAP-FILE-WRITE",
79
+ name: "Write Files",
80
+ category: "data_access" /* DATA_ACCESS */,
81
+ description: "Write to approved directories",
82
+ unlockTier: 2 /* T2_PROVISIONAL */,
83
+ constraints: ["Approved dirs only", "Size limited"]
84
+ },
85
+ {
86
+ code: "CAP-DB-READ",
87
+ name: "Database Read",
88
+ category: "data_access" /* DATA_ACCESS */,
89
+ description: "Read from approved database tables",
90
+ unlockTier: 2 /* T2_PROVISIONAL */,
91
+ constraints: ["Approved tables", "Query timeout"]
92
+ },
93
+ {
94
+ code: "CAP-EXTERNAL-API-READ",
95
+ name: "External API Read",
96
+ category: "api_access" /* API_ACCESS */,
97
+ description: "Make GET requests to approved external APIs",
98
+ unlockTier: 2 /* T2_PROVISIONAL */,
99
+ constraints: ["GET only", "Approved endpoints"]
100
+ },
101
+ // T3 - Monitored
102
+ {
103
+ code: "CAP-DB-WRITE",
104
+ name: "Database Write",
105
+ category: "data_access" /* DATA_ACCESS */,
106
+ description: "Write to approved database tables",
107
+ unlockTier: 3 /* T3_MONITORED */,
108
+ constraints: ["Approved tables", "Transaction limits"]
109
+ },
110
+ {
111
+ code: "CAP-EXTERNAL-API-FULL",
112
+ name: "External API Full Access",
113
+ category: "api_access" /* API_ACCESS */,
114
+ description: "Full REST operations on approved external APIs",
115
+ unlockTier: 3 /* T3_MONITORED */,
116
+ constraints: ["Approved endpoints", "Rate limited"]
117
+ },
118
+ {
119
+ code: "CAP-CODE-SANDBOX",
120
+ name: "Sandboxed Code Execution",
121
+ category: "code_execution" /* CODE_EXECUTION */,
122
+ description: "Execute code in isolated sandbox",
123
+ unlockTier: 3 /* T3_MONITORED */,
124
+ constraints: ["Sandboxed", "Time limited", "No network"]
125
+ },
126
+ // T4 - Standard
127
+ {
128
+ code: "CAP-AGENT-COMMUNICATE",
129
+ name: "Agent Communication",
130
+ category: "agent_interaction" /* AGENT_INTERACTION */,
131
+ description: "Send and receive messages to/from other agents",
132
+ unlockTier: 4 /* T4_STANDARD */,
133
+ constraints: ["Approved agents", "Message limits"]
134
+ },
135
+ {
136
+ code: "CAP-WORKFLOW-MULTI",
137
+ name: "Multi-Step Workflow",
138
+ category: "code_execution" /* CODE_EXECUTION */,
139
+ description: "Orchestrate multi-step workflows",
140
+ unlockTier: 4 /* T4_STANDARD */,
141
+ constraints: ["Approved patterns", "Checkpoints required"]
142
+ },
143
+ {
144
+ code: "CAP-ESCALATE-HUMAN",
145
+ name: "Human Escalation",
146
+ category: "governance" /* GOVERNANCE */,
147
+ description: "Initiate escalation to human reviewers",
148
+ unlockTier: 4 /* T4_STANDARD */
149
+ },
150
+ // T5 - Trusted
151
+ {
152
+ code: "CAP-AGENT-DELEGATE",
153
+ name: "Task Delegation",
154
+ category: "agent_interaction" /* AGENT_INTERACTION */,
155
+ description: "Delegate tasks to other agents",
156
+ unlockTier: 5 /* T5_TRUSTED */,
157
+ constraints: ["Trust verified agents"]
158
+ },
159
+ {
160
+ code: "CAP-RESOURCE-PROVISION",
161
+ name: "Resource Provisioning",
162
+ category: "resource_management" /* RESOURCE_MANAGEMENT */,
163
+ description: "Provision computational resources",
164
+ unlockTier: 5 /* T5_TRUSTED */,
165
+ constraints: ["Budget limits", "Approval required"]
166
+ },
167
+ // T6 - Certified
168
+ {
169
+ code: "CAP-AGENT-SPAWN",
170
+ name: "Spawn Agents",
171
+ category: "agent_interaction" /* AGENT_INTERACTION */,
172
+ description: "Create new agent instances",
173
+ unlockTier: 6 /* T6_CERTIFIED */,
174
+ constraints: ["Template required", "Quota limited"]
175
+ },
176
+ {
177
+ code: "CAP-INFRA-MANAGE",
178
+ name: "Infrastructure Management",
179
+ category: "resource_management" /* RESOURCE_MANAGEMENT */,
180
+ description: "Manage infrastructure resources",
181
+ unlockTier: 6 /* T6_CERTIFIED */,
182
+ constraints: ["Approved resources"]
183
+ },
184
+ {
185
+ code: "CAP-POLICY-CREATE",
186
+ name: "Policy Creation",
187
+ category: "governance" /* GOVERNANCE */,
188
+ description: "Create governance policies",
189
+ unlockTier: 6 /* T6_CERTIFIED */,
190
+ constraints: ["Review required"]
191
+ },
192
+ // T7 - Autonomous
193
+ {
194
+ code: "CAP-FULL-ADMIN",
195
+ name: "Full Administration",
196
+ category: "admin" /* ADMIN */,
197
+ description: "Full administrative access",
198
+ unlockTier: 7 /* T7_AUTONOMOUS */
199
+ },
200
+ {
201
+ code: "CAP-SELF-MODIFY",
202
+ name: "Self-Modification",
203
+ category: "code_execution" /* CODE_EXECUTION */,
204
+ description: "Modify own configuration and behavior",
205
+ unlockTier: 7 /* T7_AUTONOMOUS */,
206
+ constraints: ["Ethical bounds", "Audit logged"]
207
+ },
208
+ {
209
+ code: "CAP-STRATEGIC-DECISION",
210
+ name: "Strategic Decisions",
211
+ category: "governance" /* GOVERNANCE */,
212
+ description: "Make strategic organizational decisions",
213
+ unlockTier: 7 /* T7_AUTONOMOUS */,
214
+ constraints: ["Human oversight available"]
215
+ }
216
+ ];
217
+ function getCapabilitiesForTier(tier) {
218
+ return CAPABILITIES.filter((cap) => cap.unlockTier <= tier);
219
+ }
220
+ function getCapability(code) {
221
+ return CAPABILITIES.find((cap) => cap.code === code);
222
+ }
223
+ function isCapabilityAvailable(code, tier) {
224
+ const cap = getCapability(code);
225
+ return cap !== void 0 && cap.unlockTier <= tier;
226
+ }
227
+ function getCapabilityMinTier(code) {
228
+ return getCapability(code)?.unlockTier;
229
+ }
230
+ function getCapabilitiesByCategory(category) {
231
+ return CAPABILITIES.filter((cap) => cap.category === category);
232
+ }
233
+ function getAllCapabilityCodes() {
234
+ return CAPABILITIES.map((cap) => cap.code);
235
+ }
236
+ // Annotate the CommonJS export names for ESM import in node:
237
+ 0 && (module.exports = {
238
+ CAPABILITIES,
239
+ CapabilityCategory,
240
+ getAllCapabilityCodes,
241
+ getCapabilitiesByCategory,
242
+ getCapabilitiesForTier,
243
+ getCapability,
244
+ getCapabilityMinTier,
245
+ isCapabilityAvailable
246
+ });
@@ -0,0 +1,55 @@
1
+ import { TrustTier } from './tiers.cjs';
2
+
3
+ /**
4
+ * @vorionsys/shared-constants - Capability Definitions
5
+ *
6
+ * Single source of truth for capability codes and tier requirements
7
+ * Used across all Vorion ecosystem products
8
+ *
9
+ * @see https://basis.vorion.org/capabilities
10
+ */
11
+
12
+ declare enum CapabilityCategory {
13
+ DATA_ACCESS = "data_access",
14
+ API_ACCESS = "api_access",
15
+ CODE_EXECUTION = "code_execution",
16
+ AGENT_INTERACTION = "agent_interaction",
17
+ RESOURCE_MANAGEMENT = "resource_management",
18
+ GOVERNANCE = "governance",
19
+ ADMIN = "admin"
20
+ }
21
+ interface CapabilityDefinition {
22
+ readonly code: string;
23
+ readonly name: string;
24
+ readonly category: CapabilityCategory;
25
+ readonly description: string;
26
+ readonly unlockTier: TrustTier;
27
+ readonly constraints?: readonly string[];
28
+ }
29
+ declare const CAPABILITIES: readonly CapabilityDefinition[];
30
+ /**
31
+ * Get capabilities available at a specific tier
32
+ */
33
+ declare function getCapabilitiesForTier(tier: TrustTier): CapabilityDefinition[];
34
+ /**
35
+ * Get capability by code
36
+ */
37
+ declare function getCapability(code: string): CapabilityDefinition | undefined;
38
+ /**
39
+ * Check if a capability is available at a tier
40
+ */
41
+ declare function isCapabilityAvailable(code: string, tier: TrustTier): boolean;
42
+ /**
43
+ * Get minimum tier required for a capability
44
+ */
45
+ declare function getCapabilityMinTier(code: string): TrustTier | undefined;
46
+ /**
47
+ * Get capabilities by category
48
+ */
49
+ declare function getCapabilitiesByCategory(category: CapabilityCategory): CapabilityDefinition[];
50
+ /**
51
+ * Get all capability codes
52
+ */
53
+ declare function getAllCapabilityCodes(): string[];
54
+
55
+ export { CAPABILITIES, CapabilityCategory, type CapabilityDefinition, getAllCapabilityCodes, getCapabilitiesByCategory, getCapabilitiesForTier, getCapability, getCapabilityMinTier, isCapabilityAvailable };
@@ -0,0 +1,21 @@
1
+ import {
2
+ CAPABILITIES,
3
+ CapabilityCategory,
4
+ getAllCapabilityCodes,
5
+ getCapabilitiesByCategory,
6
+ getCapabilitiesForTier,
7
+ getCapability,
8
+ getCapabilityMinTier,
9
+ isCapabilityAvailable
10
+ } from "./chunk-JZJPDGG7.js";
11
+ import "./chunk-PHL3CB53.js";
12
+ export {
13
+ CAPABILITIES,
14
+ CapabilityCategory,
15
+ getAllCapabilityCodes,
16
+ getCapabilitiesByCategory,
17
+ getCapabilitiesForTier,
18
+ getCapability,
19
+ getCapabilityMinTier,
20
+ isCapabilityAvailable
21
+ };