@frockbot/plugin-audit 0.3.12 → 0.3.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/package.json +6 -6
- package/src/bot.ts +9 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frockbot/plugin-audit",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.14",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"typecheck": "vue-tsc --noEmit -p tsconfig.json"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@frockbot/client-core": "0.3.
|
|
29
|
-
"@frockbot/client-ui": "0.3.
|
|
30
|
-
"@frockbot/kernel-contracts": "0.3.
|
|
31
|
-
"@frockbot/plugin-shell": "0.3.
|
|
32
|
-
"@frockbot/secret-shapes": "0.3.
|
|
28
|
+
"@frockbot/client-core": "0.3.14",
|
|
29
|
+
"@frockbot/client-ui": "0.3.14",
|
|
30
|
+
"@frockbot/kernel-contracts": "0.3.14",
|
|
31
|
+
"@frockbot/plugin-shell": "0.3.14",
|
|
32
|
+
"@frockbot/secret-shapes": "0.3.14",
|
|
33
33
|
"cordis": "4.0.0-rc.8",
|
|
34
34
|
"vue": "3.5.41"
|
|
35
35
|
},
|
package/src/bot.ts
CHANGED
|
@@ -273,10 +273,12 @@ export class AuditOutboxV1 {
|
|
|
273
273
|
if (entries.length === 0) return this.state();
|
|
274
274
|
const outbox = await this.read();
|
|
275
275
|
const seen = new Set(
|
|
276
|
-
outbox.entries.map(
|
|
276
|
+
outbox.entries.map(
|
|
277
|
+
(entry) => `${entry.runId}\u0000${entry.occurrenceId}`,
|
|
278
|
+
),
|
|
277
279
|
);
|
|
278
280
|
for (const entry of entries) {
|
|
279
|
-
const key = `${entry.runId}
|
|
281
|
+
const key = `${entry.runId}\u0000${entry.occurrenceId}`;
|
|
280
282
|
if (seen.has(key)) continue;
|
|
281
283
|
seen.add(key);
|
|
282
284
|
outbox.entries.push(entry);
|
|
@@ -314,12 +316,15 @@ export class AuditOutboxV1 {
|
|
|
314
316
|
const remaining = await this.read();
|
|
315
317
|
// Anything appended while the sink was in flight stays pending.
|
|
316
318
|
const deliveredKeys = new Set(
|
|
317
|
-
outbox.entries.map(
|
|
319
|
+
outbox.entries.map(
|
|
320
|
+
(entry) => `${entry.runId}\u0000${entry.occurrenceId}`,
|
|
321
|
+
),
|
|
318
322
|
);
|
|
319
323
|
const next: StoredOutbox = {
|
|
320
324
|
schemaVersion: 1,
|
|
321
325
|
entries: remaining.entries.filter(
|
|
322
|
-
(entry) =>
|
|
326
|
+
(entry) =>
|
|
327
|
+
!deliveredKeys.has(`${entry.runId}\u0000${entry.occurrenceId}`),
|
|
323
328
|
),
|
|
324
329
|
truncated: remaining.truncated || outbox.truncated,
|
|
325
330
|
};
|