@riddledc/riddle-proof 0.7.79 → 0.7.81

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/README.md CHANGED
@@ -92,6 +92,18 @@ file/object before resuming the run.
92
92
  uses the local Codex CLI adapter underneath, but the loop contract and CLI
93
93
  surface are intentionally not Codex-specific.
94
94
 
95
+ Visual/UI proof runs can pass `viewport_matrix` / `viewport_matrix_json` to the
96
+ base loop. The runtime records the requested matrix, captures per-viewport
97
+ screenshots with viewport-scoped labels, persists the executed/missing viewport
98
+ metadata into run status and proof artifacts, and treats missing requested
99
+ viewport evidence as incomplete capture evidence.
100
+
101
+ Measured visual deltas still require numeric before/after evidence. For small
102
+ targeted copy or UI changes, the visual gate can use a lower targeted threshold
103
+ only when route/text semantics match the requested change. Missing or unmeasured
104
+ visual deltas continue through evidence recovery instead of being treated as a
105
+ passing proof.
106
+
95
107
  ## CI / Profile Mode
96
108
 
97
109
  Profile mode runs durable proof profiles against an existing site without an
@@ -174,9 +186,11 @@ riddle-proof-loop run-profile \
174
186
  Hosted profile runs emit Riddle poll progress to stderr while waiting. Use
175
187
  `--quiet` to suppress progress lines, or `--progress-every-ms` to tune the
176
188
  heartbeat cadence for long route-inventory or workflow profiles.
177
- Strict Riddle script validation remains on by default; use `--strict=false`
178
- only for trusted profile-generated scripts when the validator blocks a large
179
- workflow profile.
189
+ Hosted `run-profile` submits package-generated profile scripts with
190
+ `strict=false` by default because the generated runner is larger than Riddle's
191
+ generic inline-script warning threshold. Use `--strict=true` when you
192
+ deliberately want Riddle's non-critical script-safety warnings to block the run.
193
+ Critical script-safety violations remain blocked by Riddle either way.
180
194
 
181
195
  The package includes a generic starter profile at
182
196
  `examples/profiles/page-content-basic.json`; copy that shape into a repository
@@ -13,8 +13,8 @@ import {
13
13
  normalizeCheckpointResponse,
14
14
  proofContractFromAuthorCheckpointResponse,
15
15
  statePathsForRunState
16
- } from "./chunk-33XO42CY.js";
17
- import "./chunk-DUFDZJOF.js";
16
+ } from "./chunk-ABQQLRTS.js";
17
+ import "./chunk-VY4Y5U57.js";
18
18
  export {
19
19
  RIDDLE_PROOF_CHECKPOINT_PACKET_VERSION,
20
20
  RIDDLE_PROOF_CHECKPOINT_RESPONSE_VERSION,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  compactRecord
3
- } from "./chunk-DUFDZJOF.js";
3
+ } from "./chunk-VY4Y5U57.js";
4
4
 
5
5
  // src/codex-exec-agent.ts
6
6
  import { execFileSync, spawnSync } from "child_process";
@@ -2,7 +2,7 @@ import {
2
2
  compactRecord,
3
3
  nonEmptyString,
4
4
  recordValue
5
- } from "./chunk-DUFDZJOF.js";
5
+ } from "./chunk-VY4Y5U57.js";
6
6
 
7
7
  // src/checkpoint.ts
8
8
  import crypto from "crypto";
@@ -3,13 +3,13 @@ import {
3
3
  appendStageHeartbeat,
4
4
  createRunState,
5
5
  setRunStatus
6
- } from "./chunk-4DM3OTWH.js";
6
+ } from "./chunk-UYB7ABWU.js";
7
7
  import {
8
8
  noImplementationModeFor
9
9
  } from "./chunk-SGXB5S4B.js";
10
10
  import {
11
11
  createRunResult
12
- } from "./chunk-DUFDZJOF.js";
12
+ } from "./chunk-VY4Y5U57.js";
13
13
 
14
14
  // src/runner.ts
15
15
  function errorDetails(error) {
@@ -5,10 +5,10 @@ import {
5
5
  createRunStatusSnapshot,
6
6
  normalizeRunParams,
7
7
  setRunStatus
8
- } from "./chunk-4DM3OTWH.js";
8
+ } from "./chunk-UYB7ABWU.js";
9
9
  import {
10
10
  createRiddleProofRunCard
11
- } from "./chunk-3UHWI3FO.js";
11
+ } from "./chunk-ZHEFYLII.js";
12
12
  import {
13
13
  noImplementationModeFor,
14
14
  visualDeltaForState,
@@ -24,7 +24,7 @@ import {
24
24
  normalizeCheckpointResponse,
25
25
  proofContractFromAuthorCheckpointResponse,
26
26
  statePathsForRunState
27
- } from "./chunk-33XO42CY.js";
27
+ } from "./chunk-ABQQLRTS.js";
28
28
  import {
29
29
  applyTerminalMetadata,
30
30
  compactRecord,
@@ -32,7 +32,7 @@ import {
32
32
  nonEmptyString,
33
33
  normalizeTerminalMetadata,
34
34
  recordValue
35
- } from "./chunk-DUFDZJOF.js";
35
+ } from "./chunk-VY4Y5U57.js";
36
36
 
37
37
  // src/engine-harness.ts
38
38
  import { execFileSync } from "child_process";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  createRiddleProofRunCard
3
- } from "./chunk-3UHWI3FO.js";
3
+ } from "./chunk-ZHEFYLII.js";
4
4
  import {
5
5
  compactRecord,
6
6
  isTerminalStatus,
7
7
  nonEmptyString,
8
8
  recordValue
9
- } from "./chunk-DUFDZJOF.js";
9
+ } from "./chunk-VY4Y5U57.js";
10
10
 
11
11
  // src/state.ts
12
12
  var RIDDLE_PROOF_RUN_STATE_VERSION = "riddle-proof.run-state.v1";
@@ -218,6 +218,7 @@ function createRunStatusSnapshot(state, at = timestamp()) {
218
218
  state_paths: state.state_paths,
219
219
  proof_contract: state.proof_contract,
220
220
  run_card: state.run_card || createRiddleProofRunCard(state, { at }),
221
+ viewport_matrix_status: state.viewport_matrix_status,
221
222
  latest_event: latestEvent
222
223
  });
223
224
  }
@@ -208,6 +208,7 @@ function createRunResult(input) {
208
208
  proof_contract: state.proof_contract,
209
209
  run_card: state.run_card,
210
210
  proof_session: state.proof_session,
211
+ viewport_matrix_status: state.viewport_matrix_status,
211
212
  evidence_bundle: input.evidence_bundle,
212
213
  raw: input.raw
213
214
  });
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  statePathsForRunState
3
- } from "./chunk-33XO42CY.js";
3
+ } from "./chunk-ABQQLRTS.js";
4
4
  import {
5
5
  compactRecord,
6
6
  isTerminalStatus,
7
7
  nonEmptyString,
8
8
  recordValue
9
- } from "./chunk-DUFDZJOF.js";
9
+ } from "./chunk-VY4Y5U57.js";
10
10
 
11
11
  // src/run-card.ts
12
12
  var RIDDLE_PROOF_RUN_CARD_VERSION = "riddle-proof.run-card.v1";
@@ -114,6 +114,16 @@ function artifactsFrom(input) {
114
114
  }
115
115
  return artifacts.length ? artifacts : void 0;
116
116
  }
117
+ function viewportMatrixFrom(input) {
118
+ const fullState = input.fullRiddleState || {};
119
+ const bundle = recordValue(fullState.evidence_bundle);
120
+ const fromBundle = recordValue(bundle?.viewport_matrix);
121
+ if (fromBundle && Object.keys(fromBundle).length) return jsonCloneRecord(fromBundle);
122
+ const fromRequest = recordValue(recordValue(fullState.proof_assessment_request)?.viewport_matrix);
123
+ if (fromRequest && Object.keys(fromRequest).length) return jsonCloneRecord(fromRequest);
124
+ const fromState = recordValue(fullState.viewport_matrix_status) || recordValue(input.runState.viewport_matrix_status);
125
+ return fromState && Object.keys(fromState).length ? jsonCloneRecord(fromState) : void 0;
126
+ }
117
127
  function ownerFor(state) {
118
128
  if (state.status === "awaiting_checkpoint") {
119
129
  const role = nonEmptyString(state.checkpoint_packet?.routing_hint?.suggested_role);
@@ -156,6 +166,7 @@ function createRiddleProofRunCard(state, input = {}) {
156
166
  const statePaths = input.state_paths || state.state_paths || statePathsForRunState(state);
157
167
  const visualDelta = visualDeltaFrom({ fullRiddleState: fullState, runState: state });
158
168
  const artifacts = artifactsFrom({ fullRiddleState: fullState, runState: state });
169
+ const viewportMatrix = viewportMatrixFrom({ fullRiddleState: fullState, runState: state });
159
170
  return {
160
171
  version: RIDDLE_PROOF_RUN_CARD_VERSION,
161
172
  run_id: state.run_id || "unknown",
@@ -202,6 +213,7 @@ function createRiddleProofRunCard(state, input = {}) {
202
213
  visual_delta: visualDelta || null,
203
214
  evidence_issue_code: evidenceIssueCode({ fullRiddleState: fullState, runState: state }) || null,
204
215
  proof_evidence_present: fullState.proof_evidence_present === true || Boolean(bundle?.proof_evidence || bundle?.proof_evidence_sample),
216
+ viewport_matrix: viewportMatrix,
205
217
  artifacts
206
218
  }),
207
219
  observability: observabilityFrom(state),
package/dist/cli.cjs CHANGED
@@ -3116,6 +3116,7 @@ function createRunResult(input) {
3116
3116
  proof_contract: state.proof_contract,
3117
3117
  run_card: state.run_card,
3118
3118
  proof_session: state.proof_session,
3119
+ viewport_matrix_status: state.viewport_matrix_status,
3119
3120
  evidence_bundle: input.evidence_bundle,
3120
3121
  raw: input.raw
3121
3122
  });
@@ -3936,6 +3937,16 @@ function artifactsFrom(input) {
3936
3937
  }
3937
3938
  return artifacts.length ? artifacts : void 0;
3938
3939
  }
3940
+ function viewportMatrixFrom(input) {
3941
+ const fullState = input.fullRiddleState || {};
3942
+ const bundle = recordValue(fullState.evidence_bundle);
3943
+ const fromBundle = recordValue(bundle?.viewport_matrix);
3944
+ if (fromBundle && Object.keys(fromBundle).length) return jsonCloneRecord2(fromBundle);
3945
+ const fromRequest = recordValue(recordValue(fullState.proof_assessment_request)?.viewport_matrix);
3946
+ if (fromRequest && Object.keys(fromRequest).length) return jsonCloneRecord2(fromRequest);
3947
+ const fromState = recordValue(fullState.viewport_matrix_status) || recordValue(input.runState.viewport_matrix_status);
3948
+ return fromState && Object.keys(fromState).length ? jsonCloneRecord2(fromState) : void 0;
3949
+ }
3939
3950
  function ownerFor(state) {
3940
3951
  if (state.status === "awaiting_checkpoint") {
3941
3952
  const role = nonEmptyString(state.checkpoint_packet?.routing_hint?.suggested_role);
@@ -3978,6 +3989,7 @@ function createRiddleProofRunCard(state, input = {}) {
3978
3989
  const statePaths = input.state_paths || state.state_paths || statePathsForRunState(state);
3979
3990
  const visualDelta = visualDeltaFrom({ fullRiddleState: fullState, runState: state });
3980
3991
  const artifacts = artifactsFrom({ fullRiddleState: fullState, runState: state });
3992
+ const viewportMatrix = viewportMatrixFrom({ fullRiddleState: fullState, runState: state });
3981
3993
  return {
3982
3994
  version: RIDDLE_PROOF_RUN_CARD_VERSION,
3983
3995
  run_id: state.run_id || "unknown",
@@ -4024,6 +4036,7 @@ function createRiddleProofRunCard(state, input = {}) {
4024
4036
  visual_delta: visualDelta || null,
4025
4037
  evidence_issue_code: evidenceIssueCode({ fullRiddleState: fullState, runState: state }) || null,
4026
4038
  proof_evidence_present: fullState.proof_evidence_present === true || Boolean(bundle?.proof_evidence || bundle?.proof_evidence_sample),
4039
+ viewport_matrix: viewportMatrix,
4027
4040
  artifacts
4028
4041
  }),
4029
4042
  observability: observabilityFrom(state),
@@ -4220,6 +4233,7 @@ function createRunStatusSnapshot(state, at = timestamp2()) {
4220
4233
  state_paths: state.state_paths,
4221
4234
  proof_contract: state.proof_contract,
4222
4235
  run_card: state.run_card || createRiddleProofRunCard(state, { at }),
4236
+ viewport_matrix_status: state.viewport_matrix_status,
4223
4237
  latest_event: latestEvent
4224
4238
  });
4225
4239
  }
@@ -11226,6 +11240,9 @@ function optionBoolean(options, key) {
11226
11240
  const flag = key.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);
11227
11241
  throw new Error(`--${flag} must be true or false.`);
11228
11242
  }
11243
+ function runProfileStrictOption(options) {
11244
+ return optionBoolean(options, "strict") ?? false;
11245
+ }
11229
11246
  function optionNumber(options, ...keys) {
11230
11247
  for (const key of keys) {
11231
11248
  const value = optionString(options, key);
@@ -11754,7 +11771,7 @@ async function runProfileForCli(profile, options) {
11754
11771
  profile,
11755
11772
  optionString(options, "timeout") ? Number(optionString(options, "timeout")) : void 0
11756
11773
  ),
11757
- strict: optionBoolean(options, "strict"),
11774
+ strict: runProfileStrictOption(options),
11758
11775
  sync: options.sync === true ? true : void 0
11759
11776
  });
11760
11777
  } catch (error) {
package/dist/cli.js CHANGED
@@ -19,19 +19,19 @@ import {
19
19
  createDisabledRiddleProofAgentAdapter,
20
20
  readRiddleProofRunStatus,
21
21
  runRiddleProofEngineHarness
22
- } from "./chunk-F7BNWDF6.js";
23
- import "./chunk-4DM3OTWH.js";
24
- import "./chunk-3UHWI3FO.js";
22
+ } from "./chunk-MPPLZ35C.js";
23
+ import "./chunk-UYB7ABWU.js";
24
+ import "./chunk-ZHEFYLII.js";
25
25
  import "./chunk-SGXB5S4B.js";
26
26
  import {
27
27
  createCheckpointResponseTemplate
28
- } from "./chunk-33XO42CY.js";
28
+ } from "./chunk-ABQQLRTS.js";
29
29
  import "./chunk-JFQXAJH2.js";
30
30
  import {
31
31
  createCodexExecAgentAdapter,
32
32
  runCodexExecAgentDoctor
33
- } from "./chunk-EXF7V6TJ.js";
34
- import "./chunk-DUFDZJOF.js";
33
+ } from "./chunk-7F5LNUGR.js";
34
+ import "./chunk-VY4Y5U57.js";
35
35
 
36
36
  // src/cli.ts
37
37
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
@@ -96,6 +96,9 @@ function optionBoolean(options, key) {
96
96
  const flag = key.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);
97
97
  throw new Error(`--${flag} must be true or false.`);
98
98
  }
99
+ function runProfileStrictOption(options) {
100
+ return optionBoolean(options, "strict") ?? false;
101
+ }
99
102
  function optionNumber(options, ...keys) {
100
103
  for (const key of keys) {
101
104
  const value = optionString(options, key);
@@ -624,7 +627,7 @@ async function runProfileForCli(profile, options) {
624
627
  profile,
625
628
  optionString(options, "timeout") ? Number(optionString(options, "timeout")) : void 0
626
629
  ),
627
- strict: optionBoolean(options, "strict"),
630
+ strict: runProfileStrictOption(options),
628
631
  sync: options.sync === true ? true : void 0
629
632
  });
630
633
  } catch (error) {
@@ -2,8 +2,8 @@ import {
2
2
  createCodexExecAgentAdapter,
3
3
  createCodexExecJsonRunner,
4
4
  runCodexExecAgentDoctor
5
- } from "./chunk-EXF7V6TJ.js";
6
- import "./chunk-DUFDZJOF.js";
5
+ } from "./chunk-7F5LNUGR.js";
6
+ import "./chunk-VY4Y5U57.js";
7
7
  export {
8
8
  createCodexExecAgentAdapter,
9
9
  createCodexExecJsonRunner,
@@ -3119,6 +3119,7 @@ function createRunResult(input) {
3119
3119
  proof_contract: state.proof_contract,
3120
3120
  run_card: state.run_card,
3121
3121
  proof_session: state.proof_session,
3122
+ viewport_matrix_status: state.viewport_matrix_status,
3122
3123
  evidence_bundle: input.evidence_bundle,
3123
3124
  raw: input.raw
3124
3125
  });
@@ -3865,6 +3866,16 @@ function artifactsFrom(input) {
3865
3866
  }
3866
3867
  return artifacts.length ? artifacts : void 0;
3867
3868
  }
3869
+ function viewportMatrixFrom(input) {
3870
+ const fullState = input.fullRiddleState || {};
3871
+ const bundle = recordValue(fullState.evidence_bundle);
3872
+ const fromBundle = recordValue(bundle?.viewport_matrix);
3873
+ if (fromBundle && Object.keys(fromBundle).length) return jsonCloneRecord2(fromBundle);
3874
+ const fromRequest = recordValue(recordValue(fullState.proof_assessment_request)?.viewport_matrix);
3875
+ if (fromRequest && Object.keys(fromRequest).length) return jsonCloneRecord2(fromRequest);
3876
+ const fromState = recordValue(fullState.viewport_matrix_status) || recordValue(input.runState.viewport_matrix_status);
3877
+ return fromState && Object.keys(fromState).length ? jsonCloneRecord2(fromState) : void 0;
3878
+ }
3868
3879
  function ownerFor(state) {
3869
3880
  if (state.status === "awaiting_checkpoint") {
3870
3881
  const role = nonEmptyString(state.checkpoint_packet?.routing_hint?.suggested_role);
@@ -3907,6 +3918,7 @@ function createRiddleProofRunCard(state, input = {}) {
3907
3918
  const statePaths = input.state_paths || state.state_paths || statePathsForRunState(state);
3908
3919
  const visualDelta = visualDeltaFrom({ fullRiddleState: fullState, runState: state });
3909
3920
  const artifacts = artifactsFrom({ fullRiddleState: fullState, runState: state });
3921
+ const viewportMatrix = viewportMatrixFrom({ fullRiddleState: fullState, runState: state });
3910
3922
  return {
3911
3923
  version: RIDDLE_PROOF_RUN_CARD_VERSION,
3912
3924
  run_id: state.run_id || "unknown",
@@ -3953,6 +3965,7 @@ function createRiddleProofRunCard(state, input = {}) {
3953
3965
  visual_delta: visualDelta || null,
3954
3966
  evidence_issue_code: evidenceIssueCode({ fullRiddleState: fullState, runState: state }) || null,
3955
3967
  proof_evidence_present: fullState.proof_evidence_present === true || Boolean(bundle?.proof_evidence || bundle?.proof_evidence_sample),
3968
+ viewport_matrix: viewportMatrix,
3956
3969
  artifacts
3957
3970
  }),
3958
3971
  observability: observabilityFrom(state),
@@ -4149,6 +4162,7 @@ function createRunStatusSnapshot(state, at = timestamp2()) {
4149
4162
  state_paths: state.state_paths,
4150
4163
  proof_contract: state.proof_contract,
4151
4164
  run_card: state.run_card || createRiddleProofRunCard(state, { at }),
4165
+ viewport_matrix_status: state.viewport_matrix_status,
4152
4166
  latest_event: latestEvent
4153
4167
  });
4154
4168
  }
@@ -2,12 +2,12 @@ import {
2
2
  createDisabledRiddleProofAgentAdapter,
3
3
  readRiddleProofRunStatus,
4
4
  runRiddleProofEngineHarness
5
- } from "./chunk-F7BNWDF6.js";
6
- import "./chunk-4DM3OTWH.js";
7
- import "./chunk-3UHWI3FO.js";
5
+ } from "./chunk-MPPLZ35C.js";
6
+ import "./chunk-UYB7ABWU.js";
7
+ import "./chunk-ZHEFYLII.js";
8
8
  import "./chunk-SGXB5S4B.js";
9
- import "./chunk-33XO42CY.js";
10
- import "./chunk-DUFDZJOF.js";
9
+ import "./chunk-ABQQLRTS.js";
10
+ import "./chunk-VY4Y5U57.js";
11
11
  export {
12
12
  createDisabledRiddleProofAgentAdapter,
13
13
  readRiddleProofRunStatus,
package/dist/index.cjs CHANGED
@@ -3225,6 +3225,7 @@ function createRunResult(input) {
3225
3225
  proof_contract: state.proof_contract,
3226
3226
  run_card: state.run_card,
3227
3227
  proof_session: state.proof_session,
3228
+ viewport_matrix_status: state.viewport_matrix_status,
3228
3229
  evidence_bundle: input.evidence_bundle,
3229
3230
  raw: input.raw
3230
3231
  });
@@ -4045,6 +4046,16 @@ function artifactsFrom(input) {
4045
4046
  }
4046
4047
  return artifacts.length ? artifacts : void 0;
4047
4048
  }
4049
+ function viewportMatrixFrom(input) {
4050
+ const fullState = input.fullRiddleState || {};
4051
+ const bundle = recordValue(fullState.evidence_bundle);
4052
+ const fromBundle = recordValue(bundle?.viewport_matrix);
4053
+ if (fromBundle && Object.keys(fromBundle).length) return jsonCloneRecord2(fromBundle);
4054
+ const fromRequest = recordValue(recordValue(fullState.proof_assessment_request)?.viewport_matrix);
4055
+ if (fromRequest && Object.keys(fromRequest).length) return jsonCloneRecord2(fromRequest);
4056
+ const fromState = recordValue(fullState.viewport_matrix_status) || recordValue(input.runState.viewport_matrix_status);
4057
+ return fromState && Object.keys(fromState).length ? jsonCloneRecord2(fromState) : void 0;
4058
+ }
4048
4059
  function ownerFor(state) {
4049
4060
  if (state.status === "awaiting_checkpoint") {
4050
4061
  const role = nonEmptyString(state.checkpoint_packet?.routing_hint?.suggested_role);
@@ -4087,6 +4098,7 @@ function createRiddleProofRunCard(state, input = {}) {
4087
4098
  const statePaths = input.state_paths || state.state_paths || statePathsForRunState(state);
4088
4099
  const visualDelta = visualDeltaFrom({ fullRiddleState: fullState, runState: state });
4089
4100
  const artifacts = artifactsFrom({ fullRiddleState: fullState, runState: state });
4101
+ const viewportMatrix = viewportMatrixFrom({ fullRiddleState: fullState, runState: state });
4090
4102
  return {
4091
4103
  version: RIDDLE_PROOF_RUN_CARD_VERSION,
4092
4104
  run_id: state.run_id || "unknown",
@@ -4133,6 +4145,7 @@ function createRiddleProofRunCard(state, input = {}) {
4133
4145
  visual_delta: visualDelta || null,
4134
4146
  evidence_issue_code: evidenceIssueCode({ fullRiddleState: fullState, runState: state }) || null,
4135
4147
  proof_evidence_present: fullState.proof_evidence_present === true || Boolean(bundle?.proof_evidence || bundle?.proof_evidence_sample),
4148
+ viewport_matrix: viewportMatrix,
4136
4149
  artifacts
4137
4150
  }),
4138
4151
  observability: observabilityFrom(state),
@@ -4359,6 +4372,7 @@ function createRunStatusSnapshot(state, at = timestamp2()) {
4359
4372
  state_paths: state.state_paths,
4360
4373
  proof_contract: state.proof_contract,
4361
4374
  run_card: state.run_card || createRiddleProofRunCard(state, { at }),
4375
+ viewport_matrix_status: state.viewport_matrix_status,
4362
4376
  latest_event: latestEvent
4363
4377
  });
4364
4378
  }
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
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, RiddleProofVisualSession, RiddleProofVisualSessionFingerprintBasis, SetupAdapter, SetupAdapterInput, SetupAdapterResult, ShipAdapter } from './types.cjs';
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
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';
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
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, RiddleProofVisualSession, RiddleProofVisualSessionFingerprintBasis, SetupAdapter, SetupAdapterInput, SetupAdapterResult, ShipAdapter } from './types.js';
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
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';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runRiddleProof
3
- } from "./chunk-JRFKVTKY.js";
3
+ } from "./chunk-ENWYM4L7.js";
4
4
  import "./chunk-6F4PWJZI.js";
5
5
  import {
6
6
  RIDDLE_PROOF_PLAYABILITY_ASSESSMENT_VERSION,
@@ -87,7 +87,7 @@ import {
87
87
  createDisabledRiddleProofAgentAdapter,
88
88
  readRiddleProofRunStatus,
89
89
  runRiddleProofEngineHarness
90
- } from "./chunk-F7BNWDF6.js";
90
+ } from "./chunk-MPPLZ35C.js";
91
91
  import {
92
92
  RIDDLE_PROOF_RUN_STATE_VERSION,
93
93
  appendRunEvent,
@@ -99,11 +99,11 @@ import {
99
99
  normalizePrLifecycleState,
100
100
  normalizeRunParams,
101
101
  setRunStatus
102
- } from "./chunk-4DM3OTWH.js";
102
+ } from "./chunk-UYB7ABWU.js";
103
103
  import {
104
104
  RIDDLE_PROOF_RUN_CARD_VERSION,
105
105
  createRiddleProofRunCard
106
- } from "./chunk-3UHWI3FO.js";
106
+ } from "./chunk-ZHEFYLII.js";
107
107
  import "./chunk-SGXB5S4B.js";
108
108
  import {
109
109
  RIDDLE_PROOF_CHECKPOINT_PACKET_VERSION,
@@ -120,13 +120,13 @@ import {
120
120
  normalizeCheckpointResponse,
121
121
  proofContractFromAuthorCheckpointResponse,
122
122
  statePathsForRunState
123
- } from "./chunk-33XO42CY.js";
123
+ } from "./chunk-ABQQLRTS.js";
124
124
  import "./chunk-JFQXAJH2.js";
125
125
  import {
126
126
  createCodexExecAgentAdapter,
127
127
  createCodexExecJsonRunner,
128
128
  runCodexExecAgentDoctor
129
- } from "./chunk-EXF7V6TJ.js";
129
+ } from "./chunk-7F5LNUGR.js";
130
130
  import {
131
131
  applyTerminalMetadata,
132
132
  compactRecord,
@@ -136,7 +136,7 @@ import {
136
136
  nonEmptyString,
137
137
  normalizeTerminalMetadata,
138
138
  recordValue
139
- } from "./chunk-DUFDZJOF.js";
139
+ } from "./chunk-VY4Y5U57.js";
140
140
  export {
141
141
  BASIC_GAMEPLAY_ACTION_TYPES,
142
142
  BASIC_GAMEPLAY_PROGRESS_CHECK_TYPES,
@@ -3,8 +3,8 @@ import {
3
3
  createCodexExecAgentAdapter,
4
4
  createCodexExecJsonRunner,
5
5
  runCodexExecAgentDoctor
6
- } from "./chunk-EXF7V6TJ.js";
7
- import "./chunk-DUFDZJOF.js";
6
+ } from "./chunk-7F5LNUGR.js";
7
+ import "./chunk-VY4Y5U57.js";
8
8
  export {
9
9
  createCodexExecAgentAdapter as createLocalAgentAdapter,
10
10
  createCodexExecJsonRunner as createLocalAgentJsonRunner,
package/dist/openclaw.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  normalizeIntegrationContext,
3
3
  normalizeRunParams
4
- } from "./chunk-4DM3OTWH.js";
5
- import "./chunk-3UHWI3FO.js";
6
- import "./chunk-33XO42CY.js";
4
+ } from "./chunk-UYB7ABWU.js";
5
+ import "./chunk-ZHEFYLII.js";
6
+ import "./chunk-ABQQLRTS.js";
7
7
  import {
8
8
  compactRecord
9
- } from "./chunk-DUFDZJOF.js";
9
+ } from "./chunk-VY4Y5U57.js";
10
10
 
11
11
  // src/openclaw.ts
12
12
  function parseOpenClawAssertions(value) {
package/dist/result.cjs CHANGED
@@ -239,6 +239,7 @@ function createRunResult(input) {
239
239
  proof_contract: state.proof_contract,
240
240
  run_card: state.run_card,
241
241
  proof_session: state.proof_session,
242
+ viewport_matrix_status: state.viewport_matrix_status,
242
243
  evidence_bundle: input.evidence_bundle,
243
244
  raw: input.raw
244
245
  });
package/dist/result.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  nonEmptyString,
8
8
  normalizeTerminalMetadata,
9
9
  recordValue
10
- } from "./chunk-DUFDZJOF.js";
10
+ } from "./chunk-VY4Y5U57.js";
11
11
  export {
12
12
  applyTerminalMetadata,
13
13
  compactRecord,
package/dist/run-card.cjs CHANGED
@@ -165,6 +165,16 @@ function artifactsFrom(input) {
165
165
  }
166
166
  return artifacts.length ? artifacts : void 0;
167
167
  }
168
+ function viewportMatrixFrom(input) {
169
+ const fullState = input.fullRiddleState || {};
170
+ const bundle = recordValue(fullState.evidence_bundle);
171
+ const fromBundle = recordValue(bundle?.viewport_matrix);
172
+ if (fromBundle && Object.keys(fromBundle).length) return jsonCloneRecord(fromBundle);
173
+ const fromRequest = recordValue(recordValue(fullState.proof_assessment_request)?.viewport_matrix);
174
+ if (fromRequest && Object.keys(fromRequest).length) return jsonCloneRecord(fromRequest);
175
+ const fromState = recordValue(fullState.viewport_matrix_status) || recordValue(input.runState.viewport_matrix_status);
176
+ return fromState && Object.keys(fromState).length ? jsonCloneRecord(fromState) : void 0;
177
+ }
168
178
  function ownerFor(state) {
169
179
  if (state.status === "awaiting_checkpoint") {
170
180
  const role = nonEmptyString(state.checkpoint_packet?.routing_hint?.suggested_role);
@@ -207,6 +217,7 @@ function createRiddleProofRunCard(state, input = {}) {
207
217
  const statePaths = input.state_paths || state.state_paths || statePathsForRunState(state);
208
218
  const visualDelta = visualDeltaFrom({ fullRiddleState: fullState, runState: state });
209
219
  const artifacts = artifactsFrom({ fullRiddleState: fullState, runState: state });
220
+ const viewportMatrix = viewportMatrixFrom({ fullRiddleState: fullState, runState: state });
210
221
  return {
211
222
  version: RIDDLE_PROOF_RUN_CARD_VERSION,
212
223
  run_id: state.run_id || "unknown",
@@ -253,6 +264,7 @@ function createRiddleProofRunCard(state, input = {}) {
253
264
  visual_delta: visualDelta || null,
254
265
  evidence_issue_code: evidenceIssueCode({ fullRiddleState: fullState, runState: state }) || null,
255
266
  proof_evidence_present: fullState.proof_evidence_present === true || Boolean(bundle?.proof_evidence || bundle?.proof_evidence_sample),
267
+ viewport_matrix: viewportMatrix,
256
268
  artifacts
257
269
  }),
258
270
  observability: observabilityFrom(state),
package/dist/run-card.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  RIDDLE_PROOF_RUN_CARD_VERSION,
3
3
  createRiddleProofRunCard
4
- } from "./chunk-3UHWI3FO.js";
5
- import "./chunk-33XO42CY.js";
6
- import "./chunk-DUFDZJOF.js";
4
+ } from "./chunk-ZHEFYLII.js";
5
+ import "./chunk-ABQQLRTS.js";
6
+ import "./chunk-VY4Y5U57.js";
7
7
  export {
8
8
  RIDDLE_PROOF_RUN_CARD_VERSION,
9
9
  createRiddleProofRunCard
package/dist/runner.cjs CHANGED
@@ -139,6 +139,7 @@ function createRunResult(input) {
139
139
  proof_contract: state.proof_contract,
140
140
  run_card: state.run_card,
141
141
  proof_session: state.proof_session,
142
+ viewport_matrix_status: state.viewport_matrix_status,
142
143
  evidence_bundle: input.evidence_bundle,
143
144
  raw: input.raw
144
145
  });
package/dist/runner.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  runRiddleProof
3
- } from "./chunk-JRFKVTKY.js";
4
- import "./chunk-4DM3OTWH.js";
5
- import "./chunk-3UHWI3FO.js";
3
+ } from "./chunk-ENWYM4L7.js";
4
+ import "./chunk-UYB7ABWU.js";
5
+ import "./chunk-ZHEFYLII.js";
6
6
  import "./chunk-SGXB5S4B.js";
7
- import "./chunk-33XO42CY.js";
8
- import "./chunk-DUFDZJOF.js";
7
+ import "./chunk-ABQQLRTS.js";
8
+ import "./chunk-VY4Y5U57.js";
9
9
  export {
10
10
  runRiddleProof
11
11
  };