@riddledc/riddle-proof 0.7.112 → 0.7.113

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.
@@ -1054,6 +1054,13 @@ function normalizeLinkStatusContentType(value) {
1054
1054
  const normalized = value?.split(";")[0]?.trim().toLowerCase();
1055
1055
  return normalized || void 0;
1056
1056
  }
1057
+ function linkStatusContentTypesMatch(actual, expected) {
1058
+ if (!actual || !expected) return false;
1059
+ if (expected.endsWith("/*")) return actual.startsWith(expected.slice(0, -1));
1060
+ if (actual === expected) return true;
1061
+ const yamlTypes = /* @__PURE__ */ new Set(["application/yaml", "application/x-yaml", "text/yaml", "text/x-yaml"]);
1062
+ return yamlTypes.has(actual) && yamlTypes.has(expected);
1063
+ }
1057
1064
  function linkStatusContentTypeOk(result, check) {
1058
1065
  const expected = check.allowed_content_types;
1059
1066
  if (!expected?.length) return true;
@@ -1062,8 +1069,7 @@ function linkStatusContentTypeOk(result, check) {
1062
1069
  return expected.some((contentType) => {
1063
1070
  const normalized = normalizeLinkStatusContentType(contentType);
1064
1071
  if (!normalized) return false;
1065
- if (normalized.endsWith("/*")) return actual.startsWith(normalized.slice(0, -1));
1066
- return actual === normalized;
1072
+ return linkStatusContentTypesMatch(actual, normalized);
1067
1073
  });
1068
1074
  }
1069
1075
  function httpStatusBodyContainsFailures(result, check) {
@@ -2474,6 +2480,13 @@ function normalizeLinkStatusContentType(value) {
2474
2480
  const normalized = (value.split(";")[0] || "").trim().toLowerCase();
2475
2481
  return normalized || undefined;
2476
2482
  }
2483
+ function linkStatusContentTypesMatch(actual, expected) {
2484
+ if (!actual || !expected) return false;
2485
+ if (expected.endsWith("/*")) return actual.startsWith(expected.slice(0, -1));
2486
+ if (actual === expected) return true;
2487
+ const yamlTypes = new Set(["application/yaml", "application/x-yaml", "text/yaml", "text/x-yaml"]);
2488
+ return yamlTypes.has(actual) && yamlTypes.has(expected);
2489
+ }
2477
2490
  function linkStatusContentTypeOk(result, check) {
2478
2491
  if (!Array.isArray(check.allowed_content_types) || !check.allowed_content_types.length) return true;
2479
2492
  const actual = normalizeLinkStatusContentType(result.content_type);
@@ -2481,8 +2494,7 @@ function linkStatusContentTypeOk(result, check) {
2481
2494
  return check.allowed_content_types.some((contentType) => {
2482
2495
  const normalized = normalizeLinkStatusContentType(contentType);
2483
2496
  if (!normalized) return false;
2484
- if (normalized.endsWith("/*")) return actual.startsWith(normalized.slice(0, -1));
2485
- return actual === normalized;
2497
+ return linkStatusContentTypesMatch(actual, normalized);
2486
2498
  });
2487
2499
  }
2488
2500
  function httpStatusBodyContainsFailures(result, check) {
@@ -4618,6 +4630,13 @@ function normalizeLinkProbeContentType(value) {
4618
4630
  const normalized = (value.split(";")[0] || "").trim().toLowerCase();
4619
4631
  return normalized || undefined;
4620
4632
  }
4633
+ function linkProbeContentTypesMatch(actual, expected) {
4634
+ if (!actual || !expected) return false;
4635
+ if (expected.endsWith("/*")) return actual.startsWith(expected.slice(0, -1));
4636
+ if (actual === expected) return true;
4637
+ const yamlTypes = new Set(["application/yaml", "application/x-yaml", "text/yaml", "text/x-yaml"]);
4638
+ return yamlTypes.has(actual) && yamlTypes.has(expected);
4639
+ }
4621
4640
  function linkProbeContentTypeAllowed(result, check) {
4622
4641
  if (!Array.isArray(check.allowed_content_types) || !check.allowed_content_types.length) return true;
4623
4642
  const actual = normalizeLinkProbeContentType(result.content_type);
@@ -4625,8 +4644,7 @@ function linkProbeContentTypeAllowed(result, check) {
4625
4644
  return check.allowed_content_types.some((contentType) => {
4626
4645
  const normalized = normalizeLinkProbeContentType(contentType);
4627
4646
  if (!normalized) return false;
4628
- if (normalized.endsWith("/*")) return actual.startsWith(normalized.slice(0, -1));
4629
- return actual === normalized;
4647
+ return linkProbeContentTypesMatch(actual, normalized);
4630
4648
  });
4631
4649
  }
4632
4650
  function linkProbeResponseFields(response, method) {
package/dist/cli.cjs CHANGED
@@ -7947,6 +7947,13 @@ function normalizeLinkStatusContentType(value) {
7947
7947
  const normalized = value?.split(";")[0]?.trim().toLowerCase();
7948
7948
  return normalized || void 0;
7949
7949
  }
7950
+ function linkStatusContentTypesMatch(actual, expected) {
7951
+ if (!actual || !expected) return false;
7952
+ if (expected.endsWith("/*")) return actual.startsWith(expected.slice(0, -1));
7953
+ if (actual === expected) return true;
7954
+ const yamlTypes = /* @__PURE__ */ new Set(["application/yaml", "application/x-yaml", "text/yaml", "text/x-yaml"]);
7955
+ return yamlTypes.has(actual) && yamlTypes.has(expected);
7956
+ }
7950
7957
  function linkStatusContentTypeOk(result, check) {
7951
7958
  const expected = check.allowed_content_types;
7952
7959
  if (!expected?.length) return true;
@@ -7955,8 +7962,7 @@ function linkStatusContentTypeOk(result, check) {
7955
7962
  return expected.some((contentType) => {
7956
7963
  const normalized = normalizeLinkStatusContentType(contentType);
7957
7964
  if (!normalized) return false;
7958
- if (normalized.endsWith("/*")) return actual.startsWith(normalized.slice(0, -1));
7959
- return actual === normalized;
7965
+ return linkStatusContentTypesMatch(actual, normalized);
7960
7966
  });
7961
7967
  }
7962
7968
  function httpStatusBodyContainsFailures(result, check) {
@@ -9351,6 +9357,13 @@ function normalizeLinkStatusContentType(value) {
9351
9357
  const normalized = (value.split(";")[0] || "").trim().toLowerCase();
9352
9358
  return normalized || undefined;
9353
9359
  }
9360
+ function linkStatusContentTypesMatch(actual, expected) {
9361
+ if (!actual || !expected) return false;
9362
+ if (expected.endsWith("/*")) return actual.startsWith(expected.slice(0, -1));
9363
+ if (actual === expected) return true;
9364
+ const yamlTypes = new Set(["application/yaml", "application/x-yaml", "text/yaml", "text/x-yaml"]);
9365
+ return yamlTypes.has(actual) && yamlTypes.has(expected);
9366
+ }
9354
9367
  function linkStatusContentTypeOk(result, check) {
9355
9368
  if (!Array.isArray(check.allowed_content_types) || !check.allowed_content_types.length) return true;
9356
9369
  const actual = normalizeLinkStatusContentType(result.content_type);
@@ -9358,8 +9371,7 @@ function linkStatusContentTypeOk(result, check) {
9358
9371
  return check.allowed_content_types.some((contentType) => {
9359
9372
  const normalized = normalizeLinkStatusContentType(contentType);
9360
9373
  if (!normalized) return false;
9361
- if (normalized.endsWith("/*")) return actual.startsWith(normalized.slice(0, -1));
9362
- return actual === normalized;
9374
+ return linkStatusContentTypesMatch(actual, normalized);
9363
9375
  });
9364
9376
  }
9365
9377
  function httpStatusBodyContainsFailures(result, check) {
@@ -11495,6 +11507,13 @@ function normalizeLinkProbeContentType(value) {
11495
11507
  const normalized = (value.split(";")[0] || "").trim().toLowerCase();
11496
11508
  return normalized || undefined;
11497
11509
  }
11510
+ function linkProbeContentTypesMatch(actual, expected) {
11511
+ if (!actual || !expected) return false;
11512
+ if (expected.endsWith("/*")) return actual.startsWith(expected.slice(0, -1));
11513
+ if (actual === expected) return true;
11514
+ const yamlTypes = new Set(["application/yaml", "application/x-yaml", "text/yaml", "text/x-yaml"]);
11515
+ return yamlTypes.has(actual) && yamlTypes.has(expected);
11516
+ }
11498
11517
  function linkProbeContentTypeAllowed(result, check) {
11499
11518
  if (!Array.isArray(check.allowed_content_types) || !check.allowed_content_types.length) return true;
11500
11519
  const actual = normalizeLinkProbeContentType(result.content_type);
@@ -11502,8 +11521,7 @@ function linkProbeContentTypeAllowed(result, check) {
11502
11521
  return check.allowed_content_types.some((contentType) => {
11503
11522
  const normalized = normalizeLinkProbeContentType(contentType);
11504
11523
  if (!normalized) return false;
11505
- if (normalized.endsWith("/*")) return actual.startsWith(normalized.slice(0, -1));
11506
- return actual === normalized;
11524
+ return linkProbeContentTypesMatch(actual, normalized);
11507
11525
  });
11508
11526
  }
11509
11527
  function linkProbeResponseFields(response, method) {
package/dist/cli.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  profileStatusExitCode,
11
11
  resolveRiddleProofProfileTargetUrl,
12
12
  resolveRiddleProofProfileTimeoutSec
13
- } from "./chunk-2ZZS7RD5.js";
13
+ } from "./chunk-3CND75DM.js";
14
14
  import {
15
15
  createRiddleApiClient,
16
16
  parseRiddleViewport
package/dist/index.cjs CHANGED
@@ -9784,6 +9784,13 @@ function normalizeLinkStatusContentType(value) {
9784
9784
  const normalized = value?.split(";")[0]?.trim().toLowerCase();
9785
9785
  return normalized || void 0;
9786
9786
  }
9787
+ function linkStatusContentTypesMatch(actual, expected) {
9788
+ if (!actual || !expected) return false;
9789
+ if (expected.endsWith("/*")) return actual.startsWith(expected.slice(0, -1));
9790
+ if (actual === expected) return true;
9791
+ const yamlTypes = /* @__PURE__ */ new Set(["application/yaml", "application/x-yaml", "text/yaml", "text/x-yaml"]);
9792
+ return yamlTypes.has(actual) && yamlTypes.has(expected);
9793
+ }
9787
9794
  function linkStatusContentTypeOk(result, check) {
9788
9795
  const expected = check.allowed_content_types;
9789
9796
  if (!expected?.length) return true;
@@ -9792,8 +9799,7 @@ function linkStatusContentTypeOk(result, check) {
9792
9799
  return expected.some((contentType) => {
9793
9800
  const normalized = normalizeLinkStatusContentType(contentType);
9794
9801
  if (!normalized) return false;
9795
- if (normalized.endsWith("/*")) return actual.startsWith(normalized.slice(0, -1));
9796
- return actual === normalized;
9802
+ return linkStatusContentTypesMatch(actual, normalized);
9797
9803
  });
9798
9804
  }
9799
9805
  function httpStatusBodyContainsFailures(result, check) {
@@ -11204,6 +11210,13 @@ function normalizeLinkStatusContentType(value) {
11204
11210
  const normalized = (value.split(";")[0] || "").trim().toLowerCase();
11205
11211
  return normalized || undefined;
11206
11212
  }
11213
+ function linkStatusContentTypesMatch(actual, expected) {
11214
+ if (!actual || !expected) return false;
11215
+ if (expected.endsWith("/*")) return actual.startsWith(expected.slice(0, -1));
11216
+ if (actual === expected) return true;
11217
+ const yamlTypes = new Set(["application/yaml", "application/x-yaml", "text/yaml", "text/x-yaml"]);
11218
+ return yamlTypes.has(actual) && yamlTypes.has(expected);
11219
+ }
11207
11220
  function linkStatusContentTypeOk(result, check) {
11208
11221
  if (!Array.isArray(check.allowed_content_types) || !check.allowed_content_types.length) return true;
11209
11222
  const actual = normalizeLinkStatusContentType(result.content_type);
@@ -11211,8 +11224,7 @@ function linkStatusContentTypeOk(result, check) {
11211
11224
  return check.allowed_content_types.some((contentType) => {
11212
11225
  const normalized = normalizeLinkStatusContentType(contentType);
11213
11226
  if (!normalized) return false;
11214
- if (normalized.endsWith("/*")) return actual.startsWith(normalized.slice(0, -1));
11215
- return actual === normalized;
11227
+ return linkStatusContentTypesMatch(actual, normalized);
11216
11228
  });
11217
11229
  }
11218
11230
  function httpStatusBodyContainsFailures(result, check) {
@@ -13348,6 +13360,13 @@ function normalizeLinkProbeContentType(value) {
13348
13360
  const normalized = (value.split(";")[0] || "").trim().toLowerCase();
13349
13361
  return normalized || undefined;
13350
13362
  }
13363
+ function linkProbeContentTypesMatch(actual, expected) {
13364
+ if (!actual || !expected) return false;
13365
+ if (expected.endsWith("/*")) return actual.startsWith(expected.slice(0, -1));
13366
+ if (actual === expected) return true;
13367
+ const yamlTypes = new Set(["application/yaml", "application/x-yaml", "text/yaml", "text/x-yaml"]);
13368
+ return yamlTypes.has(actual) && yamlTypes.has(expected);
13369
+ }
13351
13370
  function linkProbeContentTypeAllowed(result, check) {
13352
13371
  if (!Array.isArray(check.allowed_content_types) || !check.allowed_content_types.length) return true;
13353
13372
  const actual = normalizeLinkProbeContentType(result.content_type);
@@ -13355,8 +13374,7 @@ function linkProbeContentTypeAllowed(result, check) {
13355
13374
  return check.allowed_content_types.some((contentType) => {
13356
13375
  const normalized = normalizeLinkProbeContentType(contentType);
13357
13376
  if (!normalized) return false;
13358
- if (normalized.endsWith("/*")) return actual.startsWith(normalized.slice(0, -1));
13359
- return actual === normalized;
13377
+ return linkProbeContentTypesMatch(actual, normalized);
13360
13378
  });
13361
13379
  }
13362
13380
  function linkProbeResponseFields(response, method) {
package/dist/index.js CHANGED
@@ -59,7 +59,7 @@ import {
59
59
  resolveRiddleProofProfileTimeoutSec,
60
60
  slugifyRiddleProofProfileName,
61
61
  summarizeRiddleProofProfileResult
62
- } from "./chunk-2ZZS7RD5.js";
62
+ } from "./chunk-3CND75DM.js";
63
63
  import {
64
64
  DEFAULT_RIDDLE_API_BASE_URL,
65
65
  DEFAULT_RIDDLE_API_KEY_FILE,
package/dist/profile.cjs CHANGED
@@ -1098,6 +1098,13 @@ function normalizeLinkStatusContentType(value) {
1098
1098
  const normalized = value?.split(";")[0]?.trim().toLowerCase();
1099
1099
  return normalized || void 0;
1100
1100
  }
1101
+ function linkStatusContentTypesMatch(actual, expected) {
1102
+ if (!actual || !expected) return false;
1103
+ if (expected.endsWith("/*")) return actual.startsWith(expected.slice(0, -1));
1104
+ if (actual === expected) return true;
1105
+ const yamlTypes = /* @__PURE__ */ new Set(["application/yaml", "application/x-yaml", "text/yaml", "text/x-yaml"]);
1106
+ return yamlTypes.has(actual) && yamlTypes.has(expected);
1107
+ }
1101
1108
  function linkStatusContentTypeOk(result, check) {
1102
1109
  const expected = check.allowed_content_types;
1103
1110
  if (!expected?.length) return true;
@@ -1106,8 +1113,7 @@ function linkStatusContentTypeOk(result, check) {
1106
1113
  return expected.some((contentType) => {
1107
1114
  const normalized = normalizeLinkStatusContentType(contentType);
1108
1115
  if (!normalized) return false;
1109
- if (normalized.endsWith("/*")) return actual.startsWith(normalized.slice(0, -1));
1110
- return actual === normalized;
1116
+ return linkStatusContentTypesMatch(actual, normalized);
1111
1117
  });
1112
1118
  }
1113
1119
  function httpStatusBodyContainsFailures(result, check) {
@@ -2518,6 +2524,13 @@ function normalizeLinkStatusContentType(value) {
2518
2524
  const normalized = (value.split(";")[0] || "").trim().toLowerCase();
2519
2525
  return normalized || undefined;
2520
2526
  }
2527
+ function linkStatusContentTypesMatch(actual, expected) {
2528
+ if (!actual || !expected) return false;
2529
+ if (expected.endsWith("/*")) return actual.startsWith(expected.slice(0, -1));
2530
+ if (actual === expected) return true;
2531
+ const yamlTypes = new Set(["application/yaml", "application/x-yaml", "text/yaml", "text/x-yaml"]);
2532
+ return yamlTypes.has(actual) && yamlTypes.has(expected);
2533
+ }
2521
2534
  function linkStatusContentTypeOk(result, check) {
2522
2535
  if (!Array.isArray(check.allowed_content_types) || !check.allowed_content_types.length) return true;
2523
2536
  const actual = normalizeLinkStatusContentType(result.content_type);
@@ -2525,8 +2538,7 @@ function linkStatusContentTypeOk(result, check) {
2525
2538
  return check.allowed_content_types.some((contentType) => {
2526
2539
  const normalized = normalizeLinkStatusContentType(contentType);
2527
2540
  if (!normalized) return false;
2528
- if (normalized.endsWith("/*")) return actual.startsWith(normalized.slice(0, -1));
2529
- return actual === normalized;
2541
+ return linkStatusContentTypesMatch(actual, normalized);
2530
2542
  });
2531
2543
  }
2532
2544
  function httpStatusBodyContainsFailures(result, check) {
@@ -4662,6 +4674,13 @@ function normalizeLinkProbeContentType(value) {
4662
4674
  const normalized = (value.split(";")[0] || "").trim().toLowerCase();
4663
4675
  return normalized || undefined;
4664
4676
  }
4677
+ function linkProbeContentTypesMatch(actual, expected) {
4678
+ if (!actual || !expected) return false;
4679
+ if (expected.endsWith("/*")) return actual.startsWith(expected.slice(0, -1));
4680
+ if (actual === expected) return true;
4681
+ const yamlTypes = new Set(["application/yaml", "application/x-yaml", "text/yaml", "text/x-yaml"]);
4682
+ return yamlTypes.has(actual) && yamlTypes.has(expected);
4683
+ }
4665
4684
  function linkProbeContentTypeAllowed(result, check) {
4666
4685
  if (!Array.isArray(check.allowed_content_types) || !check.allowed_content_types.length) return true;
4667
4686
  const actual = normalizeLinkProbeContentType(result.content_type);
@@ -4669,8 +4688,7 @@ function linkProbeContentTypeAllowed(result, check) {
4669
4688
  return check.allowed_content_types.some((contentType) => {
4670
4689
  const normalized = normalizeLinkProbeContentType(contentType);
4671
4690
  if (!normalized) return false;
4672
- if (normalized.endsWith("/*")) return actual.startsWith(normalized.slice(0, -1));
4673
- return actual === normalized;
4691
+ return linkProbeContentTypesMatch(actual, normalized);
4674
4692
  });
4675
4693
  }
4676
4694
  function linkProbeResponseFields(response, method) {
package/dist/profile.js CHANGED
@@ -20,7 +20,7 @@ import {
20
20
  resolveRiddleProofProfileTimeoutSec,
21
21
  slugifyRiddleProofProfileName,
22
22
  summarizeRiddleProofProfileResult
23
- } from "./chunk-2ZZS7RD5.js";
23
+ } from "./chunk-3CND75DM.js";
24
24
  export {
25
25
  RIDDLE_PROOF_PROFILE_CHECK_TYPES,
26
26
  RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
@@ -292,7 +292,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
292
292
  blocking?: boolean;
293
293
  details?: Record<string, unknown>;
294
294
  ok: boolean;
295
- action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
295
+ action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
296
296
  state_path: string;
297
297
  stage: any;
298
298
  summary: string;
@@ -382,7 +382,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
382
382
  continueWithStage?: WorkflowStage | null;
383
383
  blocking?: boolean;
384
384
  details?: Record<string, unknown>;
385
- action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
385
+ action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
386
386
  state_path: string;
387
387
  stage: any;
388
388
  checkpoint: string;
@@ -659,7 +659,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
659
659
  error?: undefined;
660
660
  } | {
661
661
  ok: boolean;
662
- action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
662
+ action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
663
663
  state_path: string;
664
664
  stage: any;
665
665
  summary: string;
@@ -292,7 +292,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
292
292
  blocking?: boolean;
293
293
  details?: Record<string, unknown>;
294
294
  ok: boolean;
295
- action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
295
+ action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
296
296
  state_path: string;
297
297
  stage: any;
298
298
  summary: string;
@@ -382,7 +382,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
382
382
  continueWithStage?: WorkflowStage | null;
383
383
  blocking?: boolean;
384
384
  details?: Record<string, unknown>;
385
- action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
385
+ action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
386
386
  state_path: string;
387
387
  stage: any;
388
388
  checkpoint: string;
@@ -659,7 +659,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
659
659
  error?: undefined;
660
660
  } | {
661
661
  ok: boolean;
662
- action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
662
+ action: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
663
663
  state_path: string;
664
664
  stage: any;
665
665
  summary: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riddledc/riddle-proof",
3
- "version": "0.7.112",
3
+ "version": "0.7.113",
4
4
  "description": "Reusable Riddle Proof contracts and helpers for evidence-backed agent changes.",
5
5
  "license": "MIT",
6
6
  "author": "RiddleDC",