@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.
- package/LICENSE +21 -0
- package/README.md +446 -0
- package/dist/analyzers/ArchitectureDetector.d.ts +44 -0
- package/dist/analyzers/ArchitectureDetector.d.ts.map +1 -0
- package/dist/analyzers/ArchitectureDetector.js +218 -0
- package/dist/analyzers/ArchitectureDetector.js.map +1 -0
- package/dist/analyzers/CSSAnalyzer.d.ts +104 -0
- package/dist/analyzers/CSSAnalyzer.d.ts.map +1 -0
- package/dist/analyzers/CSSAnalyzer.js +578 -0
- package/dist/analyzers/CSSAnalyzer.js.map +1 -0
- package/dist/analyzers/index.d.ts +5 -0
- package/dist/analyzers/index.d.ts.map +1 -0
- package/dist/analyzers/index.js +5 -0
- package/dist/analyzers/index.js.map +1 -0
- package/dist/cli.d.ts +8 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +174 -0
- package/dist/cli.js.map +1 -0
- package/dist/design-system/index.d.ts +6 -0
- package/dist/design-system/index.d.ts.map +1 -0
- package/dist/design-system/index.js +6 -0
- package/dist/design-system/index.js.map +1 -0
- package/dist/design-system/tokens.d.ts +106 -0
- package/dist/design-system/tokens.d.ts.map +1 -0
- package/dist/design-system/tokens.js +554 -0
- package/dist/design-system/tokens.js.map +1 -0
- package/dist/engine/AppMonitor.d.ts +162 -0
- package/dist/engine/AppMonitor.d.ts.map +1 -0
- package/dist/engine/AppMonitor.js +754 -0
- package/dist/engine/AppMonitor.js.map +1 -0
- package/dist/engine/AuditLogger.d.ts +138 -0
- package/dist/engine/AuditLogger.d.ts.map +1 -0
- package/dist/engine/AuditLogger.js +448 -0
- package/dist/engine/AuditLogger.js.map +1 -0
- package/dist/engine/GitHubApprovalManager.d.ts +106 -0
- package/dist/engine/GitHubApprovalManager.d.ts.map +1 -0
- package/dist/engine/GitHubApprovalManager.js +315 -0
- package/dist/engine/GitHubApprovalManager.js.map +1 -0
- package/dist/engine/RateLimiter.d.ts +79 -0
- package/dist/engine/RateLimiter.d.ts.map +1 -0
- package/dist/engine/RateLimiter.js +232 -0
- package/dist/engine/RateLimiter.js.map +1 -0
- package/dist/engine/RulesEngine.d.ts +77 -0
- package/dist/engine/RulesEngine.d.ts.map +1 -0
- package/dist/engine/RulesEngine.js +400 -0
- package/dist/engine/RulesEngine.js.map +1 -0
- package/dist/engine/TaskManager.d.ts +173 -0
- package/dist/engine/TaskManager.d.ts.map +1 -0
- package/dist/engine/TaskManager.js +678 -0
- package/dist/engine/TaskManager.js.map +1 -0
- package/dist/engine/index.d.ts +9 -0
- package/dist/engine/index.d.ts.map +1 -0
- package/dist/engine/index.js +9 -0
- package/dist/engine/index.js.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +29 -0
- package/dist/index.js.map +1 -0
- package/dist/rules/architecture.d.ts +9 -0
- package/dist/rules/architecture.d.ts.map +1 -0
- package/dist/rules/architecture.js +322 -0
- package/dist/rules/architecture.js.map +1 -0
- package/dist/rules/azure.d.ts +7 -0
- package/dist/rules/azure.d.ts.map +1 -0
- package/dist/rules/azure.js +138 -0
- package/dist/rules/azure.js.map +1 -0
- package/dist/rules/compliance.d.ts +9 -0
- package/dist/rules/compliance.d.ts.map +1 -0
- package/dist/rules/compliance.js +304 -0
- package/dist/rules/compliance.js.map +1 -0
- package/dist/rules/css.d.ts +10 -0
- package/dist/rules/css.d.ts.map +1 -0
- package/dist/rules/css.js +1239 -0
- package/dist/rules/css.js.map +1 -0
- package/dist/rules/flask.d.ts +7 -0
- package/dist/rules/flask.d.ts.map +1 -0
- package/dist/rules/flask.js +155 -0
- package/dist/rules/flask.js.map +1 -0
- package/dist/rules/index.d.ts +607 -0
- package/dist/rules/index.d.ts.map +1 -0
- package/dist/rules/index.js +401 -0
- package/dist/rules/index.js.map +1 -0
- package/dist/rules/ml-ai.d.ts +7 -0
- package/dist/rules/ml-ai.d.ts.map +1 -0
- package/dist/rules/ml-ai.js +150 -0
- package/dist/rules/ml-ai.js.map +1 -0
- package/dist/rules/operational.d.ts +9 -0
- package/dist/rules/operational.d.ts.map +1 -0
- package/dist/rules/operational.js +318 -0
- package/dist/rules/operational.js.map +1 -0
- package/dist/rules/security.d.ts +9 -0
- package/dist/rules/security.d.ts.map +1 -0
- package/dist/rules/security.js +287 -0
- package/dist/rules/security.js.map +1 -0
- package/dist/rules/storage.d.ts +7 -0
- package/dist/rules/storage.d.ts.map +1 -0
- package/dist/rules/storage.js +134 -0
- package/dist/rules/storage.js.map +1 -0
- package/dist/rules/stripe.d.ts +7 -0
- package/dist/rules/stripe.d.ts.map +1 -0
- package/dist/rules/stripe.js +140 -0
- package/dist/rules/stripe.js.map +1 -0
- package/dist/rules/testing.d.ts +7 -0
- package/dist/rules/testing.d.ts.map +1 -0
- package/dist/rules/testing.js +135 -0
- package/dist/rules/testing.js.map +1 -0
- package/dist/rules/ux.d.ts +9 -0
- package/dist/rules/ux.d.ts.map +1 -0
- package/dist/rules/ux.js +280 -0
- package/dist/rules/ux.js.map +1 -0
- package/dist/rules/websocket.d.ts +7 -0
- package/dist/rules/websocket.d.ts.map +1 -0
- package/dist/rules/websocket.js +136 -0
- package/dist/rules/websocket.js.map +1 -0
- package/dist/server.d.ts +49 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +2330 -0
- package/dist/server.js.map +1 -0
- package/dist/supervisor/AgentSupervisor.d.ts +235 -0
- package/dist/supervisor/AgentSupervisor.d.ts.map +1 -0
- package/dist/supervisor/AgentSupervisor.js +596 -0
- package/dist/supervisor/AgentSupervisor.js.map +1 -0
- package/dist/supervisor/ManagedServerRegistry.d.ts +48 -0
- package/dist/supervisor/ManagedServerRegistry.d.ts.map +1 -0
- package/dist/supervisor/ManagedServerRegistry.js +145 -0
- package/dist/supervisor/ManagedServerRegistry.js.map +1 -0
- package/dist/supervisor/ProjectTracker.d.ts +188 -0
- package/dist/supervisor/ProjectTracker.d.ts.map +1 -0
- package/dist/supervisor/ProjectTracker.js +617 -0
- package/dist/supervisor/ProjectTracker.js.map +1 -0
- package/dist/supervisor/index.d.ts +6 -0
- package/dist/supervisor/index.d.ts.map +1 -0
- package/dist/supervisor/index.js +6 -0
- package/dist/supervisor/index.js.map +1 -0
- package/dist/types/index.d.ts +1176 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +391 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/errors.d.ts +86 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +171 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +5 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/shell.d.ts +22 -0
- package/dist/utils/shell.d.ts.map +1 -0
- package/dist/utils/shell.js +29 -0
- package/dist/utils/shell.js.map +1 -0
- package/package.json +63 -0
|
@@ -0,0 +1,607 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enterprise Agent Supervisor - Built-in Rules
|
|
3
|
+
*
|
|
4
|
+
* Collection of pre-defined rules for common governance scenarios.
|
|
5
|
+
*/
|
|
6
|
+
import type { BusinessRule, RateLimitConfig } from '../types/index.js';
|
|
7
|
+
export { securityRules } from './security.js';
|
|
8
|
+
export { complianceRules } from './compliance.js';
|
|
9
|
+
export { uxRules } from './ux.js';
|
|
10
|
+
export { architectureRules } from './architecture.js';
|
|
11
|
+
export { operationalRules } from './operational.js';
|
|
12
|
+
export { cssRules } from './css.js';
|
|
13
|
+
export { flaskRules } from './flask.js';
|
|
14
|
+
export { mlAiRules } from './ml-ai.js';
|
|
15
|
+
export { storageRules } from './storage.js';
|
|
16
|
+
export { stripeRules } from './stripe.js';
|
|
17
|
+
export { testingRules } from './testing.js';
|
|
18
|
+
export { azureRules } from './azure.js';
|
|
19
|
+
export { websocketRules } from './websocket.js';
|
|
20
|
+
/**
|
|
21
|
+
* All built-in rules combined
|
|
22
|
+
*/
|
|
23
|
+
export declare const allBuiltInRules: BusinessRule[];
|
|
24
|
+
/**
|
|
25
|
+
* Get rules by type
|
|
26
|
+
*/
|
|
27
|
+
export declare function getRulesByType(type: BusinessRule['type']): BusinessRule[];
|
|
28
|
+
/**
|
|
29
|
+
* Get rules by tags
|
|
30
|
+
*/
|
|
31
|
+
export declare function getRulesByTags(tags: string[]): BusinessRule[];
|
|
32
|
+
/**
|
|
33
|
+
* Get rules for specific compliance frameworks
|
|
34
|
+
*/
|
|
35
|
+
export declare function getRulesForCompliance(framework: string): BusinessRule[];
|
|
36
|
+
/**
|
|
37
|
+
* Default rate limit configurations
|
|
38
|
+
*/
|
|
39
|
+
export declare const defaultRateLimits: RateLimitConfig[];
|
|
40
|
+
/**
|
|
41
|
+
* Rule presets for quick configuration
|
|
42
|
+
*/
|
|
43
|
+
export declare const rulePresets: {
|
|
44
|
+
/**
|
|
45
|
+
* Minimal - Basic security and logging
|
|
46
|
+
*/
|
|
47
|
+
minimal: {
|
|
48
|
+
rules: {
|
|
49
|
+
type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
|
|
50
|
+
id: string;
|
|
51
|
+
name: string;
|
|
52
|
+
enabled: boolean;
|
|
53
|
+
priority: number;
|
|
54
|
+
conditions: {
|
|
55
|
+
field: string;
|
|
56
|
+
operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
|
|
57
|
+
value?: unknown;
|
|
58
|
+
customEvaluator?: string | undefined;
|
|
59
|
+
}[];
|
|
60
|
+
conditionLogic: "all" | "any";
|
|
61
|
+
actions: {
|
|
62
|
+
type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
|
|
63
|
+
params?: Record<string, unknown> | undefined;
|
|
64
|
+
message?: string | undefined;
|
|
65
|
+
}[];
|
|
66
|
+
riskWeight: number;
|
|
67
|
+
description?: string | undefined;
|
|
68
|
+
metadata?: Record<string, unknown> | undefined;
|
|
69
|
+
tags?: string[] | undefined;
|
|
70
|
+
}[];
|
|
71
|
+
rateLimits: {
|
|
72
|
+
id: string;
|
|
73
|
+
name: string;
|
|
74
|
+
enabled: boolean;
|
|
75
|
+
windowMs: number;
|
|
76
|
+
maxRequests: number;
|
|
77
|
+
scope: "global" | "agent" | "session" | "user" | "action_type";
|
|
78
|
+
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;
|
|
79
|
+
burstLimit?: number | undefined;
|
|
80
|
+
}[];
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Standard - Balanced security and operations
|
|
84
|
+
*/
|
|
85
|
+
standard: {
|
|
86
|
+
rules: {
|
|
87
|
+
type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
|
|
88
|
+
id: string;
|
|
89
|
+
name: string;
|
|
90
|
+
enabled: boolean;
|
|
91
|
+
priority: number;
|
|
92
|
+
conditions: {
|
|
93
|
+
field: string;
|
|
94
|
+
operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
|
|
95
|
+
value?: unknown;
|
|
96
|
+
customEvaluator?: string | undefined;
|
|
97
|
+
}[];
|
|
98
|
+
conditionLogic: "all" | "any";
|
|
99
|
+
actions: {
|
|
100
|
+
type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
|
|
101
|
+
params?: Record<string, unknown> | undefined;
|
|
102
|
+
message?: string | undefined;
|
|
103
|
+
}[];
|
|
104
|
+
riskWeight: number;
|
|
105
|
+
description?: string | undefined;
|
|
106
|
+
metadata?: Record<string, unknown> | undefined;
|
|
107
|
+
tags?: string[] | undefined;
|
|
108
|
+
}[];
|
|
109
|
+
rateLimits: {
|
|
110
|
+
id: string;
|
|
111
|
+
name: string;
|
|
112
|
+
enabled: boolean;
|
|
113
|
+
windowMs: number;
|
|
114
|
+
maxRequests: number;
|
|
115
|
+
scope: "global" | "agent" | "session" | "user" | "action_type";
|
|
116
|
+
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;
|
|
117
|
+
burstLimit?: number | undefined;
|
|
118
|
+
}[];
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* Strict - Full compliance and governance
|
|
122
|
+
*/
|
|
123
|
+
strict: {
|
|
124
|
+
rules: {
|
|
125
|
+
type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
|
|
126
|
+
id: string;
|
|
127
|
+
name: string;
|
|
128
|
+
enabled: boolean;
|
|
129
|
+
priority: number;
|
|
130
|
+
conditions: {
|
|
131
|
+
field: string;
|
|
132
|
+
operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
|
|
133
|
+
value?: unknown;
|
|
134
|
+
customEvaluator?: string | undefined;
|
|
135
|
+
}[];
|
|
136
|
+
conditionLogic: "all" | "any";
|
|
137
|
+
actions: {
|
|
138
|
+
type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
|
|
139
|
+
params?: Record<string, unknown> | undefined;
|
|
140
|
+
message?: string | undefined;
|
|
141
|
+
}[];
|
|
142
|
+
riskWeight: number;
|
|
143
|
+
description?: string | undefined;
|
|
144
|
+
metadata?: Record<string, unknown> | undefined;
|
|
145
|
+
tags?: string[] | undefined;
|
|
146
|
+
}[];
|
|
147
|
+
rateLimits: {
|
|
148
|
+
id: string;
|
|
149
|
+
name: string;
|
|
150
|
+
enabled: boolean;
|
|
151
|
+
windowMs: number;
|
|
152
|
+
maxRequests: number;
|
|
153
|
+
scope: "global" | "agent" | "session" | "user" | "action_type";
|
|
154
|
+
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;
|
|
155
|
+
burstLimit?: number | undefined;
|
|
156
|
+
}[];
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* Financial - For financial services
|
|
160
|
+
*/
|
|
161
|
+
financial: {
|
|
162
|
+
rules: {
|
|
163
|
+
type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
|
|
164
|
+
id: string;
|
|
165
|
+
name: string;
|
|
166
|
+
enabled: boolean;
|
|
167
|
+
priority: number;
|
|
168
|
+
conditions: {
|
|
169
|
+
field: string;
|
|
170
|
+
operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
|
|
171
|
+
value?: unknown;
|
|
172
|
+
customEvaluator?: string | undefined;
|
|
173
|
+
}[];
|
|
174
|
+
conditionLogic: "all" | "any";
|
|
175
|
+
actions: {
|
|
176
|
+
type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
|
|
177
|
+
params?: Record<string, unknown> | undefined;
|
|
178
|
+
message?: string | undefined;
|
|
179
|
+
}[];
|
|
180
|
+
riskWeight: number;
|
|
181
|
+
description?: string | undefined;
|
|
182
|
+
metadata?: Record<string, unknown> | undefined;
|
|
183
|
+
tags?: string[] | undefined;
|
|
184
|
+
}[];
|
|
185
|
+
rateLimits: {
|
|
186
|
+
id: string;
|
|
187
|
+
name: string;
|
|
188
|
+
enabled: boolean;
|
|
189
|
+
windowMs: number;
|
|
190
|
+
maxRequests: number;
|
|
191
|
+
scope: "global" | "agent" | "session" | "user" | "action_type";
|
|
192
|
+
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;
|
|
193
|
+
burstLimit?: number | undefined;
|
|
194
|
+
}[];
|
|
195
|
+
};
|
|
196
|
+
/**
|
|
197
|
+
* Healthcare - For healthcare applications
|
|
198
|
+
*/
|
|
199
|
+
healthcare: {
|
|
200
|
+
rules: {
|
|
201
|
+
type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
|
|
202
|
+
id: string;
|
|
203
|
+
name: string;
|
|
204
|
+
enabled: boolean;
|
|
205
|
+
priority: number;
|
|
206
|
+
conditions: {
|
|
207
|
+
field: string;
|
|
208
|
+
operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
|
|
209
|
+
value?: unknown;
|
|
210
|
+
customEvaluator?: string | undefined;
|
|
211
|
+
}[];
|
|
212
|
+
conditionLogic: "all" | "any";
|
|
213
|
+
actions: {
|
|
214
|
+
type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
|
|
215
|
+
params?: Record<string, unknown> | undefined;
|
|
216
|
+
message?: string | undefined;
|
|
217
|
+
}[];
|
|
218
|
+
riskWeight: number;
|
|
219
|
+
description?: string | undefined;
|
|
220
|
+
metadata?: Record<string, unknown> | undefined;
|
|
221
|
+
tags?: string[] | undefined;
|
|
222
|
+
}[];
|
|
223
|
+
rateLimits: {
|
|
224
|
+
id: string;
|
|
225
|
+
name: string;
|
|
226
|
+
enabled: boolean;
|
|
227
|
+
windowMs: number;
|
|
228
|
+
maxRequests: number;
|
|
229
|
+
scope: "global" | "agent" | "session" | "user" | "action_type";
|
|
230
|
+
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;
|
|
231
|
+
burstLimit?: number | undefined;
|
|
232
|
+
}[];
|
|
233
|
+
};
|
|
234
|
+
/**
|
|
235
|
+
* Development - Relaxed rules for dev environment
|
|
236
|
+
*/
|
|
237
|
+
development: {
|
|
238
|
+
rules: {
|
|
239
|
+
actions: {
|
|
240
|
+
type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
|
|
241
|
+
params?: Record<string, unknown> | undefined;
|
|
242
|
+
message?: string | undefined;
|
|
243
|
+
}[];
|
|
244
|
+
type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
|
|
245
|
+
id: string;
|
|
246
|
+
name: string;
|
|
247
|
+
enabled: boolean;
|
|
248
|
+
priority: number;
|
|
249
|
+
conditions: {
|
|
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
|
+
}[];
|
|
255
|
+
conditionLogic: "all" | "any";
|
|
256
|
+
riskWeight: number;
|
|
257
|
+
description?: string | undefined;
|
|
258
|
+
metadata?: Record<string, unknown> | undefined;
|
|
259
|
+
tags?: string[] | undefined;
|
|
260
|
+
}[];
|
|
261
|
+
rateLimits: never[];
|
|
262
|
+
};
|
|
263
|
+
/**
|
|
264
|
+
* Frontend - Optimized for frontend development with CSS governance
|
|
265
|
+
*/
|
|
266
|
+
frontend: {
|
|
267
|
+
rules: {
|
|
268
|
+
type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
|
|
269
|
+
id: string;
|
|
270
|
+
name: string;
|
|
271
|
+
enabled: boolean;
|
|
272
|
+
priority: number;
|
|
273
|
+
conditions: {
|
|
274
|
+
field: string;
|
|
275
|
+
operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
|
|
276
|
+
value?: unknown;
|
|
277
|
+
customEvaluator?: string | undefined;
|
|
278
|
+
}[];
|
|
279
|
+
conditionLogic: "all" | "any";
|
|
280
|
+
actions: {
|
|
281
|
+
type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
|
|
282
|
+
params?: Record<string, unknown> | undefined;
|
|
283
|
+
message?: string | undefined;
|
|
284
|
+
}[];
|
|
285
|
+
riskWeight: number;
|
|
286
|
+
description?: string | undefined;
|
|
287
|
+
metadata?: Record<string, unknown> | undefined;
|
|
288
|
+
tags?: string[] | undefined;
|
|
289
|
+
}[];
|
|
290
|
+
rateLimits: {
|
|
291
|
+
id: string;
|
|
292
|
+
name: string;
|
|
293
|
+
enabled: boolean;
|
|
294
|
+
windowMs: number;
|
|
295
|
+
maxRequests: number;
|
|
296
|
+
scope: "global" | "agent" | "session" | "user" | "action_type";
|
|
297
|
+
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;
|
|
298
|
+
burstLimit?: number | undefined;
|
|
299
|
+
}[];
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
/**
|
|
303
|
+
* Get CSS-specific rules
|
|
304
|
+
*/
|
|
305
|
+
export declare function getCSSRules(): BusinessRule[];
|
|
306
|
+
/**
|
|
307
|
+
* Get rules for frontend development
|
|
308
|
+
*/
|
|
309
|
+
export declare function getFrontendRules(): BusinessRule[];
|
|
310
|
+
/**
|
|
311
|
+
* Project Profiles - Technology-specific rule collections
|
|
312
|
+
* Use these to filter rules by project tech stack
|
|
313
|
+
*/
|
|
314
|
+
export declare const projectProfiles: {
|
|
315
|
+
/**
|
|
316
|
+
* Flask - Python Flask web applications
|
|
317
|
+
*/
|
|
318
|
+
flask: {
|
|
319
|
+
name: string;
|
|
320
|
+
rules: {
|
|
321
|
+
type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
|
|
322
|
+
id: string;
|
|
323
|
+
name: string;
|
|
324
|
+
enabled: boolean;
|
|
325
|
+
priority: number;
|
|
326
|
+
conditions: {
|
|
327
|
+
field: string;
|
|
328
|
+
operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
|
|
329
|
+
value?: unknown;
|
|
330
|
+
customEvaluator?: string | undefined;
|
|
331
|
+
}[];
|
|
332
|
+
conditionLogic: "all" | "any";
|
|
333
|
+
actions: {
|
|
334
|
+
type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
|
|
335
|
+
params?: Record<string, unknown> | undefined;
|
|
336
|
+
message?: string | undefined;
|
|
337
|
+
}[];
|
|
338
|
+
riskWeight: number;
|
|
339
|
+
description?: string | undefined;
|
|
340
|
+
metadata?: Record<string, unknown> | undefined;
|
|
341
|
+
tags?: string[] | undefined;
|
|
342
|
+
}[];
|
|
343
|
+
description: string;
|
|
344
|
+
};
|
|
345
|
+
/**
|
|
346
|
+
* Azure .NET - Azure Functions + Cosmos DB
|
|
347
|
+
*/
|
|
348
|
+
'dotnet-azure': {
|
|
349
|
+
name: string;
|
|
350
|
+
rules: {
|
|
351
|
+
type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
|
|
352
|
+
id: string;
|
|
353
|
+
name: string;
|
|
354
|
+
enabled: boolean;
|
|
355
|
+
priority: number;
|
|
356
|
+
conditions: {
|
|
357
|
+
field: string;
|
|
358
|
+
operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
|
|
359
|
+
value?: unknown;
|
|
360
|
+
customEvaluator?: string | undefined;
|
|
361
|
+
}[];
|
|
362
|
+
conditionLogic: "all" | "any";
|
|
363
|
+
actions: {
|
|
364
|
+
type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
|
|
365
|
+
params?: Record<string, unknown> | undefined;
|
|
366
|
+
message?: string | undefined;
|
|
367
|
+
}[];
|
|
368
|
+
riskWeight: number;
|
|
369
|
+
description?: string | undefined;
|
|
370
|
+
metadata?: Record<string, unknown> | undefined;
|
|
371
|
+
tags?: string[] | undefined;
|
|
372
|
+
}[];
|
|
373
|
+
description: string;
|
|
374
|
+
};
|
|
375
|
+
/**
|
|
376
|
+
* React/Frontend - Browser-based applications
|
|
377
|
+
*/
|
|
378
|
+
react: {
|
|
379
|
+
name: string;
|
|
380
|
+
rules: {
|
|
381
|
+
type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
|
|
382
|
+
id: string;
|
|
383
|
+
name: string;
|
|
384
|
+
enabled: boolean;
|
|
385
|
+
priority: number;
|
|
386
|
+
conditions: {
|
|
387
|
+
field: string;
|
|
388
|
+
operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
|
|
389
|
+
value?: unknown;
|
|
390
|
+
customEvaluator?: string | undefined;
|
|
391
|
+
}[];
|
|
392
|
+
conditionLogic: "all" | "any";
|
|
393
|
+
actions: {
|
|
394
|
+
type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
|
|
395
|
+
params?: Record<string, unknown> | undefined;
|
|
396
|
+
message?: string | undefined;
|
|
397
|
+
}[];
|
|
398
|
+
riskWeight: number;
|
|
399
|
+
description?: string | undefined;
|
|
400
|
+
metadata?: Record<string, unknown> | undefined;
|
|
401
|
+
tags?: string[] | undefined;
|
|
402
|
+
}[];
|
|
403
|
+
description: string;
|
|
404
|
+
};
|
|
405
|
+
/**
|
|
406
|
+
* Playwright - E2E testing
|
|
407
|
+
*/
|
|
408
|
+
playwright: {
|
|
409
|
+
name: string;
|
|
410
|
+
rules: {
|
|
411
|
+
type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
|
|
412
|
+
id: string;
|
|
413
|
+
name: string;
|
|
414
|
+
enabled: boolean;
|
|
415
|
+
priority: number;
|
|
416
|
+
conditions: {
|
|
417
|
+
field: string;
|
|
418
|
+
operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
|
|
419
|
+
value?: unknown;
|
|
420
|
+
customEvaluator?: string | undefined;
|
|
421
|
+
}[];
|
|
422
|
+
conditionLogic: "all" | "any";
|
|
423
|
+
actions: {
|
|
424
|
+
type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
|
|
425
|
+
params?: Record<string, unknown> | undefined;
|
|
426
|
+
message?: string | undefined;
|
|
427
|
+
}[];
|
|
428
|
+
riskWeight: number;
|
|
429
|
+
description?: string | undefined;
|
|
430
|
+
metadata?: Record<string, unknown> | undefined;
|
|
431
|
+
tags?: string[] | undefined;
|
|
432
|
+
}[];
|
|
433
|
+
description: string;
|
|
434
|
+
};
|
|
435
|
+
/**
|
|
436
|
+
* ML/AI - Machine learning applications
|
|
437
|
+
*/
|
|
438
|
+
'ml-ai': {
|
|
439
|
+
name: string;
|
|
440
|
+
rules: {
|
|
441
|
+
type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
|
|
442
|
+
id: string;
|
|
443
|
+
name: string;
|
|
444
|
+
enabled: boolean;
|
|
445
|
+
priority: number;
|
|
446
|
+
conditions: {
|
|
447
|
+
field: string;
|
|
448
|
+
operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
|
|
449
|
+
value?: unknown;
|
|
450
|
+
customEvaluator?: string | undefined;
|
|
451
|
+
}[];
|
|
452
|
+
conditionLogic: "all" | "any";
|
|
453
|
+
actions: {
|
|
454
|
+
type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
|
|
455
|
+
params?: Record<string, unknown> | undefined;
|
|
456
|
+
message?: string | undefined;
|
|
457
|
+
}[];
|
|
458
|
+
riskWeight: number;
|
|
459
|
+
description?: string | undefined;
|
|
460
|
+
metadata?: Record<string, unknown> | undefined;
|
|
461
|
+
tags?: string[] | undefined;
|
|
462
|
+
}[];
|
|
463
|
+
description: string;
|
|
464
|
+
};
|
|
465
|
+
/**
|
|
466
|
+
* Stripe - Payment processing
|
|
467
|
+
*/
|
|
468
|
+
stripe: {
|
|
469
|
+
name: string;
|
|
470
|
+
rules: {
|
|
471
|
+
type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
|
|
472
|
+
id: string;
|
|
473
|
+
name: string;
|
|
474
|
+
enabled: boolean;
|
|
475
|
+
priority: number;
|
|
476
|
+
conditions: {
|
|
477
|
+
field: string;
|
|
478
|
+
operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
|
|
479
|
+
value?: unknown;
|
|
480
|
+
customEvaluator?: string | undefined;
|
|
481
|
+
}[];
|
|
482
|
+
conditionLogic: "all" | "any";
|
|
483
|
+
actions: {
|
|
484
|
+
type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
|
|
485
|
+
params?: Record<string, unknown> | undefined;
|
|
486
|
+
message?: string | undefined;
|
|
487
|
+
}[];
|
|
488
|
+
riskWeight: number;
|
|
489
|
+
description?: string | undefined;
|
|
490
|
+
metadata?: Record<string, unknown> | undefined;
|
|
491
|
+
tags?: string[] | undefined;
|
|
492
|
+
}[];
|
|
493
|
+
description: string;
|
|
494
|
+
};
|
|
495
|
+
/**
|
|
496
|
+
* WebSocket - Real-time applications
|
|
497
|
+
*/
|
|
498
|
+
websocket: {
|
|
499
|
+
name: string;
|
|
500
|
+
rules: {
|
|
501
|
+
type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
|
|
502
|
+
id: string;
|
|
503
|
+
name: string;
|
|
504
|
+
enabled: boolean;
|
|
505
|
+
priority: number;
|
|
506
|
+
conditions: {
|
|
507
|
+
field: string;
|
|
508
|
+
operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
|
|
509
|
+
value?: unknown;
|
|
510
|
+
customEvaluator?: string | undefined;
|
|
511
|
+
}[];
|
|
512
|
+
conditionLogic: "all" | "any";
|
|
513
|
+
actions: {
|
|
514
|
+
type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
|
|
515
|
+
params?: Record<string, unknown> | undefined;
|
|
516
|
+
message?: string | undefined;
|
|
517
|
+
}[];
|
|
518
|
+
riskWeight: number;
|
|
519
|
+
description?: string | undefined;
|
|
520
|
+
metadata?: Record<string, unknown> | undefined;
|
|
521
|
+
tags?: string[] | undefined;
|
|
522
|
+
}[];
|
|
523
|
+
description: string;
|
|
524
|
+
};
|
|
525
|
+
/**
|
|
526
|
+
* Full Stack - Complete web application
|
|
527
|
+
*/
|
|
528
|
+
fullstack: {
|
|
529
|
+
name: string;
|
|
530
|
+
rules: {
|
|
531
|
+
type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
|
|
532
|
+
id: string;
|
|
533
|
+
name: string;
|
|
534
|
+
enabled: boolean;
|
|
535
|
+
priority: number;
|
|
536
|
+
conditions: {
|
|
537
|
+
field: string;
|
|
538
|
+
operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
|
|
539
|
+
value?: unknown;
|
|
540
|
+
customEvaluator?: string | undefined;
|
|
541
|
+
}[];
|
|
542
|
+
conditionLogic: "all" | "any";
|
|
543
|
+
actions: {
|
|
544
|
+
type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
|
|
545
|
+
params?: Record<string, unknown> | undefined;
|
|
546
|
+
message?: string | undefined;
|
|
547
|
+
}[];
|
|
548
|
+
riskWeight: number;
|
|
549
|
+
description?: string | undefined;
|
|
550
|
+
metadata?: Record<string, unknown> | undefined;
|
|
551
|
+
tags?: string[] | undefined;
|
|
552
|
+
}[];
|
|
553
|
+
description: string;
|
|
554
|
+
};
|
|
555
|
+
/**
|
|
556
|
+
* API Only - Backend API services
|
|
557
|
+
*/
|
|
558
|
+
api: {
|
|
559
|
+
name: string;
|
|
560
|
+
rules: {
|
|
561
|
+
type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
|
|
562
|
+
id: string;
|
|
563
|
+
name: string;
|
|
564
|
+
enabled: boolean;
|
|
565
|
+
priority: number;
|
|
566
|
+
conditions: {
|
|
567
|
+
field: string;
|
|
568
|
+
operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
|
|
569
|
+
value?: unknown;
|
|
570
|
+
customEvaluator?: string | undefined;
|
|
571
|
+
}[];
|
|
572
|
+
conditionLogic: "all" | "any";
|
|
573
|
+
actions: {
|
|
574
|
+
type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
|
|
575
|
+
params?: Record<string, unknown> | undefined;
|
|
576
|
+
message?: string | undefined;
|
|
577
|
+
}[];
|
|
578
|
+
riskWeight: number;
|
|
579
|
+
description?: string | undefined;
|
|
580
|
+
metadata?: Record<string, unknown> | undefined;
|
|
581
|
+
tags?: string[] | undefined;
|
|
582
|
+
}[];
|
|
583
|
+
description: string;
|
|
584
|
+
};
|
|
585
|
+
};
|
|
586
|
+
/**
|
|
587
|
+
* Get rules by project profile
|
|
588
|
+
*/
|
|
589
|
+
export declare function getRulesByProfile(profile: keyof typeof projectProfiles): BusinessRule[];
|
|
590
|
+
/**
|
|
591
|
+
* Get rules by priority threshold
|
|
592
|
+
*/
|
|
593
|
+
export declare function getRulesByPriority(minPriority: number, maxPriority?: number): BusinessRule[];
|
|
594
|
+
/**
|
|
595
|
+
* Get a summary of rules by type
|
|
596
|
+
*/
|
|
597
|
+
export declare function getRuleSummary(): Record<string, number>;
|
|
598
|
+
/**
|
|
599
|
+
* List available project profiles
|
|
600
|
+
*/
|
|
601
|
+
export declare function listProjectProfiles(): Array<{
|
|
602
|
+
key: string;
|
|
603
|
+
name: string;
|
|
604
|
+
description: string;
|
|
605
|
+
ruleCount: number;
|
|
606
|
+
}>;
|
|
607
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rules/index.ts"],"names":[],"mappings":"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"}
|