agent-contracts-runtime 0.30.3 → 0.30.4
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
CHANGED
|
@@ -104,7 +104,7 @@ function matchGlob(pattern: string, path: string): boolean {
|
|
|
104
104
|
export function checkFilePath(filePath: string): GuardrailCheckResult[] {
|
|
105
105
|
const results: GuardrailCheckResult[] = [];
|
|
106
106
|
for (const check of FILE_CHECKS) {
|
|
107
|
-
if ("exclude" in check && check.exclude && matchGlob(check.exclude, filePath)) {
|
|
107
|
+
if ("exclude" in check && check.exclude && matchGlob(check.exclude as string, filePath)) {
|
|
108
108
|
continue;
|
|
109
109
|
}
|
|
110
110
|
const matched = matchGlob(check.pattern, filePath);
|
|
@@ -144,10 +144,10 @@ const CONTENT_CHECKS = [
|
|
|
144
144
|
export function checkContent(filePath: string, content: string): GuardrailCheckResult[] {
|
|
145
145
|
const results: GuardrailCheckResult[] = [];
|
|
146
146
|
for (const check of CONTENT_CHECKS) {
|
|
147
|
-
if ("file_glob" in check && check.file_glob && !matchGlob(check.file_glob, filePath)) {
|
|
147
|
+
if ("file_glob" in check && check.file_glob && !matchGlob(check.file_glob as string, filePath)) {
|
|
148
148
|
continue;
|
|
149
149
|
}
|
|
150
|
-
if ("exclude_glob" in check && check.exclude_glob && matchGlob(check.exclude_glob, filePath)) {
|
|
150
|
+
if ("exclude_glob" in check && check.exclude_glob && matchGlob(check.exclude_glob as string, filePath)) {
|
|
151
151
|
continue;
|
|
152
152
|
}
|
|
153
153
|
const matched = check.pattern.test(content);
|