@trentapps/manager-protocol 1.3.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 (195) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +639 -0
  3. package/dist/analyzers/ArchitectureDetector.d.ts +44 -0
  4. package/dist/analyzers/ArchitectureDetector.d.ts.map +1 -0
  5. package/dist/analyzers/ArchitectureDetector.js +218 -0
  6. package/dist/analyzers/ArchitectureDetector.js.map +1 -0
  7. package/dist/analyzers/CSSAnalyzer.d.ts +284 -0
  8. package/dist/analyzers/CSSAnalyzer.d.ts.map +1 -0
  9. package/dist/analyzers/CSSAnalyzer.js +1180 -0
  10. package/dist/analyzers/CSSAnalyzer.js.map +1 -0
  11. package/dist/analyzers/index.d.ts +5 -0
  12. package/dist/analyzers/index.d.ts.map +1 -0
  13. package/dist/analyzers/index.js +5 -0
  14. package/dist/analyzers/index.js.map +1 -0
  15. package/dist/cli.d.ts +8 -0
  16. package/dist/cli.d.ts.map +1 -0
  17. package/dist/cli.js +174 -0
  18. package/dist/cli.js.map +1 -0
  19. package/dist/design-system/index.d.ts +6 -0
  20. package/dist/design-system/index.d.ts.map +1 -0
  21. package/dist/design-system/index.js +6 -0
  22. package/dist/design-system/index.js.map +1 -0
  23. package/dist/design-system/tokens.d.ts +106 -0
  24. package/dist/design-system/tokens.d.ts.map +1 -0
  25. package/dist/design-system/tokens.js +554 -0
  26. package/dist/design-system/tokens.js.map +1 -0
  27. package/dist/engine/AuditLogger.d.ts +506 -0
  28. package/dist/engine/AuditLogger.d.ts.map +1 -0
  29. package/dist/engine/AuditLogger.js +1491 -0
  30. package/dist/engine/AuditLogger.js.map +1 -0
  31. package/dist/engine/GitHubApprovalManager.d.ts +123 -0
  32. package/dist/engine/GitHubApprovalManager.d.ts.map +1 -0
  33. package/dist/engine/GitHubApprovalManager.js +347 -0
  34. package/dist/engine/GitHubApprovalManager.js.map +1 -0
  35. package/dist/engine/GitHubClient.d.ts +183 -0
  36. package/dist/engine/GitHubClient.d.ts.map +1 -0
  37. package/dist/engine/GitHubClient.js +411 -0
  38. package/dist/engine/GitHubClient.js.map +1 -0
  39. package/dist/engine/RateLimiter.d.ts +81 -0
  40. package/dist/engine/RateLimiter.d.ts.map +1 -0
  41. package/dist/engine/RateLimiter.js +215 -0
  42. package/dist/engine/RateLimiter.js.map +1 -0
  43. package/dist/engine/RuleDependencyAnalyzer.d.ts +73 -0
  44. package/dist/engine/RuleDependencyAnalyzer.d.ts.map +1 -0
  45. package/dist/engine/RuleDependencyAnalyzer.js +475 -0
  46. package/dist/engine/RuleDependencyAnalyzer.js.map +1 -0
  47. package/dist/engine/RulesEngine.d.ts +176 -0
  48. package/dist/engine/RulesEngine.d.ts.map +1 -0
  49. package/dist/engine/RulesEngine.js +705 -0
  50. package/dist/engine/RulesEngine.js.map +1 -0
  51. package/dist/engine/TaskManager.d.ts +174 -0
  52. package/dist/engine/TaskManager.d.ts.map +1 -0
  53. package/dist/engine/TaskManager.js +663 -0
  54. package/dist/engine/TaskManager.js.map +1 -0
  55. package/dist/engine/index.d.ts +11 -0
  56. package/dist/engine/index.d.ts.map +1 -0
  57. package/dist/engine/index.js +13 -0
  58. package/dist/engine/index.js.map +1 -0
  59. package/dist/index.d.ts +21 -0
  60. package/dist/index.d.ts.map +1 -0
  61. package/dist/index.js +29 -0
  62. package/dist/index.js.map +1 -0
  63. package/dist/rules/architecture.d.ts +9 -0
  64. package/dist/rules/architecture.d.ts.map +1 -0
  65. package/dist/rules/architecture.js +322 -0
  66. package/dist/rules/architecture.js.map +1 -0
  67. package/dist/rules/azure.d.ts +7 -0
  68. package/dist/rules/azure.d.ts.map +1 -0
  69. package/dist/rules/azure.js +136 -0
  70. package/dist/rules/azure.js.map +1 -0
  71. package/dist/rules/compliance.d.ts +9 -0
  72. package/dist/rules/compliance.d.ts.map +1 -0
  73. package/dist/rules/compliance.js +286 -0
  74. package/dist/rules/compliance.js.map +1 -0
  75. package/dist/rules/condition-optimizer.d.ts +151 -0
  76. package/dist/rules/condition-optimizer.d.ts.map +1 -0
  77. package/dist/rules/condition-optimizer.js +479 -0
  78. package/dist/rules/condition-optimizer.js.map +1 -0
  79. package/dist/rules/css.d.ts +10 -0
  80. package/dist/rules/css.d.ts.map +1 -0
  81. package/dist/rules/css.js +1777 -0
  82. package/dist/rules/css.js.map +1 -0
  83. package/dist/rules/field-standards.d.ts +1172 -0
  84. package/dist/rules/field-standards.d.ts.map +1 -0
  85. package/dist/rules/field-standards.js +908 -0
  86. package/dist/rules/field-standards.js.map +1 -0
  87. package/dist/rules/flask.d.ts +7 -0
  88. package/dist/rules/flask.d.ts.map +1 -0
  89. package/dist/rules/flask.js +142 -0
  90. package/dist/rules/flask.js.map +1 -0
  91. package/dist/rules/index.d.ts +827 -0
  92. package/dist/rules/index.d.ts.map +1 -0
  93. package/dist/rules/index.js +556 -0
  94. package/dist/rules/index.js.map +1 -0
  95. package/dist/rules/ml-ai.d.ts +7 -0
  96. package/dist/rules/ml-ai.d.ts.map +1 -0
  97. package/dist/rules/ml-ai.js +148 -0
  98. package/dist/rules/ml-ai.js.map +1 -0
  99. package/dist/rules/operational.d.ts +9 -0
  100. package/dist/rules/operational.d.ts.map +1 -0
  101. package/dist/rules/operational.js +318 -0
  102. package/dist/rules/operational.js.map +1 -0
  103. package/dist/rules/patterns.d.ts +568 -0
  104. package/dist/rules/patterns.d.ts.map +1 -0
  105. package/dist/rules/patterns.js +1359 -0
  106. package/dist/rules/patterns.js.map +1 -0
  107. package/dist/rules/security.d.ts +9 -0
  108. package/dist/rules/security.d.ts.map +1 -0
  109. package/dist/rules/security.js +848 -0
  110. package/dist/rules/security.js.map +1 -0
  111. package/dist/rules/shared-patterns.d.ts +268 -0
  112. package/dist/rules/shared-patterns.d.ts.map +1 -0
  113. package/dist/rules/shared-patterns.js +556 -0
  114. package/dist/rules/shared-patterns.js.map +1 -0
  115. package/dist/rules/storage.d.ts +13 -0
  116. package/dist/rules/storage.d.ts.map +1 -0
  117. package/dist/rules/storage.js +672 -0
  118. package/dist/rules/storage.js.map +1 -0
  119. package/dist/rules/stripe.d.ts +7 -0
  120. package/dist/rules/stripe.d.ts.map +1 -0
  121. package/dist/rules/stripe.js +133 -0
  122. package/dist/rules/stripe.js.map +1 -0
  123. package/dist/rules/testing.d.ts +7 -0
  124. package/dist/rules/testing.d.ts.map +1 -0
  125. package/dist/rules/testing.js +135 -0
  126. package/dist/rules/testing.js.map +1 -0
  127. package/dist/rules/ux.d.ts +9 -0
  128. package/dist/rules/ux.d.ts.map +1 -0
  129. package/dist/rules/ux.js +280 -0
  130. package/dist/rules/ux.js.map +1 -0
  131. package/dist/rules/websocket.d.ts +7 -0
  132. package/dist/rules/websocket.d.ts.map +1 -0
  133. package/dist/rules/websocket.js +128 -0
  134. package/dist/rules/websocket.js.map +1 -0
  135. package/dist/server.d.ts +43 -0
  136. package/dist/server.d.ts.map +1 -0
  137. package/dist/server.js +1967 -0
  138. package/dist/server.js.map +1 -0
  139. package/dist/supervisor/AgentSupervisor.d.ts +195 -0
  140. package/dist/supervisor/AgentSupervisor.d.ts.map +1 -0
  141. package/dist/supervisor/AgentSupervisor.js +569 -0
  142. package/dist/supervisor/AgentSupervisor.js.map +1 -0
  143. package/dist/supervisor/ManagedServerRegistry.d.ts +185 -0
  144. package/dist/supervisor/ManagedServerRegistry.d.ts.map +1 -0
  145. package/dist/supervisor/ManagedServerRegistry.js +729 -0
  146. package/dist/supervisor/ManagedServerRegistry.js.map +1 -0
  147. package/dist/supervisor/ProjectTracker.d.ts +210 -0
  148. package/dist/supervisor/ProjectTracker.d.ts.map +1 -0
  149. package/dist/supervisor/ProjectTracker.js +709 -0
  150. package/dist/supervisor/ProjectTracker.js.map +1 -0
  151. package/dist/supervisor/index.d.ts +6 -0
  152. package/dist/supervisor/index.d.ts.map +1 -0
  153. package/dist/supervisor/index.js +6 -0
  154. package/dist/supervisor/index.js.map +1 -0
  155. package/dist/testing/index.d.ts +11 -0
  156. package/dist/testing/index.d.ts.map +1 -0
  157. package/dist/testing/index.js +12 -0
  158. package/dist/testing/index.js.map +1 -0
  159. package/dist/testing/rule-tester.d.ts +217 -0
  160. package/dist/testing/rule-tester.d.ts.map +1 -0
  161. package/dist/testing/rule-tester.examples.d.ts +57 -0
  162. package/dist/testing/rule-tester.examples.d.ts.map +1 -0
  163. package/dist/testing/rule-tester.examples.js +375 -0
  164. package/dist/testing/rule-tester.examples.js.map +1 -0
  165. package/dist/testing/rule-tester.js +381 -0
  166. package/dist/testing/rule-tester.js.map +1 -0
  167. package/dist/testing/rule-validator.d.ts +141 -0
  168. package/dist/testing/rule-validator.d.ts.map +1 -0
  169. package/dist/testing/rule-validator.js +640 -0
  170. package/dist/testing/rule-validator.js.map +1 -0
  171. package/dist/types/index.d.ts +1282 -0
  172. package/dist/types/index.d.ts.map +1 -0
  173. package/dist/types/index.js +386 -0
  174. package/dist/types/index.js.map +1 -0
  175. package/dist/utils/errors.d.ts +86 -0
  176. package/dist/utils/errors.d.ts.map +1 -0
  177. package/dist/utils/errors.js +171 -0
  178. package/dist/utils/errors.js.map +1 -0
  179. package/dist/utils/index.d.ts +7 -0
  180. package/dist/utils/index.d.ts.map +1 -0
  181. package/dist/utils/index.js +7 -0
  182. package/dist/utils/index.js.map +1 -0
  183. package/dist/utils/rate-limiting.d.ts +268 -0
  184. package/dist/utils/rate-limiting.d.ts.map +1 -0
  185. package/dist/utils/rate-limiting.js +403 -0
  186. package/dist/utils/rate-limiting.js.map +1 -0
  187. package/dist/utils/shared.d.ts +306 -0
  188. package/dist/utils/shared.d.ts.map +1 -0
  189. package/dist/utils/shared.js +464 -0
  190. package/dist/utils/shared.js.map +1 -0
  191. package/dist/utils/shell.d.ts +22 -0
  192. package/dist/utils/shell.d.ts.map +1 -0
  193. package/dist/utils/shell.js +29 -0
  194. package/dist/utils/shell.js.map +1 -0
  195. package/package.json +67 -0
@@ -0,0 +1,1282 @@
1
+ /**
2
+ * Enterprise Agent Supervisor - Core Types
3
+ *
4
+ * Comprehensive type definitions for the rules engine and governance system.
5
+ */
6
+ import { z } from 'zod';
7
+ export declare const ActionCategorySchema: z.ZodEnum<["data_access", "data_modification", "external_api", "file_system", "code_execution", "network", "authentication", "authorization", "financial", "pii_access", "system_config", "user_communication", "resource_allocation", "custom"]>;
8
+ export type ActionCategory = z.infer<typeof ActionCategorySchema>;
9
+ export declare const RiskLevelSchema: z.ZodEnum<["critical", "high", "medium", "low", "minimal"]>;
10
+ export type RiskLevel = z.infer<typeof RiskLevelSchema>;
11
+ export declare const ActionStatusSchema: z.ZodEnum<["approved", "denied", "pending_approval", "requires_review", "rate_limited", "escalated"]>;
12
+ export type ActionStatus = z.infer<typeof ActionStatusSchema>;
13
+ export declare const AgentActionSchema: z.ZodObject<{
14
+ id: z.ZodOptional<z.ZodString>;
15
+ name: z.ZodString;
16
+ category: z.ZodEnum<["data_access", "data_modification", "external_api", "file_system", "code_execution", "network", "authentication", "authorization", "financial", "pii_access", "system_config", "user_communication", "resource_allocation", "custom"]>;
17
+ description: z.ZodOptional<z.ZodString>;
18
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
19
+ agentId: z.ZodOptional<z.ZodString>;
20
+ sessionId: z.ZodOptional<z.ZodString>;
21
+ timestamp: z.ZodOptional<z.ZodString>;
22
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
23
+ }, "strip", z.ZodTypeAny, {
24
+ name: string;
25
+ category: "data_access" | "data_modification" | "external_api" | "file_system" | "code_execution" | "network" | "authentication" | "authorization" | "financial" | "pii_access" | "system_config" | "user_communication" | "resource_allocation" | "custom";
26
+ id?: string | undefined;
27
+ description?: string | undefined;
28
+ parameters?: Record<string, unknown> | undefined;
29
+ agentId?: string | undefined;
30
+ sessionId?: string | undefined;
31
+ timestamp?: string | undefined;
32
+ metadata?: Record<string, unknown> | undefined;
33
+ }, {
34
+ name: string;
35
+ category: "data_access" | "data_modification" | "external_api" | "file_system" | "code_execution" | "network" | "authentication" | "authorization" | "financial" | "pii_access" | "system_config" | "user_communication" | "resource_allocation" | "custom";
36
+ id?: string | undefined;
37
+ description?: string | undefined;
38
+ parameters?: Record<string, unknown> | undefined;
39
+ agentId?: string | undefined;
40
+ sessionId?: string | undefined;
41
+ timestamp?: string | undefined;
42
+ metadata?: Record<string, unknown> | undefined;
43
+ }>;
44
+ export type AgentAction = z.infer<typeof AgentActionSchema>;
45
+ export declare const RuleViolationSchema: z.ZodObject<{
46
+ ruleId: z.ZodString;
47
+ ruleName: z.ZodString;
48
+ severity: z.ZodEnum<["critical", "high", "medium", "low", "minimal"]>;
49
+ message: z.ZodString;
50
+ recommendation: z.ZodOptional<z.ZodString>;
51
+ context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
52
+ }, "strip", z.ZodTypeAny, {
53
+ message: string;
54
+ ruleId: string;
55
+ ruleName: string;
56
+ severity: "critical" | "high" | "medium" | "low" | "minimal";
57
+ recommendation?: string | undefined;
58
+ context?: Record<string, unknown> | undefined;
59
+ }, {
60
+ message: string;
61
+ ruleId: string;
62
+ ruleName: string;
63
+ severity: "critical" | "high" | "medium" | "low" | "minimal";
64
+ recommendation?: string | undefined;
65
+ context?: Record<string, unknown> | undefined;
66
+ }>;
67
+ export type RuleViolation = z.infer<typeof RuleViolationSchema>;
68
+ export declare const EvaluationResultSchema: z.ZodObject<{
69
+ actionId: z.ZodString;
70
+ status: z.ZodEnum<["approved", "denied", "pending_approval", "requires_review", "rate_limited", "escalated"]>;
71
+ riskScore: z.ZodNumber;
72
+ riskLevel: z.ZodEnum<["critical", "high", "medium", "low", "minimal"]>;
73
+ allowed: z.ZodBoolean;
74
+ violations: z.ZodArray<z.ZodObject<{
75
+ ruleId: z.ZodString;
76
+ ruleName: z.ZodString;
77
+ severity: z.ZodEnum<["critical", "high", "medium", "low", "minimal"]>;
78
+ message: z.ZodString;
79
+ recommendation: z.ZodOptional<z.ZodString>;
80
+ context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
81
+ }, "strip", z.ZodTypeAny, {
82
+ message: string;
83
+ ruleId: string;
84
+ ruleName: string;
85
+ severity: "critical" | "high" | "medium" | "low" | "minimal";
86
+ recommendation?: string | undefined;
87
+ context?: Record<string, unknown> | undefined;
88
+ }, {
89
+ message: string;
90
+ ruleId: string;
91
+ ruleName: string;
92
+ severity: "critical" | "high" | "medium" | "low" | "minimal";
93
+ recommendation?: string | undefined;
94
+ context?: Record<string, unknown> | undefined;
95
+ }>, "many">;
96
+ warnings: z.ZodArray<z.ZodString, "many">;
97
+ appliedRules: z.ZodArray<z.ZodString, "many">;
98
+ requiresHumanApproval: z.ZodBoolean;
99
+ approvalReason: z.ZodOptional<z.ZodString>;
100
+ rateLimitInfo: z.ZodOptional<z.ZodObject<{
101
+ limited: z.ZodBoolean;
102
+ remaining: z.ZodOptional<z.ZodNumber>;
103
+ resetAt: z.ZodOptional<z.ZodString>;
104
+ }, "strip", z.ZodTypeAny, {
105
+ limited: boolean;
106
+ remaining?: number | undefined;
107
+ resetAt?: string | undefined;
108
+ }, {
109
+ limited: boolean;
110
+ remaining?: number | undefined;
111
+ resetAt?: string | undefined;
112
+ }>>;
113
+ claudeMdUpdate: z.ZodOptional<z.ZodObject<{
114
+ needed: z.ZodBoolean;
115
+ reason: z.ZodString;
116
+ suggestedContent: z.ZodString;
117
+ section: z.ZodString;
118
+ }, "strip", z.ZodTypeAny, {
119
+ needed: boolean;
120
+ reason: string;
121
+ suggestedContent: string;
122
+ section: string;
123
+ }, {
124
+ needed: boolean;
125
+ reason: string;
126
+ suggestedContent: string;
127
+ section: string;
128
+ }>>;
129
+ evaluatedAt: z.ZodString;
130
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
131
+ cached: z.ZodOptional<z.ZodBoolean>;
132
+ }, "strip", z.ZodTypeAny, {
133
+ status: "approved" | "denied" | "pending_approval" | "requires_review" | "rate_limited" | "escalated";
134
+ actionId: string;
135
+ riskScore: number;
136
+ riskLevel: "critical" | "high" | "medium" | "low" | "minimal";
137
+ allowed: boolean;
138
+ violations: {
139
+ message: string;
140
+ ruleId: string;
141
+ ruleName: string;
142
+ severity: "critical" | "high" | "medium" | "low" | "minimal";
143
+ recommendation?: string | undefined;
144
+ context?: Record<string, unknown> | undefined;
145
+ }[];
146
+ warnings: string[];
147
+ appliedRules: string[];
148
+ requiresHumanApproval: boolean;
149
+ evaluatedAt: string;
150
+ metadata?: Record<string, unknown> | undefined;
151
+ approvalReason?: string | undefined;
152
+ rateLimitInfo?: {
153
+ limited: boolean;
154
+ remaining?: number | undefined;
155
+ resetAt?: string | undefined;
156
+ } | undefined;
157
+ claudeMdUpdate?: {
158
+ needed: boolean;
159
+ reason: string;
160
+ suggestedContent: string;
161
+ section: string;
162
+ } | undefined;
163
+ cached?: boolean | undefined;
164
+ }, {
165
+ status: "approved" | "denied" | "pending_approval" | "requires_review" | "rate_limited" | "escalated";
166
+ actionId: string;
167
+ riskScore: number;
168
+ riskLevel: "critical" | "high" | "medium" | "low" | "minimal";
169
+ allowed: boolean;
170
+ violations: {
171
+ message: string;
172
+ ruleId: string;
173
+ ruleName: string;
174
+ severity: "critical" | "high" | "medium" | "low" | "minimal";
175
+ recommendation?: string | undefined;
176
+ context?: Record<string, unknown> | undefined;
177
+ }[];
178
+ warnings: string[];
179
+ appliedRules: string[];
180
+ requiresHumanApproval: boolean;
181
+ evaluatedAt: string;
182
+ metadata?: Record<string, unknown> | undefined;
183
+ approvalReason?: string | undefined;
184
+ rateLimitInfo?: {
185
+ limited: boolean;
186
+ remaining?: number | undefined;
187
+ resetAt?: string | undefined;
188
+ } | undefined;
189
+ claudeMdUpdate?: {
190
+ needed: boolean;
191
+ reason: string;
192
+ suggestedContent: string;
193
+ section: string;
194
+ } | undefined;
195
+ cached?: boolean | undefined;
196
+ }>;
197
+ export type EvaluationResult = z.infer<typeof EvaluationResultSchema>;
198
+ export declare const BusinessRuleTypeSchema: z.ZodEnum<["compliance", "security", "operational", "financial", "ux", "architecture", "data_governance", "rate_limit", "custom"]>;
199
+ export type BusinessRuleType = z.infer<typeof BusinessRuleTypeSchema>;
200
+ export declare const RuleConditionOperatorSchema: z.ZodEnum<["equals", "not_equals", "contains", "not_contains", "greater_than", "less_than", "in", "not_in", "matches_regex", "exists", "not_exists", "custom"]>;
201
+ export type RuleConditionOperator = z.infer<typeof RuleConditionOperatorSchema>;
202
+ export declare const RuleConditionSchema: z.ZodObject<{
203
+ field: z.ZodString;
204
+ operator: z.ZodEnum<["equals", "not_equals", "contains", "not_contains", "greater_than", "less_than", "in", "not_in", "matches_regex", "exists", "not_exists", "custom"]>;
205
+ value: z.ZodUnknown;
206
+ customEvaluator: z.ZodOptional<z.ZodString>;
207
+ }, "strip", z.ZodTypeAny, {
208
+ field: string;
209
+ operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
210
+ value?: unknown;
211
+ customEvaluator?: string | undefined;
212
+ }, {
213
+ field: string;
214
+ operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
215
+ value?: unknown;
216
+ customEvaluator?: string | undefined;
217
+ }>;
218
+ export type RuleCondition = z.infer<typeof RuleConditionSchema>;
219
+ export declare const RuleActionTypeSchema: z.ZodEnum<["allow", "deny", "require_approval", "warn", "log", "rate_limit", "transform", "escalate", "notify"]>;
220
+ export type RuleActionType = z.infer<typeof RuleActionTypeSchema>;
221
+ export declare const RuleActionSchema: z.ZodObject<{
222
+ type: z.ZodEnum<["allow", "deny", "require_approval", "warn", "log", "rate_limit", "transform", "escalate", "notify"]>;
223
+ message: z.ZodOptional<z.ZodString>;
224
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
225
+ }, "strip", z.ZodTypeAny, {
226
+ type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
227
+ params?: Record<string, unknown> | undefined;
228
+ message?: string | undefined;
229
+ }, {
230
+ type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
231
+ params?: Record<string, unknown> | undefined;
232
+ message?: string | undefined;
233
+ }>;
234
+ export type RuleAction = z.infer<typeof RuleActionSchema>;
235
+ export declare const BusinessRuleSchema: z.ZodObject<{
236
+ id: z.ZodString;
237
+ name: z.ZodString;
238
+ description: z.ZodOptional<z.ZodString>;
239
+ type: z.ZodEnum<["compliance", "security", "operational", "financial", "ux", "architecture", "data_governance", "rate_limit", "custom"]>;
240
+ enabled: z.ZodDefault<z.ZodBoolean>;
241
+ priority: z.ZodDefault<z.ZodNumber>;
242
+ conditions: z.ZodArray<z.ZodObject<{
243
+ field: z.ZodString;
244
+ operator: z.ZodEnum<["equals", "not_equals", "contains", "not_contains", "greater_than", "less_than", "in", "not_in", "matches_regex", "exists", "not_exists", "custom"]>;
245
+ value: z.ZodUnknown;
246
+ customEvaluator: z.ZodOptional<z.ZodString>;
247
+ }, "strip", z.ZodTypeAny, {
248
+ field: string;
249
+ operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
250
+ value?: unknown;
251
+ customEvaluator?: string | undefined;
252
+ }, {
253
+ field: string;
254
+ operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
255
+ value?: unknown;
256
+ customEvaluator?: string | undefined;
257
+ }>, "many">;
258
+ conditionLogic: z.ZodDefault<z.ZodEnum<["all", "any"]>>;
259
+ actions: z.ZodArray<z.ZodObject<{
260
+ type: z.ZodEnum<["allow", "deny", "require_approval", "warn", "log", "rate_limit", "transform", "escalate", "notify"]>;
261
+ message: z.ZodOptional<z.ZodString>;
262
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
263
+ }, "strip", z.ZodTypeAny, {
264
+ type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
265
+ params?: Record<string, unknown> | undefined;
266
+ message?: string | undefined;
267
+ }, {
268
+ type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
269
+ params?: Record<string, unknown> | undefined;
270
+ message?: string | undefined;
271
+ }>, "many">;
272
+ riskWeight: z.ZodDefault<z.ZodNumber>;
273
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
274
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
275
+ version: z.ZodOptional<z.ZodString>;
276
+ deprecated: z.ZodOptional<z.ZodBoolean>;
277
+ deprecatedMessage: z.ZodOptional<z.ZodString>;
278
+ replacedBy: z.ZodOptional<z.ZodString>;
279
+ minVersion: z.ZodOptional<z.ZodString>;
280
+ dependsOn: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
281
+ conflictsWith: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
282
+ relatedRules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
283
+ }, "strip", z.ZodTypeAny, {
284
+ type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
285
+ id: string;
286
+ name: string;
287
+ enabled: boolean;
288
+ priority: number;
289
+ conditions: {
290
+ field: string;
291
+ operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
292
+ value?: unknown;
293
+ customEvaluator?: string | undefined;
294
+ }[];
295
+ conditionLogic: "all" | "any";
296
+ actions: {
297
+ type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
298
+ params?: Record<string, unknown> | undefined;
299
+ message?: string | undefined;
300
+ }[];
301
+ riskWeight: number;
302
+ description?: string | undefined;
303
+ metadata?: Record<string, unknown> | undefined;
304
+ tags?: string[] | undefined;
305
+ version?: string | undefined;
306
+ deprecated?: boolean | undefined;
307
+ deprecatedMessage?: string | undefined;
308
+ replacedBy?: string | undefined;
309
+ minVersion?: string | undefined;
310
+ dependsOn?: string[] | undefined;
311
+ conflictsWith?: string[] | undefined;
312
+ relatedRules?: string[] | undefined;
313
+ }, {
314
+ type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
315
+ id: string;
316
+ name: string;
317
+ conditions: {
318
+ field: string;
319
+ operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
320
+ value?: unknown;
321
+ customEvaluator?: string | undefined;
322
+ }[];
323
+ actions: {
324
+ type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
325
+ params?: Record<string, unknown> | undefined;
326
+ message?: string | undefined;
327
+ }[];
328
+ description?: string | undefined;
329
+ metadata?: Record<string, unknown> | undefined;
330
+ enabled?: boolean | undefined;
331
+ priority?: number | undefined;
332
+ conditionLogic?: "all" | "any" | undefined;
333
+ riskWeight?: number | undefined;
334
+ tags?: string[] | undefined;
335
+ version?: string | undefined;
336
+ deprecated?: boolean | undefined;
337
+ deprecatedMessage?: string | undefined;
338
+ replacedBy?: string | undefined;
339
+ minVersion?: string | undefined;
340
+ dependsOn?: string[] | undefined;
341
+ conflictsWith?: string[] | undefined;
342
+ relatedRules?: string[] | undefined;
343
+ }>;
344
+ export type BusinessRule = z.infer<typeof BusinessRuleSchema>;
345
+ export declare const RuleDependencyNodeSchema: z.ZodObject<{
346
+ ruleId: z.ZodString;
347
+ ruleName: z.ZodString;
348
+ dependencies: z.ZodArray<z.ZodString, "many">;
349
+ dependents: z.ZodArray<z.ZodString, "many">;
350
+ conflicts: z.ZodArray<z.ZodString, "many">;
351
+ related: z.ZodArray<z.ZodString, "many">;
352
+ depth: z.ZodNumber;
353
+ }, "strip", z.ZodTypeAny, {
354
+ ruleId: string;
355
+ ruleName: string;
356
+ dependencies: string[];
357
+ dependents: string[];
358
+ conflicts: string[];
359
+ related: string[];
360
+ depth: number;
361
+ }, {
362
+ ruleId: string;
363
+ ruleName: string;
364
+ dependencies: string[];
365
+ dependents: string[];
366
+ conflicts: string[];
367
+ related: string[];
368
+ depth: number;
369
+ }>;
370
+ export type RuleDependencyNode = z.infer<typeof RuleDependencyNodeSchema>;
371
+ export declare const RuleDependencyGraphSchema: z.ZodObject<{
372
+ nodes: z.ZodRecord<z.ZodString, z.ZodObject<{
373
+ ruleId: z.ZodString;
374
+ ruleName: z.ZodString;
375
+ dependencies: z.ZodArray<z.ZodString, "many">;
376
+ dependents: z.ZodArray<z.ZodString, "many">;
377
+ conflicts: z.ZodArray<z.ZodString, "many">;
378
+ related: z.ZodArray<z.ZodString, "many">;
379
+ depth: z.ZodNumber;
380
+ }, "strip", z.ZodTypeAny, {
381
+ ruleId: string;
382
+ ruleName: string;
383
+ dependencies: string[];
384
+ dependents: string[];
385
+ conflicts: string[];
386
+ related: string[];
387
+ depth: number;
388
+ }, {
389
+ ruleId: string;
390
+ ruleName: string;
391
+ dependencies: string[];
392
+ dependents: string[];
393
+ conflicts: string[];
394
+ related: string[];
395
+ depth: number;
396
+ }>>;
397
+ executionOrder: z.ZodArray<z.ZodString, "many">;
398
+ hasCircularDependencies: z.ZodBoolean;
399
+ circularPaths: z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">;
400
+ conflicts: z.ZodArray<z.ZodObject<{
401
+ ruleA: z.ZodString;
402
+ ruleB: z.ZodString;
403
+ reason: z.ZodOptional<z.ZodString>;
404
+ }, "strip", z.ZodTypeAny, {
405
+ ruleA: string;
406
+ ruleB: string;
407
+ reason?: string | undefined;
408
+ }, {
409
+ ruleA: string;
410
+ ruleB: string;
411
+ reason?: string | undefined;
412
+ }>, "many">;
413
+ orphanedDependencies: z.ZodArray<z.ZodObject<{
414
+ ruleId: z.ZodString;
415
+ missingDependency: z.ZodString;
416
+ }, "strip", z.ZodTypeAny, {
417
+ ruleId: string;
418
+ missingDependency: string;
419
+ }, {
420
+ ruleId: string;
421
+ missingDependency: string;
422
+ }>, "many">;
423
+ analyzedAt: z.ZodString;
424
+ }, "strip", z.ZodTypeAny, {
425
+ conflicts: {
426
+ ruleA: string;
427
+ ruleB: string;
428
+ reason?: string | undefined;
429
+ }[];
430
+ nodes: Record<string, {
431
+ ruleId: string;
432
+ ruleName: string;
433
+ dependencies: string[];
434
+ dependents: string[];
435
+ conflicts: string[];
436
+ related: string[];
437
+ depth: number;
438
+ }>;
439
+ executionOrder: string[];
440
+ hasCircularDependencies: boolean;
441
+ circularPaths: string[][];
442
+ orphanedDependencies: {
443
+ ruleId: string;
444
+ missingDependency: string;
445
+ }[];
446
+ analyzedAt: string;
447
+ }, {
448
+ conflicts: {
449
+ ruleA: string;
450
+ ruleB: string;
451
+ reason?: string | undefined;
452
+ }[];
453
+ nodes: Record<string, {
454
+ ruleId: string;
455
+ ruleName: string;
456
+ dependencies: string[];
457
+ dependents: string[];
458
+ conflicts: string[];
459
+ related: string[];
460
+ depth: number;
461
+ }>;
462
+ executionOrder: string[];
463
+ hasCircularDependencies: boolean;
464
+ circularPaths: string[][];
465
+ orphanedDependencies: {
466
+ ruleId: string;
467
+ missingDependency: string;
468
+ }[];
469
+ analyzedAt: string;
470
+ }>;
471
+ export type RuleDependencyGraph = z.infer<typeof RuleDependencyGraphSchema>;
472
+ export declare const DependencyValidationResultSchema: z.ZodObject<{
473
+ valid: z.ZodBoolean;
474
+ errors: z.ZodArray<z.ZodObject<{
475
+ type: z.ZodEnum<["missing_dependency", "circular_dependency", "self_dependency", "conflict"]>;
476
+ ruleId: z.ZodString;
477
+ message: z.ZodString;
478
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
479
+ }, "strip", z.ZodTypeAny, {
480
+ message: string;
481
+ type: "missing_dependency" | "circular_dependency" | "self_dependency" | "conflict";
482
+ ruleId: string;
483
+ details?: Record<string, unknown> | undefined;
484
+ }, {
485
+ message: string;
486
+ type: "missing_dependency" | "circular_dependency" | "self_dependency" | "conflict";
487
+ ruleId: string;
488
+ details?: Record<string, unknown> | undefined;
489
+ }>, "many">;
490
+ warnings: z.ZodArray<z.ZodObject<{
491
+ type: z.ZodEnum<["unused_dependency", "disabled_dependency", "deep_dependency_chain"]>;
492
+ ruleId: z.ZodString;
493
+ message: z.ZodString;
494
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
495
+ }, "strip", z.ZodTypeAny, {
496
+ message: string;
497
+ type: "unused_dependency" | "disabled_dependency" | "deep_dependency_chain";
498
+ ruleId: string;
499
+ details?: Record<string, unknown> | undefined;
500
+ }, {
501
+ message: string;
502
+ type: "unused_dependency" | "disabled_dependency" | "deep_dependency_chain";
503
+ ruleId: string;
504
+ details?: Record<string, unknown> | undefined;
505
+ }>, "many">;
506
+ validatedAt: z.ZodString;
507
+ }, "strip", z.ZodTypeAny, {
508
+ valid: boolean;
509
+ warnings: {
510
+ message: string;
511
+ type: "unused_dependency" | "disabled_dependency" | "deep_dependency_chain";
512
+ ruleId: string;
513
+ details?: Record<string, unknown> | undefined;
514
+ }[];
515
+ errors: {
516
+ message: string;
517
+ type: "missing_dependency" | "circular_dependency" | "self_dependency" | "conflict";
518
+ ruleId: string;
519
+ details?: Record<string, unknown> | undefined;
520
+ }[];
521
+ validatedAt: string;
522
+ }, {
523
+ valid: boolean;
524
+ warnings: {
525
+ message: string;
526
+ type: "unused_dependency" | "disabled_dependency" | "deep_dependency_chain";
527
+ ruleId: string;
528
+ details?: Record<string, unknown> | undefined;
529
+ }[];
530
+ errors: {
531
+ message: string;
532
+ type: "missing_dependency" | "circular_dependency" | "self_dependency" | "conflict";
533
+ ruleId: string;
534
+ details?: Record<string, unknown> | undefined;
535
+ }[];
536
+ validatedAt: string;
537
+ }>;
538
+ export type DependencyValidationResult = z.infer<typeof DependencyValidationResultSchema>;
539
+ export declare const BusinessContextSchema: z.ZodObject<{
540
+ environment: z.ZodOptional<z.ZodEnum<["development", "staging", "production"]>>;
541
+ agentId: z.ZodOptional<z.ZodString>;
542
+ agentType: z.ZodOptional<z.ZodString>;
543
+ userId: z.ZodOptional<z.ZodString>;
544
+ userRole: z.ZodOptional<z.ZodString>;
545
+ sessionId: z.ZodOptional<z.ZodString>;
546
+ organizationId: z.ZodOptional<z.ZodString>;
547
+ department: z.ZodOptional<z.ZodString>;
548
+ costCenter: z.ZodOptional<z.ZodString>;
549
+ dataClassification: z.ZodOptional<z.ZodEnum<["public", "internal", "confidential", "restricted"]>>;
550
+ complianceFrameworks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
551
+ customAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
552
+ }, "strip", z.ZodTypeAny, {
553
+ agentId?: string | undefined;
554
+ sessionId?: string | undefined;
555
+ environment?: "development" | "staging" | "production" | undefined;
556
+ agentType?: string | undefined;
557
+ userId?: string | undefined;
558
+ userRole?: string | undefined;
559
+ organizationId?: string | undefined;
560
+ department?: string | undefined;
561
+ costCenter?: string | undefined;
562
+ dataClassification?: "public" | "internal" | "confidential" | "restricted" | undefined;
563
+ complianceFrameworks?: string[] | undefined;
564
+ customAttributes?: Record<string, unknown> | undefined;
565
+ }, {
566
+ agentId?: string | undefined;
567
+ sessionId?: string | undefined;
568
+ environment?: "development" | "staging" | "production" | undefined;
569
+ agentType?: string | undefined;
570
+ userId?: string | undefined;
571
+ userRole?: string | undefined;
572
+ organizationId?: string | undefined;
573
+ department?: string | undefined;
574
+ costCenter?: string | undefined;
575
+ dataClassification?: "public" | "internal" | "confidential" | "restricted" | undefined;
576
+ complianceFrameworks?: string[] | undefined;
577
+ customAttributes?: Record<string, unknown> | undefined;
578
+ }>;
579
+ export type BusinessContext = z.infer<typeof BusinessContextSchema>;
580
+ export declare const BusinessRulesResultSchema: z.ZodObject<{
581
+ contextId: z.ZodString;
582
+ rulesApplied: z.ZodArray<z.ZodObject<{
583
+ ruleId: z.ZodString;
584
+ ruleName: z.ZodString;
585
+ matched: z.ZodBoolean;
586
+ actions: z.ZodArray<z.ZodObject<{
587
+ type: z.ZodEnum<["allow", "deny", "require_approval", "warn", "log", "rate_limit", "transform", "escalate", "notify"]>;
588
+ message: z.ZodOptional<z.ZodString>;
589
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
590
+ }, "strip", z.ZodTypeAny, {
591
+ type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
592
+ params?: Record<string, unknown> | undefined;
593
+ message?: string | undefined;
594
+ }, {
595
+ type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
596
+ params?: Record<string, unknown> | undefined;
597
+ message?: string | undefined;
598
+ }>, "many">;
599
+ }, "strip", z.ZodTypeAny, {
600
+ ruleId: string;
601
+ ruleName: string;
602
+ actions: {
603
+ type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
604
+ params?: Record<string, unknown> | undefined;
605
+ message?: string | undefined;
606
+ }[];
607
+ matched: boolean;
608
+ }, {
609
+ ruleId: string;
610
+ ruleName: string;
611
+ actions: {
612
+ type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
613
+ params?: Record<string, unknown> | undefined;
614
+ message?: string | undefined;
615
+ }[];
616
+ matched: boolean;
617
+ }>, "many">;
618
+ aggregateRiskScore: z.ZodNumber;
619
+ recommendations: z.ZodArray<z.ZodString, "many">;
620
+ constraints: z.ZodArray<z.ZodObject<{
621
+ type: z.ZodString;
622
+ description: z.ZodString;
623
+ enforced: z.ZodBoolean;
624
+ }, "strip", z.ZodTypeAny, {
625
+ type: string;
626
+ description: string;
627
+ enforced: boolean;
628
+ }, {
629
+ type: string;
630
+ description: string;
631
+ enforced: boolean;
632
+ }>, "many">;
633
+ processedAt: z.ZodString;
634
+ }, "strip", z.ZodTypeAny, {
635
+ contextId: string;
636
+ rulesApplied: {
637
+ ruleId: string;
638
+ ruleName: string;
639
+ actions: {
640
+ type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
641
+ params?: Record<string, unknown> | undefined;
642
+ message?: string | undefined;
643
+ }[];
644
+ matched: boolean;
645
+ }[];
646
+ aggregateRiskScore: number;
647
+ recommendations: string[];
648
+ constraints: {
649
+ type: string;
650
+ description: string;
651
+ enforced: boolean;
652
+ }[];
653
+ processedAt: string;
654
+ }, {
655
+ contextId: string;
656
+ rulesApplied: {
657
+ ruleId: string;
658
+ ruleName: string;
659
+ actions: {
660
+ type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
661
+ params?: Record<string, unknown> | undefined;
662
+ message?: string | undefined;
663
+ }[];
664
+ matched: boolean;
665
+ }[];
666
+ aggregateRiskScore: number;
667
+ recommendations: string[];
668
+ constraints: {
669
+ type: string;
670
+ description: string;
671
+ enforced: boolean;
672
+ }[];
673
+ processedAt: string;
674
+ }>;
675
+ export type BusinessRulesResult = z.infer<typeof BusinessRulesResultSchema>;
676
+ export declare const ApprovalPrioritySchema: z.ZodEnum<["urgent", "high", "normal", "low"]>;
677
+ export type ApprovalPriority = z.infer<typeof ApprovalPrioritySchema>;
678
+ export declare const ApprovalRequestSchema: z.ZodObject<{
679
+ requestId: z.ZodString;
680
+ actionId: z.ZodOptional<z.ZodString>;
681
+ reason: z.ZodString;
682
+ details: z.ZodOptional<z.ZodString>;
683
+ priority: z.ZodDefault<z.ZodEnum<["urgent", "high", "normal", "low"]>>;
684
+ requiredApprovers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
685
+ expiresAt: z.ZodOptional<z.ZodString>;
686
+ context: z.ZodOptional<z.ZodObject<{
687
+ environment: z.ZodOptional<z.ZodEnum<["development", "staging", "production"]>>;
688
+ agentId: z.ZodOptional<z.ZodString>;
689
+ agentType: z.ZodOptional<z.ZodString>;
690
+ userId: z.ZodOptional<z.ZodString>;
691
+ userRole: z.ZodOptional<z.ZodString>;
692
+ sessionId: z.ZodOptional<z.ZodString>;
693
+ organizationId: z.ZodOptional<z.ZodString>;
694
+ department: z.ZodOptional<z.ZodString>;
695
+ costCenter: z.ZodOptional<z.ZodString>;
696
+ dataClassification: z.ZodOptional<z.ZodEnum<["public", "internal", "confidential", "restricted"]>>;
697
+ complianceFrameworks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
698
+ customAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
699
+ }, "strip", z.ZodTypeAny, {
700
+ agentId?: string | undefined;
701
+ sessionId?: string | undefined;
702
+ environment?: "development" | "staging" | "production" | undefined;
703
+ agentType?: string | undefined;
704
+ userId?: string | undefined;
705
+ userRole?: string | undefined;
706
+ organizationId?: string | undefined;
707
+ department?: string | undefined;
708
+ costCenter?: string | undefined;
709
+ dataClassification?: "public" | "internal" | "confidential" | "restricted" | undefined;
710
+ complianceFrameworks?: string[] | undefined;
711
+ customAttributes?: Record<string, unknown> | undefined;
712
+ }, {
713
+ agentId?: string | undefined;
714
+ sessionId?: string | undefined;
715
+ environment?: "development" | "staging" | "production" | undefined;
716
+ agentType?: string | undefined;
717
+ userId?: string | undefined;
718
+ userRole?: string | undefined;
719
+ organizationId?: string | undefined;
720
+ department?: string | undefined;
721
+ costCenter?: string | undefined;
722
+ dataClassification?: "public" | "internal" | "confidential" | "restricted" | undefined;
723
+ complianceFrameworks?: string[] | undefined;
724
+ customAttributes?: Record<string, unknown> | undefined;
725
+ }>>;
726
+ riskScore: z.ZodOptional<z.ZodNumber>;
727
+ violations: z.ZodOptional<z.ZodArray<z.ZodObject<{
728
+ ruleId: z.ZodString;
729
+ ruleName: z.ZodString;
730
+ severity: z.ZodEnum<["critical", "high", "medium", "low", "minimal"]>;
731
+ message: z.ZodString;
732
+ recommendation: z.ZodOptional<z.ZodString>;
733
+ context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
734
+ }, "strip", z.ZodTypeAny, {
735
+ message: string;
736
+ ruleId: string;
737
+ ruleName: string;
738
+ severity: "critical" | "high" | "medium" | "low" | "minimal";
739
+ recommendation?: string | undefined;
740
+ context?: Record<string, unknown> | undefined;
741
+ }, {
742
+ message: string;
743
+ ruleId: string;
744
+ ruleName: string;
745
+ severity: "critical" | "high" | "medium" | "low" | "minimal";
746
+ recommendation?: string | undefined;
747
+ context?: Record<string, unknown> | undefined;
748
+ }>, "many">>;
749
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
750
+ createdAt: z.ZodString;
751
+ status: z.ZodDefault<z.ZodEnum<["pending", "approved", "denied", "expired", "cancelled"]>>;
752
+ }, "strip", z.ZodTypeAny, {
753
+ status: "approved" | "denied" | "pending" | "expired" | "cancelled";
754
+ reason: string;
755
+ priority: "high" | "low" | "urgent" | "normal";
756
+ requestId: string;
757
+ createdAt: string;
758
+ metadata?: Record<string, unknown> | undefined;
759
+ context?: {
760
+ agentId?: string | undefined;
761
+ sessionId?: string | undefined;
762
+ environment?: "development" | "staging" | "production" | undefined;
763
+ agentType?: string | undefined;
764
+ userId?: string | undefined;
765
+ userRole?: string | undefined;
766
+ organizationId?: string | undefined;
767
+ department?: string | undefined;
768
+ costCenter?: string | undefined;
769
+ dataClassification?: "public" | "internal" | "confidential" | "restricted" | undefined;
770
+ complianceFrameworks?: string[] | undefined;
771
+ customAttributes?: Record<string, unknown> | undefined;
772
+ } | undefined;
773
+ actionId?: string | undefined;
774
+ riskScore?: number | undefined;
775
+ violations?: {
776
+ message: string;
777
+ ruleId: string;
778
+ ruleName: string;
779
+ severity: "critical" | "high" | "medium" | "low" | "minimal";
780
+ recommendation?: string | undefined;
781
+ context?: Record<string, unknown> | undefined;
782
+ }[] | undefined;
783
+ details?: string | undefined;
784
+ requiredApprovers?: string[] | undefined;
785
+ expiresAt?: string | undefined;
786
+ }, {
787
+ reason: string;
788
+ requestId: string;
789
+ createdAt: string;
790
+ status?: "approved" | "denied" | "pending" | "expired" | "cancelled" | undefined;
791
+ metadata?: Record<string, unknown> | undefined;
792
+ context?: {
793
+ agentId?: string | undefined;
794
+ sessionId?: string | undefined;
795
+ environment?: "development" | "staging" | "production" | undefined;
796
+ agentType?: string | undefined;
797
+ userId?: string | undefined;
798
+ userRole?: string | undefined;
799
+ organizationId?: string | undefined;
800
+ department?: string | undefined;
801
+ costCenter?: string | undefined;
802
+ dataClassification?: "public" | "internal" | "confidential" | "restricted" | undefined;
803
+ complianceFrameworks?: string[] | undefined;
804
+ customAttributes?: Record<string, unknown> | undefined;
805
+ } | undefined;
806
+ actionId?: string | undefined;
807
+ riskScore?: number | undefined;
808
+ violations?: {
809
+ message: string;
810
+ ruleId: string;
811
+ ruleName: string;
812
+ severity: "critical" | "high" | "medium" | "low" | "minimal";
813
+ recommendation?: string | undefined;
814
+ context?: Record<string, unknown> | undefined;
815
+ }[] | undefined;
816
+ priority?: "high" | "low" | "urgent" | "normal" | undefined;
817
+ details?: string | undefined;
818
+ requiredApprovers?: string[] | undefined;
819
+ expiresAt?: string | undefined;
820
+ }>;
821
+ export type ApprovalRequest = z.infer<typeof ApprovalRequestSchema>;
822
+ export declare const AuditEventTypeSchema: z.ZodEnum<["action_evaluated", "action_approved", "action_denied", "action_executed", "rule_triggered", "approval_requested", "approval_granted", "approval_denied", "rate_limit_hit", "security_alert", "compliance_violation", "config_changed", "system_event", "custom"]>;
823
+ export type AuditEventType = z.infer<typeof AuditEventTypeSchema>;
824
+ export declare const AuditEventSchema: z.ZodObject<{
825
+ eventId: z.ZodString;
826
+ eventType: z.ZodEnum<["action_evaluated", "action_approved", "action_denied", "action_executed", "rule_triggered", "approval_requested", "approval_granted", "approval_denied", "rate_limit_hit", "security_alert", "compliance_violation", "config_changed", "system_event", "custom"]>;
827
+ action: z.ZodString;
828
+ timestamp: z.ZodString;
829
+ agentId: z.ZodOptional<z.ZodString>;
830
+ sessionId: z.ZodOptional<z.ZodString>;
831
+ userId: z.ZodOptional<z.ZodString>;
832
+ outcome: z.ZodEnum<["success", "failure", "pending"]>;
833
+ riskLevel: z.ZodOptional<z.ZodEnum<["critical", "high", "medium", "low", "minimal"]>>;
834
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
835
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
836
+ correlationId: z.ZodOptional<z.ZodString>;
837
+ parentEventId: z.ZodOptional<z.ZodString>;
838
+ }, "strip", z.ZodTypeAny, {
839
+ timestamp: string;
840
+ eventId: string;
841
+ eventType: "custom" | "action_evaluated" | "action_approved" | "action_denied" | "action_executed" | "rule_triggered" | "approval_requested" | "approval_granted" | "approval_denied" | "rate_limit_hit" | "security_alert" | "compliance_violation" | "config_changed" | "system_event";
842
+ action: string;
843
+ outcome: "pending" | "success" | "failure";
844
+ agentId?: string | undefined;
845
+ sessionId?: string | undefined;
846
+ metadata?: Record<string, unknown> | undefined;
847
+ riskLevel?: "critical" | "high" | "medium" | "low" | "minimal" | undefined;
848
+ details?: Record<string, unknown> | undefined;
849
+ userId?: string | undefined;
850
+ correlationId?: string | undefined;
851
+ parentEventId?: string | undefined;
852
+ }, {
853
+ timestamp: string;
854
+ eventId: string;
855
+ eventType: "custom" | "action_evaluated" | "action_approved" | "action_denied" | "action_executed" | "rule_triggered" | "approval_requested" | "approval_granted" | "approval_denied" | "rate_limit_hit" | "security_alert" | "compliance_violation" | "config_changed" | "system_event";
856
+ action: string;
857
+ outcome: "pending" | "success" | "failure";
858
+ agentId?: string | undefined;
859
+ sessionId?: string | undefined;
860
+ metadata?: Record<string, unknown> | undefined;
861
+ riskLevel?: "critical" | "high" | "medium" | "low" | "minimal" | undefined;
862
+ details?: Record<string, unknown> | undefined;
863
+ userId?: string | undefined;
864
+ correlationId?: string | undefined;
865
+ parentEventId?: string | undefined;
866
+ }>;
867
+ export type AuditEvent = z.infer<typeof AuditEventSchema>;
868
+ export declare const RateLimitConfigSchema: z.ZodObject<{
869
+ id: z.ZodString;
870
+ name: z.ZodString;
871
+ windowMs: z.ZodNumber;
872
+ maxRequests: z.ZodNumber;
873
+ scope: z.ZodEnum<["global", "agent", "session", "user", "action_type"]>;
874
+ actionCategories: z.ZodOptional<z.ZodArray<z.ZodEnum<["data_access", "data_modification", "external_api", "file_system", "code_execution", "network", "authentication", "authorization", "financial", "pii_access", "system_config", "user_communication", "resource_allocation", "custom"]>, "many">>;
875
+ burstLimit: z.ZodOptional<z.ZodNumber>;
876
+ enabled: z.ZodDefault<z.ZodBoolean>;
877
+ }, "strip", z.ZodTypeAny, {
878
+ id: string;
879
+ name: string;
880
+ enabled: boolean;
881
+ windowMs: number;
882
+ maxRequests: number;
883
+ scope: "global" | "agent" | "session" | "user" | "action_type";
884
+ actionCategories?: ("data_access" | "data_modification" | "external_api" | "file_system" | "code_execution" | "network" | "authentication" | "authorization" | "financial" | "pii_access" | "system_config" | "user_communication" | "resource_allocation" | "custom")[] | undefined;
885
+ burstLimit?: number | undefined;
886
+ }, {
887
+ id: string;
888
+ name: string;
889
+ windowMs: number;
890
+ maxRequests: number;
891
+ scope: "global" | "agent" | "session" | "user" | "action_type";
892
+ enabled?: boolean | undefined;
893
+ actionCategories?: ("data_access" | "data_modification" | "external_api" | "file_system" | "code_execution" | "network" | "authentication" | "authorization" | "financial" | "pii_access" | "system_config" | "user_communication" | "resource_allocation" | "custom")[] | undefined;
894
+ burstLimit?: number | undefined;
895
+ }>;
896
+ export type RateLimitConfig = z.infer<typeof RateLimitConfigSchema>;
897
+ export declare const RateLimitStateSchema: z.ZodObject<{
898
+ key: z.ZodString;
899
+ count: z.ZodNumber;
900
+ windowStart: z.ZodNumber;
901
+ remaining: z.ZodNumber;
902
+ resetAt: z.ZodString;
903
+ }, "strip", z.ZodTypeAny, {
904
+ remaining: number;
905
+ resetAt: string;
906
+ key: string;
907
+ count: number;
908
+ windowStart: number;
909
+ }, {
910
+ remaining: number;
911
+ resetAt: string;
912
+ key: string;
913
+ count: number;
914
+ windowStart: number;
915
+ }>;
916
+ export type RateLimitState = z.infer<typeof RateLimitStateSchema>;
917
+ export declare const SupervisorConfigSchema: z.ZodObject<{
918
+ version: z.ZodDefault<z.ZodString>;
919
+ name: z.ZodDefault<z.ZodString>;
920
+ environment: z.ZodDefault<z.ZodEnum<["development", "staging", "production"]>>;
921
+ strictMode: z.ZodDefault<z.ZodBoolean>;
922
+ defaultRiskThreshold: z.ZodDefault<z.ZodNumber>;
923
+ requireApprovalAboveRisk: z.ZodDefault<z.ZodNumber>;
924
+ features: z.ZodDefault<z.ZodObject<{
925
+ riskScoring: z.ZodDefault<z.ZodBoolean>;
926
+ rateLimiting: z.ZodDefault<z.ZodBoolean>;
927
+ auditLogging: z.ZodDefault<z.ZodBoolean>;
928
+ humanApproval: z.ZodDefault<z.ZodBoolean>;
929
+ complianceChecks: z.ZodDefault<z.ZodBoolean>;
930
+ uxValidation: z.ZodDefault<z.ZodBoolean>;
931
+ architectureValidation: z.ZodDefault<z.ZodBoolean>;
932
+ }, "strip", z.ZodTypeAny, {
933
+ riskScoring: boolean;
934
+ rateLimiting: boolean;
935
+ auditLogging: boolean;
936
+ humanApproval: boolean;
937
+ complianceChecks: boolean;
938
+ uxValidation: boolean;
939
+ architectureValidation: boolean;
940
+ }, {
941
+ riskScoring?: boolean | undefined;
942
+ rateLimiting?: boolean | undefined;
943
+ auditLogging?: boolean | undefined;
944
+ humanApproval?: boolean | undefined;
945
+ complianceChecks?: boolean | undefined;
946
+ uxValidation?: boolean | undefined;
947
+ architectureValidation?: boolean | undefined;
948
+ }>>;
949
+ rateLimits: z.ZodDefault<z.ZodArray<z.ZodObject<{
950
+ id: z.ZodString;
951
+ name: z.ZodString;
952
+ windowMs: z.ZodNumber;
953
+ maxRequests: z.ZodNumber;
954
+ scope: z.ZodEnum<["global", "agent", "session", "user", "action_type"]>;
955
+ actionCategories: z.ZodOptional<z.ZodArray<z.ZodEnum<["data_access", "data_modification", "external_api", "file_system", "code_execution", "network", "authentication", "authorization", "financial", "pii_access", "system_config", "user_communication", "resource_allocation", "custom"]>, "many">>;
956
+ burstLimit: z.ZodOptional<z.ZodNumber>;
957
+ enabled: z.ZodDefault<z.ZodBoolean>;
958
+ }, "strip", z.ZodTypeAny, {
959
+ id: string;
960
+ name: string;
961
+ enabled: boolean;
962
+ windowMs: number;
963
+ maxRequests: number;
964
+ scope: "global" | "agent" | "session" | "user" | "action_type";
965
+ actionCategories?: ("data_access" | "data_modification" | "external_api" | "file_system" | "code_execution" | "network" | "authentication" | "authorization" | "financial" | "pii_access" | "system_config" | "user_communication" | "resource_allocation" | "custom")[] | undefined;
966
+ burstLimit?: number | undefined;
967
+ }, {
968
+ id: string;
969
+ name: string;
970
+ windowMs: number;
971
+ maxRequests: number;
972
+ scope: "global" | "agent" | "session" | "user" | "action_type";
973
+ enabled?: boolean | undefined;
974
+ actionCategories?: ("data_access" | "data_modification" | "external_api" | "file_system" | "code_execution" | "network" | "authentication" | "authorization" | "financial" | "pii_access" | "system_config" | "user_communication" | "resource_allocation" | "custom")[] | undefined;
975
+ burstLimit?: number | undefined;
976
+ }>, "many">>;
977
+ rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
978
+ id: z.ZodString;
979
+ name: z.ZodString;
980
+ description: z.ZodOptional<z.ZodString>;
981
+ type: z.ZodEnum<["compliance", "security", "operational", "financial", "ux", "architecture", "data_governance", "rate_limit", "custom"]>;
982
+ enabled: z.ZodDefault<z.ZodBoolean>;
983
+ priority: z.ZodDefault<z.ZodNumber>;
984
+ conditions: z.ZodArray<z.ZodObject<{
985
+ field: z.ZodString;
986
+ operator: z.ZodEnum<["equals", "not_equals", "contains", "not_contains", "greater_than", "less_than", "in", "not_in", "matches_regex", "exists", "not_exists", "custom"]>;
987
+ value: z.ZodUnknown;
988
+ customEvaluator: z.ZodOptional<z.ZodString>;
989
+ }, "strip", z.ZodTypeAny, {
990
+ field: string;
991
+ operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
992
+ value?: unknown;
993
+ customEvaluator?: string | undefined;
994
+ }, {
995
+ field: string;
996
+ operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
997
+ value?: unknown;
998
+ customEvaluator?: string | undefined;
999
+ }>, "many">;
1000
+ conditionLogic: z.ZodDefault<z.ZodEnum<["all", "any"]>>;
1001
+ actions: z.ZodArray<z.ZodObject<{
1002
+ type: z.ZodEnum<["allow", "deny", "require_approval", "warn", "log", "rate_limit", "transform", "escalate", "notify"]>;
1003
+ message: z.ZodOptional<z.ZodString>;
1004
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1005
+ }, "strip", z.ZodTypeAny, {
1006
+ type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
1007
+ params?: Record<string, unknown> | undefined;
1008
+ message?: string | undefined;
1009
+ }, {
1010
+ type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
1011
+ params?: Record<string, unknown> | undefined;
1012
+ message?: string | undefined;
1013
+ }>, "many">;
1014
+ riskWeight: z.ZodDefault<z.ZodNumber>;
1015
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1016
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1017
+ version: z.ZodOptional<z.ZodString>;
1018
+ deprecated: z.ZodOptional<z.ZodBoolean>;
1019
+ deprecatedMessage: z.ZodOptional<z.ZodString>;
1020
+ replacedBy: z.ZodOptional<z.ZodString>;
1021
+ minVersion: z.ZodOptional<z.ZodString>;
1022
+ dependsOn: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1023
+ conflictsWith: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1024
+ relatedRules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1025
+ }, "strip", z.ZodTypeAny, {
1026
+ type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
1027
+ id: string;
1028
+ name: string;
1029
+ enabled: boolean;
1030
+ priority: number;
1031
+ conditions: {
1032
+ field: string;
1033
+ operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
1034
+ value?: unknown;
1035
+ customEvaluator?: string | undefined;
1036
+ }[];
1037
+ conditionLogic: "all" | "any";
1038
+ actions: {
1039
+ type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
1040
+ params?: Record<string, unknown> | undefined;
1041
+ message?: string | undefined;
1042
+ }[];
1043
+ riskWeight: number;
1044
+ description?: string | undefined;
1045
+ metadata?: Record<string, unknown> | undefined;
1046
+ tags?: string[] | undefined;
1047
+ version?: string | undefined;
1048
+ deprecated?: boolean | undefined;
1049
+ deprecatedMessage?: string | undefined;
1050
+ replacedBy?: string | undefined;
1051
+ minVersion?: string | undefined;
1052
+ dependsOn?: string[] | undefined;
1053
+ conflictsWith?: string[] | undefined;
1054
+ relatedRules?: string[] | undefined;
1055
+ }, {
1056
+ type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
1057
+ id: string;
1058
+ name: string;
1059
+ conditions: {
1060
+ field: string;
1061
+ operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
1062
+ value?: unknown;
1063
+ customEvaluator?: string | undefined;
1064
+ }[];
1065
+ actions: {
1066
+ type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
1067
+ params?: Record<string, unknown> | undefined;
1068
+ message?: string | undefined;
1069
+ }[];
1070
+ description?: string | undefined;
1071
+ metadata?: Record<string, unknown> | undefined;
1072
+ enabled?: boolean | undefined;
1073
+ priority?: number | undefined;
1074
+ conditionLogic?: "all" | "any" | undefined;
1075
+ riskWeight?: number | undefined;
1076
+ tags?: string[] | undefined;
1077
+ version?: string | undefined;
1078
+ deprecated?: boolean | undefined;
1079
+ deprecatedMessage?: string | undefined;
1080
+ replacedBy?: string | undefined;
1081
+ minVersion?: string | undefined;
1082
+ dependsOn?: string[] | undefined;
1083
+ conflictsWith?: string[] | undefined;
1084
+ relatedRules?: string[] | undefined;
1085
+ }>, "many">>;
1086
+ complianceFrameworks: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1087
+ notifications: z.ZodDefault<z.ZodObject<{
1088
+ enabled: z.ZodDefault<z.ZodBoolean>;
1089
+ webhookUrl: z.ZodOptional<z.ZodString>;
1090
+ alertOnRiskLevel: z.ZodDefault<z.ZodEnum<["critical", "high", "medium", "low", "minimal"]>>;
1091
+ }, "strip", z.ZodTypeAny, {
1092
+ enabled: boolean;
1093
+ alertOnRiskLevel: "critical" | "high" | "medium" | "low" | "minimal";
1094
+ webhookUrl?: string | undefined;
1095
+ }, {
1096
+ enabled?: boolean | undefined;
1097
+ webhookUrl?: string | undefined;
1098
+ alertOnRiskLevel?: "critical" | "high" | "medium" | "low" | "minimal" | undefined;
1099
+ }>>;
1100
+ }, "strip", z.ZodTypeAny, {
1101
+ name: string;
1102
+ version: string;
1103
+ environment: "development" | "staging" | "production";
1104
+ complianceFrameworks: string[];
1105
+ strictMode: boolean;
1106
+ defaultRiskThreshold: number;
1107
+ requireApprovalAboveRisk: number;
1108
+ features: {
1109
+ riskScoring: boolean;
1110
+ rateLimiting: boolean;
1111
+ auditLogging: boolean;
1112
+ humanApproval: boolean;
1113
+ complianceChecks: boolean;
1114
+ uxValidation: boolean;
1115
+ architectureValidation: boolean;
1116
+ };
1117
+ rateLimits: {
1118
+ id: string;
1119
+ name: string;
1120
+ enabled: boolean;
1121
+ windowMs: number;
1122
+ maxRequests: number;
1123
+ scope: "global" | "agent" | "session" | "user" | "action_type";
1124
+ actionCategories?: ("data_access" | "data_modification" | "external_api" | "file_system" | "code_execution" | "network" | "authentication" | "authorization" | "financial" | "pii_access" | "system_config" | "user_communication" | "resource_allocation" | "custom")[] | undefined;
1125
+ burstLimit?: number | undefined;
1126
+ }[];
1127
+ rules: {
1128
+ type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
1129
+ id: string;
1130
+ name: string;
1131
+ enabled: boolean;
1132
+ priority: number;
1133
+ conditions: {
1134
+ field: string;
1135
+ operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
1136
+ value?: unknown;
1137
+ customEvaluator?: string | undefined;
1138
+ }[];
1139
+ conditionLogic: "all" | "any";
1140
+ actions: {
1141
+ type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
1142
+ params?: Record<string, unknown> | undefined;
1143
+ message?: string | undefined;
1144
+ }[];
1145
+ riskWeight: number;
1146
+ description?: string | undefined;
1147
+ metadata?: Record<string, unknown> | undefined;
1148
+ tags?: string[] | undefined;
1149
+ version?: string | undefined;
1150
+ deprecated?: boolean | undefined;
1151
+ deprecatedMessage?: string | undefined;
1152
+ replacedBy?: string | undefined;
1153
+ minVersion?: string | undefined;
1154
+ dependsOn?: string[] | undefined;
1155
+ conflictsWith?: string[] | undefined;
1156
+ relatedRules?: string[] | undefined;
1157
+ }[];
1158
+ notifications: {
1159
+ enabled: boolean;
1160
+ alertOnRiskLevel: "critical" | "high" | "medium" | "low" | "minimal";
1161
+ webhookUrl?: string | undefined;
1162
+ };
1163
+ }, {
1164
+ name?: string | undefined;
1165
+ version?: string | undefined;
1166
+ environment?: "development" | "staging" | "production" | undefined;
1167
+ complianceFrameworks?: string[] | undefined;
1168
+ strictMode?: boolean | undefined;
1169
+ defaultRiskThreshold?: number | undefined;
1170
+ requireApprovalAboveRisk?: number | undefined;
1171
+ features?: {
1172
+ riskScoring?: boolean | undefined;
1173
+ rateLimiting?: boolean | undefined;
1174
+ auditLogging?: boolean | undefined;
1175
+ humanApproval?: boolean | undefined;
1176
+ complianceChecks?: boolean | undefined;
1177
+ uxValidation?: boolean | undefined;
1178
+ architectureValidation?: boolean | undefined;
1179
+ } | undefined;
1180
+ rateLimits?: {
1181
+ id: string;
1182
+ name: string;
1183
+ windowMs: number;
1184
+ maxRequests: number;
1185
+ scope: "global" | "agent" | "session" | "user" | "action_type";
1186
+ enabled?: boolean | undefined;
1187
+ actionCategories?: ("data_access" | "data_modification" | "external_api" | "file_system" | "code_execution" | "network" | "authentication" | "authorization" | "financial" | "pii_access" | "system_config" | "user_communication" | "resource_allocation" | "custom")[] | undefined;
1188
+ burstLimit?: number | undefined;
1189
+ }[] | undefined;
1190
+ rules?: {
1191
+ type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
1192
+ id: string;
1193
+ name: string;
1194
+ conditions: {
1195
+ field: string;
1196
+ operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
1197
+ value?: unknown;
1198
+ customEvaluator?: string | undefined;
1199
+ }[];
1200
+ actions: {
1201
+ type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
1202
+ params?: Record<string, unknown> | undefined;
1203
+ message?: string | undefined;
1204
+ }[];
1205
+ description?: string | undefined;
1206
+ metadata?: Record<string, unknown> | undefined;
1207
+ enabled?: boolean | undefined;
1208
+ priority?: number | undefined;
1209
+ conditionLogic?: "all" | "any" | undefined;
1210
+ riskWeight?: number | undefined;
1211
+ tags?: string[] | undefined;
1212
+ version?: string | undefined;
1213
+ deprecated?: boolean | undefined;
1214
+ deprecatedMessage?: string | undefined;
1215
+ replacedBy?: string | undefined;
1216
+ minVersion?: string | undefined;
1217
+ dependsOn?: string[] | undefined;
1218
+ conflictsWith?: string[] | undefined;
1219
+ relatedRules?: string[] | undefined;
1220
+ }[] | undefined;
1221
+ notifications?: {
1222
+ enabled?: boolean | undefined;
1223
+ webhookUrl?: string | undefined;
1224
+ alertOnRiskLevel?: "critical" | "high" | "medium" | "low" | "minimal" | undefined;
1225
+ } | undefined;
1226
+ }>;
1227
+ export type SupervisorConfig = z.infer<typeof SupervisorConfigSchema>;
1228
+ export declare const TaskPrioritySchema: z.ZodEnum<["critical", "high", "medium", "low"]>;
1229
+ export type TaskPriority = z.infer<typeof TaskPrioritySchema>;
1230
+ export declare const TaskStatusSchema: z.ZodEnum<["pending", "in_progress", "completed", "blocked", "cancelled"]>;
1231
+ export type TaskStatus = z.infer<typeof TaskStatusSchema>;
1232
+ export declare const ProjectTaskSchema: z.ZodObject<{
1233
+ id: z.ZodString;
1234
+ projectName: z.ZodString;
1235
+ title: z.ZodString;
1236
+ description: z.ZodOptional<z.ZodString>;
1237
+ status: z.ZodEnum<["pending", "in_progress", "completed", "blocked", "cancelled"]>;
1238
+ priority: z.ZodEnum<["critical", "high", "medium", "low"]>;
1239
+ labels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1240
+ assignee: z.ZodOptional<z.ZodString>;
1241
+ createdAt: z.ZodString;
1242
+ updatedAt: z.ZodOptional<z.ZodString>;
1243
+ completedAt: z.ZodOptional<z.ZodString>;
1244
+ dueDate: z.ZodOptional<z.ZodString>;
1245
+ estimatedHours: z.ZodOptional<z.ZodNumber>;
1246
+ url: z.ZodOptional<z.ZodString>;
1247
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1248
+ }, "strip", z.ZodTypeAny, {
1249
+ status: "pending" | "cancelled" | "in_progress" | "completed" | "blocked";
1250
+ id: string;
1251
+ priority: "critical" | "high" | "medium" | "low";
1252
+ createdAt: string;
1253
+ projectName: string;
1254
+ title: string;
1255
+ description?: string | undefined;
1256
+ metadata?: Record<string, unknown> | undefined;
1257
+ labels?: string[] | undefined;
1258
+ assignee?: string | undefined;
1259
+ updatedAt?: string | undefined;
1260
+ completedAt?: string | undefined;
1261
+ dueDate?: string | undefined;
1262
+ estimatedHours?: number | undefined;
1263
+ url?: string | undefined;
1264
+ }, {
1265
+ status: "pending" | "cancelled" | "in_progress" | "completed" | "blocked";
1266
+ id: string;
1267
+ priority: "critical" | "high" | "medium" | "low";
1268
+ createdAt: string;
1269
+ projectName: string;
1270
+ title: string;
1271
+ description?: string | undefined;
1272
+ metadata?: Record<string, unknown> | undefined;
1273
+ labels?: string[] | undefined;
1274
+ assignee?: string | undefined;
1275
+ updatedAt?: string | undefined;
1276
+ completedAt?: string | undefined;
1277
+ dueDate?: string | undefined;
1278
+ estimatedHours?: number | undefined;
1279
+ url?: string | undefined;
1280
+ }>;
1281
+ export type ProjectTask = z.infer<typeof ProjectTaskSchema>;
1282
+ //# sourceMappingURL=index.d.ts.map