@jingyi0605/codingns 0.1.4 → 0.1.5
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/dist/public/assets/{TerminalPage-4ulgBhv9.js → TerminalPage-4p6EBqrR.js} +1 -1
- package/dist/public/assets/gemini-D4G1NbrE.png +0 -0
- package/dist/public/assets/index-CxeghocY.css +1 -0
- package/dist/public/assets/index-DXusStl0.js +108 -0
- package/dist/public/assets/kimi-BWNNSh7e.png +0 -0
- package/dist/public/index.html +2 -2
- package/dist/server/config/env.d.ts +6 -0
- package/dist/server/config/env.js +145 -0
- package/dist/server/config/env.js.map +1 -1
- package/dist/server/config/opencode-system-probe-helper-process.d.ts +24 -0
- package/dist/server/config/opencode-system-probe-helper-process.js +70 -5
- package/dist/server/config/opencode-system-probe-helper-process.js.map +1 -1
- package/dist/server/modules/butler/butler-action-context-service.d.ts +30 -0
- package/dist/server/modules/butler/butler-action-context-service.js +108 -0
- package/dist/server/modules/butler/butler-action-context-service.js.map +1 -0
- package/dist/server/modules/butler/butler-auth-service.d.ts +17 -0
- package/dist/server/modules/butler/butler-auth-service.js +91 -0
- package/dist/server/modules/butler/butler-auth-service.js.map +1 -0
- package/dist/server/modules/butler/butler-control-action-service.d.ts +65 -0
- package/dist/server/modules/butler/butler-control-action-service.js +296 -0
- package/dist/server/modules/butler/butler-control-action-service.js.map +1 -0
- package/dist/server/modules/butler/butler-control-session-service.d.ts +55 -0
- package/dist/server/modules/butler/butler-control-session-service.js +367 -0
- package/dist/server/modules/butler/butler-control-session-service.js.map +1 -0
- package/dist/server/modules/butler/butler-controller.d.ts +367 -0
- package/dist/server/modules/butler/butler-controller.js +475 -0
- package/dist/server/modules/butler/butler-controller.js.map +1 -0
- package/dist/server/modules/butler/butler-follow-up-evaluation-instruction-adapter.d.ts +34 -0
- package/dist/server/modules/butler/butler-follow-up-evaluation-instruction-adapter.js +77 -0
- package/dist/server/modules/butler/butler-follow-up-evaluation-instruction-adapter.js.map +1 -0
- package/dist/server/modules/butler/butler-follow-up-scheduler.d.ts +23 -0
- package/dist/server/modules/butler/butler-follow-up-scheduler.js +57 -0
- package/dist/server/modules/butler/butler-follow-up-scheduler.js.map +1 -0
- package/dist/server/modules/butler/butler-follow-up-service.d.ts +86 -0
- package/dist/server/modules/butler/butler-follow-up-service.js +948 -0
- package/dist/server/modules/butler/butler-follow-up-service.js.map +1 -0
- package/dist/server/modules/butler/butler-inbox-service.d.ts +35 -0
- package/dist/server/modules/butler/butler-inbox-service.js +136 -0
- package/dist/server/modules/butler/butler-inbox-service.js.map +1 -0
- package/dist/server/modules/butler/butler-notification-service.d.ts +12 -0
- package/dist/server/modules/butler/butler-notification-service.js +45 -0
- package/dist/server/modules/butler/butler-notification-service.js.map +1 -0
- package/dist/server/modules/butler/butler-profile-service.d.ts +26 -0
- package/dist/server/modules/butler/butler-profile-service.js +529 -0
- package/dist/server/modules/butler/butler-profile-service.js.map +1 -0
- package/dist/server/modules/butler/butler-project-service.d.ts +48 -0
- package/dist/server/modules/butler/butler-project-service.js +253 -0
- package/dist/server/modules/butler/butler-project-service.js.map +1 -0
- package/dist/server/modules/butler/butler-session-service.d.ts +79 -0
- package/dist/server/modules/butler/butler-session-service.js +503 -0
- package/dist/server/modules/butler/butler-session-service.js.map +1 -0
- package/dist/server/modules/butler/butler-session-summary-service.d.ts +55 -0
- package/dist/server/modules/butler/butler-session-summary-service.js +382 -0
- package/dist/server/modules/butler/butler-session-summary-service.js.map +1 -0
- package/dist/server/modules/butler/context-aggregator.d.ts +187 -0
- package/dist/server/modules/butler/context-aggregator.js +807 -0
- package/dist/server/modules/butler/context-aggregator.js.map +1 -0
- package/dist/server/modules/butler/instruction-adapter.d.ts +28 -0
- package/dist/server/modules/butler/instruction-adapter.js +101 -0
- package/dist/server/modules/butler/instruction-adapter.js.map +1 -0
- package/dist/server/modules/butler/patrol-execution-service.d.ts +47 -0
- package/dist/server/modules/butler/patrol-execution-service.js +347 -0
- package/dist/server/modules/butler/patrol-execution-service.js.map +1 -0
- package/dist/server/modules/butler/patrol-plan-service.d.ts +54 -0
- package/dist/server/modules/butler/patrol-plan-service.js +272 -0
- package/dist/server/modules/butler/patrol-plan-service.js.map +1 -0
- package/dist/server/modules/butler/patrol-run-service.d.ts +60 -0
- package/dist/server/modules/butler/patrol-run-service.js +185 -0
- package/dist/server/modules/butler/patrol-run-service.js.map +1 -0
- package/dist/server/modules/butler/patrol-scheduler.d.ts +36 -0
- package/dist/server/modules/butler/patrol-scheduler.js +99 -0
- package/dist/server/modules/butler/patrol-scheduler.js.map +1 -0
- package/dist/server/modules/butler/project-memory-service.d.ts +30 -0
- package/dist/server/modules/butler/project-memory-service.js +103 -0
- package/dist/server/modules/butler/project-memory-service.js.map +1 -0
- package/dist/server/modules/butler/provider-adapter-registry.d.ts +61 -0
- package/dist/server/modules/butler/provider-adapter-registry.js +430 -0
- package/dist/server/modules/butler/provider-adapter-registry.js.map +1 -0
- package/dist/server/modules/butler/session-summary-instruction-adapter.d.ts +28 -0
- package/dist/server/modules/butler/session-summary-instruction-adapter.js +79 -0
- package/dist/server/modules/butler/session-summary-instruction-adapter.js.map +1 -0
- package/dist/server/modules/butler/session-summary-scheduler.d.ts +23 -0
- package/dist/server/modules/butler/session-summary-scheduler.js +57 -0
- package/dist/server/modules/butler/session-summary-scheduler.js.map +1 -0
- package/dist/server/modules/butler/verification-run-service.d.ts +73 -0
- package/dist/server/modules/butler/verification-run-service.js +633 -0
- package/dist/server/modules/butler/verification-run-service.js.map +1 -0
- package/dist/server/modules/preferences/profile-service.js +8 -2
- package/dist/server/modules/preferences/profile-service.js.map +1 -1
- package/dist/server/modules/sessions/claude-runtime-helper-process.js +1 -1
- package/dist/server/modules/sessions/claude-runtime-helper-process.js.map +1 -1
- package/dist/server/modules/sessions/codex-app-server-helper-client.d.ts +5 -1
- package/dist/server/modules/sessions/codex-app-server-helper-client.js +10 -2
- package/dist/server/modules/sessions/codex-app-server-helper-client.js.map +1 -1
- package/dist/server/modules/sessions/session-controller.d.ts +3 -1
- package/dist/server/modules/sessions/session-controller.js +11 -2
- package/dist/server/modules/sessions/session-controller.js.map +1 -1
- package/dist/server/modules/sessions/session-history-service.d.ts +14 -1
- package/dist/server/modules/sessions/session-history-service.js +291 -30
- package/dist/server/modules/sessions/session-history-service.js.map +1 -1
- package/dist/server/modules/sessions/session-live-runtime-service.d.ts +25 -2
- package/dist/server/modules/sessions/session-live-runtime-service.js +526 -158
- package/dist/server/modules/sessions/session-live-runtime-service.js.map +1 -1
- package/dist/server/modules/sessions/session-provider-error-mapper.js +28 -0
- package/dist/server/modules/sessions/session-provider-error-mapper.js.map +1 -1
- package/dist/server/modules/workbench/workbench-service.d.ts +7 -1
- package/dist/server/modules/workbench/workbench-service.js +31 -7
- package/dist/server/modules/workbench/workbench-service.js.map +1 -1
- package/dist/server/routes/butler.d.ts +3 -0
- package/dist/server/routes/butler.js +54 -0
- package/dist/server/routes/butler.js.map +1 -0
- package/dist/server/server/create-server.d.ts +61 -0
- package/dist/server/server/create-server.js +148 -4
- package/dist/server/server/create-server.js.map +1 -1
- package/dist/server/storage/repositories/butler-control-event-repository.d.ts +8 -0
- package/dist/server/storage/repositories/butler-control-event-repository.js +78 -0
- package/dist/server/storage/repositories/butler-control-event-repository.js.map +1 -0
- package/dist/server/storage/repositories/butler-control-session-repository.d.ts +11 -0
- package/dist/server/storage/repositories/butler-control-session-repository.js +86 -0
- package/dist/server/storage/repositories/butler-control-session-repository.js.map +1 -0
- package/dist/server/storage/repositories/butler-follow-up-task-repository.d.ts +16 -0
- package/dist/server/storage/repositories/butler-follow-up-task-repository.js +252 -0
- package/dist/server/storage/repositories/butler-follow-up-task-repository.js.map +1 -0
- package/dist/server/storage/repositories/butler-inbox-item-repository.d.ts +15 -0
- package/dist/server/storage/repositories/butler-inbox-item-repository.js +111 -0
- package/dist/server/storage/repositories/butler-inbox-item-repository.js.map +1 -0
- package/dist/server/storage/repositories/butler-notification-archive-repository.d.ts +9 -0
- package/dist/server/storage/repositories/butler-notification-archive-repository.js +48 -0
- package/dist/server/storage/repositories/butler-notification-archive-repository.js.map +1 -0
- package/dist/server/storage/repositories/butler-profile-repository.d.ts +9 -0
- package/dist/server/storage/repositories/butler-profile-repository.js +86 -0
- package/dist/server/storage/repositories/butler-profile-repository.js.map +1 -0
- package/dist/server/storage/repositories/butler-project-repository.d.ts +14 -0
- package/dist/server/storage/repositories/butler-project-repository.js +140 -0
- package/dist/server/storage/repositories/butler-project-repository.js.map +1 -0
- package/dist/server/storage/repositories/butler-session-repository.d.ts +11 -0
- package/dist/server/storage/repositories/butler-session-repository.js +106 -0
- package/dist/server/storage/repositories/butler-session-repository.js.map +1 -0
- package/dist/server/storage/repositories/butler-session-summary-state-repository.d.ts +8 -0
- package/dist/server/storage/repositories/butler-session-summary-state-repository.js +62 -0
- package/dist/server/storage/repositories/butler-session-summary-state-repository.js.map +1 -0
- package/dist/server/storage/repositories/patrol-plan-repository.d.ts +27 -0
- package/dist/server/storage/repositories/patrol-plan-repository.js +119 -0
- package/dist/server/storage/repositories/patrol-plan-repository.js.map +1 -0
- package/dist/server/storage/repositories/patrol-run-repository.d.ts +28 -0
- package/dist/server/storage/repositories/patrol-run-repository.js +121 -0
- package/dist/server/storage/repositories/patrol-run-repository.js.map +1 -0
- package/dist/server/storage/repositories/project-memory-repository.d.ts +15 -0
- package/dist/server/storage/repositories/project-memory-repository.js +150 -0
- package/dist/server/storage/repositories/project-memory-repository.js.map +1 -0
- package/dist/server/storage/repositories/session-checkpoint-repository.d.ts +9 -0
- package/dist/server/storage/repositories/session-checkpoint-repository.js +72 -0
- package/dist/server/storage/repositories/session-checkpoint-repository.js.map +1 -0
- package/dist/server/storage/repositories/session-message-origin-repository.d.ts +10 -0
- package/dist/server/storage/repositories/session-message-origin-repository.js +93 -0
- package/dist/server/storage/repositories/session-message-origin-repository.js.map +1 -0
- package/dist/server/storage/repositories/verification-run-repository.d.ts +29 -0
- package/dist/server/storage/repositories/verification-run-repository.js +125 -0
- package/dist/server/storage/repositories/verification-run-repository.js.map +1 -0
- package/dist/server/storage/sqlite/client.js +39 -0
- package/dist/server/storage/sqlite/client.js.map +1 -1
- package/dist/server/storage/sqlite/schema.sql +324 -0
- package/dist/server/types/domain.d.ts +261 -1
- package/dist/server/ws/ws-server.d.ts +2 -1
- package/dist/server/ws/ws-server.js +2 -1
- package/dist/server/ws/ws-server.js.map +1 -1
- package/node_modules/@codingns/session-sync-core/dist/index.d.ts +4 -0
- package/node_modules/@codingns/session-sync-core/dist/index.js +4 -0
- package/node_modules/@codingns/session-sync-core/dist/index.js.map +1 -1
- package/node_modules/@codingns/session-sync-core/dist/kimi-message-normalizer.d.ts +18 -0
- package/node_modules/@codingns/session-sync-core/dist/kimi-message-normalizer.js +659 -0
- package/node_modules/@codingns/session-sync-core/dist/kimi-message-normalizer.js.map +1 -0
- package/node_modules/@codingns/session-sync-core/dist/kimi-shared.d.ts +11 -0
- package/node_modules/@codingns/session-sync-core/dist/kimi-shared.js +72 -0
- package/node_modules/@codingns/session-sync-core/dist/kimi-shared.js.map +1 -0
- package/node_modules/@codingns/session-sync-core/dist/patch-builder.d.ts +8 -0
- package/node_modules/@codingns/session-sync-core/dist/patch-builder.js +89 -0
- package/node_modules/@codingns/session-sync-core/dist/patch-builder.js.map +1 -1
- package/node_modules/@codingns/session-sync-core/dist/providers/codex.js +4 -1
- package/node_modules/@codingns/session-sync-core/dist/providers/codex.js.map +1 -1
- package/node_modules/@codingns/session-sync-core/dist/providers/gemini.d.ts +41 -0
- package/node_modules/@codingns/session-sync-core/dist/providers/gemini.js +1086 -0
- package/node_modules/@codingns/session-sync-core/dist/providers/gemini.js.map +1 -0
- package/node_modules/@codingns/session-sync-core/dist/providers/kimi.d.ts +29 -0
- package/node_modules/@codingns/session-sync-core/dist/providers/kimi.js +578 -0
- package/node_modules/@codingns/session-sync-core/dist/providers/kimi.js.map +1 -0
- package/node_modules/@codingns/session-sync-core/dist/providers/opencode.js +2 -1
- package/node_modules/@codingns/session-sync-core/dist/providers/opencode.js.map +1 -1
- package/node_modules/@codingns/session-sync-core/dist/providers/utils.js +30 -2
- package/node_modules/@codingns/session-sync-core/dist/providers/utils.js.map +1 -1
- package/node_modules/@codingns/session-sync-core/dist/runtime/active-run-registry.d.ts +2 -0
- package/node_modules/@codingns/session-sync-core/dist/runtime/active-run-registry.js +43 -5
- package/node_modules/@codingns/session-sync-core/dist/runtime/active-run-registry.js.map +1 -1
- package/node_modules/@codingns/session-sync-core/dist/runtime/codex-runtime.d.ts +2 -0
- package/node_modules/@codingns/session-sync-core/dist/runtime/codex-runtime.js +320 -69
- package/node_modules/@codingns/session-sync-core/dist/runtime/codex-runtime.js.map +1 -1
- package/node_modules/@codingns/session-sync-core/dist/runtime/gemini-runtime.d.ts +21 -0
- package/node_modules/@codingns/session-sync-core/dist/runtime/gemini-runtime.js +537 -0
- package/node_modules/@codingns/session-sync-core/dist/runtime/gemini-runtime.js.map +1 -0
- package/node_modules/@codingns/session-sync-core/dist/runtime/kimi-runtime.d.ts +38 -0
- package/node_modules/@codingns/session-sync-core/dist/runtime/kimi-runtime.js +911 -0
- package/node_modules/@codingns/session-sync-core/dist/runtime/kimi-runtime.js.map +1 -0
- package/node_modules/@codingns/session-sync-core/dist/sqlite/node-sqlite.d.ts +6 -0
- package/node_modules/@codingns/session-sync-core/dist/sqlite/node-sqlite.js +9 -0
- package/node_modules/@codingns/session-sync-core/dist/sqlite/node-sqlite.js.map +1 -0
- package/node_modules/@codingns/session-sync-core/package.json +8 -0
- package/package.json +1 -1
- package/dist/public/assets/index-C5lu52cQ.css +0 -1
- package/dist/public/assets/index-WpdUo_Vs.js +0 -108
|
@@ -2,6 +2,21 @@ import Fastify from "fastify";
|
|
|
2
2
|
import type { HostConfig } from "../config/env.js";
|
|
3
3
|
import { AuthService } from "../modules/auth/auth-service.js";
|
|
4
4
|
import { BootstrapService } from "../modules/bootstrap/bootstrap-service.js";
|
|
5
|
+
import { ButlerControlSessionService } from "../modules/butler/butler-control-session-service.js";
|
|
6
|
+
import { ButlerControlActionService } from "../modules/butler/butler-control-action-service.js";
|
|
7
|
+
import { ButlerActionContextService } from "../modules/butler/butler-action-context-service.js";
|
|
8
|
+
import { ButlerFollowUpScheduler } from "../modules/butler/butler-follow-up-scheduler.js";
|
|
9
|
+
import { ButlerFollowUpService } from "../modules/butler/butler-follow-up-service.js";
|
|
10
|
+
import { ButlerProfileService } from "../modules/butler/butler-profile-service.js";
|
|
11
|
+
import { ButlerProjectService } from "../modules/butler/butler-project-service.js";
|
|
12
|
+
import { ButlerSessionService } from "../modules/butler/butler-session-service.js";
|
|
13
|
+
import { ButlerSessionSummaryService } from "../modules/butler/butler-session-summary-service.js";
|
|
14
|
+
import { PatrolPlanService } from "../modules/butler/patrol-plan-service.js";
|
|
15
|
+
import { PatrolRunService } from "../modules/butler/patrol-run-service.js";
|
|
16
|
+
import { PatrolScheduler } from "../modules/butler/patrol-scheduler.js";
|
|
17
|
+
import { ProjectMemoryService } from "../modules/butler/project-memory-service.js";
|
|
18
|
+
import { SessionSummaryScheduler } from "../modules/butler/session-summary-scheduler.js";
|
|
19
|
+
import { VerificationRunService } from "../modules/butler/verification-run-service.js";
|
|
5
20
|
import { ClientService } from "../modules/client/client-service.js";
|
|
6
21
|
import { FileContentService } from "../modules/file/file-content-service.js";
|
|
7
22
|
import { FileContextService } from "../modules/file/file-context-service.js";
|
|
@@ -26,13 +41,28 @@ import { WorkspaceService } from "../modules/workspace/workspace-service.js";
|
|
|
26
41
|
import { AuthTokenRepository } from "../storage/repositories/auth-token-repository.js";
|
|
27
42
|
import { AuthUserRepository } from "../storage/repositories/auth-user-repository.js";
|
|
28
43
|
import { BootstrapStateRepository } from "../storage/repositories/bootstrap-state-repository.js";
|
|
44
|
+
import { ButlerControlSessionRepository } from "../storage/repositories/butler-control-session-repository.js";
|
|
45
|
+
import { ButlerControlEventRepository } from "../storage/repositories/butler-control-event-repository.js";
|
|
46
|
+
import { ButlerFollowUpTaskRepository } from "../storage/repositories/butler-follow-up-task-repository.js";
|
|
47
|
+
import { ButlerInboxItemRepository } from "../storage/repositories/butler-inbox-item-repository.js";
|
|
48
|
+
import { ButlerNotificationArchiveRepository } from "../storage/repositories/butler-notification-archive-repository.js";
|
|
49
|
+
import { ButlerProfileRepository } from "../storage/repositories/butler-profile-repository.js";
|
|
50
|
+
import { ButlerProjectRepository } from "../storage/repositories/butler-project-repository.js";
|
|
51
|
+
import { ButlerSessionRepository } from "../storage/repositories/butler-session-repository.js";
|
|
52
|
+
import { ButlerSessionSummaryStateRepository } from "../storage/repositories/butler-session-summary-state-repository.js";
|
|
53
|
+
import { PatrolPlanRepository } from "../storage/repositories/patrol-plan-repository.js";
|
|
54
|
+
import { PatrolRunRepository } from "../storage/repositories/patrol-run-repository.js";
|
|
55
|
+
import { ProjectMemoryRepository } from "../storage/repositories/project-memory-repository.js";
|
|
56
|
+
import { VerificationRunRepository } from "../storage/repositories/verification-run-repository.js";
|
|
29
57
|
import { CommitRuleProfileRepository } from "../storage/repositories/commit-rule-profile-repository.js";
|
|
30
58
|
import { FileContextBindingRepository } from "../storage/repositories/file-context-binding-repository.js";
|
|
31
59
|
import { RecentFileRepository } from "../storage/repositories/recent-file-repository.js";
|
|
32
60
|
import { SessionBindingRepository } from "../storage/repositories/session-binding-repository.js";
|
|
33
61
|
import { SessionChangedFileRepository } from "../storage/repositories/session-changed-file-repository.js";
|
|
34
62
|
import { SessionIndexRepository } from "../storage/repositories/session-index-repository.js";
|
|
63
|
+
import { SessionCheckpointRepository } from "../storage/repositories/session-checkpoint-repository.js";
|
|
35
64
|
import { SessionMessageAttachmentRepository } from "../storage/repositories/session-message-attachment-repository.js";
|
|
65
|
+
import { SessionMessageOriginRepository } from "../storage/repositories/session-message-origin-repository.js";
|
|
36
66
|
import { SessionSendQueueRepository } from "../storage/repositories/session-send-queue-repository.js";
|
|
37
67
|
import { SessionStateRepository } from "../storage/repositories/session-state-repository.js";
|
|
38
68
|
import { SessionStatusSnapshotRepository } from "../storage/repositories/session-status-snapshot-repository.js";
|
|
@@ -56,13 +86,28 @@ export declare function createServer(config: HostConfig): {
|
|
|
56
86
|
authUserRepository: AuthUserRepository;
|
|
57
87
|
authTokenRepository: AuthTokenRepository;
|
|
58
88
|
workspaceRepository: WorkspaceRepository;
|
|
89
|
+
butlerControlSessionRepository: ButlerControlSessionRepository;
|
|
90
|
+
butlerControlEventRepository: ButlerControlEventRepository;
|
|
91
|
+
butlerFollowUpTaskRepository: ButlerFollowUpTaskRepository;
|
|
92
|
+
butlerInboxItemRepository: ButlerInboxItemRepository;
|
|
93
|
+
butlerNotificationArchiveRepository: ButlerNotificationArchiveRepository;
|
|
94
|
+
butlerProfileRepository: ButlerProfileRepository;
|
|
95
|
+
butlerProjectRepository: ButlerProjectRepository;
|
|
96
|
+
butlerSessionRepository: ButlerSessionRepository;
|
|
97
|
+
butlerSessionSummaryStateRepository: ButlerSessionSummaryStateRepository;
|
|
98
|
+
projectMemoryRepository: ProjectMemoryRepository;
|
|
99
|
+
patrolPlanRepository: PatrolPlanRepository;
|
|
100
|
+
patrolRunRepository: PatrolRunRepository;
|
|
101
|
+
verificationRunRepository: VerificationRunRepository;
|
|
59
102
|
commitRuleProfileRepository: CommitRuleProfileRepository;
|
|
60
103
|
recentFileRepository: RecentFileRepository;
|
|
61
104
|
fileContextBindingRepository: FileContextBindingRepository;
|
|
62
105
|
sessionBindingRepository: SessionBindingRepository;
|
|
63
106
|
sessionChangedFileRepository: SessionChangedFileRepository;
|
|
107
|
+
sessionCheckpointRepository: SessionCheckpointRepository;
|
|
64
108
|
sessionIndexRepository: SessionIndexRepository;
|
|
65
109
|
sessionMessageAttachmentRepository: SessionMessageAttachmentRepository;
|
|
110
|
+
sessionMessageOriginRepository: SessionMessageOriginRepository;
|
|
66
111
|
sessionSendQueueRepository: SessionSendQueueRepository;
|
|
67
112
|
sessionStateRepository: SessionStateRepository;
|
|
68
113
|
sessionStatusSnapshotRepository: SessionStatusSnapshotRepository;
|
|
@@ -80,6 +125,22 @@ export declare function createServer(config: HostConfig): {
|
|
|
80
125
|
authService: AuthService;
|
|
81
126
|
workspaceService: WorkspaceService;
|
|
82
127
|
workbenchService: WorkbenchService;
|
|
128
|
+
butlerProfileService: ButlerProfileService;
|
|
129
|
+
butlerSessionLiveRuntimeService: SessionLiveRuntimeService;
|
|
130
|
+
butlerControlSessionService: ButlerControlSessionService;
|
|
131
|
+
butlerControlActionService: ButlerControlActionService;
|
|
132
|
+
butlerFollowUpService: ButlerFollowUpService;
|
|
133
|
+
butlerActionContextService: ButlerActionContextService;
|
|
134
|
+
butlerProjectService: ButlerProjectService;
|
|
135
|
+
butlerSessionService: ButlerSessionService;
|
|
136
|
+
projectMemoryService: ProjectMemoryService;
|
|
137
|
+
patrolPlanService: PatrolPlanService;
|
|
138
|
+
patrolRunService: PatrolRunService;
|
|
139
|
+
verificationRunService: VerificationRunService;
|
|
140
|
+
patrolScheduler: PatrolScheduler;
|
|
141
|
+
butlerSessionSummaryService: ButlerSessionSummaryService;
|
|
142
|
+
sessionSummaryScheduler: SessionSummaryScheduler;
|
|
143
|
+
butlerFollowUpScheduler: ButlerFollowUpScheduler;
|
|
83
144
|
workspacePanelSnapshotService: WorkspacePanelSnapshotService;
|
|
84
145
|
fileTreeService: FileTreeService;
|
|
85
146
|
fileSearchService: FileSearchService;
|
|
@@ -5,6 +5,31 @@ import { AuthController } from "../modules/auth/auth-controller.js";
|
|
|
5
5
|
import { AuthService } from "../modules/auth/auth-service.js";
|
|
6
6
|
import { BootstrapController } from "../modules/bootstrap/bootstrap-controller.js";
|
|
7
7
|
import { BootstrapService } from "../modules/bootstrap/bootstrap-service.js";
|
|
8
|
+
import { ButlerControlSessionService } from "../modules/butler/butler-control-session-service.js";
|
|
9
|
+
import { ButlerControlActionService } from "../modules/butler/butler-control-action-service.js";
|
|
10
|
+
import { ButlerController } from "../modules/butler/butler-controller.js";
|
|
11
|
+
import { ButlerActionContextService } from "../modules/butler/butler-action-context-service.js";
|
|
12
|
+
import { ButlerContextAggregator } from "../modules/butler/context-aggregator.js";
|
|
13
|
+
import { ButlerAuthService } from "../modules/butler/butler-auth-service.js";
|
|
14
|
+
import { ButlerFollowUpEvaluationInstructionAdapter } from "../modules/butler/butler-follow-up-evaluation-instruction-adapter.js";
|
|
15
|
+
import { ButlerFollowUpScheduler } from "../modules/butler/butler-follow-up-scheduler.js";
|
|
16
|
+
import { ButlerFollowUpService } from "../modules/butler/butler-follow-up-service.js";
|
|
17
|
+
import { ButlerInboxService } from "../modules/butler/butler-inbox-service.js";
|
|
18
|
+
import { ButlerNotificationService } from "../modules/butler/butler-notification-service.js";
|
|
19
|
+
import { ButlerProfileService } from "../modules/butler/butler-profile-service.js";
|
|
20
|
+
import { ButlerProjectService } from "../modules/butler/butler-project-service.js";
|
|
21
|
+
import { ButlerSessionService } from "../modules/butler/butler-session-service.js";
|
|
22
|
+
import { ButlerSessionSummaryService } from "../modules/butler/butler-session-summary-service.js";
|
|
23
|
+
import { InstructionAdapter } from "../modules/butler/instruction-adapter.js";
|
|
24
|
+
import { PatrolPlanService } from "../modules/butler/patrol-plan-service.js";
|
|
25
|
+
import { PatrolExecutionService } from "../modules/butler/patrol-execution-service.js";
|
|
26
|
+
import { ProviderAdapterRegistry, RuntimePatrolProviderAdapter } from "../modules/butler/provider-adapter-registry.js";
|
|
27
|
+
import { PatrolRunService } from "../modules/butler/patrol-run-service.js";
|
|
28
|
+
import { PatrolScheduler } from "../modules/butler/patrol-scheduler.js";
|
|
29
|
+
import { ProjectMemoryService } from "../modules/butler/project-memory-service.js";
|
|
30
|
+
import { SessionSummaryInstructionAdapter } from "../modules/butler/session-summary-instruction-adapter.js";
|
|
31
|
+
import { SessionSummaryScheduler } from "../modules/butler/session-summary-scheduler.js";
|
|
32
|
+
import { VerificationRunService } from "../modules/butler/verification-run-service.js";
|
|
8
33
|
import { ClientController } from "../modules/client/client-controller.js";
|
|
9
34
|
import { ClientService } from "../modules/client/client-service.js";
|
|
10
35
|
import { FileAccessGuard } from "../modules/file/file-access-guard.js";
|
|
@@ -48,6 +73,7 @@ import { WorkspaceFileWatcher } from "../modules/workbench/workspace-file-watche
|
|
|
48
73
|
import { WorkspaceController } from "../modules/workspace/workspace-controller.js";
|
|
49
74
|
import { WorkspaceService } from "../modules/workspace/workspace-service.js";
|
|
50
75
|
import { registerAuthRoutes } from "../routes/auth.js";
|
|
76
|
+
import { registerButlerRoutes } from "../routes/butler.js";
|
|
51
77
|
import { registerClientRoutes } from "../routes/client.js";
|
|
52
78
|
import { registerFileRoutes } from "../routes/files.js";
|
|
53
79
|
import { registerGitRoutes } from "../routes/git.js";
|
|
@@ -66,13 +92,28 @@ import { startTerminalDebugEventLoopLagMonitor } from "../shared/utils/terminal-
|
|
|
66
92
|
import { AuthTokenRepository } from "../storage/repositories/auth-token-repository.js";
|
|
67
93
|
import { AuthUserRepository } from "../storage/repositories/auth-user-repository.js";
|
|
68
94
|
import { BootstrapStateRepository } from "../storage/repositories/bootstrap-state-repository.js";
|
|
95
|
+
import { ButlerControlSessionRepository } from "../storage/repositories/butler-control-session-repository.js";
|
|
96
|
+
import { ButlerControlEventRepository } from "../storage/repositories/butler-control-event-repository.js";
|
|
97
|
+
import { ButlerFollowUpTaskRepository } from "../storage/repositories/butler-follow-up-task-repository.js";
|
|
98
|
+
import { ButlerInboxItemRepository } from "../storage/repositories/butler-inbox-item-repository.js";
|
|
99
|
+
import { ButlerNotificationArchiveRepository } from "../storage/repositories/butler-notification-archive-repository.js";
|
|
100
|
+
import { ButlerProfileRepository } from "../storage/repositories/butler-profile-repository.js";
|
|
101
|
+
import { ButlerProjectRepository } from "../storage/repositories/butler-project-repository.js";
|
|
102
|
+
import { ButlerSessionRepository } from "../storage/repositories/butler-session-repository.js";
|
|
103
|
+
import { ButlerSessionSummaryStateRepository } from "../storage/repositories/butler-session-summary-state-repository.js";
|
|
104
|
+
import { PatrolPlanRepository } from "../storage/repositories/patrol-plan-repository.js";
|
|
105
|
+
import { PatrolRunRepository } from "../storage/repositories/patrol-run-repository.js";
|
|
106
|
+
import { ProjectMemoryRepository } from "../storage/repositories/project-memory-repository.js";
|
|
107
|
+
import { VerificationRunRepository } from "../storage/repositories/verification-run-repository.js";
|
|
69
108
|
import { CommitRuleProfileRepository } from "../storage/repositories/commit-rule-profile-repository.js";
|
|
70
109
|
import { FileContextBindingRepository } from "../storage/repositories/file-context-binding-repository.js";
|
|
71
110
|
import { RecentFileRepository } from "../storage/repositories/recent-file-repository.js";
|
|
72
111
|
import { SessionBindingRepository } from "../storage/repositories/session-binding-repository.js";
|
|
73
112
|
import { SessionChangedFileRepository } from "../storage/repositories/session-changed-file-repository.js";
|
|
74
113
|
import { SessionIndexRepository } from "../storage/repositories/session-index-repository.js";
|
|
114
|
+
import { SessionCheckpointRepository } from "../storage/repositories/session-checkpoint-repository.js";
|
|
75
115
|
import { SessionMessageAttachmentRepository } from "../storage/repositories/session-message-attachment-repository.js";
|
|
116
|
+
import { SessionMessageOriginRepository } from "../storage/repositories/session-message-origin-repository.js";
|
|
76
117
|
import { SessionSendQueueRepository } from "../storage/repositories/session-send-queue-repository.js";
|
|
77
118
|
import { SessionStateRepository } from "../storage/repositories/session-state-repository.js";
|
|
78
119
|
import { SessionStatusSnapshotRepository } from "../storage/repositories/session-status-snapshot-repository.js";
|
|
@@ -105,13 +146,28 @@ export function createServer(config) {
|
|
|
105
146
|
authUserRepository: new AuthUserRepository(database.db),
|
|
106
147
|
authTokenRepository: new AuthTokenRepository(database.db),
|
|
107
148
|
workspaceRepository: new WorkspaceRepository(database.db),
|
|
149
|
+
butlerControlSessionRepository: new ButlerControlSessionRepository(database.db),
|
|
150
|
+
butlerControlEventRepository: new ButlerControlEventRepository(database.db),
|
|
151
|
+
butlerFollowUpTaskRepository: new ButlerFollowUpTaskRepository(database.db),
|
|
152
|
+
butlerInboxItemRepository: new ButlerInboxItemRepository(database.db),
|
|
153
|
+
butlerNotificationArchiveRepository: new ButlerNotificationArchiveRepository(database.db),
|
|
154
|
+
butlerProfileRepository: new ButlerProfileRepository(database.db),
|
|
155
|
+
butlerProjectRepository: new ButlerProjectRepository(database.db),
|
|
156
|
+
butlerSessionRepository: new ButlerSessionRepository(database.db),
|
|
157
|
+
butlerSessionSummaryStateRepository: new ButlerSessionSummaryStateRepository(database.db),
|
|
158
|
+
projectMemoryRepository: new ProjectMemoryRepository(database.db),
|
|
159
|
+
patrolPlanRepository: new PatrolPlanRepository(database.db),
|
|
160
|
+
patrolRunRepository: new PatrolRunRepository(database.db),
|
|
161
|
+
verificationRunRepository: new VerificationRunRepository(database.db),
|
|
108
162
|
commitRuleProfileRepository: new CommitRuleProfileRepository(database.db),
|
|
109
163
|
recentFileRepository: new RecentFileRepository(database.db),
|
|
110
164
|
fileContextBindingRepository: new FileContextBindingRepository(database.db),
|
|
111
165
|
sessionBindingRepository: new SessionBindingRepository(database.db),
|
|
112
166
|
sessionChangedFileRepository: new SessionChangedFileRepository(database.db),
|
|
167
|
+
sessionCheckpointRepository: new SessionCheckpointRepository(database.db),
|
|
113
168
|
sessionIndexRepository: new SessionIndexRepository(database.db),
|
|
114
169
|
sessionMessageAttachmentRepository: new SessionMessageAttachmentRepository(database.db),
|
|
170
|
+
sessionMessageOriginRepository: new SessionMessageOriginRepository(database.db),
|
|
115
171
|
sessionSendQueueRepository: new SessionSendQueueRepository(database.db),
|
|
116
172
|
sessionStateRepository: new SessionStateRepository(database.db),
|
|
117
173
|
sessionStatusSnapshotRepository: new SessionStatusSnapshotRepository(database.db),
|
|
@@ -159,9 +215,69 @@ export function createServer(config) {
|
|
|
159
215
|
const sessionMessageAttachmentService = new SessionMessageAttachmentService(repositories.sessionMessageAttachmentRepository, config);
|
|
160
216
|
const sessionChangedFileService = new SessionChangedFileService(repositories.sessionChangedFileRepository);
|
|
161
217
|
const sessionActivityAuthorityService = new SessionActivityAuthorityService();
|
|
162
|
-
const sessionHistoryService = new SessionHistoryService(database.db, repositories.workspaceRepository, repositories.sessionBindingRepository, sessionChangedFileService, repositories.sessionIndexRepository, sessionMessageAttachmentService, repositories.sessionStateRepository, repositories.sessionStatusSnapshotRepository, config, sessionActivityAuthorityService);
|
|
218
|
+
const sessionHistoryService = new SessionHistoryService(database.db, repositories.workspaceRepository, repositories.sessionBindingRepository, sessionChangedFileService, repositories.sessionIndexRepository, sessionMessageAttachmentService, repositories.sessionStateRepository, repositories.sessionStatusSnapshotRepository, config, sessionActivityAuthorityService, repositories.sessionMessageOriginRepository);
|
|
163
219
|
const sessionLiveRuntimeService = new SessionLiveRuntimeService(sessionHistoryService, sessionMessageAttachmentService, workspaceService, sessionChangedFileService, repositories.sessionBindingRepository, repositories.authUserRepository, repositories.sessionSendQueueRepository, repositories.sessionIndexRepository, repositories.sessionStateRepository, repositories.sessionStatusSnapshotRepository, config, sessionActivityAuthorityService);
|
|
164
|
-
const
|
|
220
|
+
const butlerProfileService = new ButlerProfileService(repositories.butlerProfileRepository, repositories.butlerProjectRepository, path.dirname(config.databasePath));
|
|
221
|
+
const butlerRuntimeRootDir = path.join(path.dirname(config.databasePath), "butler-runtime");
|
|
222
|
+
const butlerRuntimeConfig = {
|
|
223
|
+
...config,
|
|
224
|
+
codexHomeDir: path.join(butlerRuntimeRootDir, "codex-home"),
|
|
225
|
+
claudeCodeHomeDir: path.join(butlerRuntimeRootDir, "claude-home")
|
|
226
|
+
};
|
|
227
|
+
const butlerSummaryRuntimeConfig = {
|
|
228
|
+
...config,
|
|
229
|
+
codexHomeDir: path.join(butlerRuntimeRootDir, "summary-codex-home"),
|
|
230
|
+
claudeCodeHomeDir: path.join(butlerRuntimeRootDir, "summary-claude-home")
|
|
231
|
+
};
|
|
232
|
+
const butlerFollowUpRuntimeConfig = {
|
|
233
|
+
...config,
|
|
234
|
+
codexHomeDir: path.join(butlerRuntimeRootDir, "follow-up-codex-home"),
|
|
235
|
+
claudeCodeHomeDir: path.join(butlerRuntimeRootDir, "follow-up-claude-home")
|
|
236
|
+
};
|
|
237
|
+
const butlerSessionLiveRuntimeService = new SessionLiveRuntimeService(sessionHistoryService, sessionMessageAttachmentService, workspaceService, sessionChangedFileService, repositories.sessionBindingRepository, repositories.authUserRepository, repositories.sessionSendQueueRepository, repositories.sessionIndexRepository, repositories.sessionStateRepository, repositories.sessionStatusSnapshotRepository, butlerRuntimeConfig, sessionActivityAuthorityService);
|
|
238
|
+
const butlerSummarySessionLiveRuntimeService = new SessionLiveRuntimeService(sessionHistoryService, sessionMessageAttachmentService, workspaceService, sessionChangedFileService, repositories.sessionBindingRepository, repositories.authUserRepository, repositories.sessionSendQueueRepository, repositories.sessionIndexRepository, repositories.sessionStateRepository, repositories.sessionStatusSnapshotRepository, butlerSummaryRuntimeConfig, sessionActivityAuthorityService);
|
|
239
|
+
const butlerFollowUpSessionLiveRuntimeService = new SessionLiveRuntimeService(sessionHistoryService, sessionMessageAttachmentService, workspaceService, sessionChangedFileService, repositories.sessionBindingRepository, repositories.authUserRepository, repositories.sessionSendQueueRepository, repositories.sessionIndexRepository, repositories.sessionStateRepository, repositories.sessionStatusSnapshotRepository, butlerFollowUpRuntimeConfig, sessionActivityAuthorityService);
|
|
240
|
+
const workbenchService = new WorkbenchService(repositories.workspaceRepository, sessionHistoryService, butlerProfileService, repositories.butlerControlSessionRepository);
|
|
241
|
+
const butlerProjectService = new ButlerProjectService(repositories.butlerProjectRepository, repositories.butlerSessionRepository, repositories.workspaceRepository, butlerProfileService);
|
|
242
|
+
const butlerInboxService = new ButlerInboxService(repositories.butlerProjectRepository, repositories.butlerInboxItemRepository);
|
|
243
|
+
const butlerNotificationService = new ButlerNotificationService(repositories.butlerNotificationArchiveRepository);
|
|
244
|
+
const butlerSessionService = new ButlerSessionService(repositories.butlerProjectRepository, repositories.butlerSessionRepository, repositories.sessionCheckpointRepository, repositories.sessionBindingRepository, repositories.sessionIndexRepository, repositories.sessionStateRepository, sessionLiveRuntimeService, sessionHistoryService);
|
|
245
|
+
const projectMemoryService = new ProjectMemoryService(repositories.butlerProjectRepository, repositories.projectMemoryRepository);
|
|
246
|
+
const patrolPlanService = new PatrolPlanService(repositories.butlerProjectRepository, repositories.patrolPlanRepository);
|
|
247
|
+
const patrolRunService = new PatrolRunService(repositories.butlerProjectRepository, repositories.patrolPlanRepository, repositories.patrolRunRepository);
|
|
248
|
+
const instructionAdapter = new InstructionAdapter();
|
|
249
|
+
const providerAdapterRegistry = new ProviderAdapterRegistry([
|
|
250
|
+
new RuntimePatrolProviderAdapter("codex", sessionLiveRuntimeService, sessionHistoryService),
|
|
251
|
+
new RuntimePatrolProviderAdapter("claude-code", sessionLiveRuntimeService, sessionHistoryService)
|
|
252
|
+
]);
|
|
253
|
+
const summaryProviderAdapterRegistry = new ProviderAdapterRegistry([
|
|
254
|
+
new RuntimePatrolProviderAdapter("codex", butlerSummarySessionLiveRuntimeService, sessionHistoryService),
|
|
255
|
+
new RuntimePatrolProviderAdapter("claude-code", butlerSummarySessionLiveRuntimeService, sessionHistoryService)
|
|
256
|
+
]);
|
|
257
|
+
const followUpProviderAdapterRegistry = new ProviderAdapterRegistry([
|
|
258
|
+
new RuntimePatrolProviderAdapter("codex", butlerFollowUpSessionLiveRuntimeService, sessionHistoryService),
|
|
259
|
+
new RuntimePatrolProviderAdapter("claude-code", butlerFollowUpSessionLiveRuntimeService, sessionHistoryService)
|
|
260
|
+
]);
|
|
261
|
+
const patrolExecutionService = new PatrolExecutionService(repositories.butlerProjectRepository, repositories.butlerSessionRepository, repositories.sessionCheckpointRepository, repositories.patrolPlanRepository, patrolRunService, repositories.projectMemoryRepository, repositories.sessionChangedFileRepository, repositories.authUserRepository, providerAdapterRegistry, instructionAdapter);
|
|
262
|
+
const patrolScheduler = new PatrolScheduler(patrolPlanService, patrolRunService, patrolExecutionService);
|
|
263
|
+
const sessionSummaryInstructionAdapter = new SessionSummaryInstructionAdapter();
|
|
264
|
+
const butlerFollowUpEvaluationInstructionAdapter = new ButlerFollowUpEvaluationInstructionAdapter();
|
|
265
|
+
const verificationRunService = new VerificationRunService(repositories.butlerProjectRepository, repositories.butlerSessionRepository, repositories.sessionCheckpointRepository, repositories.verificationRunRepository);
|
|
266
|
+
const butlerContextAggregator = new ButlerContextAggregator(butlerProfileService, butlerProjectService, butlerSessionService, butlerInboxService, projectMemoryService, patrolRunService, verificationRunService, repositories.sessionCheckpointRepository);
|
|
267
|
+
const butlerAuthService = new ButlerAuthService(repositories.authTokenRepository, config);
|
|
268
|
+
const butlerSessionSummaryService = new ButlerSessionSummaryService(butlerProfileService, butlerProjectService, butlerSessionService, repositories.butlerSessionRepository, repositories.butlerSessionSummaryStateRepository, repositories.sessionCheckpointRepository, repositories.sessionIndexRepository, repositories.authUserRepository, workspaceService, sessionHistoryService, summaryProviderAdapterRegistry, sessionSummaryInstructionAdapter, {
|
|
269
|
+
summaryCodexHomeDir: butlerSummaryRuntimeConfig.codexHomeDir,
|
|
270
|
+
sourceCodexHomeDir: config.codexHomeDir
|
|
271
|
+
});
|
|
272
|
+
const butlerFollowUpService = new ButlerFollowUpService(butlerProfileService, butlerProjectService, butlerSessionService, repositories.butlerFollowUpTaskRepository, sessionHistoryService, repositories.sessionIndexRepository, sessionLiveRuntimeService, workspaceService, followUpProviderAdapterRegistry, butlerFollowUpEvaluationInstructionAdapter, butlerFollowUpRuntimeConfig.codexHomeDir, config.codexHomeDir, repositories.sessionMessageOriginRepository);
|
|
273
|
+
const butlerActionContextService = new ButlerActionContextService(butlerProjectService, butlerSessionService, butlerFollowUpService);
|
|
274
|
+
const sessionSummaryScheduler = new SessionSummaryScheduler(butlerSessionSummaryService);
|
|
275
|
+
const butlerFollowUpScheduler = new ButlerFollowUpScheduler(butlerFollowUpService);
|
|
276
|
+
const butlerFollowUpTerminalSubscription = sessionLiveRuntimeService.registerTerminalStateListener(async (event) => {
|
|
277
|
+
await butlerFollowUpService.handleSessionTerminal(event.sessionId, event.timestamp);
|
|
278
|
+
});
|
|
279
|
+
const butlerControlSessionService = new ButlerControlSessionService(butlerProfileService, repositories.butlerControlSessionRepository, workspaceService, sessionHistoryService, butlerSessionLiveRuntimeService, butlerContextAggregator, butlerAuthService, butlerRuntimeConfig.codexHomeDir, config.codexHomeDir);
|
|
280
|
+
const butlerControlActionService = new ButlerControlActionService(butlerProfileService, repositories.butlerControlSessionRepository, repositories.butlerControlEventRepository, butlerProjectService, butlerSessionService, patrolRunService, patrolExecutionService, verificationRunService, butlerContextAggregator);
|
|
165
281
|
const fileContextService = new FileContextService(sessionHistoryService, repositories.fileContextBindingRepository);
|
|
166
282
|
const terminalService = new TerminalService(database.db, repositories.terminalInstanceRepository, repositories.terminalRuntimeSessionRepository, workspaceService, config.terminalIdleTimeoutSeconds, {
|
|
167
283
|
terminalLogRootDir: path.join(path.dirname(config.databasePath), "terminal-logs"),
|
|
@@ -177,7 +293,8 @@ export function createServer(config) {
|
|
|
177
293
|
const authController = new AuthController(authService);
|
|
178
294
|
const workspaceController = new WorkspaceController(workspaceService);
|
|
179
295
|
const workbenchController = new WorkbenchController(workbenchService);
|
|
180
|
-
const
|
|
296
|
+
const butlerController = new ButlerController(butlerProfileService, butlerControlSessionService, butlerControlActionService, butlerContextAggregator, butlerFollowUpService, butlerInboxService, butlerNotificationService, butlerProjectService, butlerSessionService, projectMemoryService, patrolPlanService, patrolRunService, patrolExecutionService, verificationRunService, butlerActionContextService);
|
|
297
|
+
const sessionController = new SessionController(sessionHistoryService, sessionLiveRuntimeService, repositories.butlerControlSessionRepository);
|
|
181
298
|
const providerController = new ProviderController(sessionHistoryService, sessionLiveRuntimeService, config);
|
|
182
299
|
const quickPhraseController = new QuickPhraseController(quickPhraseService);
|
|
183
300
|
const profileController = new ProfileController(preferenceProfileService);
|
|
@@ -185,7 +302,7 @@ export function createServer(config) {
|
|
|
185
302
|
const fileContextController = new FileContextController(fileContentService, fileContextService);
|
|
186
303
|
const gitController = new GitController(gitReadService, gitWriteService, commitOrchestrator);
|
|
187
304
|
const terminalController = new TerminalController(terminalService, commandTemplateService);
|
|
188
|
-
const wsHandle = createWsServer(app.server, new WsAuthGuard(authService), sessionHistoryService, sessionLiveRuntimeService, new TerminalWsHub(terminalService), new WorkbenchWsHub(workbenchService, workspacePanelSnapshotService, fileWatcher));
|
|
305
|
+
const wsHandle = createWsServer(app.server, new WsAuthGuard(authService), sessionHistoryService, sessionLiveRuntimeService, new TerminalWsHub(terminalService), new WorkbenchWsHub(workbenchService, workspacePanelSnapshotService, fileWatcher), butlerActionContextService);
|
|
189
306
|
app.server.on("upgrade", (request, socket, head) => {
|
|
190
307
|
templateReverseProxyService.handleWebSocketUpgrade(request, socket, head);
|
|
191
308
|
});
|
|
@@ -211,6 +328,7 @@ export function createServer(config) {
|
|
|
211
328
|
void registerClientRoutes(app, clientController);
|
|
212
329
|
void registerWorkspaceRoutes(app, workspaceController);
|
|
213
330
|
void registerWorkbenchRoutes(app, workbenchController);
|
|
331
|
+
void registerButlerRoutes(app, butlerController);
|
|
214
332
|
void registerSessionRoutes(app, sessionController);
|
|
215
333
|
void registerPreferenceRoutes(app, quickPhraseController, profileController);
|
|
216
334
|
void registerFileRoutes(app, fileController);
|
|
@@ -218,12 +336,22 @@ export function createServer(config) {
|
|
|
218
336
|
void registerTerminalRoutes(app, terminalController);
|
|
219
337
|
void registerProviderRoutes(app, providerController);
|
|
220
338
|
void registerGitRoutes(app, gitController);
|
|
339
|
+
patrolScheduler.start();
|
|
340
|
+
sessionSummaryScheduler.start();
|
|
341
|
+
butlerFollowUpScheduler.start();
|
|
221
342
|
if (config.webUiDir) {
|
|
222
343
|
registerStaticWebRoutes(app, config.webUiDir);
|
|
223
344
|
}
|
|
224
345
|
app.addHook("onClose", async () => {
|
|
225
346
|
stopTerminalDebugEventLoopLagMonitor();
|
|
347
|
+
butlerFollowUpTerminalSubscription.close();
|
|
348
|
+
await patrolScheduler.dispose();
|
|
349
|
+
await sessionSummaryScheduler.dispose();
|
|
350
|
+
await butlerFollowUpScheduler.dispose();
|
|
226
351
|
await terminalService.dispose();
|
|
352
|
+
await butlerFollowUpSessionLiveRuntimeService.dispose();
|
|
353
|
+
await butlerSummarySessionLiveRuntimeService.dispose();
|
|
354
|
+
await butlerSessionLiveRuntimeService.dispose();
|
|
227
355
|
await sessionLiveRuntimeService.dispose();
|
|
228
356
|
await wsHandle.close();
|
|
229
357
|
gitCommandRunner.dispose();
|
|
@@ -241,6 +369,22 @@ export function createServer(config) {
|
|
|
241
369
|
authService,
|
|
242
370
|
workspaceService,
|
|
243
371
|
workbenchService,
|
|
372
|
+
butlerProfileService,
|
|
373
|
+
butlerSessionLiveRuntimeService,
|
|
374
|
+
butlerControlSessionService,
|
|
375
|
+
butlerControlActionService,
|
|
376
|
+
butlerFollowUpService,
|
|
377
|
+
butlerActionContextService,
|
|
378
|
+
butlerProjectService,
|
|
379
|
+
butlerSessionService,
|
|
380
|
+
projectMemoryService,
|
|
381
|
+
patrolPlanService,
|
|
382
|
+
patrolRunService,
|
|
383
|
+
verificationRunService,
|
|
384
|
+
patrolScheduler,
|
|
385
|
+
butlerSessionSummaryService,
|
|
386
|
+
sessionSummaryScheduler,
|
|
387
|
+
butlerFollowUpScheduler,
|
|
244
388
|
workspacePanelSnapshotService,
|
|
245
389
|
fileTreeService,
|
|
246
390
|
fileSearchService,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-server.js","sourceRoot":"","sources":["../../../src/server/create-server.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,OAAO,MAAM,SAAS,CAAC;AAG9B,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACp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AI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type Database from "better-sqlite3";
|
|
2
|
+
import type { ButlerControlEvent } from "../../types/domain.js";
|
|
3
|
+
export declare class ButlerControlEventRepository {
|
|
4
|
+
private readonly db;
|
|
5
|
+
constructor(db: Database.Database);
|
|
6
|
+
create(record: ButlerControlEvent): ButlerControlEvent;
|
|
7
|
+
listByControlSessionId(controlSessionId: string): ButlerControlEvent[];
|
|
8
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
export class ButlerControlEventRepository {
|
|
2
|
+
db;
|
|
3
|
+
constructor(db) {
|
|
4
|
+
this.db = db;
|
|
5
|
+
}
|
|
6
|
+
create(record) {
|
|
7
|
+
this.db
|
|
8
|
+
.prepare(`INSERT INTO butler_control_events (
|
|
9
|
+
id,
|
|
10
|
+
control_session_id,
|
|
11
|
+
kind,
|
|
12
|
+
action_type,
|
|
13
|
+
status,
|
|
14
|
+
title,
|
|
15
|
+
content,
|
|
16
|
+
related_refs_json,
|
|
17
|
+
created_at
|
|
18
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`)
|
|
19
|
+
.run(record.id, record.controlSessionId, record.kind, record.actionType, record.status, record.title, record.content, JSON.stringify(record.relatedRefs), record.createdAt);
|
|
20
|
+
return record;
|
|
21
|
+
}
|
|
22
|
+
listByControlSessionId(controlSessionId) {
|
|
23
|
+
return this.db
|
|
24
|
+
.prepare(`SELECT
|
|
25
|
+
id,
|
|
26
|
+
control_session_id,
|
|
27
|
+
kind,
|
|
28
|
+
action_type,
|
|
29
|
+
status,
|
|
30
|
+
title,
|
|
31
|
+
content,
|
|
32
|
+
related_refs_json,
|
|
33
|
+
created_at
|
|
34
|
+
FROM butler_control_events
|
|
35
|
+
WHERE control_session_id = ?
|
|
36
|
+
ORDER BY created_at ASC`)
|
|
37
|
+
.all(controlSessionId)
|
|
38
|
+
.map((row) => mapEventRow(row));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function mapEventRow(row) {
|
|
42
|
+
return {
|
|
43
|
+
id: row.id,
|
|
44
|
+
controlSessionId: row.control_session_id,
|
|
45
|
+
kind: row.kind,
|
|
46
|
+
actionType: row.action_type,
|
|
47
|
+
status: row.status,
|
|
48
|
+
title: row.title,
|
|
49
|
+
content: row.content,
|
|
50
|
+
relatedRefs: parseRelatedRefs(row.related_refs_json),
|
|
51
|
+
createdAt: row.created_at
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
function parseRelatedRefs(raw) {
|
|
55
|
+
try {
|
|
56
|
+
const parsed = JSON.parse(raw);
|
|
57
|
+
if (!Array.isArray(parsed)) {
|
|
58
|
+
return [];
|
|
59
|
+
}
|
|
60
|
+
return parsed.filter(isRelatedRef);
|
|
61
|
+
}
|
|
62
|
+
catch {
|
|
63
|
+
return [];
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
function isRelatedRef(value) {
|
|
67
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
const candidate = value;
|
|
71
|
+
return (typeof candidate.kind === "string"
|
|
72
|
+
&& typeof candidate.id === "string"
|
|
73
|
+
&& typeof candidate.label === "string"
|
|
74
|
+
&& (typeof candidate.routePath === "string" || candidate.routePath === null)
|
|
75
|
+
&& (typeof candidate.workspaceId === "string" || candidate.workspaceId === null)
|
|
76
|
+
&& (typeof candidate.projectId === "string" || candidate.projectId === null));
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=butler-control-event-repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"butler-control-event-repository.js","sourceRoot":"","sources":["../../../../src/storage/repositories/butler-control-event-repository.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,4BAA4B;IACV;IAA7B,YAA6B,EAAqB;QAArB,OAAE,GAAF,EAAE,CAAmB;IAAG,CAAC;IAEtD,MAAM,CAAC,M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AE,CAAC;QACZ,CAAC;QAED,OAAO,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IACrC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC;AAED,SAAS,YAAY,CAAC,KAAc;IAClC,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAChE,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,SAAS,GAAG,KAAyC,CAAC;IAC5D,OAAO,CACL,OAAO,SAAS,CAAC,IAAI,KAAK,QAAQ;WAC/B,OAAO,SAAS,CAAC,EAAE,KAAK,QAAQ;WAChC,OAAO,SAAS,CAAC,KAAK,KAAK,QAAQ;WACnC,CAAC,OAAO,SAAS,CAAC,SAAS,KAAK,QAAQ,IAAI,SAAS,CAAC,SAAS,KAAK,IAAI,CAAC;WACzE,CAAC,OAAO,SAAS,CAAC,WAAW,KAAK,QAAQ,IAAI,SAAS,CAAC,WAAW,KAAK,IAAI,CAAC;WAC7E,CAAC,OAAO,SAAS,CAAC,SAAS,KAAK,QAAQ,IAAI,SAAS,CAAC,SAAS,KAAK,IAAI,CAAC,CAC7E,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type Database from "better-sqlite3";
|
|
2
|
+
import type { ButlerControlSession } from "../../types/domain.js";
|
|
3
|
+
export declare class ButlerControlSessionRepository {
|
|
4
|
+
private readonly db;
|
|
5
|
+
constructor(db: Database.Database);
|
|
6
|
+
create(record: ButlerControlSession): ButlerControlSession;
|
|
7
|
+
findById(id: string): ButlerControlSession | null;
|
|
8
|
+
findLatestByProvider(providerId: ButlerControlSession["providerId"]): ButlerControlSession | null;
|
|
9
|
+
listSessionIds(): string[];
|
|
10
|
+
update(record: ButlerControlSession): ButlerControlSession;
|
|
11
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
export class ButlerControlSessionRepository {
|
|
2
|
+
db;
|
|
3
|
+
constructor(db) {
|
|
4
|
+
this.db = db;
|
|
5
|
+
}
|
|
6
|
+
create(record) {
|
|
7
|
+
this.db
|
|
8
|
+
.prepare(`INSERT INTO butler_control_sessions (
|
|
9
|
+
id,
|
|
10
|
+
provider_id,
|
|
11
|
+
session_id,
|
|
12
|
+
status,
|
|
13
|
+
last_context_version,
|
|
14
|
+
last_summary,
|
|
15
|
+
created_at,
|
|
16
|
+
updated_at
|
|
17
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?)`)
|
|
18
|
+
.run(record.id, record.providerId, record.sessionId, record.status, record.lastContextVersion, record.lastSummary, record.createdAt, record.updatedAt);
|
|
19
|
+
return record;
|
|
20
|
+
}
|
|
21
|
+
findById(id) {
|
|
22
|
+
const row = this.db
|
|
23
|
+
.prepare(`SELECT
|
|
24
|
+
id,
|
|
25
|
+
provider_id,
|
|
26
|
+
session_id,
|
|
27
|
+
status,
|
|
28
|
+
last_context_version,
|
|
29
|
+
last_summary,
|
|
30
|
+
created_at,
|
|
31
|
+
updated_at
|
|
32
|
+
FROM butler_control_sessions
|
|
33
|
+
WHERE id = ?`)
|
|
34
|
+
.get(id);
|
|
35
|
+
return row ? mapButlerControlSessionRow(row) : null;
|
|
36
|
+
}
|
|
37
|
+
findLatestByProvider(providerId) {
|
|
38
|
+
const row = this.db
|
|
39
|
+
.prepare(`SELECT
|
|
40
|
+
id,
|
|
41
|
+
provider_id,
|
|
42
|
+
session_id,
|
|
43
|
+
status,
|
|
44
|
+
last_context_version,
|
|
45
|
+
last_summary,
|
|
46
|
+
created_at,
|
|
47
|
+
updated_at
|
|
48
|
+
FROM butler_control_sessions
|
|
49
|
+
WHERE provider_id = ?
|
|
50
|
+
ORDER BY updated_at DESC, created_at DESC
|
|
51
|
+
LIMIT 1`)
|
|
52
|
+
.get(providerId);
|
|
53
|
+
return row ? mapButlerControlSessionRow(row) : null;
|
|
54
|
+
}
|
|
55
|
+
listSessionIds() {
|
|
56
|
+
return this.db
|
|
57
|
+
.prepare(`SELECT session_id
|
|
58
|
+
FROM butler_control_sessions`)
|
|
59
|
+
.all()
|
|
60
|
+
.map((row) => String(row.session_id));
|
|
61
|
+
}
|
|
62
|
+
update(record) {
|
|
63
|
+
this.db
|
|
64
|
+
.prepare(`UPDATE butler_control_sessions
|
|
65
|
+
SET status = ?,
|
|
66
|
+
last_context_version = ?,
|
|
67
|
+
last_summary = ?,
|
|
68
|
+
updated_at = ?
|
|
69
|
+
WHERE id = ?`)
|
|
70
|
+
.run(record.status, record.lastContextVersion, record.lastSummary, record.updatedAt, record.id);
|
|
71
|
+
return record;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
function mapButlerControlSessionRow(row) {
|
|
75
|
+
return {
|
|
76
|
+
id: row.id,
|
|
77
|
+
providerId: row.provider_id,
|
|
78
|
+
sessionId: row.session_id,
|
|
79
|
+
status: row.status,
|
|
80
|
+
lastContextVersion: row.last_context_version,
|
|
81
|
+
lastSummary: row.last_summary,
|
|
82
|
+
createdAt: row.created_at,
|
|
83
|
+
updatedAt: row.updated_at
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=butler-control-session-repository.js.map
|