@riddledc/riddle-proof 0.8.51 → 0.8.53
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/openclaw.js +4 -4
- package/dist/advanced/engine-harness.cjs +79 -26
- package/dist/advanced/engine-harness.js +5 -5
- package/dist/advanced/index.cjs +81 -26
- package/dist/advanced/index.d.cts +2 -2
- package/dist/advanced/index.d.ts +2 -2
- package/dist/advanced/index.js +7 -7
- package/dist/advanced/proof-run-core.cjs +24 -2
- package/dist/advanced/proof-run-core.d.cts +1 -1
- package/dist/advanced/proof-run-core.d.ts +1 -1
- package/dist/advanced/proof-run-core.js +5 -1
- package/dist/advanced/proof-run-engine.cjs +20 -2
- package/dist/advanced/proof-run-engine.d.cts +2 -2
- package/dist/advanced/proof-run-engine.d.ts +2 -2
- package/dist/advanced/proof-run-engine.js +2 -2
- package/dist/advanced/runner.js +5 -5
- package/dist/checkpoint.cjs +41 -11
- package/dist/checkpoint.d.cts +2 -1
- package/dist/checkpoint.d.ts +2 -1
- package/dist/checkpoint.js +3 -1
- package/dist/{chunk-AWM2BKDF.js → chunk-2ALMXMFZ.js} +3 -2
- package/dist/{chunk-AXWJJ2LC.js → chunk-BLM5EIBA.js} +40 -11
- package/dist/{chunk-X7SQTCIQ.js → chunk-EKZXU6MU.js} +24 -2
- package/dist/{chunk-RBAU2M4S.js → chunk-JJ4IWRMJ.js} +1 -1
- package/dist/{chunk-OYWZGDTS.js → chunk-LNWJAHAQ.js} +1 -1
- package/dist/{chunk-DFQBQGSD.js → chunk-S5DX7Z6X.js} +2 -2
- package/dist/{chunk-IOI6QR3B.js → chunk-VYJD6XYF.js} +1 -1
- package/dist/{chunk-M3IE3VNC.js → chunk-WDIKPIMB.js} +1 -1
- package/dist/{chunk-ZHTJEZH5.js → chunk-ZLBOGPUL.js} +27 -17
- package/dist/cli/index.js +6 -6
- package/dist/cli.cjs +81 -26
- package/dist/cli.js +6 -6
- package/dist/engine-harness.cjs +79 -26
- package/dist/engine-harness.js +5 -5
- package/dist/index.cjs +82 -26
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -6
- package/dist/openclaw.js +4 -4
- package/dist/{proof-run-core-B1GeqkR8.d.ts → proof-run-core-7Dqm7RKM.d.cts} +6 -2
- package/dist/{proof-run-core-B1GeqkR8.d.cts → proof-run-core-7Dqm7RKM.d.ts} +6 -2
- package/dist/proof-run-core.cjs +24 -2
- package/dist/proof-run-core.d.cts +1 -1
- package/dist/proof-run-core.d.ts +1 -1
- package/dist/proof-run-core.js +5 -1
- package/dist/{proof-run-engine-BqaeqAze.d.ts → proof-run-engine-BqRoA3Do.d.ts} +1 -1
- package/dist/{proof-run-engine-4dM37pEx.d.cts → proof-run-engine-DpChFR5H.d.cts} +1 -1
- package/dist/proof-run-engine.cjs +20 -2
- package/dist/proof-run-engine.d.cts +2 -2
- package/dist/proof-run-engine.d.ts +2 -2
- package/dist/proof-run-engine.js +2 -2
- package/dist/run-card.js +2 -2
- package/dist/runner.js +5 -5
- package/dist/spec/checkpoint.cjs +41 -11
- package/dist/spec/checkpoint.d.cts +1 -1
- package/dist/spec/checkpoint.d.ts +1 -1
- package/dist/spec/checkpoint.js +3 -1
- package/dist/spec/index.cjs +41 -11
- package/dist/spec/index.d.cts +1 -1
- package/dist/spec/index.d.ts +1 -1
- package/dist/spec/index.js +5 -3
- package/dist/spec/run-card.js +2 -2
- package/dist/spec/state.js +3 -3
- package/dist/state.js +3 -3
- package/dist/types.d.cts +5 -0
- package/dist/types.d.ts +5 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -31,6 +31,24 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
31
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
32
|
|
|
33
33
|
// src/proof-run-core.ts
|
|
34
|
+
function canonicalProofAssessmentStageForDecision(decision) {
|
|
35
|
+
const normalized = typeof decision === "string" ? decision.trim() : "";
|
|
36
|
+
if (normalized === "ready_to_ship") return "ship";
|
|
37
|
+
if (normalized === "needs_richer_proof") return "author";
|
|
38
|
+
if (normalized === "revise_capture") return "verify";
|
|
39
|
+
if (normalized === "needs_recon") return "recon";
|
|
40
|
+
if (normalized === "needs_implementation") return "implement";
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
function normalizeProofAssessmentStageFields(assessment) {
|
|
44
|
+
const canonicalStage = canonicalProofAssessmentStageForDecision(assessment.decision);
|
|
45
|
+
if (!canonicalStage) return assessment;
|
|
46
|
+
return {
|
|
47
|
+
...assessment,
|
|
48
|
+
recommended_stage: canonicalStage,
|
|
49
|
+
continue_with_stage: canonicalStage
|
|
50
|
+
};
|
|
51
|
+
}
|
|
34
52
|
function normalizedMode(value) {
|
|
35
53
|
return typeof value === "string" ? value.trim().toLowerCase() : "";
|
|
36
54
|
}
|
|
@@ -866,10 +884,10 @@ function mergeStateFromParams(statePath, params) {
|
|
|
866
884
|
state.proof_assessment_source = null;
|
|
867
885
|
} else {
|
|
868
886
|
const parsed = JSON.parse(raw);
|
|
869
|
-
const assessment = {
|
|
887
|
+
const assessment = normalizeProofAssessmentStageFields({
|
|
870
888
|
...parsed,
|
|
871
889
|
source: (parsed?.source || "supervising_agent").toString()
|
|
872
|
-
};
|
|
890
|
+
});
|
|
873
891
|
const readyBlocker = assessment?.decision === "ready_to_ship" ? visualDeltaShipGateReason({ ...state, proof_assessment: assessment, proof_assessment_source: assessment.source }) : null;
|
|
874
892
|
if (readyBlocker) {
|
|
875
893
|
assessment.blocked_decision = assessment.decision;
|
|
@@ -3440,6 +3458,7 @@ __export(index_exports, {
|
|
|
3440
3458
|
buildRiddleProofProfileScript: () => buildRiddleProofProfileScript,
|
|
3441
3459
|
buildStageCheckpointPacket: () => buildStageCheckpointPacket,
|
|
3442
3460
|
buildVisualProofSession: () => buildVisualProofSession,
|
|
3461
|
+
checkpointPacketIdentity: () => checkpointPacketIdentity,
|
|
3443
3462
|
checkpointResponseIdentity: () => checkpointResponseIdentity,
|
|
3444
3463
|
checkpointSummaryFromState: () => checkpointSummaryFromState,
|
|
3445
3464
|
collectRiddlePreviewDeployWarnings: () => collectRiddlePreviewDeployWarnings,
|
|
@@ -3781,12 +3800,13 @@ function statePathsForRunState(state, engineStatePath2) {
|
|
|
3781
3800
|
function responseSchemaForAuthorPacket() {
|
|
3782
3801
|
return {
|
|
3783
3802
|
type: "object",
|
|
3784
|
-
required: ["version", "run_id", "checkpoint", "decision", "summary", "payload", "created_at"],
|
|
3803
|
+
required: ["version", "run_id", "checkpoint", "packet_id", "decision", "summary", "payload", "created_at"],
|
|
3785
3804
|
additionalProperties: false,
|
|
3786
3805
|
properties: {
|
|
3787
3806
|
version: { const: RIDDLE_PROOF_CHECKPOINT_RESPONSE_VERSION },
|
|
3788
3807
|
run_id: { type: "string" },
|
|
3789
3808
|
checkpoint: { type: "string" },
|
|
3809
|
+
packet_id: { type: "string" },
|
|
3790
3810
|
resume_token: { type: "string" },
|
|
3791
3811
|
decision: {
|
|
3792
3812
|
type: "string",
|
|
@@ -3814,12 +3834,13 @@ function responseSchemaForAuthorPacket() {
|
|
|
3814
3834
|
function responseSchemaForProofAssessmentPacket() {
|
|
3815
3835
|
return {
|
|
3816
3836
|
type: "object",
|
|
3817
|
-
required: ["version", "run_id", "checkpoint", "decision", "summary", "created_at"],
|
|
3837
|
+
required: ["version", "run_id", "checkpoint", "packet_id", "decision", "summary", "created_at"],
|
|
3818
3838
|
additionalProperties: false,
|
|
3819
3839
|
properties: {
|
|
3820
3840
|
version: { const: RIDDLE_PROOF_CHECKPOINT_RESPONSE_VERSION },
|
|
3821
3841
|
run_id: { type: "string" },
|
|
3822
3842
|
checkpoint: { type: "string" },
|
|
3843
|
+
packet_id: { type: "string" },
|
|
3823
3844
|
resume_token: { type: "string" },
|
|
3824
3845
|
decision: {
|
|
3825
3846
|
type: "string",
|
|
@@ -3855,12 +3876,13 @@ function responseSchemaForProofAssessmentPacket() {
|
|
|
3855
3876
|
function responseSchemaForReconPacket() {
|
|
3856
3877
|
return {
|
|
3857
3878
|
type: "object",
|
|
3858
|
-
required: ["version", "run_id", "checkpoint", "decision", "summary", "created_at"],
|
|
3879
|
+
required: ["version", "run_id", "checkpoint", "packet_id", "decision", "summary", "created_at"],
|
|
3859
3880
|
additionalProperties: false,
|
|
3860
3881
|
properties: {
|
|
3861
3882
|
version: { const: RIDDLE_PROOF_CHECKPOINT_RESPONSE_VERSION },
|
|
3862
3883
|
run_id: { type: "string" },
|
|
3863
3884
|
checkpoint: { type: "string" },
|
|
3885
|
+
packet_id: { type: "string" },
|
|
3864
3886
|
resume_token: { type: "string" },
|
|
3865
3887
|
decision: {
|
|
3866
3888
|
type: "string",
|
|
@@ -3888,12 +3910,13 @@ function responseSchemaForReconPacket() {
|
|
|
3888
3910
|
function responseSchemaForImplementationPacket() {
|
|
3889
3911
|
return {
|
|
3890
3912
|
type: "object",
|
|
3891
|
-
required: ["version", "run_id", "checkpoint", "decision", "summary", "created_at"],
|
|
3913
|
+
required: ["version", "run_id", "checkpoint", "packet_id", "decision", "summary", "created_at"],
|
|
3892
3914
|
additionalProperties: false,
|
|
3893
3915
|
properties: {
|
|
3894
3916
|
version: { const: RIDDLE_PROOF_CHECKPOINT_RESPONSE_VERSION },
|
|
3895
3917
|
run_id: { type: "string" },
|
|
3896
3918
|
checkpoint: { type: "string" },
|
|
3919
|
+
packet_id: { type: "string" },
|
|
3897
3920
|
resume_token: { type: "string" },
|
|
3898
3921
|
decision: {
|
|
3899
3922
|
type: "string",
|
|
@@ -3921,12 +3944,13 @@ function responseSchemaForImplementationPacket() {
|
|
|
3921
3944
|
function responseSchemaForAdvancePacket(stage) {
|
|
3922
3945
|
return {
|
|
3923
3946
|
type: "object",
|
|
3924
|
-
required: ["version", "run_id", "checkpoint", "decision", "summary", "created_at"],
|
|
3947
|
+
required: ["version", "run_id", "checkpoint", "packet_id", "decision", "summary", "created_at"],
|
|
3925
3948
|
additionalProperties: false,
|
|
3926
3949
|
properties: {
|
|
3927
3950
|
version: { const: RIDDLE_PROOF_CHECKPOINT_RESPONSE_VERSION },
|
|
3928
3951
|
run_id: { type: "string" },
|
|
3929
3952
|
checkpoint: { type: "string" },
|
|
3953
|
+
packet_id: { type: "string" },
|
|
3930
3954
|
resume_token: { type: "string" },
|
|
3931
3955
|
decision: {
|
|
3932
3956
|
type: "string",
|
|
@@ -3952,6 +3976,20 @@ function resumeTokenFor(input) {
|
|
|
3952
3976
|
const hash = import_node_crypto.default.createHash("sha256").update(JSON.stringify(input)).digest("hex").slice(0, 24);
|
|
3953
3977
|
return `rpchk_${hash}`;
|
|
3954
3978
|
}
|
|
3979
|
+
function packetIdentityPayload(packet) {
|
|
3980
|
+
const { packet_id: _packetId, ...identityPayload } = packet;
|
|
3981
|
+
return identityPayload;
|
|
3982
|
+
}
|
|
3983
|
+
function checkpointPacketIdentity(packet) {
|
|
3984
|
+
const hash = import_node_crypto.default.createHash("sha256").update(stableJson(packetIdentityPayload(packet))).digest("hex").slice(0, 24);
|
|
3985
|
+
return `rppkt_${hash}`;
|
|
3986
|
+
}
|
|
3987
|
+
function withPacketIdentity(packet) {
|
|
3988
|
+
return {
|
|
3989
|
+
...packet,
|
|
3990
|
+
packet_id: checkpointPacketIdentity(packet)
|
|
3991
|
+
};
|
|
3992
|
+
}
|
|
3955
3993
|
function artifactsFromState(state) {
|
|
3956
3994
|
const artifacts = [];
|
|
3957
3995
|
for (const role of ["before", "prod", "after"]) {
|
|
@@ -4024,7 +4062,7 @@ function buildStageCheckpointPacket(input) {
|
|
|
4024
4062
|
const checkpointContract = recordValue(input.engineResult.checkpointContract);
|
|
4025
4063
|
const summary = nonEmptyString(input.engineResult.summary) || nonEmptyString(fullState.stage_summary) || `${stage} checkpoint needs a supervising decision.`;
|
|
4026
4064
|
const kind = packetKindForStage(stage, checkpoint);
|
|
4027
|
-
return {
|
|
4065
|
+
return withPacketIdentity({
|
|
4028
4066
|
version: RIDDLE_PROOF_CHECKPOINT_PACKET_VERSION,
|
|
4029
4067
|
run_id: runId,
|
|
4030
4068
|
state_path: input.runState.state_path,
|
|
@@ -4073,7 +4111,7 @@ function buildStageCheckpointPacket(input) {
|
|
|
4073
4111
|
stage
|
|
4074
4112
|
}),
|
|
4075
4113
|
created_at: input.created_at || timestamp()
|
|
4076
|
-
};
|
|
4114
|
+
});
|
|
4077
4115
|
}
|
|
4078
4116
|
function buildAuthorCheckpointPacket(input) {
|
|
4079
4117
|
const checkpoint = nonEmptyString(input.engineResult.checkpoint) || "author_supervisor_judgment";
|
|
@@ -4086,7 +4124,7 @@ function buildAuthorCheckpointPacket(input) {
|
|
|
4086
4124
|
const reconResults = recordValue(fullState.recon_results);
|
|
4087
4125
|
const checkpointContract = recordValue(input.engineResult.checkpointContract);
|
|
4088
4126
|
const summary = nonEmptyString(input.engineResult.summary) || nonEmptyString(fullState.author_summary) || "Author checkpoint needs a supervising proof packet.";
|
|
4089
|
-
return {
|
|
4127
|
+
return withPacketIdentity({
|
|
4090
4128
|
version: RIDDLE_PROOF_CHECKPOINT_PACKET_VERSION,
|
|
4091
4129
|
run_id: runId,
|
|
4092
4130
|
state_path: input.runState.state_path,
|
|
@@ -4135,7 +4173,7 @@ function buildAuthorCheckpointPacket(input) {
|
|
|
4135
4173
|
stage
|
|
4136
4174
|
}),
|
|
4137
4175
|
created_at: input.created_at || timestamp()
|
|
4138
|
-
};
|
|
4176
|
+
});
|
|
4139
4177
|
}
|
|
4140
4178
|
function visualDeltaFromState(fullState) {
|
|
4141
4179
|
const bundle = recordValue(fullState.evidence_bundle);
|
|
@@ -4206,7 +4244,7 @@ function buildProofAssessmentCheckpointPacket(input) {
|
|
|
4206
4244
|
const evidenceIssueCode2 = visualDeltaIssueCode(visualDelta, visualDeltaRequired);
|
|
4207
4245
|
const summary = nonEmptyString(input.engineResult.summary) || nonEmptyString(fullState.verify_summary) || "Verify captured evidence and needs a supervising proof assessment.";
|
|
4208
4246
|
const recoveryHint = evidenceIssueCode2 ? "Required visual_delta evidence is incomplete. Keep this same run in verify/evidence recovery with decision=revise_capture and continue_with_stage=verify unless the evidence proves an implementation or recon problem." : "Assess whether the current artifacts prove the requested change, then choose the next stage.";
|
|
4209
|
-
return {
|
|
4247
|
+
return withPacketIdentity({
|
|
4210
4248
|
version: RIDDLE_PROOF_CHECKPOINT_PACKET_VERSION,
|
|
4211
4249
|
run_id: runId,
|
|
4212
4250
|
state_path: input.runState.state_path,
|
|
@@ -4266,7 +4304,7 @@ function buildProofAssessmentCheckpointPacket(input) {
|
|
|
4266
4304
|
stage
|
|
4267
4305
|
}),
|
|
4268
4306
|
created_at: input.created_at || timestamp()
|
|
4269
|
-
};
|
|
4307
|
+
});
|
|
4270
4308
|
}
|
|
4271
4309
|
function buildCheckpointPacketForEngineResult(input) {
|
|
4272
4310
|
const checkpoint = nonEmptyString(input.engineResult.checkpoint) || "";
|
|
@@ -4295,6 +4333,7 @@ function normalizeCheckpointResponse(value) {
|
|
|
4295
4333
|
version: RIDDLE_PROOF_CHECKPOINT_RESPONSE_VERSION,
|
|
4296
4334
|
run_id: runId,
|
|
4297
4335
|
checkpoint,
|
|
4336
|
+
packet_id: nonEmptyString(record.packet_id),
|
|
4298
4337
|
resume_token: nonEmptyString(record.resume_token),
|
|
4299
4338
|
decision,
|
|
4300
4339
|
summary,
|
|
@@ -4382,6 +4421,7 @@ function createCheckpointResponseTemplate(packet, input = {}) {
|
|
|
4382
4421
|
version: RIDDLE_PROOF_CHECKPOINT_RESPONSE_VERSION,
|
|
4383
4422
|
run_id: packet.run_id,
|
|
4384
4423
|
checkpoint: packet.checkpoint,
|
|
4424
|
+
packet_id: packet.packet_id,
|
|
4385
4425
|
resume_token: packet.resume_token,
|
|
4386
4426
|
decision,
|
|
4387
4427
|
summary: input.summary || `TODO: explain checkpoint decision ${decision}.`,
|
|
@@ -4415,6 +4455,9 @@ function checkpointSummaryFromState(state, engineStatePath2) {
|
|
|
4415
4455
|
const latestResponseEntry = [...responses].reverse().find((entry) => entry.response);
|
|
4416
4456
|
const latestPacket = state.checkpoint_packet || latestPacketEntry?.packet;
|
|
4417
4457
|
const latestResponse = latestResponseEntry?.response;
|
|
4458
|
+
const latestPacketId = latestPacket?.packet_id || null;
|
|
4459
|
+
const latestResponsePacketId = latestResponse?.packet_id || null;
|
|
4460
|
+
const packetIdMatches = !latestResponse ? null : latestPacketId && latestResponsePacketId ? latestPacketId === latestResponsePacketId : latestPacketId || latestResponsePacketId ? false : null;
|
|
4418
4461
|
const latestResumeToken = latestPacket?.resume_token || null;
|
|
4419
4462
|
const latestResponseToken = latestResponse?.resume_token || null;
|
|
4420
4463
|
const tokenMatches = !latestResponse ? null : latestResumeToken && latestResponseToken ? latestResumeToken === latestResponseToken : latestResumeToken || latestResponseToken ? false : null;
|
|
@@ -4429,6 +4472,9 @@ function checkpointSummaryFromState(state, engineStatePath2) {
|
|
|
4429
4472
|
latest_decision: latestResponse?.decision || null,
|
|
4430
4473
|
latest_packet_summary: latestPacket?.summary || null,
|
|
4431
4474
|
latest_response_summary: latestResponse?.summary || null,
|
|
4475
|
+
latest_packet_id: latestPacketId,
|
|
4476
|
+
latest_response_packet_id: latestResponsePacketId,
|
|
4477
|
+
packet_id_matches: packetIdMatches,
|
|
4432
4478
|
latest_resume_token: latestResumeToken,
|
|
4433
4479
|
latest_response_token: latestResponseToken,
|
|
4434
4480
|
token_matches: tokenMatches,
|
|
@@ -4445,6 +4491,7 @@ function checkpointResponseIdentity(response) {
|
|
|
4445
4491
|
const logicalResponse = compactRecord({
|
|
4446
4492
|
run_id: response.run_id,
|
|
4447
4493
|
checkpoint: response.checkpoint,
|
|
4494
|
+
packet_id: response.packet_id,
|
|
4448
4495
|
resume_token: response.resume_token,
|
|
4449
4496
|
decision: response.decision,
|
|
4450
4497
|
summary: response.summary,
|
|
@@ -5762,10 +5809,7 @@ function isReadyShipGate(result) {
|
|
|
5762
5809
|
return Boolean(gate && gate.ok === true);
|
|
5763
5810
|
}
|
|
5764
5811
|
function proofAssessmentRequestsShip(payload) {
|
|
5765
|
-
|
|
5766
|
-
const recommendedStage = String(payload.recommended_stage || "");
|
|
5767
|
-
const continueStage = String(payload.continue_with_stage || "");
|
|
5768
|
-
return decision === "ready_to_ship" || recommendedStage === "ship" || continueStage === "ship";
|
|
5812
|
+
return String(payload.decision || "").trim() === "ready_to_ship";
|
|
5769
5813
|
}
|
|
5770
5814
|
function proofAssessmentHardBlockers(state, payload) {
|
|
5771
5815
|
const blockers = proofAssessmentHardBlockersForState(state || {});
|
|
@@ -5783,12 +5827,7 @@ function proofAssessmentContinuation(result, payload) {
|
|
|
5783
5827
|
return { ...baseContinuation(result), proof_assessment_json };
|
|
5784
5828
|
}
|
|
5785
5829
|
function defaultStageForProofCheckpointDecision(decision) {
|
|
5786
|
-
|
|
5787
|
-
if (decision === "needs_implementation") return "implement";
|
|
5788
|
-
if (decision === "needs_recon") return "recon";
|
|
5789
|
-
if (decision === "revise_capture") return "verify";
|
|
5790
|
-
if (decision === "needs_richer_proof") return "author";
|
|
5791
|
-
return null;
|
|
5830
|
+
return canonicalProofAssessmentStageForDecision(decision);
|
|
5792
5831
|
}
|
|
5793
5832
|
function checkpointContractFromPacket(packet) {
|
|
5794
5833
|
return recordValue(packet.evidence_excerpt?.checkpoint_contract) || recordValue(recordValue(packet.state_excerpt?.stage_decision_request)?.checkpoint_contract) || null;
|
|
@@ -5814,7 +5853,7 @@ function proofAssessmentPayloadFromCheckpointResponse(response) {
|
|
|
5814
5853
|
}
|
|
5815
5854
|
const payload = recordValue(response.payload) || {};
|
|
5816
5855
|
const stage = nonEmptyString(payload.continue_with_stage) || response.continue_with_stage || nonEmptyString(payload.recommended_stage) || defaultStageForProofCheckpointDecision(response.decision);
|
|
5817
|
-
return compactRecord({
|
|
5856
|
+
return normalizeProofAssessmentStageFields(compactRecord({
|
|
5818
5857
|
...payload,
|
|
5819
5858
|
decision: response.decision,
|
|
5820
5859
|
summary: response.summary,
|
|
@@ -5825,7 +5864,7 @@ function proofAssessmentPayloadFromCheckpointResponse(response) {
|
|
|
5825
5864
|
source: "supervising_agent",
|
|
5826
5865
|
checkpoint_response_source: response.source || null,
|
|
5827
5866
|
checkpoint_response_created_at: response.created_at
|
|
5828
|
-
});
|
|
5867
|
+
}));
|
|
5829
5868
|
}
|
|
5830
5869
|
function reconAssessmentPayloadFromCheckpointResponse(response) {
|
|
5831
5870
|
if (![
|
|
@@ -6149,6 +6188,22 @@ function checkpointResponseContinuation(state, value) {
|
|
|
6149
6188
|
}
|
|
6150
6189
|
};
|
|
6151
6190
|
}
|
|
6191
|
+
if (packet.packet_id && response.packet_id !== packet.packet_id) {
|
|
6192
|
+
return {
|
|
6193
|
+
blocker: {
|
|
6194
|
+
code: "checkpoint_response_packet_id_mismatch",
|
|
6195
|
+
checkpoint: packet.checkpoint,
|
|
6196
|
+
message: "Checkpoint response packet_id does not match the pending checkpoint packet.",
|
|
6197
|
+
details: {
|
|
6198
|
+
stage: packet.stage,
|
|
6199
|
+
expected_packet_id: packet.packet_id,
|
|
6200
|
+
actual_packet_id: response.packet_id || null,
|
|
6201
|
+
expected_resume_token: packet.resume_token || null,
|
|
6202
|
+
actual_resume_token: response.resume_token || null
|
|
6203
|
+
}
|
|
6204
|
+
}
|
|
6205
|
+
};
|
|
6206
|
+
}
|
|
6152
6207
|
if (!packet.allowed_decisions.includes(response.decision)) {
|
|
6153
6208
|
return {
|
|
6154
6209
|
blocker: {
|
|
@@ -6775,7 +6830,7 @@ async function routeCheckpoint(request, state, result, agent, input) {
|
|
|
6775
6830
|
}
|
|
6776
6831
|
return { blocker };
|
|
6777
6832
|
}
|
|
6778
|
-
const payload = assessment.payload;
|
|
6833
|
+
const payload = normalizeProofAssessmentStageFields(assessment.payload);
|
|
6779
6834
|
recordEvent(state, {
|
|
6780
6835
|
kind: "agent.proof_assessment.completed",
|
|
6781
6836
|
checkpoint,
|
|
@@ -19949,6 +20004,7 @@ function buildRiddleProofPrCommentMarkdown(input) {
|
|
|
19949
20004
|
buildRiddleProofProfileScript,
|
|
19950
20005
|
buildStageCheckpointPacket,
|
|
19951
20006
|
buildVisualProofSession,
|
|
20007
|
+
checkpointPacketIdentity,
|
|
19952
20008
|
checkpointResponseIdentity,
|
|
19953
20009
|
checkpointSummaryFromState,
|
|
19954
20010
|
collectRiddlePreviewDeployWarnings,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
2
|
export { TerminalMetadataInput, applyTerminalMetadata, compactRecord, createRunResult, isSuccessfulStatus, isTerminalStatus, nonEmptyString, normalizeTerminalMetadata, recordValue } 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
|
-
export { RIDDLE_PROOF_CHECKPOINT_PACKET_VERSION, RIDDLE_PROOF_CHECKPOINT_RESPONSE_VERSION, authorPacketPayloadFromCheckpointResponse, buildAuthorCheckpointPacket, buildCheckpointPacketForEngineResult, buildProofAssessmentCheckpointPacket, buildStageCheckpointPacket, checkpointResponseIdentity, checkpointSummaryFromState, createCheckpointResponseTemplate, isDuplicateCheckpointResponse, normalizeCheckpointResponse, proofContractFromAuthorCheckpointResponse, statePathsForRunState } from './checkpoint.cjs';
|
|
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
6
|
export { R as RiddleProofRunnerAdapters, a as RunRiddleProofInput, r as runRiddleProof } from './runner-4LJ5z0D-.cjs';
|
|
7
7
|
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';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
2
|
export { TerminalMetadataInput, applyTerminalMetadata, compactRecord, createRunResult, isSuccessfulStatus, isTerminalStatus, nonEmptyString, normalizeTerminalMetadata, recordValue } 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
|
-
export { RIDDLE_PROOF_CHECKPOINT_PACKET_VERSION, RIDDLE_PROOF_CHECKPOINT_RESPONSE_VERSION, authorPacketPayloadFromCheckpointResponse, buildAuthorCheckpointPacket, buildCheckpointPacketForEngineResult, buildProofAssessmentCheckpointPacket, buildStageCheckpointPacket, checkpointResponseIdentity, checkpointSummaryFromState, createCheckpointResponseTemplate, isDuplicateCheckpointResponse, normalizeCheckpointResponse, proofContractFromAuthorCheckpointResponse, statePathsForRunState } from './checkpoint.js';
|
|
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
6
|
export { R as RiddleProofRunnerAdapters, a as RunRiddleProofInput, r as runRiddleProof } from './runner-BdQpOkZD.js';
|
|
7
7
|
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';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runRiddleProof
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-S5DX7Z6X.js";
|
|
4
4
|
import "./chunk-6F4PWJZI.js";
|
|
5
5
|
import {
|
|
6
6
|
RIDDLE_PROOF_PLAYABILITY_ASSESSMENT_VERSION,
|
|
@@ -102,7 +102,7 @@ import {
|
|
|
102
102
|
createDisabledRiddleProofAgentAdapter,
|
|
103
103
|
readRiddleProofRunStatus,
|
|
104
104
|
runRiddleProofEngineHarness
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-ZLBOGPUL.js";
|
|
106
106
|
import {
|
|
107
107
|
RIDDLE_PROOF_RUN_STATE_VERSION,
|
|
108
108
|
appendRunEvent,
|
|
@@ -114,12 +114,12 @@ import {
|
|
|
114
114
|
normalizePrLifecycleState,
|
|
115
115
|
normalizeRunParams,
|
|
116
116
|
setRunStatus
|
|
117
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-WDIKPIMB.js";
|
|
118
118
|
import {
|
|
119
119
|
RIDDLE_PROOF_RUN_CARD_VERSION,
|
|
120
120
|
createRiddleProofRunCard
|
|
121
|
-
} from "./chunk-
|
|
122
|
-
import "./chunk-
|
|
121
|
+
} from "./chunk-JJ4IWRMJ.js";
|
|
122
|
+
import "./chunk-EKZXU6MU.js";
|
|
123
123
|
import {
|
|
124
124
|
RIDDLE_PROOF_CHECKPOINT_PACKET_VERSION,
|
|
125
125
|
RIDDLE_PROOF_CHECKPOINT_RESPONSE_VERSION,
|
|
@@ -128,6 +128,7 @@ import {
|
|
|
128
128
|
buildCheckpointPacketForEngineResult,
|
|
129
129
|
buildProofAssessmentCheckpointPacket,
|
|
130
130
|
buildStageCheckpointPacket,
|
|
131
|
+
checkpointPacketIdentity,
|
|
131
132
|
checkpointResponseIdentity,
|
|
132
133
|
checkpointSummaryFromState,
|
|
133
134
|
createCheckpointResponseTemplate,
|
|
@@ -135,7 +136,7 @@ import {
|
|
|
135
136
|
normalizeCheckpointResponse,
|
|
136
137
|
proofContractFromAuthorCheckpointResponse,
|
|
137
138
|
statePathsForRunState
|
|
138
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-BLM5EIBA.js";
|
|
139
140
|
import "./chunk-JFQXAJH2.js";
|
|
140
141
|
import {
|
|
141
142
|
createCodexExecAgentAdapter,
|
|
@@ -205,6 +206,7 @@ export {
|
|
|
205
206
|
buildRiddleProofProfileScript,
|
|
206
207
|
buildStageCheckpointPacket,
|
|
207
208
|
buildVisualProofSession,
|
|
209
|
+
checkpointPacketIdentity,
|
|
208
210
|
checkpointResponseIdentity,
|
|
209
211
|
checkpointSummaryFromState,
|
|
210
212
|
collectRiddlePreviewDeployWarnings,
|
package/dist/openclaw.js
CHANGED
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
parseOpenClawAssertions,
|
|
4
4
|
parseOpenClawJsonObjectOrArray,
|
|
5
5
|
toRiddleProofRunParams
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-LNWJAHAQ.js";
|
|
7
|
+
import "./chunk-WDIKPIMB.js";
|
|
8
|
+
import "./chunk-JJ4IWRMJ.js";
|
|
9
|
+
import "./chunk-BLM5EIBA.js";
|
|
10
10
|
import "./chunk-VY4Y5U57.js";
|
|
11
11
|
import "./chunk-MLKGABMK.js";
|
|
12
12
|
export {
|
|
@@ -62,6 +62,8 @@ interface WorkflowParams {
|
|
|
62
62
|
update_base_checkout?: boolean;
|
|
63
63
|
advance_stage?: WorkflowStage;
|
|
64
64
|
}
|
|
65
|
+
declare function canonicalProofAssessmentStageForDecision(decision: unknown): WorkflowStage | null;
|
|
66
|
+
declare function normalizeProofAssessmentStageFields<T extends Record<string, unknown>>(assessment: T): T;
|
|
65
67
|
declare function previewModeFromWorkflowMode(value: unknown): "server" | "static" | undefined;
|
|
66
68
|
declare function noImplementationModeFor(params?: unknown, state?: unknown): boolean;
|
|
67
69
|
interface PluginConfig {
|
|
@@ -335,6 +337,7 @@ type proofRunCore_WorkflowParams = WorkflowParams;
|
|
|
335
337
|
type proofRunCore_WorkflowStage = WorkflowStage;
|
|
336
338
|
declare const proofRunCore_buildCheckpointContract: typeof buildCheckpointContract;
|
|
337
339
|
declare const proofRunCore_buildSetupArgs: typeof buildSetupArgs;
|
|
340
|
+
declare const proofRunCore_canonicalProofAssessmentStageForDecision: typeof canonicalProofAssessmentStageForDecision;
|
|
338
341
|
declare const proofRunCore_checkpointContinueStage: typeof checkpointContinueStage;
|
|
339
342
|
declare const proofRunCore_clearStageDecisionRequest: typeof clearStageDecisionRequest;
|
|
340
343
|
declare const proofRunCore_ensureAction: typeof ensureAction;
|
|
@@ -342,6 +345,7 @@ declare const proofRunCore_ensureStageLoopState: typeof ensureStageLoopState;
|
|
|
342
345
|
declare const proofRunCore_invalidateVerifyEvidence: typeof invalidateVerifyEvidence;
|
|
343
346
|
declare const proofRunCore_mergeStateFromParams: typeof mergeStateFromParams;
|
|
344
347
|
declare const proofRunCore_noImplementationModeFor: typeof noImplementationModeFor;
|
|
348
|
+
declare const proofRunCore_normalizeProofAssessmentStageFields: typeof normalizeProofAssessmentStageFields;
|
|
345
349
|
declare const proofRunCore_previewModeFromWorkflowMode: typeof previewModeFromWorkflowMode;
|
|
346
350
|
declare const proofRunCore_proofAssessmentHardBlockersForState: typeof proofAssessmentHardBlockersForState;
|
|
347
351
|
declare const proofRunCore_readState: typeof readState;
|
|
@@ -358,7 +362,7 @@ declare const proofRunCore_visualDeltaShipGateReason: typeof visualDeltaShipGate
|
|
|
358
362
|
declare const proofRunCore_workflowFile: typeof workflowFile;
|
|
359
363
|
declare const proofRunCore_writeState: typeof writeState;
|
|
360
364
|
declare namespace proofRunCore {
|
|
361
|
-
export { proofRunCore_BUNDLED_RIDDLE_PROOF_DIR as BUNDLED_RIDDLE_PROOF_DIR, proofRunCore_CHECKPOINT_CONTRACT_VERSION as CHECKPOINT_CONTRACT_VERSION, type proofRunCore_CheckpointInputContract as CheckpointInputContract, type proofRunCore_PluginConfig as PluginConfig, proofRunCore_RIDDLE_PROOF_DIR_CANDIDATES as RIDDLE_PROOF_DIR_CANDIDATES, type proofRunCore_ShipGateValidation as ShipGateValidation, proofRunCore_WORKFLOW_STAGE_ORDER as WORKFLOW_STAGE_ORDER, type proofRunCore_WorkflowAction as WorkflowAction, type proofRunCore_WorkflowParams as WorkflowParams, type proofRunCore_WorkflowStage as WorkflowStage, proofRunCore_buildCheckpointContract as buildCheckpointContract, proofRunCore_buildSetupArgs as buildSetupArgs, proofRunCore_checkpointContinueStage as checkpointContinueStage, proofRunCore_clearStageDecisionRequest as clearStageDecisionRequest, proofRunCore_ensureAction as ensureAction, proofRunCore_ensureStageLoopState as ensureStageLoopState, proofRunCore_invalidateVerifyEvidence as invalidateVerifyEvidence, proofRunCore_mergeStateFromParams as mergeStateFromParams, proofRunCore_noImplementationModeFor as noImplementationModeFor, proofRunCore_previewModeFromWorkflowMode as previewModeFromWorkflowMode, proofRunCore_proofAssessmentHardBlockersForState as proofAssessmentHardBlockersForState, proofRunCore_readState as readState, proofRunCore_recordStageAttempt as recordStageAttempt, proofRunCore_requiredBaselineLabelsForState as requiredBaselineLabelsForState, proofRunCore_resolveConfig as resolveConfig, proofRunCore_resolveRiddleProofDir as resolveRiddleProofDir, proofRunCore_setStageDecisionRequest as setStageDecisionRequest, proofRunCore_summarizeState as summarizeState, proofRunCore_validateShipGate as validateShipGate, proofRunCore_visualDeltaForState as visualDeltaForState, proofRunCore_visualDeltaRequiredForState as visualDeltaRequiredForState, proofRunCore_visualDeltaShipGateReason as visualDeltaShipGateReason, proofRunCore_workflowFile as workflowFile, proofRunCore_writeState as writeState };
|
|
365
|
+
export { proofRunCore_BUNDLED_RIDDLE_PROOF_DIR as BUNDLED_RIDDLE_PROOF_DIR, proofRunCore_CHECKPOINT_CONTRACT_VERSION as CHECKPOINT_CONTRACT_VERSION, type proofRunCore_CheckpointInputContract as CheckpointInputContract, type proofRunCore_PluginConfig as PluginConfig, proofRunCore_RIDDLE_PROOF_DIR_CANDIDATES as RIDDLE_PROOF_DIR_CANDIDATES, type proofRunCore_ShipGateValidation as ShipGateValidation, proofRunCore_WORKFLOW_STAGE_ORDER as WORKFLOW_STAGE_ORDER, type proofRunCore_WorkflowAction as WorkflowAction, type proofRunCore_WorkflowParams as WorkflowParams, type proofRunCore_WorkflowStage as WorkflowStage, proofRunCore_buildCheckpointContract as buildCheckpointContract, proofRunCore_buildSetupArgs as buildSetupArgs, proofRunCore_canonicalProofAssessmentStageForDecision as canonicalProofAssessmentStageForDecision, proofRunCore_checkpointContinueStage as checkpointContinueStage, proofRunCore_clearStageDecisionRequest as clearStageDecisionRequest, proofRunCore_ensureAction as ensureAction, proofRunCore_ensureStageLoopState as ensureStageLoopState, proofRunCore_invalidateVerifyEvidence as invalidateVerifyEvidence, proofRunCore_mergeStateFromParams as mergeStateFromParams, proofRunCore_noImplementationModeFor as noImplementationModeFor, proofRunCore_normalizeProofAssessmentStageFields as normalizeProofAssessmentStageFields, proofRunCore_previewModeFromWorkflowMode as previewModeFromWorkflowMode, proofRunCore_proofAssessmentHardBlockersForState as proofAssessmentHardBlockersForState, proofRunCore_readState as readState, proofRunCore_recordStageAttempt as recordStageAttempt, proofRunCore_requiredBaselineLabelsForState as requiredBaselineLabelsForState, proofRunCore_resolveConfig as resolveConfig, proofRunCore_resolveRiddleProofDir as resolveRiddleProofDir, proofRunCore_setStageDecisionRequest as setStageDecisionRequest, proofRunCore_summarizeState as summarizeState, proofRunCore_validateShipGate as validateShipGate, proofRunCore_visualDeltaForState as visualDeltaForState, proofRunCore_visualDeltaRequiredForState as visualDeltaRequiredForState, proofRunCore_visualDeltaShipGateReason as visualDeltaShipGateReason, proofRunCore_workflowFile as workflowFile, proofRunCore_writeState as writeState };
|
|
362
366
|
}
|
|
363
367
|
|
|
364
|
-
export {
|
|
368
|
+
export { visualDeltaForState as A, BUNDLED_RIDDLE_PROOF_DIR as B, CHECKPOINT_CONTRACT_VERSION as C, visualDeltaRequiredForState as D, visualDeltaShipGateReason as E, workflowFile as F, writeState as G, type PluginConfig as P, RIDDLE_PROOF_DIR_CANDIDATES as R, type ShipGateValidation as S, type WorkflowParams as W, type WorkflowStage as a, type CheckpointInputContract as b, WORKFLOW_STAGE_ORDER as c, type WorkflowAction as d, buildCheckpointContract as e, buildSetupArgs as f, canonicalProofAssessmentStageForDecision as g, checkpointContinueStage as h, clearStageDecisionRequest as i, ensureAction as j, ensureStageLoopState as k, invalidateVerifyEvidence as l, mergeStateFromParams as m, noImplementationModeFor as n, normalizeProofAssessmentStageFields as o, proofRunCore as p, previewModeFromWorkflowMode as q, resolveConfig as r, proofAssessmentHardBlockersForState as s, readState as t, recordStageAttempt as u, requiredBaselineLabelsForState as v, resolveRiddleProofDir as w, setStageDecisionRequest as x, summarizeState as y, validateShipGate as z };
|
|
@@ -62,6 +62,8 @@ interface WorkflowParams {
|
|
|
62
62
|
update_base_checkout?: boolean;
|
|
63
63
|
advance_stage?: WorkflowStage;
|
|
64
64
|
}
|
|
65
|
+
declare function canonicalProofAssessmentStageForDecision(decision: unknown): WorkflowStage | null;
|
|
66
|
+
declare function normalizeProofAssessmentStageFields<T extends Record<string, unknown>>(assessment: T): T;
|
|
65
67
|
declare function previewModeFromWorkflowMode(value: unknown): "server" | "static" | undefined;
|
|
66
68
|
declare function noImplementationModeFor(params?: unknown, state?: unknown): boolean;
|
|
67
69
|
interface PluginConfig {
|
|
@@ -335,6 +337,7 @@ type proofRunCore_WorkflowParams = WorkflowParams;
|
|
|
335
337
|
type proofRunCore_WorkflowStage = WorkflowStage;
|
|
336
338
|
declare const proofRunCore_buildCheckpointContract: typeof buildCheckpointContract;
|
|
337
339
|
declare const proofRunCore_buildSetupArgs: typeof buildSetupArgs;
|
|
340
|
+
declare const proofRunCore_canonicalProofAssessmentStageForDecision: typeof canonicalProofAssessmentStageForDecision;
|
|
338
341
|
declare const proofRunCore_checkpointContinueStage: typeof checkpointContinueStage;
|
|
339
342
|
declare const proofRunCore_clearStageDecisionRequest: typeof clearStageDecisionRequest;
|
|
340
343
|
declare const proofRunCore_ensureAction: typeof ensureAction;
|
|
@@ -342,6 +345,7 @@ declare const proofRunCore_ensureStageLoopState: typeof ensureStageLoopState;
|
|
|
342
345
|
declare const proofRunCore_invalidateVerifyEvidence: typeof invalidateVerifyEvidence;
|
|
343
346
|
declare const proofRunCore_mergeStateFromParams: typeof mergeStateFromParams;
|
|
344
347
|
declare const proofRunCore_noImplementationModeFor: typeof noImplementationModeFor;
|
|
348
|
+
declare const proofRunCore_normalizeProofAssessmentStageFields: typeof normalizeProofAssessmentStageFields;
|
|
345
349
|
declare const proofRunCore_previewModeFromWorkflowMode: typeof previewModeFromWorkflowMode;
|
|
346
350
|
declare const proofRunCore_proofAssessmentHardBlockersForState: typeof proofAssessmentHardBlockersForState;
|
|
347
351
|
declare const proofRunCore_readState: typeof readState;
|
|
@@ -358,7 +362,7 @@ declare const proofRunCore_visualDeltaShipGateReason: typeof visualDeltaShipGate
|
|
|
358
362
|
declare const proofRunCore_workflowFile: typeof workflowFile;
|
|
359
363
|
declare const proofRunCore_writeState: typeof writeState;
|
|
360
364
|
declare namespace proofRunCore {
|
|
361
|
-
export { proofRunCore_BUNDLED_RIDDLE_PROOF_DIR as BUNDLED_RIDDLE_PROOF_DIR, proofRunCore_CHECKPOINT_CONTRACT_VERSION as CHECKPOINT_CONTRACT_VERSION, type proofRunCore_CheckpointInputContract as CheckpointInputContract, type proofRunCore_PluginConfig as PluginConfig, proofRunCore_RIDDLE_PROOF_DIR_CANDIDATES as RIDDLE_PROOF_DIR_CANDIDATES, type proofRunCore_ShipGateValidation as ShipGateValidation, proofRunCore_WORKFLOW_STAGE_ORDER as WORKFLOW_STAGE_ORDER, type proofRunCore_WorkflowAction as WorkflowAction, type proofRunCore_WorkflowParams as WorkflowParams, type proofRunCore_WorkflowStage as WorkflowStage, proofRunCore_buildCheckpointContract as buildCheckpointContract, proofRunCore_buildSetupArgs as buildSetupArgs, proofRunCore_checkpointContinueStage as checkpointContinueStage, proofRunCore_clearStageDecisionRequest as clearStageDecisionRequest, proofRunCore_ensureAction as ensureAction, proofRunCore_ensureStageLoopState as ensureStageLoopState, proofRunCore_invalidateVerifyEvidence as invalidateVerifyEvidence, proofRunCore_mergeStateFromParams as mergeStateFromParams, proofRunCore_noImplementationModeFor as noImplementationModeFor, proofRunCore_previewModeFromWorkflowMode as previewModeFromWorkflowMode, proofRunCore_proofAssessmentHardBlockersForState as proofAssessmentHardBlockersForState, proofRunCore_readState as readState, proofRunCore_recordStageAttempt as recordStageAttempt, proofRunCore_requiredBaselineLabelsForState as requiredBaselineLabelsForState, proofRunCore_resolveConfig as resolveConfig, proofRunCore_resolveRiddleProofDir as resolveRiddleProofDir, proofRunCore_setStageDecisionRequest as setStageDecisionRequest, proofRunCore_summarizeState as summarizeState, proofRunCore_validateShipGate as validateShipGate, proofRunCore_visualDeltaForState as visualDeltaForState, proofRunCore_visualDeltaRequiredForState as visualDeltaRequiredForState, proofRunCore_visualDeltaShipGateReason as visualDeltaShipGateReason, proofRunCore_workflowFile as workflowFile, proofRunCore_writeState as writeState };
|
|
365
|
+
export { proofRunCore_BUNDLED_RIDDLE_PROOF_DIR as BUNDLED_RIDDLE_PROOF_DIR, proofRunCore_CHECKPOINT_CONTRACT_VERSION as CHECKPOINT_CONTRACT_VERSION, type proofRunCore_CheckpointInputContract as CheckpointInputContract, type proofRunCore_PluginConfig as PluginConfig, proofRunCore_RIDDLE_PROOF_DIR_CANDIDATES as RIDDLE_PROOF_DIR_CANDIDATES, type proofRunCore_ShipGateValidation as ShipGateValidation, proofRunCore_WORKFLOW_STAGE_ORDER as WORKFLOW_STAGE_ORDER, type proofRunCore_WorkflowAction as WorkflowAction, type proofRunCore_WorkflowParams as WorkflowParams, type proofRunCore_WorkflowStage as WorkflowStage, proofRunCore_buildCheckpointContract as buildCheckpointContract, proofRunCore_buildSetupArgs as buildSetupArgs, proofRunCore_canonicalProofAssessmentStageForDecision as canonicalProofAssessmentStageForDecision, proofRunCore_checkpointContinueStage as checkpointContinueStage, proofRunCore_clearStageDecisionRequest as clearStageDecisionRequest, proofRunCore_ensureAction as ensureAction, proofRunCore_ensureStageLoopState as ensureStageLoopState, proofRunCore_invalidateVerifyEvidence as invalidateVerifyEvidence, proofRunCore_mergeStateFromParams as mergeStateFromParams, proofRunCore_noImplementationModeFor as noImplementationModeFor, proofRunCore_normalizeProofAssessmentStageFields as normalizeProofAssessmentStageFields, proofRunCore_previewModeFromWorkflowMode as previewModeFromWorkflowMode, proofRunCore_proofAssessmentHardBlockersForState as proofAssessmentHardBlockersForState, proofRunCore_readState as readState, proofRunCore_recordStageAttempt as recordStageAttempt, proofRunCore_requiredBaselineLabelsForState as requiredBaselineLabelsForState, proofRunCore_resolveConfig as resolveConfig, proofRunCore_resolveRiddleProofDir as resolveRiddleProofDir, proofRunCore_setStageDecisionRequest as setStageDecisionRequest, proofRunCore_summarizeState as summarizeState, proofRunCore_validateShipGate as validateShipGate, proofRunCore_visualDeltaForState as visualDeltaForState, proofRunCore_visualDeltaRequiredForState as visualDeltaRequiredForState, proofRunCore_visualDeltaShipGateReason as visualDeltaShipGateReason, proofRunCore_workflowFile as workflowFile, proofRunCore_writeState as writeState };
|
|
362
366
|
}
|
|
363
367
|
|
|
364
|
-
export {
|
|
368
|
+
export { visualDeltaForState as A, BUNDLED_RIDDLE_PROOF_DIR as B, CHECKPOINT_CONTRACT_VERSION as C, visualDeltaRequiredForState as D, visualDeltaShipGateReason as E, workflowFile as F, writeState as G, type PluginConfig as P, RIDDLE_PROOF_DIR_CANDIDATES as R, type ShipGateValidation as S, type WorkflowParams as W, type WorkflowStage as a, type CheckpointInputContract as b, WORKFLOW_STAGE_ORDER as c, type WorkflowAction as d, buildCheckpointContract as e, buildSetupArgs as f, canonicalProofAssessmentStageForDecision as g, checkpointContinueStage as h, clearStageDecisionRequest as i, ensureAction as j, ensureStageLoopState as k, invalidateVerifyEvidence as l, mergeStateFromParams as m, noImplementationModeFor as n, normalizeProofAssessmentStageFields as o, proofRunCore as p, previewModeFromWorkflowMode as q, resolveConfig as r, proofAssessmentHardBlockersForState as s, readState as t, recordStageAttempt as u, requiredBaselineLabelsForState as v, resolveRiddleProofDir as w, setStageDecisionRequest as x, summarizeState as y, validateShipGate as z };
|
package/dist/proof-run-core.cjs
CHANGED
|
@@ -36,6 +36,7 @@ __export(proof_run_core_exports, {
|
|
|
36
36
|
WORKFLOW_STAGE_ORDER: () => WORKFLOW_STAGE_ORDER,
|
|
37
37
|
buildCheckpointContract: () => buildCheckpointContract,
|
|
38
38
|
buildSetupArgs: () => buildSetupArgs,
|
|
39
|
+
canonicalProofAssessmentStageForDecision: () => canonicalProofAssessmentStageForDecision,
|
|
39
40
|
checkpointContinueStage: () => checkpointContinueStage,
|
|
40
41
|
clearStageDecisionRequest: () => clearStageDecisionRequest,
|
|
41
42
|
ensureAction: () => ensureAction,
|
|
@@ -43,6 +44,7 @@ __export(proof_run_core_exports, {
|
|
|
43
44
|
invalidateVerifyEvidence: () => invalidateVerifyEvidence,
|
|
44
45
|
mergeStateFromParams: () => mergeStateFromParams,
|
|
45
46
|
noImplementationModeFor: () => noImplementationModeFor,
|
|
47
|
+
normalizeProofAssessmentStageFields: () => normalizeProofAssessmentStageFields,
|
|
46
48
|
previewModeFromWorkflowMode: () => previewModeFromWorkflowMode,
|
|
47
49
|
proofAssessmentHardBlockersForState: () => proofAssessmentHardBlockersForState,
|
|
48
50
|
readState: () => readState,
|
|
@@ -66,6 +68,24 @@ var import_node_path = __toESM(require("path"), 1);
|
|
|
66
68
|
var import_node_url = require("url");
|
|
67
69
|
var import_meta = {};
|
|
68
70
|
var WORKFLOW_STAGE_ORDER = ["setup", "recon", "author", "implement", "verify", "ship"];
|
|
71
|
+
function canonicalProofAssessmentStageForDecision(decision) {
|
|
72
|
+
const normalized = typeof decision === "string" ? decision.trim() : "";
|
|
73
|
+
if (normalized === "ready_to_ship") return "ship";
|
|
74
|
+
if (normalized === "needs_richer_proof") return "author";
|
|
75
|
+
if (normalized === "revise_capture") return "verify";
|
|
76
|
+
if (normalized === "needs_recon") return "recon";
|
|
77
|
+
if (normalized === "needs_implementation") return "implement";
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
function normalizeProofAssessmentStageFields(assessment) {
|
|
81
|
+
const canonicalStage = canonicalProofAssessmentStageForDecision(assessment.decision);
|
|
82
|
+
if (!canonicalStage) return assessment;
|
|
83
|
+
return {
|
|
84
|
+
...assessment,
|
|
85
|
+
recommended_stage: canonicalStage,
|
|
86
|
+
continue_with_stage: canonicalStage
|
|
87
|
+
};
|
|
88
|
+
}
|
|
69
89
|
function normalizedMode(value) {
|
|
70
90
|
return typeof value === "string" ? value.trim().toLowerCase() : "";
|
|
71
91
|
}
|
|
@@ -1092,10 +1112,10 @@ function mergeStateFromParams(statePath, params) {
|
|
|
1092
1112
|
state.proof_assessment_source = null;
|
|
1093
1113
|
} else {
|
|
1094
1114
|
const parsed = JSON.parse(raw);
|
|
1095
|
-
const assessment = {
|
|
1115
|
+
const assessment = normalizeProofAssessmentStageFields({
|
|
1096
1116
|
...parsed,
|
|
1097
1117
|
source: (parsed?.source || "supervising_agent").toString()
|
|
1098
|
-
};
|
|
1118
|
+
});
|
|
1099
1119
|
const readyBlocker = assessment?.decision === "ready_to_ship" ? visualDeltaShipGateReason({ ...state, proof_assessment: assessment, proof_assessment_source: assessment.source }) : null;
|
|
1100
1120
|
if (readyBlocker) {
|
|
1101
1121
|
assessment.blocked_decision = assessment.decision;
|
|
@@ -1265,6 +1285,7 @@ function summarizeState(state) {
|
|
|
1265
1285
|
WORKFLOW_STAGE_ORDER,
|
|
1266
1286
|
buildCheckpointContract,
|
|
1267
1287
|
buildSetupArgs,
|
|
1288
|
+
canonicalProofAssessmentStageForDecision,
|
|
1268
1289
|
checkpointContinueStage,
|
|
1269
1290
|
clearStageDecisionRequest,
|
|
1270
1291
|
ensureAction,
|
|
@@ -1272,6 +1293,7 @@ function summarizeState(state) {
|
|
|
1272
1293
|
invalidateVerifyEvidence,
|
|
1273
1294
|
mergeStateFromParams,
|
|
1274
1295
|
noImplementationModeFor,
|
|
1296
|
+
normalizeProofAssessmentStageFields,
|
|
1275
1297
|
previewModeFromWorkflowMode,
|
|
1276
1298
|
proofAssessmentHardBlockersForState,
|
|
1277
1299
|
readState,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { B as BUNDLED_RIDDLE_PROOF_DIR, C as CHECKPOINT_CONTRACT_VERSION, b as CheckpointInputContract, P as PluginConfig, R as RIDDLE_PROOF_DIR_CANDIDATES, S as ShipGateValidation, c as WORKFLOW_STAGE_ORDER, d as WorkflowAction, W as WorkflowParams, a as WorkflowStage, e as buildCheckpointContract, f as buildSetupArgs, g as
|
|
1
|
+
export { B as BUNDLED_RIDDLE_PROOF_DIR, C as CHECKPOINT_CONTRACT_VERSION, b as CheckpointInputContract, P as PluginConfig, R as RIDDLE_PROOF_DIR_CANDIDATES, S as ShipGateValidation, c as WORKFLOW_STAGE_ORDER, d as WorkflowAction, W as WorkflowParams, a as WorkflowStage, e as buildCheckpointContract, f as buildSetupArgs, g as canonicalProofAssessmentStageForDecision, h as checkpointContinueStage, i as clearStageDecisionRequest, j as ensureAction, k as ensureStageLoopState, l as invalidateVerifyEvidence, m as mergeStateFromParams, n as noImplementationModeFor, o as normalizeProofAssessmentStageFields, q as previewModeFromWorkflowMode, s as proofAssessmentHardBlockersForState, t as readState, u as recordStageAttempt, v as requiredBaselineLabelsForState, r as resolveConfig, w as resolveRiddleProofDir, x as setStageDecisionRequest, y as summarizeState, z as validateShipGate, A as visualDeltaForState, D as visualDeltaRequiredForState, E as visualDeltaShipGateReason, F as workflowFile, G as writeState } from './proof-run-core-7Dqm7RKM.cjs';
|
package/dist/proof-run-core.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { B as BUNDLED_RIDDLE_PROOF_DIR, C as CHECKPOINT_CONTRACT_VERSION, b as CheckpointInputContract, P as PluginConfig, R as RIDDLE_PROOF_DIR_CANDIDATES, S as ShipGateValidation, c as WORKFLOW_STAGE_ORDER, d as WorkflowAction, W as WorkflowParams, a as WorkflowStage, e as buildCheckpointContract, f as buildSetupArgs, g as
|
|
1
|
+
export { B as BUNDLED_RIDDLE_PROOF_DIR, C as CHECKPOINT_CONTRACT_VERSION, b as CheckpointInputContract, P as PluginConfig, R as RIDDLE_PROOF_DIR_CANDIDATES, S as ShipGateValidation, c as WORKFLOW_STAGE_ORDER, d as WorkflowAction, W as WorkflowParams, a as WorkflowStage, e as buildCheckpointContract, f as buildSetupArgs, g as canonicalProofAssessmentStageForDecision, h as checkpointContinueStage, i as clearStageDecisionRequest, j as ensureAction, k as ensureStageLoopState, l as invalidateVerifyEvidence, m as mergeStateFromParams, n as noImplementationModeFor, o as normalizeProofAssessmentStageFields, q as previewModeFromWorkflowMode, s as proofAssessmentHardBlockersForState, t as readState, u as recordStageAttempt, v as requiredBaselineLabelsForState, r as resolveConfig, w as resolveRiddleProofDir, x as setStageDecisionRequest, y as summarizeState, z as validateShipGate, A as visualDeltaForState, D as visualDeltaRequiredForState, E as visualDeltaShipGateReason, F as workflowFile, G as writeState } from './proof-run-core-7Dqm7RKM.js';
|
package/dist/proof-run-core.js
CHANGED
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
WORKFLOW_STAGE_ORDER,
|
|
6
6
|
buildCheckpointContract,
|
|
7
7
|
buildSetupArgs,
|
|
8
|
+
canonicalProofAssessmentStageForDecision,
|
|
8
9
|
checkpointContinueStage,
|
|
9
10
|
clearStageDecisionRequest,
|
|
10
11
|
ensureAction,
|
|
@@ -12,6 +13,7 @@ import {
|
|
|
12
13
|
invalidateVerifyEvidence,
|
|
13
14
|
mergeStateFromParams,
|
|
14
15
|
noImplementationModeFor,
|
|
16
|
+
normalizeProofAssessmentStageFields,
|
|
15
17
|
previewModeFromWorkflowMode,
|
|
16
18
|
proofAssessmentHardBlockersForState,
|
|
17
19
|
readState,
|
|
@@ -27,7 +29,7 @@ import {
|
|
|
27
29
|
visualDeltaShipGateReason,
|
|
28
30
|
workflowFile,
|
|
29
31
|
writeState
|
|
30
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-EKZXU6MU.js";
|
|
31
33
|
import "./chunk-MLKGABMK.js";
|
|
32
34
|
export {
|
|
33
35
|
BUNDLED_RIDDLE_PROOF_DIR,
|
|
@@ -36,6 +38,7 @@ export {
|
|
|
36
38
|
WORKFLOW_STAGE_ORDER,
|
|
37
39
|
buildCheckpointContract,
|
|
38
40
|
buildSetupArgs,
|
|
41
|
+
canonicalProofAssessmentStageForDecision,
|
|
39
42
|
checkpointContinueStage,
|
|
40
43
|
clearStageDecisionRequest,
|
|
41
44
|
ensureAction,
|
|
@@ -43,6 +46,7 @@ export {
|
|
|
43
46
|
invalidateVerifyEvidence,
|
|
44
47
|
mergeStateFromParams,
|
|
45
48
|
noImplementationModeFor,
|
|
49
|
+
normalizeProofAssessmentStageFields,
|
|
46
50
|
previewModeFromWorkflowMode,
|
|
47
51
|
proofAssessmentHardBlockersForState,
|
|
48
52
|
readState,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { W as WorkflowParams, r as resolveConfig, P as PluginConfig, a as WorkflowStage } from './proof-run-core-
|
|
1
|
+
import { W as WorkflowParams, r as resolveConfig, P as PluginConfig, a as WorkflowStage } from './proof-run-core-7Dqm7RKM.js';
|
|
2
2
|
|
|
3
3
|
declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, resolvedConfig?: ReturnType<typeof resolveConfig>): Promise<{
|
|
4
4
|
ok: boolean;
|