@codemem/server 0.22.4 → 0.23.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../src/routes/memory.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAIjD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAG5B,KAAK,YAAY,GAAG,MAAM,WAAW,CAAC;AAgJtC,wBAAgB,YAAY,CAAC,QAAQ,EAAE,YAAY,8EAwQlD"}
1
+ {"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../src/routes/memory.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAWjD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAG5B,KAAK,YAAY,GAAG,MAAM,WAAW,CAAC;AA6ItC,wBAAgB,YAAY,CAAC,QAAQ,EAAE,YAAY,8EAwQlD"}
@@ -1 +1 @@
1
- {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/routes/sync.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,OAAO,KAAK,EAAE,WAAW,EAAiB,MAAM,eAAe,CAAC;AA2BhE,OAAO,EAAgB,IAAI,EAAE,MAAM,MAAM,CAAC;AAE1C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AAE3E,KAAK,YAAY,GAAG,MAAM,WAAW,CAAC;AACtC,KAAK,iBAAiB,GAAG;IACxB,KAAK,EACF,UAAU,GACV,SAAS,GACT,UAAU,GACV,OAAO,GACP,UAAU,GACV,iBAAiB,GACjB,iBAAiB,GACjB,IAAI,CAAC;IACR,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,CAAC;AAEF,UAAU,wBAAwB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6B,8EA4R7F;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CACzB,QAAQ,EAAE,YAAY,EACtB,oBAAoB,CAAC,EAAE,MAAM,iBAAiB,GAAG,IAAI,8EA+4BrD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemem/server",
3
- "version": "0.22.4",
3
+ "version": "0.23.0",
4
4
  "type": "module",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {
@@ -15,26 +15,29 @@
15
15
  "static/"
16
16
  ],
17
17
  "dependencies": {
18
- "@hono/node-server": "^1.14.3",
19
- "drizzle-orm": "^0.45.1",
20
- "hono": "^4.7.10",
18
+ "@hono/node-server": "^1.19.12",
19
+ "drizzle-orm": "^0.45.2",
20
+ "hono": "^4.12.11",
21
21
  "limiter": "^3.0.0",
22
- "@codemem/core": "^0.22.4"
22
+ "@codemem/core": "^0.23.0"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/better-sqlite3": "^7.6.13",
26
26
  "@types/node": "^22.15.21",
27
27
  "better-sqlite3": "^12.8.0",
28
28
  "sqlite-vec": "0.1.7-alpha.2",
29
- "typescript": "^5.8.2",
30
- "vite": "8.0.1",
31
- "vitest": "4.0.17"
29
+ "typescript": "^5.9.3",
30
+ "vite": "^8.0.5",
31
+ "vitest": "^4.1.2"
32
32
  },
33
33
  "repository": {
34
34
  "type": "git",
35
35
  "url": "git+https://github.com/kunickiaj/codemem.git",
36
36
  "directory": "packages/viewer-server"
37
37
  },
38
+ "engines": {
39
+ "node": ">=24"
40
+ },
38
41
  "license": "MIT",
39
42
  "publishConfig": {
40
43
  "access": "public"
package/static/app.js CHANGED
@@ -1323,6 +1323,10 @@
1323
1323
  if (metadata?.is_summary === true) return true;
1324
1324
  return String(metadata?.source || "").trim().toLowerCase() === "observer_summary";
1325
1325
  }
1326
+ function canonicalKind(item, metadata) {
1327
+ const kindValue = String(item?.kind || "").trim().toLowerCase();
1328
+ return isSummaryLikeItem(item, metadata) ? "session_summary" : kindValue || "change";
1329
+ }
1326
1330
  function observationViewData(item) {
1327
1331
  const metadata = mergeMetadata(item?.metadata_json);
1328
1332
  const summary = String(item?.subtitle || item?.body_text || "").trim();
@@ -1504,10 +1508,9 @@
1504
1508
  }, display);
1505
1509
  }
1506
1510
  function FeedItemCard({ item }) {
1507
- const kindValue = String(item.kind || "session_summary").toLowerCase();
1508
1511
  const metadata = mergeMetadata(item?.metadata_json);
1509
1512
  const isSessionSummary = isSummaryLikeItem(item, metadata);
1510
- const displayKindValue = isSessionSummary ? "session_summary" : kindValue;
1513
+ const displayKindValue = canonicalKind(item, metadata);
1511
1514
  const rowKey = itemKey(item);
1512
1515
  const defaultTitle = item.title || "(untitled)";
1513
1516
  const displayTitle = isSessionSummary && metadata?.request ? metadata.request : defaultTitle;
@@ -10360,23 +10363,27 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
10360
10363
  displayName: String(request.display_name || request.device_id || "Pending device"),
10361
10364
  requestId: String(request.request_id || "")
10362
10365
  }));
10363
- const visibleDiscoveredRows = discoveredRows.filter((row) => row.mode !== "paired" && row.mode !== "none");
10364
- const discoveredActionableCount = visibleDiscoveredRows.filter((row) => row.mode === "accept" || row.mode === "scope-pending").length;
10366
+ const visibleDiscoveredRows = discoveredRows.filter((row) => row.mode !== "paired" && row.mode !== "none" && row.mode !== "scope-pending");
10367
+ const discoveredActionableCount = discoveredRows.filter((row) => row.mode === "accept" || row.mode === "scope-pending").length;
10365
10368
  const actionableCount = attentionItems.length + pendingJoinRequests.length + discoveredActionableCount;
10366
10369
  const attentionParts = [];
10367
10370
  if (attentionItems.length > 0) {
10368
- const deviceItems = attentionItems.filter((item) => item.kind !== "possible-duplicate-person");
10371
+ const repairItems = attentionItems.filter((item) => item.kind === "device-needs-repair");
10372
+ const nameItems = attentionItems.filter((item) => item.kind === "name-device");
10373
+ const reviewItems = attentionItems.filter((item) => item.kind === "review-team-device");
10369
10374
  const duplicateItems = attentionItems.filter((item) => item.kind === "possible-duplicate-person");
10370
- if (deviceItems.length > 0) attentionParts.push(`${deviceItems.length} device${deviceItems.length === 1 ? "" : "s"}`);
10371
- if (duplicateItems.length > 0) attentionParts.push(`${duplicateItems.length} duplicate${duplicateItems.length === 1 ? "" : "s"}`);
10375
+ if (repairItems.length > 0) attentionParts.push(`${repairItems.length} device${repairItems.length === 1 ? "" : "s"} to repair`);
10376
+ if (nameItems.length > 0) attentionParts.push(`${nameItems.length} device${nameItems.length === 1 ? "" : "s"} to name`);
10377
+ if (reviewItems.length > 0) attentionParts.push(`${reviewItems.length} device${reviewItems.length === 1 ? "" : "s"} to review`);
10378
+ if (duplicateItems.length > 0) attentionParts.push(`${duplicateItems.length} possible duplicate${duplicateItems.length === 1 ? "" : "s"}`);
10372
10379
  }
10373
- if (pendingJoinRequests.length > 0) attentionParts.push(`${pendingJoinRequests.length} join request${pendingJoinRequests.length === 1 ? "" : "s"}`);
10374
- if (discoveredActionableCount > 0) attentionParts.push(`${discoveredActionableCount} discovered`);
10380
+ if (pendingJoinRequests.length > 0) attentionParts.push(`${pendingJoinRequests.length} join request${pendingJoinRequests.length === 1 ? "" : "s"} to review`);
10381
+ if (discoveredActionableCount > 0) attentionParts.push(`${discoveredActionableCount} discovered device${discoveredActionableCount === 1 ? "" : "s"}`);
10375
10382
  const attentionDetail = attentionParts.join(", ");
10376
10383
  const teamLabel = (coordinator.groups || []).join(", ") || "none";
10377
10384
  const statusSummary = {
10378
10385
  badgeClassName: `pill ${presenceStatus === "posted" ? "pill-success" : presenceStatus === "not_enrolled" ? "pill-warning" : "pill-error"}`,
10379
- headline: presenceStatus === "posted" ? actionableCount > 0 ? `${attentionDetail} need${actionableCount === 1 ? "s" : ""} attention` : "Everything is healthy" : presenceStatus === "not_enrolled" ? "This device is not enrolled in the team yet" : "Sync needs attention",
10386
+ headline: presenceStatus === "posted" ? actionableCount > 0 ? attentionDetail : "Everything is healthy" : presenceStatus === "not_enrolled" ? "This device is not enrolled in the team yet" : "Sync needs attention",
10380
10387
  metricsText: metricParts.join(" · "),
10381
10388
  presenceLabel
10382
10389
  };
@@ -13353,7 +13360,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
13353
13360
  try {
13354
13361
  const runtime = await loadRuntimeInfo();
13355
13362
  if (!runtime?.version) return;
13356
- setRuntimeLabel(runtime.version, "23ef706");
13363
+ setRuntimeLabel(runtime.version, "8d28296");
13357
13364
  } catch {}
13358
13365
  }
13359
13366
  var lastAnnouncedRefreshState = null;