blun-king-cli 9.1.457 → 9.1.458

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.
@@ -316,7 +316,18 @@ function externalReportOriginFromRuntimeSource(input) {
316
316
  });
317
317
  }
318
318
 
319
- function resolveExternalReportOrigin(selectorInput, runtimeExternalReports) {
319
+ function assertExternalReportChecksumClaims(report, claimText) {
320
+ const claims = extractChecksumClaims(claimText);
321
+ if (claims.length === 0) return;
322
+ const reportClaims = new Set(report.claimTokens ?? []);
323
+ for (const claim of claims) {
324
+ if (!reportClaims.has(claim)) {
325
+ throw new TypeError(`checksum claim ${claim} is absent from the selected external report`);
326
+ }
327
+ }
328
+ }
329
+
330
+ function resolveExternalReportOrigin(selectorInput, runtimeExternalReports, claimText) {
320
331
  const selector = normalizeExternalReportSelector(selectorInput);
321
332
  const reports = Array.isArray(runtimeExternalReports)
322
333
  ? runtimeExternalReports.map(normalizeRuntimeExternalReportSource)
@@ -327,6 +338,7 @@ function resolveExternalReportOrigin(selectorInput, runtimeExternalReports) {
327
338
  if (report === undefined) {
328
339
  throw new TypeError('externalReportSource does not match a trusted external report in the current turn');
329
340
  }
341
+ assertExternalReportChecksumClaims(report, claimText);
330
342
  return externalReportOriginFromRuntimeSource(report);
331
343
  }
332
344
 
@@ -911,7 +923,7 @@ function assertActionCheckpointEvidenceBasis(current, input, runtimeEvidence, ru
911
923
  throw new TypeError('external_report evidenceBasis cannot claim verified epistemicState');
912
924
  }
913
925
  if (runtimeExternalReports !== undefined) {
914
- resolveExternalReportOrigin(input?.externalReportSource, runtimeExternalReports);
926
+ resolveExternalReportOrigin(input?.externalReportSource, runtimeExternalReports, input?.lastVerified);
915
927
  }
916
928
  } else if (input?.externalReportSource !== undefined) {
917
929
  throw new TypeError('externalReportSource requires external_report evidenceBasis');
@@ -972,6 +984,7 @@ function normalizeActionCheckpoint(input, options = {}) {
972
984
  checkpoint.externalReportOrigin = resolveExternalReportOrigin(
973
985
  input.externalReportSource,
974
986
  options.runtimeExternalReports,
987
+ input.lastVerified,
975
988
  );
976
989
  } else if (replay && input.externalReportOrigin !== undefined) {
977
990
  checkpoint.externalReportOrigin = normalizeExternalReportOrigin(input.externalReportOrigin);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blun-king-cli",
3
- "version": "9.1.457",
3
+ "version": "9.1.458",
4
4
  "description": "BLUN CLI - your own AI agent with a Telegram channel. Get it done. With BLUN.",
5
5
  "license": "MIT",
6
6
  "bin": {