@teamscala/service-boot 0.23.336 → 0.23.338

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
@@ -6,7 +6,7 @@
6
6
  },
7
7
  "name": "@teamscala/service-boot",
8
8
  "type": "module",
9
- "version": "0.23.336",
9
+ "version": "0.23.338",
10
10
  "sideEffects": false,
11
11
  "files": [
12
12
  "src"
@@ -17,7 +17,6 @@
17
17
  "@teamscala/auth": "*",
18
18
  "@teamscala/cache": "*",
19
19
  "@teamscala/channel": "*",
20
- "@teamscala/chat-completion": "*",
21
20
  "@teamscala/db": "*",
22
21
  "@teamscala/db-validation": "*",
23
22
  "@teamscala/document-signing": "*",
@@ -49,9 +48,7 @@
49
48
  "devDependencies": {
50
49
  "bun-types": "*",
51
50
  "@happy-dom/global-registrator": "*",
52
- "@testing-library/react": "*",
53
- "hono": "*",
54
- "pg-boss": "*"
51
+ "@testing-library/react": "*"
55
52
  },
56
53
  "exports": {
57
54
  "./agreement-gate": {
@@ -1086,5 +1083,13 @@
1086
1083
  "repository": "https://github.com/teamgbg/service-boot",
1087
1084
  "publishConfig": {
1088
1085
  "registry": "https://registry.npmjs.org"
1086
+ },
1087
+ "peerDependencies": {
1088
+ "@teamscala/chat-completion": "*"
1089
+ },
1090
+ "peerDependenciesMeta": {
1091
+ "@teamscala/chat-completion": {
1092
+ "optional": true
1093
+ }
1089
1094
  }
1090
1095
  }
@@ -42,7 +42,6 @@
42
42
  import { rm, readdir, stat } from "node:fs/promises";
43
43
  import { readdirSync, type Dirent } from "node:fs";
44
44
  import { join } from "node:path";
45
- import { spawnSync } from "@teamscala/os/spawn/spawn";
46
45
  import { userHome, workspaceRoot } from "@teamscala/os/host-paths";
47
46
  import { formatBytes } from "@teamscala/formatters/format-bytes";
48
47
  import { recordEvent } from "@teamscala/event-log/record-event";
@@ -290,33 +289,6 @@ async function sweepHostCache(ctx: {
290
289
  },
291
290
  });
292
291
 
293
- // Disk-threshold monitor — piggybacks on this nightly sweep event (no separate
294
- // interval/infra: `guards-never-run-on-interval`). If `/` usage crosses the
295
- // configured threshold, emit `host.disk.high` (-> event-log/GlitchTip) so a fill
296
- // the sweep can't absorb (external dump, runaway log) is caught within a day.
297
- const highPercent = 90;
298
- try {
299
- const dfRes = spawnSync({ name: "df:/", command: ["df", "--output=pcent,target"], timeoutMs: 5000 });
300
- const dfOut = (dfRes.stdout ?? "").trim();
301
- const rootLine = dfOut
302
- .split("\n")
303
- .find((l) => l.trim().endsWith("/"));
304
- const pctMatch = rootLine?.match(/(\d+)%/);
305
- if (pctMatch) {
306
- const usePct = Number(pctMatch[1]);
307
- if (usePct >= highPercent) {
308
- log.warn(
309
- `[host-cache-sweep] disk usage ${usePct}% >= ${highPercent}% threshold — emitting host.disk.high`,
310
- );
311
- recordEvent({
312
- kind: "host.disk.high",
313
- payload: { usePct, threshold: highPercent, df: dfOut, completedAt: new Date().toISOString() },
314
- });
315
- }
316
- }
317
- } catch (error) {
318
- log.warn(`[host-cache-sweep] disk-threshold check failed: ${String(error)}`);
319
- }
320
292
  }
321
293
 
322
294
  pgBossHandlerRegistry.register(