@riddledc/riddle-proof 0.8.59 → 0.8.60

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.
Files changed (116) hide show
  1. package/dist/adapters/codex-exec-agent.d.cts +1 -0
  2. package/dist/adapters/codex-exec-agent.d.ts +1 -0
  3. package/dist/adapters/codex-exec-agent.js +3 -2
  4. package/dist/adapters/codex.d.cts +1 -0
  5. package/dist/adapters/codex.d.ts +1 -0
  6. package/dist/adapters/codex.js +3 -2
  7. package/dist/adapters/local-agent.d.cts +1 -0
  8. package/dist/adapters/local-agent.d.ts +1 -0
  9. package/dist/adapters/local-agent.js +3 -2
  10. package/dist/adapters/openclaw.d.cts +1 -0
  11. package/dist/adapters/openclaw.d.ts +1 -0
  12. package/dist/adapters/openclaw.js +6 -5
  13. package/dist/advanced/engine-harness.cjs +253 -43
  14. package/dist/advanced/engine-harness.d.cts +1 -0
  15. package/dist/advanced/engine-harness.d.ts +1 -0
  16. package/dist/advanced/engine-harness.js +6 -5
  17. package/dist/advanced/index.cjs +253 -43
  18. package/dist/advanced/index.d.cts +1 -0
  19. package/dist/advanced/index.d.ts +1 -0
  20. package/dist/advanced/index.js +7 -6
  21. package/dist/advanced/runner.cjs +202 -4
  22. package/dist/advanced/runner.d.cts +1 -0
  23. package/dist/advanced/runner.d.ts +1 -0
  24. package/dist/advanced/runner.js +6 -5
  25. package/dist/checkpoint.d.cts +1 -0
  26. package/dist/checkpoint.d.ts +1 -0
  27. package/dist/checkpoint.js +3 -2
  28. package/dist/{chunk-TTB3ZAVX.js → chunk-3FK5HZHK.js} +2 -2
  29. package/dist/{chunk-XSNMMAPJ.js → chunk-AWRBSVNW.js} +4 -4
  30. package/dist/{chunk-MOTQNIZX.js → chunk-FX2CB4MG.js} +1 -1
  31. package/dist/{chunk-2PKBTYOA.js → chunk-HZOILEGF.js} +3 -3
  32. package/dist/{chunk-KNPCWWF3.js → chunk-NXEAFQYZ.js} +16 -10
  33. package/dist/{chunk-GHBNDHG7.js → chunk-PCEDAQPG.js} +4 -4
  34. package/dist/{chunk-CUBYSWZT.js → chunk-QGMSN34W.js} +51 -4
  35. package/dist/{chunk-RS4HJLJQ.js → chunk-QPKY767W.js} +1 -1
  36. package/dist/{chunk-UZIX7M7D.js → chunk-UEY5SJG5.js} +13 -9
  37. package/dist/{chunk-KG64Y5MC.js → chunk-WKIIJX3O.js} +12 -0
  38. package/dist/{chunk-JLOZTVXU.js → chunk-XKNJ5OE4.js} +2 -2
  39. package/dist/cli/index.js +9 -9
  40. package/dist/cli.cjs +461 -404
  41. package/dist/cli.js +9 -9
  42. package/dist/codex-exec-agent.d.cts +1 -0
  43. package/dist/codex-exec-agent.d.ts +1 -0
  44. package/dist/codex-exec-agent.js +3 -2
  45. package/dist/diagnostics.d.cts +1 -0
  46. package/dist/diagnostics.d.ts +1 -0
  47. package/dist/engine-harness.cjs +253 -43
  48. package/dist/engine-harness.d.cts +1 -0
  49. package/dist/engine-harness.d.ts +1 -0
  50. package/dist/engine-harness.js +6 -5
  51. package/dist/index.cjs +236 -169
  52. package/dist/index.d.cts +2 -2
  53. package/dist/index.d.ts +2 -2
  54. package/dist/index.js +21 -11
  55. package/dist/local-agent.d.cts +1 -0
  56. package/dist/local-agent.d.ts +1 -0
  57. package/dist/local-agent.js +3 -2
  58. package/dist/openclaw.d.cts +1 -0
  59. package/dist/openclaw.d.ts +1 -0
  60. package/dist/openclaw.js +6 -5
  61. package/dist/pr-comment.cjs +7 -2
  62. package/dist/pr-comment.js +2 -2
  63. package/dist/profile/index.d.cts +1 -0
  64. package/dist/profile/index.d.ts +1 -0
  65. package/dist/profile.d.cts +1 -0
  66. package/dist/profile.d.ts +1 -0
  67. package/dist/proof-session.d.cts +1 -0
  68. package/dist/proof-session.d.ts +1 -0
  69. package/dist/public-state.cjs +15 -0
  70. package/dist/public-state.d.cts +4 -1
  71. package/dist/public-state.d.ts +4 -1
  72. package/dist/public-state.js +7 -1
  73. package/dist/result.cjs +211 -4
  74. package/dist/result.d.cts +12 -1
  75. package/dist/result.d.ts +12 -1
  76. package/dist/result.js +6 -1
  77. package/dist/run-card.cjs +198 -40
  78. package/dist/run-card.d.cts +1 -0
  79. package/dist/run-card.d.ts +1 -0
  80. package/dist/run-card.js +4 -3
  81. package/dist/runner.cjs +202 -4
  82. package/dist/runner.d.cts +1 -0
  83. package/dist/runner.d.ts +1 -0
  84. package/dist/runner.js +6 -5
  85. package/dist/spec/checkpoint.d.cts +1 -0
  86. package/dist/spec/checkpoint.d.ts +1 -0
  87. package/dist/spec/checkpoint.js +3 -2
  88. package/dist/spec/index.cjs +235 -167
  89. package/dist/spec/index.d.cts +2 -2
  90. package/dist/spec/index.d.ts +2 -2
  91. package/dist/spec/index.js +17 -7
  92. package/dist/spec/public-state.cjs +15 -0
  93. package/dist/spec/public-state.d.cts +1 -1
  94. package/dist/spec/public-state.d.ts +1 -1
  95. package/dist/spec/public-state.js +7 -1
  96. package/dist/spec/result.cjs +209 -4
  97. package/dist/spec/result.d.cts +2 -1
  98. package/dist/spec/result.d.ts +2 -1
  99. package/dist/spec/result.js +6 -1
  100. package/dist/spec/run-card.cjs +198 -40
  101. package/dist/spec/run-card.d.cts +1 -0
  102. package/dist/spec/run-card.d.ts +1 -0
  103. package/dist/spec/run-card.js +4 -3
  104. package/dist/spec/state.cjs +207 -45
  105. package/dist/spec/state.d.cts +1 -0
  106. package/dist/spec/state.d.ts +1 -0
  107. package/dist/spec/state.js +5 -4
  108. package/dist/spec/types.d.cts +1 -0
  109. package/dist/spec/types.d.ts +1 -0
  110. package/dist/state.cjs +207 -45
  111. package/dist/state.d.cts +1 -0
  112. package/dist/state.d.ts +1 -0
  113. package/dist/state.js +5 -4
  114. package/dist/types.d.cts +14 -0
  115. package/dist/types.d.ts +14 -0
  116. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -3511,6 +3511,8 @@ __export(index_exports, {
3511
3511
  preflightRiddleProofProfileHttpStatusChecks: () => preflightRiddleProofProfileHttpStatusChecks,
3512
3512
  profileStatusExitCode: () => profileStatusExitCode,
3513
3513
  proofContractFromAuthorCheckpointResponse: () => proofContractFromAuthorCheckpointResponse,
3514
+ publicMergeRecommendationForRunState: () => publicMergeRecommendationForRunState,
3515
+ publicStateForRunState: () => publicStateForRunState,
3514
3516
  readRiddleProofRunStatus: () => readRiddleProofRunStatus,
3515
3517
  recordValue: () => recordValue,
3516
3518
  redactForProofDiagnostics: () => redactForProofDiagnostics,
@@ -3520,6 +3522,9 @@ __export(index_exports, {
3520
3522
  resolveRiddleProofProfileRouteUrl: () => resolveRiddleProofProfileRouteUrl,
3521
3523
  resolveRiddleProofProfileTargetUrl: () => resolveRiddleProofProfileTargetUrl,
3522
3524
  resolveRiddleProofProfileTimeoutSec: () => resolveRiddleProofProfileTimeoutSec,
3525
+ riddleProofPublicStateAllowsClaim: () => riddleProofPublicStateAllowsClaim,
3526
+ riddleProofPublicStateAllowsMergeRecommendation: () => riddleProofPublicStateAllowsMergeRecommendation,
3527
+ riddleProofPublicStateMergeRecommendation: () => riddleProofPublicStateMergeRecommendation,
3523
3528
  riddleRequestJson: () => riddleRequestJson,
3524
3529
  runCodexExecAgentDoctor: () => runCodexExecAgentDoctor,
3525
3530
  runLocalAgentDoctor: () => runCodexExecAgentDoctor,
@@ -3541,6 +3546,167 @@ __export(index_exports, {
3541
3546
  });
3542
3547
  module.exports = __toCommonJS(index_exports);
3543
3548
 
3549
+ // src/public-state.ts
3550
+ function riddleProofPublicStateAllowsClaim(summary, claim) {
3551
+ return !summary?.prohibited_claims.includes(claim);
3552
+ }
3553
+ function riddleProofPublicStateAllowsMergeRecommendation(summary) {
3554
+ return riddleProofPublicStateAllowsClaim(summary, "merge_ready") && riddleProofPublicStateAllowsClaim(summary, "sync_allowed");
3555
+ }
3556
+ function riddleProofPublicStateMergeRecommendation(summary, recommendation) {
3557
+ return recommendation && riddleProofPublicStateAllowsMergeRecommendation(summary) ? recommendation : void 0;
3558
+ }
3559
+ function asRecord(value) {
3560
+ return value && typeof value === "object" && !Array.isArray(value) ? value : {};
3561
+ }
3562
+ function stringValue(value) {
3563
+ return typeof value === "string" && value.trim() ? value.trim() : void 0;
3564
+ }
3565
+ function booleanValue(value) {
3566
+ return typeof value === "boolean" ? value : void 0;
3567
+ }
3568
+ function numberValue(value) {
3569
+ return typeof value === "number" && Number.isFinite(value) ? value : void 0;
3570
+ }
3571
+ function firstStringValue(...values) {
3572
+ for (const value of values) {
3573
+ const text = stringValue(value);
3574
+ if (text) return text;
3575
+ }
3576
+ return void 0;
3577
+ }
3578
+ function firstBooleanValue(...values) {
3579
+ for (const value of values) {
3580
+ const bool = booleanValue(value);
3581
+ if (typeof bool === "boolean") return bool;
3582
+ }
3583
+ return void 0;
3584
+ }
3585
+ function firstRecordValue(...values) {
3586
+ for (const value of values) {
3587
+ const record = asRecord(value);
3588
+ if (Object.keys(record).length) return record;
3589
+ }
3590
+ return void 0;
3591
+ }
3592
+ function countValue(value) {
3593
+ const number = numberValue(value);
3594
+ return typeof number === "number" && number > 0 ? Math.trunc(number) : 0;
3595
+ }
3596
+ function checkpointSummaryFrom(...values) {
3597
+ const record = firstRecordValue(...values);
3598
+ if (!record) return void 0;
3599
+ const accepted = countValue(record.response_count);
3600
+ const rejected = countValue(record.rejected_response_count);
3601
+ const ignored = countValue(record.ignored_response_count);
3602
+ const duplicate = countValue(record.duplicate_response_count);
3603
+ const summary = {
3604
+ pending: booleanValue(record.pending),
3605
+ accepted_response_count: accepted,
3606
+ rejected_response_count: rejected,
3607
+ ignored_response_count: ignored,
3608
+ duplicate_response_count: duplicate,
3609
+ latest_decision: stringValue(record.latest_decision),
3610
+ audit_disclosure_required: rejected > 0 || ignored > 0 || duplicate > 0
3611
+ };
3612
+ return Object.values(summary).some((value) => typeof value !== "undefined") ? summary : void 0;
3613
+ }
3614
+ function uniqueStrings(values) {
3615
+ return [...new Set(values.filter(Boolean))];
3616
+ }
3617
+ function summarizeRiddleProofPublicState(input) {
3618
+ const record = asRecord(input);
3619
+ const runCard = asRecord(record.run_card);
3620
+ const stopCondition = asRecord(runCard.stop_condition);
3621
+ const raw = asRecord(record.raw);
3622
+ const request = asRecord(record.request);
3623
+ const requestMetadata = asRecord(record.request_metadata);
3624
+ const prState = asRecord(record.pr_state);
3625
+ const handoff = asRecord(record.pr_handoff_policy);
3626
+ const handoffState = stringValue(handoff.state);
3627
+ const status = firstStringValue(record.status, stopCondition.status);
3628
+ const ok = booleanValue(record.ok) ?? null;
3629
+ const shipMode = firstStringValue(request.ship_mode, requestMetadata.ship_mode, record.ship_mode, handoff.ship_mode);
3630
+ const explicitShippingDisabled = firstBooleanValue(
3631
+ record.shipping_disabled,
3632
+ stopCondition.shipping_disabled,
3633
+ raw.shipping_disabled,
3634
+ handoff.shipping_disabled
3635
+ );
3636
+ const shippingDisabled = explicitShippingDisabled === true || shipMode === "none" || handoffState === "proof_complete_ship_disabled";
3637
+ const explicitShipAuthorized = firstBooleanValue(
3638
+ record.ship_authorized,
3639
+ stopCondition.ship_authorized,
3640
+ raw.ship_authorized
3641
+ );
3642
+ const authorizationEvidence = Boolean(
3643
+ status === "shipped" || record.marked_ready === true || stringValue(prState.status) === "merged" || record.merge_commit || record.merged_at
3644
+ );
3645
+ const shipAuthorizedBeforeHold = explicitShipAuthorized ?? authorizationEvidence;
3646
+ const explicitShipHeld = firstBooleanValue(record.ship_held, stopCondition.ship_held, raw.ship_held);
3647
+ const inferredHeld = status === "ready_to_ship" && shippingDisabled && !shipAuthorizedBeforeHold;
3648
+ const shipHeld = explicitShipHeld === true || inferredHeld;
3649
+ const shipAuthorized = shipHeld ? false : shipAuthorizedBeforeHold === true;
3650
+ const proofComplete = Boolean(
3651
+ status === "ready_to_ship" || status === "shipped" || status === "completed" || status === "passed" || ok === true || handoff.proof_complete === true
3652
+ );
3653
+ const checkpointSummary = checkpointSummaryFrom(
3654
+ record.checkpoint_summary,
3655
+ stopCondition.checkpoint_summary,
3656
+ asRecord(record.details).checkpoint_summary,
3657
+ asRecord(raw.details).checkpoint_summary
3658
+ );
3659
+ const blockedOrWaiting = status === "blocked" || status === "failed" || status === "awaiting_checkpoint" || handoffState === "proof_blocked" || handoffState === "proof_review_required" || handoffState === "proof_failed" || handoffState === "proof_checkpoint_required";
3660
+ const proofPassed = Boolean(proofComplete && !blockedOrWaiting);
3661
+ const explicitMergeReady = firstBooleanValue(record.merge_ready, stopCondition.merge_ready, raw.merge_ready, handoff.merge_ready);
3662
+ const normalPrAllowed = firstBooleanValue(record.normal_pr_allowed, raw.normal_pr_allowed, handoff.normal_pr_allowed);
3663
+ const baseHandoffAllowed = !blockedOrWaiting && !shipHeld && !shippingDisabled;
3664
+ const mergeReady = baseHandoffAllowed && normalPrAllowed !== false && (explicitMergeReady ?? shipAuthorized);
3665
+ const syncAllowed = mergeReady;
3666
+ let policyState = "unknown";
3667
+ if (status === "awaiting_checkpoint" || handoffState === "proof_checkpoint_required") policyState = "awaiting_checkpoint";
3668
+ else if (status === "failed" || handoffState === "proof_failed") policyState = "proof_failed";
3669
+ else if (status === "blocked" || handoffState === "proof_blocked" || handoffState === "proof_review_required") policyState = "proof_blocked";
3670
+ else if (handoffState === "proof_complete_ship_disabled") policyState = "proof_complete_ship_disabled";
3671
+ else if (proofComplete && shipHeld && !shipAuthorized) policyState = "proof_passed_ship_held";
3672
+ else if (proofComplete && shippingDisabled && !shipAuthorized) policyState = "proof_complete_ship_disabled";
3673
+ else if (shipAuthorized) policyState = "ship_authorized";
3674
+ else if (proofPassed) policyState = "proof_passed";
3675
+ else if (status === "running") policyState = "proof_in_progress";
3676
+ const requiredDisclosures = [];
3677
+ if (shipHeld) requiredDisclosures.push("ship_held");
3678
+ if (shippingDisabled) requiredDisclosures.push("shipping_disabled");
3679
+ if (checkpointSummary?.audit_disclosure_required) requiredDisclosures.push("checkpoint_audit_counters");
3680
+ if (status === "awaiting_checkpoint" || handoffState === "proof_checkpoint_required") requiredDisclosures.push("checkpoint_required");
3681
+ const prohibitedClaims = [];
3682
+ if (!shipAuthorized || shipHeld || shippingDisabled) prohibitedClaims.push("ship_authorized", "shipped");
3683
+ if (!mergeReady) prohibitedClaims.push("merge_ready");
3684
+ if (!syncAllowed) prohibitedClaims.push("sync_allowed");
3685
+ if (blockedOrWaiting) {
3686
+ prohibitedClaims.push("proof_passed", "ready_to_ship");
3687
+ }
3688
+ if (checkpointSummary?.audit_disclosure_required) {
3689
+ prohibitedClaims.push("all_checkpoint_responses_accepted");
3690
+ }
3691
+ const resultLabel2 = policyState === "awaiting_checkpoint" ? "checkpoint required" : policyState === "proof_blocked" ? "blocked" : policyState === "proof_failed" ? "failed" : policyState === "proof_complete_ship_disabled" ? "proof complete; shipping disabled" : policyState === "proof_passed_ship_held" ? "proof passed; ship held" : policyState === "ship_authorized" ? status === "shipped" ? "shipped" : "ship authorized" : policyState === "proof_passed" ? "passed" : policyState === "proof_in_progress" ? "running" : status || "recorded";
3692
+ return {
3693
+ status,
3694
+ ok,
3695
+ policy_state: policyState,
3696
+ result_label: resultLabel2,
3697
+ proof_complete: proofComplete,
3698
+ proof_passed: proofPassed,
3699
+ ship_held: shipHeld,
3700
+ shipping_disabled: shippingDisabled,
3701
+ ship_authorized: shipAuthorized,
3702
+ merge_ready: mergeReady,
3703
+ sync_allowed: syncAllowed,
3704
+ checkpoint_summary: checkpointSummary,
3705
+ required_disclosures: uniqueStrings(requiredDisclosures),
3706
+ prohibited_claims: uniqueStrings(prohibitedClaims)
3707
+ };
3708
+ }
3709
+
3544
3710
  // src/result.ts
3545
3711
  function isTerminalStatus(status) {
3546
3712
  return status === "blocked" || status === "failed" || status === "ready_to_ship" || status === "shipped" || status === "completed";
@@ -3715,6 +3881,37 @@ function applyTerminalMetadata(state, metadata) {
3715
3881
  if (typeof metadata.finalized === "boolean") state.finalized = metadata.finalized;
3716
3882
  return state;
3717
3883
  }
3884
+ function publicStateForRunState(input) {
3885
+ const state = input.state;
3886
+ const status = input.status || state.status;
3887
+ const raw = recordValue(input.raw) || {};
3888
+ const extendedState = state;
3889
+ const terminalOk = isTerminalStatus(status) ? state.ok : void 0;
3890
+ return summarizeRiddleProofPublicState(compactRecord({
3891
+ status,
3892
+ ok: terminalOk,
3893
+ request: state.request,
3894
+ pr_state: state.pr_state,
3895
+ marked_ready: state.marked_ready,
3896
+ ship_held: state.ship_held,
3897
+ shipping_disabled: state.shipping_disabled,
3898
+ ship_authorized: state.ship_authorized,
3899
+ ship_mode: state.request?.ship_mode,
3900
+ merge_commit: state.merge_commit,
3901
+ merged_at: state.merged_at,
3902
+ checkpoint_summary: state.checkpoint_summary,
3903
+ pr_handoff_policy: recordValue(extendedState.pr_handoff_policy),
3904
+ merge_ready: extendedState.merge_ready,
3905
+ normal_pr_allowed: extendedState.normal_pr_allowed,
3906
+ raw: Object.keys(raw).length ? raw : void 0
3907
+ }));
3908
+ }
3909
+ function publicMergeRecommendationForRunState(input) {
3910
+ return riddleProofPublicStateMergeRecommendation(
3911
+ publicStateForRunState(input),
3912
+ input.state.merge_recommendation
3913
+ );
3914
+ }
3718
3915
  function shipControlStateFor(input) {
3719
3916
  const state = input.state;
3720
3917
  const status = input.status || state.status;
@@ -3763,6 +3960,11 @@ function createRunResult(input) {
3763
3960
  state.ok = ok;
3764
3961
  if (isProtectedFinalStatus(status)) state.finalized = true;
3765
3962
  applyShipControlState(state, { status, raw: input.raw });
3963
+ const publicState = publicStateForRunState({ state, status, raw: input.raw });
3964
+ const publicMergeRecommendation = riddleProofPublicStateMergeRecommendation(
3965
+ publicState,
3966
+ state.merge_recommendation
3967
+ );
3766
3968
  return compactRecord({
3767
3969
  ok,
3768
3970
  status,
@@ -3780,9 +3982,12 @@ function createRunResult(input) {
3780
3982
  pr_state: state.pr_state,
3781
3983
  marked_ready: state.marked_ready,
3782
3984
  left_draft: state.left_draft,
3783
- ship_held: state.ship_held,
3784
- shipping_disabled: state.shipping_disabled,
3785
- ship_authorized: state.ship_authorized,
3985
+ result_label: publicState.result_label,
3986
+ ship_held: publicState.ship_held,
3987
+ shipping_disabled: publicState.shipping_disabled,
3988
+ ship_authorized: publicState.ship_authorized,
3989
+ merge_ready: publicState.merge_ready,
3990
+ sync_allowed: publicState.sync_allowed,
3786
3991
  ci_status: state.ci_status,
3787
3992
  ship_commit: state.ship_commit,
3788
3993
  ship_remote_head: state.ship_remote_head,
@@ -3796,7 +4001,8 @@ function createRunResult(input) {
3796
4001
  cleanup_report: state.cleanup_report,
3797
4002
  notification: state.notification,
3798
4003
  proof_decision: state.proof_decision,
3799
- merge_recommendation: state.merge_recommendation,
4004
+ merge_recommendation: publicMergeRecommendation,
4005
+ public_state: publicState,
3800
4006
  finalized: state.finalized,
3801
4007
  blocker: state.blocker,
3802
4008
  checkpoint_packet: state.checkpoint_packet,
@@ -4766,7 +4972,8 @@ function createRiddleProofRunCard(state, input = {}) {
4766
4972
  const visualDelta = visualDeltaFrom({ fullRiddleState: fullState, runState: state });
4767
4973
  const artifacts = artifactsFrom({ fullRiddleState: fullState, runState: state });
4768
4974
  const viewportMatrix = viewportMatrixFrom({ fullRiddleState: fullState, runState: state });
4769
- const shipControl = shipControlStateFor({ state });
4975
+ const publicState = publicStateForRunState({ state, status: state.status });
4976
+ const publicMergeRecommendation = publicMergeRecommendationForRunState({ state, status: state.status });
4770
4977
  return {
4771
4978
  version: RIDDLE_PROOF_RUN_CARD_VERSION,
4772
4979
  run_id: state.run_id || "unknown",
@@ -4820,14 +5027,18 @@ function createRiddleProofRunCard(state, input = {}) {
4820
5027
  stop_condition: compactRecord({
4821
5028
  status: state.status,
4822
5029
  terminal: isTerminalStatus(state.status),
4823
- ship_held: shipControl.ship_held,
4824
- shipping_disabled: shipControl.shipping_disabled,
4825
- ship_authorized: shipControl.ship_authorized,
5030
+ result_label: publicState.result_label,
5031
+ ship_held: publicState.ship_held,
5032
+ shipping_disabled: publicState.shipping_disabled,
5033
+ ship_authorized: publicState.ship_authorized,
5034
+ merge_ready: publicState.merge_ready,
5035
+ sync_allowed: publicState.sync_allowed,
4826
5036
  blocker_code: state.blocker?.code || null,
4827
5037
  blocker_message: state.blocker?.message || null,
4828
5038
  proof_decision: state.proof_decision,
4829
- merge_recommendation: state.merge_recommendation,
4830
- monitor_should_continue: !isTerminalStatus(state.status)
5039
+ merge_recommendation: publicMergeRecommendation,
5040
+ monitor_should_continue: !isTerminalStatus(state.status),
5041
+ public_state: publicState
4831
5042
  }),
4832
5043
  updated_at: state.updated_at
4833
5044
  };
@@ -5013,8 +5224,8 @@ function appendStageHeartbeat(state, input) {
5013
5224
  function createRunStatusSnapshot(state, at = timestamp2()) {
5014
5225
  const latestEvent = state.events[state.events.length - 1];
5015
5226
  const runId = state.run_id || "unknown";
5016
- const shipControl = shipControlStateFor({ state });
5017
- const existingRunCardCurrent = state.run_card?.status === state.status && state.run_card.stop_condition?.status === state.status && state.run_card.stop_condition?.terminal === isTerminalStatus(state.status) && state.run_card.stop_condition?.monitor_should_continue === !isTerminalStatus(state.status) && state.run_card.stop_condition?.ship_held === shipControl.ship_held && state.run_card.stop_condition?.shipping_disabled === shipControl.shipping_disabled && state.run_card.stop_condition?.ship_authorized === shipControl.ship_authorized;
5227
+ const publicState = publicStateForRunState({ state, status: state.status });
5228
+ const existingRunCardCurrent = state.run_card?.status === state.status && state.run_card.stop_condition?.status === state.status && state.run_card.stop_condition?.terminal === isTerminalStatus(state.status) && state.run_card.stop_condition?.monitor_should_continue === !isTerminalStatus(state.status) && state.run_card.stop_condition?.ship_held === publicState.ship_held && state.run_card.stop_condition?.shipping_disabled === publicState.shipping_disabled && state.run_card.stop_condition?.ship_authorized === publicState.ship_authorized && state.run_card.stop_condition?.merge_ready === publicState.merge_ready && state.run_card.stop_condition?.sync_allowed === publicState.sync_allowed && state.run_card.stop_condition?.result_label === publicState.result_label;
5018
5229
  const runCard = existingRunCardCurrent ? state.run_card : createRiddleProofRunCard(state, { at });
5019
5230
  return compactRecord({
5020
5231
  run_id: runId,
@@ -5028,9 +5239,13 @@ function createRunStatusSnapshot(state, at = timestamp2()) {
5028
5239
  pr_url: state.pr_url ?? null,
5029
5240
  pr_branch: state.pr_branch ?? null,
5030
5241
  pr_state: state.pr_state,
5031
- ship_held: shipControl.ship_held,
5032
- shipping_disabled: shipControl.shipping_disabled,
5033
- ship_authorized: shipControl.ship_authorized,
5242
+ result_label: publicState.result_label,
5243
+ ship_held: publicState.ship_held,
5244
+ shipping_disabled: publicState.shipping_disabled,
5245
+ ship_authorized: publicState.ship_authorized,
5246
+ merge_ready: publicState.merge_ready,
5247
+ sync_allowed: publicState.sync_allowed,
5248
+ public_state: publicState,
5034
5249
  ci_status: state.ci_status,
5035
5250
  ship_commit: state.ship_commit,
5036
5251
  ship_remote_head: state.ship_remote_head,
@@ -5078,158 +5293,6 @@ function applyPrLifecycleState(state, input, at = timestamp2()) {
5078
5293
  return state;
5079
5294
  }
5080
5295
 
5081
- // src/public-state.ts
5082
- function asRecord(value) {
5083
- return value && typeof value === "object" && !Array.isArray(value) ? value : {};
5084
- }
5085
- function stringValue(value) {
5086
- return typeof value === "string" && value.trim() ? value.trim() : void 0;
5087
- }
5088
- function booleanValue(value) {
5089
- return typeof value === "boolean" ? value : void 0;
5090
- }
5091
- function numberValue(value) {
5092
- return typeof value === "number" && Number.isFinite(value) ? value : void 0;
5093
- }
5094
- function firstStringValue(...values) {
5095
- for (const value of values) {
5096
- const text = stringValue(value);
5097
- if (text) return text;
5098
- }
5099
- return void 0;
5100
- }
5101
- function firstBooleanValue(...values) {
5102
- for (const value of values) {
5103
- const bool = booleanValue(value);
5104
- if (typeof bool === "boolean") return bool;
5105
- }
5106
- return void 0;
5107
- }
5108
- function firstRecordValue(...values) {
5109
- for (const value of values) {
5110
- const record = asRecord(value);
5111
- if (Object.keys(record).length) return record;
5112
- }
5113
- return void 0;
5114
- }
5115
- function countValue(value) {
5116
- const number = numberValue(value);
5117
- return typeof number === "number" && number > 0 ? Math.trunc(number) : 0;
5118
- }
5119
- function checkpointSummaryFrom(...values) {
5120
- const record = firstRecordValue(...values);
5121
- if (!record) return void 0;
5122
- const accepted = countValue(record.response_count);
5123
- const rejected = countValue(record.rejected_response_count);
5124
- const ignored = countValue(record.ignored_response_count);
5125
- const duplicate = countValue(record.duplicate_response_count);
5126
- const summary = {
5127
- pending: booleanValue(record.pending),
5128
- accepted_response_count: accepted,
5129
- rejected_response_count: rejected,
5130
- ignored_response_count: ignored,
5131
- duplicate_response_count: duplicate,
5132
- latest_decision: stringValue(record.latest_decision),
5133
- audit_disclosure_required: rejected > 0 || ignored > 0 || duplicate > 0
5134
- };
5135
- return Object.values(summary).some((value) => typeof value !== "undefined") ? summary : void 0;
5136
- }
5137
- function uniqueStrings(values) {
5138
- return [...new Set(values.filter(Boolean))];
5139
- }
5140
- function summarizeRiddleProofPublicState(input) {
5141
- const record = asRecord(input);
5142
- const runCard = asRecord(record.run_card);
5143
- const stopCondition = asRecord(runCard.stop_condition);
5144
- const raw = asRecord(record.raw);
5145
- const request = asRecord(record.request);
5146
- const requestMetadata = asRecord(record.request_metadata);
5147
- const prState = asRecord(record.pr_state);
5148
- const handoff = asRecord(record.pr_handoff_policy);
5149
- const handoffState = stringValue(handoff.state);
5150
- const status = firstStringValue(record.status, stopCondition.status);
5151
- const ok = booleanValue(record.ok) ?? null;
5152
- const shipMode = firstStringValue(request.ship_mode, requestMetadata.ship_mode, record.ship_mode, handoff.ship_mode);
5153
- const explicitShippingDisabled = firstBooleanValue(
5154
- record.shipping_disabled,
5155
- stopCondition.shipping_disabled,
5156
- raw.shipping_disabled,
5157
- handoff.shipping_disabled
5158
- );
5159
- const shippingDisabled = explicitShippingDisabled === true || shipMode === "none" || handoffState === "proof_complete_ship_disabled";
5160
- const explicitShipAuthorized = firstBooleanValue(
5161
- record.ship_authorized,
5162
- stopCondition.ship_authorized,
5163
- raw.ship_authorized
5164
- );
5165
- const authorizationEvidence = Boolean(
5166
- status === "shipped" || record.marked_ready === true || stringValue(prState.status) === "merged" || record.merge_commit || record.merged_at
5167
- );
5168
- const shipAuthorizedBeforeHold = explicitShipAuthorized ?? authorizationEvidence;
5169
- const explicitShipHeld = firstBooleanValue(record.ship_held, stopCondition.ship_held, raw.ship_held);
5170
- const inferredHeld = status === "ready_to_ship" && shippingDisabled && !shipAuthorizedBeforeHold;
5171
- const shipHeld = explicitShipHeld === true || inferredHeld;
5172
- const shipAuthorized = shipHeld ? false : shipAuthorizedBeforeHold === true;
5173
- const proofComplete = Boolean(
5174
- status === "ready_to_ship" || status === "shipped" || status === "completed" || status === "passed" || ok === true || handoff.proof_complete === true
5175
- );
5176
- const checkpointSummary = checkpointSummaryFrom(
5177
- record.checkpoint_summary,
5178
- stopCondition.checkpoint_summary,
5179
- asRecord(record.details).checkpoint_summary,
5180
- asRecord(raw.details).checkpoint_summary
5181
- );
5182
- const blockedOrWaiting = status === "blocked" || status === "failed" || status === "awaiting_checkpoint" || handoffState === "proof_blocked" || handoffState === "proof_review_required" || handoffState === "proof_failed" || handoffState === "proof_checkpoint_required";
5183
- const proofPassed = Boolean(proofComplete && !blockedOrWaiting);
5184
- const explicitMergeReady = firstBooleanValue(record.merge_ready, stopCondition.merge_ready, raw.merge_ready, handoff.merge_ready);
5185
- const normalPrAllowed = firstBooleanValue(record.normal_pr_allowed, raw.normal_pr_allowed, handoff.normal_pr_allowed);
5186
- const baseHandoffAllowed = !blockedOrWaiting && !shipHeld && !shippingDisabled;
5187
- const mergeReady = baseHandoffAllowed && normalPrAllowed !== false && (explicitMergeReady ?? shipAuthorized);
5188
- const syncAllowed = mergeReady;
5189
- let policyState = "unknown";
5190
- if (status === "awaiting_checkpoint" || handoffState === "proof_checkpoint_required") policyState = "awaiting_checkpoint";
5191
- else if (status === "failed" || handoffState === "proof_failed") policyState = "proof_failed";
5192
- else if (status === "blocked" || handoffState === "proof_blocked" || handoffState === "proof_review_required") policyState = "proof_blocked";
5193
- else if (handoffState === "proof_complete_ship_disabled") policyState = "proof_complete_ship_disabled";
5194
- else if (proofComplete && shipHeld && !shipAuthorized) policyState = "proof_passed_ship_held";
5195
- else if (proofComplete && shippingDisabled && !shipAuthorized) policyState = "proof_complete_ship_disabled";
5196
- else if (shipAuthorized) policyState = "ship_authorized";
5197
- else if (proofPassed) policyState = "proof_passed";
5198
- else if (status === "running") policyState = "proof_in_progress";
5199
- const requiredDisclosures = [];
5200
- if (shipHeld) requiredDisclosures.push("ship_held");
5201
- if (shippingDisabled) requiredDisclosures.push("shipping_disabled");
5202
- if (checkpointSummary?.audit_disclosure_required) requiredDisclosures.push("checkpoint_audit_counters");
5203
- if (status === "awaiting_checkpoint" || handoffState === "proof_checkpoint_required") requiredDisclosures.push("checkpoint_required");
5204
- const prohibitedClaims = [];
5205
- if (!shipAuthorized || shipHeld || shippingDisabled) prohibitedClaims.push("ship_authorized", "shipped");
5206
- if (!mergeReady) prohibitedClaims.push("merge_ready");
5207
- if (!syncAllowed) prohibitedClaims.push("sync_allowed");
5208
- if (blockedOrWaiting) {
5209
- prohibitedClaims.push("proof_passed", "ready_to_ship");
5210
- }
5211
- if (checkpointSummary?.audit_disclosure_required) {
5212
- prohibitedClaims.push("all_checkpoint_responses_accepted");
5213
- }
5214
- const resultLabel2 = policyState === "awaiting_checkpoint" ? "checkpoint required" : policyState === "proof_blocked" ? "blocked" : policyState === "proof_failed" ? "failed" : policyState === "proof_complete_ship_disabled" ? "proof complete; shipping disabled" : policyState === "proof_passed_ship_held" ? "proof passed; ship held" : policyState === "ship_authorized" ? status === "shipped" ? "shipped" : "ship authorized" : policyState === "proof_passed" ? "passed" : policyState === "proof_in_progress" ? "running" : status || "recorded";
5215
- return {
5216
- status,
5217
- ok,
5218
- policy_state: policyState,
5219
- result_label: resultLabel2,
5220
- proof_complete: proofComplete,
5221
- proof_passed: proofPassed,
5222
- ship_held: shipHeld,
5223
- shipping_disabled: shippingDisabled,
5224
- ship_authorized: shipAuthorized,
5225
- merge_ready: mergeReady,
5226
- sync_allowed: syncAllowed,
5227
- checkpoint_summary: checkpointSummary,
5228
- required_disclosures: uniqueStrings(requiredDisclosures),
5229
- prohibited_claims: uniqueStrings(prohibitedClaims)
5230
- };
5231
- }
5232
-
5233
5296
  // src/runner.ts
5234
5297
  init_proof_run_core();
5235
5298
  function errorDetails(error) {
@@ -20293,8 +20356,7 @@ function hasHandoffControl(summary) {
20293
20356
  }
20294
20357
  function shouldRenderMergeRecommendation(summary) {
20295
20358
  if (!summary.merge_recommendation) return false;
20296
- const prohibited = summary.public_state?.prohibited_claims || [];
20297
- return !prohibited.includes("merge_ready") && !prohibited.includes("sync_allowed");
20359
+ return riddleProofPublicStateAllowsMergeRecommendation(summary.public_state);
20298
20360
  }
20299
20361
  function checkpointSummaryLine(summary) {
20300
20362
  const accepted = summary.response_count ?? 0;
@@ -20482,6 +20544,8 @@ function buildRiddleProofPrCommentMarkdown(input) {
20482
20544
  preflightRiddleProofProfileHttpStatusChecks,
20483
20545
  profileStatusExitCode,
20484
20546
  proofContractFromAuthorCheckpointResponse,
20547
+ publicMergeRecommendationForRunState,
20548
+ publicStateForRunState,
20485
20549
  readRiddleProofRunStatus,
20486
20550
  recordValue,
20487
20551
  redactForProofDiagnostics,
@@ -20491,6 +20555,9 @@ function buildRiddleProofPrCommentMarkdown(input) {
20491
20555
  resolveRiddleProofProfileRouteUrl,
20492
20556
  resolveRiddleProofProfileTargetUrl,
20493
20557
  resolveRiddleProofProfileTimeoutSec,
20558
+ riddleProofPublicStateAllowsClaim,
20559
+ riddleProofPublicStateAllowsMergeRecommendation,
20560
+ riddleProofPublicStateMergeRecommendation,
20494
20561
  riddleRequestJson,
20495
20562
  runCodexExecAgentDoctor,
20496
20563
  runLocalAgentDoctor,
package/dist/index.d.cts CHANGED
@@ -1,9 +1,9 @@
1
1
  export { EvidenceArtifact, EvidenceReference, ImplementationAdapter, ImplementationAdapterInput, ImplementationAdapterResult, IntegrationContext, JsonObject, JsonPrimitive, JsonValue, JudgeAdapter, NotificationAdapter, PreflightAdapter, PreflightAdapterInput, PreflightAdapterResult, ProofAdapter, ProofAdapterInput, ProofAdapterResult, RiddleProofArtifactRole, RiddleProofAssessment, RiddleProofBlocker, RiddleProofCheckpointArtifact, RiddleProofCheckpointPacket, RiddleProofCheckpointResponse, RiddleProofCheckpointRole, RiddleProofCheckpointRoutingHint, RiddleProofCheckpointSummary, RiddleProofCheckpointVisibility, RiddleProofDecision, RiddleProofEvent, RiddleProofEvidenceBundle, RiddleProofPrLifecycleState, RiddleProofPrLifecycleStatus, RiddleProofProofContract, RiddleProofRunCard, RiddleProofRunParams, RiddleProofRunResult, RiddleProofRunState, RiddleProofRunStatusSnapshot, RiddleProofStage, RiddleProofStatePaths, RiddleProofStatus, RiddleProofTerminalMetadata, RiddleProofVerificationMode, RiddleProofViewportCapture, RiddleProofViewportMatrixStatus, RiddleProofVisualSession, RiddleProofVisualSessionFingerprintBasis, SetupAdapter, SetupAdapterInput, SetupAdapterResult, ShipAdapter } from './types.cjs';
2
- export { RiddleProofShipControlState, TerminalMetadataInput, applyShipControlState, applyTerminalMetadata, compactRecord, createRunResult, isProtectedFinalStatus, isSuccessfulStatus, isTerminalStatus, nonEmptyString, normalizeTerminalMetadata, recordValue, shipControlStateFor } from './result.cjs';
2
+ export { RiddleProofShipControlState, TerminalMetadataInput, applyShipControlState, applyTerminalMetadata, compactRecord, createRunResult, isProtectedFinalStatus, isSuccessfulStatus, isTerminalStatus, nonEmptyString, normalizeTerminalMetadata, publicMergeRecommendationForRunState, publicStateForRunState, recordValue, shipControlStateFor } from './result.cjs';
3
3
  export { CreateRunStateInput, RIDDLE_PROOF_RUN_STATE_VERSION, RunEventInput, appendRunEvent, appendStageHeartbeat, applyPrLifecycleState, createRunState, createRunStatusSnapshot, normalizeIntegrationContext, normalizePrLifecycleState, normalizeRunParams, setRunStatus } from './state.cjs';
4
4
  export { RIDDLE_PROOF_CHECKPOINT_PACKET_VERSION, RIDDLE_PROOF_CHECKPOINT_RESPONSE_VERSION, authorPacketPayloadFromCheckpointResponse, buildAuthorCheckpointPacket, buildCheckpointPacketForEngineResult, buildProofAssessmentCheckpointPacket, buildStageCheckpointPacket, checkpointPacketIdentity, checkpointResponseIdentity, checkpointSummaryFromState, createCheckpointResponseTemplate, isDuplicateCheckpointResponse, normalizeCheckpointResponse, proofContractFromAuthorCheckpointResponse, statePathsForRunState } from './checkpoint.cjs';
5
5
  export { RIDDLE_PROOF_RUN_CARD_VERSION, createRiddleProofRunCard } from './run-card.cjs';
6
- export { RiddleProofPublicCheckpointSummary, RiddleProofPublicPolicyState, RiddleProofPublicStateSummary, summarizeRiddleProofPublicState } from './public-state.cjs';
6
+ export { RiddleProofPublicCheckpointSummary, RiddleProofPublicPolicyState, RiddleProofPublicStateSummary, riddleProofPublicStateAllowsClaim, riddleProofPublicStateAllowsMergeRecommendation, riddleProofPublicStateMergeRecommendation, summarizeRiddleProofPublicState } from './public-state.cjs';
7
7
  export { R as RiddleProofRunnerAdapters, a as RunRiddleProofInput, r as runRiddleProof } from './runner-4LJ5z0D-.cjs';
8
8
  export { R as RiddleProofAgentAdapter, a as RiddleProofAgentPayload, b as RiddleProofCheckpointMode, c as RiddleProofEngine, d as RiddleProofEngineHarnessConfig, e as RiddleProofEngineHarnessContext, f as RiddleProofEngineResult, g as RiddleProofShipMode, h as RiddleProofWorkflowParams, i as RunRiddleProofEngineHarnessInput, j as createDisabledRiddleProofAgentAdapter, r as readRiddleProofRunStatus, k as runRiddleProofEngineHarness } from './engine-harness-LBfqbFSe.cjs';
9
9
  export { CodexExecAgentConfig, CodexJsonRequest, CodexJsonResult, CodexJsonRunner, CodexExecAgentConfig as LocalAgentConfig, CodexJsonRequest as LocalAgentJsonRequest, CodexJsonResult as LocalAgentJsonResult, CodexJsonRunner as LocalAgentJsonRunner, createCodexExecAgentAdapter, createCodexExecJsonRunner, createCodexExecAgentAdapter as createLocalAgentAdapter, createCodexExecJsonRunner as createLocalAgentJsonRunner, runCodexExecAgentDoctor, runCodexExecAgentDoctor as runLocalAgentDoctor } from './codex-exec-agent.cjs';
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  export { EvidenceArtifact, EvidenceReference, ImplementationAdapter, ImplementationAdapterInput, ImplementationAdapterResult, IntegrationContext, JsonObject, JsonPrimitive, JsonValue, JudgeAdapter, NotificationAdapter, PreflightAdapter, PreflightAdapterInput, PreflightAdapterResult, ProofAdapter, ProofAdapterInput, ProofAdapterResult, RiddleProofArtifactRole, RiddleProofAssessment, RiddleProofBlocker, RiddleProofCheckpointArtifact, RiddleProofCheckpointPacket, RiddleProofCheckpointResponse, RiddleProofCheckpointRole, RiddleProofCheckpointRoutingHint, RiddleProofCheckpointSummary, RiddleProofCheckpointVisibility, RiddleProofDecision, RiddleProofEvent, RiddleProofEvidenceBundle, RiddleProofPrLifecycleState, RiddleProofPrLifecycleStatus, RiddleProofProofContract, RiddleProofRunCard, RiddleProofRunParams, RiddleProofRunResult, RiddleProofRunState, RiddleProofRunStatusSnapshot, RiddleProofStage, RiddleProofStatePaths, RiddleProofStatus, RiddleProofTerminalMetadata, RiddleProofVerificationMode, RiddleProofViewportCapture, RiddleProofViewportMatrixStatus, RiddleProofVisualSession, RiddleProofVisualSessionFingerprintBasis, SetupAdapter, SetupAdapterInput, SetupAdapterResult, ShipAdapter } from './types.js';
2
- export { RiddleProofShipControlState, TerminalMetadataInput, applyShipControlState, applyTerminalMetadata, compactRecord, createRunResult, isProtectedFinalStatus, isSuccessfulStatus, isTerminalStatus, nonEmptyString, normalizeTerminalMetadata, recordValue, shipControlStateFor } from './result.js';
2
+ export { RiddleProofShipControlState, TerminalMetadataInput, applyShipControlState, applyTerminalMetadata, compactRecord, createRunResult, isProtectedFinalStatus, isSuccessfulStatus, isTerminalStatus, nonEmptyString, normalizeTerminalMetadata, publicMergeRecommendationForRunState, publicStateForRunState, recordValue, shipControlStateFor } from './result.js';
3
3
  export { CreateRunStateInput, RIDDLE_PROOF_RUN_STATE_VERSION, RunEventInput, appendRunEvent, appendStageHeartbeat, applyPrLifecycleState, createRunState, createRunStatusSnapshot, normalizeIntegrationContext, normalizePrLifecycleState, normalizeRunParams, setRunStatus } from './state.js';
4
4
  export { RIDDLE_PROOF_CHECKPOINT_PACKET_VERSION, RIDDLE_PROOF_CHECKPOINT_RESPONSE_VERSION, authorPacketPayloadFromCheckpointResponse, buildAuthorCheckpointPacket, buildCheckpointPacketForEngineResult, buildProofAssessmentCheckpointPacket, buildStageCheckpointPacket, checkpointPacketIdentity, checkpointResponseIdentity, checkpointSummaryFromState, createCheckpointResponseTemplate, isDuplicateCheckpointResponse, normalizeCheckpointResponse, proofContractFromAuthorCheckpointResponse, statePathsForRunState } from './checkpoint.js';
5
5
  export { RIDDLE_PROOF_RUN_CARD_VERSION, createRiddleProofRunCard } from './run-card.js';
6
- export { RiddleProofPublicCheckpointSummary, RiddleProofPublicPolicyState, RiddleProofPublicStateSummary, summarizeRiddleProofPublicState } from './public-state.js';
6
+ export { RiddleProofPublicCheckpointSummary, RiddleProofPublicPolicyState, RiddleProofPublicStateSummary, riddleProofPublicStateAllowsClaim, riddleProofPublicStateAllowsMergeRecommendation, riddleProofPublicStateMergeRecommendation, summarizeRiddleProofPublicState } from './public-state.js';
7
7
  export { R as RiddleProofRunnerAdapters, a as RunRiddleProofInput, r as runRiddleProof } from './runner-BdQpOkZD.js';
8
8
  export { R as RiddleProofAgentAdapter, a as RiddleProofAgentPayload, b as RiddleProofCheckpointMode, c as RiddleProofEngine, d as RiddleProofEngineHarnessConfig, e as RiddleProofEngineHarnessContext, f as RiddleProofEngineResult, g as RiddleProofShipMode, h as RiddleProofWorkflowParams, i as RunRiddleProofEngineHarnessInput, j as createDisabledRiddleProofAgentAdapter, r as readRiddleProofRunStatus, k as runRiddleProofEngineHarness } from './engine-harness-CMACHP6A.js';
9
9
  export { CodexExecAgentConfig, CodexJsonRequest, CodexJsonResult, CodexJsonRunner, CodexExecAgentConfig as LocalAgentConfig, CodexJsonRequest as LocalAgentJsonRequest, CodexJsonResult as LocalAgentJsonResult, CodexJsonRunner as LocalAgentJsonRunner, createCodexExecAgentAdapter, createCodexExecJsonRunner, createCodexExecAgentAdapter as createLocalAgentAdapter, createCodexExecJsonRunner as createLocalAgentJsonRunner, runCodexExecAgentDoctor, runCodexExecAgentDoctor as runLocalAgentDoctor } from './codex-exec-agent.js';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runRiddleProof
3
- } from "./chunk-JLOZTVXU.js";
3
+ } from "./chunk-XKNJ5OE4.js";
4
4
  import "./chunk-6F4PWJZI.js";
5
5
  import {
6
6
  RIDDLE_PROOF_PLAYABILITY_ASSESSMENT_VERSION,
@@ -59,7 +59,7 @@ import {
59
59
  RIDDLE_PROOF_PR_COMMENT_MARKER,
60
60
  buildRiddleProofPrCommentMarkdown,
61
61
  summarizeRiddleProofPrComment
62
- } from "./chunk-2PKBTYOA.js";
62
+ } from "./chunk-HZOILEGF.js";
63
63
  import {
64
64
  RIDDLE_PROOF_PROFILE_CHECK_TYPES,
65
65
  RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
@@ -88,9 +88,6 @@ import {
88
88
  slugifyRiddleProofProfileName,
89
89
  summarizeRiddleProofProfileResult
90
90
  } from "./chunk-EX7TO4I5.js";
91
- import {
92
- summarizeRiddleProofPublicState
93
- } from "./chunk-KG64Y5MC.js";
94
91
  import {
95
92
  DEFAULT_DIAGNOSTIC_ARRAY_LIMIT,
96
93
  DEFAULT_DIAGNOSTIC_HISTORY_LIMIT,
@@ -105,7 +102,7 @@ import {
105
102
  createDisabledRiddleProofAgentAdapter,
106
103
  readRiddleProofRunStatus,
107
104
  runRiddleProofEngineHarness
108
- } from "./chunk-GHBNDHG7.js";
105
+ } from "./chunk-PCEDAQPG.js";
109
106
  import {
110
107
  RIDDLE_PROOF_RUN_STATE_VERSION,
111
108
  appendRunEvent,
@@ -117,11 +114,11 @@ import {
117
114
  normalizePrLifecycleState,
118
115
  normalizeRunParams,
119
116
  setRunStatus
120
- } from "./chunk-UZIX7M7D.js";
117
+ } from "./chunk-UEY5SJG5.js";
121
118
  import {
122
119
  RIDDLE_PROOF_RUN_CARD_VERSION,
123
120
  createRiddleProofRunCard
124
- } from "./chunk-KNPCWWF3.js";
121
+ } from "./chunk-NXEAFQYZ.js";
125
122
  import "./chunk-EKZXU6MU.js";
126
123
  import {
127
124
  RIDDLE_PROOF_CHECKPOINT_PACKET_VERSION,
@@ -139,13 +136,13 @@ import {
139
136
  normalizeCheckpointResponse,
140
137
  proofContractFromAuthorCheckpointResponse,
141
138
  statePathsForRunState
142
- } from "./chunk-MOTQNIZX.js";
139
+ } from "./chunk-FX2CB4MG.js";
143
140
  import "./chunk-JFQXAJH2.js";
144
141
  import {
145
142
  createCodexExecAgentAdapter,
146
143
  createCodexExecJsonRunner,
147
144
  runCodexExecAgentDoctor
148
- } from "./chunk-RS4HJLJQ.js";
145
+ } from "./chunk-QPKY767W.js";
149
146
  import {
150
147
  applyShipControlState,
151
148
  applyTerminalMetadata,
@@ -156,9 +153,17 @@ import {
156
153
  isTerminalStatus,
157
154
  nonEmptyString,
158
155
  normalizeTerminalMetadata,
156
+ publicMergeRecommendationForRunState,
157
+ publicStateForRunState,
159
158
  recordValue,
160
159
  shipControlStateFor
161
- } from "./chunk-CUBYSWZT.js";
160
+ } from "./chunk-QGMSN34W.js";
161
+ import {
162
+ riddleProofPublicStateAllowsClaim,
163
+ riddleProofPublicStateAllowsMergeRecommendation,
164
+ riddleProofPublicStateMergeRecommendation,
165
+ summarizeRiddleProofPublicState
166
+ } from "./chunk-WKIIJX3O.js";
162
167
  import "./chunk-MLKGABMK.js";
163
168
  export {
164
169
  BASIC_GAMEPLAY_ACTION_TYPES,
@@ -265,6 +270,8 @@ export {
265
270
  preflightRiddleProofProfileHttpStatusChecks,
266
271
  profileStatusExitCode,
267
272
  proofContractFromAuthorCheckpointResponse,
273
+ publicMergeRecommendationForRunState,
274
+ publicStateForRunState,
268
275
  readRiddleProofRunStatus,
269
276
  recordValue,
270
277
  redactForProofDiagnostics,
@@ -274,6 +281,9 @@ export {
274
281
  resolveRiddleProofProfileRouteUrl,
275
282
  resolveRiddleProofProfileTargetUrl,
276
283
  resolveRiddleProofProfileTimeoutSec,
284
+ riddleProofPublicStateAllowsClaim,
285
+ riddleProofPublicStateAllowsMergeRecommendation,
286
+ riddleProofPublicStateMergeRecommendation,
277
287
  riddleRequestJson,
278
288
  runCodexExecAgentDoctor,
279
289
  runCodexExecAgentDoctor as runLocalAgentDoctor,
@@ -1,3 +1,4 @@
1
1
  export { CodexExecAgentConfig as LocalAgentConfig, CodexJsonRequest as LocalAgentJsonRequest, CodexJsonResult as LocalAgentJsonResult, CodexJsonRunner as LocalAgentJsonRunner, createCodexExecAgentAdapter as createLocalAgentAdapter, createCodexExecJsonRunner as createLocalAgentJsonRunner, runCodexExecAgentDoctor as runLocalAgentDoctor } from './codex-exec-agent.cjs';
2
2
  import './engine-harness-LBfqbFSe.cjs';
3
3
  import './types.cjs';
4
+ import './public-state.cjs';
@@ -1,3 +1,4 @@
1
1
  export { CodexExecAgentConfig as LocalAgentConfig, CodexJsonRequest as LocalAgentJsonRequest, CodexJsonResult as LocalAgentJsonResult, CodexJsonRunner as LocalAgentJsonRunner, createCodexExecAgentAdapter as createLocalAgentAdapter, createCodexExecJsonRunner as createLocalAgentJsonRunner, runCodexExecAgentDoctor as runLocalAgentDoctor } from './codex-exec-agent.js';
2
2
  import './engine-harness-CMACHP6A.js';
3
3
  import './types.js';
4
+ import './public-state.js';