@riddledc/riddle-proof 0.8.60 → 0.8.62
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/dist/adapters/codex-exec-agent.js +3 -3
- package/dist/adapters/codex.js +3 -3
- package/dist/adapters/local-agent.js +3 -3
- package/dist/adapters/openclaw.js +6 -6
- package/dist/advanced/engine-harness.cjs +46 -0
- package/dist/advanced/engine-harness.js +6 -6
- package/dist/advanced/index.cjs +46 -0
- package/dist/advanced/index.js +7 -7
- package/dist/advanced/runner.js +6 -6
- package/dist/checkpoint.js +3 -3
- package/dist/{chunk-NXEAFQYZ.js → chunk-2OTPBHSM.js} +2 -2
- package/dist/{chunk-WKIIJX3O.js → chunk-6PSM6KB2.js} +66 -1
- package/dist/{chunk-AWRBSVNW.js → chunk-DDAV6D6K.js} +4 -4
- package/dist/{chunk-XKNJ5OE4.js → chunk-HRY2IHXM.js} +2 -2
- package/dist/{chunk-UEY5SJG5.js → chunk-NMQIWBSB.js} +2 -2
- package/dist/{chunk-QPKY767W.js → chunk-OD6OKXL2.js} +1 -1
- package/dist/{chunk-PCEDAQPG.js → chunk-P4BHU5NM.js} +50 -4
- package/dist/{chunk-HZOILEGF.js → chunk-RZ3GXSXQ.js} +7 -2
- package/dist/{chunk-QGMSN34W.js → chunk-UK7G4RKA.js} +1 -1
- package/dist/{chunk-3FK5HZHK.js → chunk-WKNWMRDF.js} +2 -2
- package/dist/{chunk-FX2CB4MG.js → chunk-ZB5XBHWD.js} +1 -1
- package/dist/cli/index.js +9 -9
- package/dist/cli.cjs +51 -1
- package/dist/cli.js +9 -9
- package/dist/codex-exec-agent.js +3 -3
- package/dist/engine-harness.cjs +46 -0
- package/dist/engine-harness.js +6 -6
- package/dist/index.cjs +119 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +15 -9
- package/dist/local-agent.js +3 -3
- package/dist/openclaw.js +6 -6
- package/dist/pr-comment.cjs +8 -1
- package/dist/pr-comment.js +2 -2
- package/dist/public-state.cjs +68 -0
- package/dist/public-state.d.cts +41 -1
- package/dist/public-state.d.ts +41 -1
- package/dist/public-state.js +7 -1
- package/dist/result.js +2 -2
- package/dist/run-card.js +4 -4
- package/dist/runner.js +6 -6
- package/dist/spec/checkpoint.js +3 -3
- package/dist/spec/index.cjs +68 -0
- package/dist/spec/index.d.cts +1 -1
- package/dist/spec/index.d.ts +1 -1
- package/dist/spec/index.js +11 -5
- package/dist/spec/public-state.cjs +68 -0
- package/dist/spec/public-state.d.cts +1 -1
- package/dist/spec/public-state.d.ts +1 -1
- package/dist/spec/public-state.js +7 -1
- package/dist/spec/result.js +2 -2
- package/dist/spec/run-card.js +4 -4
- package/dist/spec/state.js +5 -5
- package/dist/state.js +5 -5
- package/package.json +1 -1
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
createCodexExecAgentAdapter,
|
|
4
4
|
createCodexExecJsonRunner,
|
|
5
5
|
runCodexExecAgentDoctor
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-OD6OKXL2.js";
|
|
7
|
+
import "../chunk-UK7G4RKA.js";
|
|
8
|
+
import "../chunk-6PSM6KB2.js";
|
|
9
9
|
import "../chunk-MLKGABMK.js";
|
|
10
10
|
export {
|
|
11
11
|
createCodexExecAgentAdapter,
|
package/dist/adapters/codex.js
CHANGED
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
createCodexExecAgentAdapter,
|
|
4
4
|
createCodexExecJsonRunner,
|
|
5
5
|
runCodexExecAgentDoctor
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-OD6OKXL2.js";
|
|
7
|
+
import "../chunk-UK7G4RKA.js";
|
|
8
|
+
import "../chunk-6PSM6KB2.js";
|
|
9
9
|
import "../chunk-MLKGABMK.js";
|
|
10
10
|
export {
|
|
11
11
|
createCodexExecAgentAdapter,
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
createCodexExecAgentAdapter,
|
|
4
4
|
createCodexExecJsonRunner,
|
|
5
5
|
runCodexExecAgentDoctor
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-OD6OKXL2.js";
|
|
7
|
+
import "../chunk-UK7G4RKA.js";
|
|
8
|
+
import "../chunk-6PSM6KB2.js";
|
|
9
9
|
import "../chunk-MLKGABMK.js";
|
|
10
10
|
export {
|
|
11
11
|
createCodexExecAgentAdapter as createLocalAgentAdapter,
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
parseOpenClawAssertions,
|
|
4
4
|
parseOpenClawJsonObjectOrArray,
|
|
5
5
|
toRiddleProofRunParams
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-WKNWMRDF.js";
|
|
7
|
+
import "../chunk-NMQIWBSB.js";
|
|
8
|
+
import "../chunk-2OTPBHSM.js";
|
|
9
|
+
import "../chunk-ZB5XBHWD.js";
|
|
10
|
+
import "../chunk-UK7G4RKA.js";
|
|
11
|
+
import "../chunk-6PSM6KB2.js";
|
|
12
12
|
import "../chunk-MLKGABMK.js";
|
|
13
13
|
export {
|
|
14
14
|
openClawIntegrationContext,
|
|
@@ -5368,6 +5368,13 @@ function proofAssessmentHardBlockers(state, payload) {
|
|
|
5368
5368
|
}
|
|
5369
5369
|
return blockers;
|
|
5370
5370
|
}
|
|
5371
|
+
function proofGateStateForCheckpointResponse(state) {
|
|
5372
|
+
const fullState = readJson(state.request.engine_state_path) || {};
|
|
5373
|
+
return compactRecord({
|
|
5374
|
+
...fullState,
|
|
5375
|
+
verification_mode: nonEmptyString(fullState.verification_mode) || state.request.verification_mode
|
|
5376
|
+
});
|
|
5377
|
+
}
|
|
5371
5378
|
function proofAssessmentContinuation(result, payload) {
|
|
5372
5379
|
const proof_assessment_json = jsonParam(payload);
|
|
5373
5380
|
return { ...baseContinuation(result), proof_assessment_json };
|
|
@@ -5914,6 +5921,45 @@ function checkpointResponseContinuation(state, value) {
|
|
|
5914
5921
|
blocker: sourceBlocker
|
|
5915
5922
|
});
|
|
5916
5923
|
}
|
|
5924
|
+
const proofGateState = proofGateStateForCheckpointResponse(state);
|
|
5925
|
+
const hardBlockers = proofAssessmentHardBlockers(proofGateState, assessment);
|
|
5926
|
+
if (proofAssessmentRequestsShip(assessment) && hardBlockers.length) {
|
|
5927
|
+
return checkpointResponseRejectedBlocker(state, {
|
|
5928
|
+
packet,
|
|
5929
|
+
response,
|
|
5930
|
+
blocker: {
|
|
5931
|
+
code: "checkpoint_response_proof_hard_blocker",
|
|
5932
|
+
checkpoint: packet.checkpoint,
|
|
5933
|
+
message: "Riddle Proof cannot mark ready_to_ship while the proof bundle contains a hard blocker: " + hardBlockers[0],
|
|
5934
|
+
details: compactRecord({
|
|
5935
|
+
stage: packet.stage,
|
|
5936
|
+
hard_blockers: hardBlockers,
|
|
5937
|
+
proofAssessment: assessment,
|
|
5938
|
+
response
|
|
5939
|
+
})
|
|
5940
|
+
}
|
|
5941
|
+
});
|
|
5942
|
+
}
|
|
5943
|
+
const visualBlocker = proofAssessmentVisualBlocker(proofGateState, assessment);
|
|
5944
|
+
if (visualBlocker) {
|
|
5945
|
+
const recoveryAssessment = visualDeltaEvidenceRecoveryAssessment(proofGateState, assessment, visualBlocker);
|
|
5946
|
+
appendCheckpointResponse(state, response, { summary: visualBlocker });
|
|
5947
|
+
recordEvent(state, {
|
|
5948
|
+
kind: "checkpoint.response.evidence_recovery_required",
|
|
5949
|
+
checkpoint: packet.checkpoint,
|
|
5950
|
+
stage: "verify",
|
|
5951
|
+
summary: visualBlocker,
|
|
5952
|
+
details: compactRecord({
|
|
5953
|
+
evidence_collection_incomplete: true,
|
|
5954
|
+
recovery_stage: "verify",
|
|
5955
|
+
evidence_issue_code: recoveryAssessment.evidence_issue_code || null,
|
|
5956
|
+
visual_delta: recoveryAssessment.visual_delta || null,
|
|
5957
|
+
proof_assessment: recoveryAssessment,
|
|
5958
|
+
checkpoint_response_source: response.source || null
|
|
5959
|
+
})
|
|
5960
|
+
});
|
|
5961
|
+
return { next: { ...base, proof_assessment_json: jsonParam(recoveryAssessment) } };
|
|
5962
|
+
}
|
|
5917
5963
|
appendCheckpointResponse(state, response);
|
|
5918
5964
|
if (state.request.ship_mode !== "ship" && proofAssessmentRequestsShip(assessment)) {
|
|
5919
5965
|
const result = {
|
|
@@ -2,13 +2,13 @@ import {
|
|
|
2
2
|
createDisabledRiddleProofAgentAdapter,
|
|
3
3
|
readRiddleProofRunStatus,
|
|
4
4
|
runRiddleProofEngineHarness
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-P4BHU5NM.js";
|
|
6
|
+
import "../chunk-NMQIWBSB.js";
|
|
7
|
+
import "../chunk-2OTPBHSM.js";
|
|
8
8
|
import "../chunk-EKZXU6MU.js";
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-ZB5XBHWD.js";
|
|
10
|
+
import "../chunk-UK7G4RKA.js";
|
|
11
|
+
import "../chunk-6PSM6KB2.js";
|
|
12
12
|
import "../chunk-MLKGABMK.js";
|
|
13
13
|
export {
|
|
14
14
|
createDisabledRiddleProofAgentAdapter,
|
package/dist/advanced/index.cjs
CHANGED
|
@@ -5907,6 +5907,13 @@ function proofAssessmentHardBlockers(state, payload) {
|
|
|
5907
5907
|
}
|
|
5908
5908
|
return blockers;
|
|
5909
5909
|
}
|
|
5910
|
+
function proofGateStateForCheckpointResponse(state) {
|
|
5911
|
+
const fullState = readJson(state.request.engine_state_path) || {};
|
|
5912
|
+
return compactRecord({
|
|
5913
|
+
...fullState,
|
|
5914
|
+
verification_mode: nonEmptyString(fullState.verification_mode) || state.request.verification_mode
|
|
5915
|
+
});
|
|
5916
|
+
}
|
|
5910
5917
|
function proofAssessmentContinuation(result, payload) {
|
|
5911
5918
|
const proof_assessment_json = jsonParam(payload);
|
|
5912
5919
|
return { ...baseContinuation(result), proof_assessment_json };
|
|
@@ -6453,6 +6460,45 @@ function checkpointResponseContinuation(state, value) {
|
|
|
6453
6460
|
blocker: sourceBlocker
|
|
6454
6461
|
});
|
|
6455
6462
|
}
|
|
6463
|
+
const proofGateState = proofGateStateForCheckpointResponse(state);
|
|
6464
|
+
const hardBlockers = proofAssessmentHardBlockers(proofGateState, assessment);
|
|
6465
|
+
if (proofAssessmentRequestsShip(assessment) && hardBlockers.length) {
|
|
6466
|
+
return checkpointResponseRejectedBlocker(state, {
|
|
6467
|
+
packet,
|
|
6468
|
+
response,
|
|
6469
|
+
blocker: {
|
|
6470
|
+
code: "checkpoint_response_proof_hard_blocker",
|
|
6471
|
+
checkpoint: packet.checkpoint,
|
|
6472
|
+
message: "Riddle Proof cannot mark ready_to_ship while the proof bundle contains a hard blocker: " + hardBlockers[0],
|
|
6473
|
+
details: compactRecord({
|
|
6474
|
+
stage: packet.stage,
|
|
6475
|
+
hard_blockers: hardBlockers,
|
|
6476
|
+
proofAssessment: assessment,
|
|
6477
|
+
response
|
|
6478
|
+
})
|
|
6479
|
+
}
|
|
6480
|
+
});
|
|
6481
|
+
}
|
|
6482
|
+
const visualBlocker = proofAssessmentVisualBlocker(proofGateState, assessment);
|
|
6483
|
+
if (visualBlocker) {
|
|
6484
|
+
const recoveryAssessment = visualDeltaEvidenceRecoveryAssessment(proofGateState, assessment, visualBlocker);
|
|
6485
|
+
appendCheckpointResponse(state, response, { summary: visualBlocker });
|
|
6486
|
+
recordEvent(state, {
|
|
6487
|
+
kind: "checkpoint.response.evidence_recovery_required",
|
|
6488
|
+
checkpoint: packet.checkpoint,
|
|
6489
|
+
stage: "verify",
|
|
6490
|
+
summary: visualBlocker,
|
|
6491
|
+
details: compactRecord({
|
|
6492
|
+
evidence_collection_incomplete: true,
|
|
6493
|
+
recovery_stage: "verify",
|
|
6494
|
+
evidence_issue_code: recoveryAssessment.evidence_issue_code || null,
|
|
6495
|
+
visual_delta: recoveryAssessment.visual_delta || null,
|
|
6496
|
+
proof_assessment: recoveryAssessment,
|
|
6497
|
+
checkpoint_response_source: response.source || null
|
|
6498
|
+
})
|
|
6499
|
+
});
|
|
6500
|
+
return { next: { ...base, proof_assessment_json: jsonParam(recoveryAssessment) } };
|
|
6501
|
+
}
|
|
6456
6502
|
appendCheckpointResponse(state, response);
|
|
6457
6503
|
if (state.request.ship_mode !== "ship" && proofAssessmentRequestsShip(assessment)) {
|
|
6458
6504
|
const result = {
|
package/dist/advanced/index.js
CHANGED
|
@@ -3,18 +3,18 @@ import {
|
|
|
3
3
|
} from "../chunk-VYJD6XYF.js";
|
|
4
4
|
import {
|
|
5
5
|
runner_exports
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-HRY2IHXM.js";
|
|
7
7
|
import {
|
|
8
8
|
engine_harness_exports
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
9
|
+
} from "../chunk-P4BHU5NM.js";
|
|
10
|
+
import "../chunk-NMQIWBSB.js";
|
|
11
|
+
import "../chunk-2OTPBHSM.js";
|
|
12
12
|
import {
|
|
13
13
|
proof_run_core_exports
|
|
14
14
|
} from "../chunk-EKZXU6MU.js";
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-ZB5XBHWD.js";
|
|
16
|
+
import "../chunk-UK7G4RKA.js";
|
|
17
|
+
import "../chunk-6PSM6KB2.js";
|
|
18
18
|
import "../chunk-MLKGABMK.js";
|
|
19
19
|
export {
|
|
20
20
|
engine_harness_exports as engineHarness,
|
package/dist/advanced/runner.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runRiddleProof
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-HRY2IHXM.js";
|
|
4
|
+
import "../chunk-NMQIWBSB.js";
|
|
5
|
+
import "../chunk-2OTPBHSM.js";
|
|
6
6
|
import "../chunk-EKZXU6MU.js";
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-ZB5XBHWD.js";
|
|
8
|
+
import "../chunk-UK7G4RKA.js";
|
|
9
|
+
import "../chunk-6PSM6KB2.js";
|
|
10
10
|
import "../chunk-MLKGABMK.js";
|
|
11
11
|
export {
|
|
12
12
|
runRiddleProof
|
package/dist/checkpoint.js
CHANGED
|
@@ -14,9 +14,9 @@ import {
|
|
|
14
14
|
normalizeCheckpointResponse,
|
|
15
15
|
proofContractFromAuthorCheckpointResponse,
|
|
16
16
|
statePathsForRunState
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-ZB5XBHWD.js";
|
|
18
|
+
import "./chunk-UK7G4RKA.js";
|
|
19
|
+
import "./chunk-6PSM6KB2.js";
|
|
20
20
|
import "./chunk-MLKGABMK.js";
|
|
21
21
|
export {
|
|
22
22
|
RIDDLE_PROOF_CHECKPOINT_PACKET_VERSION,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
statePathsForRunState
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZB5XBHWD.js";
|
|
4
4
|
import {
|
|
5
5
|
compactRecord,
|
|
6
6
|
isTerminalStatus,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
publicMergeRecommendationForRunState,
|
|
9
9
|
publicStateForRunState,
|
|
10
10
|
recordValue
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-UK7G4RKA.js";
|
|
12
12
|
|
|
13
13
|
// src/run-card.ts
|
|
14
14
|
var RIDDLE_PROOF_RUN_CARD_VERSION = "riddle-proof.run-card.v1";
|
|
@@ -158,10 +158,75 @@ function summarizeRiddleProofPublicState(input) {
|
|
|
158
158
|
prohibited_claims: uniqueStrings(prohibitedClaims)
|
|
159
159
|
};
|
|
160
160
|
}
|
|
161
|
+
function summarizeRiddleProofPublicConsumerSurface(input, options = {}) {
|
|
162
|
+
const record = asRecord(input);
|
|
163
|
+
const runCard = asRecord(record.run_card);
|
|
164
|
+
const stopCondition = asRecord(runCard.stop_condition);
|
|
165
|
+
const raw = asRecord(record.raw);
|
|
166
|
+
const publicState = summarizeRiddleProofPublicState(input);
|
|
167
|
+
const checkpointAudit = publicState.checkpoint_summary;
|
|
168
|
+
const mergeRecommendation = riddleProofPublicStateMergeRecommendation(
|
|
169
|
+
publicState,
|
|
170
|
+
firstStringValue(
|
|
171
|
+
options.merge_recommendation,
|
|
172
|
+
record.merge_recommendation,
|
|
173
|
+
stopCondition.merge_recommendation,
|
|
174
|
+
raw.merge_recommendation
|
|
175
|
+
)
|
|
176
|
+
);
|
|
177
|
+
const checkpointAuditRequired = publicState.required_disclosures.includes("checkpoint_audit_counters");
|
|
178
|
+
return {
|
|
179
|
+
kind: options.kind || "run_result",
|
|
180
|
+
status: publicState.status,
|
|
181
|
+
result_label: publicState.result_label,
|
|
182
|
+
policy_state: publicState.policy_state,
|
|
183
|
+
proof_complete: publicState.proof_complete,
|
|
184
|
+
claims: {
|
|
185
|
+
proof_passed: publicState.proof_passed,
|
|
186
|
+
ship_authorized: publicState.ship_authorized,
|
|
187
|
+
merge_ready: publicState.merge_ready,
|
|
188
|
+
sync_allowed: publicState.sync_allowed,
|
|
189
|
+
all_checkpoint_responses_accepted: checkpointAudit ? !checkpointAudit.audit_disclosure_required : false
|
|
190
|
+
},
|
|
191
|
+
ship_control: {
|
|
192
|
+
ship_held: publicState.ship_held,
|
|
193
|
+
shipping_disabled: publicState.shipping_disabled,
|
|
194
|
+
ship_authorized: publicState.ship_authorized
|
|
195
|
+
},
|
|
196
|
+
handoff: {
|
|
197
|
+
merge_ready: publicState.merge_ready,
|
|
198
|
+
sync_allowed: publicState.sync_allowed,
|
|
199
|
+
merge_recommendation: mergeRecommendation
|
|
200
|
+
},
|
|
201
|
+
checkpoint_audit: checkpointAudit,
|
|
202
|
+
disclosures: {
|
|
203
|
+
ship_control: true,
|
|
204
|
+
checkpoint_audit: !checkpointAuditRequired || Boolean(checkpointAudit),
|
|
205
|
+
required: [...publicState.required_disclosures],
|
|
206
|
+
prohibited_claims: [...publicState.prohibited_claims]
|
|
207
|
+
},
|
|
208
|
+
public_state: publicState
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
function summarizeRiddleProofHostedProofViewSurface(input, options = {}) {
|
|
212
|
+
return summarizeRiddleProofPublicConsumerSurface(input, {
|
|
213
|
+
...options,
|
|
214
|
+
kind: "hosted_proof_view"
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
function summarizeRiddleProofAgentSummarySurface(input, options = {}) {
|
|
218
|
+
return summarizeRiddleProofPublicConsumerSurface(input, {
|
|
219
|
+
...options,
|
|
220
|
+
kind: "agent_summary"
|
|
221
|
+
});
|
|
222
|
+
}
|
|
161
223
|
|
|
162
224
|
export {
|
|
163
225
|
riddleProofPublicStateAllowsClaim,
|
|
164
226
|
riddleProofPublicStateAllowsMergeRecommendation,
|
|
165
227
|
riddleProofPublicStateMergeRecommendation,
|
|
166
|
-
summarizeRiddleProofPublicState
|
|
228
|
+
summarizeRiddleProofPublicState,
|
|
229
|
+
summarizeRiddleProofPublicConsumerSurface,
|
|
230
|
+
summarizeRiddleProofHostedProofViewSurface,
|
|
231
|
+
summarizeRiddleProofAgentSummarySurface
|
|
167
232
|
};
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
RIDDLE_PROOF_PR_COMMENT_MARKER,
|
|
8
8
|
buildRiddleProofPrCommentMarkdown,
|
|
9
9
|
summarizeRiddleProofPrComment
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-RZ3GXSXQ.js";
|
|
11
11
|
import {
|
|
12
12
|
RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
|
|
13
13
|
applyRiddleProofProfileArtifactCompleteness,
|
|
@@ -28,14 +28,14 @@ import {
|
|
|
28
28
|
createDisabledRiddleProofAgentAdapter,
|
|
29
29
|
readRiddleProofRunStatus,
|
|
30
30
|
runRiddleProofEngineHarness
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-P4BHU5NM.js";
|
|
32
32
|
import {
|
|
33
33
|
createCheckpointResponseTemplate
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-ZB5XBHWD.js";
|
|
35
35
|
import {
|
|
36
36
|
createCodexExecAgentAdapter,
|
|
37
37
|
runCodexExecAgentDoctor
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-OD6OKXL2.js";
|
|
39
39
|
|
|
40
40
|
// src/cli.ts
|
|
41
41
|
import { spawnSync } from "child_process";
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
appendStageHeartbeat,
|
|
4
4
|
createRunState,
|
|
5
5
|
setRunStatus
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NMQIWBSB.js";
|
|
7
7
|
import {
|
|
8
8
|
noImplementationModeFor
|
|
9
9
|
} from "./chunk-EKZXU6MU.js";
|
|
10
10
|
import {
|
|
11
11
|
createRunResult
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-UK7G4RKA.js";
|
|
13
13
|
import {
|
|
14
14
|
__export
|
|
15
15
|
} from "./chunk-MLKGABMK.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createRiddleProofRunCard
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2OTPBHSM.js";
|
|
4
4
|
import {
|
|
5
5
|
compactRecord,
|
|
6
6
|
isProtectedFinalStatus,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
nonEmptyString,
|
|
9
9
|
publicStateForRunState,
|
|
10
10
|
recordValue
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-UK7G4RKA.js";
|
|
12
12
|
|
|
13
13
|
// src/state.ts
|
|
14
14
|
var RIDDLE_PROOF_RUN_STATE_VERSION = "riddle-proof.run-state.v1";
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
createRunStatusSnapshot,
|
|
6
6
|
normalizeRunParams,
|
|
7
7
|
setRunStatus
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-NMQIWBSB.js";
|
|
9
9
|
import {
|
|
10
10
|
createRiddleProofRunCard
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-2OTPBHSM.js";
|
|
12
12
|
import {
|
|
13
13
|
canonicalProofAssessmentStageForDecision,
|
|
14
14
|
noImplementationModeFor,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
normalizeCheckpointResponse,
|
|
28
28
|
proofContractFromAuthorCheckpointResponse,
|
|
29
29
|
statePathsForRunState
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-ZB5XBHWD.js";
|
|
31
31
|
import {
|
|
32
32
|
applyShipControlState,
|
|
33
33
|
applyTerminalMetadata,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
nonEmptyString,
|
|
38
38
|
normalizeTerminalMetadata,
|
|
39
39
|
recordValue
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-UK7G4RKA.js";
|
|
41
41
|
import {
|
|
42
42
|
__export
|
|
43
43
|
} from "./chunk-MLKGABMK.js";
|
|
@@ -397,6 +397,13 @@ function proofAssessmentHardBlockers(state, payload) {
|
|
|
397
397
|
}
|
|
398
398
|
return blockers;
|
|
399
399
|
}
|
|
400
|
+
function proofGateStateForCheckpointResponse(state) {
|
|
401
|
+
const fullState = readJson(state.request.engine_state_path) || {};
|
|
402
|
+
return compactRecord({
|
|
403
|
+
...fullState,
|
|
404
|
+
verification_mode: nonEmptyString(fullState.verification_mode) || state.request.verification_mode
|
|
405
|
+
});
|
|
406
|
+
}
|
|
400
407
|
function proofAssessmentContinuation(result, payload) {
|
|
401
408
|
const proof_assessment_json = jsonParam(payload);
|
|
402
409
|
return { ...baseContinuation(result), proof_assessment_json };
|
|
@@ -943,6 +950,45 @@ function checkpointResponseContinuation(state, value) {
|
|
|
943
950
|
blocker: sourceBlocker
|
|
944
951
|
});
|
|
945
952
|
}
|
|
953
|
+
const proofGateState = proofGateStateForCheckpointResponse(state);
|
|
954
|
+
const hardBlockers = proofAssessmentHardBlockers(proofGateState, assessment);
|
|
955
|
+
if (proofAssessmentRequestsShip(assessment) && hardBlockers.length) {
|
|
956
|
+
return checkpointResponseRejectedBlocker(state, {
|
|
957
|
+
packet,
|
|
958
|
+
response,
|
|
959
|
+
blocker: {
|
|
960
|
+
code: "checkpoint_response_proof_hard_blocker",
|
|
961
|
+
checkpoint: packet.checkpoint,
|
|
962
|
+
message: "Riddle Proof cannot mark ready_to_ship while the proof bundle contains a hard blocker: " + hardBlockers[0],
|
|
963
|
+
details: compactRecord({
|
|
964
|
+
stage: packet.stage,
|
|
965
|
+
hard_blockers: hardBlockers,
|
|
966
|
+
proofAssessment: assessment,
|
|
967
|
+
response
|
|
968
|
+
})
|
|
969
|
+
}
|
|
970
|
+
});
|
|
971
|
+
}
|
|
972
|
+
const visualBlocker = proofAssessmentVisualBlocker(proofGateState, assessment);
|
|
973
|
+
if (visualBlocker) {
|
|
974
|
+
const recoveryAssessment = visualDeltaEvidenceRecoveryAssessment(proofGateState, assessment, visualBlocker);
|
|
975
|
+
appendCheckpointResponse(state, response, { summary: visualBlocker });
|
|
976
|
+
recordEvent(state, {
|
|
977
|
+
kind: "checkpoint.response.evidence_recovery_required",
|
|
978
|
+
checkpoint: packet.checkpoint,
|
|
979
|
+
stage: "verify",
|
|
980
|
+
summary: visualBlocker,
|
|
981
|
+
details: compactRecord({
|
|
982
|
+
evidence_collection_incomplete: true,
|
|
983
|
+
recovery_stage: "verify",
|
|
984
|
+
evidence_issue_code: recoveryAssessment.evidence_issue_code || null,
|
|
985
|
+
visual_delta: recoveryAssessment.visual_delta || null,
|
|
986
|
+
proof_assessment: recoveryAssessment,
|
|
987
|
+
checkpoint_response_source: response.source || null
|
|
988
|
+
})
|
|
989
|
+
});
|
|
990
|
+
return { next: { ...base, proof_assessment_json: jsonParam(recoveryAssessment) } };
|
|
991
|
+
}
|
|
946
992
|
appendCheckpointResponse(state, response);
|
|
947
993
|
if (state.request.ship_mode !== "ship" && proofAssessmentRequestsShip(assessment)) {
|
|
948
994
|
const result = {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
riddleProofPublicStateAllowsMergeRecommendation,
|
|
3
|
+
riddleProofPublicStateMergeRecommendation,
|
|
3
4
|
summarizeRiddleProofPublicState
|
|
4
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-6PSM6KB2.js";
|
|
5
6
|
|
|
6
7
|
// src/pr-comment.ts
|
|
7
8
|
var RIDDLE_PROOF_PR_COMMENT_MARKER = "<!-- riddle-proof:pr-comment:v1 -->";
|
|
@@ -153,6 +154,10 @@ function summarizeRiddleProofPrComment(input) {
|
|
|
153
154
|
status: firstStringValue(result.status, stopCondition.status),
|
|
154
155
|
checkpoint_summary: checkpointSummary || result.checkpoint_summary
|
|
155
156
|
});
|
|
157
|
+
const mergeRecommendation = riddleProofPublicStateMergeRecommendation(
|
|
158
|
+
publicState,
|
|
159
|
+
firstStringValue(result.merge_recommendation, stopCondition.merge_recommendation, resultRaw.merge_recommendation)
|
|
160
|
+
);
|
|
156
161
|
return {
|
|
157
162
|
ok,
|
|
158
163
|
status: stringValue(proofResult.status),
|
|
@@ -170,7 +175,7 @@ function summarizeRiddleProofPrComment(input) {
|
|
|
170
175
|
merge_ready: publicState.merge_ready,
|
|
171
176
|
sync_allowed: publicState.sync_allowed,
|
|
172
177
|
proof_decision: firstStringValue(result.proof_decision, stopCondition.proof_decision, resultRaw.proof_decision),
|
|
173
|
-
merge_recommendation:
|
|
178
|
+
merge_recommendation: mergeRecommendation,
|
|
174
179
|
checkpoint_summary: checkpointSummary,
|
|
175
180
|
public_state: publicState,
|
|
176
181
|
passed_checks: nestedChecks.passed,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeIntegrationContext,
|
|
3
3
|
normalizeRunParams
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NMQIWBSB.js";
|
|
5
5
|
import {
|
|
6
6
|
compactRecord
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-UK7G4RKA.js";
|
|
8
8
|
|
|
9
9
|
// src/openclaw.ts
|
|
10
10
|
function parseOpenClawAssertions(value) {
|
package/dist/cli/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-DDAV6D6K.js";
|
|
2
2
|
import "../chunk-DI2XNGEZ.js";
|
|
3
|
-
import "../chunk-
|
|
3
|
+
import "../chunk-RZ3GXSXQ.js";
|
|
4
4
|
import "../chunk-EX7TO4I5.js";
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-P4BHU5NM.js";
|
|
6
|
+
import "../chunk-NMQIWBSB.js";
|
|
7
|
+
import "../chunk-2OTPBHSM.js";
|
|
8
8
|
import "../chunk-EKZXU6MU.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-ZB5XBHWD.js";
|
|
10
10
|
import "../chunk-JFQXAJH2.js";
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-OD6OKXL2.js";
|
|
12
|
+
import "../chunk-UK7G4RKA.js";
|
|
13
|
+
import "../chunk-6PSM6KB2.js";
|
|
14
14
|
import "../chunk-MLKGABMK.js";
|