@riddledc/riddle-proof 0.7.220 → 0.7.222

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/cli.cjs CHANGED
@@ -17432,15 +17432,19 @@ function profileHasRestartReadyReceipt(receipts) {
17432
17432
  const statusText = profileLowerSummaryValue(receipt, ["statusText", "status", "message"]);
17433
17433
  const summary = cliReturnSummaryLabel(receipt.return_summary) || "";
17434
17434
  const haystack = `${storedTo} ${label} ${path7} ${slot} ${statusText} ${summary}`.toLowerCase();
17435
- const labelsRestart = haystack.includes("restart") || haystack.includes("play again") || haystack.includes("play-again") || haystack.includes("playagain") || haystack.includes("retry");
17435
+ const labelsRestart = haystack.includes("restart") || haystack.includes("reset") || haystack.includes("reset-ready") || haystack.includes("reset ready") || haystack.includes("play again") || haystack.includes("play-again") || haystack.includes("playagain") || haystack.includes("retry");
17436
17436
  if (!labelsRestart) return false;
17437
17437
  const ok = receipt.ok !== false && setupReturnSummaryValue(receipt, ["ok"]) !== false;
17438
17438
  const controlsEnabled = setupReturnSummaryValue(receipt, ["controlsEnabled", "inputControlsEnabled", "inputEnabled", "canInput"]) === true || setupReturnSummaryValue(receipt, ["shortDisabled"]) === false && setupReturnSummaryValue(receipt, ["longDisabled"]) === false;
17439
17439
  const level = cliFiniteNumber(setupReturnSummaryValue(receipt, ["level"]));
17440
17440
  const streak = cliFiniteNumber(setupReturnSummaryValue(receipt, ["streak"]));
17441
17441
  const best = cliFiniteNumber(setupReturnSummaryValue(receipt, ["best"]));
17442
- const readyState = statusText.includes("your turn") || statusText.includes("ready") || setupReturnSummaryValue(receipt, ["ready", "restartReady", "restart_ready"]) === true;
17443
- return ok && controlsEnabled && (readyState || level !== void 0 || streak !== void 0 || best !== void 0);
17442
+ const readyState = statusText.includes("your turn") || statusText.includes("ready") || setupReturnSummaryValue(receipt, ["ready", "restartReady", "restart_ready", "resetReady", "reset_ready"]) === true;
17443
+ const hiddenCount = cliFiniteNumber(setupReturnSummaryValue(receipt, ["hiddenCount", "hidden_count"]));
17444
+ const moves = cliFiniteNumber(setupReturnSummaryValue(receipt, ["moves", "moveCount", "move_count"]));
17445
+ const winner = setupReturnSummaryValue(receipt, ["hasWinner", "winner", "won", "gameWon"]);
17446
+ const resetBoardReady = hiddenCount !== void 0 && hiddenCount > 0 && moves === 0 && winner === false;
17447
+ return ok && controlsEnabled && (readyState || resetBoardReady || level !== void 0 || streak !== void 0 || best !== void 0);
17444
17448
  });
17445
17449
  }
17446
17450
  function profileMetadataHasGeneratedOutputContract(metadata) {
@@ -17571,6 +17575,10 @@ function profileSemanticWinnerReason(receipts, text) {
17571
17575
  const asksCounts = text.includes("count");
17572
17576
  const asksWinCells = text.includes("win-cell") || text.includes("winning") || text.includes("inventory") || text.includes("top-row");
17573
17577
  const asksPlayAgain = text.includes("play again") || text.includes("play-again") || text.includes("playagain");
17578
+ const asksNewGame = text.includes("new game") || text.includes("new-game") || text.includes("newgame");
17579
+ const asksNewRound = text.includes("new round") || text.includes("new-round") || text.includes("newround");
17580
+ const asksNewRoute = text.includes("new route") || text.includes("new-route") || text.includes("newroute");
17581
+ const asksRestartReset = text.includes("restart") || text.includes("reset");
17574
17582
  for (const receipt of receipts) {
17575
17583
  if (!profileSemanticReceiptPassed(receipt)) continue;
17576
17584
  const winnerText = (cliString(setupReturnSummaryValue(receipt, ["winnerText", "terminalText", "statusText"])) || "").toLowerCase();
@@ -17587,17 +17595,43 @@ function profileSemanticWinnerReason(receipts, text) {
17587
17595
  const hasWinCells = profileSemanticArrayEvidence(setupReturnSummaryValue(receipt, ["winCells", "winningCells", "winningLine"])) || Boolean(cliString(setupReturnSummaryValue(receipt, ["winCellsCsv"])));
17588
17596
  const hasPlayAgain = profileSemanticTruthyField(receipt, [
17589
17597
  "playAgainVisible",
17590
- "play_again_visible",
17598
+ "play_again_visible"
17599
+ ]);
17600
+ const hasNewGame = profileSemanticTruthyField(receipt, [
17601
+ "hasNewGame",
17602
+ "newGameVisible",
17603
+ "new_game_visible"
17604
+ ]);
17605
+ const hasNewRound = profileSemanticTruthyField(receipt, [
17606
+ "hasNewRound",
17607
+ "newRoundVisible",
17608
+ "new_round_visible"
17609
+ ]);
17610
+ const hasNewRoute = profileSemanticTruthyField(receipt, [
17611
+ "hasNewRoute",
17612
+ "newRouteVisible",
17613
+ "new_route_visible"
17614
+ ]);
17615
+ const hasRestartReset = profileSemanticTruthyField(receipt, [
17591
17616
  "restartVisible",
17592
- "resetVisible"
17617
+ "restart_visible",
17618
+ "resetVisible",
17619
+ "reset_visible"
17593
17620
  ]);
17594
17621
  if (asksCounts && !hasCounts) continue;
17595
17622
  if (asksWinCells && !hasWinCells) continue;
17596
17623
  if (asksPlayAgain && !hasPlayAgain) continue;
17624
+ if (asksNewGame && !hasNewGame) continue;
17625
+ if (asksNewRound && !hasNewRound) continue;
17626
+ if (asksNewRoute && !hasNewRoute) continue;
17627
+ if (asksRestartReset && !(hasPlayAgain || hasNewGame || hasNewRound || hasNewRoute || hasRestartReset)) continue;
17628
+ const hasResetStyleRecovery = hasNewGame || hasNewRound || hasNewRoute || hasRestartReset;
17629
+ const matchedRequestedResetStyle = !asksPlayAgain && (asksNewGame && hasNewGame || asksNewRound && hasNewRound || asksNewRoute && hasNewRoute || asksRestartReset && hasResetStyleRecovery);
17630
+ const recoveryControlReason = matchedRequestedResetStyle || !hasPlayAgain && hasResetStyleRecovery ? "restart/reset visible" : hasPlayAgain ? "play-again visible" : "";
17597
17631
  const parts = [
17598
17632
  hasCounts ? "counts present" : "",
17599
17633
  hasWinCells ? "win cells present" : "",
17600
- hasPlayAgain ? "play-again visible" : ""
17634
+ recoveryControlReason
17601
17635
  ].filter(Boolean);
17602
17636
  return `semantic winner receipt present${parts.length ? `: ${parts.join(", ")}` : ""}`;
17603
17637
  }
package/dist/cli.js CHANGED
@@ -1141,15 +1141,19 @@ function profileHasRestartReadyReceipt(receipts) {
1141
1141
  const statusText = profileLowerSummaryValue(receipt, ["statusText", "status", "message"]);
1142
1142
  const summary = cliReturnSummaryLabel(receipt.return_summary) || "";
1143
1143
  const haystack = `${storedTo} ${label} ${path2} ${slot} ${statusText} ${summary}`.toLowerCase();
1144
- const labelsRestart = haystack.includes("restart") || haystack.includes("play again") || haystack.includes("play-again") || haystack.includes("playagain") || haystack.includes("retry");
1144
+ const labelsRestart = haystack.includes("restart") || haystack.includes("reset") || haystack.includes("reset-ready") || haystack.includes("reset ready") || haystack.includes("play again") || haystack.includes("play-again") || haystack.includes("playagain") || haystack.includes("retry");
1145
1145
  if (!labelsRestart) return false;
1146
1146
  const ok = receipt.ok !== false && setupReturnSummaryValue(receipt, ["ok"]) !== false;
1147
1147
  const controlsEnabled = setupReturnSummaryValue(receipt, ["controlsEnabled", "inputControlsEnabled", "inputEnabled", "canInput"]) === true || setupReturnSummaryValue(receipt, ["shortDisabled"]) === false && setupReturnSummaryValue(receipt, ["longDisabled"]) === false;
1148
1148
  const level = cliFiniteNumber(setupReturnSummaryValue(receipt, ["level"]));
1149
1149
  const streak = cliFiniteNumber(setupReturnSummaryValue(receipt, ["streak"]));
1150
1150
  const best = cliFiniteNumber(setupReturnSummaryValue(receipt, ["best"]));
1151
- const readyState = statusText.includes("your turn") || statusText.includes("ready") || setupReturnSummaryValue(receipt, ["ready", "restartReady", "restart_ready"]) === true;
1152
- return ok && controlsEnabled && (readyState || level !== void 0 || streak !== void 0 || best !== void 0);
1151
+ const readyState = statusText.includes("your turn") || statusText.includes("ready") || setupReturnSummaryValue(receipt, ["ready", "restartReady", "restart_ready", "resetReady", "reset_ready"]) === true;
1152
+ const hiddenCount = cliFiniteNumber(setupReturnSummaryValue(receipt, ["hiddenCount", "hidden_count"]));
1153
+ const moves = cliFiniteNumber(setupReturnSummaryValue(receipt, ["moves", "moveCount", "move_count"]));
1154
+ const winner = setupReturnSummaryValue(receipt, ["hasWinner", "winner", "won", "gameWon"]);
1155
+ const resetBoardReady = hiddenCount !== void 0 && hiddenCount > 0 && moves === 0 && winner === false;
1156
+ return ok && controlsEnabled && (readyState || resetBoardReady || level !== void 0 || streak !== void 0 || best !== void 0);
1153
1157
  });
1154
1158
  }
1155
1159
  function profileMetadataHasGeneratedOutputContract(metadata) {
@@ -1280,6 +1284,10 @@ function profileSemanticWinnerReason(receipts, text) {
1280
1284
  const asksCounts = text.includes("count");
1281
1285
  const asksWinCells = text.includes("win-cell") || text.includes("winning") || text.includes("inventory") || text.includes("top-row");
1282
1286
  const asksPlayAgain = text.includes("play again") || text.includes("play-again") || text.includes("playagain");
1287
+ const asksNewGame = text.includes("new game") || text.includes("new-game") || text.includes("newgame");
1288
+ const asksNewRound = text.includes("new round") || text.includes("new-round") || text.includes("newround");
1289
+ const asksNewRoute = text.includes("new route") || text.includes("new-route") || text.includes("newroute");
1290
+ const asksRestartReset = text.includes("restart") || text.includes("reset");
1283
1291
  for (const receipt of receipts) {
1284
1292
  if (!profileSemanticReceiptPassed(receipt)) continue;
1285
1293
  const winnerText = (cliString(setupReturnSummaryValue(receipt, ["winnerText", "terminalText", "statusText"])) || "").toLowerCase();
@@ -1296,17 +1304,43 @@ function profileSemanticWinnerReason(receipts, text) {
1296
1304
  const hasWinCells = profileSemanticArrayEvidence(setupReturnSummaryValue(receipt, ["winCells", "winningCells", "winningLine"])) || Boolean(cliString(setupReturnSummaryValue(receipt, ["winCellsCsv"])));
1297
1305
  const hasPlayAgain = profileSemanticTruthyField(receipt, [
1298
1306
  "playAgainVisible",
1299
- "play_again_visible",
1307
+ "play_again_visible"
1308
+ ]);
1309
+ const hasNewGame = profileSemanticTruthyField(receipt, [
1310
+ "hasNewGame",
1311
+ "newGameVisible",
1312
+ "new_game_visible"
1313
+ ]);
1314
+ const hasNewRound = profileSemanticTruthyField(receipt, [
1315
+ "hasNewRound",
1316
+ "newRoundVisible",
1317
+ "new_round_visible"
1318
+ ]);
1319
+ const hasNewRoute = profileSemanticTruthyField(receipt, [
1320
+ "hasNewRoute",
1321
+ "newRouteVisible",
1322
+ "new_route_visible"
1323
+ ]);
1324
+ const hasRestartReset = profileSemanticTruthyField(receipt, [
1300
1325
  "restartVisible",
1301
- "resetVisible"
1326
+ "restart_visible",
1327
+ "resetVisible",
1328
+ "reset_visible"
1302
1329
  ]);
1303
1330
  if (asksCounts && !hasCounts) continue;
1304
1331
  if (asksWinCells && !hasWinCells) continue;
1305
1332
  if (asksPlayAgain && !hasPlayAgain) continue;
1333
+ if (asksNewGame && !hasNewGame) continue;
1334
+ if (asksNewRound && !hasNewRound) continue;
1335
+ if (asksNewRoute && !hasNewRoute) continue;
1336
+ if (asksRestartReset && !(hasPlayAgain || hasNewGame || hasNewRound || hasNewRoute || hasRestartReset)) continue;
1337
+ const hasResetStyleRecovery = hasNewGame || hasNewRound || hasNewRoute || hasRestartReset;
1338
+ const matchedRequestedResetStyle = !asksPlayAgain && (asksNewGame && hasNewGame || asksNewRound && hasNewRound || asksNewRoute && hasNewRoute || asksRestartReset && hasResetStyleRecovery);
1339
+ const recoveryControlReason = matchedRequestedResetStyle || !hasPlayAgain && hasResetStyleRecovery ? "restart/reset visible" : hasPlayAgain ? "play-again visible" : "";
1306
1340
  const parts = [
1307
1341
  hasCounts ? "counts present" : "",
1308
1342
  hasWinCells ? "win cells present" : "",
1309
- hasPlayAgain ? "play-again visible" : ""
1343
+ recoveryControlReason
1310
1344
  ].filter(Boolean);
1311
1345
  return `semantic winner receipt present${parts.length ? `: ${parts.join(", ")}` : ""}`;
1312
1346
  }
@@ -292,7 +292,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
292
292
  blocking?: boolean;
293
293
  details?: Record<string, unknown>;
294
294
  ok: boolean;
295
- action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
295
+ action: "recon" | "author" | "ship" | "implement" | "verify" | "setup" | "run";
296
296
  state_path: string;
297
297
  stage: any;
298
298
  summary: string;
@@ -382,7 +382,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
382
382
  continueWithStage?: WorkflowStage | null;
383
383
  blocking?: boolean;
384
384
  details?: Record<string, unknown>;
385
- action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
385
+ action: "recon" | "author" | "ship" | "implement" | "verify" | "setup" | "run";
386
386
  state_path: string;
387
387
  stage: any;
388
388
  checkpoint: string;
@@ -659,7 +659,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
659
659
  error?: undefined;
660
660
  } | {
661
661
  ok: boolean;
662
- action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
662
+ action: "recon" | "author" | "ship" | "implement" | "verify" | "setup" | "run";
663
663
  state_path: string;
664
664
  stage: any;
665
665
  summary: string;
@@ -292,7 +292,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
292
292
  blocking?: boolean;
293
293
  details?: Record<string, unknown>;
294
294
  ok: boolean;
295
- action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
295
+ action: "recon" | "author" | "ship" | "implement" | "verify" | "setup" | "run";
296
296
  state_path: string;
297
297
  stage: any;
298
298
  summary: string;
@@ -382,7 +382,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
382
382
  continueWithStage?: WorkflowStage | null;
383
383
  blocking?: boolean;
384
384
  details?: Record<string, unknown>;
385
- action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
385
+ action: "recon" | "author" | "ship" | "implement" | "verify" | "setup" | "run";
386
386
  state_path: string;
387
387
  stage: any;
388
388
  checkpoint: string;
@@ -659,7 +659,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
659
659
  error?: undefined;
660
660
  } | {
661
661
  ok: boolean;
662
- action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
662
+ action: "recon" | "author" | "ship" | "implement" | "verify" | "setup" | "run";
663
663
  state_path: string;
664
664
  stage: any;
665
665
  summary: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riddledc/riddle-proof",
3
- "version": "0.7.220",
3
+ "version": "0.7.222",
4
4
  "description": "Reusable Riddle Proof contracts and helpers for evidence-backed agent changes.",
5
5
  "license": "MIT",
6
6
  "author": "RiddleDC",