@adhdev/daemon-core 0.8.81 → 0.8.82

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 (32) hide show
  1. package/dist/cli-adapters/provider-cli-adapter.d.ts +1 -0
  2. package/dist/cli-adapters/provider-cli-shared.d.ts +2 -0
  3. package/dist/config/recent-activity.d.ts +14 -0
  4. package/dist/config/state-store.d.ts +4 -0
  5. package/dist/index.js +232 -41
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +232 -41
  8. package/dist/index.mjs.map +1 -1
  9. package/dist/providers/acp-provider-instance.d.ts +0 -2
  10. package/dist/providers/cli-provider-instance.d.ts +2 -0
  11. package/dist/providers/provider-instance.d.ts +1 -1
  12. package/dist/shared-types.d.ts +1 -1
  13. package/dist/status/snapshot.d.ts +1 -0
  14. package/node_modules/@adhdev/session-host-core/package.json +1 -1
  15. package/package.json +1 -1
  16. package/src/cli-adapter-types.d.ts +2 -0
  17. package/src/cli-adapters/provider-cli-adapter.ts +14 -5
  18. package/src/cli-adapters/provider-cli-shared.d.ts +3 -4
  19. package/src/cli-adapters/provider-cli-shared.ts +2 -0
  20. package/src/commands/chat-commands.ts +8 -3
  21. package/src/commands/router.ts +59 -1
  22. package/src/config/recent-activity.ts +122 -0
  23. package/src/config/state-store.ts +16 -0
  24. package/src/logging/command-log.ts +2 -0
  25. package/src/providers/acp-provider-instance.ts +2 -17
  26. package/src/providers/cli-provider-instance.ts +32 -10
  27. package/src/providers/extension-provider-instance.ts +0 -2
  28. package/src/providers/ide-provider-instance.ts +0 -2
  29. package/src/providers/provider-instance.d.ts +1 -1
  30. package/src/providers/provider-instance.ts +1 -0
  31. package/src/shared-types.ts +3 -1
  32. package/src/status/snapshot.ts +18 -3
@@ -290,7 +290,9 @@ export type SessionCapability =
290
290
  | 'resize_terminal'
291
291
  | 'change_model'
292
292
  | 'set_mode'
293
- | 'set_thought_level';
293
+ | 'set_thought_level'
294
+ | 'delete_notification'
295
+ | 'mark_notification_unread';
294
296
 
295
297
  import type { RuntimeWriteOwner, RuntimeAttachedClient, SessionStatus } from './shared-types-extra.js';
296
298
  export type { RuntimeWriteOwner, RuntimeAttachedClient, SessionStatus } from './shared-types-extra.js';
@@ -9,7 +9,7 @@
9
9
  import * as os from 'os';
10
10
  import { loadConfig } from '../config/config.js';
11
11
  import { loadState } from '../config/state-store.js';
12
- import { getRecentActivity, getSessionSeenAt, getSessionSeenMarker } from '../config/recent-activity.js';
12
+ import { getRecentActivity, getSessionSeenAt, getSessionSeenMarker, getSessionNotificationDismissal, getSessionNotificationUnreadOverride, applySessionNotificationOverlay, getSessionCurrentNotificationId } from '../config/recent-activity.js';
13
13
  import { getWorkspaceState } from '../config/workspaces.js';
14
14
  import { getHostMemorySnapshot } from '../system/host-memory.js';
15
15
  import { getTerminalBackendRuntimeStatus } from '../cli-adapters/terminal-screen.js';
@@ -259,6 +259,8 @@ function getLastDisplayMessage(session: {
259
259
  return null;
260
260
  }
261
261
 
262
+ export { getSessionCurrentNotificationId, applySessionNotificationOverlay } from '../config/recent-activity.js';
263
+
262
264
  function getSessionMessageUpdatedAt(session: {
263
265
  activeChat?: {
264
266
  messages?: Array<{ receivedAt?: number | string; timestamp?: number | string }> | null
@@ -390,9 +392,22 @@ export function buildStatusSnapshot(options: StatusSnapshotOptions): StatusSnaps
390
392
  completionMarker,
391
393
  seenCompletionMarker,
392
394
  );
395
+ const { unread: overlayUnread, inboxBucket: overlayInboxBucket } = applySessionNotificationOverlay({
396
+ id: sourceSession.id,
397
+ providerSessionId: sourceSession.providerSessionId,
398
+ status: sourceSession.status,
399
+ unread,
400
+ inboxBucket,
401
+ lastMessageHash: sourceSession.lastMessageHash,
402
+ lastMessageAt: sourceSession.lastMessageAt,
403
+ lastUpdated: sourceSession.lastUpdated,
404
+ }, {
405
+ dismissedNotificationId: getSessionNotificationDismissal(state, sourceSession.id, sourceSession.providerSessionId),
406
+ unreadNotificationId: getSessionNotificationUnreadOverride(state, sourceSession.id, sourceSession.providerSessionId),
407
+ });
393
408
  session.lastSeenAt = lastSeenAt;
394
- session.unread = unread;
395
- session.inboxBucket = inboxBucket;
409
+ session.unread = overlayUnread;
410
+ session.inboxBucket = overlayInboxBucket;
396
411
  if (READ_DEBUG_ENABLED && (session.unread || session.inboxBucket !== 'idle' || session.providerType.includes('codex'))) {
397
412
  const recentReadSnapshot: RecentReadDebugSnapshot = {
398
413
  sessionId: session.id,