@riddledc/riddle-proof 0.5.38 → 0.5.40

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/types.d.ts CHANGED
@@ -3,7 +3,7 @@ type JsonValue = JsonPrimitive | JsonObject | JsonValue[];
3
3
  type JsonObject = {
4
4
  [key: string]: JsonValue;
5
5
  };
6
- type RiddleProofStatus = "running" | "blocked" | "failed" | "ready_to_ship" | "shipped" | "completed";
6
+ type RiddleProofStatus = "running" | "awaiting_checkpoint" | "blocked" | "failed" | "ready_to_ship" | "shipped" | "completed";
7
7
  type RiddleProofPrLifecycleStatus = "unknown" | "open" | "merged" | "closed" | "not_found" | "unavailable" | (string & {});
8
8
  type RiddleProofVerificationMode = "proof" | "visual" | "interaction" | "playable" | "gameplay" | "render" | "data" | "json" | "audio" | "log" | "logs" | "metric" | "metrics" | (string & {});
9
9
  type RiddleProofDecision = "ready_to_ship" | "needs_richer_proof" | "revise_capture" | "needs_recon" | "needs_implementation" | (string & {});
@@ -52,6 +52,104 @@ interface RiddleProofRunParams {
52
52
  dry_run?: boolean;
53
53
  integration_context?: IntegrationContext;
54
54
  }
55
+ type RiddleProofCheckpointVisibility = "liveblog" | "quiet" | "terminal_only" | "manual" | (string & {});
56
+ type RiddleProofCheckpointRole = "main_agent" | "builder_agent" | "proof_author" | "proof_judge" | "human" | "mechanical" | (string & {});
57
+ interface RiddleProofCheckpointArtifact {
58
+ role: "before" | "prod" | "after" | "diff" | "log" | "json" | "har" | "video" | (string & {});
59
+ url?: string;
60
+ path?: string;
61
+ name?: string;
62
+ mime_type?: string;
63
+ summary?: string;
64
+ }
65
+ interface RiddleProofCheckpointRoutingHint {
66
+ suggested_role?: RiddleProofCheckpointRole;
67
+ visibility?: RiddleProofCheckpointVisibility;
68
+ urgency?: "low" | "normal" | "high" | (string & {});
69
+ can_auto_answer?: boolean;
70
+ }
71
+ interface RiddleProofCheckpointPacket {
72
+ version: "riddle-proof.checkpoint.v1";
73
+ run_id: string;
74
+ state_path?: string;
75
+ stage: RiddleProofStage;
76
+ checkpoint: string;
77
+ kind: "assess_recon" | "author_proof" | "implement_change" | "assess_proof" | "human_review" | "advance_decision" | (string & {});
78
+ summary: string;
79
+ question: string;
80
+ change_request: string;
81
+ context?: string;
82
+ artifacts?: RiddleProofCheckpointArtifact[];
83
+ state_excerpt?: Record<string, unknown>;
84
+ evidence_excerpt?: Record<string, unknown>;
85
+ allowed_decisions: string[];
86
+ response_schema: Record<string, unknown>;
87
+ routing_hint?: RiddleProofCheckpointRoutingHint;
88
+ resume_token?: string;
89
+ created_at: string;
90
+ }
91
+ interface RiddleProofCheckpointResponse {
92
+ version: "riddle-proof.checkpoint_response.v1";
93
+ run_id: string;
94
+ checkpoint: string;
95
+ resume_token?: string;
96
+ decision: string;
97
+ summary: string;
98
+ payload?: Record<string, unknown>;
99
+ reasons?: string[];
100
+ continue_with_stage?: RiddleProofStage;
101
+ source?: {
102
+ kind: "openclaw-main" | "openclaw-subagent" | "codex" | "claude-code" | "human" | "ci" | (string & {});
103
+ session_id?: string;
104
+ user_id?: string;
105
+ };
106
+ created_at: string;
107
+ }
108
+ interface RiddleProofStatePaths {
109
+ wrapper_state_path?: string | null;
110
+ engine_state_path?: string | null;
111
+ resume_state_path?: string | null;
112
+ }
113
+ interface RiddleProofCheckpointSummary {
114
+ pending: boolean;
115
+ packet_count: number;
116
+ response_count: number;
117
+ latest_checkpoint?: string | null;
118
+ latest_stage?: RiddleProofStage | null;
119
+ latest_kind?: string | null;
120
+ latest_decision?: string | null;
121
+ latest_packet_summary?: string | null;
122
+ latest_response_summary?: string | null;
123
+ latest_resume_token?: string | null;
124
+ latest_response_token?: string | null;
125
+ token_matches?: boolean | null;
126
+ last_packet_at?: string | null;
127
+ last_response_at?: string | null;
128
+ state_paths?: RiddleProofStatePaths;
129
+ }
130
+ interface RiddleProofProofContract {
131
+ version: "riddle-proof.proof-contract.v1";
132
+ checkpoint?: string | null;
133
+ source_response?: {
134
+ run_id?: string;
135
+ checkpoint?: string;
136
+ resume_token?: string;
137
+ decision?: string;
138
+ summary?: string;
139
+ created_at?: string;
140
+ };
141
+ proof_plan?: string;
142
+ capture_script?: string;
143
+ artifact_contract?: Record<string, unknown>;
144
+ assertions?: unknown;
145
+ baseline_understanding?: Record<string, unknown>;
146
+ route_assumptions?: Record<string, unknown>;
147
+ stop_condition?: string;
148
+ rationale?: unknown;
149
+ verdict_dimensions?: Record<string, unknown>;
150
+ payload?: Record<string, unknown>;
151
+ created_at: string;
152
+ }
55
153
  interface IntegrationContext {
56
154
  source?: "openclaw" | "discord" | "github" | "cli" | "riddle" | (string & {});
57
155
  channel_id?: string;
@@ -113,6 +211,15 @@ interface RiddleProofRunState {
113
211
  proof_session?: RiddleProofVisualSession;
114
212
  finalized?: boolean;
115
213
  blocker?: RiddleProofBlocker;
214
+ checkpoint_packet?: RiddleProofCheckpointPacket;
215
+ checkpoint_summary?: RiddleProofCheckpointSummary;
216
+ state_paths?: RiddleProofStatePaths;
217
+ proof_contract?: RiddleProofProofContract;
218
+ checkpoint_history?: Array<{
219
+ ts: string;
220
+ packet?: RiddleProofCheckpointPacket;
221
+ response?: RiddleProofCheckpointResponse;
222
+ }>;
116
223
  events: RiddleProofEvent[];
117
224
  }
118
225
  interface RiddleProofRunResult {
@@ -148,6 +255,10 @@ interface RiddleProofRunResult {
148
255
  merge_recommendation?: string;
149
256
  finalized?: boolean;
150
257
  blocker?: RiddleProofBlocker;
258
+ checkpoint_packet?: RiddleProofCheckpointPacket;
259
+ checkpoint_summary?: RiddleProofCheckpointSummary;
260
+ state_paths?: RiddleProofStatePaths;
261
+ proof_contract?: RiddleProofProofContract;
151
262
  proof_session?: RiddleProofVisualSession;
152
263
  evidence_bundle?: RiddleProofEvidenceBundle;
153
264
  raw?: Record<string, unknown>;
@@ -179,6 +290,10 @@ interface RiddleProofRunStatusSnapshot {
179
290
  elapsed_ms?: number;
180
291
  stage_elapsed_ms?: number;
181
292
  blocker?: RiddleProofBlocker;
293
+ checkpoint_packet?: RiddleProofCheckpointPacket;
294
+ checkpoint_summary?: RiddleProofCheckpointSummary;
295
+ state_paths?: RiddleProofStatePaths;
296
+ proof_contract?: RiddleProofProofContract;
182
297
  latest_event?: RiddleProofEvent;
183
298
  }
184
299
  interface RiddleProofEvidenceBundle {
@@ -399,4 +514,4 @@ interface RiddleProofVisualSessionFingerprintBasis {
399
514
  capture_script_hash?: string;
400
515
  }
401
516
 
402
- export type { EvidenceArtifact, EvidenceReference, ImplementationAdapter, ImplementationAdapterInput, ImplementationAdapterResult, IntegrationContext, JsonObject, JsonPrimitive, JsonValue, JudgeAdapter, NotificationAdapter, PreflightAdapter, PreflightAdapterInput, PreflightAdapterResult, ProofAdapter, ProofAdapterInput, ProofAdapterResult, RiddleProofArtifactRole, RiddleProofAssessment, RiddleProofBlocker, RiddleProofDecision, RiddleProofEvent, RiddleProofEvidenceBundle, RiddleProofPrLifecycleState, RiddleProofPrLifecycleStatus, RiddleProofRunParams, RiddleProofRunResult, RiddleProofRunState, RiddleProofRunStatusSnapshot, RiddleProofStage, RiddleProofStatus, RiddleProofTerminalMetadata, RiddleProofVerificationMode, RiddleProofVisualSession, RiddleProofVisualSessionFingerprintBasis, SetupAdapter, SetupAdapterInput, SetupAdapterResult, ShipAdapter };
517
+ export type { 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, RiddleProofRunParams, RiddleProofRunResult, RiddleProofRunState, RiddleProofRunStatusSnapshot, RiddleProofStage, RiddleProofStatePaths, RiddleProofStatus, RiddleProofTerminalMetadata, RiddleProofVerificationMode, RiddleProofVisualSession, RiddleProofVisualSessionFingerprintBasis, SetupAdapter, SetupAdapterInput, SetupAdapterResult, ShipAdapter };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riddledc/riddle-proof",
3
- "version": "0.5.38",
3
+ "version": "0.5.40",
4
4
  "description": "Reusable Riddle Proof contracts and helpers for evidence-backed agent changes.",
5
5
  "license": "MIT",
6
6
  "author": "RiddleDC",
@@ -34,6 +34,11 @@
34
34
  "import": "./dist/state.js",
35
35
  "require": "./dist/state.cjs"
36
36
  },
37
+ "./checkpoint": {
38
+ "types": "./dist/checkpoint.d.ts",
39
+ "import": "./dist/checkpoint.js",
40
+ "require": "./dist/checkpoint.cjs"
41
+ },
37
42
  "./runner": {
38
43
  "types": "./dist/runner.d.ts",
39
44
  "import": "./dist/runner.js",
@@ -92,7 +97,7 @@
92
97
  "typescript": "^5.4.5"
93
98
  },
94
99
  "scripts": {
95
- "build": "tsup src/index.ts src/types.ts src/result.ts src/state.ts src/runner.ts src/engine-harness.ts src/diagnostics.ts src/proof-session.ts src/playability.ts src/openclaw.ts src/proof-run-core.ts src/proof-run-engine.ts --format cjs,esm --dts --out-dir dist --clean",
100
+ "build": "tsup src/index.ts src/types.ts src/result.ts src/state.ts src/checkpoint.ts src/runner.ts src/engine-harness.ts src/diagnostics.ts src/proof-session.ts src/playability.ts src/openclaw.ts src/proof-run-core.ts src/proof-run-engine.ts --format cjs,esm --dts --out-dir dist --clean",
96
101
  "clean": "rm -rf dist",
97
102
  "lint": "echo 'lint: (not configured)'",
98
103
  "test": "npm run build && node test.js && node proof-run.test.js"