@teamvibe/poller 0.4.0 → 0.4.2

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.
@@ -234,9 +234,15 @@ async function runClaudeCode(msg, sessionLog, cwd, sessionId, isFirstMessage = t
234
234
  const slackContext = msg.response_context.slack;
235
235
  const isCronMessage = msg.source === 'cron';
236
236
  const isHeartbeat = msg.source === 'heartbeat';
237
+ const isMaintenance = msg.source === 'maintenance';
237
238
  const isEmailMessage = msg.source === 'email';
238
239
  const isWebhookMessage = msg.source === 'webhook';
239
- if (!slackContext && !isCronMessage && !isHeartbeat && !isEmailMessage && !isWebhookMessage) {
240
+ if (!slackContext &&
241
+ !isCronMessage &&
242
+ !isHeartbeat &&
243
+ !isMaintenance &&
244
+ !isEmailMessage &&
245
+ !isWebhookMessage) {
240
246
  throw new Error('No Slack context in message');
241
247
  }
242
248
  // Build resume hint
@@ -11,6 +11,8 @@ export interface MetricsPayload {
11
11
  todayMdLines?: number;
12
12
  summaryMdBytes?: number;
13
13
  summaryMdLines?: number;
14
+ heartbeatMdBytes?: number;
15
+ heartbeatMdLines?: number;
14
16
  brainDirBytes?: number;
15
17
  vmDiskFreeBytes?: number;
16
18
  vmDiskUsedBytes?: number;
@@ -135,6 +135,19 @@ export async function collectMetrics(brainPath, brainId) {
135
135
  catch {
136
136
  // omit
137
137
  }
138
+ // HEARTBEAT.md size + line count — see poller-brain#101. The *number of
139
+ // items* in the file is what drives the Step 8b sweep crash risk, so we
140
+ // report size + line count rather than a binary presence flag. Both omitted
141
+ // on any error (file missing or unreadable).
142
+ try {
143
+ const heartbeatPath = join(brainPath, 'HEARTBEAT.md');
144
+ const s = await stat(heartbeatPath);
145
+ payload.heartbeatMdBytes = s.size;
146
+ payload.heartbeatMdLines = await countLines(heartbeatPath);
147
+ }
148
+ catch {
149
+ // omit
150
+ }
138
151
  // brain dir total size
139
152
  try {
140
153
  payload.brainDirBytes = await dirSizeBytes(brainPath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamvibe/poller",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "bin": {