github-issue-tower-defence-management 1.140.1 → 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 +7 -0
- package/README.md +1 -1
- package/bin/domain/usecases/NotifySilentLiveSessionsUseCase.js +20 -5
- 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/domain/usecases/NotifySilentLiveSessionsUseCase.test.ts +120 -8
- package/src/domain/usecases/NotifySilentLiveSessionsUseCase.ts +25 -9
- 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,10 @@
|
|
|
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
|
+
|
|
1
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)
|
|
2
9
|
|
|
3
10
|
|
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
|
|
|
@@ -50,12 +50,27 @@ class NotifySilentLiveSessionsUseCase {
|
|
|
50
50
|
this.run = async (params) => {
|
|
51
51
|
const snapshot = await this.liveSessionProcessSnapshotProvider.getSnapshot();
|
|
52
52
|
const allInteractiveSessions = this.resolveInteractiveLiveSessions.resolve(snapshot);
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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.`);
|
|
57
73
|
}
|
|
58
|
-
const transcriptPathBySessionName = this.interactiveLiveSessionTranscriptResolver.resolveTranscriptPaths(interactiveSessions);
|
|
59
74
|
// A session whose most recent assistant turn is a model refusal is
|
|
60
75
|
// excluded from ALL reminder candidates (main-stall and sub-agent
|
|
61
76
|
// branches alike): each reminder delivery re-sends the full session
|
|
@@ -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,GAAG,CAAC,GAAG,EAAE,CAAC;AAEhE,MAAM,gCAAgC,GACpC,mEAAmE,CAAC;AAEtE,MAAM,gCAAgC,GACpC,kEAAkE,CAAC;AAE9D,MAAM,mCAAmC,GAAG,CACjD,WAAmB,EACJ,EAAE;IACjB,IAAI,gCAAgC,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;QACvD,OAAO,WAAW,CAAC;IACrB,CAAC;IACD,MAAM,SAAS,GAAG,gCAAgC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACrE,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC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AC,KAAK,EAAE,CAAC,CAAC;gBACzD,CAAC;gBACD,KAAK,MAAM,QAAQ,IAAI,oBAAoB,EAAE,CAAC;oBAC5C,aAAa,CAAC,IAAI,CAAC,0BAA0B,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;gBACjE,CAAC;YACH,CAAC;YAED,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC1B,OAAO,IAAI,CAAC;YACd,CAAC;YACD,OAAO;gBACL,WAAW,EAAE,QAAQ,CAAC,WAAW;gBACjC,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;gBAC9B,aAAa;aACd,CAAC;QACJ,CAAC,CAAC;IAtaC,CAAC;CAuaL;AAzbD,0EAybC"}
|
|
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,GAAG,CAAC,GAAG,EAAE,CAAC;AAEhE,MAAM,gCAAgC,GACpC,mEAAmE,CAAC;AAEtE,MAAM,gCAAgC,GACpC,kEAAkE,CAAC;AAE9D,MAAM,mCAAmC,GAAG,CACjD,WAAmB,EACJ,EAAE;IACjB,IAAI,gCAAgC,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;QACvD,OAAO,WAAW,C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AC,QAAQ,EAAE,EAAE,CACX,CAAC,QAAQ,CAAC,wBAAwB;gBAClC,QAAQ,CAAC,cAAc,IAAI,UAAU,CAAC,+BAA+B;gBACrE,QAAQ,CAAC,aAAa,IAAI,UAAU,CAAC,8BAA8B,CACtE,CAAC;YACF,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,IAAI,oBAAoB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAChE,QAAQ,CAAC,IAAI,CACX,IAAI,CAAC,eAAe,CAAC,sBAAsB,CAAC;oBAC1C,aAAa;oBACb,oBAAoB;iBACrB,CAAC,CACH,CAAC;gBACF,KAAK,MAAM,QAAQ,IAAI,aAAa,EAAE,CAAC;oBACrC,aAAa,CAAC,IAAI,CAAC,kBAAkB,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;gBACzD,CAAC;gBACD,KAAK,MAAM,QAAQ,IAAI,oBAAoB,EAAE,CAAC;oBAC5C,aAAa,CAAC,IAAI,CAAC,0BAA0B,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;gBACjE,CAAC;YACH,CAAC;YAED,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC1B,OAAO,IAAI,CAAC;YACd,CAAC;YACD,OAAO;gBACL,WAAW,EAAE,QAAQ,CAAC,WAAW;gBACjC,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;gBAC9B,aAAa;aACd,CAAC;QACJ,CAAC,CAAC;IAtbC,CAAC;CAubL;AAzcD,0EAycC"}
|
package/package.json
CHANGED
|
@@ -205,19 +205,49 @@ describe('notifySilentTmuxSessions', () => {
|
|
|
205
205
|
expect(sendCall).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
|
};
|
|
@@ -331,7 +331,7 @@ describe('NotifySilentLiveSessionsUseCase', () => {
|
|
|
331
331
|
).toHaveBeenCalledWith(pullRequestSession, MAIN_STALLED_SECTION);
|
|
332
332
|
});
|
|
333
333
|
|
|
334
|
-
it('excludes a non-github-named session
|
|
334
|
+
it('excludes a non-github-named session that has no resolvable transcript so it is never notified', async () => {
|
|
335
335
|
mockSnapshotProvider.getSnapshot.mockResolvedValue(
|
|
336
336
|
snapshotWithSessions(['workbench']),
|
|
337
337
|
);
|
|
@@ -347,9 +347,9 @@ describe('NotifySilentLiveSessionsUseCase', () => {
|
|
|
347
347
|
|
|
348
348
|
await useCase.run(runParams());
|
|
349
349
|
|
|
350
|
-
expect(mockTranscriptResolver.resolveTranscriptPaths).toHaveBeenCalledWith(
|
|
351
|
-
|
|
352
|
-
);
|
|
350
|
+
expect(mockTranscriptResolver.resolveTranscriptPaths).toHaveBeenCalledWith([
|
|
351
|
+
sessionFor('workbench'),
|
|
352
|
+
]);
|
|
353
353
|
expect(
|
|
354
354
|
mockSubAgentActivityRepository.listSubAgentActivitiesBySessionName,
|
|
355
355
|
).toHaveBeenCalledWith([], new Map());
|
|
@@ -361,7 +361,7 @@ describe('NotifySilentLiveSessionsUseCase', () => {
|
|
|
361
361
|
).not.toHaveBeenCalled();
|
|
362
362
|
});
|
|
363
363
|
|
|
364
|
-
it('monitors
|
|
364
|
+
it('monitors the github-named session and excludes a non-github-named session that has no resolvable transcript', async () => {
|
|
365
365
|
mockSnapshotProvider.getSnapshot.mockResolvedValue(
|
|
366
366
|
snapshotWithSessions([GITHUB_SESSION, 'orchestrator']),
|
|
367
367
|
);
|
|
@@ -387,6 +387,7 @@ describe('NotifySilentLiveSessionsUseCase', () => {
|
|
|
387
387
|
|
|
388
388
|
expect(mockTranscriptResolver.resolveTranscriptPaths).toHaveBeenCalledWith([
|
|
389
389
|
sessionFor(GITHUB_SESSION),
|
|
390
|
+
sessionFor('orchestrator'),
|
|
390
391
|
]);
|
|
391
392
|
expect(
|
|
392
393
|
mockNotificationRepository.sendSelfCheckNotification,
|
|
@@ -691,6 +692,117 @@ describe('NotifySilentLiveSessionsUseCase', () => {
|
|
|
691
692
|
).not.toHaveBeenCalled();
|
|
692
693
|
});
|
|
693
694
|
|
|
695
|
+
describe('role-named resident leader and PM agent sessions', () => {
|
|
696
|
+
it('reminds a role-named leader agent session that has a resolvable transcript and is silent past the threshold', async () => {
|
|
697
|
+
setupLiveInteractiveSession('secretary');
|
|
698
|
+
mockSessionOutputActivityRepository.listSessionOutputActivities.mockResolvedValue(
|
|
699
|
+
[
|
|
700
|
+
{
|
|
701
|
+
sessionName: 'secretary',
|
|
702
|
+
lastOutputEpochSeconds:
|
|
703
|
+
nowEpochSeconds - DEFAULT_MAIN_SILENT_THRESHOLD_SECONDS,
|
|
704
|
+
},
|
|
705
|
+
],
|
|
706
|
+
);
|
|
707
|
+
|
|
708
|
+
await useCase.run(runParams());
|
|
709
|
+
|
|
710
|
+
expect(
|
|
711
|
+
mockMessageComposer.composeMainStalledSection,
|
|
712
|
+
).toHaveBeenCalledWith(DEFAULT_MAIN_SILENT_THRESHOLD_SECONDS);
|
|
713
|
+
expect(
|
|
714
|
+
mockNotificationRepository.sendSelfCheckNotification,
|
|
715
|
+
).toHaveBeenCalledWith('secretary', MAIN_STALLED_SECTION);
|
|
716
|
+
});
|
|
717
|
+
|
|
718
|
+
it('excludes a non-agent interactive session with no resolvable transcript (for example a viewer named sso_login)', async () => {
|
|
719
|
+
mockSnapshotProvider.getSnapshot.mockResolvedValue(
|
|
720
|
+
snapshotWithSessions(['sso_login']),
|
|
721
|
+
);
|
|
722
|
+
mockSessionOutputActivityRepository.listSessionOutputActivities.mockResolvedValue(
|
|
723
|
+
[
|
|
724
|
+
{
|
|
725
|
+
sessionName: 'sso_login',
|
|
726
|
+
lastOutputEpochSeconds:
|
|
727
|
+
nowEpochSeconds - DEFAULT_MAIN_SILENT_THRESHOLD_SECONDS,
|
|
728
|
+
},
|
|
729
|
+
],
|
|
730
|
+
);
|
|
731
|
+
|
|
732
|
+
await useCase.run(runParams());
|
|
733
|
+
|
|
734
|
+
expect(
|
|
735
|
+
mockTranscriptResolver.resolveTranscriptPaths,
|
|
736
|
+
).toHaveBeenCalledWith([sessionFor('sso_login')]);
|
|
737
|
+
expect(
|
|
738
|
+
mockMessageComposer.composeMainStalledSection,
|
|
739
|
+
).not.toHaveBeenCalled();
|
|
740
|
+
expect(
|
|
741
|
+
mockNotificationRepository.sendSelfCheckNotification,
|
|
742
|
+
).not.toHaveBeenCalled();
|
|
743
|
+
});
|
|
744
|
+
|
|
745
|
+
it('reminds both a github-named session and a role-named leader session in the same cycle', async () => {
|
|
746
|
+
mockSnapshotProvider.getSnapshot.mockResolvedValue(
|
|
747
|
+
snapshotWithSessions([GITHUB_SESSION, 'app']),
|
|
748
|
+
);
|
|
749
|
+
mockTranscriptResolver.resolveTranscriptPaths.mockReturnValue(
|
|
750
|
+
transcriptMapFor([GITHUB_SESSION, 'app']),
|
|
751
|
+
);
|
|
752
|
+
mockSessionOutputActivityRepository.listSessionOutputActivities.mockResolvedValue(
|
|
753
|
+
[
|
|
754
|
+
{
|
|
755
|
+
sessionName: GITHUB_SESSION,
|
|
756
|
+
lastOutputEpochSeconds:
|
|
757
|
+
nowEpochSeconds - DEFAULT_MAIN_SILENT_THRESHOLD_SECONDS,
|
|
758
|
+
},
|
|
759
|
+
{
|
|
760
|
+
sessionName: 'app',
|
|
761
|
+
lastOutputEpochSeconds:
|
|
762
|
+
nowEpochSeconds - DEFAULT_MAIN_SILENT_THRESHOLD_SECONDS,
|
|
763
|
+
},
|
|
764
|
+
],
|
|
765
|
+
);
|
|
766
|
+
|
|
767
|
+
await useCase.run(runParams());
|
|
768
|
+
|
|
769
|
+
expect(
|
|
770
|
+
mockNotificationRepository.sendSelfCheckNotification,
|
|
771
|
+
).toHaveBeenCalledTimes(2);
|
|
772
|
+
expect(
|
|
773
|
+
mockNotificationRepository.sendSelfCheckNotification,
|
|
774
|
+
).toHaveBeenCalledWith(GITHUB_SESSION, MAIN_STALLED_SECTION);
|
|
775
|
+
expect(
|
|
776
|
+
mockNotificationRepository.sendSelfCheckNotification,
|
|
777
|
+
).toHaveBeenCalledWith('app', MAIN_STALLED_SECTION);
|
|
778
|
+
});
|
|
779
|
+
|
|
780
|
+
it('parks a role-named leader session while its latest owner call is unanswered', async () => {
|
|
781
|
+
setupLiveInteractiveSession('uminopm');
|
|
782
|
+
mockSessionOutputActivityRepository.listSessionOutputActivities.mockResolvedValue(
|
|
783
|
+
[
|
|
784
|
+
{
|
|
785
|
+
sessionName: 'uminopm',
|
|
786
|
+
lastOutputEpochSeconds:
|
|
787
|
+
nowEpochSeconds - DEFAULT_MAIN_SILENT_THRESHOLD_SECONDS,
|
|
788
|
+
},
|
|
789
|
+
],
|
|
790
|
+
);
|
|
791
|
+
mockOwnerCallStatusProvider.listUnansweredOwnerCallEpochSecondsBySessionName.mockResolvedValue(
|
|
792
|
+
new Map([['uminopm', nowEpochSeconds - 60]]),
|
|
793
|
+
);
|
|
794
|
+
|
|
795
|
+
await useCase.run(runParams());
|
|
796
|
+
|
|
797
|
+
expect(
|
|
798
|
+
mockMessageComposer.composeMainStalledSection,
|
|
799
|
+
).not.toHaveBeenCalled();
|
|
800
|
+
expect(
|
|
801
|
+
mockNotificationRepository.sendSelfCheckNotification,
|
|
802
|
+
).not.toHaveBeenCalled();
|
|
803
|
+
});
|
|
804
|
+
});
|
|
805
|
+
|
|
694
806
|
it('notifies a persistent stall only once per silent episode instead of every cycle', async () => {
|
|
695
807
|
wireStatefulNotifiedLatch();
|
|
696
808
|
setupLiveInteractiveSession(GITHUB_SESSION);
|
|
@@ -1221,15 +1333,15 @@ describe('NotifySilentLiveSessionsUseCase', () => {
|
|
|
1221
1333
|
).not.toHaveBeenCalled();
|
|
1222
1334
|
});
|
|
1223
1335
|
|
|
1224
|
-
it('
|
|
1225
|
-
setupSilentMainSession('
|
|
1336
|
+
it('does not consult the hub-task resolver for a role-named leader session that has no hub task URL, and still reminds it', async () => {
|
|
1337
|
+
setupSilentMainSession('tdpm-cli');
|
|
1226
1338
|
|
|
1227
1339
|
await useCase.run(runParams({ activeHubTaskStatus: ACTIVE_STATUS }));
|
|
1228
1340
|
|
|
1229
1341
|
expect(mockHubTaskStatusResolver.getIssueByUrl).not.toHaveBeenCalled();
|
|
1230
1342
|
expect(
|
|
1231
1343
|
mockNotificationRepository.sendSelfCheckNotification,
|
|
1232
|
-
).
|
|
1344
|
+
).toHaveBeenCalledWith('tdpm-cli', MAIN_STALLED_SECTION);
|
|
1233
1345
|
});
|
|
1234
1346
|
|
|
1235
1347
|
it('does not call the resolver at all when the active status is unconfigured', async () => {
|
|
@@ -99,20 +99,36 @@ export class NotifySilentLiveSessionsUseCase {
|
|
|
99
99
|
await this.liveSessionProcessSnapshotProvider.getSnapshot();
|
|
100
100
|
const allInteractiveSessions =
|
|
101
101
|
this.resolveInteractiveLiveSessions.resolve(snapshot);
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
// Resolve the on-disk Claude transcript for every interactive session
|
|
103
|
+
// before any name-based narrowing. A resolvable transcript is the proof
|
|
104
|
+
// that a session is a live Claude agent session (its transcript, keyed by
|
|
105
|
+
// the session id, is actively present on disk), independent of how the tmux
|
|
106
|
+
// session is named.
|
|
107
|
+
const transcriptPathBySessionName =
|
|
108
|
+
this.interactiveLiveSessionTranscriptResolver.resolveTranscriptPaths(
|
|
109
|
+
allInteractiveSessions,
|
|
110
|
+
);
|
|
111
|
+
// Monitor a session when it is either named after a github.com issue or
|
|
112
|
+
// pull-request URL (the hub-task sessions) or has a resolvable Claude agent
|
|
113
|
+
// transcript (role-named resident leader / PM agent sessions such as app,
|
|
114
|
+
// tdpm-cli, secretary, and the per-project *pm sessions). Gating the
|
|
115
|
+
// broadened inclusion on the resolvable transcript rather than on merely
|
|
116
|
+
// being a tmux session keeps the fail-direction safe: a genuine non-agent
|
|
117
|
+
// interactive session — a login shell, or a viewer such as sso_login or a
|
|
118
|
+
// tdpm viewer — exposes no Claude transcript on disk, so it is still
|
|
119
|
+
// excluded and never reminded.
|
|
120
|
+
const interactiveSessions = allInteractiveSessions.filter(
|
|
121
|
+
(session) =>
|
|
122
|
+
isGitHubIssueOrPullRequestSessionName(session.sessionName) ||
|
|
123
|
+
transcriptPathBySessionName.has(session.sessionName),
|
|
104
124
|
);
|
|
105
|
-
const
|
|
125
|
+
const skippedNonAgentSessionCount =
|
|
106
126
|
allInteractiveSessions.length - interactiveSessions.length;
|
|
107
|
-
if (
|
|
127
|
+
if (skippedNonAgentSessionCount > 0) {
|
|
108
128
|
console.log(
|
|
109
|
-
`Silent live session notification: ignoring ${
|
|
129
|
+
`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.`,
|
|
110
130
|
);
|
|
111
131
|
}
|
|
112
|
-
const transcriptPathBySessionName =
|
|
113
|
-
this.interactiveLiveSessionTranscriptResolver.resolveTranscriptPaths(
|
|
114
|
-
interactiveSessions,
|
|
115
|
-
);
|
|
116
132
|
|
|
117
133
|
// A session whose most recent assistant turn is a model refusal is
|
|
118
134
|
// excluded from ALL reminder candidates (main-stall and sub-agent
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotifySilentLiveSessionsUseCase.d.ts","sourceRoot":"","sources":["../../../src/domain/usecases/NotifySilentLiveSessionsUseCase.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kCAAkC,EAAE,MAAM,yDAAyD,CAAC;AAC7G,OAAO,EAAE,wCAAwC,EAAE,MAAM,+DAA+D,CAAC;AACzH,OAAO,EAAE,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