nightytidy 0.3.3 → 0.3.4

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 +1 -1
  2. package/src/agent/index.js +12 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nightytidy",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "Automated overnight codebase improvement through Claude Code",
5
5
  "license": "MIT",
6
6
  "author": "Dorian Spitz",
@@ -1151,6 +1151,18 @@ export async function startAgent() {
1151
1151
  releaseKeepAwake();
1152
1152
  stopIdleHeartbeat();
1153
1153
  saveInterruptedState();
1154
+
1155
+ // Notify Firestore immediately so the web app shows "Offline" without waiting
1156
+ if (firebaseAuth.isAuthenticated()) {
1157
+ try {
1158
+ await webhookDispatcher.dispatch('agent_offline', {}, [{
1159
+ url: FIREBASE_WEBHOOK_URL,
1160
+ label: 'nightytidy.com',
1161
+ headers: firebaseAuth.getAuthHeader(),
1162
+ }]);
1163
+ } catch { /* best effort — don't block shutdown */ }
1164
+ }
1165
+
1154
1166
  poller.stop();
1155
1167
  scheduler.stopAll();
1156
1168
  await wsServer.stop();