attesso 0.7.0 → 0.7.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/package.json +1 -1
- package/src/sync.mjs +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "attesso",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "Bounds: decide an AI agent's next tool call before it runs, with a signed record. Free and unlimited locally, $0.00085 per synced decision.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
package/src/sync.mjs
CHANGED
|
@@ -60,7 +60,10 @@ export async function sync({
|
|
|
60
60
|
if (typeof deviceId !== 'string' || !/^[A-Za-z0-9._:-]{1,64}$/.test(deviceId)) {
|
|
61
61
|
throw new Error('ledger key id is not a valid device id');
|
|
62
62
|
}
|
|
63
|
-
|
|
63
|
+
let state = readSyncState(dir);
|
|
64
|
+
if (state.device_id && state.device_id !== deviceId) {
|
|
65
|
+
state = { version: SYNC_VERSION, last_seq: 0 };
|
|
66
|
+
}
|
|
64
67
|
const entries = [];
|
|
65
68
|
forEachEntrySync(ledgerPath, (entry) => {
|
|
66
69
|
if (entry.seq <= state.last_seq) return;
|