@trentapps/manager-protocol 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +639 -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 +284 -0
- package/dist/analyzers/CSSAnalyzer.d.ts.map +1 -0
- package/dist/analyzers/CSSAnalyzer.js +1180 -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/AuditLogger.d.ts +506 -0
- package/dist/engine/AuditLogger.d.ts.map +1 -0
- package/dist/engine/AuditLogger.js +1491 -0
- package/dist/engine/AuditLogger.js.map +1 -0
- package/dist/engine/GitHubApprovalManager.d.ts +123 -0
- package/dist/engine/GitHubApprovalManager.d.ts.map +1 -0
- package/dist/engine/GitHubApprovalManager.js +347 -0
- package/dist/engine/GitHubApprovalManager.js.map +1 -0
- package/dist/engine/GitHubClient.d.ts +183 -0
- package/dist/engine/GitHubClient.d.ts.map +1 -0
- package/dist/engine/GitHubClient.js +411 -0
- package/dist/engine/GitHubClient.js.map +1 -0
- package/dist/engine/RateLimiter.d.ts +81 -0
- package/dist/engine/RateLimiter.d.ts.map +1 -0
- package/dist/engine/RateLimiter.js +215 -0
- package/dist/engine/RateLimiter.js.map +1 -0
- package/dist/engine/RuleDependencyAnalyzer.d.ts +73 -0
- package/dist/engine/RuleDependencyAnalyzer.d.ts.map +1 -0
- package/dist/engine/RuleDependencyAnalyzer.js +475 -0
- package/dist/engine/RuleDependencyAnalyzer.js.map +1 -0
- package/dist/engine/RulesEngine.d.ts +176 -0
- package/dist/engine/RulesEngine.d.ts.map +1 -0
- package/dist/engine/RulesEngine.js +705 -0
- package/dist/engine/RulesEngine.js.map +1 -0
- package/dist/engine/TaskManager.d.ts +174 -0
- package/dist/engine/TaskManager.d.ts.map +1 -0
- package/dist/engine/TaskManager.js +663 -0
- package/dist/engine/TaskManager.js.map +1 -0
- package/dist/engine/index.d.ts +11 -0
- package/dist/engine/index.d.ts.map +1 -0
- package/dist/engine/index.js +13 -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 +136 -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 +286 -0
- package/dist/rules/compliance.js.map +1 -0
- package/dist/rules/condition-optimizer.d.ts +151 -0
- package/dist/rules/condition-optimizer.d.ts.map +1 -0
- package/dist/rules/condition-optimizer.js +479 -0
- package/dist/rules/condition-optimizer.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 +1777 -0
- package/dist/rules/css.js.map +1 -0
- package/dist/rules/field-standards.d.ts +1172 -0
- package/dist/rules/field-standards.d.ts.map +1 -0
- package/dist/rules/field-standards.js +908 -0
- package/dist/rules/field-standards.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 +142 -0
- package/dist/rules/flask.js.map +1 -0
- package/dist/rules/index.d.ts +827 -0
- package/dist/rules/index.d.ts.map +1 -0
- package/dist/rules/index.js +556 -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 +148 -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/patterns.d.ts +568 -0
- package/dist/rules/patterns.d.ts.map +1 -0
- package/dist/rules/patterns.js +1359 -0
- package/dist/rules/patterns.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 +848 -0
- package/dist/rules/security.js.map +1 -0
- package/dist/rules/shared-patterns.d.ts +268 -0
- package/dist/rules/shared-patterns.d.ts.map +1 -0
- package/dist/rules/shared-patterns.js +556 -0
- package/dist/rules/shared-patterns.js.map +1 -0
- package/dist/rules/storage.d.ts +13 -0
- package/dist/rules/storage.d.ts.map +1 -0
- package/dist/rules/storage.js +672 -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 +133 -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 +128 -0
- package/dist/rules/websocket.js.map +1 -0
- package/dist/server.d.ts +43 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +1967 -0
- package/dist/server.js.map +1 -0
- package/dist/supervisor/AgentSupervisor.d.ts +195 -0
- package/dist/supervisor/AgentSupervisor.d.ts.map +1 -0
- package/dist/supervisor/AgentSupervisor.js +569 -0
- package/dist/supervisor/AgentSupervisor.js.map +1 -0
- package/dist/supervisor/ManagedServerRegistry.d.ts +185 -0
- package/dist/supervisor/ManagedServerRegistry.d.ts.map +1 -0
- package/dist/supervisor/ManagedServerRegistry.js +729 -0
- package/dist/supervisor/ManagedServerRegistry.js.map +1 -0
- package/dist/supervisor/ProjectTracker.d.ts +210 -0
- package/dist/supervisor/ProjectTracker.d.ts.map +1 -0
- package/dist/supervisor/ProjectTracker.js +709 -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/testing/index.d.ts +11 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +12 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/rule-tester.d.ts +217 -0
- package/dist/testing/rule-tester.d.ts.map +1 -0
- package/dist/testing/rule-tester.examples.d.ts +57 -0
- package/dist/testing/rule-tester.examples.d.ts.map +1 -0
- package/dist/testing/rule-tester.examples.js +375 -0
- package/dist/testing/rule-tester.examples.js.map +1 -0
- package/dist/testing/rule-tester.js +381 -0
- package/dist/testing/rule-tester.js.map +1 -0
- package/dist/testing/rule-validator.d.ts +141 -0
- package/dist/testing/rule-validator.d.ts.map +1 -0
- package/dist/testing/rule-validator.js +640 -0
- package/dist/testing/rule-validator.js.map +1 -0
- package/dist/types/index.d.ts +1282 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +386 -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 +7 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +7 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/rate-limiting.d.ts +268 -0
- package/dist/utils/rate-limiting.d.ts.map +1 -0
- package/dist/utils/rate-limiting.js +403 -0
- package/dist/utils/rate-limiting.js.map +1 -0
- package/dist/utils/shared.d.ts +306 -0
- package/dist/utils/shared.d.ts.map +1 -0
- package/dist/utils/shared.js +464 -0
- package/dist/utils/shared.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 +67 -0
|
@@ -0,0 +1,827 @@
|
|
|
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
|
+
version?: string | undefined;
|
|
71
|
+
deprecated?: boolean | undefined;
|
|
72
|
+
deprecatedMessage?: string | undefined;
|
|
73
|
+
replacedBy?: string | undefined;
|
|
74
|
+
minVersion?: string | undefined;
|
|
75
|
+
dependsOn?: string[] | undefined;
|
|
76
|
+
conflictsWith?: string[] | undefined;
|
|
77
|
+
relatedRules?: string[] | undefined;
|
|
78
|
+
}[];
|
|
79
|
+
rateLimits: {
|
|
80
|
+
id: string;
|
|
81
|
+
name: string;
|
|
82
|
+
enabled: boolean;
|
|
83
|
+
windowMs: number;
|
|
84
|
+
maxRequests: number;
|
|
85
|
+
scope: "global" | "agent" | "session" | "user" | "action_type";
|
|
86
|
+
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;
|
|
87
|
+
burstLimit?: number | undefined;
|
|
88
|
+
}[];
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Standard - Balanced security and operations
|
|
92
|
+
*/
|
|
93
|
+
standard: {
|
|
94
|
+
rules: {
|
|
95
|
+
type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
|
|
96
|
+
id: string;
|
|
97
|
+
name: string;
|
|
98
|
+
enabled: boolean;
|
|
99
|
+
priority: number;
|
|
100
|
+
conditions: {
|
|
101
|
+
field: string;
|
|
102
|
+
operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
|
|
103
|
+
value?: unknown;
|
|
104
|
+
customEvaluator?: string | undefined;
|
|
105
|
+
}[];
|
|
106
|
+
conditionLogic: "all" | "any";
|
|
107
|
+
actions: {
|
|
108
|
+
type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
|
|
109
|
+
params?: Record<string, unknown> | undefined;
|
|
110
|
+
message?: string | undefined;
|
|
111
|
+
}[];
|
|
112
|
+
riskWeight: number;
|
|
113
|
+
description?: string | undefined;
|
|
114
|
+
metadata?: Record<string, unknown> | undefined;
|
|
115
|
+
tags?: string[] | undefined;
|
|
116
|
+
version?: string | undefined;
|
|
117
|
+
deprecated?: boolean | undefined;
|
|
118
|
+
deprecatedMessage?: string | undefined;
|
|
119
|
+
replacedBy?: string | undefined;
|
|
120
|
+
minVersion?: string | undefined;
|
|
121
|
+
dependsOn?: string[] | undefined;
|
|
122
|
+
conflictsWith?: string[] | undefined;
|
|
123
|
+
relatedRules?: string[] | undefined;
|
|
124
|
+
}[];
|
|
125
|
+
rateLimits: {
|
|
126
|
+
id: string;
|
|
127
|
+
name: string;
|
|
128
|
+
enabled: boolean;
|
|
129
|
+
windowMs: number;
|
|
130
|
+
maxRequests: number;
|
|
131
|
+
scope: "global" | "agent" | "session" | "user" | "action_type";
|
|
132
|
+
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;
|
|
133
|
+
burstLimit?: number | undefined;
|
|
134
|
+
}[];
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* Strict - Full compliance and governance
|
|
138
|
+
*/
|
|
139
|
+
strict: {
|
|
140
|
+
rules: {
|
|
141
|
+
type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
|
|
142
|
+
id: string;
|
|
143
|
+
name: string;
|
|
144
|
+
enabled: boolean;
|
|
145
|
+
priority: number;
|
|
146
|
+
conditions: {
|
|
147
|
+
field: string;
|
|
148
|
+
operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
|
|
149
|
+
value?: unknown;
|
|
150
|
+
customEvaluator?: string | undefined;
|
|
151
|
+
}[];
|
|
152
|
+
conditionLogic: "all" | "any";
|
|
153
|
+
actions: {
|
|
154
|
+
type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
|
|
155
|
+
params?: Record<string, unknown> | undefined;
|
|
156
|
+
message?: string | undefined;
|
|
157
|
+
}[];
|
|
158
|
+
riskWeight: number;
|
|
159
|
+
description?: string | undefined;
|
|
160
|
+
metadata?: Record<string, unknown> | undefined;
|
|
161
|
+
tags?: string[] | undefined;
|
|
162
|
+
version?: string | undefined;
|
|
163
|
+
deprecated?: boolean | undefined;
|
|
164
|
+
deprecatedMessage?: string | undefined;
|
|
165
|
+
replacedBy?: string | undefined;
|
|
166
|
+
minVersion?: string | undefined;
|
|
167
|
+
dependsOn?: string[] | undefined;
|
|
168
|
+
conflictsWith?: string[] | undefined;
|
|
169
|
+
relatedRules?: string[] | undefined;
|
|
170
|
+
}[];
|
|
171
|
+
rateLimits: {
|
|
172
|
+
id: string;
|
|
173
|
+
name: string;
|
|
174
|
+
enabled: boolean;
|
|
175
|
+
windowMs: number;
|
|
176
|
+
maxRequests: number;
|
|
177
|
+
scope: "global" | "agent" | "session" | "user" | "action_type";
|
|
178
|
+
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;
|
|
179
|
+
burstLimit?: number | undefined;
|
|
180
|
+
}[];
|
|
181
|
+
};
|
|
182
|
+
/**
|
|
183
|
+
* Financial - For financial services
|
|
184
|
+
*/
|
|
185
|
+
financial: {
|
|
186
|
+
rules: {
|
|
187
|
+
type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
|
|
188
|
+
id: string;
|
|
189
|
+
name: string;
|
|
190
|
+
enabled: boolean;
|
|
191
|
+
priority: number;
|
|
192
|
+
conditions: {
|
|
193
|
+
field: string;
|
|
194
|
+
operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
|
|
195
|
+
value?: unknown;
|
|
196
|
+
customEvaluator?: string | undefined;
|
|
197
|
+
}[];
|
|
198
|
+
conditionLogic: "all" | "any";
|
|
199
|
+
actions: {
|
|
200
|
+
type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
|
|
201
|
+
params?: Record<string, unknown> | undefined;
|
|
202
|
+
message?: string | undefined;
|
|
203
|
+
}[];
|
|
204
|
+
riskWeight: number;
|
|
205
|
+
description?: string | undefined;
|
|
206
|
+
metadata?: Record<string, unknown> | undefined;
|
|
207
|
+
tags?: string[] | undefined;
|
|
208
|
+
version?: string | undefined;
|
|
209
|
+
deprecated?: boolean | undefined;
|
|
210
|
+
deprecatedMessage?: string | undefined;
|
|
211
|
+
replacedBy?: string | undefined;
|
|
212
|
+
minVersion?: string | undefined;
|
|
213
|
+
dependsOn?: string[] | undefined;
|
|
214
|
+
conflictsWith?: string[] | undefined;
|
|
215
|
+
relatedRules?: string[] | undefined;
|
|
216
|
+
}[];
|
|
217
|
+
rateLimits: {
|
|
218
|
+
id: string;
|
|
219
|
+
name: string;
|
|
220
|
+
enabled: boolean;
|
|
221
|
+
windowMs: number;
|
|
222
|
+
maxRequests: number;
|
|
223
|
+
scope: "global" | "agent" | "session" | "user" | "action_type";
|
|
224
|
+
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;
|
|
225
|
+
burstLimit?: number | undefined;
|
|
226
|
+
}[];
|
|
227
|
+
};
|
|
228
|
+
/**
|
|
229
|
+
* Healthcare - For healthcare applications
|
|
230
|
+
*/
|
|
231
|
+
healthcare: {
|
|
232
|
+
rules: {
|
|
233
|
+
type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
|
|
234
|
+
id: string;
|
|
235
|
+
name: string;
|
|
236
|
+
enabled: boolean;
|
|
237
|
+
priority: number;
|
|
238
|
+
conditions: {
|
|
239
|
+
field: string;
|
|
240
|
+
operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
|
|
241
|
+
value?: unknown;
|
|
242
|
+
customEvaluator?: string | undefined;
|
|
243
|
+
}[];
|
|
244
|
+
conditionLogic: "all" | "any";
|
|
245
|
+
actions: {
|
|
246
|
+
type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
|
|
247
|
+
params?: Record<string, unknown> | undefined;
|
|
248
|
+
message?: string | undefined;
|
|
249
|
+
}[];
|
|
250
|
+
riskWeight: number;
|
|
251
|
+
description?: string | undefined;
|
|
252
|
+
metadata?: Record<string, unknown> | undefined;
|
|
253
|
+
tags?: string[] | undefined;
|
|
254
|
+
version?: string | undefined;
|
|
255
|
+
deprecated?: boolean | undefined;
|
|
256
|
+
deprecatedMessage?: string | undefined;
|
|
257
|
+
replacedBy?: string | undefined;
|
|
258
|
+
minVersion?: string | undefined;
|
|
259
|
+
dependsOn?: string[] | undefined;
|
|
260
|
+
conflictsWith?: string[] | undefined;
|
|
261
|
+
relatedRules?: string[] | undefined;
|
|
262
|
+
}[];
|
|
263
|
+
rateLimits: {
|
|
264
|
+
id: string;
|
|
265
|
+
name: string;
|
|
266
|
+
enabled: boolean;
|
|
267
|
+
windowMs: number;
|
|
268
|
+
maxRequests: number;
|
|
269
|
+
scope: "global" | "agent" | "session" | "user" | "action_type";
|
|
270
|
+
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;
|
|
271
|
+
burstLimit?: number | undefined;
|
|
272
|
+
}[];
|
|
273
|
+
};
|
|
274
|
+
/**
|
|
275
|
+
* Development - Relaxed rules for dev environment
|
|
276
|
+
*/
|
|
277
|
+
development: {
|
|
278
|
+
rules: {
|
|
279
|
+
actions: {
|
|
280
|
+
type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
|
|
281
|
+
params?: Record<string, unknown> | undefined;
|
|
282
|
+
message?: string | undefined;
|
|
283
|
+
}[];
|
|
284
|
+
type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
|
|
285
|
+
id: string;
|
|
286
|
+
name: string;
|
|
287
|
+
enabled: boolean;
|
|
288
|
+
priority: number;
|
|
289
|
+
conditions: {
|
|
290
|
+
field: string;
|
|
291
|
+
operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
|
|
292
|
+
value?: unknown;
|
|
293
|
+
customEvaluator?: string | undefined;
|
|
294
|
+
}[];
|
|
295
|
+
conditionLogic: "all" | "any";
|
|
296
|
+
riskWeight: number;
|
|
297
|
+
description?: string | undefined;
|
|
298
|
+
metadata?: Record<string, unknown> | undefined;
|
|
299
|
+
tags?: string[] | undefined;
|
|
300
|
+
version?: string | undefined;
|
|
301
|
+
deprecated?: boolean | undefined;
|
|
302
|
+
deprecatedMessage?: string | undefined;
|
|
303
|
+
replacedBy?: string | undefined;
|
|
304
|
+
minVersion?: string | undefined;
|
|
305
|
+
dependsOn?: string[] | undefined;
|
|
306
|
+
conflictsWith?: string[] | undefined;
|
|
307
|
+
relatedRules?: string[] | undefined;
|
|
308
|
+
}[];
|
|
309
|
+
rateLimits: never[];
|
|
310
|
+
};
|
|
311
|
+
/**
|
|
312
|
+
* Frontend - Optimized for frontend development with CSS governance
|
|
313
|
+
*/
|
|
314
|
+
frontend: {
|
|
315
|
+
rules: {
|
|
316
|
+
type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
|
|
317
|
+
id: string;
|
|
318
|
+
name: string;
|
|
319
|
+
enabled: boolean;
|
|
320
|
+
priority: number;
|
|
321
|
+
conditions: {
|
|
322
|
+
field: string;
|
|
323
|
+
operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
|
|
324
|
+
value?: unknown;
|
|
325
|
+
customEvaluator?: string | undefined;
|
|
326
|
+
}[];
|
|
327
|
+
conditionLogic: "all" | "any";
|
|
328
|
+
actions: {
|
|
329
|
+
type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
|
|
330
|
+
params?: Record<string, unknown> | undefined;
|
|
331
|
+
message?: string | undefined;
|
|
332
|
+
}[];
|
|
333
|
+
riskWeight: number;
|
|
334
|
+
description?: string | undefined;
|
|
335
|
+
metadata?: Record<string, unknown> | undefined;
|
|
336
|
+
tags?: string[] | undefined;
|
|
337
|
+
version?: string | undefined;
|
|
338
|
+
deprecated?: boolean | undefined;
|
|
339
|
+
deprecatedMessage?: string | undefined;
|
|
340
|
+
replacedBy?: string | undefined;
|
|
341
|
+
minVersion?: string | undefined;
|
|
342
|
+
dependsOn?: string[] | undefined;
|
|
343
|
+
conflictsWith?: string[] | undefined;
|
|
344
|
+
relatedRules?: string[] | undefined;
|
|
345
|
+
}[];
|
|
346
|
+
rateLimits: {
|
|
347
|
+
id: string;
|
|
348
|
+
name: string;
|
|
349
|
+
enabled: boolean;
|
|
350
|
+
windowMs: number;
|
|
351
|
+
maxRequests: number;
|
|
352
|
+
scope: "global" | "agent" | "session" | "user" | "action_type";
|
|
353
|
+
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;
|
|
354
|
+
burstLimit?: number | undefined;
|
|
355
|
+
}[];
|
|
356
|
+
};
|
|
357
|
+
};
|
|
358
|
+
/**
|
|
359
|
+
* Get CSS-specific rules
|
|
360
|
+
*/
|
|
361
|
+
export declare function getCSSRules(): BusinessRule[];
|
|
362
|
+
/**
|
|
363
|
+
* Get rules for frontend development
|
|
364
|
+
*/
|
|
365
|
+
export declare function getFrontendRules(): BusinessRule[];
|
|
366
|
+
/**
|
|
367
|
+
* Get all storage-related rules
|
|
368
|
+
*/
|
|
369
|
+
export declare function getStorageRules(): BusinessRule[];
|
|
370
|
+
/**
|
|
371
|
+
* Get storage rules by storage type
|
|
372
|
+
*/
|
|
373
|
+
export declare function getStorageRulesByType(storageType: 'browser' | 'database' | 'filesystem' | 'cache' | 'blob'): BusinessRule[];
|
|
374
|
+
/**
|
|
375
|
+
* Get database-specific rules
|
|
376
|
+
*/
|
|
377
|
+
export declare function getDatabaseRules(): BusinessRule[];
|
|
378
|
+
/**
|
|
379
|
+
* Get file system rules
|
|
380
|
+
*/
|
|
381
|
+
export declare function getFileSystemRules(): BusinessRule[];
|
|
382
|
+
/**
|
|
383
|
+
* Get cache rules (Redis, Memcached, CDN)
|
|
384
|
+
*/
|
|
385
|
+
export declare function getCacheRules(): BusinessRule[];
|
|
386
|
+
/**
|
|
387
|
+
* Get blob/object storage rules (S3, Azure Blob, GCS)
|
|
388
|
+
*/
|
|
389
|
+
export declare function getBlobStorageRules(): BusinessRule[];
|
|
390
|
+
/**
|
|
391
|
+
* Get browser storage rules (localStorage, sessionStorage, IndexedDB)
|
|
392
|
+
*/
|
|
393
|
+
export declare function getBrowserStorageRules(): BusinessRule[];
|
|
394
|
+
/**
|
|
395
|
+
* Project Profiles - Technology-specific rule collections
|
|
396
|
+
* Use these to filter rules by project tech stack
|
|
397
|
+
*/
|
|
398
|
+
export declare const projectProfiles: {
|
|
399
|
+
/**
|
|
400
|
+
* Flask - Python Flask web applications
|
|
401
|
+
*/
|
|
402
|
+
flask: {
|
|
403
|
+
name: string;
|
|
404
|
+
rules: {
|
|
405
|
+
type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
|
|
406
|
+
id: string;
|
|
407
|
+
name: string;
|
|
408
|
+
enabled: boolean;
|
|
409
|
+
priority: number;
|
|
410
|
+
conditions: {
|
|
411
|
+
field: string;
|
|
412
|
+
operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
|
|
413
|
+
value?: unknown;
|
|
414
|
+
customEvaluator?: string | undefined;
|
|
415
|
+
}[];
|
|
416
|
+
conditionLogic: "all" | "any";
|
|
417
|
+
actions: {
|
|
418
|
+
type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
|
|
419
|
+
params?: Record<string, unknown> | undefined;
|
|
420
|
+
message?: string | undefined;
|
|
421
|
+
}[];
|
|
422
|
+
riskWeight: number;
|
|
423
|
+
description?: string | undefined;
|
|
424
|
+
metadata?: Record<string, unknown> | undefined;
|
|
425
|
+
tags?: string[] | undefined;
|
|
426
|
+
version?: string | undefined;
|
|
427
|
+
deprecated?: boolean | undefined;
|
|
428
|
+
deprecatedMessage?: string | undefined;
|
|
429
|
+
replacedBy?: string | undefined;
|
|
430
|
+
minVersion?: string | undefined;
|
|
431
|
+
dependsOn?: string[] | undefined;
|
|
432
|
+
conflictsWith?: string[] | undefined;
|
|
433
|
+
relatedRules?: string[] | undefined;
|
|
434
|
+
}[];
|
|
435
|
+
description: string;
|
|
436
|
+
};
|
|
437
|
+
/**
|
|
438
|
+
* Azure .NET - Azure Functions + Cosmos DB
|
|
439
|
+
*/
|
|
440
|
+
'dotnet-azure': {
|
|
441
|
+
name: string;
|
|
442
|
+
rules: {
|
|
443
|
+
type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
|
|
444
|
+
id: string;
|
|
445
|
+
name: string;
|
|
446
|
+
enabled: boolean;
|
|
447
|
+
priority: number;
|
|
448
|
+
conditions: {
|
|
449
|
+
field: string;
|
|
450
|
+
operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
|
|
451
|
+
value?: unknown;
|
|
452
|
+
customEvaluator?: string | undefined;
|
|
453
|
+
}[];
|
|
454
|
+
conditionLogic: "all" | "any";
|
|
455
|
+
actions: {
|
|
456
|
+
type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
|
|
457
|
+
params?: Record<string, unknown> | undefined;
|
|
458
|
+
message?: string | undefined;
|
|
459
|
+
}[];
|
|
460
|
+
riskWeight: number;
|
|
461
|
+
description?: string | undefined;
|
|
462
|
+
metadata?: Record<string, unknown> | undefined;
|
|
463
|
+
tags?: string[] | undefined;
|
|
464
|
+
version?: string | undefined;
|
|
465
|
+
deprecated?: boolean | undefined;
|
|
466
|
+
deprecatedMessage?: string | undefined;
|
|
467
|
+
replacedBy?: string | undefined;
|
|
468
|
+
minVersion?: string | undefined;
|
|
469
|
+
dependsOn?: string[] | undefined;
|
|
470
|
+
conflictsWith?: string[] | undefined;
|
|
471
|
+
relatedRules?: string[] | undefined;
|
|
472
|
+
}[];
|
|
473
|
+
description: string;
|
|
474
|
+
};
|
|
475
|
+
/**
|
|
476
|
+
* React/Frontend - Browser-based applications
|
|
477
|
+
*/
|
|
478
|
+
react: {
|
|
479
|
+
name: string;
|
|
480
|
+
rules: {
|
|
481
|
+
type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
|
|
482
|
+
id: string;
|
|
483
|
+
name: string;
|
|
484
|
+
enabled: boolean;
|
|
485
|
+
priority: number;
|
|
486
|
+
conditions: {
|
|
487
|
+
field: string;
|
|
488
|
+
operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
|
|
489
|
+
value?: unknown;
|
|
490
|
+
customEvaluator?: string | undefined;
|
|
491
|
+
}[];
|
|
492
|
+
conditionLogic: "all" | "any";
|
|
493
|
+
actions: {
|
|
494
|
+
type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
|
|
495
|
+
params?: Record<string, unknown> | undefined;
|
|
496
|
+
message?: string | undefined;
|
|
497
|
+
}[];
|
|
498
|
+
riskWeight: number;
|
|
499
|
+
description?: string | undefined;
|
|
500
|
+
metadata?: Record<string, unknown> | undefined;
|
|
501
|
+
tags?: string[] | undefined;
|
|
502
|
+
version?: string | undefined;
|
|
503
|
+
deprecated?: boolean | undefined;
|
|
504
|
+
deprecatedMessage?: string | undefined;
|
|
505
|
+
replacedBy?: string | undefined;
|
|
506
|
+
minVersion?: string | undefined;
|
|
507
|
+
dependsOn?: string[] | undefined;
|
|
508
|
+
conflictsWith?: string[] | undefined;
|
|
509
|
+
relatedRules?: string[] | undefined;
|
|
510
|
+
}[];
|
|
511
|
+
description: string;
|
|
512
|
+
};
|
|
513
|
+
/**
|
|
514
|
+
* Playwright - E2E testing
|
|
515
|
+
*/
|
|
516
|
+
playwright: {
|
|
517
|
+
name: string;
|
|
518
|
+
rules: {
|
|
519
|
+
type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
|
|
520
|
+
id: string;
|
|
521
|
+
name: string;
|
|
522
|
+
enabled: boolean;
|
|
523
|
+
priority: number;
|
|
524
|
+
conditions: {
|
|
525
|
+
field: string;
|
|
526
|
+
operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
|
|
527
|
+
value?: unknown;
|
|
528
|
+
customEvaluator?: string | undefined;
|
|
529
|
+
}[];
|
|
530
|
+
conditionLogic: "all" | "any";
|
|
531
|
+
actions: {
|
|
532
|
+
type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
|
|
533
|
+
params?: Record<string, unknown> | undefined;
|
|
534
|
+
message?: string | undefined;
|
|
535
|
+
}[];
|
|
536
|
+
riskWeight: number;
|
|
537
|
+
description?: string | undefined;
|
|
538
|
+
metadata?: Record<string, unknown> | undefined;
|
|
539
|
+
tags?: string[] | undefined;
|
|
540
|
+
version?: string | undefined;
|
|
541
|
+
deprecated?: boolean | undefined;
|
|
542
|
+
deprecatedMessage?: string | undefined;
|
|
543
|
+
replacedBy?: string | undefined;
|
|
544
|
+
minVersion?: string | undefined;
|
|
545
|
+
dependsOn?: string[] | undefined;
|
|
546
|
+
conflictsWith?: string[] | undefined;
|
|
547
|
+
relatedRules?: string[] | undefined;
|
|
548
|
+
}[];
|
|
549
|
+
description: string;
|
|
550
|
+
};
|
|
551
|
+
/**
|
|
552
|
+
* ML/AI - Machine learning applications
|
|
553
|
+
*/
|
|
554
|
+
'ml-ai': {
|
|
555
|
+
name: string;
|
|
556
|
+
rules: {
|
|
557
|
+
type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
|
|
558
|
+
id: string;
|
|
559
|
+
name: string;
|
|
560
|
+
enabled: boolean;
|
|
561
|
+
priority: number;
|
|
562
|
+
conditions: {
|
|
563
|
+
field: string;
|
|
564
|
+
operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
|
|
565
|
+
value?: unknown;
|
|
566
|
+
customEvaluator?: string | undefined;
|
|
567
|
+
}[];
|
|
568
|
+
conditionLogic: "all" | "any";
|
|
569
|
+
actions: {
|
|
570
|
+
type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
|
|
571
|
+
params?: Record<string, unknown> | undefined;
|
|
572
|
+
message?: string | undefined;
|
|
573
|
+
}[];
|
|
574
|
+
riskWeight: number;
|
|
575
|
+
description?: string | undefined;
|
|
576
|
+
metadata?: Record<string, unknown> | undefined;
|
|
577
|
+
tags?: string[] | undefined;
|
|
578
|
+
version?: string | undefined;
|
|
579
|
+
deprecated?: boolean | undefined;
|
|
580
|
+
deprecatedMessage?: string | undefined;
|
|
581
|
+
replacedBy?: string | undefined;
|
|
582
|
+
minVersion?: string | undefined;
|
|
583
|
+
dependsOn?: string[] | undefined;
|
|
584
|
+
conflictsWith?: string[] | undefined;
|
|
585
|
+
relatedRules?: string[] | undefined;
|
|
586
|
+
}[];
|
|
587
|
+
description: string;
|
|
588
|
+
};
|
|
589
|
+
/**
|
|
590
|
+
* Stripe - Payment processing
|
|
591
|
+
*/
|
|
592
|
+
stripe: {
|
|
593
|
+
name: string;
|
|
594
|
+
rules: {
|
|
595
|
+
type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
|
|
596
|
+
id: string;
|
|
597
|
+
name: string;
|
|
598
|
+
enabled: boolean;
|
|
599
|
+
priority: number;
|
|
600
|
+
conditions: {
|
|
601
|
+
field: string;
|
|
602
|
+
operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
|
|
603
|
+
value?: unknown;
|
|
604
|
+
customEvaluator?: string | undefined;
|
|
605
|
+
}[];
|
|
606
|
+
conditionLogic: "all" | "any";
|
|
607
|
+
actions: {
|
|
608
|
+
type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
|
|
609
|
+
params?: Record<string, unknown> | undefined;
|
|
610
|
+
message?: string | undefined;
|
|
611
|
+
}[];
|
|
612
|
+
riskWeight: number;
|
|
613
|
+
description?: string | undefined;
|
|
614
|
+
metadata?: Record<string, unknown> | undefined;
|
|
615
|
+
tags?: string[] | undefined;
|
|
616
|
+
version?: string | undefined;
|
|
617
|
+
deprecated?: boolean | undefined;
|
|
618
|
+
deprecatedMessage?: string | undefined;
|
|
619
|
+
replacedBy?: string | undefined;
|
|
620
|
+
minVersion?: string | undefined;
|
|
621
|
+
dependsOn?: string[] | undefined;
|
|
622
|
+
conflictsWith?: string[] | undefined;
|
|
623
|
+
relatedRules?: string[] | undefined;
|
|
624
|
+
}[];
|
|
625
|
+
description: string;
|
|
626
|
+
};
|
|
627
|
+
/**
|
|
628
|
+
* WebSocket - Real-time applications
|
|
629
|
+
*/
|
|
630
|
+
websocket: {
|
|
631
|
+
name: string;
|
|
632
|
+
rules: {
|
|
633
|
+
type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
|
|
634
|
+
id: string;
|
|
635
|
+
name: string;
|
|
636
|
+
enabled: boolean;
|
|
637
|
+
priority: number;
|
|
638
|
+
conditions: {
|
|
639
|
+
field: string;
|
|
640
|
+
operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
|
|
641
|
+
value?: unknown;
|
|
642
|
+
customEvaluator?: string | undefined;
|
|
643
|
+
}[];
|
|
644
|
+
conditionLogic: "all" | "any";
|
|
645
|
+
actions: {
|
|
646
|
+
type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
|
|
647
|
+
params?: Record<string, unknown> | undefined;
|
|
648
|
+
message?: string | undefined;
|
|
649
|
+
}[];
|
|
650
|
+
riskWeight: number;
|
|
651
|
+
description?: string | undefined;
|
|
652
|
+
metadata?: Record<string, unknown> | undefined;
|
|
653
|
+
tags?: string[] | undefined;
|
|
654
|
+
version?: string | undefined;
|
|
655
|
+
deprecated?: boolean | undefined;
|
|
656
|
+
deprecatedMessage?: string | undefined;
|
|
657
|
+
replacedBy?: string | undefined;
|
|
658
|
+
minVersion?: string | undefined;
|
|
659
|
+
dependsOn?: string[] | undefined;
|
|
660
|
+
conflictsWith?: string[] | undefined;
|
|
661
|
+
relatedRules?: string[] | undefined;
|
|
662
|
+
}[];
|
|
663
|
+
description: string;
|
|
664
|
+
};
|
|
665
|
+
/**
|
|
666
|
+
* Full Stack - Complete web application
|
|
667
|
+
*/
|
|
668
|
+
fullstack: {
|
|
669
|
+
name: string;
|
|
670
|
+
rules: {
|
|
671
|
+
type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
|
|
672
|
+
id: string;
|
|
673
|
+
name: string;
|
|
674
|
+
enabled: boolean;
|
|
675
|
+
priority: number;
|
|
676
|
+
conditions: {
|
|
677
|
+
field: string;
|
|
678
|
+
operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
|
|
679
|
+
value?: unknown;
|
|
680
|
+
customEvaluator?: string | undefined;
|
|
681
|
+
}[];
|
|
682
|
+
conditionLogic: "all" | "any";
|
|
683
|
+
actions: {
|
|
684
|
+
type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
|
|
685
|
+
params?: Record<string, unknown> | undefined;
|
|
686
|
+
message?: string | undefined;
|
|
687
|
+
}[];
|
|
688
|
+
riskWeight: number;
|
|
689
|
+
description?: string | undefined;
|
|
690
|
+
metadata?: Record<string, unknown> | undefined;
|
|
691
|
+
tags?: string[] | undefined;
|
|
692
|
+
version?: string | undefined;
|
|
693
|
+
deprecated?: boolean | undefined;
|
|
694
|
+
deprecatedMessage?: string | undefined;
|
|
695
|
+
replacedBy?: string | undefined;
|
|
696
|
+
minVersion?: string | undefined;
|
|
697
|
+
dependsOn?: string[] | undefined;
|
|
698
|
+
conflictsWith?: string[] | undefined;
|
|
699
|
+
relatedRules?: string[] | undefined;
|
|
700
|
+
}[];
|
|
701
|
+
description: string;
|
|
702
|
+
};
|
|
703
|
+
/**
|
|
704
|
+
* API Only - Backend API services
|
|
705
|
+
*/
|
|
706
|
+
api: {
|
|
707
|
+
name: string;
|
|
708
|
+
rules: {
|
|
709
|
+
type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
|
|
710
|
+
id: string;
|
|
711
|
+
name: string;
|
|
712
|
+
enabled: boolean;
|
|
713
|
+
priority: number;
|
|
714
|
+
conditions: {
|
|
715
|
+
field: string;
|
|
716
|
+
operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
|
|
717
|
+
value?: unknown;
|
|
718
|
+
customEvaluator?: string | undefined;
|
|
719
|
+
}[];
|
|
720
|
+
conditionLogic: "all" | "any";
|
|
721
|
+
actions: {
|
|
722
|
+
type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
|
|
723
|
+
params?: Record<string, unknown> | undefined;
|
|
724
|
+
message?: string | undefined;
|
|
725
|
+
}[];
|
|
726
|
+
riskWeight: number;
|
|
727
|
+
description?: string | undefined;
|
|
728
|
+
metadata?: Record<string, unknown> | undefined;
|
|
729
|
+
tags?: string[] | undefined;
|
|
730
|
+
version?: string | undefined;
|
|
731
|
+
deprecated?: boolean | undefined;
|
|
732
|
+
deprecatedMessage?: string | undefined;
|
|
733
|
+
replacedBy?: string | undefined;
|
|
734
|
+
minVersion?: string | undefined;
|
|
735
|
+
dependsOn?: string[] | undefined;
|
|
736
|
+
conflictsWith?: string[] | undefined;
|
|
737
|
+
relatedRules?: string[] | undefined;
|
|
738
|
+
}[];
|
|
739
|
+
description: string;
|
|
740
|
+
};
|
|
741
|
+
/**
|
|
742
|
+
* Storage - Database, file system, cache, and blob storage (Task #35)
|
|
743
|
+
*/
|
|
744
|
+
storage: {
|
|
745
|
+
name: string;
|
|
746
|
+
rules: {
|
|
747
|
+
type: "financial" | "custom" | "compliance" | "security" | "operational" | "ux" | "architecture" | "data_governance" | "rate_limit";
|
|
748
|
+
id: string;
|
|
749
|
+
name: string;
|
|
750
|
+
enabled: boolean;
|
|
751
|
+
priority: number;
|
|
752
|
+
conditions: {
|
|
753
|
+
field: string;
|
|
754
|
+
operator: "custom" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "in" | "not_in" | "matches_regex" | "exists" | "not_exists";
|
|
755
|
+
value?: unknown;
|
|
756
|
+
customEvaluator?: string | undefined;
|
|
757
|
+
}[];
|
|
758
|
+
conditionLogic: "all" | "any";
|
|
759
|
+
actions: {
|
|
760
|
+
type: "rate_limit" | "allow" | "deny" | "require_approval" | "warn" | "log" | "transform" | "escalate" | "notify";
|
|
761
|
+
params?: Record<string, unknown> | undefined;
|
|
762
|
+
message?: string | undefined;
|
|
763
|
+
}[];
|
|
764
|
+
riskWeight: number;
|
|
765
|
+
description?: string | undefined;
|
|
766
|
+
metadata?: Record<string, unknown> | undefined;
|
|
767
|
+
tags?: string[] | undefined;
|
|
768
|
+
version?: string | undefined;
|
|
769
|
+
deprecated?: boolean | undefined;
|
|
770
|
+
deprecatedMessage?: string | undefined;
|
|
771
|
+
replacedBy?: string | undefined;
|
|
772
|
+
minVersion?: string | undefined;
|
|
773
|
+
dependsOn?: string[] | undefined;
|
|
774
|
+
conflictsWith?: string[] | undefined;
|
|
775
|
+
relatedRules?: string[] | undefined;
|
|
776
|
+
}[];
|
|
777
|
+
description: string;
|
|
778
|
+
};
|
|
779
|
+
};
|
|
780
|
+
/**
|
|
781
|
+
* Get rules by project profile
|
|
782
|
+
*/
|
|
783
|
+
export declare function getRulesByProfile(profile: keyof typeof projectProfiles): BusinessRule[];
|
|
784
|
+
/**
|
|
785
|
+
* Get rules by priority threshold
|
|
786
|
+
*/
|
|
787
|
+
export declare function getRulesByPriority(minPriority: number, maxPriority?: number): BusinessRule[];
|
|
788
|
+
/**
|
|
789
|
+
* Get a summary of rules by type
|
|
790
|
+
*/
|
|
791
|
+
export declare function getRuleSummary(): Record<string, number>;
|
|
792
|
+
/**
|
|
793
|
+
* List available project profiles
|
|
794
|
+
*/
|
|
795
|
+
export declare function listProjectProfiles(): Array<{
|
|
796
|
+
key: string;
|
|
797
|
+
name: string;
|
|
798
|
+
description: string;
|
|
799
|
+
ruleCount: number;
|
|
800
|
+
}>;
|
|
801
|
+
/**
|
|
802
|
+
* Task #39: Get all deprecated rules
|
|
803
|
+
*/
|
|
804
|
+
export declare function getDeprecatedRules(): BusinessRule[];
|
|
805
|
+
/**
|
|
806
|
+
* Task #39: Get rules that are compatible with a specific supervisor version
|
|
807
|
+
*/
|
|
808
|
+
export declare function getRulesCompatibleWithVersion(version: string): BusinessRule[];
|
|
809
|
+
/**
|
|
810
|
+
* Task #39: Get rules that are NOT deprecated (active rules)
|
|
811
|
+
*/
|
|
812
|
+
export declare function getActiveBuiltInRules(): BusinessRule[];
|
|
813
|
+
/**
|
|
814
|
+
* Task #39: Get migration suggestions for deprecated rules in use
|
|
815
|
+
*/
|
|
816
|
+
export declare function getMigrationSuggestions(ruleIds: string[]): Array<{
|
|
817
|
+
ruleId: string;
|
|
818
|
+
ruleName: string;
|
|
819
|
+
deprecatedMessage?: string;
|
|
820
|
+
replacedBy?: string;
|
|
821
|
+
suggestion: string;
|
|
822
|
+
}>;
|
|
823
|
+
export { createAuthenticationRule, createDataAccessRule, createBulkDataAccessRule, createRateLimitRule, createComplianceRule, createEnvironmentRule, createSecurityRule, createOperationalRule, createDenyRule, createApprovalRule, createWarningRule, createAuditRule, createComplianceRuleSet, createSecurityRuleSet, COMPLIANCE_FRAMEWORKS, INJECTION_PATTERNS, type AuthenticationRuleOptions, type DataAccessRuleOptions, type RateLimitRuleOptions, type ComplianceRuleOptions, type EnvironmentRuleOptions, type SecurityRuleOptions, type OperationalRuleOptions, type ComplianceFramework, type BaseRuleOptions } from './patterns.js';
|
|
824
|
+
export { ActionFields, EnvironmentFields, UserFields, DataFields, OperationFields, SecurityFields, ComplianceFields, OperationalFields, TestingFields, ApiFields, UxFields, WebSocketFields, MlAiFields, FrameworkFields, Fields, LegacyFieldMappings, validateFieldName, validateRuleConditions, getLegacyFieldWarnings, toStandardFieldPath, type StandardFieldPath, type FieldCategory, type FieldValidationResult } from './field-standards.js';
|
|
825
|
+
export { optimizeConditions, optimizeRule, optimizeRules, combineEqualsToIn, reorderForShortCircuit, removeRedundant, simplifyConditions, analyzeRulesForOptimization, DEFAULT_FIELD_COSTS, type OptimizationResult, type OptimizationChange, type FieldCost } from './condition-optimizer.js';
|
|
826
|
+
export { createAuditLoggingRule, createDataTypeAuditRule, createEncryptionRule, createValidationRule, createProductionRule, createDebugModeRule, createProductionHttpsRule, createProductionMonitoringRule, AUDIT_CATEGORIES, AUDIT_LOG_ACTION, ENCRYPTION_CONDITION, HTTPS_PROTOCOL_CONDITION, TLS_CONDITION, VALIDATION_REQUIRED_CONDITION, FILE_VALIDATION_CONDITION, MESSAGE_VALIDATION_CONDITION, SIGNATURE_VALIDATION_CONDITION, RATE_LIMIT_ENABLED_CONDITION, MESSAGE_RATE_LIMIT_CONDITION, PRODUCTION_ENV_CONDITION, sharedPatterns } from './shared-patterns.js';
|
|
827
|
+
//# sourceMappingURL=index.d.ts.map
|