@frockbot/plugin-audit 0.3.12 → 0.3.13

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.
Files changed (2) hide show
  1. package/package.json +6 -6
  2. 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.12",
3
+ "version": "0.3.13",
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.12",
29
- "@frockbot/client-ui": "0.3.12",
30
- "@frockbot/kernel-contracts": "0.3.12",
31
- "@frockbot/plugin-shell": "0.3.12",
32
- "@frockbot/secret-shapes": "0.3.12",
28
+ "@frockbot/client-core": "0.3.13",
29
+ "@frockbot/client-ui": "0.3.13",
30
+ "@frockbot/kernel-contracts": "0.3.13",
31
+ "@frockbot/plugin-shell": "0.3.13",
32
+ "@frockbot/secret-shapes": "0.3.13",
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((entry) => `${entry.runId}${entry.occurrenceId}`),
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}${entry.occurrenceId}`;
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((entry) => `${entry.runId}${entry.occurrenceId}`),
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) => !deliveredKeys.has(`${entry.runId}${entry.occurrenceId}`),
326
+ (entry) =>
327
+ !deliveredKeys.has(`${entry.runId}\u0000${entry.occurrenceId}`),
323
328
  ),
324
329
  truncated: remaining.truncated || outbox.truncated,
325
330
  };