@trentapps/manager-protocol 1.1.1

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