@company-semantics/contracts 0.9.0 → 0.10.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/package.json +1 -1
- package/src/guards/config.ts +30 -0
- package/src/guards/index.ts +2 -0
- package/src/index.ts +2 -0
package/package.json
CHANGED
package/src/guards/config.ts
CHANGED
|
@@ -126,6 +126,36 @@ export type GuardCheckFactory = (
|
|
|
126
126
|
overrides?: Partial<GuardConfig>
|
|
127
127
|
) => GuardCheck;
|
|
128
128
|
|
|
129
|
+
// =============================================================================
|
|
130
|
+
// Guard Registry (Phase 3 Orchestration)
|
|
131
|
+
// =============================================================================
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* A check that can be run synchronously or asynchronously.
|
|
135
|
+
* Simpler signature for registry - no config injection (already bound).
|
|
136
|
+
*/
|
|
137
|
+
export type BoundGuardCheck = () => Promise<CheckResult> | CheckResult;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Registry of checks grouped by tier.
|
|
141
|
+
* Each repo exports this from guard-entries.ts for universal orchestration.
|
|
142
|
+
*
|
|
143
|
+
* Design: Checks are already bound to their config at export time.
|
|
144
|
+
* The orchestrator just runs them and aggregates results.
|
|
145
|
+
*/
|
|
146
|
+
export interface GuardCheckRegistry {
|
|
147
|
+
/** Tool name for JSON output and logging */
|
|
148
|
+
toolName: string;
|
|
149
|
+
|
|
150
|
+
/** Checks grouped by tier */
|
|
151
|
+
checks: {
|
|
152
|
+
structural?: BoundGuardCheck[];
|
|
153
|
+
behavioral?: BoundGuardCheck[];
|
|
154
|
+
invariants?: BoundGuardCheck[];
|
|
155
|
+
evolution?: BoundGuardCheck[];
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
|
|
129
159
|
// =============================================================================
|
|
130
160
|
// Default Values
|
|
131
161
|
// =============================================================================
|
package/src/guards/index.ts
CHANGED