@riddledc/riddle-proof 0.8.62 → 0.8.63

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.
@@ -5107,6 +5107,9 @@ function shouldIterate(assessment) {
5107
5107
  const nextStage = assessment.continue_with_stage || assessment.recommended_stage;
5108
5108
  return nextStage === "implement" || nextStage === "author";
5109
5109
  }
5110
+ function hasTrustedReadySource(assessment) {
5111
+ return assessment.source === "supervising_agent" || assessment.source === "supervisor";
5112
+ }
5110
5113
  async function notifyIfConfigured(input) {
5111
5114
  if (!input.notification) return input.result;
5112
5115
  try {
@@ -5442,6 +5445,7 @@ async function runRiddleProof(input) {
5442
5445
  decision: assessment.decision,
5443
5446
  recommended_stage: assessment.recommended_stage,
5444
5447
  continue_with_stage: assessment.continue_with_stage,
5448
+ source: assessment.source,
5445
5449
  reasons: assessment.reasons
5446
5450
  }
5447
5451
  });
@@ -5453,7 +5457,27 @@ async function runRiddleProof(input) {
5453
5457
  evidence_bundle: evidenceBundle
5454
5458
  });
5455
5459
  }
5456
- if (assessment.decision === "ready_to_ship") break;
5460
+ if (assessment.decision === "ready_to_ship") {
5461
+ if (!hasTrustedReadySource(assessment)) {
5462
+ return blockRun({
5463
+ state,
5464
+ stage: "verify",
5465
+ blocker: adapterBlocker(
5466
+ "proof_assessment_untrusted_source",
5467
+ "A ready_to_ship proof assessment must come from a supervising source.",
5468
+ "judge_completed",
5469
+ {
5470
+ decision: assessment.decision,
5471
+ source: assessment.source || null,
5472
+ trusted_sources: ["supervising_agent", "supervisor"]
5473
+ }
5474
+ ),
5475
+ evidence_bundle: evidenceBundle,
5476
+ raw: { assessment }
5477
+ });
5478
+ }
5479
+ break;
5480
+ }
5457
5481
  if (attempt + 1 < maxIterations && shouldIterate(assessment)) {
5458
5482
  evidenceContext = evidenceBundle;
5459
5483
  appendRunEvent(state, {
@@ -3,7 +3,7 @@ import {
3
3
  } from "../chunk-VYJD6XYF.js";
4
4
  import {
5
5
  runner_exports
6
- } from "../chunk-HRY2IHXM.js";
6
+ } from "../chunk-LD2YTPD7.js";
7
7
  import {
8
8
  engine_harness_exports
9
9
  } from "../chunk-P4BHU5NM.js";
@@ -633,6 +633,9 @@ function shouldIterate(assessment) {
633
633
  const nextStage = assessment.continue_with_stage || assessment.recommended_stage;
634
634
  return nextStage === "implement" || nextStage === "author";
635
635
  }
636
+ function hasTrustedReadySource(assessment) {
637
+ return assessment.source === "supervising_agent" || assessment.source === "supervisor";
638
+ }
636
639
  async function notifyIfConfigured(input) {
637
640
  if (!input.notification) return input.result;
638
641
  try {
@@ -968,6 +971,7 @@ async function runRiddleProof(input) {
968
971
  decision: assessment.decision,
969
972
  recommended_stage: assessment.recommended_stage,
970
973
  continue_with_stage: assessment.continue_with_stage,
974
+ source: assessment.source,
971
975
  reasons: assessment.reasons
972
976
  }
973
977
  });
@@ -979,7 +983,27 @@ async function runRiddleProof(input) {
979
983
  evidence_bundle: evidenceBundle
980
984
  });
981
985
  }
982
- if (assessment.decision === "ready_to_ship") break;
986
+ if (assessment.decision === "ready_to_ship") {
987
+ if (!hasTrustedReadySource(assessment)) {
988
+ return blockRun({
989
+ state,
990
+ stage: "verify",
991
+ blocker: adapterBlocker(
992
+ "proof_assessment_untrusted_source",
993
+ "A ready_to_ship proof assessment must come from a supervising source.",
994
+ "judge_completed",
995
+ {
996
+ decision: assessment.decision,
997
+ source: assessment.source || null,
998
+ trusted_sources: ["supervising_agent", "supervisor"]
999
+ }
1000
+ ),
1001
+ evidence_bundle: evidenceBundle,
1002
+ raw: { assessment }
1003
+ });
1004
+ }
1005
+ break;
1006
+ }
983
1007
  if (attempt + 1 < maxIterations && shouldIterate(assessment)) {
984
1008
  evidenceContext = evidenceBundle;
985
1009
  appendRunEvent(state, {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runRiddleProof
3
- } from "../chunk-HRY2IHXM.js";
3
+ } from "../chunk-LD2YTPD7.js";
4
4
  import "../chunk-NMQIWBSB.js";
5
5
  import "../chunk-2OTPBHSM.js";
6
6
  import "../chunk-EKZXU6MU.js";
@@ -61,6 +61,9 @@ function shouldIterate(assessment) {
61
61
  const nextStage = assessment.continue_with_stage || assessment.recommended_stage;
62
62
  return nextStage === "implement" || nextStage === "author";
63
63
  }
64
+ function hasTrustedReadySource(assessment) {
65
+ return assessment.source === "supervising_agent" || assessment.source === "supervisor";
66
+ }
64
67
  async function notifyIfConfigured(input) {
65
68
  if (!input.notification) return input.result;
66
69
  try {
@@ -396,6 +399,7 @@ async function runRiddleProof(input) {
396
399
  decision: assessment.decision,
397
400
  recommended_stage: assessment.recommended_stage,
398
401
  continue_with_stage: assessment.continue_with_stage,
402
+ source: assessment.source,
399
403
  reasons: assessment.reasons
400
404
  }
401
405
  });
@@ -407,7 +411,27 @@ async function runRiddleProof(input) {
407
411
  evidence_bundle: evidenceBundle
408
412
  });
409
413
  }
410
- if (assessment.decision === "ready_to_ship") break;
414
+ if (assessment.decision === "ready_to_ship") {
415
+ if (!hasTrustedReadySource(assessment)) {
416
+ return blockRun({
417
+ state,
418
+ stage: "verify",
419
+ blocker: adapterBlocker(
420
+ "proof_assessment_untrusted_source",
421
+ "A ready_to_ship proof assessment must come from a supervising source.",
422
+ "judge_completed",
423
+ {
424
+ decision: assessment.decision,
425
+ source: assessment.source || null,
426
+ trusted_sources: ["supervising_agent", "supervisor"]
427
+ }
428
+ ),
429
+ evidence_bundle: evidenceBundle,
430
+ raw: { assessment }
431
+ });
432
+ }
433
+ break;
434
+ }
411
435
  if (attempt + 1 < maxIterations && shouldIterate(assessment)) {
412
436
  evidenceContext = evidenceBundle;
413
437
  appendRunEvent(state, {
package/dist/index.cjs CHANGED
@@ -5402,6 +5402,9 @@ function shouldIterate(assessment) {
5402
5402
  const nextStage = assessment.continue_with_stage || assessment.recommended_stage;
5403
5403
  return nextStage === "implement" || nextStage === "author";
5404
5404
  }
5405
+ function hasTrustedReadySource(assessment) {
5406
+ return assessment.source === "supervising_agent" || assessment.source === "supervisor";
5407
+ }
5405
5408
  async function notifyIfConfigured(input) {
5406
5409
  if (!input.notification) return input.result;
5407
5410
  try {
@@ -5737,6 +5740,7 @@ async function runRiddleProof(input) {
5737
5740
  decision: assessment.decision,
5738
5741
  recommended_stage: assessment.recommended_stage,
5739
5742
  continue_with_stage: assessment.continue_with_stage,
5743
+ source: assessment.source,
5740
5744
  reasons: assessment.reasons
5741
5745
  }
5742
5746
  });
@@ -5748,7 +5752,27 @@ async function runRiddleProof(input) {
5748
5752
  evidence_bundle: evidenceBundle
5749
5753
  });
5750
5754
  }
5751
- if (assessment.decision === "ready_to_ship") break;
5755
+ if (assessment.decision === "ready_to_ship") {
5756
+ if (!hasTrustedReadySource(assessment)) {
5757
+ return blockRun({
5758
+ state,
5759
+ stage: "verify",
5760
+ blocker: adapterBlocker(
5761
+ "proof_assessment_untrusted_source",
5762
+ "A ready_to_ship proof assessment must come from a supervising source.",
5763
+ "judge_completed",
5764
+ {
5765
+ decision: assessment.decision,
5766
+ source: assessment.source || null,
5767
+ trusted_sources: ["supervising_agent", "supervisor"]
5768
+ }
5769
+ ),
5770
+ evidence_bundle: evidenceBundle,
5771
+ raw: { assessment }
5772
+ });
5773
+ }
5774
+ break;
5775
+ }
5752
5776
  if (attempt + 1 < maxIterations && shouldIterate(assessment)) {
5753
5777
  evidenceContext = evidenceBundle;
5754
5778
  appendRunEvent(state, {
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runRiddleProof
3
- } from "./chunk-HRY2IHXM.js";
3
+ } from "./chunk-LD2YTPD7.js";
4
4
  import "./chunk-6F4PWJZI.js";
5
5
  import {
6
6
  RIDDLE_PROOF_PLAYABILITY_ASSESSMENT_VERSION,
package/dist/runner.cjs CHANGED
@@ -633,6 +633,9 @@ function shouldIterate(assessment) {
633
633
  const nextStage = assessment.continue_with_stage || assessment.recommended_stage;
634
634
  return nextStage === "implement" || nextStage === "author";
635
635
  }
636
+ function hasTrustedReadySource(assessment) {
637
+ return assessment.source === "supervising_agent" || assessment.source === "supervisor";
638
+ }
636
639
  async function notifyIfConfigured(input) {
637
640
  if (!input.notification) return input.result;
638
641
  try {
@@ -968,6 +971,7 @@ async function runRiddleProof(input) {
968
971
  decision: assessment.decision,
969
972
  recommended_stage: assessment.recommended_stage,
970
973
  continue_with_stage: assessment.continue_with_stage,
974
+ source: assessment.source,
971
975
  reasons: assessment.reasons
972
976
  }
973
977
  });
@@ -979,7 +983,27 @@ async function runRiddleProof(input) {
979
983
  evidence_bundle: evidenceBundle
980
984
  });
981
985
  }
982
- if (assessment.decision === "ready_to_ship") break;
986
+ if (assessment.decision === "ready_to_ship") {
987
+ if (!hasTrustedReadySource(assessment)) {
988
+ return blockRun({
989
+ state,
990
+ stage: "verify",
991
+ blocker: adapterBlocker(
992
+ "proof_assessment_untrusted_source",
993
+ "A ready_to_ship proof assessment must come from a supervising source.",
994
+ "judge_completed",
995
+ {
996
+ decision: assessment.decision,
997
+ source: assessment.source || null,
998
+ trusted_sources: ["supervising_agent", "supervisor"]
999
+ }
1000
+ ),
1001
+ evidence_bundle: evidenceBundle,
1002
+ raw: { assessment }
1003
+ });
1004
+ }
1005
+ break;
1006
+ }
983
1007
  if (attempt + 1 < maxIterations && shouldIterate(assessment)) {
984
1008
  evidenceContext = evidenceBundle;
985
1009
  appendRunEvent(state, {
package/dist/runner.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runRiddleProof
3
- } from "./chunk-HRY2IHXM.js";
3
+ } from "./chunk-LD2YTPD7.js";
4
4
  import "./chunk-NMQIWBSB.js";
5
5
  import "./chunk-2OTPBHSM.js";
6
6
  import "./chunk-EKZXU6MU.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riddledc/riddle-proof",
3
- "version": "0.8.62",
3
+ "version": "0.8.63",
4
4
  "description": "Reusable Riddle Proof contracts and helpers for evidence-backed agent changes.",
5
5
  "license": "MIT",
6
6
  "author": "RiddleDC",