@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 +3 -3
- package/dist/index.cjs +7 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +7 -1
- package/dist/index.mjs.map +1 -1
- package/dist/tools.d.ts.map +1 -1
- package/package.json +7 -7
package/dist/index.mjs
CHANGED
|
@@ -712,6 +712,10 @@ function decodeReceiptPayload(receipt) {
|
|
|
712
712
|
return null;
|
|
713
713
|
}
|
|
714
714
|
}
|
|
715
|
+
function stripRedundantFields(content) {
|
|
716
|
+
const { auth, evidence, ...rest } = content;
|
|
717
|
+
return rest;
|
|
718
|
+
}
|
|
715
719
|
var ALG_KEY_TYPE_MAP = {
|
|
716
720
|
EdDSA: { kty: "OKP", crv: ["Ed25519", "Ed448"] },
|
|
717
721
|
ES256: { kty: "EC", crv: ["P-256"] },
|
|
@@ -902,9 +906,11 @@ function createExportBundleTool(outputDir, logger) {
|
|
|
902
906
|
const receiptsDir = pathModule.join(bundleDir, "receipts");
|
|
903
907
|
await fs3.promises.mkdir(receiptsDir, { recursive: true });
|
|
904
908
|
for (const receipt of receipts) {
|
|
909
|
+
const content = receipt.content;
|
|
910
|
+
const written = typeof content._jws === "string" ? stripRedundantFields(content) : content;
|
|
905
911
|
await fs3.promises.writeFile(
|
|
906
912
|
pathModule.join(receiptsDir, receipt.file),
|
|
907
|
-
JSON.stringify(
|
|
913
|
+
JSON.stringify(written, null, 2)
|
|
908
914
|
);
|
|
909
915
|
}
|
|
910
916
|
logger.info(`Exported ${receipts.length} receipts to ${bundleDir}`);
|