@shin1ohno/sage 0.11.0 → 0.12.1
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/README.md +39 -0
- package/dist/cli/http-server-with-config.d.ts.map +1 -1
- package/dist/cli/http-server-with-config.js +45 -1
- package/dist/cli/http-server-with-config.js.map +1 -1
- package/dist/cli/mcp-handler.d.ts.map +1 -1
- package/dist/cli/mcp-handler.js +59 -0
- package/dist/cli/mcp-handler.js.map +1 -1
- package/dist/oauth/google-oauth-callback-handler.d.ts +57 -0
- package/dist/oauth/google-oauth-callback-handler.d.ts.map +1 -0
- package/dist/oauth/google-oauth-callback-handler.js +291 -0
- package/dist/oauth/google-oauth-callback-handler.js.map +1 -0
- 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/pending-google-auth-store.d.ts +88 -0
- package/dist/oauth/pending-google-auth-store.d.ts.map +1 -0
- package/dist/oauth/pending-google-auth-store.js +218 -0
- package/dist/oauth/pending-google-auth-store.js.map +1 -0
- package/dist/tools/oauth/authenticate-google.d.ts +18 -7
- package/dist/tools/oauth/authenticate-google.d.ts.map +1 -1
- package/dist/tools/oauth/authenticate-google.js +95 -9
- package/dist/tools/oauth/authenticate-google.js.map +1 -1
- package/package.json +1 -1
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
* Requirements: FR-1 (authenticate_google MCP Tool)
|
|
4
4
|
*
|
|
5
5
|
* Orchestrates the complete Google OAuth flow:
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* 7. Store tokens
|
|
6
|
+
* - Local mode: Start callback server, open browser, wait for callback
|
|
7
|
+
* - Remote mode: Return authorization URL for user to open manually
|
|
8
|
+
*
|
|
9
|
+
* Mode is determined by GOOGLE_REDIRECT_URI:
|
|
10
|
+
* - Contains 'localhost' or '127.0.0.1' -> Local mode
|
|
11
|
+
* - Otherwise -> Remote mode (server receives callback directly)
|
|
13
12
|
*/
|
|
14
13
|
import { z } from 'zod';
|
|
14
|
+
import { PendingGoogleAuthStore } from '../../oauth/pending-google-auth-store.js';
|
|
15
15
|
import type { OAuthToolsContext } from './index.js';
|
|
16
16
|
/**
|
|
17
17
|
* Arguments for authenticate_google tool
|
|
@@ -40,7 +40,18 @@ export interface AuthenticateGoogleResult {
|
|
|
40
40
|
scopes?: string[];
|
|
41
41
|
authorizationUrl?: string;
|
|
42
42
|
error?: string;
|
|
43
|
+
state?: string;
|
|
44
|
+
pendingAuth?: boolean;
|
|
45
|
+
expiresIn?: number;
|
|
43
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* Export the pending auth store for use by HTTP server
|
|
49
|
+
*/
|
|
50
|
+
export declare function getSharedPendingAuthStore(): PendingGoogleAuthStore | null;
|
|
51
|
+
/**
|
|
52
|
+
* Set the shared pending auth store (called by HTTP server)
|
|
53
|
+
*/
|
|
54
|
+
export declare function setSharedPendingAuthStore(store: PendingGoogleAuthStore): void;
|
|
44
55
|
/**
|
|
45
56
|
* Handle authenticate_google tool call
|
|
46
57
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authenticate-google.d.ts","sourceRoot":"","sources":["../../../src/tools/oauth/authenticate-google.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"authenticate-google.d.ts","sourceRoot":"","sources":["../../../src/tools/oauth/authenticate-google.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAGlF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD;;GAEG;AACH,eAAO,MAAM,4BAA4B;IACvC,mDAAmD;;IAEnD,oDAAoD;;;;;;;;EAEpD,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAkBD;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,sBAAsB,GAAG,IAAI,CAEzE;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,sBAAsB,GAAG,IAAI,CAE7E;AAkBD;;;;;;;;GAQG;AACH,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,sBAAsB,EAC5B,QAAQ,EAAE,iBAAiB,GAC1B,OAAO,CAAC,wBAAwB,CAAC,CA2KnC"}
|
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
* Requirements: FR-1 (authenticate_google MCP Tool)
|
|
4
4
|
*
|
|
5
5
|
* Orchestrates the complete Google OAuth flow:
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* 7. Store tokens
|
|
6
|
+
* - Local mode: Start callback server, open browser, wait for callback
|
|
7
|
+
* - Remote mode: Return authorization URL for user to open manually
|
|
8
|
+
*
|
|
9
|
+
* Mode is determined by GOOGLE_REDIRECT_URI:
|
|
10
|
+
* - Contains 'localhost' or '127.0.0.1' -> Local mode
|
|
11
|
+
* - Otherwise -> Remote mode (server receives callback directly)
|
|
13
12
|
*/
|
|
14
13
|
import { z } from 'zod';
|
|
15
14
|
import { OAuthCallbackServer } from '../../oauth/oauth-callback-server.js';
|
|
16
|
-
import { GoogleOAuthHandler } from '../../oauth/google-oauth-handler.js';
|
|
15
|
+
import { GoogleOAuthHandler, GOOGLE_CALENDAR_SCOPES } from '../../oauth/google-oauth-handler.js';
|
|
16
|
+
import { PendingGoogleAuthStore } from '../../oauth/pending-google-auth-store.js';
|
|
17
17
|
import { openBrowser } from '../../utils/browser-opener.js';
|
|
18
18
|
import { oauthLogger } from '../../utils/logger.js';
|
|
19
19
|
/**
|
|
@@ -25,6 +25,46 @@ export const AuthenticateGoogleArgsSchema = z.object({
|
|
|
25
25
|
/** Timeout in seconds (default: 300 = 5 minutes) */
|
|
26
26
|
timeout: z.number().optional().default(300),
|
|
27
27
|
});
|
|
28
|
+
/**
|
|
29
|
+
* Singleton instance of PendingGoogleAuthStore for remote mode
|
|
30
|
+
*/
|
|
31
|
+
let pendingAuthStore = null;
|
|
32
|
+
/**
|
|
33
|
+
* Get or create the pending auth store
|
|
34
|
+
*/
|
|
35
|
+
async function getPendingAuthStore() {
|
|
36
|
+
if (!pendingAuthStore) {
|
|
37
|
+
pendingAuthStore = new PendingGoogleAuthStore();
|
|
38
|
+
await pendingAuthStore.initialize();
|
|
39
|
+
}
|
|
40
|
+
return pendingAuthStore;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Export the pending auth store for use by HTTP server
|
|
44
|
+
*/
|
|
45
|
+
export function getSharedPendingAuthStore() {
|
|
46
|
+
return pendingAuthStore;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Set the shared pending auth store (called by HTTP server)
|
|
50
|
+
*/
|
|
51
|
+
export function setSharedPendingAuthStore(store) {
|
|
52
|
+
pendingAuthStore = store;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Check if running in remote mode
|
|
56
|
+
*
|
|
57
|
+
* Remote mode is enabled when GOOGLE_REDIRECT_URI is set and
|
|
58
|
+
* does not point to localhost/127.0.0.1.
|
|
59
|
+
*/
|
|
60
|
+
function isRemoteMode() {
|
|
61
|
+
const redirectUri = process.env.GOOGLE_REDIRECT_URI;
|
|
62
|
+
if (!redirectUri) {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
const lowerUri = redirectUri.toLowerCase();
|
|
66
|
+
return !lowerUri.includes('localhost') && !lowerUri.includes('127.0.0.1');
|
|
67
|
+
}
|
|
28
68
|
/**
|
|
29
69
|
* Handle authenticate_google tool call
|
|
30
70
|
*
|
|
@@ -95,7 +135,11 @@ export async function handleAuthenticateGoogle(args, _context) {
|
|
|
95
135
|
oauthLogger.debug({ error }, 'No existing tokens found');
|
|
96
136
|
}
|
|
97
137
|
}
|
|
98
|
-
//
|
|
138
|
+
// Remote mode: return authorization URL for user to open manually
|
|
139
|
+
if (isRemoteMode()) {
|
|
140
|
+
return handleRemoteModeAuth(oauthHandler, redirectUri);
|
|
141
|
+
}
|
|
142
|
+
// Local mode: Start callback server
|
|
99
143
|
const callbackServer = new OAuthCallbackServer({
|
|
100
144
|
timeout: timeout * 1000, // Convert to milliseconds
|
|
101
145
|
});
|
|
@@ -177,4 +221,46 @@ export async function handleAuthenticateGoogle(args, _context) {
|
|
|
177
221
|
await callbackServer.shutdown();
|
|
178
222
|
}
|
|
179
223
|
}
|
|
224
|
+
/**
|
|
225
|
+
* Handle remote mode authentication
|
|
226
|
+
*
|
|
227
|
+
* In remote mode, we return the authorization URL for the user to open
|
|
228
|
+
* manually in their browser. The server will receive the callback directly.
|
|
229
|
+
*/
|
|
230
|
+
async function handleRemoteModeAuth(_oauthHandler, redirectUri) {
|
|
231
|
+
try {
|
|
232
|
+
const store = await getPendingAuthStore();
|
|
233
|
+
// Create pending auth session (codeVerifier is stored in the session for later use)
|
|
234
|
+
const { state, codeChallenge } = store.create(redirectUri);
|
|
235
|
+
// Generate authorization URL with PKCE
|
|
236
|
+
const { google } = await import('googleapis');
|
|
237
|
+
const oauth2Client = new google.auth.OAuth2(process.env.GOOGLE_CLIENT_ID, process.env.GOOGLE_CLIENT_SECRET, redirectUri);
|
|
238
|
+
const authorizationUrl = oauth2Client.generateAuthUrl({
|
|
239
|
+
access_type: 'offline',
|
|
240
|
+
scope: GOOGLE_CALENDAR_SCOPES,
|
|
241
|
+
code_challenge: codeChallenge,
|
|
242
|
+
code_challenge_method: 'S256',
|
|
243
|
+
prompt: 'consent',
|
|
244
|
+
state,
|
|
245
|
+
});
|
|
246
|
+
oauthLogger.info({ state, redirectUri }, 'Generated remote mode authorization URL');
|
|
247
|
+
return {
|
|
248
|
+
success: true,
|
|
249
|
+
message: '以下のURLをブラウザで開いてGoogle認証を完了してください。',
|
|
250
|
+
authorizationUrl,
|
|
251
|
+
state,
|
|
252
|
+
pendingAuth: true,
|
|
253
|
+
expiresIn: store.getSessionTimeoutSeconds(),
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
catch (error) {
|
|
257
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
258
|
+
oauthLogger.error({ error }, 'Remote mode auth failed');
|
|
259
|
+
return {
|
|
260
|
+
success: false,
|
|
261
|
+
message: '認証URLの生成に失敗しました。',
|
|
262
|
+
error: errorMessage,
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
}
|
|
180
266
|
//# sourceMappingURL=authenticate-google.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authenticate-google.js","sourceRoot":"","sources":["../../../src/tools/oauth/authenticate-google.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"authenticate-google.js","sourceRoot":"","sources":["../../../src/tools/oauth/authenticate-google.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;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