@dcdr/contracts 2.5.3 → 2.7.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/README.md +12 -0
- package/dist/capabilities.contract.d.ts +2 -0
- package/dist/capabilities.contract.d.ts.map +1 -1
- package/dist/capabilities.contract.js +11 -0
- package/dist/control.contract.d.ts +10 -0
- package/dist/control.contract.d.ts.map +1 -1
- package/dist/execution.contract.d.ts +10 -0
- package/dist/execution.contract.d.ts.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/intent.contract.d.ts +11 -0
- package/dist/intent.contract.d.ts.map +1 -1
- package/dist/processing.contract.d.ts +437 -0
- package/dist/processing.contract.d.ts.map +1 -0
- package/dist/processing.contract.js +1396 -0
- package/dist/provider-limits.contract.d.ts +39 -0
- package/dist/provider-limits.contract.d.ts.map +1 -0
- package/dist/provider-limits.contract.js +2 -0
- package/dist/service-tokens.contract.d.ts +35 -0
- package/dist/service-tokens.contract.d.ts.map +1 -1
- package/dist/service-tokens.contract.js +11 -7
- package/package.json +5 -1
|
@@ -0,0 +1,437 @@
|
|
|
1
|
+
import { ImplementationCondition, LogicalImplementationCondition } from "./implementations.contract";
|
|
2
|
+
export { ConditionLogicOp, ConditionOp, ImplementationCondition, LogicalImplementationCondition, } from "./implementations.contract";
|
|
3
|
+
/**
|
|
4
|
+
* Processing stage around the existing intent execution core.
|
|
5
|
+
*
|
|
6
|
+
* Notes
|
|
7
|
+
* - `INPUT` runs before prompt rendering / provider execution.
|
|
8
|
+
* - `OUTPUT` runs after provider execution and before the final response/report is finalized.
|
|
9
|
+
*/
|
|
10
|
+
export declare enum ProcessingStage {
|
|
11
|
+
INPUT = "INPUT",
|
|
12
|
+
OUTPUT = "OUTPUT"
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Atomic built-in processing rule kinds supported by the governed intent-processing engine.
|
|
16
|
+
*
|
|
17
|
+
* Notes
|
|
18
|
+
* - Keep values stable because frontend preview/testing and runtime execution must share semantics.
|
|
19
|
+
* - These are intentionally small primitives; product-facing processors are composed from them.
|
|
20
|
+
*/
|
|
21
|
+
export declare enum ProcessingRuleKind {
|
|
22
|
+
TRIM = "TRIM",
|
|
23
|
+
COLLAPSE_WHITESPACE = "COLLAPSE_WHITESPACE",
|
|
24
|
+
NORMALIZE_NEW_LINES = "NORMALIZE_NEW_LINES",
|
|
25
|
+
REMOVE_CONTROL_CHARS = "REMOVE_CONTROL_CHARS",
|
|
26
|
+
TO_LOWERCASE = "TO_LOWERCASE",
|
|
27
|
+
TO_UPPERCASE = "TO_UPPERCASE",
|
|
28
|
+
REPLACE_LITERAL = "REPLACE_LITERAL",
|
|
29
|
+
REPLACE_REGEX = "REPLACE_REGEX",
|
|
30
|
+
PREFIX = "PREFIX",
|
|
31
|
+
SUFFIX = "SUFFIX",
|
|
32
|
+
SLICE = "SLICE",
|
|
33
|
+
JSON_STRINGIFY = "JSON_STRINGIFY",
|
|
34
|
+
JSON_PARSE_STRING_FIELD = "JSON_PARSE_STRING_FIELD",
|
|
35
|
+
REMOVE_EMPTY_FIELDS = "REMOVE_EMPTY_FIELDS",
|
|
36
|
+
COALESCE_NULLISH = "COALESCE_NULLISH",
|
|
37
|
+
SET_DEFAULT_VALUE = "SET_DEFAULT_VALUE",
|
|
38
|
+
MAP_ENUM_VALUE = "MAP_ENUM_VALUE",
|
|
39
|
+
ALLOW_VALUE_SET = "ALLOW_VALUE_SET",
|
|
40
|
+
DENY_VALUE_SET = "DENY_VALUE_SET",
|
|
41
|
+
LENGTH_CHECK = "LENGTH_CHECK",
|
|
42
|
+
REGEX_MATCH_CHECK = "REGEX_MATCH_CHECK",
|
|
43
|
+
SECRET_DETECTION = "SECRET_DETECTION",
|
|
44
|
+
PII_DETECTION = "PII_DETECTION",
|
|
45
|
+
PII_REDACTION = "PII_REDACTION",
|
|
46
|
+
HASH_VALUE = "HASH_VALUE",
|
|
47
|
+
MASK_SUBSTRING = "MASK_SUBSTRING",
|
|
48
|
+
PROVIDER_POLICY_CHECK = "PROVIDER_POLICY_CHECK",
|
|
49
|
+
MODEL_POLICY_CHECK = "MODEL_POLICY_CHECK",
|
|
50
|
+
OUTPUT_SCHEMA_VALIDATION = "OUTPUT_SCHEMA_VALIDATION",
|
|
51
|
+
OUTPUT_POLICY_CHECK = "OUTPUT_POLICY_CHECK",
|
|
52
|
+
REVIEW_ROUTING = "REVIEW_ROUTING"
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Presentation grouping for built-in atomic rule kinds.
|
|
56
|
+
*
|
|
57
|
+
* Notes
|
|
58
|
+
* - This is metadata for UI discoverability and authoring ergonomics.
|
|
59
|
+
* - Runtime behavior must still be keyed only by `ProcessingRuleKind`.
|
|
60
|
+
*/
|
|
61
|
+
export declare enum ProcessingRuleGroup {
|
|
62
|
+
TEXT_TRANSFORM = "TEXT_TRANSFORM",
|
|
63
|
+
VALUE_NORMALIZATION = "VALUE_NORMALIZATION",
|
|
64
|
+
VALIDATION_POLICY = "VALIDATION_POLICY",
|
|
65
|
+
SECURITY_PRIVACY = "SECURITY_PRIVACY"
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Logical target family a processing rule operates on.
|
|
69
|
+
*/
|
|
70
|
+
export declare enum ProcessingTargetKind {
|
|
71
|
+
DATA_FIELD = "DATA_FIELD",
|
|
72
|
+
FULL_PAYLOAD = "FULL_PAYLOAD",
|
|
73
|
+
EXECUTION_CONTEXT = "EXECUTION_CONTEXT"
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Effective action taken by a processing rule.
|
|
77
|
+
*/
|
|
78
|
+
export declare enum ProcessingAction {
|
|
79
|
+
NONE = "NONE",
|
|
80
|
+
WARN = "WARN",
|
|
81
|
+
BLOCK = "BLOCK",
|
|
82
|
+
REDACT = "REDACT",
|
|
83
|
+
REQUIRE_REVIEW = "REQUIRE_REVIEW",
|
|
84
|
+
ANNOTATE = "ANNOTATE"
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Stable policy-oriented outcome classification for governance rules.
|
|
88
|
+
*
|
|
89
|
+
* Notes
|
|
90
|
+
* - This is intentionally broader than a single trail action so frontend, backend, and
|
|
91
|
+
* reporting can reason about governance decisions without inferring semantics from free text.
|
|
92
|
+
*/
|
|
93
|
+
export declare enum ProcessingPolicyOutcome {
|
|
94
|
+
ALLOW = "ALLOW",
|
|
95
|
+
BLOCK = "BLOCK",
|
|
96
|
+
REQUIRE_REVIEW = "REQUIRE_REVIEW",
|
|
97
|
+
REDACT = "REDACT",
|
|
98
|
+
WARN = "WARN"
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Stable reason codes for policy-oriented processing outcomes.
|
|
102
|
+
*
|
|
103
|
+
* Notes
|
|
104
|
+
* - Keep these values wire-stable because they are intended for frontend previews,
|
|
105
|
+
* backend analytics, and bounded execution trail aggregation.
|
|
106
|
+
* - Region-related reasons are contract-ready today, but runtime may only emit them when
|
|
107
|
+
* explicit region context is available.
|
|
108
|
+
*/
|
|
109
|
+
export declare enum ProcessingPolicyReasonCode {
|
|
110
|
+
PROVIDER_ALLOWED = "PROVIDER_ALLOWED",
|
|
111
|
+
PROVIDER_NOT_ALLOWED = "PROVIDER_NOT_ALLOWED",
|
|
112
|
+
PROVIDER_CONTEXT_MISSING = "PROVIDER_CONTEXT_MISSING",
|
|
113
|
+
PROVIDER_REGION_NOT_ALLOWED = "PROVIDER_REGION_NOT_ALLOWED",
|
|
114
|
+
MODEL_ALLOWED = "MODEL_ALLOWED",
|
|
115
|
+
MODEL_NOT_ALLOWED = "MODEL_NOT_ALLOWED",
|
|
116
|
+
MODEL_CONTEXT_MISSING = "MODEL_CONTEXT_MISSING",
|
|
117
|
+
REGION_ALLOWED = "REGION_ALLOWED",
|
|
118
|
+
REGION_CONTEXT_MISSING = "REGION_CONTEXT_MISSING",
|
|
119
|
+
OUTPUT_POLICY_FLAGGED = "OUTPUT_POLICY_FLAGGED",
|
|
120
|
+
OUTPUT_POLICY_NO_MATCH = "OUTPUT_POLICY_NO_MATCH",
|
|
121
|
+
REVIEW_QUEUE_REQUIRED = "REVIEW_QUEUE_REQUIRED",
|
|
122
|
+
REVIEW_ROUTING_NO_MATCH = "REVIEW_ROUTING_NO_MATCH"
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Stable catalog of output-policy references exposed to frontend/runtime authoring.
|
|
126
|
+
*
|
|
127
|
+
* Notes
|
|
128
|
+
* - These are DCDR-owned semantic policy identifiers, not backend-generated free text.
|
|
129
|
+
* - Additional values can be added additively as product policy coverage expands.
|
|
130
|
+
*/
|
|
131
|
+
export declare enum ProcessingOutputPolicyRef {
|
|
132
|
+
DEFAULT_OUTPUT_POLICY = "DEFAULT_OUTPUT_POLICY",
|
|
133
|
+
MANUAL_REVIEW_POLICY = "MANUAL_REVIEW_POLICY",
|
|
134
|
+
PII_OUTPUT_POLICY = "PII_OUTPUT_POLICY",
|
|
135
|
+
SECRET_LEAKAGE_POLICY = "SECRET_LEAKAGE_POLICY"
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Stable catalog of review queues exposed to frontend/runtime authoring.
|
|
139
|
+
*
|
|
140
|
+
* Notes
|
|
141
|
+
* - Keep these values stable because they are intended for UI selects,
|
|
142
|
+
* bounded execution trail projection, and backend aggregation.
|
|
143
|
+
*/
|
|
144
|
+
export declare enum ProcessingReviewQueue {
|
|
145
|
+
HUMAN_COMPLIANCE = "HUMAN_COMPLIANCE",
|
|
146
|
+
SECURITY_REVIEW = "SECURITY_REVIEW",
|
|
147
|
+
OUTPUT_QA = "OUTPUT_QA",
|
|
148
|
+
MANUAL_REVIEW = "MANUAL_REVIEW"
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Failure behavior when a rule handler itself errors.
|
|
152
|
+
*/
|
|
153
|
+
export declare enum ProcessingFailureMode {
|
|
154
|
+
FAIL_CLOSED = "FAIL_CLOSED",
|
|
155
|
+
FAIL_OPEN = "FAIL_OPEN",
|
|
156
|
+
WARN_ONLY = "WARN_ONLY"
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Trail/evidence entry family recorded for one processing rule execution.
|
|
160
|
+
*/
|
|
161
|
+
export declare enum ProcessingEvidenceKind {
|
|
162
|
+
RULE_MATCHED = "RULE_MATCHED",
|
|
163
|
+
RULE_MUTATED = "RULE_MUTATED",
|
|
164
|
+
RULE_BLOCKED = "RULE_BLOCKED",
|
|
165
|
+
RULE_WARNED = "RULE_WARNED",
|
|
166
|
+
RULE_FAILED = "RULE_FAILED",
|
|
167
|
+
RULE_REVIEW_REQUIRED = "RULE_REVIEW_REQUIRED"
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Declares where a processor originated in the effective execution pipeline.
|
|
171
|
+
*/
|
|
172
|
+
export declare enum ProcessingScope {
|
|
173
|
+
GLOBAL = "GLOBAL",
|
|
174
|
+
INTENT = "INTENT"
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Declares whether a rule can be executed exactly outside the runtime.
|
|
178
|
+
*/
|
|
179
|
+
export declare enum ProcessingRuntimeMode {
|
|
180
|
+
PURE = "PURE",
|
|
181
|
+
RUNTIME_REQUIRED = "RUNTIME_REQUIRED",
|
|
182
|
+
PREVIEW_APPROXIMABLE = "PREVIEW_APPROXIMABLE"
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Cache/hashing posture for one rule.
|
|
186
|
+
*/
|
|
187
|
+
export declare enum ProcessingCacheBehavior {
|
|
188
|
+
CACHE_SAFE = "CACHE_SAFE",
|
|
189
|
+
CACHE_UNSAFE = "CACHE_UNSAFE",
|
|
190
|
+
CACHE_BYPASS_REQUIRED = "CACHE_BYPASS_REQUIRED"
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* UI/runtime-facing configuration field types for rule-specific parameters.
|
|
194
|
+
*/
|
|
195
|
+
export declare enum ProcessingRuleConfigValueType {
|
|
196
|
+
STRING = "STRING",
|
|
197
|
+
NUMBER = "NUMBER",
|
|
198
|
+
BOOLEAN = "BOOLEAN",
|
|
199
|
+
ENUM = "ENUM",
|
|
200
|
+
STRING_LIST = "STRING_LIST",
|
|
201
|
+
NUMBER_LIST = "NUMBER_LIST",
|
|
202
|
+
BOOLEAN_LIST = "BOOLEAN_LIST"
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Explicit regex flags available to the built-in `REPLACE_REGEX` atomic rule.
|
|
206
|
+
*/
|
|
207
|
+
export declare enum ProcessingRegexFlag {
|
|
208
|
+
GLOBAL = "GLOBAL",
|
|
209
|
+
CASE_INSENSITIVE = "CASE_INSENSITIVE",
|
|
210
|
+
MULTILINE = "MULTILINE",
|
|
211
|
+
DOT_ALL = "DOT_ALL",
|
|
212
|
+
UNICODE = "UNICODE"
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Declarative definition for one rule-specific configuration field.
|
|
216
|
+
*/
|
|
217
|
+
export interface ProcessingRuleConfigFieldDefinition {
|
|
218
|
+
key: string;
|
|
219
|
+
label?: string;
|
|
220
|
+
description?: string;
|
|
221
|
+
type: ProcessingRuleConfigValueType;
|
|
222
|
+
required?: boolean;
|
|
223
|
+
defaultValue?: string | number | boolean | null | string[] | number[] | boolean[];
|
|
224
|
+
enumValues?: string[];
|
|
225
|
+
min?: number;
|
|
226
|
+
max?: number;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Shared static schema definition for one built-in atomic rule kind.
|
|
230
|
+
*/
|
|
231
|
+
export interface ProcessingRuleSchemaDefinition {
|
|
232
|
+
kind: ProcessingRuleKind;
|
|
233
|
+
group: ProcessingRuleGroup;
|
|
234
|
+
label?: string;
|
|
235
|
+
description?: string;
|
|
236
|
+
allowedStages: ProcessingStage[];
|
|
237
|
+
supportsFieldPaths: boolean;
|
|
238
|
+
supportsStopOnMatch: boolean;
|
|
239
|
+
defaultFailureMode?: ProcessingFailureMode;
|
|
240
|
+
defaultCacheBehavior?: ProcessingCacheBehavior;
|
|
241
|
+
configurationFields: ProcessingRuleConfigFieldDefinition[];
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Named configuration map for one configured processing rule instance.
|
|
245
|
+
*/
|
|
246
|
+
export interface ProcessingRuleConfigurationMap {
|
|
247
|
+
[key: string]: string | number | boolean | null | string[] | number[] | boolean[];
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Stable validation issue codes for configured processing rules/processors.
|
|
251
|
+
*/
|
|
252
|
+
export declare enum ProcessingValidationIssueCode {
|
|
253
|
+
RULE_KIND_UNSUPPORTED = "RULE_KIND_UNSUPPORTED",
|
|
254
|
+
RULE_STAGE_NOT_ALLOWED = "RULE_STAGE_NOT_ALLOWED",
|
|
255
|
+
FIELD_PATHS_NOT_SUPPORTED = "FIELD_PATHS_NOT_SUPPORTED",
|
|
256
|
+
STOP_ON_MATCH_NOT_SUPPORTED = "STOP_ON_MATCH_NOT_SUPPORTED",
|
|
257
|
+
CONDITION_INVALID = "CONDITION_INVALID",
|
|
258
|
+
CONFIG_KEY_UNKNOWN = "CONFIG_KEY_UNKNOWN",
|
|
259
|
+
CONFIG_REQUIRED_MISSING = "CONFIG_REQUIRED_MISSING",
|
|
260
|
+
CONFIG_TYPE_INVALID = "CONFIG_TYPE_INVALID",
|
|
261
|
+
CONFIG_ENUM_INVALID = "CONFIG_ENUM_INVALID",
|
|
262
|
+
CONFIG_MIN_INVALID = "CONFIG_MIN_INVALID",
|
|
263
|
+
CONFIG_MAX_INVALID = "CONFIG_MAX_INVALID",
|
|
264
|
+
PROCESSOR_RULES_REQUIRED = "PROCESSOR_RULES_REQUIRED"
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* One validation issue found while checking a configured processing rule/processor.
|
|
268
|
+
*/
|
|
269
|
+
export interface ProcessingValidationIssue {
|
|
270
|
+
path: string;
|
|
271
|
+
code: ProcessingValidationIssueCode;
|
|
272
|
+
message: string;
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Pure validation result for a configured processing rule/processor.
|
|
276
|
+
*/
|
|
277
|
+
export interface ProcessingValidationResult {
|
|
278
|
+
valid: boolean;
|
|
279
|
+
issues: ProcessingValidationIssue[];
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Declarative atomic rule definition shared by runtime and frontend preview tooling.
|
|
283
|
+
*/
|
|
284
|
+
export interface ProcessingRuleDefinition {
|
|
285
|
+
id: string;
|
|
286
|
+
name?: string;
|
|
287
|
+
enabled?: boolean;
|
|
288
|
+
kind: ProcessingRuleKind;
|
|
289
|
+
/**
|
|
290
|
+
* Optional shared condition tree that decides whether this rule should run.
|
|
291
|
+
*
|
|
292
|
+
* Notes
|
|
293
|
+
* - Reuses the same condition contract as conditioned routing so frontend authoring
|
|
294
|
+
* and preview tooling can share one UI model.
|
|
295
|
+
* - The processing engine evaluates this condition against the selected rule scope.
|
|
296
|
+
*/
|
|
297
|
+
condition?: ImplementationCondition | LogicalImplementationCondition;
|
|
298
|
+
targetKind?: ProcessingTargetKind;
|
|
299
|
+
failureMode?: ProcessingFailureMode;
|
|
300
|
+
runtimeMode?: ProcessingRuntimeMode;
|
|
301
|
+
cacheBehavior?: ProcessingCacheBehavior;
|
|
302
|
+
stopOnMatch?: boolean;
|
|
303
|
+
fieldPaths?: string[];
|
|
304
|
+
configuration?: ProcessingRuleConfigurationMap;
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Declarative processing processor shared by runtime and frontend preview tooling.
|
|
308
|
+
*
|
|
309
|
+
* Notes
|
|
310
|
+
* - A processor is the product-facing unit attached to registry/intents.
|
|
311
|
+
* - A processor is versioned and contains an ordered sequence of atomic rules.
|
|
312
|
+
*/
|
|
313
|
+
export interface ProcessingProcessor {
|
|
314
|
+
id: string;
|
|
315
|
+
version: string;
|
|
316
|
+
name?: string;
|
|
317
|
+
enabled?: boolean;
|
|
318
|
+
stage: ProcessingStage;
|
|
319
|
+
order?: number;
|
|
320
|
+
rules: ProcessingRuleDefinition[];
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* One bounded evidence/mutation trail entry.
|
|
324
|
+
*/
|
|
325
|
+
export interface ProcessingTrailEntry {
|
|
326
|
+
sequence: number;
|
|
327
|
+
stage: ProcessingStage;
|
|
328
|
+
scope: ProcessingScope;
|
|
329
|
+
processorId: string;
|
|
330
|
+
processorVersion: string;
|
|
331
|
+
ruleId: string;
|
|
332
|
+
ruleKind: ProcessingRuleKind;
|
|
333
|
+
evidenceKind: ProcessingEvidenceKind;
|
|
334
|
+
action: ProcessingAction;
|
|
335
|
+
targetKind?: ProcessingTargetKind;
|
|
336
|
+
matched: boolean;
|
|
337
|
+
changed: boolean;
|
|
338
|
+
policyOutcome?: ProcessingPolicyOutcome;
|
|
339
|
+
policyReasonCode?: ProcessingPolicyReasonCode;
|
|
340
|
+
fieldPath?: string;
|
|
341
|
+
reasonCode?: string;
|
|
342
|
+
reason?: string;
|
|
343
|
+
beforeHash?: string;
|
|
344
|
+
afterHash?: string;
|
|
345
|
+
safePreviewBefore?: string;
|
|
346
|
+
safePreviewAfter?: string;
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Summary for one processing stage.
|
|
350
|
+
*/
|
|
351
|
+
export interface ProcessingStageSummary {
|
|
352
|
+
stage: ProcessingStage;
|
|
353
|
+
processorsConfigured: number;
|
|
354
|
+
processorsRun: number;
|
|
355
|
+
rulesConfigured: number;
|
|
356
|
+
rulesRun: number;
|
|
357
|
+
rulesMatched: number;
|
|
358
|
+
rulesApplied: number;
|
|
359
|
+
mutations: number;
|
|
360
|
+
mutated: boolean;
|
|
361
|
+
blocked: boolean;
|
|
362
|
+
reviewRequired: boolean;
|
|
363
|
+
cacheSafe: boolean;
|
|
364
|
+
cacheBypassRequired: boolean;
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Bounded processing report projected into execution reports and logs.
|
|
368
|
+
*/
|
|
369
|
+
export interface ExecutionProcessingReport {
|
|
370
|
+
engineVersion: string;
|
|
371
|
+
mutated: boolean;
|
|
372
|
+
blocked: boolean;
|
|
373
|
+
reviewRequired: boolean;
|
|
374
|
+
input: ProcessingStageSummary;
|
|
375
|
+
output: ProcessingStageSummary;
|
|
376
|
+
trail?: ProcessingTrailEntry[];
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* Static catalog of built-in atomic rule schemas shared across runtime and UI.
|
|
380
|
+
*/
|
|
381
|
+
export declare const PROCESSING_RULE_SCHEMAS: ProcessingRuleSchemaDefinition[];
|
|
382
|
+
/**
|
|
383
|
+
* Shared pure helpers for intent-processing processor definitions and report scaffolding.
|
|
384
|
+
*/
|
|
385
|
+
export declare class IntentProcessingSemantics {
|
|
386
|
+
/** Stable engine version identifier for the initial contracts/runtime slice. */
|
|
387
|
+
static readonly ENGINE_VERSION_V1 = "1";
|
|
388
|
+
/**
|
|
389
|
+
* Returns the shared static schema definition for one built-in rule kind.
|
|
390
|
+
*/
|
|
391
|
+
static getRuleSchema(kind: ProcessingRuleKind): ProcessingRuleSchemaDefinition | null;
|
|
392
|
+
/**
|
|
393
|
+
* Returns true when the given stage is allowed for the provided rule kind.
|
|
394
|
+
*/
|
|
395
|
+
static isStageAllowedForRuleKind(kind: ProcessingRuleKind, stage: ProcessingStage): boolean;
|
|
396
|
+
/**
|
|
397
|
+
* Builds a configuration map with schema defaults applied first and caller overrides layered on top.
|
|
398
|
+
*/
|
|
399
|
+
static buildRuleConfigurationWithDefaults(kind: ProcessingRuleKind, configuration?: ProcessingRuleConfigurationMap | null): ProcessingRuleConfigurationMap;
|
|
400
|
+
/**
|
|
401
|
+
* Validates one configured atomic rule instance against the shared static schema catalog.
|
|
402
|
+
*/
|
|
403
|
+
static validateRuleDefinition(rule: ProcessingRuleDefinition, stage: ProcessingStage): ProcessingValidationResult;
|
|
404
|
+
/**
|
|
405
|
+
* Validates one shared condition tree reused by processing rules.
|
|
406
|
+
*/
|
|
407
|
+
static validateConditionDefinition(condition: ImplementationCondition | LogicalImplementationCondition): ProcessingValidationResult;
|
|
408
|
+
/**
|
|
409
|
+
* Validates one configured processor instance and all of its rules.
|
|
410
|
+
*/
|
|
411
|
+
static validateProcessorDefinition(processor: ProcessingProcessor): ProcessingValidationResult;
|
|
412
|
+
/**
|
|
413
|
+
* Sorts processors for a given stage deterministically.
|
|
414
|
+
*/
|
|
415
|
+
static sortProcessorsForStage(processors: ProcessingProcessor[] | null | undefined, stage: ProcessingStage): ProcessingProcessor[];
|
|
416
|
+
/**
|
|
417
|
+
* Returns the ordered active rules for the given stage, flattened from processors.
|
|
418
|
+
*/
|
|
419
|
+
static flattenRulesForStage(processors: ProcessingProcessor[] | null | undefined, stage: ProcessingStage): ProcessingRuleDefinition[];
|
|
420
|
+
/**
|
|
421
|
+
* Returns true when every active rule for the stage is cache-safe.
|
|
422
|
+
*/
|
|
423
|
+
static isCacheSafeForStage(processors: ProcessingProcessor[] | null | undefined, stage: ProcessingStage): boolean;
|
|
424
|
+
/**
|
|
425
|
+
* Returns true when any active rule for the stage requires bypassing execution cache/dedupe.
|
|
426
|
+
*/
|
|
427
|
+
static isCacheBypassRequiredForStage(processors: ProcessingProcessor[] | null | undefined, stage: ProcessingStage): boolean;
|
|
428
|
+
/**
|
|
429
|
+
* Builds an empty stage summary with stable defaults.
|
|
430
|
+
*/
|
|
431
|
+
static buildEmptyStageSummary(stage: ProcessingStage): ProcessingStageSummary;
|
|
432
|
+
/**
|
|
433
|
+
* Builds an empty bounded processing report.
|
|
434
|
+
*/
|
|
435
|
+
static buildEmptyExecutionProcessingReport(): ExecutionProcessingReport;
|
|
436
|
+
}
|
|
437
|
+
//# sourceMappingURL=processing.contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"processing.contract.d.ts","sourceRoot":"","sources":["../src/processing.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,uBAAuB,EAC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