github-issue-tower-defence-management 1.109.1 → 1.110.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.
- package/CHANGELOG.md +19 -0
- package/README.md +29 -3
- package/bin/adapter/entry-points/cli/index.js +10 -10
- package/bin/adapter/entry-points/cli/index.js.map +1 -1
- package/bin/adapter/entry-points/console/dashboardComposeService.js +7 -6
- package/bin/adapter/entry-points/console/dashboardComposeService.js.map +1 -1
- package/bin/adapter/entry-points/console/ui-dist/assets/{index-CO-f_j4f.css → index-BPH6W1yn.css} +1 -1
- package/bin/adapter/entry-points/console/ui-dist/assets/index-CT3t4Yje.js +101 -0
- package/bin/adapter/entry-points/console/ui-dist/index.html +2 -2
- package/bin/adapter/entry-points/console/webServer.js +5 -4
- package/bin/adapter/entry-points/console/webServer.js.map +1 -1
- package/bin/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.js +125 -2
- package/bin/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.js.map +1 -1
- package/bin/adapter/entry-points/handlers/InTmuxByHumanSessionTokenCountHandler.js +2 -0
- package/bin/adapter/entry-points/handlers/InTmuxByHumanSessionTokenCountHandler.js.map +1 -1
- package/bin/adapter/entry-points/handlers/LiveSessionOauthTokenSelectHandler.js +2 -0
- package/bin/adapter/entry-points/handlers/LiveSessionOauthTokenSelectHandler.js.map +1 -1
- package/bin/adapter/entry-points/handlers/OauthTokenSelectHandler.js +2 -0
- package/bin/adapter/entry-points/handlers/OauthTokenSelectHandler.js.map +1 -1
- package/bin/adapter/entry-points/handlers/notifySilentTmuxSessions.js +62 -0
- package/bin/adapter/entry-points/handlers/notifySilentTmuxSessions.js.map +1 -0
- package/bin/adapter/entry-points/handlers/tokenStatusWriter.js +88 -3
- package/bin/adapter/entry-points/handlers/tokenStatusWriter.js.map +1 -1
- package/bin/adapter/proxy/RateLimitCache.js +25 -1
- package/bin/adapter/proxy/RateLimitCache.js.map +1 -1
- package/bin/adapter/proxy/proxyEntry.js +25 -0
- package/bin/adapter/proxy/proxyEntry.js.map +1 -1
- package/bin/adapter/repositories/ConfigurableSilentSessionMessageComposer.js +37 -0
- package/bin/adapter/repositories/ConfigurableSilentSessionMessageComposer.js.map +1 -0
- package/bin/adapter/repositories/FileSystemSessionOutputActivityRepository.js +76 -0
- package/bin/adapter/repositories/FileSystemSessionOutputActivityRepository.js.map +1 -0
- package/bin/adapter/repositories/FileSystemSubAgentSilentSecondsResolver.js +67 -0
- package/bin/adapter/repositories/FileSystemSubAgentSilentSecondsResolver.js.map +1 -0
- package/bin/adapter/repositories/FileSystemSubAgentTranscriptDirectoryResolver.js +50 -0
- package/bin/adapter/repositories/FileSystemSubAgentTranscriptDirectoryResolver.js.map +1 -0
- package/bin/adapter/repositories/NoUnansweredOwnerCallStatusProvider.js +12 -0
- package/bin/adapter/repositories/NoUnansweredOwnerCallStatusProvider.js.map +1 -0
- package/bin/adapter/repositories/NodeSubAgentProcessLister.js +37 -0
- package/bin/adapter/repositories/NodeSubAgentProcessLister.js.map +1 -0
- package/bin/adapter/repositories/ProcessListSessionSubAgentActivityRepository.js +48 -0
- package/bin/adapter/repositories/ProcessListSessionSubAgentActivityRepository.js.map +1 -0
- package/bin/adapter/repositories/RealSleeper.js +17 -0
- package/bin/adapter/repositories/RealSleeper.js.map +1 -0
- package/bin/adapter/repositories/TmuxSilentSessionNotificationRepository.js +56 -0
- package/bin/adapter/repositories/TmuxSilentSessionNotificationRepository.js.map +1 -0
- package/bin/adapter/repositories/TranscriptOwnerCallStatusProvider.js +150 -0
- package/bin/adapter/repositories/TranscriptOwnerCallStatusProvider.js.map +1 -0
- package/bin/adapter/repositories/TranscriptSessionSubAgentActivityRepository.js +152 -0
- package/bin/adapter/repositories/TranscriptSessionSubAgentActivityRepository.js.map +1 -0
- package/bin/domain/entities/LiveSessionActivitySnapshot.js +3 -0
- package/bin/domain/entities/LiveSessionActivitySnapshot.js.map +1 -0
- package/bin/domain/entities/LiveSessionOutputActivity.js +3 -0
- package/bin/domain/entities/LiveSessionOutputActivity.js.map +1 -0
- package/bin/domain/usecases/DefaultSilentSessionMessageComposer.js +35 -0
- package/bin/domain/usecases/DefaultSilentSessionMessageComposer.js.map +1 -0
- package/bin/domain/usecases/NotifySilentLiveSessionsUseCase.js +113 -0
- package/bin/domain/usecases/NotifySilentLiveSessionsUseCase.js.map +1 -0
- package/bin/domain/usecases/OauthTokenSelectUseCase.js +8 -2
- package/bin/domain/usecases/OauthTokenSelectUseCase.js.map +1 -1
- package/bin/domain/usecases/adapter-interfaces/OwnerCallStatusProvider.js +3 -0
- package/bin/domain/usecases/adapter-interfaces/OwnerCallStatusProvider.js.map +1 -0
- package/bin/domain/usecases/adapter-interfaces/SessionOutputActivityRepository.js +3 -0
- package/bin/domain/usecases/adapter-interfaces/SessionOutputActivityRepository.js.map +1 -0
- package/bin/domain/usecases/adapter-interfaces/SessionSubAgentActivityRepository.js +3 -0
- package/bin/domain/usecases/adapter-interfaces/SessionSubAgentActivityRepository.js.map +1 -0
- package/bin/domain/usecases/adapter-interfaces/SilentSessionMessageComposer.js +3 -0
- package/bin/domain/usecases/adapter-interfaces/SilentSessionMessageComposer.js.map +1 -0
- package/bin/domain/usecases/adapter-interfaces/SilentSessionNotificationRepository.js +3 -0
- package/bin/domain/usecases/adapter-interfaces/SilentSessionNotificationRepository.js.map +1 -0
- package/bin/domain/usecases/adapter-interfaces/Sleeper.js +3 -0
- package/bin/domain/usecases/adapter-interfaces/Sleeper.js.map +1 -0
- package/bin/domain/usecases/adapter-interfaces/SubAgentProcessLister.js +3 -0
- package/bin/domain/usecases/adapter-interfaces/SubAgentProcessLister.js.map +1 -0
- package/bin/domain/usecases/adapter-interfaces/SubAgentSilentSecondsResolver.js +3 -0
- package/bin/domain/usecases/adapter-interfaces/SubAgentSilentSecondsResolver.js.map +1 -0
- package/bin/domain/usecases/adapter-interfaces/SubAgentTranscriptDirectoryResolver.js +3 -0
- package/bin/domain/usecases/adapter-interfaces/SubAgentTranscriptDirectoryResolver.js.map +1 -0
- package/bin/domain/usecases/dashboard/DashboardProjectCode.js +19 -0
- package/bin/domain/usecases/dashboard/DashboardProjectCode.js.map +1 -0
- package/package.json +1 -1
- package/src/adapter/entry-points/cli/index.ts +14 -14
- package/src/adapter/entry-points/console/dashboardComposeService.test.ts +31 -28
- package/src/adapter/entry-points/console/dashboardComposeService.ts +13 -10
- package/src/adapter/entry-points/console/dashboardEmitterComposerKey.test.ts +175 -0
- package/src/adapter/entry-points/console/ui/e2e/consoleTestHarness.ts +1 -1
- package/src/adapter/entry-points/console/ui/src/features/console/components/detail/ConsoleCopyUrlButton.stories.tsx +24 -0
- package/src/adapter/entry-points/console/ui/src/features/console/components/detail/ConsoleCopyUrlButton.test.tsx +63 -0
- package/src/adapter/entry-points/console/ui/src/features/console/components/detail/ConsoleCopyUrlButton.tsx +51 -0
- package/src/adapter/entry-points/console/ui/src/features/console/components/detail/ConsoleItemDetail.test.tsx +7 -0
- package/src/adapter/entry-points/console/ui/src/features/console/components/detail/ConsoleItemDetail.tsx +2 -0
- package/src/adapter/entry-points/console/ui/src/features/console/components/detail/ConsolePullRequestDetail.test.tsx +18 -0
- package/src/adapter/entry-points/console/ui/src/features/console/components/detail/ConsolePullRequestDetail.tsx +2 -0
- package/src/adapter/entry-points/console/ui/src/index.css +14 -0
- package/src/adapter/entry-points/console/ui-dist/assets/{index-CO-f_j4f.css → index-BPH6W1yn.css} +1 -1
- package/src/adapter/entry-points/console/ui-dist/assets/index-CT3t4Yje.js +101 -0
- package/src/adapter/entry-points/console/ui-dist/index.html +2 -2
- package/src/adapter/entry-points/console/webServer.test.ts +23 -23
- package/src/adapter/entry-points/console/webServer.ts +5 -4
- package/src/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.ts +122 -0
- package/src/adapter/entry-points/handlers/InTmuxByHumanSessionTokenCountHandler.ts +2 -0
- package/src/adapter/entry-points/handlers/LiveSessionOauthTokenSelectHandler.test.ts +112 -0
- package/src/adapter/entry-points/handlers/LiveSessionOauthTokenSelectHandler.ts +2 -0
- package/src/adapter/entry-points/handlers/OauthTokenSelectHandler.test.ts +131 -0
- package/src/adapter/entry-points/handlers/OauthTokenSelectHandler.ts +2 -0
- package/src/adapter/entry-points/handlers/notifySilentTmuxSessions.test.ts +338 -0
- package/src/adapter/entry-points/handlers/notifySilentTmuxSessions.ts +174 -0
- package/src/adapter/entry-points/handlers/tokenStatusWriter.test.ts +79 -0
- package/src/adapter/entry-points/handlers/tokenStatusWriter.ts +117 -3
- package/src/adapter/proxy/RateLimitCache.test.ts +89 -0
- package/src/adapter/proxy/RateLimitCache.ts +31 -0
- package/src/adapter/proxy/proxyEntry.test.ts +92 -0
- package/src/adapter/proxy/proxyEntry.ts +32 -0
- package/src/adapter/repositories/ConfigurableSilentSessionMessageComposer.test.ts +77 -0
- package/src/adapter/repositories/ConfigurableSilentSessionMessageComposer.ts +51 -0
- package/src/adapter/repositories/FileSystemSessionOutputActivityRepository.test.ts +92 -0
- package/src/adapter/repositories/FileSystemSessionOutputActivityRepository.ts +48 -0
- package/src/adapter/repositories/FileSystemSubAgentSilentSecondsResolver.test.ts +56 -0
- package/src/adapter/repositories/FileSystemSubAgentSilentSecondsResolver.ts +32 -0
- package/src/adapter/repositories/FileSystemSubAgentTranscriptDirectoryResolver.test.ts +32 -0
- package/src/adapter/repositories/FileSystemSubAgentTranscriptDirectoryResolver.ts +17 -0
- package/src/adapter/repositories/NoUnansweredOwnerCallStatusProvider.test.ts +12 -0
- package/src/adapter/repositories/NoUnansweredOwnerCallStatusProvider.ts +9 -0
- package/src/adapter/repositories/NodeSubAgentProcessLister.test.ts +43 -0
- package/src/adapter/repositories/NodeSubAgentProcessLister.ts +40 -0
- package/src/adapter/repositories/ProcessListSessionSubAgentActivityRepository.test.ts +109 -0
- package/src/adapter/repositories/ProcessListSessionSubAgentActivityRepository.ts +56 -0
- package/src/adapter/repositories/RealSleeper.test.ts +19 -0
- package/src/adapter/repositories/RealSleeper.ts +12 -0
- package/src/adapter/repositories/TmuxSilentSessionNotificationRepository.test.ts +153 -0
- package/src/adapter/repositories/TmuxSilentSessionNotificationRepository.ts +83 -0
- package/src/adapter/repositories/TranscriptOwnerCallStatusProvider.test.ts +220 -0
- package/src/adapter/repositories/TranscriptOwnerCallStatusProvider.ts +139 -0
- package/src/adapter/repositories/TranscriptSessionSubAgentActivityRepository.test.ts +217 -0
- package/src/adapter/repositories/TranscriptSessionSubAgentActivityRepository.ts +145 -0
- package/src/domain/entities/LiveSessionActivitySnapshot.ts +12 -0
- package/src/domain/entities/LiveSessionOutputActivity.ts +4 -0
- package/src/domain/usecases/DefaultSilentSessionMessageComposer.test.ts +52 -0
- package/src/domain/usecases/DefaultSilentSessionMessageComposer.ts +39 -0
- package/src/domain/usecases/InTmuxByHumanSessionTokenCountUseCase.test.ts +2 -0
- package/src/domain/usecases/LiveSessionOauthTokenSelectUseCase.test.ts +40 -0
- package/src/domain/usecases/NotifySilentLiveSessionsUseCase.test.ts +612 -0
- package/src/domain/usecases/NotifySilentLiveSessionsUseCase.ts +223 -0
- package/src/domain/usecases/OauthTokenSelectUseCase.test.ts +36 -0
- package/src/domain/usecases/OauthTokenSelectUseCase.ts +12 -0
- package/src/domain/usecases/adapter-interfaces/OwnerCallStatusProvider.ts +5 -0
- package/src/domain/usecases/adapter-interfaces/SessionOutputActivityRepository.ts +7 -0
- package/src/domain/usecases/adapter-interfaces/SessionSubAgentActivityRepository.ts +7 -0
- package/src/domain/usecases/adapter-interfaces/SilentSessionMessageComposer.ts +6 -0
- package/src/domain/usecases/adapter-interfaces/SilentSessionNotificationRepository.ts +11 -0
- package/src/domain/usecases/adapter-interfaces/Sleeper.ts +3 -0
- package/src/domain/usecases/adapter-interfaces/SubAgentProcessLister.ts +8 -0
- package/src/domain/usecases/adapter-interfaces/SubAgentSilentSecondsResolver.ts +3 -0
- package/src/domain/usecases/adapter-interfaces/SubAgentTranscriptDirectoryResolver.ts +3 -0
- package/src/domain/usecases/dashboard/DashboardProjectCode.test.ts +32 -0
- package/src/domain/usecases/dashboard/DashboardProjectCode.ts +20 -0
- package/types/adapter/entry-points/console/dashboardComposeService.d.ts +1 -1
- package/types/adapter/entry-points/console/dashboardComposeService.d.ts.map +1 -1
- package/types/adapter/entry-points/console/webServer.d.ts +2 -2
- package/types/adapter/entry-points/console/webServer.d.ts.map +1 -1
- package/types/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.d.ts.map +1 -1
- package/types/adapter/entry-points/handlers/InTmuxByHumanSessionTokenCountHandler.d.ts.map +1 -1
- package/types/adapter/entry-points/handlers/LiveSessionOauthTokenSelectHandler.d.ts.map +1 -1
- package/types/adapter/entry-points/handlers/OauthTokenSelectHandler.d.ts.map +1 -1
- package/types/adapter/entry-points/handlers/notifySilentTmuxSessions.d.ts +34 -0
- package/types/adapter/entry-points/handlers/notifySilentTmuxSessions.d.ts.map +1 -0
- package/types/adapter/entry-points/handlers/tokenStatusWriter.d.ts +1 -0
- package/types/adapter/entry-points/handlers/tokenStatusWriter.d.ts.map +1 -1
- package/types/adapter/proxy/RateLimitCache.d.ts +3 -0
- package/types/adapter/proxy/RateLimitCache.d.ts.map +1 -1
- package/types/adapter/proxy/proxyEntry.d.ts.map +1 -1
- package/types/adapter/repositories/ConfigurableSilentSessionMessageComposer.d.ts +15 -0
- package/types/adapter/repositories/ConfigurableSilentSessionMessageComposer.d.ts.map +1 -0
- package/types/adapter/repositories/FileSystemSessionOutputActivityRepository.d.ts +10 -0
- package/types/adapter/repositories/FileSystemSessionOutputActivityRepository.d.ts.map +1 -0
- package/types/adapter/repositories/FileSystemSubAgentSilentSecondsResolver.d.ts +9 -0
- package/types/adapter/repositories/FileSystemSubAgentSilentSecondsResolver.d.ts.map +1 -0
- package/types/adapter/repositories/FileSystemSubAgentTranscriptDirectoryResolver.d.ts +7 -0
- package/types/adapter/repositories/FileSystemSubAgentTranscriptDirectoryResolver.d.ts.map +1 -0
- package/types/adapter/repositories/NoUnansweredOwnerCallStatusProvider.d.ts +5 -0
- package/types/adapter/repositories/NoUnansweredOwnerCallStatusProvider.d.ts.map +1 -0
- package/types/adapter/repositories/NodeSubAgentProcessLister.d.ts +8 -0
- package/types/adapter/repositories/NodeSubAgentProcessLister.d.ts.map +1 -0
- package/types/adapter/repositories/ProcessListSessionSubAgentActivityRepository.d.ts +12 -0
- package/types/adapter/repositories/ProcessListSessionSubAgentActivityRepository.d.ts.map +1 -0
- package/types/adapter/repositories/RealSleeper.d.ts +5 -0
- package/types/adapter/repositories/RealSleeper.d.ts.map +1 -0
- package/types/adapter/repositories/TmuxSilentSessionNotificationRepository.d.ts +13 -0
- package/types/adapter/repositories/TmuxSilentSessionNotificationRepository.d.ts.map +1 -0
- package/types/adapter/repositories/TranscriptOwnerCallStatusProvider.d.ts +10 -0
- package/types/adapter/repositories/TranscriptOwnerCallStatusProvider.d.ts.map +1 -0
- package/types/adapter/repositories/TranscriptSessionSubAgentActivityRepository.d.ts +12 -0
- package/types/adapter/repositories/TranscriptSessionSubAgentActivityRepository.d.ts.map +1 -0
- package/types/domain/entities/LiveSessionActivitySnapshot.d.ts +12 -0
- package/types/domain/entities/LiveSessionActivitySnapshot.d.ts.map +1 -0
- package/types/domain/entities/LiveSessionOutputActivity.d.ts +5 -0
- package/types/domain/entities/LiveSessionOutputActivity.d.ts.map +1 -0
- package/types/domain/usecases/DefaultSilentSessionMessageComposer.d.ts +7 -0
- package/types/domain/usecases/DefaultSilentSessionMessageComposer.d.ts.map +1 -0
- package/types/domain/usecases/NotifySilentLiveSessionsUseCase.d.ts +41 -0
- package/types/domain/usecases/NotifySilentLiveSessionsUseCase.d.ts.map +1 -0
- package/types/domain/usecases/OauthTokenSelectUseCase.d.ts +2 -0
- package/types/domain/usecases/OauthTokenSelectUseCase.d.ts.map +1 -1
- package/types/domain/usecases/adapter-interfaces/OwnerCallStatusProvider.d.ts +4 -0
- package/types/domain/usecases/adapter-interfaces/OwnerCallStatusProvider.d.ts.map +1 -0
- package/types/domain/usecases/adapter-interfaces/SessionOutputActivityRepository.d.ts +5 -0
- package/types/domain/usecases/adapter-interfaces/SessionOutputActivityRepository.d.ts.map +1 -0
- package/types/domain/usecases/adapter-interfaces/SessionSubAgentActivityRepository.d.ts +5 -0
- package/types/domain/usecases/adapter-interfaces/SessionSubAgentActivityRepository.d.ts.map +1 -0
- package/types/domain/usecases/adapter-interfaces/SilentSessionMessageComposer.d.ts +6 -0
- package/types/domain/usecases/adapter-interfaces/SilentSessionMessageComposer.d.ts.map +1 -0
- package/types/domain/usecases/adapter-interfaces/SilentSessionNotificationRepository.d.ts +6 -0
- package/types/domain/usecases/adapter-interfaces/SilentSessionNotificationRepository.d.ts.map +1 -0
- package/types/domain/usecases/adapter-interfaces/Sleeper.d.ts +4 -0
- package/types/domain/usecases/adapter-interfaces/Sleeper.d.ts.map +1 -0
- package/types/domain/usecases/adapter-interfaces/SubAgentProcessLister.d.ts +8 -0
- package/types/domain/usecases/adapter-interfaces/SubAgentProcessLister.d.ts.map +1 -0
- package/types/domain/usecases/adapter-interfaces/SubAgentSilentSecondsResolver.d.ts +4 -0
- package/types/domain/usecases/adapter-interfaces/SubAgentSilentSecondsResolver.d.ts.map +1 -0
- package/types/domain/usecases/adapter-interfaces/SubAgentTranscriptDirectoryResolver.d.ts +4 -0
- package/types/domain/usecases/adapter-interfaces/SubAgentTranscriptDirectoryResolver.d.ts.map +1 -0
- package/types/domain/usecases/dashboard/DashboardProjectCode.d.ts +4 -0
- package/types/domain/usecases/dashboard/DashboardProjectCode.d.ts.map +1 -0
- package/bin/adapter/entry-points/console/ui-dist/assets/index-BpccigBS.js +0 -101
- package/src/adapter/entry-points/console/ui-dist/assets/index-BpccigBS.js +0 -101
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import { Issue } from '../entities/Issue';
|
|
2
|
+
import { LiveSessionActivitySnapshot } from '../entities/LiveSessionActivitySnapshot';
|
|
3
|
+
import { Project } from '../entities/Project';
|
|
4
|
+
import { IN_TMUX_STATUS_NAME } from '../entities/WorkflowStatus';
|
|
5
|
+
import { IssueRepository } from './adapter-interfaces/IssueRepository';
|
|
6
|
+
import { OwnerCallStatusProvider } from './adapter-interfaces/OwnerCallStatusProvider';
|
|
7
|
+
import { SessionOutputActivityRepository } from './adapter-interfaces/SessionOutputActivityRepository';
|
|
8
|
+
import { SessionSubAgentActivityRepository } from './adapter-interfaces/SessionSubAgentActivityRepository';
|
|
9
|
+
import { SilentSessionMessageComposer } from './adapter-interfaces/SilentSessionMessageComposer';
|
|
10
|
+
import { SilentSessionNotificationRepository } from './adapter-interfaces/SilentSessionNotificationRepository';
|
|
11
|
+
import { Sleeper } from './adapter-interfaces/Sleeper';
|
|
12
|
+
import { TmuxSessionRepository } from './adapter-interfaces/TmuxSessionRepository';
|
|
13
|
+
import { toTmuxSessionName } from './intmux/InTmuxByHumanSessionReconcileUseCase';
|
|
14
|
+
|
|
15
|
+
export const DEFAULT_MONITORED_STATUS = IN_TMUX_STATUS_NAME;
|
|
16
|
+
export const DEFAULT_MAIN_SILENT_THRESHOLD_SECONDS = 10 * 60;
|
|
17
|
+
export const DEFAULT_SUBAGENT_SILENT_THRESHOLD_SECONDS = 5 * 60;
|
|
18
|
+
export const DEFAULT_SUBAGENT_RUNNING_THRESHOLD_SECONDS = 15 * 60;
|
|
19
|
+
export const DEFAULT_NOTIFICATION_COOLDOWN_SECONDS = 30 * 60;
|
|
20
|
+
export const DEFAULT_NOTIFICATION_STAGGER_SECONDS = 25;
|
|
21
|
+
|
|
22
|
+
type NotifyCandidate = {
|
|
23
|
+
sessionName: string;
|
|
24
|
+
message: string;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export class NotifySilentLiveSessionsUseCase {
|
|
28
|
+
constructor(
|
|
29
|
+
private readonly issueRepository: Pick<IssueRepository, 'getAllOpened'>,
|
|
30
|
+
private readonly tmuxSessionRepository: Pick<
|
|
31
|
+
TmuxSessionRepository,
|
|
32
|
+
'listLiveSessionNames'
|
|
33
|
+
>,
|
|
34
|
+
private readonly sessionOutputActivityRepository: SessionOutputActivityRepository,
|
|
35
|
+
private readonly subAgentActivityRepository: SessionSubAgentActivityRepository,
|
|
36
|
+
private readonly ownerCallStatusProvider: OwnerCallStatusProvider,
|
|
37
|
+
private readonly notificationRepository: SilentSessionNotificationRepository,
|
|
38
|
+
private readonly messageComposer: SilentSessionMessageComposer,
|
|
39
|
+
private readonly sleeper: Sleeper,
|
|
40
|
+
) {}
|
|
41
|
+
|
|
42
|
+
run = async (params: {
|
|
43
|
+
project: Project;
|
|
44
|
+
allowCacheMinutes: number;
|
|
45
|
+
monitoredStatus: string;
|
|
46
|
+
mainSilentThresholdSeconds: number;
|
|
47
|
+
subAgentSilentThresholdSeconds: number;
|
|
48
|
+
subAgentRunningThresholdSeconds: number;
|
|
49
|
+
cooldownSeconds: number;
|
|
50
|
+
staggerSeconds: number;
|
|
51
|
+
now: Date;
|
|
52
|
+
}): Promise<void> => {
|
|
53
|
+
const liveSessionNames = new Set(
|
|
54
|
+
await this.tmuxSessionRepository.listLiveSessionNames(),
|
|
55
|
+
);
|
|
56
|
+
const openIssues = await this.issueRepository.getAllOpened(
|
|
57
|
+
params.project,
|
|
58
|
+
params.allowCacheMinutes,
|
|
59
|
+
);
|
|
60
|
+
const monitoredSessionNames = this.selectMonitoredSessionNames(
|
|
61
|
+
openIssues,
|
|
62
|
+
liveSessionNames,
|
|
63
|
+
params.monitoredStatus,
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
const snapshots = await this.collectSnapshots(
|
|
67
|
+
monitoredSessionNames,
|
|
68
|
+
params.now,
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
const candidates: NotifyCandidate[] = [];
|
|
72
|
+
for (const snapshot of snapshots) {
|
|
73
|
+
const message = this.composeMessage(snapshot, params);
|
|
74
|
+
if (message !== null) {
|
|
75
|
+
candidates.push({ sessionName: snapshot.sessionName, message });
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
candidates.sort((left, right) =>
|
|
79
|
+
left.sessionName < right.sessionName
|
|
80
|
+
? -1
|
|
81
|
+
: left.sessionName > right.sessionName
|
|
82
|
+
? 1
|
|
83
|
+
: 0,
|
|
84
|
+
);
|
|
85
|
+
|
|
86
|
+
console.log(
|
|
87
|
+
`Silent live session notification: ${candidates.length} candidate(s) of ${monitoredSessionNames.length} monitored session(s).`,
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
const nowEpochSeconds = Math.floor(params.now.getTime() / 1000);
|
|
91
|
+
let sentCount = 0;
|
|
92
|
+
for (const candidate of candidates) {
|
|
93
|
+
const lastNotifiedEpochSeconds =
|
|
94
|
+
await this.notificationRepository.getLastNotifiedEpochSeconds(
|
|
95
|
+
candidate.sessionName,
|
|
96
|
+
);
|
|
97
|
+
if (
|
|
98
|
+
lastNotifiedEpochSeconds !== null &&
|
|
99
|
+
nowEpochSeconds - lastNotifiedEpochSeconds < params.cooldownSeconds
|
|
100
|
+
) {
|
|
101
|
+
console.log(
|
|
102
|
+
`Skipping ${candidate.sessionName}: notified ${
|
|
103
|
+
nowEpochSeconds - lastNotifiedEpochSeconds
|
|
104
|
+
} seconds ago, within cooldown ${params.cooldownSeconds} seconds.`,
|
|
105
|
+
);
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
if (sentCount > 0) {
|
|
109
|
+
await this.sleeper.sleep(params.staggerSeconds * 1000);
|
|
110
|
+
}
|
|
111
|
+
await this.notificationRepository.sendSelfCheckNotification(
|
|
112
|
+
candidate.sessionName,
|
|
113
|
+
candidate.message,
|
|
114
|
+
);
|
|
115
|
+
await this.notificationRepository.setLastNotifiedEpochSeconds(
|
|
116
|
+
candidate.sessionName,
|
|
117
|
+
nowEpochSeconds,
|
|
118
|
+
);
|
|
119
|
+
sentCount += 1;
|
|
120
|
+
console.log(`Notified ${candidate.sessionName}.`);
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
private collectSnapshots = async (
|
|
125
|
+
monitoredSessionNames: string[],
|
|
126
|
+
now: Date,
|
|
127
|
+
): Promise<LiveSessionActivitySnapshot[]> => {
|
|
128
|
+
const activities =
|
|
129
|
+
await this.sessionOutputActivityRepository.listSessionOutputActivities(
|
|
130
|
+
monitoredSessionNames,
|
|
131
|
+
);
|
|
132
|
+
const lastOutputBySessionName = new Map<string, number>();
|
|
133
|
+
for (const activity of activities) {
|
|
134
|
+
lastOutputBySessionName.set(
|
|
135
|
+
activity.sessionName,
|
|
136
|
+
activity.lastOutputEpochSeconds,
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
const subAgentsBySessionName =
|
|
141
|
+
await this.subAgentActivityRepository.listSubAgentActivitiesBySessionName(
|
|
142
|
+
monitoredSessionNames,
|
|
143
|
+
);
|
|
144
|
+
|
|
145
|
+
const sessionNamesWithUnansweredOwnerCall =
|
|
146
|
+
await this.ownerCallStatusProvider.listSessionNamesWithUnansweredOwnerCall(
|
|
147
|
+
monitoredSessionNames,
|
|
148
|
+
);
|
|
149
|
+
|
|
150
|
+
const nowEpochSeconds = Math.floor(now.getTime() / 1000);
|
|
151
|
+
return monitoredSessionNames.map((sessionName) => {
|
|
152
|
+
const lastOutputEpochSeconds = lastOutputBySessionName.get(sessionName);
|
|
153
|
+
const mainSilentSeconds =
|
|
154
|
+
lastOutputEpochSeconds === undefined
|
|
155
|
+
? null
|
|
156
|
+
: nowEpochSeconds - lastOutputEpochSeconds;
|
|
157
|
+
return {
|
|
158
|
+
sessionName,
|
|
159
|
+
mainSilentSeconds,
|
|
160
|
+
subAgents: subAgentsBySessionName.get(sessionName) ?? [],
|
|
161
|
+
hasUnansweredOwnerCall:
|
|
162
|
+
sessionNamesWithUnansweredOwnerCall.has(sessionName),
|
|
163
|
+
};
|
|
164
|
+
});
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
private composeMessage = (
|
|
168
|
+
snapshot: LiveSessionActivitySnapshot,
|
|
169
|
+
thresholds: {
|
|
170
|
+
mainSilentThresholdSeconds: number;
|
|
171
|
+
subAgentSilentThresholdSeconds: number;
|
|
172
|
+
subAgentRunningThresholdSeconds: number;
|
|
173
|
+
},
|
|
174
|
+
): string | null => {
|
|
175
|
+
const sections: string[] = [];
|
|
176
|
+
|
|
177
|
+
if (
|
|
178
|
+
snapshot.mainSilentSeconds !== null &&
|
|
179
|
+
snapshot.mainSilentSeconds >= thresholds.mainSilentThresholdSeconds &&
|
|
180
|
+
!snapshot.hasUnansweredOwnerCall
|
|
181
|
+
) {
|
|
182
|
+
sections.push(
|
|
183
|
+
this.messageComposer.composeMainStalledSection(
|
|
184
|
+
snapshot.mainSilentSeconds,
|
|
185
|
+
),
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
const stalledSubAgents = snapshot.subAgents.filter(
|
|
190
|
+
(subAgent) =>
|
|
191
|
+
subAgent.silentSeconds >= thresholds.subAgentSilentThresholdSeconds ||
|
|
192
|
+
subAgent.runningSeconds >= thresholds.subAgentRunningThresholdSeconds,
|
|
193
|
+
);
|
|
194
|
+
if (stalledSubAgents.length > 0) {
|
|
195
|
+
sections.push(
|
|
196
|
+
this.messageComposer.composeSubAgentSection(stalledSubAgents),
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
if (sections.length === 0) {
|
|
201
|
+
return null;
|
|
202
|
+
}
|
|
203
|
+
return sections.join('\n\n');
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
private selectMonitoredSessionNames = (
|
|
207
|
+
openIssues: Issue[],
|
|
208
|
+
liveSessionNames: Set<string>,
|
|
209
|
+
monitoredStatus: string,
|
|
210
|
+
): string[] => {
|
|
211
|
+
const monitoredSessionNames: string[] = [];
|
|
212
|
+
for (const issue of openIssues) {
|
|
213
|
+
if (issue.status !== monitoredStatus) {
|
|
214
|
+
continue;
|
|
215
|
+
}
|
|
216
|
+
const sessionName = toTmuxSessionName(issue.url);
|
|
217
|
+
if (liveSessionNames.has(sessionName)) {
|
|
218
|
+
monitoredSessionNames.push(sessionName);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
return monitoredSessionNames;
|
|
222
|
+
};
|
|
223
|
+
}
|
|
@@ -21,10 +21,14 @@ const snapshot = (
|
|
|
21
21
|
const candidate = (
|
|
22
22
|
name: string,
|
|
23
23
|
snapshotValue: OauthTokenWindowSnapshot | null,
|
|
24
|
+
subscriptionDisabled = false,
|
|
25
|
+
unifiedRejected = false,
|
|
24
26
|
): OauthTokenCandidate => ({
|
|
25
27
|
name,
|
|
26
28
|
token: `fake-token-${name}`,
|
|
27
29
|
snapshot: snapshotValue,
|
|
30
|
+
subscriptionDisabled,
|
|
31
|
+
unifiedRejected,
|
|
28
32
|
});
|
|
29
33
|
|
|
30
34
|
describe('OauthTokenSelectUseCase', () => {
|
|
@@ -176,4 +180,36 @@ describe('OauthTokenSelectUseCase', () => {
|
|
|
176
180
|
|
|
177
181
|
expect(result.metrics.map((m) => m.name)).toEqual(['a', 'b']);
|
|
178
182
|
});
|
|
183
|
+
|
|
184
|
+
it('excludes a subscription-disabled token even when rate-limit windows are fully free', () => {
|
|
185
|
+
const result = useCase.run(
|
|
186
|
+
[
|
|
187
|
+
candidate('disabled', snapshot({}), true),
|
|
188
|
+
candidate('active', snapshot({}), false),
|
|
189
|
+
],
|
|
190
|
+
NOW,
|
|
191
|
+
);
|
|
192
|
+
|
|
193
|
+
expect(result.selected?.name).toBe('active');
|
|
194
|
+
const disabled = result.metrics.find((m) => m.name === 'disabled');
|
|
195
|
+
expect(disabled?.eligible).toBe(false);
|
|
196
|
+
expect(disabled?.exclusionReason).toContain(
|
|
197
|
+
'organization has disabled Claude subscription access for Claude Code',
|
|
198
|
+
);
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
it('excludes a unified-rejected token even when rate-limit windows are fully free', () => {
|
|
202
|
+
const result = useCase.run(
|
|
203
|
+
[
|
|
204
|
+
candidate('rejected', snapshot({}), false, true),
|
|
205
|
+
candidate('active', snapshot({}), false, false),
|
|
206
|
+
],
|
|
207
|
+
NOW,
|
|
208
|
+
);
|
|
209
|
+
|
|
210
|
+
expect(result.selected?.name).toBe('active');
|
|
211
|
+
const rejected = result.metrics.find((m) => m.name === 'rejected');
|
|
212
|
+
expect(rejected?.eligible).toBe(false);
|
|
213
|
+
expect(rejected?.exclusionReason).toContain('rejected');
|
|
214
|
+
});
|
|
179
215
|
});
|
|
@@ -9,6 +9,8 @@ export type OauthTokenCandidate = {
|
|
|
9
9
|
name: string;
|
|
10
10
|
token: string;
|
|
11
11
|
snapshot: OauthTokenWindowSnapshot | null;
|
|
12
|
+
subscriptionDisabled: boolean;
|
|
13
|
+
unifiedRejected: boolean;
|
|
12
14
|
};
|
|
13
15
|
|
|
14
16
|
export type OauthTokenCandidateMetrics = {
|
|
@@ -75,6 +77,8 @@ export class OauthTokenSelectUseCase {
|
|
|
75
77
|
);
|
|
76
78
|
|
|
77
79
|
const exclusionReason = this.exclusionReason(
|
|
80
|
+
candidate.subscriptionDisabled,
|
|
81
|
+
candidate.unifiedRejected,
|
|
78
82
|
fiveHourFreeRatio,
|
|
79
83
|
sevenDayFreeRatio,
|
|
80
84
|
);
|
|
@@ -90,9 +94,17 @@ export class OauthTokenSelectUseCase {
|
|
|
90
94
|
};
|
|
91
95
|
|
|
92
96
|
private exclusionReason = (
|
|
97
|
+
subscriptionDisabled: boolean,
|
|
98
|
+
unifiedRejected: boolean,
|
|
93
99
|
fiveHourFreeRatio: number,
|
|
94
100
|
sevenDayFreeRatio: number,
|
|
95
101
|
): string | null => {
|
|
102
|
+
if (subscriptionDisabled) {
|
|
103
|
+
return 'organization has disabled Claude subscription access for Claude Code';
|
|
104
|
+
}
|
|
105
|
+
if (unifiedRejected) {
|
|
106
|
+
return 'token request was rejected (anthropic-ratelimit-unified-status: rejected)';
|
|
107
|
+
}
|
|
96
108
|
if (fiveHourFreeRatio < FIVE_HOUR_MIN_FREE_RATIO) {
|
|
97
109
|
return `5h window only ${this.toPercent(fiveHourFreeRatio)}% free (requires >= ${this.toPercent(FIVE_HOUR_MIN_FREE_RATIO)}%)`;
|
|
98
110
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SubAgentActivity } from '../../entities/LiveSessionActivitySnapshot';
|
|
2
|
+
|
|
3
|
+
export interface SilentSessionMessageComposer {
|
|
4
|
+
composeMainStalledSection: (mainSilentSeconds: number) => string;
|
|
5
|
+
composeSubAgentSection: (subAgents: SubAgentActivity[]) => string;
|
|
6
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface SilentSessionNotificationRepository {
|
|
2
|
+
getLastNotifiedEpochSeconds: (sessionName: string) => Promise<number | null>;
|
|
3
|
+
setLastNotifiedEpochSeconds: (
|
|
4
|
+
sessionName: string,
|
|
5
|
+
epochSeconds: number,
|
|
6
|
+
) => Promise<void>;
|
|
7
|
+
sendSelfCheckNotification: (
|
|
8
|
+
sessionName: string,
|
|
9
|
+
message: string,
|
|
10
|
+
) => Promise<void>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DASHBOARD_DISPLAY_LABEL_BY_PROJECT_NAME,
|
|
3
|
+
DASHBOARD_PROJECT_NAMES,
|
|
4
|
+
toDashboardDisplayLabel,
|
|
5
|
+
} from './DashboardProjectCode';
|
|
6
|
+
|
|
7
|
+
describe('DashboardProjectCode', () => {
|
|
8
|
+
it('maps each full project name to its 2-char display label', () => {
|
|
9
|
+
expect(toDashboardDisplayLabel('umino')).toBe('um');
|
|
10
|
+
expect(toDashboardDisplayLabel('xmile')).toBe('xm');
|
|
11
|
+
expect(toDashboardDisplayLabel('xcare')).toBe('xc');
|
|
12
|
+
expect(toDashboardDisplayLabel('utage3')).toBe('ut');
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
it('exposes the project names in the same order as the label mapping', () => {
|
|
16
|
+
expect(DASHBOARD_PROJECT_NAMES).toEqual([
|
|
17
|
+
'umino',
|
|
18
|
+
'xmile',
|
|
19
|
+
'xcare',
|
|
20
|
+
'utage3',
|
|
21
|
+
]);
|
|
22
|
+
expect(DASHBOARD_PROJECT_NAMES).toEqual(
|
|
23
|
+
Object.keys(DASHBOARD_DISPLAY_LABEL_BY_PROJECT_NAME),
|
|
24
|
+
);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it('throws for an unknown project name rather than guessing a label', () => {
|
|
28
|
+
expect(() => toDashboardDisplayLabel('unknown')).toThrow(
|
|
29
|
+
'Unknown dashboard project name: unknown',
|
|
30
|
+
);
|
|
31
|
+
});
|
|
32
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export const DASHBOARD_DISPLAY_LABEL_BY_PROJECT_NAME: Record<string, string> = {
|
|
2
|
+
umino: 'um',
|
|
3
|
+
xmile: 'xm',
|
|
4
|
+
xcare: 'xc',
|
|
5
|
+
utage3: 'ut',
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const DASHBOARD_PROJECT_NAMES: string[] = Object.keys(
|
|
9
|
+
DASHBOARD_DISPLAY_LABEL_BY_PROJECT_NAME,
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
export const toDashboardDisplayLabel = (projectName: string): string => {
|
|
13
|
+
const label = DASHBOARD_DISPLAY_LABEL_BY_PROJECT_NAME[projectName];
|
|
14
|
+
if (label === undefined) {
|
|
15
|
+
throw new Error(
|
|
16
|
+
`Unknown dashboard project name: ${projectName}. Add it to DASHBOARD_DISPLAY_LABEL_BY_PROJECT_NAME.`,
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
return label;
|
|
20
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComposeDashboardInput } from '../../../domain/usecases/dashboard/ComposeDashboardUseCase';
|
|
2
2
|
export type DashboardComposeOptions = {
|
|
3
3
|
dashboardDataDir: string;
|
|
4
|
-
|
|
4
|
+
projectNames: string[];
|
|
5
5
|
};
|
|
6
6
|
export declare const buildComposeDashboardInput: (options: DashboardComposeOptions) => ComposeDashboardInput;
|
|
7
7
|
export declare const dashboardComposeFilesPresent: (options: DashboardComposeOptions) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboardComposeService.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/console/dashboardComposeService.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,qBAAqB,EAItB,MAAM,4DAA4D,CAAC;
|
|
1
|
+
{"version":3,"file":"dashboardComposeService.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/console/dashboardComposeService.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,qBAAqB,EAItB,MAAM,4DAA4D,CAAC;AAQpE,MAAM,MAAM,uBAAuB,GAAG;IACpC,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AA8IF,eAAO,MAAM,0BAA0B,GACrC,SAAS,uBAAuB,KAC/B,qBAYF,CAAC;AAUF,eAAO,MAAM,4BAA4B,GACvC,SAAS,uBAAuB,KAC/B,OAYF,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,SAAS,uBAAuB,KAC/B,MACqE,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { IssueTitleStateCache } from './consoleReadApi';
|
|
|
4
4
|
import { ConsoleProjectResolver } from './consoleOperationApi';
|
|
5
5
|
import { ImageFetcher } from './consoleImageProxy';
|
|
6
6
|
export declare const DEFAULT_WEB_PORT = 9981;
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const DEFAULT_DASHBOARD_PROJECT_NAMES: string[];
|
|
8
8
|
export declare const CONSOLE_TOKEN_HEADER = "x-pv-token";
|
|
9
9
|
export declare const hasDotSegment: (requestPath: string) => boolean;
|
|
10
10
|
export declare const requiresToken: (requestPath: string) => boolean;
|
|
@@ -18,7 +18,7 @@ export type WebServerOptions = {
|
|
|
18
18
|
inTmuxDataDir: string | null;
|
|
19
19
|
dashboardDir: string | null;
|
|
20
20
|
dashboardDataDir: string | null;
|
|
21
|
-
|
|
21
|
+
dashboardProjectNames: string[];
|
|
22
22
|
githubToken?: string | null;
|
|
23
23
|
imageFetcher?: ImageFetcher | null;
|
|
24
24
|
issueRepository?: IssueRepository | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webServer.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/console/webServer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAG7B,OAAO,EAAE,eAAe,EAAE,MAAM,6DAA6D,CAAC;AAM9F,OAAO,EACL,oBAAoB,EAOrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAEL,sBAAsB,EAMvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAqB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"webServer.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/console/webServer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAG7B,OAAO,EAAE,eAAe,EAAE,MAAM,6DAA6D,CAAC;AAM9F,OAAO,EACL,oBAAoB,EAOrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAEL,sBAAsB,EAMvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAqB,MAAM,qBAAqB,CAAC;AAOtE,eAAO,MAAM,gBAAgB,OAAO,CAAC;AAErC,eAAO,MAAM,+BAA+B,UAA0B,CAAC;AAEvE,eAAO,MAAM,oBAAoB,eAAe,CAAC;AAmCjD,eAAO,MAAM,aAAa,GAAI,aAAa,MAAM,KAAG,OAGiB,CAAC;AAEtE,eAAO,MAAM,aAAa,GAAI,aAAa,MAAM,KAAG,OAGrB,CAAC;AAIhC,eAAO,MAAM,iBAAiB,GAAI,aAAa,MAAM,KAAG,OAmBvD,CAAC;AAEF,eAAO,MAAM,YAAY,GACvB,eAAe,MAAM,EACrB,eAAe,MAAM,GA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AAO,CAAC,IAAI,CAwEd,CAAC;AAcF,eAAO,MAAM,eAAe,GAAI,SAAS,gBAAgB,KAAG,IAAI,CAAC,MAM7D,CAAC;AAEL,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,GAAG;IACrD,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,eAAO,MAAM,cAAc,GACzB,SAAS,qBAAqB,KAC7B,OAAO,CAAC,IAAI,CAAC,MAAM,CAQlB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HandleScheduledEventUseCaseHandler.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HandleScheduledEventUseCaseHandler.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.ts"],"names":[],"mappings":"AAkCA,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAiD3D,qBAAa,kCAAkC;IAC7C,MAAM,GACJ,gBAAgB,MAAM,EACtB,UAAU,OAAO,KAChB,OAAO,CAAC;QACT,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,KAAK,EAAE,CAAC;QAChB,SAAS,EAAE,OAAO,CAAC;QACnB,eAAe,EAAE,IAAI,EAAE,CAAC;KACzB,GAAG,IAAI,CAAC,CA8iBP;CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InTmuxByHumanSessionTokenCountHandler.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/InTmuxByHumanSessionTokenCountHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AACvD,OAAO,EAAE,kCAAkC,EAAE,MAAM,gFAAgF,CAAC;AACpI,OAAO,EAAE,qCAAqC,EAAE,MAAM,gEAAgE,CAAC;AAMvH,MAAM,MAAM,0CAA0C,GAAG;IACvD,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,MAAM,EAAE,KAAK,EAAE,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,2CAA2C,GAAG;IACxD,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAEF,qBAAa,qCAAqC;IAE9C,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,4BAA4B;gBAD5B,OAAO,GAAE,qCAAmF,EAC5F,4BAA4B,GAAE,kCAAiF;IAGlI,MAAM,GACJ,OAAO,0CAA0C,KAChD,2CAA2C,
|
|
1
|
+
{"version":3,"file":"InTmuxByHumanSessionTokenCountHandler.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/InTmuxByHumanSessionTokenCountHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AACvD,OAAO,EAAE,kCAAkC,EAAE,MAAM,gFAAgF,CAAC;AACpI,OAAO,EAAE,qCAAqC,EAAE,MAAM,gEAAgE,CAAC;AAMvH,MAAM,MAAM,0CAA0C,GAAG;IACvD,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,MAAM,EAAE,KAAK,EAAE,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,2CAA2C,GAAG;IACxD,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAEF,qBAAa,qCAAqC;IAE9C,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,4BAA4B;gBAD5B,OAAO,GAAE,qCAAmF,EAC5F,4BAA4B,GAAE,kCAAiF;IAGlI,MAAM,GACJ,OAAO,0CAA0C,KAChD,2CAA2C,CAmD5C;CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LiveSessionOauthTokenSelectHandler.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/LiveSessionOauthTokenSelectHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,yEAAyE,CAAC;AACtH,OAAO,EAEL,kCAAkC,EACnC,MAAM,6DAA6D,CAAC;AAcrE,MAAM,MAAM,uCAAuC,GAAG;IACpD,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,wCAAwC,GAAG;IACrD,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAEF,qBAAa,kCAAkC;IAE3C,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,qBAAqB;gBADrB,OAAO,GAAE,kCAA6E,EACtF,qBAAqB,GAAE,2BAAmE;IAG7G,MAAM,GACJ,OAAO,uCAAuC,KAC7C,wCAAwC,
|
|
1
|
+
{"version":3,"file":"LiveSessionOauthTokenSelectHandler.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/LiveSessionOauthTokenSelectHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,yEAAyE,CAAC;AACtH,OAAO,EAEL,kCAAkC,EACnC,MAAM,6DAA6D,CAAC;AAcrE,MAAM,MAAM,uCAAuC,GAAG;IACpD,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,wCAAwC,GAA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"version":3,"file":"OauthTokenSelectHandler.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/OauthTokenSelectHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,uBAAuB,EACxB,MAAM,kDAAkD,CAAC;AAI1D,MAAM,MAAM,4BAA4B,GAAG;IACzC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAKF,eAAO,MAAM,wBAAwB,GACnC,cAAc,MAAM,GAAG,IAAI,KAC1B,MAAM,GAAG,IASX,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAChC,mBAAmB,MAAM,GAAG,IAAI,KAC/B,MASF,CAAC;AAEF,qBAAa,uBAAuB;IAEhC,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,GAAE,uBAAuD;IAGnF,MAAM,GACJ,OAAO,4BAA4B,KAClC,6BAA6B,CAmD9B;IAEF,OAAO,CAAC,iBAAiB,CAuBvB;CACH"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Project } from '../../../domain/entities/Project';
|
|
2
|
+
import { LocalCommandRunner } from '../../../domain/usecases/adapter-interfaces/LocalCommandRunner';
|
|
3
|
+
import { IssueRepository } from '../../../domain/usecases/adapter-interfaces/IssueRepository';
|
|
4
|
+
import { LocalStorageCacheRepository } from '../../repositories/LocalStorageCacheRepository';
|
|
5
|
+
import { SilentSessionMessageTemplates } from '../../repositories/ConfigurableSilentSessionMessageComposer';
|
|
6
|
+
export type NotifySilentTmuxSessionsParams = {
|
|
7
|
+
project: Project;
|
|
8
|
+
allowCacheMinutes: number;
|
|
9
|
+
issueRepository: Pick<IssueRepository, 'getAllOpened'>;
|
|
10
|
+
localCommandRunner: LocalCommandRunner;
|
|
11
|
+
cacheRepository: Pick<LocalStorageCacheRepository, 'getLatest' | 'set'>;
|
|
12
|
+
sessionOutputRootDirectory: string | null;
|
|
13
|
+
sessionTranscriptRootDirectory: string | null;
|
|
14
|
+
ownerCallMarker: string | null;
|
|
15
|
+
subAgentOutputRootDirectory: string | null;
|
|
16
|
+
subAgentProcessMatchPattern: string | null;
|
|
17
|
+
subAgentTranscriptRootDirectory: string | null;
|
|
18
|
+
mainSilentThresholdSeconds: number;
|
|
19
|
+
subAgentSilentThresholdSeconds: number;
|
|
20
|
+
subAgentRunningThresholdSeconds: number;
|
|
21
|
+
cooldownSeconds: number;
|
|
22
|
+
staggerSeconds: number;
|
|
23
|
+
messageTemplates: SilentSessionMessageTemplates;
|
|
24
|
+
now: Date;
|
|
25
|
+
};
|
|
26
|
+
export declare const notifySilentTmuxSessions: (params: NotifySilentTmuxSessionsParams) => Promise<void>;
|
|
27
|
+
export declare const DEFAULT_NOTIFY_SILENT_TMUX_SESSIONS_PARAMS: {
|
|
28
|
+
readonly mainSilentThresholdSeconds: number;
|
|
29
|
+
readonly subAgentSilentThresholdSeconds: number;
|
|
30
|
+
readonly subAgentRunningThresholdSeconds: number;
|
|
31
|
+
readonly cooldownSeconds: number;
|
|
32
|
+
readonly staggerSeconds: 25;
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=notifySilentTmuxSessions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notifySilentTmuxSessions.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/notifySilentTmuxSessions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gEAAgE,CAAC;AACpG,OAAO,EAAE,eAAe,EAAE,MAAM,6DAA6D,CAAC;AAgB9F,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAQ7F,OAAO,EAEL,6BAA6B,EAC9B,MAAM,6DAA6D,CAAC;AAGrE,MAAM,MAAM,8BAA8B,GAAG;IAC3C,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,IAAI,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC;IACvD,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,eAAe,EAAE,IAAI,CAAC,2BAA2B,EAAE,WAAW,GAAG,KAAK,CAAC,CAAC;IACxE,0BAA0B,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,8BAA8B,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9C,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,2BAA2B,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3C,2BAA2B,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3C,+BAA+B,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/C,0BAA0B,EAAE,MAAM,CAAC;IACnC,8BAA8B,EAAE,MAAM,CAAC;IACvC,+BAA+B,EAAE,MAAM,CAAC;IACxC,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,6BAA6B,CAAC;IAChD,GAAG,EAAE,IAAI,CAAC;CACX,CAAC;AA4CF,eAAO,MAAM,wBAAwB,GACnC,QAAQ,8BAA8B,KACrC,OAAO,CAAC,IAAI,CAoEd,CAAC;AAEF,eAAO,MAAM,0CAA0C;;;;;;CAM7C,CAAC"}
|
|
@@ -7,6 +7,7 @@ export type TokenStatusWriterParams = {
|
|
|
7
7
|
dashboardDataDir: string | null | undefined;
|
|
8
8
|
tokenListJsonPath: string | null | undefined;
|
|
9
9
|
issues: Issue[];
|
|
10
|
+
pjcode?: string | null | undefined;
|
|
10
11
|
now?: Date;
|
|
11
12
|
readSnapshot?: (token: string) => RateLimitSnapshot | null;
|
|
12
13
|
interactiveSessionRepository?: ClaudeInteractiveSessionRepository;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenStatusWriter.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/tokenStatusWriter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"tokenStatusWriter.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/tokenStatusWriter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAE5D,OAAO,EAEL,sBAAsB,EACtB,WAAW,EAEZ,MAAM,+DAA+D,CAAC;AAGvE,OAAO,EAAE,kCAAkC,EAAE,MAAM,gFAAgF,CAAC;AACpI,OAAO,EAAE,4BAA4B,EAAE,MAAM,0EAA0E,CAAC;AACxH,OAAO,EAAE,iBAAiB,EAAiB,MAAM,4BAA4B,CAAC;AAU9E,MAAM,MAAM,uBAAuB,GAAG;IACpC,gBAAgB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC5C,iBAAiB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC7C,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,iBAAiB,GAAG,IAAI,CAAC;IAC3D,4BAA4B,CAAC,EAAE,kCAAkC,CAAC;IAClE,eAAe,CAAC,EAAE,4BAA4B,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AA0EF,eAAO,MAAM,wBAAwB,GACnC,UAAU,iBAAiB,GAAG,IAAI,KACjC,sBAAsB,GAAG,IA0B3B,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,QAAQ,uBAAuB,KAAG,IA8GlE,CAAC"}
|
|
@@ -17,15 +17,18 @@ export interface RateLimitSnapshot {
|
|
|
17
17
|
modelWeeklyLimits: Record<string, ModelWeeklyLimit>;
|
|
18
18
|
lastUpdatedEpoch: number;
|
|
19
19
|
blockedUntilEpoch: number;
|
|
20
|
+
subscriptionDisabled: boolean;
|
|
20
21
|
}
|
|
21
22
|
export declare const PROXY_PORT = 8787;
|
|
22
23
|
export declare const HEADERLESS_429_DEFAULT_COOLDOWN_SECONDS = 90;
|
|
23
24
|
export declare const HEADERLESS_429_MAX_COOLDOWN_SECONDS = 600;
|
|
25
|
+
export declare const PERMISSION_DISABLED_COOLDOWN_SECONDS = 3600;
|
|
24
26
|
export declare const cacheDir: () => string;
|
|
25
27
|
export declare const hashToken: (token: string) => string;
|
|
26
28
|
export declare const cachePathForToken: (token: string, baseDir?: string) => string;
|
|
27
29
|
export declare const writeRateLimit: (token: string, headers: Record<string, string | string[] | undefined>, statusCode?: number | null) => void;
|
|
28
30
|
export declare const writeModelRateLimit: (token: string, limits: Record<string, ModelWeeklyLimit>) => void;
|
|
31
|
+
export declare const writeSubscriptionDisabled: (token: string, baseDir?: string) => void;
|
|
29
32
|
export declare const parseModelRateLimitsFromBody: (body: string) => Record<string, ModelWeeklyLimit>;
|
|
30
33
|
export declare const parseModelRateLimitsFromHeaders: (headers: Record<string, string>) => Record<string, ModelWeeklyLimit>;
|
|
31
34
|
export declare const readRateLimit: (token: string, baseDir?: string) => RateLimitSnapshot | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RateLimitCache.d.ts","sourceRoot":"","sources":["../../../src/adapter/proxy/RateLimitCache.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,OAAO,C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proxy/proxyEntry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"proxyEntry.d.ts","sourceRoot":"","sources":["../../../src/adapter/proxy/proxyEntry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAU7B,OAAO,EAAE,+BAA+B,EAAE,MAAM,0EAA0E,CAAC;AAU3H,QAAA,MAAM,YAAY,GAChB,eAAe,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,KAC3C,MAAM,GAAG,IAQX,CAAC;AAkBF,QAAA,MAAM,UAAU,GACd,MAAM,MAAM,EACZ,kCAAiC,+BAA+B,GAAG,IAAW,KAC7E,IAAI,CAAC,MA8FP,CAAC;AAQF,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SubAgentActivity } from '../../domain/entities/LiveSessionActivitySnapshot';
|
|
2
|
+
import { SilentSessionMessageComposer } from '../../domain/usecases/adapter-interfaces/SilentSessionMessageComposer';
|
|
3
|
+
export type SilentSessionMessageTemplates = {
|
|
4
|
+
mainStalledMessage: string | null;
|
|
5
|
+
subAgentMessageHeader: string | null;
|
|
6
|
+
subAgentMessageFooter: string | null;
|
|
7
|
+
};
|
|
8
|
+
export declare class ConfigurableSilentSessionMessageComposer implements SilentSessionMessageComposer {
|
|
9
|
+
private readonly templates;
|
|
10
|
+
private readonly fallback;
|
|
11
|
+
constructor(templates: SilentSessionMessageTemplates, fallback: SilentSessionMessageComposer);
|
|
12
|
+
composeMainStalledSection: (mainSilentSeconds: number) => string;
|
|
13
|
+
composeSubAgentSection: (subAgents: SubAgentActivity[]) => string;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=ConfigurableSilentSessionMessageComposer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigurableSilentSessionMessageComposer.d.ts","sourceRoot":"","sources":["../../../src/adapter/repositories/ConfigurableSilentSessionMessageComposer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mDAAmD,CAAC;AACrF,OAAO,EAAE,4BAA4B,EAAE,MAAM,uEAAuE,CAAC;AAErH,MAAM,MAAM,6BAA6B,GAAG;IAC1C,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC,CAAC;AAOF,qBAAa,wCAAyC,YAAW,4BAA4B;IAEzF,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBADR,SAAS,EAAE,6BAA6B,EACxC,QAAQ,EAAE,4BAA4B;IAGzD,yBAAyB,GAAI,mBAAmB,MAAM,KAAG,MAAM,CAK7D;IAEF,sBAAsB,GAAI,WAAW,gBAAgB,EAAE,KAAG,MAAM,CAsB9D;CACH"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LiveSessionOutputActivity } from '../../domain/entities/LiveSessionOutputActivity';
|
|
2
|
+
import { SessionOutputActivityRepository } from '../../domain/usecases/adapter-interfaces/SessionOutputActivityRepository';
|
|
3
|
+
export declare class FileSystemSessionOutputActivityRepository implements SessionOutputActivityRepository {
|
|
4
|
+
private readonly rootDirectory;
|
|
5
|
+
constructor(rootDirectory: string | null);
|
|
6
|
+
listSessionOutputActivities: (sessionNames: string[]) => Promise<LiveSessionOutputActivity[]>;
|
|
7
|
+
private readLastOutputEpochSeconds;
|
|
8
|
+
private toOutputFileName;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=FileSystemSessionOutputActivityRepository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileSystemSessionOutputActivityRepository.d.ts","sourceRoot":"","sources":["../../../src/adapter/repositories/FileSystemSessionOutputActivityRepository.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,iDAAiD,CAAC;AAC5F,OAAO,EAAE,+BAA+B,EAAE,MAAM,0EAA0E,CAAC;AAE3H,qBAAa,yCAA0C,YAAW,+BAA+B;IACnF,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,MAAM,GAAG,IAAI;IAEzD,2BAA2B,GACzB,cAAc,MAAM,EAAE,KACrB,OAAO,CAAC,yBAAyB,EAAE,CAAC,CAarC;IAEF,OAAO,CAAC,0BAA0B,CAkBhC;IAEF,OAAO,CAAC,gBAAgB,CACU;CACnC"}
|