openpay-x402-sdk 0.10.0 → 0.10.1
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/CHANGELOG.md +11 -0
- package/package.json +1 -1
- package/src/spendStore.mjs +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.10.1 — 2026-09-23
|
|
4
|
+
|
|
5
|
+
- Create spend-store directories with mode 0700, including compatibility saves,
|
|
6
|
+
so an env-key user's spend directory can later hold an MCP keystore without
|
|
7
|
+
failing its permission checks. Existing directories are never chmod-ed; inspect
|
|
8
|
+
and manually repair legacy 0755 directories before switching to keystore mode.
|
|
9
|
+
Mode 0700 also applies to newly created intermediate directories at custom
|
|
10
|
+
spend-store paths; pre-existing shared/group directories keep their permissions.
|
|
11
|
+
- Preserve spend reservations, locks, accounting and wallet 0600/0700 checks.
|
|
12
|
+
No dependencies added. Unpublished; rule-15 human review is required before adoption.
|
|
13
|
+
|
|
3
14
|
## 0.10.0 — 2026-09-23
|
|
4
15
|
|
|
5
16
|
- Breaking: seller gates require a trusted `resourceId` and `expectedRecipient`;
|
package/package.json
CHANGED
package/src/spendStore.mjs
CHANGED
|
@@ -256,7 +256,9 @@ export function createFileSpendStore({ path, fsImpl } = {}) {
|
|
|
256
256
|
if (!supportsAtomicFileUpdates(runtime.fileSystem)) {
|
|
257
257
|
throw new Error('atomic spend store file operations are unavailable');
|
|
258
258
|
}
|
|
259
|
-
|
|
259
|
+
// Spend storage shares the default wallet directory: public directory bits would block
|
|
260
|
+
// a later keystore migration. Keep new directories private without chmod-ing existing ones.
|
|
261
|
+
await runtime.fileSystem.mkdir(runtime.directory, { recursive: true, mode: 0o700 });
|
|
260
262
|
const handle = await acquireLock(runtime.fileSystem, runtime.lockPath);
|
|
261
263
|
try {
|
|
262
264
|
return await operation(runtime);
|
|
@@ -438,7 +440,8 @@ export function createFileSpendStore({ path, fsImpl } = {}) {
|
|
|
438
440
|
}
|
|
439
441
|
const current = documentForDate(document, key.slice(-10));
|
|
440
442
|
current[key] = atomicString;
|
|
441
|
-
|
|
443
|
+
// Compatibility saves must not create a shared directory the keystore would reject.
|
|
444
|
+
await runtime.fileSystem.mkdir(runtime.directory, { recursive: true, mode: 0o700 });
|
|
442
445
|
await runtime.fileSystem.writeFile(
|
|
443
446
|
runtime.targetPath,
|
|
444
447
|
`${JSON.stringify(current, null, 2)}\n`,
|