@adcp/sdk 13.0.0-rc.20 → 13.0.0-rc.21

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.
@@ -225,6 +225,15 @@ function evaluateCapabilityPredicate(predicate, actual) {
225
225
  }
226
226
  return null;
227
227
  }
228
+ if ("not_contains" in predicate) {
229
+ if (!Array.isArray(actual)) {
230
+ return `Capability predicate \`${predicate.path}\` must not contain ${JSON.stringify(predicate.not_contains)}: agent declared ${actual === void 0 ? "no value" : JSON.stringify(actual)}.`;
231
+ }
232
+ if (actual.includes(predicate.not_contains)) {
233
+ return `Capability predicate \`${predicate.path}\` must not contain ${JSON.stringify(predicate.not_contains)}: agent declared ${JSON.stringify(actual)}.`;
234
+ }
235
+ return null;
236
+ }
228
237
  if (actual === void 0) {
229
238
  return `Capability predicate \`${predicate.path} === ${JSON.stringify(predicate.equals)}\` not satisfied: agent did not declare support.`;
230
239
  }