@peac/adapter-openclaw 0.10.13 → 0.10.14

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
@@ -30,9 +30,9 @@ plugin.instance.start();
30
30
 
31
31
  Every tool call your agent makes is captured as a tamper-evident record:
32
32
 
33
- - **Tool name, timing, status** -- what ran, when, whether it succeeded
34
- - **Input/output digests** -- SHA-256 hashes by default (payloads are never stored in plaintext unless you explicitly allowlist a tool)
35
- - **Chain linkage** -- each record links to the previous one, so gaps or reordering are detectable
33
+ - **Tool name, timing, status**: what ran, when, whether it succeeded
34
+ - **Input/output digests**: SHA-256 hashes by default (payloads are never stored in plaintext unless you explicitly allowlist a tool)
35
+ - **Chain linkage**: each record links to the previous one, so gaps or reordering are detectable
36
36
 
37
37
  Records are signed with your key and written to disk as individual `.peac.json` files.
38
38
 
package/dist/index.cjs CHANGED
@@ -735,6 +735,10 @@ function decodeReceiptPayload(receipt) {
735
735
  return null;
736
736
  }
737
737
  }
738
+ function stripRedundantFields(content) {
739
+ const { auth, evidence, ...rest } = content;
740
+ return rest;
741
+ }
738
742
  var ALG_KEY_TYPE_MAP = {
739
743
  EdDSA: { kty: "OKP", crv: ["Ed25519", "Ed448"] },
740
744
  ES256: { kty: "EC", crv: ["P-256"] },
@@ -925,9 +929,11 @@ function createExportBundleTool(outputDir, logger) {
925
929
  const receiptsDir = pathModule.join(bundleDir, "receipts");
926
930
  await fs3.promises.mkdir(receiptsDir, { recursive: true });
927
931
  for (const receipt of receipts) {
932
+ const content = receipt.content;
933
+ const written = typeof content._jws === "string" ? stripRedundantFields(content) : content;
928
934
  await fs3.promises.writeFile(
929
935
  pathModule.join(receiptsDir, receipt.file),
930
- JSON.stringify(receipt.content, null, 2)
936
+ JSON.stringify(written, null, 2)
931
937
  );
932
938
  }
933
939
  logger.info(`Exported ${receipts.length} receipts to ${bundleDir}`);