Skip to content

Commit f1eff7b

Browse files
committed
fix google discovery
1 parent 272c786 commit f1eff7b

5 files changed

Lines changed: 116 additions & 28 deletions

File tree

‎.executor/executor.jsonc‎

Lines changed: 109 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@
118118
"mcp-mcp": {
119119
"name": "Mcp MCP",
120120
"namespace": "mcp.mcp",
121-
"kind": "mcp",
122121
"config": {
123122
"endpoint": "https://mcp.linear.app/mcp",
124123
"transport": "auto",
@@ -195,6 +194,115 @@
195194
"client_id_issued_at": 1774854942
196195
}
197196
}
197+
},
198+
"kind": "mcp"
199+
},
200+
"google-calendar": {
201+
"name": "Google Calendar",
202+
"namespace": "google.calendar",
203+
"config": {
204+
"service": "calendar",
205+
"version": "v3",
206+
"discoveryUrl": "https://calendar-json.googleapis.com/$discovery/rest?version=v3",
207+
"defaultHeaders": null,
208+
"scopes": [
209+
"https://www.googleapis.com/auth/calendar"
210+
],
211+
"auth": {
212+
"kind": "oauth2",
213+
"clientId": "171149749557-apegmds63qp2h2u2s55p6rom1j6m3m5k.apps.googleusercontent.com",
214+
"clientSecretRef": {
215+
"secretId": "sec_f2c1f3ce-97c5-429b-a7bf-22fcd6007de3"
216+
},
217+
"clientAuthentication": "client_secret_post",
218+
"authorizationEndpoint": "https://accounts.google.com/o/oauth2/v2/auth",
219+
"tokenEndpoint": "https://oauth2.googleapis.com/token",
220+
"scopes": [
221+
"https://www.googleapis.com/auth/calendar"
222+
],
223+
"accessTokenRef": {
224+
"secretId": "sec_023e64bd-8e6b-49cc-b33c-950c31612846"
225+
},
226+
"refreshTokenRef": {
227+
"secretId": "sec_e4c2e96c-b809-4d72-873c-a8ba7d595610"
228+
},
229+
"expiresAt": 1774859675319
230+
}
231+
},
232+
"kind": "google_discovery"
233+
},
234+
"google-drive": {
235+
"name": "Google Drive",
236+
"namespace": "google.drive",
237+
"config": {
238+
"service": "drive",
239+
"version": "v3",
240+
"discoveryUrl": "https://www.googleapis.com/discovery/v1/apis/drive/v3/rest",
241+
"defaultHeaders": null,
242+
"scopes": [
243+
"https://www.googleapis.com/auth/drive",
244+
"https://www.googleapis.com/auth/drive.apps.readonly"
245+
],
246+
"auth": {
247+
"kind": "oauth2",
248+
"clientId": "171149749557-apegmds63qp2h2u2s55p6rom1j6m3m5k.apps.googleusercontent.com",
249+
"clientSecretRef": {
250+
"secretId": "sec_f2c1f3ce-97c5-429b-a7bf-22fcd6007de3"
251+
},
252+
"clientAuthentication": "client_secret_post",
253+
"authorizationEndpoint": "https://accounts.google.com/o/oauth2/v2/auth",
254+
"tokenEndpoint": "https://oauth2.googleapis.com/token",
255+
"scopes": [
256+
"https://www.googleapis.com/auth/drive",
257+
"https://www.googleapis.com/auth/drive.apps.readonly"
258+
],
259+
"accessTokenRef": {
260+
"secretId": "sec_39d48e40-634c-4673-8038-8fc7c027c698"
261+
},
262+
"refreshTokenRef": {
263+
"secretId": "sec_ec05b35f-c0ff-4529-b80e-a5638589a6eb"
264+
},
265+
"expiresAt": 1774859675319
266+
}
267+
},
268+
"kind": "google_discovery"
269+
},
270+
"google-gmail": {
271+
"name": "Gmail",
272+
"namespace": "google.gmail",
273+
"kind": "google_discovery",
274+
"config": {
275+
"service": "gmail",
276+
"version": "v1",
277+
"discoveryUrl": "https://gmail.googleapis.com/$discovery/rest?version=v1",
278+
"defaultHeaders": null,
279+
"scopes": [
280+
"https://mail.google.com/",
281+
"https://www.googleapis.com/auth/gmail.settings.basic",
282+
"https://www.googleapis.com/auth/gmail.settings.sharing"
283+
],
284+
"auth": {
285+
"kind": "oauth2",
286+
"clientId": "171149749557-apegmds63qp2h2u2s55p6rom1j6m3m5k.apps.googleusercontent.com",
287+
"clientSecretRef": {
288+
"secretId": "sec_f2c1f3ce-97c5-429b-a7bf-22fcd6007de3"
289+
},
290+
"clientAuthentication": "client_secret_post",
291+
"authorizationEndpoint": "https://accounts.google.com/o/oauth2/v2/auth",
292+
"tokenEndpoint": "https://oauth2.googleapis.com/token",
293+
"scopes": [
294+
"https://mail.google.com/",
295+
"https://www.googleapis.com/auth/gmail.settings.basic",
296+
"https://www.googleapis.com/auth/gmail.settings.sharing"
297+
],
298+
"accessTokenRef": {
299+
"secretId": "sec_379eee62-86fe-49fe-93dc-8af40fa04dc3"
300+
},
301+
"refreshTokenRef": {
302+
"secretId": "sec_c58e7cb5-296b-4024-8f22-8b49ef7a7f38"
303+
},
304+
"expiresAt": 1774859675319
305+
}
198306
}
199307
}
200308
},

‎apps/web/src/plugins/index.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,11 @@ export const getFrontendPluginRoute = (
6868
routeKey: string,
6969
) => frontendPluginRegistry.getRoute(pluginKey, routeKey);
7070

71+
const resolveSourcePluginKey = (kind: string): string =>
72+
isGoogleDiscoverySource(kind) ? "google-discovery" : kind;
73+
7174
export const getSourceFrontendPlugin = (kind: string) => {
72-
const plugin = getFrontendPlugin(kind);
75+
const plugin = getFrontendPlugin(resolveSourcePluginKey(kind));
7376
return plugin && isSourceFrontendPlugin(plugin) ? plugin : null;
7477
};
7578

‎apps/web/src/views/secrets.tsx‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -104,17 +104,6 @@ export function SecretsPage() {
104104
</p>
105105
</div>
106106
<div className="flex gap-2">
107-
<Button
108-
size="sm"
109-
variant="outline"
110-
onClick={() => {
111-
setShowCreateStore(true);
112-
}}
113-
disabled={creatableStorePlugins.length === 0}
114-
>
115-
<IconPlus className="size-3.5" />
116-
Add store
117-
</Button>
118107
<Button
119108
size="sm"
120109
onClick={() => {
@@ -150,7 +139,7 @@ export function SecretsPage() {
150139
items.length === 0 ? (
151140
<SectionEmptyState
152141
title="No secret stores yet"
153-
description="Add a store to connect an external backend like 1Password."
142+
description="External secret stores are currently unavailable in this app."
154143
/>
155144
) : (
156145
<div className="grid gap-3 md:grid-cols-2">

‎packages/platform/server/src/index.ts‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ import { openApiHttpPlugin } from "@executor/plugin-openapi-http";
2121
import {
2222
openApiSdkPlugin,
2323
} from "@executor/plugin-openapi-sdk";
24-
import { onePasswordHttpPlugin } from "@executor/plugin-onepassword-http";
25-
import {
26-
onePasswordSdkPlugin,
27-
} from "@executor/plugin-onepassword-sdk";
2824
import {
2925
createExecutorApiLayer,
3026
} from "@executor/platform-api/http";
@@ -66,15 +62,13 @@ import { createFileGraphqlSourceStorage } from "./graphql-source-storage";
6662
import { createFileMcpOAuthSessionStorage } from "./mcp-oauth-session-storage";
6763
import { createFileMcpSourceStorage } from "./mcp-source-storage";
6864
import { createFileOpenApiSourceStorage } from "./openapi-source-storage";
69-
import { createFileOnePasswordStoreStorage } from "./onepassword-store-storage";
7065

7166
export { createFileGoogleDiscoveryOAuthSessionStorage } from "./google-discovery-oauth-session-storage";
7267
export { createFileGoogleDiscoverySourceStorage } from "./google-discovery-source-storage";
7368
export { createFileGraphqlSourceStorage } from "./graphql-source-storage";
7469
export { createFileMcpOAuthSessionStorage } from "./mcp-oauth-session-storage";
7570
export { createFileMcpSourceStorage } from "./mcp-source-storage";
7671
export { createFileOpenApiSourceStorage } from "./openapi-source-storage";
77-
export { createFileOnePasswordStoreStorage } from "./onepassword-store-storage";
7872

7973
export {
8074
DEFAULT_EXECUTOR_DATA_DIR,
@@ -142,7 +136,6 @@ const executorHttpPlugins = [
142136
graphqlHttpPlugin(),
143137
googleDiscoveryHttpPlugin(),
144138
mcpHttpPlugin(),
145-
onePasswordHttpPlugin(),
146139
openApiHttpPlugin(),
147140
] as const;
148141

@@ -194,11 +187,6 @@ const createExecutorRuntime = (
194187
rootDir: resolve(localDataDir, "plugins", "openapi", "sources"),
195188
}),
196189
}),
197-
onePasswordSdkPlugin({
198-
storage: createFileOnePasswordStoreStorage({
199-
rootDir: resolve(localDataDir, "plugins", "onepassword", "stores"),
200-
}),
201-
}),
202190
] as const,
203191
executionResolver: options.executionResolver,
204192
resolveSecretMaterial: options.resolveSecretMaterial,

‎plugins/google-discovery/react/components.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -913,8 +913,8 @@ function GoogleDiscoveryBatchConnectPanel(props: {
913913
onClick={() => toggleTemplate(template.id)}
914914
className={
915915
selected
916-
? "h-auto rounded-lg border border-primary/30 bg-primary/5 px-4 py-3 text-left"
917-
: "h-auto rounded-lg border border-border px-4 py-3 text-left hover:bg-accent/40"
916+
? "h-auto whitespace-normal rounded-lg border border-primary/30 bg-primary/5 px-4 py-3 text-left"
917+
: "h-auto whitespace-normal rounded-lg border border-border px-4 py-3 text-left hover:bg-accent/40"
918918
}
919919
>
920920
<div className="flex items-start gap-3">

0 commit comments

Comments
 (0)