amalgm 0.1.203 → 0.1.204

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "amalgm",
3
- "version": "0.1.203",
3
+ "version": "0.1.204",
4
4
  "description": "Amalgm local computer runtime: login, MCP, chat, events, previews, and tunnels.",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,
@@ -23,6 +23,7 @@ fs.writeFileSync(
23
23
  );
24
24
 
25
25
  const { closeLocalDb } = require('../state/db');
26
+ const { appendStateEvent } = require('../state/events');
26
27
  const { acknowledgeCloudMutation } = require('../state/mutations');
27
28
  const { registerReplica } = require('../state/replicas');
28
29
  const { openDoc, getDocText, writeDocText } = require('../state/docs');
@@ -546,6 +547,20 @@ test('project stats name every project resource, binding, and publish counter',
546
547
  assert.ok(stats.paths.includes(project.file));
547
548
  });
548
549
 
550
+ test('ready repo objects wake the card publisher', async () => {
551
+ startWallService();
552
+ await new Promise((resolve) => setTimeout(resolve, 100));
553
+ const before = wallStats();
554
+ appendStateEvent({ resource: 'repo-objects', op: 'update', id: 'ready-bundle' });
555
+ await new Promise((resolve) => setTimeout(resolve, 100));
556
+ stopWallService();
557
+ const after = wallStats();
558
+ assert.ok(
559
+ after.publishes + after.publishSkips
560
+ > before.publishes + before.publishSkips,
561
+ );
562
+ });
563
+
549
564
  test('a restarted wall publishes once even when the project is already attached', async () => {
550
565
  const before = wallStats();
551
566
  startWallService();
@@ -670,6 +670,7 @@ function startWallService() {
670
670
  if (
671
671
  event.resource === 'repo-cards'
672
672
  || event.resource === 'repo-checkpoints'
673
+ || event.resource === 'repo-objects'
673
674
  || acknowledged
674
675
  ) {
675
676
  ensureProjects().catch(() => {});