github-issue-tower-defence-management 1.148.25 → 1.149.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.
Files changed (63) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +4 -4
  3. package/bin/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.js +2 -1
  4. package/bin/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.js.map +1 -1
  5. package/bin/adapter/repositories/ConfigurableSilentSessionMessageComposer.js +1 -0
  6. package/bin/adapter/repositories/ConfigurableSilentSessionMessageComposer.js.map +1 -1
  7. package/bin/adapter/repositories/FileSystemKevReportWatermarkRepository.js +126 -0
  8. package/bin/adapter/repositories/FileSystemKevReportWatermarkRepository.js.map +1 -0
  9. package/bin/adapter/repositories/ProcessListSessionSubAgentActivityRepository.js +1 -0
  10. package/bin/adapter/repositories/ProcessListSessionSubAgentActivityRepository.js.map +1 -1
  11. package/bin/adapter/repositories/TranscriptSessionSubAgentActivityRepository.js +5 -3
  12. package/bin/adapter/repositories/TranscriptSessionSubAgentActivityRepository.js.map +1 -1
  13. package/bin/domain/entities/KevReportWatermark.js +3 -0
  14. package/bin/domain/entities/KevReportWatermark.js.map +1 -0
  15. package/bin/domain/usecases/DailySecurityScanUseCase.js +56 -7
  16. package/bin/domain/usecases/DailySecurityScanUseCase.js.map +1 -1
  17. package/bin/domain/usecases/DefaultSilentSessionMessageComposer.js +9 -0
  18. package/bin/domain/usecases/DefaultSilentSessionMessageComposer.js.map +1 -1
  19. package/bin/domain/usecases/NotifySilentLiveSessionsUseCase.js +12 -11
  20. package/bin/domain/usecases/NotifySilentLiveSessionsUseCase.js.map +1 -1
  21. package/bin/domain/usecases/adapter-interfaces/KevReportWatermarkRepository.js +3 -0
  22. package/bin/domain/usecases/adapter-interfaces/KevReportWatermarkRepository.js.map +1 -0
  23. package/package.json +1 -1
  24. package/src/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.ts +2 -0
  25. package/src/adapter/repositories/ConfigurableSilentSessionMessageComposer.test.ts +35 -0
  26. package/src/adapter/repositories/ConfigurableSilentSessionMessageComposer.ts +7 -0
  27. package/src/adapter/repositories/FileSystemKevReportWatermarkRepository.test.ts +253 -0
  28. package/src/adapter/repositories/FileSystemKevReportWatermarkRepository.ts +130 -0
  29. package/src/adapter/repositories/ProcessListSessionSubAgentActivityRepository.test.ts +2 -0
  30. package/src/adapter/repositories/ProcessListSessionSubAgentActivityRepository.ts +1 -0
  31. package/src/adapter/repositories/TranscriptOwnerCallStatusProvider.test.ts +3 -0
  32. package/src/adapter/repositories/TranscriptSessionSubAgentActivityRepository.test.ts +159 -0
  33. package/src/adapter/repositories/TranscriptSessionSubAgentActivityRepository.ts +7 -1
  34. package/src/domain/entities/KevReportWatermark.ts +4 -0
  35. package/src/domain/entities/LiveSessionActivitySnapshot.ts +1 -0
  36. package/src/domain/usecases/DailySecurityScanUseCase.test.ts +210 -0
  37. package/src/domain/usecases/DailySecurityScanUseCase.ts +84 -7
  38. package/src/domain/usecases/DefaultSilentSessionMessageComposer.test.ts +58 -1
  39. package/src/domain/usecases/DefaultSilentSessionMessageComposer.ts +21 -0
  40. package/src/domain/usecases/NotifySilentLiveSessionsUseCase.test.ts +146 -8
  41. package/src/domain/usecases/NotifySilentLiveSessionsUseCase.ts +19 -10
  42. package/src/domain/usecases/adapter-interfaces/KevReportWatermarkRepository.ts +11 -0
  43. package/src/domain/usecases/adapter-interfaces/SilentSessionMessageComposer.ts +3 -0
  44. package/types/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.d.ts.map +1 -1
  45. package/types/adapter/repositories/ConfigurableSilentSessionMessageComposer.d.ts +2 -0
  46. package/types/adapter/repositories/ConfigurableSilentSessionMessageComposer.d.ts.map +1 -1
  47. package/types/adapter/repositories/FileSystemKevReportWatermarkRepository.d.ts +10 -0
  48. package/types/adapter/repositories/FileSystemKevReportWatermarkRepository.d.ts.map +1 -0
  49. package/types/adapter/repositories/ProcessListSessionSubAgentActivityRepository.d.ts.map +1 -1
  50. package/types/adapter/repositories/TranscriptSessionSubAgentActivityRepository.d.ts.map +1 -1
  51. package/types/domain/entities/KevReportWatermark.d.ts +5 -0
  52. package/types/domain/entities/KevReportWatermark.d.ts.map +1 -0
  53. package/types/domain/entities/LiveSessionActivitySnapshot.d.ts +1 -0
  54. package/types/domain/entities/LiveSessionActivitySnapshot.d.ts.map +1 -1
  55. package/types/domain/usecases/DailySecurityScanUseCase.d.ts +3 -1
  56. package/types/domain/usecases/DailySecurityScanUseCase.d.ts.map +1 -1
  57. package/types/domain/usecases/DefaultSilentSessionMessageComposer.d.ts +2 -0
  58. package/types/domain/usecases/DefaultSilentSessionMessageComposer.d.ts.map +1 -1
  59. package/types/domain/usecases/NotifySilentLiveSessionsUseCase.d.ts.map +1 -1
  60. package/types/domain/usecases/adapter-interfaces/KevReportWatermarkRepository.d.ts +15 -0
  61. package/types/domain/usecases/adapter-interfaces/KevReportWatermarkRepository.d.ts.map +1 -0
  62. package/types/domain/usecases/adapter-interfaces/SilentSessionMessageComposer.d.ts +1 -0
  63. package/types/domain/usecases/adapter-interfaces/SilentSessionMessageComposer.d.ts.map +1 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ # [1.149.0](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/compare/v1.148.25...v1.149.0) (2026-08-13)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **DailySecurityScanUseCase:** select CISA KEV additions with a persisted watermark ([#1320](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/issues/1320)) ([cbac3aa](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/cbac3aa4e62721487c0a8b70738bce30ed772d6c))
7
+ * **silent-session-notification:** select the long-running sub-agent advisory on runtime alone ([#1313](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/issues/1313)) ([3331ff2](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/3331ff2d437ef784ef91c9136e0a0e4e857ca427)), closes [#1312](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/issues/1312)
8
+
9
+
10
+ ### Features
11
+
12
+ * **silent-session-notification:** remind a leader session when a finished subagent result is left unconsumed ([#1303](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/issues/1303)) ([3936631](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/39366318499a34cbf64b70203287e601403fa552))
13
+
1
14
  ## [1.148.25](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/compare/v1.148.24...v1.148.25) (2026-08-13)
2
15
 
3
16
 
package/README.md CHANGED
@@ -221,7 +221,7 @@ queryToAddProject?: string | null # Optional: GitHub search query string, used o
221
221
  dailySecurityScan?: # Optional: Run a daily OSV-Scanner security scan across locally cloned repositories of the org. Declared at the top level (sibling of startPreparation).
222
222
  scanBaseDirectory: string # Base directory searched (4 levels deep) for cloned repositories to scan
223
223
  targetHourUtc: number # UTC hour (0-23) at which the scan runs once per day; the scan runs only when a target date matches this hour at minute zero
224
- enableKevNvdReport?: boolean # Optional: When true, also report CISA KEV catalog additions since the previous day
224
+ enableKevNvdReport?: boolean # Optional: When true, also report CISA KEV catalog additions that have not been reported yet. A watermark recording the newest reported dateAdded, plus the CVE identifiers already reported on that date, is persisted at $XDG_CACHE_HOME/tdpm/kev-report-watermark.json (falling back to ~/.cache when XDG_CACHE_HOME is unset) and advanced over every addition the run considered, whether or not that addition matched a package the scan actually found and therefore produced a report issue. Only an addition whose CVE identifier matches a package the scan found at an installed version is written into the report issue. On the first run, when no watermark is stored yet, the additions dated on or after the day before the run are considered. Known limitations: (1) if the watermark write fails after the report issue was created, the failure is logged with the state file path and the cause, the run continues so that unrelated scheduled work is not aborted, and the same additions are considered again on the next run, so the guarantee is at-least-once at that boundary rather than exactly-once; (2) an addition whose dateAdded is strictly earlier than the stored watermark date, whether back-dated or published very late, is never selected again, so the protection covers late additions on the watermark date itself and not arbitrary lateness. When the stored watermark file exists but cannot be read or is malformed (including a stored date that is not a real calendar date in YYYY-MM-DD form), the KEV report is skipped for that run, an error naming the file and the cause is logged, the file is left untouched for inspection, and the rest of the scheduled work continues
225
225
  kevReportRepo?: string # Optional: Repository name (within org) where the CISA KEV additions issue is created. Required for KEV reporting
226
226
  ```
227
227
 
@@ -317,8 +317,8 @@ silentNotificationEnabled?: boolean # Optional: Master switch for the silent liv
317
317
  subAgentOutputRootDirectory?: string # Optional: Root directory holding one output file per sub-process (file name derived from the sub-process label). The modification time of each file is read to compute how long the sub-process output has been idle. When unset, sub-process idle time is reported as 0 and only the running-time threshold can trigger a sub-process notification
318
318
  subAgentProcessMatchPattern?: string # Optional: Regular expression matched against each process command line to discover the sub-processes that belong to a monitored session. The expression must define a named capture group `session` whose value equals the monitored session name, and may define a named capture group `label` used as the display name. When unset, the sub-process check is skipped
319
319
  ownerCallMarker?: string # Optional: Marker substring that identifies an assistant message asking the owner for a decision or confirmation. When set, the main-session stalled section is suppressed while a session's latest marker-bearing assistant message is newer (by full timestamp) than its latest genuine owner reply. A marker ending with `>` also matches its candidate form, produced by replacing that trailing `>` with `-pending>`, so a configured `<call-to-user>` matches both `<call-to-user>` and `<call-to-user-pending>`; any marker not ending with `>` matches only itself. When unset, no session is treated as waiting on the owner
320
- subAgentTranscriptRootDirectory?: string # Optional: Projects root directory (for example `~/.claude/projects`) under which each session's transcript is stored as `<cwd-slug>/<sessionId>.jsonl` and its sub-agent transcripts live in the sibling `<cwd-slug>/<sessionId>/subagents/` directory as one `agent-<id>.jsonl` file per sub-agent. Because the on-disk directory is keyed by the session's working-directory slug and session id rather than by the tmux session name, the sub-agent directory is derived from the already-resolved main-session transcript path (the `.jsonl` suffix is stripped and `subagents` is appended). A sub-agent is treated as finished and skipped when the last meaningful entry of its transcript is a completion or termination marker: an assistant message whose `stop_reason` is `end_turn` or `stop_sequence`, an assistant message whose final content block is `text` (a final answer returned to the parent, which Claude Code often writes with a `null` `stop_reason`), a user message whose final content block is `text` (a terminal user entry such as `[Request interrupted by user]`), a user message whose final content block is a `tool_result` (the tool call completed and no assistant turn followed, the shape a sub-agent leaves when it ends right after its last tool — including the final `StructuredOutput` result — or when its process is gone), or a user message with no content blocks. Only a sub-agent whose last entry is an assistant message with a pending `tool_use` block and no following tool result is still considered active; its idle time is computed from the transcript file modification time (following symlinks) and the running time from its first entry timestamp. An active sub-agent whose pending tool command matches a live host process is classified as waiting on that external process and is exempt from the idle threshold (a genuinely hung sub-agent whose matching process is absent is still flagged), and the running threshold announces once per crossing per label. When set, this transcript-based discovery is used instead of `subAgentProcessMatchPattern`. When unset, the process-match discovery is used
321
- subAgentRuntimeRootDirectory?: string # Optional: Runtime root directory (for example `/tmp/claude-<uid>`) under which the harness writes each session's positive running-sub-agent set as `<cwd-slug>/<sessionId>/running-subagents.txt`. Each non-blank line has the form `<agentId> <label-or-branch-or-URL>`; only the first whitespace-delimited token of the line is taken as the sub-agent id, and any remaining text on the line (a label, branch name, or pull request URL) is ignored. Blank and whitespace-only lines are skipped. When transcript-based discovery is used, this enables a positive process-liveness gate: a sub-agent whose id is absent from the running set has already exited, so its stale on-disk transcript is not flagged even when its tail is a plain in-flight `tool_result`. When this directory is unset it defaults to `<os-tmpdir>/claude-<uid>` (or is disabled on platforms without a numeric user id); when the directory or the running-set file cannot be read the gate is skipped (fail-open) and the terminal-status and completion-marker exclusions remain the sole guards
320
+ subAgentTranscriptRootDirectory?: string # Optional: Projects root directory (for example `~/.claude/projects`) under which each session's transcript is stored as `<cwd-slug>/<sessionId>.jsonl` and its sub-agent transcripts live in the sibling `<cwd-slug>/<sessionId>/subagents/` directory as one `agent-<id>.jsonl` file per sub-agent. Because the on-disk directory is keyed by the session's working-directory slug and session id rather than by the tmux session name, the sub-agent directory is derived from the already-resolved main-session transcript path (the `.jsonl` suffix is stripped and `subagents` is appended). A sub-agent is treated as finished when the last meaningful entry of its transcript is a completion or termination marker: an assistant message whose `stop_reason` is `end_turn` or `stop_sequence`, an assistant message whose final content block is `text` (a final answer returned to the parent, which Claude Code often writes with a `null` `stop_reason`), a user message whose final content block is `text` (a terminal user entry such as `[Request interrupted by user]`), a user message whose final content block is a `tool_result` (the tool call completed and no assistant turn followed, the shape a sub-agent leaves when it ends right after its last tool — including the final `StructuredOutput` result — or when its process is gone), or a user message with no content blocks. A finished sub-agent is skipped only when it is no longer listed in the harness running-sub-agent set (`subAgentRuntimeRootDirectory`), or when that set cannot be read at all; a finished sub-agent the running set still lists is kept and reported as an unconsumed result, because the leader clears its record line once it has acted on the completion. Only a sub-agent whose last entry is an assistant message with a pending `tool_use` block and no following tool result is still considered active; its idle time is computed from the transcript file modification time (following symlinks) and the running time from its first entry timestamp. An active sub-agent whose pending tool command matches a live host process is classified as waiting on that external process and is exempt from the idle threshold (a genuinely hung sub-agent whose matching process is absent is still flagged), and the running threshold announces once per crossing per label. When set, this transcript-based discovery is used instead of `subAgentProcessMatchPattern`. When unset, the process-match discovery is used
321
+ subAgentRuntimeRootDirectory?: string # Optional: Runtime root directory (for example `/tmp/claude-<uid>`) under which the harness writes each session's positive running-sub-agent set as `<cwd-slug>/<sessionId>/running-subagents.txt`. Each non-blank line has the form `<agentId> <label-or-branch-or-URL>`; only the first whitespace-delimited token of the line is taken as the sub-agent id, and any remaining text on the line (a label, branch name, or pull request URL) is ignored. Blank and whitespace-only lines are skipped. When transcript-based discovery is used, this enables a positive process-liveness gate: a sub-agent whose id is absent from the running set has already exited, so its stale on-disk transcript is not flagged even when its tail is a plain in-flight `tool_result`. Membership in the running set is also what distinguishes a consumed completion from an unconsumed one: a finished sub-agent the set still lists is reported as an unconsumed result and drives the unconsumed-result reminder section, while one absent from the set is dropped. When this directory is unset it defaults to `<os-tmpdir>/claude-<uid>` (or is disabled on platforms without a numeric user id); when the directory or the running-set file cannot be read the gate is skipped (fail-open) and the terminal-status and completion-marker exclusions remain the sole guards
322
322
  mainSilentThresholdSeconds?: number # Optional: Seconds of main-session output silence after which the main-session self-check section is sent. Default 600
323
323
  unansweredOwnerCallGraceSeconds?: number # Optional: Retained only for backward compatibility of the configuration surface and no longer consulted. An unanswered owner call now suppresses the main-session stalled section unconditionally, with no age or grace expiry, so no value of this key changes any behaviour. Default 3600
324
324
  subAgentSilentThresholdSeconds?: number # Optional: Seconds of sub-process output silence after which the sub-process section is sent. Default 300
@@ -609,7 +609,7 @@ The main-session stalled section is sent when the session's main output has been
609
609
 
610
610
  The waiting-on-the-owner suppression is unconditional: whenever the session's latest owner call is newer than its latest genuine owner reply, the main-session stalled section is suppressed with no age or grace expiry, because the persistent unread indicator in the owner's app already covers a missed call. `unansweredOwnerCallGraceSeconds` (default 3600) is retained only for backward compatibility of the configuration surface and is no longer consulted, so the stale-owner-call reminder variant and its `silentMainStalledStaleOwnerCallMessage` override are currently never composed. The transcript-based owner-call detection still exposes the epoch timestamp of the latest unanswered owner call per session.
611
611
 
612
- The sub-process section is sent, regardless of main output, when at least one sub-process of the session has been output-idle for `subAgentSilentThresholdSeconds` or has been running for `subAgentRunningThresholdSeconds`. It is composed of up to two distinct messages, one per condition: an idle message that lists each sub-process that produced no output for at least `subAgentSilentThresholdSeconds` with its no-output minutes, tells the agent to treat that system-detected idle duration as the authoritative signal rather than re-deriving whether the sub-process is alive, forbids dismissing the signal from speculation, and requires the agent to determine the cause by a concrete check (whether there is genuinely no recent activity anywhere, including a very recent push or commit or output from nested sub-processes it started, versus being legitimately blocked on an external dependency such as a continuous-integration run, an external API, or another process), to act if stuck or state the waiting conclusion with concrete evidence if waiting, and to output that investigation result into the session as a log even though owner notification is not required, and a long-running message that lists each sub-process that has been running for at least `subAgentRunningThresholdSeconds` with its running minutes and asks the agent to verify it is genuinely advancing rather than caught in an infinite loop, a task that is too large, or a stuck approach. The long-running message foregrounds the running duration and does not surface the short idle time, so a sub-process flagged only for running long is not dismissed because its silent time looks small; a sub-process that matches both conditions appears in both messages. The long-running threshold is overridable per project via `subAgentRunningThresholdSeconds` (default 900 seconds) for repositories whose continuous integration legitimately runs longer. Sub-processes are discovered in one of two ways: when `subAgentTranscriptRootDirectory` is configured, each session's `subagents/agent-<id>.jsonl` transcripts are scanned. The sub-agent directory is the `subagents/` directory that sits next to the session's already-resolved main-session transcript file under `projects/<cwd-slug>/<sessionId>/subagents/`, derived by stripping the `.jsonl` suffix from the main-session transcript path and appending `subagents`; this on-disk path is keyed by the session's working-directory slug and session id, not by the tmux session name. Finished sub-agents are skipped, determined from the last meaningful transcript entry rather than from the last non-null `stop_reason` seen anywhere in the file. A sub-agent is treated as finished when its last entry is a completion or termination marker: an assistant message whose `stop_reason` is `end_turn` or `stop_sequence`, an assistant message whose final content block is `text` (a final answer returned to the parent, which Claude Code often writes with a `null` `stop_reason`), a user message whose final content block is `text` (a terminal user entry such as `[Request interrupted by user]`), a user message whose final content block is a `tool_result`, or a user message with no content blocks. The `tool_result` and empty-user terminal shapes are the ones a sub-agent leaves when it ends right after its last tool call completes — for example the `tool_result` of the final `StructuredOutput` call a sub-agent uses to return its result, the launch acknowledgement of a background command, or any other tool whose result is written but no assistant turn follows because the sub-agent's process is gone (killed, crashed, or token-exhausted). Recognizing these shapes as terminal is what lets a marker-less dead transcript be excluded by the completion signal itself rather than by an age cap. Only a sub-agent whose last entry is an assistant message with a pending `tool_use` block and no following tool result is still considered active and subject to the idle and running thresholds; this is the genuinely-incomplete shape — the sub-agent requested a tool that never returned and is hung mid-work. Idle time is taken from the transcript file modification time (following symlinks) while running time is taken from its first entry timestamp. Beyond the completion-or-termination marker at the end of the transcript, finished sub-agents are also excluded by two positive signals: a parent-transcript task notification whose `<status>` is a terminal value (`completed`, `killed`, `stopped`, or `failed`) drops every `<task-id>` it lists, and, when `subAgentRuntimeRootDirectory` is configured, a process-liveness gate drops any sub-agent id absent from the harness running set (`running-subagents.txt`); the gate is skipped (fail-open) when the running set cannot be read, leaving the terminal-status and completion-marker exclusions as the sole guards. There is no age cap: a sub-agent that is past the idle or running threshold and does not end in a completion or termination marker is flagged regardless of how long it has been silent, so a genuinely-stuck sub-agent that has been hung on a pending tool call for hours or days is still reported instead of being silently dropped. Otherwise sub-processes are discovered by matching `subAgentProcessMatchPattern` against process command lines. Because a sub-agent inside a single blocking call (for example a continuous-integration watch) is otherwise indistinguishable from a hung one, the transcript-based discovery additionally judges the sub-agent's actual wait state instead of applying any time-window suppression. A sub-agent whose transcript tail is an in-flight tool call — the last entry is an assistant tool-use with no following tool result — carrying a command string is classified as WAITING when a live process matching that command exists on the host: each pending tool command is normalized (whitespace collapsed, first 60 characters) and searched as a substring of the normalized host process command lines (`ps -eo etimes=,args=`, supplied through the injectable process lister). A WAITING sub-agent never produces an idle (no-output) reminder, no matter how long its transcript has been silent. A sub-agent whose in-flight tool call has no matching live process is genuinely hung and its session is re-selected as a candidate on every qualifying cycle. A session that stays a candidate is re-injected on every qualifying cycle: there is no per-episode cap, so a session with a persistent sub-process advisory, and a session whose main output stays silent, are both reminded again each cycle until the condition clears. Main-session stall detection behavior is otherwise unchanged.
612
+ The sub-process section is sent, regardless of main output, when at least one sub-process of the session has been output-idle for `subAgentSilentThresholdSeconds`, has been running for `subAgentRunningThresholdSeconds`, or has finished while its result stayed unconsumed for `subAgentSilentThresholdSeconds`. It is composed of up to three distinct messages, one per condition: an idle message that lists each sub-process that produced no output for at least `subAgentSilentThresholdSeconds` with its no-output minutes, tells the agent to treat that system-detected idle duration as the authoritative signal rather than re-deriving whether the sub-process is alive, forbids dismissing the signal from speculation, and requires the agent to determine the cause by a concrete check (whether there is genuinely no recent activity anywhere, including a very recent push or commit or output from nested sub-processes it started, versus being legitimately blocked on an external dependency such as a continuous-integration run, an external API, or another process), to act if stuck or state the waiting conclusion with concrete evidence if waiting, and to output that investigation result into the session as a log even though owner notification is not required, and a long-running message that lists each sub-process that has been running for at least `subAgentRunningThresholdSeconds` with its running minutes and asks the agent to verify it is genuinely advancing rather than caught in an infinite loop, a task that is too large, or a stuck approach. The long-running message foregrounds the running duration and does not surface the short idle time, so a sub-process flagged only for running long is not dismissed because its silent time looks small; a sub-process that matches both conditions appears in both messages. The long-running threshold is overridable per project via `subAgentRunningThresholdSeconds` (default 900 seconds) for repositories whose continuous integration legitimately runs longer. The third message is the unconsumed-result message: it lists each finished sub-process whose result has been waiting unread for at least `subAgentSilentThresholdSeconds` with the whole minutes it has been waiting, and asks the agent to read that result, act on it, and then mark the sub-process finished so it is no longer tracked as running. A finished sub-process is recognized as unconsumed while it is still listed in the harness running set, because the leader removes that record line once it has acted on the completion, and its waiting time is the age of the last transcript write. This condition is evaluated independently of main-session silence, so a leader that keeps producing output while a finished sub-process result sits unread is still reminded. A finished sub-process never appears in the idle or long-running messages; those two remain restricted to sub-processes that are still working. Sub-processes are discovered in one of two ways: when `subAgentTranscriptRootDirectory` is configured, each session's `subagents/agent-<id>.jsonl` transcripts are scanned. The sub-agent directory is the `subagents/` directory that sits next to the session's already-resolved main-session transcript file under `projects/<cwd-slug>/<sessionId>/subagents/`, derived by stripping the `.jsonl` suffix from the main-session transcript path and appending `subagents`; this on-disk path is keyed by the session's working-directory slug and session id, not by the tmux session name. Whether a sub-agent has finished is determined from the last meaningful transcript entry rather than from the last non-null `stop_reason` seen anywhere in the file. A sub-agent is treated as finished when its last entry is a completion or termination marker: an assistant message whose `stop_reason` is `end_turn` or `stop_sequence`, an assistant message whose final content block is `text` (a final answer returned to the parent, which Claude Code often writes with a `null` `stop_reason`), a user message whose final content block is `text` (a terminal user entry such as `[Request interrupted by user]`), a user message whose final content block is a `tool_result`, or a user message with no content blocks. The `tool_result` and empty-user terminal shapes are the ones a sub-agent leaves when it ends right after its last tool call completes — for example the `tool_result` of the final `StructuredOutput` call a sub-agent uses to return its result, the launch acknowledgement of a background command, or any other tool whose result is written but no assistant turn follows because the sub-agent's process is gone (killed, crashed, or token-exhausted). Recognizing these shapes as terminal is what lets a marker-less dead transcript be excluded by the completion signal itself rather than by an age cap. Only a sub-agent whose last entry is an assistant message with a pending `tool_use` block and no following tool result is still considered active and subject to the idle and running thresholds; this is the genuinely-incomplete shape — the sub-agent requested a tool that never returned and is hung mid-work. Idle time is taken from the transcript file modification time (following symlinks) while running time is taken from its first entry timestamp. Two positive signals drop a sub-agent outright: a parent-transcript task notification whose `<status>` is a terminal value (`completed`, `killed`, `stopped`, or `failed`) drops every `<task-id>` it lists, and, when `subAgentRuntimeRootDirectory` is configured, a process-liveness gate drops any sub-agent id absent from the harness running set (`running-subagents.txt`). A sub-agent that survives both signals and whose transcript ends in a completion or termination marker is the unconsumed-result case: it is still listed in the running set, so it is retained and reported with its completion state and the age of its last transcript write instead of being discarded, which is what lets the unconsumed-result message be composed. When the running set cannot be read at all, the completion marker alone excludes the sub-agent, because an unconsumed result cannot be distinguished from an already-cleared one without that set. There is no age cap: a sub-agent that is past the idle or running threshold and does not end in a completion or termination marker is flagged regardless of how long it has been silent, so a genuinely-stuck sub-agent that has been hung on a pending tool call for hours or days is still reported instead of being silently dropped. Otherwise sub-processes are discovered by matching `subAgentProcessMatchPattern` against process command lines. Because a sub-agent inside a single blocking call (for example a continuous-integration watch) is otherwise indistinguishable from a hung one, the transcript-based discovery additionally judges the sub-agent's actual wait state instead of applying any time-window suppression. A sub-agent whose transcript tail is an in-flight tool call — the last entry is an assistant tool-use with no following tool result — carrying a command string is classified as WAITING when a live process matching that command exists on the host: each pending tool command is normalized (whitespace collapsed, first 60 characters) and searched as a substring of the normalized host process command lines (`ps -eo etimes=,args=`, supplied through the injectable process lister). A WAITING sub-agent never produces an idle (no-output) reminder, no matter how long its transcript has been silent. The long-running message is selected on elapsed running time alone and is not affected by either signal: a sub-process that keeps producing output, and a sub-process classified as WAITING on a live external process, are both still reported once they pass `subAgentRunningThresholdSeconds`, because producing output and waiting on a long external command are exactly the states a genuinely long-running sub-process is normally in. This selection is also independent of whether the main session is silent, so a leader that is actively working is still told how long each of its sub-processes has been running. A sub-agent whose in-flight tool call has no matching live process is genuinely hung and its session is re-selected as a candidate on every qualifying cycle. A session that stays a candidate is re-injected on every qualifying cycle: there is no per-episode cap, so a session with a persistent sub-process advisory, and a session whose main output stays silent, are both reminded again each cycle until the condition clears. Main-session stall detection behavior is otherwise unchanged.
613
613
 
614
614
  A two-consecutive-cycle debounce guards against transient false positives: a session is notified only when it meets the silent-target condition (output silent at or beyond the threshold and not waiting on the owner) in the current cycle and it was also a notification candidate in the immediately previous cycle. The set of candidate session names is persisted across cycles, keyed by the globally-unique session name, in a state file written atomically (the default path is `${XDG_CACHE_HOME:-~/.cache}/tdpm/silent-session-candidates.json`, overridable via `candidateDebounceStateFilePath`). The monitor runs as a fresh process each schedule cycle, so this on-disk state is what carries the previous cycle's candidate set forward. Each cycle loads the candidate set recorded within `candidateDebounceRecencyWindowSeconds` of now (default 900, a small multiple of the schedule interval to tolerate interval jitter), then records the current candidate set with the current timestamp; entries that age past the retention window are dropped on the next save, and a save merges with other recently-recorded session names so concurrent per-project runs do not clobber each other. A candidate that appears for only one isolated cycle — for example because the owner's reply has not yet been flushed to the transcript when the monitor reads it, or because a transient hub-task status resolution error fails open for a single cycle — is therefore deferred and never notified, while a genuine stall that persists across cycles is still caught, one cycle later. Because silence is measured from the latest transcript entry of any type — including the monitor's own injected reminder and the owner's reply — a notified session's measured silence resets as soon as it produces any activity, so a session that has resumed is not re-flagged. When more than one session is notified in the same cycle, the sends are spaced out sequentially with `silentNotificationStaggerSeconds` between consecutive sends (no wait before the first or after the last) so the targets are not all triggered at once. When `activeHubTaskStatus` is configured, each notification is gated on the latest GitHub state and Project Status of the session's hub task: a session whose name identifies a github.com issue or pull request — accepted both as a clean `https://github.com/{owner}/{repo}/issues/{N}` URL and as the real tmux session-name form `https_//github_com/{owner}/{repo}/issues/{N}` produced by replacing `.` and `:` with `_` (the `pull` path is accepted in both forms too) — is notified only while that hub task is open and in the configured active Status, so a session whose hub task has been closed, merged, or moved to another Status (for example Done) is suppressed; sessions whose name does not identify a github.com issue or pull request are never gated. To cut GitHub query load and remove most fail-opens, each resolved status is cached by issue URL in a state file written atomically (the default path is `${XDG_CACHE_HOME:-~/.cache}/tdpm/silent-session-hub-task-status.json`, overridable via `hubTaskStatusCacheStateFilePath`). On each cycle the gate reads the cache first: a cached entry recorded within `hubTaskStatusCacheTtlSeconds` of now (default 300) decides the gate without any GitHub query, and otherwise the hub task is re-resolved and the result written back to the cache. When live resolution fails — the resolver returns no tracked task (a closed or Done issue filtered out of the active project), or a transient API error is thrown — the gate falls back to the cached status even after it has expired: a cached active entry keeps the notification (still notified if genuinely stalled) and a cached closed or non-active entry suppresses it, each logged with a distinct warning. Only when there is no cached status at all and live resolution fails does the gate fail open once (a closed issue and a transient error are indistinguishable in that case without an extra network call), logging a distinct warning, so the next cycle can populate the cache. When `activeHubTaskStatus` is unset, this hub-task check is a no-op. Process-snapshot collection, transcript resolution, owner-call detection, the wait between sends, and the message wording are all performed through injectable ports, so the logic is unit-testable without touching the host, and the host-specific process and environment access, sub-process pattern, and message wording are supplied through adapters or configuration. When `silentNotificationEnabled` is not true the step is a no-op, and any error during the step is logged and swallowed so the schedule cycle is never affected.
615
615
 
@@ -60,6 +60,7 @@ const ProjectRequiredFieldCreateUseCase_1 = require("../../../domain/usecases/Pr
60
60
  const SetupTowerDefenceProjectUseCase_1 = require("../../../domain/usecases/SetupTowerDefenceProjectUseCase");
61
61
  const DailySecurityScanUseCase_1 = require("../../../domain/usecases/DailySecurityScanUseCase");
62
62
  const KyHttpRepository_1 = require("../../repositories/KyHttpRepository");
63
+ const FileSystemKevReportWatermarkRepository_1 = require("../../repositories/FileSystemKevReportWatermarkRepository");
63
64
  const WorkflowStatus_1 = require("../../../domain/entities/WorkflowStatus");
64
65
  const DEFAULT_DASHBOARD_DATA_DIR = null;
65
66
  const readSilentSeconds = (configValue, envValue, defaultValue) => {
@@ -236,7 +237,7 @@ class HandleScheduledEventUseCaseHandler {
236
237
  const revertOrphanedPreparationUseCase = new RevertOrphanedPreparationUseCase_1.RevertOrphanedPreparationUseCase(projectRepository, issueRepository, issueCommentRepository, nodeLocalCommandRunner);
237
238
  const revertNotReadyReviewQueueIssueUseCase = new RevertNotReadyReviewQueueIssueUseCase_1.RevertNotReadyReviewQueueIssueUseCase(projectRepository, issueRepository, issueCommentRepository);
238
239
  const dailySecurityScanUseCase = mergedInput.dailySecurityScan
239
- ? new DailySecurityScanUseCase_1.DailySecurityScanUseCase(nodeLocalCommandRunner, issueRepository, new KyHttpRepository_1.KyHttpRepository())
240
+ ? new DailySecurityScanUseCase_1.DailySecurityScanUseCase(nodeLocalCommandRunner, issueRepository, new KyHttpRepository_1.KyHttpRepository(), new FileSystemKevReportWatermarkRepository_1.FileSystemKevReportWatermarkRepository())
240
241
  : null;
241
242
  const handleScheduledEventUseCase = new HandleScheduledEventUseCase_1.HandleScheduledEventUseCase(projectRequiredFieldCreateUseCase, setupTowerDefenceProjectUseCase, actionAnnouncement, setWorkflowManagementIssueToStoryUseCase, clearPastNextActionUseCase, analyzeProblemByIssueUseCase, analyzeStoriesUseCase, clearDependedIssueURLUseCase, setDependedIssueUrlForOpenTaskPRsUseCase, staleTaskPullRequestCloseUseCase, createEstimationIssueUseCase, convertCheckboxToIssueInStoryIssueUseCase, changeStatusByStoryColorUseCase, setNoStoryIssueToStoryUseCase, createNewStoryByLabel, assignNoAssigneeIssueToManagerUseCase, updateIssueStatusByLabelUseCase, startPreparationUseCase, revertOrphanedPreparationUseCase, revertNotReadyReviewQueueIssueUseCase, updateRateLimitCacheUseCase, dailySecurityScanUseCase, systemDateRepository, googleSpreadsheetRepository, projectRepository, issueRepository);
242
243
  const result = await handleScheduledEventUseCase.run(mergedInput);
@@ -1 +1 @@
1
- {"version":3,"file":"HandleScheduledEventUseCaseHandler.js","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AACxB,4CAAoB;AACpB,4CAAoB;AACpB,gDAAwB;AACxB,+DAA2D;AAC3D,6DAG8B;AAC9B,6DAAyD;AACzD,+DAA2D;AAC3D,2DAAuD;AACvD,uEAAmE;AACnE,qFAAkF;AAClF,uEAA0E;AAC1E,uEAAmE;A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AC7C,OAAO,CAAC,GAAG,CAAC,yCAAyC,EACrD,6EAA8C,CAAC,eAAe,CAC/D;wBACD,qBAAqB,EACnB,WAAW,CAAC,uCAAuC;4BACnD,OAAO,CAAC,GAAG,CAAC,iDAAiD;4BAC7D,IAAI;wBACN,GAAG,EAAE,SAAS;qBACf,CAAC,CAAC;gBACL,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,OAAO,CAAC,KAAK,CACX,8CACE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CACvD,EAAE,CACH,CAAC;gBACJ,CAAC;YACH,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC;IACJ,CAAC;CAAA;AA/wBD,gFA+wBC"}
1
+ {"version":3,"file":"HandleScheduledEventUseCaseHandler.js","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AACxB,4CAAoB;AACpB,4CAAoB;AACpB,gDAAwB;AACxB,+DAA2D;AAC3D,6DAG8B;AAC9B,6DAAyD;AACzD,+DAA2D;AAC3D,2DAAuD;AACvD,uEAAmE;AACnE,qFAAkF;AAClF,uEAA0E;AAC1E,uEAAmE;AACnE,yEAGoC;AACpC,yFAAsF;AACtF,iFAGwC;AACxC,uEAAmE;AACnE,wDAG8B;AAC9B,kFAA+E;AAC/E,sFAAmF;AACnF,gGAA6F;AAC7F,0FAAuF;AACvF,wFAAqF;AACrF,sFAAmF;AACnF,wGAAqG;AACrG,8GAA2G;AAC3G,sGAAmG;AACnG,gGAA6F;AAC7F,kGAA+F;AAC/F,gIAA6H;AAC7H,oHAAiH;AACjH,wGAAqG;AAIrG,0FAAuF;AACvF,wGAAqG;AACrG,gIAA6H;AAC7H,gHAA6G;AAC7G,wGAAqG;AACrG,kIAA+H;AAC/H,8GAA2G;AAC3G,0GAAuG;AACvG,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AAC,KAAK,CACvD,EAAE,CACH,CAAC;gBACJ,CAAC;YACH,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC;IACJ,CAAC;CAAA;AAhxBD,gFAgxBC"}
@@ -53,6 +53,7 @@ class ConfigurableSilentSessionMessageComposer {
53
53
  }
54
54
  return withReminderSentinel(sections.join('\n\n'));
55
55
  };
56
+ this.composeSubAgentUnconsumedResultSection = (unconsumedResultSubAgents) => this.fallback.composeSubAgentUnconsumedResultSection(unconsumedResultSubAgents);
56
57
  this.composeIdleSection = (idleSubAgents, header, footer) => {
57
58
  const lines = idleSubAgents.map((subAgent) => `- ${subAgent.label}: no output for ${formatMinutes(subAgent.silentSeconds)}`);
58
59
  const parts = [];
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigurableSilentSessionMessageComposer.js","sourceRoot":"","sources":["../../../src/adapter/repositories/ConfigurableSilentSessionMessageComposer.ts"],"names":[],"mappings":";;;AACA,mHAA2G;AAK3G,uGAAuG;AAEvG,MAAM,oBAAoB,GAAG,CAAC,OAAe,EAAU,EAAE,CACvD,OAAO,CAAC,QAAQ,CAAC,gEAAgC,CAAC;IAChD,CAAC,CAAC,OAAO;IACT,CAAC,CAAC,GAAG,gEAAgC,IAAI,OAAO,EAAE,CAAC;AAWvD,MAAM,aAAa,GAAG,CAAC,OAAe,EAAU,EAAE;IAChD,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;IACzC,OAAO,GAAG,OAAO,GAAG,CAAC;AACvB,CAAC,CAAC;AAEF,MAAa,wCAAwC;IACnD,YACmB,SAAwC,EACxC,QAAsC;QADtC,cAAS,GAAT,SAAS,CAA+B;QACxC,aAAQ,GAAR,QAAQ,CAA8B;QAGzD,8BAAyB,GAAG,CAAC,iBAAyB,EAAU,EAAE;YAChE,IAAI,IAAI,CAAC,SAAS,CAAC,kBAAkB,KAAK,IAAI,EAAE,CAAC;gBAC/C,OAAO,IAAI,CAAC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,IAAI,EAAE,CAAC;gBACpB,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACrB,CAAC;YACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1B,CAAC,CAAC;QAEM,8BAAyB,GAAG,CAClC,oBAAwC,EACxC,MAAqB,EACrB,MAAqB,EACb,EAAE;YACV,MAAM,KAAK,GAAG,oBAAoB,CAAC,GAAG,CACpC,CAAC,QAAQ,EAAE,EAAE,CACX,KAAK,QAAQ,CAAC,KAAK,iBAAiB,aAAa,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,CAC/E,CAAC;YACF,MAAM,KAAK,GAAa,EAAE,CAAC;YAC3B,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;gBACpB,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACrB,CAAC;YACD,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;YACrB,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;gBACpB,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACrB,CAAC;YACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1B,CAAC,CAAC;IA5GC,CAAC;CA6GL;AAjHD,4FAiHC"}
1
+ {"version":3,"file":"ConfigurableSilentSessionMessageComposer.js","sourceRoot":"","sources":["../../../src/adapter/repositories/ConfigurableSilentSessionMessageComposer.ts"],"names":[],"mappings":";;;AACA,mHAA2G;AAK3G,uGAAuG;AAEvG,MAAM,oBAAoB,GAAG,CAAC,OAAe,EAAU,EAAE,CACvD,OAAO,CAAC,QAAQ,CAAC,gEAAgC,CAAC;IAChD,CAAC,CAAC,OAAO;IACT,CAAC,CAAC,GAAG,gEAAgC,IAAI,OAAO,EAAE,CAAC;AAWvD,MAAM,aAAa,GAAG,CAAC,OAAe,EAAU,EAAE;IAChD,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG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xHD,4FAwHC"}
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.FileSystemKevReportWatermarkRepository = void 0;
37
+ const fs = __importStar(require("fs"));
38
+ const os = __importStar(require("os"));
39
+ const path = __importStar(require("path"));
40
+ const isRecord = (value) => typeof value === 'object' && value !== null && !Array.isArray(value);
41
+ const errorCode = (error) => {
42
+ if (!isRecord(error)) {
43
+ return null;
44
+ }
45
+ const code = error.code;
46
+ return typeof code === 'string' ? code : null;
47
+ };
48
+ const isCalendarYmd = (value) => {
49
+ if (!/^\d{4}-\d{2}-\d{2}$/.test(value)) {
50
+ return false;
51
+ }
52
+ const parsed = new Date(`${value}T00:00:00.000Z`);
53
+ return (!Number.isNaN(parsed.getTime()) &&
54
+ parsed.toISOString().slice(0, 10) === value);
55
+ };
56
+ const defaultStateFilePath = () => {
57
+ const base = process.env.XDG_CACHE_HOME ?? path.join(os.homedir(), '.cache');
58
+ return path.join(base, 'tdpm', 'kev-report-watermark.json');
59
+ };
60
+ class FileSystemKevReportWatermarkRepository {
61
+ constructor(stateFilePath = defaultStateFilePath()) {
62
+ this.stateFilePath = stateFilePath;
63
+ this.load = async () => {
64
+ let raw;
65
+ try {
66
+ raw = fs.readFileSync(this.stateFilePath, 'utf8');
67
+ }
68
+ catch (error) {
69
+ if (errorCode(error) === 'ENOENT') {
70
+ return { type: 'absent' };
71
+ }
72
+ return this.unreadable(`the stored watermark file could not be read (${String(error)})`);
73
+ }
74
+ let parsed;
75
+ try {
76
+ parsed = JSON.parse(raw);
77
+ }
78
+ catch (error) {
79
+ return this.unreadable(`the stored watermark file does not contain valid JSON (${String(error)})`);
80
+ }
81
+ if (!isRecord(parsed)) {
82
+ return this.unreadable('the stored watermark file does not contain a JSON object');
83
+ }
84
+ const lastReportedDateAdded = parsed.lastReportedDateAdded;
85
+ if (typeof lastReportedDateAdded !== 'string') {
86
+ return this.unreadable(`the stored lastReportedDateAdded is not a string (${JSON.stringify(lastReportedDateAdded)})`);
87
+ }
88
+ if (!isCalendarYmd(lastReportedDateAdded)) {
89
+ return this.unreadable(`the stored lastReportedDateAdded is not a calendar date in YYYY-MM-DD form (${JSON.stringify(lastReportedDateAdded)})`);
90
+ }
91
+ const reportedCveIdsOnLastReportedDateAdded = parsed.reportedCveIdsOnLastReportedDateAdded;
92
+ if (!Array.isArray(reportedCveIdsOnLastReportedDateAdded)) {
93
+ return this.unreadable('the stored reportedCveIdsOnLastReportedDateAdded is not an array');
94
+ }
95
+ if (!reportedCveIdsOnLastReportedDateAdded.every((cveId) => typeof cveId === 'string')) {
96
+ return this.unreadable('the stored reportedCveIdsOnLastReportedDateAdded contains a non-string entry');
97
+ }
98
+ return {
99
+ type: 'stored',
100
+ watermark: {
101
+ lastReportedDateAdded,
102
+ reportedCveIdsOnLastReportedDateAdded: reportedCveIdsOnLastReportedDateAdded,
103
+ },
104
+ };
105
+ };
106
+ this.save = async (watermark) => {
107
+ try {
108
+ const directory = path.dirname(this.stateFilePath);
109
+ fs.mkdirSync(directory, { recursive: true });
110
+ const temporaryPath = `${this.stateFilePath}.${process.pid}.tmp`;
111
+ fs.writeFileSync(temporaryPath, JSON.stringify(watermark));
112
+ fs.renameSync(temporaryPath, this.stateFilePath);
113
+ }
114
+ catch (error) {
115
+ console.error(`Unable to write the KEV report watermark to ${this.stateFilePath}: ${String(error)}`);
116
+ throw error;
117
+ }
118
+ };
119
+ this.unreadable = (reason) => {
120
+ console.error(`Unable to use the KEV report watermark stored at ${this.stateFilePath}: ${reason}. The file is left untouched for inspection.`);
121
+ return { type: 'unreadable', reason };
122
+ };
123
+ }
124
+ }
125
+ exports.FileSystemKevReportWatermarkRepository = FileSystemKevReportWatermarkRepository;
126
+ //# sourceMappingURL=FileSystemKevReportWatermarkRepository.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileSystemKevReportWatermarkRepository.js","sourceRoot":"","sources":["../../../src/adapter/repositories/FileSystemKevReportWatermarkRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,uCAAyB;AACzB,2CAA6B;AAO7B,MAAM,QAAQ,GAAG,CAAC,KAAc,EAAoC,EAAE,CACpE,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAEvE,MAAM,SAAS,GAAG,CAAC,KAAc,EAAiB,EAAE;IAClD,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAA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pB,8EAA8E,CAC/E,CAAC;YACJ,CAAC;YAED,OAAO;gBACL,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE;oBACT,qBAAqB;oBACrB,qCAAqC,EACnC,qCAAqC;iBACxC;aACF,CAAC;QACJ,CAAC,CAAC;QAEF,SAAI,GAAG,KAAK,EAAE,SAA6B,EAAiB,EAAE;YAC5D,IAAI,CAAC;gBACH,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;gBACnD,EAAE,CAAC,SAAS,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;gBAC7C,MAAM,aAAa,GAAG,GAAG,IAAI,CAAC,aAAa,IAAI,OAAO,CAAC,GAAG,MAAM,CAAC;gBACjE,EAAE,CAAC,aAAa,CAAC,aAAa,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;gBAC3D,EAAE,CAAC,UAAU,CAAC,aAAa,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;YACnD,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,CAAC,KAAK,CACX,+CAA+C,IAAI,CAAC,aAAa,KAAK,MAAM,CAAC,KAAK,CAAC,EAAE,CACtF,CAAC;gBACF,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC,CAAC;QAEM,eAAU,GAAG,CAAC,MAAc,EAAgC,EAAE;YACpE,OAAO,CAAC,KAAK,CACX,oDAAoD,IAAI,CAAC,aAAa,KAAK,MAAM,8CAA8C,CAChI,CAAC;YACF,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC;QACxC,CAAC,CAAC;IAzFC,CAAC;CA0FL;AA7FD,wFA6FC"}
@@ -28,6 +28,7 @@ class ProcessListSessionSubAgentActivityRepository {
28
28
  silentSeconds: this.silentSecondsResolver.resolveSilentSeconds(label),
29
29
  runningSeconds: process.elapsedSeconds,
30
30
  waitingOnExternalProcess: false,
31
+ finishedResultUnconsumed: false,
31
32
  };
32
33
  const existing = result.get(sessionName);
33
34
  if (existing === undefined) {
@@ -1 +1 @@
1
- {"version":3,"file":"ProcessListSessionSubAgentActivityRepository.js","sourceRoot":"","sources":["../../../src/adapter/repositories/ProcessListSessionSubAgentActivityRepository.ts"],"names":[],"mappings":";;;AAKA,MAAa,4CAA4C;IAGvD,YACE,YAA2B,EACV,aAAoC,EACpC,qBAAoD;QADpD,kBAAa,GAAb,aAAa,CAAuB;QACpC,0BAAqB,GAArB,qBAAqB,CAA+B;QAQvE,wCAAmC,GAAG,KAAK,EACzC,YAAsB,EACoB,EAAE;YAC5C,MAAM,MAAM,GAAG,IAAI,GAAG,EAA8B,CAAC;YACrD,IAAI,IAAI,CAAC,WAAW,KAAK,IAAI,EAAE,CAAC;gBAC9B,OAAO,MAAM,CAAC;YAChB,CAAC;YACD,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAC,YAAY,CAAC,CAAC;YACpD,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,aAAa,EAAE,CAAC;YAC3D,KAAK,MAAM,OAAO,IAAI,SAAS,EAAE,CAAC;gBAChC,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;gBACzD,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;oBACjD,SAAS;gBACX,CAAC;gBACD,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC;gBACzC,IACE,WAAW,KAAK,SAAS;oBACzB,CAAC,qBAAqB,CAAC,GAAG,CAAC,WAAW,CAAC,EACvC,CAAC;oBACD,SAAS;gBACX,CAAC;gBACD,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,IAAI,WAAW,CAAC;gBAChD,MAAM,QAAQ,GAAqB;oBACjC,KAAK;oBACL,aAAa,EAAE,IAAI,CAAC,qBAAqB,CAAC,oBAAoB,CAAC,KAAK,CAAC;oBACrE,cAAc,EAAE,OAAO,CAAC,cAAc;oBACtC,wBAAwB,EAAE,KAAK;iBAChC,CAAC;gBACF,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;gBACzC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;oBAC3B,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACtC,CAAC;qBAAM,CAAC;oBACN,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBAC1B,CAAC;YACH,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC;QA1CA,IAAI,CAAC,WAAW;YACd,YAAY,KAAK,IAAI,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC;gBAChD,CAAC,CAAC,IAAI;gBACN,CAAC,CAAC,IAAI,MAAM,CAAC,YAAY,CAAC,CAAC;IACjC,CAAC;CAuCF;AAnDD,oGAmDC"}
1
+ {"version":3,"file":"ProcessListSessionSubAgentActivityRepository.js","sourceRoot":"","sources":["../../../src/adapter/repositories/ProcessListSessionSubAgentActivityRepository.ts"],"names":[],"mappings":";;;AAKA,MAAa,4CAA4C;IAGvD,YACE,YAA2B,EACV,aAAoC,EACpC,qBAAoD;QADpD,kBAAa,GAAb,aAAa,CAAuB;QACpC,0BAAqB,GAArB,qBAAqB,CAA+B;QAQvE,wCAAmC,GAAG,KAAK,EACzC,YAAsB,EACoB,EAAE;YAC5C,MAAM,MAAM,GAAG,IAAI,GAAG,EAA8B,CAAC;YACrD,IAAI,IAAI,CAAC,WAAW,KAAK,IAAI,EAAE,CAAC;gBAC9B,OAAO,MAAM,CAAC;YAChB,CAAC;YACD,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAC,YAAY,CAAC,CAAC;YACpD,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,aAAa,CA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ACjC,CAAC;CAwCF;AApDD,oGAoDC"}
@@ -305,14 +305,14 @@ class TranscriptSessionSubAgentActivityRepository {
305
305
  continue;
306
306
  }
307
307
  const filePath = path.join(directory, fileName);
308
- const activity = await this.toActivity(filePath, fileName, nowEpochSeconds, loadNormalizedProcessCommandLines);
308
+ const activity = await this.toActivity(filePath, fileName, nowEpochSeconds, liveSubAgentIds !== null, loadNormalizedProcessCommandLines);
309
309
  if (activity !== null) {
310
310
  activities.push(activity);
311
311
  }
312
312
  }
313
313
  return activities;
314
314
  };
315
- this.toActivity = async (filePath, fileName, nowEpochSeconds, loadNormalizedProcessCommandLines) => {
315
+ this.toActivity = async (filePath, fileName, nowEpochSeconds, listedInRunningSubAgentsRecord, loadNormalizedProcessCommandLines) => {
316
316
  let content;
317
317
  let stats;
318
318
  try {
@@ -323,7 +323,8 @@ class TranscriptSessionSubAgentActivityRepository {
323
323
  return null;
324
324
  }
325
325
  const transcript = parseTranscript(content);
326
- if (transcript.lastEntryIndicatesCompletion) {
326
+ if (transcript.lastEntryIndicatesCompletion &&
327
+ !listedInRunningSubAgentsRecord) {
327
328
  return null;
328
329
  }
329
330
  const silentSeconds = clampToZero(nowEpochSeconds - Math.floor(stats.mtimeMs / 1000));
@@ -336,6 +337,7 @@ class TranscriptSessionSubAgentActivityRepository {
336
337
  runningSeconds,
337
338
  waitingOnExternalProcess: transcript.pendingDelegationToolUse ||
338
339
  (await this.hasLiveMatchingProcess(transcript.pendingToolCommands, loadNormalizedProcessCommandLines)),
340
+ finishedResultUnconsumed: transcript.lastEntryIndicatesCompletion,
339
341
  };
340
342
  };
341
343
  this.hasLiveMatchingProcess = async (pendingToolCommands, loadNormalizedProcessCommandLines) => {
@@ -1 +1 @@
1
- {"version":3,"file":"TranscriptSessionSubAgentActivityRepository.js","sourceRoot":"","sources":["../../../src/adapter/repositories/TranscriptSessionSubAgentActivityRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,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,GAAG,MAAM,iCAAiC,EAAE,CAAC;YACtE,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CACjC,mBAAmB,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAC1E,CAAC;QACJ,CAAC,CAAC;IA9JC,CAAC;CA+JL;AArKD,kGAqKC"}
1
+ {"version":3,"file":"TranscriptSessionSubAgentActivityRepository.js","sourceRoot":"","sources":["../../../src/adapter/repositories/TranscriptSessionSubAgentActivityRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAO7B,MAAM,mCAAmC,GAA6B;IACpE,sBAAsB,EAAE,KAAK,IAAI,EAAE,CAAC,IAAI;CACzC,CAAC;AAEF,MAAM,QAAQ,GAAG,CAAC,KAAc,EAAoC,EAAE,CACpE,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAC;AAE9C,MAAM,UAAU,GAAG,CACjB,KAA8B,EAC9B,GAAW,EACI,EAAE;IACjB,MAAM,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;IAC7B,OAAO,OAAO,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;AAC1D,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,SAAwB,EAAiB,EAAE;IACpE,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACrC,OAAO,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;AAC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AmB,EAC9B,iCAAiC,CAClC,CAAC;gBACJ,wBAAwB,EAAE,UAAU,CAAC,4BAA4B;aAClE,CAAC;QACJ,CAAC,CAAC;QAEM,2BAAsB,GAAG,KAAK,EACpC,mBAA6B,EAC7B,iCAA0D,EACxC,EAAE;YACpB,IAAI,mBAAmB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACrC,OAAO,KAAK,CAAC;YACf,CAAC;YACD,MAAM,SAAS,GAAG,mBAAmB;iBAClC,GAAG,CAAC,gCAAwB,CAAC;iBAC7B,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;YAC7C,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC3B,OAAO,KAAK,CAAC;YACf,CAAC;YACD,MAAM,mBAAmB,GAAG,MAAM,iCAAiC,EAAE,CAAC;YACtE,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CACjC,mBAAmB,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAC1E,CAAC;QACJ,CAAC,CAAC;IApKC,CAAC;CAqKL;AA3KD,kGA2KC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=KevReportWatermark.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KevReportWatermark.js","sourceRoot":"","sources":["../../../src/domain/entities/KevReportWatermark.ts"],"names":[],"mappings":""}
@@ -63,11 +63,33 @@ const renderScannerFindings = (today, vulnerablePackages) => [
63
63
  ...vulnerablePackages.map((vulnerablePackage) => `- ${vulnerablePackage.ecosystem} ${vulnerablePackage.packageName} ${vulnerablePackage.packageVersion} ${vulnerablePackage.vulnerabilityIdentifiers.join(' ')} ${vulnerablePackage.summary}`),
64
64
  ].join('\n');
65
65
  const KEV_CATALOG_URL = 'https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json';
66
+ const dayBeforeUtcYmd = (date) => {
67
+ const dayBefore = new Date(date);
68
+ dayBefore.setUTCDate(dayBefore.getUTCDate() - 1);
69
+ return dayBefore.toISOString().slice(0, 10);
70
+ };
71
+ const advanceWatermark = (storedWatermark, reportedVulnerabilities) => {
72
+ const lastReportedDateAdded = reportedVulnerabilities.reduce((latest, vulnerability) => vulnerability.dateAdded > latest ? vulnerability.dateAdded : latest, storedWatermark === null ? '' : storedWatermark.lastReportedDateAdded);
73
+ const reportedCveIdsOnLastReportedDateAdded = new Set(storedWatermark !== null &&
74
+ storedWatermark.lastReportedDateAdded === lastReportedDateAdded
75
+ ? storedWatermark.reportedCveIdsOnLastReportedDateAdded
76
+ : []);
77
+ for (const vulnerability of reportedVulnerabilities) {
78
+ if (vulnerability.dateAdded === lastReportedDateAdded) {
79
+ reportedCveIdsOnLastReportedDateAdded.add(vulnerability.cveID);
80
+ }
81
+ }
82
+ return {
83
+ lastReportedDateAdded,
84
+ reportedCveIdsOnLastReportedDateAdded: Array.from(reportedCveIdsOnLastReportedDateAdded),
85
+ };
86
+ };
66
87
  class DailySecurityScanUseCase {
67
- constructor(localCommandRunner, issueRepository, httpRepository) {
88
+ constructor(localCommandRunner, issueRepository, httpRepository, kevReportWatermarkRepository) {
68
89
  this.localCommandRunner = localCommandRunner;
69
90
  this.issueRepository = issueRepository;
70
91
  this.httpRepository = httpRepository;
92
+ this.kevReportWatermarkRepository = kevReportWatermarkRepository;
71
93
  this.run = async (input) => {
72
94
  const shouldRun = input.targetDates.some((targetDate) => targetDate.getUTCHours() === input.dailySecurityScan.targetHourUtc &&
73
95
  targetDate.getUTCMinutes() === 0);
@@ -197,30 +219,57 @@ class DailySecurityScanUseCase {
197
219
  if (!config.enableKevNvdReport || !config.kevReportRepo) {
198
220
  return;
199
221
  }
200
- const yesterday = new Date(lastTargetDate);
201
- yesterday.setUTCDate(yesterday.getUTCDate() - 1);
202
- const yesterdayYmd = yesterday.toISOString().slice(0, 10);
222
+ const watermarkLoadResult = await this.kevReportWatermarkRepository.load();
223
+ if (watermarkLoadResult.type === 'unreadable') {
224
+ console.error(`Skipping the CISA KEV report for this run because ${watermarkLoadResult.reason}. The stored watermark is left unchanged and no issue was created; reporting resumes once the stored watermark is readable again.`);
225
+ return;
226
+ }
227
+ const storedWatermark = watermarkLoadResult.type === 'stored'
228
+ ? watermarkLoadResult.watermark
229
+ : null;
230
+ const reportBoundaryDateAdded = storedWatermark === null
231
+ ? dayBeforeUtcYmd(lastTargetDate)
232
+ : storedWatermark.lastReportedDateAdded;
233
+ const alreadyReportedCveIdsOnBoundary = new Set(storedWatermark === null
234
+ ? []
235
+ : storedWatermark.reportedCveIdsOnLastReportedDateAdded);
203
236
  const kevJson = await this.httpRepository.get(KEV_CATALOG_URL);
204
237
  const parsedKev = JSON.parse(kevJson);
205
238
  if (!isKevCatalog(parsedKev)) {
206
239
  throw new Error(`Unexpected CISA KEV catalog format from ${KEV_CATALOG_URL}`);
207
240
  }
208
- const newKevEntries = parsedKev.vulnerabilities.filter((vulnerability) => vulnerability.dateAdded >= yesterdayYmd);
209
- const affectingKevEntries = newKevEntries
241
+ const unreportedVulnerabilities = parsedKev.vulnerabilities.filter((vulnerability) => vulnerability.dateAdded > reportBoundaryDateAdded ||
242
+ (vulnerability.dateAdded === reportBoundaryDateAdded &&
243
+ !alreadyReportedCveIdsOnBoundary.has(vulnerability.cveID)));
244
+ if (unreportedVulnerabilities.length === 0) {
245
+ return;
246
+ }
247
+ const advancedWatermark = advanceWatermark(storedWatermark, unreportedVulnerabilities);
248
+ const saveAdvancedWatermark = async () => {
249
+ try {
250
+ await this.kevReportWatermarkRepository.save(advancedWatermark);
251
+ }
252
+ catch (error) {
253
+ console.error(`The CISA KEV additions considered in this run were not recorded because the KEV report watermark file did not advance to ${advancedWatermark.lastReportedDateAdded}: ${String(error)}. Those additions will be considered again on the next run, and the rest of the scheduled work continues.`);
254
+ }
255
+ };
256
+ const affectingKevEntries = unreportedVulnerabilities
210
257
  .map((vulnerability) => ({
211
258
  vulnerability,
212
259
  affectedPackages: scannedVulnerablePackages.filter((scannedPackage) => scannedPackage.vulnerabilityIdentifiers.includes(vulnerability.cveID)),
213
260
  }))
214
261
  .filter((entry) => entry.affectedPackages.length > 0);
215
262
  if (affectingKevEntries.length === 0) {
263
+ await saveAdvancedWatermark();
216
264
  return;
217
265
  }
218
- await this.issueRepository.createNewIssue(org, config.kevReportRepo, `CISA KEV new additions since ${yesterdayYmd}`, affectingKevEntries
266
+ await this.issueRepository.createNewIssue(org, config.kevReportRepo, `CISA KEV new additions since ${reportBoundaryDateAdded}`, affectingKevEntries
219
267
  .map((entry) => [
220
268
  `- ${entry.vulnerability.dateAdded} ${entry.vulnerability.cveID} ${entry.vulnerability.vulnerabilityName}`,
221
269
  ...entry.affectedPackages.map((affectedPackage) => ` - ${affectedPackage.repositoryName} ${affectedPackage.ecosystem} ${affectedPackage.packageName} ${affectedPackage.packageVersion}`),
222
270
  ].join('\n'))
223
271
  .join('\n'), [manager], []);
272
+ await saveAdvancedWatermark();
224
273
  };
225
274
  }
226
275
  }