@shin1ohno/sage 0.9.3 → 0.11.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/dist/cli/mcp-handler.d.ts.map +1 -1
- package/dist/cli/mcp-handler.js +154 -6
- package/dist/cli/mcp-handler.js.map +1 -1
- package/dist/cli/signal-handler.d.ts +23 -0
- package/dist/cli/signal-handler.d.ts.map +1 -0
- package/dist/cli/signal-handler.js +51 -0
- package/dist/cli/signal-handler.js.map +1 -0
- package/dist/config/config-differ.d.ts +21 -0
- package/dist/config/config-differ.d.ts.map +1 -0
- package/dist/config/config-differ.js +194 -0
- package/dist/config/config-differ.js.map +1 -0
- package/dist/config/config-reload-service.d.ts +84 -0
- package/dist/config/config-reload-service.d.ts.map +1 -0
- package/dist/config/config-reload-service.js +234 -0
- package/dist/config/config-reload-service.js.map +1 -0
- package/dist/config/config-watcher.d.ts +78 -0
- package/dist/config/config-watcher.d.ts.map +1 -0
- package/dist/config/config-watcher.js +244 -0
- package/dist/config/config-watcher.js.map +1 -0
- package/dist/config/hot-reload-config.d.ts +16 -0
- package/dist/config/hot-reload-config.d.ts.map +1 -0
- package/dist/config/hot-reload-config.js +61 -0
- package/dist/config/hot-reload-config.js.map +1 -0
- package/dist/index.js +109 -0
- package/dist/index.js.map +1 -1
- package/dist/oauth/index.d.ts +2 -0
- package/dist/oauth/index.d.ts.map +1 -1
- package/dist/oauth/index.js +4 -0
- package/dist/oauth/index.js.map +1 -1
- package/dist/oauth/oauth-callback-server.d.ts +100 -0
- package/dist/oauth/oauth-callback-server.d.ts.map +1 -0
- package/dist/oauth/oauth-callback-server.js +276 -0
- package/dist/oauth/oauth-callback-server.js.map +1 -0
- package/dist/services/reloadable/calendar-source-manager-adapter.d.ts +45 -0
- package/dist/services/reloadable/calendar-source-manager-adapter.d.ts.map +1 -0
- package/dist/services/reloadable/calendar-source-manager-adapter.js +106 -0
- package/dist/services/reloadable/calendar-source-manager-adapter.js.map +1 -0
- package/dist/services/reloadable/index.d.ts +46 -0
- package/dist/services/reloadable/index.d.ts.map +1 -0
- package/dist/services/reloadable/index.js +88 -0
- package/dist/services/reloadable/index.js.map +1 -0
- package/dist/services/reloadable/notion-service-adapter.d.ts +45 -0
- package/dist/services/reloadable/notion-service-adapter.d.ts.map +1 -0
- package/dist/services/reloadable/notion-service-adapter.js +86 -0
- package/dist/services/reloadable/notion-service-adapter.js.map +1 -0
- package/dist/services/reloadable/priority-engine-adapter.d.ts +73 -0
- package/dist/services/reloadable/priority-engine-adapter.d.ts.map +1 -0
- package/dist/services/reloadable/priority-engine-adapter.js +105 -0
- package/dist/services/reloadable/priority-engine-adapter.js.map +1 -0
- package/dist/services/reloadable/reminder-manager-adapter.d.ts +45 -0
- package/dist/services/reloadable/reminder-manager-adapter.d.ts.map +1 -0
- package/dist/services/reloadable/reminder-manager-adapter.js +80 -0
- package/dist/services/reloadable/reminder-manager-adapter.js.map +1 -0
- package/dist/services/reloadable/todo-list-manager-adapter.d.ts +45 -0
- package/dist/services/reloadable/todo-list-manager-adapter.d.ts.map +1 -0
- package/dist/services/reloadable/todo-list-manager-adapter.js +80 -0
- package/dist/services/reloadable/todo-list-manager-adapter.js.map +1 -0
- package/dist/services/reloadable/working-cadence-adapter.d.ts +52 -0
- package/dist/services/reloadable/working-cadence-adapter.d.ts.map +1 -0
- package/dist/services/reloadable/working-cadence-adapter.js +77 -0
- package/dist/services/reloadable/working-cadence-adapter.js.map +1 -0
- package/dist/services/service-registry.d.ts +85 -0
- package/dist/services/service-registry.d.ts.map +1 -0
- package/dist/services/service-registry.js +166 -0
- package/dist/services/service-registry.js.map +1 -0
- package/dist/tools/config/index.d.ts +9 -0
- package/dist/tools/config/index.d.ts.map +1 -0
- package/dist/tools/config/index.js +8 -0
- package/dist/tools/config/index.js.map +1 -0
- package/dist/tools/config/reload-handler.d.ts +35 -0
- package/dist/tools/config/reload-handler.d.ts.map +1 -0
- package/dist/tools/config/reload-handler.js +63 -0
- package/dist/tools/config/reload-handler.js.map +1 -0
- package/dist/tools/integrations/handlers.d.ts +2 -0
- package/dist/tools/integrations/handlers.d.ts.map +1 -1
- package/dist/tools/integrations/handlers.js.map +1 -1
- package/dist/tools/oauth/authenticate-google.d.ts +54 -0
- package/dist/tools/oauth/authenticate-google.d.ts.map +1 -0
- package/dist/tools/oauth/authenticate-google.js +180 -0
- package/dist/tools/oauth/authenticate-google.js.map +1 -0
- package/dist/tools/oauth/index.d.ts +26 -0
- package/dist/tools/oauth/index.d.ts.map +1 -0
- package/dist/tools/oauth/index.js +9 -0
- package/dist/tools/oauth/index.js.map +1 -0
- package/dist/tools/setup/handlers.d.ts +2 -0
- package/dist/tools/setup/handlers.d.ts.map +1 -1
- package/dist/tools/setup/handlers.js +14 -0
- package/dist/tools/setup/handlers.js.map +1 -1
- package/dist/types/hot-reload.d.ts +131 -0
- package/dist/types/hot-reload.d.ts.map +1 -0
- package/dist/types/hot-reload.js +5 -0
- package/dist/types/hot-reload.js.map +1 -0
- package/dist/utils/browser-opener.d.ts +35 -0
- package/dist/utils/browser-opener.d.ts.map +1 -0
- package/dist/utils/browser-opener.js +71 -0
- package/dist/utils/browser-opener.js.map +1 -0
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OAuth Callback Server
|
|
3
|
+
* Requirements: FR-2 (Local HTTP Callback Server)
|
|
4
|
+
*
|
|
5
|
+
* Temporary HTTP server to capture OAuth authorization callbacks.
|
|
6
|
+
* Listens on localhost only for security.
|
|
7
|
+
*/
|
|
8
|
+
import { createServer } from 'http';
|
|
9
|
+
import { EventEmitter } from 'events';
|
|
10
|
+
import { URL } from 'url';
|
|
11
|
+
import { oauthLogger } from '../utils/logger.js';
|
|
12
|
+
// HTML Templates
|
|
13
|
+
const SUCCESS_HTML = `<!DOCTYPE html>
|
|
14
|
+
<html>
|
|
15
|
+
<head>
|
|
16
|
+
<title>sage - Google Calendar 認証完了</title>
|
|
17
|
+
<meta charset="utf-8">
|
|
18
|
+
<style>
|
|
19
|
+
body { font-family: system-ui, -apple-system, sans-serif; text-align: center; padding: 50px; background: #f9fafb; }
|
|
20
|
+
.container { max-width: 400px; margin: 0 auto; background: white; padding: 40px; border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
|
|
21
|
+
.success { color: #22c55e; font-size: 48px; margin-bottom: 20px; }
|
|
22
|
+
h1 { color: #111827; font-size: 24px; margin-bottom: 16px; }
|
|
23
|
+
p { color: #6b7280; font-size: 16px; }
|
|
24
|
+
</style>
|
|
25
|
+
</head>
|
|
26
|
+
<body>
|
|
27
|
+
<div class="container">
|
|
28
|
+
<div class="success">✓</div>
|
|
29
|
+
<h1>認証が完了しました</h1>
|
|
30
|
+
<p>このウィンドウを閉じて、Claude に戻ってください。</p>
|
|
31
|
+
</div>
|
|
32
|
+
</body>
|
|
33
|
+
</html>`;
|
|
34
|
+
const ERROR_HTML = (error, description) => `<!DOCTYPE html>
|
|
35
|
+
<html>
|
|
36
|
+
<head>
|
|
37
|
+
<title>sage - Google Calendar 認証エラー</title>
|
|
38
|
+
<meta charset="utf-8">
|
|
39
|
+
<style>
|
|
40
|
+
body { font-family: system-ui, -apple-system, sans-serif; text-align: center; padding: 50px; background: #f9fafb; }
|
|
41
|
+
.container { max-width: 400px; margin: 0 auto; background: white; padding: 40px; border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
|
|
42
|
+
.error { color: #ef4444; font-size: 48px; margin-bottom: 20px; }
|
|
43
|
+
h1 { color: #111827; font-size: 24px; margin-bottom: 16px; }
|
|
44
|
+
p { color: #6b7280; font-size: 16px; }
|
|
45
|
+
.error-detail { background: #fef2f2; color: #991b1b; padding: 12px; border-radius: 8px; margin-top: 16px; font-size: 14px; }
|
|
46
|
+
</style>
|
|
47
|
+
</head>
|
|
48
|
+
<body>
|
|
49
|
+
<div class="container">
|
|
50
|
+
<div class="error">✗</div>
|
|
51
|
+
<h1>認証に失敗しました</h1>
|
|
52
|
+
<p>Claude に戻って再試行してください。</p>
|
|
53
|
+
<div class="error-detail">${error}: ${description}</div>
|
|
54
|
+
</div>
|
|
55
|
+
</body>
|
|
56
|
+
</html>`;
|
|
57
|
+
/**
|
|
58
|
+
* OAuth Callback Server
|
|
59
|
+
*
|
|
60
|
+
* Temporary HTTP server that captures OAuth authorization callbacks.
|
|
61
|
+
* Binds only to localhost for security (NFR-4).
|
|
62
|
+
*/
|
|
63
|
+
export class OAuthCallbackServer extends EventEmitter {
|
|
64
|
+
server = null;
|
|
65
|
+
state = {
|
|
66
|
+
isRunning: false,
|
|
67
|
+
port: null,
|
|
68
|
+
startedAt: null,
|
|
69
|
+
callbackReceived: false,
|
|
70
|
+
};
|
|
71
|
+
options;
|
|
72
|
+
callbackPromise = null;
|
|
73
|
+
callbackResolve = null;
|
|
74
|
+
timeoutHandle = null;
|
|
75
|
+
constructor(options) {
|
|
76
|
+
super();
|
|
77
|
+
this.options = {
|
|
78
|
+
port: options?.port ?? 3000,
|
|
79
|
+
timeout: options?.timeout ?? 300000, // 5 minutes
|
|
80
|
+
host: options?.host ?? '127.0.0.1',
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Start the server
|
|
85
|
+
*
|
|
86
|
+
* Attempts to bind to the configured port, falling back to ports 3001-3010
|
|
87
|
+
* if the primary port is in use.
|
|
88
|
+
*
|
|
89
|
+
* @returns Port number and callback URL
|
|
90
|
+
* @throws Error if no port is available
|
|
91
|
+
*/
|
|
92
|
+
async start() {
|
|
93
|
+
if (this.state.isRunning) {
|
|
94
|
+
throw new Error('Server is already running');
|
|
95
|
+
}
|
|
96
|
+
// Try ports starting from configured port
|
|
97
|
+
const portsToTry = [this.options.port];
|
|
98
|
+
for (let i = 1; i <= 10; i++) {
|
|
99
|
+
portsToTry.push(this.options.port + i);
|
|
100
|
+
}
|
|
101
|
+
let lastError = null;
|
|
102
|
+
for (const port of portsToTry) {
|
|
103
|
+
try {
|
|
104
|
+
await this.tryBindToPort(port);
|
|
105
|
+
this.state.isRunning = true;
|
|
106
|
+
this.state.port = port;
|
|
107
|
+
this.state.startedAt = Date.now();
|
|
108
|
+
this.state.callbackReceived = false;
|
|
109
|
+
const callbackUrl = `http://${this.options.host}:${port}/oauth/callback`;
|
|
110
|
+
oauthLogger.info({ port, callbackUrl }, 'OAuth callback server started');
|
|
111
|
+
return { port, callbackUrl };
|
|
112
|
+
}
|
|
113
|
+
catch (error) {
|
|
114
|
+
lastError = error;
|
|
115
|
+
if (error.code !== 'EADDRINUSE') {
|
|
116
|
+
throw error;
|
|
117
|
+
}
|
|
118
|
+
// Port in use, try next
|
|
119
|
+
oauthLogger.debug({ port }, 'Port in use, trying next');
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
throw new Error(`Failed to bind to any port (tried ${portsToTry[0]}-${portsToTry[portsToTry.length - 1]}): ${lastError?.message}`);
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Try to bind to a specific port
|
|
126
|
+
*/
|
|
127
|
+
tryBindToPort(port) {
|
|
128
|
+
return new Promise((resolve, reject) => {
|
|
129
|
+
this.server = createServer((req, res) => this.handleRequest(req, res));
|
|
130
|
+
this.server.on('error', (error) => {
|
|
131
|
+
reject(error);
|
|
132
|
+
});
|
|
133
|
+
this.server.listen(port, this.options.host, () => {
|
|
134
|
+
resolve();
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Handle incoming HTTP request
|
|
140
|
+
*/
|
|
141
|
+
handleRequest(req, res) {
|
|
142
|
+
const url = new URL(req.url || '/', `http://${this.options.host}:${this.state.port}`);
|
|
143
|
+
// Only handle GET /oauth/callback
|
|
144
|
+
if (req.method !== 'GET' || url.pathname !== '/oauth/callback') {
|
|
145
|
+
res.writeHead(404, { 'Content-Type': 'text/plain' });
|
|
146
|
+
res.end('Not Found');
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
// Parse callback parameters
|
|
150
|
+
const code = url.searchParams.get('code');
|
|
151
|
+
const error = url.searchParams.get('error');
|
|
152
|
+
const errorDescription = url.searchParams.get('error_description') || 'Unknown error';
|
|
153
|
+
const state = url.searchParams.get('state');
|
|
154
|
+
let result;
|
|
155
|
+
if (code) {
|
|
156
|
+
// Success - authorization code received
|
|
157
|
+
result = {
|
|
158
|
+
success: true,
|
|
159
|
+
code,
|
|
160
|
+
state: state || undefined,
|
|
161
|
+
};
|
|
162
|
+
res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8' });
|
|
163
|
+
res.end(SUCCESS_HTML);
|
|
164
|
+
oauthLogger.info('OAuth callback received successfully');
|
|
165
|
+
}
|
|
166
|
+
else if (error) {
|
|
167
|
+
// Error from OAuth provider
|
|
168
|
+
result = {
|
|
169
|
+
success: false,
|
|
170
|
+
error,
|
|
171
|
+
errorDescription,
|
|
172
|
+
state: state || undefined,
|
|
173
|
+
};
|
|
174
|
+
res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8' });
|
|
175
|
+
res.end(ERROR_HTML(error, errorDescription));
|
|
176
|
+
oauthLogger.warn({ errorCode: error, errorDescription }, 'OAuth callback received with error');
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
// Missing required parameters
|
|
180
|
+
result = {
|
|
181
|
+
success: false,
|
|
182
|
+
error: 'invalid_request',
|
|
183
|
+
errorDescription: 'Missing code or error parameter',
|
|
184
|
+
};
|
|
185
|
+
res.writeHead(400, { 'Content-Type': 'text/html; charset=utf-8' });
|
|
186
|
+
res.end(ERROR_HTML('invalid_request', 'Missing code or error parameter'));
|
|
187
|
+
oauthLogger.warn('OAuth callback received without code or error');
|
|
188
|
+
}
|
|
189
|
+
// Mark callback as received and resolve promise
|
|
190
|
+
this.state.callbackReceived = true;
|
|
191
|
+
this.emit('callback', result);
|
|
192
|
+
if (this.callbackResolve) {
|
|
193
|
+
this.callbackResolve(result);
|
|
194
|
+
this.callbackResolve = null;
|
|
195
|
+
}
|
|
196
|
+
// Clear timeout
|
|
197
|
+
if (this.timeoutHandle) {
|
|
198
|
+
clearTimeout(this.timeoutHandle);
|
|
199
|
+
this.timeoutHandle = null;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Wait for callback to be received
|
|
204
|
+
*
|
|
205
|
+
* Returns a promise that resolves when a callback is received
|
|
206
|
+
* or rejects on timeout.
|
|
207
|
+
*
|
|
208
|
+
* @returns Callback result
|
|
209
|
+
* @throws Error on timeout
|
|
210
|
+
*/
|
|
211
|
+
waitForCallback() {
|
|
212
|
+
if (!this.state.isRunning) {
|
|
213
|
+
return Promise.reject(new Error('Server is not running'));
|
|
214
|
+
}
|
|
215
|
+
if (this.state.callbackReceived) {
|
|
216
|
+
return Promise.reject(new Error('Callback already received'));
|
|
217
|
+
}
|
|
218
|
+
if (this.callbackPromise) {
|
|
219
|
+
return this.callbackPromise;
|
|
220
|
+
}
|
|
221
|
+
this.callbackPromise = new Promise((resolve, reject) => {
|
|
222
|
+
this.callbackResolve = resolve;
|
|
223
|
+
// Set timeout
|
|
224
|
+
this.timeoutHandle = setTimeout(() => {
|
|
225
|
+
this.callbackResolve = null;
|
|
226
|
+
this.callbackPromise = null;
|
|
227
|
+
reject(new Error(`OAuth callback timeout after ${this.options.timeout / 1000} seconds. Please try again.`));
|
|
228
|
+
// Auto-shutdown on timeout
|
|
229
|
+
this.shutdown().catch(() => {
|
|
230
|
+
// Ignore shutdown errors on timeout
|
|
231
|
+
});
|
|
232
|
+
}, this.options.timeout);
|
|
233
|
+
});
|
|
234
|
+
return this.callbackPromise;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Shutdown the server
|
|
238
|
+
*
|
|
239
|
+
* Closes the server and releases the port.
|
|
240
|
+
*/
|
|
241
|
+
async shutdown() {
|
|
242
|
+
if (!this.server) {
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
// Clear timeout
|
|
246
|
+
if (this.timeoutHandle) {
|
|
247
|
+
clearTimeout(this.timeoutHandle);
|
|
248
|
+
this.timeoutHandle = null;
|
|
249
|
+
}
|
|
250
|
+
return new Promise((resolve) => {
|
|
251
|
+
this.server.close(() => {
|
|
252
|
+
this.server = null;
|
|
253
|
+
this.state.isRunning = false;
|
|
254
|
+
this.state.port = null;
|
|
255
|
+
this.state.startedAt = null;
|
|
256
|
+
this.callbackPromise = null;
|
|
257
|
+
this.callbackResolve = null;
|
|
258
|
+
oauthLogger.info('OAuth callback server stopped');
|
|
259
|
+
resolve();
|
|
260
|
+
});
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Check if server is running
|
|
265
|
+
*/
|
|
266
|
+
isRunning() {
|
|
267
|
+
return this.state.isRunning;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Get current server state
|
|
271
|
+
*/
|
|
272
|
+
getState() {
|
|
273
|
+
return { ...this.state };
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
//# sourceMappingURL=oauth-callback-server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth-callback-server.js","sourceRoot":"","sources":["../../src/oauth/oauth-callback-server.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,YAAY,EAA2C,MAAM,MAAM,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAmCjD,iBAAiB;AACjB,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;QAoBb,CAAC;AAET,MAAM,UAAU,GAAG,CAAC,KAAa,EAAE,WAAmB,EAAE,EAAE,CAAC;;;;;;;;;;;;;;;;;;;gCAmB3B,KAAK,KAAK,WAAW;;;QAG7C,CAAC;AAET;;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AO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,QAAQ;QACZ,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YACjB,OAAO;QACT,CAAC;QAED,gBAAgB;QAChB,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;YACvB,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YACjC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAC5B,CAAC;QAED,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC7B,IAAI,CAAC,MAAO,CAAC,KAAK,CAAC,GAAG,EAAE;gBACtB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;gBACnB,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC;gBAC7B,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;gBACvB,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;gBAC5B,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;gBAC5B,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;gBAC5B,WAAW,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAC;gBAClD,OAAO,EAAE,CAAC;YACZ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,SAAS;QACP,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC;IAC9B,CAAC;IAED;;OAEG;IACH,QAAQ;QACN,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;IAC3B,CAAC;CACF"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reloadable Service Adapter for CalendarSourceManager
|
|
3
|
+
*
|
|
4
|
+
* Wraps CalendarSourceManager to support hot-reload functionality.
|
|
5
|
+
* Reinitializes the service when calendar or integrations config changes.
|
|
6
|
+
*/
|
|
7
|
+
import type { ReloadableService } from '../../types/hot-reload.js';
|
|
8
|
+
import type { UserConfig } from '../../types/config.js';
|
|
9
|
+
import { CalendarSourceManager } from '../../integrations/calendar-source-manager.js';
|
|
10
|
+
/**
|
|
11
|
+
* Factory function type for creating CalendarSourceManager
|
|
12
|
+
*/
|
|
13
|
+
export type CalendarSourceManagerFactory = (config: UserConfig) => CalendarSourceManager;
|
|
14
|
+
/**
|
|
15
|
+
* Default factory that creates CalendarSourceManager with CalendarService and GoogleCalendarService
|
|
16
|
+
*/
|
|
17
|
+
export declare function createCalendarSourceManager(config: UserConfig): CalendarSourceManager;
|
|
18
|
+
/**
|
|
19
|
+
* Reloadable adapter for CalendarSourceManager
|
|
20
|
+
*/
|
|
21
|
+
export declare class CalendarSourceManagerAdapter implements ReloadableService {
|
|
22
|
+
readonly name = "CalendarSourceManager";
|
|
23
|
+
readonly dependsOnSections: readonly string[];
|
|
24
|
+
private instance;
|
|
25
|
+
private factory;
|
|
26
|
+
/**
|
|
27
|
+
* Constructor
|
|
28
|
+
* @param factoryOrInstance - Either a factory function or an existing instance
|
|
29
|
+
*/
|
|
30
|
+
constructor(factoryOrInstance: CalendarSourceManagerFactory | CalendarSourceManager);
|
|
31
|
+
/**
|
|
32
|
+
* Get the current CalendarSourceManager instance
|
|
33
|
+
*/
|
|
34
|
+
getInstance(): CalendarSourceManager | null;
|
|
35
|
+
/**
|
|
36
|
+
* Shutdown the current instance
|
|
37
|
+
* CalendarSourceManager does not have explicit cleanup needs
|
|
38
|
+
*/
|
|
39
|
+
shutdown(): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Reinitialize with new configuration
|
|
42
|
+
*/
|
|
43
|
+
reinitialize(config: UserConfig): Promise<void>;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=calendar-source-manager-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-source-manager-adapter.d.ts","sourceRoot":"","sources":["../../../src/services/reloadable/calendar-source-manager-adapter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AAQtF;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,MAAM,EAAE,UAAU,KAAK,qBAAqB,CAAC;AAmCzF;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,UAAU,GAAG,qBAAqB,CASrF;AAED;;GAEG;AACH,qBAAa,4BAA6B,YAAW,iBAAiB;IACpE,QAAQ,CAAC,IAAI,2BAA2B;IACxC,QAAQ,CAAC,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAgC;IAE7E,OAAO,CAAC,QAAQ,CAAsC;IACtD,OAAO,CAAC,OAAO,CAA+B;IAE9C;;;OAGG;gBACS,iBAAiB,EAAE,4BAA4B,GAAG,qBAAqB;IASnF;;OAEG;IACH,WAAW,IAAI,qBAAqB,GAAG,IAAI;IAI3C;;;OAGG;IACG,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAO/B;;OAEG;IACG,YAAY,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CAWtD"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reloadable Service Adapter for CalendarSourceManager
|
|
3
|
+
*
|
|
4
|
+
* Wraps CalendarSourceManager to support hot-reload functionality.
|
|
5
|
+
* Reinitializes the service when calendar or integrations config changes.
|
|
6
|
+
*/
|
|
7
|
+
import { CalendarSourceManager } from '../../integrations/calendar-source-manager.js';
|
|
8
|
+
import { CalendarService } from '../../integrations/calendar-service.js';
|
|
9
|
+
import { GoogleCalendarService } from '../../integrations/google-calendar-service.js';
|
|
10
|
+
import { GoogleOAuthHandler } from '../../oauth/google-oauth-handler.js';
|
|
11
|
+
import { createLogger } from '../../utils/logger.js';
|
|
12
|
+
const logger = createLogger('CalendarSourceManagerAdapter');
|
|
13
|
+
/**
|
|
14
|
+
* Create GoogleCalendarService if Google Calendar integration is enabled and configured
|
|
15
|
+
*/
|
|
16
|
+
function createGoogleCalendarServiceIfEnabled(config) {
|
|
17
|
+
// Check if Google Calendar is enabled via integrations config
|
|
18
|
+
if (!config.integrations.googleCalendar.enabled) {
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
// Get OAuth credentials from environment variables
|
|
22
|
+
const clientId = process.env.GOOGLE_CLIENT_ID;
|
|
23
|
+
const clientSecret = process.env.GOOGLE_CLIENT_SECRET;
|
|
24
|
+
if (!clientId || !clientSecret) {
|
|
25
|
+
logger.warn('Google OAuth credentials not configured (GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET)');
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
const oauthConfig = {
|
|
29
|
+
clientId,
|
|
30
|
+
clientSecret,
|
|
31
|
+
redirectUri: process.env.GOOGLE_REDIRECT_URI || 'http://localhost:3000/oauth/callback',
|
|
32
|
+
};
|
|
33
|
+
try {
|
|
34
|
+
const oauthHandler = new GoogleOAuthHandler(oauthConfig);
|
|
35
|
+
return new GoogleCalendarService(oauthHandler);
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
logger.warn({ err: error }, 'Failed to create GoogleCalendarService - OAuth not configured');
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Default factory that creates CalendarSourceManager with CalendarService and GoogleCalendarService
|
|
44
|
+
*/
|
|
45
|
+
export function createCalendarSourceManager(config) {
|
|
46
|
+
const calendarService = new CalendarService();
|
|
47
|
+
const googleCalendarService = createGoogleCalendarServiceIfEnabled(config);
|
|
48
|
+
return new CalendarSourceManager({
|
|
49
|
+
calendarService,
|
|
50
|
+
googleCalendarService,
|
|
51
|
+
config,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Reloadable adapter for CalendarSourceManager
|
|
56
|
+
*/
|
|
57
|
+
export class CalendarSourceManagerAdapter {
|
|
58
|
+
name = 'CalendarSourceManager';
|
|
59
|
+
dependsOnSections = ['integrations', 'calendar'];
|
|
60
|
+
instance = null;
|
|
61
|
+
factory;
|
|
62
|
+
/**
|
|
63
|
+
* Constructor
|
|
64
|
+
* @param factoryOrInstance - Either a factory function or an existing instance
|
|
65
|
+
*/
|
|
66
|
+
constructor(factoryOrInstance) {
|
|
67
|
+
if (typeof factoryOrInstance === 'function') {
|
|
68
|
+
this.factory = factoryOrInstance;
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
this.instance = factoryOrInstance;
|
|
72
|
+
this.factory = createCalendarSourceManager;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Get the current CalendarSourceManager instance
|
|
77
|
+
*/
|
|
78
|
+
getInstance() {
|
|
79
|
+
return this.instance;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Shutdown the current instance
|
|
83
|
+
* CalendarSourceManager does not have explicit cleanup needs
|
|
84
|
+
*/
|
|
85
|
+
async shutdown() {
|
|
86
|
+
logger.debug('Shutting down CalendarSourceManager');
|
|
87
|
+
// CalendarSourceManager has no explicit cleanup
|
|
88
|
+
// Just clear the reference
|
|
89
|
+
this.instance = null;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Reinitialize with new configuration
|
|
93
|
+
*/
|
|
94
|
+
async reinitialize(config) {
|
|
95
|
+
logger.info('Reinitializing CalendarSourceManager with new config');
|
|
96
|
+
try {
|
|
97
|
+
this.instance = this.factory(config);
|
|
98
|
+
logger.info('CalendarSourceManager reinitialized successfully');
|
|
99
|
+
}
|
|
100
|
+
catch (error) {
|
|
101
|
+
logger.error({ err: error }, 'Failed to reinitialize CalendarSourceManager');
|
|
102
|
+
throw error;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=calendar-source-manager-adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-source-manager-adapter.js","sourceRoot":"","sources":["../../../src/services/reloadable/calendar-source-manager-adapter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,MAAM,MAAM,GAAG,YAAY,CAAC,8BAA8B,CAAC,CAAC;AAO5D;;GAEG;AACH,SAAS,oCAAoC,CAAC,MAAkB;IAC9D,8DAA8D;IAC9D,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;QAChD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,mDAAmD;IACnD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC;IAC9C,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC;IAEtD,IAAI,CAAC,QAAQ,IAAI,CAAC,YAAY,EAAE,CAAC;QAC/B,MAAM,CAAC,IAAI,CAAC,kFAAkF,CAAC,CAAC;QAChG,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,WAAW,GAAG;QAClB,QAAQ;QACR,YAAY;QACZ,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,sCAAsC;KACvF,CAAC;IAEF,IAAI,CAAC;QACH,MAAM,YAAY,GAAG,IAAI,kBAAkB,CAAC,WAAW,CAAC,CAAC;QACzD,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AM,CAAC,IAAI,CAAC,sDAAsD,CAAC,CAAC;QAEpE,IAAI,CAAC;YACH,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YACrC,MAAM,CAAC,IAAI,CAAC,kDAAkD,CAAC,CAAC;QAClE,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,8CAA8C,CAAC,CAAC;YAC7E,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reloadable Service Adapters
|
|
3
|
+
*
|
|
4
|
+
* Barrel export for all reloadable service adapters and factory function.
|
|
5
|
+
*/
|
|
6
|
+
export { CalendarSourceManagerAdapter, CalendarSourceManagerFactory, createCalendarSourceManager, } from './calendar-source-manager-adapter.js';
|
|
7
|
+
export { ReminderManagerAdapter, ReminderManagerFactory, createReminderManager, } from './reminder-manager-adapter.js';
|
|
8
|
+
export { WorkingCadenceAdapter, WorkingCadenceServiceFactory, createWorkingCadenceService, } from './working-cadence-adapter.js';
|
|
9
|
+
export { NotionServiceAdapter, NotionMCPServiceFactory, createNotionMCPService, } from './notion-service-adapter.js';
|
|
10
|
+
export { TodoListManagerAdapter, TodoListManagerFactory, createTodoListManager, } from './todo-list-manager-adapter.js';
|
|
11
|
+
export { PriorityEngineAdapter, PriorityEngineWrapper, PriorityEngineFactory, createPriorityEngine, } from './priority-engine-adapter.js';
|
|
12
|
+
import type { ReloadableService } from '../../types/hot-reload.js';
|
|
13
|
+
import type { UserConfig } from '../../types/config.js';
|
|
14
|
+
import { CalendarSourceManagerAdapter } from './calendar-source-manager-adapter.js';
|
|
15
|
+
import { ReminderManagerAdapter } from './reminder-manager-adapter.js';
|
|
16
|
+
import { WorkingCadenceAdapter } from './working-cadence-adapter.js';
|
|
17
|
+
import { NotionServiceAdapter } from './notion-service-adapter.js';
|
|
18
|
+
import { TodoListManagerAdapter } from './todo-list-manager-adapter.js';
|
|
19
|
+
import { PriorityEngineAdapter } from './priority-engine-adapter.js';
|
|
20
|
+
/**
|
|
21
|
+
* Service instances holder for factory function
|
|
22
|
+
*/
|
|
23
|
+
export interface ServiceInstances {
|
|
24
|
+
calendarSourceManager?: CalendarSourceManagerAdapter;
|
|
25
|
+
reminderManager?: ReminderManagerAdapter;
|
|
26
|
+
workingCadence?: WorkingCadenceAdapter;
|
|
27
|
+
notionService?: NotionServiceAdapter;
|
|
28
|
+
todoListManager?: TodoListManagerAdapter;
|
|
29
|
+
priorityEngine?: PriorityEngineAdapter;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Create all reloadable service adapters
|
|
33
|
+
*
|
|
34
|
+
* Factory function that creates all service adapters with their default factories.
|
|
35
|
+
* Optionally accepts existing service instances to wrap.
|
|
36
|
+
*
|
|
37
|
+
* @param config - User configuration to initialize services with
|
|
38
|
+
* @param existingServices - Optional existing service instances to wrap
|
|
39
|
+
* @returns Array of all reloadable service adapters
|
|
40
|
+
*/
|
|
41
|
+
export declare function createAllReloadableAdapters(config: UserConfig, existingServices?: ServiceInstances): ReloadableService[];
|
|
42
|
+
/**
|
|
43
|
+
* Get adapter by name from array
|
|
44
|
+
*/
|
|
45
|
+
export declare function getAdapterByName<T extends ReloadableService>(adapters: ReloadableService[], name: string): T | undefined;
|
|
46
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/reloadable/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,EAC5B,2BAA2B,GAC5B,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,qBAA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,EAC1D,QAAQ,EAAE,iBAAiB,EAAE,EAC7B,IAAI,EAAE,MAAM,GACX,CAAC,GAAG,SAAS,CAEf"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reloadable Service Adapters
|
|
3
|
+
*
|
|
4
|
+
* Barrel export for all reloadable service adapters and factory function.
|
|
5
|
+
*/
|
|
6
|
+
// Adapter exports
|
|
7
|
+
export { CalendarSourceManagerAdapter, createCalendarSourceManager, } from './calendar-source-manager-adapter.js';
|
|
8
|
+
export { ReminderManagerAdapter, createReminderManager, } from './reminder-manager-adapter.js';
|
|
9
|
+
export { WorkingCadenceAdapter, createWorkingCadenceService, } from './working-cadence-adapter.js';
|
|
10
|
+
export { NotionServiceAdapter, createNotionMCPService, } from './notion-service-adapter.js';
|
|
11
|
+
export { TodoListManagerAdapter, createTodoListManager, } from './todo-list-manager-adapter.js';
|
|
12
|
+
export { PriorityEngineAdapter, PriorityEngineWrapper, createPriorityEngine, } from './priority-engine-adapter.js';
|
|
13
|
+
import { CalendarSourceManagerAdapter, createCalendarSourceManager } from './calendar-source-manager-adapter.js';
|
|
14
|
+
import { ReminderManagerAdapter, createReminderManager } from './reminder-manager-adapter.js';
|
|
15
|
+
import { WorkingCadenceAdapter, createWorkingCadenceService } from './working-cadence-adapter.js';
|
|
16
|
+
import { NotionServiceAdapter, createNotionMCPService } from './notion-service-adapter.js';
|
|
17
|
+
import { TodoListManagerAdapter, createTodoListManager } from './todo-list-manager-adapter.js';
|
|
18
|
+
import { PriorityEngineAdapter, createPriorityEngine } from './priority-engine-adapter.js';
|
|
19
|
+
/**
|
|
20
|
+
* Create all reloadable service adapters
|
|
21
|
+
*
|
|
22
|
+
* Factory function that creates all service adapters with their default factories.
|
|
23
|
+
* Optionally accepts existing service instances to wrap.
|
|
24
|
+
*
|
|
25
|
+
* @param config - User configuration to initialize services with
|
|
26
|
+
* @param existingServices - Optional existing service instances to wrap
|
|
27
|
+
* @returns Array of all reloadable service adapters
|
|
28
|
+
*/
|
|
29
|
+
export function createAllReloadableAdapters(config, existingServices) {
|
|
30
|
+
const adapters = [];
|
|
31
|
+
// CalendarSourceManager adapter
|
|
32
|
+
const calendarAdapter = existingServices?.calendarSourceManager
|
|
33
|
+
?? new CalendarSourceManagerAdapter(createCalendarSourceManager);
|
|
34
|
+
if (!existingServices?.calendarSourceManager) {
|
|
35
|
+
// Initialize with config if not using existing
|
|
36
|
+
calendarAdapter.reinitialize(config);
|
|
37
|
+
}
|
|
38
|
+
adapters.push(calendarAdapter);
|
|
39
|
+
// ReminderManager adapter
|
|
40
|
+
const reminderAdapter = existingServices?.reminderManager
|
|
41
|
+
?? new ReminderManagerAdapter(createReminderManager);
|
|
42
|
+
if (!existingServices?.reminderManager) {
|
|
43
|
+
reminderAdapter.reinitialize(config);
|
|
44
|
+
}
|
|
45
|
+
adapters.push(reminderAdapter);
|
|
46
|
+
// WorkingCadenceService adapter
|
|
47
|
+
// Note: Gets CalendarSourceManager after it's initialized
|
|
48
|
+
const workingCadenceAdapter = existingServices?.workingCadence
|
|
49
|
+
?? new WorkingCadenceAdapter(createWorkingCadenceService);
|
|
50
|
+
if (!existingServices?.workingCadence) {
|
|
51
|
+
// Set CalendarSourceManager dependency if available
|
|
52
|
+
const calendarInstance = calendarAdapter.getInstance();
|
|
53
|
+
if (calendarInstance) {
|
|
54
|
+
workingCadenceAdapter.setCalendarSourceManager(calendarInstance);
|
|
55
|
+
}
|
|
56
|
+
workingCadenceAdapter.reinitialize(config);
|
|
57
|
+
}
|
|
58
|
+
adapters.push(workingCadenceAdapter);
|
|
59
|
+
// NotionMCPService adapter
|
|
60
|
+
const notionAdapter = existingServices?.notionService
|
|
61
|
+
?? new NotionServiceAdapter(createNotionMCPService);
|
|
62
|
+
if (!existingServices?.notionService) {
|
|
63
|
+
notionAdapter.reinitialize(config);
|
|
64
|
+
}
|
|
65
|
+
adapters.push(notionAdapter);
|
|
66
|
+
// TodoListManager adapter
|
|
67
|
+
const todoAdapter = existingServices?.todoListManager
|
|
68
|
+
?? new TodoListManagerAdapter(createTodoListManager);
|
|
69
|
+
if (!existingServices?.todoListManager) {
|
|
70
|
+
todoAdapter.reinitialize(config);
|
|
71
|
+
}
|
|
72
|
+
adapters.push(todoAdapter);
|
|
73
|
+
// PriorityEngine adapter
|
|
74
|
+
const priorityAdapter = existingServices?.priorityEngine
|
|
75
|
+
?? new PriorityEngineAdapter(createPriorityEngine);
|
|
76
|
+
if (!existingServices?.priorityEngine) {
|
|
77
|
+
priorityAdapter.reinitialize(config);
|
|
78
|
+
}
|
|
79
|
+
adapters.push(priorityAdapter);
|
|
80
|
+
return adapters;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Get adapter by name from array
|
|
84
|
+
*/
|
|
85
|
+
export function getAdapterByName(adapters, name) {
|
|
86
|
+
return adapters.find((a) => a.name === name);
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/services/reloadable/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,kBAAkB;AAClB,OAAO,EACL,4BAA4B,EAE5B,2BAA2B,GAC5B,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EACL,sBAAsB,EAEtB,qBAAqB,GACtB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,qBAAqB,EAErB,2BAA2B,GAC5B,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACL,oBAAoB,EAEpB,sBAAsB,GACvB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACL,sBAAsB,EAEtB,qBAAqB,GACtB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EAErB,oBAAoB,GACrB,MAAM,8BAA8B,CAAC;AAMtC,OAAO,EAAE,4BAA4B,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACjH,OAAO,EAAE,sBAA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;AAChE,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reloadable Service Adapter for NotionMCPService
|
|
3
|
+
*
|
|
4
|
+
* Wraps NotionMCPService to support hot-reload functionality.
|
|
5
|
+
* Reinitializes the service when integrations config changes.
|
|
6
|
+
*/
|
|
7
|
+
import type { ReloadableService } from '../../types/hot-reload.js';
|
|
8
|
+
import type { UserConfig } from '../../types/config.js';
|
|
9
|
+
import { NotionMCPService } from '../../integrations/notion-mcp.js';
|
|
10
|
+
/**
|
|
11
|
+
* Factory function type for creating NotionMCPService
|
|
12
|
+
*/
|
|
13
|
+
export type NotionMCPServiceFactory = (config: UserConfig) => NotionMCPService;
|
|
14
|
+
/**
|
|
15
|
+
* Default factory that creates NotionMCPService from UserConfig
|
|
16
|
+
*/
|
|
17
|
+
export declare function createNotionMCPService(config: UserConfig): NotionMCPService;
|
|
18
|
+
/**
|
|
19
|
+
* Reloadable adapter for NotionMCPService
|
|
20
|
+
*/
|
|
21
|
+
export declare class NotionServiceAdapter implements ReloadableService {
|
|
22
|
+
readonly name = "NotionMCPService";
|
|
23
|
+
readonly dependsOnSections: readonly string[];
|
|
24
|
+
private instance;
|
|
25
|
+
private factory;
|
|
26
|
+
/**
|
|
27
|
+
* Constructor
|
|
28
|
+
* @param factoryOrInstance - Either a factory function or an existing instance
|
|
29
|
+
*/
|
|
30
|
+
constructor(factoryOrInstance: NotionMCPServiceFactory | NotionMCPService);
|
|
31
|
+
/**
|
|
32
|
+
* Get the current NotionMCPService instance
|
|
33
|
+
*/
|
|
34
|
+
getInstance(): NotionMCPService | null;
|
|
35
|
+
/**
|
|
36
|
+
* Shutdown the current instance
|
|
37
|
+
* Disconnects MCP client if connected
|
|
38
|
+
*/
|
|
39
|
+
shutdown(): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Reinitialize with new configuration
|
|
42
|
+
*/
|
|
43
|
+
reinitialize(config: UserConfig): Promise<void>;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=notion-service-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notion-service-adapter.d.ts","sourceRoot":"","sources":["../../../src/services/reloadable/notion-service-adapter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAmB,MAAM,kCAAkC,CAAC;AAKrF;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,MAAM,EAAE,UAAU,KAAK,gBAAgB,CAAC;AAE/E;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,UAAU,GAAG,gBAAgB,CAY3E;AAED;;GAEG;AACH,qBAAa,oBAAqB,YAAW,iBAAiB;IAC5D,QAAQ,CAAC,IAAI,sBAAsB;IACnC,QAAQ,CAAC,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAoB;IAEjE,OAAO,CAAC,QAAQ,CAAiC;IACjD,OAAO,CAAC,OAAO,CAA0B;IAEzC;;;OAGG;gBACS,iBAAiB,EAAE,uBAAuB,GAAG,gBAAgB;IASzE;;OAEG;IACH,WAAW,IAAI,gBAAgB,GAAG,IAAI;IAItC;;;OAGG;IACG,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAkB/B;;OAEG;IACG,YAAY,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CAWtD"}
|