Unified · Split
| @@ -11,6 +11,7 @@ · 10 unmodified lines | |||
| 11 | "@executor/plugin-google-discovery": "workspace:*", | 11 | "@executor/plugin-google-discovery": "workspace:*", |
| 12 | "@executor/plugin-graphql": "workspace:*", | 12 | "@executor/plugin-graphql": "workspace:*", |
| 13 | "@executor/plugin-mcp": "workspace:*", | 13 | "@executor/plugin-mcp": "workspace:*", |
| 14 | "@executor/plugin-onepassword": "workspace:*", | ||
| 14 | "@executor/plugin-openapi": "workspace:*", | 15 | "@executor/plugin-openapi": "workspace:*", |
| 15 | "@executor/react": "workspace:*", | 16 | "@executor/react": "workspace:*", |
| 16 | "@executor/sdk": "workspace:*", | 17 | "@executor/sdk": "workspace:*", |
| @@ -1,6 +1,17 @@ | |||
| 1 | import { createFileRoute } from "@tanstack/react-router"; | 1 | import { createFileRoute } from "@tanstack/react-router"; |
| 2 | import { SourcesPage } from "@executor/react/pages/sources"; | 2 | import { SourcesPage } from "@executor/react/pages/sources"; |
| 3 | import { openApiSourcePlugin } from "@executor/plugin-openapi/react"; | ||
| 4 | import { mcpSourcePlugin } from "@executor/plugin-mcp/react"; | ||
| 5 | import { googleDiscoverySourcePlugin } from "@executor/plugin-google-discovery/react"; | ||
| 6 | import { graphqlSourcePlugin } from "@executor/plugin-graphql/react"; | ||
| 7 | |||
| 8 | const sourcePlugins = [ | ||
| 9 | openApiSourcePlugin, | ||
| 10 | mcpSourcePlugin, | ||
| 11 | googleDiscoverySourcePlugin, | ||
| 12 | graphqlSourcePlugin, | ||
| 13 | ]; | ||
| 3 | 14 | ||
| 4 | export const Route = createFileRoute("/")({ | 15 | export const Route = createFileRoute("/")({ |
| 5 | component: SourcesPage, | 16 | component: () => <SourcesPage sourcePlugins={sourcePlugins} />, |
| 6 | }); | 17 | }); |
| @@ -1,6 +1,9 @@ | |||
| 1 | import { createFileRoute } from "@tanstack/react-router"; | 1 | import { createFileRoute } from "@tanstack/react-router"; |
| 2 | import { SecretsPage } from "@executor/react/pages/secrets"; | 2 | import { SecretsPage } from "@executor/react/pages/secrets"; |
| 3 | import { onePasswordSecretProviderPlugin } from "@executor/plugin-onepassword/react"; | ||
| 4 | |||
| 5 | const secretProviderPlugins = [onePasswordSecretProviderPlugin]; | ||
| 3 | 6 | ||
| 4 | export const Route = createFileRoute("/secrets")({ | 7 | export const Route = createFileRoute("/secrets")({ |
| 5 | component: SecretsPage, | 8 | component: () => <SecretsPage secretProviderPlugins={secretProviderPlugins} />, |
| 6 | }); | 9 | }); |
| @@ -1,6 +1,17 @@ | |||
| 1 | import { Schema } from "effect"; | 1 | import { Schema } from "effect"; |
| 2 | import { createFileRoute } from "@tanstack/react-router"; | 2 | import { createFileRoute } from "@tanstack/react-router"; |
| 3 | import { SourcesAddPage } from "@executor/react/pages/sources-add"; | 3 | import { SourcesAddPage } from "@executor/react/pages/sources-add"; |
| 4 | import { openApiSourcePlugin } from "@executor/plugin-openapi/react"; | ||
| 5 | import { mcpSourcePlugin } from "@executor/plugin-mcp/react"; | ||
| 6 | import { googleDiscoverySourcePlugin } from "@executor/plugin-google-discovery/react"; | ||
| 7 | import { graphqlSourcePlugin } from "@executor/plugin-graphql/react"; | ||
| 8 | |||
| 9 | const sourcePlugins = [ | ||
| 10 | openApiSourcePlugin, | ||
| 11 | mcpSourcePlugin, | ||
| 12 | googleDiscoverySourcePlugin, | ||
| 13 | graphqlSourcePlugin, | ||
| 14 | ]; | ||
| 4 | 15 | ||
| 5 | const SearchParams = Schema.standardSchemaV1( | 16 | const SearchParams = Schema.standardSchemaV1( |
| 6 | Schema.Struct({ | 17 | Schema.Struct({ |
| @@ -14,6 +25,6 @@ export const Route = createFileRoute("/sources/add/$pluginKey")({ · 7 unmodified lines | |||
| 14 | component: () => { | 25 | component: () => { |
| 15 | const { pluginKey } = Route.useParams(); | 26 | const { pluginKey } = Route.useParams(); |
| 16 | const { url, preset } = Route.useSearch(); | 27 | const { url, preset } = Route.useSearch(); |
| 17 | return <SourcesAddPage pluginKey={pluginKey} url={url} preset={preset} />; | 28 | return <SourcesAddPage pluginKey={pluginKey} url={url} preset={preset} sourcePlugins={sourcePlugins} />; |
| 18 | }, | 29 | }, |
| 19 | }); | 30 | }); |
| @@ -1,6 +1,17 @@ | |||
| 1 | import { createFileRoute } from "@tanstack/react-router"; | 1 | import { createFileRoute } from "@tanstack/react-router"; |
| 2 | import { SourcesPage } from "@executor/react/pages/sources"; | 2 | import { SourcesPage } from "@executor/react/pages/sources"; |
| 3 | import { openApiSourcePlugin } from "@executor/plugin-openapi/react"; | ||
| 4 | import { mcpSourcePlugin } from "@executor/plugin-mcp/react"; | ||
| 5 | import { googleDiscoverySourcePlugin } from "@executor/plugin-google-discovery/react"; | ||
| 6 | import { graphqlSourcePlugin } from "@executor/plugin-graphql/react"; | ||
| 7 | |||
| 8 | const sourcePlugins = [ | ||
| 9 | openApiSourcePlugin, | ||
| 10 | mcpSourcePlugin, | ||
| 11 | googleDiscoverySourcePlugin, | ||
| 12 | graphqlSourcePlugin, | ||
| 13 | ]; | ||
| 3 | 14 | ||
| 4 | export const Route = createFileRoute("/")({ | 15 | export const Route = createFileRoute("/")({ |
| 5 | component: SourcesPage, | 16 | component: () => <SourcesPage sourcePlugins={sourcePlugins} />, |
| 6 | }); | 17 | }); |
| @@ -1,6 +1,9 @@ | |||
| 1 | import { createFileRoute } from "@tanstack/react-router"; | 1 | import { createFileRoute } from "@tanstack/react-router"; |
| 2 | import { SecretsPage } from "@executor/react/pages/secrets"; | 2 | import { SecretsPage } from "@executor/react/pages/secrets"; |
| 3 | import { onePasswordSecretProviderPlugin } from "@executor/plugin-onepassword/react"; | ||
| 4 | |||
| 5 | const secretProviderPlugins = [onePasswordSecretProviderPlugin]; | ||
| 3 | 6 | ||
| 4 | export const Route = createFileRoute("/secrets")({ | 7 | export const Route = createFileRoute("/secrets")({ |
| 5 | component: SecretsPage, | 8 | component: () => <SecretsPage secretProviderPlugins={secretProviderPlugins} />, |
| 6 | }); | 9 | }); |
| @@ -1,6 +1,17 @@ | |||
| 1 | import { Schema } from "effect"; | 1 | import { Schema } from "effect"; |
| 2 | import { createFileRoute } from "@tanstack/react-router"; | 2 | import { createFileRoute } from "@tanstack/react-router"; |
| 3 | import { SourcesAddPage } from "@executor/react/pages/sources-add"; | 3 | import { SourcesAddPage } from "@executor/react/pages/sources-add"; |
| 4 | import { openApiSourcePlugin } from "@executor/plugin-openapi/react"; | ||
| 5 | import { mcpSourcePlugin } from "@executor/plugin-mcp/react"; | ||
| 6 | import { googleDiscoverySourcePlugin } from "@executor/plugin-google-discovery/react"; | ||
| 7 | import { graphqlSourcePlugin } from "@executor/plugin-graphql/react"; | ||
| 8 | |||
| 9 | const sourcePlugins = [ | ||
| 10 | openApiSourcePlugin, | ||
| 11 | mcpSourcePlugin, | ||
| 12 | googleDiscoverySourcePlugin, | ||
| 13 | graphqlSourcePlugin, | ||
| 14 | ]; | ||
| 4 | 15 | ||
| 5 | const SearchParams = Schema.standardSchemaV1( | 16 | const SearchParams = Schema.standardSchemaV1( |
| 6 | Schema.Struct({ | 17 | Schema.Struct({ |
| @@ -14,6 +25,6 @@ export const Route = createFileRoute("/sources/add/$pluginKey")({ · 7 unmodified lines | |||
| 14 | component: () => { | 25 | component: () => { |
| 15 | const { pluginKey } = Route.useParams(); | 26 | const { pluginKey } = Route.useParams(); |
| 16 | const { url, preset } = Route.useSearch(); | 27 | const { url, preset } = Route.useSearch(); |
| 17 | return <SourcesAddPage pluginKey={pluginKey} url={url} preset={preset} />; | 28 | return <SourcesAddPage pluginKey={pluginKey} url={url} preset={preset} sourcePlugins={sourcePlugins} />; |
| 18 | }, | 29 | }, |
| 19 | }); | 30 | }); |
| @@ -50,6 +50,7 @@ · 49 unmodified lines | |||
| 50 | "@executor/plugin-google-discovery": "workspace:*", | 50 | "@executor/plugin-google-discovery": "workspace:*", |
| 51 | "@executor/plugin-graphql": "workspace:*", | 51 | "@executor/plugin-graphql": "workspace:*", |
| 52 | "@executor/plugin-mcp": "workspace:*", | 52 | "@executor/plugin-mcp": "workspace:*", |
| 53 | "@executor/plugin-onepassword": "workspace:*", | ||
| 53 | "@executor/plugin-openapi": "workspace:*", | 54 | "@executor/plugin-openapi": "workspace:*", |
| 54 | "@executor/react": "workspace:*", | 55 | "@executor/react": "workspace:*", |
| 55 | "@executor/sdk": "workspace:*", | 56 | "@executor/sdk": "workspace:*", |
| @@ -515,11 +516,6 @@ · 459 unmodified lines | |||
| 515 | "@effect-atom/atom-react": "^0.5.0", | 516 | "@effect-atom/atom-react": "^0.5.0", |
| 516 | "@effect/platform": "catalog:", | 517 | "@effect/platform": "catalog:", |
| 517 | "@executor/api": "workspace:*", | 518 | "@executor/api": "workspace:*", |
| 518 | "@executor/plugin-google-discovery": "workspace:*", | ||
| 519 | "@executor/plugin-graphql": "workspace:*", | ||
| 520 | "@executor/plugin-mcp": "workspace:*", | ||
| 521 | "@executor/plugin-onepassword": "workspace:*", | ||
| 522 | "@executor/plugin-openapi": "workspace:*", | ||
| 523 | "@executor/sdk": "workspace:*", | 519 | "@executor/sdk": "workspace:*", |
| 524 | "@shikijs/langs": "^4.0.2", | 520 | "@shikijs/langs": "^4.0.2", |
| 525 | "@shikijs/themes": "^4.0.2", | 521 | "@shikijs/themes": "^4.0.2", |
| @@ -17,11 +17,6 @@ · 16 unmodified lines | |||
| 17 | "@effect/platform": "catalog:", | 17 | "@effect/platform": "catalog:", |
| 18 | "@effect-atom/atom-react": "^0.5.0", | 18 | "@effect-atom/atom-react": "^0.5.0", |
| 19 | "@executor/api": "workspace:*", | 19 | "@executor/api": "workspace:*", |
| 20 | "@executor/plugin-google-discovery": "workspace:*", | ||
| 21 | "@executor/plugin-graphql": "workspace:*", | ||
| 22 | "@executor/plugin-mcp": "workspace:*", | ||
| 23 | "@executor/plugin-onepassword": "workspace:*", | ||
| 24 | "@executor/plugin-openapi": "workspace:*", | ||
| 25 | "@executor/sdk": "workspace:*", | 20 | "@executor/sdk": "workspace:*", |
| 26 | "@tanstack/react-router": "catalog:", | 21 | "@tanstack/react-router": "catalog:", |
| 27 | "@shikijs/langs": "^4.0.2", | 22 | "@shikijs/langs": "^4.0.2", |
| @@ -4,7 +4,6 @@ import { secretsAtom, setSecret, removeSecret } from "../api/atoms"; · 3 unmodified lines | |||
| 4 | import type { SecretProviderPlugin } from "../plugins/secret-provider-plugin"; | 4 | import type { SecretProviderPlugin } from "../plugins/secret-provider-plugin"; |
| 5 | import { SecretId } from "@executor/sdk"; | 5 | import { SecretId } from "@executor/sdk"; |
| 6 | import { useScope } from "../hooks/use-scope"; | 6 | import { useScope } from "../hooks/use-scope"; |
| 7 | import { onePasswordSecretProviderPlugin } from "@executor/plugin-onepassword/react"; | ||
| 8 | import { | 7 | import { |
| 9 | Dialog, | 8 | Dialog, |
| 10 | DialogContent, | 9 | DialogContent, |
| @@ -256,19 +255,12 @@ function SecretRow(props: { · 245 unmodified lines | |||
| 256 | ); | 255 | ); |
| 257 | } | 256 | } |
| 258 | 257 | ||
| 259 | // --------------------------------------------------------------------------- | ||
| 260 | // Secret provider plugins | ||
| 261 | // --------------------------------------------------------------------------- | ||
| 262 | |||
| 263 | const secretProviderPlugins: SecretProviderPlugin[] = [ | ||
| 264 | onePasswordSecretProviderPlugin, | ||
| 265 | ]; | ||
| 266 | |||
| 267 | // --------------------------------------------------------------------------- | 258 | // --------------------------------------------------------------------------- |
| 268 | // Page | 259 | // Page |
| 269 | // --------------------------------------------------------------------------- | 260 | // --------------------------------------------------------------------------- |
| 270 | 261 | ||
| 271 | export function SecretsPage() { | 262 | export function SecretsPage(props: { secretProviderPlugins: readonly SecretProviderPlugin[] }) { |
| 263 | const { secretProviderPlugins } = props; | ||
| 272 | const [addOpen, setAddOpen] = useState(false); | 264 | const [addOpen, setAddOpen] = useState(false); |
| 273 | const scopeId = useScope(); | 265 | const scopeId = useScope(); |
| 274 | const secrets = useAtomValue(secretsAtom(scopeId)); | 266 | const secrets = useAtomValue(secretsAtom(scopeId)); |
| @@ -4,21 +4,6 @@ import type { SourcePlugin } from "../plugins/source-plugin"; · 3 unmodified lines | |||
| 4 | import { useAtomRefresh } from "@effect-atom/atom-react"; | 4 | import { useAtomRefresh } from "@effect-atom/atom-react"; |
| 5 | import { sourcesAtom } from "../api/atoms"; | 5 | import { sourcesAtom } from "../api/atoms"; |
| 6 | import { useScope } from "../hooks/use-scope"; | 6 | import { useScope } from "../hooks/use-scope"; |
| 7 | import { openApiSourcePlugin } from "@executor/plugin-openapi/react"; | ||
| 8 | import { mcpSourcePlugin } from "@executor/plugin-mcp/react"; | ||
| 9 | import { googleDiscoverySourcePlugin } from "@executor/plugin-google-discovery/react"; | ||
| 10 | import { graphqlSourcePlugin } from "@executor/plugin-graphql/react"; | ||
| 11 | |||
| 12 | // --------------------------------------------------------------------------- | ||
| 13 | // Registered source plugins | ||
| 14 | // --------------------------------------------------------------------------- | ||
| 15 | |||
| 16 | const sourcePlugins: SourcePlugin[] = [ | ||
| 17 | openApiSourcePlugin, | ||
| 18 | mcpSourcePlugin, | ||
| 19 | googleDiscoverySourcePlugin, | ||
| 20 | graphqlSourcePlugin, | ||
| 21 | ]; | ||
| 22 | 7 | ||
| 23 | // --------------------------------------------------------------------------- | 8 | // --------------------------------------------------------------------------- |
| 24 | // Page | 9 | // Page |
| @@ -28,8 +13,9 @@ export function SourcesAddPage(props: { · 3 unmodified lines | |||
| 28 | pluginKey: string; | 13 | pluginKey: string; |
| 29 | url?: string; | 14 | url?: string; |
| 30 | preset?: string; | 15 | preset?: string; |
| 16 | sourcePlugins: readonly SourcePlugin[]; | ||
| 31 | }) { | 17 | }) { |
| 32 | const { pluginKey, url, preset } = props; | 18 | const { pluginKey, url, preset, sourcePlugins } = props; |
| 33 | const scopeId = useScope(); | 19 | const scopeId = useScope(); |
| 34 | const refreshSources = useAtomRefresh(sourcesAtom(scopeId)); | 20 | const refreshSources = useAtomRefresh(sourcesAtom(scopeId)); |
| 35 | const navigate = useNavigate(); | 21 | const navigate = useNavigate(); |
| @@ -4,23 +4,8 @@ import { Result, useAtomValue, useAtomSet } from "@effect-atom/atom-react"; · 3 unmodified lines | |||
| 4 | import { sourcesAtom, detectSource } from "../api/atoms"; | 4 | import { sourcesAtom, detectSource } from "../api/atoms"; |
| 5 | import { useScope } from "../hooks/use-scope"; | 5 | import { useScope } from "../hooks/use-scope"; |
| 6 | import type { SourcePlugin, SourcePreset } from "../plugins/source-plugin"; | 6 | import type { SourcePlugin, SourcePreset } from "../plugins/source-plugin"; |
| 7 | import { openApiSourcePlugin } from "@executor/plugin-openapi/react"; | ||
| 8 | import { mcpSourcePlugin } from "@executor/plugin-mcp/react"; | ||
| 9 | import { googleDiscoverySourcePlugin } from "@executor/plugin-google-discovery/react"; | ||
| 10 | import { graphqlSourcePlugin } from "@executor/plugin-graphql/react"; | ||
| 11 | import { McpInstallCard } from "../components/mcp-install-card"; | 7 | import { McpInstallCard } from "../components/mcp-install-card"; |
| 12 | 8 | ||
| 13 | // --------------------------------------------------------------------------- | ||
| 14 | // Registered source plugins | ||
| 15 | // --------------------------------------------------------------------------- | ||
| 16 | |||
| 17 | const sourcePlugins: SourcePlugin[] = [ | ||
| 18 | openApiSourcePlugin, | ||
| 19 | mcpSourcePlugin, | ||
| 20 | googleDiscoverySourcePlugin, | ||
| 21 | graphqlSourcePlugin, | ||
| 22 | ]; | ||
| 23 | |||
| 24 | const KIND_TO_PLUGIN_KEY: Record<string, string> = { | 9 | const KIND_TO_PLUGIN_KEY: Record<string, string> = { |
| 25 | openapi: "openapi", | 10 | openapi: "openapi", |
| 26 | mcp: "mcp", | 11 | mcp: "mcp", |
| @@ -32,7 +17,8 @@ const KIND_TO_PLUGIN_KEY: Record<string, string> = { · 5 unmodified lines | |||
| 32 | // Page | 17 | // Page |
| 33 | // --------------------------------------------------------------------------- | 18 | // --------------------------------------------------------------------------- |
| 34 | 19 | ||
| 35 | export function SourcesPage() { | 20 | export function SourcesPage(props: { sourcePlugins: readonly SourcePlugin[] }) { |
| 21 | const { sourcePlugins } = props; | ||
| 36 | const [url, setUrl] = useState(""); | 22 | const [url, setUrl] = useState(""); |
| 37 | const [detecting, setDetecting] = useState(false); | 23 | const [detecting, setDetecting] = useState(false); |
| 38 | const [error, setError] = useState<string | null>(null); | 24 | const [error, setError] = useState<string | null>(null); |