mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-06 23:20:53 +01:00
Fix completed-history owner receipts and verified attachment cleanup
Use truthful storage absence receipts for MCP deletion and preserve replay fences. Qualify retained chat controls and provider submissions through their actual owners, retain voice and registration obligations, and bound delivery receipt lookup. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
aaf55692c4
commit
56acdfdffa
31 files changed
+1849
-98
No files matched your search
@@ -30,8 +30,10 @@ function resolveWithin(baseDir: string, objectKey: string): string {
|
||||
async function statOrNull(filePath: string) {
|
||||
try {
|
||||
return await fs.stat(filePath);
|
||||
} catch {
|
||||
return null;
|
||||
} catch (error) {
|
||||
const code = (error as NodeJS.ErrnoException | null)?.code;
|
||||
if (code === "ENOENT" || code === "ENOTDIR") return null;
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,8 +91,9 @@ export function createLocalDiskStorageProvider(baseDir: string): StorageProvider
|
||||
const filePath = resolveWithin(root, input.objectKey);
|
||||
try {
|
||||
await fs.unlink(filePath);
|
||||
} catch {
|
||||
// idempotent delete
|
||||
} catch (error) {
|
||||
const code = (error as NodeJS.ErrnoException | null)?.code;
|
||||
if (code !== "ENOENT" && code !== "ENOTDIR") throw error;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user