github-issue-tower-defence-management 1.140.0 → 1.140.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.
- package/.github/workflows/umino-project.yml +2 -1
- package/CHANGELOG.md +14 -0
- package/README.md +1 -1
- package/bin/adapter/repositories/FileSystemSessionOutputActivityRepository.js +6 -40
- package/bin/adapter/repositories/FileSystemSessionOutputActivityRepository.js.map +1 -1
- package/bin/domain/usecases/NotifySilentLiveSessionsUseCase.js +29 -51
- package/bin/domain/usecases/NotifySilentLiveSessionsUseCase.js.map +1 -1
- package/package.json +1 -1
- package/src/adapter/entry-points/handlers/notifySilentTmuxSessions.test.ts +33 -3
- package/src/adapter/repositories/FileSystemSessionOutputActivityRepository.test.ts +24 -11
- package/src/adapter/repositories/FileSystemSessionOutputActivityRepository.ts +8 -50
- package/src/domain/entities/LiveSessionActivitySnapshot.ts +0 -1
- package/src/domain/entities/LiveSessionOutputActivity.ts +0 -1
- package/src/domain/usecases/NotifySilentLiveSessionsUseCase.test.ts +127 -122
- package/src/domain/usecases/NotifySilentLiveSessionsUseCase.ts +33 -62
- package/types/adapter/repositories/FileSystemSessionOutputActivityRepository.d.ts +1 -1
- package/types/adapter/repositories/FileSystemSessionOutputActivityRepository.d.ts.map +1 -1
- package/types/domain/entities/LiveSessionActivitySnapshot.d.ts +0 -1
- package/types/domain/entities/LiveSessionActivitySnapshot.d.ts.map +1 -1
- package/types/domain/entities/LiveSessionOutputActivity.d.ts +0 -1
- package/types/domain/entities/LiveSessionOutputActivity.d.ts.map +1 -1
- package/types/domain/usecases/NotifySilentLiveSessionsUseCase.d.ts +0 -1
- package/types/domain/usecases/NotifySilentLiveSessionsUseCase.d.ts.map +1 -1
|
@@ -284,7 +284,8 @@ jobs:
|
|
|
284
284
|
github.event.action == 'reopened') &&
|
|
285
285
|
github.actor != 'dependabot[bot]' &&
|
|
286
286
|
github.actor != 'renovate[bot]' &&
|
|
287
|
-
github.actor != 'app/dependabot'
|
|
287
|
+
github.actor != 'app/dependabot' &&
|
|
288
|
+
github.event.pull_request.user.login != 'dependabot[bot]'
|
|
288
289
|
steps:
|
|
289
290
|
- uses: step-security/harden-runner@v2
|
|
290
291
|
with:
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.140.2](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/compare/v1.140.1...v1.140.2) (2026-07-26)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* include role-named leader and PM sessions in the silent-session reminder ([#1284](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/issues/1284)) ([dd5cb46](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/dd5cb460e626c53ca03859dacd4a333938e19b5f)), closes [#1283](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/issues/1283)
|
|
7
|
+
|
|
8
|
+
## [1.140.1](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/compare/v1.140.0...v1.140.1) (2026-07-26)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* always remind genuinely-silent sessions, remove in-progress-tool-call suppression ([#1281](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/issues/1281)) ([6d13212](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/6d1321225687e02db713a8795e3eb1a91eb0c1fe)), closes [#1279](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/issues/1279)
|
|
14
|
+
|
|
1
15
|
# [1.140.0](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/compare/v1.139.1...v1.140.0) (2026-07-26)
|
|
2
16
|
|
|
3
17
|
|
package/README.md
CHANGED
|
@@ -586,7 +586,7 @@ For each `In Tmux by human` issue with no live session, the reconciler launches
|
|
|
586
586
|
|
|
587
587
|
Each schedule cycle, when `silentNotificationEnabled` is true, also inspects every live interactive Claude Code session and sends a short self-check reminder into a session via `tmux send-keys` when either of two independent conditions holds. The reminder is composed of only the sections whose condition is met. The main-session-stalled section and the sub-process section are independent, and within the sub-process section the idle (no-output) condition and the long-running condition each produce their own distinct message so a small idle time is never lumped together with a long running time; a sub-process that matches both conditions is reported in both messages, kept separate. When `silentNotificationEnabled` is not set, the entire step is a no-op even if the daemon picks up its configuration automatically.
|
|
588
588
|
|
|
589
|
-
Candidate sessions are first selected from the live process tree: every live tmux session is taken, the descendants of each session's pane processes are walked, and the first descendant that is an interactive Claude Code process (its command line contains `claude` and does not contain the owner-handover marker `Take ownership of`, and its environment exposes both `CLAUDE_CODE_SESSION_ID` and `CLAUDE_CONFIG_DIR`) is taken as that session's process. Because the walk is anchored on tmux panes, background owner-handover spawns, the preparation daemon, and monitor processes — none of which run inside an interactive tmux pane — are excluded; the owner-handover marker check is an additional guard. The monitor then acts
|
|
589
|
+
Candidate sessions are first selected from the live process tree: every live tmux session is taken, the descendants of each session's pane processes are walked, and the first descendant that is an interactive Claude Code process (its command line contains `claude` and does not contain the owner-handover marker `Take ownership of`, and its environment exposes both `CLAUDE_CODE_SESSION_ID` and `CLAUDE_CONFIG_DIR`) is taken as that session's process. Because the walk is anchored on tmux panes, background owner-handover spawns, the preparation daemon, and monitor processes — none of which run inside an interactive tmux pane — are excluded; the owner-handover marker check is an additional guard. The monitor then acts on a session when it is either named after a `github.com` issue or pull-request URL — that is, a name of the form `https_//github_com/{owner}/{repo}/issues/{N}` or `https_//github_com/{owner}/{repo}/pull/{N}` (the form tmux derives from the raw issue/PR URL by replacing only `.` and `:` with `_`; the raw `https://github.com/...` form is matched as well) — or has a resolvable Claude agent transcript on disk. The resolvable transcript is the proof that the session is a live Claude agent session, so role-named resident leader and project-manager agent sessions (for example `app`, `tdpm-cli`, `secretary`, and the per-project `*pm` sessions) are monitored and receive the main-stall reminder even though their names encode no issue or pull-request URL. Gating this broadened inclusion on the resolvable transcript rather than on merely being a tmux session keeps genuine non-agent interactive sessions excluded: a login shell, or a viewer such as `sso_login` or a `tdpm` viewer, exposes no Claude transcript on disk, so it is left untouched — it receives neither a main-stall nor a sub-process notification — and the count of interactive sessions ignored each cycle, those that are neither github-named nor have a resolvable transcript, is logged. A role-named leader or PM session encodes no `github.com` hub task, so the hub-task active-status gate described below treats it as active and does not suppress it. Each interactive session's transcript is resolved by scanning the `projects/<cwd-slug>/` subdirectories of two roots — the per-session `<CLAUDE_CONFIG_DIR>/projects/` and the shared `~/.claude/projects/` — for a `<sessionId>.jsonl` file named by any of the session's candidate session ids. The candidate ids are derived from the process tree, in priority order: the current session id recorded in `<CLAUDE_CONFIG_DIR>/sessions/<pid>.json` (the session id rotates on resume or compaction, and this record holds the current value), then the interactive process's own launch id from the `CLAUDE_CODE_SESSION_ID` environment variable, then the distinct ids propagated to its descendant processes, all deduped. Searching the shared root and the rotated current id is required because, for a resumed or compacted session, the actively-written transcript is named by the current id and lives under the shared root rather than under the per-session config directory; the descendant-propagated ids are required because, for a session started without `--resume`, the own launch id names no transcript on disk and the live transcript is named by the descendant id. The candidate ids are tried strictly in this priority order, and the first candidate id that names an existing `<sessionId>.jsonl` file in either root is selected; the most recently modified match is used only as a tiebreak when that same id exists in both roots. Resolving by candidate-id priority rather than by the globally most recently modified file across all candidate ids is required because a session running a sub-agent has the sub-agent's own transcript on disk too, and that sub-agent transcript can be more recently modified than the parent session's transcript while not naming the parent. The parent session's own ids (the rotated current id and the launch id) come before any descendant-propagated id, so the parent's own transcript is selected ahead of a sub-agent transcript; a sub-agent transcript, which lives under `projects/<cwd-slug>/<parentSessionId>/subagents/agent-<id>.jsonl` rather than as a top-level `<sessionId>.jsonl` file, is never reached. This way a non-resume session and a session that has no issue URL both resolve just as reliably as a resume, issue-url-named one, and a session that is waiting on the owner while a sub-agent runs is evaluated against its own transcript rather than the sub-agent's.
|
|
590
590
|
|
|
591
591
|
The main-session stalled section is sent when the session's main output has been idle for at least `mainSilentThresholdSeconds`, unless the session is currently waiting on the owner (in that case the silence is expected and the section is suppressed). Idle time is computed from the timestamp of the latest entry of any kind in the session's resolved transcript rather than from the transcript file modification time, so a session that keeps appending tool results, owner replies, or any other entry type while emitting no assistant text still counts as active and is not mistaken for a silent one. Whether a session is waiting on the owner is determined through an injectable port; the built-in default reports no session as waiting, so the suppression is only applied when a host provides an implementation. When `ownerCallMarker` is configured, a transcript-based implementation is used: it reads each session's resolved transcript and treats the session as waiting on the owner when the latest entry containing `ownerCallMarker` is newer (by full timestamp) than the latest genuine owner reply. A self-check reminder that the monitor injects into a session via `tmux send-keys` itself lands in that session's transcript as a `user` text entry; every injected reminder carries a fixed sentinel tag (`[TDPM_SILENT_SESSION_SELF_CHECK_REMINDER]`), and a `user` entry whose text contains that sentinel is not counted as a genuine owner reply. This prevents the monitor's own reminder from being mistaken for the owner answering, which would otherwise make a genuinely waiting session stop being suppressed. The stalled section's owner-call self-check point also instructs the agent on the required owner-call notification format: the owner-call must be emitted as the configured owner-call marker tag (interpolated from `ownerCallMarker` when set) as a complete matching pair — opening marker, content, then closing marker — on a single line with no newline inside the tag, and the content between the markers must begin with the 🔴 emoji immediately, because the owner's app only surfaces the notification together with its content when the exact, well-formed tag with the leading 🔴 is present and a malformed tag results in only a red indicator with no readable content. The same self-check point also tells the agent when to fire the owner-call: if the agent has completed or answered a request from the owner in this session, it must fire the owner-call to report the result to the owner, because completing or answering an owner's requested action is itself a reason to fire the owner-call. Completing or answering an owner request without firing the owner-call means the owner is never notified — the owner's app only surfaces the session when the owner-call fires — so the task silently stalls; the point states the causal link explicitly, noting that if the self-check reminder keeps arriving it is likely because an owner request was completed or answered without firing the owner-call, so the agent should fire the owner-call to report the result to the owner.
|
|
592
592
|
|
|
@@ -47,42 +47,30 @@ const parseEpochMilliseconds = (timestamp) => {
|
|
|
47
47
|
const parsed = Date.parse(timestamp);
|
|
48
48
|
return Number.isNaN(parsed) ? null : parsed;
|
|
49
49
|
};
|
|
50
|
-
const readContentBlocks = (message) => {
|
|
51
|
-
const content = message.content;
|
|
52
|
-
if (!Array.isArray(content)) {
|
|
53
|
-
return [];
|
|
54
|
-
}
|
|
55
|
-
return content.filter(isRecord);
|
|
56
|
-
};
|
|
57
50
|
class FileSystemSessionOutputActivityRepository {
|
|
58
51
|
constructor() {
|
|
59
52
|
this.listSessionOutputActivities = async (transcriptPathBySessionName) => {
|
|
60
53
|
const activities = [];
|
|
61
54
|
for (const [sessionName, transcriptPath] of transcriptPathBySessionName) {
|
|
62
|
-
const
|
|
55
|
+
const lastAssistantOutputEpochSeconds = this.readLastAssistantOutputEpochSeconds(transcriptPath);
|
|
63
56
|
if (lastAssistantOutputEpochSeconds !== null) {
|
|
64
57
|
activities.push({
|
|
65
58
|
sessionName,
|
|
66
59
|
lastOutputEpochSeconds: lastAssistantOutputEpochSeconds,
|
|
67
|
-
hasInProgressToolCall,
|
|
68
60
|
});
|
|
69
61
|
}
|
|
70
62
|
}
|
|
71
63
|
return activities;
|
|
72
64
|
};
|
|
73
|
-
this.
|
|
65
|
+
this.readLastAssistantOutputEpochSeconds = (transcriptPath) => {
|
|
74
66
|
let content;
|
|
75
67
|
try {
|
|
76
68
|
content = fs.readFileSync(transcriptPath, 'utf8');
|
|
77
69
|
}
|
|
78
70
|
catch {
|
|
79
|
-
return
|
|
80
|
-
lastAssistantOutputEpochSeconds: null,
|
|
81
|
-
hasInProgressToolCall: false,
|
|
82
|
-
};
|
|
71
|
+
return null;
|
|
83
72
|
}
|
|
84
73
|
let lastAssistantOutputEpochMs = null;
|
|
85
|
-
const pendingToolUseIds = new Set();
|
|
86
74
|
for (const line of content.split('\n')) {
|
|
87
75
|
const trimmed = line.trim();
|
|
88
76
|
if (trimmed.length === 0) {
|
|
@@ -98,38 +86,16 @@ class FileSystemSessionOutputActivityRepository {
|
|
|
98
86
|
if (!isRecord(parsed)) {
|
|
99
87
|
continue;
|
|
100
88
|
}
|
|
101
|
-
const message = parsed.message;
|
|
102
89
|
if (readString(parsed, 'type') === 'assistant') {
|
|
103
90
|
const epochMs = parseEpochMilliseconds(readString(parsed, 'timestamp'));
|
|
104
91
|
if (epochMs !== null) {
|
|
105
92
|
lastAssistantOutputEpochMs = epochMs;
|
|
106
93
|
}
|
|
107
94
|
}
|
|
108
|
-
if (!isRecord(message)) {
|
|
109
|
-
continue;
|
|
110
|
-
}
|
|
111
|
-
for (const block of readContentBlocks(message)) {
|
|
112
|
-
const blockType = readString(block, 'type');
|
|
113
|
-
if (blockType === 'tool_use') {
|
|
114
|
-
const toolUseId = readString(block, 'id');
|
|
115
|
-
if (toolUseId !== null) {
|
|
116
|
-
pendingToolUseIds.add(toolUseId);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
else if (blockType === 'tool_result') {
|
|
120
|
-
const toolUseId = readString(block, 'tool_use_id');
|
|
121
|
-
if (toolUseId !== null) {
|
|
122
|
-
pendingToolUseIds.delete(toolUseId);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
95
|
}
|
|
127
|
-
return
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
: Math.floor(lastAssistantOutputEpochMs / 1000),
|
|
131
|
-
hasInProgressToolCall: pendingToolUseIds.size > 0,
|
|
132
|
-
};
|
|
96
|
+
return lastAssistantOutputEpochMs === null
|
|
97
|
+
? null
|
|
98
|
+
: Math.floor(lastAssistantOutputEpochMs / 1000);
|
|
133
99
|
};
|
|
134
100
|
}
|
|
135
101
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileSystemSessionOutputActivityRepository.js","sourceRoot":"","sources":["../../../src/adapter/repositories/FileSystemSessionOutputActivityRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AAIzB,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,sBAAsB,GAAG,CAAC,SAAwB,EAAiB,EAAE;IACzE,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,MAAM,CAAC;AAC9C,CAAC,CAAC;AAEF,
|
|
1
|
+
{"version":3,"file":"FileSystemSessionOutputActivityRepository.js","sourceRoot":"","sources":["../../../src/adapter/repositories/FileSystemSessionOutputActivityRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AAIzB,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,sBAAsB,GAAG,CAAC,SAAwB,EAAiB,EAAE;IACzE,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;I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IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;oBACtB,SAAS;gBACX,CAAC;gBACD,IAAI,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,WAAW,EAAE,CAAC;oBAC/C,MAAM,OAAO,GAAG,sBAAsB,CAAC,UAAU,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;oBACxE,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;wBACrB,0BAA0B,GAAG,OAAO,CAAC;oBACvC,CAAC;gBACH,CAAC;YACH,CAAC;YACD,OAAO,0BAA0B,KAAK,IAAI;gBACxC,CAAC,CAAC,IAAI;gBACN,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,0BAA0B,GAAG,IAAI,CAAC,CAAC;QACpD,CAAC,CAAC;IACJ,CAAC;CAAA;AArDD,8FAqDC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NotifySilentLiveSessionsUseCase = exports.isGitHubIssueOrPullRequestSessionName = exports.parseHubTaskIssueUrlFromSessionName = exports.
|
|
3
|
+
exports.NotifySilentLiveSessionsUseCase = exports.isGitHubIssueOrPullRequestSessionName = exports.parseHubTaskIssueUrlFromSessionName = exports.DEFAULT_HUB_TASK_STATUS_CACHE_TTL_SECONDS = exports.DEFAULT_CANDIDATE_DEBOUNCE_RECENCY_WINDOW_SECONDS = exports.DEFAULT_NOTIFICATION_STAGGER_SECONDS = exports.DEFAULT_SUBAGENT_RUNNING_THRESHOLD_SECONDS = exports.DEFAULT_SUBAGENT_SILENT_THRESHOLD_SECONDS = exports.DEFAULT_UNANSWERED_OWNER_CALL_GRACE_SECONDS = exports.DEFAULT_MAIN_SILENT_THRESHOLD_SECONDS = void 0;
|
|
4
4
|
const ResolveInteractiveLiveSessionsUseCase_1 = require("./ResolveInteractiveLiveSessionsUseCase");
|
|
5
5
|
exports.DEFAULT_MAIN_SILENT_THRESHOLD_SECONDS = 10 * 60;
|
|
6
6
|
// Retained only for backward compatibility of the configuration surface
|
|
@@ -13,15 +13,6 @@ exports.DEFAULT_SUBAGENT_RUNNING_THRESHOLD_SECONDS = 15 * 60;
|
|
|
13
13
|
exports.DEFAULT_NOTIFICATION_STAGGER_SECONDS = 25;
|
|
14
14
|
exports.DEFAULT_CANDIDATE_DEBOUNCE_RECENCY_WINDOW_SECONDS = 15 * 60;
|
|
15
15
|
exports.DEFAULT_HUB_TASK_STATUS_CACHE_TTL_SECONDS = 5 * 60;
|
|
16
|
-
// Upper bound on how long an in-progress tool call suppresses the main-stall
|
|
17
|
-
// reminder. Set to 2 hours: comfortably above the ~1-hour maximum duration of
|
|
18
|
-
// the longest legitimate single tool call (the Monitor tool's own timeout
|
|
19
|
-
// ceiling), so every legitimate long-running tool call is still suppressed,
|
|
20
|
-
// while a session whose transcript tail has been an unanswered tool_use for
|
|
21
|
-
// longer than this — for example because the tool call itself hung and never
|
|
22
|
-
// returned — still receives the stall reminder instead of being suppressed
|
|
23
|
-
// forever.
|
|
24
|
-
exports.IN_PROGRESS_TOOL_CALL_MAX_SUPPRESS_SECONDS = 2 * 60 * 60;
|
|
25
16
|
const GITHUB_ISSUE_OR_PULL_URL_PATTERN = /^https:\/\/github\.com\/([^/]+)\/([^/]+)\/(?:issues|pull)\/(\d+)$/;
|
|
26
17
|
const GITHUB_TMUX_SESSION_NAME_PATTERN = /^https_\/\/github_com\/([^/]+)\/([^/]+)\/(?:issues|pull)\/(\d+)$/;
|
|
27
18
|
const parseHubTaskIssueUrlFromSessionName = (sessionName) => {
|
|
@@ -59,12 +50,27 @@ class NotifySilentLiveSessionsUseCase {
|
|
|
59
50
|
this.run = async (params) => {
|
|
60
51
|
const snapshot = await this.liveSessionProcessSnapshotProvider.getSnapshot();
|
|
61
52
|
const allInteractiveSessions = this.resolveInteractiveLiveSessions.resolve(snapshot);
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
53
|
+
// Resolve the on-disk Claude transcript for every interactive session
|
|
54
|
+
// before any name-based narrowing. A resolvable transcript is the proof
|
|
55
|
+
// that a session is a live Claude agent session (its transcript, keyed by
|
|
56
|
+
// the session id, is actively present on disk), independent of how the tmux
|
|
57
|
+
// session is named.
|
|
58
|
+
const transcriptPathBySessionName = this.interactiveLiveSessionTranscriptResolver.resolveTranscriptPaths(allInteractiveSessions);
|
|
59
|
+
// Monitor a session when it is either named after a github.com issue or
|
|
60
|
+
// pull-request URL (the hub-task sessions) or has a resolvable Claude agent
|
|
61
|
+
// transcript (role-named resident leader / PM agent sessions such as app,
|
|
62
|
+
// tdpm-cli, secretary, and the per-project *pm sessions). Gating the
|
|
63
|
+
// broadened inclusion on the resolvable transcript rather than on merely
|
|
64
|
+
// being a tmux session keeps the fail-direction safe: a genuine non-agent
|
|
65
|
+
// interactive session — a login shell, or a viewer such as sso_login or a
|
|
66
|
+
// tdpm viewer — exposes no Claude transcript on disk, so it is still
|
|
67
|
+
// excluded and never reminded.
|
|
68
|
+
const interactiveSessions = allInteractiveSessions.filter((session) => (0, exports.isGitHubIssueOrPullRequestSessionName)(session.sessionName) ||
|
|
69
|
+
transcriptPathBySessionName.has(session.sessionName));
|
|
70
|
+
const skippedNonAgentSessionCount = allInteractiveSessions.length - interactiveSessions.length;
|
|
71
|
+
if (skippedNonAgentSessionCount > 0) {
|
|
72
|
+
console.log(`Silent live session notification: ignoring ${skippedNonAgentSessionCount} interactive session(s) that are neither named after a github.com issue or pull-request URL nor have a resolvable Claude agent transcript.`);
|
|
66
73
|
}
|
|
67
|
-
const transcriptPathBySessionName = this.interactiveLiveSessionTranscriptResolver.resolveTranscriptPaths(interactiveSessions);
|
|
68
74
|
// A session whose most recent assistant turn is a model refusal is
|
|
69
75
|
// excluded from ALL reminder candidates (main-stall and sub-agent
|
|
70
76
|
// branches alike): each reminder delivery re-sends the full session
|
|
@@ -124,18 +130,6 @@ class NotifySilentLiveSessionsUseCase {
|
|
|
124
130
|
console.log(`Skipping ${candidate.sessionName}: the current silent-episode reminder was already delivered; not re-injecting until the condition resolves and re-arises.`);
|
|
125
131
|
continue;
|
|
126
132
|
}
|
|
127
|
-
// Input-state gating: a session whose main REPL is mid-turn — currently
|
|
128
|
-
// running an in-progress tool call, which includes waiting on a
|
|
129
|
-
// long-running sub-agent — cannot accept an injected prompt cleanly, so
|
|
130
|
-
// the reminder is deferred rather than piled into a busy input box. The
|
|
131
|
-
// session stays a candidate, so it is reminded once it becomes
|
|
132
|
-
// input-ready. A tool call pending past
|
|
133
|
-
// IN_PROGRESS_TOOL_CALL_MAX_SUPPRESS_SECONDS is treated as hung and no
|
|
134
|
-
// longer counts as busy (see composeCandidate).
|
|
135
|
-
if (candidate.mainInputBusy) {
|
|
136
|
-
console.log(`Skipping ${candidate.sessionName}: main REPL is not in an input-accepting state (in-progress tool call); deferring reminder until it is idle.`);
|
|
137
|
-
continue;
|
|
138
|
-
}
|
|
139
133
|
if (!(await this.isHubTaskActive(candidate.sessionName, params.activeHubTaskStatus, params.hubTaskStatusCacheTtlSeconds, params.now))) {
|
|
140
134
|
continue;
|
|
141
135
|
}
|
|
@@ -239,10 +233,8 @@ class NotifySilentLiveSessionsUseCase {
|
|
|
239
233
|
const sessionNames = interactiveSessions.map((session) => session.sessionName);
|
|
240
234
|
const activities = await this.sessionOutputActivityRepository.listSessionOutputActivities(transcriptPathBySessionName);
|
|
241
235
|
const lastOutputBySessionName = new Map();
|
|
242
|
-
const inProgressToolCallBySessionName = new Map();
|
|
243
236
|
for (const activity of activities) {
|
|
244
237
|
lastOutputBySessionName.set(activity.sessionName, activity.lastOutputEpochSeconds);
|
|
245
|
-
inProgressToolCallBySessionName.set(activity.sessionName, activity.hasInProgressToolCall);
|
|
246
238
|
}
|
|
247
239
|
const subAgentsBySessionName = await this.subAgentActivityRepository.listSubAgentActivitiesBySessionName(sessionNames, transcriptPathBySessionName);
|
|
248
240
|
const unansweredOwnerCallEpochSecondsBySessionName = await this.ownerCallStatusProvider.listUnansweredOwnerCallEpochSecondsBySessionName(transcriptPathBySessionName);
|
|
@@ -256,7 +248,6 @@ class NotifySilentLiveSessionsUseCase {
|
|
|
256
248
|
return {
|
|
257
249
|
sessionName,
|
|
258
250
|
mainSilentSeconds,
|
|
259
|
-
mainHasInProgressToolCall: inProgressToolCallBySessionName.get(sessionName) ?? false,
|
|
260
251
|
subAgents: subAgentsBySessionName.get(sessionName) ?? [],
|
|
261
252
|
unansweredOwnerCallAgeSeconds: unansweredOwnerCallEpochSeconds === undefined
|
|
262
253
|
? null
|
|
@@ -278,28 +269,16 @@ class NotifySilentLiveSessionsUseCase {
|
|
|
278
269
|
// is retained in the parameters only for backward compatibility of the
|
|
279
270
|
// call signature and is intentionally ignored (treated as infinite).
|
|
280
271
|
const suppressedByUnansweredOwnerCall = unansweredOwnerCallAgeSeconds !== null;
|
|
281
|
-
//
|
|
282
|
-
//
|
|
283
|
-
//
|
|
284
|
-
//
|
|
285
|
-
//
|
|
286
|
-
// the
|
|
287
|
-
//
|
|
288
|
-
// no pending tool call and is still flagged.
|
|
289
|
-
// The suppression is bounded by the pending tool call's own age
|
|
290
|
-
// (mainSilentSeconds, which for an in-progress tool call equals the age of
|
|
291
|
-
// the pending tool_use line) so it cannot last forever: a session stuck
|
|
292
|
-
// inside a tool call that never returns is reminded once that age exceeds
|
|
293
|
-
// IN_PROGRESS_TOOL_CALL_MAX_SUPPRESS_SECONDS, restoring the ~10-minute
|
|
294
|
-
// stall reminder for a truly hung session instead of suppressing it
|
|
295
|
-
// indefinitely.
|
|
296
|
-
const suppressedByInProgressToolCall = snapshot.mainHasInProgressToolCall &&
|
|
297
|
-
mainSilentSeconds !== null &&
|
|
298
|
-
mainSilentSeconds < exports.IN_PROGRESS_TOOL_CALL_MAX_SUPPRESS_SECONDS;
|
|
272
|
+
// The main-stall reminder is driven purely by silence: a session that has
|
|
273
|
+
// produced no assistant output for longer than the threshold is reminded
|
|
274
|
+
// regardless of whether its transcript tail is an in-progress tool_use. A
|
|
275
|
+
// session that merely looks busy (mid-tool-call) can in fact be stuck, so
|
|
276
|
+
// its apparent busyness MUST NOT suppress the reminder; the reminder queues
|
|
277
|
+
// cleanly into the session even when it is mid-turn. The only main-stall
|
|
278
|
+
// suppression is an unanswered owner call, which is a real wait on the owner.
|
|
299
279
|
const mainTriggered = mainSilentSeconds !== null &&
|
|
300
280
|
mainSilentSeconds >= thresholds.mainSilentThresholdSeconds &&
|
|
301
|
-
!suppressedByUnansweredOwnerCall
|
|
302
|
-
!suppressedByInProgressToolCall;
|
|
281
|
+
!suppressedByUnansweredOwnerCall;
|
|
303
282
|
if (mainTriggered) {
|
|
304
283
|
sections.push(this.messageComposer.composeMainStalledSection(mainSilentSeconds));
|
|
305
284
|
sectionLabels.push('main-stalled');
|
|
@@ -335,7 +314,6 @@ class NotifySilentLiveSessionsUseCase {
|
|
|
335
314
|
sessionName: snapshot.sessionName,
|
|
336
315
|
message: sections.join('\n\n'),
|
|
337
316
|
sectionLabels,
|
|
338
|
-
mainInputBusy: suppressedByInProgressToolCall,
|
|
339
317
|
};
|
|
340
318
|
};
|
|
341
319
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotifySilentLiveSessionsUseCase.js","sourceRoot":"","sources":["../../../src/domain/usecases/NotifySilentLiveSessionsUseCase.ts"],"names":[],"mappings":";;;AAeA,mGAAgG;AAEnF,QAAA,qCAAqC,GAAG,EAAE,GAAG,EAAE,CAAC;AAC7D,wEAAwE;AACxE,4EAA4E;AAC5E,yEAAyE;AACzE,wEAAwE;AAC3D,QAAA,2CAA2C,GAAG,EAAE,GAAG,EAAE,CAAC;AACtD,QAAA,yCAAyC,GAAG,CAAC,GAAG,EAAE,CAAC;AACnD,QAAA,0CAA0C,GAAG,EAAE,GAAG,EAAE,CAAC;AACrD,QAAA,oCAAoC,GAAG,EAAE,CAAC;AAC1C,QAAA,iDAAiD,GAAG,EAAE,GAAG,EAAE,CAAC;AAC5D,QAAA,yCAAyC,G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all).toBeUndefined();
|
|
206
206
|
});
|
|
207
207
|
|
|
208
|
-
it('sends
|
|
208
|
+
it('sends a main stalled notification to a silent role-named leader live session that has a resolvable transcript', async () => {
|
|
209
209
|
silentAssistantTranscript();
|
|
210
|
+
seedPreviousCandidates(['secretary']);
|
|
210
211
|
const runner = createMockRunner();
|
|
211
212
|
runner.runCommand.mockImplementation(async (program, args) => {
|
|
212
213
|
if (program === 'tmux' && args[0] === 'list-sessions') {
|
|
213
|
-
return { stdout: '
|
|
214
|
+
return { stdout: 'secretary\n', stderr: '', exitCode: 0 };
|
|
214
215
|
}
|
|
215
216
|
if (program === 'tmux' && args[0] === 'list-panes') {
|
|
216
217
|
return { stdout: `${PANE_PID}\n`, stderr: '', exitCode: 0 };
|
|
217
218
|
}
|
|
218
219
|
if (program === 'ps') {
|
|
219
220
|
return {
|
|
220
|
-
stdout: ` ${PANE_PID} 1 shell\n ${CLAUDE_PID} ${PANE_PID} claude --name
|
|
221
|
+
stdout: ` ${PANE_PID} 1 shell\n ${CLAUDE_PID} ${PANE_PID} claude --name secretary\n`,
|
|
222
|
+
stderr: '',
|
|
223
|
+
exitCode: 0,
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
return { stdout: '', stderr: '', exitCode: 0 };
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
await notifySilentTmuxSessions(baseParams(runner));
|
|
230
|
+
|
|
231
|
+
const sendCall = runner.runCommand.mock.calls.find(
|
|
232
|
+
(call) => call[0] === 'tmux' && call[1][0] === 'send-keys',
|
|
233
|
+
);
|
|
234
|
+
expect(sendCall?.[1][2]).toBe('secretary');
|
|
235
|
+
expect(sendCall?.[1][4]).toContain('No output has been observed for');
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
it('sends no notification to a non-agent live session that has no resolvable transcript, even when it was already a candidate', async () => {
|
|
239
|
+
seedPreviousCandidates(['sso_login']);
|
|
240
|
+
const runner = createMockRunner();
|
|
241
|
+
runner.runCommand.mockImplementation(async (program, args) => {
|
|
242
|
+
if (program === 'tmux' && args[0] === 'list-sessions') {
|
|
243
|
+
return { stdout: 'sso_login\n', stderr: '', exitCode: 0 };
|
|
244
|
+
}
|
|
245
|
+
if (program === 'tmux' && args[0] === 'list-panes') {
|
|
246
|
+
return { stdout: `${PANE_PID}\n`, stderr: '', exitCode: 0 };
|
|
247
|
+
}
|
|
248
|
+
if (program === 'ps') {
|
|
249
|
+
return {
|
|
250
|
+
stdout: ` ${PANE_PID} 1 shell\n ${CLAUDE_PID} ${PANE_PID} claude --name sso_login\n`,
|
|
221
251
|
stderr: '',
|
|
222
252
|
exitCode: 0,
|
|
223
253
|
};
|
|
@@ -124,7 +124,6 @@ describe('FileSystemSessionOutputActivityRepository', () => {
|
|
|
124
124
|
lastOutputEpochSeconds: Math.floor(
|
|
125
125
|
Date.parse('2026-06-27T01:00:00.000Z') / 1000,
|
|
126
126
|
),
|
|
127
|
-
hasInProgressToolCall: false,
|
|
128
127
|
},
|
|
129
128
|
]);
|
|
130
129
|
});
|
|
@@ -146,7 +145,6 @@ describe('FileSystemSessionOutputActivityRepository', () => {
|
|
|
146
145
|
lastOutputEpochSeconds: Math.floor(
|
|
147
146
|
Date.parse('2026-06-27T09:55:00.000Z') / 1000,
|
|
148
147
|
),
|
|
149
|
-
hasInProgressToolCall: false,
|
|
150
148
|
},
|
|
151
149
|
]);
|
|
152
150
|
});
|
|
@@ -168,7 +166,6 @@ describe('FileSystemSessionOutputActivityRepository', () => {
|
|
|
168
166
|
lastOutputEpochSeconds: Math.floor(
|
|
169
167
|
Date.parse('2026-06-27T10:00:00.000Z') / 1000,
|
|
170
168
|
),
|
|
171
|
-
hasInProgressToolCall: false,
|
|
172
169
|
},
|
|
173
170
|
]);
|
|
174
171
|
});
|
|
@@ -190,7 +187,6 @@ describe('FileSystemSessionOutputActivityRepository', () => {
|
|
|
190
187
|
lastOutputEpochSeconds: Math.floor(
|
|
191
188
|
Date.parse('2026-06-27T10:00:00.000Z') / 1000,
|
|
192
189
|
),
|
|
193
|
-
hasInProgressToolCall: false,
|
|
194
190
|
},
|
|
195
191
|
]);
|
|
196
192
|
});
|
|
@@ -214,7 +210,6 @@ describe('FileSystemSessionOutputActivityRepository', () => {
|
|
|
214
210
|
lastOutputEpochSeconds: Math.floor(
|
|
215
211
|
Date.parse('2026-06-27T10:05:00.000Z') / 1000,
|
|
216
212
|
),
|
|
217
|
-
hasInProgressToolCall: false,
|
|
218
213
|
},
|
|
219
214
|
]);
|
|
220
215
|
});
|
|
@@ -236,7 +231,6 @@ describe('FileSystemSessionOutputActivityRepository', () => {
|
|
|
236
231
|
lastOutputEpochSeconds: Math.floor(
|
|
237
232
|
Date.parse('2026-06-27T10:00:00.000Z') / 1000,
|
|
238
233
|
),
|
|
239
|
-
hasInProgressToolCall: false,
|
|
240
234
|
},
|
|
241
235
|
]);
|
|
242
236
|
});
|
|
@@ -260,7 +254,6 @@ describe('FileSystemSessionOutputActivityRepository', () => {
|
|
|
260
254
|
lastOutputEpochSeconds: Math.floor(
|
|
261
255
|
Date.parse('2026-06-27T10:00:00.000Z') / 1000,
|
|
262
256
|
),
|
|
263
|
-
hasInProgressToolCall: false,
|
|
264
257
|
},
|
|
265
258
|
]);
|
|
266
259
|
});
|
|
@@ -293,7 +286,7 @@ describe('FileSystemSessionOutputActivityRepository', () => {
|
|
|
293
286
|
expect(result).toEqual([]);
|
|
294
287
|
});
|
|
295
288
|
|
|
296
|
-
it('
|
|
289
|
+
it('reports the assistant tool_use timestamp as the last output even when no tool_result has arrived, without any in-progress flagging', async () => {
|
|
297
290
|
const transcriptPath = writeTranscript('busy.jsonl', [
|
|
298
291
|
assistantEntry('2026-06-27T09:00:00.000Z'),
|
|
299
292
|
assistantEntryWithToolUse('2026-06-27T09:01:00.000Z', 'toolu_running'),
|
|
@@ -310,12 +303,11 @@ describe('FileSystemSessionOutputActivityRepository', () => {
|
|
|
310
303
|
lastOutputEpochSeconds: Math.floor(
|
|
311
304
|
Date.parse('2026-06-27T09:01:00.000Z') / 1000,
|
|
312
305
|
),
|
|
313
|
-
hasInProgressToolCall: true,
|
|
314
306
|
},
|
|
315
307
|
]);
|
|
316
308
|
});
|
|
317
309
|
|
|
318
|
-
it('
|
|
310
|
+
it('reports the assistant tool_use timestamp as the last output when a later tool_result user entry follows it', async () => {
|
|
319
311
|
const transcriptPath = writeTranscript('completed.jsonl', [
|
|
320
312
|
assistantEntryWithToolUse('2026-06-27T09:01:00.000Z', 'toolu_done'),
|
|
321
313
|
toolResultUserEntry('2026-06-27T09:05:00.000Z', 'toolu_done'),
|
|
@@ -332,7 +324,28 @@ describe('FileSystemSessionOutputActivityRepository', () => {
|
|
|
332
324
|
lastOutputEpochSeconds: Math.floor(
|
|
333
325
|
Date.parse('2026-06-27T09:01:00.000Z') / 1000,
|
|
334
326
|
),
|
|
335
|
-
|
|
327
|
+
},
|
|
328
|
+
]);
|
|
329
|
+
});
|
|
330
|
+
|
|
331
|
+
it('reports the later assistant text timestamp when an orphaned tool_use is followed by a resumed assistant turn, carrying no in-progress state', async () => {
|
|
332
|
+
const transcriptPath = writeTranscript('orphaned.jsonl', [
|
|
333
|
+
assistantEntryWithToolUse('2026-06-27T09:00:00.000Z', 'toolu_orphaned'),
|
|
334
|
+
assistantEntry('2026-06-27T09:46:53.000Z'),
|
|
335
|
+
userEntry('2026-06-27T09:47:00.000Z'),
|
|
336
|
+
]);
|
|
337
|
+
const repository = new FileSystemSessionOutputActivityRepository();
|
|
338
|
+
|
|
339
|
+
const result = await repository.listSessionOutputActivities(
|
|
340
|
+
new Map([['orphaned', transcriptPath]]),
|
|
341
|
+
);
|
|
342
|
+
|
|
343
|
+
expect(result).toEqual([
|
|
344
|
+
{
|
|
345
|
+
sessionName: 'orphaned',
|
|
346
|
+
lastOutputEpochSeconds: Math.floor(
|
|
347
|
+
Date.parse('2026-06-27T09:46:53.000Z') / 1000,
|
|
348
|
+
),
|
|
336
349
|
},
|
|
337
350
|
]);
|
|
338
351
|
});
|